Title: [204160] trunk
Revision
204160
Author
utatane....@gmail.com
Date
2016-08-04 19:50:19 -0700 (Thu, 04 Aug 2016)

Log Message

[ES6] JSModuleNamespaceObject's Symbol.iterator function should have name
https://bugs.webkit.org/show_bug.cgi?id=160549

Reviewed by Saam Barati.

JSTests:

* modules/namespace-object-symbol-iterator-name.js: Added.
* test262.yaml:

Source/_javascript_Core:

ES6 Module's namespace[Symbol.iterator] function should have the name, "[Symbol.iterator]".

* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::finishCreation):

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (204159 => 204160)


--- trunk/JSTests/ChangeLog	2016-08-05 02:35:28 UTC (rev 204159)
+++ trunk/JSTests/ChangeLog	2016-08-05 02:50:19 UTC (rev 204160)
@@ -1,3 +1,13 @@
+2016-08-04  Yusuke Suzuki  <utatane....@gmail.com>
+
+        [ES6] JSModuleNamespaceObject's Symbol.iterator function should have name
+        https://bugs.webkit.org/show_bug.cgi?id=160549
+
+        Reviewed by Saam Barati.
+
+        * modules/namespace-object-symbol-iterator-name.js: Added.
+        * test262.yaml:
+
 2016-08-04  Keith Miller  <keith_mil...@apple.com>
 
         ASSERTION FAILED: !hasInstanceValueNode->isCellConstant() || defaultHasInstanceFunction == hasInstanceValueNode->asCell()

Added: trunk/JSTests/modules/namespace-object-symbol-iterator-name.js (0 => 204160)


--- trunk/JSTests/modules/namespace-object-symbol-iterator-name.js	                        (rev 0)
+++ trunk/JSTests/modules/namespace-object-symbol-iterator-name.js	2016-08-05 02:50:19 UTC (rev 204160)
@@ -0,0 +1,4 @@
+import { shouldBe } from "./resources/assert.js";
+import * as ns from "./namespace-object-symbol-iterator-name.js";
+
+shouldBe(ns[Symbol.iterator].name, "[Symbol.iterator]");

Modified: trunk/JSTests/test262.yaml (204159 => 204160)


--- trunk/JSTests/test262.yaml	2016-08-05 02:35:28 UTC (rev 204159)
+++ trunk/JSTests/test262.yaml	2016-08-05 02:50:19 UTC (rev 204160)
@@ -71250,7 +71250,7 @@
 - path: test262/test/language/module-code/namespace/Symbol.iterator/list-iter-next-prop-desc.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/propertyHelper.js"], [:module]
 - path: test262/test/language/module-code/namespace/Symbol.iterator/name.js
-  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/propertyHelper.js"], [:module]
+  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/propertyHelper.js"], [:module]
 - path: test262/test/language/module-code/namespace/Symbol.iterator/prop-desc.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:module]
 - path: test262/test/language/module-code/namespace/Symbol.iterator/this-val-not-ns.js

Modified: trunk/Source/_javascript_Core/ChangeLog (204159 => 204160)


--- trunk/Source/_javascript_Core/ChangeLog	2016-08-05 02:35:28 UTC (rev 204159)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-08-05 02:50:19 UTC (rev 204160)
@@ -1,3 +1,15 @@
+2016-08-04  Yusuke Suzuki  <utatane....@gmail.com>
+
+        [ES6] JSModuleNamespaceObject's Symbol.iterator function should have name
+        https://bugs.webkit.org/show_bug.cgi?id=160549
+
+        Reviewed by Saam Barati.
+
+        ES6 Module's namespace[Symbol.iterator] function should have the name, "[Symbol.iterator]".
+
+        * runtime/JSModuleNamespaceObject.cpp:
+        (JSC::JSModuleNamespaceObject::finishCreation):
+
 2016-08-04  Keith Miller  <keith_mil...@apple.com>
 
         ASSERTION FAILED: !hasInstanceValueNode->isCellConstant() || defaultHasInstanceFunction == hasInstanceValueNode->asCell()

Modified: trunk/Source/_javascript_Core/runtime/JSModuleNamespaceObject.cpp (204159 => 204160)


--- trunk/Source/_javascript_Core/runtime/JSModuleNamespaceObject.cpp	2016-08-05 02:35:28 UTC (rev 204159)
+++ trunk/Source/_javascript_Core/runtime/JSModuleNamespaceObject.cpp	2016-08-05 02:50:19 UTC (rev 204160)
@@ -72,7 +72,8 @@
         m_exports.add(identifier);
 
     m_moduleRecord.set(vm, this, moduleRecord);
-    JSC_NATIVE_FUNCTION(vm.propertyNames->iteratorSymbol, moduleNamespaceObjectSymbolIterator, DontEnum, 0);
+    JSFunction* iteratorFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("[Symbol.iterator]"), moduleNamespaceObjectSymbolIterator, NoIntrinsic);
+    putDirect(vm, vm.propertyNames->iteratorSymbol, iteratorFunction, DontEnum);
     putDirect(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Module"), DontEnum | ReadOnly);
 
     // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-getprototypeof
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to