Revert of Introduce a kill-switch for shipping features. (patchset #2 id:20001 of...
authordslomov <dslomov@chromium.org>
Fri, 28 Nov 2014 18:27:45 +0000 (10:27 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 28 Nov 2014 18:27:55 +0000 (18:27 +0000)
Reason for revert:
Reverted for breaking nosnap: http://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux%20-%20nosnap/builds/1003/steps/Check/logs/Threading3

Original issue's description:
> Introduce a kill-switch for shipping features.
>
> R=rossberg@chromium.org
>
> Committed: https://chromium.googlesource.com/v8/v8/+/d6285620868b15c84eb9affa59f6b4e869f074b8

TBR=rossberg@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/763353002

Cr-Commit-Position: refs/heads/master@{#25574}

BUILD.gn
src/bootstrapper.cc
src/flag-definitions.h
src/mksnapshot.cc
test/mjsunit/debug-script.js
tools/gyp/v8.gyp

index 31aa95f..3c9b116 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -196,6 +196,7 @@ action("js2c") {
     "src/debug-debugger.js",
     "src/mirror-debugger.js",
     "src/liveedit-debugger.js",
+    "src/harmony-string.js",
     "src/macros.py",
   ]
 
@@ -234,7 +235,6 @@ action("js2c_experimental") {
     "src/macros.py",
     "src/proxy.js",
     "src/generator.js",
-    "src/harmony-string.js",
     "src/harmony-array.js",
     "src/harmony-typedarray.js",
     "src/harmony-classes.js",
index 5fed349..5830370 100644 (file)
@@ -1342,6 +1342,11 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
     delegate->shared()->DontAdaptArguments();
   }
 
+#define FEATURE_INITIALIZE_GLOBAL(id, descr) InitializeGlobal_##id();
+
+  HARMONY_SHIPPING(FEATURE_INITIALIZE_GLOBAL)
+#undef FEATURE_INITIALIZE_GLOBAL
+
   // Initialize the embedder data slot.
   Handle<FixedArray> embedder_data = factory->NewFixedArray(3);
   native_context()->set_embedder_data(*embedder_data);
@@ -1376,7 +1381,6 @@ void Genesis::InitializeExperimentalGlobal() {
 
   HARMONY_INPROGRESS(FEATURE_INITIALIZE_GLOBAL)
   HARMONY_STAGED(FEATURE_INITIALIZE_GLOBAL)
-  HARMONY_SHIPPING(FEATURE_INITIALIZE_GLOBAL)
 #undef FEATURE_INITIALIZE_GLOBAL
 }
 
@@ -1556,6 +1560,10 @@ void Genesis::InstallNativeFunctions() {
   INSTALL_NATIVE(JSFunction, "NativeObjectNotifierPerformChange",
                  native_object_notifier_perform_change);
   INSTALL_NATIVE(JSFunction, "ArrayValues", array_values_iterator);
+
+#define INSTALL_NATIVE_FUNCTIONS_FOR(id, descr) InstallNativeFunctions_##id();
+  HARMONY_SHIPPING(INSTALL_NATIVE_FUNCTIONS_FOR)
+#undef INSTALL_NATIVE_FUNCTIONS_FOR
 }
 
 
@@ -1570,7 +1578,6 @@ void Genesis::InstallExperimentalNativeFunctions() {
 #define INSTALL_NATIVE_FUNCTIONS_FOR(id, descr) InstallNativeFunctions_##id();
   HARMONY_INPROGRESS(INSTALL_NATIVE_FUNCTIONS_FOR)
   HARMONY_STAGED(INSTALL_NATIVE_FUNCTIONS_FOR)
-  HARMONY_SHIPPING(INSTALL_NATIVE_FUNCTIONS_FOR)
 #undef INSTALL_NATIVE_FUNCTIONS_FOR
 }
 
@@ -2188,12 +2195,16 @@ bool Genesis::InstallExperimentalNatives() {
       }                                                              \
     }                                                                \
   }
+    // Iterate over flags that are not enabled by default.
     HARMONY_INPROGRESS(INSTALL_EXPERIMENTAL_NATIVES);
     HARMONY_STAGED(INSTALL_EXPERIMENTAL_NATIVES);
-    HARMONY_SHIPPING(INSTALL_EXPERIMENTAL_NATIVES);
 #undef INSTALL_EXPERIMENTAL_NATIVES
   }
 
+#define USE_NATIVES_FOR_FEATURE(id, descr) USE(id##_natives);
+  HARMONY_SHIPPING(USE_NATIVES_FOR_FEATURE)
+#undef USE_NATIVES_FOR_FEATURE
+
   InstallExperimentalNativeFunctions();
   return true;
 }
index d1e74b6..1460315 100644 (file)
@@ -157,7 +157,6 @@ DEFINE_BOOL(use_strict, false, "enforce strict mode")
 
 DEFINE_BOOL(es_staging, false, "enable all completed harmony features")
 DEFINE_BOOL(harmony, false, "enable all completed harmony features")
-DEFINE_BOOL(harmony_shipping, true, "enable all shipped harmony fetaures")
 DEFINE_IMPLICATION(harmony, es_staging)
 DEFINE_IMPLICATION(es_staging, harmony)
 
@@ -201,9 +200,8 @@ 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_READONLY(id, true, "enable " #description)
 HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES)
 #undef FLAG_SHIPPING_FEATURES
 
index 544e739..3264f37 100644 (file)
@@ -262,10 +262,6 @@ int main(int argc, char** argv) {
   // By default, log code create information in the snapshot.
   i::FLAG_log_code = true;
 
-  // Omit from the snapshot natives for features that can be turned off
-  // at runtime.
-  i::FLAG_harmony_shipping = false;
-
   // Print the usage if an error occurs when parsing the command line
   // flags or if the help flag is set.
   int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
index 07f0e3c..44102c2 100644 (file)
 
 // Flags: --expose-debug-as debug --expose-gc --send-idle-notification
 // Flags: --allow-natives-syntax
-// Flags: --noharmony-shipping
-// Note: this test checks that that the number of scripts reported as native
-// by Debug.scripts() is the same as a number of core native scripts.
-// Native scripts that are added by --harmony-shipping are classified
-// as 'experimental', but are still returned by Debug.scripts(), so
-// we disable harmony-shipping for this test
 
 // Get the Debug object exposed from the debug context global object.
 Debug = debug.Debug;
index 4a6a397..939a2c2 100644 (file)
           '../../src/debug-debugger.js',
           '../../src/mirror-debugger.js',
           '../../src/liveedit-debugger.js',
+          '../../src/harmony-string.js',
           '../../src/macros.py',
         ],
         'experimental_library_files': [
           '../../src/macros.py',
           '../../src/proxy.js',
           '../../src/generator.js',
-          '../../src/harmony-string.js',
           '../../src/harmony-array.js',
           '../../src/harmony-tostring.js',
           '../../src/harmony-typedarray.js',