Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10458050: Move ReturnInstr to new scheme (x64 and ia32) and implement more code in new ia32 compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 8165)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -1063,70 +1063,14 @@
void FlowGraphCompiler::VisitBind(BindInstr* instr) {
- ASSERT(instr->locs() == NULL);
-
- // If instruction does not have special location requirements
- // then it returns result in register RAX.
- instr->computation()->Accept(this);
- __ pushq(RAX);
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}
void FlowGraphCompiler::VisitReturn(ReturnInstr* instr) {
- LoadValue(RAX, instr->value());
- if (!is_optimizing()) {
- // Count only in unoptimized code.
- // TODO(srdjan): Replace the counting code with a type feedback
- // collection and counting stub.
- const Function& function =
- Function::ZoneHandle(parsed_function_.function().raw());
- __ LoadObject(RCX, function);
- __ incq(FieldAddress(RCX, Function::usage_counter_offset()));
- if (CodeGenerator::CanOptimize()) {
- // Do not optimize if usage count must be reported.
- __ cmpl(FieldAddress(RCX, Function::usage_counter_offset()),
- Immediate(FLAG_optimization_counter_threshold));
- Label not_yet_hot;
- __ j(LESS_EQUAL, &not_yet_hot, Assembler::kNearJump);
- __ pushq(RAX); // Preserve result.
- __ pushq(RCX); // Argument for runtime: function to optimize.
- __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
- __ popq(RCX); // Remove argument.
- __ popq(RAX); // Restore result.
- __ Bind(&not_yet_hot);
- }
- }
-
- if (FLAG_trace_functions) {
- __ pushq(RAX); // Preserve result.
- const Function& function =
- Function::ZoneHandle(parsed_function_.function().raw());
- __ LoadObject(RBX, function);
- __ pushq(RBX);
- GenerateCallRuntime(AstNode::kNoId,
- 0,
- CatchClauseNode::kInvalidTryIndex,
- kTraceFunctionExitRuntimeEntry);
- __ popq(RAX); // Remove argument.
- __ popq(RAX); // Restore result.
- }
- __ LeaveFrame();
- __ ret();
-
- // Generate 8 bytes of NOPs so that the debugger can patch the
- // return pattern with a call to the debug stub.
- __ nop(1);
- __ nop(1);
- __ nop(1);
- __ nop(1);
- __ nop(1);
- __ nop(1);
- __ nop(1);
- __ nop(1);
- AddCurrentDescriptor(PcDescriptors::kReturn,
- instr->cid(),
- instr->token_index(),
- CatchClauseNode::kInvalidTryIndex); // try-index.
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698