Revision: 22910
Author:   [email protected]
Date:     Wed Aug  6 09:31:21 2014 UTC
Log:      Remove @@create and don't expose unimplemented symbols

Also, add some bits missing from turn-on-symbols CL

[email protected], [email protected]
BUG=

Review URL: https://codereview.chromium.org/441943002
http://code.google.com/p/v8/source/detail?r=22910

Modified:
 /branches/bleeding_edge/src/bootstrapper.cc
 /branches/bleeding_edge/src/symbol.js
 /branches/bleeding_edge/test/mjsunit/es6/symbols.js

=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Tue Aug  5 19:37:32 2014 UTC
+++ /branches/bleeding_edge/src/bootstrapper.cc Wed Aug  6 09:31:21 2014 UTC
@@ -981,6 +981,14 @@
       string_map->AppendDescriptor(&d);
     }
   }
+
+  {
+    // --- 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.
@@ -1169,14 +1177,6 @@
   InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize,
                   isolate->initial_object_prototype(), Builtins::kIllegal);

-  {
-    // --- 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);
-  }
-
   {  // --- sloppy arguments map
     // Make sure we can recognize argument objects at runtime.
     // This is done by introducing an anonymous function with
@@ -1593,6 +1593,7 @@
                  native_object_get_notifier);
   INSTALL_NATIVE(JSFunction, "NativeObjectNotifierPerformChange",
                  native_object_notifier_perform_change);
+
   INSTALL_NATIVE(Symbol, "symbolIterator", iterator_symbol);

   INSTALL_NATIVE_MATH(abs)
=======================================
--- /branches/bleeding_edge/src/symbol.js       Mon Jul 14 14:05:30 2014 UTC
+++ /branches/bleeding_edge/src/symbol.js       Wed Aug  6 09:31:21 2014 UTC
@@ -82,7 +82,6 @@

 //-------------------------------------------------------------------

-var symbolCreate = InternalSymbol("Symbol.create");
 var symbolHasInstance = InternalSymbol("Symbol.hasInstance");
 var symbolIsConcatSpreadable = InternalSymbol("Symbol.isConcatSpreadable");
 var symbolIsRegExp = InternalSymbol("Symbol.isRegExp");
@@ -100,13 +99,13 @@
   %FunctionSetPrototype($Symbol, new $Object());

   InstallConstants($Symbol, $Array(
-    "create", symbolCreate,
-    "hasInstance", symbolHasInstance,
-    "isConcatSpreadable", symbolIsConcatSpreadable,
-    "isRegExp", symbolIsRegExp,
-    "iterator", symbolIterator,
-    "toStringTag", symbolToStringTag,
-    "unscopables", symbolUnscopables
+    // TODO(rossberg): expose when implemented.
+    // "hasInstance", symbolHasInstance,
+    // "isConcatSpreadable", symbolIsConcatSpreadable,
+    // "isRegExp", symbolIsRegExp,
+    "iterator", symbolIterator
+    // "toStringTag", symbolToStringTag,
+    // "unscopables", symbolUnscopables
   ));
   InstallFunctions($Symbol, DONT_ENUM, $Array(
     "for", SymbolFor,
=======================================
--- /branches/bleeding_edge/test/mjsunit/es6/symbols.js Tue Aug 5 19:37:32 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/es6/symbols.js Wed Aug 6 09:31:21 2014 UTC
@@ -445,8 +445,9 @@

 function TestWellKnown() {
   var symbols = [
-    "create", "hasInstance", "isConcatSpreadable", "isRegExp",
-    "iterator", "toStringTag", "unscopables"
+    // TODO(rossberg): reactivate once implemented.
+    // "hasInstance", "isConcatSpreadable", "isRegExp",
+    "iterator" //, "toStringTag", "unscopables"
   ]

   for (var i in symbols) {

--
--
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.

Reply via email to