15.4.5.1-3.d-1.js |
---
esid: sec-properties-of-array-instances-length
es5id: 15.4.5.1-3.d-1
description: >
Throw RangeError if attempt to set array length property to
4294967296 (2**32)
--- |
468 |
15.4.5.1-3.d-2.js |
---
esid: sec-properties-of-array-instances-length
es5id: 15.4.5.1-3.d-2
description: >
Throw RangeError if attempt to set array length property to
4294967297 (1+2**32)
--- |
470 |
15.4.5.1-3.d-3.js |
---
esid: sec-properties-of-array-instances-length
es5id: 15.4.5.1-3.d-3
description: Set array length property to max value 4294967295 (2**32-1,)
--- |
444 |
browser.js |
|
0 |
define-own-prop-length-coercion-order-set.js |
---
author: André Bargull
esid: sec-arraysetlength
description: >
[[Value]] is coerced to number before current descriptor's [[Writable]] check.
info: |
ArraySetLength ( A, Desc )
[...]
3. Let newLen be ? ToUint32(Desc.[[Value]]).
4. Let numberLen be ? ToNumber(Desc.[[Value]]).
[...]
7. Let oldLenDesc be OrdinaryGetOwnProperty(A, "length").
[...]
12. If oldLenDesc.[[Writable]] is false, return false.
features: [Symbol, Symbol.toPrimitive, Reflect, Reflect.set]
includes: [compareArray.js]
--- |
1413 |
define-own-prop-length-coercion-order.js |
---
author: André Bargull
esid: sec-arraysetlength
description: >
[[Value]] is coerced to number before descriptor validation.
info: |
ArraySetLength ( A, Desc )
[...]
3. Let newLen be ? ToUint32(Desc.[[Value]]).
4. Let numberLen be ? ToNumber(Desc.[[Value]]).
[...]
7. Let oldLenDesc be OrdinaryGetOwnProperty(A, "length").
[...]
11. If newLen ≥ oldLen, then
a. Return OrdinaryDefineOwnProperty(A, "length", newLenDesc).
OrdinaryDefineOwnProperty ( O, P, Desc )
[...]
3. Return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current).
ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
[...]
7. Else if IsDataDescriptor(current) and IsDataDescriptor(Desc) are both true, then
a. If current.[[Configurable]] is false and current.[[Writable]] is false, then
i. If Desc.[[Writable]] is present and Desc.[[Writable]] is true, return false.
features: [Reflect]
--- |
2009 |
define-own-prop-length-error.js |
---
author: Jordan Harband
esid: sec-arraysetlength
description: >
Setting an invalid array length throws a RangeError
info: |
ArraySetLength ( A, Desc )
[...]
5. If SameValueZero(newLen, numberLen) is false, throw a RangeError exception.
[...]
--- |
750 |
define-own-prop-length-no-value-order.js |
---
esid: sec-arraysetlength
description: >
Ordinary descriptor validation if [[Value]] is absent.
info: |
ArraySetLength ( A, Desc )
1. If Desc.[[Value]] is absent, then
a. Return OrdinaryDefineOwnProperty(A, "length", Desc).
OrdinaryDefineOwnProperty ( O, P, Desc )
[...]
3. Return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current).
ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
[...]
4. If current.[[Configurable]] is false, then
a. If Desc.[[Configurable]] is present and its value is true, return false.
b. If Desc.[[Enumerable]] is present and
! SameValue(Desc.[[Enumerable]], current.[[Enumerable]]) is false, return false.
[...]
6. Else if ! SameValue(! IsDataDescriptor(current), ! IsDataDescriptor(Desc)) is false, then
a. If current.[[Configurable]] is false, return false.
[...]
7. Else if IsDataDescriptor(current) and IsDataDescriptor(Desc) are both true, then
a. If current.[[Configurable]] is false and current.[[Writable]] is false, then
i. If Desc.[[Writable]] is present and Desc.[[Writable]] is true, return false.
features: [Reflect]
--- |
2465 |
define-own-prop-length-overflow-order.js |
---
esid: sec-arraysetlength
description: >
[[Value]] is checked for overflow before descriptor validation.
info: |
ArraySetLength ( A, Desc )
[...]
3. Let newLen be ? ToUint32(Desc.[[Value]]).
4. Let numberLen be ? ToNumber(Desc.[[Value]]).
5. If newLen ≠ numberLen, throw a RangeError exception.
--- |
1241 |
define-own-prop-length-overflow-realm.js |
---
esid: sec-array-exotic-objects-defineownproperty-p-desc
es6id: 9.4.2.1
description: >
Error when setting a length larger than 2**32 (honoring the Realm of the
current execution context)
info: |
[...]
2. If P is "length", then
a. Return ? ArraySetLength(A, Desc).
features: [cross-realm]
--- |
677 |
S15.4.2.2_A1.1_T1.js |
---
esid: sec-array-len
info: |
The [[Prototype]] property of the newly constructed object
is set to the original Array prototype object, the one that
is the initial value of Array.prototype
es5id: 15.4.2.2_A1.1_T1
description: >
Create new property of Array.prototype. When new Array object has
this property
--- |
632 |
S15.4.2.2_A1.1_T2.js |
---
esid: sec-array-len
info: |
The [[Prototype]] property of the newly constructed object
is set to the original Array prototype object, the one that
is the initial value of Array.prototype
es5id: 15.4.2.2_A1.1_T2
description: Array.prototype.toString = Object.prototype.toString
--- |
628 |
S15.4.2.2_A1.1_T3.js |
---
esid: sec-array-len
info: |
The [[Prototype]] property of the newly constructed object
is set to the original Array prototype object, the one that
is the initial value of Array.prototype
es5id: 15.4.2.2_A1.1_T3
description: Checking use isPrototypeOf
--- |
572 |
S15.4.2.2_A1.2_T1.js |
---
esid: sec-array-len
info: The [[Class]] property of the newly constructed object is set to "Array"
es5id: 15.4.2.2_A1.2_T1
description: Checking use Object.prototype.toString
--- |
513 |
S15.4.2.2_A2.1_T1.js |
---
esid: sec-array-len
info: |
If the argument len is a Number and ToUint32(len) is equal to len,
then the length property of the newly constructed object is set to ToUint32(len)
es5id: 15.4.2.2_A2.1_T1
description: Array constructor is given one argument
--- |
752 |
S15.4.2.2_A2.2_T1.js |
---
esid: sec-array-len
info: |
If the argument len is a Number and ToUint32(len) is not equal to len,
a RangeError exception is thrown
es5id: 15.4.2.2_A2.2_T1
description: Use try statement. len = -1, 4294967296, 4294967297
--- |
1278 |
S15.4.2.2_A2.2_T2.js |
---
esid: sec-array-len
info: |
If the argument len is a Number and ToUint32(len) is not equal to len,
a RangeError exception is thrown
es5id: 15.4.2.2_A2.2_T2
description: Use try statement. len = NaN, +/-Infinity
--- |
1355 |
S15.4.2.2_A2.2_T3.js |
---
esid: sec-array-len
info: |
If the argument len is a Number and ToUint32(len) is not equal to len,
a RangeError exception is thrown
es5id: 15.4.2.2_A2.2_T3
description: Use try statement. len = 1.5, Number.MAX_VALUE, Number.MIN_VALUE
--- |
1330 |
S15.4.2.2_A2.3_T1.js |
---
esid: sec-array-len
info: |
If the argument len is not a Number, then the length property of
the newly constructed object is set to 1 and the 0 property of
the newly constructed object is set to len
es5id: 15.4.2.2_A2.3_T1
description: Checking for null and undefined
--- |
819 |
S15.4.2.2_A2.3_T2.js |
---
esid: sec-array-len
info: |
If the argument len is not a Number, then the length property of
the newly constructed object is set to 1 and the 0 property of
the newly constructed object is set to len
es5id: 15.4.2.2_A2.3_T2
description: Checking for boolean primitive and Boolean object
--- |
862 |
S15.4.2.2_A2.3_T3.js |
---
esid: sec-array-len
info: |
If the argument len is not a Number, then the length property of
the newly constructed object is set to 1 and the 0 property of
the newly constructed object is set to len
es5id: 15.4.2.2_A2.3_T3
description: Checking for boolean primitive and Boolean object
--- |
856 |
S15.4.2.2_A2.3_T4.js |
---
esid: sec-array-len
info: |
If the argument len is not a Number, then the length property of
the newly constructed object is set to 1 and the 0 property of
the newly constructed object is set to len
es5id: 15.4.2.2_A2.3_T4
description: Checking for Number object
--- |
1096 |
S15.4.2.2_A2.3_T5.js |
---
esid: sec-array-len
info: |
If the argument len is not a Number, then the length property of
the newly constructed object is set to 1 and the 0 property of
the newly constructed object is set to len
es5id: 15.4.2.2_A2.3_T5
description: Checking for Number object
--- |
1106 |
S15.4.4_A1.3_T1.js |
---
esid: sec-properties-of-the-array-prototype-object
info: Array prototype object has a length property
es5id: 15.4.4_A1.3_T1
description: Array.prototype.length === 0
--- |
438 |
S15.4.5.1_A1.1_T1.js |
---
esid: sec-array-exotic-objects-defineownproperty-p-desc
info: If ToUint32(length) !== ToNumber(length), throw RangeError
es5id: 15.4.5.1_A1.1_T1
description: length in [4294967296, -1, 1.5]
--- |
1291 |
S15.4.5.1_A1.1_T2.js |
---
esid: sec-array-exotic-objects-defineownproperty-p-desc
info: If ToUint32(length) !== ToNumber(length), throw RangeError
es5id: 15.4.5.1_A1.1_T2
description: length in [NaN, Infinity, -Infinity, undefined]
--- |
1697 |
S15.4.5.1_A1.2_T1.js |
---
esid: sec-array-exotic-objects-defineownproperty-p-desc
info: |
For every integer k that is less than the value of
the length property of A but not less than ToUint32(length),
if A itself has a property (not an inherited property) named ToString(k),
then delete that property
es5id: 15.4.5.1_A1.2_T1
description: Change length of array
--- |
814 |
S15.4.5.1_A1.2_T3.js |
---
esid: sec-array-exotic-objects-defineownproperty-p-desc
info: |
For every integer k that is less than the value of
the length property of A but not less than ToUint32(length),
if A itself has a property (not an inherited property) named ToString(k),
then delete that property
es5id: 15.4.5.1_A1.2_T3
description: Checking an inherited property
--- |
756 |
S15.4.5.1_A1.3_T1.js |
---
esid: sec-array-exotic-objects-defineownproperty-p-desc
info: Set the value of property length of A to Uint32(length)
es5id: 15.4.5.1_A1.3_T1
description: length is object or primitve
--- |
1002 |
S15.4.5.1_A1.3_T2.js |
---
esid: sec-array-exotic-objects-defineownproperty-p-desc
info: Set the value of property length of A to Uint32(length)
es5id: 15.4.5.1_A1.3_T2
description: Uint32 use ToNumber and ToPrimitve
--- |
2392 |
S15.4.5.2_A3_T4.js |
---
esid: sec-properties-of-array-instances-length
info: |
If the length property is changed, every property whose name
is an array index whose value is not smaller than the new length is automatically deleted
es5id: 15.4.5.2_A3_T4
description: >
If new length greater than the name of every property whose name
is an array index
--- |
900 |
shell.js |
|
0 |