Index: runtime/vm/intermediate_language_x64.cc |
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc |
index c403dae9b3f96a0908e8ed68d007fb91a1e0a86c..e64ed358e096b1e6433679dd8eb72b91325185d1 100644 |
--- a/runtime/vm/intermediate_language_x64.cc |
+++ b/runtime/vm/intermediate_language_x64.cc |
@@ -2158,9 +2158,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()); |
+ } |
__ Bind(&done); |
ASSERT(locs()->out(0).reg() == kResultReg); |
} |