Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: src/bootstrapper.cc

Issue 421313004: Enable ES6 Symbols by default (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/d8.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index e58bf5abdb43b79699b32fea96f7fc6f340dfd08..a8381c6234c8695629be073775f5a3192a319080 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1177,6 +1177,14 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
ASSERT(IsFastObjectElementsKind(map->elements_kind()));
}
+ {
+ // --- 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);
+ }
+
{ // --- aliased arguments map
Handle<Map> map = Map::Copy(isolate->sloppy_arguments_map());
map->set_elements_kind(SLOPPY_ARGUMENTS_ELEMENTS);
@@ -1308,14 +1316,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,
@@ -1583,6 +1583,7 @@ void Genesis::InstallNativeFunctions() {
native_object_get_notifier);
INSTALL_NATIVE(JSFunction, "NativeObjectNotifierPerformChange",
native_object_notifier_perform_change);
+ INSTALL_NATIVE(Symbol, "symbolIterator", iterator_symbol);
}
@@ -1593,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
@@ -2013,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")
« no previous file with comments | « no previous file | src/d8.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698