From 5352df804290d9646b3f400b68697c03f2063072 Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Fri, 15 Sep 2023 16:07:53 -0700 Subject: [PATCH] Kebab-case enums --- spec.html | 144 +++++++++++++++++++++++++++--------------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/spec.html b/spec.html index 0ad352b8ad5..c44f552a322 100644 --- a/spec.html +++ b/spec.html @@ -14622,7 +14622,7 @@

[[OwnPropertyKeys]] ( ): a normal completion containing a List of property k
an Integer-Indexed exotic object _O_
- 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~SeqCst~). + 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Let _keys_ be a new empty List. 1. If _length_ is not ~out-of-bounds~, then @@ -14683,7 +14683,7 @@

Integer-Indexed Object With Buffer Witness Records

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

@@ -14802,7 +14802,7 @@

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 _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _O_'s backing buffer is a growable SharedArrayBuffer. 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). 1. If _length_ is ~out-of-bounds~, return *false*. @@ -14868,9 +14868,9 @@

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

1. Let _index_ be 0. 1. Repeat, 1. If _array_ has a [[TypedArrayName]] internal slot, then - 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_array_, ~SeqCst~). + 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_array_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. If _len_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Else, @@ -40375,7 +40375,7 @@

Properties of the %TypedArray% Prototype Object

%TypedArray%.prototype.at ( _index_ )

1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). @@ -40407,7 +40407,7 @@

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_, ~SeqCst~). + 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Let _size_ be IntegerIndexedObjectByteLength(_iieoRecord_). 1. Return 𝔽(_size_).
@@ -40420,7 +40420,7 @@

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_, ~SeqCst~). + 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. If IsIntegerIndexedObjectOutOfBounds(_iieoRecord_) is *true*, return *+0*𝔽. 1. Let _offset_ be _O_.[[ByteOffset]]. 1. Return 𝔽(_offset_). @@ -40438,7 +40438,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _relativeTarget_ be ? ToIntegerOrInfinity(_target_). @@ -40457,7 +40457,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 _iieoRecord_ to MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~SeqCst~). + 1. Set _iieoRecord_ to MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Set _len_ to IntegerIndexedObjectLength(_iieoRecord_). 1. If _len_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Let _elementSize_ be TypedArrayElementSize(_O_). @@ -40488,7 +40488,7 @@

%TypedArray%.prototype.entries ( )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Perform ? ValidateTypedArray(_O_, ~SeqCst~). + 1. Perform ? ValidateTypedArray(_O_, ~seq-cst~). 1. Return CreateArrayIterator(_O_, ~key+value~). @@ -40499,7 +40499,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. @@ -40521,7 +40521,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If _O_.[[ContentType]] is ~bigint~, set _value_ to ? ToBigInt(_value_). @@ -40534,7 +40534,7 @@

%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_, ~SeqCst~). + 1. Set _iieoRecord_ to MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Set _len_ to IntegerIndexedObjectLength(_iieoRecord_). 1. If _len_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Set _final_ to min(_final_, _len_). @@ -40552,7 +40552,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. @@ -40583,7 +40583,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~ascending~, _predicate_, _thisArg_). @@ -40598,7 +40598,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~ascending~, _predicate_, _thisArg_). @@ -40613,7 +40613,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~descending~, _predicate_, _thisArg_). @@ -40628,7 +40628,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~descending~, _predicate_, _thisArg_). @@ -40643,7 +40643,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. @@ -40664,7 +40664,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If _len_ = 0, return *false*. @@ -40692,7 +40692,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If _len_ = 0, return *-1*𝔽. @@ -40722,7 +40722,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If _separator_ is *undefined*, let _sep_ be *","*. @@ -40745,7 +40745,7 @@

%TypedArray%.prototype.keys ( )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Perform ? ValidateTypedArray(_O_, ~SeqCst~). + 1. Perform ? ValidateTypedArray(_O_, ~seq-cst~). 1. Return CreateArrayIterator(_O_, ~key~). @@ -40756,7 +40756,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If _len_ = 0, return *-1*𝔽. @@ -40784,7 +40784,7 @@

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_, ~SeqCst~). + 1. Let _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). 1. If _length_ is ~out-of-bounds~, return *+0*𝔽. 1. Return 𝔽(_length_). @@ -40798,7 +40798,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. @@ -40821,7 +40821,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. @@ -40850,7 +40850,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. @@ -40879,7 +40879,7 @@

