Reviewers: Yang,
Description:
Unflag symbols
[email protected]
BUG=
Please review this at https://codereview.chromium.org/405803006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+17, -44 lines):
M src/bootstrapper.cc
M src/flag-definitions.h
M test/cctest/test-api.cc
M test/cctest/test-heap-profiler.cc
M test/mjsunit/debug-script.js
M test/mjsunit/es6/mirror-symbols.js
M test/mjsunit/es6/regress/regress-crbug-346141.js
M test/mjsunit/es6/symbols.js
M test/mjsunit/es7/object-observe.js
M test/mjsunit/harmony/iteration-semantics.js
M test/mjsunit/harmony/private.js
M test/mjsunit/harmony/proxies-symbols.js
M test/mjsunit/harmony/set-prototype-of.js
M test/mjsunit/proto-accessor.js
M test/mjsunit/regress/regress-crbug-350864.js
M tools/gyp/v8.gyp
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index
0344ee1d9c9c4508bfb83cf102dd00667d264ee7..909f5df5e531aca1e09c36e6a6a0e0fb3364274d
100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -981,6 +981,14 @@ void Genesis::InitializeGlobal(Handle<GlobalObject>
global_object,
}
}
+ {
+ // --- S y m b o l ---
+ Handle<JSFunction> symbol_fun = InstallFunction(
+ global, "Symbol", JS_VALUE_TYPE, JSValue::kSize,
+ isolate->initial_object_prototype(), Builtins::kIllegal);
+ native_context()->set_symbol_function(*symbol_fun);
+ }
+
{ // --- D a t e ---
// Builtin functions for Date.prototype.
Handle<JSFunction> date_fun =
@@ -1307,14 +1315,6 @@ void Genesis::InitializeExperimentalGlobal() {
// TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no
// longer need to live behind flags, so functions get added to the
snapshot.
- if (FLAG_harmony_symbols) {
- // --- S y m b o l ---
- Handle<JSFunction> symbol_fun = InstallFunction(
- global, "Symbol", JS_VALUE_TYPE, JSValue::kSize,
- isolate()->initial_object_prototype(), Builtins::kIllegal);
- native_context()->set_symbol_function(*symbol_fun);
- }
-
if (FLAG_harmony_collections) {
// -- M a p
InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize,
@@ -1570,6 +1570,8 @@ void Genesis::InstallNativeFunctions() {
INSTALL_NATIVE(JSFunction, "PromiseCatch", promise_catch);
INSTALL_NATIVE(JSFunction, "PromiseThen", promise_then);
+ INSTALL_NATIVE(Symbol, "symbolIterator", iterator_symbol);
+
INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change);
INSTALL_NATIVE(JSFunction, "EnqueueSpliceRecord",
observers_enqueue_splice);
INSTALL_NATIVE(JSFunction, "BeginPerformSplice",
@@ -1592,10 +1594,6 @@ void Genesis::InstallExperimentalNativeFunctions() {
INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap);
INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate);
}
-
- if (FLAG_harmony_symbols) {
- INSTALL_NATIVE(Symbol, "symbolIterator", iterator_symbol);
- }
}
#undef INSTALL_NATIVE
@@ -2012,7 +2010,6 @@ bool Genesis::InstallExperimentalNatives() {
for (int i = ExperimentalNatives::GetDebuggerCount();
i < ExperimentalNatives::GetBuiltinsCount();
i++) {
- 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, collections, "collection-iterator.js")
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
50b6accb70913b85c8f11bbada643495390f850e..b9a0434192d2c7a5bde5f098f8194b4f370619f2
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -153,7 +153,6 @@ DEFINE_BOOL(es_staging, false, "enable upcoming ES6+
features")
DEFINE_BOOL(harmony_scoping, false, "enable harmony block scoping")
DEFINE_BOOL(harmony_modules, false,
"enable harmony modules (implies block scoping)")
-DEFINE_BOOL(harmony_symbols, false, "enable harmony symbols")
DEFINE_BOOL(harmony_proxies, false, "enable harmony proxies")
DEFINE_BOOL(harmony_collections, false,
"enable harmony collections (sets, maps)")
@@ -177,12 +176,8 @@ DEFINE_IMPLICATION(harmony, harmony_strings)
DEFINE_IMPLICATION(harmony, harmony_arrays)
DEFINE_IMPLICATION(harmony, harmony_arrow_functions)
DEFINE_IMPLICATION(harmony_modules, harmony_scoping)
-DEFINE_IMPLICATION(harmony_collections, harmony_symbols)
-DEFINE_IMPLICATION(harmony_generators, harmony_symbols)
-DEFINE_IMPLICATION(harmony_iteration, harmony_symbols)
DEFINE_IMPLICATION(harmony, es_staging)
-DEFINE_IMPLICATION(es_staging, harmony_symbols)
DEFINE_IMPLICATION(es_staging, harmony_collections)
// Flags for experimental implementation features.
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
c8b8900e62fac25625e6893a91d51449801f3db8..f7a9f571b592d679812832d824a6a48a3eed6d2b
100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -2737,8 +2737,6 @@ THREADED_TEST(GlobalProxyIdentityHash) {
THREADED_TEST(SymbolProperties) {
- i::FLAG_harmony_symbols = true;
-
LocalContext env;
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
@@ -2887,8 +2885,6 @@ THREADED_TEST(PrivateProperties) {
THREADED_TEST(GlobalSymbols) {
- i::FLAG_harmony_symbols = true;
-
LocalContext env;
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
@@ -21395,7 +21391,6 @@ THREADED_TEST(Regress157124) {
THREADED_TEST(Regress2535) {
i::FLAG_harmony_collections = true;
- i::FLAG_harmony_symbols = true;
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
Local<Value> set_value = CompileRun("new Set();");
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc
b/test/cctest/test-heap-profiler.cc
index
33528fbb03c29020309e294521829c30bb4312bc..322d4663feb7f54c3a3833a431cefa497c4f19f3
100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -472,8 +472,6 @@ TEST(HeapSnapshotConsString) {
TEST(HeapSnapshotSymbol) {
- i::FLAG_harmony_symbols = true;
-
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
Index: test/mjsunit/debug-script.js
diff --git a/test/mjsunit/debug-script.js b/test/mjsunit/debug-script.js
index
80d423e10bf5806fb7bb2079ce675b18541f29e8..35bc560c232fba8a8fd26670edec3a9cc56eb093
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 == 19 || named_native_count == 20);
+assertTrue(named_native_count == 20 || named_native_count == 21);
// Only the 'gc' extension is loaded.
assertEquals(1, extension_count);
// This script and mjsunit.js has been loaded. If using d8, d8 loads
Index: test/mjsunit/es6/mirror-symbols.js
diff --git a/test/mjsunit/es6/mirror-symbols.js
b/test/mjsunit/es6/mirror-symbols.js
index
0f43491e858301f7d40e4b166d92b6f4c55ee8a1..f218332abf1f8151a03b94bdaca52e78f1918ce0
100644
--- a/test/mjsunit/es6/mirror-symbols.js
+++ b/test/mjsunit/es6/mirror-symbols.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-debug-as debug --harmony-symbols
+// Flags: --expose-debug-as debug
// Test the mirror object for symbols.
function testSymbolMirror(symbol, description) {
Index: test/mjsunit/es6/regress/regress-crbug-346141.js
diff --git a/test/mjsunit/es6/regress/regress-crbug-346141.js
b/test/mjsunit/es6/regress/regress-crbug-346141.js
index
798b7704ec2cc0eb928966fdfe9f979d0fe51f94..2b9655e174459088401996b884c4a5d7e02eb919
100644
--- a/test/mjsunit/es6/regress/regress-crbug-346141.js
+++ b/test/mjsunit/es6/regress/regress-crbug-346141.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-symbols
-
var s = Symbol()
var o = {}
o[s] = 2
Index: test/mjsunit/es6/symbols.js
diff --git a/test/mjsunit/es6/symbols.js b/test/mjsunit/es6/symbols.js
index
7c211ca3f71e443448cd12fb37faa8eb5c9742e0..8817281aae549d82a87de7257bc3c6b46e3154b4
100644
--- a/test/mjsunit/es6/symbols.js
+++ b/test/mjsunit/es6/symbols.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-symbols --harmony-collections
-// Flags: --expose-gc --allow-natives-syntax
+// Flags: --harmony-collections --expose-gc --allow-natives-syntax
var symbols = []
Index: test/mjsunit/es7/object-observe.js
diff --git a/test/mjsunit/es7/object-observe.js
b/test/mjsunit/es7/object-observe.js
index
7bb579f0c1462b6b33ff1bc6c3229067317f2845..c61a859ce43f95014ca8d3df901b60976f0cbd15
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-proxies --harmony-collections
-// Flags: --harmony-symbols --allow-natives-syntax
+// Flags: --harmony-proxies --harmony-collections --allow-natives-syntax
var allObservers = [];
function reset() {
Index: test/mjsunit/harmony/iteration-semantics.js
diff --git a/test/mjsunit/harmony/iteration-semantics.js
b/test/mjsunit/harmony/iteration-semantics.js
index
803f12faa9316d5a7c19aa57dbad9c9103408873..b6c20060b2ad897bd00a08e1e9f6d27139340939
100644
--- a/test/mjsunit/harmony/iteration-semantics.js
+++ b/test/mjsunit/harmony/iteration-semantics.js
@@ -27,7 +27,6 @@
// Flags: --harmony-iteration
// Flags: --harmony-generators --harmony-scoping --harmony-proxies
-// Flags: --harmony-symbols
// Test for-of semantics.
Index: test/mjsunit/harmony/private.js
diff --git a/test/mjsunit/harmony/private.js
b/test/mjsunit/harmony/private.js
index
c4b0ed2b2bccc31737bc4f499955d9fd60434a8c..7464bbf5b1e6b0800edee450c5169cfef9e07a89
100644
--- a/test/mjsunit/harmony/private.js
+++ b/test/mjsunit/harmony/private.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-symbols --harmony-collections
-// Flags: --expose-gc --allow-natives-syntax
+// Flags: --harmony-collections --expose-gc --allow-natives-syntax
var symbols = []
Index: test/mjsunit/harmony/proxies-symbols.js
diff --git a/test/mjsunit/harmony/proxies-symbols.js
b/test/mjsunit/harmony/proxies-symbols.js
index
8920e39968de829876125b154992252630a5f545..52353c036d4a4c25b6b47b52df8f82dde0f3d1f3
100644
--- a/test/mjsunit/harmony/proxies-symbols.js
+++ b/test/mjsunit/harmony/proxies-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-proxies --harmony-symbols
+// Flags: --harmony-proxies
// Helper.
Index: test/mjsunit/harmony/set-prototype-of.js
diff --git a/test/mjsunit/harmony/set-prototype-of.js
b/test/mjsunit/harmony/set-prototype-of.js
index
02bd5e2ee62272b1acc22e31abffdf82e9fa5ebf..810220d1a8f217a773c3c31da10bea9ca3ef4d8e
100644
--- a/test/mjsunit/harmony/set-prototype-of.js
+++ b/test/mjsunit/harmony/set-prototype-of.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-symbols
-
function getObjects() {
function func() {}
Index: test/mjsunit/proto-accessor.js
diff --git a/test/mjsunit/proto-accessor.js b/test/mjsunit/proto-accessor.js
index
b2e7d34669049e1732244aea3d0d5be506e6d3c0..513a044023e9db5d74449f5f4d46fb02a74ff571
100644
--- a/test/mjsunit/proto-accessor.js
+++ b/test/mjsunit/proto-accessor.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-symbols
-
// Fake Symbol if undefined, allowing test to run in non-Harmony mode as
well.
this.Symbol = typeof Symbol != 'undefined' ? Symbol : String;
Index: test/mjsunit/regress/regress-crbug-350864.js
diff --git a/test/mjsunit/regress/regress-crbug-350864.js
b/test/mjsunit/regress/regress-crbug-350864.js
index
8a793cb0a00612185ac5e6fe325725ca34e1f30c..510834be3e43071aef0e857c9d755be66d1b3c16
100644
--- a/test/mjsunit/regress/regress-crbug-350864.js
+++ b/test/mjsunit/regress/regress-crbug-350864.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-symbols
-
var v0 = new WeakMap;
var v1 = {};
v0.set(v1, 1);
Index: tools/gyp/v8.gyp
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index
3f2f44ab72d926f96553fdbe85e916f9efd2d8cd..773a442d3f3490fcd597e31cb65d76ff025813aa
100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -1308,6 +1308,7 @@
'../../src/v8natives.js',
'../../src/array.js',
'../../src/string.js',
+ '../../src/symbol.js',
'../../src/uri.js',
'../../src/math.js',
'../../src/messages.js',
@@ -1327,7 +1328,6 @@
],
'experimental_library_files': [
'../../src/macros.py',
- '../../src/symbol.js',
'../../src/proxy.js',
'../../src/collection.js',
'../../src/collection-iterator.js',
--
--
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.