diff --git a/spec.html b/spec.html index 7e1429229ac..9869acd4208 100644 --- a/spec.html +++ b/spec.html @@ -14492,13 +14492,13 @@

- -

Integer-Indexed Exotic Objects

-

An Integer-Indexed exotic object is an exotic object that performs special handling of integer index property keys.

-

Integer-Indexed exotic objects have the same internal slots as ordinary objects and additionally [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], [[ContentType]], and [[TypedArrayName]] internal slots.

-

An object is an Integer-Indexed exotic object if its [[GetOwnProperty]], [[HasProperty]], [[DefineOwnProperty]], [[Get]], [[Set]], [[Delete]], and [[OwnPropertyKeys]] internal methods use the definitions in this section, and its other essential internal methods use the definitions found in . These methods are installed by IntegerIndexedObjectCreate.

+ +

TypedArray Exotic Objects

+

A TypedArray is an exotic object that performs special handling of integer index property keys.

+

TypedArrays have the same internal slots as ordinary objects and additionally [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], [[ContentType]], and [[TypedArrayName]] internal slots.

+

An object is a TypedArray if its [[GetOwnProperty]], [[HasProperty]], [[DefineOwnProperty]], [[Get]], [[Set]], [[Delete]], and [[OwnPropertyKeys]] internal methods use the definitions in this section, and its other essential internal methods use the definitions found in . These methods are installed by TypedArrayCreate.

- +

[[GetOwnProperty]] ( _P_: a property key, @@ -14506,20 +14506,20 @@

for
-
an Integer-Indexed exotic object _O_
+
a TypedArray _O_
1. If _P_ is a String, then 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). 1. If _numericIndex_ is not *undefined*, then - 1. Let _value_ be IntegerIndexedElementGet(_O_, _numericIndex_). + 1. Let _value_ be TypedArrayGetElement(_O_, _numericIndex_). 1. If _value_ is *undefined*, return *undefined*. 1. Return the PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *true* }. 1. Return OrdinaryGetOwnProperty(_O_, _P_).
- +

