Reviewers: rossberg,
Message:
PTAL.
I realized that implications trump specifying a flag on command line,
So before this CL, even if you specify --noharmony-strings,
--harmony-shipping,
being true, overrode it.
This CL makes it so that:
- --harmony-<shipping feature> is enabled by default
- --noharmony-staging disables all of them
- --noharmony-<shipping feature> disables a single feature without
affecting all
others
The only thing that is not supported is "--noharmony-shipping
--harmony-feature"
(feature is still disabled) but that is fine.
Description:
Make sure that individual shipping features can be disabled.
[email protected]
Please review this at https://codereview.chromium.org/779203005/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+14, -3 lines):
M src/flag-definitions.h
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
6ede84322aecd19984007b721729c993b6401fa3..5cdad437e92a9bae41c26b0288f25a596ecd87d1
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -16,6 +16,9 @@
#define DEFINE_NEG_IMPLICATION(whenflag, thenflag) \
DEFINE_VALUE_IMPLICATION(whenflag, thenflag, false)
+#define DEFINE_NEG_NEG_IMPLICATION(whenflag, thenflag) \
+ DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, false)
+
// We want to declare the names of the variables for the header file.
Normally
// this will just be an extern declaration, but for a readonly flag we let
the
// compiler make better optimizations by giving it the value.
@@ -54,6 +57,9 @@
#define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) \
if (FLAG_##whenflag) FLAG_##thenflag = value;
+#define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) \
+ if (!FLAG_##whenflag) FLAG_##thenflag = value;
+
#else
#error No mode supplied when including flags.defs
#endif
@@ -75,6 +81,10 @@
#define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value)
#endif
+#ifndef DEFINE_NEG_VALUE_IMPLICATION
+#define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value)
+#endif
+
#define COMMA ,
#ifdef FLAG_MODE_DECLARE
@@ -202,9 +212,9 @@ HARMONY_INPROGRESS(FLAG_INPROGRESS_FEATURES)
HARMONY_STAGED(FLAG_STAGED_FEATURES)
#undef FLAG_STAGED_FEATURES
-#define FLAG_SHIPPING_FEATURES(id, description) \
- DEFINE_BOOL(id, false, "enable " #description) \
- DEFINE_IMPLICATION(harmony_shipping, id)
+#define FLAG_SHIPPING_FEATURES(id, description) \
+ DEFINE_BOOL(id, true, "enable " #description) \
+ DEFINE_NEG_NEG_IMPLICATION(harmony_shipping, id)
HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES)
#undef FLAG_SHIPPING_FEATURES
@@ -985,6 +995,7 @@ DEFINE_IMPLICATION(unbox_double_fields,
track_double_fields)
#undef DEFINE_ARGS
#undef DEFINE_IMPLICATION
#undef DEFINE_NEG_IMPLICATION
+#undef DEFINE_NEG_VALUE_IMPLICATION
#undef DEFINE_VALUE_IMPLICATION
#undef DEFINE_ALIAS_BOOL
#undef DEFINE_ALIAS_INT
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.