test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 16:38:43 +0000 (16:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 16:38:43 +0000 (16:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170652

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-11
Reviewed by Michael Saboff.

JSTests:

* stress/native-constructors-length.js: Added.
(assertLengthDescriptorAttributes):
Add a quick test for the length properties of all native constructors.

* ChakraCore/test/es5/enumerable.baseline-jsc:
Rebaseline expectations for this test.

* test262.yaml:

Source/JavaScriptCore:

* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::finishCreation):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::finishCreation):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::finishCreation):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::finishCreation):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::finishCreation):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::finishCreation):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::finishCreation):
* runtime/SymbolConstructor.cpp:
(JSC::SymbolConstructor::finishCreation):
Ensure the "length" property on these native constructors is configurable (deletable).

LayoutTests:

* ietestcenter/Javascript/15.2.3.3-4-186-expected.txt:
* ietestcenter/Javascript/15.2.3.3-4-191-expected.txt:
* ietestcenter/Javascript/15.2.3.3-4-194-expected.txt:
* ietestcenter/Javascript/15.2.3.3-4-201-expected.txt:
* ietestcenter/Javascript/15.3.3.2-1-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt:
These tests expected the opposite, they are now out of date.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215234 268f45cc-cd09-0410-ab3c-d52691b4dbfc

25 files changed:
JSTests/ChakraCore/test/es5/enumerable.baseline-jsc
JSTests/ChangeLog
JSTests/stress/native-constructors-length.js [new file with mode: 0644]
JSTests/test262.yaml
LayoutTests/ChangeLog
LayoutTests/ietestcenter/Javascript/15.2.3.3-4-186-expected.txt
LayoutTests/ietestcenter/Javascript/15.2.3.3-4-191-expected.txt
LayoutTests/ietestcenter/Javascript/15.2.3.3-4-194-expected.txt
LayoutTests/ietestcenter/Javascript/15.2.3.3-4-201-expected.txt
LayoutTests/ietestcenter/Javascript/15.3.3.2-1-expected.txt
LayoutTests/sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt
LayoutTests/sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ArrayConstructor.cpp
Source/JavaScriptCore/runtime/AsyncFunctionConstructor.cpp
Source/JavaScriptCore/runtime/BooleanConstructor.cpp
Source/JavaScriptCore/runtime/DateConstructor.cpp
Source/JavaScriptCore/runtime/FunctionConstructor.cpp
Source/JavaScriptCore/runtime/GeneratorFunctionConstructor.cpp
Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp
Source/JavaScriptCore/runtime/NumberConstructor.cpp
Source/JavaScriptCore/runtime/ObjectConstructor.cpp
Source/JavaScriptCore/runtime/RegExpConstructor.cpp
Source/JavaScriptCore/runtime/StringConstructor.cpp
Source/JavaScriptCore/runtime/SymbolConstructor.cpp

index eaf63b4..13aef69 100644 (file)
@@ -195,20 +195,20 @@ TypeError : Attempting to change access mechanism for an unconfigurable property
 value:2
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true
index 6e0fa46..6797162 100644 (file)
@@ -1,3 +1,19 @@
+2017-04-11  Joseph Pecoraro  <pecoraro@apple.com>
+
+        test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
+        https://bugs.webkit.org/show_bug.cgi?id=170652
+
+        Reviewed by Michael Saboff.
+
+        * stress/native-constructors-length.js: Added.
+        (assertLengthDescriptorAttributes):
+        Add a quick test for the length properties of all native constructors.
+
+        * ChakraCore/test/es5/enumerable.baseline-jsc:
+        Rebaseline expectations for this test.
+
+        * test262.yaml:
+
 2017-04-10  Keith Miller  <keith_miller@apple.com>
 
         WebAssembly: Update spec tests