[[HasProperty]] ( _P_: a property key, @@ -14527,7 +14527,7 @@

for
-
an Integer-Indexed exotic object _O_
+
a TypedArray _O_
1. If _P_ is a String, then @@ -14537,7 +14537,7 @@

- +

[[DefineOwnProperty]] ( _P_: a property key, @@ -14546,7 +14546,7 @@

for
-
an Integer-Indexed exotic object _O_
+
a TypedArray _O_
1. If _P_ is a String, then @@ -14557,13 +14557,13 @@

1. If _Desc_ has an [[Enumerable]] field and _Desc_.[[Enumerable]] is *false*, return *false*. 1. If IsAccessorDescriptor(_Desc_) is *true*, return *false*. 1. If _Desc_ has a [[Writable]] field and _Desc_.[[Writable]] is *false*, return *false*. - 1. If _Desc_ has a [[Value]] field, perform ? IntegerIndexedElementSet(_O_, _numericIndex_, _Desc_.[[Value]]). + 1. If _Desc_ has a [[Value]] field, perform ? TypedArraySetElement(_O_, _numericIndex_, _Desc_.[[Value]]). 1. Return *true*. 1. Return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_). - +

[[Get]] ( _P_: a property key, @@ -14572,18 +14572,18 @@

for
-
an Integer-Indexed exotic object _O_
+
a TypedArray _O_
1. If _P_ is a String, then 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). 1. If _numericIndex_ is not *undefined*, then - 1. Return IntegerIndexedElementGet(_O_, _numericIndex_). + 1. Return TypedArrayGetElement(_O_, _numericIndex_). 1. Return ? OrdinaryGet(_O_, _P_, _Receiver_).
- +

[[Set]] ( _P_: a property key, @@ -14593,21 +14593,21 @@

for
-
an Integer-Indexed exotic object _O_
+
a TypedArray _O_
1. If _P_ is a String, then 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). 1. If _numericIndex_ is not *undefined*, then 1. If SameValue(_O_, _Receiver_) is *true*, then - 1. Perform ? IntegerIndexedElementSet(_O_, _numericIndex_, _V_). + 1. Perform ? TypedArraySetElement(_O_, _numericIndex_, _V_). 1. Return *true*. 1. If IsValidIntegerIndex(_O_, _numericIndex_) is *false*, return *true*. 1. Return ? OrdinarySet(_O_, _P_, _V_, _Receiver_).
- +

[[Delete]] ( _P_: a property key, @@ -14615,7 +14615,7 @@

for
-
an Integer-Indexed exotic object _O_
+
a TypedArray _O_
1. If _P_ is a String, then @@ -14626,17 +14626,17 @@

- +

[[OwnPropertyKeys]] ( ): a normal completion containing a List of property keys

for
-
an Integer-Indexed exotic object _O_
+
a TypedArray _O_
- 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Let _keys_ be a new empty List. - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *false*, then - 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *false*, then + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. For each integer _i_ such that 0 ≤ _i_ < _length_, in ascending order, do 1. Append ! ToString(𝔽(_i_)) to _keys_. 1. For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an integer index, in ascending chronological order of property creation, do @@ -14647,11 +14647,11 @@

[[OwnPropertyKeys]] ( ): a normal completion containing a List of property k - -

Integer-Indexed Object With Buffer Witness Records

-

An Integer-Indexed Object With Buffer Witness Record is a Record value used to encapsulate an Integer-Indexed object along with a cached byte length of the viewed buffer. It is used to help ensure there is a single shared memory read event of the byte length data block when the viewed buffer is a growable SharedArrayBuffer.

-

Integer-Indexed Object With Buffer Witness Records have the fields listed in .

- + +

TypedArray With Buffer Witness Records

+

An TypedArray With Buffer Witness Record is a Record value used to encapsulate a TypedArray along with a cached byte length of the viewed buffer. It is used to help ensure there is a single shared memory read event of the byte length data block when the viewed buffer is a growable SharedArrayBuffer.

+

TypedArray With Buffer Witness Records have the fields listed in .

+ @@ -14690,12 +14690,12 @@

Integer-Indexed Object With Buffer Witness Records

- +

- MakeIntegerIndexedObjectWithBufferWitnessRecord ( - _obj_: an Integer-Indexed exotic object, + MakeTypedArrayWithBufferWitnessRecord ( + _obj_: a TypedArray, _order_: ~seq-cst~ or ~unordered~, - ): an Integer-Indexed Object With Buffer Witness Record + ): a TypedArray With Buffer Witness Record

@@ -14705,79 +14705,79 @@

1. Let _byteLength_ be ~detached~. 1. Else, 1. Let _byteLength_ be ArrayBufferByteLength(_buffer_, _order_). - 1. Return the Integer-Indexed Object With Buffer Witness Record { [[Object]]: _obj_, [[CachedBufferByteLength]]: _byteLength_ }. + 1. Return the TypedArray With Buffer Witness Record { [[Object]]: _obj_, [[CachedBufferByteLength]]: _byteLength_ }. - +

- IntegerIndexedObjectCreate ( + TypedArrayCreate ( _prototype_: an Object, - ): an Integer-Indexed exotic object + ): a TypedArray

description
-
It is used to specify the creation of new Integer-Indexed exotic objects.
+
It is used to specify the creation of new TypedArrays.
1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]], [[ViewedArrayBuffer]], [[TypedArrayName]], [[ContentType]], [[ByteLength]], [[ByteOffset]], [[ArrayLength]] ». 1. Let _A_ be MakeBasicObject(_internalSlotsList_). - 1. Set _A_.[[GetOwnProperty]] as specified in . - 1. Set _A_.[[HasProperty]] as specified in . - 1. Set _A_.[[DefineOwnProperty]] as specified in . - 1. Set _A_.[[Get]] as specified in . - 1. Set _A_.[[Set]] as specified in . - 1. Set _A_.[[Delete]] as specified in . - 1. Set _A_.[[OwnPropertyKeys]] as specified in . + 1. Set _A_.[[GetOwnProperty]] as specified in . + 1. Set _A_.[[HasProperty]] as specified in . + 1. Set _A_.[[DefineOwnProperty]] as specified in . + 1. Set _A_.[[Get]] as specified in . + 1. Set _A_.[[Set]] as specified in . + 1. Set _A_.[[Delete]] as specified in . + 1. Set _A_.[[OwnPropertyKeys]] as specified in . 1. Set _A_.[[Prototype]] to _prototype_. 1. Return _A_.
- +

