diff --git a/spec.html b/spec.html index 58d9760205..64f65dfe26 100644 --- a/spec.html +++ b/spec.html @@ -41197,8 +41197,7 @@

%ArrayIteratorPrototype%.next ( )

1. Let _index_ be _O_.[[ArrayLikeNextIndex]]. 1. Let _kind_ be _O_.[[ArrayLikeIterationKind]]. 1. If _array_ has a [[TypedArrayName]] internal slot, then - 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_array_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Let _taRecord_ be ? ValidateTypedArray(_array_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Else, 1. Let _len_ be ? LengthOfArrayLike(_array_). @@ -41732,8 +41731,7 @@

%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 _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Set _taRecord_ to ? ValidateTypedArray(_O_, ~seq-cst~). 1. Set _len_ to TypedArrayLength(_taRecord_). 1. Let _elementSize_ be TypedArrayElementSize(_O_). 1. Let _byteOffset_ be _O_.[[ByteOffset]]. @@ -41809,8 +41807,7 @@

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

1. If _relativeEnd_ = -∞, let _endIndex_ be 0. 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _endIndex_ be min(_relativeEnd_, _len_). - 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Set _taRecord_ to ? ValidateTypedArray(_O_, ~seq-cst~). 1. Set _len_ to TypedArrayLength(_taRecord_). 1. Set _endIndex_ to min(_endIndex_, _len_). 1. Let _k_ be _startIndex_. @@ -42194,8 +42191,7 @@

It sets multiple values in _target_, starting at index _targetOffset_, reading the values from _source_.
- 1. Let _targetRecord_ be MakeTypedArrayWithBufferWitnessRecord(_target_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_targetRecord_) is *true*, throw a *TypeError* exception. + 1. Let _targetRecord_ be ? ValidateTypedArray(_target_, ~seq-cst~). 1. Let _targetLength_ be TypedArrayLength(_targetRecord_). 1. Let _src_ be ? ToObject(_source_). 1. Let _srcLength_ be ? LengthOfArrayLike(_src_). @@ -42226,12 +42222,10 @@

1. Let _targetBuffer_ be _target_.[[ViewedArrayBuffer]]. - 1. Let _targetRecord_ be MakeTypedArrayWithBufferWitnessRecord(_target_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_targetRecord_) is *true*, throw a *TypeError* exception. + 1. Let _targetRecord_ be ? ValidateTypedArray(_target_, ~seq-cst~). 1. Let _targetLength_ be TypedArrayLength(_targetRecord_). 1. Let _srcBuffer_ be _source_.[[ViewedArrayBuffer]]. - 1. Let _srcRecord_ be MakeTypedArrayWithBufferWitnessRecord(_source_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_srcRecord_) is *true*, throw a *TypeError* exception. + 1. Let _srcRecord_ be ? ValidateTypedArray(_source_, ~seq-cst~). 1. Let _srcLength_ be TypedArrayLength(_srcRecord_). 1. Let _targetType_ be TypedArrayElementType(_target_). 1. Let _targetElementSize_ be TypedArrayElementSize(_target_). @@ -42288,8 +42282,7 @@

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

1. Let _countBytes_ be max(_endIndex_ - _startIndex_, 0). 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_countBytes_) »). 1. If _countBytes_ > 0, then - 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Set _taRecord_ to ? ValidateTypedArray(_O_, ~seq-cst~). 1. Set _endIndex_ to min(_endIndex_, TypedArrayLength(_taRecord_)). 1. Set _countBytes_ to max(_endIndex_ - _startIndex_, 0). 1. Let _srcType_ be TypedArrayElementType(_O_). @@ -42745,8 +42738,7 @@

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

1. If IsUnclampedIntegerElementType(_type_) is *true*, return *true*. - 1. If IsBigIntElementType(_type_) is *true* and _order_ is neither ~init~ nor ~unordered~, return *true*. + 1. If IsBigIntElementType(_type_) is *true* and _order_ is ~seq-cst~, return *true*. 1. Return *false*. @@ -45897,13 +45889,12 @@

- 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. Let _taRecord_ be ? ValidateTypedArray(_typedArray_, ~unordered~). 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. Let _type_ be TypedArrayElementType(_typedArray_). + 1. If IsNoTearConfiguration(_type_, ~seq-cst~) is *false*, throw a *TypeError* exception. 1. Return _taRecord_. @@ -45956,9 +45947,8 @@

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 _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 IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. + 1. Let _taRecord_ be ? ValidateTypedArray(_typedArray_, ~unordered~). 1. Assert: _byteIndexInBuffer_ ≥ _typedArray_.[[ByteOffset]]. 1. If _byteIndexInBuffer_ ≥ _taRecord_.[[CachedBufferByteLength]], throw a *RangeError* exception. 1. Return ~unused~.