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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10825282: Put PushArgument into the environment instead of raw values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
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 460387922a800748a88262d35b9adc9e4e3eae6e..11ddd379e2d9ab3a3258d652e7402bed69968288 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -48,16 +48,24 @@ void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler,
const intptr_t local_slot_count = values.length() - fixed_parameter_count;
const intptr_t top_offset =
ParsedFunction::kFirstLocalSlotIndex - (local_slot_count - 1);
+
__ leaq(RSP, Address(RBP, top_offset * kWordSize));
// 2. Build and emit a parallel move representing the frame translation.
+ intptr_t height = compiler->StackSize();
ParallelMoveInstr* move = new ParallelMoveInstr();
for (intptr_t i = 0; i < values.length(); i++) {
Location destination = Location::StackSlot(i - fixed_parameter_count);
Location source = deoptimization_env_->LocationAt(i);
if (source.IsInvalid()) {
- ASSERT(values[i]->IsConstant());
- source = Location::Constant(values[i]->AsConstant()->value());
+ Value* value = values[i];
+ if (value->IsConstant()) {
+ source = Location::Constant(value->AsConstant()->value());
+ } else {
+ ASSERT(value->IsUse() &&
+ value->AsUse()->definition()->IsPushArgument());
+ source = Location::StackSlot(height++);
+ }
}
move->AddMove(destination, source);
}

Powered by Google App Engine
This is Rietveld 408576698