- IntegerIndexedObjectByteLength ( - _iieoRecord_: an Integer-Indexed Object With Buffer Witness Record, + TypedArrayByteLength ( + _taRecord_: a TypedArray With Buffer Witness Record, ): a non-negative integer

- 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, return 0. - 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, return 0. + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If _length_ = 0, return 0. - 1. Let _O_ be _iieoRecord_.[[Object]]. + 1. Let _O_ be _taRecord_.[[Object]]. 1. If _O_.[[ByteLength]] is not ~auto~, return _O_.[[ByteLength]]. 1. Let _elementSize_ be TypedArrayElementSize(_O_). 1. Return _length_ × _elementSize_.
- +

- IntegerIndexedObjectLength ( - _iieoRecord_: an Integer-Indexed Object With Buffer Witness Record, + TypedArrayLength ( + _taRecord_: a TypedArray With Buffer Witness Record, ): a non-negative integer

- 1. Assert: IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *false*. - 1. Let _O_ be _iieoRecord_.[[Object]]. + 1. Assert: IsTypedArrayOutOfBounds(_taRecord_) is *false*. + 1. Let _O_ be _taRecord_.[[Object]]. 1. If _O_.[[ArrayLength]] is not ~auto~, return _O_.[[ArrayLength]]. 1. Assert: IsFixedLengthArrayBuffer(_O_.[[ViewedArrayBuffer]]) is *false*. 1. Let _byteOffset_ be _O_.[[ByteOffset]]. 1. Let _elementSize_ be TypedArrayElementSize(_O_). - 1. Let _byteLength_ be _iieoRecord_.[[CachedBufferByteLength]]. + 1. Let _byteLength_ be _taRecord_.[[CachedBufferByteLength]]. 1. Assert: _byteLength_ is not ~detached~. 1. Return floor((_byteLength_ - _byteOffset_) / _elementSize_).
- +

- IsIntegerIndexedObjectOutOfBounds ( - _iieoRecord_: an Integer-Indexed Object With Buffer Witness Record, + IsTypedArrayOutOfBounds ( + _taRecord_: a TypedArray With Buffer Witness Record, ): a Boolean

@@ -14785,8 +14785,8 @@

It checks if any of the object's numeric properties reference a value at an index not contained within the underlying buffer's bounds.

- 1. Let _O_ be _iieoRecord_.[[Object]]. - 1. Let _bufferByteLength_ be _iieoRecord_.[[CachedBufferByteLength]]. + 1. Let _O_ be _taRecord_.[[Object]]. + 1. Let _bufferByteLength_ be _taRecord_.[[CachedBufferByteLength]]. 1. Assert: IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true* if and only if _bufferByteLength_ is ~detached~. 1. If _bufferByteLength_ is ~detached~, return *true*. 1. Let _byteOffsetStart_ be _O_.[[ByteOffset]]. @@ -14804,7 +14804,7 @@

IsValidIntegerIndex ( - _O_: an Integer-Indexed exotic object, + _O_: a TypedArray, _index_: a Number, ): a Boolean

@@ -14814,19 +14814,19 @@

1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, return *false*. 1. If IsIntegralNumber(_index_) is *false*, return *false*. 1. If _index_ is *-0*𝔽, return *false*. - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~unordered~). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _O_'s backing buffer is a growable SharedArrayBuffer. - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, return *false*. - 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, return *false*. + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If ℝ(_index_) < 0 or ℝ(_index_) ≥ _length_, return *false*. 1. Return *true*. - +

- IntegerIndexedElementGet ( - _O_: an Integer-Indexed exotic object, + TypedArrayGetElement ( + _O_: a TypedArray, _index_: a Number, ): a Number, a BigInt, or *undefined*

@@ -14842,10 +14842,10 @@

- +

- IntegerIndexedElementSet ( - _O_: an Integer-Indexed exotic object, + TypedArraySetElement ( + _O_: a TypedArray, _index_: a Number, _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion @@ -14871,7 +14871,7 @@

IsArrayBufferViewOutOfBounds ( - _O_: an Integer-Indexed exotic object or a DataView, + _O_: a TypedArray or a DataView, ): a Boolean

@@ -14882,8 +14882,8 @@

1. If _O_ has a [[DataView]] internal slot, then 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Return IsViewOutOfBounds(_viewRecord_). - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. Return IsIntegerIndexedObjectOutOfBounds(_iieoRecord_). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Return IsTypedArrayOutOfBounds(_taRecord_). @@ -22271,7 +22271,7 @@

The iterator's `throw` and `return` methods are *null* and are never invoked. The iterator's `next` method processes object properties to determine whether the property key should be returned as an iterator value. Returned property keys do not include keys that are Symbols. Properties of the target object may be deleted during enumeration. A property that is deleted before it is processed by the iterator's `next` method is ignored. If new properties are added to the target object during enumeration, the newly added properties are not guaranteed to be processed in the active enumeration. A property name will be returned by the iterator's `next` method at most once in any enumeration.

Enumerating the properties of the target object includes enumerating properties of its prototype, and the prototype of the prototype, and so on, recursively; but a property of a prototype is not processed if it has the same name as a property that has already been processed by the iterator's `next` method. The values of [[Enumerable]] attributes are not considered when determining if a property of a prototype object has already been processed. The enumerable property names of prototype objects must be obtained by invoking EnumerateObjectProperties passing the prototype object as the argument. EnumerateObjectProperties must obtain the own property keys of the target object by calling its [[OwnPropertyKeys]] internal method. Property attributes of the target object must be obtained by calling its [[GetOwnProperty]] internal method.

-

In addition, if neither _O_ nor any object in its prototype chain is a Proxy exotic object, Integer-Indexed exotic object, module namespace exotic object, or implementation provided exotic object, then the iterator must behave as would the iterator given by CreateForInIterator(_O_) until one of the following occurs:

+

In addition, if neither _O_ nor any object in its prototype chain is a Proxy exotic object, TypedArray, module namespace exotic object, or implementation provided exotic object, then the iterator must behave as would the iterator given by CreateForInIterator(_O_) until one of the following occurs:

  • the value of the [[Prototype]] internal slot of _O_ or an object in its prototype chain changes,
  • a property is removed from _O_ or an object in its prototype chain,
  • @@ -39994,9 +39994,9 @@

    1. Let _index_ be 0. 1. Repeat, 1. If _array_ has a [[TypedArrayName]] internal slot, then - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_array_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, throw a *TypeError* exception. - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_array_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Else, 1. Let _len_ be ? LengthOfArrayLike(_array_). 1. If _index_ ≥ _len_, return NormalCompletion(*undefined*). @@ -40393,8 +40393,8 @@

    Properties of the %TypedArray% Prototype Object

    %TypedArray%.prototype.at ( _index_ )

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, then 1. Let _k_ be _relativeIndex_. @@ -40424,8 +40424,8 @@

    get %TypedArray%.prototype.byteLength

    1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. Let _size_ be IntegerIndexedObjectByteLength(_iieoRecord_). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Let _size_ be TypedArrayByteLength(_taRecord_). 1. Return 𝔽(_size_).
    @@ -40437,8 +40437,8 @@

    get %TypedArray%.prototype.byteOffset

    1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, return *+0*𝔽. + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, return *+0*𝔽. 1. Let _offset_ be _O_.[[ByteOffset]]. 1. Return 𝔽(_offset_). @@ -40455,8 +40455,8 @@

    %TypedArray%.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _relativeTarget_ be ? ToIntegerOrInfinity(_target_). 1. If _relativeTarget_ = -∞, let _to_ be 0. 1. Else if _relativeTarget_ < 0, let _to_ be max(_len_ + _relativeTarget_, 0). @@ -40473,9 +40473,9 @@

    %TypedArray%.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

    1. If _count_ > 0, then 1. NOTE: The copying must be performed in a manner that preserves the bit-level encoding of the source data. 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]]. - 1. Set _iieoRecord_ to MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, throw a *TypeError* exception. - 1. Set _len_ to IntegerIndexedObjectLength(_iieoRecord_). + 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Set _len_ to TypedArrayLength(_taRecord_). 1. Let _elementSize_ be TypedArrayElementSize(_O_). 1. Let _byteOffset_ be _O_.[[ByteOffset]]. 1. Let _bufferByteLimit_ be _len_ × _elementSize_ + _byteOffset_. @@ -40517,8 +40517,8 @@

    %TypedArray%.prototype.every ( _callbackfn_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, @@ -40538,8 +40538,8 @@

    %TypedArray%.prototype.fill ( _value_ [ , _start_ [ , _end_ ] ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If _O_.[[ContentType]] is ~bigint~, set _value_ to ? ToBigInt(_value_). 1. Otherwise, set _value_ to ? ToNumber(_value_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). @@ -40550,9 +40550,9 @@

    %TypedArray%.prototype.fill ( _value_ [ , _start_ [ , _end_ ] ] )

    1. If _relativeEnd_ = -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). - 1. Set _iieoRecord_ to MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, throw a *TypeError* exception. - 1. Set _len_ to IntegerIndexedObjectLength(_iieoRecord_). + 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Set _len_ to TypedArrayLength(_taRecord_). 1. Set _final_ to min(_final_, _len_). 1. Repeat, while _k_ < _final_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). @@ -40568,8 +40568,8 @@

    %TypedArray%.prototype.filter ( _callbackfn_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. Let _kept_ be a new empty List. 1. Let _captured_ be 0. @@ -40598,8 +40598,8 @@

    %TypedArray%.prototype.find ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~ascending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Value]]. @@ -40612,8 +40612,8 @@

    %TypedArray%.prototype.findIndex ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~ascending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Index]]. @@ -40626,8 +40626,8 @@

    %TypedArray%.prototype.findLast ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~descending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Value]]. @@ -40640,8 +40640,8 @@

    %TypedArray%.prototype.findLastIndex ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~descending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Index]]. @@ -40654,8 +40654,8 @@

    %TypedArray%.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, @@ -40674,8 +40674,8 @@

    %TypedArray%.prototype.includes ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If _len_ = 0, return *false*. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. @@ -40701,8 +40701,8 @@

    %TypedArray%.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If _len_ = 0, return *-1*𝔽. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. @@ -40730,8 +40730,8 @@

    %TypedArray%.prototype.join ( _separator_ )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If _separator_ is *undefined*, let _sep_ be *","*. 1. Else, let _sep_ be ? ToString(_separator_). 1. Let _R_ be the empty String. @@ -40763,8 +40763,8 @@

    %TypedArray%.prototype.lastIndexOf ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If _len_ = 0, return *-1*𝔽. 1. If _fromIndex_ is present, let _n_ be ? ToIntegerOrInfinity(_fromIndex_); else let _n_ be _len_ - 1. 1. If _n_ = -∞, return *-1*𝔽. @@ -40790,9 +40790,9 @@

    get %TypedArray%.prototype.length

    1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). 1. Assert: _O_ has [[ViewedArrayBuffer]] and [[ArrayLength]] internal slots. - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, return *+0*𝔽. - 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, return *+0*𝔽. + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Return 𝔽(_length_).

    This function is not generic. The *this* value must be an object with a [[TypedArrayName]] internal slot.

    @@ -40804,8 +40804,8 @@

    %TypedArray%.prototype.map ( _callbackfn_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_len_) »). 1. Let _k_ be 0. @@ -40826,8 +40826,8 @@

    %TypedArray%.prototype.reduce ( _callbackfn_ [ , _initialValue_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. If _len_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. 1. Let _k_ be 0. @@ -40854,8 +40854,8 @@

    %TypedArray%.prototype.reduceRight ( _callbackfn_ [ , _initialValue_ ] )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. If _len_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. 1. Let _k_ be _len_ - 1. @@ -40882,8 +40882,8 @@

    %TypedArray%.prototype.reverse ( )

    This method performs the following steps when called:

    1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _middle_ be floor(_len_ / 2). 1. Let _lower_ be 0. 1. Repeat, while _lower_ ≠ _middle_, @@ -40932,13 +40932,13 @@

1. Let _targetBuffer_ be _target_.[[ViewedArrayBuffer]]. - 1. Let _targetRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_target_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_targetRecord_) is *true*, throw a *TypeError* exception. - 1. Let _targetLength_ be IntegerIndexedObjectLength(_targetRecord_). + 1. Let _targetRecord_ be MakeTypedArrayWithBufferWitnessRecord(_target_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_targetRecord_) is *true*, throw a *TypeError* exception. + 1. Let _targetLength_ be TypedArrayLength(_targetRecord_). 1. Let _srcBuffer_ be _source_.[[ViewedArrayBuffer]]. - 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_source_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_srcRecord_) is *true*, throw a *TypeError* exception. - 1. Let _srcLength_ be IntegerIndexedObjectLength(_srcRecord_). + 1. Let _srcRecord_ be MakeTypedArrayWithBufferWitnessRecord(_source_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_srcRecord_) is *true*, throw a *TypeError* exception. + 1. Let _srcLength_ be TypedArrayLength(_srcRecord_). 1. Let _targetType_ be TypedArrayElementType(_target_). 1. Let _targetElementSize_ be TypedArrayElementSize(_target_). 1. Let _targetByteOffset_ be _target_.[[ByteOffset]]. @@ -40950,7 +40950,7 @@

