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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1759913002: Make precompiler work with product mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 0c18be77c3c3da8ecc7fd71023b2477c2d9d0a9e..ccd6f2a14a96da995a5d31e9bd15a3b9412311b2 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -59,18 +59,12 @@ DECLARE_FLAG(int, inlining_caller_size_threshold);
DECLARE_FLAG(int, inlining_constant_arguments_max_size_threshold);
DECLARE_FLAG(int, inlining_constant_arguments_min_size_threshold);
-#if !defined(DART_PRECOMPILED_RUNTIME)
static void PrecompilationModeHandler(bool value) {
if (value) {
#if defined(TARGET_ARCH_IA32)
FATAL("Precompilation not supported on IA32");
#endif
-#if defined(PRODUCT)
- FATAL("dart_noopt not supported in product mode");
-#else
- FLAG_support_debugger = false;
-
// Flags affecting compilation only:
// There is no counter feedback in precompilation, so ignore the counter
// when making inlining decisions.
@@ -87,27 +81,32 @@ static void PrecompilationModeHandler(bool value) {
FLAG_allow_absolute_addresses = false;
FLAG_always_megamorphic_calls = true;
- FLAG_background_compilation = false;
- FLAG_collect_code = false;
FLAG_collect_dynamic_function_names = true;
- FLAG_deoptimize_alot = false; // Used in some tests.
- FLAG_deoptimize_every = 0; // Used in some tests.
FLAG_emit_edge_counters = false;
- FLAG_enable_mirrors = false;
FLAG_fields_may_be_reset = true;
FLAG_ic_range_profiling = false;
- FLAG_interpret_irregexp = true;
FLAG_lazy_dispatchers = false;
FLAG_link_natives_lazily = true;
- FLAG_load_deferred_eagerly = true;
FLAG_optimization_counter_threshold = -1;
FLAG_polymorphic_with_deopt = false;
FLAG_precompiled_mode = true;
- FLAG_print_stop_message = false;
- FLAG_use_cha_deopt = false;
+ FLAG_reorder_basic_blocks = false;
FLAG_use_field_guards = false;
+ FLAG_use_cha_deopt = false;
+
+#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
+ // Set flags affecting runtime accordingly for dart_noopt.
+ FLAG_background_compilation = false;
+ FLAG_collect_code = false;
+ FLAG_support_debugger = false;
+ FLAG_deoptimize_alot = false; // Used in some tests.
+ FLAG_deoptimize_every = 0; // Used in some tests.
+ FLAG_enable_mirrors = false;
+ FLAG_interpret_irregexp = true;
+ FLAG_load_deferred_eagerly = true;
+ FLAG_print_stop_message = false;
FLAG_use_osr = false;
-#endif // PRODUCT
+#endif
}
}
@@ -115,30 +114,17 @@ DEFINE_FLAG_HANDLER(PrecompilationModeHandler,
precompilation,
"Precompilation mode");
-#else // DART_PRECOMPILED_RUNTIME
+#ifdef DART_PRECOMPILED_RUNTIME
-COMPILE_ASSERT(!FLAG_allow_absolute_addresses);
COMPILE_ASSERT(!FLAG_background_compilation);
COMPILE_ASSERT(!FLAG_collect_code);
COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests.
-COMPILE_ASSERT(!FLAG_emit_edge_counters);
COMPILE_ASSERT(!FLAG_enable_mirrors);
-COMPILE_ASSERT(!FLAG_ic_range_profiling);
-COMPILE_ASSERT(!FLAG_lazy_dispatchers);
-COMPILE_ASSERT(!FLAG_polymorphic_with_deopt);
COMPILE_ASSERT(!FLAG_print_stop_message);
-COMPILE_ASSERT(!FLAG_use_cha_deopt);
-COMPILE_ASSERT(!FLAG_use_field_guards);
COMPILE_ASSERT(!FLAG_use_osr);
-COMPILE_ASSERT(FLAG_always_megamorphic_calls);
-COMPILE_ASSERT(FLAG_collect_dynamic_function_names);
COMPILE_ASSERT(FLAG_deoptimize_every == 0); // Used in some tests.
-COMPILE_ASSERT(FLAG_fields_may_be_reset);
COMPILE_ASSERT(FLAG_interpret_irregexp);
-COMPILE_ASSERT(FLAG_link_natives_lazily);
COMPILE_ASSERT(FLAG_load_deferred_eagerly);
-COMPILE_ASSERT(FLAG_optimization_counter_threshold == -1);
-COMPILE_ASSERT(FLAG_precompiled_mode);
#endif // DART_PRECOMPILED_RUNTIME

Powered by Google App Engine
This is Rietveld 408576698