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

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: fix build after merge 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 | « runtime/vm/flag_list.h ('k') | runtime/vm/flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flags.h
diff --git a/runtime/vm/flags.h b/runtime/vm/flags.h
index d3e4869f28f6a9e858eb9a56c265098590f84a73..81e69c04d141e7972e38fe1ffe7872f5999dfd2b 100644
--- a/runtime/vm/flags.h
+++ b/runtime/vm/flags.h
@@ -110,23 +110,47 @@ class Flags {
const type FLAG_##name = default_value;
#endif // defined(DEBUG)
-#if defined(PRODUCT)
+#if defined(PRODUCT) && defined(DART_PRECOMPILED_RUNTIME)
+#define RELEASE_FLAG_MARCO(name, precompiled_value, product_value, type, \
+ default_value, comment) \
+ const type FLAG_##name = product_value;
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \
+ default_value, comment) \
+ const type FLAG_##name = precompiled_value;
+
+#elif defined(PRODUCT) // !PRECOMPILED
#define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
const type FLAG_##name = product_value;
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \
+ default_value, comment) \
+ extern type FLAG_##name;
-#else // defined(PRODUCT)
+#elif defined(DART_PRECOMPILED_RUNTIME) // !PRODUCT
+#define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
+ extern type FLAG_##name;
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \
+ default_value, comment) \
+ const type FLAG_##name = precompiled_value;
+#else // !PRODUCT && !PRECOMPILED
#define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
extern type FLAG_##name;
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \
+ default_value, comment) \
+ extern type FLAG_##name;
-#endif // defined(PRODUCT)
+#endif
// 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
« no previous file with comments | « runtime/vm/flag_list.h ('k') | runtime/vm/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698