1. If _target_.[[ContentType]] is not _source_.[[ContentType]], throw a *TypeError* exception. 1. If IsSharedArrayBuffer(_srcBuffer_) is *true*, IsSharedArrayBuffer(_targetBuffer_) is *true*, and _srcBuffer_.[[ArrayBufferData]] is _targetBuffer_.[[ArrayBufferData]], let _sameSharedArrayBuffer_ be *true*; otherwise, let _sameSharedArrayBuffer_ be *false*. 1. If SameValue(_srcBuffer_, _targetBuffer_) is *true* or _sameSharedArrayBuffer_ is *true*, then - 1. Let _srcByteLength_ be IntegerIndexedObjectByteLength(_srcRecord_). + 1. Let _srcByteLength_ be TypedArrayByteLength(_srcRecord_). 1. Set _srcBuffer_ to ? CloneArrayBuffer(_srcBuffer_, _srcByteOffset_, _srcByteLength_). 1. Let _srcByteIndex_ be 0. 1. Else, @@ -40987,9 +40987,9 @@

It sets multiple values in _target_, starting at index _targetOffset_, reading the values from _source_.
- 1. Let _targetRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_target_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_targetRecord_) is *true*, throw a *TypeError* exception. - 1. Let _targetLength_ be IntegerIndexedObjectLength(_targetRecord_). + 1. Let _targetRecord_ be MakeTypedArrayWithBufferWitnessRecord(_target_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_targetRecord_) is *true*, throw a *TypeError* exception. + 1. Let _targetLength_ be TypedArrayLength(_targetRecord_). 1. Let _src_ be ? ToObject(_source_). 1. Let _srcLength_ be ? LengthOfArrayLike(_src_). 1. If _targetOffset_ = +∞, throw a *RangeError* exception. @@ -40999,7 +40999,7 @@

