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

Unified Diff: runtime/vm/flow_graph_compiler_dbc.cc

Issue 2039913006: DBC: Eager deoptimization and CheckSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698