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

Unified Diff: runtime/vm/compiler.cc

Issue 1760763002: Turn on background compilation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Disable background compilation of regexp compilation Created 4 years, 10 months 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/flag_list.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 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,
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flag_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698