Index: runtime/vm/intermediate_language_arm.cc |
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc |
index f73507ac3f0e2a8f6b2ba142bf0173134d0c60a2..d49c9e8a025464cce482c3ba6faa33976b8287e3 100644 |
--- a/runtime/vm/intermediate_language_arm.cc |
+++ b/runtime/vm/intermediate_language_arm.cc |
@@ -2485,9 +2485,15 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
const Code& stub = Code::ZoneHandle(compiler->zone(), |
StubCode::AllocateArray_entry()->code()); |
compiler->AddStubCallTarget(stub); |
- compiler->GenerateCallWithDeopt(token_pos(), deopt_id(), |
- *StubCode::AllocateArray_entry(), |
- RawPcDescriptors::kOther, locs()); |
+ if (deopt_id() == Thread::kNoDeoptId) { |
+ ASSERT(compiler->is_optimizing()); |
+ compiler->GenerateCall(token_pos(), *StubCode::AllocateArray_entry(), |
+ RawPcDescriptors::kOther, locs()); |
+ } else { |
+ compiler->GenerateCallWithDeopt(token_pos(), deopt_id(), |
+ *StubCode::AllocateArray_entry(), |
+ RawPcDescriptors::kOther, locs()); |
+ } |
ASSERT(locs()->out(0).reg() == kResultReg); |
} |