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 e4481b7496f5ee66d7c616f9dfd7203aed7f31a1..a8e9da5637e2a90e7c2fd2710d8ca71d1af58ccf 100644 |
--- a/runtime/vm/flow_graph_compiler_ia32.cc |
+++ b/runtime/vm/flow_graph_compiler_ia32.cc |
@@ -15,6 +15,7 @@ |
#include "vm/deopt_instructions.h" |
#include "vm/flow_graph_builder.h" |
#include "vm/il_printer.h" |
+#include "vm/instructions.h" |
#include "vm/locations.h" |
#include "vm/object_store.h" |
#include "vm/parser.h" |
@@ -1128,6 +1129,9 @@ void FlowGraphCompiler::CompileGraph() { |
GenerateDeferredCode(); |
if (is_optimizing()) { |
+ // Leave enough space for patching in case of lazy deoptimization from |
+ // deferred code. |
+ __ nop(CallPattern::pattern_length_in_bytes()); |
lazy_deopt_pc_offset_ = assembler()->CodeSize(); |
__ Jmp(*StubCode::DeoptimizeLazy_entry()); |
} |