Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1425)

Unified Diff: runtime/vm/compiler.cc

Issue 716163003: Use one offsets table per generated irregexp matching function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698