Title: [206711] trunk
Revision
206711
Author
[email protected]
Date
2016-10-01 16:36:21 -0700 (Sat, 01 Oct 2016)

Log Message

[ES6] Align attributes of Generator related properties to spec
https://bugs.webkit.org/show_bug.cgi?id=162839

Reviewed by Saam Barati.

JSTests:

* test262.yaml:

Source/_javascript_Core:

This patch fixes attributes of Generator related properties.
These fixes are covered by test262.

* runtime/GeneratorFunctionConstructor.cpp:
(JSC::GeneratorFunctionConstructor::finishCreation):
* runtime/GeneratorFunctionConstructor.h:
* runtime/GeneratorFunctionPrototype.cpp:
(JSC::GeneratorFunctionPrototype::finishCreation):
* runtime/GeneratorFunctionPrototype.h:
* runtime/GeneratorPrototype.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (206710 => 206711)


--- trunk/JSTests/ChangeLog	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/JSTests/ChangeLog	2016-10-01 23:36:21 UTC (rev 206711)
@@ -1,5 +1,14 @@
 2016-10-01  Yusuke Suzuki  <[email protected]>
 
+        [ES6] Align attributes of Generator related properties to spec
+        https://bugs.webkit.org/show_bug.cgi?id=162839
+
+        Reviewed by Saam Barati.
+
+        * test262.yaml:
+
+2016-10-01  Yusuke Suzuki  <[email protected]>
+
         [ES6] GeneratorFunction constructor should instantiate generator function
         https://bugs.webkit.org/show_bug.cgi?id=162838
 

Modified: trunk/JSTests/test262.yaml (206710 => 206711)


--- trunk/JSTests/test262.yaml	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/JSTests/test262.yaml	2016-10-01 23:36:21 UTC (rev 206711)
@@ -18704,9 +18704,9 @@
 - path: test262/test/built-ins/GeneratorFunction/invoked-as-function-single-argument.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/GeneratorFunction/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/GeneratorFunction/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/GeneratorFunction/name.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/GeneratorFunction/name.js
@@ -18716,9 +18716,9 @@
 - path: test262/test/built-ins/GeneratorFunction/prototype/Symbol.toStringTag.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/GeneratorFunction/prototype/constructor.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/GeneratorFunction/prototype/constructor.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/GeneratorFunction/prototype/extensibility.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/GeneratorFunction/prototype/extensibility.js
@@ -18728,17 +18728,17 @@
 - path: test262/test/built-ins/GeneratorFunction/prototype/prop-desc.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/GeneratorFunction/prototype/prototype.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/GeneratorFunction/prototype/prototype.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/GeneratorPrototype/Symbol.toStringTag.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/GeneratorPrototype/Symbol.toStringTag.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/GeneratorPrototype/constructor.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/GeneratorPrototype/constructor.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/GeneratorPrototype/next/consecutive-yields.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/GeneratorPrototype/next/consecutive-yields.js

Modified: trunk/Source/_javascript_Core/ChangeLog (206710 => 206711)


--- trunk/Source/_javascript_Core/ChangeLog	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-01 23:36:21 UTC (rev 206711)
@@ -1,5 +1,25 @@
 2016-10-01  Yusuke Suzuki  <[email protected]>
 
+        [ES6] Align attributes of Generator related properties to spec
+        https://bugs.webkit.org/show_bug.cgi?id=162839
+
+        Reviewed by Saam Barati.
+
+        This patch fixes attributes of Generator related properties.
+        These fixes are covered by test262.
+
+        * runtime/GeneratorFunctionConstructor.cpp:
+        (JSC::GeneratorFunctionConstructor::finishCreation):
+        * runtime/GeneratorFunctionConstructor.h:
+        * runtime/GeneratorFunctionPrototype.cpp:
+        (JSC::GeneratorFunctionPrototype::finishCreation):
+        * runtime/GeneratorFunctionPrototype.h:
+        * runtime/GeneratorPrototype.h:
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+
+2016-10-01  Yusuke Suzuki  <[email protected]>
+
         [ES6] GeneratorFunction constructor should instantiate generator function
         https://bugs.webkit.org/show_bug.cgi?id=162838
 

