Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index fe9b484a41334cb18585c661e2f7275b7a3a855d..139c02d13f7d91c615bad274bf70abaae8169254 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -110,7 +110,7 @@ class DefaultCompilationPipeline : public CompilationPipeline { |
class IrregexpCompilationPipeline : public DefaultCompilationPipeline { |
public: |
explicit IrregexpCompilationPipeline(Isolate* isolate) |
- : macro_assembler_(NULL), |
+ : graph_entry_(NULL), |
isolate_(isolate) { } |
virtual void ParseFunction(ParsedFunction* parsed_function) { |
@@ -127,7 +127,6 @@ class IrregexpCompilationPipeline : public DefaultCompilationPipeline { |
RegExpEngine::Compile(parsed_function->regexp_compile_data(), |
parsed_function, |
ic_data_array); |
- macro_assembler_ = result.macro_assembler; |
// Allocate variables now that we know the number of locals. |
parsed_function->AllocateIrregexpVariables(result.num_stack_locals); |
@@ -138,17 +137,20 @@ class IrregexpCompilationPipeline : public DefaultCompilationPipeline { |
NULL, // NULL = not inlining. |
osr_id); |
+ // Store the graph entry for later finalization. |
+ graph_entry_ = result.graph_entry; |
+ |
return new(isolate_) FlowGraph(builder, |
result.graph_entry, |
result.num_blocks); |
} |
virtual void FinalizeCompilation() { |
- macro_assembler_->FinalizeBlockOffsetTable(); |
+ IRRegExpMacroAssembler::FinalizeBlockOffsetTable(isolate_, graph_entry_); |
} |
private: |
- IRRegExpMacroAssembler* macro_assembler_; |
+ GraphEntryInstr* graph_entry_; |
Isolate* isolate_; |
}; |