Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index b481e0d6c416a51664356647254f1150e0b07154..6365b3c79d766a085babfa7d76f2274bde9be287 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -106,6 +106,7 @@ void IrregexpCompilationPipeline::ParseFunction( |
// Variables are allocated after compilation. |
} |
+ |
FlowGraph* IrregexpCompilationPipeline::BuildFlowGraph( |
Zone* zone, |
ParsedFunction* parsed_function, |
@@ -132,10 +133,12 @@ FlowGraph* IrregexpCompilationPipeline::BuildFlowGraph( |
result.num_blocks); |
} |
+ |
void IrregexpCompilationPipeline::FinalizeCompilation() { |
backtrack_goto_->ComputeOffsetTable(); |
} |
+ |
CompilationPipeline* CompilationPipeline::New(Zone* zone, |
const Function& function) { |
if (function.IsIrregexpFunction()) { |
@@ -1291,8 +1294,11 @@ RawError* Compiler::CompileOptimizedFunction(Thread* thread, |
// Optimization must happen in non-mutator/Dart thread if background |
// compilation is on. OSR compilation still occurs in the main thread. |
+ // TODO(Srdjan): Remove assert allowance for regular expression functions |
+ // once they can be compiled in background. |
ASSERT((osr_id != kNoOSRDeoptId) || !FLAG_background_compilation || |
- !thread->IsMutatorThread()); |
+ !thread->IsMutatorThread() || |
+ function.IsIrregexpFunction()); |
CompilationPipeline* pipeline = |
CompilationPipeline::New(thread->zone(), function); |
return CompileFunctionHelper(pipeline, |