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

Unified Diff: runtime/vm/code_generator.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 | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 4ebd2496dc9305b1bae6dd69ee0aa1515dcf3d15..652cdc25a7e6126c09cc072d077260351e0000fa 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -32,6 +32,10 @@ DEFINE_FLAG(int, max_subtype_cache_entries, 100,
DEFINE_FLAG(int, regexp_optimization_counter_threshold, 1000,
"RegExp's usage-counter value before it is optimized, -1 means never");
DEFINE_FLAG(charp, optimization_filter, NULL, "Optimize only named function");
+// TODO(srdjan): Remove this flag once background compilation of regular
+// expressions is possible.
+DEFINE_FLAG(bool, regexp_opt_in_background, false,
+ "Optimize reg-exp functions in background");
DEFINE_FLAG(int, reoptimization_counter_threshold, 4000,
"Counter threshold before a function gets reoptimized.");
DEFINE_FLAG(bool, stop_on_excessive_deoptimization, false,
@@ -1461,7 +1465,8 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
}
}
// TODO(srdjan): Fix background compilation of regular expressions.
- if (FLAG_background_compilation) {
+ if (FLAG_background_compilation &&
+ (!function.IsIrregexpFunction() || FLAG_regexp_opt_in_background)) {
if (FLAG_enable_inlining_annotations) {
FATAL("Cannot enable inlining annotations and background compilation");
}
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698