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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 12457034: Ensure that all goto instructions have deoptimization target. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Delete UNREACHABLE Created 7 years, 8 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.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 791412daccbd29b1b81d6e769e9e4ebfb8950a81..7b01c4c4c3c08ca7e957da19b870088fc689948c 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -31,19 +31,6 @@ DECLARE_FLAG(bool, report_usage_count);
DECLARE_FLAG(int, optimization_counter_threshold);
DECLARE_FLAG(bool, use_cha);
-void CompilerDeoptInfo::BuildReturnAddress(DeoptInfoBuilder* builder,
- const Function& function,
- intptr_t slot_ix) {
- builder->AddReturnAddressAfter(function, deopt_id(), slot_ix);
-}
-
-
-void CompilerDeoptInfoWithStub::BuildReturnAddress(DeoptInfoBuilder* builder,
- const Function& function,
- intptr_t slot_ix) {
- builder->AddReturnAddressBefore(function, deopt_id(), slot_ix);
-}
-
// Assign locations to incoming arguments, i.e., values pushed above spill slots
// with PushArgument. Recursively allocates from outermost to innermost
@@ -72,8 +59,9 @@ RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
intptr_t slot_ix = 0;
Environment* current = deoptimization_env_;
- // For the innermost environment, call the virtual return builder.
- BuildReturnAddress(builder, current->function(), slot_ix++);
+ builder->AddReturnAddress(current->function(),
+ deopt_id(),
+ slot_ix++);
// For the innermost environment, set outgoing arguments and the locals.
for (intptr_t i = current->Length() - 1;
@@ -91,9 +79,9 @@ RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
while (current != NULL) {
// For any outer environment the deopt id is that of the call instruction
// which is recorded in the outer environment.
- builder->AddReturnAddressAfter(current->function(),
- current->deopt_id(),
- slot_ix++);
+ builder->AddReturnAddress(current->function(),
+ Isolate::ToDeoptAfter(current->deopt_id()),
+ slot_ix++);
// The values of outgoing arguments can be changed from the inlined call so
// we must read them from the previous environment.
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698