Index: runtime/vm/flow_graph_compiler_ia32.cc |
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc |
index be480f1adad14d8934b64d4db6e6032c0e85a1dd..36c4a175b29656ca542ca3ab27028f90f1937dab 100644 |
--- a/runtime/vm/flow_graph_compiler_ia32.cc |
+++ b/runtime/vm/flow_graph_compiler_ia32.cc |
@@ -1123,6 +1123,17 @@ void FlowGraphCompiler::CompileGraph() { |
__ int3(); |
GenerateDeferredCode(); |
+ |
+ BeginCodeSourceRange(); |
+ if (is_optimizing() && !FLAG_precompiled_mode) { |
+ // Leave enough space for patching in case of lazy deoptimization. |
+ __ nop(CallPattern::pattern_length_in_bytes()); |
+ lazy_deopt_return_pc_offset_ = assembler()->CodeSize(); |
+ __ Jmp(*StubCode::DeoptimizeLazyFromReturn_entry()); |
+ lazy_deopt_throw_pc_offset_ = assembler()->CodeSize(); |
+ __ Jmp(*StubCode::DeoptimizeLazyFromThrow_entry()); |
+ } |
+ EndCodeSourceRange(TokenPosition::kDartCodeEpilogue); |
} |