1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _value_ be ? Get(_src_, _Pk_). 1. Let _targetIndex_ be 𝔽(_targetOffset_ + _k_). - 1. Perform ? IntegerIndexedElementSet(_target_, _targetIndex_, _value_). + 1. Perform ? TypedArraySetElement(_target_, _targetIndex_, _value_). 1. Set _k_ to _k_ + 1. 1. Return ~unused~. @@ -41012,8 +41012,8 @@

%TypedArray%.prototype.slice ( _start_, _end_ )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _k_ be 0. 1. Else if _relativeStart_ < 0, let _k_ be max(_len_ + _relativeStart_, 0). @@ -41025,9 +41025,9 @@

%TypedArray%.prototype.slice ( _start_, _end_ )

1. Let _count_ be max(_final_ - _k_, 0). 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_count_) »). 1. If _count_ > 0, then - 1. Set _iieoRecord_ to MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, throw a *TypeError* exception. - 1. Set _len_ to IntegerIndexedObjectLength(_iieoRecord_). + 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Set _len_ to TypedArrayLength(_taRecord_). 1. Set _final_ to min(_final_, _len_). 1. Let _srcType_ be TypedArrayElementType(_O_). 1. Let _targetType_ be TypedArrayElementType(_A_). @@ -41064,8 +41064,8 @@

