void InstallNativeFunctions_##id(); \
void InitializeGlobal_##id();
- SHIPPING_FEATURES(DECLARE_FEATURE_INITIALIZATION)
- HARMONY_FEATURES(DECLARE_FEATURE_INITIALIZATION)
- STAGED_FEATURES(DECLARE_FEATURE_INITIALIZATION)
-
- DECLARE_FEATURE_INITIALIZATION(harmony_proxies, "")
+ HARMONY_INPROGRESS(DECLARE_FEATURE_INITIALIZATION)
+ HARMONY_STAGED(DECLARE_FEATURE_INITIALIZATION)
+ HARMONY_SHIPPING(DECLARE_FEATURE_INITIALIZATION)
#undef DECLARE_FEATURE_INITIALIZATION
Handle<JSFunction> InstallInternalArray(Handle<JSBuiltinsObject> builtins,
#define FEATURE_INITIALIZE_GLOBAL(id, descr) InitializeGlobal_##id();
- SHIPPING_FEATURES(FEATURE_INITIALIZE_GLOBAL)
+ HARMONY_SHIPPING(FEATURE_INITIALIZE_GLOBAL)
#undef FEATURE_INITIALIZE_GLOBAL
// Initialize the embedder data slot.
void Genesis::InitializeExperimentalGlobal() {
#define FEATURE_INITIALIZE_GLOBAL(id, descr) InitializeGlobal_##id();
- HARMONY_FEATURES(FEATURE_INITIALIZE_GLOBAL)
- STAGED_FEATURES(FEATURE_INITIALIZE_GLOBAL)
+ HARMONY_INPROGRESS(FEATURE_INITIALIZE_GLOBAL)
+ HARMONY_STAGED(FEATURE_INITIALIZE_GLOBAL)
#undef FEATURE_INITIALIZE_GLOBAL
}
INSTALL_NATIVE(JSFunction, "ArrayValues", array_values_iterator);
#define INSTALL_NATIVE_FUNCTIONS_FOR(id, descr) InstallNativeFunctions_##id();
-
- SHIPPING_FEATURES(INSTALL_NATIVE_FUNCTIONS_FOR)
+ HARMONY_SHIPPING(INSTALL_NATIVE_FUNCTIONS_FOR)
#undef INSTALL_NATIVE_FUNCTIONS_FOR
}
}
#define INSTALL_NATIVE_FUNCTIONS_FOR(id, descr) InstallNativeFunctions_##id();
-
- HARMONY_FEATURES(INSTALL_NATIVE_FUNCTIONS_FOR)
- STAGED_FEATURES(INSTALL_NATIVE_FUNCTIONS_FOR)
- INSTALL_NATIVE_FUNCTIONS_FOR(harmony_proxies, "")
+ HARMONY_INPROGRESS(INSTALL_NATIVE_FUNCTIONS_FOR)
+ HARMONY_STAGED(INSTALL_NATIVE_FUNCTIONS_FOR)
#undef INSTALL_NATIVE_FUNCTIONS_FOR
}
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
+EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
void Genesis::InitializeGlobal_harmony_regexps() {
Handle<JSObject> builtins(native_context()->builtins());
} \
} \
}
- INSTALL_EXPERIMENTAL_NATIVES(harmony_proxies, "");
// Iterate over flags that are not enabled by default.
- HARMONY_FEATURES(INSTALL_EXPERIMENTAL_NATIVES);
- STAGED_FEATURES(INSTALL_EXPERIMENTAL_NATIVES);
+ HARMONY_INPROGRESS(INSTALL_EXPERIMENTAL_NATIVES);
+ HARMONY_STAGED(INSTALL_EXPERIMENTAL_NATIVES);
#undef INSTALL_EXPERIMENTAL_NATIVES
}
#define USE_NATIVES_FOR_FEATURE(id, descr) USE(id##_natives);
-
- SHIPPING_FEATURES(USE_NATIVES_FOR_FEATURE)
+ HARMONY_SHIPPING(USE_NATIVES_FOR_FEATURE)
#undef USE_NATIVES_FOR_FEATURE
InstallExperimentalNativeFunctions();
// Flags for language modes and experimental language features.
DEFINE_BOOL(use_strict, false, "enforce strict mode")
-DEFINE_BOOL(es_staging, false, "enable upcoming ES6+ features")
-DEFINE_BOOL(harmony, false, "enable all harmony features (except proxies)")
+DEFINE_BOOL(es_staging, false, "enable all completed harmony features")
+DEFINE_BOOL(harmony, false, "enable all completed harmony features")
DEFINE_IMPLICATION(harmony, es_staging)
+// TODO(rossberg): activate once we have staged scoping:
+// DEFINE_IMPLICATION(es_staging, harmony)
-#define HARMONY_FEATURES(V) \
+// Features that are still work in progress (behind individual flags).
+#define HARMONY_INPROGRESS(V) \
V(harmony_scoping, "harmony block scoping") \
V(harmony_modules, "harmony modules (implies block scoping)") \
- V(harmony_arrays, "harmony arrays") \
- V(harmony_classes, "harmony classes") \
+ V(harmony_arrays, "harmony array methods") \
+ V(harmony_classes, \
+ "harmony classes (implies block scoping & object literal extension)") \
V(harmony_object_literals, "harmony object literal extensions") \
- V(harmony_regexps, "reg-exp related harmony features") \
+ V(harmony_regexps, "harmony regular expression extensions") \
V(harmony_arrow_functions, "harmony arrow functions") \
- V(harmony_tostring, "harmony Symbol.toStringTag")
+ V(harmony_tostring, "harmony toString") \
+ V(harmony_proxies, "harmony proxies")
-#define STAGED_FEATURES(V) \
- V(harmony_strings, "harmony strings") \
- V(harmony_numeric_literals, "harmony numeric literals (0o77, 0b11)")
+// Features that are complete (but still behind --harmony/es-staging flag).
+#define HARMONY_STAGED(V) \
+ V(harmony_strings, "harmony string methods") \
+ V(harmony_numeric_literals, "harmony numeric literals")
-#define SHIPPING_FEATURES(V)
+// Features that are shipping (turned on by default, but internal flag remains).
+#define HARMONY_SHIPPING(V)
+
+// Once a shipping feature has proved stable in the wild, it will be dropped
+// from HARMONY_SHIPPING, all occurrences of the FLAG_ variable are removed,
+// and associated tests are moved from the harmony directory to the appropriate
+// esN directory.
-#define FLAG_FEATURES(id, description) \
- DEFINE_BOOL(id, false, "enable " #description) \
- DEFINE_IMPLICATION(harmony, id)
-HARMONY_FEATURES(FLAG_FEATURES)
-STAGED_FEATURES(FLAG_FEATURES)
-#undef FLAG_FEATURES
+#define FLAG_INPROGRESS_FEATURES(id, description) \
+ DEFINE_BOOL(id, false, "enable " #description " (in progress)")
+HARMONY_INPROGRESS(FLAG_INPROGRESS_FEATURES)
+#undef FLAG_INPROGRESS_FEATURES
-#define FLAG_STAGED_FEATURES(id, description) DEFINE_IMPLICATION(es_staging, id)
+// TODO(rossberg): temporary, remove once we have staged scoping.
+// After that, --harmony will be synonymous to --es-staging.
+DEFINE_IMPLICATION(harmony, harmony_scoping)
-STAGED_FEATURES(FLAG_STAGED_FEATURES)
+#define FLAG_STAGED_FEATURES(id, description) \
+ DEFINE_BOOL(id, false, "enable " #description) \
+ DEFINE_IMPLICATION(es_staging, id)
+HARMONY_STAGED(FLAG_STAGED_FEATURES)
#undef FLAG_STAGED_FEATURES
#define FLAG_SHIPPING_FEATURES(id, description) \
DEFINE_BOOL_READONLY(id, true, "enable " #description)
-
-SHIPPING_FEATURES(FLAG_SHIPPING_FEATURES)
+HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES)
#undef FLAG_SHIPPING_FEATURES
+
// Feature dependencies.
DEFINE_IMPLICATION(harmony_modules, harmony_scoping)
DEFINE_IMPLICATION(harmony_classes, harmony_scoping)
DEFINE_IMPLICATION(harmony_classes, harmony_object_literals)
-DEFINE_BOOL(harmony_proxies, false, "enable harmony proxies")
-// TODO(rossberg): Reenable when problems are sorted out.
-// DEFINE_IMPLICATION(harmony, harmony_proxies)
-
// Flags for experimental implementation features.
DEFINE_BOOL(compiled_keyed_generic_loads, false,