diff --git a/JSTests/stress/native-constructors-length.js b/JSTests/stress/native-constructors-length.js
new file mode 100644 (file)
index 0000000..78bc0ec
--- /dev/null
@@ -0,0 +1,41 @@
+function assert(b) {
+    if (!b)
+        throw new Error("Bad assertion");
+}
+
+function assertLengthDescriptorAttributes(ctor, lengthValue) {
+    let descriptor = Object.getOwnPropertyDescriptor(ctor, "length");
+
+    assert(descriptor.value === lengthValue);
+    assert(!descriptor.enumerable);
+    assert(!descriptor.writable);
+    assert(descriptor.configurable);
+}
+
+assertLengthDescriptorAttributes(Array, 1);
+assertLengthDescriptorAttributes(ArrayBuffer, 1);
+assertLengthDescriptorAttributes(Boolean, 1);
+assertLengthDescriptorAttributes(DataView, 3);
+assertLengthDescriptorAttributes(Date, 7);
+assertLengthDescriptorAttributes(Error, 1);
+assertLengthDescriptorAttributes(Function, 1);
+assertLengthDescriptorAttributes(Map, 0);
+assertLengthDescriptorAttributes(Number, 1);
+assertLengthDescriptorAttributes(Object, 1);
+assertLengthDescriptorAttributes(Promise, 1);
+assertLengthDescriptorAttributes(Proxy, 2);
+assertLengthDescriptorAttributes(RegExp, 2);
+assertLengthDescriptorAttributes(Set, 0);
+assertLengthDescriptorAttributes(String, 1);
+assertLengthDescriptorAttributes(Symbol, 0);
+assertLengthDescriptorAttributes(WeakMap, 0);
+assertLengthDescriptorAttributes(WeakSet, 0);
+
+assertLengthDescriptorAttributes(Int8Array, 3);
+assertLengthDescriptorAttributes(Uint8Array, 3);
+assertLengthDescriptorAttributes(Int16Array, 3);
+assertLengthDescriptorAttributes(Uint16Array, 3);
+assertLengthDescriptorAttributes(Int32Array, 3);
+assertLengthDescriptorAttributes(Uint32Array, 3);
+assertLengthDescriptorAttributes(Float32Array, 3);
+assertLengthDescriptorAttributes(Float64Array, 3);
index d6a4cfc..8f5289c 100644 (file)
 - path: test262/test/built-ins/Array/S15.4.3_A2.1.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Array/S15.4.3_A2.2.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], []
 - path: test262/test/built-ins/Array/S15.4.3_A2.2.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Array/S15.4.3_A2.3.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/Array/S15.4.3_A2.3.js
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T2.js
-  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T2.js
-  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T3.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T3.js
 - path: test262/test/built-ins/Function/instance-name.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/Function/length/15.3.3.2-1.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Function/length/15.3.3.2-1.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Function/length/S15.3.5.1_A1_T1.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Function/length/S15.3.5.1_A1_T1.js
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-185.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-186.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-186.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-187.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-187.js
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-190.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-191.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-191.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-192.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-192.js
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-193.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-194.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-194.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-195.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-195.js
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-200.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-201.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-201.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-202.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-202.js
 - path: test262/test/language/expressions/delete/11.4.1-5-a-28-s.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/language/expressions/delete/11.4.1-5-a-28-s.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/language/expressions/delete/11.4.1-5-a-3-s.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/language/expressions/delete/11.4.1-5-a-4-s.js
index 3d17d18..bbccfa1 100644 (file)
@@ -1,3 +1,19 @@
+2017-04-11  Joseph Pecoraro  <pecoraro@apple.com>
+
+        test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
+        https://bugs.webkit.org/show_bug.cgi?id=170652
+
+        Reviewed by Michael Saboff.
+
+        * ietestcenter/Javascript/15.2.3.3-4-186-expected.txt:
+        * ietestcenter/Javascript/15.2.3.3-4-191-expected.txt:
+        * ietestcenter/Javascript/15.2.3.3-4-194-expected.txt:
+        * ietestcenter/Javascript/15.2.3.3-4-201-expected.txt:
+        * ietestcenter/Javascript/15.3.3.2-1-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt:
+        These tests expected the opposite, they are now out of date.
+
 2017-04-11  Yoav Weiss  <yoav@yoav.ws>
 
         [link preload] Double downloads of preloaded content when it's in MemoryCache
index 83992ba..7e71e2e 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 85e151c..e555711 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 38464fd..44ff1c5 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE
index e56992f..8ea0552 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE
index e90dc32..7c008af 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 2673b6e..fb4083f 100644 (file)
@@ -1,3 +1,32 @@
+2017-04-11  Joseph Pecoraro  <pecoraro@apple.com>
+
+        test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
+        https://bugs.webkit.org/show_bug.cgi?id=170652
+
+        Reviewed by Michael Saboff.
+
+        * runtime/ArrayConstructor.cpp:
+        (JSC::ArrayConstructor::finishCreation):
+        * runtime/BooleanConstructor.cpp:
+        (JSC::BooleanConstructor::finishCreation):
+        * runtime/DateConstructor.cpp:
+        (JSC::DateConstructor::finishCreation):
+        * runtime/FunctionConstructor.cpp:
+        (JSC::FunctionConstructor::finishCreation):
+        * runtime/JSArrayBufferConstructor.cpp:
+        (JSC::JSArrayBufferConstructor::finishCreation):
+        * runtime/NumberConstructor.cpp:
+        (JSC::NumberConstructor::finishCreation):
+        * runtime/ObjectConstructor.cpp:
+        (JSC::ObjectConstructor::finishCreation):
+        * runtime/RegExpConstructor.cpp:
+        (JSC::RegExpConstructor::finishCreation):
+        * runtime/StringConstructor.cpp:
+        (JSC::StringConstructor::finishCreation):
+        * runtime/SymbolConstructor.cpp:
+        (JSC::SymbolConstructor::finishCreation):
+        Ensure the "length" property on these native constructors is configurable (deletable).
+
 2017-04-11  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Unreviewed, build fix for Windows after r215228 part 2