%TypedArray%.prototype.reverse ( )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _middle_ be floor(_len_ / 2). @@ -40930,11 +40930,11 @@

1. Let _targetBuffer_ be _target_.[[ViewedArrayBuffer]]. - 1. Let _targetRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_target_, ~SeqCst~). + 1. Let _targetRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_target_, ~seq-cst~). 1. Let _targetLength_ be IntegerIndexedObjectLength(_targetRecord_). 1. If _targetLength_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Let _srcBuffer_ be _source_.[[ViewedArrayBuffer]]. - 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_source_, ~SeqCst~). + 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_source_, ~seq-cst~). 1. Let _srcLength_ be IntegerIndexedObjectLength(_srcRecord_). 1. If _srcLength_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Let _targetType_ be TypedArrayElementType(_target_). @@ -40985,7 +40985,7 @@

It sets multiple values in _target_, starting at index _targetOffset_, reading the values from _source_.
- 1. Let _targetRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_target_, ~SeqCst~). + 1. Let _targetRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_target_, ~seq-cst~). 1. Let _targetLength_ be IntegerIndexedObjectLength(_targetRecord_). 1. If _targetLength_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Let _src_ be ? ToObject(_source_). @@ -41010,7 +41010,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). @@ -41024,7 +41024,7 @@

%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_, ~SeqCst~). + 1. Set _iieoRecord_ to MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Set _len_ to IntegerIndexedObjectLength(_iieoRecord_). 1. If _len_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Set _final_ to min(_final_, _len_). @@ -41063,7 +41063,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. @@ -41087,7 +41087,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. NOTE: The following closure performs a numeric comparison rather than the string comparison used in . @@ -41114,7 +41114,7 @@

%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_, ~SeqCst~). + 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Let _srcLength_ be IntegerIndexedObjectLength(_srcRecord_). 1. If _srcLength_ is ~out-of-bounds~, set _srcLength_ to 0. 1. Let _relativeBegin_ be ? ToIntegerOrInfinity(_begin_). @@ -41144,7 +41144,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 method is not generic. ValidateTypedArray is called with the *this* value and ~SeqCst~ as arguments prior to evaluating the algorithm. If its result is an abrupt completion that exception is thrown instead of evaluating 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.

@@ -41155,7 +41155,7 @@

%TypedArray%.prototype.toReversed ( )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _length_ is not ~out-of-bounds~. 1. Let _A_ be ? TypedArrayCreateSameType(_O_, « 𝔽(_length_) »). @@ -41176,7 +41176,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _A_ be ? TypedArrayCreateSameType(_O_, « 𝔽(_len_) »). @@ -41202,7 +41202,7 @@

%TypedArray%.prototype.values ( )

This method performs the following steps when called:

1. Let _O_ be the *this* value. - 1. Perform ? ValidateTypedArray(_O_, ~SeqCst~). + 1. Perform ? ValidateTypedArray(_O_, ~seq-cst~). 1. Return CreateArrayIterator(_O_, ~value~).
@@ -41212,7 +41212,7 @@

%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_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be IntegerIndexedObjectLength(_iieoRecord_). 1. Assert: _len_ is not ~out-of-bounds~. 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). @@ -41291,7 +41291,7 @@

1. Let _newTypedArray_ be ? Construct(_constructor_, _argumentList_). - 1. Let _iieoRecord_ be ? ValidateTypedArray(_newTypedArray_, ~SeqCst~). + 1. Let _iieoRecord_ be ? ValidateTypedArray(_newTypedArray_, ~seq-cst~). 1. If the number of elements in _argumentList_ is 1 and _argumentList_[0] is a Number, then 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). 1. If _length_ is ~out-of-bounds~ or _length_ < ℝ(_argumentList_[0]), throw a *TypeError* exception. @@ -41323,7 +41323,7 @@

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

