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(); |
} |