index 0bb8679..750fed9 100644 (file)
@@ -59,7 +59,7 @@ void ArrayConstructor::finishCreation(VM& vm, JSGlobalObject* globalObject, Arra
 {
     Base::finishCreation(vm, arrayPrototype->classInfo(vm)->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isArray, arrayConstructorIsArrayCodeGenerator, DontEnum);
 }
index 67840a8..9ec8080 100644 (file)
@@ -45,8 +45,6 @@ void AsyncFunctionConstructor::finishCreation(VM& vm, AsyncFunctionPrototype* pr
 {
     Base::finishCreation(vm, "AsyncFunction");
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
-
-    // Number of arguments for constructor
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
index a0fff58..432556c 100644 (file)
@@ -40,9 +40,7 @@ void BooleanConstructor::finishCreation(VM& vm, BooleanPrototype* booleanPrototy
 {
     Base::finishCreation(vm, booleanPrototype->classInfo()->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
-
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
 // ECMA 15.6.2
index 9c257e5..d7a7bab 100644 (file)
@@ -104,7 +104,7 @@ void DateConstructor::finishCreation(VM& vm, DatePrototype* datePrototype)
 {
     Base::finishCreation(vm, "Date");
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum);
 }
 
 static double millisecondsFromComponents(ExecState* exec, const ArgList& args, WTF::TimeType timeType)
index ced3658..ba74eab 100644 (file)
@@ -45,9 +45,7 @@ void FunctionConstructor::finishCreation(VM& vm, FunctionPrototype* functionProt
 {
     Base::finishCreation(vm, functionPrototype->classInfo()->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, 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 constructWithFunctionConstructor(ExecState* exec)
index 58cab32..3976905 100644 (file)
@@ -45,8 +45,6 @@ void GeneratorFunctionConstructor::finishCreation(VM& vm, GeneratorFunctionProto
 {
     Base::finishCreation(vm, "GeneratorFunction");
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, generatorFunctionPrototype, DontEnum | DontDelete | ReadOnly);
-
-    // Number of arguments for constructor
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
index caf90f6..6c09b67 100644 (file)
@@ -54,7 +54,7 @@ void JSArrayBufferConstructor::finishCreation(VM& vm, JSArrayBufferPrototype* pr
 {
     Base::finishCreation(vm, ASCIILiteral(arrayBufferSharingModeName(m_sharingMode)));
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | DontDelete | ReadOnly);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
 
     if (m_sharingMode == ArrayBufferSharingMode::Default) {
index a06378b..0572a65 100644 (file)
@@ -64,11 +64,8 @@ void NumberConstructor::finishCreation(VM& vm, NumberPrototype* numberPrototype)
     Base::finishCreation(vm, NumberPrototype::info()->className);
     ASSERT(inherits(vm, info()));
 
-    // Number.Prototype
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
-
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 
     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "EPSILON"), jsDoubleNumber(std::numeric_limits<double>::epsilon()), DontDelete | DontEnum | ReadOnly);
     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MAX_VALUE"), jsDoubleNumber(1.7976931348623157E+308), DontDelete | DontEnum | ReadOnly);
index 72e2f4c..f35fd2e 100644 (file)
@@ -96,10 +96,9 @@ ObjectConstructor::ObjectConstructor(VM& vm, Structure* structure)
 void ObjectConstructor::finishCreation(VM& vm, JSGlobalObject* globalObject, ObjectPrototype* objectPrototype)
 {
     Base::finishCreation(vm, objectPrototype->classInfo(vm)->className);
-    // ECMA 15.2.3.1
+
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().createPrivateName(), objectConstructorCreate, DontEnum, 2);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().definePropertyPrivateName(), objectConstructorDefineProperty, DontEnum, 3);
index 432283f..fcc6026 100644 (file)
@@ -89,9 +89,7 @@ void RegExpConstructor::finishCreation(VM& vm, RegExpPrototype* regExpPrototype,
     ASSERT(inherits(vm, info()));
 
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
-
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
 
     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
 }
index 9df4c92..4f44813 100644 (file)
@@ -61,7 +61,7 @@ void StringConstructor::finishCreation(VM& vm, StringPrototype* stringPrototype)
 {
     Base::finishCreation(vm, stringPrototype->classInfo()->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
 // ------------------------------ Functions --------------------------------
index 2c59b35..c83f03d 100644 (file)
@@ -68,7 +68,7 @@ void SymbolConstructor::finishCreation(VM& vm, SymbolPrototype* prototype)
 {
     Base::finishCreation(vm, prototype->classInfo(vm)->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
 
     JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_WELL_KNOWN_SYMBOLS)
 }