%TypedArray%.prototype.some ( _callbackfn_ [ , _thisArg_ ] )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, @@ -41087,8 +41087,8 @@

%TypedArray%.prototype.sort ( _comparefn_ )

1. If _comparefn_ is not *undefined* and IsCallable(_comparefn_) is *false*, throw a *TypeError* exception. 1. Let _obj_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. NOTE: The following closure performs a numeric comparison rather than the string comparison used in . 1. Let _SortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparefn_ and performs the following steps when called: 1. Return ? CompareTypedArrayElements(_x_, _y_, _comparefn_). @@ -41113,11 +41113,11 @@

%TypedArray%.prototype.subarray ( _begin_, _end_ )

1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]]. - 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_srcRecord_) is *true*, then + 1. Let _srcRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_srcRecord_) is *true*, then 1. Let _srcLength_ be 0. 1. Else, - 1. Let _srcLength_ be IntegerIndexedObjectLength(_srcRecord_). + 1. Let _srcLength_ be TypedArrayLength(_srcRecord_). 1. Let _relativeBegin_ be ? ToIntegerOrInfinity(_begin_). 1. If _relativeBegin_ = -∞, let _beginIndex_ be 0. 1. Else if _relativeBegin_ < 0, let _beginIndex_ be max(_srcLength_ + _relativeBegin_, 0). @@ -41141,7 +41141,7 @@

%TypedArray%.prototype.subarray ( _begin_, _end_ )

%TypedArray%.prototype.toLocaleString ( [ _reserved1_ [ , _reserved2_ ] ] )

-

This is a distinct method that implements the same algorithm as `Array.prototype.toLocaleString` as defined in except that IntegerIndexedObjectLength is called in place of performing a [[Get]] of *"length"*. The implementation of the algorithm may be optimized with the knowledge that the *this* value has a fixed length when the underlying buffer is not resizable and whose integer-indexed properties are not sparse. However, such optimization must not introduce any observable changes in the specified behaviour of the algorithm.

+

This is a distinct method that implements the same algorithm as `Array.prototype.toLocaleString` as defined in except that TypedArrayLength is called in place of performing a [[Get]] of *"length"*. The implementation of the algorithm may be optimized with the knowledge that the *this* value has a fixed length when the underlying buffer is not resizable and whose integer-indexed properties are not sparse. However, such optimization must not introduce any observable changes in the specified behaviour of the algorithm.

This method is not generic. ValidateTypedArray is called with the *this* value and ~seq-cst~ as arguments prior to evaluating the algorithm. If its result is an abrupt completion that exception is thrown instead of evaluating the algorithm.