@@ -41486,7 +41486,7 @@

1. Let _srcType_ be TypedArrayElementType(_srcArray_). 1. Let _srcElementSize_ be TypedArrayElementSize(_srcArray_). 1. Let _srcByteOffset_ be _srcArray_.[[ByteOffset]]. - 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_srcArray_, ~SeqCst~). + 1. Let _srcRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_srcArray_, ~seq-cst~). 1. Let _elementLength_ be IntegerIndexedObjectLength(_srcRecord_). 1. If _elementLength_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Let _byteLength_ be _elementSize_ × _elementLength_. @@ -41531,7 +41531,7 @@

1. If _length_ is not *undefined*, then 1. Let _newLength_ be ? ToIndex(_length_). 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. - 1. Let _bufferByteLength_ be ArrayBufferByteLength(_buffer_, ~SeqCst~). + 1. Let _bufferByteLength_ be ArrayBufferByteLength(_buffer_, ~seq-cst~). 1. If _length_ is *undefined* and _bufferIsFixedLength_ is *false*, then 1. If _offset_ > _bufferByteLength_, throw a *RangeError* exception. 1. Set _O_.[[ByteLength]] to ~auto~. @@ -42645,7 +42645,7 @@

ArrayBufferByteLength ( _arrayBuffer_: an ArrayBuffer or SharedArrayBuffer, - _order_: ~SeqCst~ or ~Unordered~, + _order_: ~seq-cst~ or ~unordered~, ): a non-negative integer

@@ -42653,9 +42653,9 @@

1. If IsSharedArrayBuffer(_arrayBuffer_) is *true* and _arrayBuffer_ has an [[ArrayBufferByteLengthData]] internal slot, then 1. Let _bufferByteLengthBlock_ be _arrayBuffer_.[[ArrayBufferByteLengthData]]. - 1. Let _rawLength_ be GetRawBytesFromSharedBlock(_bufferByteLengthBlock_, 0, ~BigUint64~, *true*, _order_). + 1. Let _rawLength_ be GetRawBytesFromSharedBlock(_bufferByteLengthBlock_, 0, ~biguint64~, *true*, _order_). 1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. - 1. Return ℝ(RawBytesToNumeric(~BigUint64~, _rawLength_, _isLittleEndian_)). + 1. Return ℝ(RawBytesToNumeric(~biguint64~, _rawLength_, _isLittleEndian_)). 1. Assert: IsDetachedBuffer(_arrayBuffer_) is *false*. 1. Return _arrayBuffer_.[[ArrayBufferByteLength]]. @@ -42871,7 +42871,7 @@

_byteIndex_: a non-negative integer, _type_: a TypedArray element type, _isTypedArray_: a Boolean, - _order_: ~seqcst~ or ~Unordered~, + _order_: ~seq-cst~ or ~unordered~, ): a List of byte values

@@ -43265,7 +43265,7 @@

1. If _allocatingGrowableBuffer_ is *true*, then 1. Assert: _byteLength_ ≤ _maxByteLength_. 1. Let _byteLengthBlock_ be ? CreateSharedByteDataBlock(8). - 1. Perform SetValueInBuffer(_byteLengthBlock_, 0, ~BigUint64~, ℤ(_byteLength_), *true*, ~SeqCst~). + 1. Perform SetValueInBuffer(_byteLengthBlock_, 0, ~biguint64~, ℤ(_byteLength_), *true*, ~seq-cst~). 1. Set _obj_.[[ArrayBufferByteLengthData]] to _byteLengthBlock_. 1. Set _obj_.[[ArrayBufferMaxByteLength]] to _maxByteLength_. 1. Else, @@ -43307,7 +43307,7 @@