Modified: trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp (206710 => 206711)


--- trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp	2016-10-01 23:36:21 UTC (rev 206711)
@@ -47,7 +47,7 @@
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, generatorFunctionPrototype, DontEnum | DontDelete | ReadOnly);
 
     // Number of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
 static EncodedJSValue JSC_HOST_CALL callGeneratorFunctionConstructor(ExecState* exec)

Modified: trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.h (206710 => 206711)


--- trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.h	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.h	2016-10-01 23:36:21 UTC (rev 206711)
@@ -35,6 +35,8 @@
 
 class GeneratorFunctionPrototype;
 
+// %GeneratorFunction% intrinsic.
+// https://tc39.github.io/ecma262/#sec-generatorfunction-constructor
 class GeneratorFunctionConstructor : public InternalFunction {
 public:
     typedef InternalFunction Base;

Modified: trunk/Source/_javascript_Core/runtime/GeneratorFunctionPrototype.cpp (206710 => 206711)


--- trunk/Source/_javascript_Core/runtime/GeneratorFunctionPrototype.cpp	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/Source/_javascript_Core/runtime/GeneratorFunctionPrototype.cpp	2016-10-01 23:36:21 UTC (rev 206711)
@@ -51,7 +51,7 @@
 {
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "GeneratorFunction"), DontEnum | ReadOnly);
     vm.prototypeMap.addPrototype(this);
 }

Modified: trunk/Source/_javascript_Core/runtime/GeneratorFunctionPrototype.h (206710 => 206711)


--- trunk/Source/_javascript_Core/runtime/GeneratorFunctionPrototype.h	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/Source/_javascript_Core/runtime/GeneratorFunctionPrototype.h	2016-10-01 23:36:21 UTC (rev 206711)
@@ -29,6 +29,8 @@
 
 namespace JSC {
 
+// %Generator% intrinsic.
+// https://tc39.github.io/ecma262/#sec-generatorfunction.prototype
 class GeneratorFunctionPrototype : public JSNonFinalObject {
 public:
     typedef JSNonFinalObject Base;

Modified: trunk/Source/_javascript_Core/runtime/GeneratorPrototype.h (206710 => 206711)


--- trunk/Source/_javascript_Core/runtime/GeneratorPrototype.h	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/Source/_javascript_Core/runtime/GeneratorPrototype.h	2016-10-01 23:36:21 UTC (rev 206711)
@@ -29,6 +29,8 @@
 
 namespace JSC {
 
+// %GeneratorPrototype% intrinsic.
+// https://tc39.github.io/ecma262/#sec-properties-of-generator-prototype
 class GeneratorPrototype : public JSNonFinalObject {
 public:
     typedef JSNonFinalObject Base;

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (206710 => 206711)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2016-10-01 23:35:17 UTC (rev 206710)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2016-10-01 23:36:21 UTC (rev 206711)
@@ -625,11 +625,11 @@
 
     m_generatorFunctionPrototype.set(vm, this, GeneratorFunctionPrototype::create(vm, GeneratorFunctionPrototype::createStructure(vm, this, m_functionPrototype.get())));
     GeneratorFunctionConstructor* generatorFunctionConstructor = GeneratorFunctionConstructor::create(vm, GeneratorFunctionConstructor::createStructure(vm, this, functionConstructor), m_generatorFunctionPrototype.get());
-    m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, generatorFunctionConstructor, DontEnum);
+    m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, generatorFunctionConstructor, DontEnum | ReadOnly);
     m_generatorFunctionStructure.set(vm, this, JSGeneratorFunction::createStructure(vm, this, m_generatorFunctionPrototype.get()));
 
-    m_generatorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_generatorFunctionPrototype.get(), DontEnum);
-    m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->prototype, m_generatorPrototype.get(), DontEnum);
+    m_generatorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_generatorFunctionPrototype.get(), DontEnum | ReadOnly);
+    m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->prototype, m_generatorPrototype.get(), DontEnum | ReadOnly);
     
     m_objectPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, objectConstructor, DontEnum);
     m_functionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, functionConstructor, DontEnum);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to