Index: runtime/vm/intermediate_language_arm64.cc |
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc |
index 12b9f3db8b369a2931071cf86bbcb14087a3d2cd..af9f56d1c2910810199b40930c7915a8d992f84b 100644 |
--- a/runtime/vm/intermediate_language_arm64.cc |
+++ b/runtime/vm/intermediate_language_arm64.cc |
@@ -2554,6 +2554,14 @@ LocationSummary* CatchBlockEntryInstr::MakeLocationSummary(Zone* zone, |
void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
+ // Ensure space for patching return sites for lazy deopt. |
+ if (!FLAG_precompiled_mode && compiler->is_optimizing()) { |
+ for (intptr_t i = 0; |
+ i < CallPattern::kDeoptCallLengthInInstructions; |
+ ++i) { |
+ __ orr(R0, ZR, Operand(R0)); // nop |
+ } |
+ } |
__ Bind(compiler->GetJumpLabel(this)); |
compiler->AddExceptionHandler(catch_try_index(), |
try_index(), |