From 33be68c2fa0bb4ce88ac336652c859c19035de52 Mon Sep 17 00:00:00 2001 From: "rossberg@chromium.org" Date: Mon, 24 Mar 2014 16:59:04 +0000 Subject: [PATCH] Ship promises and weak collections R=mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/206163004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/api.cc | 2 +- src/bootstrapper.cc | 48 +++++++++---------- src/flag-definitions.h | 9 +--- src/promise.js | 41 ++++++++-------- test/cctest/test-api.cc | 2 - test/cctest/test-microtask-delivery.cc | 1 - test/mjsunit/debug-script.js | 2 +- .../{harmony => es6}/microtask-delivery.js | 2 +- test/mjsunit/es6/promises.js | 2 +- test/mjsunit/es6/regress/regress-2034.js | 2 - test/mjsunit/es6/regress/regress-2156.js | 2 +- test/mjsunit/es6/regress/regress-2829.js | 2 - test/mjsunit/es6/weak_collections.js | 4 +- test/mjsunit/es7/object-observe.js | 3 +- test/mjsunit/harmony/collections.js | 15 +++--- test/mjsunit/harmony/private.js | 2 +- test/mjsunit/harmony/proxies-hash.js | 2 +- .../regress-observe-empty-double-array.js | 2 +- test/mjsunit/harmony/symbols.js | 2 +- test/mjsunit/regress/regress-crbug-350864.js | 2 +- tools/gyp/v8.gyp | 4 +- 21 files changed, 66 insertions(+), 85 deletions(-) rename test/mjsunit/{harmony => es6}/microtask-delivery.js (98%) diff --git a/src/api.cc b/src/api.cc index ca50778d19..cbcbe5b7cc 100644 --- a/src/api.cc +++ b/src/api.cc @@ -5822,7 +5822,7 @@ Local Array::CloneElementAt(uint32_t index) { bool Value::IsPromise() const { i::Handle val = Utils::OpenHandle(this); - if (!i::FLAG_harmony_promises || !val->IsJSObject()) return false; + if (!val->IsJSObject()) return false; i::Handle obj = i::Handle::cast(val); i::Isolate* isolate = obj->GetIsolate(); LOG_API(isolate, "IsPromise"); diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 7942c7f8b5..c466e7e412 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -152,7 +152,7 @@ char* Bootstrapper::AllocateAutoDeletedArray(int bytes) { void Bootstrapper::TearDown() { if (delete_these_non_arrays_on_tear_down_ != NULL) { int len = delete_these_non_arrays_on_tear_down_->length(); - ASSERT(len < 20); // Don't use this mechanism for unbounded allocations. + ASSERT(len < 24); // Don't use this mechanism for unbounded allocations. for (int i = 0; i < len; i++) { delete delete_these_non_arrays_on_tear_down_->at(i); delete_these_non_arrays_on_tear_down_->at(i) = NULL; @@ -1112,6 +1112,18 @@ void Genesis::InitializeGlobal(Handle inner_global, native_context()->set_data_view_fun(*data_view_fun); } + { // -- W e a k M a p + InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, + isolate->initial_object_prototype(), + Builtins::kIllegal, true, true); + } + + { // -- W e a k S e t + InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, + isolate->initial_object_prototype(), + Builtins::kIllegal, true, true); + } + { // --- arguments_boilerplate_ // Make sure we can recognize argument objects at runtime. // This is done by introducing an anonymous function with @@ -1359,19 +1371,6 @@ void Genesis::InitializeExperimentalGlobal() { } } - if (FLAG_harmony_weak_collections) { - { // -- W e a k M a p - InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, - isolate()->initial_object_prototype(), - Builtins::kIllegal, true, true); - } - { // -- W e a k S e t - InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, - isolate()->initial_object_prototype(), - Builtins::kIllegal, true, true); - } - } - if (FLAG_harmony_generators) { // Create generator meta-objects and install them on the builtins object. Handle builtins(native_context()->builtins()); @@ -1564,6 +1563,7 @@ bool Genesis::CompileScriptCached(Isolate* isolate, void Genesis::InstallNativeFunctions() { HandleScope scope(isolate()); INSTALL_NATIVE(JSFunction, "CreateDate", create_date_fun); + INSTALL_NATIVE(JSFunction, "ToNumber", to_number_fun); INSTALL_NATIVE(JSFunction, "ToString", to_string_fun); INSTALL_NATIVE(JSFunction, "ToDetailString", to_detail_string_fun); @@ -1571,6 +1571,7 @@ void Genesis::InstallNativeFunctions() { INSTALL_NATIVE(JSFunction, "ToInteger", to_integer_fun); INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun); INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun); + INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun); INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", @@ -1579,6 +1580,14 @@ void Genesis::InstallNativeFunctions() { INSTALL_NATIVE(JSObject, "functionCache", function_cache); INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor", to_complete_property_descriptor); + + INSTALL_NATIVE(JSFunction, "IsPromise", is_promise); + INSTALL_NATIVE(JSFunction, "PromiseCreate", promise_create); + INSTALL_NATIVE(JSFunction, "PromiseResolve", promise_resolve); + INSTALL_NATIVE(JSFunction, "PromiseReject", promise_reject); + INSTALL_NATIVE(JSFunction, "PromiseChain", promise_chain); + INSTALL_NATIVE(JSFunction, "PromiseCatch", promise_catch); + INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change); INSTALL_NATIVE(JSFunction, "EnqueueSpliceRecord", observers_enqueue_splice); INSTALL_NATIVE(JSFunction, "BeginPerformSplice", @@ -1593,15 +1602,6 @@ void Genesis::InstallExperimentalNativeFunctions() { INSTALL_NATIVE(JSFunction, "EnqueueExternalMicrotask", enqueue_external_microtask); - if (FLAG_harmony_promises) { - INSTALL_NATIVE(JSFunction, "IsPromise", is_promise); - INSTALL_NATIVE(JSFunction, "PromiseCreate", promise_create); - INSTALL_NATIVE(JSFunction, "PromiseResolve", promise_resolve); - INSTALL_NATIVE(JSFunction, "PromiseReject", promise_reject); - INSTALL_NATIVE(JSFunction, "PromiseChain", promise_chain); - INSTALL_NATIVE(JSFunction, "PromiseCatch", promise_catch); - } - if (FLAG_harmony_proxies) { INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); @@ -2051,8 +2051,6 @@ bool Genesis::InstallExperimentalNatives() { INSTALL_EXPERIMENTAL_NATIVE(i, symbols, "symbol.js") INSTALL_EXPERIMENTAL_NATIVE(i, proxies, "proxy.js") INSTALL_EXPERIMENTAL_NATIVE(i, collections, "collection.js") - INSTALL_EXPERIMENTAL_NATIVE(i, weak_collections, "weak_collection.js") - INSTALL_EXPERIMENTAL_NATIVE(i, promises, "promise.js") INSTALL_EXPERIMENTAL_NATIVE(i, generators, "generator.js") INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "array-iterator.js") INSTALL_EXPERIMENTAL_NATIVE(i, strings, "harmony-string.js") diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 3b9ebb3c5a..d7341b9261 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -175,12 +175,9 @@ DEFINE_bool(harmony_modules, false, "enable harmony modules (implies block scoping)") DEFINE_bool(harmony_symbols, false, "enable harmony symbols (a.k.a. private names)") -DEFINE_bool(harmony_promises, false, "enable harmony promises") DEFINE_bool(harmony_proxies, false, "enable harmony proxies") DEFINE_bool(harmony_collections, false, - "enable harmony collections (sets, maps, weak sets, weak maps)") -DEFINE_bool(harmony_weak_collections, false, - "enable only harmony weak collections (weak sets and maps)") + "enable harmony collections (sets, maps)") DEFINE_bool(harmony_generators, false, "enable harmony generators") DEFINE_bool(harmony_iteration, false, "enable harmony iteration (for-of)") DEFINE_bool(harmony_numeric_literals, false, @@ -200,14 +197,10 @@ DEFINE_implication(harmony, harmony_iteration) DEFINE_implication(harmony, harmony_numeric_literals) DEFINE_implication(harmony, harmony_strings) DEFINE_implication(harmony, harmony_arrays) -DEFINE_implication(harmony_collections, harmony_weak_collections) -DEFINE_implication(harmony_promises, harmony_weak_collections) DEFINE_implication(harmony_modules, harmony_scoping) DEFINE_implication(harmony, es_staging) DEFINE_implication(es_staging, harmony_maths) -DEFINE_implication(es_staging, harmony_promises) -DEFINE_implication(es_staging, harmony_weak_collections) // Flags for experimental implementation features. DEFINE_bool(packed_arrays, true, "optimizes arrays that have no holes") diff --git a/src/promise.js b/src/promise.js index 23e51259a3..63f5629c9a 100644 --- a/src/promise.js +++ b/src/promise.js @@ -34,7 +34,19 @@ // var $WeakMap = global.WeakMap -var $Promise = Promise; +var $Promise = function Promise(resolver) { + if (resolver === promiseRaw) return; + if (!%_IsConstructCall()) throw MakeTypeError('not_a_promise', [this]); + if (typeof resolver !== 'function') + throw MakeTypeError('resolver_not_a_function', [resolver]); + var promise = PromiseInit(this); + try { + resolver(function(x) { PromiseResolve(promise, x) }, + function(r) { PromiseReject(promise, r) }); + } catch (e) { + PromiseReject(promise, e); + } +} //------------------------------------------------------------------- @@ -52,20 +64,6 @@ function IsPromise(x) { return IS_SPEC_OBJECT(x) && %HasLocalProperty(x, promiseStatus); } -function Promise(resolver) { - if (resolver === promiseRaw) return; - if (!%_IsConstructCall()) throw MakeTypeError('not_a_promise', [this]); - if (typeof resolver !== 'function') - throw MakeTypeError('resolver_not_a_function', [resolver]); - var promise = PromiseInit(this); - try { - resolver(function(x) { PromiseResolve(promise, x) }, - function(r) { PromiseReject(promise, r) }); - } catch (e) { - PromiseReject(promise, e); - } -} - function PromiseSet(promise, status, value, onResolve, onReject) { SET_PRIVATE(promise, promiseStatus, status); SET_PRIVATE(promise, promiseValue, value); @@ -99,7 +97,7 @@ function PromiseReject(promise, r) { function PromiseNopResolver() {} function PromiseCreate() { - return new Promise(PromiseNopResolver) + return new $Promise(PromiseNopResolver) } @@ -108,7 +106,7 @@ function PromiseCreate() { function PromiseDeferred() { if (this === $Promise) { // Optimized case, avoid extra closure. - var promise = PromiseInit(new Promise(promiseRaw)); + var promise = PromiseInit(new $Promise(promiseRaw)); return { promise: promise, resolve: function(x) { PromiseResolve(promise, x) }, @@ -127,7 +125,7 @@ function PromiseDeferred() { function PromiseResolved(x) { if (this === $Promise) { // Optimized case, avoid extra closure. - return PromiseSet(new Promise(promiseRaw), +1, x); + return PromiseSet(new $Promise(promiseRaw), +1, x); } else { return new this(function(resolve, reject) { resolve(x) }); } @@ -136,7 +134,7 @@ function PromiseResolved(x) { function PromiseRejected(r) { if (this === $Promise) { // Optimized case, avoid extra closure. - return PromiseSet(new Promise(promiseRaw), -1, r); + return PromiseSet(new $Promise(promiseRaw), -1, r); } else { return new this(function(resolve, reject) { reject(r) }); } @@ -306,9 +304,8 @@ function PromiseOne(values) { //------------------------------------------------------------------- function SetUpPromise() { - %CheckIsBootstrapping() - var global_receiver = %GlobalReceiver(global); - global_receiver.Promise = $Promise; + %CheckIsBootstrapping(); + %SetProperty(global, "Promise", $Promise, NONE); InstallFunctions($Promise, DONT_ENUM, [ "defer", PromiseDeferred, "accept", PromiseResolved, diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc index 12f846e9cb..ffc865243f 100644 --- a/test/cctest/test-api.cc +++ b/test/cctest/test-api.cc @@ -22191,8 +22191,6 @@ TEST(EventLogging) { TEST(Promises) { - i::FLAG_harmony_promises = true; - LocalContext context; v8::Isolate* isolate = context->GetIsolate(); v8::HandleScope scope(isolate); diff --git a/test/cctest/test-microtask-delivery.cc b/test/cctest/test-microtask-delivery.cc index 108337ae3f..0172726afc 100644 --- a/test/cctest/test-microtask-delivery.cc +++ b/test/cctest/test-microtask-delivery.cc @@ -36,7 +36,6 @@ namespace { class HarmonyIsolate { public: HarmonyIsolate() { - i::FLAG_harmony_promises = true; isolate_ = Isolate::New(); isolate_->Enter(); } diff --git a/test/mjsunit/debug-script.js b/test/mjsunit/debug-script.js index 1a7283c545..80d423e10b 100644 --- a/test/mjsunit/debug-script.js +++ b/test/mjsunit/debug-script.js @@ -59,7 +59,7 @@ for (i = 0; i < scripts.length; i++) { } // This has to be updated if the number of native scripts change. -assertTrue(named_native_count == 17 || named_native_count == 18); +assertTrue(named_native_count == 19 || named_native_count == 20); // Only the 'gc' extension is loaded. assertEquals(1, extension_count); // This script and mjsunit.js has been loaded. If using d8, d8 loads diff --git a/test/mjsunit/harmony/microtask-delivery.js b/test/mjsunit/es6/microtask-delivery.js similarity index 98% rename from test/mjsunit/harmony/microtask-delivery.js rename to test/mjsunit/es6/microtask-delivery.js index 566a39d03e..f74385e635 100644 --- a/test/mjsunit/harmony/microtask-delivery.js +++ b/test/mjsunit/es6/microtask-delivery.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-observation --harmony-promises --allow-natives-syntax +// Flags: --allow-natives-syntax var ordering = []; function reset() { diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js index 48b96f626f..0470f39ccf 100644 --- a/test/mjsunit/es6/promises.js +++ b/test/mjsunit/es6/promises.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-promises --allow-natives-syntax +// Flags: --allow-natives-syntax var asyncAssertsExpected = 0; diff --git a/test/mjsunit/es6/regress/regress-2034.js b/test/mjsunit/es6/regress/regress-2034.js index 1b7dac038a..5c738bf84d 100644 --- a/test/mjsunit/es6/regress/regress-2034.js +++ b/test/mjsunit/es6/regress/regress-2034.js @@ -25,8 +25,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-weak-collections - var key = {}; var map = new WeakMap; Object.preventExtensions(key); diff --git a/test/mjsunit/es6/regress/regress-2156.js b/test/mjsunit/es6/regress/regress-2156.js index a34e3816ba..fba2a29867 100644 --- a/test/mjsunit/es6/regress/regress-2156.js +++ b/test/mjsunit/es6/regress/regress-2156.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --allow-natives-syntax --harmony-weak-collections +// Flags: --allow-natives-syntax var key1 = {}; var key2 = {}; diff --git a/test/mjsunit/es6/regress/regress-2829.js b/test/mjsunit/es6/regress/regress-2829.js index 8d8f3f8c39..b48039cf0b 100644 --- a/test/mjsunit/es6/regress/regress-2829.js +++ b/test/mjsunit/es6/regress/regress-2829.js @@ -25,8 +25,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-weak-collections - (function test1() { var wm1 = new WeakMap(); wm1.set(Object.prototype, 23); diff --git a/test/mjsunit/es6/weak_collections.js b/test/mjsunit/es6/weak_collections.js index af23903ebc..74235e7d2c 100644 --- a/test/mjsunit/es6/weak_collections.js +++ b/test/mjsunit/es6/weak_collections.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-weak-collections --expose-gc --allow-natives-syntax +// Flags: --expose-gc --allow-natives-syntax // Note: this test is superseded by harmony/collections.js. @@ -225,7 +225,7 @@ function TestPrototype(C) { assertTrue(C.prototype instanceof Object); assertEquals({ value: {}, - writable: true, // TODO(2793): This should be non-writable. + writable: false, enumerable: false, configurable: false }, Object.getOwnPropertyDescriptor(C, "prototype")); diff --git a/test/mjsunit/es7/object-observe.js b/test/mjsunit/es7/object-observe.js index 0aa3601d73..f5e84a6286 100644 --- a/test/mjsunit/es7/object-observe.js +++ b/test/mjsunit/es7/object-observe.js @@ -25,8 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-observation --harmony-proxies -// Flags: --harmony-collections --harmony-weak-collections +// Flags: --harmony-proxies --harmony-collections // Flags: --harmony-symbols --allow-natives-syntax var allObservers = []; diff --git a/test/mjsunit/harmony/collections.js b/test/mjsunit/harmony/collections.js index b33d08063d..804a320f36 100644 --- a/test/mjsunit/harmony/collections.js +++ b/test/mjsunit/harmony/collections.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-collections --harmony-weak-collections +// Flags: --harmony-collections // Flags: --expose-gc --allow-natives-syntax @@ -290,19 +290,20 @@ assertEquals("WeakSet", WeakSet.name); // Test prototype property of Set, Map, WeakMap and WeakSet. -function TestPrototype(C) { +// TODO(2793): Should all be non-writable, and the extra flag removed. +function TestPrototype(C, writable) { assertTrue(C.prototype instanceof Object); assertEquals({ value: {}, - writable: true, // TODO(2793): This should be non-writable. + writable: writable, enumerable: false, configurable: false }, Object.getOwnPropertyDescriptor(C, "prototype")); } -TestPrototype(Set); -TestPrototype(Map); -TestPrototype(WeakMap); -TestPrototype(WeakSet); +TestPrototype(Set, true); +TestPrototype(Map, true); +TestPrototype(WeakMap, false); +TestPrototype(WeakSet, false); // Test constructor property of the Set, Map, WeakMap and WeakSet prototype. diff --git a/test/mjsunit/harmony/private.js b/test/mjsunit/harmony/private.js index a14afe04e5..225799831c 100644 --- a/test/mjsunit/harmony/private.js +++ b/test/mjsunit/harmony/private.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-symbols --harmony-collections --harmony-weak-collections +// Flags: --harmony-symbols --harmony-collections // Flags: --expose-gc --allow-natives-syntax var symbols = [] diff --git a/test/mjsunit/harmony/proxies-hash.js b/test/mjsunit/harmony/proxies-hash.js index 6f0b19f248..789de35f6d 100644 --- a/test/mjsunit/harmony/proxies-hash.js +++ b/test/mjsunit/harmony/proxies-hash.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-proxies --harmony-collections --harmony-weak-collections +// Flags: --harmony-proxies --harmony-collections // Helper. diff --git a/test/mjsunit/harmony/regress/regress-observe-empty-double-array.js b/test/mjsunit/harmony/regress/regress-observe-empty-double-array.js index 4b651694a6..301ece70fe 100644 --- a/test/mjsunit/harmony/regress/regress-observe-empty-double-array.js +++ b/test/mjsunit/harmony/regress/regress-observe-empty-double-array.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-observation --allow-natives-syntax +// Flags: --allow-natives-syntax // // Test passes if it does not crash. diff --git a/test/mjsunit/harmony/symbols.js b/test/mjsunit/harmony/symbols.js index e7bf360406..220439291c 100644 --- a/test/mjsunit/harmony/symbols.js +++ b/test/mjsunit/harmony/symbols.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony-symbols --harmony-collections --harmony-weak-collections +// Flags: --harmony-symbols --harmony-collections // Flags: --expose-gc --allow-natives-syntax var symbols = [] diff --git a/test/mjsunit/regress/regress-crbug-350864.js b/test/mjsunit/regress/regress-crbug-350864.js index 15b3242f84..8a793cb0a0 100644 --- a/test/mjsunit/regress/regress-crbug-350864.js +++ b/test/mjsunit/regress/regress-crbug-350864.js @@ -25,7 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --harmony_symbols --harmony-weak-collections +// Flags: --harmony-symbols var v0 = new WeakMap; var v1 = {}; diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp index 6f97defe04..e17ef356bd 100644 --- a/tools/gyp/v8.gyp +++ b/tools/gyp/v8.gyp @@ -1059,6 +1059,8 @@ '../../src/regexp.js', '../../src/arraybuffer.js', '../../src/typedarray.js', + '../../src/weak_collection.js', + '../../src/promise.js', '../../src/object-observe.js', '../../src/macros.py', ], @@ -1067,8 +1069,6 @@ '../../src/symbol.js', '../../src/proxy.js', '../../src/collection.js', - '../../src/weak_collection.js', - '../../src/promise.js', '../../src/generator.js', '../../src/array-iterator.js', '../../src/harmony-string.js',