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

Unified Diff: runtime/vm/flags.cc

Issue 1714743002: VM: Separate precompilation-specific code, make flags const. (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/flags.cc
diff --git a/runtime/vm/flags.cc b/runtime/vm/flags.cc
index a2a63f7991020b81f566ea290f2fcb00acbbd34c..7f48a0a5b4e20376420625fb47fbb83d3d8bd089 100644
--- a/runtime/vm/flags.cc
+++ b/runtime/vm/flags.cc
@@ -41,13 +41,28 @@ DEFINE_FLAG(bool, ignore_unrecognized_flags, false,
comment);
#endif // defined(PRODUCT)
+#if defined(DART_PRECOMPILED_RUNTIME)
+// Nothing to be done for the product flag definitions.
+#define PRECOMPILE_FLAG_MARCO(name, product_value, type, default_value, comment)
+#else // defined(DART_PRECOMPILED_RUNTIME)
+#define PRECOMPILE_FLAG_MARCO(name, product_value, type, default_value, \
+ comment) \
+ type FLAG_##name = Flags::Register_##type(&FLAG_##name, \
+ #name, \
+ default_value, \
+ comment);
+#endif // defined(DART_PRECOMPILED_RUNTIME)
+
// Define all of the non-product flags here.
-FLAG_LIST(PRODUCT_FLAG_MARCO, RELEASE_FLAG_MARCO, DEBUG_FLAG_MARCO)
+FLAG_LIST(PRODUCT_FLAG_MARCO,
+ RELEASE_FLAG_MARCO,
+ DEBUG_FLAG_MARCO,
+ PRECOMPILE_FLAG_MARCO)
#undef RELEASE_FLAG_MARCO
#undef DEBUG_FLAG_MARCO
#undef PRODUCT_FLAG_MARCO
-
+#undef PRECOMPILE_FLAG_MARCO
bool Flags::initialized_ = false;

Powered by Google App Engine
This is Rietveld 408576698