The implementation of HostGrowSharedArrayBuffer must conform to the following requirements:

  • If the abstract operation does not complete normally with ~unhandled~, and _newByteLength_ < the current byte length of the _buffer_ or _newByteLength_ > _buffer_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception.
  • -
  • Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. If the abstract operation completes normally with ~handled~, a WriteSharedMemory or ReadModifyWriteSharedMemory event whose [[Order]] is ~SeqCst~, [[Payload]] is NumericToRawBytes(~BigUint64~, _newByteLength_, _isLittleEndian_), [[Block]] is _buffer_.[[ArrayBufferByteLengthData]], [[ByteIndex]] is 0, and [[ElementSize]] is 8 is added to the surrounding agent's candidate execution such that racing calls to `SharedArrayBuffer.prototype.grow` are not "lost", i.e. silently do nothing.
  • +
  • Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. If the abstract operation completes normally with ~handled~, a WriteSharedMemory or ReadModifyWriteSharedMemory event whose [[Order]] is ~seq-cst~, [[Payload]] is NumericToRawBytes(~biguint64~, _newByteLength_, _isLittleEndian_), [[Block]] is _buffer_.[[ArrayBufferByteLengthData]], [[ByteIndex]] is 0, and [[ElementSize]] is 8 is added to the surrounding agent's candidate execution such that racing calls to `SharedArrayBuffer.prototype.grow` are not "lost", i.e. silently do nothing.
@@ -43389,7 +43389,7 @@

get SharedArrayBuffer.prototype.byteLength

1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception. - 1. Let _length_ be ArrayBufferByteLength(_O_, ~SeqCst~). + 1. Let _length_ be ArrayBufferByteLength(_O_, ~seq-cst~). 1. Return 𝔽(_length_). @@ -43411,10 +43411,10 @@

SharedArrayBuffer.prototype.grow ( _newLength_ )

1. If _hostHandled_ is ~handled~, return *undefined*. 1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. 1. Let _byteLengthBlock_ be _O_.[[ArrayBufferByteLengthData]]. - 1. Let _currentByteLengthRawBytes_ be GetRawBytesFromSharedBlock(_byteLengthBlock_, 0, ~BigUint64~, *true*, ~SeqCst~). - 1. Let _newByteLengthRawBytes_ be NumericToRawBytes(~BigUint64~, ℤ(_newByteLength_), _isLittleEndian_). + 1. Let _currentByteLengthRawBytes_ be GetRawBytesFromSharedBlock(_byteLengthBlock_, 0, ~biguint64~, *true*, ~seq-cst~). + 1. Let _newByteLengthRawBytes_ be NumericToRawBytes(~biguint64~, ℤ(_newByteLength_), _isLittleEndian_). 1. Repeat, - 1. Let _currentByteLength_ be ℝ(RawBytesToNumeric(~BigUint64~, _currentByteLengthRawBytes_, _isLittleEndian_)). + 1. Let _currentByteLength_ be ℝ(RawBytesToNumeric(~biguint64~, _currentByteLengthRawBytes_, _isLittleEndian_)). 1. If _newByteLength_ = _currentByteLength_, return *undefined*. 1. If _newByteLength_ < _currentByteLength_ or _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception. 1. Let _byteLengthDelta_ be _newByteLength_ - _currentByteLength_. @@ -43463,7 +43463,7 @@

SharedArrayBuffer.prototype.slice ( _start_, _end_ )

1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception. - 1. Let _len_ be ArrayBufferByteLength(_O_, ~SeqCst~). + 1. Let _len_ be ArrayBufferByteLength(_O_, ~seq-cst~). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _first_ be 0. 1. Else if _relativeStart_ < 0, let _first_ be max(_len_ + _relativeStart_, 0). @@ -43478,7 +43478,7 @@

SharedArrayBuffer.prototype.slice ( _start_, _end_ )

1. Perform ? RequireInternalSlot(_new_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_new_) is *false*, throw a *TypeError* exception. 1. If _new_.[[ArrayBufferData]] is _O_.[[ArrayBufferData]], throw a *TypeError* exception. - 1. If ArrayBufferByteLength(_new_, ~SeqCst~) < _newLen_, throw a *TypeError* exception. + 1. If ArrayBufferByteLength(_new_, ~seq-cst~) < _newLen_, throw a *TypeError* exception. 1. Let _fromBuf_ be _O_.[[ArrayBufferData]]. 1. Let _toBuf_ be _new_.[[ArrayBufferData]]. 1. Perform CopyDataBlockBytes(_toBuf_, 0, _fromBuf_, _first_, _newLen_). @@ -43509,7 +43509,7 @@

