| Index: runtime/vm/flow_graph_compiler_arm.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
|
| index ecbb5484112d2f3331daf995c15c7a677c60da75..e689a430e057c049f1c66dd4c41790b593ca656d 100644
|
| --- a/runtime/vm/flow_graph_compiler_arm.cc
|
| +++ b/runtime/vm/flow_graph_compiler_arm.cc
|
| @@ -243,7 +243,6 @@ RawSubtypeTestCache* FlowGraphCompiler::GenerateInlineInstanceof(
|
|
|
|
|
| void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
|
| - intptr_t deopt_id,
|
| const AbstractType& type,
|
| bool negate_result,
|
| LocationSummary* locs) {
|
| @@ -342,9 +341,18 @@ void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
|
| if (!is_optimizing()) {
|
| if (FLAG_enable_type_checks && instr->IsAssertAssignable()) {
|
| AssertAssignableInstr* assert = instr->AsAssertAssignable();
|
| - AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
|
| + AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| assert->deopt_id(),
|
| assert->token_pos());
|
| + } else if (instr->IsGuardField()) {
|
| + GuardFieldInstr* guard = instr->AsGuardField();
|
| + AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| + guard->deopt_id(),
|
| + Scanner::kDummyTokenIndex);
|
| + } else if (instr->CanBeDeoptimizationTarget()) {
|
| + AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| + instr->deopt_id(),
|
| + Scanner::kDummyTokenIndex);
|
| }
|
| AllocateRegistersLocally(instr);
|
| }
|
| @@ -818,14 +826,13 @@ void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id,
|
| RecordSafepoint(locs);
|
| // Marks either the continuation point in unoptimized code or the
|
| // deoptimization point in optimized code, after call.
|
| + const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
|
| if (is_optimizing()) {
|
| - AddDeoptIndexAtCall(deopt_id, token_pos);
|
| + AddDeoptIndexAtCall(deopt_id_after, token_pos);
|
| } else {
|
| // Add deoptimization continuation point after the call and before the
|
| // arguments are removed.
|
| - AddCurrentDescriptor(PcDescriptors::kDeoptAfter,
|
| - deopt_id,
|
| - token_pos);
|
| + AddCurrentDescriptor(PcDescriptors::kDeopt, deopt_id_after, token_pos);
|
| }
|
| }
|
|
|
|
|