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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 1314143002: VM: Don't depend on unoptimized code when inlining and creating deoptimization info. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 5 years, 4 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_mips.cc ('k') | runtime/vm/flow_graph_inliner.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
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 33e01bb4c24f83fe2b09c4679f2d7173953e7cbb..40143d4ce34c5fbad73c092ca410fbb3dc2480c4 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -101,12 +101,10 @@ RawTypedData* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
Zone* zone = compiler->zone();
// Current PP, FP, and PC.
- builder->AddPp(Function::Handle(zone, current->code().function()), slot_ix++);
+ builder->AddPp(current->function(), slot_ix++);
builder->AddPcMarker(Function::Handle(zone), slot_ix++);
builder->AddCallerFp(slot_ix++);
- builder->AddReturnAddress(Function::Handle(zone, current->code().function()),
- deopt_id(),
- slot_ix++);
+ builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
// Emit all values that are needed for materialization as a part of the
// expression stack for the bottom-most frame. This guarantees that GC
@@ -124,16 +122,14 @@ RawTypedData* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
current = current->outer();
while (current != NULL) {
// PP, FP, and PC.
- builder->AddPp(Function::Handle(zone, current->code().function()),
- slot_ix++);
- builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
- slot_ix++);
+ builder->AddPp(current->function(), slot_ix++);
+ builder->AddPcMarker(previous->function(), slot_ix++);
builder->AddCallerFp(slot_ix++);
// For any outer environment the deopt id is that of the call instruction
// which is recorded in the outer environment.
builder->AddReturnAddress(
- Function::Handle(zone, current->code().function()),
+ current->function(),
Isolate::ToDeoptAfter(current->deopt_id()),
slot_ix++);
@@ -164,8 +160,7 @@ RawTypedData* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
// For the outermost environment, set caller PC, caller PP, and caller FP.
builder->AddCallerPp(slot_ix++);
// PC marker.
- builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
- slot_ix++);
+ builder->AddPcMarker(previous->function(), slot_ix++);
builder->AddCallerFp(slot_ix++);
builder->AddCallerPc(slot_ix++);
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698