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

Unified Diff: runtime/vm/deopt_instructions.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/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 9c959f8bb35c623dc39216a41fd74a8912d40b84..1f7b4911904485082c0581c0a8eac0f000408b4a 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -227,11 +227,13 @@ void DeoptInfoBuilder::AddCopy(const Location& from_loc,
deopt_instr = new DeoptRegisterInstr(from_loc.reg());
} else if (from_loc.IsStackSlot()) {
deopt_instr = new DeoptStackSlotInstr(from_loc.stack_index() + num_args_);
- } else if (from_loc.IsInvalid()) {
- ASSERT(from_value.IsConstant());
+ } else if (from_loc.IsInvalid() && from_value.IsConstant()) {
const Object& obj = from_value.AsConstant()->value();
intptr_t object_table_index = FindOrAddObjectInTable(obj);
deopt_instr = new DeoptConstantInstr(object_table_index);
+ } else if (from_loc.IsInvalid()) {
+ ASSERT(from_value.AsUse()->definition()->IsPushArgument());
+ deopt_instr = new DeoptStackSlotInstr(PushArgument() + num_args_);
} else {
UNREACHABLE();
}

Powered by Google App Engine
This is Rietveld 408576698