Index: runtime/vm/intermediate_language_arm64.cc |
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc |
index f9354e391a8d05212b8e99b36795dd6294fa958a..bc313d1e4e12ec1098f564d82af46ef48a1916b5 100644 |
--- a/runtime/vm/intermediate_language_arm64.cc |
+++ b/runtime/vm/intermediate_language_arm64.cc |
@@ -2214,9 +2214,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); |
} |