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

Unified Diff: runtime/vm/flags.h

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.h
diff --git a/runtime/vm/flags.h b/runtime/vm/flags.h
index d3e4869f28f6a9e858eb9a56c265098590f84a73..7e265d25ce64613e24dada1040e37af9cfc51544 100644
--- a/runtime/vm/flags.h
+++ b/runtime/vm/flags.h
@@ -121,12 +121,26 @@ class Flags {
#endif // defined(PRODUCT)
+#if defined(DART_PRECOMPILED_RUNTIME)
Ivan Posva 2016/02/19 01:07:49 As discussed we need to have a way for a flag to b
Florian Schneider 2016/02/19 17:42:29 Done.
+#define PRECOMPILE_FLAG_MARCO(name, pre_value, type, default_value, comment) \
+ const type FLAG_##name = pre_value;
+
+#else // defined(DART_PRECOMPILED_RUNTIME)
+#define PRECOMPILE_FLAG_MARCO(name, pre_value, type, default_value, comment) \
+ extern type FLAG_##name;
+
+#endif // defined(DART_PRECOMPILED_RUNTIME)
+
// Now declare all 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
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698