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

Unified Diff: runtime/vm/code_generator.cc

Issue 1679373002: Disable reg-exp compilation in background via a flag (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Sync problem 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 bf7508ae716eb06b1fbb7001ab68b7b245856273..47d215c5936f9cd919edee13ceaa25c8f8c21447 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -40,6 +40,10 @@ DEFINE_FLAG(int, optimization_counter_threshold, 30000,
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,
@@ -1490,7 +1494,9 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
ASSERT(function.HasCode());
if (CanOptimizeFunction(function, thread)) {
- if (FLAG_background_compilation) {
+ // TODO(srdjan): Fix background compilation of regular expressions.
+ 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