If the ECMAScript implementation includes the ECMA-402 Internationalization API this method is based upon the algorithm for `Array.prototype.toLocaleString` that is in the ECMA-402 specification.

@@ -41153,8 +41153,8 @@

%TypedArray%.prototype.toReversed ( )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Let _A_ be ? TypedArrayCreateSameType(_O_, « 𝔽(_length_) »). 1. Let _k_ be 0. 1. Repeat, while _k_ < _length_, @@ -41173,8 +41173,8 @@

%TypedArray%.prototype.toSorted ( _comparefn_ )

1. If _comparefn_ is not *undefined* and IsCallable(_comparefn_) is *false*, throw a *TypeError* exception. 1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _A_ be ? TypedArrayCreateSameType(_O_, « 𝔽(_len_) »). 1. NOTE: The following closure performs a numeric comparison rather than the string comparison used in . 1. Let _SortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparefn_ and performs the following steps when called: @@ -41208,8 +41208,8 @@

%TypedArray%.prototype.with ( _index_, _value_ )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, let _actualIndex_ be _relativeIndex_. 1. Else, let _actualIndex_ be _len_ + _relativeIndex_. @@ -41286,10 +41286,10 @@

1. Let _newTypedArray_ be ? Construct(_constructor_, _argumentList_). - 1. Let _iieoRecord_ be ? ValidateTypedArray(_newTypedArray_, ~seq-cst~). + 1. Let _taRecord_ be ? ValidateTypedArray(_newTypedArray_, ~seq-cst~). 1. If the number of elements in _argumentList_ is 1 and _argumentList_[0] is a Number, then - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, throw a *TypeError* exception. - 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If _length_ < ℝ(_argumentList_[0]), throw a *TypeError* exception. 1. Return _newTypedArray_. @@ -41320,16 +41320,16 @@

ValidateTypedArray ( _O_: an ECMAScript language value, _order_: ~seq-cst~ or ~unordered~, - ): either a normal completion containing an Integer-Indexed Object With Buffer Witness Record or a throw completion + ): either a normal completion containing a TypedArray With Buffer Witness Record or a throw completion

1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, _order_). - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, throw a *TypeError* exception. - 1. Return _iieoRecord_. + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, _order_). + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Return _taRecord_.
@@ -41451,7 +41451,7 @@

1. Let _proto_ be ? GetPrototypeFromConstructor(_newTarget_, _defaultProto_). - 1. Let _obj_ be IntegerIndexedObjectCreate(_proto_). + 1. Let _obj_ be TypedArrayCreate(_proto_). 1. Assert: _obj_.[[ViewedArrayBuffer]] is *undefined*. 1. Set _obj_.[[TypedArrayName]] to _constructorName_. 1. If _constructorName_ is either *"BigInt64Array"* or *"BigUint64Array"*, set _obj_.[[ContentType]] to ~bigint~. @@ -41482,9 +41482,9 @@

1. Let _srcType_ be TypedArrayElementType(_srcArray_). 1. Let _srcElementSize_ be TypedArrayElementSize(_srcArray_). 1. Let _srcByteOffset_ be _srcArray_.[[ByteOffset]]. - 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_srcArray_, ~seq-cst~). - 1. If IsIntegerIndexedObjectOutOfBounds(_srcRecord_) is *true*, throw a *TypeError* exception. - 1. Let _elementLength_ be IntegerIndexedObjectLength(_srcRecord_). + 1. Let _srcRecord_ be MakeTypedArrayWithBufferWitnessRecord(_srcArray_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_srcRecord_) is *true*, throw a *TypeError* exception. + 1. Let _elementLength_ be TypedArrayLength(_srcRecord_). 1. Let _byteLength_ be _elementSize_ × _elementLength_. 1. If _elementType_ is _srcType_, then 1. Let _data_ be ? CloneArrayBuffer(_srcData_, _srcByteOffset_, _byteLength_). @@ -41666,7 +41666,7 @@

_TypedArray_.prototype.constructor

Properties of _TypedArray_ Instances

-

_TypedArray_ instances are Integer-Indexed exotic objects. Each _TypedArray_ instance inherits properties from the corresponding _TypedArray_ prototype object. Each _TypedArray_ instance has the following internal slots: [[TypedArrayName]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]], and [[ArrayLength]].

+

_TypedArray_ instances are TypedArrays. Each _TypedArray_ instance inherits properties from the corresponding _TypedArray_ prototype object. Each _TypedArray_ instance has the following internal slots: [[TypedArrayName]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]], and [[ArrayLength]].

@@ -44153,37 +44153,37 @@