Growable SharedArrayBuffer Guidelines

We recommend that programs be tested in their deployment environments where possible. The amount of available physical memory differ greatly between hardware devices. Similarly, virtual memory subsystems also differ greatly between hardware devices as well as operating systems. An application that runs without out-of-memory errors on a 64-bit desktop web browser could run out of memory on a 32-bit mobile web browser.

When choosing a value for the *"maxByteLength"* option for growable SharedArrayBuffer, we recommend that the smallest possible size for the application be chosen. We recommend that *"maxByteLength"* does not exceed 1073741824, or 1GiB.

Please note that successfully constructing a growable SharedArrayBuffer for a particular maximum size does not guarantee that future grows will succeed.

-

Not all loads of a growable SharedArrayBuffer's length are synchronizing ~SeqCst~ loads. Loads of the length that are for bounds-checking of an integer-indexed property access, e.g. `u8[idx]`, are not synchronizing. In general, in the absence of explicit synchronization, one property access being in-bound does not imply a subsequent property access in the same agent is also in-bound. In contrast, explicit loads of the length via the `length` and `byteLength` getters on SharedArrayBuffer, %TypedArray%.prototype, and DataView.prototype are synchronizing. Loads of the length that are performed by built-in methods to check if a TypedArray is entirely out-of-bounds are also synchronizing.

+

Not all loads of a growable SharedArrayBuffer's length are synchronizing ~seq-cst~ loads. Loads of the length that are for bounds-checking of an integer-indexed property access, e.g. `u8[idx]`, are not synchronizing. In general, in the absence of explicit synchronization, one property access being in-bound does not imply a subsequent property access in the same agent is also in-bound. In contrast, explicit loads of the length via the `length` and `byteLength` getters on SharedArrayBuffer, %TypedArray%.prototype, and DataView.prototype are synchronizing. Loads of the length that are performed by built-in methods to check if a TypedArray is entirely out-of-bounds are also synchronizing.

@@ -43576,7 +43576,7 @@

DataView With Buffer Witness Records

MakeDataViewWithBufferWitnessRecord ( _obj_: a DataView, - _order_: ~SeqCst~ or ~Unordered~, + _order_: ~seq-cst~ or ~unordered~, ): a DataView With Buffer Witness Record

@@ -43654,7 +43654,7 @@

1. Let _getIndex_ be ? ToIndex(_requestIndex_). 1. Set _isLittleEndian_ to ToBoolean(_isLittleEndian_). 1. Let _viewOffset_ be _view_.[[ByteOffset]]. - 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_view_, ~Unordered~). + 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_view_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _view_'s backing buffer is a growable SharedArrayBuffer. 1. Let _viewSize_ be GetViewByteLength(_viewRecord_). 1. If _viewSize_ is ~out-of-bounds~, throw a *TypeError* exception. @@ -43687,7 +43687,7 @@

1. Otherwise, let _numberValue_ be ? ToNumber(_value_). 1. Set _isLittleEndian_ to ToBoolean(_isLittleEndian_). 1. Let _viewOffset_ be _view_.[[ByteOffset]]. - 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_view_, ~Unordered~). + 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_view_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _view_'s backing buffer is a growable SharedArrayBuffer. 1. Let _viewSize_ be GetViewByteLength(_viewRecord_). 1. If _viewSize_ is ~out-of-bounds~, throw a *TypeError* exception. @@ -43719,7 +43719,7 @@

DataView ( _buffer_ [ , _byteOffset_ [ , _byteLength_ ] ] )

1. Perform ? RequireInternalSlot(_buffer_, [[ArrayBufferData]]). 1. Let _offset_ be ? ToIndex(_byteOffset_). 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. - 1. Let _bufferByteLength_ be ArrayBufferByteLength(_buffer_, ~SeqCst~). + 1. Let _bufferByteLength_ be ArrayBufferByteLength(_buffer_, ~seq-cst~). 1. If _offset_ > _bufferByteLength_, throw a *RangeError* exception. 1. Let _bufferIsFixedLength_ be IsFixedLengthArrayBuffer(_buffer_). 1. If _byteLength_ is *undefined*, then @@ -43732,7 +43732,7 @@

