Index: runtime/vm/flow_graph_compiler_dbc.cc |
diff --git a/runtime/vm/flow_graph_compiler_dbc.cc b/runtime/vm/flow_graph_compiler_dbc.cc |
index 86352cc491b03df24cef4cc6c6dc978111bb8f21..7b0a25c6269df8c1cde57d96324bbdb1c3052469 100644 |
--- a/runtime/vm/flow_graph_compiler_dbc.cc |
+++ b/runtime/vm/flow_graph_compiler_dbc.cc |
@@ -209,7 +209,20 @@ void FlowGraphCompiler::RecordAfterCall(Instruction* instr) { |
void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
intptr_t stub_ix) { |
- UNIMPLEMENTED(); |
+ // Calls do not need stubs, they share a deoptimization trampoline. |
Vyacheslav Egorov (Google)
2016/06/08 11:58:53
I don't think we really need DeoptInfoWithStub on
zra
2016/06/08 17:46:30
Done.
|
+ ASSERT(reason() != ICData::kDeoptAtCall); |
+ Assembler* assembler = compiler->assembler(); |
+#define __ assembler-> |
+ __ Comment("%s", Name()); |
+ __ Bind(entry_label()); |
+ if (FLAG_trap_on_deoptimization) { |
+ __ Trap(); |
+ } |
+ |
+ ASSERT(deopt_env() != NULL); |
+ set_pc_offset(assembler->CodeSize()); |
zra
2016/06/07 22:31:28
On other architectures this comes after the Deopt
|
+ __ Deopt(0, deopt_id()); |
+#undef __ |
} |
@@ -387,6 +400,8 @@ void FlowGraphCompiler::CompileGraph() { |
EmitFrameEntry(); |
VisitBlocks(); |
+ __ Trap(); |
+ GenerateDeferredCode(); |
} |