ValidateIntegerTypedArray ( _typedArray_: an ECMAScript language value, _waitable_: a Boolean, - ): either a normal completion containing an Integer-Indexed Object With Buffer Witness Record, or a throw completion + ): either a normal completion containing a TypedArray With Buffer Witness Record, or a throw completion

- 1. Let _iieoRecord_ be ? ValidateTypedArray(_typedArray_, ~unordered~). + 1. Let _taRecord_ be ? ValidateTypedArray(_typedArray_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _typedArray_'s backing buffer is a growable SharedArrayBuffer. 1. If _waitable_ is *true*, then 1. If _typedArray_.[[TypedArrayName]] is neither *"Int32Array"* nor *"BigInt64Array"*, throw a *TypeError* exception. 1. Else, 1. Let _type_ be TypedArrayElementType(_typedArray_). 1. If IsUnclampedIntegerElementType(_type_) is *false* and IsBigIntElementType(_type_) is *false*, throw a *TypeError* exception. - 1. Return _iieoRecord_. + 1. Return _taRecord_.

ValidateAtomicAccess ( - _iieoRecord_: an Integer-Indexed Object With Buffer Witness Record, + _taRecord_: a TypedArray With Buffer Witness Record, _requestIndex_: an ECMAScript language value, ): either a normal completion containing an integer or a throw completion

- 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Let _accessIndex_ be ? ToIndex(_requestIndex_). 1. Assert: _accessIndex_ ≥ 0. 1. If _accessIndex_ ≥ _length_, throw a *RangeError* exception. - 1. Let _typedArray_ be _iieoRecord_.[[Object]]. + 1. Let _typedArray_ be _taRecord_.[[Object]]. 1. Let _elementSize_ be TypedArrayElementSize(_typedArray_). 1. Let _offset_ be _typedArray_.[[ByteOffset]]. 1. Return (_accessIndex_ × _elementSize_) + _offset_. @@ -44202,15 +44202,15 @@

1. If _waitable_ is not present, set _waitable_ to *false*. - 1. Let _iieoRecord_ be ? ValidateIntegerTypedArray(_typedArray_, _waitable_). - 1. Return ? ValidateAtomicAccess(_iieoRecord_, _requestIndex_). + 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, _waitable_). + 1. Return ? ValidateAtomicAccess(_taRecord_, _requestIndex_).

RevalidateAtomicAccess ( - _typedArray_: an Integer-Indexed exotic object, + _typedArray_: a TypedArray, _byteIndexInBuffer_: an integer, ): either a normal completion containing ~unused~ or a throw completion

@@ -44219,11 +44219,11 @@

This operation revalidates the index within the backing buffer for atomic operations after all argument coercions are performed in Atomics methods, as argument coercions can have arbitrary side effects, which could cause the buffer to become out of bounds. This operation does not throw when _typedArray_'s backing buffer is a SharedArrayBuffer.
- 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_typedArray_, ~unordered~). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_typedArray_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _typedArray_'s backing buffer is a growable SharedArrayBuffer. - 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, throw a *TypeError* exception. + 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. 1. Assert: _byteIndexInBuffer_ ≥ _typedArray_.[[ByteOffset]]. - 1. If _byteIndexInBuffer_ ≥ _iieoRecord_.[[CachedBufferByteLength]], throw a *RangeError* exception. + 1. If _byteIndexInBuffer_ ≥ _taRecord_.[[CachedBufferByteLength]], throw a *RangeError* exception. 1. Return ~unused~. @@ -44422,10 +44422,10 @@

- 1. Let _iieoRecord_ be ? ValidateIntegerTypedArray(_typedArray_, *true*). - 1. Let _buffer_ be _iieoRecord_.[[Object]].[[ViewedArrayBuffer]]. + 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, *true*). + 1. Let _buffer_ be _taRecord_.[[Object]].[[ViewedArrayBuffer]]. 1. If IsSharedArrayBuffer(_buffer_) is *false*, throw a *TypeError* exception. - 1. Let _i_ be ? ValidateAtomicAccess(_iieoRecord_, _index_). + 1. Let _i_ be ? ValidateAtomicAccess(_taRecord_, _index_). 1. Let _arrayTypeName_ be _typedArray_.[[TypedArrayName]]. 1. If _arrayTypeName_ is *"BigInt64Array"*, let _v_ be ? ToBigInt64(_value_). 1. Else, let _v_ be ? ToInt32(_value_).

@@ -14669,10 +14669,10 @@

Integer-Indexed Object With Buffer Witness Records

[[Object]]
- an Integer-Indexed exotic object + a TypedArray - The Integer-Indexed exotic object whose buffer's byte length is loaded. + The TypedArray whose buffer's byte length is loaded.