DataView ( _buffer_ [ , _byteOffset_ [ , _byteLength_ ] ] )

1. If _offset_ + _viewByteLength_ > _bufferByteLength_, throw a *RangeError* exception. 1. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%DataView.prototype%"*, « [[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]] »). 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. - 1. Set _bufferByteLength_ to ArrayBufferByteLength(_buffer_, ~SeqCst~). + 1. Set _bufferByteLength_ to ArrayBufferByteLength(_buffer_, ~seq-cst~). 1. If _offset_ > _bufferByteLength_, throw a *RangeError* exception. 1. If _byteLength_ is not *undefined*, then 1. If _offset_ + _viewByteLength_ > _bufferByteLength_, throw a *RangeError* exception. @@ -43788,7 +43788,7 @@

get DataView.prototype.byteLength

1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[DataView]]). 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_O_, ~SeqCst~). + 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_O_, ~seq-cst~). 1. Let _size_ be GetViewByteLength(_viewRecord_). 1. If _size_ is ~out-of-bounds~, throw a *TypeError* exception. 1. Return 𝔽(_size_). @@ -43802,7 +43802,7 @@

get DataView.prototype.byteOffset

1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[DataView]]). 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_O_, ~SeqCst~). + 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_O_, ~seq-cst~). 1. If IsViewOutOfBounds(_viewRecord_) is *true*, throw a *TypeError* exception. 1. Let _offset_ be _O_.[[ByteOffset]]. 1. Return 𝔽(_offset_). @@ -44162,7 +44162,7 @@

- 1. Let _iieoRecord_ be ? ValidateTypedArray(_typedArray_, ~Unordered~). + 1. Let _iieoRecord_ 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. @@ -44224,7 +44224,7 @@

This operation revalidates the index for atomic operations after all argument coercions are performed in Atomics methods, 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 _iieoRecord_ be MakeIntegerIndexedObjectWithBufferWitnessRecord(_typedArray_, ~unordered~). 1. NOTE: Bounds checking is not a synchronizing operation when _typedArray_'s backing buffer is a growable SharedArrayBuffer. 1. Let _length_ be IntegerIndexedObjectLength(_iieoRecord_). 1. If _length_ is ~out-of-bounds~, throw a *TypeError* exception. @@ -44532,9 +44532,9 @@

1. If ByteListEqual(_rawBytesRead_, _expectedBytes_) is *true*, then 1. Let _second_ be a new read-modify-write modification function with parameters (_oldBytes_, _newBytes_) that captures nothing and performs the following steps atomically when called: 1. Return _newBytes_. - 1. Let _event_ be ReadModifyWriteSharedMemory { [[Order]]: ~SeqCst~, [[NoTear]]: *true*, [[Block]]: _block_, [[ByteIndex]]: _indexedPosition_, [[ElementSize]]: _elementSize_, [[Payload]]: _replacementBytes_, [[ModifyOp]]: _second_ }. + 1. Let _event_ be ReadModifyWriteSharedMemory { [[Order]]: ~seq-cst~, [[NoTear]]: *true*, [[Block]]: _block_, [[ByteIndex]]: _indexedPosition_, [[ElementSize]]: _elementSize_, [[Payload]]: _replacementBytes_, [[ModifyOp]]: _second_ }. 1. Else, - 1. Let _event_ be ReadSharedMemory { [[Order]]: ~SeqCst~, [[NoTear]]: *true*, [[Block]]: _block_, [[ByteIndex]]: _indexedPosition_, [[ElementSize]]: _elementSize_ }. + 1. Let _event_ be ReadSharedMemory { [[Order]]: ~seq-cst~, [[NoTear]]: *true*, [[Block]]: _block_, [[ByteIndex]]: _indexedPosition_, [[ElementSize]]: _elementSize_ }. 1. Append _event_ to _eventsRecord_.[[EventList]]. 1. Append Chosen Value Record { [[Event]]: _event_, [[ChosenValue]]: _rawBytesRead_ } to _execution_.[[ChosenValues]]. 1. Return _rawBytesRead_.