diff --git a/spec.html b/spec.html index f26efd97b3..e2e379546d 100644 --- a/spec.html +++ b/spec.html @@ -1285,7 +1285,7 @@

The String Type

The rationale behind this design was to keep the implementation of Strings as simple and high-performing as possible. If ECMAScript source text is in Normalized Form C, string literals are guaranteed to also be normalized, as long as they do not contain any Unicode escape sequences.

In this specification, the phrase "the string-concatenation of _A_, _B_, ..." (where each argument is a String value, a code unit, or a sequence of code units) denotes the String value whose sequence of code units is the concatenation of the code units (in order) of each of the arguments (in order).

-

The phrase "the substring of _str_ from _inclusiveStart_ to _exclusiveEnd_" (where _str_ is a String value or a sequence of code units and _inclusiveStart_ and _exclusiveEnd_ are integers) denotes the String value consisting of the consecutive code units of _str_ beginning at index _inclusiveStart_ and ending immediately before index _exclusiveEnd_ (which is the empty String when _inclusiveStart_ = _exclusiveEnd_). If the "to" suffix is omitted, the length of _str_ is used as the value of _exclusiveEnd_.

+

The phrase "the substring of _string_ from _inclusiveStart_ to _exclusiveEnd_" (where _string_ is a String value or a sequence of code units and _inclusiveStart_ and _exclusiveEnd_ are integers) denotes the String value consisting of the consecutive code units of _string_ beginning at index _inclusiveStart_ and ending immediately before index _exclusiveEnd_ (which is the empty String when _inclusiveStart_ = _exclusiveEnd_). If the "to" suffix is omitted, the length of _string_ is used as the value of _exclusiveEnd_.

The phrase "the ASCII word characters" denotes the following String value, which consists solely of every letter and number in the Unicode Basic Latin block along with U+005F (LOW LINE):
*"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"*.
@@ -1303,11 +1303,11 @@

- 1. Let _len_ be the length of _string_. - 1. If _searchValue_ is the empty String and _fromIndex_ ≤ _len_, return _fromIndex_. - 1. Let _searchLen_ be the length of _searchValue_. - 1. For each integer _i_ such that _fromIndex_ ≤ _i_ ≤ _len_ - _searchLen_, in ascending order, do - 1. Let _candidate_ be the substring of _string_ from _i_ to _i_ + _searchLen_. + 1. Let _length_ be the length of _string_. + 1. If _searchValue_ is the empty String and _fromIndex_ ≤ _length_, return _fromIndex_. + 1. Let _searchLength_ be the length of _searchValue_. + 1. For each integer _i_ such that _fromIndex_ ≤ _i_ ≤ _length_ - _searchLength_, in ascending order, do + 1. Let _candidate_ be the substring of _string_ from _i_ to _i_ + _searchLength_. 1. If _candidate_ is _searchValue_, return _i_. 1. Return ~not-found~. @@ -1330,11 +1330,11 @@

- 1. Let _len_ be the length of _string_. - 1. Let _searchLen_ be the length of _searchValue_. - 1. Assert: _fromIndex_ + _searchLen_ ≤ _len_. + 1. Let _length_ be the length of _string_. + 1. Let _searchLength_ be the length of _searchValue_. + 1. Assert: _fromIndex_ + _searchLength_ ≤ _length_. 1. For each integer _i_ such that 0 ≤ _i_ ≤ _fromIndex_, in descending order, do - 1. Let _candidate_ be the substring of _string_ from _i_ to _i_ + _searchLen_. + 1. Let _candidate_ be the substring of _string_ from _i_ to _i_ + _searchLength_. 1. If _candidate_ is _searchValue_, return _i_. 1. Return ~not-found~. @@ -2005,27 +2005,27 @@

The Number Type

Number::unaryMinus ( - _x_: a Number, + _number_: a Number, ): a Number

- 1. If _x_ is *NaN*, return *NaN*. - 1. Return the negation of _x_; that is, compute a Number with the same magnitude but opposite sign. + 1. If _number_ is *NaN*, return *NaN*. + 1. Return the negation of _number_; that is, compute a Number with the same magnitude but opposite sign.

Number::bitwiseNOT ( - _x_: a Number, + _number_: a Number, ): an integral Number

- 1. Let _oldValue_ be ! ToInt32(_x_). + 1. Let _oldValue_ be ! ToInt32(_number_). 1. Return the bitwise complement of _oldValue_. The mathematical value of the result is exactly representable as a 32-bit two's complement bit string.
@@ -2155,26 +2155,26 @@

Number::remainder ( - _n_: a Number, - _d_: a Number, + _numerator_: a Number, + _denominator_: a Number, ): a Number

description
-
It yields the remainder from an implied division of its operands where _n_ is the dividend and _d_ is the divisor.
+
It yields the remainder from an implied division of its operands where _numerator_ is the dividend and _denominator_ is the divisor.
- 1. If _n_ is *NaN* or _d_ is *NaN*, return *NaN*. - 1. If _n_ is either *+∞*𝔽 or *-∞*𝔽, return *NaN*. - 1. If _d_ is either *+∞*𝔽 or *-∞*𝔽, return _n_. - 1. If _d_ is either *+0*𝔽 or *-0*𝔽, return *NaN*. - 1. If _n_ is either *+0*𝔽 or *-0*𝔽, return _n_. - 1. Assert: _n_ and _d_ are finite and non-zero. - 1. Let _quotient_ be ℝ(_n_) / ℝ(_d_). - 1. Let _q_ be truncate(_quotient_). - 1. Let _r_ be ℝ(_n_) - (ℝ(_d_) × _q_). - 1. If _r_ = 0 and _n_ < *-0*𝔽, return *-0*𝔽. - 1. Return 𝔽(_r_). + 1. If _numerator_ is *NaN* or _denominator_ is *NaN*, return *NaN*. + 1. If _numerator_ is either *+∞*𝔽 or *-∞*𝔽, return *NaN*. + 1. If _denominator_ is either *+∞*𝔽 or *-∞*𝔽, return _numerator_. + 1. If _denominator_ is either *+0*𝔽 or *-0*𝔽, return *NaN*. + 1. If _numerator_ is either *+0*𝔽 or *-0*𝔽, return _numerator_. + 1. Assert: _numerator_ and _denominator_ are finite and non-zero. + 1. Let _quotient_ be ℝ(_numerator_) / ℝ(_denominator_). + 1. Let _truncatedQuotient_ be truncate(_quotient_). + 1. Let _remainder_ be ℝ(_numerator_) - (ℝ(_denominator_) × _truncatedQuotient_). + 1. If _remainder_ = 0 and _numerator_ < *-0*𝔽, return *-0*𝔽. + 1. Return 𝔽(_remainder_).

In C and C++, the remainder operator accepts only integral operands; in ECMAScript, it also accepts floating-point operands.

@@ -2237,10 +2237,10 @@

- 1. Let _lNum_ be ! ToInt32(_x_). - 1. Let _rNum_ be ! ToUint32(_y_). - 1. Let _shiftCount_ be ℝ(_rNum_) modulo 32. - 1. Return the result of left shifting _lNum_ by _shiftCount_ bits. The mathematical value of the result is exactly representable as a 32-bit two's complement bit string. + 1. Let _leftNumber_ be ! ToInt32(_x_). + 1. Let _rightNumber_ be ! ToUint32(_y_). + 1. Let _shiftCount_ be ℝ(_rightNumber_) modulo 32. + 1. Return the result of left shifting _leftNumber_ by _shiftCount_ bits. The mathematical value of the result is exactly representable as a 32-bit two's complement bit string. @@ -2254,10 +2254,10 @@

- 1. Let _lNum_ be ! ToInt32(_x_). - 1. Let _rNum_ be ! ToUint32(_y_). - 1. Let _shiftCount_ be ℝ(_rNum_) modulo 32. - 1. Return the result of performing a sign-extending right shift of _lNum_ by _shiftCount_ bits. The most significant bit is propagated. The mathematical value of the result is exactly representable as a 32-bit two's complement bit string. + 1. Let _leftNumber_ be ! ToInt32(_x_). + 1. Let _rightNumber_ be ! ToUint32(_y_). + 1. Let _shiftCount_ be ℝ(_rightNumber_) modulo 32. + 1. Return the result of performing a sign-extending right shift of _leftNumber_ by _shiftCount_ bits. The most significant bit is propagated. The mathematical value of the result is exactly representable as a 32-bit two's complement bit string. @@ -2271,10 +2271,10 @@

- 1. Let _lNum_ be ! ToUint32(_x_). - 1. Let _rNum_ be ! ToUint32(_y_). - 1. Let _shiftCount_ be ℝ(_rNum_) modulo 32. - 1. Return the result of performing a zero-filling right shift of _lNum_ by _shiftCount_ bits. Vacated bits are filled with zero. The mathematical value of the result is exactly representable as a 32-bit unsigned bit string. + 1. Let _leftNumber_ be ! ToUint32(_x_). + 1. Let _rightNumber_ be ! ToUint32(_y_). + 1. Let _shiftCount_ be ℝ(_rightNumber_) modulo 32. + 1. Return the result of performing a zero-filling right shift of _leftNumber_ by _shiftCount_ bits. Vacated bits are filled with zero. The mathematical value of the result is exactly representable as a 32-bit unsigned bit string. @@ -2369,17 +2369,17 @@

- 1. Let _lNum_ be ! ToInt32(_x_). - 1. Let _rNum_ be ! ToInt32(_y_). - 1. Let _lBits_ be the 32-bit two's complement bit string representing ℝ(_lNum_). - 1. Let _rBits_ be the 32-bit two's complement bit string representing ℝ(_rNum_). + 1. Let _leftNumber_ be ! ToInt32(_x_). + 1. Let _rightNumber_ be ! ToInt32(_y_). + 1. Let _leftBits_ be the 32-bit two's complement bit string representing ℝ(_leftNumber_). + 1. Let _rightBits_ be the 32-bit two's complement bit string representing ℝ(_rightNumber_). 1. If _op_ is `&`, then - 1. Let _result_ be the result of applying the bitwise AND operation to _lBits_ and _rBits_. + 1. Let _result_ be the result of applying the bitwise AND operation to _leftBits_ and _rightBits_. 1. Else if _op_ is `^`, then - 1. Let _result_ be the result of applying the bitwise exclusive OR (XOR) operation to _lBits_ and _rBits_. + 1. Let _result_ be the result of applying the bitwise exclusive OR (XOR) operation to _leftBits_ and _rightBits_. 1. Else, 1. Assert: _op_ is `|`. - 1. Let _result_ be the result of applying the bitwise inclusive OR operation to _lBits_ and _rBits_. + 1. Let _result_ be the result of applying the bitwise inclusive OR operation to _leftBits_ and _rightBits_. 1. Return the Number value for the integer represented by the 32-bit two's complement bit string _result_. @@ -2515,29 +2515,29 @@

The BigInt Type

BigInt::unaryMinus ( - _x_: a BigInt, + _bigint_: a BigInt, ): a BigInt

- 1. If _x_ = *0*, return *0*. - 1. Return -_x_. + 1. If _bigint_ = *0*, return *0*. + 1. Return -_bigint_.

BigInt::bitwiseNOT ( - _x_: a BigInt, + _bigint_: a BigInt, ): a BigInt

description
-
It returns the one's complement of _x_.
+
It returns the one's complement of _bigint_.
- 1. Return -_x_ - *1*. + 1. Return -_bigint_ - *1*.
@@ -2591,18 +2591,18 @@

BigInt::remainder ( - _n_: a BigInt, - _d_: a BigInt, + _numerator_: a BigInt, + _denominator_: a BigInt, ): either a normal completion containing a BigInt or a throw completion

- 1. If _d_ = *0*, throw a *RangeError* exception. - 1. If _n_ = *0*, return *0*. - 1. Let _quotient_ be ℝ(_n_) / ℝ(_d_). - 1. Let _q_ be ℤ(truncate(_quotient_)). - 1. Return _n_ - (_d_ × _q_). + 1. If _denominator_ = *0*, throw a *RangeError* exception. + 1. If _numerator_ = *0*, return *0*. + 1. Let _quotient_ be ℝ(_numerator_) / ℝ(_denominator_). + 1. Let _truncatedQuotient_ be ℤ(truncate(_quotient_)). + 1. Return _numerator_ - (_denominator_ × _truncatedQuotient_). The sign of the result is the sign of the dividend.
@@ -3099,10 +3099,10 @@

Object Internal Methods and Internal Slots

[[DefineOwnProperty]] - (_propertyKey_, _propertyDescriptor_) Boolean + (_propertyKey_, _propertyDesc_) Boolean - Create or alter the own property, whose key is _propertyKey_, to have the state described by _propertyDescriptor_. Return *true* if that property was successfully created/updated or *false* if the property could not be created or updated. + Create or alter the own property, whose key is _propertyKey_, to have the state described by _propertyDesc_. Return *true* if that property was successfully created/updated or *false* if the property could not be created or updated. @@ -3297,7 +3297,7 @@

[[GetOwnProperty]] ( _propertyKey_ )

As a consequence of the third invariant, if a property is described as a data property and it may return different values over time, then either or both of the [[Writable]] and [[Configurable]] attributes must be *true* even if no mechanism to change the value is exposed via the other essential internal methods.

-

[[DefineOwnProperty]] ( _propertyKey_, _desc_ )

+

[[DefineOwnProperty]] ( _propertyKey_, _propertyDesc_ )

  • The normal return type is Boolean. @@ -3309,12 +3309,12 @@

    [[DefineOwnProperty]] ( _propertyKey_, _desc_ )

    _propertyKey_ is a writable data property. A non-configurable writable data property can be changed into a non-configurable non-writable data property.
  • - All attributes of _desc_ are the SameValue as _propertyKey_'s attributes. + All attributes of _propertyDesc_ are the SameValue as _propertyKey_'s attributes.
  • - [[DefineOwnProperty]] (_propertyKey_, _desc_) must return *false* if target is non-extensible and _propertyKey_ is a non-existent own property. That is, a non-extensible target object cannot be extended with new properties. + [[DefineOwnProperty]] (_propertyKey_, _propertyDesc_) must return *false* if target is non-extensible and _propertyKey_ is a non-existent own property. That is, a non-extensible target object cannot be extended with new properties.

[[HasProperty]] ( _propertyKey_ )

@@ -4208,7 +4208,7 @@

The Enum Specification Type

The List and Record Specification Types

-

The List type is used to explain the evaluation of argument lists (see ) in `new` expressions, in function calls, and in other algorithms where a simple ordered list of values is needed. Values of the List type are simply ordered sequences of list elements containing the individual values. These sequences may be of any length. The elements of a list may be randomly accessed using 0-origin indices. For notational convenience an array-like syntax can be used to access List elements. For example, _arguments_[2] is shorthand for saying the 3rd element of the List _arguments_.

+

The List type is used to explain the evaluation of argument lists (see ) in `new` expressions, in function calls, and in other algorithms where a simple ordered list of values is needed. Values of the List type are simply ordered sequences of list elements containing the individual values. These sequences may be of any length. The elements of a list may be randomly accessed using 0-origin indices. For notational convenience an array-like syntax can be used to access List elements. For example, _args_[2] is shorthand for saying the 3rd element of the List _args_.

When an algorithm iterates over the elements of a List without specifying an order, the order used is the order of the elements in the List.

For notational convenience within this specification, a literal syntax can be used to express a new List value. For example, « 1, 2 » defines a List value that has two elements each of which is initialized to a specific value. A new empty List can be expressed as « ».

In this specification, the phrase "the list-concatenation of _A_, _B_, ..." (where each argument is a possibly empty List) denotes a new List value whose elements are the concatenation of the elements (in order) of each of the arguments (in order).

@@ -4419,14 +4419,14 @@

The Reference Record Specification Type

IsPropertyReference ( - _referenceRecord_: a Reference Record, + _refRecord_: a Reference Record, ): a Boolean

- 1. If _referenceRecord_.[[Base]] is ~unresolvable~, return *false*. - 1. If _referenceRecord_.[[Base]] is an Environment Record, return *false*. + 1. If _refRecord_.[[Base]] is ~unresolvable~, return *false*. + 1. If _refRecord_.[[Base]] is an Environment Record, return *false*. 1. Return *true*.
@@ -4434,13 +4434,13 @@

IsUnresolvableReference ( - _referenceRecord_: a Reference Record, + _refRecord_: a Reference Record, ): a Boolean

- 1. If _referenceRecord_.[[Base]] is ~unresolvable~, return *true*. + 1. If _refRecord_.[[Base]] is ~unresolvable~, return *true*. 1. Return *false*.
@@ -4448,13 +4448,13 @@

IsSuperReference ( - _referenceRecord_: a Reference Record, + _refRecord_: a Reference Record, ): a Boolean

- 1. If _referenceRecord_.[[ThisValue]] is ~empty~, return *false*. + 1. If _refRecord_.[[ThisValue]] is ~empty~, return *false*. 1. Return *true*.
@@ -4462,13 +4462,13 @@

IsPrivateReference ( - _referenceRecord_: a Reference Record, + _refRecord_: a Reference Record, ): a Boolean

- 1. If _referenceRecord_.[[ReferencedName]] is a Private Name, return *true*. + 1. If _refRecord_.[[ReferencedName]] is a Private Name, return *true*. 1. Return *false*.
@@ -4476,24 +4476,24 @@

GetValue ( - _referenceRecord_: a Reference Record or an ECMAScript language value, + _refRecord_: a Reference Record or an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or an abrupt completion

- 1. If _referenceRecord_ is not a Reference Record, return _referenceRecord_. - 1. If IsUnresolvableReference(_referenceRecord_) is *true*, throw a *ReferenceError* exception. - 1. If IsPropertyReference(_referenceRecord_) is *true*, then - 1. [id="step-getvalue-toobject"] Let _baseObj_ be ? ToObject(_referenceRecord_.[[Base]]). - 1. If IsPrivateReference(_referenceRecord_) is *true*, then - 1. Return ? PrivateGet(_baseObj_, _referenceRecord_.[[ReferencedName]]). - 1. If _referenceRecord_.[[ReferencedName]] is not a property key, then - 1. Set _referenceRecord_.[[ReferencedName]] to ? ToPropertyKey(_referenceRecord_.[[ReferencedName]]). - 1. Return ? _baseObj_.[[Get]](_referenceRecord_.[[ReferencedName]], GetThisValue(_referenceRecord_)). - 1. Let _base_ be _referenceRecord_.[[Base]]. + 1. If _refRecord_ is not a Reference Record, return _refRecord_. + 1. If IsUnresolvableReference(_refRecord_) is *true*, throw a *ReferenceError* exception. + 1. If IsPropertyReference(_refRecord_) is *true*, then + 1. [id="step-getvalue-toobject"] Let _baseObj_ be ? ToObject(_refRecord_.[[Base]]). + 1. If IsPrivateReference(_refRecord_) is *true*, then + 1. Return ? PrivateGet(_baseObj_, _refRecord_.[[ReferencedName]]). + 1. If _refRecord_.[[ReferencedName]] is not a property key, then + 1. Set _refRecord_.[[ReferencedName]] to ? ToPropertyKey(_refRecord_.[[ReferencedName]]). + 1. Return ? _baseObj_.[[Get]](_refRecord_.[[ReferencedName]], GetThisValue(_refRecord_)). + 1. Let _base_ be _refRecord_.[[Base]]. 1. Assert: _base_ is an Environment Record. - 1. Return ? _base_.GetBindingValue(_referenceRecord_.[[ReferencedName]], _referenceRecord_.[[Strict]]) (see ). + 1. Return ? _base_.GetBindingValue(_refRecord_.[[ReferencedName]], _refRecord_.[[Strict]]) (see ).

The object that may be created in step is not accessible outside of the above abstract operation and the ordinary object [[Get]] internal method. An implementation might choose to avoid the actual creation of the object.

@@ -4503,31 +4503,31 @@

PutValue ( - _referenceRecord_: a Reference Record or an ECMAScript language value, + _refRecord_: a Reference Record or an ECMAScript language value, _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or an abrupt completion

- 1. If _referenceRecord_ is not a Reference Record, throw a *ReferenceError* exception. - 1. If IsUnresolvableReference(_referenceRecord_) is *true*, then - 1. If _referenceRecord_.[[Strict]] is *true*, throw a *ReferenceError* exception. + 1. If _refRecord_ is not a Reference Record, throw a *ReferenceError* exception. + 1. If IsUnresolvableReference(_refRecord_) is *true*, then + 1. If _refRecord_.[[Strict]] is *true*, throw a *ReferenceError* exception. 1. Let _globalObj_ be GetGlobalObject(). - 1. Perform ? Set(_globalObj_, _referenceRecord_.[[ReferencedName]], _value_, *false*). + 1. Perform ? Set(_globalObj_, _refRecord_.[[ReferencedName]], _value_, *false*). 1. Return ~unused~. - 1. If IsPropertyReference(_referenceRecord_) is *true*, then - 1. [id="step-putvalue-toobject"] Let _baseObj_ be ? ToObject(_referenceRecord_.[[Base]]). - 1. If IsPrivateReference(_referenceRecord_) is *true*, then - 1. Return ? PrivateSet(_baseObj_, _referenceRecord_.[[ReferencedName]], _value_). - 1. If _referenceRecord_.[[ReferencedName]] is not a property key, then - 1. Set _referenceRecord_.[[ReferencedName]] to ? ToPropertyKey(_referenceRecord_.[[ReferencedName]]). - 1. Let _succeeded_ be ? _baseObj_.[[Set]](_referenceRecord_.[[ReferencedName]], _value_, GetThisValue(_referenceRecord_)). - 1. If _succeeded_ is *false* and _referenceRecord_.[[Strict]] is *true*, throw a *TypeError* exception. + 1. If IsPropertyReference(_refRecord_) is *true*, then + 1. [id="step-putvalue-toobject"] Let _baseObj_ be ? ToObject(_refRecord_.[[Base]]). + 1. If IsPrivateReference(_refRecord_) is *true*, then + 1. Return ? PrivateSet(_baseObj_, _refRecord_.[[ReferencedName]], _value_). + 1. If _refRecord_.[[ReferencedName]] is not a property key, then + 1. Set _refRecord_.[[ReferencedName]] to ? ToPropertyKey(_refRecord_.[[ReferencedName]]). + 1. Let _succeeded_ be ? _baseObj_.[[Set]](_refRecord_.[[ReferencedName]], _value_, GetThisValue(_refRecord_)). + 1. If _succeeded_ is *false* and _refRecord_.[[Strict]] is *true*, throw a *TypeError* exception. 1. Return ~unused~. - 1. Let _base_ be _referenceRecord_.[[Base]]. + 1. Let _base_ be _refRecord_.[[Base]]. 1. Assert: _base_ is an Environment Record. - 1. Return ? _base_.SetMutableBinding(_referenceRecord_.[[ReferencedName]], _value_, _referenceRecord_.[[Strict]]) (see ). + 1. Return ? _base_.SetMutableBinding(_refRecord_.[[ReferencedName]], _value_, _refRecord_.[[Strict]]) (see ).

The object that may be created in step is not accessible outside of the above abstract operation and the ordinary object [[Set]] internal method. An implementation might choose to avoid the actual creation of that object.

@@ -4537,32 +4537,32 @@

GetThisValue ( - _referenceRecord_: a Reference Record, + _refRecord_: a Reference Record, ): an ECMAScript language value

- 1. Assert: IsPropertyReference(_referenceRecord_) is *true*. - 1. If IsSuperReference(_referenceRecord_) is *true*, return _referenceRecord_.[[ThisValue]]. - 1. Return _referenceRecord_.[[Base]]. + 1. Assert: IsPropertyReference(_refRecord_) is *true*. + 1. If IsSuperReference(_refRecord_) is *true*, return _refRecord_.[[ThisValue]]. + 1. Return _refRecord_.[[Base]].

InitializeReferencedBinding ( - _referenceRecord_: a Reference Record, + _refRecord_: a Reference Record, _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or an abrupt completion

- 1. Assert: IsUnresolvableReference(_referenceRecord_) is *false*. - 1. Let _base_ be _referenceRecord_.[[Base]]. + 1. Assert: IsUnresolvableReference(_refRecord_) is *false*. + 1. Let _base_ be _refRecord_.[[Base]]. 1. Assert: _base_ is an Environment Record. - 1. Return ? _base_.InitializeBinding(_referenceRecord_.[[ReferencedName]], _value_). + 1. Return ? _base_.InitializeBinding(_refRecord_.[[ReferencedName]], _value_).
@@ -4593,14 +4593,14 @@

The Property Descriptor Specification Type

IsAccessorDescriptor ( - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): a Boolean

- 1. If _desc_ has a [[Get]] field, return *true*. - 1. If _desc_ has a [[Set]] field, return *true*. + 1. If _propertyDesc_ has a [[Get]] field, return *true*. + 1. If _propertyDesc_ has a [[Set]] field, return *true*. 1. Return *false*.
@@ -4608,14 +4608,14 @@

IsDataDescriptor ( - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): a Boolean

- 1. If _desc_ has a [[Value]] field, return *true*. - 1. If _desc_ has a [[Writable]] field, return *true*. + 1. If _propertyDesc_ has a [[Value]] field, return *true*. + 1. If _propertyDesc_ has a [[Writable]] field, return *true*. 1. Return *false*.
@@ -4623,14 +4623,14 @@

IsGenericDescriptor ( - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): a Boolean

- 1. If IsAccessorDescriptor(_desc_) is *true*, return *false*. - 1. If IsDataDescriptor(_desc_) is *true*, return *false*. + 1. If IsAccessorDescriptor(_propertyDesc_) is *true*, return *false*. + 1. If IsDataDescriptor(_propertyDesc_) is *true*, return *false*. 1. Return *true*.
@@ -4638,27 +4638,27 @@

FromPropertyDescriptor ( - _desc_: a Property Descriptor or *undefined*, + _propertyDesc_: a Property Descriptor or *undefined*, ): an Object or *undefined*

- 1. If _desc_ is *undefined*, return *undefined*. + 1. If _propertyDesc_ is *undefined*, return *undefined*. 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Assert: _obj_ is an extensible ordinary object with no own properties. - 1. If _desc_ has a [[Value]] field, then - 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"value"*, _desc_.[[Value]]). - 1. If _desc_ has a [[Writable]] field, then - 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"writable"*, _desc_.[[Writable]]). - 1. If _desc_ has a [[Get]] field, then - 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"get"*, _desc_.[[Get]]). - 1. If _desc_ has a [[Set]] field, then - 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"set"*, _desc_.[[Set]]). - 1. If _desc_ has an [[Enumerable]] field, then - 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"enumerable"*, _desc_.[[Enumerable]]). - 1. If _desc_ has a [[Configurable]] field, then - 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"configurable"*, _desc_.[[Configurable]]). + 1. If _propertyDesc_ has a [[Value]] field, then + 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"value"*, _propertyDesc_.[[Value]]). + 1. If _propertyDesc_ has a [[Writable]] field, then + 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"writable"*, _propertyDesc_.[[Writable]]). + 1. If _propertyDesc_ has a [[Get]] field, then + 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"get"*, _propertyDesc_.[[Get]]). + 1. If _propertyDesc_ has a [[Set]] field, then + 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"set"*, _propertyDesc_.[[Set]]). + 1. If _propertyDesc_ has an [[Enumerable]] field, then + 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"enumerable"*, _propertyDesc_.[[Enumerable]]). + 1. If _propertyDesc_ has a [[Configurable]] field, then + 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"configurable"*, _propertyDesc_.[[Configurable]]). 1. Return _obj_.
@@ -4673,57 +4673,57 @@

1. If _obj_ is not an Object, throw a *TypeError* exception. - 1. Let _desc_ be a new Property Descriptor that initially has no fields. + 1. Let _propertyDesc_ be a new Property Descriptor that initially has no fields. 1. Let _hasEnumerable_ be ? HasProperty(_obj_, *"enumerable"*). 1. If _hasEnumerable_ is *true*, then 1. Let _enumerable_ be ToBoolean(? Get(_obj_, *"enumerable"*)). - 1. Set _desc_.[[Enumerable]] to _enumerable_. + 1. Set _propertyDesc_.[[Enumerable]] to _enumerable_. 1. Let _hasConfigurable_ be ? HasProperty(_obj_, *"configurable"*). 1. If _hasConfigurable_ is *true*, then 1. Let _configurable_ be ToBoolean(? Get(_obj_, *"configurable"*)). - 1. Set _desc_.[[Configurable]] to _configurable_. + 1. Set _propertyDesc_.[[Configurable]] to _configurable_. 1. Let _hasValue_ be ? HasProperty(_obj_, *"value"*). 1. If _hasValue_ is *true*, then 1. Let _value_ be ? Get(_obj_, *"value"*). - 1. Set _desc_.[[Value]] to _value_. + 1. Set _propertyDesc_.[[Value]] to _value_. 1. Let _hasWritable_ be ? HasProperty(_obj_, *"writable"*). 1. If _hasWritable_ is *true*, then 1. Let _writable_ be ToBoolean(? Get(_obj_, *"writable"*)). - 1. Set _desc_.[[Writable]] to _writable_. + 1. Set _propertyDesc_.[[Writable]] to _writable_. 1. Let _hasGet_ be ? HasProperty(_obj_, *"get"*). 1. If _hasGet_ is *true*, then 1. Let _getter_ be ? Get(_obj_, *"get"*). 1. If IsCallable(_getter_) is *false* and _getter_ is not *undefined*, throw a *TypeError* exception. - 1. Set _desc_.[[Get]] to _getter_. + 1. Set _propertyDesc_.[[Get]] to _getter_. 1. Let _hasSet_ be ? HasProperty(_obj_, *"set"*). 1. If _hasSet_ is *true*, then 1. Let _setter_ be ? Get(_obj_, *"set"*). 1. If IsCallable(_setter_) is *false* and _setter_ is not *undefined*, throw a *TypeError* exception. - 1. Set _desc_.[[Set]] to _setter_. - 1. If _desc_ has a [[Get]] field or _desc_ has a [[Set]] field, then - 1. If _desc_ has a [[Value]] field or _desc_ has a [[Writable]] field, throw a *TypeError* exception. - 1. Return _desc_. + 1. Set _propertyDesc_.[[Set]] to _setter_. + 1. If _propertyDesc_ has a [[Get]] field or _propertyDesc_ has a [[Set]] field, then + 1. If _propertyDesc_ has a [[Value]] field or _propertyDesc_ has a [[Writable]] field, throw a *TypeError* exception. + 1. Return _propertyDesc_.

CompletePropertyDescriptor ( - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): ~unused~

1. Let _like_ be the Record { [[Value]]: *undefined*, [[Writable]]: *false*, [[Get]]: *undefined*, [[Set]]: *undefined*, [[Enumerable]]: *false*, [[Configurable]]: *false* }. - 1. If IsGenericDescriptor(_desc_) is *true* or IsDataDescriptor(_desc_) is *true*, then - 1. If _desc_ does not have a [[Value]] field, set _desc_.[[Value]] to _like_.[[Value]]. - 1. If _desc_ does not have a [[Writable]] field, set _desc_.[[Writable]] to _like_.[[Writable]]. + 1. If IsGenericDescriptor(_propertyDesc_) is *true* or IsDataDescriptor(_propertyDesc_) is *true*, then + 1. If _propertyDesc_ does not have a [[Value]] field, set _propertyDesc_.[[Value]] to _like_.[[Value]]. + 1. If _propertyDesc_ does not have a [[Writable]] field, set _propertyDesc_.[[Writable]] to _like_.[[Writable]]. 1. Else, - 1. If _desc_ does not have a [[Get]] field, set _desc_.[[Get]] to _like_.[[Get]]. - 1. If _desc_ does not have a [[Set]] field, set _desc_.[[Set]] to _like_.[[Set]]. - 1. If _desc_ does not have an [[Enumerable]] field, set _desc_.[[Enumerable]] to _like_.[[Enumerable]]. - 1. If _desc_ does not have a [[Configurable]] field, set _desc_.[[Configurable]] to _like_.[[Configurable]]. + 1. If _propertyDesc_ does not have a [[Get]] field, set _propertyDesc_.[[Get]] to _like_.[[Get]]. + 1. If _propertyDesc_ does not have a [[Set]] field, set _propertyDesc_.[[Set]] to _like_.[[Set]]. + 1. If _propertyDesc_ does not have an [[Enumerable]] field, set _propertyDesc_.[[Enumerable]] to _like_.[[Enumerable]]. + 1. If _propertyDesc_ does not have a [[Configurable]] field, set _propertyDesc_.[[Configurable]] to _like_.[[Configurable]]. 1. Return ~unused~.
@@ -4744,8 +4744,8 @@

The Abstract Closure Specification Type

1. Let _addend_ be 41. 1. Let _closure_ be a new Abstract Closure with parameters (_x_) that captures _addend_ and performs the following steps when called: 1. Return _x_ + _addend_. - 1. Let _val_ be _closure_(1). - 1. Assert: _val_ is 42. + 1. Let _value_ be _closure_(1). + 1. Assert: _value_ is 42.
@@ -4788,8 +4788,8 @@

1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. Let _zero_ be « 0 ». - 1. For each index _i_ of _db_, do - 1. Append WriteSharedMemory { [[Order]]: ~init~, [[NoTear]]: *true*, [[Block]]: _db_, [[ByteIndex]]: _i_, [[ElementSize]]: 1, [[Payload]]: _zero_ } to _eventsRecord_.[[EventList]]. + 1. For each index _index_ of _db_, do + 1. Append WriteSharedMemory { [[Order]]: ~init~, [[NoTear]]: *true*, [[Block]]: _db_, [[ByteIndex]]: _index_, [[ElementSize]]: 1, [[Payload]]: _zero_ } to _eventsRecord_.[[EventList]]. 1. Return _db_. @@ -5041,8 +5041,8 @@

1. If _input_ is an Object, then - 1. Let _exoticToPrim_ be ? GetMethod(_input_, %Symbol.toPrimitive%). - 1. If _exoticToPrim_ is not *undefined*, then + 1. Let _exoticToPrimitive_ be ? GetMethod(_input_, %Symbol.toPrimitive%). + 1. If _exoticToPrimitive_ is not *undefined*, then 1. If _preferredType_ is not present, then 1. Let _hint_ be *"default"*. 1. Else if _preferredType_ is ~string~, then @@ -5050,7 +5050,7 @@

1. Else, 1. Assert: _preferredType_ is ~number~. 1. Let _hint_ be *"number"*. - 1. Let _result_ be ? Call(_exoticToPrim_, _input_, « _hint_ »). + 1. Let _result_ be ? Call(_exoticToPrimitive_, _input_, « _hint_ »). 1. If _result_ is not an Object, return _result_. 1. Throw a *TypeError* exception. 1. If _preferredType_ is not present, set _preferredType_ to ~number~. @@ -5088,18 +5088,18 @@

ToBoolean ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): a Boolean

description
-
It converts _argument_ to a value of type Boolean.
+
It converts _arg_ to a value of type Boolean.
- 1. If _argument_ is a Boolean, return _argument_. - 1. If _argument_ is one of *undefined*, *null*, *+0*𝔽, *-0*𝔽, *NaN*, *0*, or the empty String, return *false*. + 1. If _arg_ is a Boolean, return _arg_. + 1. If _arg_ is one of *undefined*, *null*, *+0*𝔽, *-0*𝔽, *NaN*, *0*, or the empty String, return *false*. 1. [id="step-to-boolean-web-compat-insertion-point", normative-optional] If the host is a web browser or otherwise supports , then - 1. If _argument_ is an Object and _argument_ has an [[IsHTMLDDA]] internal slot, return *false*. + 1. If _arg_ is an Object and _arg_ has an [[IsHTMLDDA]] internal slot, return *false*. 1. Return *true*.
@@ -5107,41 +5107,41 @@

ToNumeric ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing either a Number or a BigInt, or a throw completion

description
-
It returns _value_ converted to a Number or a BigInt.
+
It returns _arg_ converted to a Number or a BigInt.
- 1. Let _primValue_ be ? ToPrimitive(_value_, ~number~). - 1. If _primValue_ is a BigInt, return _primValue_. - 1. Return ? ToNumber(_primValue_). + 1. Let _primitiveValue_ be ? ToPrimitive(_arg_, ~number~). + 1. If _primitiveValue_ is a BigInt, return _primitiveValue_. + 1. Return ? ToNumber(_primitiveValue_).

ToNumber ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a Number or a throw completion

description
-
It converts _argument_ to a value of type Number.
+
It converts _arg_ to a value of type Number.
- 1. If _argument_ is a Number, return _argument_. - 1. If _argument_ is either a Symbol or a BigInt, throw a *TypeError* exception. - 1. If _argument_ is *undefined*, return *NaN*. - 1. If _argument_ is either *null* or *false*, return *+0*𝔽. - 1. If _argument_ is *true*, return *1*𝔽. - 1. If _argument_ is a String, return StringToNumber(_argument_). - 1. Assert: _argument_ is an Object. - 1. Let _primValue_ be ? ToPrimitive(_argument_, ~number~). - 1. Assert: _primValue_ is not an Object. - 1. Return ? ToNumber(_primValue_). + 1. If _arg_ is a Number, return _arg_. + 1. If _arg_ is either a Symbol or a BigInt, throw a *TypeError* exception. + 1. If _arg_ is *undefined*, return *NaN*. + 1. If _arg_ is either *null* or *false*, return *+0*𝔽. + 1. If _arg_ is *true*, return *1*𝔽. + 1. If _arg_ is a String, return StringToNumber(_arg_). + 1. Assert: _arg_ is an Object. + 1. Let _primitiveValue_ be ? ToPrimitive(_arg_, ~number~). + 1. Assert: _primitiveValue_ is not an Object. + 1. Return ? ToNumber(_primitiveValue_). @@ -5206,13 +5206,13 @@

Syntax

StringToNumber ( - _str_: a String, + _string_: a String, ): a Number

- 1. Let _literal_ be ParseText(_str_, |StringNumericLiteral|). + 1. Let _literal_ be ParseText(_string_, |StringNumericLiteral|). 1. If _literal_ is a List of errors, return *NaN*. 1. Return the StringNumericValue of _literal_. @@ -5298,15 +5298,15 @@

ToIntegerOrInfinity ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing either an integer, +∞, or -∞, or a throw completion

description
-
It converts _argument_ to an integer representing its Number value with fractional part truncated, or to +∞ or -∞ when that Number value is infinite.
+
It converts _arg_ to an integer representing its Number value with fractional part truncated, or to +∞ or -∞ when that Number value is infinite.
- 1. Let _number_ be ? ToNumber(_argument_). + 1. Let _number_ be ? ToNumber(_arg_). 1. If _number_ is one of *NaN*, *+0*𝔽, or *-0*𝔽, return 0. 1. If _number_ is *+∞*𝔽, return +∞. 1. If _number_ is *-∞*𝔽, return -∞. @@ -5320,15 +5320,15 @@

ToInt32 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an integral Number or a throw completion

description
-
It converts _argument_ to one of 232 integral Number values in the inclusive interval from 𝔽(-231) to 𝔽(231 - 1).
+
It converts _arg_ to one of 232 integral Number values in the inclusive interval from 𝔽(-231) to 𝔽(231 - 1).
- 1. Let _int_ be ? ToIntegerOrInfinity(_argument_). + 1. Let _int_ be ? ToIntegerOrInfinity(_arg_). 1. If _int_ is not finite, return *+0*𝔽. 1. Let _int32bit_ be _int_ modulo 232. 1. If _int32bit_ ≥ 231, return 𝔽(_int32bit_ - 232). @@ -5353,15 +5353,15 @@

ToUint32 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an integral Number or a throw completion

description
-
It converts _argument_ to one of 232 integral Number values in the inclusive interval from *+0*𝔽 to 𝔽(232 - 1).
+
It converts _arg_ to one of 232 integral Number values in the inclusive interval from *+0*𝔽 to 𝔽(232 - 1).
- 1. Let _int_ be ? ToIntegerOrInfinity(_argument_). + 1. Let _int_ be ? ToIntegerOrInfinity(_arg_). 1. If _int_ is not finite, return *+0*𝔽. 1. Let _int32bit_ be _int_ modulo 232. 1. [id="step-touint32-return"] Return 𝔽(_int32bit_). @@ -5388,15 +5388,15 @@

ToInt16 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an integral Number or a throw completion

description
-
It converts _argument_ to one of 216 integral Number values in the inclusive interval from 𝔽(-215) to 𝔽(215 - 1).
+
It converts _arg_ to one of 216 integral Number values in the inclusive interval from 𝔽(-215) to 𝔽(215 - 1).
- 1. Let _int_ be ? ToIntegerOrInfinity(_argument_). + 1. Let _int_ be ? ToIntegerOrInfinity(_arg_). 1. If _int_ is not finite, return *+0*𝔽. 1. Let _int16bit_ be _int_ modulo 216. 1. If _int16bit_ ≥ 215, return 𝔽(_int16bit_ - 216). @@ -5407,15 +5407,15 @@

ToUint16 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an integral Number or a throw completion

description
-
It converts _argument_ to one of 216 integral Number values in the inclusive interval from *+0*𝔽 to 𝔽(216 - 1).
+
It converts _arg_ to one of 216 integral Number values in the inclusive interval from *+0*𝔽 to 𝔽(216 - 1).
- 1. Let _int_ be ? ToIntegerOrInfinity(_argument_). + 1. Let _int_ be ? ToIntegerOrInfinity(_arg_). 1. If _int_ is not finite, return *+0*𝔽. 1. [id="step-touint16-mod"] Let _int16bit_ be _int_ modulo 216. 1. Return 𝔽(_int16bit_). @@ -5436,15 +5436,15 @@

ToInt8 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an integral Number or a throw completion

description
-
It converts _argument_ to one of 28 integral Number values in the inclusive interval from *-128*𝔽 to *127*𝔽.
+
It converts _arg_ to one of 28 integral Number values in the inclusive interval from *-128*𝔽 to *127*𝔽.
- 1. Let _int_ be ? ToIntegerOrInfinity(_argument_). + 1. Let _int_ be ? ToIntegerOrInfinity(_arg_). 1. If _int_ is not finite, return *+0*𝔽. 1. Let _int8bit_ be _int_ modulo 28. 1. If _int8bit_ ≥ 27, return 𝔽(_int8bit_ - 28). @@ -5455,15 +5455,15 @@

ToUint8 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an integral Number or a throw completion

description
-
It converts _argument_ to one of 28 integral Number values in the inclusive interval from *+0*𝔽 to *255*𝔽.
+
It converts _arg_ to one of 28 integral Number values in the inclusive interval from *+0*𝔽 to *255*𝔽.
- 1. Let _int_ be ? ToIntegerOrInfinity(_argument_). + 1. Let _int_ be ? ToIntegerOrInfinity(_arg_). 1. If _int_ is not finite, return *+0*𝔽. 1. Let _int8bit_ be _int_ modulo 28. 1. Return 𝔽(_int8bit_). @@ -5473,15 +5473,15 @@

ToUint8Clamp ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an integral Number or a throw completion

description
-
It clamps and rounds _argument_ to one of 28 integral Number values in the inclusive interval from *+0*𝔽 to *255*𝔽.
+
It clamps and rounds _arg_ to one of 28 integral Number values in the inclusive interval from *+0*𝔽 to *255*𝔽.
- 1. Let _number_ be ? ToNumber(_argument_). + 1. Let _number_ be ? ToNumber(_arg_). 1. If _number_ is *NaN*, return *+0*𝔽. 1. Let _mv_ be the extended mathematical value of _number_. 1. Let _clamped_ be the result of clamping _mv_ between 0 and 255. @@ -5499,16 +5499,16 @@

ToBigInt ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a BigInt or a throw completion

description
-
It converts _argument_ to a BigInt value, or throws if an implicit conversion from Number would be required.
+
It converts _arg_ to a BigInt value, or throws if an implicit conversion from Number would be required.
- 1. Let _prim_ be ? ToPrimitive(_argument_, ~number~). - 1. Return the value that _prim_ corresponds to in . + 1. Let _primitive_ be ? ToPrimitive(_arg_, ~number~). + 1. Return the value that _primitive_ corresponds to in . @@ -5543,7 +5543,7 @@

Boolean

@@ -5551,7 +5551,7 @@

BigInt

@@ -5568,7 +5568,7 @@

- Return `1n` if _prim_ is *true* and `0n` if _prim_ is *false*. + Return `1n` if _primitive_ is *true* and `0n` if _primitive_ is *false*.
- Return _prim_. + Return _primitive_.
- 1. Let _n_ be StringToBigInt(_prim_). + 1. Let _n_ be StringToBigInt(_primitive_). 1. If _n_ is *undefined*, throw a *SyntaxError* exception. 1. Return _n_. @@ -5589,13 +5589,13 @@

StringToBigInt ( - _str_: a String, + _string_: a String, ): a BigInt or *undefined*

- 1. Let _literal_ be ParseText(_str_, |StringIntegerLiteral|). + 1. Let _literal_ be ParseText(_string_, |StringIntegerLiteral|). 1. If _literal_ is a List of errors, return *undefined*. 1. Let _mv_ be the MV of _literal_. 1. Assert: _mv_ is an integer. @@ -5633,15 +5633,15 @@

Runtime Semantics: MV

ToBigInt64 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a BigInt or a throw completion

description
-
It converts _argument_ to one of 264 BigInt values in the inclusive interval from ℤ(-263) to ℤ(263 - 1).
+
It converts _arg_ to one of 264 BigInt values in the inclusive interval from ℤ(-263) to ℤ(263 - 1).
- 1. Let _n_ be ? ToBigInt(_argument_). + 1. Let _n_ be ? ToBigInt(_arg_). 1. Let _int64bit_ be ℝ(_n_) modulo 264. 1. If _int64bit_ ≥ 263, return ℤ(_int64bit_ - 264). 1. Return ℤ(_int64bit_). @@ -5651,15 +5651,15 @@

ToBigUint64 ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a BigInt or a throw completion

description
-
It converts _argument_ to one of 264 BigInt values in the inclusive interval from *0* to ℤ(264 - 1).
+
It converts _arg_ to one of 264 BigInt values in the inclusive interval from *0* to ℤ(264 - 1).
- 1. Let _n_ be ? ToBigInt(_argument_). + 1. Let _n_ be ? ToBigInt(_arg_). 1. Let _int64bit_ be ℝ(_n_) modulo 264. 1. Return ℤ(_int64bit_). @@ -5668,63 +5668,63 @@

ToString ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a String or a throw completion

description
-
It converts _argument_ to a value of type String.
+
It converts _arg_ to a value of type String.
- 1. If _argument_ is a String, return _argument_. - 1. If _argument_ is a Symbol, throw a *TypeError* exception. - 1. If _argument_ is *undefined*, return *"undefined"*. - 1. If _argument_ is *null*, return *"null"*. - 1. If _argument_ is *true*, return *"true"*. - 1. If _argument_ is *false*, return *"false"*. - 1. If _argument_ is a Number, return Number::toString(_argument_, 10). - 1. If _argument_ is a BigInt, return BigInt::toString(_argument_, 10). - 1. Assert: _argument_ is an Object. - 1. Let _primValue_ be ? ToPrimitive(_argument_, ~string~). - 1. Assert: _primValue_ is not an Object. - 1. Return ? ToString(_primValue_). + 1. If _arg_ is a String, return _arg_. + 1. If _arg_ is a Symbol, throw a *TypeError* exception. + 1. If _arg_ is *undefined*, return *"undefined"*. + 1. If _arg_ is *null*, return *"null"*. + 1. If _arg_ is *true*, return *"true"*. + 1. If _arg_ is *false*, return *"false"*. + 1. If _arg_ is a Number, return Number::toString(_arg_, 10). + 1. If _arg_ is a BigInt, return BigInt::toString(_arg_, 10). + 1. Assert: _arg_ is an Object. + 1. Let _primitiveValue_ be ? ToPrimitive(_arg_, ~string~). + 1. Assert: _primitiveValue_ is not an Object. + 1. Return ? ToString(_primitiveValue_).

ToObject ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an Object or a throw completion

description
-
It converts _argument_ to a value of type Object.
+
It converts _arg_ to a value of type Object.
- 1. If _argument_ is either *undefined* or *null*, throw a *TypeError* exception. - 1. If _argument_ is a Boolean, return a new Boolean object whose [[BooleanData]] internal slot is set to _argument_. See for a description of Boolean objects. - 1. If _argument_ is a Number, return a new Number object whose [[NumberData]] internal slot is set to _argument_. See for a description of Number objects. - 1. If _argument_ is a String, return a new String object whose [[StringData]] internal slot is set to _argument_. See for a description of String objects. - 1. If _argument_ is a Symbol, return a new Symbol object whose [[SymbolData]] internal slot is set to _argument_. See for a description of Symbol objects. - 1. If _argument_ is a BigInt, return a new BigInt object whose [[BigIntData]] internal slot is set to _argument_. See for a description of BigInt objects. - 1. Assert: _argument_ is an Object. - 1. Return _argument_. + 1. If _arg_ is either *undefined* or *null*, throw a *TypeError* exception. + 1. If _arg_ is a Boolean, return a new Boolean object whose [[BooleanData]] internal slot is set to _arg_. See for a description of Boolean objects. + 1. If _arg_ is a Number, return a new Number object whose [[NumberData]] internal slot is set to _arg_. See for a description of Number objects. + 1. If _arg_ is a String, return a new String object whose [[StringData]] internal slot is set to _arg_. See for a description of String objects. + 1. If _arg_ is a Symbol, return a new Symbol object whose [[SymbolData]] internal slot is set to _arg_. See for a description of Symbol objects. + 1. If _arg_ is a BigInt, return a new BigInt object whose [[BigIntData]] internal slot is set to _arg_. See for a description of BigInt objects. + 1. Assert: _arg_ is an Object. + 1. Return _arg_.

ToPropertyKey ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a property key or a throw completion

description
-
It converts _argument_ to a value that can be used as a property key.
+
It converts _arg_ to a value that can be used as a property key.
- 1. Let _key_ be ? ToPrimitive(_argument_, ~string~). + 1. Let _key_ be ? ToPrimitive(_arg_, ~string~). 1. If _key_ is a Symbol, then 1. Return _key_. 1. Return ! ToString(_key_). @@ -5734,34 +5734,34 @@

ToLength ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a non-negative integral Number or a throw completion

description
-
It clamps and truncates _argument_ to a non-negative integral Number suitable for use as the length of an array-like object.
+
It clamps and truncates _arg_ to a non-negative integral Number suitable for use as the length of an array-like object.
- 1. Let _len_ be ? ToIntegerOrInfinity(_argument_). - 1. If _len_ ≤ 0, return *+0*𝔽. - 1. Return 𝔽(min(_len_, 253 - 1)). + 1. Let _length_ be ? ToIntegerOrInfinity(_arg_). + 1. If _length_ ≤ 0, return *+0*𝔽. + 1. Return 𝔽(min(_length_, 253 - 1)).

CanonicalNumericIndexString ( - _argument_: a String, + _arg_: a String, ): a Number or *undefined*

description
-
If _argument_ is either *"-0"* or exactly matches ToString(_n_) for some Number value _n_, it returns the respective Number value. Otherwise, it returns *undefined*.
+
If _arg_ is either *"-0"* or exactly matches ToString(_n_) for some Number value _n_, it returns the respective Number value. Otherwise, it returns *undefined*.
- 1. If _argument_ is *"-0"*, return *-0*𝔽. - 1. Let _n_ be ! ToNumber(_argument_). - 1. If ! ToString(_n_) is _argument_, return _n_. + 1. If _arg_ is *"-0"*, return *-0*𝔽. + 1. Let _n_ be ! ToNumber(_arg_). + 1. If ! ToString(_n_) is _arg_, return _n_. 1. Return *undefined*.

A canonical numeric string is any String for which the CanonicalNumericIndexString abstract operation does not return *undefined*.

@@ -5770,17 +5770,17 @@

ToIndex ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a non-negative integer or a throw completion

description
-
It converts _value_ to an integer and returns that integer if it is non-negative and corresponds with an integer index. Otherwise, it throws an exception.
+
It converts _arg_ to an integer and returns that integer if it is non-negative and corresponds with an integer index. Otherwise, it throws an exception.
- 1. Let _integer_ be ? ToIntegerOrInfinity(_value_). - 1. If _integer_ is not in the inclusive interval from 0 to 253 - 1, throw a *RangeError* exception. - 1. Return _integer_. + 1. Let _int_ be ? ToIntegerOrInfinity(_arg_). + 1. If _int_ is not in the inclusive interval from 0 to 253 - 1, throw a *RangeError* exception. + 1. Return _int_.
@@ -5791,15 +5791,15 @@

Testing and Comparison Operations

RequireObjectCoercible ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

description
-
It throws an error if _argument_ is a value that cannot be converted to an Object using ToObject.
+
It throws an error if _arg_ is a value that cannot be converted to an Object using ToObject.
- 1. If _argument_ is either *undefined* or *null*, throw a *TypeError* exception. + 1. If _arg_ is either *undefined* or *null*, throw a *TypeError* exception. 1. Return ~unused~.
@@ -5807,17 +5807,17 @@

IsArray ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

- 1. If _argument_ is not an Object, return *false*. - 1. If _argument_ is an Array exotic object, return *true*. - 1. If _argument_ is a Proxy exotic object, then - 1. Perform ? ValidateNonRevokedProxy(_argument_). - 1. Let _proxyTarget_ be _argument_.[[ProxyTarget]]. + 1. If _arg_ is not an Object, return *false*. + 1. If _arg_ is an Array exotic object, return *true*. + 1. If _arg_ is a Proxy exotic object, then + 1. Perform ? ValidateNonRevokedProxy(_arg_). + 1. Let _proxyTarget_ be _arg_.[[ProxyTarget]]. 1. Return ? IsArray(_proxyTarget_). 1. Return *false*. @@ -5826,16 +5826,16 @@

IsCallable ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): a Boolean

description
-
It determines if _argument_ is a callable function with a [[Call]] internal method.
+
It determines if _arg_ is a callable function with a [[Call]] internal method.
- 1. If _argument_ is not an Object, return *false*. - 1. If _argument_ has a [[Call]] internal method, return *true*. + 1. If _arg_ is not an Object, return *false*. + 1. If _arg_ has a [[Call]] internal method, return *true*. 1. Return *false*.
@@ -5843,16 +5843,16 @@

IsConstructor ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): a Boolean

description
-
It determines if _argument_ is a function object with a [[Construct]] internal method.
+
It determines if _arg_ is a function object with a [[Construct]] internal method.
- 1. If _argument_ is not an Object, return *false*. - 1. If _argument_ has a [[Construct]] internal method, return *true*. + 1. If _arg_ is not an Object, return *false*. + 1. If _arg_ has a [[Construct]] internal method, return *true*. 1. Return *false*.
@@ -5875,16 +5875,16 @@

IsRegExp ( - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

- 1. If _argument_ is not an Object, return *false*. - 1. Let _matcher_ be ? Get(_argument_, %Symbol.match%). + 1. If _arg_ is not an Object, return *false*. + 1. Let _matcher_ be ? Get(_arg_, %Symbol.match%). 1. If _matcher_ is not *undefined*, return ToBoolean(_matcher_). - 1. If _argument_ has a [[RegExpMatcher]] internal slot, return *true*. + 1. If _arg_ has a [[RegExpMatcher]] internal slot, return *true*. 1. Return *false*.
@@ -5900,12 +5900,12 @@

It interprets _string_ as a sequence of UTF-16 encoded code points, as described in , and determines whether it is a well formed UTF-16 sequence.
- 1. Let _len_ be the length of _string_. + 1. Let _length_ be the length of _string_. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, - 1. Let _cp_ be CodePointAt(_string_, _k_). - 1. If _cp_.[[IsUnpairedSurrogate]] is *true*, return *false*. - 1. Set _k_ to _k_ + _cp_.[[CodeUnitCount]]. + 1. Repeat, while _k_ < _length_, + 1. Let _codePoint_ be CodePointAt(_string_, _k_). + 1. If _codePoint_.[[IsUnpairedSurrogate]] is *true*, return *false*. + 1. Set _k_ to _k_ + _codePoint_.[[CodeUnitCount]]. 1. Return *true*. @@ -6287,7 +6287,7 @@

DefinePropertyOrThrow ( _obj_: an Object, _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing ~unused~ or a throw completion

@@ -6295,7 +6295,7 @@

It is used to call the [[DefineOwnProperty]] internal method of an object in a manner that will throw a *TypeError* exception if the requested property update cannot be performed.

- 1. Let _success_ be ? _obj_.[[DefineOwnProperty]](_propertyKey_, _desc_). + 1. Let _success_ be ? _obj_.[[DefineOwnProperty]](_propertyKey_, _propertyDesc_). 1. If _success_ is *false*, throw a *TypeError* exception. 1. Return ~unused~. @@ -6366,8 +6366,8 @@

It is used to determine whether an object has an own property with the specified property key.
- 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). - 1. If _desc_ is *undefined*, return *false*. + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. If _propertyDesc_ is *undefined*, return *false*. 1. Return *true*. @@ -6377,36 +6377,36 @@

Call ( _func_: an ECMAScript language value, _thisValue_: an ECMAScript language value, - optional _argumentsList_: a List of ECMAScript language values, + optional _argList_: a List of ECMAScript language values, ): either a normal completion containing an ECMAScript language value or a throw completion

description
-
It is used to call the [[Call]] internal method of a function object. _func_ is the function object, _thisValue_ is an ECMAScript language value that is the *this* value of the [[Call]], and _argumentsList_ is the value passed to the corresponding argument of the internal method. If _argumentsList_ is not present, a new empty List is used as its value.
+
It is used to call the [[Call]] internal method of a function object. _func_ is the function object, _thisValue_ is an ECMAScript language value that is the *this* value of the [[Call]], and _argList_ is the value passed to the corresponding argument of the internal method. If _argList_ is not present, a new empty List is used as its value.
- 1. If _argumentsList_ is not present, set _argumentsList_ to a new empty List. + 1. If _argList_ is not present, set _argList_ to a new empty List. 1. If IsCallable(_func_) is *false*, throw a *TypeError* exception. - 1. Return ? _func_.[[Call]](_thisValue_, _argumentsList_). + 1. Return ? _func_.[[Call]](_thisValue_, _argList_).

Construct ( - _constructor_: a constructor, - optional _argumentsList_: a List of ECMAScript language values, + _ctor_: a constructor, + optional _argList_: a List of ECMAScript language values, optional _newTarget_: a constructor, ): either a normal completion containing an Object or a throw completion

description
-
It is used to call the [[Construct]] internal method of a function object. _argumentsList_ and _newTarget_ are the values to be passed as the corresponding arguments of the internal method. If _argumentsList_ is not present, a new empty List is used as its value. If _newTarget_ is not present, _constructor_ is used as its value.
+
It is used to call the [[Construct]] internal method of a function object. _argList_ and _newTarget_ are the values to be passed as the corresponding arguments of the internal method. If _argList_ is not present, a new empty List is used as its value. If _newTarget_ is not present, _ctor_ is used as its value.
- 1. If _newTarget_ is not present, set _newTarget_ to _constructor_. - 1. If _argumentsList_ is not present, set _argumentsList_ to a new empty List. - 1. Return ? _constructor_.[[Construct]](_argumentsList_, _newTarget_). + 1. If _newTarget_ is not present, set _newTarget_ to _ctor_. + 1. If _argList_ is not present, set _argList_ to a new empty List. + 1. Return ? _ctor_.[[Construct]](_argList_, _newTarget_).

If _newTarget_ is not present, this operation is equivalent to: `new F(...argumentsList)`

@@ -6437,10 +6437,10 @@

1. Let _currentDesc_ be ? _obj_.[[GetOwnProperty]](_key_). 1. If _currentDesc_ is not *undefined*, then 1. If IsAccessorDescriptor(_currentDesc_) is *true*, then - 1. Let _desc_ be the PropertyDescriptor { [[Configurable]]: *false* }. + 1. Let _propertyDesc_ be the PropertyDescriptor { [[Configurable]]: *false* }. 1. Else, - 1. Let _desc_ be the PropertyDescriptor { [[Configurable]]: *false*, [[Writable]]: *false* }. - 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _desc_). + 1. Let _propertyDesc_ be the PropertyDescriptor { [[Configurable]]: *false*, [[Writable]]: *false* }. + 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _propertyDesc_). 1. Return *true*. @@ -6484,8 +6484,8 @@

1. Let _array_ be ! ArrayCreate(0). 1. Let _n_ be 0. - 1. For each element _e_ of _elements_, do - 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_n_)), _e_). + 1. For each element _element_ of _elements_, do + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_n_)), _element_). 1. Set _n_ to _n_ + 1. 1. Return _array_. @@ -6527,10 +6527,10 @@

1. If _validElementTypes_ is not present, set _validElementTypes_ to ~all~. 1. If _obj_ is not an Object, throw a *TypeError* exception. - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _list_ be a new empty List. 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, + 1. Repeat, while _index_ < _length_, 1. Let _indexName_ be ! ToString(𝔽(_index_)). 1. Let _next_ be ? Get(_obj_, _indexName_). 1. If _validElementTypes_ is ~property-key~ and _next_ is not a property key, throw a *TypeError* exception. @@ -6545,39 +6545,39 @@

Invoke ( _value_: an ECMAScript language value, _propertyKey_: a property key, - optional _argumentsList_: a List of ECMAScript language values, + optional _argList_: a List of ECMAScript language values, ): either a normal completion containing an ECMAScript language value or a throw completion

description
-
It is used to call a method property of an ECMAScript language value. _value_ serves as both the lookup point for the property and the *this* value of the call. _argumentsList_ is the list of arguments values passed to the method. If _argumentsList_ is not present, a new empty List is used as its value.
+
It is used to call a method property of an ECMAScript language value. _value_ serves as both the lookup point for the property and the *this* value of the call. _argList_ is the list of arguments values passed to the method. If _argList_ is not present, a new empty List is used as its value.
- 1. If _argumentsList_ is not present, set _argumentsList_ to a new empty List. + 1. If _argList_ is not present, set _argList_ to a new empty List. 1. Let _func_ be ? GetV(_value_, _propertyKey_). - 1. Return ? Call(_func_, _value_, _argumentsList_). + 1. Return ? Call(_func_, _value_, _argList_).

OrdinaryHasInstance ( - _constructor_: an ECMAScript language value, + _ctor_: an ECMAScript language value, _instance_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

description
-
It implements the default algorithm for determining if _instance_ inherits from the instance object inheritance path provided by _constructor_.
+
It implements the default algorithm for determining if _instance_ inherits from the instance object inheritance path provided by _ctor_.
- 1. If IsCallable(_constructor_) is *false*, return *false*. - 1. If _constructor_ has a [[BoundTargetFunction]] internal slot, then - 1. Let _boundConstructor_ be _constructor_.[[BoundTargetFunction]]. - 1. Return ? InstanceofOperator(_instance_, _boundConstructor_). + 1. If IsCallable(_ctor_) is *false*, return *false*. + 1. If _ctor_ has a [[BoundTargetFunction]] internal slot, then + 1. Let _boundCtor_ be _ctor_.[[BoundTargetFunction]]. + 1. Return ? InstanceofOperator(_instance_, _boundCtor_). 1. If _instance_ is not an Object, return *false*. - 1. Let _proto_ be ? Get(_constructor_, *"prototype"*). + 1. Let _proto_ be ? Get(_ctor_, *"prototype"*). 1. If _proto_ is not an Object, throw a *TypeError* exception. 1. Repeat, 1. Set _instance_ to ? _instance_.[[GetPrototypeOf]](). @@ -6590,19 +6590,19 @@

SpeciesConstructor ( _obj_: an Object, - _defaultConstructor_: a constructor, + _defaultCtor_: a constructor, ): either a normal completion containing a constructor or a throw completion

description
-
It is used to retrieve the constructor that should be used to create new objects that are derived from _obj_. _defaultConstructor_ is the constructor to use if a constructor %Symbol.species% property cannot be found starting from _obj_.
+
It is used to retrieve the constructor that should be used to create new objects that are derived from _obj_. _defaultCtor_ is the constructor to use if a constructor %Symbol.species% property cannot be found starting from _obj_.
- 1. Let _constructor_ be ? Get(_obj_, *"constructor"*). - 1. If _constructor_ is *undefined*, return _defaultConstructor_. - 1. If _constructor_ is not an Object, throw a *TypeError* exception. - 1. Let _species_ be ? Get(_constructor_, %Symbol.species%). - 1. If _species_ is either *undefined* or *null*, return _defaultConstructor_. + 1. Let _ctor_ be ? Get(_obj_, *"constructor"*). + 1. If _ctor_ is *undefined*, return _defaultCtor_. + 1. If _ctor_ is not an Object, throw a *TypeError* exception. + 1. Let _species_ be ? Get(_ctor_, %Symbol.species%). + 1. If _species_ is either *undefined* or *null*, return _defaultCtor_. 1. If IsConstructor(_species_) is *true*, return _species_. 1. Throw a *TypeError* exception. @@ -6622,8 +6622,8 @@

1. Let _results_ be a new empty List. 1. For each element _key_ of _ownKeys_, do 1. If _key_ is a String, then - 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_key_). - 1. If _desc_ is not *undefined* and _desc_.[[Enumerable]] is *true*, then + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_key_). + 1. If _propertyDesc_ is not *undefined* and _propertyDesc_.[[Enumerable]] is *true*, then 1. If _kind_ is ~key~, then 1. Append _key_ to _results_. 1. Else, @@ -6650,8 +6650,8 @@

1. If _func_ has a [[Realm]] internal slot, then 1. Return _func_.[[Realm]]. 1. If _func_ is a bound function exotic object, then - 1. Let _boundTargetFunction_ be _func_.[[BoundTargetFunction]]. - 1. Return ? GetFunctionRealm(_boundTargetFunction_). + 1. Let _boundTargetFunc_ be _func_.[[BoundTargetFunction]]. + 1. Return ? GetFunctionRealm(_boundTargetFunc_). 1. If _func_ is a Proxy exotic object, then 1. Perform ? ValidateNonRevokedProxy(_func_). 1. Let _proxyTarget_ be _func_.[[ProxyTarget]]. @@ -6680,14 +6680,14 @@

1. Let _keys_ be ? _from_.[[OwnPropertyKeys]](). 1. For each element _nextKey_ of _keys_, do 1. Let _excluded_ be *false*. - 1. For each element _e_ of _excludedItems_, do - 1. If SameValue(_e_, _nextKey_) is *true*, then + 1. For each element _element_ of _excludedItems_, do + 1. If SameValue(_element_, _nextKey_) is *true*, then 1. Set _excluded_ to *true*. 1. If _excluded_ is *false*, then - 1. Let _desc_ be ? _from_.[[GetOwnProperty]](_nextKey_). - 1. If _desc_ is not *undefined* and _desc_.[[Enumerable]] is *true*, then - 1. Let _propValue_ be ? Get(_from_, _nextKey_). - 1. Perform ! CreateDataPropertyOrThrow(_target_, _nextKey_, _propValue_). + 1. Let _propertyDesc_ be ? _from_.[[GetOwnProperty]](_nextKey_). + 1. If _propertyDesc_ is not *undefined* and _propertyDesc_.[[Enumerable]] is *true*, then + 1. Let _propertyValue_ be ? Get(_from_, _nextKey_). + 1. Perform ! CreateDataPropertyOrThrow(_target_, _nextKey_, _propertyValue_). 1. Return ~unused~. @@ -6848,16 +6848,16 @@

InitializeInstanceElements ( _obj_: an Object, - _constructor_: an ECMAScript function object or a built-in function object, + _ctor_: an ECMAScript function object or a built-in function object, ): either a normal completion containing ~unused~ or a throw completion

- 1. Let _methods_ be _constructor_.[[PrivateMethods]]. + 1. Let _methods_ be _ctor_.[[PrivateMethods]]. 1. For each PrivateElement _method_ of _methods_, do 1. Perform ? PrivateMethodOrAccessorAdd(_obj_, _method_). - 1. Let _fields_ be _constructor_.[[Fields]]. + 1. Let _fields_ be _ctor_.[[Fields]]. 1. For each element _fieldRecord_ of _fields_, do 1. Perform ? DefineField(_obj_, _fieldRecord_). 1. Return ~unused~. @@ -6957,8 +6957,8 @@

1. If SameValue(_thisValue_, _home_) is *true*, then 1. NOTE: Throwing here emulates assignment to a non-writable data property on the _home_ object in strict mode code. 1. Throw a *TypeError* exception. - 1. Let _desc_ be ? _thisValue_.[[GetOwnProperty]](_propertyKey_). - 1. If _desc_ is *undefined*, then + 1. Let _propertyDesc_ be ? _thisValue_.[[GetOwnProperty]](_propertyKey_). + 1. If _propertyDesc_ is *undefined*, then 1. Perform ? CreateDataPropertyOrThrow(_thisValue_, _propertyKey_, _value_). 1. Else, 1. Perform ? Set(_thisValue_, _propertyKey_, _value_, *true*). @@ -7231,7 +7231,7 @@

IteratorCloseAll ( - _iters_: a List of Iterator Records, + _iterators_: a List of Iterator Records, _completion_: a Completion Record, ): a Completion Record

@@ -7240,8 +7240,8 @@

true
- 1. For each element _iter_ of _iters_, in reverse List order, do - 1. Set _completion_ to Completion(IteratorClose(_iter_, _completion_)). + 1. For each element _iterator_ of _iterators_, in reverse List order, do + 1. Set _completion_ to Completion(IteratorClose(_iterator_, _completion_)). 1. Return ? _completion_. @@ -9618,7 +9618,7 @@

Miscellaneous

Runtime Semantics: InstantiateFunctionObject ( - _env_: an Environment Record, + _envRecord_: an Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, ): an ECMAScript function object

@@ -9630,7 +9630,7 @@

`function` `(` FormalParameters `)` `{` FunctionBody `}` - 1. Return InstantiateOrdinaryFunctionObject of |FunctionDeclaration| with arguments _env_ and _privateEnv_. + 1. Return InstantiateOrdinaryFunctionObject of |FunctionDeclaration| with arguments _envRecord_ and _privateEnv_. GeneratorDeclaration : @@ -9638,7 +9638,7 @@

`function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` - 1. Return InstantiateGeneratorFunctionObject of |GeneratorDeclaration| with arguments _env_ and _privateEnv_. + 1. Return InstantiateGeneratorFunctionObject of |GeneratorDeclaration| with arguments _envRecord_ and _privateEnv_. AsyncGeneratorDeclaration : @@ -9646,7 +9646,7 @@

`async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}` - 1. Return InstantiateAsyncGeneratorFunctionObject of |AsyncGeneratorDeclaration| with arguments _env_ and _privateEnv_. + 1. Return InstantiateAsyncGeneratorFunctionObject of |AsyncGeneratorDeclaration| with arguments _envRecord_ and _privateEnv_. AsyncFunctionDeclaration : @@ -9654,7 +9654,7 @@

`async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}` - 1. Return InstantiateAsyncFunctionObject of |AsyncFunctionDeclaration| with arguments _env_ and _privateEnv_. + 1. Return InstantiateAsyncFunctionObject of |AsyncFunctionDeclaration| with arguments _envRecord_ and _privateEnv_. @@ -9662,36 +9662,36 @@

Runtime Semantics: BindingInitialization ( _value_: an ECMAScript language value, - _environment_: an Environment Record or *undefined*, + _envRecord_: an Environment Record or *undefined*, ): either a normal completion containing ~unused~ or an abrupt completion

-

*undefined* is passed for _environment_ to indicate that a PutValue operation should be used to assign the initialization value. This is the case for `var` statements and formal parameter lists of some non-strict functions (See ). In those cases a lexical binding is hoisted and preinitialized prior to evaluation of its initializer.

+

*undefined* is passed for _envRecord_ to indicate that a PutValue operation should be used to assign the initialization value. This is the case for `var` statements and formal parameter lists of some non-strict functions (See ). In those cases a lexical binding is hoisted and preinitialized prior to evaluation of its initializer.

BindingIdentifier : Identifier 1. Let _name_ be the StringValue of |Identifier|. - 1. Return ? InitializeBoundName(_name_, _value_, _environment_). + 1. Return ? InitializeBoundName(_name_, _value_, _envRecord_). BindingIdentifier : `yield` - 1. Return ? InitializeBoundName(*"yield"*, _value_, _environment_). + 1. Return ? InitializeBoundName(*"yield"*, _value_, _envRecord_). BindingIdentifier : `await` - 1. Return ? InitializeBoundName(*"await"*, _value_, _environment_). + 1. Return ? InitializeBoundName(*"await"*, _value_, _envRecord_). BindingPattern : ObjectBindingPattern 1. Perform ? RequireObjectCoercible(_value_). - 1. Return ? BindingInitialization of |ObjectBindingPattern| with arguments _value_ and _environment_. + 1. Return ? BindingInitialization of |ObjectBindingPattern| with arguments _value_ and _envRecord_. BindingPattern : ArrayBindingPattern 1. Let _iteratorRecord_ be ? GetIterator(_value_, ~sync~). - 1. Let _result_ be Completion(IteratorBindingInitialization of |ArrayBindingPattern| with arguments _iteratorRecord_ and _environment_). + 1. Let _result_ be Completion(IteratorBindingInitialization of |ArrayBindingPattern| with arguments _iteratorRecord_ and _envRecord_). 1. If _iteratorRecord_.[[Done]] is *false*, return ? IteratorClose(_iteratorRecord_, _result_). 1. Return ? _result_. @@ -9705,18 +9705,18 @@

`{` BindingPropertyList `,` `}` - 1. Perform ? PropertyBindingInitialization of |BindingPropertyList| with arguments _value_ and _environment_. + 1. Perform ? PropertyBindingInitialization of |BindingPropertyList| with arguments _value_ and _envRecord_. 1. Return ~unused~. ObjectBindingPattern : `{` BindingRestProperty `}` 1. Let _excludedNames_ be a new empty List. - 1. Return ? RestBindingInitialization of |BindingRestProperty| with arguments _value_, _environment_, and _excludedNames_. + 1. Return ? RestBindingInitialization of |BindingRestProperty| with arguments _value_, _envRecord_, and _excludedNames_. ObjectBindingPattern : `{` BindingPropertyList `,` BindingRestProperty `}` - 1. Let _excludedNames_ be ? PropertyBindingInitialization of |BindingPropertyList| with arguments _value_ and _environment_. - 1. Return ? RestBindingInitialization of |BindingRestProperty| with arguments _value_, _environment_, and _excludedNames_. + 1. Let _excludedNames_ be ? PropertyBindingInitialization of |BindingPropertyList| with arguments _value_ and _envRecord_. + 1. Return ? RestBindingInitialization of |BindingRestProperty| with arguments _value_, _envRecord_, and _excludedNames_. @@ -9724,14 +9724,14 @@

InitializeBoundName ( _name_: a String, _value_: an ECMAScript language value, - _environment_: an Environment Record or *undefined*, + _envRecord_: an Environment Record or *undefined*, ): either a normal completion containing ~unused~ or an abrupt completion

- 1. If _environment_ is not *undefined*, then - 1. Perform ! _environment_.InitializeBinding(_name_, _value_). + 1. If _envRecord_ is not *undefined*, then + 1. Perform ! _envRecord_.InitializeBinding(_name_, _value_). 1. Return ~unused~. 1. Let _lhs_ be ? ResolveBinding(_name_). 1. Return ? PutValue(_lhs_, _value_). @@ -9743,13 +9743,13 @@

Runtime Semantics: IteratorBindingInitialization ( _iteratorRecord_: an Iterator Record, - _environment_: an Environment Record or *undefined*, + _envRecord_: an Environment Record or *undefined*, ): either a normal completion containing ~unused~ or an abrupt completion

-

When *undefined* is passed for _environment_ it indicates that a PutValue operation should be used to assign the initialization value. This is the case for formal parameter lists of non-strict functions. In that case the formal parameter bindings are preinitialized in order to deal with the possibility of multiple parameters with the same name.

+

When *undefined* is passed for _envRecord_ it indicates that a PutValue operation should be used to assign the initialization value. This is the case for formal parameter lists of non-strict functions. In that case the formal parameter bindings are preinitialized in order to deal with the possibility of multiple parameters with the same name.

ArrayBindingPattern : `[` `]` @@ -9763,34 +9763,34 @@

1. If |Elision| is present, then 1. Perform ? IteratorDestructuringAssignmentEvaluation of |Elision| with argument _iteratorRecord_. - 1. Return ? IteratorBindingInitialization of |BindingRestElement| with arguments _iteratorRecord_ and _environment_. + 1. Return ? IteratorBindingInitialization of |BindingRestElement| with arguments _iteratorRecord_ and _envRecord_. ArrayBindingPattern : `[` BindingElementList `,` Elision `]` - 1. Perform ? IteratorBindingInitialization of |BindingElementList| with arguments _iteratorRecord_ and _environment_. + 1. Perform ? IteratorBindingInitialization of |BindingElementList| with arguments _iteratorRecord_ and _envRecord_. 1. Return ? IteratorDestructuringAssignmentEvaluation of |Elision| with argument _iteratorRecord_. ArrayBindingPattern : `[` BindingElementList `,` Elision? BindingRestElement `]` - 1. Perform ? IteratorBindingInitialization of |BindingElementList| with arguments _iteratorRecord_ and _environment_. + 1. Perform ? IteratorBindingInitialization of |BindingElementList| with arguments _iteratorRecord_ and _envRecord_. 1. If |Elision| is present, then 1. Perform ? IteratorDestructuringAssignmentEvaluation of |Elision| with argument _iteratorRecord_. - 1. Return ? IteratorBindingInitialization of |BindingRestElement| with arguments _iteratorRecord_ and _environment_. + 1. Return ? IteratorBindingInitialization of |BindingRestElement| with arguments _iteratorRecord_ and _envRecord_. BindingElementList : BindingElementList `,` BindingElisionElement - 1. Perform ? IteratorBindingInitialization of |BindingElementList| with arguments _iteratorRecord_ and _environment_. - 1. Return ? IteratorBindingInitialization of |BindingElisionElement| with arguments _iteratorRecord_ and _environment_. + 1. Perform ? IteratorBindingInitialization of |BindingElementList| with arguments _iteratorRecord_ and _envRecord_. + 1. Return ? IteratorBindingInitialization of |BindingElisionElement| with arguments _iteratorRecord_ and _envRecord_. BindingElisionElement : Elision BindingElement 1. Perform ? IteratorDestructuringAssignmentEvaluation of |Elision| with argument _iteratorRecord_. - 1. Return ? IteratorBindingInitialization of |BindingElement| with arguments _iteratorRecord_ and _environment_. + 1. Return ? IteratorBindingInitialization of |BindingElement| with arguments _iteratorRecord_ and _envRecord_. SingleNameBinding : BindingIdentifier Initializer? 1. Let _bindingId_ be the StringValue of |BindingIdentifier|. - 1. Let _lhs_ be ? ResolveBinding(_bindingId_, _environment_). + 1. Let _lhs_ be ? ResolveBinding(_bindingId_, _envRecord_). 1. Let _v_ be *undefined*. 1. If _iteratorRecord_.[[Done]] is *false*, then 1. Let _next_ be ? IteratorStepValue(_iteratorRecord_). @@ -9802,7 +9802,7 @@

1. Else, 1. Let _defaultValue_ be ? Evaluation of |Initializer|. 1. Set _v_ to ? GetValue(_defaultValue_). - 1. If _environment_ is *undefined*, return ? PutValue(_lhs_, _v_). + 1. If _envRecord_ is *undefined*, return ? PutValue(_lhs_, _v_). 1. Return ? InitializeReferencedBinding(_lhs_, _v_). BindingElement : BindingPattern Initializer? @@ -9815,11 +9815,11 @@

1. If |Initializer| is present and _v_ is *undefined*, then 1. Let _defaultValue_ be ? Evaluation of |Initializer|. 1. Set _v_ to ? GetValue(_defaultValue_). - 1. Return ? BindingInitialization of |BindingPattern| with arguments _v_ and _environment_. + 1. Return ? BindingInitialization of |BindingPattern| with arguments _v_ and _envRecord_. BindingRestElement : `...` BindingIdentifier - 1. Let _lhs_ be ? ResolveBinding(StringValue of |BindingIdentifier|, _environment_). + 1. Let _lhs_ be ? ResolveBinding(StringValue of |BindingIdentifier|, _envRecord_). 1. Let _array_ be ! ArrayCreate(0). 1. Let _n_ be 0. 1. Repeat, @@ -9827,7 +9827,7 @@

1. If _iteratorRecord_.[[Done]] is *false*, then 1. Set _next_ to ? IteratorStepValue(_iteratorRecord_). 1. If _next_ is ~done~, then - 1. If _environment_ is *undefined*, return ? PutValue(_lhs_, _array_). + 1. If _envRecord_ is *undefined*, return ? PutValue(_lhs_, _array_). 1. Return ? InitializeReferencedBinding(_lhs_, _array_). 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_n_)), _next_). 1. Set _n_ to _n_ + 1. @@ -9841,7 +9841,7 @@

1. If _iteratorRecord_.[[Done]] is *false*, then 1. Set _next_ to ? IteratorStepValue(_iteratorRecord_). 1. If _next_ is ~done~, then - 1. Return ? BindingInitialization of |BindingPattern| with arguments _array_ and _environment_. + 1. Return ? BindingInitialization of |BindingPattern| with arguments _array_ and _envRecord_. 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_n_)), _next_). 1. Set _n_ to _n_ + 1. @@ -9851,13 +9851,13 @@

FormalParameters : FormalParameterList `,` FunctionRestParameter - 1. Perform ? IteratorBindingInitialization of |FormalParameterList| with arguments _iteratorRecord_ and _environment_. - 1. Return ? IteratorBindingInitialization of |FunctionRestParameter| with arguments _iteratorRecord_ and _environment_. + 1. Perform ? IteratorBindingInitialization of |FormalParameterList| with arguments _iteratorRecord_ and _envRecord_. + 1. Return ? IteratorBindingInitialization of |FunctionRestParameter| with arguments _iteratorRecord_ and _envRecord_. FormalParameterList : FormalParameterList `,` FormalParameter - 1. Perform ? IteratorBindingInitialization of |FormalParameterList| with arguments _iteratorRecord_ and _environment_. - 1. Return ? IteratorBindingInitialization of |FormalParameter| with arguments _iteratorRecord_ and _environment_. + 1. Perform ? IteratorBindingInitialization of |FormalParameterList| with arguments _iteratorRecord_ and _envRecord_. + 1. Return ? IteratorBindingInitialization of |FormalParameter| with arguments _iteratorRecord_ and _envRecord_. ArrowParameters : BindingIdentifier @@ -9866,12 +9866,12 @@

1. Let _next_ be ? IteratorStepValue(_iteratorRecord_). 1. If _next_ is not ~done~, then 1. Set _v_ to _next_. - 1. Return ? BindingInitialization of |BindingIdentifier| with arguments _v_ and _environment_. + 1. Return ? BindingInitialization of |BindingIdentifier| with arguments _v_ and _envRecord_. ArrowParameters : CoverParenthesizedExpressionAndArrowParameterList 1. Let _formals_ be the |ArrowFormalParameters| that is covered by |CoverParenthesizedExpressionAndArrowParameterList|. - 1. Return ? IteratorBindingInitialization of _formals_ with arguments _iteratorRecord_ and _environment_. + 1. Return ? IteratorBindingInitialization of _formals_ with arguments _iteratorRecord_ and _envRecord_. AsyncArrowBindingIdentifier : BindingIdentifier @@ -9882,7 +9882,7 @@

1. Let _next_ be ? IteratorStepValue(_iteratorRecord_). 1. If _next_ is not ~done~, then 1. Set _v_ to _next_. - 1. Return ? BindingInitialization of |BindingIdentifier| with arguments _v_ and _environment_. + 1. Return ? BindingInitialization of |BindingIdentifier| with arguments _v_ and _envRecord_. @@ -10086,8 +10086,8 @@

Static Semantics: PropName ( ): a String or ~empty~

LiteralPropertyName : NumericLiteral - 1. Let _nbr_ be the NumericValue of |NumericLiteral|. - 1. Return ! ToString(_nbr_). + 1. Let _number_ be the NumericValue of |NumericLiteral|. + 1. Return ! ToString(_number_). ComputedPropertyName : `[` AssignmentExpression `]` @@ -10352,13 +10352,13 @@

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
description
It determines if the argument identifier is one of the identifiers bound by the record.
- 1. If _envRec_ has a binding for _name_, return *true*. + 1. If _envRecord_ has a binding for _name_, return *true*. 1. Return *false*. @@ -10372,14 +10372,14 @@

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
description
It creates a new mutable binding for the name _name_ that is uninitialized. A binding must not already exist in this Environment Record for _name_. If _deletable_ is *true*, the new binding is marked as being subject to deletion.
- 1. Assert: _envRec_ does not already have a binding for _name_. - 1. Create a mutable binding in _envRec_ for _name_ and record that it is uninitialized. If _deletable_ is *true*, record that the newly created binding may be deleted by a subsequent DeleteBinding call. + 1. Assert: _envRecord_ does not already have a binding for _name_. + 1. Create a mutable binding in _envRecord_ for _name_ and record that it is uninitialized. If _deletable_ is *true*, record that the newly created binding may be deleted by a subsequent DeleteBinding call. 1. Return ~unused~. @@ -10393,14 +10393,14 @@

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
description
It creates a new immutable binding for the name _name_ that is uninitialized. A binding must not already exist in this Environment Record for _name_. If _strict_ is *true*, the new binding is marked as a strict binding.
- 1. Assert: _envRec_ does not already have a binding for _name_. - 1. Create an immutable binding in _envRec_ for _name_ and record that it is uninitialized. If _strict_ is *true*, record that the newly created binding is a strict binding. + 1. Assert: _envRecord_ does not already have a binding for _name_. + 1. Create an immutable binding in _envRecord_ for _name_ and record that it is uninitialized. If _strict_ is *true*, record that the newly created binding is a strict binding. 1. Return ~unused~. @@ -10414,15 +10414,15 @@

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
description
It is used to set the bound value of the current binding of the identifier whose name is _name_ to the value _value_. An uninitialized binding for _name_ must already exist.
- 1. Assert: _envRec_ must have an uninitialized binding for _name_. - 1. Set the bound value for _name_ in _envRec_ to _value_. - 1. Record that the binding for _name_ in _envRec_ has been initialized. + 1. Assert: _envRecord_ must have an uninitialized binding for _name_. + 1. Set the bound value for _name_ in _envRecord_ to _value_. + 1. Record that the binding for _name_ in _envRecord_ has been initialized. 1. Return ~unused~. @@ -10437,21 +10437,21 @@

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
description
It attempts to change the bound value of the current binding of the identifier whose name is _name_ to the value _value_. A binding for _name_ normally already exists, but in rare cases it may not. If the binding is an immutable binding, a *TypeError* is thrown if _strict_ is *true*.
- 1. [id="step-setmutablebinding-missing-binding"] If _envRec_ does not have a binding for _name_, then + 1. [id="step-setmutablebinding-missing-binding"] If _envRecord_ does not have a binding for _name_, then 1. If _strict_ is *true*, throw a *ReferenceError* exception. - 1. Perform ! _envRec_.CreateMutableBinding(_name_, *true*). - 1. Perform ! _envRec_.InitializeBinding(_name_, _value_). + 1. Perform ! _envRecord_.CreateMutableBinding(_name_, *true*). + 1. Perform ! _envRecord_.InitializeBinding(_name_, _value_). 1. Return ~unused~. - 1. If the binding for _name_ in _envRec_ is a strict binding, set _strict_ to *true*. - 1. If the binding for _name_ in _envRec_ has not yet been initialized, then + 1. If the binding for _name_ in _envRecord_ is a strict binding, set _strict_ to *true*. + 1. If the binding for _name_ in _envRecord_ has not yet been initialized, then 1. Throw a *ReferenceError* exception. - 1. Else if the binding for _name_ in _envRec_ is a mutable binding, then + 1. Else if the binding for _name_ in _envRecord_ is a mutable binding, then 1. Change its bound value to _value_. 1. Else, 1. Assert: This is an attempt to change the value of an immutable binding. @@ -10473,15 +10473,15 @@

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
description
It returns the value of its bound identifier whose name is _name_. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _strict_.
- 1. Assert: _envRec_ has a binding for _name_. - 1. If the binding for _name_ in _envRec_ is an uninitialized binding, throw a *ReferenceError* exception. - 1. Return the value currently bound to _name_ in _envRec_. + 1. Assert: _envRecord_ has a binding for _name_. + 1. If the binding for _name_ in _envRecord_ is an uninitialized binding, throw a *ReferenceError* exception. + 1. Return the value currently bound to _name_ in _envRecord_. @@ -10493,15 +10493,15 @@

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
description
It can only delete bindings that have been explicitly designated as being subject to deletion.
- 1. Assert: _envRec_ has a binding for _name_. - 1. If the binding for _name_ in _envRec_ cannot be deleted, return *false*. - 1. Remove the binding for _name_ from _envRec_. + 1. Assert: _envRecord_ has a binding for _name_. + 1. If the binding for _name_ in _envRecord_ cannot be deleted, return *false*. + 1. Remove the binding for _name_ from _envRecord_. 1. Return *true*. @@ -10510,7 +10510,7 @@

HasThisBinding ( ): *false*

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
1. Return *false*. @@ -10529,7 +10529,7 @@

GetThisBinding ( )

HasSuperBinding ( ): *false*

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
1. Return *false*. @@ -10543,7 +10543,7 @@

HasSuperBinding ( ): *false*

WithBaseObject ( ): *undefined*

for
-
a Declarative Environment Record _envRec_
+
a Declarative Environment Record _envRecord_
1. Return *undefined*. @@ -10604,17 +10604,17 @@

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
description
It determines if its associated binding object has a property whose name is _name_.
- 1. Let _bindingObject_ be _envRec_.[[BindingObject]]. - 1. Let _foundBinding_ be ? HasProperty(_bindingObject_, _name_). + 1. Let _bindingObj_ be _envRecord_.[[BindingObject]]. + 1. Let _foundBinding_ be ? HasProperty(_bindingObj_, _name_). 1. If _foundBinding_ is *false*, return *false*. - 1. If _envRec_.[[IsWithEnvironment]] is *false*, return *true*. - 1. Let _unscopables_ be ? Get(_bindingObject_, %Symbol.unscopables%). + 1. If _envRecord_.[[IsWithEnvironment]] is *false*, return *true*. + 1. Let _unscopables_ be ? Get(_bindingObj_, %Symbol.unscopables%). 1. If _unscopables_ is an Object, then 1. Let _blocked_ be ToBoolean(? Get(_unscopables_, _name_)). 1. If _blocked_ is *true*, return *false*. @@ -10631,18 +10631,18 @@

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
description
It creates in an Environment Record's associated binding object a property whose name is _name_ and initializes it to the value *undefined*. If _deletable_ is *true*, the new property's [[Configurable]] attribute is set to *true*; otherwise it is set to *false*.
- 1. Let _bindingObject_ be _envRec_.[[BindingObject]]. - 1. Perform ? DefinePropertyOrThrow(_bindingObject_, _name_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _deletable_ }). + 1. Let _bindingObj_ be _envRecord_.[[BindingObject]]. + 1. Perform ? DefinePropertyOrThrow(_bindingObj_, _name_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _deletable_ }). 1. Return ~unused~. -

Normally _envRec_ will not have a binding for _name_ but if it does, the semantics of DefinePropertyOrThrow may result in an existing binding being replaced or shadowed or cause an abrupt completion to be returned.

+

Normally _envRecord_ will not have a binding for _name_ but if it does, the semantics of DefinePropertyOrThrow may result in an existing binding being replaced or shadowed or cause an abrupt completion to be returned.

@@ -10660,13 +10660,13 @@

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
description
It is used to set the bound value of the current binding of the identifier whose name is _name_ to the value _value_.
- 1. Perform ? _envRec_.SetMutableBinding(_name_, _value_, *false*). + 1. Perform ? _envRecord_.SetMutableBinding(_name_, _value_, *false*). 1. Return ~unused~. @@ -10684,16 +10684,16 @@

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
description
It attempts to set the value of the Environment Record's associated binding object's property whose name is _name_ to the value _value_. A property named _name_ normally already exists but if it does not or is not currently writable, error handling is determined by _strict_.
- 1. Let _bindingObject_ be _envRec_.[[BindingObject]]. - 1. Let _stillExists_ be ? HasProperty(_bindingObject_, _name_). + 1. Let _bindingObj_ be _envRecord_.[[BindingObject]]. + 1. Let _stillExists_ be ? HasProperty(_bindingObj_, _name_). 1. If _stillExists_ is *false* and _strict_ is *true*, throw a *ReferenceError* exception. - 1. Perform ? Set(_bindingObject_, _name_, _value_, _strict_). + 1. Perform ? Set(_bindingObj_, _name_, _value_, _strict_). 1. Return ~unused~. @@ -10707,18 +10707,18 @@

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
description
It returns the value of its associated binding object's property whose name is _name_. The property should already exist but if it does not the result depends upon _strict_.
- 1. Let _bindingObject_ be _envRec_.[[BindingObject]]. - 1. Let _value_ be ? HasProperty(_bindingObject_, _name_). + 1. Let _bindingObj_ be _envRecord_.[[BindingObject]]. + 1. Let _value_ be ? HasProperty(_bindingObj_, _name_). 1. If _value_ is *false*, then 1. If _strict_ is *false*, return *undefined*. 1. Throw a *ReferenceError* exception. - 1. Return ? Get(_bindingObject_, _name_). + 1. Return ? Get(_bindingObj_, _name_). @@ -10730,14 +10730,14 @@

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
description
It can only delete bindings that correspond to properties of the environment object whose [[Configurable]] attribute have the value *true*.
- 1. Let _bindingObject_ be _envRec_.[[BindingObject]]. - 1. Return ? _bindingObject_.[[Delete]](_name_). + 1. Let _bindingObj_ be _envRecord_.[[BindingObject]]. + 1. Return ? _bindingObj_.[[Delete]](_name_). @@ -10745,7 +10745,7 @@

HasThisBinding ( ): *false*

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
1. Return *false*. @@ -10764,7 +10764,7 @@

GetThisBinding ( )

HasSuperBinding ( ): *false*

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
1. Return *false*. @@ -10778,10 +10778,10 @@

HasSuperBinding ( ): *false*

WithBaseObject ( ): an Object or *undefined*

for
-
an Object Environment Record _envRec_
+
an Object Environment Record _envRecord_
- 1. If _envRec_.[[IsWithEnvironment]] is *true*, return _envRec_.[[BindingObject]]. + 1. If _envRecord_.[[IsWithEnvironment]] is *true*, return _envRecord_.[[BindingObject]]. 1. Return *undefined*. @@ -10857,19 +10857,19 @@

Function Environment Records

BindThisValue ( - _envRec_: a Function Environment Record, + _envRecord_: a Function Environment Record, _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

description
-
It sets the _envRec_.[[ThisValue]] and records that it has been initialized.
+
It sets the _envRecord_.[[ThisValue]] and records that it has been initialized.
- 1. Assert: _envRec_.[[ThisBindingStatus]] is not ~lexical~. - 1. If _envRec_.[[ThisBindingStatus]] is ~initialized~, throw a *ReferenceError* exception. - 1. Set _envRec_.[[ThisValue]] to _value_. - 1. Set _envRec_.[[ThisBindingStatus]] to ~initialized~. + 1. Assert: _envRecord_.[[ThisBindingStatus]] is not ~lexical~. + 1. If _envRecord_.[[ThisBindingStatus]] is ~initialized~, throw a *ReferenceError* exception. + 1. Set _envRecord_.[[ThisValue]] to _value_. + 1. Set _envRecord_.[[ThisBindingStatus]] to ~initialized~. 1. Return ~unused~.
@@ -10878,10 +10878,10 @@

HasThisBinding ( ): a Boolean

for
-
a Function Environment Record _envRec_
+
a Function Environment Record _envRecord_
- 1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*. + 1. If _envRecord_.[[ThisBindingStatus]] is ~lexical~, return *false*. 1. Return *true*. @@ -10890,12 +10890,12 @@

HasThisBinding ( ): a Boolean

GetThisBinding ( ): either a normal completion containing an ECMAScript language value or a throw completion

for
-
a Function Environment Record _envRec_
+
a Function Environment Record _envRecord_
- 1. Assert: _envRec_.[[ThisBindingStatus]] is not ~lexical~. - 1. If _envRec_.[[ThisBindingStatus]] is ~uninitialized~, throw a *ReferenceError* exception. - 1. Return _envRec_.[[ThisValue]]. + 1. Assert: _envRecord_.[[ThisBindingStatus]] is not ~lexical~. + 1. If _envRecord_.[[ThisBindingStatus]] is ~uninitialized~, throw a *ReferenceError* exception. + 1. Return _envRecord_.[[ThisValue]]. @@ -10903,11 +10903,11 @@

GetThisBinding ( ): either a normal completion containing an ECMAScript lang

HasSuperBinding ( ): a Boolean

for
-
a Function Environment Record _envRec_
+
a Function Environment Record _envRecord_
- 1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*. - 1. If _envRec_.[[FunctionObject]].[[HomeObject]] is *undefined*, return *false*. + 1. If _envRecord_.[[ThisBindingStatus]] is ~lexical~, return *false*. + 1. If _envRecord_.[[FunctionObject]].[[HomeObject]] is *undefined*, return *false*. 1. Return *true*. @@ -10915,15 +10915,15 @@

HasSuperBinding ( ): a Boolean

GetSuperBase ( - _envRec_: a Function Environment Record, + _envRecord_: a Function Environment Record, ): an Object, *null*, or *undefined*

description
-
It returns the object that is the base for `super` property accesses bound in _envRec_. The value *undefined* indicates that such accesses will produce runtime errors.
+
It returns the object that is the base for `super` property accesses bound in _envRecord_. The value *undefined* indicates that such accesses will produce runtime errors.
- 1. Let _home_ be _envRec_.[[FunctionObject]].[[HomeObject]]. + 1. Let _home_ be _envRecord_.[[FunctionObject]].[[HomeObject]]. 1. If _home_ is *undefined*, return *undefined*. 1. Assert: _home_ is an ordinary object. 1. Return ! _home_.[[GetPrototypeOf]](). @@ -10996,16 +10996,16 @@

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
description
It determines if the argument identifier is one of the identifiers bound by the record.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, return *true*. - 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _objectRecord_.HasBinding(_name_). + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Return ? _objRecord_.HasBinding(_name_).
@@ -11018,13 +11018,13 @@

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
description
It creates a new mutable binding for the name _name_ that is uninitialized. The binding is created in the associated DeclarativeRecord. A binding for _name_ must not already exist in the DeclarativeRecord. If _deletable_ is *true*, the new binding is marked as being subject to deletion.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, throw a *TypeError* exception. 1. Return ! _declarativeRecord_.CreateMutableBinding(_name_, _deletable_). @@ -11039,13 +11039,13 @@

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
description
It creates a new immutable binding for the name _name_ that is uninitialized. A binding must not already exist in this Environment Record for _name_. If _strict_ is *true*, the new binding is marked as a strict binding.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, throw a *TypeError* exception. 1. Return ! _declarativeRecord_.CreateImmutableBinding(_name_, _strict_). @@ -11060,18 +11060,18 @@

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
description
It is used to set the bound value of the current binding of the identifier whose name is _name_ to the value _value_. An uninitialized binding for _name_ must already exist.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, then 1. Return ! _declarativeRecord_.InitializeBinding(_name_, _value_). 1. Assert: If the binding exists, it must be in the Object Environment Record. - 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _objectRecord_.InitializeBinding(_name_, _value_). + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Return ? _objRecord_.InitializeBinding(_name_, _value_). @@ -11085,17 +11085,17 @@

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
description
It attempts to change the bound value of the current binding of the identifier whose name is _name_ to the value _value_. If the binding is an immutable binding and _strict_ is *true*, a *TypeError* is thrown. A binding named _name_ normally already exists but if it does not or is not currently writable, error handling is determined by _strict_.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, then 1. Return ? _declarativeRecord_.SetMutableBinding(_name_, _value_, _strict_). - 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _objectRecord_.SetMutableBinding(_name_, _value_, _strict_). + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Return ? _objRecord_.SetMutableBinding(_name_, _value_, _strict_). @@ -11108,17 +11108,17 @@

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
description
It returns the value of its bound identifier whose name is _name_. If the binding is an uninitialized binding, it will throw a *ReferenceError* exception. A binding named _name_ normally already exists but if it does not or is not currently writable, error handling is determined by _strict_.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, then 1. Return ? _declarativeRecord_.GetBindingValue(_name_, _strict_). - 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _objectRecord_.GetBindingValue(_name_, _strict_). + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Return ? _objRecord_.GetBindingValue(_name_, _strict_). @@ -11130,20 +11130,20 @@

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
description
It can only delete bindings that have been explicitly designated as being subject to deletion.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, then 1. Return ! _declarativeRecord_.DeleteBinding(_name_). - 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _objectRecord_.[[BindingObject]]. - 1. Let _existingProp_ be ? HasOwnProperty(_globalObject_, _name_). - 1. If _existingProp_ is *true*, then - 1. Return ? _objectRecord_.DeleteBinding(_name_). + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Let _globalObj_ be _objRecord_.[[BindingObject]]. + 1. Let _existingProperty_ be ? HasOwnProperty(_globalObj_, _name_). + 1. If _existingProperty_ is *true*, then + 1. Return ? _objRecord_.DeleteBinding(_name_). 1. Return *true*. @@ -11152,7 +11152,7 @@

HasThisBinding ( ): *true*

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
1. Return *true*. @@ -11166,10 +11166,10 @@

HasThisBinding ( ): *true*

GetThisBinding ( ): a normal completion containing an Object

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
- 1. Return _envRec_.[[GlobalThisValue]]. + 1. Return _envRecord_.[[GlobalThisValue]]. @@ -11177,7 +11177,7 @@

GetThisBinding ( ): a normal completion containing an Object

HasSuperBinding ( ): *false*

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
1. Return *false*. @@ -11191,7 +11191,7 @@

HasSuperBinding ( ): *false*

WithBaseObject ( ): *undefined*

for
-
a Global Environment Record _envRec_
+
a Global Environment Record _envRecord_
1. Return *undefined*. @@ -11201,16 +11201,16 @@

WithBaseObject ( ): *undefined*

HasLexicalDeclaration ( - _envRec_: a Global Environment Record, + _envRecord_: a Global Environment Record, _name_: a String, ): a Boolean

description
-
It determines if the argument identifier has a binding in _envRec_ that was created using a lexical declaration such as a |LexicalDeclaration| or a |ClassDeclaration|.
+
It determines if the argument identifier has a binding in _envRecord_ that was created using a lexical declaration such as a |LexicalDeclaration| or a |ClassDeclaration|.
- 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Let _declarativeRecord_ be _envRecord_.[[DeclarativeRecord]]. 1. Return ! _declarativeRecord_.HasBinding(_name_).
@@ -11218,7 +11218,7 @@

HasRestrictedGlobalProperty ( - _envRec_: a Global Environment Record, + _envRecord_: a Global Environment Record, _name_: a String, ): either a normal completion containing a Boolean or a throw completion

@@ -11227,11 +11227,11 @@

It determines if the argument identifier is the name of a property of the global object that must not be shadowed by a global lexical binding.
- 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _objectRecord_.[[BindingObject]]. - 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_name_). - 1. If _existingProp_ is *undefined*, return *false*. - 1. If _existingProp_.[[Configurable]] is *true*, return *false*. + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Let _globalObj_ be _objRecord_.[[BindingObject]]. + 1. Let _existingProperty_ be ? _globalObj_.[[GetOwnProperty]](_name_). + 1. If _existingProperty_ is *undefined*, return *false*. + 1. If _existingProperty_.[[Configurable]] is *true*, return *false*. 1. Return *true*. @@ -11242,7 +11242,7 @@

CanDeclareGlobalVar ( - _envRec_: a Global Environment Record, + _envRecord_: a Global Environment Record, _name_: a String, ): either a normal completion containing a Boolean or a throw completion

@@ -11251,18 +11251,18 @@

It determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument _name_. Redundant var declarations and var declarations for pre-existing global object properties are allowed.
- 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _objectRecord_.[[BindingObject]]. - 1. Let _hasProperty_ be ? HasOwnProperty(_globalObject_, _name_). + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Let _globalObj_ be _objRecord_.[[BindingObject]]. + 1. Let _hasProperty_ be ? HasOwnProperty(_globalObj_, _name_). 1. If _hasProperty_ is *true*, return *true*. - 1. Return ? IsExtensible(_globalObject_). + 1. Return ? IsExtensible(_globalObj_).

CanDeclareGlobalFunction ( - _envRec_: a Global Environment Record, + _envRecord_: a Global Environment Record, _name_: a String, ): either a normal completion containing a Boolean or a throw completion

@@ -11271,12 +11271,12 @@

It determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _name_.
- 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _objectRecord_.[[BindingObject]]. - 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_name_). - 1. If _existingProp_ is *undefined*, return ? IsExtensible(_globalObject_). - 1. If _existingProp_.[[Configurable]] is *true*, return *true*. - 1. If IsDataDescriptor(_existingProp_) is *true* and _existingProp_ has attribute values { [[Writable]]: *true*, [[Enumerable]]: *true* }, return *true*. + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Let _globalObj_ be _objRecord_.[[BindingObject]]. + 1. Let _existingProperty_ be ? _globalObj_.[[GetOwnProperty]](_name_). + 1. If _existingProperty_ is *undefined*, return ? IsExtensible(_globalObj_). + 1. If _existingProperty_.[[Configurable]] is *true*, return *true*. + 1. If IsDataDescriptor(_existingProperty_) is *true* and _existingProperty_ has attribute values { [[Writable]]: *true*, [[Enumerable]]: *true* }, return *true*. 1. Return *false*. @@ -11284,7 +11284,7 @@

CreateGlobalVarBinding ( - _envRec_: a Global Environment Record, + _envRecord_: a Global Environment Record, _name_: a String, _deletable_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion @@ -11294,13 +11294,13 @@

It creates and initializes a mutable binding in the associated Object Environment Record. If a binding already exists, it is reused and assumed to be initialized.
- 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _objectRecord_.[[BindingObject]]. - 1. Let _hasProperty_ be ? HasOwnProperty(_globalObject_, _name_). - 1. Let _extensible_ be ? IsExtensible(_globalObject_). + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Let _globalObj_ be _objRecord_.[[BindingObject]]. + 1. Let _hasProperty_ be ? HasOwnProperty(_globalObj_, _name_). + 1. Let _extensible_ be ? IsExtensible(_globalObj_). 1. If _hasProperty_ is *false* and _extensible_ is *true*, then - 1. Perform ? _objectRecord_.CreateMutableBinding(_name_, _deletable_). - 1. Perform ? _objectRecord_.InitializeBinding(_name_, *undefined*). + 1. Perform ? _objRecord_.CreateMutableBinding(_name_, _deletable_). + 1. Perform ? _objRecord_.InitializeBinding(_name_, *undefined*). 1. Return ~unused~. @@ -11308,7 +11308,7 @@

CreateGlobalFunctionBinding ( - _envRec_: a Global Environment Record, + _envRecord_: a Global Environment Record, _name_: a String, _value_: an ECMAScript language value, _deletable_: a Boolean, @@ -11319,19 +11319,19 @@

It creates and initializes a mutable binding in the associated Object Environment Record. If a binding already exists, it is replaced.
- 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _objectRecord_.[[BindingObject]]. - 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_name_). - 1. If _existingProp_ is *undefined* or _existingProp_.[[Configurable]] is *true*, then - 1. Let _desc_ be the PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _deletable_ }. + 1. Let _objRecord_ be _envRecord_.[[ObjectRecord]]. + 1. Let _globalObj_ be _objRecord_.[[BindingObject]]. + 1. Let _existingProperty_ be ? _globalObj_.[[GetOwnProperty]](_name_). + 1. If _existingProperty_ is *undefined* or _existingProperty_.[[Configurable]] is *true*, then + 1. Let _propertyDesc_ be the PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _deletable_ }. 1. Else, - 1. Let _desc_ be the PropertyDescriptor { [[Value]]: _value_ }. - 1. Perform ? DefinePropertyOrThrow(_globalObject_, _name_, _desc_). - 1. [id="step-createglobalfunctionbinding-set"] Perform ? Set(_globalObject_, _name_, _value_, *false*). + 1. Let _propertyDesc_ be the PropertyDescriptor { [[Value]]: _value_ }. + 1. Perform ? DefinePropertyOrThrow(_globalObj_, _name_, _propertyDesc_). + 1. [id="step-createglobalfunctionbinding-set"] Perform ? Set(_globalObj_, _name_, _value_, *false*). 1. Return ~unused~. -

Global function declarations are always represented as own properties of the global object. If possible, an existing own property is reconfigured to have a standard set of attribute values. Step is equivalent to what calling the InitializeBinding concrete method would do and if _globalObject_ is a Proxy will produce the same sequence of Proxy trap calls.

+

Global function declarations are always represented as own properties of the global object. If possible, an existing own property is reconfigured to have a standard set of attribute values. Step is equivalent to what calling the InitializeBinding concrete method would do and if _globalObj_ is a Proxy will produce the same sequence of Proxy trap calls.

@@ -11350,21 +11350,21 @@

for
-
a Module Environment Record _envRec_
+
a Module Environment Record _envRecord_
description
It returns the value of its bound identifier whose name is _name_. However, if the binding is an indirect binding the value of the target binding is returned. If the binding exists but is uninitialized a *ReferenceError* is thrown.
1. Assert: _strict_ is *true*. - 1. Assert: _envRec_ has a binding for _name_. + 1. Assert: _envRecord_ has a binding for _name_. 1. If the binding for _name_ is an indirect binding, then 1. Let _module_ and _targetName_ be the indirection values provided when this binding for _name_ was created. 1. Let _targetEnv_ be _module_.[[Environment]]. 1. If _targetEnv_ is ~empty~, throw a *ReferenceError* exception. 1. Return ? _targetEnv_.GetBindingValue(_targetName_, *true*). - 1. If the binding for _name_ in _envRec_ is an uninitialized binding, throw a *ReferenceError* exception. - 1. Return the value currently bound to _name_ in _envRec_. + 1. If the binding for _name_ in _envRecord_ is an uninitialized binding, throw a *ReferenceError* exception. + 1. Return the value currently bound to _name_ in _envRecord_.

_strict_ will always be *true* because a |Module| is always strict mode code.

@@ -11383,7 +11383,7 @@

DeleteBinding ( _name_ )

HasThisBinding ( ): *true*

for
-
a Module Environment Record _envRec_
+
a Module Environment Record _envRecord_
1. Return *true*. @@ -11397,7 +11397,7 @@

HasThisBinding ( ): *true*

GetThisBinding ( ): a normal completion containing *undefined*

for
-
a Module Environment Record _envRec_
+
a Module Environment Record _envRecord_
1. Return *undefined*. @@ -11407,7 +11407,7 @@

GetThisBinding ( ): a normal completion containing *undefined*

CreateImportBinding ( - _envRec_: a Module Environment Record, + _envRecord_: a Module Environment Record, _name_: a String, _targetModule_: a Module Record, _targetName_: a String, @@ -11415,12 +11415,12 @@

description
-
It creates a new initialized immutable indirect binding for the name _name_. A binding must not already exist in _envRec_ for _name_. _targetName_ is the name of a binding that exists in _targetModule_'s Module Environment Record. Accesses to the value of the new binding will indirectly access the bound value of the target binding.
+
It creates a new initialized immutable indirect binding for the name _name_. A binding must not already exist in _envRecord_ for _name_. _targetName_ is the name of a binding that exists in _targetModule_'s Module Environment Record. Accesses to the value of the new binding will indirectly access the bound value of the target binding.
- 1. Assert: _envRec_ does not already have a binding for _name_. + 1. Assert: _envRecord_ does not already have a binding for _name_. 1. Assert: When _targetModule_.[[Environment]] is instantiated, it will have a direct binding for _targetName_. - 1. Create an immutable indirect binding in _envRec_ for _name_ that references _targetModule_ and _targetName_ as its target binding and record that the binding is initialized. + 1. Create an immutable indirect binding in _envRecord_ for _name_ that references _targetModule_ and _targetName_ as its target binding and record that the binding is initialized. 1. Return ~unused~.
@@ -11434,7 +11434,7 @@

Environment Record Operations

GetIdentifierReference ( - _env_: an Environment Record or *null*, + _envRecord_: an Environment Record or *null*, _name_: a String, _strict_: a Boolean, ): either a normal completion containing a Reference Record or a throw completion @@ -11442,12 +11442,12 @@

- 1. If _env_ is *null*, then + 1. If _envRecord_ is *null*, then 1. Return the Reference Record { [[Base]]: ~unresolvable~, [[ReferencedName]]: _name_, [[Strict]]: _strict_, [[ThisValue]]: ~empty~ }. - 1. Let _exists_ be ? _env_.HasBinding(_name_). + 1. Let _exists_ be ? _envRecord_.HasBinding(_name_). 1. If _exists_ is *true*, then - 1. Return the Reference Record { [[Base]]: _env_, [[ReferencedName]]: _name_, [[Strict]]: _strict_, [[ThisValue]]: ~empty~ }. - 1. Let _outer_ be _env_.[[OuterEnv]]. + 1. Return the Reference Record { [[Base]]: _envRecord_, [[ReferencedName]]: _name_, [[Strict]]: _strict_, [[ThisValue]]: ~empty~ }. + 1. Let _outer_ be _envRecord_.[[OuterEnv]]. 1. Return ? GetIdentifierReference(_outer_, _name_, _strict_). @@ -11461,9 +11461,9 @@

- 1. Let _env_ be a new Declarative Environment Record containing no bindings. - 1. Set _env_.[[OuterEnv]] to _outerEnv_. - 1. Return _env_. + 1. Let _envRecord_ be a new Declarative Environment Record containing no bindings. + 1. Set _envRecord_.[[OuterEnv]] to _outerEnv_. + 1. Return _envRecord_. @@ -11471,18 +11471,18 @@

NewObjectEnvironment ( _obj_: an Object, - _isWithEnvironment_: a Boolean, + _isWithEnv_: a Boolean, _outerEnv_: an Environment Record or *null*, ): an Object Environment Record

- 1. Let _env_ be a new Object Environment Record. - 1. Set _env_.[[BindingObject]] to _obj_. - 1. Set _env_.[[IsWithEnvironment]] to _isWithEnvironment_. - 1. Set _env_.[[OuterEnv]] to _outerEnv_. - 1. Return _env_. + 1. Let _envRecord_ be a new Object Environment Record. + 1. Set _envRecord_.[[BindingObject]] to _obj_. + 1. Set _envRecord_.[[IsWithEnvironment]] to _isWithEnv_. + 1. Set _envRecord_.[[OuterEnv]] to _outerEnv_. + 1. Return _envRecord_.
@@ -11496,13 +11496,13 @@

- 1. Let _env_ be a new Function Environment Record containing no bindings. - 1. Set _env_.[[FunctionObject]] to _func_. - 1. If _func_.[[ThisMode]] is ~lexical~, set _env_.[[ThisBindingStatus]] to ~lexical~. - 1. Else, set _env_.[[ThisBindingStatus]] to ~uninitialized~. - 1. Set _env_.[[NewTarget]] to _newTarget_. - 1. Set _env_.[[OuterEnv]] to _func_.[[Environment]]. - 1. Return _env_. + 1. Let _envRecord_ be a new Function Environment Record containing no bindings. + 1. Set _envRecord_.[[FunctionObject]] to _func_. + 1. If _func_.[[ThisMode]] is ~lexical~, set _envRecord_.[[ThisBindingStatus]] to ~lexical~. + 1. Else, set _envRecord_.[[ThisBindingStatus]] to ~uninitialized~. + 1. Set _envRecord_.[[NewTarget]] to _newTarget_. + 1. Set _envRecord_.[[OuterEnv]] to _func_.[[Environment]]. + 1. Return _envRecord_. @@ -11516,14 +11516,14 @@

- 1. Let _objRec_ be NewObjectEnvironment(_obj_, *false*, *null*). - 1. Let _dclRec_ be NewDeclarativeEnvironment(*null*). - 1. Let _env_ be a new Global Environment Record. - 1. Set _env_.[[ObjectRecord]] to _objRec_. - 1. Set _env_.[[GlobalThisValue]] to _thisValue_. - 1. Set _env_.[[DeclarativeRecord]] to _dclRec_. - 1. Set _env_.[[OuterEnv]] to *null*. - 1. Return _env_. + 1. Let _objRecord_ be NewObjectEnvironment(_obj_, *false*, *null*). + 1. Let _declarativeRecord_ be NewDeclarativeEnvironment(*null*). + 1. Let _envRecord_ be a new Global Environment Record. + 1. Set _envRecord_.[[ObjectRecord]] to _objRecord_. + 1. Set _envRecord_.[[GlobalThisValue]] to _thisValue_. + 1. Set _envRecord_.[[DeclarativeRecord]] to _declarativeRecord_. + 1. Set _envRecord_.[[OuterEnv]] to *null*. + 1. Return _envRecord_. @@ -11536,9 +11536,9 @@

- 1. Let _env_ be a new Module Environment Record containing no bindings. - 1. Set _env_.[[OuterEnv]] to _outerEnv_. - 1. Return _env_. + 1. Let _envRecord_ be a new Module Environment Record containing no bindings. + 1. Set _envRecord_.[[OuterEnv]] to _outerEnv_. + 1. Return _envRecord_. @@ -11617,9 +11617,9 @@

1. Let _names_ be _privateEnv_.[[Names]]. - 1. For each Private Name _pn_ of _names_, do - 1. If _pn_.[[Description]] is _identifier_, then - 1. Return _pn_. + 1. For each Private Name _privateName_ of _names_, do + 1. If _privateName_.[[Description]] is _identifier_, then + 1. Return _privateName_. 1. Let _outerPrivateEnv_ be _privateEnv_.[[OuterPrivateEnvironment]]. 1. Assert: _outerPrivateEnv_ is not *null*. 1. Return ResolvePrivateIdentifier(_outerPrivateEnv_, _identifier_). @@ -11764,15 +11764,15 @@

InitializeHostDefinedRealm ( ): either a normal completion containing ~unuse

CreateIntrinsics ( - _realmRec_: a Realm Record, + _realmRecord_: a Realm Record, ): ~unused~

- 1. Set _realmRec_.[[Intrinsics]] to a new Record. - 1. [declared="steps,name,length,slots,prototype,async"] Set fields of _realmRec_.[[Intrinsics]] with the values listed in . The field names are the names listed in the “Intrinsic Name” column of the table. The value of each field is a new object value fully and recursively populated with property values as defined by the specification of each object in clauses through . All object property values are newly created object values. All values that are built-in function objects are created by performing CreateBuiltinFunction(_steps_, _length_, _name_, _slots_, _realmRec_, _prototype_, _async_) where _steps_ is the definition of that function provided by this specification, _name_ is the initial value of the function's *"name"* property, _length_ is the initial value of the function's *"length"* property, _slots_ is a list of the names, if any, of the function's specified internal slots, _prototype_ is the specified value of the function's [[Prototype]] internal slot, and _async_ is *true* if the function is described as “async” and *false* otherwise. The creation of the intrinsics and their properties must be ordered to avoid any dependencies upon objects that have not yet been created. - 1. Perform AddRestrictedFunctionProperties(_realmRec_.[[Intrinsics]].[[%Function.prototype%]], _realmRec_). + 1. Set _realmRecord_.[[Intrinsics]] to a new Record. + 1. [declared="steps,name,length,slots,proto,async"] Set fields of _realmRecord_.[[Intrinsics]] with the values listed in . The field names are the names listed in the “Intrinsic Name” column of the table. The value of each field is a new object value fully and recursively populated with property values as defined by the specification of each object in clauses through . All object property values are newly created object values. All values that are built-in function objects are created by performing CreateBuiltinFunction(_steps_, _length_, _name_, _slots_, _realmRecord_, _proto_, _async_) where _steps_ is the definition of that function provided by this specification, _name_ is the initial value of the function's *"name"* property, _length_ is the initial value of the function's *"length"* property, _slots_ is a list of the names, if any, of the function's specified internal slots, _proto_ is the specified value of the function's [[Prototype]] internal slot, and _async_ is *true* if the function is described as “async” and *false* otherwise. The creation of the intrinsics and their properties must be ordered to avoid any dependencies upon objects that have not yet been created. + 1. Perform AddRestrictedFunctionProperties(_realmRecord_.[[Intrinsics]].[[%Function.prototype%]], _realmRecord_). 1. Return ~unused~.
@@ -11780,17 +11780,17 @@

SetDefaultGlobalBindings ( - _realmRec_: a Realm Record, + _realmRecord_: a Realm Record, ): either a normal completion containing ~unused~ or a throw completion

- 1. Let _global_ be _realmRec_.[[GlobalObject]]. + 1. Let _global_ be _realmRecord_.[[GlobalObject]]. 1. For each property of the Global Object specified in clause , do 1. Let _name_ be the String value of the property name. - 1. Let _desc_ be the fully populated data Property Descriptor for the property, containing the specified attributes for the property. For properties listed in , , or the value of the [[Value]] attribute is the corresponding intrinsic object from _realmRec_. - 1. Perform ? DefinePropertyOrThrow(_global_, _name_, _desc_). + 1. Let _propertyDesc_ be the fully populated data Property Descriptor for the property, containing the specified attributes for the property. For properties listed in , , or the value of the [[Value]] attribute is the corresponding intrinsic object from _realmRecord_. + 1. Perform ? DefinePropertyOrThrow(_global_, _name_, _propertyDesc_). 1. Return ~unused~.
@@ -11924,9 +11924,9 @@

GetActiveScriptOrModule ( ): a Script Record, a Module Record, or *null*

1. If the execution context stack is empty, return *null*. - 1. Let _ec_ be the topmost execution context on the execution context stack whose ScriptOrModule component is not *null*. + 1. Let _executionContext_ be the topmost execution context on the execution context stack whose ScriptOrModule component is not *null*. 1. If no such execution context exists, return *null*. - 1. Return _ec_'s ScriptOrModule. + 1. Return _executionContext_'s ScriptOrModule.
@@ -11934,19 +11934,19 @@

GetActiveScriptOrModule ( ): a Script Record, a Module Record, or *null*

ResolveBinding ( _name_: a String, - optional _env_: an Environment Record or *undefined*, + optional _envRecord_: an Environment Record or *undefined*, ): either a normal completion containing a Reference Record or a throw completion

description
-
It is used to determine the binding of _name_. _env_ can be used to explicitly provide the Environment Record that is to be searched for the binding.
+
It is used to determine the binding of _name_. _envRecord_ can be used to explicitly provide the Environment Record that is to be searched for the binding.
- 1. If _env_ is not present or _env_ is *undefined*, then - 1. Set _env_ to the running execution context's LexicalEnvironment. - 1. Assert: _env_ is an Environment Record. + 1. If _envRecord_ is not present or _envRecord_ is *undefined*, then + 1. Set _envRecord_ to the running execution context's LexicalEnvironment. + 1. Assert: _envRecord_ is an Environment Record. 1. Let _strict_ be IsStrict(the syntactic production that is being evaluated). - 1. Return ? GetIdentifierReference(_env_, _name_, _strict_). + 1. Return ? GetIdentifierReference(_envRecord_, _name_, _strict_).

The result of ResolveBinding is always a Reference Record whose [[ReferencedName]] field is _name_.

@@ -11960,13 +11960,13 @@

GetThisEnvironment ( ): an Environment Record

It finds the Environment Record that currently supplies the binding of the keyword `this`.
- 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. 1. [id="step-getthisenvironment-loop"] Repeat, - 1. Let _exists_ be _env_.HasThisBinding(). - 1. If _exists_ is *true*, return _env_. - 1. Let _outer_ be _env_.[[OuterEnv]]. + 1. Let _exists_ be _envRecord_.HasThisBinding(). + 1. If _exists_ is *true*, return _envRecord_. + 1. Let _outer_ be _envRecord_.[[OuterEnv]]. 1. Assert: _outer_ is not *null*. - 1. Set _env_ to _outer_. + 1. Set _envRecord_ to _outer_.

The loop in step will always terminate because the list of environments always ends with the global environment which has a `this` binding.

@@ -11980,8 +11980,8 @@

ResolveThisBinding ( ): either a normal completion containing an ECMAScript
It determines the binding of the keyword `this` using the LexicalEnvironment of the running execution context.
- 1. Let _envRec_ be GetThisEnvironment(). - 1. Return ? _envRec_.GetThisBinding(). + 1. Let _envRecord_ be GetThisEnvironment(). + 1. Return ? _envRecord_.GetThisBinding(). @@ -11992,9 +11992,9 @@

GetNewTarget ( ): an Object or *undefined*

It determines the NewTarget value using the LexicalEnvironment of the running execution context.
- 1. Let _envRec_ be GetThisEnvironment(). - 1. Assert: _envRec_ has a [[NewTarget]] field. - 1. Return _envRec_.[[NewTarget]]. + 1. Let _envRecord_ be GetThisEnvironment(). + 1. Assert: _envRecord_ has a [[NewTarget]] field. + 1. Return _envRecord_.[[NewTarget]].
@@ -12036,7 +12036,7 @@

Jobs and Host Operations to Enqueue Jobs

At any particular time, _scriptOrModule_ (a Script Record, a Module Record, or *null*) is the active script or module if all of the following conditions are true:

  • GetActiveScriptOrModule() is _scriptOrModule_.
  • -
  • If _scriptOrModule_ is a Script Record or Module Record, let _ec_ be the topmost execution context on the execution context stack whose ScriptOrModule component is _scriptOrModule_. The Realm component of _ec_ is _scriptOrModule_.[[Realm]].
  • +
  • If _scriptOrModule_ is a Script Record or Module Record, let _executionContext_ be the topmost execution context on the execution context stack whose ScriptOrModule component is _scriptOrModule_. The Realm component of _executionContext_ is _scriptOrModule_.[[Realm]].

At any particular time, an execution is prepared to evaluate ECMAScript code if all of the following conditions are true:

@@ -12127,14 +12127,14 @@

HostCallJobCallback ( _jobCallback_: a JobCallback Record, _value_: an ECMAScript language value, - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, ): either a normal completion containing an ECMAScript language value or a throw completion

An implementation of HostCallJobCallback must conform to the following requirements:

    -
  • It must perform and return the result of Call(_jobCallback_.[[Callback]], _value_, _argumentsList_).
  • +
  • It must perform and return the result of Call(_jobCallback_.[[Callback]], _value_, _argList_).

This requirement means that hosts cannot change the [[Call]] behaviour of function objects defined in this specification.

@@ -12142,7 +12142,7 @@

The default implementation of HostCallJobCallback performs the following steps when called:

1. Assert: IsCallable(_jobCallback_.[[Callback]]) is *true*. - 1. Return ? Call(_jobCallback_.[[Callback]], _value_, _argumentsList_). + 1. Return ? Call(_jobCallback_.[[Callback]], _value_, _argList_).

ECMAScript hosts that are not web browsers must use the default implementation of HostCallJobCallback.

@@ -12427,7 +12427,7 @@

Objectives

Liveness

-

For some set of objects and/or symbols _objectSet_ a hypothetical WeakRef-oblivious execution with respect to _objectSet_ is an execution whereby the abstract operation WeakRefDeref of a WeakRef whose referent is an element of _objectSet_ always returns *undefined*.

+

For some set of objects and/or symbols _objSet_ a hypothetical WeakRef-oblivious execution with respect to _objSet_ is an execution whereby the abstract operation WeakRefDeref of a WeakRef whose referent is an element of _objSet_ always returns *undefined*.

WeakRef-obliviousness, together with liveness, capture two notions. One, that a WeakRef itself does not keep its referent alive. Two, that cycles in liveness does not imply that a value is live. To be concrete, if determining _v_'s liveness depends on determining the liveness of a WeakRef referent, _r_, _r_'s liveness cannot assume _v_'s liveness, which would be circular reasoning. @@ -12439,14 +12439,14 @@

Liveness

Colloquially, we say that an individual object or symbol is live if every set containing it is live.
-

At any point during evaluation, a set of objects and/or symbols _objectSet_ is considered live if either of the following conditions is met:

+

At any point during evaluation, a set of objects and/or symbols _objSet_ is considered live if either of the following conditions is met:

  • - Any element in _objectSet_ is included in any agent's [[KeptAlive]] List. + Any element in _objSet_ is included in any agent's [[KeptAlive]] List.
  • - There exists a valid future hypothetical WeakRef-oblivious execution with respect to _objectSet_ that observes the identity of any value in _objectSet_. + There exists a valid future hypothetical WeakRef-oblivious execution with respect to _objSet_ that observes the identity of any value in _objSet_.
@@ -12467,18 +12467,18 @@

Liveness

Execution

-

At any time, if a set of objects and/or symbols _objectSet_ is not live, an ECMAScript implementation may perform the following steps atomically:

+

At any time, if a set of objects and/or symbols _objSet_ is not live, an ECMAScript implementation may perform the following steps atomically:

- 1. For each element _value_ of _objectSet_, do + 1. For each element _value_ of _objSet_, do 1. For each WeakRef _ref_ such that _ref_.[[WeakRefTarget]] is _value_, do 1. Set _ref_.[[WeakRefTarget]] to ~empty~. 1. For each FinalizationRegistry _fg_ such that _fg_.[[Cells]] contains a Record _cell_ such that _cell_.[[WeakRefTarget]] is _value_, do 1. Set _cell_.[[WeakRefTarget]] to ~empty~. 1. Optionally, perform HostEnqueueFinalizationRegistryCleanupJob(_fg_). - 1. For each WeakMap _map_ such that _map_.[[WeakMapData]] contains a Record _r_ such that _r_.[[Key]] is _value_, do - 1. Set _r_.[[Key]] to ~empty~. - 1. Set _r_.[[Value]] to ~empty~. + 1. For each WeakMap _map_ such that _map_.[[WeakMapData]] contains a Record _entry_ such that _entry_.[[Key]] is _value_, do + 1. Set _entry_.[[Key]] to ~empty~. + 1. Set _entry_.[[Value]] to ~empty~. 1. For each WeakSet _set_ such that _set_.[[WeakSetData]] contains _value_, do 1. Replace the element of _set_.[[WeakSetData]] whose value is _value_ with an element whose value is ~empty~. @@ -12494,7 +12494,7 @@

Execution

Implementations are not obligated to empty WeakRefs for maximal sets of non-live objects or symbols.

-

If an implementation chooses a non-live set _objectSet_ in which to empty WeakRefs, this definition requires that it empties WeakRefs for all values in _objectSet_ simultaneously. In other words, it is not conformant for an implementation to empty a WeakRef pointing to a value _v_ without emptying out other WeakRefs that, if not emptied, could result in an execution that observes the value of _v_.

+

If an implementation chooses a non-live set _objSet_ in which to empty WeakRefs, this definition requires that it empties WeakRefs for all values in _objSet_ simultaneously. In other words, it is not conformant for an implementation to empty a WeakRef pointing to a value _v_ without emptying out other WeakRefs that, if not emptied, could result in an execution that observes the value of _v_.

@@ -12573,16 +12573,16 @@

CanBeHeldWeakly ( - _v_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): a Boolean

description
-
It returns *true* if and only if _v_ is suitable for use as a weak reference. Only values that are suitable for use as a weak reference may be a key of a WeakMap, an element of a WeakSet, the target of a WeakRef, or one of the targets of a FinalizationRegistry.
+
It returns *true* if and only if _arg_ is suitable for use as a weak reference. Only values that are suitable for use as a weak reference may be a key of a WeakMap, an element of a WeakSet, the target of a WeakRef, or one of the targets of a FinalizationRegistry.
- 1. If _v_ is an Object, return *true*. - 1. If _v_ is a Symbol and KeyForSymbol(_v_) is *undefined*, return *true*. + 1. If _arg_ is an Object, return *true*. + 1. If _arg_ is a Symbol and KeyForSymbol(_arg_) is *undefined*, return *true*. 1. Return *false*. @@ -12598,7 +12598,7 @@

Ordinary and Exotic Objects Behaviours

Ordinary Object Internal Methods and Internal Slots

All ordinary objects have an internal slot called [[Prototype]]. The value of this internal slot is either *null* or an object and is used for implementing inheritance. Assume a property named _propertyKey_ is missing from an ordinary object _obj_ but exists on its [[Prototype]] object. If _propertyKey_ refers to a data property on the [[Prototype]] object, _obj_ inherits it for get access, making it behave as if _propertyKey_ was a property of _obj_. If _propertyKey_ refers to a writable data property on the [[Prototype]] object, set access of _propertyKey_ on _obj_ creates a new data property named _propertyKey_ on _obj_. If _propertyKey_ refers to a non-writable data property on the [[Prototype]] object, set access of _propertyKey_ on _obj_ fails. If _propertyKey_ refers to an accessor property on the [[Prototype]] object, the accessor is inherited by _obj_ for both get access and set access.

Every ordinary object has a Boolean-valued [[Extensible]] internal slot which is used to fulfill the extensibility-related internal method invariants specified in . Namely, once the value of an object's [[Extensible]] internal slot has been set to *false*, it is no longer possible to add properties to the object, to modify the value of the object's [[Prototype]] internal slot, or to subsequently change the value of [[Extensible]] to *true*.

-

In the following algorithm descriptions, assume _obj_ is an ordinary object, _propertyKey_ is a property key value, _value_ is any ECMAScript language value, and _desc_ is a Property Descriptor record.

+

In the following algorithm descriptions, assume _obj_ is an ordinary object, _propertyKey_ is a property key value, _value_ is any ECMAScript language value, and _propertyDesc_ is a Property Descriptor record.

Each ordinary object internal method delegates to a similarly-named abstract operation. If such an abstract operation depends on another internal method, then the internal method is invoked on _obj_ rather than calling the similarly-named abstract operation directly. These semantics ensure that exotic objects have their overridden internal methods invoked when ordinary object internal methods are applied to them.

@@ -12746,18 +12746,18 @@

1. If _obj_ does not have an own property with key _propertyKey_, return *undefined*. - 1. Let _desc_ be a newly created Property Descriptor with no fields. + 1. Let _propertyDesc_ be a newly created Property Descriptor with no fields. 1. Let _ownProperty_ be _obj_'s own property whose key is _propertyKey_. 1. If _ownProperty_ is a data property, then - 1. Set _desc_.[[Value]] to the value of _ownProperty_'s [[Value]] attribute. - 1. Set _desc_.[[Writable]] to the value of _ownProperty_'s [[Writable]] attribute. + 1. Set _propertyDesc_.[[Value]] to the value of _ownProperty_'s [[Value]] attribute. + 1. Set _propertyDesc_.[[Writable]] to the value of _ownProperty_'s [[Writable]] attribute. 1. Else, 1. Assert: _ownProperty_ is an accessor property. - 1. Set _desc_.[[Get]] to the value of _ownProperty_'s [[Get]] attribute. - 1. Set _desc_.[[Set]] to the value of _ownProperty_'s [[Set]] attribute. - 1. Set _desc_.[[Enumerable]] to the value of _ownProperty_'s [[Enumerable]] attribute. - 1. Set _desc_.[[Configurable]] to the value of _ownProperty_'s [[Configurable]] attribute. - 1. Return _desc_. + 1. Set _propertyDesc_.[[Get]] to the value of _ownProperty_'s [[Get]] attribute. + 1. Set _propertyDesc_.[[Set]] to the value of _ownProperty_'s [[Set]] attribute. + 1. Set _propertyDesc_.[[Enumerable]] to the value of _ownProperty_'s [[Enumerable]] attribute. + 1. Set _propertyDesc_.[[Configurable]] to the value of _ownProperty_'s [[Configurable]] attribute. + 1. Return _propertyDesc_. @@ -12766,7 +12766,7 @@

[[DefineOwnProperty]] ( _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing a Boolean or a throw completion

@@ -12774,7 +12774,7 @@

an ordinary object _obj_

- 1. Return ? OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _desc_). + 1. Return ? OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _propertyDesc_). @@ -12782,7 +12782,7 @@

OrdinaryDefineOwnProperty ( _obj_: an Object, _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing a Boolean or a throw completion

@@ -12790,7 +12790,7 @@

1. Let _current_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). 1. Let _extensible_ be ? IsExtensible(_obj_). - 1. Return ValidateAndApplyPropertyDescriptor(_obj_, _propertyKey_, _extensible_, _desc_, _current_). + 1. Return ValidateAndApplyPropertyDescriptor(_obj_, _propertyKey_, _extensible_, _propertyDesc_, _current_). @@ -12798,14 +12798,14 @@

IsCompatiblePropertyDescriptor ( _extensible_: a Boolean, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, _current_: a Property Descriptor or *undefined*, ): a Boolean

- 1. Return ValidateAndApplyPropertyDescriptor(*undefined*, *""*, _extensible_, _desc_, _current_). + 1. Return ValidateAndApplyPropertyDescriptor(*undefined*, *""*, _extensible_, _propertyDesc_, _current_). @@ -12815,48 +12815,48 @@

_obj_: an Object or *undefined*, _propertyKey_: a property key, _extensible_: a Boolean, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, _current_: a Property Descriptor or *undefined*, ): a Boolean

description
-
It returns *true* if and only if _desc_ can be applied as the property of an object with specified _extensibility_ and current property _current_ while upholding invariants. When such application is possible and _obj_ is not *undefined*, it is performed for the property named _propertyKey_ (which is created if necessary).
+
It returns *true* if and only if _propertyDesc_ can be applied as the property of an object with specified _extensibility_ and current property _current_ while upholding invariants. When such application is possible and _obj_ is not *undefined*, it is performed for the property named _propertyKey_ (which is created if necessary).
1. Assert: _propertyKey_ is a property key. 1. If _current_ is *undefined*, then 1. If _extensible_ is *false*, return *false*. 1. If _obj_ is *undefined*, return *true*. - 1. If IsAccessorDescriptor(_desc_) is *true*, then - 1. Create an own accessor property named _propertyKey_ of object _obj_ whose [[Get]], [[Set]], [[Enumerable]], and [[Configurable]] attributes are set to the value of the corresponding field in _desc_ if _desc_ has that field, or to the attribute's default value otherwise. + 1. If IsAccessorDescriptor(_propertyDesc_) is *true*, then + 1. Create an own accessor property named _propertyKey_ of object _obj_ whose [[Get]], [[Set]], [[Enumerable]], and [[Configurable]] attributes are set to the value of the corresponding field in _propertyDesc_ if _propertyDesc_ has that field, or to the attribute's default value otherwise. 1. Else, - 1. Create an own data property named _propertyKey_ of object _obj_ whose [[Value]], [[Writable]], [[Enumerable]], and [[Configurable]] attributes are set to the value of the corresponding field in _desc_ if _desc_ has that field, or to the attribute's default value otherwise. + 1. Create an own data property named _propertyKey_ of object _obj_ whose [[Value]], [[Writable]], [[Enumerable]], and [[Configurable]] attributes are set to the value of the corresponding field in _propertyDesc_ if _propertyDesc_ has that field, or to the attribute's default value otherwise. 1. Return *true*. 1. Assert: _current_ is a fully populated Property Descriptor. - 1. If _desc_ does not have any fields, return *true*. + 1. If _propertyDesc_ does not have any fields, return *true*. 1. If _current_.[[Configurable]] is *false*, then - 1. If _desc_ has a [[Configurable]] field and _desc_.[[Configurable]] is *true*, return *false*. - 1. If _desc_ has an [[Enumerable]] field and _desc_.[[Enumerable]] is not _current_.[[Enumerable]], return *false*. - 1. If IsGenericDescriptor(_desc_) is *false* and IsAccessorDescriptor(_desc_) is not IsAccessorDescriptor(_current_), return *false*. + 1. If _propertyDesc_ has a [[Configurable]] field and _propertyDesc_.[[Configurable]] is *true*, return *false*. + 1. If _propertyDesc_ has an [[Enumerable]] field and _propertyDesc_.[[Enumerable]] is not _current_.[[Enumerable]], return *false*. + 1. If IsGenericDescriptor(_propertyDesc_) is *false* and IsAccessorDescriptor(_propertyDesc_) is not IsAccessorDescriptor(_current_), return *false*. 1. If IsAccessorDescriptor(_current_) is *true*, then - 1. If _desc_ has a [[Get]] field and SameValue(_desc_.[[Get]], _current_.[[Get]]) is *false*, return *false*. - 1. If _desc_ has a [[Set]] field and SameValue(_desc_.[[Set]], _current_.[[Set]]) is *false*, return *false*. + 1. If _propertyDesc_ has a [[Get]] field and SameValue(_propertyDesc_.[[Get]], _current_.[[Get]]) is *false*, return *false*. + 1. If _propertyDesc_ has a [[Set]] field and SameValue(_propertyDesc_.[[Set]], _current_.[[Set]]) is *false*, return *false*. 1. Else if _current_.[[Writable]] is *false*, then - 1. If _desc_ has a [[Writable]] field and _desc_.[[Writable]] is *true*, return *false*. + 1. If _propertyDesc_ has a [[Writable]] field and _propertyDesc_.[[Writable]] is *true*, return *false*. 1. NOTE: SameValue returns *true* for *NaN* values which may be distinguishable by other means. Returning here ensures that any existing property of _obj_ remains unmodified. - 1. If _desc_ has a [[Value]] field, return SameValue(_desc_.[[Value]], _current_.[[Value]]). + 1. If _propertyDesc_ has a [[Value]] field, return SameValue(_propertyDesc_.[[Value]], _current_.[[Value]]). 1. If _obj_ is not *undefined*, then - 1. If IsDataDescriptor(_current_) is *true* and IsAccessorDescriptor(_desc_) is *true*, then - 1. If _desc_ has a [[Configurable]] field, let _configurable_ be _desc_.[[Configurable]]; else let _configurable_ be _current_.[[Configurable]]. - 1. If _desc_ has an [[Enumerable]] field, let _enumerable_ be _desc_.[[Enumerable]]; else let _enumerable_ be _current_.[[Enumerable]]. - 1. Replace the property named _propertyKey_ of object _obj_ with an accessor property whose [[Configurable]] and [[Enumerable]] attributes are set to _configurable_ and _enumerable_, respectively, and whose [[Get]] and [[Set]] attributes are set to the value of the corresponding field in _desc_ if _desc_ has that field, or to the attribute's default value otherwise. - 1. Else if IsAccessorDescriptor(_current_) is *true* and IsDataDescriptor(_desc_) is *true*, then - 1. If _desc_ has a [[Configurable]] field, let _configurable_ be _desc_.[[Configurable]]; else let _configurable_ be _current_.[[Configurable]]. - 1. If _desc_ has an [[Enumerable]] field, let _enumerable_ be _desc_.[[Enumerable]]; else let _enumerable_ be _current_.[[Enumerable]]. - 1. Replace the property named _propertyKey_ of object _obj_ with a data property whose [[Configurable]] and [[Enumerable]] attributes are set to _configurable_ and _enumerable_, respectively, and whose [[Value]] and [[Writable]] attributes are set to the value of the corresponding field in _desc_ if _desc_ has that field, or to the attribute's default value otherwise. + 1. If IsDataDescriptor(_current_) is *true* and IsAccessorDescriptor(_propertyDesc_) is *true*, then + 1. If _propertyDesc_ has a [[Configurable]] field, let _configurable_ be _propertyDesc_.[[Configurable]]; else let _configurable_ be _current_.[[Configurable]]. + 1. If _propertyDesc_ has an [[Enumerable]] field, let _enumerable_ be _propertyDesc_.[[Enumerable]]; else let _enumerable_ be _current_.[[Enumerable]]. + 1. Replace the property named _propertyKey_ of object _obj_ with an accessor property whose [[Configurable]] and [[Enumerable]] attributes are set to _configurable_ and _enumerable_, respectively, and whose [[Get]] and [[Set]] attributes are set to the value of the corresponding field in _propertyDesc_ if _propertyDesc_ has that field, or to the attribute's default value otherwise. + 1. Else if IsAccessorDescriptor(_current_) is *true* and IsDataDescriptor(_propertyDesc_) is *true*, then + 1. If _propertyDesc_ has a [[Configurable]] field, let _configurable_ be _propertyDesc_.[[Configurable]]; else let _configurable_ be _current_.[[Configurable]]. + 1. If _propertyDesc_ has an [[Enumerable]] field, let _enumerable_ be _propertyDesc_.[[Enumerable]]; else let _enumerable_ be _current_.[[Enumerable]]. + 1. Replace the property named _propertyKey_ of object _obj_ with a data property whose [[Configurable]] and [[Enumerable]] attributes are set to _configurable_ and _enumerable_, respectively, and whose [[Value]] and [[Writable]] attributes are set to the value of the corresponding field in _propertyDesc_ if _propertyDesc_ has that field, or to the attribute's default value otherwise. 1. Else, - 1. For each field name _fieldName_ of _desc_, set the attribute named _fieldName_ of the property named _propertyKey_ of object _obj_ to the value of _desc_'s _fieldName_ field. + 1. For each field name _fieldName_ of _propertyDesc_, set the attribute named _fieldName_ of the property named _propertyKey_ of object _obj_ to the value of _propertyDesc_'s _fieldName_ field. 1. Return *true*. @@ -12924,14 +12924,14 @@

- 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). - 1. If _desc_ is *undefined*, then + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. If _propertyDesc_ is *undefined*, then 1. Let _parent_ be ? _obj_.[[GetPrototypeOf]](). 1. If _parent_ is *null*, return *undefined*. 1. Return ? _parent_.[[Get]](_propertyKey_, _receiver_). - 1. If IsDataDescriptor(_desc_) is *true*, return _desc_.[[Value]]. - 1. Assert: IsAccessorDescriptor(_desc_) is *true*. - 1. Let _getter_ be _desc_.[[Get]]. + 1. If IsDataDescriptor(_propertyDesc_) is *true*, return _propertyDesc_.[[Value]]. + 1. Assert: IsAccessorDescriptor(_propertyDesc_) is *true*. + 1. Let _getter_ be _propertyDesc_.[[Get]]. 1. If _getter_ is *undefined*, return *undefined*. 1. Return ? Call(_getter_, _receiver_). @@ -12993,12 +12993,12 @@

1. If IsDataDescriptor(_ownDesc_) is *true*, then 1. If _ownDesc_.[[Writable]] is *false*, return *false*. 1. If _receiver_ is not an Object, return *false*. - 1. Let _existingDescriptor_ be ? _receiver_.[[GetOwnProperty]](_propertyKey_). - 1. If _existingDescriptor_ is *undefined*, then + 1. Let _existingDesc_ be ? _receiver_.[[GetOwnProperty]](_propertyKey_). + 1. If _existingDesc_ is *undefined*, then 1. Assert: _receiver_ does not currently have a property _propertyKey_. 1. Return ? CreateDataProperty(_receiver_, _propertyKey_, _value_). - 1. If IsAccessorDescriptor(_existingDescriptor_) is *true*, return *false*. - 1. If _existingDescriptor_.[[Writable]] is *false*, return *false*. + 1. If IsAccessorDescriptor(_existingDesc_) is *true*, return *false*. + 1. If _existingDesc_.[[Writable]] is *false*, return *false*. 1. Let _valueDesc_ be the PropertyDescriptor { [[Value]]: _value_ }. 1. Return ? _receiver_.[[DefineOwnProperty]](_propertyKey_, _valueDesc_). 1. Assert: IsAccessorDescriptor(_ownDesc_) is *true*. @@ -13034,9 +13034,9 @@

- 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). - 1. If _desc_ is *undefined*, return *true*. - 1. If _desc_.[[Configurable]] is *true*, then + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. If _propertyDesc_ is *undefined*, return *true*. + 1. If _propertyDesc_.[[Configurable]] is *true*, then 1. Remove the own property with name _propertyKey_ from _obj_. 1. Return *true*. 1. Return *false*. @@ -13103,7 +13103,7 @@

OrdinaryCreateFromConstructor ( - _constructor_: a function object, + _ctor_: a function object, _intrinsicDefaultProto_: a String, optional _internalSlotsList_: a List of names of internal slots, ): either a normal completion containing an Object or a throw completion @@ -13114,17 +13114,17 @@

1. Assert: _intrinsicDefaultProto_ is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object. - 1. Let _proto_ be ? GetPrototypeFromConstructor(_constructor_, _intrinsicDefaultProto_). - 1. If _internalSlotsList_ is present, let _slotsList_ be _internalSlotsList_. - 1. Else, let _slotsList_ be a new empty List. - 1. Return OrdinaryObjectCreate(_proto_, _slotsList_). + 1. Let _proto_ be ? GetPrototypeFromConstructor(_ctor_, _intrinsicDefaultProto_). + 1. If _internalSlotsList_ is present, let _slots_ be _internalSlotsList_. + 1. Else, let _slots_ be a new empty List. + 1. Return OrdinaryObjectCreate(_proto_, _slots_).

GetPrototypeFromConstructor ( - _constructor_: a function object, + _ctor_: a function object, _intrinsicDefaultProto_: a String, ): either a normal completion containing an Object or a throw completion

@@ -13134,14 +13134,14 @@

1. Assert: _intrinsicDefaultProto_ is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object. - 1. Let _proto_ be ? Get(_constructor_, *"prototype"*). + 1. Let _proto_ be ? Get(_ctor_, *"prototype"*). 1. If _proto_ is not an Object, then - 1. Let _realm_ be ? GetFunctionRealm(_constructor_). + 1. Let _realm_ be ? GetFunctionRealm(_ctor_). 1. Set _proto_ to _realm_'s intrinsic object named _intrinsicDefaultProto_. 1. Return _proto_. -

If _constructor_ does not supply a [[Prototype]] value, the default value that is used is obtained from the realm of the _constructor_ function rather than from the running execution context.

+

If _ctor_ does not supply a [[Prototype]] value, the default value that is used is obtained from the realm of the _ctor_ function rather than from the running execution context.

@@ -13355,8 +13355,8 @@

ECMAScript Function Objects

[[Call]] ( - _thisArgument_: an ECMAScript language value, - _argumentsList_: a List of ECMAScript language values, + _thisArg_: an ECMAScript language value, + _argList_: a List of ECMAScript language values, ): either a normal completion containing an ECMAScript language value or a throw completion

@@ -13372,8 +13372,8 @@

1. NOTE: _error_ is created in _calleeContext_ with _func_'s associated Realm Record. 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. Throw _error_. - 1. Perform OrdinaryCallBindThis(_func_, _calleeContext_, _thisArgument_). - 1. Let _result_ be Completion(OrdinaryCallEvaluateBody(_func_, _argumentsList_)). + 1. Perform OrdinaryCallBindThis(_func_, _calleeContext_, _thisArg_). + 1. Let _result_ be Completion(OrdinaryCallEvaluateBody(_func_, _argList_)). 1. [id="step-call-pop-context-stack"] Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. If _result_ is a return completion, return _result_.[[Value]]. 1. Assert: _result_ is a throw completion. @@ -13415,7 +13415,7 @@

OrdinaryCallBindThis ( _func_: an ECMAScript function object, _calleeContext_: an execution context, - _thisArgument_: an ECMAScript language value, + _thisArg_: an ECMAScript language value, ): ~unused~

@@ -13426,14 +13426,14 @@

1. Let _calleeRealm_ be _func_.[[Realm]]. 1. Let _localEnv_ be the LexicalEnvironment of _calleeContext_. 1. If _thisMode_ is ~strict~, then - 1. Let _thisValue_ be _thisArgument_. + 1. Let _thisValue_ be _thisArg_. 1. Else, - 1. If _thisArgument_ is either *undefined* or *null*, then + 1. If _thisArg_ is either *undefined* or *null*, then 1. Let _globalEnv_ be _calleeRealm_.[[GlobalEnv]]. 1. Assert: _globalEnv_ is a Global Environment Record. 1. Let _thisValue_ be _globalEnv_.[[GlobalThisValue]]. 1. Else, - 1. Let _thisValue_ be ! ToObject(_thisArgument_). + 1. Let _thisValue_ be ! ToObject(_thisArg_). 1. NOTE: ToObject produces wrapper objects using _calleeRealm_. 1. Assert: _localEnv_ is a Function Environment Record. 1. Assert: The next step never returns an abrupt completion because _localEnv_.[[ThisBindingStatus]] is not ~initialized~. @@ -13446,47 +13446,47 @@

Runtime Semantics: EvaluateBody ( _func_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, ): a return completion or a throw completion

FunctionBody : FunctionStatementList - 1. Return ? EvaluateFunctionBody of |FunctionBody| with arguments _func_ and _argumentsList_. + 1. Return ? EvaluateFunctionBody of |FunctionBody| with arguments _func_ and _argList_. ConciseBody : ExpressionBody - 1. Return ? EvaluateConciseBody of |ConciseBody| with arguments _func_ and _argumentsList_. + 1. Return ? EvaluateConciseBody of |ConciseBody| with arguments _func_ and _argList_. GeneratorBody : FunctionBody - 1. Return ? EvaluateGeneratorBody of |GeneratorBody| with arguments _func_ and _argumentsList_. + 1. Return ? EvaluateGeneratorBody of |GeneratorBody| with arguments _func_ and _argList_. AsyncGeneratorBody : FunctionBody - 1. Return ? EvaluateAsyncGeneratorBody of |AsyncGeneratorBody| with arguments _func_ and _argumentsList_. + 1. Return ? EvaluateAsyncGeneratorBody of |AsyncGeneratorBody| with arguments _func_ and _argList_. AsyncFunctionBody : FunctionBody - 1. Return ? EvaluateAsyncFunctionBody of |AsyncFunctionBody| with arguments _func_ and _argumentsList_. + 1. Return ? EvaluateAsyncFunctionBody of |AsyncFunctionBody| with arguments _func_ and _argList_. AsyncConciseBody : ExpressionBody - 1. Return ? EvaluateAsyncConciseBody of |AsyncConciseBody| with arguments _func_ and _argumentsList_. + 1. Return ? EvaluateAsyncConciseBody of |AsyncConciseBody| with arguments _func_ and _argList_. Initializer : `=` AssignmentExpression - 1. Assert: _argumentsList_ is empty. + 1. Assert: _argList_ is empty. 1. Assert: _func_.[[ClassFieldInitializerName]] is not ~empty~. 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true*, then 1. Let _value_ be ? NamedEvaluation of |Initializer| with argument _func_.[[ClassFieldInitializerName]]. @@ -13502,7 +13502,7 @@

ClassStaticBlockBody : ClassStaticBlockStatementList - 1. Assert: _argumentsList_ is empty. + 1. Assert: _argList_ is empty. 1. Return ? EvaluateClassStaticBlockBody of |ClassStaticBlockBody| with argument _func_. @@ -13511,13 +13511,13 @@

OrdinaryCallEvaluateBody ( _func_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, ): a return completion or a throw completion

- 1. Return ? EvaluateBody of _func_.[[ECMAScriptCode]] with arguments _func_ and _argumentsList_. + 1. Return ? EvaluateBody of _func_.[[ECMAScriptCode]] with arguments _func_ and _argList_. @@ -13525,7 +13525,7 @@

[[Construct]] ( - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, _newTarget_: a constructor, ): either a normal completion containing an Object or a throw completion

@@ -13537,25 +13537,25 @@

1. Let _callerContext_ be the running execution context. 1. Let _kind_ be _func_.[[ConstructorKind]]. 1. If _kind_ is ~base~, then - 1. Let _thisArgument_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Object.prototype%"*). + 1. Let _thisArg_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Object.prototype%"*). 1. Let _calleeContext_ be PrepareForOrdinaryCall(_func_, _newTarget_). 1. Assert: _calleeContext_ is now the running execution context. 1. If _kind_ is ~base~, then - 1. Perform OrdinaryCallBindThis(_func_, _calleeContext_, _thisArgument_). - 1. Let _initializeResult_ be Completion(InitializeInstanceElements(_thisArgument_, _func_)). + 1. Perform OrdinaryCallBindThis(_func_, _calleeContext_, _thisArg_). + 1. Let _initializeResult_ be Completion(InitializeInstanceElements(_thisArg_, _func_)). 1. If _initializeResult_ is an abrupt completion, then 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. Return ? _initializeResult_. - 1. Let _constructorEnv_ be the LexicalEnvironment of _calleeContext_. - 1. Let _result_ be Completion(OrdinaryCallEvaluateBody(_func_, _argumentsList_)). + 1. Let _ctorEnv_ be the LexicalEnvironment of _calleeContext_. + 1. Let _result_ be Completion(OrdinaryCallEvaluateBody(_func_, _argList_)). 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. If _result_ is a throw completion, then 1. Return ? _result_. 1. Assert: _result_ is a return completion. 1. If _result_.[[Value]] is an Object, return _result_.[[Value]]. - 1. If _kind_ is ~base~, return _thisArgument_. + 1. If _kind_ is ~base~, return _thisArg_. 1. If _result_.[[Value]] is not *undefined*, throw a *TypeError* exception. - 1. Let _thisBinding_ be ? _constructorEnv_.GetThisBinding(). + 1. Let _thisBinding_ be ? _ctorEnv_.GetThisBinding(). 1. Assert: _thisBinding_ is an Object. 1. Return _thisBinding_. @@ -13564,12 +13564,12 @@

OrdinaryFunctionCreate ( - _functionPrototype_: an Object, + _proto_: an Object, _sourceText_: a sequence of Unicode code points, - _parameterList_: a Parse Node, + _paramList_: a Parse Node, _body_: a Parse Node, _thisMode_: ~lexical-this~ or ~non-lexical-this~, - _env_: an Environment Record, + _envRecord_: an Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, ): an ECMAScript function object

@@ -13579,10 +13579,10 @@

1. Let _internalSlotsList_ be the internal slots listed in . - 1. Let _func_ be OrdinaryObjectCreate(_functionPrototype_, _internalSlotsList_). + 1. Let _func_ be OrdinaryObjectCreate(_proto_, _internalSlotsList_). 1. Set _func_.[[Call]] to the definition specified in . 1. Set _func_.[[SourceText]] to _sourceText_. - 1. Set _func_.[[FormalParameters]] to _parameterList_. + 1. Set _func_.[[FormalParameters]] to _paramList_. 1. Set _func_.[[ECMAScriptCode]] to _body_. 1. Let _strict_ be IsStrict(_body_). 1. Set _func_.[[Strict]] to _strict_. @@ -13590,7 +13590,7 @@

1. Else if _strict_ is *true*, set _func_.[[ThisMode]] to ~strict~. 1. Else, set _func_.[[ThisMode]] to ~global~. 1. Set _func_.[[IsClassConstructor]] to *false*. - 1. Set _func_.[[Environment]] to _env_. + 1. Set _func_.[[Environment]] to _envRecord_. 1. Set _func_.[[PrivateEnvironment]] to _privateEnv_. 1. Set _func_.[[ScriptOrModule]] to GetActiveScriptOrModule(). 1. Set _func_.[[Realm]] to the current Realm Record. @@ -13598,8 +13598,8 @@

1. Set _func_.[[Fields]] to a new empty List. 1. Set _func_.[[PrivateMethods]] to a new empty List. 1. Set _func_.[[ClassFieldInitializerName]] to ~empty~. - 1. Let _len_ be the ExpectedArgumentCount of _parameterList_. - 1. Perform SetFunctionLength(_func_, _len_). + 1. Let _length_ be the ExpectedArgumentCount of _paramList_. + 1. Perform SetFunctionLength(_func_, _length_). 1. Return _func_. @@ -13639,8 +13639,8 @@

%ThrowTypeError% ( )

MakeConstructor ( _func_: an ECMAScript function object or a built-in function object, - optional _writablePrototype_: a Boolean, - optional _prototype_: an Object, + optional _writableProto_: a Boolean, + optional _proto_: an Object, ): ~unused~

@@ -13655,11 +13655,11 @@

1. Else, 1. Set _func_.[[Construct]] to the definition specified in . 1. Set _func_.[[ConstructorKind]] to ~base~. - 1. If _writablePrototype_ is not present, set _writablePrototype_ to *true*. - 1. If _prototype_ is not present, then - 1. Set _prototype_ to OrdinaryObjectCreate(%Object.prototype%). - 1. Perform ! DefinePropertyOrThrow(_prototype_, *"constructor"*, PropertyDescriptor { [[Value]]: _func_, [[Writable]]: _writablePrototype_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). - 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: _writablePrototype_, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. If _writableProto_ is not present, set _writableProto_ to *true*. + 1. If _proto_ is not present, then + 1. Set _proto_ to OrdinaryObjectCreate(%Object.prototype%). + 1. Perform ! DefinePropertyOrThrow(_proto_, *"constructor"*, PropertyDescriptor { [[Value]]: _func_, [[Writable]]: _writableProto_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: _writableProto_, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return ~unused~. @@ -13683,7 +13683,7 @@

MakeMethod ( _func_: an ECMAScript function object, - _homeObject_: an Object, + _homeObj_: an Object, ): ~unused~

@@ -13691,8 +13691,8 @@

It configures _func_ as a method.

- 1. Assert: _homeObject_ is an ordinary object. - 1. Set _func_.[[HomeObject]] to _homeObject_. + 1. Assert: _homeObj_ is an ordinary object. + 1. Set _func_.[[HomeObject]] to _homeObj_. 1. Return ~unused~. @@ -13700,8 +13700,8 @@

DefineMethodProperty ( - _homeObject_: an Object, - _key_: a property key or Private Name, + _homeObj_: an Object, + _name_: a property key or Private Name, _closure_: a function object, _enumerable_: a Boolean, ): either a normal completion containing either a PrivateElement or ~unused~, or an abrupt completion @@ -13709,11 +13709,11 @@

- 1. Assert: _homeObject_ is an ordinary, extensible object. - 1. If _key_ is a Private Name, return PrivateElement { [[Key]]: _key_, [[Kind]]: ~method~, [[Value]]: _closure_ }. - 1. Let _desc_ be the PropertyDescriptor { [[Value]]: _closure_, [[Writable]]: *true*, [[Enumerable]]: _enumerable_, [[Configurable]]: *true* }. - 1. Perform ? DefinePropertyOrThrow(_homeObject_, _key_, _desc_). - 1. NOTE: DefinePropertyOrThrow only returns an abrupt completion when attempting to define a class static method whose _key_ is *"prototype"*. + 1. Assert: _homeObj_ is an ordinary, extensible object. + 1. If _name_ is a Private Name, return PrivateElement { [[Key]]: _name_, [[Kind]]: ~method~, [[Value]]: _closure_ }. + 1. Let _propertyDesc_ be the PropertyDescriptor { [[Value]]: _closure_, [[Writable]]: *true*, [[Enumerable]]: _enumerable_, [[Configurable]]: *true* }. + 1. Perform ? DefinePropertyOrThrow(_homeObj_, _name_, _propertyDesc_). + 1. NOTE: DefinePropertyOrThrow only returns an abrupt completion when attempting to define a class static method whose _name_ is *"prototype"*. 1. Return ~unused~. @@ -13772,7 +13772,7 @@

FunctionDeclarationInstantiation ( _func_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, ): either a normal completion containing ~unused~ or a throw completion

@@ -13788,128 +13788,128 @@

1. Let _code_ be _func_.[[ECMAScriptCode]]. 1. Let _strict_ be _func_.[[Strict]]. 1. Let _formals_ be _func_.[[FormalParameters]]. - 1. Let _parameterNames_ be the BoundNames of _formals_. - 1. If _parameterNames_ has any duplicate entries, let _hasDuplicates_ be *true*; else let _hasDuplicates_ be *false*. - 1. Let _simpleParameterList_ be IsSimpleParameterList of _formals_. - 1. Let _hasParameterExpressions_ be ContainsExpression of _formals_. - 1. Let _varNames_ be the VarDeclaredNames of _code_. - 1. Let _varDeclarations_ be the VarScopedDeclarations of _code_. + 1. Let _paramNames_ be the BoundNames of _formals_. + 1. If _paramNames_ has any duplicate entries, let _hasDuplicates_ be *true*; else let _hasDuplicates_ be *false*. + 1. Let _simpleParamList_ be IsSimpleParameterList of _formals_. + 1. Let _hasParamExprs_ be ContainsExpression of _formals_. + 1. Let _variableNames_ be the VarDeclaredNames of _code_. + 1. Let _variableDeclarations_ be the VarScopedDeclarations of _code_. 1. Let _lexicalNames_ be the LexicallyDeclaredNames of _code_. - 1. Let _functionNames_ be a new empty List. - 1. Let _functionsToInitialize_ be a new empty List. - 1. For each element _varDecl_ of _varDeclarations_, in reverse List order, do - 1. If _varDecl_ is neither a |VariableDeclaration| nor a |ForBinding| nor a |BindingIdentifier|, then - 1. Assert: _varDecl_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|. - 1. Let _fn_ be the sole element of the BoundNames of _varDecl_. - 1. If _functionNames_ does not contain _fn_, then - 1. Insert _fn_ as the first element of _functionNames_. + 1. Let _funcNames_ be a new empty List. + 1. Let _funcsToInitialize_ be a new empty List. + 1. For each element _variableDeclaration_ of _variableDeclarations_, in reverse List order, do + 1. If _variableDeclaration_ is neither a |VariableDeclaration| nor a |ForBinding| nor a |BindingIdentifier|, then + 1. Assert: _variableDeclaration_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|. + 1. Let _funcName_ be the sole element of the BoundNames of _variableDeclaration_. + 1. If _funcNames_ does not contain _funcName_, then + 1. Insert _funcName_ as the first element of _funcNames_. 1. NOTE: If there are multiple function declarations for the same name, the last declaration is used. - 1. Insert _varDecl_ as the first element of _functionsToInitialize_. - 1. Let _argumentsObjectNeeded_ be *true*. + 1. Insert _variableDeclaration_ as the first element of _funcsToInitialize_. + 1. Let _argumentsObjNeeded_ be *true*. 1. If _func_.[[ThisMode]] is ~lexical~, then 1. NOTE: Arrow functions never have an arguments object. - 1. Set _argumentsObjectNeeded_ to *false*. - 1. Else if _parameterNames_ contains *"arguments"*, then - 1. Set _argumentsObjectNeeded_ to *false*. - 1. Else if _hasParameterExpressions_ is *false*, then - 1. If _functionNames_ contains *"arguments"* or _lexicalNames_ contains *"arguments"*, then - 1. Set _argumentsObjectNeeded_ to *false*. - 1. If _strict_ is *true* or _hasParameterExpressions_ is *false*, then + 1. Set _argumentsObjNeeded_ to *false*. + 1. Else if _paramNames_ contains *"arguments"*, then + 1. Set _argumentsObjNeeded_ to *false*. + 1. Else if _hasParamExprs_ is *false*, then + 1. If _funcNames_ contains *"arguments"* or _lexicalNames_ contains *"arguments"*, then + 1. Set _argumentsObjNeeded_ to *false*. + 1. If _strict_ is *true* or _hasParamExprs_ is *false*, then 1. NOTE: Only a single Environment Record is needed for the parameters, since calls to `eval` in strict mode code cannot create new bindings which are visible outside of the `eval`. - 1. Let _env_ be the LexicalEnvironment of _calleeContext_. + 1. Let _envRecord_ be the LexicalEnvironment of _calleeContext_. 1. Else, 1. NOTE: A separate Environment Record is needed to ensure that bindings created by direct eval calls in the formal parameter list are outside the environment where parameters are declared. 1. Let _calleeEnv_ be the LexicalEnvironment of _calleeContext_. - 1. Let _env_ be NewDeclarativeEnvironment(_calleeEnv_). + 1. Let _envRecord_ be NewDeclarativeEnvironment(_calleeEnv_). 1. Assert: The VariableEnvironment of _calleeContext_ and _calleeEnv_ are the same Environment Record. - 1. Set the LexicalEnvironment of _calleeContext_ to _env_. - 1. For each String _paramName_ of _parameterNames_, do - 1. Let _alreadyDeclared_ be ! _env_.HasBinding(_paramName_). + 1. Set the LexicalEnvironment of _calleeContext_ to _envRecord_. + 1. For each String _paramName_ of _paramNames_, do + 1. Let _alreadyDeclared_ be ! _envRecord_.HasBinding(_paramName_). 1. NOTE: Early errors ensure that duplicate parameter names can only occur in non-strict functions that do not have parameter default values or rest parameters. 1. If _alreadyDeclared_ is *false*, then - 1. Perform ! _env_.CreateMutableBinding(_paramName_, *false*). + 1. Perform ! _envRecord_.CreateMutableBinding(_paramName_, *false*). 1. If _hasDuplicates_ is *true*, then - 1. Perform ! _env_.InitializeBinding(_paramName_, *undefined*). - 1. If _argumentsObjectNeeded_ is *true*, then - 1. If _strict_ is *true* or _simpleParameterList_ is *false*, then - 1. Let _ao_ be CreateUnmappedArgumentsObject(_argumentsList_). + 1. Perform ! _envRecord_.InitializeBinding(_paramName_, *undefined*). + 1. If _argumentsObjNeeded_ is *true*, then + 1. If _strict_ is *true* or _simpleParamList_ is *false*, then + 1. Let _argumentsObj_ be CreateUnmappedArgumentsObject(_argList_). 1. Else, 1. NOTE: A mapped argument object is only provided for non-strict functions that don't have a rest parameter, any parameter default value initializers, or any destructured parameters. - 1. Let _ao_ be CreateMappedArgumentsObject(_func_, _formals_, _argumentsList_, _env_). + 1. Let _argumentsObj_ be CreateMappedArgumentsObject(_func_, _formals_, _argList_, _envRecord_). 1. If _strict_ is *true*, then - 1. Perform ! _env_.CreateImmutableBinding(*"arguments"*, *false*). + 1. Perform ! _envRecord_.CreateImmutableBinding(*"arguments"*, *false*). 1. NOTE: In strict mode code early errors prevent attempting to assign to this binding, so its mutability is not observable. 1. Else, - 1. Perform ! _env_.CreateMutableBinding(*"arguments"*, *false*). - 1. Perform ! _env_.InitializeBinding(*"arguments"*, _ao_). - 1. Let _parameterBindings_ be the list-concatenation of _parameterNames_ and « *"arguments"* ». + 1. Perform ! _envRecord_.CreateMutableBinding(*"arguments"*, *false*). + 1. Perform ! _envRecord_.InitializeBinding(*"arguments"*, _argumentsObj_). + 1. Let _paramBindings_ be the list-concatenation of _paramNames_ and « *"arguments"* ». 1. Else, - 1. Let _parameterBindings_ be _parameterNames_. - 1. Let _iteratorRecord_ be CreateListIteratorRecord(_argumentsList_). + 1. Let _paramBindings_ be _paramNames_. + 1. Let _iteratorRecord_ be CreateListIteratorRecord(_argList_). 1. If _hasDuplicates_ is *true*, then 1. Let _usedEnv_ be *undefined*. 1. Else, - 1. Let _usedEnv_ be _env_. + 1. Let _usedEnv_ be _envRecord_. 1. NOTE: The following step cannot return a ReturnCompletion because the only way such a completion can arise in expression position is by use of |YieldExpression|, which is forbidden in parameter lists by Early Error rules in and . 1. Perform ? IteratorBindingInitialization of _formals_ with arguments _iteratorRecord_ and _usedEnv_. - 1. If _hasParameterExpressions_ is *false*, then + 1. If _hasParamExprs_ is *false*, then 1. NOTE: Only a single Environment Record is needed for the parameters and top-level vars. - 1. Let _instantiatedVarNames_ be a copy of the List _parameterBindings_. - 1. For each element _n_ of _varNames_, do - 1. If _instantiatedVarNames_ does not contain _n_, then - 1. Append _n_ to _instantiatedVarNames_. - 1. Perform ! _env_.CreateMutableBinding(_n_, *false*). - 1. Perform ! _env_.InitializeBinding(_n_, *undefined*). - 1. Let _varEnv_ be _env_. + 1. Let _instantiatedVariableNames_ be a copy of the List _paramBindings_. + 1. For each element _n_ of _variableNames_, do + 1. If _instantiatedVariableNames_ does not contain _n_, then + 1. Append _n_ to _instantiatedVariableNames_. + 1. Perform ! _envRecord_.CreateMutableBinding(_n_, *false*). + 1. Perform ! _envRecord_.InitializeBinding(_n_, *undefined*). + 1. Let _variableEnv_ be _envRecord_. 1. Else, 1. NOTE: A separate Environment Record is needed to ensure that closures created by expressions in the formal parameter list do not have visibility of declarations in the function body. - 1. Let _varEnv_ be NewDeclarativeEnvironment(_env_). - 1. Set the VariableEnvironment of _calleeContext_ to _varEnv_. - 1. Let _instantiatedVarNames_ be a new empty List. - 1. For each element _n_ of _varNames_, do - 1. If _instantiatedVarNames_ does not contain _n_, then - 1. Append _n_ to _instantiatedVarNames_. - 1. Perform ! _varEnv_.CreateMutableBinding(_n_, *false*). - 1. If _parameterBindings_ does not contain _n_ or _functionNames_ contains _n_, then + 1. Let _variableEnv_ be NewDeclarativeEnvironment(_envRecord_). + 1. Set the VariableEnvironment of _calleeContext_ to _variableEnv_. + 1. Let _instantiatedVariableNames_ be a new empty List. + 1. For each element _n_ of _variableNames_, do + 1. If _instantiatedVariableNames_ does not contain _n_, then + 1. Append _n_ to _instantiatedVariableNames_. + 1. Perform ! _variableEnv_.CreateMutableBinding(_n_, *false*). + 1. If _paramBindings_ does not contain _n_ or _funcNames_ contains _n_, then 1. Let _initialValue_ be *undefined*. 1. Else, - 1. Let _initialValue_ be ! _env_.GetBindingValue(_n_, *false*). - 1. Perform ! _varEnv_.InitializeBinding(_n_, _initialValue_). + 1. Let _initialValue_ be ! _envRecord_.GetBindingValue(_n_, *false*). + 1. Perform ! _variableEnv_.InitializeBinding(_n_, _initialValue_). 1. NOTE: A var with the same name as a formal parameter initially has the same value as the corresponding initialized parameter. 1. If _strict_ is *true*, then - 1. Let _lexEnv_ be _varEnv_. + 1. Let _lexicalEnv_ be _variableEnv_. 1. Else, 1. [id="step-functiondeclarationinstantiation-web-compat-insertion-point", normative-optional] If the host is a web browser or otherwise supports , then - 1. For each |FunctionDeclaration| _fnDecl_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _code_ Contains _x_ is *true*, do - 1. Let _funcName_ be the StringValue of the |BindingIdentifier| of _fnDecl_. - 1. If replacing the |FunctionDeclaration| _fnDecl_ with a |VariableStatement| that has _funcName_ as a |BindingIdentifier| would not produce any Early Errors for _func_ and _parameterNames_ does not contain _funcName_, then + 1. For each |FunctionDeclaration| _funcDeclaration_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _code_ Contains _x_ is *true*, do + 1. Let _funcName_ be the StringValue of the |BindingIdentifier| of _funcDeclaration_. + 1. If replacing the |FunctionDeclaration| _funcDeclaration_ with a |VariableStatement| that has _funcName_ as a |BindingIdentifier| would not produce any Early Errors for _func_ and _paramNames_ does not contain _funcName_, then 1. NOTE: A var binding for _funcName_ is only instantiated here if it is neither a VarDeclaredName, the name of a formal parameter, or another |FunctionDeclaration|. - 1. If _instantiatedVarNames_ does not contain _funcName_ and _funcName_ is not *"arguments"*, then - 1. Perform ! _varEnv_.CreateMutableBinding(_funcName_, *false*). - 1. Perform ! _varEnv_.InitializeBinding(_funcName_, *undefined*). - 1. Append _funcName_ to _instantiatedVarNames_. - 1. [id="step-functiondeclarationinstantiation-alt-funcdecl-eval"] When the |FunctionDeclaration| _fnDecl_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in : + 1. If _instantiatedVariableNames_ does not contain _funcName_ and _funcName_ is not *"arguments"*, then + 1. Perform ! _variableEnv_.CreateMutableBinding(_funcName_, *false*). + 1. Perform ! _variableEnv_.InitializeBinding(_funcName_, *undefined*). + 1. Append _funcName_ to _instantiatedVariableNames_. + 1. [id="step-functiondeclarationinstantiation-alt-funcdecl-eval"] When the |FunctionDeclaration| _funcDeclaration_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in : 1. Let _fEnv_ be the running execution context's VariableEnvironment. 1. Let _bEnv_ be the running execution context's LexicalEnvironment. 1. Let _fObj_ be ! _bEnv_.GetBindingValue(_funcName_, *false*). 1. Perform ! _fEnv_.SetMutableBinding(_funcName_, _fObj_, *false*). 1. Return ~unused~. - 1. Let _lexEnv_ be NewDeclarativeEnvironment(_varEnv_). + 1. Let _lexicalEnv_ be NewDeclarativeEnvironment(_variableEnv_). 1. NOTE: Non-strict functions use a separate Environment Record for top-level lexical declarations so that a direct eval can determine whether any var scoped declarations introduced by the eval code conflict with pre-existing top-level lexically scoped declarations. This is not needed for strict functions because a strict direct eval always places all declarations into a new Environment Record. - 1. Set the LexicalEnvironment of _calleeContext_ to _lexEnv_. - 1. Let _lexDeclarations_ be the LexicallyScopedDeclarations of _code_. - 1. For each element _lexDecl_ of _lexDeclarations_, do + 1. Set the LexicalEnvironment of _calleeContext_ to _lexicalEnv_. + 1. Let _lexicalDeclarations_ be the LexicallyScopedDeclarations of _code_. + 1. For each element _lexicalDeclaration_ of _lexicalDeclarations_, do 1. NOTE: A lexically declared name cannot be the same as a function/generator declaration, formal parameter, or a var name. Lexically declared names are only instantiated here but not initialized. - 1. For each element _dn_ of the BoundNames of _lexDecl_, do - 1. If IsConstantDeclaration of _lexDecl_ is *true*, then - 1. Perform ! _lexEnv_.CreateImmutableBinding(_dn_, *true*). + 1. For each element _dn_ of the BoundNames of _lexicalDeclaration_, do + 1. If IsConstantDeclaration of _lexicalDeclaration_ is *true*, then + 1. Perform ! _lexicalEnv_.CreateImmutableBinding(_dn_, *true*). 1. Else, - 1. Perform ! _lexEnv_.CreateMutableBinding(_dn_, *false*). + 1. Perform ! _lexicalEnv_.CreateMutableBinding(_dn_, *false*). 1. Let _privateEnv_ be the PrivateEnvironment of _calleeContext_. - 1. For each Parse Node _fnDecl_ of _functionsToInitialize_, do - 1. Let _fn_ be the sole element of the BoundNames of _fnDecl_. - 1. Let _fo_ be InstantiateFunctionObject of _fnDecl_ with arguments _lexEnv_ and _privateEnv_. - 1. Perform ! _varEnv_.SetMutableBinding(_fn_, _fo_, *false*). + 1. For each Parse Node _funcDeclaration_ of _funcsToInitialize_, do + 1. Let _funcName_ be the sole element of the BoundNames of _funcDeclaration_. + 1. Let _funcObj_ be InstantiateFunctionObject of _funcDeclaration_ with arguments _lexicalEnv_ and _privateEnv_. + 1. Perform ! _variableEnv_.SetMutableBinding(_funcName_, _funcObj_, *false*). 1. Return ~unused~. @@ -13932,8 +13932,8 @@

Built-in Function Objects

[[Call]] ( - _thisArgument_: an ECMAScript language value, - _argumentsList_: a List of ECMAScript language values, + _thisArg_: an ECMAScript language value, + _argList_: a List of ECMAScript language values, ): either a normal completion containing an ECMAScript language value or a throw completion

@@ -13941,14 +13941,14 @@

a built-in function object _func_

- 1. Return ? BuiltinCallOrConstruct(_func_, _thisArgument_, _argumentsList_, *undefined*). + 1. Return ? BuiltinCallOrConstruct(_func_, _thisArg_, _argList_, *undefined*).

[[Construct]] ( - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, _newTarget_: a constructor, ): either a normal completion containing an Object or a throw completion

@@ -13957,7 +13957,7 @@

a built-in function object _func_ (when the method is present)

- 1. Let _result_ be ? BuiltinCallOrConstruct(_func_, ~uninitialized~, _argumentsList_, _newTarget_). + 1. Let _result_ be ? BuiltinCallOrConstruct(_func_, ~uninitialized~, _argList_, _newTarget_). 1. Assert: _result_ is an Object. 1. Return _result_. @@ -13967,8 +13967,8 @@

BuiltinCallOrConstruct ( _func_: a built-in function object, - _thisArgument_: an ECMAScript language value or ~uninitialized~, - _argumentsList_: a List of ECMAScript language values, + _thisArg_: an ECMAScript language value or ~uninitialized~, + _argList_: a List of ECMAScript language values, _newTarget_: a constructor or *undefined*, ): either a normal completion containing an ECMAScript language value or a throw completion

@@ -13986,14 +13986,14 @@

1. Push _calleeContext_ onto the execution context stack; _calleeContext_ is now the running execution context. 1. If _func_.[[Async]] is *true*, then 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _resultsClosure_ be a new Abstract Closure with no parameters that captures _func_, _thisArgument_, _argumentsList_, and _newTarget_ and performs the following steps when called: - 1. Let _result_ be the Completion Record that is the result of evaluating _func_ in a manner that conforms to the specification of _func_. If _thisArgument_ is ~uninitialized~, the *this* value is uninitialized; else _thisArgument_ provides the *this* value. _argumentsList_ provides the named parameters. _newTarget_ provides the NewTarget value. + 1. Let _resultsClosure_ be a new Abstract Closure with no parameters that captures _func_, _thisArg_, _argList_, and _newTarget_ and performs the following steps when called: + 1. Let _result_ be the Completion Record that is the result of evaluating _func_ in a manner that conforms to the specification of _func_. If _thisArg_ is ~uninitialized~, the *this* value is uninitialized; else _thisArg_ provides the *this* value. _argList_ provides the named parameters. _newTarget_ provides the NewTarget value. 1. NOTE: If _func_ is defined in this document, “the specification of _func_” is the behaviour specified for it via algorithm steps or other means. 1. Return Completion(_result_). 1. Perform AsyncFunctionStart(_promiseCapability_, _resultsClosure_). 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. Return _promiseCapability_.[[Promise]]. - 1. [id="step-call-builtin-function-result"] Let _result_ be the Completion Record that is the result of evaluating _func_ in a manner that conforms to the specification of _func_. If _thisArgument_ is ~uninitialized~, the *this* value is uninitialized; else _thisArgument_ provides the *this* value. _argumentsList_ provides the named parameters. _newTarget_ provides the NewTarget value. + 1. [id="step-call-builtin-function-result"] Let _result_ be the Completion Record that is the result of evaluating _func_ in a manner that conforms to the specification of _func_. If _thisArg_ is ~uninitialized~, the *this* value is uninitialized; else _thisArg_ provides the *this* value. _argList_ provides the named parameters. _newTarget_ provides the NewTarget value. 1. NOTE: If _func_ is defined in this document, “the specification of _func_” is the behaviour specified for it via algorithm steps or other means. 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. Return ? _result_. @@ -14011,7 +14011,7 @@

_name_: a property key or a Private Name, _additionalInternalSlotsList_: a List of names of internal slots, optional _realm_: a Realm Record, - optional _prototype_: an Object or *null*, + optional _proto_: an Object or *null*, optional _prefix_: a String, optional _async_: a Boolean, ): a built-in function object @@ -14022,13 +14022,13 @@

1. If _realm_ is not present, set _realm_ to the current Realm Record. - 1. If _prototype_ is not present, set _prototype_ to _realm_.[[Intrinsics]].[[%Function.prototype%]]. + 1. If _proto_ is not present, set _proto_ to _realm_.[[Intrinsics]].[[%Function.prototype%]]. 1. If _async_ is not present, set _async_ to *false*. 1. Let _internalSlotsList_ be a List containing the names of all the internal slots that requires for the built-in function object that is about to be created. 1. Append the elements of _additionalInternalSlotsList_ to _internalSlotsList_. 1. Let _func_ be a new built-in function object that, when called, performs the action described by _behaviour_ using the provided arguments as the values of the corresponding parameters specified by _behaviour_. The new function object has internal slots whose names are the elements of _internalSlotsList_, and an [[InitialName]] internal slot. 1. Set _func_.[[Async]] to _async_. - 1. Set _func_.[[Prototype]] to _prototype_. + 1. Set _func_.[[Prototype]] to _proto_. 1. Set _func_.[[Extensible]] to *true*. 1. Set _func_.[[Realm]] to _realm_. 1. Set _func_.[[InitialName]] to *null*. @@ -14108,8 +14108,8 @@

Bound Function Exotic Objects

[[Call]] ( - _thisArgument_: an ECMAScript language value, - _argumentsList_: a List of ECMAScript language values, + _thisArg_: an ECMAScript language value, + _argList_: a List of ECMAScript language values, ): either a normal completion containing an ECMAScript language value or a throw completion

@@ -14120,7 +14120,7 @@

1. Let _target_ be _func_.[[BoundTargetFunction]]. 1. Let _boundThis_ be _func_.[[BoundThis]]. 1. Let _boundArgs_ be _func_.[[BoundArguments]]. - 1. Let _args_ be the list-concatenation of _boundArgs_ and _argumentsList_. + 1. Let _args_ be the list-concatenation of _boundArgs_ and _argList_. 1. Return ? Call(_target_, _boundThis_, _args_). @@ -14128,7 +14128,7 @@

[[Construct]] ( - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, _newTarget_: a constructor, ): either a normal completion containing an Object or a throw completion

@@ -14140,7 +14140,7 @@

1. Let _target_ be _func_.[[BoundTargetFunction]]. 1. Assert: IsConstructor(_target_) is *true*. 1. Let _boundArgs_ be _func_.[[BoundArguments]]. - 1. Let _args_ be the list-concatenation of _boundArgs_ and _argumentsList_. + 1. Let _args_ be the list-concatenation of _boundArgs_ and _argList_. 1. If SameValue(_func_, _newTarget_) is *true*, set _newTarget_ to _target_. 1. Return ? Construct(_target_, _args_, _newTarget_). @@ -14149,7 +14149,7 @@

BoundFunctionCreate ( - _targetFunction_: a function object, + _targetFunc_: a function object, _boundThis_: an ECMAScript language value, _boundArgs_: a List of ECMAScript language values, ): either a normal completion containing a function object or a throw completion @@ -14159,14 +14159,14 @@

It is used to specify the creation of new bound function exotic objects.

- 1. Let _proto_ be ? _targetFunction_.[[GetPrototypeOf]](). + 1. Let _proto_ be ? _targetFunc_.[[GetPrototypeOf]](). 1. Let _internalSlotsList_ be the list-concatenation of « [[Prototype]], [[Extensible]] » and the internal slots listed in . 1. Let _obj_ be MakeBasicObject(_internalSlotsList_). 1. Set _obj_.[[Prototype]] to _proto_. 1. Set _obj_.[[Call]] as specified in . - 1. If IsConstructor(_targetFunction_) is *true*, then + 1. If IsConstructor(_targetFunc_) is *true*, then 1. Set _obj_.[[Construct]] as specified in . - 1. Set _obj_.[[BoundTargetFunction]] to _targetFunction_. + 1. Set _obj_.[[BoundTargetFunction]] to _targetFunc_. 1. Set _obj_.[[BoundThis]] to _boundThis_. 1. Set _obj_.[[BoundArguments]] to _boundArgs_. 1. Return _obj_. @@ -14184,7 +14184,7 @@

Array Exotic Objects

[[DefineOwnProperty]] ( _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing a Boolean or a throw completion

@@ -14192,7 +14192,7 @@

an Array exotic object _array_

- 1. If _propertyKey_ is *"length"*, return ? ArraySetLength(_array_, _desc_). + 1. If _propertyKey_ is *"length"*, return ? ArraySetLength(_array_, _propertyDesc_). 1. If _propertyKey_ is an array index, then 1. Let _lengthDesc_ be OrdinaryGetOwnProperty(_array_, *"length"*). 1. Assert: _lengthDesc_ is not *undefined*. @@ -14202,14 +14202,14 @@

1. Assert: _length_ is a non-negative integral Number. 1. Let _index_ be ! ToUint32(_propertyKey_). 1. If _index_ ≥ _length_ and _lengthDesc_.[[Writable]] is *false*, return *false*. - 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_array_, _propertyKey_, _desc_). + 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_array_, _propertyKey_, _propertyDesc_). 1. If _succeeded_ is *false*, return *false*. 1. If _index_ ≥ _length_, then 1. Set _lengthDesc_.[[Value]] to _index_ + *1*𝔽. 1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_array_, *"length"*, _lengthDesc_). 1. Assert: _succeeded_ is *true*. 1. Return *true*. - 1. Return ? OrdinaryDefineOwnProperty(_array_, _propertyKey_, _desc_). + 1. Return ? OrdinaryDefineOwnProperty(_array_, _propertyKey_, _propertyDesc_). @@ -14249,18 +14249,18 @@

1. Let _isArray_ be ? IsArray(_originalArray_). 1. If _isArray_ is *false*, return ? ArrayCreate(_length_). - 1. Let _constructor_ be ? Get(_originalArray_, *"constructor"*). - 1. If IsConstructor(_constructor_) is *true*, then + 1. Let _ctor_ be ? Get(_originalArray_, *"constructor"*). + 1. If IsConstructor(_ctor_) is *true*, then 1. Let _thisRealm_ be the current Realm Record. - 1. Let _constructorRealm_ be ? GetFunctionRealm(_constructor_). - 1. If _thisRealm_ and _constructorRealm_ are not the same Realm Record, then - 1. If SameValue(_constructor_, _constructorRealm_.[[Intrinsics]].[[%Array%]]) is *true*, set _constructor_ to *undefined*. - 1. If _constructor_ is an Object, then - 1. Set _constructor_ to ? Get(_constructor_, %Symbol.species%). - 1. If _constructor_ is *null*, set _constructor_ to *undefined*. - 1. If _constructor_ is *undefined*, return ? ArrayCreate(_length_). - 1. If IsConstructor(_constructor_) is *false*, throw a *TypeError* exception. - 1. Return ? Construct(_constructor_, « 𝔽(_length_) »). + 1. Let _ctorRealm_ be ? GetFunctionRealm(_ctor_). + 1. If _thisRealm_ and _ctorRealm_ are not the same Realm Record, then + 1. If SameValue(_ctor_, _ctorRealm_.[[Intrinsics]].[[%Array%]]) is *true*, set _ctor_ to *undefined*. + 1. If _ctor_ is an Object, then + 1. Set _ctor_ to ? Get(_ctor_, %Symbol.species%). + 1. If _ctor_ is *null*, set _ctor_ to *undefined*. + 1. If _ctor_ is *undefined*, return ? ArrayCreate(_length_). + 1. If IsConstructor(_ctor_) is *false*, throw a *TypeError* exception. + 1. Return ? Construct(_ctor_, « 𝔽(_length_) »).

If _originalArray_ was created using the standard built-in Array constructor for a realm that is not the realm of the running execution context, then a new Array is created using the realm of the running execution context. This maintains compatibility with Web browsers that have historically had that behaviour for the `Array.prototype` methods that now are defined using ArraySpeciesCreate.

@@ -14271,41 +14271,41 @@

ArraySetLength ( _array_: an Array, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing a Boolean or a throw completion

- 1. If _desc_ does not have a [[Value]] field, then - 1. Return ! OrdinaryDefineOwnProperty(_array_, *"length"*, _desc_). - 1. Let _newLenDesc_ be a copy of _desc_. - 1. [id="step-arraysetlength-newlen"] Let _newLen_ be ? ToUint32(_desc_.[[Value]]). - 1. [id="step-arraysetlength-numberlen"] Let _numberLen_ be ? ToNumber(_desc_.[[Value]]). - 1. If SameValueZero(_newLen_, _numberLen_) is *false*, throw a *RangeError* exception. - 1. Set _newLenDesc_.[[Value]] to _newLen_. - 1. Let _oldLenDesc_ be OrdinaryGetOwnProperty(_array_, *"length"*). - 1. Assert: _oldLenDesc_ is not *undefined*. - 1. Assert: IsDataDescriptor(_oldLenDesc_) is *true*. - 1. Assert: _oldLenDesc_.[[Configurable]] is *false*. - 1. Let _oldLen_ be _oldLenDesc_.[[Value]]. - 1. If _newLen_ ≥ _oldLen_, then - 1. Return ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLenDesc_). - 1. If _oldLenDesc_.[[Writable]] is *false*, return *false*. - 1. If _newLenDesc_ does not have a [[Writable]] field or _newLenDesc_.[[Writable]] is *true*, then + 1. If _propertyDesc_ does not have a [[Value]] field, then + 1. Return ! OrdinaryDefineOwnProperty(_array_, *"length"*, _propertyDesc_). + 1. Let _newLengthDesc_ be a copy of _propertyDesc_. + 1. [id="step-arraysetlength-newlen"] Let _newLength_ be ? ToUint32(_propertyDesc_.[[Value]]). + 1. [id="step-arraysetlength-numberlen"] Let _numberLength_ be ? ToNumber(_propertyDesc_.[[Value]]). + 1. If SameValueZero(_newLength_, _numberLength_) is *false*, throw a *RangeError* exception. + 1. Set _newLengthDesc_.[[Value]] to _newLength_. + 1. Let _oldLengthDesc_ be OrdinaryGetOwnProperty(_array_, *"length"*). + 1. Assert: _oldLengthDesc_ is not *undefined*. + 1. Assert: IsDataDescriptor(_oldLengthDesc_) is *true*. + 1. Assert: _oldLengthDesc_.[[Configurable]] is *false*. + 1. Let _oldLength_ be _oldLengthDesc_.[[Value]]. + 1. If _newLength_ ≥ _oldLength_, then + 1. Return ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLengthDesc_). + 1. If _oldLengthDesc_.[[Writable]] is *false*, return *false*. + 1. If _newLengthDesc_ does not have a [[Writable]] field or _newLengthDesc_.[[Writable]] is *true*, then 1. Let _newWritable_ be *true*. 1. Else, 1. NOTE: Setting the [[Writable]] attribute to *false* is deferred in case any elements cannot be deleted. 1. Let _newWritable_ be *false*. - 1. Set _newLenDesc_.[[Writable]] to *true*. - 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLenDesc_). + 1. Set _newLengthDesc_.[[Writable]] to *true*. + 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLengthDesc_). 1. If _succeeded_ is *false*, return *false*. - 1. For each own property key _propertyKey_ of _array_ such that _propertyKey_ is an array index and ! ToUint32(_propertyKey_) ≥ _newLen_, in descending numeric index order, do + 1. For each own property key _propertyKey_ of _array_ such that _propertyKey_ is an array index and ! ToUint32(_propertyKey_) ≥ _newLength_, in descending numeric index order, do 1. Let _deleteSucceeded_ be ! _array_.[[Delete]](_propertyKey_). 1. If _deleteSucceeded_ is *false*, then - 1. Set _newLenDesc_.[[Value]] to ! ToUint32(_propertyKey_) + *1*𝔽. - 1. If _newWritable_ is *false*, set _newLenDesc_.[[Writable]] to *false*. - 1. Perform ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLenDesc_). + 1. Set _newLengthDesc_.[[Value]] to ! ToUint32(_propertyKey_) + *1*𝔽. + 1. If _newWritable_ is *false*, set _newLengthDesc_.[[Writable]] to *false*. + 1. Perform ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLengthDesc_). 1. Return *false*. 1. If _newWritable_ is *false*, then 1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_array_, *"length"*, PropertyDescriptor { [[Writable]]: *false* }). @@ -14313,7 +14313,7 @@

1. Return *true*. -

In steps and , if _desc_.[[Value]] is an object then its `valueOf` method is called twice. This is legacy behaviour that was specified with this effect starting with the 2nd Edition of this specification.

+

In steps and , if _propertyDesc_.[[Value]] is an object then its `valueOf` method is called twice. This is legacy behaviour that was specified with this effect starting with the 2nd Edition of this specification.

@@ -14334,12 +14334,12 @@

for
-
a String exotic object _str_
+
a String exotic object _string_
- 1. Let _desc_ be OrdinaryGetOwnProperty(_str_, _propertyKey_). - 1. If _desc_ is not *undefined*, return _desc_. - 1. Return StringGetOwnProperty(_str_, _propertyKey_). + 1. Let _propertyDesc_ be OrdinaryGetOwnProperty(_string_, _propertyKey_). + 1. If _propertyDesc_ is not *undefined*, return _propertyDesc_. + 1. Return StringGetOwnProperty(_string_, _propertyKey_). @@ -14347,19 +14347,19 @@

[[DefineOwnProperty]] ( _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): a normal completion containing a Boolean

for
-
a String exotic object _str_
+
a String exotic object _string_
- 1. Let _stringDesc_ be StringGetOwnProperty(_str_, _propertyKey_). + 1. Let _stringDesc_ be StringGetOwnProperty(_string_, _propertyKey_). 1. If _stringDesc_ is not *undefined*, then - 1. Let _extensible_ be _str_.[[Extensible]]. - 1. Return IsCompatiblePropertyDescriptor(_extensible_, _desc_, _stringDesc_). - 1. Return ! OrdinaryDefineOwnProperty(_str_, _propertyKey_, _desc_). + 1. Let _extensible_ be _string_.[[Extensible]]. + 1. Return IsCompatiblePropertyDescriptor(_extensible_, _propertyDesc_, _stringDesc_). + 1. Return ! OrdinaryDefineOwnProperty(_string_, _propertyKey_, _propertyDesc_). @@ -14371,12 +14371,12 @@

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

1. Let _keys_ be a new empty List. - 1. Let _str_ be _obj_.[[StringData]]. - 1. Assert: _str_ is a String. - 1. Let _len_ be the length of _str_. - 1. For each integer _i_ such that 0 ≤ _i_ < _len_, in ascending order, do + 1. Let _string_ be _obj_.[[StringData]]. + 1. Assert: _string_ is a String. + 1. Let _length_ be the length of _string_. + 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 _propertyKey_ of _obj_ such that _propertyKey_ is an array index and ! ToIntegerOrInfinity(_propertyKey_) ≥ _len_, in ascending numeric index order, do + 1. For each own property key _propertyKey_ of _obj_ such that _propertyKey_ is an array index and ! ToIntegerOrInfinity(_propertyKey_) ≥ _length_, in ascending numeric index order, do 1. Append _propertyKey_ to _keys_. 1. For each own property key _propertyKey_ of _obj_ such that _propertyKey_ is a String and _propertyKey_ is not an array index, in ascending chronological order of property creation, do 1. Append _propertyKey_ to _keys_. @@ -14390,7 +14390,7 @@

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

StringCreate ( _value_: a String, - _prototype_: an Object, + _proto_: an Object, ): a String exotic object

@@ -14398,22 +14398,22 @@

It is used to specify the creation of new String exotic objects.

- 1. Let _str_ be MakeBasicObject(« [[Prototype]], [[Extensible]], [[StringData]] »). - 1. Set _str_.[[Prototype]] to _prototype_. - 1. Set _str_.[[StringData]] to _value_. - 1. Set _str_.[[GetOwnProperty]] as specified in . - 1. Set _str_.[[DefineOwnProperty]] as specified in . - 1. Set _str_.[[OwnPropertyKeys]] as specified in . + 1. Let _string_ be MakeBasicObject(« [[Prototype]], [[Extensible]], [[StringData]] »). + 1. Set _string_.[[Prototype]] to _proto_. + 1. Set _string_.[[StringData]] to _value_. + 1. Set _string_.[[GetOwnProperty]] as specified in . + 1. Set _string_.[[DefineOwnProperty]] as specified in . + 1. Set _string_.[[OwnPropertyKeys]] as specified in . 1. Let _length_ be the length of _value_. - 1. Perform ! DefinePropertyOrThrow(_str_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). - 1. Return _str_. + 1. Perform ! DefinePropertyOrThrow(_string_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Return _string_.

StringGetOwnProperty ( - _str_: an Object that has a [[StringData]] internal slot, + _string_: an Object that has a [[StringData]] internal slot, _propertyKey_: a property key, ): a Property Descriptor or *undefined*

@@ -14421,15 +14421,15 @@

1. If _propertyKey_ is not a String, return *undefined*. - 1. Let _index_ be CanonicalNumericIndexString(_propertyKey_). - 1. If _index_ is not an integral Number, return *undefined*. - 1. If _index_ is *-0*𝔽 or _index_ < *-0*𝔽, return *undefined*. - 1. Let _stringData_ be _str_.[[StringData]]. + 1. Let _numericIndex_ be CanonicalNumericIndexString(_propertyKey_). + 1. If _numericIndex_ is not an integral Number, return *undefined*. + 1. If _numericIndex_ is *-0*𝔽 or _numericIndex_ < *-0*𝔽, return *undefined*. + 1. Let _stringData_ be _string_.[[StringData]]. 1. Assert: _stringData_ is a String. - 1. Let _len_ be the length of _stringData_. - 1. If ℝ(_index_) ≥ _len_, return *undefined*. - 1. Let _resultStr_ be the substring of _stringData_ from ℝ(_index_) to ℝ(_index_) + 1. - 1. Return the PropertyDescriptor { [[Value]]: _resultStr_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }. + 1. Let _length_ be the length of _stringData_. + 1. If ℝ(_numericIndex_) ≥ _length_, return *undefined*. + 1. Let _resultString_ be the substring of _stringData_ from ℝ(_numericIndex_) to ℝ(_numericIndex_) + 1. + 1. Return the PropertyDescriptor { [[Value]]: _resultString_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }. @@ -14471,13 +14471,13 @@

an arguments exotic object _args_
- 1. Let _desc_ be OrdinaryGetOwnProperty(_args_, _propertyKey_). - 1. If _desc_ is *undefined*, return *undefined*. + 1. Let _propertyDesc_ be OrdinaryGetOwnProperty(_args_, _propertyKey_). + 1. If _propertyDesc_ is *undefined*, return *undefined*. 1. Let _map_ be _args_.[[ParameterMap]]. 1. Let _isMapped_ be ! HasOwnProperty(_map_, _propertyKey_). 1. If _isMapped_ is *true*, then - 1. Set _desc_.[[Value]] to ! Get(_map_, _propertyKey_). - 1. Return _desc_. + 1. Set _propertyDesc_.[[Value]] to ! Get(_map_, _propertyKey_). + 1. Return _propertyDesc_. @@ -14485,7 +14485,7 @@

[[DefineOwnProperty]] ( _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): a normal completion containing a Boolean

@@ -14495,21 +14495,21 @@

1. Let _map_ be _args_.[[ParameterMap]]. 1. Let _isMapped_ be ! HasOwnProperty(_map_, _propertyKey_). - 1. Let _newArgDesc_ be _desc_. - 1. If _isMapped_ is *true* and IsDataDescriptor(_desc_) is *true*, then - 1. If _desc_ does not have a [[Value]] field, _desc_ has a [[Writable]] field, and _desc_.[[Writable]] is *false*, then - 1. Set _newArgDesc_ to a copy of _desc_. + 1. Let _newArgDesc_ be _propertyDesc_. + 1. If _isMapped_ is *true* and IsDataDescriptor(_propertyDesc_) is *true*, then + 1. If _propertyDesc_ does not have a [[Value]] field, _propertyDesc_ has a [[Writable]] field, and _propertyDesc_.[[Writable]] is *false*, then + 1. Set _newArgDesc_ to a copy of _propertyDesc_. 1. Set _newArgDesc_.[[Value]] to ! Get(_map_, _propertyKey_). 1. Let _allowed_ be ! OrdinaryDefineOwnProperty(_args_, _propertyKey_, _newArgDesc_). 1. If _allowed_ is *false*, return *false*. 1. If _isMapped_ is *true*, then - 1. If IsAccessorDescriptor(_desc_) is *true*, then + 1. If IsAccessorDescriptor(_propertyDesc_) is *true*, then 1. Perform ! _map_.[[Delete]](_propertyKey_). 1. Else, - 1. If _desc_ has a [[Value]] field, then + 1. If _propertyDesc_ has a [[Value]] field, then 1. Assert: The following Set will succeed, since formal parameters mapped by arguments objects are always writable. - 1. Perform ! Set(_map_, _propertyKey_, _desc_.[[Value]], *false*). - 1. If _desc_ has a [[Writable]] field and _desc_.[[Writable]] is *false*, then + 1. Perform ! Set(_map_, _propertyKey_, _propertyDesc_.[[Value]], *false*). + 1. If _propertyDesc_ has a [[Writable]] field and _propertyDesc_.[[Writable]] is *false*, then 1. Perform ! _map_.[[Delete]](_propertyKey_). 1. Return *true*. @@ -14583,20 +14583,20 @@

CreateUnmappedArgumentsObject ( - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, ): an ordinary object

- 1. Let _len_ be the number of elements in _argumentsList_. + 1. Let _length_ be the number of elements in _argList_. 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%, « [[ParameterMap]] »). 1. Set _obj_.[[ParameterMap]] to *undefined*. - 1. Perform ! DefinePropertyOrThrow(_obj_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_len_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Perform ! DefinePropertyOrThrow(_obj_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, - 1. Let _val_ be _argumentsList_[_index_]. - 1. Perform ! CreateDataPropertyOrThrow(_obj_, ! ToString(𝔽(_index_)), _val_). + 1. Repeat, while _index_ < _length_, + 1. Let _value_ be _argList_[_index_]. + 1. Perform ! CreateDataPropertyOrThrow(_obj_, ! ToString(𝔽(_index_)), _value_). 1. Set _index_ to _index_ + 1. 1. Perform ! DefinePropertyOrThrow(_obj_, %Symbol.iterator%, PropertyDescriptor { [[Value]]: %Array.prototype.values%, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Perform ! DefinePropertyOrThrow(_obj_, *"callee"*, PropertyDescriptor { [[Get]]: %ThrowTypeError%, [[Set]]: %ThrowTypeError%, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -14609,15 +14609,15 @@

CreateMappedArgumentsObject ( _func_: an Object, _formals_: a Parse Node, - _argumentsList_: a List of ECMAScript language values, - _env_: an Environment Record, + _argList_: a List of ECMAScript language values, + _envRecord_: an Environment Record, ): an arguments exotic object

1. Assert: _formals_ does not contain a rest parameter, any binding patterns, or any initializers. It may contain duplicate identifiers. - 1. Let _len_ be the number of elements in _argumentsList_. + 1. Let _length_ be the number of elements in _argList_. 1. Let _obj_ be MakeBasicObject(« [[Prototype]], [[Extensible]], [[ParameterMap]] »). 1. Set _obj_.[[GetOwnProperty]] as specified in . 1. Set _obj_.[[DefineOwnProperty]] as specified in . @@ -14627,23 +14627,23 @@

1. Set _obj_.[[Prototype]] to %Object.prototype%. 1. Let _map_ be OrdinaryObjectCreate(*null*). 1. Set _obj_.[[ParameterMap]] to _map_. - 1. Let _parameterNames_ be the BoundNames of _formals_. - 1. Let _numberOfParameters_ be the number of elements in _parameterNames_. + 1. Let _paramNames_ be the BoundNames of _formals_. + 1. Let _paramCount_ be the number of elements in _paramNames_. 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, - 1. Let _val_ be _argumentsList_[_index_]. - 1. Perform ! CreateDataPropertyOrThrow(_obj_, ! ToString(𝔽(_index_)), _val_). + 1. Repeat, while _index_ < _length_, + 1. Let _value_ be _argList_[_index_]. + 1. Perform ! CreateDataPropertyOrThrow(_obj_, ! ToString(𝔽(_index_)), _value_). 1. Set _index_ to _index_ + 1. - 1. Perform ! DefinePropertyOrThrow(_obj_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_len_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Perform ! DefinePropertyOrThrow(_obj_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Let _mappedNames_ be a new empty List. - 1. Set _index_ to _numberOfParameters_ - 1. + 1. Set _index_ to _paramCount_ - 1. 1. Repeat, while _index_ ≥ 0, - 1. Let _name_ be _parameterNames_[_index_]. + 1. Let _name_ be _paramNames_[_index_]. 1. If _mappedNames_ does not contain _name_, then 1. Append _name_ to _mappedNames_. - 1. If _index_ < _len_, then - 1. Let _getter_ be MakeArgGetter(_name_, _env_). - 1. Let _setter_ be MakeArgSetter(_name_, _env_). + 1. If _index_ < _length_, then + 1. Let _getter_ be MakeArgGetter(_name_, _envRecord_). + 1. Let _setter_ be MakeArgSetter(_name_, _envRecord_). 1. Perform ! _map_.[[DefineOwnProperty]](! ToString(𝔽(_index_)), PropertyDescriptor { [[Set]]: _setter_, [[Get]]: _getter_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Set _index_ to _index_ - 1. 1. Perform ! DefinePropertyOrThrow(_obj_, %Symbol.iterator%, PropertyDescriptor { [[Value]]: %Array.prototype.values%, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). @@ -14655,16 +14655,16 @@

MakeArgGetter ( _name_: a String, - _env_: an Environment Record, + _envRecord_: an Environment Record, ): a function object

description
-
It creates a built-in function object that when executed returns the value bound for _name_ in _env_.
+
It creates a built-in function object that when executed returns the value bound for _name_ in _envRecord_.
- 1. Let _getterClosure_ be a new Abstract Closure with no parameters that captures _name_ and _env_ and performs the following steps when called: - 1. Return NormalCompletion(! _env_.GetBindingValue(_name_, *false*)). + 1. Let _getterClosure_ be a new Abstract Closure with no parameters that captures _name_ and _envRecord_ and performs the following steps when called: + 1. Return NormalCompletion(! _envRecord_.GetBindingValue(_name_, *false*)). 1. Let _getter_ be CreateBuiltinFunction(_getterClosure_, 0, *""*, « »). 1. NOTE: _getter_ is never directly accessible to ECMAScript code. 1. Return _getter_. @@ -14675,16 +14675,16 @@

MakeArgSetter ( _name_: a String, - _env_: an Environment Record, + _envRecord_: an Environment Record, ): a function object

description
-
It creates a built-in function object that when executed sets the value bound for _name_ in _env_.
+
It creates a built-in function object that when executed sets the value bound for _name_ in _envRecord_.
- 1. Let _setterClosure_ be a new Abstract Closure with parameters (_value_) that captures _name_ and _env_ and performs the following steps when called: - 1. Return NormalCompletion(! _env_.SetMutableBinding(_name_, _value_, *false*)). + 1. Let _setterClosure_ be a new Abstract Closure with parameters (_value_) that captures _name_ and _envRecord_ and performs the following steps when called: + 1. Return NormalCompletion(! _envRecord_.SetMutableBinding(_name_, _value_, *false*)). 1. Let _setter_ be CreateBuiltinFunction(_setterClosure_, 1, *""*, « »). 1. NOTE: _setter_ is never directly accessible to ECMAScript code. 1. Return _setter_. @@ -14758,7 +14758,7 @@

[[DefineOwnProperty]] ( _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing a Boolean or a throw completion

@@ -14770,13 +14770,13 @@

1. Let _numericIndex_ be CanonicalNumericIndexString(_propertyKey_). 1. If _numericIndex_ is not *undefined*, then 1. If IsValidIntegerIndex(_obj_, _numericIndex_) is *false*, return *false*. - 1. If _desc_ has a [[Configurable]] field and _desc_.[[Configurable]] is *false*, return *false*. - 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 ? TypedArraySetElement(_obj_, _numericIndex_, _desc_.[[Value]]). + 1. If _propertyDesc_ has a [[Configurable]] field and _propertyDesc_.[[Configurable]] is *false*, return *false*. + 1. If _propertyDesc_ has an [[Enumerable]] field and _propertyDesc_.[[Enumerable]] is *false*, return *false*. + 1. If IsAccessorDescriptor(_propertyDesc_) is *true*, return *false*. + 1. If _propertyDesc_ has a [[Writable]] field and _propertyDesc_.[[Writable]] is *false*, return *false*. + 1. If _propertyDesc_ has a [[Value]] field, perform ? TypedArraySetElement(_obj_, _numericIndex_, _propertyDesc_.[[Value]]). 1. Return *true*. - 1. Return ! OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _desc_). + 1. Return ! OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _propertyDesc_). @@ -14932,7 +14932,7 @@

TypedArrayCreate ( - _prototype_: an Object, + _proto_: an Object, ): a TypedArray

@@ -14941,17 +14941,17 @@

1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]], [[ViewedArrayBuffer]], [[TypedArrayName]], [[ContentType]], [[ByteLength]], [[ByteOffset]], [[ArrayLength]] ». - 1. Let _typedArray_ be MakeBasicObject(_internalSlotsList_). - 1. Set _typedArray_.[[PreventExtensions]] as specified in . - 1. Set _typedArray_.[[GetOwnProperty]] as specified in . - 1. Set _typedArray_.[[HasProperty]] as specified in . - 1. Set _typedArray_.[[DefineOwnProperty]] as specified in . - 1. Set _typedArray_.[[Get]] as specified in . - 1. Set _typedArray_.[[Set]] as specified in . - 1. Set _typedArray_.[[Delete]] as specified in . - 1. Set _typedArray_.[[OwnPropertyKeys]] as specified in . - 1. Set _typedArray_.[[Prototype]] to _prototype_. - 1. Return _typedArray_. + 1. Let _ta_ be MakeBasicObject(_internalSlotsList_). + 1. Set _ta_.[[PreventExtensions]] as specified in . + 1. Set _ta_.[[GetOwnProperty]] as specified in . + 1. Set _ta_.[[HasProperty]] as specified in . + 1. Set _ta_.[[DefineOwnProperty]] as specified in . + 1. Set _ta_.[[Get]] as specified in . + 1. Set _ta_.[[Set]] as specified in . + 1. Set _ta_.[[Delete]] as specified in . + 1. Set _ta_.[[OwnPropertyKeys]] as specified in . + 1. Set _ta_.[[Prototype]] to _proto_. + 1. Return _ta_.
@@ -15093,14 +15093,14 @@

- 1. If _obj_.[[ContentType]] is ~bigint~, let _numValue_ be ? ToBigInt(_value_). - 1. Else, let _numValue_ be ? ToNumber(_value_). + 1. If _obj_.[[ContentType]] is ~bigint~, let _number_ be ? ToBigInt(_value_). + 1. Else, let _number_ be ? ToNumber(_value_). 1. If IsValidIntegerIndex(_obj_, _index_) is *true*, then 1. Let _offset_ be _obj_.[[ByteOffset]]. 1. Let _elementSize_ be TypedArrayElementSize(_obj_). 1. Let _byteIndexInBuffer_ be (ℝ(_index_) × _elementSize_) + _offset_. 1. Let _elementType_ be TypedArrayElementType(_obj_). - 1. Perform SetValueInBuffer(_obj_.[[ViewedArrayBuffer]], _byteIndexInBuffer_, _elementType_, _numValue_, *true*, ~unordered~). + 1. Perform SetValueInBuffer(_obj_.[[ViewedArrayBuffer]], _byteIndexInBuffer_, _elementType_, _number_, *true*, ~unordered~). 1. Return ~unused~. @@ -15244,7 +15244,7 @@

[[DefineOwnProperty]] ( _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing a Boolean or a throw completion

@@ -15252,14 +15252,14 @@

a module namespace exotic object _obj_

- 1. If _propertyKey_ is a Symbol, return ! OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _desc_). + 1. If _propertyKey_ is a Symbol, return ! OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _propertyDesc_). 1. Let _current_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). 1. If _current_ is *undefined*, return *false*. - 1. If _desc_ has a [[Configurable]] field and _desc_.[[Configurable]] is *true*, return *false*. - 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, return SameValue(_desc_.[[Value]], _current_.[[Value]]). + 1. If _propertyDesc_ has a [[Configurable]] field and _propertyDesc_.[[Configurable]] is *true*, return *false*. + 1. If _propertyDesc_ has an [[Enumerable]] field and _propertyDesc_.[[Enumerable]] is *false*, return *false*. + 1. If IsAccessorDescriptor(_propertyDesc_) is *true*, return *false*. + 1. If _propertyDesc_ has a [[Writable]] field and _propertyDesc_.[[Writable]] is *false*, return *false*. + 1. If _propertyDesc_ has a [[Value]] field, return SameValue(_propertyDesc_.[[Value]], _current_.[[Value]]). 1. Return *true*. @@ -15559,7 +15559,7 @@

Proxy Object Internal Methods and Internal Slots

When a handler method is called to provide the implementation of a Proxy object internal method, the handler method is passed the proxy's target object as a parameter. A proxy's handler object does not necessarily have a method corresponding to every essential internal method. Invoking an internal method on the proxy results in the invocation of the corresponding internal method on the proxy's target object if the handler object does not have a method corresponding to the internal trap.

The [[ProxyHandler]] and [[ProxyTarget]] internal slots of a Proxy object are always initialized when the object is created and typically may not be modified. Some Proxy objects are created in a manner that permits them to be subsequently revoked. When a proxy is revoked, its [[ProxyHandler]] and [[ProxyTarget]] internal slots are set to *null* causing subsequent invocations of internal methods on that Proxy object to throw a *TypeError* exception.

Because Proxy objects permit the implementation of internal methods to be provided by arbitrary ECMAScript code, it is possible to define a Proxy object whose handler methods violates the invariants defined in . Some of the internal method invariants defined in are essential integrity invariants. These invariants are explicitly enforced by the Proxy object internal methods specified in this section. An ECMAScript implementation must be robust in the presence of all possible invariant violations.

-

In the following algorithm descriptions, assume _obj_ is an ECMAScript Proxy object, _propertyKey_ is a property key value, _value_ is any ECMAScript language value and _desc_ is a Property Descriptor record.

+

In the following algorithm descriptions, assume _obj_ is an ECMAScript Proxy object, _propertyKey_ is a property key value, _value_ is any ECMAScript language value and _propertyDesc_ is a Property Descriptor record.

[[GetPrototypeOf]] ( ): either a normal completion containing either an Object or *null*, or a throw completion

@@ -15769,7 +15769,7 @@

[[DefineOwnProperty]] ( _propertyKey_: a property key, - _desc_: a Property Descriptor, + _propertyDesc_: a Property Descriptor, ): either a normal completion containing a Boolean or a throw completion

@@ -15783,13 +15783,13 @@

1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"defineProperty"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[DefineOwnProperty]](_propertyKey_, _desc_). - 1. Let _descObj_ be FromPropertyDescriptor(_desc_). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _propertyKey_, _descObj_ »)). + 1. Return ? _target_.[[DefineOwnProperty]](_propertyKey_, _propertyDesc_). + 1. Let _propertyDescObj_ be FromPropertyDescriptor(_propertyDesc_). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _propertyKey_, _propertyDescObj_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_propertyKey_). 1. Let _extensibleTarget_ be ? IsExtensible(_target_). - 1. If _desc_ has a [[Configurable]] field and _desc_.[[Configurable]] is *false*, then + 1. If _propertyDesc_ has a [[Configurable]] field and _propertyDesc_.[[Configurable]] is *false*, then 1. Let _settingConfigFalse_ be *true*. 1. Else, 1. Let _settingConfigFalse_ be *false*. @@ -15797,10 +15797,10 @@

1. If _extensibleTarget_ is *false*, throw a *TypeError* exception. 1. If _settingConfigFalse_ is *true*, throw a *TypeError* exception. 1. Else, - 1. If IsCompatiblePropertyDescriptor(_extensibleTarget_, _desc_, _targetDesc_) is *false*, throw a *TypeError* exception. + 1. If IsCompatiblePropertyDescriptor(_extensibleTarget_, _propertyDesc_, _targetDesc_) is *false*, throw a *TypeError* exception. 1. If _settingConfigFalse_ is *true* and _targetDesc_.[[Configurable]] is *true*, throw a *TypeError* exception. 1. If IsDataDescriptor(_targetDesc_) is *true*, _targetDesc_.[[Configurable]] is *false*, and _targetDesc_.[[Writable]] is *true*, then - 1. If _desc_ has a [[Writable]] field and _desc_.[[Writable]] is *false*, throw a *TypeError* exception. + 1. If _propertyDesc_ has a [[Writable]] field and _propertyDesc_.[[Writable]] is *false*, throw a *TypeError* exception. 1. Return *true*. @@ -16022,8 +16022,8 @@

[[OwnPropertyKeys]] ( ): either a normal completion containing a List of pro 1. Let _targetConfigurableKeys_ be a new empty List. 1. Let _targetNonconfigurableKeys_ be a new empty List. 1. For each element _key_ of _targetKeys_, do - 1. Let _desc_ be ? _target_.[[GetOwnProperty]](_key_). - 1. If _desc_ is not *undefined* and _desc_.[[Configurable]] is *false*, then + 1. Let _propertyDesc_ be ? _target_.[[GetOwnProperty]](_key_). + 1. If _propertyDesc_ is not *undefined* and _propertyDesc_.[[Configurable]] is *false*, then 1. Append _key_ to _targetNonconfigurableKeys_. 1. Else, 1. Append _key_ to _targetConfigurableKeys_. @@ -16065,8 +16065,8 @@

[[OwnPropertyKeys]] ( ): either a normal completion containing a List of pro

[[Call]] ( - _thisArgument_: an ECMAScript language value, - _argumentsList_: a List of ECMAScript language values, + _thisArg_: an ECMAScript language value, + _argList_: a List of ECMAScript language values, ): either a normal completion containing an ECMAScript language value or a throw completion

@@ -16080,9 +16080,9 @@

1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"apply"*). 1. If _trap_ is *undefined*, then - 1. Return ? Call(_target_, _thisArgument_, _argumentsList_). - 1. Let _argArray_ be CreateArrayFromList(_argumentsList_). - 1. Return ? Call(_trap_, _handler_, « _target_, _thisArgument_, _argArray_ »). + 1. Return ? Call(_target_, _thisArg_, _argList_). + 1. Let _argArray_ be CreateArrayFromList(_argList_). + 1. Return ? Call(_trap_, _handler_, « _target_, _thisArg_, _argArray_ »).

A Proxy exotic object only has a [[Call]] internal method if the initial value of its [[ProxyTarget]] internal slot is an object that has a [[Call]] internal method.

@@ -16092,7 +16092,7 @@

[[Construct]] ( - _argumentsList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, _newTarget_: a constructor, ): either a normal completion containing an Object or a throw completion

@@ -16108,8 +16108,8 @@

1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"construct"*). 1. If _trap_ is *undefined*, then - 1. Return ? Construct(_target_, _argumentsList_, _newTarget_). - 1. Let _argArray_ be CreateArrayFromList(_argumentsList_). + 1. Return ? Construct(_target_, _argList_, _newTarget_). + 1. Let _argArray_ be CreateArrayFromList(_argList_). 1. Let _newObj_ be ? Call(_trap_, _handler_, « _target_, _argArray_, _newTarget_ »). 1. If _newObj_ is not an Object, throw a *TypeError* exception. 1. Return _newObj_. @@ -16192,16 +16192,16 @@

Syntax

Static Semantics: UTF16EncodeCodePoint ( - _cp_: a Unicode code point, + _codePoint_: a Unicode code point, ): a String

- 1. Assert: 0 ≤ _cp_ ≤ 0x10FFFF. - 1. If _cp_ ≤ 0xFFFF, return the String value consisting of the code unit whose numeric value is _cp_. - 1. Let _cu1_ be the code unit whose numeric value is floor((_cp_ - 0x10000) / 0x400) + 0xD800. - 1. Let _cu2_ be the code unit whose numeric value is ((_cp_ - 0x10000) modulo 0x400) + 0xDC00. + 1. Assert: 0 ≤ _codePoint_ ≤ 0x10FFFF. + 1. If _codePoint_ ≤ 0xFFFF, return the String value consisting of the code unit whose numeric value is _codePoint_. + 1. Let _cu1_ be the code unit whose numeric value is floor((_codePoint_ - 0x10000) / 0x400) + 0xD800. + 1. Let _cu2_ be the code unit whose numeric value is ((_codePoint_ - 0x10000) modulo 0x400) + 0xDC00. 1. Return the string-concatenation of _cu1_ and _cu2_.
@@ -16218,8 +16218,8 @@

1. Let _result_ be the empty String. - 1. For each code point _cp_ of _text_, do - 1. Set _result_ to the string-concatenation of _result_ and UTF16EncodeCodePoint(_cp_). + 1. For each code point _codePoint_ of _text_, do + 1. Set _result_ to the string-concatenation of _result_ and UTF16EncodeCodePoint(_codePoint_). 1. Return _result_.
@@ -16237,8 +16237,8 @@

1. Assert: _lead_ is a leading surrogate and _trail_ is a trailing surrogate. - 1. Let _cp_ be (_lead_ - 0xD800) × 0x400 + (_trail_ - 0xDC00) + 0x10000. - 1. Return the code point _cp_. + 1. Let _codePoint_ be (_lead_ - 0xD800) × 0x400 + (_trail_ - 0xDC00) + 0x10000. + 1. Return the code point _codePoint_.
@@ -16257,16 +16257,16 @@

1. Let _size_ be the length of _string_. 1. Assert: _position_ ≥ 0 and _position_ < _size_. 1. Let _first_ be the code unit at index _position_ within _string_. - 1. Let _cp_ be the code point whose numeric value is the numeric value of _first_. + 1. Let _codePoint_ be the code point whose numeric value is the numeric value of _first_. 1. If _first_ is neither a leading surrogate nor a trailing surrogate, then - 1. Return the Record { [[CodePoint]]: _cp_, [[CodeUnitCount]]: 1, [[IsUnpairedSurrogate]]: *false* }. + 1. Return the Record { [[CodePoint]]: _codePoint_, [[CodeUnitCount]]: 1, [[IsUnpairedSurrogate]]: *false* }. 1. If _first_ is a trailing surrogate or _position_ + 1 = _size_, then - 1. Return the Record { [[CodePoint]]: _cp_, [[CodeUnitCount]]: 1, [[IsUnpairedSurrogate]]: *true* }. + 1. Return the Record { [[CodePoint]]: _codePoint_, [[CodeUnitCount]]: 1, [[IsUnpairedSurrogate]]: *true* }. 1. Let _second_ be the code unit at index _position_ + 1 within _string_. 1. If _second_ is not a trailing surrogate, then - 1. Return the Record { [[CodePoint]]: _cp_, [[CodeUnitCount]]: 1, [[IsUnpairedSurrogate]]: *true* }. - 1. Set _cp_ to UTF16SurrogatePairToCodePoint(_first_, _second_). - 1. Return the Record { [[CodePoint]]: _cp_, [[CodeUnitCount]]: 2, [[IsUnpairedSurrogate]]: *false* }. + 1. Return the Record { [[CodePoint]]: _codePoint_, [[CodeUnitCount]]: 1, [[IsUnpairedSurrogate]]: *true* }. + 1. Set _codePoint_ to UTF16SurrogatePairToCodePoint(_first_, _second_). + 1. Return the Record { [[CodePoint]]: _codePoint_, [[CodeUnitCount]]: 2, [[IsUnpairedSurrogate]]: *false* }. @@ -16285,9 +16285,9 @@

1. Let _size_ be the length of _string_. 1. Let _position_ be 0. 1. Repeat, while _position_ < _size_, - 1. Let _cp_ be CodePointAt(_string_, _position_). - 1. Append _cp_.[[CodePoint]] to _codePoints_. - 1. Set _position_ to _position_ + _cp_.[[CodeUnitCount]]. + 1. Let _codePoint_ be CodePointAt(_string_, _position_). + 1. Append _codePoint_.[[CodePoint]] to _codePoints_. + 1. Set _position_ to _position_ + _codePoint_.[[CodeUnitCount]]. 1. Return _codePoints_. @@ -16386,13 +16386,13 @@

Strict Mode Code

Static Semantics: IsStrict ( - _node_: a Parse Node, + _parseNode_: a Parse Node, ): a Boolean

- 1. If the source text matched by _node_ is strict mode code, return *true*. + 1. If the source text matched by _parseNode_ is strict mode code, return *true*. 1. Return *false*.
@@ -16794,14 +16794,14 @@

Static Semantics: IdentifierCodePoints ( ): a List of code points

IdentifierName :: IdentifierStart - 1. Let _cp_ be the IdentifierCodePoint of |IdentifierStart|. - 1. Return « _cp_ ». + 1. Let _codePoint_ be the IdentifierCodePoint of |IdentifierStart|. + 1. Return « _codePoint_ ». IdentifierName :: IdentifierName IdentifierPart 1. Let _cps_ be the IdentifierCodePoints of the derived |IdentifierName|. - 1. Let _cp_ be the IdentifierCodePoint of |IdentifierPart|. - 1. Return the list-concatenation of _cps_ and « _cp_ ». + 1. Let _codePoint_ be the IdentifierCodePoint of |IdentifierPart|. + 1. Return the list-concatenation of _cps_ and « _codePoint_ ».
@@ -18472,10 +18472,10 @@

Elision : `,` - 1. Let _len_ be _nextIndex_ + 1. - 1. Perform ? Set(_array_, *"length"*, 𝔽(_len_), *true*). - 1. NOTE: The above step throws if _len_ exceeds 232 - 1. - 1. Return _len_. + 1. Let _length_ be _nextIndex_ + 1. + 1. Perform ? Set(_array_, *"length"*, 𝔽(_length_), *true*). + 1. NOTE: The above step throws if _length_ exceeds 232 - 1. + 1. Return _length_. Elision : Elision `,` @@ -18681,16 +18681,16 @@

Static Semantics: PropertyNameList ( ): a List of Strings

PropertyDefinitionList : PropertyDefinition - 1. Let _propName_ be the PropName of |PropertyDefinition|. - 1. If _propName_ is ~empty~, return a new empty List. - 1. Return « _propName_ ». + 1. Let _propertyName_ be the PropName of |PropertyDefinition|. + 1. If _propertyName_ is ~empty~, return a new empty List. + 1. Return « _propertyName_ ». PropertyDefinitionList : PropertyDefinitionList `,` PropertyDefinition 1. Let _list_ be the PropertyNameList of |PropertyDefinitionList|. - 1. Let _propName_ be the PropName of |PropertyDefinition|. - 1. If _propName_ is ~empty~, return _list_. - 1. Return the list-concatenation of _list_ and « _propName_ ». + 1. Let _propertyName_ be the PropName of |PropertyDefinition|. + 1. If _propertyName_ is ~empty~, return _list_. + 1. Return the list-concatenation of _list_ and « _propertyName_ ».
@@ -18720,29 +18720,29 @@

Runtime Semantics: Evaluation

LiteralPropertyName : NumericLiteral - 1. Let _nbr_ be the NumericValue of |NumericLiteral|. - 1. Return ! ToString(_nbr_). + 1. Let _number_ be the NumericValue of |NumericLiteral|. + 1. Return ! ToString(_number_). ComputedPropertyName : `[` AssignmentExpression `]` 1. Let _exprValue_ be ? Evaluation of |AssignmentExpression|. - 1. Let _propName_ be ? GetValue(_exprValue_). - 1. Return ? ToPropertyKey(_propName_). + 1. Let _propertyName_ be ? GetValue(_exprValue_). + 1. Return ? ToPropertyKey(_propertyName_).

Runtime Semantics: PropertyDefinitionEvaluation ( - _object_: an Object, + _obj_: an Object, ): either a normal completion containing ~unused~ or an abrupt completion

PropertyDefinitionList : PropertyDefinitionList `,` PropertyDefinition - 1. Perform ? PropertyDefinitionEvaluation of |PropertyDefinitionList| with argument _object_. - 1. Perform ? PropertyDefinitionEvaluation of |PropertyDefinition| with argument _object_. + 1. Perform ? PropertyDefinitionEvaluation of |PropertyDefinitionList| with argument _obj_. + 1. Perform ? PropertyDefinitionEvaluation of |PropertyDefinition| with argument _obj_. 1. Return ~unused~. PropertyDefinition : `...` AssignmentExpression @@ -18750,16 +18750,16 @@

1. Let _exprValue_ be ? Evaluation of |AssignmentExpression|. 1. Let _fromValue_ be ? GetValue(_exprValue_). 1. Let _excludedNames_ be a new empty List. - 1. Perform ? CopyDataProperties(_object_, _fromValue_, _excludedNames_). + 1. Perform ? CopyDataProperties(_obj_, _fromValue_, _excludedNames_). 1. Return ~unused~. PropertyDefinition : IdentifierReference - 1. Let _propName_ be the StringValue of |IdentifierReference|. + 1. Let _propertyName_ be the StringValue of |IdentifierReference|. 1. Let _exprValue_ be ? Evaluation of |IdentifierReference|. - 1. Let _propValue_ be ? GetValue(_exprValue_). - 1. Assert: _object_ is an ordinary, extensible object with no non-configurable properties. - 1. Perform ! CreateDataPropertyOrThrow(_object_, _propName_, _propValue_). + 1. Let _propertyValue_ be ? GetValue(_exprValue_). + 1. Assert: _obj_ is an ordinary, extensible object with no non-configurable properties. + 1. Perform ! CreateDataPropertyOrThrow(_obj_, _propertyName_, _propertyValue_). 1. Return ~unused~. PropertyDefinition : PropertyName `:` AssignmentExpression @@ -18772,21 +18772,21 @@

1. Else, 1. Let _isProtoSetter_ be *false*. 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and _isProtoSetter_ is *false*, then - 1. Let _propValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _propertyKey_. + 1. Let _propertyValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _propertyKey_. 1. Else, 1. Let _exprValueRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _propValue_ be ? GetValue(_exprValueRef_). + 1. Let _propertyValue_ be ? GetValue(_exprValueRef_). 1. If _isProtoSetter_ is *true*, then - 1. If _propValue_ is an Object or _propValue_ is *null*, then - 1. Perform ! _object_.[[SetPrototypeOf]](_propValue_). + 1. If _propertyValue_ is an Object or _propertyValue_ is *null*, then + 1. Perform ! _obj_.[[SetPrototypeOf]](_propertyValue_). 1. Return ~unused~. - 1. Assert: _object_ is an ordinary, extensible object with no non-configurable properties. - 1. Perform ! CreateDataPropertyOrThrow(_object_, _propertyKey_, _propValue_). + 1. Assert: _obj_ is an ordinary, extensible object with no non-configurable properties. + 1. Perform ! CreateDataPropertyOrThrow(_obj_, _propertyKey_, _propertyValue_). 1. Return ~unused~. PropertyDefinition : MethodDefinition - 1. Perform ? MethodDefinitionEvaluation of |MethodDefinition| with arguments _object_ and *true*. + 1. Perform ? MethodDefinitionEvaluation of |MethodDefinition| with arguments _obj_ and *true*. 1. Return ~unused~. @@ -18995,9 +18995,9 @@

1. Let _realm_ be the current Realm Record. 1. Let _templateRegistry_ be _realm_.[[TemplateMap]]. - 1. For each element _e_ of _templateRegistry_, do - 1. If _e_.[[Site]] is the same Parse Node as _templateLiteral_, then - 1. Return _e_.[[Array]]. + 1. For each element _element_ of _templateRegistry_, do + 1. If _element_.[[Site]] is the same Parse Node as _templateLiteral_, then + 1. Return _element_.[[Array]]. 1. Let _rawStrings_ be the TemplateStrings of _templateLiteral_ with argument *true*. 1. Assert: _rawStrings_ is a List of Strings. 1. Let _cookedStrings_ be the TemplateStrings of _templateLiteral_ with argument *false*. @@ -19312,43 +19312,43 @@

Property Accessors

Runtime Semantics: Evaluation

MemberExpression : MemberExpression `[` Expression `]` - 1. Let _baseReference_ be ? Evaluation of |MemberExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |MemberExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. Let _strict_ be IsStrict(this |MemberExpression|). 1. Return ? EvaluatePropertyAccessWithExpressionKey(_baseValue_, |Expression|, _strict_). MemberExpression : MemberExpression `.` IdentifierName - 1. Let _baseReference_ be ? Evaluation of |MemberExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |MemberExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. Let _strict_ be IsStrict(this |MemberExpression|). 1. Return EvaluatePropertyAccessWithIdentifierKey(_baseValue_, |IdentifierName|, _strict_). MemberExpression : MemberExpression `.` PrivateIdentifier - 1. Let _baseReference_ be ? Evaluation of |MemberExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |MemberExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. Let _fieldNameString_ be the StringValue of |PrivateIdentifier|. 1. Return MakePrivateReference(_baseValue_, _fieldNameString_). CallExpression : CallExpression `[` Expression `]` - 1. Let _baseReference_ be ? Evaluation of |CallExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |CallExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. Let _strict_ be IsStrict(this |CallExpression|). 1. Return ? EvaluatePropertyAccessWithExpressionKey(_baseValue_, |Expression|, _strict_). CallExpression : CallExpression `.` IdentifierName - 1. Let _baseReference_ be ? Evaluation of |CallExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |CallExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. Let _strict_ be IsStrict(this |CallExpression|). 1. Return EvaluatePropertyAccessWithIdentifierKey(_baseValue_, |IdentifierName|, _strict_). CallExpression : CallExpression `.` PrivateIdentifier - 1. Let _baseReference_ be ? Evaluation of |CallExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |CallExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. Let _fieldNameString_ be the StringValue of |PrivateIdentifier|. 1. Return MakePrivateReference(_baseValue_, _fieldNameString_). @@ -19359,15 +19359,15 @@

Runtime Semantics: Evaluation

EvaluatePropertyAccessWithExpressionKey ( _baseValue_: an ECMAScript language value, - _expression_: an |Expression| Parse Node, + _expr_: an |Expression| Parse Node, _strict_: a Boolean, ): either a normal completion containing a Reference Record or an abrupt completion

- 1. Let _propertyNameReference_ be ? Evaluation of _expression_. - 1. Let _propertyNameValue_ be ? GetValue(_propertyNameReference_). + 1. Let _propertyNameRef_ be ? Evaluation of _expr_. + 1. Let _propertyNameValue_ be ? GetValue(_propertyNameRef_). 1. NOTE: In most cases, ToPropertyKey will be performed on _propertyNameValue_ immediately after this step. However, in the case of `a[b] = c`, it will not be performed until after evaluation of `c`. 1. Return the Reference Record { [[Base]]: _baseValue_, [[ReferencedName]]: _propertyNameValue_, [[Strict]]: _strict_, [[ThisValue]]: ~empty~ }. @@ -19407,20 +19407,20 @@

Runtime Semantics: Evaluation

EvaluateNew ( _constructExpr_: a |NewExpression| Parse Node or a |MemberExpression| Parse Node, - _arguments_: ~empty~ or an |Arguments| Parse Node, + _argumentsNode_: ~empty~ or an |Arguments| Parse Node, ): either a normal completion containing an ECMAScript language value or an abrupt completion

1. Let _ref_ be ? Evaluation of _constructExpr_. - 1. Let _constructor_ be ? GetValue(_ref_). - 1. If _arguments_ is ~empty~, then + 1. Let _ctor_ be ? GetValue(_ref_). + 1. If _argumentsNode_ is ~empty~, then 1. Let _argList_ be a new empty List. 1. Else, - 1. Let _argList_ be ? ArgumentListEvaluation of _arguments_. - 1. If IsConstructor(_constructor_) is *false*, throw a *TypeError* exception. - 1. Return ? Construct(_constructor_, _argList_). + 1. Let _argList_ be ? ArgumentListEvaluation of _argumentsNode_. + 1. If IsConstructor(_ctor_) is *false*, throw a *TypeError* exception. + 1. Return ? Construct(_ctor_, _argList_). @@ -19435,19 +19435,19 @@

Runtime Semantics: Evaluation

1. Let _expr_ be the |CallMemberExpression| that is covered by |CoverCallExpressionAndAsyncArrowHead|. 1. Let _memberExpr_ be the |MemberExpression| of _expr_. - 1. Let _arguments_ be the |Arguments| of _expr_. + 1. Let _args_ be the |Arguments| of _expr_. 1. Let _ref_ be ? Evaluation of _memberExpr_. 1. Let _func_ be ? GetValue(_ref_). 1. If _ref_ is a Reference Record, IsPropertyReference(_ref_) is *false*, and _ref_.[[ReferencedName]] is *"eval"*, then 1. If SameValue(_func_, %eval%) is *true*, then - 1. Let _argList_ be ? ArgumentListEvaluation of _arguments_. + 1. Let _argList_ be ? ArgumentListEvaluation of _args_. 1. If _argList_ has no elements, return *undefined*. 1. Let _evalArg_ be the first element of _argList_. 1. If IsStrict(this |CallExpression|) is *true*, let _strictCaller_ be *true*; else let _strictCaller_ be *false*. 1. [id="step-callexpression-evaluation-direct-eval"] Return ? PerformEval(_evalArg_, _strictCaller_, *true*). 1. Let _thisCall_ be this |CallExpression|. 1. Let _tailCall_ be IsInTailPosition(_thisCall_). - 1. Return ? EvaluateCall(_func_, _ref_, _arguments_, _tailCall_). + 1. Return ? EvaluateCall(_func_, _ref_, _args_, _tailCall_).

A |CallExpression| evaluation that executes step is a direct eval.

CallExpression : CallExpression Arguments @@ -19464,24 +19464,24 @@

Runtime Semantics: Evaluation

EvaluateCall ( _func_: an ECMAScript language value, - _ref_: an ECMAScript language value or a Reference Record, - _arguments_: a Parse Node, + _thisValueRef_: an ECMAScript language value or a Reference Record, + _argumentListNode_: a Parse Node, _tailPosition_: a Boolean, ): either a normal completion containing an ECMAScript language value or an abrupt completion

- 1. If _ref_ is a Reference Record, then - 1. If IsPropertyReference(_ref_) is *true*, then - 1. Let _thisValue_ be GetThisValue(_ref_). + 1. If _thisValueRef_ is a Reference Record, then + 1. If IsPropertyReference(_thisValueRef_) is *true*, then + 1. Let _thisValue_ be GetThisValue(_thisValueRef_). 1. Else, - 1. Let _refEnv_ be _ref_.[[Base]]. + 1. Let _refEnv_ be _thisValueRef_.[[Base]]. 1. Assert: _refEnv_ is an Environment Record. 1. Let _thisValue_ be _refEnv_.WithBaseObject(). 1. Else, 1. Let _thisValue_ be *undefined*. - 1. Let _argList_ be ? ArgumentListEvaluation of _arguments_. + 1. Let _argList_ be ? ArgumentListEvaluation of _argumentListNode_. 1. If _func_ is not an Object, throw a *TypeError* exception. 1. If IsCallable(_func_) is *false*, throw a *TypeError* exception. 1. If _tailPosition_ is *true*, perform PrepareForTailCall(). @@ -19497,18 +19497,18 @@

The `super` Keyword

Runtime Semantics: Evaluation

SuperProperty : `super` `[` Expression `]` - 1. Let _env_ be GetThisEnvironment(). - 1. Let _actualThis_ be ? _env_.GetThisBinding(). - 1. Let _propertyNameReference_ be ? Evaluation of |Expression|. - 1. Let _propertyNameValue_ be ? GetValue(_propertyNameReference_). + 1. Let _envRecord_ be GetThisEnvironment(). + 1. Let _actualThis_ be ? _envRecord_.GetThisBinding(). + 1. Let _propertyNameRef_ be ? Evaluation of |Expression|. + 1. Let _propertyNameValue_ be ? GetValue(_propertyNameRef_). 1. Let _strict_ be IsStrict(this |SuperProperty|). 1. NOTE: In most cases, ToPropertyKey will be performed on _propertyNameValue_ immediately after this step. However, in the case of `super[b] = c`, it will not be performed until after evaluation of `c`. 1. Return MakeSuperPropertyReference(_actualThis_, _propertyNameValue_, _strict_). SuperProperty : `super` `.` IdentifierName - 1. Let _env_ be GetThisEnvironment(). - 1. Let _actualThis_ be ? _env_.GetThisBinding(). + 1. Let _envRecord_ be GetThisEnvironment(). + 1. Let _actualThis_ be ? _envRecord_.GetThisBinding(). 1. Let _propertyKey_ be the StringValue of |IdentifierName|. 1. Let _strict_ be IsStrict(this |SuperProperty|). 1. Return MakeSuperPropertyReference(_actualThis_, _propertyKey_, _strict_). @@ -19517,10 +19517,10 @@

Runtime Semantics: Evaluation

1. Let _newTarget_ be GetNewTarget(). 1. Assert: _newTarget_ is a constructor. - 1. Let _superConstructor_ be GetSuperConstructor(). + 1. Let _superCtor_ be GetSuperConstructor(). 1. Let _argList_ be ? ArgumentListEvaluation of |Arguments|. - 1. If IsConstructor(_superConstructor_) is *false*, throw a *TypeError* exception. - 1. Let _result_ be ? Construct(_superConstructor_, _argList_, _newTarget_). + 1. If IsConstructor(_superCtor_) is *false*, throw a *TypeError* exception. + 1. Let _result_ be ? Construct(_superCtor_, _argList_, _newTarget_). 1. Let _thisER_ be GetThisEnvironment(). 1. Assert: _thisER_ is a Function Environment Record. 1. Perform ? BindThisValue(_thisER_, _result_). @@ -19536,12 +19536,12 @@

GetSuperConstructor ( ): an ECMAScript language value

- 1. Let _envRec_ be GetThisEnvironment(). - 1. Assert: _envRec_ is a Function Environment Record. - 1. Let _activeFunction_ be _envRec_.[[FunctionObject]]. - 1. Assert: _activeFunction_ is an ECMAScript function object. - 1. Let _superConstructor_ be ! _activeFunction_.[[GetPrototypeOf]](). - 1. Return _superConstructor_. + 1. Let _envRecord_ be GetThisEnvironment(). + 1. Assert: _envRecord_ is a Function Environment Record. + 1. Let _activeFunc_ be _envRecord_.[[FunctionObject]]. + 1. Assert: _activeFunc_ is an ECMAScript function object. + 1. Let _superCtor_ be ! _activeFunc_.[[GetPrototypeOf]](). + 1. Return _superCtor_. @@ -19556,10 +19556,10 @@

- 1. Let _env_ be GetThisEnvironment(). - 1. Assert: _env_.HasSuperBinding() is *true*. - 1. Assert: _env_ is a Function Environment Record. - 1. Let _baseValue_ be GetSuperBase(_env_). + 1. Let _envRecord_ be GetThisEnvironment(). + 1. Assert: _envRecord_.HasSuperBinding() is *true*. + 1. Assert: _envRecord_ is a Function Environment Record. + 1. Let _baseValue_ be GetSuperBase(_envRecord_). 1. Return the Reference Record { [[Base]]: _baseValue_, [[ReferencedName]]: _propertyKey_, [[Strict]]: _strict_, [[ThisValue]]: _actualThis_ }. @@ -19648,33 +19648,33 @@

Runtime Semantics: Evaluation

MemberExpression OptionalChain - 1. Let _baseReference_ be ? Evaluation of |MemberExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |MemberExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. If _baseValue_ is either *undefined* or *null*, then 1. Return *undefined*. - 1. Return ? ChainEvaluation of |OptionalChain| with arguments _baseValue_ and _baseReference_. + 1. Return ? ChainEvaluation of |OptionalChain| with arguments _baseValue_ and _baseRef_. OptionalExpression : CallExpression OptionalChain - 1. Let _baseReference_ be ? Evaluation of |CallExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |CallExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. If _baseValue_ is either *undefined* or *null*, then 1. Return *undefined*. - 1. Return ? ChainEvaluation of |OptionalChain| with arguments _baseValue_ and _baseReference_. + 1. Return ? ChainEvaluation of |OptionalChain| with arguments _baseValue_ and _baseRef_. OptionalExpression : OptionalExpression OptionalChain - 1. Let _baseReference_ be ? Evaluation of |OptionalExpression|. - 1. Let _baseValue_ be ? GetValue(_baseReference_). + 1. Let _baseRef_ be ? Evaluation of |OptionalExpression|. + 1. Let _baseValue_ be ? GetValue(_baseRef_). 1. If _baseValue_ is either *undefined* or *null*, then 1. Return *undefined*. - 1. Return ? ChainEvaluation of |OptionalChain| with arguments _baseValue_ and _baseReference_. + 1. Return ? ChainEvaluation of |OptionalChain| with arguments _baseValue_ and _baseRef_. @@ -19682,7 +19682,7 @@

Runtime Semantics: Evaluation

Runtime Semantics: ChainEvaluation ( _baseValue_: an ECMAScript language value, - _baseReference_: an ECMAScript language value or a Reference Record, + _baseRef_: an ECMAScript language value or a Reference Record, ): either a normal completion containing either an ECMAScript language value or a Reference Record, or an abrupt completion

@@ -19691,7 +19691,7 @@

1. Let _thisChain_ be this |OptionalChain|. 1. Let _tailCall_ be IsInTailPosition(_thisChain_). - 1. Return ? EvaluateCall(_baseValue_, _baseReference_, |Arguments|, _tailCall_). + 1. Return ? EvaluateCall(_baseValue_, _baseRef_, |Arguments|, _tailCall_). OptionalChain : `?.` `[` Expression `]` @@ -19711,33 +19711,33 @@

OptionalChain : OptionalChain Arguments 1. Let _optionalChain_ be |OptionalChain|. - 1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_. - 1. Let _newValue_ be ? GetValue(_newReference_). + 1. Let _newRef_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseRef_. + 1. Let _newValue_ be ? GetValue(_newRef_). 1. Let _thisChain_ be this |OptionalChain|. 1. Let _tailCall_ be IsInTailPosition(_thisChain_). - 1. Return ? EvaluateCall(_newValue_, _newReference_, |Arguments|, _tailCall_). + 1. Return ? EvaluateCall(_newValue_, _newRef_, |Arguments|, _tailCall_). OptionalChain : OptionalChain `[` Expression `]` 1. Let _optionalChain_ be |OptionalChain|. - 1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_. - 1. Let _newValue_ be ? GetValue(_newReference_). + 1. Let _newRef_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseRef_. + 1. Let _newValue_ be ? GetValue(_newRef_). 1. Let _strict_ be IsStrict(this |OptionalChain|). 1. Return ? EvaluatePropertyAccessWithExpressionKey(_newValue_, |Expression|, _strict_). OptionalChain : OptionalChain `.` IdentifierName 1. Let _optionalChain_ be |OptionalChain|. - 1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_. - 1. Let _newValue_ be ? GetValue(_newReference_). + 1. Let _newRef_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseRef_. + 1. Let _newValue_ be ? GetValue(_newRef_). 1. Let _strict_ be IsStrict(this |OptionalChain|). 1. Return EvaluatePropertyAccessWithIdentifierKey(_newValue_, |IdentifierName|, _strict_). OptionalChain : OptionalChain `.` PrivateIdentifier 1. Let _optionalChain_ be |OptionalChain|. - 1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_. - 1. Let _newValue_ be ? GetValue(_newReference_). + 1. Let _newRef_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseRef_. + 1. Let _newValue_ be ? GetValue(_newRef_). 1. Let _fieldNameString_ be the StringValue of |PrivateIdentifier|. 1. Return MakePrivateReference(_newValue_, _fieldNameString_). @@ -19764,8 +19764,8 @@

Runtime Semantics: Evaluation

EvaluateImportCall ( - _specifierExpression_: a Parse Node, - optional _optionsExpression_: a Parse Node, + _specifierExpr_: a Parse Node, + optional _optionsExpr_: a Parse Node, ): either a normal completion containing a Promise or an abrupt completion

@@ -19773,28 +19773,28 @@

1. Let _referrer_ be GetActiveScriptOrModule(). 1. If _referrer_ is *null*, set _referrer_ to the current Realm Record. - 1. Let _specifierRef_ be ? Evaluation of _specifierExpression_. + 1. Let _specifierRef_ be ? Evaluation of _specifierExpr_. 1. Let _specifier_ be ? GetValue(_specifierRef_). - 1. If _optionsExpression_ is present, then - 1. Let _optionsRef_ be ? Evaluation of _optionsExpression_. + 1. If _optionsExpr_ is present, then + 1. Let _optionsRef_ be ? Evaluation of _optionsExpr_. 1. Let _options_ be ? GetValue(_optionsRef_). 1. Else, 1. Let _options_ be *undefined*. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). 1. Let _specifierString_ be Completion(ToString(_specifier_)). 1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_). - 1. Let _attributes_ be a new empty List. + 1. Let _attrs_ be a new empty List. 1. If _options_ is not *undefined*, then 1. If _options_ is not an Object, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). 1. Return _promiseCapability_.[[Promise]]. - 1. Let _attributesObj_ be Completion(Get(_options_, *"with"*)). - 1. IfAbruptRejectPromise(_attributesObj_, _promiseCapability_). - 1. If _attributesObj_ is not *undefined*, then - 1. If _attributesObj_ is not an Object, then + 1. Let _attrsObj_ be Completion(Get(_options_, *"with"*)). + 1. IfAbruptRejectPromise(_attrsObj_, _promiseCapability_). + 1. If _attrsObj_ is not *undefined*, then + 1. If _attrsObj_ is not an Object, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). 1. Return _promiseCapability_.[[Promise]]. - 1. Let _entries_ be Completion(EnumerableOwnProperties(_attributesObj_, ~key+value~)). + 1. Let _entries_ be Completion(EnumerableOwnProperties(_attrsObj_, ~key+value~)). 1. IfAbruptRejectPromise(_entries_, _promiseCapability_). 1. For each element _entry_ of _entries_, do 1. Let _key_ be ! Get(_entry_, *"0"*). @@ -19803,12 +19803,12 @@

1. If _value_ is not a String, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). 1. Return _promiseCapability_.[[Promise]]. - 1. Append the ImportAttribute Record { [[Key]]: _key_, [[Value]]: _value_ } to _attributes_. - 1. If AllImportAttributesSupported(_attributes_) is *false*, then + 1. Append the ImportAttribute Record { [[Key]]: _key_, [[Value]]: _value_ } to _attrs_. + 1. If AllImportAttributesSupported(_attrs_) is *false*, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). 1. Return _promiseCapability_.[[Promise]]. - 1. Sort _attributes_ according to the lexicographic order of their [[Key]] field, treating the value of each such field as a sequence of UTF-16 code unit values. NOTE: This sorting is observable only in that hosts are prohibited from changing behaviour based on the order in which attributes are enumerated. - 1. Let _moduleRequest_ be a new ModuleRequest Record { [[Specifier]]: _specifierString_, [[Attributes]]: _attributes_ }. + 1. Sort _attrs_ according to the lexicographic order of their [[Key]] field, treating the value of each such field as a sequence of UTF-16 code unit values. NOTE: This sorting is observable only in that hosts are prohibited from changing behaviour based on the order in which attributes are enumerated. + 1. Let _moduleRequest_ be a new ModuleRequest Record { [[Specifier]]: _specifierString_, [[Attributes]]: _attrs_ }. 1. Perform HostLoadImportedModule(_referrer_, _moduleRequest_, ~empty~, _promiseCapability_). 1. Return _promiseCapability_.[[Promise]]. @@ -20159,21 +20159,21 @@

The `typeof` Operator

Runtime Semantics: Evaluation

UnaryExpression : `typeof` UnaryExpression - 1. Let _val_ be ? Evaluation of |UnaryExpression|. - 1. If _val_ is a Reference Record, then - 1. If IsUnresolvableReference(_val_) is *true*, return *"undefined"*. - 1. Set _val_ to ? GetValue(_val_). - 1. If _val_ is *undefined*, return *"undefined"*. - 1. If _val_ is *null*, return *"object"*. - 1. If _val_ is a String, return *"string"*. - 1. If _val_ is a Symbol, return *"symbol"*. - 1. If _val_ is a Boolean, return *"boolean"*. - 1. If _val_ is a Number, return *"number"*. - 1. If _val_ is a BigInt, return *"bigint"*. - 1. Assert: _val_ is an Object. + 1. Let _value_ be ? Evaluation of |UnaryExpression|. + 1. If _value_ is a Reference Record, then + 1. If IsUnresolvableReference(_value_) is *true*, return *"undefined"*. + 1. Set _value_ to ? GetValue(_value_). + 1. If _value_ is *undefined*, return *"undefined"*. + 1. If _value_ is *null*, return *"object"*. + 1. If _value_ is a String, return *"string"*. + 1. If _value_ is a Symbol, return *"symbol"*. + 1. If _value_ is a Boolean, return *"boolean"*. + 1. If _value_ is a Number, return *"number"*. + 1. If _value_ is a BigInt, return *"bigint"*. + 1. Assert: _value_ is an Object. 1. [id="step-typeof-web-compat-insertion-point", normative-optional] If the host is a web browser or otherwise supports , then - 1. If _val_ has an [[IsHTMLDDA]] internal slot, return *"undefined"*. - 1. If _val_ has a [[Call]] internal method, return *"function"*. + 1. If _value_ has an [[IsHTMLDDA]] internal slot, return *"undefined"*. + 1. If _value_ has a [[Call]] internal method, return *"function"*. 1. Return *"object"*. @@ -20419,71 +20419,71 @@

Syntax

Runtime Semantics: Evaluation

RelationalExpression : RelationalExpression `<` ShiftExpression - 1. Let _lRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _result_ be ? IsLessThan(_lVal_, _rVal_, *true*). + 1. Let _leftRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |ShiftExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Let _result_ be ? IsLessThan(_leftValue_, _rightValue_, *true*). 1. If _result_ is *undefined*, return *false*. 1. Return _result_. RelationalExpression : RelationalExpression `>` ShiftExpression - 1. Let _lRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _result_ be ? IsLessThan(_rVal_, _lVal_, *false*). + 1. Let _leftRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |ShiftExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Let _result_ be ? IsLessThan(_rightValue_, _leftValue_, *false*). 1. If _result_ is *undefined*, return *false*. 1. Return _result_. RelationalExpression : RelationalExpression `<=` ShiftExpression - 1. Let _lRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _result_ be ? IsLessThan(_rVal_, _lVal_, *false*). + 1. Let _leftRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |ShiftExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Let _result_ be ? IsLessThan(_rightValue_, _leftValue_, *false*). 1. If _result_ is either *true* or *undefined*, return *false*. 1. Return *true*. RelationalExpression : RelationalExpression `>=` ShiftExpression - 1. Let _lRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _result_ be ? IsLessThan(_lVal_, _rVal_, *true*). + 1. Let _leftRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |ShiftExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Let _result_ be ? IsLessThan(_leftValue_, _rightValue_, *true*). 1. If _result_ is either *true* or *undefined*, return *false*. 1. Return *true*. RelationalExpression : RelationalExpression `instanceof` ShiftExpression - 1. Let _lRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Return ? InstanceofOperator(_lVal_, _rVal_). + 1. Let _leftRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |ShiftExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Return ? InstanceofOperator(_leftValue_, _rightValue_). RelationalExpression : RelationalExpression `in` ShiftExpression - 1. Let _lRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. If _rVal_ is not an Object, throw a *TypeError* exception. - 1. Return ? HasProperty(_rVal_, ? ToPropertyKey(_lVal_)). + 1. Let _leftRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |ShiftExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. If _rightValue_ is not an Object, throw a *TypeError* exception. + 1. Return ? HasProperty(_rightValue_, ? ToPropertyKey(_leftValue_)). RelationalExpression : PrivateIdentifier `in` ShiftExpression 1. Let _privateIdentifier_ be the StringValue of |PrivateIdentifier|. - 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. If _rVal_ is not an Object, throw a *TypeError* exception. + 1. Let _rightRef_ be ? Evaluation of |ShiftExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. If _rightValue_ is not an Object, throw a *TypeError* exception. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Assert: _privateEnv_ is not *null*. 1. Let _privateName_ be ResolvePrivateIdentifier(_privateEnv_, _privateIdentifier_). - 1. If PrivateElementFind(_rVal_, _privateName_) is ~empty~, return *false*. + 1. If PrivateElementFind(_rightValue_, _privateName_) is ~empty~, return *false*. 1. Return *true*. @@ -20532,38 +20532,38 @@

Syntax

Runtime Semantics: Evaluation

EqualityExpression : EqualityExpression `==` RelationalExpression - 1. Let _lRef_ be ? Evaluation of |EqualityExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Return ? IsLooselyEqual(_rVal_, _lVal_). + 1. Let _leftRef_ be ? Evaluation of |EqualityExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Return ? IsLooselyEqual(_rightValue_, _leftValue_). EqualityExpression : EqualityExpression `!=` RelationalExpression - 1. Let _lRef_ be ? Evaluation of |EqualityExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _r_ be ? IsLooselyEqual(_rVal_, _lVal_). - 1. If _r_ is *true*, return *false*. + 1. Let _leftRef_ be ? Evaluation of |EqualityExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Let _result_ be ? IsLooselyEqual(_rightValue_, _leftValue_). + 1. If _result_ is *true*, return *false*. 1. Return *true*. EqualityExpression : EqualityExpression `===` RelationalExpression - 1. Let _lRef_ be ? Evaluation of |EqualityExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Return IsStrictlyEqual(_rVal_, _lVal_). + 1. Let _leftRef_ be ? Evaluation of |EqualityExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Return IsStrictlyEqual(_rightValue_, _leftValue_). EqualityExpression : EqualityExpression `!==` RelationalExpression - 1. Let _lRef_ be ? Evaluation of |EqualityExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |RelationalExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _r_ be IsStrictlyEqual(_rVal_, _lVal_). - 1. If _r_ is *true*, return *false*. + 1. Let _leftRef_ be ? Evaluation of |EqualityExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |RelationalExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Let _result_ be IsStrictlyEqual(_rightValue_, _leftValue_). + 1. If _result_ is *true*, return *false*. 1. Return *true*. @@ -20659,27 +20659,27 @@

Syntax

Runtime Semantics: Evaluation

LogicalANDExpression : LogicalANDExpression `&&` BitwiseORExpression - 1. Let _lRef_ be ? Evaluation of |LogicalANDExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. If ToBoolean(_lVal_) is *false*, return _lVal_. - 1. Let _rRef_ be ? Evaluation of |BitwiseORExpression|. - 1. Return ? GetValue(_rRef_). + 1. Let _leftRef_ be ? Evaluation of |LogicalANDExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. If ToBoolean(_leftValue_) is *false*, return _leftValue_. + 1. Let _rightRef_ be ? Evaluation of |BitwiseORExpression|. + 1. Return ? GetValue(_rightRef_). LogicalORExpression : LogicalORExpression `||` LogicalANDExpression - 1. Let _lRef_ be ? Evaluation of |LogicalORExpression|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. If ToBoolean(_lVal_) is *true*, return _lVal_. - 1. Let _rRef_ be ? Evaluation of |LogicalANDExpression|. - 1. Return ? GetValue(_rRef_). + 1. Let _leftRef_ be ? Evaluation of |LogicalORExpression|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. If ToBoolean(_leftValue_) is *true*, return _leftValue_. + 1. Let _rightRef_ be ? Evaluation of |LogicalANDExpression|. + 1. Return ? GetValue(_rightRef_). CoalesceExpression : CoalesceExpressionHead `??` BitwiseORExpression - 1. Let _lRef_ be ? Evaluation of |CoalesceExpressionHead|. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. If _lVal_ is neither *undefined* nor *null*, return _lVal_. - 1. Let _rRef_ be ? Evaluation of |BitwiseORExpression|. - 1. Return ? GetValue(_rRef_). + 1. Let _leftRef_ be ? Evaluation of |CoalesceExpressionHead|. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. If _leftValue_ is neither *undefined* nor *null*, return _leftValue_. + 1. Let _rightRef_ be ? Evaluation of |BitwiseORExpression|. + 1. Return ? GetValue(_rightRef_). @@ -20700,9 +20700,9 @@

Syntax

Runtime Semantics: Evaluation

ConditionalExpression : ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression - 1. Let _lRef_ be ? Evaluation of |ShortCircuitExpression|. - 1. Let _lVal_ be ToBoolean(? GetValue(_lRef_)). - 1. If _lVal_ is *true*, then + 1. Let _leftRef_ be ? Evaluation of |ShortCircuitExpression|. + 1. Let _leftValue_ be ToBoolean(? GetValue(_leftRef_)). + 1. If _leftValue_ is *true*, then 1. Let _trueRef_ be ? Evaluation of the first |AssignmentExpression|. 1. Return ? GetValue(_trueRef_). 1. Let _falseRef_ be ? Evaluation of the second |AssignmentExpression|. @@ -20769,29 +20769,29 @@

Runtime Semantics: Evaluation

AssignmentExpression : LeftHandSideExpression `=` AssignmentExpression 1. If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, then - 1. Let _lRef_ be ? Evaluation of |LeftHandSideExpression|. + 1. Let _leftRef_ be ? Evaluation of |LeftHandSideExpression|. 1. If the AssignmentTargetType of |LeftHandSideExpression| is ~web-compat~, throw a *ReferenceError* exception. 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and IsIdentifierRef of |LeftHandSideExpression| is *true*, then 1. Let _lhs_ be the StringValue of |LeftHandSideExpression|. - 1. Let _rVal_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. + 1. Let _rightValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. 1. Else, - 1. Let _rRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. [id="step-assignmentexpression-evaluation-simple-putvalue"] Perform ? PutValue(_lRef_, _rVal_). - 1. Return _rVal_. + 1. Let _rightRef_ be ? Evaluation of |AssignmentExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. [id="step-assignmentexpression-evaluation-simple-putvalue"] Perform ? PutValue(_leftRef_, _rightValue_). + 1. Return _rightValue_. 1. Let _assignmentPattern_ be the |AssignmentPattern| that is covered by |LeftHandSideExpression|. - 1. Let _rRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Perform ? DestructuringAssignmentEvaluation of _assignmentPattern_ with argument _rVal_. - 1. Return _rVal_. + 1. Let _rightRef_ be ? Evaluation of |AssignmentExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Perform ? DestructuringAssignmentEvaluation of _assignmentPattern_ with argument _rightValue_. + 1. Return _rightValue_. AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression - 1. Let _lRef_ be ? Evaluation of |LeftHandSideExpression|. + 1. Let _leftRef_ be ? Evaluation of |LeftHandSideExpression|. 1. If the AssignmentTargetType of |LeftHandSideExpression| is ~web-compat~, throw a *ReferenceError* exception. - 1. [id="step-assignmentexpression-evaluation-compound-getvalue"] Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). + 1. [id="step-assignmentexpression-evaluation-compound-getvalue"] Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |AssignmentExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). 1. Let _assignmentOpText_ be the source text matched by |AssignmentOperator|. 1. Let _opText_ be the sequence of Unicode code points associated with _assignmentOpText_ in the following table:
@@ -20814,86 +20814,86 @@

Runtime Semantics: Evaluation

`|=` `|`
- 1. Let _r_ be ? ApplyStringOrNumericBinaryOperator(_lVal_, _opText_, _rVal_). - 1. [id="step-assignmentexpression-evaluation-compound-putvalue"] Perform ? PutValue(_lRef_, _r_). - 1. Return _r_. + 1. Let _result_ be ? ApplyStringOrNumericBinaryOperator(_leftValue_, _opText_, _rightValue_). + 1. [id="step-assignmentexpression-evaluation-compound-putvalue"] Perform ? PutValue(_leftRef_, _result_). + 1. Return _result_. AssignmentExpression : LeftHandSideExpression `&&=` AssignmentExpression - 1. Let _lRef_ be ? Evaluation of |LeftHandSideExpression|. - 1. [id="step-assignmentexpression-evaluation-lgcl-and-getvalue"] Let _lVal_ be ? GetValue(_lRef_). - 1. If ToBoolean(_lVal_) is *false*, return _lVal_. + 1. Let _leftRef_ be ? Evaluation of |LeftHandSideExpression|. + 1. [id="step-assignmentexpression-evaluation-lgcl-and-getvalue"] Let _leftValue_ be ? GetValue(_leftRef_). + 1. If ToBoolean(_leftValue_) is *false*, return _leftValue_. 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and IsIdentifierRef of |LeftHandSideExpression| is *true*, then 1. Let _lhs_ be the StringValue of |LeftHandSideExpression|. - 1. Let _rVal_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. + 1. Let _rightValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. 1. Else, - 1. Let _rRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. [id="step-assignmentexpression-evaluation-lgcl-and-putvalue"] Perform ? PutValue(_lRef_, _rVal_). - 1. Return _rVal_. + 1. Let _rightRef_ be ? Evaluation of |AssignmentExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. [id="step-assignmentexpression-evaluation-lgcl-and-putvalue"] Perform ? PutValue(_leftRef_, _rightValue_). + 1. Return _rightValue_. AssignmentExpression : LeftHandSideExpression `||=` AssignmentExpression - 1. Let _lRef_ be ? Evaluation of |LeftHandSideExpression|. - 1. [id="step-assignmentexpression-evaluation-lgcl-or-getvalue"] Let _lVal_ be ? GetValue(_lRef_). - 1. If ToBoolean(_lVal_) is *true*, return _lVal_. + 1. Let _leftRef_ be ? Evaluation of |LeftHandSideExpression|. + 1. [id="step-assignmentexpression-evaluation-lgcl-or-getvalue"] Let _leftValue_ be ? GetValue(_leftRef_). + 1. If ToBoolean(_leftValue_) is *true*, return _leftValue_. 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and IsIdentifierRef of |LeftHandSideExpression| is *true*, then 1. Let _lhs_ be the StringValue of |LeftHandSideExpression|. - 1. Let _rVal_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. + 1. Let _rightValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. 1. Else, - 1. Let _rRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. [id="step-assignmentexpression-evaluation-lgcl-or-putvalue"] Perform ? PutValue(_lRef_, _rVal_). - 1. Return _rVal_. + 1. Let _rightRef_ be ? Evaluation of |AssignmentExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. [id="step-assignmentexpression-evaluation-lgcl-or-putvalue"] Perform ? PutValue(_leftRef_, _rightValue_). + 1. Return _rightValue_. AssignmentExpression : LeftHandSideExpression `??=` AssignmentExpression - 1. Let _lRef_ be ? Evaluation of |LeftHandSideExpression|. - 1. [id="step-assignmentexpression-evaluation-lgcl-nullish-getvalue"] Let _lVal_ be ? GetValue(_lRef_). - 1. If _lVal_ is neither *undefined* nor *null*, return _lVal_. + 1. Let _leftRef_ be ? Evaluation of |LeftHandSideExpression|. + 1. [id="step-assignmentexpression-evaluation-lgcl-nullish-getvalue"] Let _leftValue_ be ? GetValue(_leftRef_). + 1. If _leftValue_ is neither *undefined* nor *null*, return _leftValue_. 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and IsIdentifierRef of |LeftHandSideExpression| is *true*, then 1. Let _lhs_ be the StringValue of |LeftHandSideExpression|. - 1. Let _rVal_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. + 1. Let _rightValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _lhs_. 1. Else, - 1. Let _rRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. [id="step-assignmentexpression-evaluation-lgcl-nullish-putvalue"] Perform ? PutValue(_lRef_, _rVal_). - 1. Return _rVal_. + 1. Let _rightRef_ be ? Evaluation of |AssignmentExpression|. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. [id="step-assignmentexpression-evaluation-lgcl-nullish-putvalue"] Perform ? PutValue(_leftRef_, _rightValue_). + 1. Return _rightValue_. -

When this expression occurs within strict mode code, it is a runtime error if _lRef_ in step , , , , is an unresolvable reference. If it is, a *ReferenceError* exception is thrown. Additionally, it is a runtime error if the _lRef_ in step , , , is a reference to a data property with the attribute value { [[Writable]]: *false* }, to an accessor property with the attribute value { [[Set]]: *undefined* }, or to a non-existent property of an object for which the IsExtensible predicate returns the value *false*. In these cases a *TypeError* exception is thrown.

+

When this expression occurs within strict mode code, it is a runtime error if _leftRef_ in step , , , , is an unresolvable reference. If it is, a *ReferenceError* exception is thrown. Additionally, it is a runtime error if the _leftRef_ in step , , , is a reference to a data property with the attribute value { [[Writable]]: *false* }, to an accessor property with the attribute value { [[Set]]: *undefined* }, or to a non-existent property of an object for which the IsExtensible predicate returns the value *false*. In these cases a *TypeError* exception is thrown.

ApplyStringOrNumericBinaryOperator ( - _lVal_: an ECMAScript language value, + _leftValue_: an ECMAScript language value, _opText_: `**`, `*`, `/`, `%`, `+`, `-`, `<<`, `>>`, `>>>`, `&`, `^`, or `|`, - _rVal_: an ECMAScript language value, + _rightValue_: an ECMAScript language value, ): either a normal completion containing either a String, a BigInt, or a Number, or a throw completion

1. If _opText_ is `+`, then - 1. [id="step-binary-op-toprimitive-lval"] Let _lPrim_ be ? ToPrimitive(_lVal_). - 1. [id="step-binary-op-toprimitive-rval"] Let _rPrim_ be ? ToPrimitive(_rVal_). - 1. [id="step-binary-op-string-check"] If _lPrim_ is a String or _rPrim_ is a String, then - 1. Let _lStr_ be ? ToString(_lPrim_). - 1. Let _rStr_ be ? ToString(_rPrim_). - 1. Return the string-concatenation of _lStr_ and _rStr_. - 1. Set _lVal_ to _lPrim_. - 1. Set _rVal_ to _rPrim_. + 1. [id="step-binary-op-toprimitive-lval"] Let _leftPrimitive_ be ? ToPrimitive(_leftValue_). + 1. [id="step-binary-op-toprimitive-rval"] Let _rightPrimitive_ be ? ToPrimitive(_rightValue_). + 1. [id="step-binary-op-string-check"] If _leftPrimitive_ is a String or _rightPrimitive_ is a String, then + 1. Let _leftString_ be ? ToString(_leftPrimitive_). + 1. Let _rightString_ be ? ToString(_rightPrimitive_). + 1. Return the string-concatenation of _leftString_ and _rightString_. + 1. Set _leftValue_ to _leftPrimitive_. + 1. Set _rightValue_ to _rightPrimitive_. 1. NOTE: At this point, it must be a numeric operation. - 1. Let _lNum_ be ? ToNumeric(_lVal_). - 1. Let _rNum_ be ? ToNumeric(_rVal_). - 1. If SameType(_lNum_, _rNum_) is *false*, throw a *TypeError* exception. - 1. If _lNum_ is a BigInt, then - 1. If _opText_ is `**`, return ? BigInt::exponentiate(_lNum_, _rNum_). - 1. If _opText_ is `/`, return ? BigInt::divide(_lNum_, _rNum_). - 1. If _opText_ is `%`, return ? BigInt::remainder(_lNum_, _rNum_). - 1. If _opText_ is `>>>`, return ? BigInt::unsignedRightShift(_lNum_, _rNum_). + 1. Let _leftNumber_ be ? ToNumeric(_leftValue_). + 1. Let _rightNumber_ be ? ToNumeric(_rightValue_). + 1. If SameType(_leftNumber_, _rightNumber_) is *false*, throw a *TypeError* exception. + 1. If _leftNumber_ is a BigInt, then + 1. If _opText_ is `**`, return ? BigInt::exponentiate(_leftNumber_, _rightNumber_). + 1. If _opText_ is `/`, return ? BigInt::divide(_leftNumber_, _rightNumber_). + 1. If _opText_ is `%`, return ? BigInt::remainder(_leftNumber_, _rightNumber_). + 1. If _opText_ is `>>>`, return ? BigInt::unsignedRightShift(_leftNumber_, _rightNumber_). 1. Let _operation_ be the abstract operation associated with _opText_ in the following table:
@@ -20914,7 +20914,7 @@

1. Else, - 1. Assert: _lNum_ is a Number. + 1. Assert: _leftNumber_ is a Number. 1. Let _operation_ be the abstract operation associated with _opText_ in the following table:
@@ -20938,7 +20938,7 @@

- 1. Return _operation_(_lNum_, _rNum_). + 1. Return _operation_(_leftNumber_, _rightNumber_).

No hint is provided in the calls to ToPrimitive in steps and . All standard objects except Dates handle the absence of a hint as if ~number~ were given; Dates handle the absence of a hint as if ~string~ were given. Exotic objects may handle the absence of a hint in some other manner.

@@ -20959,11 +20959,11 @@

- 1. Let _lRef_ be ? Evaluation of _leftOperand_. - 1. Let _lVal_ be ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of _rightOperand_. - 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lVal_, _opText_, _rVal_). + 1. Let _leftRef_ be ? Evaluation of _leftOperand_. + 1. Let _leftValue_ be ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of _rightOperand_. + 1. Let _rightValue_ be ? GetValue(_rightRef_). + 1. Return ? ApplyStringOrNumericBinaryOperator(_leftValue_, _opText_, _rightValue_). @@ -21149,15 +21149,15 @@

AssignmentProperty : IdentifierReference Initializer? 1. Let _propertyName_ be the StringValue of |IdentifierReference|. - 1. Let _lRef_ be ? ResolveBinding(_propertyName_). - 1. Let _v_ be ? GetV(_value_, _propertyName_). - 1. If |Initializer| is present and _v_ is *undefined*, then + 1. Let _leftRef_ be ? ResolveBinding(_propertyName_). + 1. Set _value_ to ? GetV(_value_, _propertyName_). + 1. If |Initializer| is present and _value_ is *undefined*, then 1. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then - 1. Set _v_ to ? NamedEvaluation of |Initializer| with argument _propertyName_. + 1. Set _value_ to ? NamedEvaluation of |Initializer| with argument _propertyName_. 1. Else, 1. Let _defaultValue_ be ? Evaluation of |Initializer|. - 1. Set _v_ to ? GetValue(_defaultValue_). - 1. Perform ? PutValue(_lRef_, _v_). + 1. Set _value_ to ? GetValue(_defaultValue_). + 1. Perform ? PutValue(_leftRef_, _value_). 1. Return « _propertyName_ ». @@ -21180,10 +21180,10 @@

AssignmentRestProperty : `...` DestructuringAssignmentTarget - 1. Let _lRef_ be ? Evaluation of |DestructuringAssignmentTarget|. + 1. Let _leftRef_ be ? Evaluation of |DestructuringAssignmentTarget|. 1. Let _restObj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ? CopyDataProperties(_restObj_, _value_, _excludedNames_). - 1. Return ? PutValue(_lRef_, _restObj_). + 1. Return ? PutValue(_leftRef_, _restObj_). @@ -21229,7 +21229,7 @@

AssignmentElement : DestructuringAssignmentTarget Initializer? 1. If |DestructuringAssignmentTarget| is neither an |ObjectLiteral| nor an |ArrayLiteral|, then - 1. Let _lRef_ be ? Evaluation of |DestructuringAssignmentTarget|. + 1. Let _leftRef_ be ? Evaluation of |DestructuringAssignmentTarget|. 1. Let _value_ be *undefined*. 1. If _iteratorRecord_.[[Done]] is *false*, then 1. Let _next_ be ? IteratorStepValue(_iteratorRecord_). @@ -21247,7 +21247,7 @@

1. If |DestructuringAssignmentTarget| is either an |ObjectLiteral| or an |ArrayLiteral|, then 1. Let _nestedAssignmentPattern_ be the |AssignmentPattern| that is covered by |DestructuringAssignmentTarget|. 1. Return ? DestructuringAssignmentEvaluation of _nestedAssignmentPattern_ with argument _v_. - 1. Return ? PutValue(_lRef_, _v_). + 1. Return ? PutValue(_leftRef_, _v_).

Left to right evaluation order is maintained by evaluating a |DestructuringAssignmentTarget| that is not a destructuring pattern prior to accessing the iterator or evaluating the |Initializer|.

@@ -21255,7 +21255,7 @@

AssignmentRestElement : `...` DestructuringAssignmentTarget 1. If |DestructuringAssignmentTarget| is neither an |ObjectLiteral| nor an |ArrayLiteral|, then - 1. Let _lRef_ be ? Evaluation of |DestructuringAssignmentTarget|. + 1. Let _leftRef_ be ? Evaluation of |DestructuringAssignmentTarget|. 1. Let _array_ be ! ArrayCreate(0). 1. Let _n_ be 0. 1. Repeat, while _iteratorRecord_.[[Done]] is *false*, @@ -21264,7 +21264,7 @@

1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_n_)), _next_). 1. Set _n_ to _n_ + 1. 1. If |DestructuringAssignmentTarget| is neither an |ObjectLiteral| nor an |ArrayLiteral|, then - 1. Return ? PutValue(_lRef_, _array_). + 1. Return ? PutValue(_leftRef_, _array_). 1. Let _nestedAssignmentPattern_ be the |AssignmentPattern| that is covered by |DestructuringAssignmentTarget|. 1. Return ? DestructuringAssignmentEvaluation of _nestedAssignmentPattern_ with argument _array_. @@ -21282,9 +21282,9 @@

AssignmentElement : DestructuringAssignmentTarget Initializer? 1. If |DestructuringAssignmentTarget| is neither an |ObjectLiteral| nor an |ArrayLiteral|, then - 1. Let _lRef_ be ? Evaluation of |DestructuringAssignmentTarget|. - 1. Let _v_ be ? GetV(_value_, _propertyName_). - 1. If |Initializer| is present and _v_ is *undefined*, then + 1. Let _leftRef_ be ? Evaluation of |DestructuringAssignmentTarget|. + 1. Set _value_ to ? GetV(_value_, _propertyName_). + 1. If |Initializer| is present and _value_ is *undefined*, then 1. If IsAnonymousFunctionDefinition(|Initializer|) is *true* and IsIdentifierRef of |DestructuringAssignmentTarget| is *true*, then 1. Let _target_ be the StringValue of |DestructuringAssignmentTarget|. 1. Let _rhsValue_ be ? NamedEvaluation of |Initializer| with argument _target_. @@ -21292,11 +21292,11 @@

1. Let _defaultValue_ be ? Evaluation of |Initializer|. 1. Let _rhsValue_ be ? GetValue(_defaultValue_). 1. Else, - 1. Let _rhsValue_ be _v_. + 1. Let _rhsValue_ be _value_. 1. If |DestructuringAssignmentTarget| is either an |ObjectLiteral| or an |ArrayLiteral|, then 1. Let _assignmentPattern_ be the |AssignmentPattern| that is covered by |DestructuringAssignmentTarget|. 1. Return ? DestructuringAssignmentEvaluation of _assignmentPattern_ with argument _rhsValue_. - 1. Return ? PutValue(_lRef_, _rhsValue_). + 1. Return ? PutValue(_leftRef_, _rhsValue_). @@ -21315,10 +21315,10 @@

Syntax

Runtime Semantics: Evaluation

Expression : Expression `,` AssignmentExpression - 1. Let _lRef_ be ? Evaluation of |Expression|. - 1. Perform ? GetValue(_lRef_). - 1. Let _rRef_ be ? Evaluation of |AssignmentExpression|. - 1. Return ? GetValue(_rRef_). + 1. Let _leftRef_ be ? Evaluation of |Expression|. + 1. Perform ? GetValue(_leftRef_). + 1. Let _rightRef_ be ? Evaluation of |AssignmentExpression|. + 1. Return ? GetValue(_rightRef_).

GetValue must be called even though its value is not used because it may have observable side-effects.

@@ -21470,12 +21470,12 @@

Runtime Semantics: Evaluation

BlockDeclarationInstantiation ( _code_: a Parse Node, - _env_: a Declarative Environment Record, + _envRecord_: a Declarative Environment Record, ): ~unused~

description
-
_code_ is the Parse Node corresponding to the body of the block. _env_ is the Environment Record in which bindings are to be created.
+
_code_ is the Parse Node corresponding to the body of the block. _envRecord_ is the Environment Record in which bindings are to be created.

When a |Block| or |CaseBlock| is evaluated a new Declarative Environment Record is created and bindings for each block scoped variable, constant, function, or class declared in the block are instantiated in the Environment Record.

@@ -21484,27 +21484,27 @@

1. Let _declarations_ be the LexicallyScopedDeclarations of _code_. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. - 1. For each element _decl_ of _declarations_, do - 1. For each element _dn_ of the BoundNames of _decl_, do - 1. If IsConstantDeclaration of _decl_ is *true*, then - 1. Perform ! _env_.CreateImmutableBinding(_dn_, *true*). + 1. For each element _declaration_ of _declarations_, do + 1. For each element _dn_ of the BoundNames of _declaration_, do + 1. If IsConstantDeclaration of _declaration_ is *true*, then + 1. Perform ! _envRecord_.CreateImmutableBinding(_dn_, *true*). 1. Else, 1. [id="step-blockdeclarationinstantiation-createmutablebinding", normative-optional] If the host is a web browser or otherwise supports , then - 1. If ! _env_.HasBinding(_dn_) is *false*, then - 1. Perform ! _env_.CreateMutableBinding(_dn_, *false*). + 1. If ! _envRecord_.HasBinding(_dn_) is *false*, then + 1. Perform ! _envRecord_.CreateMutableBinding(_dn_, *false*). 1. Else, - 1. Perform ! _env_.CreateMutableBinding(_dn_, *false*). - 1. If _decl_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|, then - 1. Let _fn_ be the sole element of the BoundNames of _decl_. - 1. Let _fo_ be InstantiateFunctionObject of _decl_ with arguments _env_ and _privateEnv_. + 1. Perform ! _envRecord_.CreateMutableBinding(_dn_, *false*). + 1. If _declaration_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|, then + 1. Let _func_ be the sole element of the BoundNames of _declaration_. + 1. Let _funcObj_ be InstantiateFunctionObject of _declaration_ with arguments _envRecord_ and _privateEnv_. 1. [id="step-blockdeclarationinstantiation-initializebinding", normative-optional] If the host is a web browser or otherwise supports , then - 1. If the binding for _fn_ in _env_ is an uninitialized binding, then - 1. Perform ! _env_.InitializeBinding(_fn_, _fo_). + 1. If the binding for _func_ in _envRecord_ is an uninitialized binding, then + 1. Perform ! _envRecord_.InitializeBinding(_func_, _funcObj_). 1. Else, - 1. Assert: _decl_ is a |FunctionDeclaration|. - 1. Perform ! _env_.SetMutableBinding(_fn_, _fo_, *false*). + 1. Assert: _declaration_ is a |FunctionDeclaration|. + 1. Perform ! _envRecord_.SetMutableBinding(_func_, _funcObj_, *false*). 1. Else, - 1. Perform ! _env_.InitializeBinding(_fn_, _fo_). + 1. Perform ! _envRecord_.InitializeBinding(_func_, _funcObj_). 1. Return ~unused~. @@ -21592,8 +21592,8 @@

Runtime Semantics: Evaluation

1. Let _rhs_ be ? Evaluation of |Initializer|. 1. Let _value_ be ? GetValue(_rhs_). - 1. Let _env_ be the running execution context's LexicalEnvironment. - 1. Return ? BindingInitialization of |BindingPattern| with arguments _value_ and _env_. + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. + 1. Return ? BindingInitialization of |BindingPattern| with arguments _value_ and _envRecord_. @@ -21651,8 +21651,8 @@

Runtime Semantics: Evaluation

VariableDeclaration : BindingPattern Initializer 1. Let _rhs_ be ? Evaluation of |Initializer|. - 1. Let _rVal_ be ? GetValue(_rhs_). - 1. Return ? BindingInitialization of |BindingPattern| with arguments _rVal_ and *undefined*. + 1. Let _rightValue_ be ? GetValue(_rhs_). + 1. Return ? BindingInitialization of |BindingPattern| with arguments _rightValue_ and *undefined*. @@ -21710,7 +21710,7 @@

Syntax

Runtime Semantics: PropertyBindingInitialization ( _value_: an ECMAScript language value, - _environment_: an Environment Record or *undefined*, + _envRecord_: an Environment Record or *undefined*, ): either a normal completion containing a List of property keys or an abrupt completion

@@ -21719,22 +21719,22 @@

BindingPropertyList : BindingPropertyList `,` BindingProperty - 1. Let _boundNames_ be ? PropertyBindingInitialization of |BindingPropertyList| with arguments _value_ and _environment_. - 1. Let _nextNames_ be ? PropertyBindingInitialization of |BindingProperty| with arguments _value_ and _environment_. + 1. Let _boundNames_ be ? PropertyBindingInitialization of |BindingPropertyList| with arguments _value_ and _envRecord_. + 1. Let _nextNames_ be ? PropertyBindingInitialization of |BindingProperty| with arguments _value_ and _envRecord_. 1. Return the list-concatenation of _boundNames_ and _nextNames_. BindingProperty : SingleNameBinding 1. Let _name_ be the sole element of the BoundNames of |SingleNameBinding|. - 1. Perform ? KeyedBindingInitialization of |SingleNameBinding| with arguments _value_, _environment_, and _name_. + 1. Perform ? KeyedBindingInitialization of |SingleNameBinding| with arguments _value_, _envRecord_, and _name_. 1. Return « _name_ ». BindingProperty : PropertyName `:` BindingElement 1. Let _propertyKey_ be ? Evaluation of |PropertyName|. - 1. Perform ? KeyedBindingInitialization of |BindingElement| with arguments _value_, _environment_, and _propertyKey_. + 1. Perform ? KeyedBindingInitialization of |BindingElement| with arguments _value_, _envRecord_, and _propertyKey_. 1. Return « _propertyKey_ ». @@ -21743,7 +21743,7 @@

Runtime Semantics: RestBindingInitialization ( _value_: an ECMAScript language value, - _environment_: an Environment Record or *undefined*, + _envRecord_: an Environment Record or *undefined*, _excludedNames_: a List of property keys, ): either a normal completion containing ~unused~ or an abrupt completion

@@ -21751,10 +21751,10 @@

BindingRestProperty : `...` BindingIdentifier - 1. Let _lhs_ be ? ResolveBinding(StringValue of |BindingIdentifier|, _environment_). + 1. Let _lhs_ be ? ResolveBinding(StringValue of |BindingIdentifier|, _envRecord_). 1. Let _restObj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ? CopyDataProperties(_restObj_, _value_, _excludedNames_). - 1. If _environment_ is *undefined*, return ? PutValue(_lhs_, _restObj_). + 1. If _envRecord_ is *undefined*, return ? PutValue(_lhs_, _restObj_). 1. Return ? InitializeReferencedBinding(_lhs_, _restObj_). @@ -21763,36 +21763,36 @@

Runtime Semantics: KeyedBindingInitialization ( _value_: an ECMAScript language value, - _environment_: an Environment Record or *undefined*, + _envRecord_: an Environment Record or *undefined*, _propertyName_: a property key, ): either a normal completion containing ~unused~ or an abrupt completion

-

When *undefined* is passed for _environment_ it indicates that a PutValue operation should be used to assign the initialization value. This is the case for formal parameter lists of non-strict functions. In that case the formal parameter bindings are preinitialized in order to deal with the possibility of multiple parameters with the same name.

+

When *undefined* is passed for _envRecord_ it indicates that a PutValue operation should be used to assign the initialization value. This is the case for formal parameter lists of non-strict functions. In that case the formal parameter bindings are preinitialized in order to deal with the possibility of multiple parameters with the same name.

BindingElement : BindingPattern Initializer? - 1. Let _v_ be ? GetV(_value_, _propertyName_). - 1. If |Initializer| is present and _v_ is *undefined*, then + 1. Set _value_ to ? GetV(_value_, _propertyName_). + 1. If |Initializer| is present and _value_ is *undefined*, then 1. Let _defaultValue_ be ? Evaluation of |Initializer|. - 1. Set _v_ to ? GetValue(_defaultValue_). - 1. Return ? BindingInitialization of |BindingPattern| with arguments _v_ and _environment_. + 1. Set _value_ to ? GetValue(_defaultValue_). + 1. Return ? BindingInitialization of |BindingPattern| with arguments _value_ and _envRecord_. SingleNameBinding : BindingIdentifier Initializer? 1. Let _bindingId_ be the StringValue of |BindingIdentifier|. - 1. Let _lhs_ be ? ResolveBinding(_bindingId_, _environment_). - 1. Let _v_ be ? GetV(_value_, _propertyName_). - 1. If |Initializer| is present and _v_ is *undefined*, then + 1. Let _lhs_ be ? ResolveBinding(_bindingId_, _envRecord_). + 1. Set _value_ to ? GetV(_value_, _propertyName_). + 1. If |Initializer| is present and _value_ is *undefined*, then 1. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then - 1. Set _v_ to ? NamedEvaluation of |Initializer| with argument _bindingId_. + 1. Set _value_ to ? NamedEvaluation of |Initializer| with argument _bindingId_. 1. Else, 1. Let _defaultValue_ be ? Evaluation of |Initializer|. - 1. Set _v_ to ? GetValue(_defaultValue_). - 1. If _environment_ is *undefined*, return ? PutValue(_lhs_, _v_). - 1. Return ? InitializeReferencedBinding(_lhs_, _v_). + 1. Set _value_ to ? GetValue(_defaultValue_). + 1. If _envRecord_ is *undefined*, return ? PutValue(_lhs_, _value_). + 1. Return ? InitializeReferencedBinding(_lhs_, _value_). @@ -22109,10 +22109,10 @@

1. Else, 1. Perform ! _loopEnv_.CreateMutableBinding(_dn_, *false*). 1. Set the running execution context's LexicalEnvironment to _loopEnv_. - 1. Let _forDcl_ be Completion(Evaluation of |LexicalDeclaration|). - 1. If _forDcl_ is an abrupt completion, then + 1. Let _forDeclaration_ be Completion(Evaluation of |LexicalDeclaration|). + 1. If _forDeclaration_ is an abrupt completion, then 1. Set the running execution context's LexicalEnvironment to _oldEnv_. - 1. Return ? _forDcl_. + 1. Return ? _forDeclaration_. 1. If _isConst_ is *false*, let _perIterationLets_ be _boundNames_; else let _perIterationLets_ be a new empty List. 1. If the first |Expression| is present, let _test_ be the first |Expression|; else let _test_ be ~empty~. 1. If the second |Expression| is present, let _increment_ be the second |Expression|; else let _increment_ be ~empty~. @@ -22307,21 +22307,21 @@

Static Semantics: IsDestructuring ( ): a Boolean

Runtime Semantics: ForDeclarationBindingInitialization ( _value_: an ECMAScript language value, - _environment_: an Environment Record, + _envRecord_: an Environment Record, ): either a normal completion containing ~unused~ or an abrupt completion

ForDeclaration : LetOrConst ForBinding - 1. Return ? BindingInitialization of |ForBinding| with arguments _value_ and _environment_. + 1. Return ? BindingInitialization of |ForBinding| with arguments _value_ and _envRecord_.

Runtime Semantics: ForDeclarationBindingInstantiation ( - _environment_: a Declarative Environment Record, + _envRecord_: a Declarative Environment Record, ): ~unused~

@@ -22330,9 +22330,9 @@

1. For each element _name_ of the BoundNames of |ForBinding|, do 1. If IsConstantDeclaration of |LetOrConst| is *true*, then - 1. Perform ! _environment_.CreateImmutableBinding(_name_, *true*). + 1. Perform ! _envRecord_.CreateImmutableBinding(_name_, *true*). 1. Else, - 1. Perform ! _environment_.CreateMutableBinding(_name_, *false*). + 1. Perform ! _envRecord_.CreateMutableBinding(_name_, *false*). 1. Return ~unused~. @@ -22580,16 +22580,16 @@

For-In Iterator Objects

CreateForInIterator ( - _object_: an Object, + _obj_: an Object, ): a For-In Iterator

description
-
It is used to create a For-In Iterator object which iterates over the own and inherited enumerable string properties of _object_ in a specific order.
+
It is used to create a For-In Iterator object which iterates over the own and inherited enumerable string properties of _obj_ in a specific order.
1. Let _iterator_ be OrdinaryObjectCreate(%ForInIteratorPrototype%, « [[Object]], [[ObjectWasVisited]], [[VisitedKeys]], [[RemainingKeys]] »). - 1. Set _iterator_.[[Object]] to _object_. + 1. Set _iterator_.[[Object]] to _obj_. 1. Set _iterator_.[[ObjectWasVisited]] to *false*. 1. Set _iterator_.[[VisitedKeys]] to a new empty List. 1. Set _iterator_.[[RemainingKeys]] to a new empty List. @@ -22611,29 +22611,29 @@

The %ForInIteratorPrototype% Object

%ForInIteratorPrototype%.next ( )

- 1. Let _iter_ be the *this* value. - 1. Assert: _iter_ is an Object. - 1. Assert: _iter_ has all of the internal slots of a For-In Iterator instance (). - 1. Let _object_ be _iter_.[[Object]]. + 1. Let _iterator_ be the *this* value. + 1. Assert: _iterator_ is an Object. + 1. Assert: _iterator_ has all of the internal slots of a For-In Iterator instance (). + 1. Let _obj_ be _iterator_.[[Object]]. 1. Repeat, - 1. If _iter_.[[ObjectWasVisited]] is *false*, then - 1. Let _keys_ be ? _object_.[[OwnPropertyKeys]](). + 1. If _iterator_.[[ObjectWasVisited]] is *false*, then + 1. Let _keys_ be ? _obj_.[[OwnPropertyKeys]](). 1. For each element _key_ of _keys_, do 1. If _key_ is a String, then - 1. Append _key_ to _iter_.[[RemainingKeys]]. - 1. Set _iter_.[[ObjectWasVisited]] to *true*. - 1. Repeat, while _iter_.[[RemainingKeys]] is not empty, - 1. Let _key_ be the first element of _iter_.[[RemainingKeys]]. - 1. Remove the first element from _iter_.[[RemainingKeys]]. - 1. If _iter_.[[VisitedKeys]] does not contain _key_, then - 1. Let _desc_ be ? _object_.[[GetOwnProperty]](_key_). - 1. If _desc_ is not *undefined*, then - 1. Append _key_ to _iter_.[[VisitedKeys]]. - 1. If _desc_.[[Enumerable]] is *true*, return CreateIteratorResultObject(_key_, *false*). - 1. Set _object_ to ? _object_.[[GetPrototypeOf]](). - 1. Set _iter_.[[Object]] to _object_. - 1. Set _iter_.[[ObjectWasVisited]] to *false*. - 1. If _object_ is *null*, return CreateIteratorResultObject(*undefined*, *true*). + 1. Append _key_ to _iterator_.[[RemainingKeys]]. + 1. Set _iterator_.[[ObjectWasVisited]] to *true*. + 1. Repeat, while _iterator_.[[RemainingKeys]] is not empty, + 1. Let _key_ be the first element of _iterator_.[[RemainingKeys]]. + 1. Remove the first element from _iterator_.[[RemainingKeys]]. + 1. If _iterator_.[[VisitedKeys]] does not contain _key_, then + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_key_). + 1. If _propertyDesc_ is not *undefined*, then + 1. Append _key_ to _iterator_.[[VisitedKeys]]. + 1. If _propertyDesc_.[[Enumerable]] is *true*, return CreateIteratorResultObject(_key_, *false*). + 1. Set _obj_ to ? _obj_.[[GetPrototypeOf]](). + 1. Set _iterator_.[[Object]] to _obj_. + 1. Set _iterator_.[[ObjectWasVisited]] to *false*. + 1. If _obj_ is *null*, return CreateIteratorResultObject(*undefined*, *true*).
@@ -22840,8 +22840,8 @@

Static Semantics: Early Errors

Runtime Semantics: Evaluation

WithStatement : `with` `(` Expression `)` Statement - 1. Let _val_ be ? Evaluation of |Expression|. - 1. Let _obj_ be ? ToObject(? GetValue(_val_)). + 1. Let _value_ be ? Evaluation of |Expression|. + 1. Let _obj_ be ? ToObject(? GetValue(_value_)). 1. Let _oldEnv_ be the running execution context's LexicalEnvironment. 1. Let _newEnv_ be NewObjectEnvironment(_obj_, *true*, _oldEnv_). 1. Set the running execution context's LexicalEnvironment to _newEnv_. @@ -22964,22 +22964,22 @@

CaseClauseIsSelected ( - _constructor_: a |CaseClause| Parse Node, + _caseClauseNode_: a |CaseClause| Parse Node, _input_: an ECMAScript language value, ): either a normal completion containing a Boolean or an abrupt completion

description
-
It determines whether _constructor_ matches _input_.
+
It determines whether _caseClauseNode_ matches _input_.
- 1. Assert: _constructor_ is an instance of the production CaseClause : `case` Expression `:` StatementList?. - 1. Let _exprRef_ be ? Evaluation of the |Expression| of _constructor_. + 1. Assert: _caseClauseNode_ is an instance of the production CaseClause : `case` Expression `:` StatementList?. + 1. Let _exprRef_ be ? Evaluation of the |Expression| of _caseClauseNode_. 1. Let _clauseSelector_ be ? GetValue(_exprRef_). 1. Return IsStrictlyEqual(_input_, _clauseSelector_). -

This operation does not execute _constructor_'s |StatementList| (if any). The |CaseBlock| algorithm uses its return value to determine which |StatementList| to start executing.

+

This operation does not execute _caseClauseNode_'s |StatementList| (if any). The |CaseBlock| algorithm uses its return value to determine which |StatementList| to start executing.

@@ -23671,15 +23671,15 @@

Static Semantics: FunctionBodyContainsUseStrict ( ): a Boolean

Runtime Semantics: EvaluateFunctionBody ( - _functionObject_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _funcObj_: an ECMAScript function object, + _argList_: a List of ECMAScript language values, ): a return completion or a throw completion

FunctionBody : FunctionStatementList - 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_). + 1. Perform ? FunctionDeclarationInstantiation(_funcObj_, _argList_). 1. Perform ? Evaluation of |FunctionStatementList|. 1. NOTE: If the previous step resulted in a normal completion, then evaluation finished by proceeding past the end of the |FunctionStatementList|. 1. Return ReturnCompletion(*undefined*). @@ -23689,7 +23689,7 @@

Runtime Semantics: InstantiateOrdinaryFunctionObject ( - _env_: an Environment Record, + _envRecord_: an Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, ): an ECMAScript function object

@@ -23699,7 +23699,7 @@

1. Let _name_ be the StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |FunctionDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Perform MakeConstructor(_closure_). 1. Return _closure_. @@ -23707,7 +23707,7 @@

FunctionDeclaration : `function` `(` FormalParameters `)` `{` FunctionBody `}` 1. Let _sourceText_ be the source text matched by |FunctionDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, *"default"*). 1. Perform MakeConstructor(_closure_). 1. Return _closure_. @@ -23728,10 +23728,10 @@

FunctionExpression : `function` `(` FormalParameters `)` `{` FunctionBody `}` 1. If _name_ is not present, set _name_ to the empty String. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |FunctionExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Perform MakeConstructor(_closure_). 1. Return _closure_. @@ -23856,15 +23856,15 @@

Static Semantics: ConciseBodyContainsUseStrict ( ): a Boolean

Runtime Semantics: EvaluateConciseBody ( - _functionObject_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _funcObj_: an ECMAScript function object, + _argList_: a List of ECMAScript language values, ): a return completion or a throw completion

ConciseBody : ExpressionBody - 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_). + 1. Perform ? FunctionDeclarationInstantiation(_funcObj_, _argList_). 1. Return ? Evaluation of |ExpressionBody|.
@@ -23880,15 +23880,15 @@

ArrowFunction : ArrowParameters `=>` ConciseBody 1. If _name_ is not present, set _name_ to the empty String. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |ArrowFunction|. - 1. [id="step-arrowfunction-evaluation-functioncreate"] Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |ArrowParameters|, |ConciseBody|, ~lexical-this~, _env_, _privateEnv_). + 1. [id="step-arrowfunction-evaluation-functioncreate"] Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |ArrowParameters|, |ConciseBody|, ~lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. -

An |ArrowFunction| does not define local bindings for `arguments`, `super`, `this`, or `new.target`. Any reference to `arguments`, `super`, `this`, or `new.target` within an |ArrowFunction| must resolve to a binding in a lexically enclosing environment. Typically this will be the Function Environment of an immediately enclosing function. Even though an |ArrowFunction| may contain references to `super`, the function object created in step is not made into a method by performing MakeMethod. An |ArrowFunction| that references `super` is always contained within a non-|ArrowFunction| and the necessary state to implement `super` is accessible via the _env_ that is captured by the function object of the |ArrowFunction|.

+

An |ArrowFunction| does not define local bindings for `arguments`, `super`, `this`, or `new.target`. Any reference to `arguments`, `super`, `this`, or `new.target` within an |ArrowFunction| must resolve to a binding in a lexically enclosing environment. Typically this will be the Function Environment of an immediately enclosing function. Even though an |ArrowFunction| may contain references to `super`, the function object created in step is not made into a method by performing MakeMethod. An |ArrowFunction| that references `super` is always contained within a non-|ArrowFunction| and the necessary state to implement `super` is accessible via the _envRecord_ that is captured by the function object of the |ArrowFunction|.

@@ -24009,8 +24009,8 @@

Static Semantics: SpecialMethod ( ): a Boolean

Runtime Semantics: DefineMethod ( - _object_: an Object, - optional _functionPrototype_: an Object, + _obj_: an Object, + optional _proto_: an Object, ): either a normal completion containing a Record with fields [[Key]] (a property key) and [[Closure]] (an ECMAScript function object) or an abrupt completion

@@ -24018,15 +24018,12 @@

MethodDefinition : ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}` 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. - 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. - 1. If _functionPrototype_ is present, then - 1. Let _prototype_ be _functionPrototype_. - 1. Else, - 1. Let _prototype_ be %Function.prototype%. + 1. If _proto_ is not present, set _proto_ to %Function.prototype%. 1. Let _sourceText_ be the source text matched by |MethodDefinition|. - 1. Let _closure_ be OrdinaryFunctionCreate(_prototype_, _sourceText_, |UniqueFormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform MakeMethod(_closure_, _object_). + 1. Let _closure_ be OrdinaryFunctionCreate(_proto_, _sourceText_, |UniqueFormalParameters|, |FunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). + 1. Perform MakeMethod(_closure_, _obj_). 1. Return the Record { [[Key]]: _propertyKey_, [[Closure]]: _closure_ }. @@ -24034,7 +24031,7 @@

Runtime Semantics: MethodDefinitionEvaluation ( - _object_: an Object, + _obj_: an Object, _enumerable_: a Boolean, ): either a normal completion containing either a PrivateElement or ~unused~, or an abrupt completion

@@ -24042,81 +24039,81 @@

MethodDefinition : ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}` - 1. Let _methodDef_ be ? DefineMethod of |MethodDefinition| with argument _object_. + 1. Let _methodDef_ be ? DefineMethod of |MethodDefinition| with argument _obj_. 1. Perform SetFunctionName(_methodDef_.[[Closure]], _methodDef_.[[Key]]). - 1. Return ? DefineMethodProperty(_object_, _methodDef_.[[Key]], _methodDef_.[[Closure]], _enumerable_). + 1. Return ? DefineMethodProperty(_obj_, _methodDef_.[[Key]], _methodDef_.[[Closure]], _enumerable_). MethodDefinition : `get` ClassElementName `(` `)` `{` FunctionBody `}` 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. - 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |MethodDefinition|. - 1. Let _formalParameterList_ be an instance of the production FormalParameters : [empty]. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameterList_, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform MakeMethod(_closure_, _object_). + 1. Let _formalParamList_ be an instance of the production FormalParameters : [empty]. + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParamList_, |FunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). + 1. Perform MakeMethod(_closure_, _obj_). 1. Perform SetFunctionName(_closure_, _propertyKey_, *"get"*). 1. If _propertyKey_ is a Private Name, then 1. Return PrivateElement { [[Key]]: _propertyKey_, [[Kind]]: ~accessor~, [[Get]]: _closure_, [[Set]]: *undefined* }. - 1. Let _desc_ be the PropertyDescriptor { [[Get]]: _closure_, [[Enumerable]]: _enumerable_, [[Configurable]]: *true* }. - 1. Perform ? DefinePropertyOrThrow(_object_, _propertyKey_, _desc_). + 1. Let _propertyDesc_ be the PropertyDescriptor { [[Get]]: _closure_, [[Enumerable]]: _enumerable_, [[Configurable]]: *true* }. + 1. Perform ? DefinePropertyOrThrow(_obj_, _propertyKey_, _propertyDesc_). 1. Return ~unused~. MethodDefinition : `set` ClassElementName `(` PropertySetParameterList `)` `{` FunctionBody `}` 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. - 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |MethodDefinition|. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |PropertySetParameterList|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform MakeMethod(_closure_, _object_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |PropertySetParameterList|, |FunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). + 1. Perform MakeMethod(_closure_, _obj_). 1. Perform SetFunctionName(_closure_, _propertyKey_, *"set"*). 1. If _propertyKey_ is a Private Name, then 1. Return PrivateElement { [[Key]]: _propertyKey_, [[Kind]]: ~accessor~, [[Get]]: *undefined*, [[Set]]: _closure_ }. - 1. Let _desc_ be the PropertyDescriptor { [[Set]]: _closure_, [[Enumerable]]: _enumerable_, [[Configurable]]: *true* }. - 1. Perform ? DefinePropertyOrThrow(_object_, _propertyKey_, _desc_). + 1. Let _propertyDesc_ be the PropertyDescriptor { [[Set]]: _closure_, [[Enumerable]]: _enumerable_, [[Configurable]]: *true* }. + 1. Perform ? DefinePropertyOrThrow(_obj_, _propertyKey_, _propertyDesc_). 1. Return ~unused~. GeneratorMethod : `*` ClassElementName `(` UniqueFormalParameters `)` `{` GeneratorBody `}` 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. - 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |GeneratorMethod|. - 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform MakeMethod(_closure_, _object_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |GeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). + 1. Perform MakeMethod(_closure_, _obj_). 1. Perform SetFunctionName(_closure_, _propertyKey_). - 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). - 1. Return ? DefineMethodProperty(_object_, _propertyKey_, _closure_, _enumerable_). + 1. Let _proto_ be OrdinaryObjectCreate(%GeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Return ? DefineMethodProperty(_obj_, _propertyKey_, _closure_, _enumerable_). AsyncGeneratorMethod : `async` `*` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncGeneratorBody `}` 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. - 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncGeneratorMethod|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform MakeMethod(_closure_, _object_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). + 1. Perform MakeMethod(_closure_, _obj_). 1. Perform SetFunctionName(_closure_, _propertyKey_). - 1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). - 1. Return ? DefineMethodProperty(_object_, _propertyKey_, _closure_, _enumerable_). + 1. Let _proto_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Return ? DefineMethodProperty(_obj_, _propertyKey_, _closure_, _enumerable_). AsyncMethod : `async` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncFunctionBody `}` 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncMethod|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform MakeMethod(_closure_, _object_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). + 1. Perform MakeMethod(_closure_, _obj_). 1. Perform SetFunctionName(_closure_, _propertyKey_). - 1. Return ? DefineMethodProperty(_object_, _propertyKey_, _closure_, _enumerable_). + 1. Return ? DefineMethodProperty(_obj_, _propertyKey_, _closure_, _enumerable_).
@@ -24212,27 +24209,27 @@

Static Semantics: Early Errors

Runtime Semantics: EvaluateGeneratorBody ( - _functionObject_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _funcObj_: an ECMAScript function object, + _argList_: a List of ECMAScript language values, ): a throw completion or a return completion

GeneratorBody : FunctionBody - 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_). - 1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorPrototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »). - 1. Set _generator_.[[GeneratorBrand]] to ~empty~. - 1. Set _generator_.[[GeneratorState]] to ~suspended-start~. - 1. Perform GeneratorStart(_generator_, |FunctionBody|). - 1. Return ReturnCompletion(_generator_). + 1. Perform ? FunctionDeclarationInstantiation(_funcObj_, _argList_). + 1. Let _gen_ be ? OrdinaryCreateFromConstructor(_funcObj_, *"%GeneratorPrototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »). + 1. Set _gen_.[[GeneratorBrand]] to ~empty~. + 1. Set _gen_.[[GeneratorState]] to ~suspended-start~. + 1. Perform GeneratorStart(_gen_, |FunctionBody|). + 1. Return ReturnCompletion(_gen_).

Runtime Semantics: InstantiateGeneratorFunctionObject ( - _env_: an Environment Record, + _envRecord_: an Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, ): an ECMAScript function object

@@ -24242,19 +24239,19 @@

1. Let _name_ be the StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). - 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%GeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return _closure_. GeneratorDeclaration : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` 1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, *"default"*). - 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%GeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return _closure_. @@ -24273,13 +24270,13 @@

GeneratorExpression : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` 1. If _name_ is not present, set _name_ to the empty String. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |GeneratorExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). - 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%GeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return _closure_. GeneratorExpression : `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}` @@ -24293,8 +24290,8 @@

1. Let _sourceText_ be the source text matched by |GeneratorExpression|. 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). - 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%GeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform ! _funcEnv_.InitializeBinding(_name_, _closure_). 1. Return _closure_. @@ -24323,39 +24320,39 @@

Runtime Semantics: Evaluation

YieldExpression : `yield` `*` AssignmentExpression - 1. Let _generatorKind_ be GetGeneratorKind(). - 1. Assert: _generatorKind_ is either ~sync~ or ~async~. + 1. Let _genKind_ be GetGeneratorKind(). + 1. Assert: _genKind_ is either ~sync~ or ~async~. 1. Let _exprRef_ be ? Evaluation of |AssignmentExpression|. 1. Let _value_ be ? GetValue(_exprRef_). - 1. Let _iteratorRecord_ be ? GetIterator(_value_, _generatorKind_). + 1. Let _iteratorRecord_ be ? GetIterator(_value_, _genKind_). 1. Let _iterator_ be _iteratorRecord_.[[Iterator]]. 1. Let _received_ be NormalCompletion(*undefined*). 1. Repeat, 1. If _received_ is a normal completion, then 1. Let _innerResult_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]], « _received_.[[Value]] »). - 1. If _generatorKind_ is ~async~, set _innerResult_ to ? Await(_innerResult_). + 1. If _genKind_ is ~async~, set _innerResult_ to ? Await(_innerResult_). 1. If _innerResult_ is not an Object, throw a *TypeError* exception. 1. Let _done_ be ? IteratorComplete(_innerResult_). 1. If _done_ is *true*, then 1. Return ? IteratorValue(_innerResult_). - 1. If _generatorKind_ is ~async~, set _received_ to Completion(AsyncGeneratorYield(? IteratorValue(_innerResult_))). + 1. If _genKind_ is ~async~, set _received_ to Completion(AsyncGeneratorYield(? IteratorValue(_innerResult_))). 1. Else, set _received_ to Completion(GeneratorYield(_innerResult_)). 1. Else if _received_ is a throw completion, then 1. Let _throw_ be ? GetMethod(_iterator_, *"throw"*). 1. If _throw_ is not *undefined*, then 1. Let _innerResult_ be ? Call(_throw_, _iterator_, « _received_.[[Value]] »). - 1. If _generatorKind_ is ~async~, set _innerResult_ to ? Await(_innerResult_). + 1. If _genKind_ is ~async~, set _innerResult_ to ? Await(_innerResult_). 1. NOTE: Exceptions from the inner iterator `throw` method are propagated. Normal completions from an inner `throw` method are processed similarly to an inner `next`. 1. If _innerResult_ is not an Object, throw a *TypeError* exception. 1. Let _done_ be ? IteratorComplete(_innerResult_). 1. If _done_ is *true*, then 1. Return ? IteratorValue(_innerResult_). - 1. If _generatorKind_ is ~async~, set _received_ to Completion(AsyncGeneratorYield(? IteratorValue(_innerResult_))). + 1. If _genKind_ is ~async~, set _received_ to Completion(AsyncGeneratorYield(? IteratorValue(_innerResult_))). 1. Else, set _received_ to Completion(GeneratorYield(_innerResult_)). 1. Else, 1. NOTE: If _iterator_ does not have a `throw` method, this throw is going to terminate the `yield*` loop. But first we need to give _iterator_ a chance to clean up. 1. Let _closeCompletion_ be NormalCompletion(~empty~). - 1. If _generatorKind_ is ~async~, perform ? AsyncIteratorClose(_iteratorRecord_, _closeCompletion_). + 1. If _genKind_ is ~async~, perform ? AsyncIteratorClose(_iteratorRecord_, _closeCompletion_). 1. Else, perform ? IteratorClose(_iteratorRecord_, _closeCompletion_). 1. NOTE: The next step throws a *TypeError* to indicate that there was a `yield*` protocol violation: _iterator_ does not have a `throw` method. 1. Throw a *TypeError* exception. @@ -24364,17 +24361,17 @@

Runtime Semantics: Evaluation

1. Let _return_ be ? GetMethod(_iterator_, *"return"*). 1. If _return_ is *undefined*, then 1. Let _receivedValue_ be _received_.[[Value]]. - 1. If _generatorKind_ is ~async~, then + 1. If _genKind_ is ~async~, then 1. Set _receivedValue_ to ? Await(_receivedValue_). 1. Return ReturnCompletion(_receivedValue_). 1. Let _innerReturnResult_ be ? Call(_return_, _iterator_, « _received_.[[Value]] »). - 1. If _generatorKind_ is ~async~, set _innerReturnResult_ to ? Await(_innerReturnResult_). + 1. If _genKind_ is ~async~, set _innerReturnResult_ to ? Await(_innerReturnResult_). 1. If _innerReturnResult_ is not an Object, throw a *TypeError* exception. 1. Let _done_ be ? IteratorComplete(_innerReturnResult_). 1. If _done_ is *true*, then 1. Let _returnedValue_ be ? IteratorValue(_innerReturnResult_). 1. Return ReturnCompletion(_returnedValue_). - 1. If _generatorKind_ is ~async~, set _received_ to Completion(AsyncGeneratorYield(? IteratorValue(_innerReturnResult_))). + 1. If _genKind_ is ~async~, set _received_ to Completion(AsyncGeneratorYield(? IteratorValue(_innerReturnResult_))). 1. Else, set _received_ to Completion(GeneratorYield(_innerReturnResult_)).
@@ -24439,8 +24436,8 @@

Static Semantics: Early Errors

Runtime Semantics: EvaluateAsyncGeneratorBody ( - _functionObject_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _funcObj_: an ECMAScript function object, + _argList_: a List of ECMAScript language values, ): a throw completion or a return completion

@@ -24449,19 +24446,19 @@

AsyncGeneratorBody : FunctionBody - 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_). - 1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorPrototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »). - 1. Set _generator_.[[GeneratorBrand]] to ~empty~. - 1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-start~. - 1. Perform AsyncGeneratorStart(_generator_, |FunctionBody|). - 1. Return ReturnCompletion(_generator_). + 1. Perform ? FunctionDeclarationInstantiation(_funcObj_, _argList_). + 1. Let _gen_ be ? OrdinaryCreateFromConstructor(_funcObj_, *"%AsyncGeneratorPrototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »). + 1. Set _gen_.[[GeneratorBrand]] to ~empty~. + 1. Set _gen_.[[AsyncGeneratorState]] to ~suspended-start~. + 1. Perform AsyncGeneratorStart(_gen_, |FunctionBody|). + 1. Return ReturnCompletion(_gen_).

Runtime Semantics: InstantiateAsyncGeneratorFunctionObject ( - _env_: an Environment Record, + _envRecord_: an Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, ): an ECMAScript function object

@@ -24473,10 +24470,10 @@

1. Let _name_ be the StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). - 1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return _closure_. @@ -24484,10 +24481,10 @@

1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, *"default"*). - 1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return _closure_. @@ -24508,13 +24505,13 @@

1. If _name_ is not present, set _name_ to the empty String. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). - 1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return _closure_. @@ -24530,8 +24527,8 @@

1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|. 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). - 1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _proto_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _proto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform ! _funcEnv_.InitializeBinding(_name_, _closure_). 1. Return _closure_. @@ -24610,9 +24607,9 @@

Static Semantics: Early Errors

  • It is a Syntax Error if |ClassHeritage| is not present and the following algorithm returns *true*:

    - 1. Let _constructor_ be the ConstructorMethod of |ClassBody|. - 1. If _constructor_ is ~empty~, return *false*. - 1. Return HasDirectSuper of _constructor_. + 1. Let _ctor_ be the ConstructorMethod of |ClassBody|. + 1. If _ctor_ is ~empty~, return *false*. + 1. Return HasDirectSuper of _ctor_.
  • @@ -24803,18 +24800,18 @@

    Static Semantics: PrototypePropertyNameList ( ): a List of property keys

    ClassElementList : ClassElement - 1. Let _propName_ be the PropName of |ClassElement|. - 1. If _propName_ is ~empty~, return a new empty List. + 1. Let _propertyName_ be the PropName of |ClassElement|. + 1. If _propertyName_ is ~empty~, return a new empty List. 1. If IsStatic of |ClassElement| is *true*, return a new empty List. - 1. Return « _propName_ ». + 1. Return « _propertyName_ ». ClassElementList : ClassElementList ClassElement 1. Let _list_ be the PrototypePropertyNameList of |ClassElementList|. - 1. Let _propName_ be the PropName of |ClassElement|. - 1. If _propName_ is ~empty~, return _list_. + 1. Let _propertyName_ be the PropName of |ClassElement|. + 1. If _propertyName_ is ~empty~, return _list_. 1. If IsStatic of |ClassElement| is *true*, return _list_. - 1. Return the list-concatenation of _list_ and « _propName_ ». + 1. Return the list-concatenation of _list_ and « _propertyName_ ». @@ -25011,7 +25008,7 @@

    Static Semantics: ContainsArguments ( ): a Boolean

    Runtime Semantics: ClassFieldDefinitionEvaluation ( - _homeObject_: an Object, + _homeObj_: an Object, ): either a normal completion containing a ClassFieldDefinition Record or an abrupt completion

    @@ -25022,12 +25019,12 @@

    1. Let _name_ be ? Evaluation of |ClassElementName|. 1. If |Initializer| is present, then - 1. Let _formalParameterList_ be an instance of the production FormalParameters : [empty]. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _formalParamList_ be an instance of the production FormalParameters : [empty]. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the empty sequence of Unicode code points. - 1. Let _initializer_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameterList_, |Initializer|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform MakeMethod(_initializer_, _homeObject_). + 1. Let _initializer_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParamList_, |Initializer|, ~non-lexical-this~, _envRecord_, _privateEnv_). + 1. Perform MakeMethod(_initializer_, _homeObj_). 1. Set _initializer_.[[ClassFieldInitializerName]] to _name_. 1. Else, 1. Let _initializer_ be ~empty~. @@ -25041,36 +25038,36 @@

    Runtime Semantics: ClassStaticBlockDefinitionEvaluation ( - _homeObject_: an Object, + _homeObj_: an Object, ): a ClassStaticBlockDefinition Record

    ClassStaticBlock : `static` `{` ClassStaticBlockBody `}` - 1. Let _lex_ be the running execution context's LexicalEnvironment. + 1. Let _lexical_ be the running execution context's LexicalEnvironment. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the empty sequence of Unicode code points. - 1. Let _formalParameters_ be an instance of the production FormalParameters : [empty]. - 1. [id="step-synthetic-class-static-block-fn"] Let _bodyFunction_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameters_, |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateEnv_). - 1. Perform MakeMethod(_bodyFunction_, _homeObject_). - 1. Return the ClassStaticBlockDefinition Record { [[BodyFunction]]: _bodyFunction_ }. + 1. Let _formalParams_ be an instance of the production FormalParameters : [empty]. + 1. [id="step-synthetic-class-static-block-fn"] Let _bodyFunc_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParams_, |ClassStaticBlockBody|, ~non-lexical-this~, _lexical_, _privateEnv_). + 1. Perform MakeMethod(_bodyFunc_, _homeObj_). + 1. Return the ClassStaticBlockDefinition Record { [[BodyFunction]]: _bodyFunc_ }. - The function _bodyFunction_ is never directly accessible to ECMAScript code. + The function _bodyFunc_ is never directly accessible to ECMAScript code.

    Runtime Semantics: EvaluateClassStaticBlockBody ( - _functionObject_: an ECMAScript function object, + _funcObj_: an ECMAScript function object, ): a return completion or a throw completion

    ClassStaticBlockBody : ClassStaticBlockStatementList - 1. Assert: _functionObject_ is a synthetic function created by ClassStaticBlockDefinitionEvaluation step . - 1. Perform ! FunctionDeclarationInstantiation(_functionObject_, « »). + 1. Assert: _funcObj_ is a synthetic function created by ClassStaticBlockDefinitionEvaluation step . + 1. Perform ! FunctionDeclarationInstantiation(_funcObj_, « »). 1. Perform ? Evaluation of |ClassStaticBlockStatementList|. 1. Return ReturnCompletion(*undefined*). @@ -25079,7 +25076,7 @@

    Runtime Semantics: ClassElementEvaluation ( - _object_: an Object, + _obj_: an Object, ): either a normal completion containing either a ClassFieldDefinition Record, a ClassStaticBlockDefinition Record, a PrivateElement, or ~unused~, or an abrupt completion

    @@ -25091,7 +25088,7 @@

    `static` FieldDefinition `;` - 1. Return ? ClassFieldDefinitionEvaluation of |FieldDefinition| with argument _object_. + 1. Return ? ClassFieldDefinitionEvaluation of |FieldDefinition| with argument _obj_. @@ -25100,12 +25097,12 @@

    `static` MethodDefinition - 1. Return ? MethodDefinitionEvaluation of |MethodDefinition| with arguments _object_ and *false*. + 1. Return ? MethodDefinitionEvaluation of |MethodDefinition| with arguments _obj_ and *false*. ClassElement : ClassStaticBlock - 1. Return the ClassStaticBlockDefinitionEvaluation of |ClassStaticBlock| with argument _object_. + 1. Return the ClassStaticBlockDefinitionEvaluation of |ClassStaticBlock| with argument _obj_. @@ -25133,86 +25130,86 @@

    ClassTail : ClassHeritage? `{` ClassBody? `}` - 1. Let _env_ be the LexicalEnvironment of the running execution context. - 1. Let _classEnv_ be NewDeclarativeEnvironment(_env_). + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. + 1. Let _classEnv_ be NewDeclarativeEnvironment(_envRecord_). 1. If _classBinding_ is not *undefined*, then 1. Perform ! _classEnv_.CreateImmutableBinding(_classBinding_, *true*). - 1. Let _outerPrivateEnvironment_ be the running execution context's PrivateEnvironment. - 1. Let _classPrivateEnvironment_ be NewPrivateEnvironment(_outerPrivateEnvironment_). + 1. Let _outerPrivateEnv_ be the running execution context's PrivateEnvironment. + 1. Let _classPrivateEnv_ be NewPrivateEnvironment(_outerPrivateEnv_). 1. If |ClassBody| is present, then 1. For each String _dn_ of the PrivateBoundIdentifiers of |ClassBody|, do - 1. If _classPrivateEnvironment_.[[Names]] contains a Private Name _pn_ such that _pn_.[[Description]] is _dn_, then + 1. If _classPrivateEnv_.[[Names]] contains a Private Name _privateName_ such that _privateName_.[[Description]] is _dn_, then 1. Assert: This is only possible for getter/setter pairs. 1. Else, 1. Let _name_ be a new Private Name whose [[Description]] is _dn_. - 1. Append _name_ to _classPrivateEnvironment_.[[Names]]. + 1. Append _name_ to _classPrivateEnv_.[[Names]]. 1. If |ClassHeritage| is not present, then 1. Let _protoParent_ be %Object.prototype%. - 1. Let _constructorParent_ be %Function.prototype%. + 1. Let _ctorParent_ be %Function.prototype%. 1. Else, 1. Set the running execution context's LexicalEnvironment to _classEnv_. - 1. NOTE: The running execution context's PrivateEnvironment is _outerPrivateEnvironment_ when evaluating |ClassHeritage|. + 1. NOTE: The running execution context's PrivateEnvironment is _outerPrivateEnv_ when evaluating |ClassHeritage|. 1. Let _superclassRef_ be Completion(Evaluation of |ClassHeritage|). - 1. Set the running execution context's LexicalEnvironment to _env_. + 1. Set the running execution context's LexicalEnvironment to _envRecord_. 1. Let _superclass_ be ? GetValue(? _superclassRef_). 1. If _superclass_ is *null*, then 1. Let _protoParent_ be *null*. - 1. Let _constructorParent_ be %Function.prototype%. + 1. Let _ctorParent_ be %Function.prototype%. 1. Else if IsConstructor(_superclass_) is *false*, then 1. Throw a *TypeError* exception. 1. Else, 1. Let _protoParent_ be ? Get(_superclass_, *"prototype"*). 1. If _protoParent_ is not an Object and _protoParent_ is not *null*, throw a *TypeError* exception. - 1. Let _constructorParent_ be _superclass_. + 1. Let _ctorParent_ be _superclass_. 1. Let _proto_ be OrdinaryObjectCreate(_protoParent_). - 1. If |ClassBody| is not present, let _constructor_ be ~empty~. - 1. Else, let _constructor_ be the ConstructorMethod of |ClassBody|. + 1. If |ClassBody| is not present, let _ctor_ be ~empty~. + 1. Else, let _ctor_ be the ConstructorMethod of |ClassBody|. 1. Set the running execution context's LexicalEnvironment to _classEnv_. - 1. Set the running execution context's PrivateEnvironment to _classPrivateEnvironment_. - 1. If _constructor_ is ~empty~, then - 1. Let _defaultConstructor_ be a new Abstract Closure with no parameters that captures nothing and performs the following steps when called: + 1. Set the running execution context's PrivateEnvironment to _classPrivateEnv_. + 1. If _ctor_ is ~empty~, then + 1. Let _defaultCtor_ be a new Abstract Closure with no parameters that captures nothing and performs the following steps when called: 1. Let _args_ be the List of arguments that was passed to this function by [[Call]] or [[Construct]]. 1. If NewTarget is *undefined*, throw a *TypeError* exception. - 1. Let _constructorFunction_ be the active function object. - 1. If _constructorFunction_.[[ConstructorKind]] is ~derived~, then + 1. Let _ctorFunc_ be the active function object. + 1. If _ctorFunc_.[[ConstructorKind]] is ~derived~, then 1. NOTE: This branch behaves similarly to `constructor(...args) { super(...args); }`. The most notable distinction is that while the aforementioned ECMAScript source text observably calls the %Symbol.iterator% method on `%Array.prototype%`, this function does not. - 1. Let _func_ be ! _constructorFunction_.[[GetPrototypeOf]](). + 1. Let _func_ be ! _ctorFunc_.[[GetPrototypeOf]](). 1. If IsConstructor(_func_) is *false*, throw a *TypeError* exception. 1. Let _result_ be ? Construct(_func_, _args_, NewTarget). 1. Else, 1. NOTE: This branch behaves similarly to `constructor() {}`. 1. Let _result_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Object.prototype%"*). - 1. Perform ? InitializeInstanceElements(_result_, _constructorFunction_). + 1. Perform ? InitializeInstanceElements(_result_, _ctorFunc_). 1. Return NormalCompletion(_result_). - 1. Let _constructorFunction_ be CreateBuiltinFunction(_defaultConstructor_, 0, _className_, « [[ConstructorKind]], [[SourceText]], [[PrivateMethods]], [[Fields]] », the current Realm Record, _constructorParent_). + 1. Let _ctorFunc_ be CreateBuiltinFunction(_defaultCtor_, 0, _className_, « [[ConstructorKind]], [[SourceText]], [[PrivateMethods]], [[Fields]] », the current Realm Record, _ctorParent_). 1. Else, - 1. Let _constructorInfo_ be ! DefineMethod of _constructor_ with arguments _proto_ and _constructorParent_. - 1. Let _constructorFunction_ be _constructorInfo_.[[Closure]]. - 1. Perform MakeClassConstructor(_constructorFunction_). - 1. Perform SetFunctionName(_constructorFunction_, _className_). - 1. Set _constructorFunction_.[[SourceText]] to _sourceText_. - 1. Perform MakeConstructor(_constructorFunction_, *false*, _proto_). - 1. If |ClassHeritage| is present, set _constructorFunction_.[[ConstructorKind]] to ~derived~. - 1. Perform ! DefineMethodProperty(_proto_, *"constructor"*, _constructorFunction_, *false*). - 1. If |ClassBody| is not present, let _elements_ be a new empty List. - 1. Else, let _elements_ be the NonConstructorElements of |ClassBody|. + 1. Let _ctorInfo_ be ! DefineMethod of _ctor_ with arguments _proto_ and _ctorParent_. + 1. Let _ctorFunc_ be _ctorInfo_.[[Closure]]. + 1. Perform MakeClassConstructor(_ctorFunc_). + 1. Perform SetFunctionName(_ctorFunc_, _className_). + 1. Set _ctorFunc_.[[SourceText]] to _sourceText_. + 1. Perform MakeConstructor(_ctorFunc_, *false*, _proto_). + 1. If |ClassHeritage| is present, set _ctorFunc_.[[ConstructorKind]] to ~derived~. + 1. Perform ! DefineMethodProperty(_proto_, *"constructor"*, _ctorFunc_, *false*). + 1. If |ClassBody| is not present, let _classElements_ be a new empty List. + 1. Else, let _classElements_ be the NonConstructorElements of |ClassBody|. 1. Let _instancePrivateMethods_ be a new empty List. 1. Let _staticPrivateMethods_ be a new empty List. 1. Let _instanceFields_ be a new empty List. 1. Let _staticElements_ be a new empty List. - 1. For each |ClassElement| _e_ of _elements_, do - 1. If IsStatic of _e_ is *false*, then - 1. Let _element_ be Completion(ClassElementEvaluation of _e_ with argument _proto_). + 1. For each |ClassElement| _classElement_ of _classElements_, do + 1. If IsStatic of _classElement_ is *false*, then + 1. Let _element_ be Completion(ClassElementEvaluation of _classElement_ with argument _proto_). 1. Else, - 1. Let _element_ be Completion(ClassElementEvaluation of _e_ with argument _constructorFunction_). + 1. Let _element_ be Completion(ClassElementEvaluation of _classElement_ with argument _ctorFunc_). 1. If _element_ is an abrupt completion, then - 1. Set the running execution context's LexicalEnvironment to _env_. - 1. Set the running execution context's PrivateEnvironment to _outerPrivateEnvironment_. + 1. Set the running execution context's LexicalEnvironment to _envRecord_. + 1. Set the running execution context's PrivateEnvironment to _outerPrivateEnv_. 1. Return ? _element_. 1. Set _element_ to ! _element_. 1. If _element_ is a PrivateElement, then 1. Assert: _element_.[[Kind]] is either ~method~ or ~accessor~. - 1. If IsStatic of _e_ is *false*, let _container_ be _instancePrivateMethods_. + 1. If IsStatic of _classElement_ is *false*, let _container_ be _instancePrivateMethods_. 1. Else, let _container_ be _staticPrivateMethods_. 1. If _container_ contains a PrivateElement _pe_ such that _pe_.[[Key]] is _element_.[[Key]], then 1. Assert: _element_.[[Kind]] and _pe_.[[Kind]] are both ~accessor~. @@ -25224,28 +25221,28 @@

    1. Else, 1. Append _element_ to _container_. 1. Else if _element_ is a ClassFieldDefinition Record, then - 1. If IsStatic of _e_ is *false*, append _element_ to _instanceFields_. + 1. If IsStatic of _classElement_ is *false*, append _element_ to _instanceFields_. 1. Else, append _element_ to _staticElements_. 1. Else if _element_ is a ClassStaticBlockDefinition Record, then 1. Append _element_ to _staticElements_. - 1. Set the running execution context's LexicalEnvironment to _env_. + 1. Set the running execution context's LexicalEnvironment to _envRecord_. 1. If _classBinding_ is not *undefined*, then - 1. Perform ! _classEnv_.InitializeBinding(_classBinding_, _constructorFunction_). - 1. Set _constructorFunction_.[[PrivateMethods]] to _instancePrivateMethods_. - 1. Set _constructorFunction_.[[Fields]] to _instanceFields_. + 1. Perform ! _classEnv_.InitializeBinding(_classBinding_, _ctorFunc_). + 1. Set _ctorFunc_.[[PrivateMethods]] to _instancePrivateMethods_. + 1. Set _ctorFunc_.[[Fields]] to _instanceFields_. 1. For each PrivateElement _method_ of _staticPrivateMethods_, do - 1. Perform ! PrivateMethodOrAccessorAdd(_constructorFunction_, _method_). + 1. Perform ! PrivateMethodOrAccessorAdd(_ctorFunc_, _method_). 1. For each element _elementRecord_ of _staticElements_, do 1. If _elementRecord_ is a ClassFieldDefinition Record, then - 1. Let _result_ be Completion(DefineField(_constructorFunction_, _elementRecord_)). + 1. Let _result_ be Completion(DefineField(_ctorFunc_, _elementRecord_)). 1. Else, 1. Assert: _elementRecord_ is a ClassStaticBlockDefinition Record. - 1. Let _result_ be Completion(Call(_elementRecord_.[[BodyFunction]], _constructorFunction_)). + 1. Let _result_ be Completion(Call(_elementRecord_.[[BodyFunction]], _ctorFunc_)). 1. If _result_ is an abrupt completion, then - 1. Set the running execution context's PrivateEnvironment to _outerPrivateEnvironment_. + 1. Set the running execution context's PrivateEnvironment to _outerPrivateEnv_. 1. Return ? _result_. - 1. Set the running execution context's PrivateEnvironment to _outerPrivateEnvironment_. - 1. Return _constructorFunction_. + 1. Set the running execution context's PrivateEnvironment to _outerPrivateEnv_. + 1. Return _ctorFunc_. @@ -25258,8 +25255,8 @@

    Runtime Semantics: BindingClassDeclarationEvaluation ( ): either a normal co 1. Let _className_ be the StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |ClassDeclaration|. 1. Let _value_ be ? ClassDefinitionEvaluation of |ClassTail| with arguments _className_, _className_, and _sourceText_. - 1. Let _env_ be the running execution context's LexicalEnvironment. - 1. Perform ? InitializeBoundName(_className_, _value_, _env_). + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. + 1. Perform ? InitializeBoundName(_className_, _value_, _envRecord_). 1. Return _value_. ClassDeclaration : `class` ClassTail @@ -25296,8 +25293,8 @@

    Runtime Semantics: Evaluation

    ClassElementName : PrivateIdentifier 1. Let _privateIdentifier_ be the StringValue of |PrivateIdentifier|. - 1. Let _privateEnvRec_ be the running execution context's PrivateEnvironment. - 1. Let _names_ be _privateEnvRec_.[[Names]]. + 1. Let _privateEnvRecord_ be the running execution context's PrivateEnvironment. + 1. Let _names_ be _privateEnvRecord_.[[Names]]. 1. Assert: Exactly one element of _names_ is a Private Name whose [[Description]] is _privateIdentifier_. 1. Let _privateName_ be the Private Name in _names_ whose [[Description]] is _privateIdentifier_. 1. Return _privateName_. @@ -25383,7 +25380,7 @@

    Static Semantics: Early Errors

    Runtime Semantics: InstantiateAsyncFunctionObject ( - _env_: an Environment Record, + _envRecord_: an Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, ): an ECMAScript function object

    @@ -25395,7 +25392,7 @@

    1. Let _name_ be the StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |AsyncFunctionDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. @@ -25404,7 +25401,7 @@

    1. Let _sourceText_ be the source text matched by |AsyncFunctionDeclaration|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, *"default"*). 1. Return _closure_. @@ -25423,10 +25420,10 @@

    1. If _name_ is not present, set _name_ to the empty String. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncFunctionExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. @@ -25454,8 +25451,8 @@

    Runtime Semantics: EvaluateAsyncFunctionBody ( - _functionObject_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _funcObj_: an ECMAScript function object, + _argList_: a List of ECMAScript language values, ): a return completion

    @@ -25465,7 +25462,7 @@

    1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _completion_ be Completion(FunctionDeclarationInstantiation(_functionObject_, _argumentsList_)). + 1. Let _completion_ be Completion(FunctionDeclarationInstantiation(_funcObj_, _argList_)). 1. If _completion_ is an abrupt completion, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _completion_.[[Value]] »). 1. Else, @@ -25561,8 +25558,8 @@

    Static Semantics: AsyncConciseBodyContainsUseStrict ( ): a Boolean

    Runtime Semantics: EvaluateAsyncConciseBody ( - _functionObject_: an ECMAScript function object, - _argumentsList_: a List of ECMAScript language values, + _funcObj_: an ECMAScript function object, + _argList_: a List of ECMAScript language values, ): a return completion

    @@ -25572,7 +25569,7 @@

    1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _completion_ be Completion(FunctionDeclarationInstantiation(_functionObject_, _argumentsList_)). + 1. Let _completion_ be Completion(FunctionDeclarationInstantiation(_funcObj_, _argList_)). 1. If _completion_ is an abrupt completion, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _completion_.[[Value]] »). 1. Else, @@ -25594,11 +25591,11 @@

    1. If _name_ is not present, set _name_ to the empty String. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncArrowFunction|. - 1. Let _parameters_ be |AsyncArrowBindingIdentifier|. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _parameters_, |AsyncConciseBody|, ~lexical-this~, _env_, _privateEnv_). + 1. Let _params_ be |AsyncArrowBindingIdentifier|. + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _params_, |AsyncConciseBody|, ~lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. @@ -25607,12 +25604,12 @@

    1. If _name_ is not present, set _name_ to the empty String. - 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _envRecord_ be the LexicalEnvironment of the running execution context. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncArrowFunction|. 1. Let _head_ be the |AsyncArrowHead| that is covered by |CoverCallExpressionAndAsyncArrowHead|. - 1. Let _parameters_ be the |ArrowFormalParameters| of _head_. - 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _parameters_, |AsyncConciseBody|, ~lexical-this~, _env_, _privateEnv_). + 1. Let _params_ be the |ArrowFormalParameters| of _head_. + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _params_, |AsyncConciseBody|, ~lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. @@ -26187,10 +26184,10 @@

    1. Set the PrivateEnvironment of _scriptContext_ to *null*. 1. Suspend the running execution context. 1. Push _scriptContext_ onto the execution context stack; _scriptContext_ is now the running execution context. - 1. Let _script_ be _scriptRecord_.[[ECMAScriptCode]]. - 1. Let _result_ be Completion(GlobalDeclarationInstantiation(_script_, _globalEnv_)). + 1. Let _scriptNode_ be _scriptRecord_.[[ECMAScriptCode]]. + 1. Let _result_ be Completion(GlobalDeclarationInstantiation(_scriptNode_, _globalEnv_)). 1. If _result_ is a normal completion, then - 1. Set _result_ to Completion(Evaluation of _script_). + 1. Set _result_ to Completion(Evaluation of _scriptNode_). 1. If _result_ is a normal completion and _result_.[[Value]] is ~empty~, then 1. Set _result_ to NormalCompletion(*undefined*). 1. Suspend _scriptContext_ and remove it from the execution context stack. @@ -26204,85 +26201,85 @@

    GlobalDeclarationInstantiation ( _script_: a |Script| Parse Node, - _env_: a Global Environment Record, + _envRecord_: a Global Environment Record, ): either a normal completion containing ~unused~ or a throw completion

    description
    -
    _script_ is the |Script| for which the execution context is being established. _env_ is the global environment in which bindings are to be created.
    +
    _script_ is the |Script| for which the execution context is being established. _envRecord_ is the global environment in which bindings are to be created.

    When an execution context is established for evaluating scripts, declarations are instantiated in the current global environment. Each global binding declared in the code is instantiated.

    It performs the following steps when called:

    - 1. Let _lexNames_ be the LexicallyDeclaredNames of _script_. - 1. Let _varNames_ be the VarDeclaredNames of _script_. - 1. For each element _name_ of _lexNames_, do - 1. If HasLexicalDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception. - 1. Let _hasRestrictedGlobal_ be ? HasRestrictedGlobalProperty(_env_, _name_). + 1. Let _lexicalNames_ be the LexicallyDeclaredNames of _script_. + 1. Let _variableNames_ be the VarDeclaredNames of _script_. + 1. For each element _name_ of _lexicalNames_, do + 1. If HasLexicalDeclaration(_envRecord_, _name_) is *true*, throw a *SyntaxError* exception. + 1. Let _hasRestrictedGlobal_ be ? HasRestrictedGlobalProperty(_envRecord_, _name_). 1. NOTE: Global `var` and `function` bindings (except those that are introduced by non-strict direct eval) are non-configurable and are therefore restricted global properties. 1. If _hasRestrictedGlobal_ is *true*, throw a *SyntaxError* exception. - 1. For each element _name_ of _varNames_, do - 1. If HasLexicalDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception. - 1. Let _varDeclarations_ be the VarScopedDeclarations of _script_. - 1. Let _functionsToInitialize_ be a new empty List. - 1. Let _declaredFunctionNames_ be a new empty List. - 1. For each element _varDecl_ of _varDeclarations_, in reverse List order, do - 1. If _varDecl_ is not either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then - 1. Assert: _varDecl_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|. + 1. For each element _name_ of _variableNames_, do + 1. If HasLexicalDeclaration(_envRecord_, _name_) is *true*, throw a *SyntaxError* exception. + 1. Let _variableDeclarations_ be the VarScopedDeclarations of _script_. + 1. Let _funcsToInitialize_ be a new empty List. + 1. Let _declaredFuncNames_ be a new empty List. + 1. For each element _variableDeclaration_ of _variableDeclarations_, in reverse List order, do + 1. If _variableDeclaration_ is not either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then + 1. Assert: _variableDeclaration_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|. 1. NOTE: If there are multiple function declarations for the same name, the last declaration is used. - 1. Let _fn_ be the sole element of the BoundNames of _varDecl_. - 1. If _declaredFunctionNames_ does not contain _fn_, then - 1. Let _fnDefinable_ be ? CanDeclareGlobalFunction(_env_, _fn_). - 1. If _fnDefinable_ is *false*, throw a *TypeError* exception. - 1. Append _fn_ to _declaredFunctionNames_. - 1. Insert _varDecl_ as the first element of _functionsToInitialize_. - 1. Let _declaredVarNames_ be a new empty List. - 1. For each element _varDecl_ of _varDeclarations_, do - 1. If _varDecl_ is either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then - 1. For each String _vn_ of the BoundNames of _varDecl_, do - 1. If _declaredFunctionNames_ does not contain _vn_, then - 1. Let _vnDefinable_ be ? CanDeclareGlobalVar(_env_, _vn_). + 1. Let _func_ be the sole element of the BoundNames of _variableDeclaration_. + 1. If _declaredFuncNames_ does not contain _func_, then + 1. Let _funcDefinable_ be ? CanDeclareGlobalFunction(_envRecord_, _func_). + 1. If _funcDefinable_ is *false*, throw a *TypeError* exception. + 1. Append _func_ to _declaredFuncNames_. + 1. Insert _variableDeclaration_ as the first element of _funcsToInitialize_. + 1. Let _declaredVariableNames_ be a new empty List. + 1. For each element _variableDeclaration_ of _variableDeclarations_, do + 1. If _variableDeclaration_ is either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then + 1. For each String _vn_ of the BoundNames of _variableDeclaration_, do + 1. If _declaredFuncNames_ does not contain _vn_, then + 1. Let _vnDefinable_ be ? CanDeclareGlobalVar(_envRecord_, _vn_). 1. If _vnDefinable_ is *false*, throw a *TypeError* exception. - 1. If _declaredVarNames_ does not contain _vn_, then - 1. Append _vn_ to _declaredVarNames_. + 1. If _declaredVariableNames_ does not contain _vn_, then + 1. Append _vn_ to _declaredVariableNames_. 1. NOTE: No abnormal terminations occur after this algorithm step if the global object is an ordinary object. However, if the global object is a Proxy exotic object it may exhibit behaviours that cause abnormal terminations in some of the following steps. 1. [id="step-globaldeclarationinstantiation-web-compat-insertion-point", normative-optional] If the host is a web browser or otherwise supports , then 1. Let _strict_ be ScriptIsStrict of _script_. 1. If _strict_ is *false*, then - 1. Let _declaredFunctionOrVarNames_ be the list-concatenation of _declaredFunctionNames_ and _declaredVarNames_. + 1. Let _declaredFuncOrVariableNames_ be the list-concatenation of _declaredFuncNames_ and _declaredVariableNames_. 1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _script_ Contains _x_ is *true*, do 1. Let _funcName_ be the StringValue of the |BindingIdentifier| of _f_. 1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _funcName_ as a |BindingIdentifier| would not produce any Early Errors for _script_, then - 1. If HasLexicalDeclaration(_env_, _funcName_) is *false*, then - 1. Let _fnDefinable_ be ? CanDeclareGlobalVar(_env_, _funcName_). - 1. If _fnDefinable_ is *true*, then + 1. If HasLexicalDeclaration(_envRecord_, _funcName_) is *false*, then + 1. Let _funcDefinable_ be ? CanDeclareGlobalVar(_envRecord_, _funcName_). + 1. If _funcDefinable_ is *true*, then 1. NOTE: A var binding for _funcName_ is only instantiated here if it is neither a VarDeclaredName nor the name of another |FunctionDeclaration|. - 1. If _declaredFunctionOrVarNames_ does not contain _funcName_, then - 1. Perform ? CreateGlobalVarBinding(_env_, _funcName_, *false*). - 1. Append _funcName_ to _declaredFunctionOrVarNames_. + 1. If _declaredFuncOrVariableNames_ does not contain _funcName_, then + 1. Perform ? CreateGlobalVarBinding(_envRecord_, _funcName_, *false*). + 1. Append _funcName_ to _declaredFuncOrVariableNames_. 1. [id="step-globaldeclarationinstantiation-alt-funcdecl-eval"] When the |FunctionDeclaration| _f_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in : 1. Let _gEnv_ be the running execution context's VariableEnvironment. 1. Let _bEnv_ be the running execution context's LexicalEnvironment. 1. Let _fObj_ be ! _bEnv_.GetBindingValue(_funcName_, *false*). 1. Perform ? _gEnv_.SetMutableBinding(_funcName_, _fObj_, *false*). 1. Return ~unused~. - 1. Let _lexDeclarations_ be the LexicallyScopedDeclarations of _script_. + 1. Let _lexicalDeclarations_ be the LexicallyScopedDeclarations of _script_. 1. Let _privateEnv_ be *null*. - 1. For each element _lexDecl_ of _lexDeclarations_, do + 1. For each element _lexicalDeclaration_ of _lexicalDeclarations_, do 1. NOTE: Lexically declared names are only instantiated here but not initialized. - 1. For each element _dn_ of the BoundNames of _lexDecl_, do - 1. If IsConstantDeclaration of _lexDecl_ is *true*, then - 1. Perform ? _env_.CreateImmutableBinding(_dn_, *true*). + 1. For each element _dn_ of the BoundNames of _lexicalDeclaration_, do + 1. If IsConstantDeclaration of _lexicalDeclaration_ is *true*, then + 1. Perform ? _envRecord_.CreateImmutableBinding(_dn_, *true*). 1. Else, - 1. Perform ? _env_.CreateMutableBinding(_dn_, *false*). - 1. For each Parse Node _f_ of _functionsToInitialize_, do - 1. Let _fn_ be the sole element of the BoundNames of _f_. - 1. Let _fo_ be InstantiateFunctionObject of _f_ with arguments _env_ and _privateEnv_. - 1. Perform ? CreateGlobalFunctionBinding(_env_, _fn_, _fo_, *false*). - 1. For each String _vn_ of _declaredVarNames_, do - 1. Perform ? CreateGlobalVarBinding(_env_, _vn_, *false*). + 1. Perform ? _envRecord_.CreateMutableBinding(_dn_, *false*). + 1. For each Parse Node _f_ of _funcsToInitialize_, do + 1. Let _func_ be the sole element of the BoundNames of _f_. + 1. Let _funcObj_ be InstantiateFunctionObject of _f_ with arguments _envRecord_ and _privateEnv_. + 1. Perform ? CreateGlobalFunctionBinding(_envRecord_, _func_, _funcObj_, *false*). + 1. For each String _vn_ of _declaredVariableNames_, do + 1. Perform ? CreateGlobalVarBinding(_envRecord_, _vn_, *false*). 1. Return ~unused~. @@ -26515,8 +26512,8 @@

    ModuleRequest Records

    ModuleRequestsEqual ( - _left_: a ModuleRequest Record or a LoadedModuleRequest Record, - _right_: a ModuleRequest Record or a LoadedModuleRequest Record, + _x_: a ModuleRequest Record or a LoadedModuleRequest Record, + _y_: a ModuleRequest Record or a LoadedModuleRequest Record, ): a Boolean

    @@ -26525,14 +26522,14 @@

    - 1. If _left_.[[Specifier]] is not _right_.[[Specifier]], return *false*. - 1. Let _leftAttrs_ be _left_.[[Attributes]]. - 1. Let _rightAttrs_ be _right_.[[Attributes]]. - 1. Let _leftAttrsCount_ be the number of elements in _leftAttrs_. - 1. Let _rightAttrsCount_ be the number of elements in _rightAttrs_. - 1. If _leftAttrsCount_ ≠ _rightAttrsCount_, return *false*. - 1. For each ImportAttribute Record _l_ of _leftAttrs_, do - 1. If _rightAttrs_ does not contain an ImportAttribute Record _r_ such that _l_.[[Key]] is _r_.[[Key]] and _l_.[[Value]] is _r_.[[Value]], return *false*. + 1. If _x_.[[Specifier]] is not _y_.[[Specifier]], return *false*. + 1. Let _xAttrs_ be _x_.[[Attributes]]. + 1. Let _yAttrs_ be _y_.[[Attributes]]. + 1. Let _xAttrsCount_ be the number of elements in _xAttrs_. + 1. Let _yAttrsCount_ be the number of elements in _yAttrs_. + 1. If _xAttrsCount_ ≠ _yAttrsCount_, return *false*. + 1. For each ImportAttribute Record _xAttr_ of _xAttrs_, do + 1. If _yAttrs_ does not contain an ImportAttribute Record _yAttr_ such that _xAttr_.[[Key]] is _yAttr_.[[Key]] and _xAttr_.[[Value]] is _yAttr_.[[Value]], return *false*. 1. Return *true*.
    @@ -26571,8 +26568,8 @@

    Static Semantics: ModuleRequests ( ): a List of ModuleRequest Records

    ImportDeclaration : `import` ImportClause FromClause WithClause `;` 1. Let _specifier_ be the SV of |FromClause|. - 1. Let _attributes_ be WithClauseToAttributes of |WithClause|. - 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Attributes]]: _attributes_ }. + 1. Let _attrs_ be WithClauseToAttributes of |WithClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Attributes]]: _attrs_ }. ImportDeclaration : `import` ModuleSpecifier `;` @@ -26582,8 +26579,8 @@

    Static Semantics: ModuleRequests ( ): a List of ModuleRequest Records

    ImportDeclaration : `import` ModuleSpecifier WithClause `;` 1. Let _specifier_ be the SV of |ModuleSpecifier|. - 1. Let _attributes_ be WithClauseToAttributes of |WithClause|. - 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Attributes]]: _attributes_ }. + 1. Let _attrs_ be WithClauseToAttributes of |WithClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Attributes]]: _attrs_ }. ExportDeclaration : `export` ExportFromClause FromClause `;` @@ -26597,8 +26594,8 @@

    Static Semantics: ModuleRequests ( ): a List of ModuleRequest Records

    1. Let _specifier_ be the SV of |FromClause|. - 1. Let _attributes_ be WithClauseToAttributes of |WithClause|. - 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Attributes]]: _attributes_ }. + 1. Let _attrs_ be WithClauseToAttributes of |WithClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Attributes]]: _attrs_ }. ExportDeclaration : @@ -27070,10 +27067,10 @@

    1. If _hostDefined_ is not present, set _hostDefined_ to ~empty~. - 1. Let _pc_ be ! NewPromiseCapability(%Promise%). - 1. Let _state_ be the GraphLoadingState Record { [[IsLoading]]: *true*, [[PendingModulesCount]]: 1, [[Visited]]: « », [[PromiseCapability]]: _pc_, [[HostDefined]]: _hostDefined_ }. + 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). + 1. Let _state_ be the GraphLoadingState Record { [[IsLoading]]: *true*, [[PendingModulesCount]]: 1, [[Visited]]: « », [[PromiseCapability]]: _promiseCapability_, [[HostDefined]]: _hostDefined_ }. 1. Perform InnerModuleLoading(_state_, _module_). - 1. Return _pc_.[[Promise]]. + 1. Return _promiseCapability_.[[Promise]]. @@ -27239,8 +27236,8 @@

    Evaluate ( ): a Promise

    1. If _module_.[[TopLevelCapability]] is not ~empty~, then 1. Return _module_.[[TopLevelCapability]].[[Promise]]. 1. Let _stack_ be a new empty List. - 1. Let _capability_ be ! NewPromiseCapability(%Promise%). - 1. Set _module_.[[TopLevelCapability]] to _capability_. + 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). + 1. Set _module_.[[TopLevelCapability]] to _promiseCapability_. 1. Let _result_ be Completion(InnerModuleEvaluation(_module_, _stack_, 0)). 1. If _result_ is an abrupt completion, then 1. For each Cyclic Module Record _m_ of _stack_, do @@ -27249,16 +27246,16 @@

    Evaluate ( ): a Promise

    1. Set _m_.[[EvaluationError]] to _result_. 1. Assert: _module_.[[Status]] is ~evaluated~. 1. Assert: _module_.[[EvaluationError]] and _result_ are the same Completion Record. - 1. Perform ! Call(_capability_.[[Reject]], *undefined*, « _result_.[[Value]] »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _result_.[[Value]] »). 1. Else, 1. Assert: _module_.[[Status]] is either ~evaluating-async~ or ~evaluated~. 1. Assert: _module_.[[EvaluationError]] is ~empty~. 1. If _module_.[[Status]] is ~evaluated~, then 1. Assert: _module_.[[AsyncEvaluationOrder]] is either ~unset~ or ~done~. 1. NOTE: _module_.[[AsyncEvaluationOrder]] is ~done~ if and only if _module_ had already been evaluated and that evaluation was asynchronous. - 1. Perform ! Call(_capability_.[[Resolve]], *undefined*, « *undefined* »). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « *undefined* »). 1. Assert: _stack_ is empty. - 1. Return _capability_.[[Promise]]. + 1. Return _promiseCapability_.[[Promise]]. @@ -27345,7 +27342,7 @@

    1. Assert: _module_.[[Status]] is either ~evaluating~ or ~evaluating-async~. 1. Assert: _module_.[[HasTLA]] is *true*. - 1. Let _capability_ be ! NewPromiseCapability(%Promise%). + 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). 1. Let _fulfilledClosure_ be a new Abstract Closure with no parameters that captures _module_ and performs the following steps when called: 1. Perform AsyncModuleExecutionFulfilled(_module_). 1. Return NormalCompletion(*undefined*). @@ -27354,8 +27351,8 @@

    1. Perform AsyncModuleExecutionRejected(_module_, _error_). 1. Return NormalCompletion(*undefined*). 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 0, *""*, « »). - 1. Perform PerformPromiseThen(_capability_.[[Promise]], _onFulfilled_, _onRejected_). - 1. Perform ! _module_.ExecuteModule(_capability_). + 1. Perform PerformPromiseThen(_promiseCapability_.[[Promise]], _onFulfilled_, _onRejected_). + 1. Perform ! _module_.ExecuteModule(_promiseCapability_). 1. Return ~unused~. @@ -27370,16 +27367,16 @@

    - 1. For each Cyclic Module Record _m_ of _module_.[[AsyncParentModules]], do - 1. If _execList_ does not contain _m_ and _m_.[[CycleRoot]].[[EvaluationError]] is ~empty~, then - 1. Assert: _m_.[[Status]] is ~evaluating-async~. - 1. Assert: _m_.[[EvaluationError]] is ~empty~. - 1. Assert: _m_.[[AsyncEvaluationOrder]] is an integer. - 1. Assert: _m_.[[PendingAsyncDependencies]] > 0. - 1. Set _m_.[[PendingAsyncDependencies]] to _m_.[[PendingAsyncDependencies]] - 1. - 1. If _m_.[[PendingAsyncDependencies]] = 0, then - 1. Append _m_ to _execList_. - 1. If _m_.[[HasTLA]] is *false*, perform GatherAvailableAncestors(_m_, _execList_). + 1. For each Cyclic Module Record _ancesterModule_ of _module_.[[AsyncParentModules]], do + 1. If _execList_ does not contain _ancesterModule_ and _ancesterModule_.[[CycleRoot]].[[EvaluationError]] is ~empty~, then + 1. Assert: _ancesterModule_.[[Status]] is ~evaluating-async~. + 1. Assert: _ancesterModule_.[[EvaluationError]] is ~empty~. + 1. Assert: _ancesterModule_.[[AsyncEvaluationOrder]] is an integer. + 1. Assert: _ancesterModule_.[[PendingAsyncDependencies]] > 0. + 1. Set _ancesterModule_.[[PendingAsyncDependencies]] to _ancesterModule_.[[PendingAsyncDependencies]] - 1. + 1. If _ancesterModule_.[[PendingAsyncDependencies]] = 0, then + 1. Append _ancesterModule_ to _execList_. + 1. If _ancesterModule_.[[HasTLA]] is *false*, perform GatherAvailableAncestors(_ancesterModule_, _execList_). 1. Return ~unused~. @@ -27411,21 +27408,21 @@

    1. Perform GatherAvailableAncestors(_module_, _execList_). 1. Assert: All elements of _execList_ have their [[AsyncEvaluationOrder]] field set to an integer, [[PendingAsyncDependencies]] field set to 0, and [[EvaluationError]] field set to ~empty~. 1. Let _sortedExecList_ be a List whose elements are the elements of _execList_, sorted by their [[AsyncEvaluationOrder]] field in ascending order. - 1. For each Cyclic Module Record _m_ of _sortedExecList_, do - 1. If _m_.[[Status]] is ~evaluated~, then - 1. Assert: _m_.[[EvaluationError]] is not ~empty~. - 1. Else if _m_.[[HasTLA]] is *true*, then - 1. Perform ExecuteAsyncModule(_m_). + 1. For each Cyclic Module Record _ancesterModule_ of _sortedExecList_, do + 1. If _ancesterModule_.[[Status]] is ~evaluated~, then + 1. Assert: _ancesterModule_.[[EvaluationError]] is not ~empty~. + 1. Else if _ancesterModule_.[[HasTLA]] is *true*, then + 1. Perform ExecuteAsyncModule(_ancesterModule_). 1. Else, - 1. Let _result_ be Completion(_m_.ExecuteModule()). + 1. Let _result_ be Completion(_ancesterModule_.ExecuteModule()). 1. If _result_ is an abrupt completion, then - 1. Perform AsyncModuleExecutionRejected(_m_, _result_.[[Value]]). + 1. Perform AsyncModuleExecutionRejected(_ancesterModule_, _result_.[[Value]]). 1. Else, - 1. Set _m_.[[AsyncEvaluationOrder]] to ~done~. - 1. Set _m_.[[Status]] to ~evaluated~. - 1. If _m_.[[TopLevelCapability]] is not ~empty~, then - 1. Assert: _m_.[[CycleRoot]] and _m_ are the same Module Record. - 1. Perform ! Call(_m_.[[TopLevelCapability]].[[Resolve]], *undefined*, « *undefined* »). + 1. Set _ancesterModule_.[[AsyncEvaluationOrder]] to ~done~. + 1. Set _ancesterModule_.[[Status]] to ~evaluated~. + 1. If _ancesterModule_.[[TopLevelCapability]] is not ~empty~, then + 1. Assert: _ancesterModule_.[[CycleRoot]] and _ancesterModule_ are the same Module Record. + 1. Perform ! Call(_ancesterModule_.[[TopLevelCapability]].[[Resolve]], *undefined*, « *undefined* »). 1. Return ~unused~. @@ -27453,8 +27450,8 @@

    1. If _module_.[[TopLevelCapability]] is not ~empty~, then 1. Assert: _module_.[[CycleRoot]] and _module_ are the same Module Record. 1. Perform ! Call(_module_.[[TopLevelCapability]].[[Reject]], *undefined*, « _error_ »). - 1. For each Cyclic Module Record _m_ of _module_.[[AsyncParentModules]], do - 1. Perform AsyncModuleExecutionRejected(_m_, _error_). + 1. For each Cyclic Module Record _ancesterModule_ of _module_.[[AsyncParentModules]], do + 1. Perform AsyncModuleExecutionRejected(_ancesterModule_, _error_). 1. Return ~unused~. @@ -28462,19 +28459,19 @@

    1. Let _localExportEntries_ be a new empty List. 1. Let _starExportEntries_ be a new empty List. 1. Let _exportEntries_ be the ExportEntries of _body_. - 1. For each ExportEntry Record _ee_ of _exportEntries_, do - 1. If _ee_.[[ModuleRequest]] is *null*, then - 1. If _importedBoundNames_ does not contain _ee_.[[LocalName]], then - 1. Append _ee_ to _localExportEntries_. + 1. For each ExportEntry Record _exportEntry_ of _exportEntries_, do + 1. If _exportEntry_.[[ModuleRequest]] is *null*, then + 1. If _importedBoundNames_ does not contain _exportEntry_.[[LocalName]], then + 1. Append _exportEntry_ to _localExportEntries_. 1. Else, 1. NOTE: When exporting a binding or namespace object which was originally imported from another module, the ExportEntry Record is rewritten to match the form it would have if the binding or namespace object had been re-exported directly from the original module rather than imported then exported. This allows conflicts which arise from exporting the same binding or namespace twice under the same name through `export * from` to be ignored rather than being treated as ambiguous in step of the ResolveExport concrete method of Source Text Module Records. - 1. Let _ie_ be the element of _importEntries_ whose [[LocalName]] is _ee_.[[LocalName]]. - 1. Append the ExportEntry Record { [[ModuleRequest]]: _ie_.[[ModuleRequest]], [[ImportName]]: _ie_.[[ImportName]], [[LocalName]]: *null*, [[ExportName]]: _ee_.[[ExportName]] } to _indirectExportEntries_. - 1. Else if _ee_.[[ImportName]] is ~all-but-default~, then - 1. Assert: _ee_.[[ExportName]] is *null*. - 1. Append _ee_ to _starExportEntries_. + 1. Let _ie_ be the element of _importEntries_ whose [[LocalName]] is _exportEntry_.[[LocalName]]. + 1. Append the ExportEntry Record { [[ModuleRequest]]: _ie_.[[ModuleRequest]], [[ImportName]]: _ie_.[[ImportName]], [[LocalName]]: *null*, [[ExportName]]: _exportEntry_.[[ExportName]] } to _indirectExportEntries_. + 1. Else if _exportEntry_.[[ImportName]] is ~all-but-default~, then + 1. Assert: _exportEntry_.[[ExportName]] is *null*. + 1. Append _exportEntry_ to _starExportEntries_. 1. Else, - 1. Append _ee_ to _indirectExportEntries_. + 1. Append _exportEntry_ to _indirectExportEntries_. 1. Let _async_ be _body_ Contains `await`. 1. Return Source Text Module Record { [[Realm]]: _realm_, [[Environment]]: ~empty~, [[Namespace]]: ~empty~, [[CycleRoot]]: ~empty~, [[HasTLA]]: _async_, [[AsyncEvaluationOrder]]: ~unset~, [[TopLevelCapability]]: ~empty~, [[AsyncParentModules]]: « », [[PendingAsyncDependencies]]: ~empty~, [[Status]]: ~new~, [[EvaluationError]]: ~empty~, [[HostDefined]]: _hostDefined_, [[ECMAScriptCode]]: _body_, [[Context]]: ~empty~, [[ImportMeta]]: ~empty~, [[RequestedModules]]: _requestedModules_, [[LoadedModules]]: « », [[ImportEntries]]: _importEntries_, [[LocalExportEntries]]: _localExportEntries_, [[IndirectExportEntries]]: _indirectExportEntries_, [[StarExportEntries]]: _starExportEntries_, [[DFSAncestorIndex]]: ~empty~ }. @@ -28550,8 +28547,8 @@

    1. Assert: _module_.[[Status]] is not ~new~. 1. If _resolveSet_ is not present, set _resolveSet_ to a new empty List. - 1. For each Record { [[Module]], [[ExportName]] } _r_ of _resolveSet_, do - 1. If _module_ and _r_.[[Module]] are the same Module Record and _exportName_ is _r_.[[ExportName]], then + 1. For each Record { [[Module]], [[ExportName]] } _record_ of _resolveSet_, do + 1. If _module_ and _record_.[[Module]] are the same Module Record and _exportName_ is _record_.[[ExportName]], then 1. Assert: This is a circular import request. 1. Return *null*. 1. Append the Record { [[Module]]: _module_, [[ExportName]]: _exportName_ } to _resolveSet_. @@ -28613,24 +28610,24 @@

    InitializeEnvironment ( ): either a normal completion containing ~unused~ or 1. Assert: All named exports from _module_ are resolvable. 1. Let _realm_ be _module_.[[Realm]]. 1. Assert: _realm_ is not *undefined*. - 1. Let _env_ be NewModuleEnvironment(_realm_.[[GlobalEnv]]). - 1. Set _module_.[[Environment]] to _env_. + 1. Let _envRecord_ be NewModuleEnvironment(_realm_.[[GlobalEnv]]). + 1. Set _module_.[[Environment]] to _envRecord_. 1. For each ImportEntry Record _in_ of _module_.[[ImportEntries]], do 1. Let _importedModule_ be GetImportedModule(_module_, _in_.[[ModuleRequest]]). 1. If _in_.[[ImportName]] is ~namespace~, then 1. Let _namespace_ be GetModuleNamespace(_importedModule_). - 1. Perform ! _env_.CreateImmutableBinding(_in_.[[LocalName]], *true*). - 1. Perform ! _env_.InitializeBinding(_in_.[[LocalName]], _namespace_). + 1. Perform ! _envRecord_.CreateImmutableBinding(_in_.[[LocalName]], *true*). + 1. Perform ! _envRecord_.InitializeBinding(_in_.[[LocalName]], _namespace_). 1. Else, 1. Assert: _in_.[[ImportName]] is a String. 1. Let _resolution_ be _importedModule_.ResolveExport(_in_.[[ImportName]]). 1. If _resolution_ is either *null* or ~ambiguous~, throw a *SyntaxError* exception. 1. If _resolution_.[[BindingName]] is ~namespace~, then 1. Let _namespace_ be GetModuleNamespace(_resolution_.[[Module]]). - 1. Perform ! _env_.CreateImmutableBinding(_in_.[[LocalName]], *true*). - 1. Perform ! _env_.InitializeBinding(_in_.[[LocalName]], _namespace_). + 1. Perform ! _envRecord_.CreateImmutableBinding(_in_.[[LocalName]], *true*). + 1. Perform ! _envRecord_.InitializeBinding(_in_.[[LocalName]], _namespace_). 1. Else, - 1. Perform CreateImportBinding(_env_, _in_.[[LocalName]], _resolution_.[[Module]], _resolution_.[[BindingName]]). + 1. Perform CreateImportBinding(_envRecord_, _in_.[[LocalName]], _resolution_.[[Module]], _resolution_.[[BindingName]]). 1. Let _moduleContext_ be a new ECMAScript code execution context. 1. Set the Function of _moduleContext_ to *null*. 1. Assert: _module_.[[Realm]] is not *undefined*. @@ -28642,25 +28639,25 @@

    InitializeEnvironment ( ): either a normal completion containing ~unused~ or 1. Set _module_.[[Context]] to _moduleContext_. 1. Push _moduleContext_ onto the execution context stack; _moduleContext_ is now the running execution context. 1. Let _code_ be _module_.[[ECMAScriptCode]]. - 1. Let _varDeclarations_ be the VarScopedDeclarations of _code_. - 1. Let _declaredVarNames_ be a new empty List. - 1. For each element _d_ of _varDeclarations_, do + 1. Let _variableDeclarations_ be the VarScopedDeclarations of _code_. + 1. Let _declaredVariableNames_ be a new empty List. + 1. For each element _d_ of _variableDeclarations_, do 1. For each element _dn_ of the BoundNames of _d_, do - 1. If _declaredVarNames_ does not contain _dn_, then - 1. Perform ! _env_.CreateMutableBinding(_dn_, *false*). - 1. Perform ! _env_.InitializeBinding(_dn_, *undefined*). - 1. Append _dn_ to _declaredVarNames_. - 1. Let _lexDeclarations_ be the LexicallyScopedDeclarations of _code_. + 1. If _declaredVariableNames_ does not contain _dn_, then + 1. Perform ! _envRecord_.CreateMutableBinding(_dn_, *false*). + 1. Perform ! _envRecord_.InitializeBinding(_dn_, *undefined*). + 1. Append _dn_ to _declaredVariableNames_. + 1. Let _lexicalDeclarations_ be the LexicallyScopedDeclarations of _code_. 1. Let _privateEnv_ be *null*. - 1. For each element _d_ of _lexDeclarations_, do + 1. For each element _d_ of _lexicalDeclarations_, do 1. For each element _dn_ of the BoundNames of _d_, do 1. If IsConstantDeclaration of _d_ is *true*, then - 1. Perform ! _env_.CreateImmutableBinding(_dn_, *true*). + 1. Perform ! _envRecord_.CreateImmutableBinding(_dn_, *true*). 1. Else, - 1. Perform ! _env_.CreateMutableBinding(_dn_, *false*). + 1. Perform ! _envRecord_.CreateMutableBinding(_dn_, *false*). 1. If _d_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|, then - 1. Let _fo_ be InstantiateFunctionObject of _d_ with arguments _env_ and _privateEnv_. - 1. Perform ! _env_.InitializeBinding(_dn_, _fo_). + 1. Let _funcObj_ be InstantiateFunctionObject of _d_ with arguments _envRecord_ and _privateEnv_. + 1. Perform ! _envRecord_.InitializeBinding(_dn_, _funcObj_). 1. Remove _moduleContext_ from the execution context stack. 1. Return ~unused~. @@ -28780,9 +28777,9 @@

    1. Assert: _module_.[[ExportNames]] contains _exportName_. - 1. Let _envRec_ be _module_.[[Environment]]. - 1. Assert: _envRec_ is not ~empty~. - 1. Perform ! _envRec_.SetMutableBinding(_exportName_, _exportValue_, *true*). + 1. Let _envRecord_ be _module_.[[Environment]]. + 1. Assert: _envRecord_ is not ~empty~. + 1. Perform ! _envRecord_.SetMutableBinding(_exportName_, _exportValue_, *true*). 1. Return ~unused~. @@ -28858,11 +28855,11 @@

    Link ( ): a normal completion containing ~unused~

    1. Let _realm_ be _module_.[[Realm]]. - 1. Let _env_ be NewModuleEnvironment(_realm_.[[GlobalEnv]]). - 1. Set _module_.[[Environment]] to _env_. + 1. Let _envRecord_ be NewModuleEnvironment(_realm_.[[GlobalEnv]]). + 1. Set _module_.[[Environment]] to _envRecord_. 1. For each String _exportName_ of _module_.[[ExportNames]], do - 1. Perform ! _env_.CreateMutableBinding(_exportName_, *false*). - 1. Perform ! _env_.InitializeBinding(_exportName_, *undefined*). + 1. Perform ! _envRecord_.CreateMutableBinding(_exportName_, *false*). + 1. Perform ! _envRecord_.InitializeBinding(_exportName_, *undefined*). 1. Return NormalCompletion(~unused~). @@ -28887,10 +28884,10 @@

    Evaluate ( ): a Promise

    1. Let _result_ be Completion(_steps_(_module_)). 1. Suspend _moduleContext_ and remove it from the execution context stack. 1. Resume the context that is now on the top of the execution context stack as the running execution context. - 1. Let _pc_ be ! NewPromiseCapability(%Promise%). - 1. IfAbruptRejectPromise(_result_, _pc_). - 1. Perform ! Call(_pc_.[[Resolve]], *undefined*, « *undefined* »). - 1. Return _pc_.[[Promise]]. + 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). + 1. IfAbruptRejectPromise(_result_, _promiseCapability_). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « *undefined* »). + 1. Return _promiseCapability_.[[Promise]].
    @@ -28996,7 +28993,7 @@

    AllImportAttributesSupported ( - _attributes_: a List of ImportAttribute Records, + _attrs_: a List of ImportAttribute Records, ): a Boolean

    @@ -29005,7 +29002,7 @@

    1. Let _supported_ be HostGetSupportedImportAttributes(). - 1. For each ImportAttribute Record _attribute_ of _attributes_, do + 1. For each ImportAttribute Record _attribute_ of _attrs_, do 1. If _supported_ does not contain _attribute_.[[Key]], return *false*. 1. Return *true*. @@ -29267,9 +29264,9 @@

    Static Semantics: WithClauseToAttributes ( ): a List of ImportAttribute Reco WithClause : `with` `{` WithEntries `,`? `}` - 1. Let _attributes_ be WithClauseToAttributes of |WithEntries|. - 1. Sort _attributes_ according to the lexicographic order of their [[Key]] field, treating the value of each such field as a sequence of UTF-16 code unit values. NOTE: This sorting is observable only in that hosts are prohibited from changing behaviour based on the order in which attributes are enumerated. - 1. Return _attributes_. + 1. Let _attrs_ be WithClauseToAttributes of |WithEntries|. + 1. Sort _attrs_ according to the lexicographic order of their [[Key]] field, treating the value of each such field as a sequence of UTF-16 code unit values. NOTE: This sorting is observable only in that hosts are prohibited from changing behaviour based on the order in which attributes are enumerated. + 1. Return _attrs_. WithEntries : AttributeKey `:` StringLiteral @@ -29659,8 +29656,8 @@

    Runtime Semantics: Evaluation

    1. Let _value_ be ? BindingClassDeclarationEvaluation of |ClassDeclaration|. 1. Let _className_ be the sole element of the BoundNames of |ClassDeclaration|. 1. If _className_ is *"\*default\*"*, then - 1. Let _env_ be the running execution context's LexicalEnvironment. - 1. Perform ? InitializeBoundName(*"\*default\*"*, _value_, _env_). + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. + 1. Perform ? InitializeBoundName(*"\*default\*"*, _value_, _envRecord_). 1. Return ~empty~. ExportDeclaration : `export` `default` AssignmentExpression `;` @@ -29670,8 +29667,8 @@

    Runtime Semantics: Evaluation

    1. Else, 1. Let _rhs_ be ? Evaluation of |AssignmentExpression|. 1. Let _value_ be ? GetValue(_rhs_). - 1. Let _env_ be the running execution context's LexicalEnvironment. - 1. Perform ? InitializeBoundName(*"\*default\*"*, _value_, _env_). + 1. Let _envRecord_ be the running execution context's LexicalEnvironment. + 1. Perform ? InitializeBoundName(*"\*default\*"*, _value_, _envRecord_). 1. Return ~empty~.
    @@ -29827,17 +29824,17 @@

    1. Let _evalRealm_ be the current Realm Record. 1. NOTE: In the case of a direct eval, _evalRealm_ is the realm of both the caller of `eval` and of the `eval` function itself. 1. Perform ? HostEnsureCanCompileStrings(_evalRealm_, « », _source_, _direct_). - 1. Let _inFunction_ be *false*. + 1. Let _inFunc_ be *false*. 1. Let _inMethod_ be *false*. - 1. Let _inDerivedConstructor_ be *false*. + 1. Let _inDerivedCtor_ be *false*. 1. Let _inClassFieldInitializer_ be *false*. 1. If _direct_ is *true*, then - 1. Let _thisEnvRec_ be GetThisEnvironment(). - 1. If _thisEnvRec_ is a Function Environment Record, then - 1. Let _func_ be _thisEnvRec_.[[FunctionObject]]. - 1. Set _inFunction_ to *true*. - 1. Set _inMethod_ to _thisEnvRec_.HasSuperBinding(). - 1. If _func_.[[ConstructorKind]] is ~derived~, set _inDerivedConstructor_ to *true*. + 1. Let _thisEnvRecord_ be GetThisEnvironment(). + 1. If _thisEnvRecord_ is a Function Environment Record, then + 1. Let _func_ be _thisEnvRecord_.[[FunctionObject]]. + 1. Set _inFunc_ to *true*. + 1. Set _inMethod_ to _thisEnvRecord_.HasSuperBinding(). + 1. If _func_.[[ConstructorKind]] is ~derived~, set _inDerivedCtor_ to *true*. 1. Let _classFieldInitializerName_ be _func_.[[ClassFieldInitializerName]]. 1. If _classFieldInitializerName_ is not ~empty~, set _inClassFieldInitializer_ to *true*. 1. Perform the following substeps in an implementation-defined order, possibly interleaving parsing and error detection: @@ -29845,33 +29842,33 @@

    1. If _script_ is a List of errors, throw a *SyntaxError* exception. 1. If _script_ Contains |ScriptBody| is *false*, return *undefined*. 1. Let _body_ be the |ScriptBody| of _script_. - 1. If _inFunction_ is *false* and _body_ Contains |NewTarget|, throw a *SyntaxError* exception. + 1. If _inFunc_ is *false* and _body_ Contains |NewTarget|, throw a *SyntaxError* exception. 1. If _inMethod_ is *false* and _body_ Contains |SuperProperty|, throw a *SyntaxError* exception. - 1. If _inDerivedConstructor_ is *false* and _body_ Contains |SuperCall|, throw a *SyntaxError* exception. + 1. If _inDerivedCtor_ is *false* and _body_ Contains |SuperCall|, throw a *SyntaxError* exception. 1. If _inClassFieldInitializer_ is *true* and ContainsArguments of _body_ is *true*, throw a *SyntaxError* exception. 1. If _strictCaller_ is *true*, let _strictEval_ be *true*. 1. Else, let _strictEval_ be ScriptIsStrict of _script_. 1. Let _runningContext_ be the running execution context. 1. NOTE: If _direct_ is *true*, _runningContext_ will be the execution context that performed the direct eval. If _direct_ is *false*, _runningContext_ will be the execution context for the invocation of the `eval` function. 1. If _direct_ is *true*, then - 1. Let _lexEnv_ be NewDeclarativeEnvironment(_runningContext_'s LexicalEnvironment). - 1. Let _varEnv_ be _runningContext_'s VariableEnvironment. + 1. Let _lexicalEnv_ be NewDeclarativeEnvironment(_runningContext_'s LexicalEnvironment). + 1. Let _variableEnv_ be _runningContext_'s VariableEnvironment. 1. Let _privateEnv_ be _runningContext_'s PrivateEnvironment. 1. Else, - 1. Let _lexEnv_ be NewDeclarativeEnvironment(_evalRealm_.[[GlobalEnv]]). - 1. Let _varEnv_ be _evalRealm_.[[GlobalEnv]]. + 1. Let _lexicalEnv_ be NewDeclarativeEnvironment(_evalRealm_.[[GlobalEnv]]). + 1. Let _variableEnv_ be _evalRealm_.[[GlobalEnv]]. 1. Let _privateEnv_ be *null*. - 1. If _strictEval_ is *true*, set _varEnv_ to _lexEnv_. + 1. If _strictEval_ is *true*, set _variableEnv_ to _lexicalEnv_. 1. If _runningContext_ is not already suspended, suspend _runningContext_. 1. Let _evalContext_ be a new ECMAScript code execution context. 1. Set _evalContext_'s Function to *null*. 1. Set _evalContext_'s Realm to _evalRealm_. 1. Set _evalContext_'s ScriptOrModule to _runningContext_'s ScriptOrModule. - 1. Set _evalContext_'s VariableEnvironment to _varEnv_. - 1. Set _evalContext_'s LexicalEnvironment to _lexEnv_. + 1. Set _evalContext_'s VariableEnvironment to _variableEnv_. + 1. Set _evalContext_'s LexicalEnvironment to _lexicalEnv_. 1. Set _evalContext_'s PrivateEnvironment to _privateEnv_. 1. Push _evalContext_ onto the execution context stack; _evalContext_ is now the running execution context. - 1. Let _result_ be Completion(EvalDeclarationInstantiation(_body_, _varEnv_, _lexEnv_, _privateEnv_, _strictEval_)). + 1. Let _result_ be Completion(EvalDeclarationInstantiation(_body_, _variableEnv_, _lexicalEnv_, _privateEnv_, _strictEval_)). 1. If _result_ is a normal completion, then 1. Set _result_ to Completion(Evaluation of _body_). 1. If _result_ is a normal completion and _result_.[[Value]] is ~empty~, then @@ -29889,7 +29886,7 @@

    HostEnsureCanCompileStrings ( _calleeRealm_: a Realm Record, - _parameterStrings_: a List of Strings, + _paramStrings_: a List of Strings, _bodyString_: a String, _direct_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion @@ -29899,7 +29896,7 @@

    It allows host environments to block certain ECMAScript functions which allow developers to interpret and evaluate strings as ECMAScript code.

    - _parameterStrings_ represents the strings that, when using one of the function constructors, will be concatenated together to build the parameters list. _bodyString_ represents the function body or the string passed to an `eval` call. + _paramStrings_ represents the strings that, when using one of the function constructors, will be concatenated together to build the parameters list. _bodyString_ represents the function body or the string passed to an `eval` call. _direct_ signifies whether the evaluation is a direct eval.

    The default implementation of HostEnsureCanCompileStrings is to return NormalCompletion(~unused~).

    @@ -29909,8 +29906,8 @@

    EvalDeclarationInstantiation ( _body_: a |ScriptBody| Parse Node, - _varEnv_: an Environment Record, - _lexEnv_: a Declarative Environment Record, + _variableEnv_: an Environment Record, + _lexicalEnv_: a Declarative Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, _strict_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion @@ -29918,19 +29915,19 @@

    - 1. Let _varNames_ be the VarDeclaredNames of _body_. - 1. Let _varDeclarations_ be the VarScopedDeclarations of _body_. + 1. Let _variableNames_ be the VarDeclaredNames of _body_. + 1. Let _variableDeclarations_ be the VarScopedDeclarations of _body_. 1. If _strict_ is *false*, then - 1. If _varEnv_ is a Global Environment Record, then - 1. For each element _name_ of _varNames_, do - 1. If HasLexicalDeclaration(_varEnv_, _name_) is *true*, throw a *SyntaxError* exception. + 1. If _variableEnv_ is a Global Environment Record, then + 1. For each element _name_ of _variableNames_, do + 1. If HasLexicalDeclaration(_variableEnv_, _name_) is *true*, throw a *SyntaxError* exception. 1. NOTE: `eval` will not create a global var declaration that would be shadowed by a global lexical declaration. - 1. Let _thisEnv_ be _lexEnv_. + 1. Let _thisEnv_ be _lexicalEnv_. 1. Assert: The following loop will terminate. - 1. Repeat, while _thisEnv_ and _varEnv_ are not the same Environment Record, + 1. Repeat, while _thisEnv_ and _variableEnv_ are not the same Environment Record, 1. If _thisEnv_ is not an Object Environment Record, then 1. NOTE: The environment of with statements cannot contain any lexical declaration so it doesn't need to be checked for var/let hoisting conflicts. - 1. For each element _name_ of _varNames_, do + 1. For each element _name_ of _variableNames_, do 1. If ! _thisEnv_.HasBinding(_name_) is *true*, then 1. [id="step-evaldeclarationinstantiation-throw-duplicate-binding", normative-optional] If the host is a web browser or otherwise supports , then 1. If _thisEnv_ is not the Environment Record for a |Catch| clause, throw a *SyntaxError* exception. @@ -29945,38 +29942,38 @@

    1. If _privateIdentifiers_ does not contain _binding_.[[Description]], append _binding_.[[Description]] to _privateIdentifiers_. 1. Set _pointer_ to _pointer_.[[OuterPrivateEnvironment]]. 1. If AllPrivateIdentifiersValid of _body_ with argument _privateIdentifiers_ is *false*, throw a *SyntaxError* exception. - 1. Let _functionsToInitialize_ be a new empty List. - 1. Let _declaredFunctionNames_ be a new empty List. - 1. For each element _d_ of _varDeclarations_, in reverse List order, do + 1. Let _funcsToInitialize_ be a new empty List. + 1. Let _declaredFuncNames_ be a new empty List. + 1. For each element _d_ of _variableDeclarations_, in reverse List order, do 1. If _d_ is not either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then 1. Assert: _d_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|. 1. NOTE: If there are multiple function declarations for the same name, the last declaration is used. - 1. Let _fn_ be the sole element of the BoundNames of _d_. - 1. If _declaredFunctionNames_ does not contain _fn_, then - 1. If _varEnv_ is a Global Environment Record, then - 1. Let _fnDefinable_ be ? CanDeclareGlobalFunction(_varEnv_, _fn_). - 1. If _fnDefinable_ is *false*, throw a *TypeError* exception. - 1. Append _fn_ to _declaredFunctionNames_. - 1. Insert _d_ as the first element of _functionsToInitialize_. - 1. Let _declaredVarNames_ be a new empty List. - 1. For each element _d_ of _varDeclarations_, do + 1. Let _func_ be the sole element of the BoundNames of _d_. + 1. If _declaredFuncNames_ does not contain _func_, then + 1. If _variableEnv_ is a Global Environment Record, then + 1. Let _funcDefinable_ be ? CanDeclareGlobalFunction(_variableEnv_, _func_). + 1. If _funcDefinable_ is *false*, throw a *TypeError* exception. + 1. Append _func_ to _declaredFuncNames_. + 1. Insert _d_ as the first element of _funcsToInitialize_. + 1. Let _declaredVariableNames_ be a new empty List. + 1. For each element _d_ of _variableDeclarations_, do 1. If _d_ is either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then 1. For each String _vn_ of the BoundNames of _d_, do - 1. If _declaredFunctionNames_ does not contain _vn_, then - 1. If _varEnv_ is a Global Environment Record, then - 1. Let _vnDefinable_ be ? CanDeclareGlobalVar(_varEnv_, _vn_). + 1. If _declaredFuncNames_ does not contain _vn_, then + 1. If _variableEnv_ is a Global Environment Record, then + 1. Let _vnDefinable_ be ? CanDeclareGlobalVar(_variableEnv_, _vn_). 1. If _vnDefinable_ is *false*, throw a *TypeError* exception. - 1. If _declaredVarNames_ does not contain _vn_, then - 1. Append _vn_ to _declaredVarNames_. + 1. If _declaredVariableNames_ does not contain _vn_, then + 1. Append _vn_ to _declaredVariableNames_. 1. [id="step-evaldeclarationinstantiation-web-compat-insertion-point", normative-optional] If _strict_ is *false* and the host is a web browser or otherwise supports , then - 1. Let _declaredFunctionOrVarNames_ be the list-concatenation of _declaredFunctionNames_ and _declaredVarNames_. + 1. Let _declaredFuncOrVariableNames_ be the list-concatenation of _declaredFuncNames_ and _declaredVariableNames_. 1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _body_ Contains _x_ is *true*, do 1. Let _funcName_ be the StringValue of the |BindingIdentifier| of _f_. 1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _funcName_ as a |BindingIdentifier| would not produce any Early Errors for _body_, then 1. Let _bindingExists_ be *false*. - 1. Set _thisEnv_ to _lexEnv_. + 1. Set _thisEnv_ to _lexicalEnv_. 1. Assert: The following loop will terminate. - 1. Repeat, while _thisEnv_ is not _varEnv_, + 1. Repeat, while _thisEnv_ is not _variableEnv_, 1. If _thisEnv_ is not an Object Environment Record, then 1. If ! _thisEnv_.HasBinding(_funcName_) is *true*, then 1. [id="step-evaldeclarationinstantiation-web-compat-bindingexists", normative-optional] If the host is a web browser or otherwise supports , then @@ -29984,83 +29981,83 @@

    1. Else, 1. Set _bindingExists_ to *true*. 1. Set _thisEnv_ to _thisEnv_.[[OuterEnv]]. - 1. If _bindingExists_ is *false* and _varEnv_ is a Global Environment Record, then - 1. If HasLexicalDeclaration(_varEnv_, _funcName_) is *false*, then - 1. Let _fnDefinable_ be ? CanDeclareGlobalVar(_varEnv_, _funcName_). + 1. If _bindingExists_ is *false* and _variableEnv_ is a Global Environment Record, then + 1. If HasLexicalDeclaration(_variableEnv_, _funcName_) is *false*, then + 1. Let _funcDefinable_ be ? CanDeclareGlobalVar(_variableEnv_, _funcName_). 1. Else, - 1. Let _fnDefinable_ be *false*. + 1. Let _funcDefinable_ be *false*. 1. Else, - 1. Let _fnDefinable_ be *true*. - 1. If _bindingExists_ is *false* and _fnDefinable_ is *true*, then - 1. If _declaredFunctionOrVarNames_ does not contain _funcName_, then - 1. If _varEnv_ is a Global Environment Record, then - 1. Perform ? CreateGlobalVarBinding(_varEnv_, _funcName_, *true*). + 1. Let _funcDefinable_ be *true*. + 1. If _bindingExists_ is *false* and _funcDefinable_ is *true*, then + 1. If _declaredFuncOrVariableNames_ does not contain _funcName_, then + 1. If _variableEnv_ is a Global Environment Record, then + 1. Perform ? CreateGlobalVarBinding(_variableEnv_, _funcName_, *true*). 1. Else, - 1. Set _bindingExists_ to ! _varEnv_.HasBinding(_funcName_). + 1. Set _bindingExists_ to ! _variableEnv_.HasBinding(_funcName_). 1. If _bindingExists_ is *false*, then - 1. Perform ! _varEnv_.CreateMutableBinding(_funcName_, *true*). - 1. Perform ! _varEnv_.InitializeBinding(_funcName_, *undefined*). - 1. Append _funcName_ to _declaredFunctionOrVarNames_. + 1. Perform ! _variableEnv_.CreateMutableBinding(_funcName_, *true*). + 1. Perform ! _variableEnv_.InitializeBinding(_funcName_, *undefined*). + 1. Append _funcName_ to _declaredFuncOrVariableNames_. 1. [id="step-evaldeclarationinstantiation-alt-funcdecl-eval"] When the |FunctionDeclaration| _f_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in : 1. Let _gEnv_ be the running execution context's VariableEnvironment. 1. Let _bEnv_ be the running execution context's LexicalEnvironment. 1. Let _fObj_ be ! _bEnv_.GetBindingValue(_funcName_, *false*). 1. Perform ? _gEnv_.SetMutableBinding(_funcName_, _fObj_, *false*). 1. Return ~unused~. - 1. [id="step-evaldeclarationinstantiation-post-validation"] NOTE: No abnormal terminations occur after this algorithm step unless _varEnv_ is a Global Environment Record and the global object is a Proxy exotic object. - 1. Let _lexDeclarations_ be the LexicallyScopedDeclarations of _body_. - 1. For each element _d_ of _lexDeclarations_, do + 1. [id="step-evaldeclarationinstantiation-post-validation"] NOTE: No abnormal terminations occur after this algorithm step unless _variableEnv_ is a Global Environment Record and the global object is a Proxy exotic object. + 1. Let _lexicalDeclarations_ be the LexicallyScopedDeclarations of _body_. + 1. For each element _d_ of _lexicalDeclarations_, do 1. NOTE: Lexically declared names are only instantiated here but not initialized. 1. For each element _dn_ of the BoundNames of _d_, do 1. If IsConstantDeclaration of _d_ is *true*, then - 1. Perform ? _lexEnv_.CreateImmutableBinding(_dn_, *true*). + 1. Perform ? _lexicalEnv_.CreateImmutableBinding(_dn_, *true*). 1. Else, - 1. Perform ? _lexEnv_.CreateMutableBinding(_dn_, *false*). - 1. For each Parse Node _f_ of _functionsToInitialize_, do - 1. Let _fn_ be the sole element of the BoundNames of _f_. - 1. Let _fo_ be InstantiateFunctionObject of _f_ with arguments _lexEnv_ and _privateEnv_. - 1. If _varEnv_ is a Global Environment Record, then - 1. Perform ? CreateGlobalFunctionBinding(_varEnv_, _fn_, _fo_, *true*). + 1. Perform ? _lexicalEnv_.CreateMutableBinding(_dn_, *false*). + 1. For each Parse Node _f_ of _funcsToInitialize_, do + 1. Let _func_ be the sole element of the BoundNames of _f_. + 1. Let _funcObj_ be InstantiateFunctionObject of _f_ with arguments _lexicalEnv_ and _privateEnv_. + 1. If _variableEnv_ is a Global Environment Record, then + 1. Perform ? CreateGlobalFunctionBinding(_variableEnv_, _func_, _funcObj_, *true*). 1. Else, - 1. Let _bindingExists_ be ! _varEnv_.HasBinding(_fn_). + 1. Let _bindingExists_ be ! _variableEnv_.HasBinding(_func_). 1. If _bindingExists_ is *false*, then 1. NOTE: The following invocation cannot return an abrupt completion because of the validation preceding step . - 1. Perform ! _varEnv_.CreateMutableBinding(_fn_, *true*). - 1. Perform ! _varEnv_.InitializeBinding(_fn_, _fo_). + 1. Perform ! _variableEnv_.CreateMutableBinding(_func_, *true*). + 1. Perform ! _variableEnv_.InitializeBinding(_func_, _funcObj_). 1. Else, - 1. Perform ! _varEnv_.SetMutableBinding(_fn_, _fo_, *false*). - 1. For each String _vn_ of _declaredVarNames_, do - 1. If _varEnv_ is a Global Environment Record, then - 1. Perform ? CreateGlobalVarBinding(_varEnv_, _vn_, *true*). + 1. Perform ! _variableEnv_.SetMutableBinding(_func_, _funcObj_, *false*). + 1. For each String _vn_ of _declaredVariableNames_, do + 1. If _variableEnv_ is a Global Environment Record, then + 1. Perform ? CreateGlobalVarBinding(_variableEnv_, _vn_, *true*). 1. Else, - 1. Let _bindingExists_ be ! _varEnv_.HasBinding(_vn_). + 1. Let _bindingExists_ be ! _variableEnv_.HasBinding(_vn_). 1. If _bindingExists_ is *false*, then 1. NOTE: The following invocation cannot return an abrupt completion because of the validation preceding step . - 1. Perform ! _varEnv_.CreateMutableBinding(_vn_, *true*). - 1. Perform ! _varEnv_.InitializeBinding(_vn_, *undefined*). + 1. Perform ! _variableEnv_.CreateMutableBinding(_vn_, *true*). + 1. Perform ! _variableEnv_.InitializeBinding(_vn_, *undefined*). 1. Return ~unused~. -

    isFinite ( _number_ )

    +

    isFinite ( _value_ )

    This function is the %isFinite% intrinsic object.

    It performs the following steps when called:

    - 1. Let _num_ be ? ToNumber(_number_). - 1. If _num_ is finite, return *true*. + 1. Let _number_ be ? ToNumber(_value_). + 1. If _number_ is finite, return *true*. 1. Return *false*.
    -

    isNaN ( _number_ )

    +

    isNaN ( _value_ )

    This function is the %isNaN% intrinsic object.

    It performs the following steps when called:

    - 1. Let _num_ be ? ToNumber(_number_). - 1. If _num_ is *NaN*, return *true*. + 1. Let _number_ be ? ToNumber(_value_). + 1. If _number_ is *NaN*, return *true*. 1. Return *false*. @@ -30193,21 +30190,21 @@

    It performs URI encoding and escaping, interpreting _string_ as a sequence of UTF-16 encoded code points as described in . If a character is identified as unreserved in RFC 2396 or appears in _extraUnescaped_, it is not escaped.

    - 1. Let _len_ be the length of _string_. + 1. Let _length_ be the length of _string_. 1. Let _result_ be the empty String. 1. Let _alwaysUnescaped_ be the string-concatenation of the ASCII word characters and *"-.!~\*'()"*. 1. Let _unescapedSet_ be the string-concatenation of _alwaysUnescaped_ and _extraUnescaped_. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _codeUnit_ be the code unit at index _k_ within _string_. 1. If _unescapedSet_ contains _codeUnit_, then 1. Set _k_ to _k_ + 1. 1. Set _result_ to the string-concatenation of _result_ and _codeUnit_. 1. Else, - 1. Let _cp_ be CodePointAt(_string_, _k_). - 1. If _cp_.[[IsUnpairedSurrogate]] is *true*, throw a *URIError* exception. - 1. Set _k_ to _k_ + _cp_.[[CodeUnitCount]]. - 1. Let _octets_ be the List of octets resulting by applying the UTF-8 transformation to _cp_.[[CodePoint]]. + 1. Let _codePoint_ be CodePointAt(_string_, _k_). + 1. If _codePoint_.[[IsUnpairedSurrogate]] is *true*, throw a *URIError* exception. + 1. Set _k_ to _k_ + _codePoint_.[[CodeUnitCount]]. + 1. Let _octets_ be the List of octets resulting by applying the UTF-8 transformation to _codePoint_.[[CodePoint]]. 1. For each element _octet_ of _octets_, do 1. Let _hex_ be the String representation of _octet_, formatted as an uppercase hexadecimal number. 1. Set _result_ to the string-concatenation of _result_, *"%"*, and StringPad(_hex_, 2, *"0"*, ~start~). @@ -30230,14 +30227,14 @@

    It performs URI unescaping and decoding, preserving any escape sequences that correspond to Basic Latin characters in _preserveEscapeSet_.

    - 1. Let _len_ be the length of _string_. + 1. Let _length_ be the length of _string_. 1. Let _result_ be the empty String. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _codeUnit_ be the code unit at index _k_ within _string_. 1. Let _segment_ be _codeUnit_. 1. If _codeUnit_ is the code unit 0x0025 (PERCENT SIGN), then - 1. If _k_ + 3 > _len_, throw a *URIError* exception. + 1. If _k_ + 3 > _length_, throw a *URIError* exception. 1. Let _escape_ be the substring of _string_ from _k_ to _k_ + 3. 1. Let _firstOctet_ be ParseHexOctet(_string_, _k_ + 1). 1. If _firstOctet_ is not an integer, throw a *URIError* exception. @@ -30252,7 +30249,7 @@

    1. Let _j_ be 1. 1. Repeat, while _j_ < _n_, 1. Set _k_ to _k_ + 1. - 1. If _k_ + 3 > _len_, throw a *URIError* exception. + 1. If _k_ + 3 > _length_, throw a *URIError* exception. 1. If the code unit at index _k_ within _string_ is not the code unit 0x0025 (PERCENT SIGN), throw a *URIError* exception. 1. Let _continuationByte_ be ParseHexOctet(_string_, _k_ + 1). 1. If _continuationByte_ is not an integer, throw a *URIError* exception. @@ -30284,8 +30281,8 @@

    It parses a sequence of two hexadecimal characters at the specified _position_ in _string_ into an unsigned 8-bit integer.

    - 1. Let _len_ be the length of _string_. - 1. Assert: _position_ + 2 ≤ _len_. + 1. Let _length_ be the length of _string_. + 1. Assert: _position_ + 2 ≤ _length_. 1. Let _hexDigits_ be the substring of _string_ from _position_ to _position_ + 2. 1. Let _parseResult_ be ParseText(_hexDigits_, |HexDigits[~Sep]|). 1. If _parseResult_ is not a Parse Node, return _parseResult_. @@ -30585,10 +30582,10 @@

    Object.assign ( _target_, ..._sources_ )

    1. Let _from_ be ! ToObject(_nextSource_). 1. Let _keys_ be ? _from_.[[OwnPropertyKeys]](). 1. For each element _nextKey_ of _keys_, do - 1. Let _desc_ be ? _from_.[[GetOwnProperty]](_nextKey_). - 1. If _desc_ is not *undefined* and _desc_.[[Enumerable]] is *true*, then - 1. Let _propValue_ be ? Get(_from_, _nextKey_). - 1. Perform ? Set(_to_, _nextKey_, _propValue_, *true*). + 1. Let _propertyDesc_ be ? _from_.[[GetOwnProperty]](_nextKey_). + 1. If _propertyDesc_ is not *undefined* and _propertyDesc_.[[Enumerable]] is *true*, then + 1. Let _propertyValue_ be ? Get(_from_, _nextKey_). + 1. Perform ? Set(_to_, _nextKey_, _propertyValue_, *true*). 1. Return _to_.

    The *"length"* property of this function is *2*𝔽.

    @@ -30626,16 +30623,16 @@

    - 1. Let _props_ be ? ToObject(_properties_). - 1. Let _keys_ be ? _props_.[[OwnPropertyKeys]](). - 1. Let _descriptors_ be a new empty List. + 1. Set _properties_ to ? ToObject(_properties_). + 1. Let _keys_ be ? _properties_.[[OwnPropertyKeys]](). + 1. Let _propertyDescs_ be a new empty List. 1. For each element _nextKey_ of _keys_, do - 1. Let _propDesc_ be ? _props_.[[GetOwnProperty]](_nextKey_). - 1. If _propDesc_ is not *undefined* and _propDesc_.[[Enumerable]] is *true*, then - 1. Let _descObj_ be ? Get(_props_, _nextKey_). - 1. Let _desc_ be ? ToPropertyDescriptor(_descObj_). - 1. Append the Record { [[Key]]: _nextKey_, [[Descriptor]]: _desc_ } to _descriptors_. - 1. For each element _property_ of _descriptors_, do + 1. Let _currentPropertyDesc_ be ? _properties_.[[GetOwnProperty]](_nextKey_). + 1. If _currentPropertyDesc_ is not *undefined* and _currentPropertyDesc_.[[Enumerable]] is *true*, then + 1. Let _propertyDescObj_ be ? Get(_properties_, _nextKey_). + 1. Let _propertyDesc_ be ? ToPropertyDescriptor(_propertyDescObj_). + 1. Append the Record { [[Key]]: _nextKey_, [[Descriptor]]: _propertyDesc_ } to _propertyDescs_. + 1. For each element _property_ of _propertyDescs_, do 1. Perform ? DefinePropertyOrThrow(_obj_, _property_.[[Key]], _property_.[[Descriptor]]). 1. Return _obj_. @@ -30643,14 +30640,14 @@

    -

    Object.defineProperty ( _obj_, _propertyKey_, _attributes_ )

    +

    Object.defineProperty ( _obj_, _key_, _attrs_ )

    This function adds an own property and/or updates the attributes of an existing own property of an object.

    It performs the following steps when called:

    1. If _obj_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Let _desc_ be ? ToPropertyDescriptor(_attributes_). - 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _desc_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Let _propertyDesc_ be ? ToPropertyDescriptor(_attrs_). + 1. Perform ? DefinePropertyOrThrow(_obj_, _propertyKey_, _propertyDesc_). 1. Return _obj_.
    @@ -30696,13 +30693,13 @@

    Object.fromEntries ( _iterable_ )

    -

    Object.getOwnPropertyDescriptor ( _obj_, _propertyKey_ )

    +

    Object.getOwnPropertyDescriptor ( _obj_, _key_ )

    This function performs the following steps when called:

    1. Let _coerced_ be ? ToObject(_obj_). - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Let _desc_ be ? _coerced_.[[GetOwnProperty]](_key_). - 1. Return FromPropertyDescriptor(_desc_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Let _propertyDesc_ be ? _coerced_.[[GetOwnProperty]](_propertyKey_). + 1. Return FromPropertyDescriptor(_propertyDesc_).
    @@ -30712,12 +30709,12 @@

    Object.getOwnPropertyDescriptors ( _obj_ )

    1. Let _coerced_ be ? ToObject(_obj_). 1. Let _ownKeys_ be ? _coerced_.[[OwnPropertyKeys]](). - 1. Let _descriptors_ be OrdinaryObjectCreate(%Object.prototype%). + 1. Let _descs_ be OrdinaryObjectCreate(%Object.prototype%). 1. For each element _key_ of _ownKeys_, do - 1. Let _desc_ be ? _coerced_.[[GetOwnProperty]](_key_). - 1. Let _descriptor_ be FromPropertyDescriptor(_desc_). - 1. If _descriptor_ is not *undefined*, perform ! CreateDataPropertyOrThrow(_descriptors_, _key_, _descriptor_). - 1. Return _descriptors_. + 1. Let _propertyDesc_ be ? _coerced_.[[GetOwnProperty]](_key_). + 1. Let _propertyDescObj_ be FromPropertyDescriptor(_propertyDesc_). + 1. If _propertyDescObj_ is not *undefined*, perform ! CreateDataPropertyOrThrow(_descs_, _key_, _propertyDescObj_). + 1. Return _descs_. @@ -30785,12 +30782,12 @@

    Object.groupBy ( _items_, _callback_ )

    -

    Object.hasOwn ( _obj_, _propertyKey_ )

    +

    Object.hasOwn ( _obj_, _key_ )

    This function performs the following steps when called:

    1. Let _coerced_ be ? ToObject(_obj_). - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Return ? HasOwnProperty(_coerced_, _key_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Return ? HasOwnProperty(_coerced_, _propertyKey_).
    @@ -30941,9 +30938,9 @@

    Object.prototype.propertyIsEnumerable ( _value_ )

    1. [id="step-propertyisenumerable-topropertykey"] Let _propertyKey_ be ? ToPropertyKey(_value_). 1. [id="step-propertyisenumerable-toobject"] Let _obj_ be ? ToObject(*this* value). - 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). - 1. If _desc_ is *undefined*, return *false*. - 1. Return _desc_.[[Enumerable]]. + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. If _propertyDesc_ is *undefined*, return *false*. + 1. Return _propertyDesc_.[[Enumerable]].

    This method does not consider objects in the prototype chain.

    @@ -31036,41 +31033,41 @@

    set Object.prototype.__proto__

    Legacy Object.prototype Accessor Methods

    -

    Object.prototype.__defineGetter__ ( _propertyKey_, _getter_ )

    +

    Object.prototype.__defineGetter__ ( _key_, _getter_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). 1. If IsCallable(_getter_) is *false*, throw a *TypeError* exception. - 1. Let _desc_ be PropertyDescriptor { [[Get]]: _getter_, [[Enumerable]]: *true*, [[Configurable]]: *true* }. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _desc_). + 1. Let _propertyDesc_ be PropertyDescriptor { [[Get]]: _getter_, [[Enumerable]]: *true*, [[Configurable]]: *true* }. + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Perform ? DefinePropertyOrThrow(_obj_, _propertyKey_, _propertyDesc_). 1. Return *undefined*.
    -

    Object.prototype.__defineSetter__ ( _propertyKey_, _setter_ )

    +

    Object.prototype.__defineSetter__ ( _key_, _setter_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). 1. If IsCallable(_setter_) is *false*, throw a *TypeError* exception. - 1. Let _desc_ be PropertyDescriptor { [[Set]]: _setter_, [[Enumerable]]: *true*, [[Configurable]]: *true* }. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _desc_). + 1. Let _propertyDesc_ be PropertyDescriptor { [[Set]]: _setter_, [[Enumerable]]: *true*, [[Configurable]]: *true* }. + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Perform ? DefinePropertyOrThrow(_obj_, _propertyKey_, _propertyDesc_). 1. Return *undefined*.
    -

    Object.prototype.__lookupGetter__ ( _propertyKey_ )

    +

    Object.prototype.__lookupGetter__ ( _key_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). 1. Repeat, - 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_key_). - 1. If _desc_ is not *undefined*, then - 1. If IsAccessorDescriptor(_desc_) is *true*, return _desc_.[[Get]]. + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. If _propertyDesc_ is not *undefined*, then + 1. If IsAccessorDescriptor(_propertyDesc_) is *true*, return _propertyDesc_.[[Get]]. 1. Return *undefined*. 1. Set _obj_ to ? _obj_.[[GetPrototypeOf]](). 1. If _obj_ is *null*, return *undefined*. @@ -31078,15 +31075,15 @@

    Object.prototype.__lookupGetter__ ( _propertyKey_ )

    -

    Object.prototype.__lookupSetter__ ( _propertyKey_ )

    +

    Object.prototype.__lookupSetter__ ( _key_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). 1. Repeat, - 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_key_). - 1. If _desc_ is not *undefined*, then - 1. If IsAccessorDescriptor(_desc_) is *true*, return _desc_.[[Set]]. + 1. Let _propertyDesc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. If _propertyDesc_ is not *undefined*, then + 1. If IsAccessorDescriptor(_propertyDesc_) is *true*, return _propertyDesc_.[[Set]]. 1. Return *undefined*. 1. Set _obj_ to ? _obj_.[[GetPrototypeOf]](). 1. If _obj_ is *null*, return *undefined*. @@ -31115,13 +31112,13 @@

    The Function Constructor

    -

    Function ( ..._parameterArgs_, _bodyArg_ )

    +

    Function ( ..._paramArgs_, _bodyArg_ )

    The last argument (if any) specifies the body (executable code) of a function; any preceding arguments specify formal parameters.

    This function performs the following steps when called:

    - 1. Let _constructor_ be the active function object. + 1. Let _ctor_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_constructor_, NewTarget, ~normal~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_ctor_, NewTarget, ~normal~, _paramArgs_, _bodyArg_).

    It is permissible but not necessary to have one argument for each formal parameter to be specified. For example, all three of the following expressions produce the same result:

    @@ -31135,81 +31132,81 @@

    Function ( ..._parameterArgs_, _bodyArg_ )

    CreateDynamicFunction ( - _constructor_: a constructor, + _ctor_: a constructor, _newTarget_: a constructor or *undefined*, _kind_: ~normal~, ~generator~, ~async~, or ~async-generator~, - _parameterArgs_: a List of ECMAScript language values, + _paramArgs_: a List of ECMAScript language values, _bodyArg_: an ECMAScript language value, ): either a normal completion containing an ECMAScript function object or a throw completion

    description
    -
    _constructor_ is the constructor function that is performing this action. _newTarget_ is the constructor that `new` was initially applied to. _parameterArgs_ and _bodyArg_ reflect the argument values that were passed to _constructor_.
    +
    _ctor_ is the constructor function that is performing this action. _newTarget_ is the constructor that `new` was initially applied to. _paramArgs_ and _bodyArg_ reflect the argument values that were passed to _ctor_.
    - 1. If _newTarget_ is *undefined*, set _newTarget_ to _constructor_. + 1. If _newTarget_ is *undefined*, set _newTarget_ to _ctor_. 1. If _kind_ is ~normal~, then 1. Let _prefix_ be *"function"*. - 1. Let _exprSym_ be the grammar symbol |FunctionExpression|. - 1. Let _bodySym_ be the grammar symbol |FunctionBody[~Yield, ~Await]|. - 1. Let _parameterSym_ be the grammar symbol |FormalParameters[~Yield, ~Await]|. + 1. Let _exprGrammar_ be the grammar symbol |FunctionExpression|. + 1. Let _bodyGrammar_ be the grammar symbol |FunctionBody[~Yield, ~Await]|. + 1. Let _paramGrammar_ be the grammar symbol |FormalParameters[~Yield, ~Await]|. 1. Let _fallbackProto_ be *"%Function.prototype%"*. 1. Else if _kind_ is ~generator~, then 1. Let _prefix_ be *"function\*"*. - 1. Let _exprSym_ be the grammar symbol |GeneratorExpression|. - 1. Let _bodySym_ be the grammar symbol |GeneratorBody|. - 1. Let _parameterSym_ be the grammar symbol |FormalParameters[+Yield, ~Await]|. + 1. Let _exprGrammar_ be the grammar symbol |GeneratorExpression|. + 1. Let _bodyGrammar_ be the grammar symbol |GeneratorBody|. + 1. Let _paramGrammar_ be the grammar symbol |FormalParameters[+Yield, ~Await]|. 1. Let _fallbackProto_ be *"%GeneratorFunction.prototype%"*. 1. Else if _kind_ is ~async~, then 1. Let _prefix_ be *"async function"*. - 1. Let _exprSym_ be the grammar symbol |AsyncFunctionExpression|. - 1. Let _bodySym_ be the grammar symbol |AsyncFunctionBody|. - 1. Let _parameterSym_ be the grammar symbol |FormalParameters[~Yield, +Await]|. + 1. Let _exprGrammar_ be the grammar symbol |AsyncFunctionExpression|. + 1. Let _bodyGrammar_ be the grammar symbol |AsyncFunctionBody|. + 1. Let _paramGrammar_ be the grammar symbol |FormalParameters[~Yield, +Await]|. 1. Let _fallbackProto_ be *"%AsyncFunction.prototype%"*. 1. Else, 1. Assert: _kind_ is ~async-generator~. 1. Let _prefix_ be *"async function\*"*. - 1. Let _exprSym_ be the grammar symbol |AsyncGeneratorExpression|. - 1. Let _bodySym_ be the grammar symbol |AsyncGeneratorBody|. - 1. Let _parameterSym_ be the grammar symbol |FormalParameters[+Yield, +Await]|. + 1. Let _exprGrammar_ be the grammar symbol |AsyncGeneratorExpression|. + 1. Let _bodyGrammar_ be the grammar symbol |AsyncGeneratorBody|. + 1. Let _paramGrammar_ be the grammar symbol |FormalParameters[+Yield, +Await]|. 1. Let _fallbackProto_ be *"%AsyncGeneratorFunction.prototype%"*. - 1. Let _argCount_ be the number of elements in _parameterArgs_. - 1. Let _parameterStrings_ be a new empty List. - 1. For each element _arg_ of _parameterArgs_, do - 1. Append ? ToString(_arg_) to _parameterStrings_. + 1. Let _argCount_ be the number of elements in _paramArgs_. + 1. Let _paramStrings_ be a new empty List. + 1. For each element _arg_ of _paramArgs_, do + 1. Append ? ToString(_arg_) to _paramStrings_. 1. Let _bodyString_ be ? ToString(_bodyArg_). 1. Let _currentRealm_ be the current Realm Record. - 1. Perform ? HostEnsureCanCompileStrings(_currentRealm_, _parameterStrings_, _bodyString_, *false*). - 1. Let _parameterString_ be the empty String. + 1. Perform ? HostEnsureCanCompileStrings(_currentRealm_, _paramStrings_, _bodyString_, *false*). + 1. Let _paramString_ be the empty String. 1. If _argCount_ > 0, then - 1. Set _parameterString_ to _parameterStrings_[0]. + 1. Set _paramString_ to _paramStrings_[0]. 1. Let _k_ be 1. 1. Repeat, while _k_ < _argCount_, - 1. Let _nextArgString_ be _parameterStrings_[_k_]. - 1. Set _parameterString_ to the string-concatenation of _parameterString_, *","* (a comma), and _nextArgString_. + 1. Let _nextArgString_ be _paramStrings_[_k_]. + 1. Set _paramString_ to the string-concatenation of _paramString_, *","* (a comma), and _nextArgString_. 1. Set _k_ to _k_ + 1. 1. Let _bodyParseString_ be the string-concatenation of 0x000A (LINE FEED), _bodyString_, and 0x000A (LINE FEED). - 1. Let _sourceString_ be the string-concatenation of _prefix_, *" anonymous("*, _parameterString_, 0x000A (LINE FEED), *") {"*, _bodyParseString_, and *"}"*. + 1. Let _sourceString_ be the string-concatenation of _prefix_, *" anonymous("*, _paramString_, 0x000A (LINE FEED), *") {"*, _bodyParseString_, and *"}"*. 1. Let _sourceText_ be StringToCodePoints(_sourceString_). - 1. Let _parameters_ be ParseText(_parameterString_, _parameterSym_). - 1. If _parameters_ is a List of errors, throw a *SyntaxError* exception. - 1. Let _body_ be ParseText(_bodyParseString_, _bodySym_). + 1. Let _params_ be ParseText(_paramString_, _paramGrammar_). + 1. If _params_ is a List of errors, throw a *SyntaxError* exception. + 1. Let _body_ be ParseText(_bodyParseString_, _bodyGrammar_). 1. If _body_ is a List of errors, throw a *SyntaxError* exception. 1. NOTE: The parameters and body are parsed separately to ensure that each is valid alone. For example, `new Function("/*", "*/ ) {")` does not evaluate to a function. - 1. NOTE: If this step is reached, _sourceText_ must have the syntax of _exprSym_ (although the reverse implication does not hold). The purpose of the next two steps is to enforce any Early Error rules which apply to _exprSym_ directly. - 1. Let _expr_ be ParseText(_sourceText_, _exprSym_). + 1. NOTE: If this step is reached, _sourceText_ must have the syntax of _exprGrammar_ (although the reverse implication does not hold). The purpose of the next two steps is to enforce any Early Error rules which apply to _exprGrammar_ directly. + 1. Let _expr_ be ParseText(_sourceText_, _exprGrammar_). 1. If _expr_ is a List of errors, throw a *SyntaxError* exception. - 1. Let _proto_ be ? GetPrototypeFromConstructor(_newTarget_, _fallbackProto_). - 1. Let _env_ be _currentRealm_.[[GlobalEnv]]. + 1. Let _funcProto_ be ? GetPrototypeFromConstructor(_newTarget_, _fallbackProto_). + 1. Let _envRecord_ be _currentRealm_.[[GlobalEnv]]. 1. Let _privateEnv_ be *null*. - 1. Let _func_ be OrdinaryFunctionCreate(_proto_, _sourceText_, _parameters_, _body_, ~non-lexical-this~, _env_, _privateEnv_). + 1. Let _func_ be OrdinaryFunctionCreate(_funcProto_, _sourceText_, _params_, _body_, ~non-lexical-this~, _envRecord_, _privateEnv_). 1. Perform SetFunctionName(_func_, *"anonymous"*). 1. If _kind_ is ~generator~, then - 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _protoProto_ be OrdinaryObjectCreate(%GeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _protoProto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Else if _kind_ is ~async-generator~, then - 1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Let _protoProto_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). + 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _protoProto_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Else if _kind_ is ~normal~, then 1. Perform MakeConstructor(_func_). 1. NOTE: Functions whose _kind_ is ~async~ are not constructable and do not have a [[Construct]] internal method or a *"prototype"* property. @@ -31287,17 +31284,17 @@

    Function.prototype.bind ( _thisArg_, ..._args_ )

    1. Let _length_ be 0. 1. Let _targetHasLength_ be ? HasOwnProperty(_target_, *"length"*). 1. If _targetHasLength_ is *true*, then - 1. Let _targetLen_ be ? Get(_target_, *"length"*). - 1. If _targetLen_ is a Number, then - 1. If _targetLen_ is *+∞*𝔽, then + 1. Let _targetLength_ be ? Get(_target_, *"length"*). + 1. If _targetLength_ is a Number, then + 1. If _targetLength_ is *+∞*𝔽, then 1. Set _length_ to +∞. - 1. Else if _targetLen_ is *-∞*𝔽, then + 1. Else if _targetLength_ is *-∞*𝔽, then 1. Set _length_ to 0. 1. Else, - 1. Let _targetLenAsInt_ be ! ToIntegerOrInfinity(_targetLen_). - 1. Assert: _targetLenAsInt_ is finite. + 1. Let _targetLengthAsInt_ be ! ToIntegerOrInfinity(_targetLength_). + 1. Assert: _targetLengthAsInt_ is finite. 1. Let _argCount_ be the number of elements in _args_. - 1. Set _length_ to max(_targetLenAsInt_ - _argCount_, 0). + 1. Set _length_ to max(_targetLengthAsInt_ - _argCount_, 0). 1. Perform SetFunctionLength(_boundFunc_, _length_). 1. Let _targetName_ be ? Get(_target_, *"name"*). 1. If _targetName_ is not a String, set _targetName_ to the empty String. @@ -31442,10 +31439,10 @@

    The Boolean Constructor

    Boolean ( _value_ )

    This function performs the following steps when called:

    - 1. Let _b_ be ToBoolean(_value_). - 1. If NewTarget is *undefined*, return _b_. + 1. Let _bool_ be ToBoolean(_value_). + 1. If NewTarget is *undefined*, return _bool_. 1. Let _obj_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Boolean.prototype%"*, « [[BooleanData]] »). - 1. Set _obj_.[[BooleanData]] to _b_. + 1. Set _obj_.[[BooleanData]] to _bool_. 1. Return _obj_.
    @@ -31485,8 +31482,8 @@

    Boolean.prototype.constructor

    Boolean.prototype.toString ( )

    This method performs the following steps when called:

    - 1. Let _b_ be ? ThisBooleanValue(*this* value). - 1. If _b_ is *true*, return *"true"*. + 1. Let _bool_ be ? ThisBooleanValue(*this* value). + 1. If _bool_ is *true*, return *"true"*. 1. Return *"false"*.
    @@ -31501,17 +31498,17 @@

    Boolean.prototype.valueOf ( )

    ThisBooleanValue ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    - 1. If _value_ is a Boolean, return _value_. - 1. If _value_ is an Object and _value_ has a [[BooleanData]] internal slot, then - 1. Let _b_ be _value_.[[BooleanData]]. - 1. Assert: _b_ is a Boolean. - 1. Return _b_. + 1. If _arg_ is a Boolean, return _arg_. + 1. If _arg_ is an Object and _arg_ has a [[BooleanData]] internal slot, then + 1. Let _bool_ be _arg_.[[BooleanData]]. + 1. Assert: _bool_ is a Boolean. + 1. Return _bool_. 1. Throw a *TypeError* exception.
    @@ -31570,8 +31567,8 @@

    Symbol.for ( _key_ )

    This function performs the following steps when called:

    1. Let _stringKey_ be ? ToString(_key_). - 1. For each element _e_ of the GlobalSymbolRegistry List, do - 1. If _e_.[[Key]] is _stringKey_, return _e_.[[Symbol]]. + 1. For each element _element_ of the GlobalSymbolRegistry List, do + 1. If _element_.[[Key]] is _stringKey_, return _element_.[[Symbol]]. 1. Assert: The GlobalSymbolRegistry List does not currently contain an entry for _stringKey_. 1. Let _newSymbol_ be a new Symbol whose [[Description]] is _stringKey_. 1. Append the GlobalSymbolRegistry Record { [[Key]]: _stringKey_, [[Symbol]]: _newSymbol_ } to the GlobalSymbolRegistry List. @@ -31638,11 +31635,11 @@

    Symbol.iterator

    -

    Symbol.keyFor ( _sym_ )

    +

    Symbol.keyFor ( _symbol_ )

    This function performs the following steps when called:

    - 1. If _sym_ is not a Symbol, throw a *TypeError* exception. - 1. Return KeyForSymbol(_sym_). + 1. If _symbol_ is not a Symbol, throw a *TypeError* exception. + 1. Return KeyForSymbol(_symbol_).
    @@ -31726,9 +31723,8 @@

    Symbol.prototype.constructor

    get Symbol.prototype.description

    `Symbol.prototype.description` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    - 1. Let _s_ be the *this* value. - 1. Let _sym_ be ? ThisSymbolValue(_s_). - 1. Return _sym_.[[Description]]. + 1. Let _symbol_ be ? ThisSymbolValue(*this* value). + 1. Return _symbol_.[[Description]]. @@ -31736,23 +31732,23 @@

    get Symbol.prototype.description

    Symbol.prototype.toString ( )

    This method performs the following steps when called:

    - 1. Let _sym_ be ? ThisSymbolValue(*this* value). - 1. Return SymbolDescriptiveString(_sym_). + 1. Let _symbol_ be ? ThisSymbolValue(*this* value). + 1. Return SymbolDescriptiveString(_symbol_).

    SymbolDescriptiveString ( - _sym_: a Symbol, + _symbol_: a Symbol, ): a String

    - 1. Let _desc_ be _sym_.[[Description]]. - 1. If _desc_ is *undefined*, set _desc_ to the empty String. - 1. Assert: _desc_ is a String. - 1. Return the string-concatenation of *"Symbol("*, _desc_, and *")"*. + 1. Let _propertyDesc_ be _symbol_.[[Description]]. + 1. If _propertyDesc_ is *undefined*, set _propertyDesc_ to the empty String. + 1. Assert: _propertyDesc_ is a String. + 1. Return the string-concatenation of *"Symbol("*, _propertyDesc_, and *")"*.
    @@ -31767,17 +31763,17 @@

    Symbol.prototype.valueOf ( )

    ThisSymbolValue ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a Symbol or a throw completion

    - 1. If _value_ is a Symbol, return _value_. - 1. If _value_ is an Object and _value_ has a [[SymbolData]] internal slot, then - 1. Let _s_ be _value_.[[SymbolData]]. - 1. Assert: _s_ is a Symbol. - 1. Return _s_. + 1. If _arg_ is a Symbol, return _arg_. + 1. If _arg_ is an Object and _arg_ has a [[SymbolData]] internal slot, then + 1. Let _symbol_ be _arg_.[[SymbolData]]. + 1. Assert: _symbol_ is a Symbol. + 1. Return _symbol_. 1. Throw a *TypeError* exception.
    @@ -31815,17 +31811,17 @@

    Abstract Operations for Symbols

    KeyForSymbol ( - _sym_: a Symbol, + _symbol_: a Symbol, ): a String or *undefined*

    description
    -
    If _sym_ is in the GlobalSymbolRegistry List, the String used to register _sym_ will be returned.
    +
    If _symbol_ is in the GlobalSymbolRegistry List, the String used to register _symbol_ will be returned.
    - 1. For each element _e_ of the GlobalSymbolRegistry List, do - 1. If SameValue(_e_.[[Symbol]], _sym_) is *true*, return _e_.[[Key]]. - 1. Assert: The GlobalSymbolRegistry List does not currently contain an entry for _sym_. + 1. For each element _element_ of the GlobalSymbolRegistry List, do + 1. If SameValue(_element_.[[Symbol]], _symbol_) is *true*, return _element_.[[Key]]. + 1. Assert: The GlobalSymbolRegistry List does not currently contain an entry for _symbol_. 1. Return *undefined*.
    @@ -31854,8 +31850,8 @@

    Error ( _message_ [ , _options_ ] )

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Error.prototype%"*, « [[ErrorData]] »). 1. If _message_ is not *undefined*, then - 1. Let _msg_ be ? ToString(_message_). - 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _msg_). + 1. Let _messageString_ be ? ToString(_message_). + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _messageString_). 1. Perform ? InstallErrorCause(_obj_, _options_). 1. Return _obj_. @@ -31920,11 +31916,11 @@

    Error.prototype.toString ( )

    1. If _obj_ is not an Object, throw a *TypeError* exception. 1. Let _name_ be ? Get(_obj_, *"name"*). 1. If _name_ is *undefined*, set _name_ to *"Error"*; else set _name_ to ? ToString(_name_). - 1. Let _msg_ be ? Get(_obj_, *"message"*). - 1. If _msg_ is *undefined*, set _msg_ to the empty String; else set _msg_ to ? ToString(_msg_). - 1. If _name_ is the empty String, return _msg_. - 1. If _msg_ is the empty String, return _name_. - 1. Return the string-concatenation of _name_, the code unit 0x003A (COLON), the code unit 0x0020 (SPACE), and _msg_. + 1. Let _message_ be ? Get(_obj_, *"message"*). + 1. If _message_ is *undefined*, set _message_ to the empty String; else set _message_ to ? ToString(_message_). + 1. If _name_ is the empty String, return _message_. + 1. If _message_ is the empty String, return _name_. + 1. Return the string-concatenation of _name_, the code unit 0x003A (COLON), the code unit 0x0020 (SPACE), and _message_. @@ -31995,8 +31991,8 @@

    _NativeError_ ( _message_ [ , _options_ ] )

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. 1. [id="step-nativeerror-ordinarycreatefromconstructor"] Let _obj_ be ? OrdinaryCreateFromConstructor(_newTarget_, "%NativeError.prototype%", « [[ErrorData]] »). 1. If _message_ is not *undefined*, then - 1. Let _msg_ be ? ToString(_message_). - 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _msg_). + 1. Let _messageString_ be ? ToString(_message_). + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _messageString_). 1. Perform ? InstallErrorCause(_obj_, _options_). 1. Return _obj_. @@ -32071,8 +32067,8 @@

    AggregateError ( _errors_, _message_ [ , _options_ ] )

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%AggregateError.prototype%"*, « [[ErrorData]] »). 1. If _message_ is not *undefined*, then - 1. Let _msg_ be ? ToString(_message_). - 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _msg_). + 1. Let _messageString_ be ? ToString(_message_). + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _messageString_). 1. Perform ? InstallErrorCause(_obj_, _options_). 1. Let _errorsList_ be ? IteratorToList(? GetIterator(_errors_, ~sync~)). 1. Perform ! DefinePropertyOrThrow(_obj_, *"errors"*, PropertyDescriptor { [[Configurable]]: *true*, [[Enumerable]]: *false*, [[Writable]]: *true*, [[Value]]: CreateArrayFromList(_errorsList_) }). @@ -32175,9 +32171,9 @@

    Number ( _value_ )

    This function performs the following steps when called:

    1. If _value_ is present, then - 1. Let _prim_ be ? ToNumeric(_value_). - 1. If _prim_ is a BigInt, let _n_ be 𝔽(ℝ(_prim_)). - 1. Else, let _n_ be _prim_. + 1. Let _primitive_ be ? ToNumeric(_value_). + 1. If _primitive_ is a BigInt, let _n_ be 𝔽(ℝ(_primitive_)). + 1. Else, let _n_ be _primitive_. 1. Else, 1. Let _n_ be *+0*𝔽. 1. If NewTarget is *undefined*, return _n_. @@ -32335,30 +32331,30 @@

    Number.prototype.toExponential ( _fractionDigits_ )

    This method returns a String containing this Number value represented in decimal exponential notation with one digit before the significand's decimal point and _fractionDigits_ digits after the significand's decimal point. If _fractionDigits_ is *undefined*, it includes as many significand digits as necessary to uniquely specify the Number (just like in ToString except that in this case the Number is always output in exponential notation).

    It performs the following steps when called:

    - 1. Let _numberValue_ be ? ThisNumberValue(*this* value). + 1. Let _number_ be ? ThisNumberValue(*this* value). 1. Let _fractionCount_ be ? ToIntegerOrInfinity(_fractionDigits_). 1. Assert: If _fractionDigits_ is *undefined*, then _fractionCount_ is 0. - 1. If _numberValue_ is not finite, return Number::toString(_numberValue_, 10). + 1. If _number_ is not finite, return Number::toString(_number_, 10). 1. If _fractionCount_ < 0 or _fractionCount_ > 100, throw a *RangeError* exception. - 1. Set _numberValue_ to ℝ(_numberValue_). + 1. Set _number_ to ℝ(_number_). 1. Let _sign_ be the empty String. - 1. If _numberValue_ < 0, then + 1. If _number_ < 0, then 1. Set _sign_ to *"-"*. - 1. Set _numberValue_ to -_numberValue_. - 1. If _numberValue_ = 0, then + 1. Set _number_ to -_number_. + 1. If _number_ = 0, then 1. Let _significand_ be the String value consisting of _fractionCount_ + 1 occurrences of the code unit 0x0030 (DIGIT ZERO). 1. Let _exponent_ be 0. 1. Else, 1. If _fractionDigits_ is not *undefined*, then - 1. Let _exponent_ and _intSignificand_ be integers such that 10_fractionCount_ ≤ _intSignificand_ < 10_fractionCount_ + 1 and for which _intSignificand_ × 10_exponent_ - _fractionCount_ - _numberValue_ is as close to zero as possible. If there are two such sets of _exponent_ and _intSignificand_, pick the _exponent_ and _intSignificand_ for which _intSignificand_ × 10_exponent_ - _fractionCount_ is larger. + 1. Let _exponent_ and _intSignificand_ be integers such that 10_fractionCount_ ≤ _intSignificand_ < 10_fractionCount_ + 1 and for which _intSignificand_ × 10_exponent_ - _fractionCount_ - _number_ is as close to zero as possible. If there are two such sets of _exponent_ and _intSignificand_, pick the _exponent_ and _intSignificand_ for which _intSignificand_ × 10_exponent_ - _fractionCount_ is larger. 1. Else, - 1. [id="step-number-proto-toexponential-intermediate-values"] Let _exponent_, _intSignificand_, and _ff_ be integers such that _ff_ ≥ 0, 10_ff_ ≤ _intSignificand_ < 10_ff_ + 1, 𝔽(_intSignificand_ × 10_exponent_ - _ff_) is 𝔽(_numberValue_), and _ff_ is as small as possible. Note that the decimal representation of _intSignificand_ has _ff_ + 1 digits, _intSignificand_ is not divisible by 10, and the least significant digit of _intSignificand_ is not necessarily uniquely determined by these criteria. + 1. [id="step-number-proto-toexponential-intermediate-values"] Let _exponent_, _intSignificand_, and _ff_ be integers such that _ff_ ≥ 0, 10_ff_ ≤ _intSignificand_ < 10_ff_ + 1, 𝔽(_intSignificand_ × 10_exponent_ - _ff_) is 𝔽(_number_), and _ff_ is as small as possible. Note that the decimal representation of _intSignificand_ has _ff_ + 1 digits, _intSignificand_ is not divisible by 10, and the least significant digit of _intSignificand_ is not necessarily uniquely determined by these criteria. 1. Set _fractionCount_ to _ff_. 1. Let _significand_ be the String value consisting of the digits of the decimal representation of _intSignificand_ (in order, with no leading zeroes). 1. If _fractionCount_ ≠ 0, then - 1. Let _integerPart_ be the first code unit of _significand_. + 1. Let _intPart_ be the first code unit of _significand_. 1. Let _fractionalPart_ be the other _fractionCount_ code units of _significand_. - 1. Set _significand_ to the string-concatenation of _integerPart_, *"."*, and _fractionalPart_. + 1. Set _significand_ to the string-concatenation of _intPart_, *"."*, and _fractionalPart_. 1. If _exponent_ = 0, then 1. Let _exponentSign_ be *"+"*. 1. Let _exponentDigits_ be *"0"*. @@ -32376,7 +32372,7 @@

    Number.prototype.toExponential ( _fractionDigits_ )

    For implementations that provide more accurate conversions than required by the rules above, it is recommended that the following alternative version of step be used as a guideline:

    - 1. Let _exponent_, _intSignificand_, and _ff_ be integers such that _ff_ ≥ 0, 10_ff_ ≤ _intSignificand_ < 10_ff_ + 1, 𝔽(_intSignificand_ × 10_exponent_ - _ff_) is 𝔽(_numberValue_), and _ff_ is as small as possible. If there are multiple possibilities for _intSignificand_, choose _intSignificand_ such that 𝔽(_intSignificand_ × 10_exponent_ - _ff_) is closest to 𝔽(_numberValue_). If there are two such possible values of _intSignificand_, choose the one that is even. + 1. Let _exponent_, _intSignificand_, and _ff_ be integers such that _ff_ ≥ 0, 10_ff_ ≤ _intSignificand_ < 10_ff_ + 1, 𝔽(_intSignificand_ × 10_exponent_ - _ff_) is 𝔽(_number_), and _ff_ is as small as possible. If there are multiple possibilities for _intSignificand_, choose _intSignificand_ such that 𝔽(_intSignificand_ × 10_exponent_ - _ff_) is closest to 𝔽(_number_). If there are two such possible values of _intSignificand_, choose the one that is even.
    @@ -32388,21 +32384,21 @@

    Number.prototype.toFixed ( _fractionDigits_ )

    It performs the following steps when called:

    - 1. Let _numberValue_ be ? ThisNumberValue(*this* value). + 1. Let _number_ be ? ThisNumberValue(*this* value). 1. Let _fractionCount_ be ? ToIntegerOrInfinity(_fractionDigits_). 1. Assert: If _fractionDigits_ is *undefined*, then _fractionCount_ is 0. 1. If _fractionCount_ is not finite, throw a *RangeError* exception. 1. If _fractionCount_ < 0 or _fractionCount_ > 100, throw a *RangeError* exception. - 1. If _numberValue_ is not finite, return Number::toString(_numberValue_, 10). - 1. Set _numberValue_ to ℝ(_numberValue_). + 1. If _number_ is not finite, return Number::toString(_number_, 10). + 1. Set _number_ to ℝ(_number_). 1. Let _sign_ be the empty String. - 1. If _numberValue_ < 0, then + 1. If _number_ < 0, then 1. Set _sign_ to *"-"*. - 1. Set _numberValue_ to -_numberValue_. - 1. If _numberValue_ ≥ 1021, then - 1. Let _digitString_ be ! ToString(𝔽(_numberValue_)). + 1. Set _number_ to -_number_. + 1. If _number_ ≥ 1021, then + 1. Let _digitString_ be ! ToString(𝔽(_number_)). 1. Else, - 1. Let _intValue_ be an integer for which _intValue_ / 10_fractionCount_ - _numberValue_ is as close to zero as possible. If there are two such _intValue_, pick the larger _intValue_. + 1. Let _intValue_ be an integer for which _intValue_ / 10_fractionCount_ - _number_ is as close to zero as possible. If there are two such _intValue_, pick the larger _intValue_. 1. If _intValue_ = 0, let _digitString_ be *"0"*; else let _digitString_ be the String value consisting of the digits of the decimal representation of _intValue_ (in order, with no leading zeroes). 1. If _fractionCount_ ≠ 0, then 1. Let _digitCount_ be the length of _digitString_. @@ -32410,9 +32406,9 @@

    Number.prototype.toFixed ( _fractionDigits_ )

    1. Let _zeroPad_ be the String value consisting of _fractionCount_ + 1 - _digitCount_ occurrences of the code unit 0x0030 (DIGIT ZERO). 1. Set _digitString_ to the string-concatenation of _zeroPad_ and _digitString_. 1. Set _digitCount_ to _fractionCount_ + 1. - 1. Let _integerPart_ be the first _digitCount_ - _fractionCount_ code units of _digitString_. + 1. Let _intPart_ be the first _digitCount_ - _fractionCount_ code units of _digitString_. 1. Let _fractionalPart_ be the other _fractionCount_ code units of _digitString_. - 1. Set _digitString_ to the string-concatenation of _integerPart_, *"."*, and _fractionalPart_. + 1. Set _digitString_ to the string-concatenation of _intPart_, *"."*, and _fractionalPart_. 1. Return the string-concatenation of _sign_ and _digitString_.
    @@ -32436,28 +32432,28 @@

    Number.prototype.toPrecision ( _precision_ )

    This method returns a String containing this Number value represented either in decimal exponential notation with one digit before the significand's decimal point and _precision_ - 1 digits after the significand's decimal point or in decimal fixed notation with _precision_ significant digits. If _precision_ is *undefined*, it calls ToString instead.

    It performs the following steps when called:

    - 1. Let _numberValue_ be ? ThisNumberValue(*this* value). - 1. If _precision_ is *undefined*, return ! ToString(_numberValue_). + 1. Let _number_ be ? ThisNumberValue(*this* value). + 1. If _precision_ is *undefined*, return ! ToString(_number_). 1. Let _precisionCount_ be ? ToIntegerOrInfinity(_precision_). - 1. If _numberValue_ is not finite, return Number::toString(_numberValue_, 10). + 1. If _number_ is not finite, return Number::toString(_number_, 10). 1. If _precisionCount_ < 1 or _precisionCount_ > 100, throw a *RangeError* exception. - 1. Set _numberValue_ to ℝ(_numberValue_). + 1. Set _number_ to ℝ(_number_). 1. Let _sign_ be the empty String. - 1. If _numberValue_ < 0, then + 1. If _number_ < 0, then 1. Set _sign_ to the code unit 0x002D (HYPHEN-MINUS). - 1. Set _numberValue_ to -_numberValue_. - 1. If _numberValue_ = 0, then + 1. Set _number_ to -_number_. + 1. If _number_ = 0, then 1. Let _significand_ be the String value consisting of _precisionCount_ occurrences of the code unit 0x0030 (DIGIT ZERO). 1. Let _exponent_ be 0. 1. Else, - 1. Let _exponent_ and _intSignificand_ be integers such that 10_precisionCount_ - 1 ≤ _intSignificand_ < 10_precisionCount_ and for which _intSignificand_ × 10_exponent_ - _precisionCount_ + 1 - _numberValue_ is as close to zero as possible. If there are two such sets of _exponent_ and _intSignificand_, pick the _exponent_ and _intSignificand_ for which _intSignificand_ × 10_exponent_ - _precisionCount_ + 1 is larger. + 1. Let _exponent_ and _intSignificand_ be integers such that 10_precisionCount_ - 1 ≤ _intSignificand_ < 10_precisionCount_ and for which _intSignificand_ × 10_exponent_ - _precisionCount_ + 1 - _number_ is as close to zero as possible. If there are two such sets of _exponent_ and _intSignificand_, pick the _exponent_ and _intSignificand_ for which _intSignificand_ × 10_exponent_ - _precisionCount_ + 1 is larger. 1. Let _significand_ be the String value consisting of the digits of the decimal representation of _intSignificand_ (in order, with no leading zeroes). 1. If _exponent_ < -6 or _exponent_ ≥ _precisionCount_, then 1. Assert: _exponent_ ≠ 0. 1. If _precisionCount_ ≠ 1, then - 1. Let _integerPart_ be the first code unit of _significand_. + 1. Let _intPart_ be the first code unit of _significand_. 1. Let _fractionalPart_ be the other _precisionCount_ - 1 code units of _significand_. - 1. Set _significand_ to the string-concatenation of _integerPart_, *"."*, and _fractionalPart_. + 1. Set _significand_ to the string-concatenation of _intPart_, *"."*, and _fractionalPart_. 1. If _exponent_ > 0, then 1. Let _exponentSign_ be the code unit 0x002B (PLUS SIGN). 1. Else, @@ -32501,17 +32497,17 @@

    Number.prototype.valueOf ( )

    ThisNumberValue ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a Number or a throw completion

    - 1. If _value_ is a Number, return _value_. - 1. If _value_ is an Object and _value_ has a [[NumberData]] internal slot, then - 1. Let _n_ be _value_.[[NumberData]]. - 1. Assert: _n_ is a Number. - 1. Return _n_. + 1. If _arg_ is a Number, return _arg_. + 1. If _arg_ is an Object and _arg_ has a [[NumberData]] internal slot, then + 1. Let _number_ be _arg_.[[NumberData]]. + 1. Assert: _number_ is a Number. + 1. Return _number_. 1. Throw a *TypeError* exception.
    @@ -32542,9 +32538,9 @@

    BigInt ( _value_ )

    This function performs the following steps when called:

    1. If NewTarget is not *undefined*, throw a *TypeError* exception. - 1. Let _prim_ be ? ToPrimitive(_value_, ~number~). - 1. If _prim_ is a Number, return ? NumberToBigInt(_prim_). - 1. Return ? ToBigInt(_prim_). + 1. Let _primitive_ be ? ToPrimitive(_value_, ~number~). + 1. If _primitive_ is a Number, return ? NumberToBigInt(_primitive_). + 1. Return ? ToBigInt(_primitive_). @@ -32577,9 +32573,9 @@

    BigInt.asIntN ( _bits_, _bigint_ )

    1. Set _bits_ to ? ToIndex(_bits_). 1. Set _bigint_ to ? ToBigInt(_bigint_). - 1. Let _mod_ be ℝ(_bigint_) modulo 2_bits_. - 1. If _mod_ ≥ 2_bits_ - 1, return ℤ(_mod_ - 2_bits_). - 1. Return ℤ(_mod_). + 1. Let _module_ be ℝ(_bigint_) modulo 2_bits_. + 1. If _module_ ≥ 2_bits_ - 1, return ℤ(_module_ - 2_bits_). + 1. Return ℤ(_module_).
    @@ -32648,16 +32644,16 @@

    BigInt.prototype.valueOf ( )

    ThisBigIntValue ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a BigInt or a throw completion

    - 1. If _value_ is a BigInt, return _value_. - 1. If _value_ is an Object and _value_ has a [[BigIntData]] internal slot, then - 1. Assert: _value_.[[BigIntData]] is a BigInt. - 1. Return _value_.[[BigIntData]]. + 1. If _arg_ is a BigInt, return _arg_. + 1. If _arg_ is an Object and _arg_ has a [[BigIntData]] internal slot, then + 1. Assert: _arg_.[[BigIntData]] is a BigInt. + 1. Return _arg_.[[BigIntData]]. 1. Throw a *TypeError* exception.
    @@ -32887,13 +32883,13 @@

    Math.atan2 ( _y_, _x_ )

    1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing -π. 1. If _nx_ is either *+0*𝔽 or *-0*𝔽, return an implementation-approximated Number value representing -π / 2. 1. Assert: _nx_ is finite and is neither *+0*𝔽 nor *-0*𝔽. - 1. Let _r_ be the inverse tangent of abs(ℝ(_ny_) / ℝ(_nx_)). + 1. Let _result_ be the inverse tangent of abs(ℝ(_ny_) / ℝ(_nx_)). 1. If _nx_ < *-0*𝔽, then - 1. If _ny_ > *+0*𝔽, set _r_ to π - _r_. - 1. Else, set _r_ to -π + _r_. + 1. If _ny_ > *+0*𝔽, set _result_ to π - _result_. + 1. Else, set _result_ to -π + _result_. 1. Else, - 1. If _ny_ < *-0*𝔽, set _r_ to -_r_. - 1. Return an implementation-approximated Number value representing _r_. + 1. If _ny_ < *-0*𝔽, set _result_ to -_result_. + 1. Return an implementation-approximated Number value representing _result_.
    @@ -33356,7 +33352,7 @@

    Overview of Date Objects and Definitions of Abstract Operations

    Time Values and Time Range

    Time measurement in ECMAScript is analogous to time measurement in POSIX, in particular sharing definition in terms of the proleptic Gregorian calendar, an epoch of midnight at the beginning of 1 January 1970 UTC, and an accounting of every day as comprising exactly 86,400 seconds (each of which is 1000 milliseconds long).

    -

    An ECMAScript time value is a Number, either a finite integral Number representing an instant in time to millisecond precision or *NaN* representing no specific instant. A time value that is a multiple of 24 × 60 × 60 × 1000 = 86,400,000 (i.e., is 86,400,000 × _d_ for some integer _d_) represents the instant at the start of the UTC day that follows the epoch by _d_ whole UTC days (preceding the epoch for negative _d_). Every other finite time value _t_ is defined relative to the greatest preceding time value _s_ that is such a multiple, and represents the instant that occurs within the same UTC day as _s_ but follows it by (_t_ - _s_) milliseconds.

    +

    An ECMAScript time value is a Number, either a finite integral Number representing an instant in time to millisecond precision or *NaN* representing no specific instant. A time value that is a multiple of 24 × 60 × 60 × 1000 = 86,400,000 (i.e., is 86,400,000 × _d_ for some integer _d_) represents the instant at the start of the UTC day that follows the epoch by _d_ whole UTC days (preceding the epoch for negative _d_). Every other finite time value _tv_ is defined relative to the greatest preceding time value _s_ that is such a multiple, and represents the instant that occurs within the same UTC day as _s_ but follows it by (_tv_ - _s_) milliseconds.

    Time values do not account for UTC leap seconds—there are no time values representing instants within positive leap seconds, and there are time values representing instants removed from the UTC timeline by negative leap seconds. However, the definition of time values nonetheless yields piecewise alignment with UTC, with discontinuities only at leap second boundaries and zero difference outside of leap seconds.

    A Number can exactly represent all integers from -9,007,199,254,740,992 to 9,007,199,254,740,992 ( and ). A time value supports a slightly smaller range of -8,640,000,000,000,000 to 8,640,000,000,000,000 milliseconds. This yields a supported time value range of exactly -100,000,000 days to 100,000,000 days relative to midnight at the beginning of 1 January 1970 UTC.

    The exact moment of midnight at the beginning of 1 January 1970 UTC is represented by the time value *+0*𝔽.

    @@ -33381,30 +33377,30 @@

    Time-related Constants

    Day ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number

    description
    -
    It returns the day number of the day in which _t_ falls.
    +
    It returns the day number of the day in which _tv_ falls.
    - 1. Return 𝔽(floor(ℝ(_t_ / msPerDay))). + 1. Return 𝔽(floor(ℝ(_tv_ / msPerDay))).

    TimeWithinDay ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the interval from *+0*𝔽 (inclusive) to msPerDay (exclusive)

    description
    -
    It returns the number of milliseconds since the start of the day in which _t_ falls.
    +
    It returns the number of milliseconds since the start of the day in which _tv_ falls.
    - 1. Return 𝔽(ℝ(_t_) modulo ℝ(msPerDay)). + 1. Return 𝔽(ℝ(_tv_) modulo ℝ(msPerDay)).
    @@ -33439,12 +33435,12 @@

    1. Let _ry_ be ℝ(_y_). - 1. [declared="numYears1,numYears4,numYears100,numYears400"] NOTE: In the following steps, _numYears1_, _numYears4_, _numYears100_, and _numYears400_ represent the number of years divisible by 1, 4, 100, and 400, respectively, that occur between the epoch and the start of year _y_. The number is negative if _y_ is before the epoch. - 1. Let _numYears1_ be (_ry_ - 1970). - 1. Let _numYears4_ be floor((_ry_ - 1969) / 4). - 1. Let _numYears100_ be floor((_ry_ - 1901) / 100). - 1. Let _numYears400_ be floor((_ry_ - 1601) / 400). - 1. Return 𝔽(365 × _numYears1_ + _numYears4_ - _numYears100_ + _numYears400_). + 1. [declared="numberYears1,numberYears4,numberYears100,numberYears400"] NOTE: In the following steps, _numberYears1_, _numberYears4_, _numberYears100_, and _numberYears400_ represent the number of years divisible by 1, 4, 100, and 400, respectively, that occur between the epoch and the start of year _y_. The number is negative if _y_ is before the epoch. + 1. Let _numberYears1_ be (_ry_ - 1970). + 1. Let _numberYears4_ be floor((_ry_ - 1969) / 4). + 1. Let _numberYears100_ be floor((_ry_ - 1901) / 100). + 1. Let _numberYears400_ be floor((_ry_ - 1601) / 400). + 1. Return 𝔽(365 × _numberYears1_ + _numberYears4_ - _numberYears100_ + _numberYears400_).
    @@ -33466,43 +33462,43 @@

    YearFromTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number

    description
    -
    It returns the year in which _t_ falls.
    +
    It returns the year in which _tv_ falls.
    - 1. [declared="y"] Return the largest integral Number _y_ (closest to +∞) such that TimeFromYear(_y_) ≤ _t_. + 1. [declared="y"] Return the largest integral Number _y_ (closest to +∞) such that TimeFromYear(_y_) ≤ _tv_.

    DayWithinYear ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *+0*𝔽 to *365*𝔽

    - 1. Return Day(_t_) - DayFromYear(YearFromTime(_t_)). + 1. Return Day(_tv_) - DayFromYear(YearFromTime(_tv_)).

    InLeapYear ( - _t_: a finite time value, + _tv_: a finite time value, ): *+0*𝔽 or *1*𝔽

    description
    -
    It returns *1*𝔽 if _t_ is within a leap year and *+0*𝔽 otherwise.
    +
    It returns *1*𝔽 if _tv_ is within a leap year and *+0*𝔽 otherwise.
    - 1. If DaysInYear(YearFromTime(_t_)) is *366*𝔽, return *1*𝔽. + 1. If DaysInYear(YearFromTime(_tv_)) is *366*𝔽, return *1*𝔽. 1. Return *+0*𝔽.
    @@ -33510,16 +33506,16 @@

    MonthFromTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *+0*𝔽 to *11*𝔽

    description
    -
    It returns a Number identifying the month in which _t_ falls. A month value of *+0*𝔽 specifies January; *1*𝔽 specifies February; *2*𝔽 specifies March; *3*𝔽 specifies April; *4*𝔽 specifies May; *5*𝔽 specifies June; *6*𝔽 specifies July; *7*𝔽 specifies August; *8*𝔽 specifies September; *9*𝔽 specifies October; *10*𝔽 specifies November; and *11*𝔽 specifies December. Note that MonthFromTime(*+0*𝔽) = *+0*𝔽, corresponding to Thursday, 1 January 1970.
    +
    It returns a Number identifying the month in which _tv_ falls. A month value of *+0*𝔽 specifies January; *1*𝔽 specifies February; *2*𝔽 specifies March; *3*𝔽 specifies April; *4*𝔽 specifies May; *5*𝔽 specifies June; *6*𝔽 specifies July; *7*𝔽 specifies August; *8*𝔽 specifies September; *9*𝔽 specifies October; *10*𝔽 specifies November; and *11*𝔽 specifies December. Note that MonthFromTime(*+0*𝔽) = *+0*𝔽, corresponding to Thursday, 1 January 1970.
    - 1. Let _inLeapYear_ be InLeapYear(_t_). - 1. Let _dayWithinYear_ be DayWithinYear(_t_). + 1. Let _inLeapYear_ be InLeapYear(_tv_). + 1. Let _dayWithinYear_ be DayWithinYear(_tv_). 1. If _dayWithinYear_ < *31*𝔽, return *+0*𝔽. 1. If _dayWithinYear_ < *59*𝔽 + _inLeapYear_, return *1*𝔽. 1. If _dayWithinYear_ < *90*𝔽 + _inLeapYear_, return *2*𝔽. @@ -33539,17 +33535,17 @@

    DateFromTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *1*𝔽 to *31*𝔽

    description
    -
    It returns the day of the month in which _t_ falls.
    +
    It returns the day of the month in which _tv_ falls.
    - 1. Let _inLeapYear_ be InLeapYear(_t_). - 1. Let _dayWithinYear_ be DayWithinYear(_t_). - 1. Let _month_ be MonthFromTime(_t_). + 1. Let _inLeapYear_ be InLeapYear(_tv_). + 1. Let _dayWithinYear_ be DayWithinYear(_tv_). + 1. Let _month_ be MonthFromTime(_tv_). 1. If _month_ is *+0*𝔽, return _dayWithinYear_ + *1*𝔽. 1. If _month_ is *1*𝔽, return _dayWithinYear_ - *30*𝔽. 1. If _month_ is *2*𝔽, return _dayWithinYear_ - *58*𝔽 - _inLeapYear_. @@ -33569,75 +33565,75 @@

    WeekDay ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *+0*𝔽 to *6*𝔽

    description
    -
    It returns a Number identifying the day of the week in which _t_ falls. A weekday value of *+0*𝔽 specifies Sunday; *1*𝔽 specifies Monday; *2*𝔽 specifies Tuesday; *3*𝔽 specifies Wednesday; *4*𝔽 specifies Thursday; *5*𝔽 specifies Friday; and *6*𝔽 specifies Saturday. Note that WeekDay(*+0*𝔽) = *4*𝔽, corresponding to Thursday, 1 January 1970.
    +
    It returns a Number identifying the day of the week in which _tv_ falls. A weekday value of *+0*𝔽 specifies Sunday; *1*𝔽 specifies Monday; *2*𝔽 specifies Tuesday; *3*𝔽 specifies Wednesday; *4*𝔽 specifies Thursday; *5*𝔽 specifies Friday; and *6*𝔽 specifies Saturday. Note that WeekDay(*+0*𝔽) = *4*𝔽, corresponding to Thursday, 1 January 1970.
    - 1. Return 𝔽(ℝ(Day(_t_) + *4*𝔽) modulo 7). + 1. Return 𝔽(ℝ(Day(_tv_) + *4*𝔽) modulo 7).

    HourFromTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *+0*𝔽 to *23*𝔽

    description
    -
    It returns the hour of the day in which _t_ falls.
    +
    It returns the hour of the day in which _tv_ falls.
    - 1. Return 𝔽(floor(ℝ(_t_ / msPerHour)) modulo HoursPerDay). + 1. Return 𝔽(floor(ℝ(_tv_ / msPerHour)) modulo HoursPerDay).

    MinFromTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *+0*𝔽 to *59*𝔽

    description
    -
    It returns the minute of the hour in which _t_ falls.
    +
    It returns the minute of the hour in which _tv_ falls.
    - 1. Return 𝔽(floor(ℝ(_t_ / msPerMinute)) modulo MinutesPerHour). + 1. Return 𝔽(floor(ℝ(_tv_ / msPerMinute)) modulo MinutesPerHour).

    SecFromTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *+0*𝔽 to *59*𝔽

    description
    -
    It returns the second of the minute in which _t_ falls.
    +
    It returns the second of the minute in which _tv_ falls.
    - 1. Return 𝔽(floor(ℝ(_t_ / msPerSecond)) modulo SecondsPerMinute). + 1. Return 𝔽(floor(ℝ(_tv_ / msPerSecond)) modulo SecondsPerMinute).

    msFromTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number in the inclusive interval from *+0*𝔽 to *999*𝔽

    description
    -
    It returns the millisecond of the second in which _t_ falls.
    +
    It returns the millisecond of the second in which _tv_ falls.
    - 1. Return 𝔽(ℝ(_t_) modulo ℝ(msPerSecond)). + 1. Return 𝔽(ℝ(_tv_) modulo ℝ(msPerSecond)).
    @@ -33808,7 +33804,7 @@

    AvailableNamedTimeZoneIdentifiers ( ): a List of Time Zone Identifier Record 1. NOTE: An implementation may need to resolve _identifier_ iteratively to obtain the primary time zone identifier. 1. Let _record_ be the Time Zone Identifier Record { [[Identifier]]: _identifier_, [[PrimaryIdentifier]]: _primary_ }. 1. Append _record_ to _result_. - 1. Assert: _result_ contains a Time Zone Identifier Record _r_ such that _r_.[[Identifier]] is *"UTC"* and _r_.[[PrimaryIdentifier]] is *"UTC"*. + 1. Assert: _result_ contains a Time Zone Identifier Record _record_ such that _record_.[[Identifier]] is *"UTC"* and _record_.[[PrimaryIdentifier]] is *"UTC"*. 1. Return _result_. @@ -33840,14 +33836,14 @@

    SystemTimeZoneIdentifier ( ): a String

    LocalTime ( - _t_: a finite time value, + _tv_: a finite time value, ): an integral Number

    description
    - It converts _t_ from UTC to local time. - The local political rules for standard time and daylight saving time in effect at _t_ should be used to determine the result in the way specified in this section. + It converts _tv_ from UTC to local time. + The local political rules for standard time and daylight saving time in effect at _tv_ should be used to determine the result in the way specified in this section.
    @@ -33855,19 +33851,19 @@

    1. If IsTimeZoneOffsetString(_systemTimeZoneIdentifier_) is *true*, then 1. Let _offsetNs_ be ParseTimeZoneOffsetString(_systemTimeZoneIdentifier_). 1. Else, - 1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_systemTimeZoneIdentifier_, ℤ(ℝ(_t_) × 106)). + 1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_systemTimeZoneIdentifier_, ℤ(ℝ(_tv_) × 106)). 1. Let _offsetMs_ be truncate(_offsetNs_ / 106). - 1. Return _t_ + 𝔽(_offsetMs_). + 1. Return _tv_ + 𝔽(_offsetMs_). -

    If political rules for the local time _t_ are not available within the implementation, the result is _t_ because SystemTimeZoneIdentifier returns *"UTC"* and GetNamedTimeZoneOffsetNanoseconds returns 0.

    +

    If political rules for the local time _tv_ are not available within the implementation, the result is _tv_ because SystemTimeZoneIdentifier returns *"UTC"* and GetNamedTimeZoneOffsetNanoseconds returns 0.

    It is required for time zone aware implementations (and recommended for all others) to use the time zone information of the IANA Time Zone Database https://www.iana.org/time-zones/.

    -

    Two different input time values _t_UTC are converted to the same local time tlocal at a negative time zone transition when there are repeated times (e.g. the daylight saving time ends or the time zone adjustment is decreased.).

    -

    LocalTime(UTC(_t_local)) is not necessarily always equal to _t_local. Correspondingly, UTC(LocalTime(_t_UTC)) is not necessarily always equal to _t_UTC.

    +

    Two different input time values _tv_UTC are converted to the same local time tlocal at a negative time zone transition when there are repeated times (e.g. the daylight saving time ends or the time zone adjustment is decreased.).

    +

    LocalTime(UTC(_tv_local)) is not necessarily always equal to _tv_local. Correspondingly, UTC(LocalTime(_tv_UTC)) is not necessarily always equal to _tv_UTC.

    @@ -33971,8 +33967,8 @@

    1. Let _ym_ be _y_ + 𝔽(floor(ℝ(_m_) / 12)). 1. If _ym_ is not finite, return *NaN*. 1. Let _mn_ be 𝔽(ℝ(_m_) modulo 12). - 1. Find a finite time value _t_ such that YearFromTime(_t_) is _ym_, MonthFromTime(_t_) is _mn_, and DateFromTime(_t_) is *1*𝔽; but if this is not possible (because some argument is out of range), return *NaN*. - 1. Return Day(_t_) + _dt_ - *1*𝔽. + 1. Find a finite time value _tv_ such that YearFromTime(_tv_) is _ym_, MonthFromTime(_tv_) is _mn_, and DateFromTime(_tv_) is *1*𝔽; but if this is not possible (because some argument is out of range), return *NaN*. + 1. Return Day(_tv_) + _dt_ - *1*𝔽. @@ -34447,11 +34443,11 @@

    Date.prototype.constructor

    Date.prototype.getDate ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return DateFromTime(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return DateFromTime(LocalTime(_tv_)).
    @@ -34459,11 +34455,11 @@

    Date.prototype.getDate ( )

    Date.prototype.getDay ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return WeekDay(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return WeekDay(LocalTime(_tv_)).
    @@ -34471,11 +34467,11 @@

    Date.prototype.getDay ( )

    Date.prototype.getFullYear ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return YearFromTime(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return YearFromTime(LocalTime(_tv_)).
    @@ -34483,11 +34479,11 @@

    Date.prototype.getFullYear ( )

    Date.prototype.getHours ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return HourFromTime(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return HourFromTime(LocalTime(_tv_)). @@ -34495,11 +34491,11 @@

    Date.prototype.getHours ( )

    Date.prototype.getMilliseconds ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return msFromTime(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return msFromTime(LocalTime(_tv_)). @@ -34507,11 +34503,11 @@

    Date.prototype.getMilliseconds ( )

    Date.prototype.getMinutes ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return MinFromTime(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return MinFromTime(LocalTime(_tv_)). @@ -34519,11 +34515,11 @@

    Date.prototype.getMinutes ( )

    Date.prototype.getMonth ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return MonthFromTime(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return MonthFromTime(LocalTime(_tv_)). @@ -34531,11 +34527,11 @@

    Date.prototype.getMonth ( )

    Date.prototype.getSeconds ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return SecFromTime(LocalTime(_t_)). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return SecFromTime(LocalTime(_tv_)). @@ -34543,9 +34539,9 @@

    Date.prototype.getSeconds ( )

    Date.prototype.getTime ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Return _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Return _dateObj_.[[DateValue]]. @@ -34553,11 +34549,11 @@

    Date.prototype.getTime ( )

    Date.prototype.getTimezoneOffset ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return (_t_ - LocalTime(_t_)) / msPerMinute. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return (_tv_ - LocalTime(_tv_)) / msPerMinute. @@ -34565,11 +34561,11 @@

    Date.prototype.getTimezoneOffset ( )

    Date.prototype.getUTCDate ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return DateFromTime(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return DateFromTime(_tv_). @@ -34577,11 +34573,11 @@

    Date.prototype.getUTCDate ( )

    Date.prototype.getUTCDay ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return WeekDay(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return WeekDay(_tv_). @@ -34589,11 +34585,11 @@

    Date.prototype.getUTCDay ( )

    Date.prototype.getUTCFullYear ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return YearFromTime(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return YearFromTime(_tv_). @@ -34601,11 +34597,11 @@

    Date.prototype.getUTCFullYear ( )

    Date.prototype.getUTCHours ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return HourFromTime(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return HourFromTime(_tv_). @@ -34613,11 +34609,11 @@

    Date.prototype.getUTCHours ( )

    Date.prototype.getUTCMilliseconds ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return msFromTime(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return msFromTime(_tv_). @@ -34625,11 +34621,11 @@

    Date.prototype.getUTCMilliseconds ( )

    Date.prototype.getUTCMinutes ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return MinFromTime(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return MinFromTime(_tv_). @@ -34637,11 +34633,11 @@

    Date.prototype.getUTCMinutes ( )

    Date.prototype.getUTCMonth ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return MonthFromTime(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return MonthFromTime(_tv_). @@ -34649,11 +34645,11 @@

    Date.prototype.getUTCMonth ( )

    Date.prototype.getUTCSeconds ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return SecFromTime(_t_). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return SecFromTime(_tv_). @@ -34661,15 +34657,15 @@

    Date.prototype.getUTCSeconds ( )

    Date.prototype.setDate ( _date_ )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _dt_ be ? ToNumber(_date_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Set _t_ to LocalTime(_t_). - 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_t_), MonthFromTime(_t_), _dt_), TimeWithinDay(_t_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. Set _tv_ to LocalTime(_tv_). + 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_tv_), MonthFromTime(_tv_), _dt_), TimeWithinDay(_tv_)). 1. Let _u_ be TimeClip(UTC(_newDate_)). - 1. Set _dateObject_.[[DateValue]] to _u_. + 1. Set _dateObj_.[[DateValue]] to _u_. 1. Return _u_. @@ -34678,16 +34674,16 @@

    Date.prototype.setDate ( _date_ )

    Date.prototype.setFullYear ( _year_ [ , _month_ [ , _date_ ] ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _y_ be ? ToNumber(_year_). - 1. If _t_ is *NaN*, set _t_ to *+0*𝔽; else set _t_ to LocalTime(_t_). - 1. If _month_ is present, let _m_ be ? ToNumber(_month_); else let _m_ be MonthFromTime(_t_). - 1. If _date_ is present, let _dt_ be ? ToNumber(_date_); else let _dt_ be DateFromTime(_t_). - 1. Let _newDate_ be MakeDate(MakeDay(_y_, _m_, _dt_), TimeWithinDay(_t_)). + 1. If _tv_ is *NaN*, set _tv_ to *+0*𝔽; else set _tv_ to LocalTime(_tv_). + 1. If _month_ is present, let _m_ be ? ToNumber(_month_); else let _m_ be MonthFromTime(_tv_). + 1. If _date_ is present, let _dt_ be ? ToNumber(_date_); else let _dt_ be DateFromTime(_tv_). + 1. Let _newDate_ be MakeDate(MakeDay(_y_, _m_, _dt_), TimeWithinDay(_tv_)). 1. Let _u_ be TimeClip(UTC(_newDate_)). - 1. Set _dateObject_.[[DateValue]] to _u_. + 1. Set _dateObj_.[[DateValue]] to _u_. 1. Return _u_.

    The *"length"* property of this method is *3*𝔽.

    @@ -34700,21 +34696,21 @@

    Date.prototype.setFullYear ( _year_ [ , _month_ [ , _date_ ] ] )

    Date.prototype.setHours ( _hour_ [ , _min_ [ , _sec_ [ , _ms_ ] ] ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _h_ be ? ToNumber(_hour_). 1. If _min_ is present, let _m_ be ? ToNumber(_min_). 1. If _sec_ is present, let _s_ be ? ToNumber(_sec_). 1. If _ms_ is present, let _milli_ be ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Set _t_ to LocalTime(_t_). - 1. If _min_ is not present, let _m_ be MinFromTime(_t_). - 1. If _sec_ is not present, let _s_ be SecFromTime(_t_). - 1. If _ms_ is not present, let _milli_ be msFromTime(_t_). - 1. Let _date_ be MakeDate(Day(_t_), MakeTime(_h_, _m_, _s_, _milli_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. Set _tv_ to LocalTime(_tv_). + 1. If _min_ is not present, let _m_ be MinFromTime(_tv_). + 1. If _sec_ is not present, let _s_ be SecFromTime(_tv_). + 1. If _ms_ is not present, let _milli_ be msFromTime(_tv_). + 1. Let _date_ be MakeDate(Day(_tv_), MakeTime(_h_, _m_, _s_, _milli_)). 1. Let _u_ be TimeClip(UTC(_date_)). - 1. Set _dateObject_.[[DateValue]] to _u_. + 1. Set _dateObj_.[[DateValue]] to _u_. 1. Return _u_.

    The *"length"* property of this method is *4*𝔽.

    @@ -34727,15 +34723,15 @@

    Date.prototype.setHours ( _hour_ [ , _min_ [ , _sec_ [ , _ms_ ] ] ] )

    Date.prototype.setMilliseconds ( _ms_ )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Set _ms_ to ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Set _t_ to LocalTime(_t_). - 1. Let _time_ be MakeTime(HourFromTime(_t_), MinFromTime(_t_), SecFromTime(_t_), _ms_). - 1. Let _u_ be TimeClip(UTC(MakeDate(Day(_t_), _time_))). - 1. Set _dateObject_.[[DateValue]] to _u_. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Set _tv_ to LocalTime(_tv_). + 1. Let _time_ be MakeTime(HourFromTime(_tv_), MinFromTime(_tv_), SecFromTime(_tv_), _ms_). + 1. Let _u_ be TimeClip(UTC(MakeDate(Day(_tv_), _time_))). + 1. Set _dateObj_.[[DateValue]] to _u_. 1. Return _u_. @@ -34744,19 +34740,19 @@

    Date.prototype.setMilliseconds ( _ms_ )

    Date.prototype.setMinutes ( _min_ [ , _sec_ [ , _ms_ ] ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _m_ be ? ToNumber(_min_). 1. If _sec_ is present, let _s_ be ? ToNumber(_sec_). 1. If _ms_ is present, let _milli_ be ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Set _t_ to LocalTime(_t_). - 1. If _sec_ is not present, let _s_ be SecFromTime(_t_). - 1. If _ms_ is not present, let _milli_ be msFromTime(_t_). - 1. Let _date_ be MakeDate(Day(_t_), MakeTime(HourFromTime(_t_), _m_, _s_, _milli_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. Set _tv_ to LocalTime(_tv_). + 1. If _sec_ is not present, let _s_ be SecFromTime(_tv_). + 1. If _ms_ is not present, let _milli_ be msFromTime(_tv_). + 1. Let _date_ be MakeDate(Day(_tv_), MakeTime(HourFromTime(_tv_), _m_, _s_, _milli_)). 1. Let _u_ be TimeClip(UTC(_date_)). - 1. Set _dateObject_.[[DateValue]] to _u_. + 1. Set _dateObj_.[[DateValue]] to _u_. 1. Return _u_.

    The *"length"* property of this method is *3*𝔽.

    @@ -34769,17 +34765,17 @@

    Date.prototype.setMinutes ( _min_ [ , _sec_ [ , _ms_ ] ] )

    Date.prototype.setMonth ( _month_ [ , _date_ ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _m_ be ? ToNumber(_month_). 1. If _date_ is present, let _dt_ be ? ToNumber(_date_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Set _t_ to LocalTime(_t_). - 1. If _date_ is not present, let _dt_ be DateFromTime(_t_). - 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_t_), _m_, _dt_), TimeWithinDay(_t_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. Set _tv_ to LocalTime(_tv_). + 1. If _date_ is not present, let _dt_ be DateFromTime(_tv_). + 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_tv_), _m_, _dt_), TimeWithinDay(_tv_)). 1. Let _u_ be TimeClip(UTC(_newDate_)). - 1. Set _dateObject_.[[DateValue]] to _u_. + 1. Set _dateObj_.[[DateValue]] to _u_. 1. Return _u_.

    The *"length"* property of this method is *2*𝔽.

    @@ -34792,17 +34788,17 @@

    Date.prototype.setMonth ( _month_ [ , _date_ ] )

    Date.prototype.setSeconds ( _sec_ [ , _ms_ ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _s_ be ? ToNumber(_sec_). 1. If _ms_ is present, let _milli_ be ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Set _t_ to LocalTime(_t_). - 1. If _ms_ is not present, let _milli_ be msFromTime(_t_). - 1. Let _date_ be MakeDate(Day(_t_), MakeTime(HourFromTime(_t_), MinFromTime(_t_), _s_, _milli_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. Set _tv_ to LocalTime(_tv_). + 1. If _ms_ is not present, let _milli_ be msFromTime(_tv_). + 1. Let _date_ be MakeDate(Day(_tv_), MakeTime(HourFromTime(_tv_), MinFromTime(_tv_), _s_, _milli_)). 1. Let _u_ be TimeClip(UTC(_date_)). - 1. Set _dateObject_.[[DateValue]] to _u_. + 1. Set _dateObj_.[[DateValue]] to _u_. 1. Return _u_.

    The *"length"* property of this method is *2*𝔽.

    @@ -34815,11 +34811,11 @@

    Date.prototype.setSeconds ( _sec_ [ , _ms_ ] )

    Date.prototype.setTime ( _time_ )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). 1. Let _t_ be ? ToNumber(_time_). 1. Let _v_ be TimeClip(_t_). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_. @@ -34828,14 +34824,14 @@

    Date.prototype.setTime ( _time_ )

    Date.prototype.setUTCDate ( _date_ )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _dt_ be ? ToNumber(_date_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_t_), MonthFromTime(_t_), _dt_), TimeWithinDay(_t_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_tv_), MonthFromTime(_tv_), _dt_), TimeWithinDay(_tv_)). 1. Let _v_ be TimeClip(_newDate_). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_. @@ -34844,16 +34840,16 @@

    Date.prototype.setUTCDate ( _date_ )

    Date.prototype.setUTCFullYear ( _year_ [ , _month_ [ , _date_ ] ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, set _t_ to *+0*𝔽. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, set _tv_ to *+0*𝔽. 1. Let _y_ be ? ToNumber(_year_). - 1. If _month_ is present, let _m_ be ? ToNumber(_month_); else let _m_ be MonthFromTime(_t_). - 1. If _date_ is present, let _dt_ be ? ToNumber(_date_); else let _dt_ be DateFromTime(_t_). - 1. Let _newDate_ be MakeDate(MakeDay(_y_, _m_, _dt_), TimeWithinDay(_t_)). + 1. If _month_ is present, let _m_ be ? ToNumber(_month_); else let _m_ be MonthFromTime(_tv_). + 1. If _date_ is present, let _dt_ be ? ToNumber(_date_); else let _dt_ be DateFromTime(_tv_). + 1. Let _newDate_ be MakeDate(MakeDay(_y_, _m_, _dt_), TimeWithinDay(_tv_)). 1. Let _v_ be TimeClip(_newDate_). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_.

    The *"length"* property of this method is *3*𝔽.

    @@ -34866,20 +34862,20 @@

    Date.prototype.setUTCFullYear ( _year_ [ , _month_ [ , _date_ ] ] )

    Date.prototype.setUTCHours ( _hour_ [ , _min_ [ , _sec_ [ , _ms_ ] ] ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _h_ be ? ToNumber(_hour_). 1. If _min_ is present, let _m_ be ? ToNumber(_min_). 1. If _sec_ is present, let _s_ be ? ToNumber(_sec_). 1. If _ms_ is present, let _milli_ be ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. If _min_ is not present, let _m_ be MinFromTime(_t_). - 1. If _sec_ is not present, let _s_ be SecFromTime(_t_). - 1. If _ms_ is not present, let _milli_ be msFromTime(_t_). - 1. Let _date_ be MakeDate(Day(_t_), MakeTime(_h_, _m_, _s_, _milli_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. If _min_ is not present, let _m_ be MinFromTime(_tv_). + 1. If _sec_ is not present, let _s_ be SecFromTime(_tv_). + 1. If _ms_ is not present, let _milli_ be msFromTime(_tv_). + 1. Let _date_ be MakeDate(Day(_tv_), MakeTime(_h_, _m_, _s_, _milli_)). 1. Let _v_ be TimeClip(_date_). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_.

    The *"length"* property of this method is *4*𝔽.

    @@ -34892,14 +34888,14 @@

    Date.prototype.setUTCHours ( _hour_ [ , _min_ [ , _sec_ [ , _ms_ ] ] ] )

    Date.prototype.setUTCMilliseconds ( _ms_ )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Set _ms_ to ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. Let _time_ be MakeTime(HourFromTime(_t_), MinFromTime(_t_), SecFromTime(_t_), _ms_). - 1. Let _v_ be TimeClip(MakeDate(Day(_t_), _time_)). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Let _time_ be MakeTime(HourFromTime(_tv_), MinFromTime(_tv_), SecFromTime(_tv_), _ms_). + 1. Let _v_ be TimeClip(MakeDate(Day(_tv_), _time_)). + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_.
    @@ -34908,18 +34904,18 @@

    Date.prototype.setUTCMilliseconds ( _ms_ )

    Date.prototype.setUTCMinutes ( _min_ [ , _sec_ [ , _ms_ ] ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _m_ be ? ToNumber(_min_). 1. If _sec_ is present, let _s_ be ? ToNumber(_sec_). 1. If _ms_ is present, let _milli_ be ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. If _sec_ is not present, let _s_ be SecFromTime(_t_). - 1. If _ms_ is not present, let _milli_ be msFromTime(_t_). - 1. Let _date_ be MakeDate(Day(_t_), MakeTime(HourFromTime(_t_), _m_, _s_, _milli_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. If _sec_ is not present, let _s_ be SecFromTime(_tv_). + 1. If _ms_ is not present, let _milli_ be msFromTime(_tv_). + 1. Let _date_ be MakeDate(Day(_tv_), MakeTime(HourFromTime(_tv_), _m_, _s_, _milli_)). 1. Let _v_ be TimeClip(_date_). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_.

    The *"length"* property of this method is *3*𝔽.

    @@ -34932,16 +34928,16 @@

    Date.prototype.setUTCMinutes ( _min_ [ , _sec_ [ , _ms_ ] ] )

    Date.prototype.setUTCMonth ( _month_ [ , _date_ ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _m_ be ? ToNumber(_month_). 1. If _date_ is present, let _dt_ be ? ToNumber(_date_). - 1. If _t_ is *NaN*, return *NaN*. - 1. If _date_ is not present, let _dt_ be DateFromTime(_t_). - 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_t_), _m_, _dt_), TimeWithinDay(_t_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. If _date_ is not present, let _dt_ be DateFromTime(_tv_). + 1. Let _newDate_ be MakeDate(MakeDay(YearFromTime(_tv_), _m_, _dt_), TimeWithinDay(_tv_)). 1. Let _v_ be TimeClip(_newDate_). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_.

    The *"length"* property of this method is *2*𝔽.

    @@ -34954,16 +34950,16 @@

    Date.prototype.setUTCMonth ( _month_ [ , _date_ ] )

    Date.prototype.setUTCSeconds ( _sec_ [ , _ms_ ] )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Let _s_ be ? ToNumber(_sec_). 1. If _ms_ is present, let _milli_ be ? ToNumber(_ms_). - 1. If _t_ is *NaN*, return *NaN*. - 1. If _ms_ is not present, let _milli_ be msFromTime(_t_). - 1. Let _date_ be MakeDate(Day(_t_), MakeTime(HourFromTime(_t_), MinFromTime(_t_), _s_, _milli_)). + 1. If _tv_ is *NaN*, return *NaN*. + 1. If _ms_ is not present, let _milli_ be msFromTime(_tv_). + 1. Let _date_ be MakeDate(Day(_tv_), MakeTime(HourFromTime(_tv_), MinFromTime(_tv_), _s_, _milli_)). 1. Let _v_ be TimeClip(_date_). - 1. Set _dateObject_.[[DateValue]] to _v_. + 1. Set _dateObj_.[[DateValue]] to _v_. 1. Return _v_.

    The *"length"* property of this method is *2*𝔽.

    @@ -34976,9 +34972,9 @@

    Date.prototype.setUTCSeconds ( _sec_ [ , _ms_ ] )

    Date.prototype.toDateString ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _tv_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. If _tv_ is *NaN*, return *"Invalid Date"*. 1. Let _t_ be LocalTime(_tv_). 1. Return DateString(_t_). @@ -34989,9 +34985,9 @@

    Date.prototype.toDateString ( )

    Date.prototype.toISOString ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _tv_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. If _tv_ is *NaN*, throw a *RangeError* exception. 1. Assert: _tv_ is an integral Number. 1. If _tv_ corresponds with a year that cannot be represented in the Date Time String Format, throw a *RangeError* exception. @@ -35042,9 +35038,9 @@

    Date.prototype.toLocaleTimeString ( [ _reserved1_ [ , _reserved2_ ] ] )

    Date.prototype.toString ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _tv_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. Return ToDateString(_tv_). @@ -35307,8 +35303,8 @@

    1. If _tv_ is *NaN*, return *"Invalid Date"*. - 1. Let _t_ be LocalTime(_tv_). - 1. Return the string-concatenation of DateString(_t_), the code unit 0x0020 (SPACE), TimeString(_t_), and TimeZoneString(_tv_). + 1. Let _localTime_ be LocalTime(_tv_). + 1. Return the string-concatenation of DateString(_localTime_), the code unit 0x0020 (SPACE), TimeString(_localTime_), and TimeZoneString(_tv_).
    @@ -35317,12 +35313,12 @@

    Date.prototype.toTimeString ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _tv_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. If _tv_ is *NaN*, return *"Invalid Date"*. - 1. Let _t_ be LocalTime(_tv_). - 1. Return the string-concatenation of TimeString(_t_) and TimeZoneString(_tv_). + 1. Let _localTime_ be LocalTime(_tv_). + 1. Return the string-concatenation of TimeString(_localTime_) and TimeZoneString(_tv_). @@ -35331,9 +35327,9 @@

    Date.prototype.toUTCString ( )

    This method returns a String value representing the instant in time corresponding to the *this* value. The format of the String is based upon "HTTP-date" from RFC 7231, generalized to support the full range of times supported by ECMAScript Dates.

    It performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _tv_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. 1. If _tv_ is *NaN*, return *"Invalid Date"*. 1. Let _weekday_ be the Name of the entry in with the Number WeekDay(_tv_). 1. Let _month_ be the Name of the entry in with the Number MonthFromTime(_tv_). @@ -35349,9 +35345,9 @@

    Date.prototype.toUTCString ( )

    Date.prototype.valueOf ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Return _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Return _dateObj_.[[DateValue]]. @@ -35404,12 +35400,12 @@

    String ( _value_ )

    This function performs the following steps when called:

    1. If _value_ is not present, then - 1. Let _str_ be the empty String. + 1. Let _string_ be the empty String. 1. Else, 1. If NewTarget is *undefined* and _value_ is a Symbol, return SymbolDescriptiveString(_value_). - 1. Let _str_ be ? ToString(_value_). - 1. If NewTarget is *undefined*, return _str_. - 1. Return StringCreate(_str_, ? GetPrototypeFromConstructor(NewTarget, *"%String.prototype%"*)). + 1. Let _string_ be ? ToString(_value_). + 1. If NewTarget is *undefined*, return _string_. + 1. Return StringCreate(_string_, ? GetPrototypeFromConstructor(NewTarget, *"%String.prototype%"*)). @@ -35472,13 +35468,13 @@

    String.raw ( _template_, ..._substitutions_ )

    1. Let _result_ be the empty String. 1. Let _nextIndex_ be 0. 1. Repeat, - 1. Let _nextLiteralVal_ be ? Get(_literals_, ! ToString(𝔽(_nextIndex_))). - 1. Let _nextLiteral_ be ? ToString(_nextLiteralVal_). + 1. Let _nextLiteralValue_ be ? Get(_literals_, ! ToString(𝔽(_nextIndex_))). + 1. Let _nextLiteral_ be ? ToString(_nextLiteralValue_). 1. Set _result_ to the string-concatenation of _result_ and _nextLiteral_. 1. If _nextIndex_ + 1 = _literalCount_, return _result_. 1. If _nextIndex_ < _substitutionCount_, then - 1. Let _nextSubVal_ be _substitutions_[_nextIndex_]. - 1. Let _nextSub_ be ? ToString(_nextSubVal_). + 1. Let _nextSubValue_ be _substitutions_[_nextIndex_]. + 1. Let _nextSub_ be ? ToString(_nextSubValue_). 1. Set _result_ to the string-concatenation of _result_ and _nextSub_. 1. Set _nextIndex_ to _nextIndex_ + 1.
    @@ -35505,33 +35501,33 @@

    String.prototype.at ( _index_ )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _len_ be the length of _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Let _length_ be the length of _string_. 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, then 1. Let _k_ be _relativeIndex_. 1. Else, - 1. Let _k_ be _len_ + _relativeIndex_. - 1. If _k_ < 0 or _k_ ≥ _len_, return *undefined*. - 1. Return the substring of _str_ from _k_ to _k_ + 1. + 1. Let _k_ be _length_ + _relativeIndex_. + 1. If _k_ < 0 or _k_ ≥ _length_, return *undefined*. + 1. Return the substring of _string_ from _k_ to _k_ + 1. -

    String.prototype.charAt ( _pos_ )

    +

    String.prototype.charAt ( _position_ )

    -

    This method returns a single element String containing the code unit at index _pos_ within the String value resulting from converting this object to a String. If there is no element at that index, the result is the empty String. The result is a String value, not a String object.

    +

    This method returns a single element String containing the code unit at index _position_ within the String value resulting from converting this object to a String. If there is no element at that index, the result is the empty String. The result is a String value, not a String object.

    If `pos` is an integral Number, then the result of `x.charAt(pos)` is equivalent to the result of `x.substring(pos, pos + 1)`.

    This method performs the following steps when called:

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _position_ be ? ToIntegerOrInfinity(_pos_). - 1. Let _size_ be the length of _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Set _position_ to ? ToIntegerOrInfinity(_position_). + 1. Let _size_ be the length of _string_. 1. If _position_ < 0 or _position_ ≥ _size_, return the empty String. - 1. Return the substring of _str_ from _position_ to _position_ + 1. + 1. Return the substring of _string_ from _position_ to _position_ + 1.

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

    @@ -35539,19 +35535,19 @@

    String.prototype.charAt ( _pos_ )

    -

    String.prototype.charCodeAt ( _pos_ )

    +

    String.prototype.charCodeAt ( _position_ )

    -

    This method returns a Number (a non-negative integral Number less than 216) that is the numeric value of the code unit at index _pos_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *NaN*.

    +

    This method returns a Number (a non-negative integral Number less than 216) that is the numeric value of the code unit at index _position_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *NaN*.

    This method performs the following steps when called:

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _position_ be ? ToIntegerOrInfinity(_pos_). - 1. Let _size_ be the length of _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Set _position_ to ? ToIntegerOrInfinity(_position_). + 1. Let _size_ be the length of _string_. 1. If _position_ < 0 or _position_ ≥ _size_, return *NaN*. - 1. Return the Number value for the numeric value of the code unit at index _position_ within the String _str_. + 1. Return the Number value for the numeric value of the code unit at index _position_ within the String _string_.

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -35559,20 +35555,20 @@

    String.prototype.charCodeAt ( _pos_ )

    -

    String.prototype.codePointAt ( _pos_ )

    +

    String.prototype.codePointAt ( _position_ )

    -

    This method returns a non-negative integral Number less than or equal to *0x10FFFF*𝔽 that is the numeric value of the UTF-16 encoded code point () starting at the string element at index _pos_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *undefined*. If a valid UTF-16 surrogate pair does not begin at _pos_, the result is the code unit at _pos_.

    +

    This method returns a non-negative integral Number less than or equal to *0x10FFFF*𝔽 that is the numeric value of the UTF-16 encoded code point () starting at the string element at index _position_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *undefined*. If a valid UTF-16 surrogate pair does not begin at _position_, the result is the code unit at _position_.

    This method performs the following steps when called:

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _position_ be ? ToIntegerOrInfinity(_pos_). - 1. Let _size_ be the length of _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Set _position_ to ? ToIntegerOrInfinity(_position_). + 1. Let _size_ be the length of _string_. 1. If _position_ < 0 or _position_ ≥ _size_, return *undefined*. - 1. Let _cp_ be CodePointAt(_str_, _position_). - 1. Return 𝔽(_cp_.[[CodePoint]]). + 1. Let _codePoint_ be CodePointAt(_string_, _position_). + 1. Return 𝔽(_codePoint_.[[CodePoint]]).

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -35588,8 +35584,8 @@

    String.prototype.concat ( ..._args_ )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _result_ be _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Let _result_ be _string_. 1. For each element _next_ of _args_, do 1. Let _nextString_ be ? ToString(_next_). 1. Set _result_ to the string-concatenation of _result_ and _nextString_. @@ -35612,19 +35608,19 @@

    String.prototype.endsWith ( _searchString_ [ , _endPosition_ ] )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _isRegExp_ be ? IsRegExp(_searchString_). 1. If _isRegExp_ is *true*, throw a *TypeError* exception. - 1. Let _searchStr_ be ? ToString(_searchString_). - 1. Let _len_ be the length of _str_. - 1. If _endPosition_ is *undefined*, let _pos_ be _len_; else let _pos_ be ? ToIntegerOrInfinity(_endPosition_). - 1. Let _end_ be the result of clamping _pos_ between 0 and _len_. - 1. Let _searchLength_ be the length of _searchStr_. + 1. Set _searchString_ to ? ToString(_searchString_). + 1. Let _length_ be the length of _string_. + 1. If _endPosition_ is *undefined*, let _position_ be _length_; else let _position_ be ? ToIntegerOrInfinity(_endPosition_). + 1. Let _end_ be the result of clamping _position_ between 0 and _length_. + 1. Let _searchLength_ be the length of _searchString_. 1. If _searchLength_ = 0, return *true*. 1. Let _start_ be _end_ - _searchLength_. 1. If _start_ < 0, return *false*. - 1. Let _substring_ be the substring of _str_ from _start_ to _end_. - 1. If _substring_ is _searchStr_, return *true*. + 1. Let _substring_ be the substring of _string_ from _start_ to _end_. + 1. If _substring_ is _searchString_, return *true*. 1. Return *false*. @@ -35641,15 +35637,15 @@

    String.prototype.includes ( _searchString_ [ , _position_ ] )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _isRegExp_ be ? IsRegExp(_searchString_). 1. If _isRegExp_ is *true*, throw a *TypeError* exception. - 1. Let _searchStr_ be ? ToString(_searchString_). - 1. Let _pos_ be ? ToIntegerOrInfinity(_position_). - 1. Assert: If _position_ is *undefined*, then _pos_ is 0. - 1. Let _len_ be the length of _str_. - 1. Let _start_ be the result of clamping _pos_ between 0 and _len_. - 1. Let _index_ be StringIndexOf(_str_, _searchStr_, _start_). + 1. Set _searchString_ to ? ToString(_searchString_). + 1. Let _positionInt_ be ? ToIntegerOrInfinity(_position_). + 1. Assert: If _position_ is *undefined*, then _positionInt_ is 0. + 1. Let _length_ be the length of _string_. + 1. Let _start_ be the result of clamping _positionInt_ between 0 and _length_. + 1. Let _index_ be StringIndexOf(_string_, _searchString_, _start_). 1. If _index_ is ~not-found~, return *false*. 1. Return *true*. @@ -35673,13 +35669,13 @@

    String.prototype.indexOf ( _searchString_ [ , _position_ ] )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _searchStr_ be ? ToString(_searchString_). - 1. Let _pos_ be ? ToIntegerOrInfinity(_position_). - 1. Assert: If _position_ is *undefined*, then _pos_ is 0. - 1. Let _len_ be the length of _str_. - 1. Let _start_ be the result of clamping _pos_ between 0 and _len_. - 1. Let _result_ be StringIndexOf(_str_, _searchStr_, _start_). + 1. Let _string_ be ? ToString(_thisValue_). + 1. Set _searchString_ to ? ToString(_searchString_). + 1. Let _positionInt_ be ? ToIntegerOrInfinity(_position_). + 1. Assert: If _position_ is *undefined*, then _positionInt_ is 0. + 1. Let _length_ be the length of _string_. + 1. Let _start_ be the result of clamping _positionInt_ between 0 and _length_. + 1. Let _result_ be StringIndexOf(_string_, _searchString_, _start_). 1. If _result_ is ~not-found~, return *-1*𝔽. 1. Return 𝔽(_result_). @@ -35694,8 +35690,8 @@

    String.prototype.isWellFormed ( )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Return IsStringWellFormedUnicode(_str_). + 1. Let _string_ be ? ToString(_thisValue_). + 1. Return IsStringWellFormedUnicode(_string_).
    @@ -35708,16 +35704,16 @@

    String.prototype.lastIndexOf ( _searchString_ [ , _position_ ] )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _searchStr_ be ? ToString(_searchString_). - 1. Let _numPos_ be ? ToNumber(_position_). - 1. Assert: If _position_ is *undefined*, then _numPos_ is *NaN*. - 1. If _numPos_ is *NaN*, let _pos_ be +∞; else let _pos_ be ! ToIntegerOrInfinity(_numPos_). - 1. Let _len_ be the length of _str_. - 1. Let _searchLen_ be the length of _searchStr_. - 1. If _len_ < _searchLen_, return *-1*𝔽. - 1. Let _start_ be the result of clamping _pos_ between 0 and _len_ - _searchLen_. - 1. Let _result_ be StringLastIndexOf(_str_, _searchStr_, _start_). + 1. Let _string_ be ? ToString(_thisValue_). + 1. Set _searchString_ to ? ToString(_searchString_). + 1. Let _numberPosition_ be ? ToNumber(_position_). + 1. Assert: If _position_ is *undefined*, then _numberPosition_ is *NaN*. + 1. If _numberPosition_ is *NaN*, set _position_ to +∞; else set _position_ to ! ToIntegerOrInfinity(_numberPosition_). + 1. Let _length_ be the length of _string_. + 1. Let _searchLength_ be the length of _searchString_. + 1. If _length_ < _searchLength_, return *-1*𝔽. + 1. Let _start_ be the result of clamping _position_ between 0 and _length_ - _searchLength_. + 1. Let _result_ be StringLastIndexOf(_string_, _searchString_, _start_). 1. If _result_ is ~not-found~, return *-1*𝔽. 1. Return 𝔽(_result_). @@ -35729,12 +35725,12 @@

    String.prototype.lastIndexOf ( _searchString_ [ , _position_ ] )

    String.prototype.localeCompare ( _that_ [ , _reserved1_ [ , _reserved2_ ] ] )

    An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement this method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of this method is used:

    -

    This method returns a Number other than *NaN* representing the result of an implementation-defined locale-sensitive String comparison of the *this* value (converted to a String _str_) with _that_ (converted to a String _thatValue_). The result is intended to correspond with a sort order of String values according to conventions of the host environment's current locale, and will be negative when _str_ is ordered before _thatValue_, positive when _str_ is ordered after _thatValue_, and zero in all other cases (representing no relative ordering between _str_ and _thatValue_).

    +

    This method returns a Number other than *NaN* representing the result of an implementation-defined locale-sensitive String comparison of the *this* value (converted to a String _string_) with _that_ (converted to a String _thatValue_). The result is intended to correspond with a sort order of String values according to conventions of the host environment's current locale, and will be negative when _string_ is ordered before _thatValue_, positive when _string_ is ordered after _thatValue_, and zero in all other cases (representing no relative ordering between _string_ and _thatValue_).

    Before performing the comparisons, this method performs the following steps to prepare the Strings:

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _thatValue_ be ? ToString(_that_).

    The meaning of the optional second and third parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not assign any other interpretation to those parameter positions.

    @@ -35783,9 +35779,9 @@

    String.prototype.match ( _regexpOrPattern_ )

    1. Let _matcher_ be ? GetMethod(_regexpOrPattern_, %Symbol.match%). 1. If _matcher_ is not *undefined*, then 1. Return ? Call(_matcher_, _regexpOrPattern_, « _thisValue_ »). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _regexp_ be ? RegExpCreate(_regexpOrPattern_, *undefined*). - 1. Return ? Invoke(_regexp_, %Symbol.match%, « _str_ »). + 1. Return ? Invoke(_regexp_, %Symbol.match%, « _string_ »).

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

    @@ -35809,9 +35805,9 @@

    String.prototype.matchAll ( _regexpOrPattern_ )

    1. Let _matcher_ be ? GetMethod(_regexpOrPattern_, %Symbol.matchAll%). 1. If _matcher_ is not *undefined*, then 1. Return ? Call(_matcher_, _regexpOrPattern_, « _thisValue_ »). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _regexp_ be ? RegExpCreate(_regexpOrPattern_, *"g"*). - 1. Return ? Invoke(_regexp_, %Symbol.matchAll%, « _str_ »). + 1. Return ? Invoke(_regexp_, %Symbol.matchAll%, « _string_ »). This method is intentionally generic, it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method. Similarly to `String.prototype.split`, `String.prototype.matchAll` is designed to typically act without mutating its inputs. @@ -35823,12 +35819,12 @@

    String.prototype.normalize ( [ _form_ ] )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. If _form_ is *undefined*, let _f_ be *"NFC"*. - 1. Else, let _f_ be ? ToString(_form_). - 1. If _f_ is not one of *"NFC"*, *"NFD"*, *"NFKC"*, or *"NFKD"*, throw a *RangeError* exception. - 1. Let _ns_ be the String value that is the result of normalizing _str_ into the normalization form named by _f_ as specified in the latest Unicode Standard, Normalization Forms. - 1. Return _ns_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. If _form_ is *undefined*, set _form_ to *"NFC"*. + 1. Else, set _form_ to ? ToString(_form_). + 1. If _form_ is not one of *"NFC"*, *"NFD"*, *"NFKC"*, or *"NFKD"*, throw a *RangeError* exception. + 1. Let _normal_ be the String value that is the result of normalizing _string_ into the normalization form named by _form_ as specified in the latest Unicode Standard, Normalization Forms. + 1. Return _normal_.

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -35866,20 +35862,20 @@

    - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _intMaxLength_ be ℝ(? ToLength(_maxLength_)). - 1. Let _stringLength_ be the length of _str_. - 1. If _intMaxLength_ ≤ _stringLength_, return _str_. + 1. Let _stringLength_ be the length of _string_. + 1. If _intMaxLength_ ≤ _stringLength_, return _string_. 1. If _fillString_ is *undefined*, set _fillString_ to the String value consisting solely of the code unit 0x0020 (SPACE). 1. Else, set _fillString_ to ? ToString(_fillString_). - 1. Return StringPad(_str_, _intMaxLength_, _fillString_, _placement_). + 1. Return StringPad(_string_, _intMaxLength_, _fillString_, _placement_).

    StringPad ( - _str_: a String, + _string_: a String, _maxLength_: a non-negative integer, _fillString_: a String, _placement_: ~start~ or ~end~, @@ -35888,16 +35884,16 @@

    - 1. Let _stringLength_ be the length of _str_. - 1. If _maxLength_ ≤ _stringLength_, return _str_. - 1. If _fillString_ is the empty String, return _str_. - 1. Let _fillLen_ be _maxLength_ - _stringLength_. - 1. Let _truncatedStringFiller_ be the String value consisting of repeated concatenations of _fillString_ truncated to length _fillLen_. - 1. If _placement_ is ~start~, return the string-concatenation of _truncatedStringFiller_ and _str_. - 1. Return the string-concatenation of _str_ and _truncatedStringFiller_. + 1. Let _stringLength_ be the length of _string_. + 1. If _maxLength_ ≤ _stringLength_, return _string_. + 1. If _fillString_ is the empty String, return _string_. + 1. Let _fillLength_ be _maxLength_ - _stringLength_. + 1. Let _truncatedStringFiller_ be the String value consisting of repeated concatenations of _fillString_ truncated to length _fillLength_. + 1. If _placement_ is ~start~, return the string-concatenation of _truncatedStringFiller_ and _string_. + 1. Return the string-concatenation of _string_ and _truncatedStringFiller_. -

    The argument _maxLength_ will be clamped such that it can be no smaller than the length of _str_.

    +

    The argument _maxLength_ will be clamped such that it can be no smaller than the length of _string_.

    The argument _fillString_ defaults to *" "* (the String value consisting of the code unit 0x0020 SPACE).

    @@ -35914,8 +35910,8 @@

    - 1. Let _str_ be the String representation of _n_, formatted as a decimal number. - 1. Return StringPad(_str_, _minLength_, *"0"*, ~start~). + 1. Let _string_ be the String representation of _n_, formatted as a decimal number. + 1. Return StringPad(_string_, _minLength_, *"0"*, ~start~). @@ -35926,11 +35922,11 @@

    String.prototype.repeat ( _count_ )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _n_ be ? ToIntegerOrInfinity(_count_). 1. If _n_ < 0 or _n_ = +∞, throw a *RangeError* exception. 1. If _n_ = 0, return the empty String. - 1. Return the String value that is made from _n_ copies of _str_ appended together. + 1. Return the String value that is made from _n_ copies of _string_ appended together.

    This method creates the String value consisting of the code units of the *this* value (converted to String) repeated _count_ times.

    @@ -35952,15 +35948,15 @@

    String.prototype.replace ( _searchValue_, _replaceValue_ )

    1. Return ? Call(_replacer_, _searchValue_, « _thisValue_, _replaceValue_ »). 1. Let _string_ be ? ToString(_thisValue_). 1. Let _searchString_ be ? ToString(_searchValue_). - 1. Let _functionalReplace_ be IsCallable(_replaceValue_). - 1. If _functionalReplace_ is *false*, then + 1. Let _funcalReplace_ be IsCallable(_replaceValue_). + 1. If _funcalReplace_ is *false*, then 1. Set _replaceValue_ to ? ToString(_replaceValue_). 1. Let _searchLength_ be the length of _searchString_. 1. Let _position_ be StringIndexOf(_string_, _searchString_, 0). 1. If _position_ is ~not-found~, return _string_. 1. Let _preceding_ be the substring of _string_ from 0 to _position_. 1. Let _following_ be the substring of _string_ from _position_ + _searchLength_. - 1. If _functionalReplace_ is *true*, then + 1. If _funcalReplace_ is *true*, then 1. Let _replacement_ be ? ToString(? Call(_replaceValue_, *undefined*, « _searchString_, 𝔽(_position_), _string_ »)). 1. Else, 1. Assert: _replaceValue_ is a String. @@ -35976,7 +35972,7 @@

    String.prototype.replace ( _searchValue_, _replaceValue_ )

    GetSubstitution ( _matched_: a String, - _str_: a String, + _string_: a String, _position_: a non-negative integer, _captures_: a List of either Strings or *undefined*, _namedCaptures_: an Object or *undefined*, @@ -35988,7 +35984,7 @@

    For the purposes of this abstract operation, a decimal digit is a code unit in the inclusive interval from 0x0030 (DIGIT ZERO) to 0x0039 (DIGIT NINE).
    - 1. Let _stringLength_ be the length of _str_. + 1. Let _stringLength_ be the length of _string_. 1. Assert: _position_ ≤ _stringLength_. 1. Let _result_ be the empty String. 1. Let _templateRemainder_ be _replacementTemplate_. @@ -35999,29 +35995,29 @@

    1. Let _refReplacement_ be *"$"*. 1. Else if _templateRemainder_ starts with *"$`"*, then 1. Let _ref_ be *"$`"*. - 1. Let _refReplacement_ be the substring of _str_ from 0 to _position_. + 1. Let _refReplacement_ be the substring of _string_ from 0 to _position_. 1. Else if _templateRemainder_ starts with *"$&"*, then 1. Let _ref_ be *"$&"*. 1. Let _refReplacement_ be _matched_. 1. Else if _templateRemainder_ starts with *"$'"* (0x0024 (DOLLAR SIGN) followed by 0x0027 (APOSTROPHE)), then 1. Let _ref_ be *"$'"*. 1. Let _matchLength_ be the length of _matched_. - 1. Let _tailPos_ be _position_ + _matchLength_. - 1. Let _refReplacement_ be the substring of _str_ from min(_tailPos_, _stringLength_). - 1. NOTE: _tailPos_ can exceed _stringLength_ only if this abstract operation was invoked by a call to the intrinsic %Symbol.replace% method of %RegExp.prototype% on an object whose *"exec"* property is not the intrinsic %RegExp.prototype.exec%. + 1. Let _tailPosition_ be _position_ + _matchLength_. + 1. Let _refReplacement_ be the substring of _string_ from min(_tailPosition_, _stringLength_). + 1. NOTE: _tailPosition_ can exceed _stringLength_ only if this abstract operation was invoked by a call to the intrinsic %Symbol.replace% method of %RegExp.prototype% on an object whose *"exec"* property is not the intrinsic %RegExp.prototype.exec%. 1. Else if _templateRemainder_ starts with *"$"* followed by 1 or more decimal digits, then 1. If _templateRemainder_ starts with *"$"* followed by 2 or more decimal digits, let _digitCount_ be 2; else let _digitCount_ be 1. 1. Let _digits_ be the substring of _templateRemainder_ from 1 to 1 + _digitCount_. 1. Let _index_ be ℝ(StringToNumber(_digits_)). 1. Assert: 0 ≤ _index_ ≤ 99. - 1. Let _captureLen_ be the number of elements in _captures_. - 1. If _index_ > _captureLen_ and _digitCount_ = 2, then + 1. Let _captureLength_ be the number of elements in _captures_. + 1. If _index_ > _captureLength_ and _digitCount_ = 2, then 1. NOTE: When a two-digit replacement pattern specifies an index exceeding the count of capturing groups, it is treated as a one-digit replacement pattern followed by a literal digit. 1. Set _digitCount_ to 1. 1. Set _digits_ to the substring of _digits_ from 0 to 1. 1. Set _index_ to ℝ(StringToNumber(_digits_)). 1. Let _ref_ be the substring of _templateRemainder_ from 0 to 1 + _digitCount_. - 1. If 1 ≤ _index_ ≤ _captureLen_, then + 1. If 1 ≤ _index_ ≤ _captureLength_, then 1. Let _capture_ be _captures_[_index_ - 1]. 1. If _capture_ is *undefined*, then 1. Let _refReplacement_ be the empty String. @@ -36030,13 +36026,13 @@

    1. Else, 1. Let _refReplacement_ be _ref_. 1. Else if _templateRemainder_ starts with *"$<"*, then - 1. Let _gtPos_ be StringIndexOf(_templateRemainder_, *">"*, 0). - 1. If _gtPos_ is ~not-found~ or _namedCaptures_ is *undefined*, then + 1. Let _gtPosition_ be StringIndexOf(_templateRemainder_, *">"*, 0). + 1. If _gtPosition_ is ~not-found~ or _namedCaptures_ is *undefined*, then 1. Let _ref_ be *"$<"*. 1. Let _refReplacement_ be _ref_. 1. Else, - 1. Let _ref_ be the substring of _templateRemainder_ from 0 to _gtPos_ + 1. - 1. Let _groupName_ be the substring of _templateRemainder_ from 2 to _gtPos_. + 1. Let _ref_ be the substring of _templateRemainder_ from 0 to _gtPosition_ + 1. + 1. Let _groupName_ be the substring of _templateRemainder_ from 2 to _gtPosition_. 1. Assert: _namedCaptures_ is an Object. 1. Let _capture_ be ? Get(_namedCaptures_, _groupName_). 1. If _capture_ is *undefined*, then @@ -36071,8 +36067,8 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    1. Return ? Call(_replacer_, _searchValue_, « _thisValue_, _replaceValue_ »). 1. Let _string_ be ? ToString(_thisValue_). 1. Let _searchString_ be ? ToString(_searchValue_). - 1. Let _functionalReplace_ be IsCallable(_replaceValue_). - 1. If _functionalReplace_ is *false*, then + 1. Let _funcalReplace_ be IsCallable(_replaceValue_). + 1. If _funcalReplace_ is *false*, then 1. Set _replaceValue_ to ? ToString(_replaceValue_). 1. Let _searchLength_ be the length of _searchString_. 1. Let _advanceBy_ be max(1, _searchLength_). @@ -36085,7 +36081,7 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    1. Let _result_ be the empty String. 1. For each element _matchPosition_ of _matchPositions_, do 1. Let _preserved_ be the substring of _string_ from _endOfLastMatch_ to _matchPosition_. - 1. If _functionalReplace_ is *true*, then + 1. If _funcalReplace_ is *true*, then 1. Let _replacement_ be ? ToString(? Call(_replaceValue_, *undefined*, « _searchString_, 𝔽(_matchPosition_), _string_ »)). 1. Else, 1. Assert: _replaceValue_ is a String. @@ -36125,18 +36121,18 @@

    String.prototype.slice ( _start_, _end_ )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _len_ be the length of _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Let _length_ be the length of _string_. 1. Let _intStart_ be ? ToIntegerOrInfinity(_start_). 1. If _intStart_ = -∞, let _from_ be 0. - 1. Else if _intStart_ < 0, let _from_ be max(_len_ + _intStart_, 0). - 1. Else, let _from_ be min(_intStart_, _len_). - 1. If _end_ is *undefined*, let _intEnd_ be _len_; else let _intEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _intStart_ < 0, let _from_ be max(_length_ + _intStart_, 0). + 1. Else, let _from_ be min(_intStart_, _length_). + 1. If _end_ is *undefined*, let _intEnd_ be _length_; else let _intEnd_ be ? ToIntegerOrInfinity(_end_). 1. If _intEnd_ = -∞, let _to_ be 0. - 1. Else if _intEnd_ < 0, let _to_ be max(_len_ + _intEnd_, 0). - 1. Else, let _to_ be min(_intEnd_, _len_). + 1. Else if _intEnd_ < 0, let _to_ be max(_length_ + _intEnd_, 0). + 1. Else, let _to_ be min(_intEnd_, _length_). 1. If _from_ ≥ _to_, return the empty String. - 1. Return the substring of _str_ from _from_ to _to_. + 1. Return the substring of _string_ from _from_ to _to_.

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -36154,31 +36150,31 @@

    String.prototype.split ( _separator_, _limit_ )

    1. Let _splitter_ be ? GetMethod(_separator_, %Symbol.split%). 1. If _splitter_ is not *undefined*, then 1. Return ? Call(_splitter_, _separator_, « _thisValue_, _limit_ »). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. If _limit_ is *undefined*, let _lim_ be 232 - 1; else let _lim_ be ℝ(? ToUint32(_limit_)). - 1. Let _separatorStr_ be ? ToString(_separator_). + 1. Let _separatorString_ be ? ToString(_separator_). 1. If _lim_ = 0, then 1. Return CreateArrayFromList(« »). 1. If _separator_ is *undefined*, then - 1. Return CreateArrayFromList(« _str_ »). - 1. Let _separatorLength_ be the length of _separatorStr_. + 1. Return CreateArrayFromList(« _string_ »). + 1. Let _separatorLength_ be the length of _separatorString_. 1. If _separatorLength_ = 0, then - 1. Let _strLen_ be the length of _str_. - 1. Let _outLen_ be the result of clamping _lim_ between 0 and _strLen_. - 1. Let _head_ be the substring of _str_ from 0 to _outLen_. + 1. Let _stringLength_ be the length of _string_. + 1. Let _outLength_ be the result of clamping _lim_ between 0 and _stringLength_. + 1. Let _head_ be the substring of _string_ from 0 to _outLength_. 1. Let _codeUnits_ be a List consisting of the sequence of code units that are the elements of _head_. 1. Return CreateArrayFromList(_codeUnits_). - 1. If _str_ is the empty String, return CreateArrayFromList(« _str_ »). + 1. If _string_ is the empty String, return CreateArrayFromList(« _string_ »). 1. Let _substrings_ be a new empty List. 1. Let _searchStart_ be 0. - 1. Let _matchIndex_ be StringIndexOf(_str_, _separatorStr_, 0). + 1. Let _matchIndex_ be StringIndexOf(_string_, _separatorString_, 0). 1. Repeat, while _matchIndex_ is not ~not-found~, - 1. Let _substring_ be the substring of _str_ from _searchStart_ to _matchIndex_. + 1. Let _substring_ be the substring of _string_ from _searchStart_ to _matchIndex_. 1. Append _substring_ to _substrings_. 1. If the number of elements in _substrings_ is _lim_, return CreateArrayFromList(_substrings_). 1. Set _searchStart_ to _matchIndex_ + _separatorLength_. - 1. Set _matchIndex_ to StringIndexOf(_str_, _separatorStr_, _searchStart_). - 1. Let _substring_ be the substring of _str_ from _searchStart_. + 1. Set _matchIndex_ to StringIndexOf(_string_, _separatorString_, _searchStart_). + 1. Let _substring_ be the substring of _string_ from _searchStart_. 1. Append _substring_ to _substrings_. 1. Return CreateArrayFromList(_substrings_).
    @@ -36198,19 +36194,19 @@

    String.prototype.startsWith ( _searchString_ [ , _position_ ] )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _string_ be ? ToString(_thisValue_). 1. Let _isRegExp_ be ? IsRegExp(_searchString_). 1. If _isRegExp_ is *true*, throw a *TypeError* exception. - 1. Let _searchStr_ be ? ToString(_searchString_). - 1. Let _len_ be the length of _str_. - 1. If _position_ is *undefined*, let _pos_ be 0; else let _pos_ be ? ToIntegerOrInfinity(_position_). - 1. Let _start_ be the result of clamping _pos_ between 0 and _len_. - 1. Let _searchLength_ be the length of _searchStr_. + 1. Set _searchString_ to ? ToString(_searchString_). + 1. Let _length_ be the length of _string_. + 1. If _position_ is *undefined*, set _position_ to 0; else set _position_ to ? ToIntegerOrInfinity(_position_). + 1. Let _start_ be the result of clamping _position_ between 0 and _length_. + 1. Let _searchLength_ be the length of _searchString_. 1. If _searchLength_ = 0, return *true*. 1. Let _end_ be _start_ + _searchLength_. - 1. If _end_ > _len_, return *false*. - 1. Let _substring_ be the substring of _str_ from _start_ to _end_. - 1. If _substring_ is _searchStr_, return *true*. + 1. If _end_ > _length_, return *false*. + 1. Let _substring_ be the substring of _string_ from _start_ to _end_. + 1. If _substring_ is _searchString_, return *true*. 1. Return *false*. @@ -36230,15 +36226,15 @@

    String.prototype.substring ( _start_, _end_ )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _len_ be the length of _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Let _length_ be the length of _string_. 1. Let _intStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _end_ is *undefined*, let _intEnd_ be _len_; else let _intEnd_ be ? ToIntegerOrInfinity(_end_). - 1. Let _finalStart_ be the result of clamping _intStart_ between 0 and _len_. - 1. Let _finalEnd_ be the result of clamping _intEnd_ between 0 and _len_. + 1. If _end_ is *undefined*, let _intEnd_ be _length_; else let _intEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Let _finalStart_ be the result of clamping _intStart_ between 0 and _length_. + 1. Let _finalEnd_ be the result of clamping _intEnd_ between 0 and _length_. 1. Let _from_ be min(_finalStart_, _finalEnd_). 1. Let _to_ be max(_finalStart_, _finalEnd_). - 1. Return the substring of _str_ from _from_ to _to_. + 1. Return the substring of _string_ from _from_ to _to_.

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

    @@ -36274,8 +36270,8 @@

    String.prototype.toLowerCase ( )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _sText_ be StringToCodePoints(_str_). + 1. Let _string_ be ? ToString(_thisValue_). + 1. Let _sText_ be StringToCodePoints(_string_). 1. Let _lowerText_ be toLowercase(_sText_), according to the Unicode Default Case Conversion algorithm. 1. Let _lowercaseString_ be CodePointsToString(_lowerText_). 1. Return _lowercaseString_. @@ -36316,17 +36312,17 @@

    String.prototype.toWellFormed ( )

    1. Let _thisValue_ be the *this* value. 1. Perform ? RequireObjectCoercible(_thisValue_). - 1. Let _str_ be ? ToString(_thisValue_). - 1. Let _strLen_ be the length of _str_. + 1. Let _string_ be ? ToString(_thisValue_). + 1. Let _stringLength_ be the length of _string_. 1. Let _k_ be 0. 1. Let _result_ be the empty String. - 1. Repeat, while _k_ < _strLen_, - 1. Let _cp_ be CodePointAt(_str_, _k_). - 1. If _cp_.[[IsUnpairedSurrogate]] is *true*, then + 1. Repeat, while _k_ < _stringLength_, + 1. Let _codePoint_ be CodePointAt(_string_, _k_). + 1. If _codePoint_.[[IsUnpairedSurrogate]] is *true*, then 1. Set _result_ to the string-concatenation of _result_ and 0xFFFD (REPLACEMENT CHARACTER). 1. Else, - 1. Set _result_ to the string-concatenation of _result_ and UTF16EncodeCodePoint(_cp_.[[CodePoint]]). - 1. Set _k_ to _k_ + _cp_.[[CodeUnitCount]]. + 1. Set _result_ to the string-concatenation of _result_ and UTF16EncodeCodePoint(_codePoint_.[[CodePoint]]). + 1. Set _k_ to _k_ + _codePoint_.[[CodeUnitCount]]. 1. Return _result_. @@ -36346,24 +36342,24 @@

    String.prototype.trim ( )

    TrimString ( - _string_: an ECMAScript language value, + _arg_: an ECMAScript language value, _where_: ~start~, ~end~, or ~start+end~, ): either a normal completion containing a String or a throw completion

    description
    -
    It interprets _string_ as a sequence of UTF-16 encoded code points, as described in .
    +
    It interprets _arg_ as a sequence of UTF-16 encoded code points, as described in .
    - 1. Perform ? RequireObjectCoercible(_string_). - 1. Let _str_ be ? ToString(_string_). + 1. Perform ? RequireObjectCoercible(_arg_). + 1. Let _string_ be ? ToString(_arg_). 1. If _where_ is ~start~, then - 1. Let _trimmedString_ be the String value that is a copy of _str_ with leading white space removed. + 1. Let _trimmedString_ be the String value that is a copy of _string_ with leading white space removed. 1. Else if _where_ is ~end~, then - 1. Let _trimmedString_ be the String value that is a copy of _str_ with trailing white space removed. + 1. Let _trimmedString_ be the String value that is a copy of _string_ with trailing white space removed. 1. Else, 1. Assert: _where_ is ~start+end~. - 1. Let _trimmedString_ be the String value that is a copy of _str_ with both leading and trailing white space removed. + 1. Let _trimmedString_ be the String value that is a copy of _string_ with both leading and trailing white space removed. 1. Return _trimmedString_.

    The definition of white space is the union of |WhiteSpace| and |LineTerminator|. When determining whether a Unicode code point is in Unicode general category “Space_Separator” (“Zs”), code unit sequences are interpreted as UTF-16 encoded code point sequences as specified in .

    @@ -36375,8 +36371,8 @@

    String.prototype.trimEnd ( )

    This method interprets a String value as a sequence of UTF-16 encoded code points, as described in .

    It performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? TrimString(_str_, ~end~). + 1. Let _string_ be the *this* value. + 1. Return ? TrimString(_string_, ~end~).

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

    @@ -36388,8 +36384,8 @@

    String.prototype.trimStart ( )

    This method interprets a String value as a sequence of UTF-16 encoded code points, as described in .

    It performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? TrimString(_str_, ~start~). + 1. Let _string_ be the *this* value. + 1. Return ? TrimString(_string_, ~start~).

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore, it can be transferred to other kinds of objects for use as a method.

    @@ -36406,17 +36402,17 @@

    String.prototype.valueOf ( )

    ThisStringValue ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing a String or a throw completion

    - 1. If _value_ is a String, return _value_. - 1. If _value_ is an Object and _value_ has a [[StringData]] internal slot, then - 1. Let _str_ be _value_.[[StringData]]. - 1. Assert: _str_ is a String. - 1. Return _str_. + 1. If _arg_ is a String, return _arg_. + 1. If _arg_ is an Object and _arg_ has a [[StringData]] internal slot, then + 1. Let _string_ be _arg_.[[StringData]]. + 1. Assert: _string_ is a String. + 1. Return _string_. 1. Throw a *TypeError* exception.
    @@ -36427,16 +36423,16 @@

    String.prototype [ %Symbol.iterator% ] ( )

    This method returns an iterator object that iterates over the code points of a String value, returning each code point as a String value.

    It performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_str_). - 1. Set _str_ to ? ToString(_str_). - 1. Let _closure_ be a new Abstract Closure with no parameters that captures _str_ and performs the following steps when called: - 1. Let _len_ be the length of _str_. + 1. Let _string_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_string_). + 1. Set _string_ to ? ToString(_string_). + 1. Let _closure_ be a new Abstract Closure with no parameters that captures _string_ and performs the following steps when called: + 1. Let _length_ be the length of _string_. 1. Let _position_ be 0. - 1. Repeat, while _position_ < _len_, - 1. Let _cp_ be CodePointAt(_str_, _position_). - 1. Let _nextIndex_ be _position_ + _cp_.[[CodeUnitCount]]. - 1. Let _resultString_ be the substring of _str_ from _position_ to _nextIndex_. + 1. Repeat, while _position_ < _length_, + 1. Let _codePoint_ be CodePointAt(_string_, _position_). + 1. Let _nextIndex_ be _position_ + _codePoint_.[[CodeUnitCount]]. + 1. Let _resultString_ be the substring of _string_ from _position_ to _nextIndex_. 1. Set _position_ to _nextIndex_. 1. Perform ? GeneratorYield(CreateIteratorResultObject(_resultString_, *false*)). 1. Return NormalCompletion(~unused~). @@ -36919,39 +36915,39 @@

    Static Semantics: Early Errors

    Static Semantics: CountLeftCapturingParensWithin ( - _node_: a Parse Node, + _parseNode_: a Parse Node, ): a non-negative integer

    description
    -
    It returns the number of left-capturing parentheses in _node_. A left-capturing parenthesis is any `(` pattern character that is matched by the `(` terminal of the Atom :: `(` GroupSpecifier? Disjunction `)` production.
    +
    It returns the number of left-capturing parentheses in _parseNode_. A left-capturing parenthesis is any `(` pattern character that is matched by the `(` terminal of the Atom :: `(` GroupSpecifier? Disjunction `)` production.

    This section is amended in .

    - 1. Assert: _node_ is an instance of a production in the RegExp Pattern grammar. - 1. Return the number of Atom :: `(` GroupSpecifier? Disjunction `)` Parse Nodes contained within _node_. + 1. Assert: _parseNode_ is an instance of a production in the RegExp Pattern grammar. + 1. Return the number of Atom :: `(` GroupSpecifier? Disjunction `)` Parse Nodes contained within _parseNode_.

    Static Semantics: CountLeftCapturingParensBefore ( - _node_: a Parse Node, + _parseNode_: a Parse Node, ): a non-negative integer

    description
    -
    It returns the number of left-capturing parentheses within the enclosing pattern that occur to the left of _node_.
    +
    It returns the number of left-capturing parentheses within the enclosing pattern that occur to the left of _parseNode_.

    This section is amended in .

    - 1. Assert: _node_ is an instance of a production in the RegExp Pattern grammar. - 1. Let _pattern_ be the |Pattern| containing _node_. - 1. Return the number of Atom :: `(` GroupSpecifier? Disjunction `)` Parse Nodes contained within _pattern_ that either occur before _node_ or contain _node_. + 1. Assert: _parseNode_ is an instance of a production in the RegExp Pattern grammar. + 1. Let _pattern_ be the |Pattern| containing _parseNode_. + 1. Return the number of Atom :: `(` GroupSpecifier? Disjunction `)` Parse Nodes contained within _pattern_ that either occur before _parseNode_ or contain _parseNode_.
    @@ -37035,8 +37031,8 @@

    Static Semantics: CharacterValue ( ): a non-negative integer

    ClassAtomNoDash :: SourceCharacter but not one of `\` or `]` or `-` - 1. Let _ch_ be the code point matched by |SourceCharacter|. - 1. Return the numeric value of _ch_. + 1. Let _codePoint_ be the code point matched by |SourceCharacter|. + 1. Return the numeric value of _codePoint_. ClassEscape :: `b` @@ -37164,8 +37160,8 @@

    Static Semantics: CharacterValue ( ): a non-negative integer

    CharacterEscape :: `c` AsciiLetter - 1. Let _ch_ be the code point matched by |AsciiLetter|. - 1. Let _i_ be the numeric value of _ch_. + 1. Let _codePoint_ be the code point matched by |AsciiLetter|. + 1. Let _i_ be the numeric value of _codePoint_. 1. Return the remainder of dividing _i_ by 32. CharacterEscape :: `0` [lookahead ∉ DecimalDigit] @@ -37183,8 +37179,8 @@

    Static Semantics: CharacterValue ( ): a non-negative integer

    1. Let _lead_ be the CharacterValue of |HexLeadSurrogate|. 1. Let _trail_ be the CharacterValue of |HexTrailSurrogate|. - 1. Let _cp_ be UTF16SurrogatePairToCodePoint(_lead_, _trail_). - 1. Return the numeric value of _cp_. + 1. Let _codePoint_ be UTF16SurrogatePairToCodePoint(_lead_, _trail_). + 1. Return the numeric value of _codePoint_. RegExpUnicodeEscapeSequence :: `u` Hex4Digits @@ -37206,18 +37202,18 @@

    Static Semantics: CharacterValue ( ): a non-negative integer

    CharacterEscape :: IdentityEscape - 1. Let _ch_ be the code point matched by |IdentityEscape|. - 1. Return the numeric value of _ch_. + 1. Let _codePoint_ be the code point matched by |IdentityEscape|. + 1. Return the numeric value of _codePoint_. ClassSetCharacter :: SourceCharacter but not ClassSetSyntaxCharacter - 1. Let _ch_ be the code point matched by |SourceCharacter|. - 1. Return the numeric value of _ch_. + 1. Let _codePoint_ be the code point matched by |SourceCharacter|. + 1. Return the numeric value of _codePoint_. ClassSetCharacter :: `\` ClassSetReservedPunctuator - 1. Let _ch_ be the code point matched by |ClassSetReservedPunctuator|. - 1. Return the numeric value of _ch_. + 1. Let _codePoint_ be the code point matched by |ClassSetReservedPunctuator|. + 1. Return the numeric value of _codePoint_. ClassSetCharacter :: `\b` @@ -37323,9 +37319,9 @@

    1. Let _name_ be the CapturingGroupName of _thisGroupName_. 1. Let _pattern_ be the |Pattern| containing _thisGroupName_. 1. Let _result_ be a new empty List. - 1. For each |GroupSpecifier| _gs_ that _pattern_ contains, do - 1. If the CapturingGroupName of _gs_ is _name_, then - 1. Append _gs_ to _result_. + 1. For each |GroupSpecifier| _groupSpecifier_ that _pattern_ contains, do + 1. If the CapturingGroupName of _groupSpecifier_ is _name_, then + 1. Append _groupSpecifier_ to _result_. 1. Return _result_. @@ -37349,14 +37345,14 @@

    Static Semantics: RegExpIdentifierCodePoints ( ): a List of code points

    RegExpIdentifierName :: RegExpIdentifierStart - 1. Let _cp_ be the RegExpIdentifierCodePoint of |RegExpIdentifierStart|. - 1. Return « _cp_ ». + 1. Let _codePoint_ be the RegExpIdentifierCodePoint of |RegExpIdentifierStart|. + 1. Return « _codePoint_ ». RegExpIdentifierName :: RegExpIdentifierName RegExpIdentifierPart 1. Let _cps_ be the RegExpIdentifierCodePoints of the derived |RegExpIdentifierName|. - 1. Let _cp_ be the RegExpIdentifierCodePoint of |RegExpIdentifierPart|. - 1. Return the list-concatenation of _cps_ and « _cp_ ». + 1. Let _codePoint_ be the RegExpIdentifierCodePoint of |RegExpIdentifierPart|. + 1. Return the list-concatenation of _cps_ and « _codePoint_ ».
    @@ -37501,8 +37497,8 @@

    1. Let _c_ be a new MatcherContinuation with parameters (_y_) that captures nothing and performs the following steps when called: 1. Assert: _y_ is a MatchState. 1. Return _y_. - 1. Let _cap_ be a List of _regexpRecord_.[[CapturingGroupsCount]] *undefined* values, indexed 1 through _regexpRecord_.[[CapturingGroupsCount]]. - 1. Let _x_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _index_, [[Captures]]: _cap_ }. + 1. Let _capability_ be a List of _regexpRecord_.[[CapturingGroupsCount]] *undefined* values, indexed 1 through _regexpRecord_.[[CapturingGroupsCount]]. + 1. Let _x_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _index_, [[Captures]]: _capability_ }. 1. Return _m_(_x_, _c_). @@ -37605,11 +37601,11 @@

    1. If _min_ = 0, let _min2_ be 0; else let _min2_ be _min_ - 1. 1. If _max_ = +∞, let _max2_ be +∞; else let _max2_ be _max_ - 1. 1. Return RepeatMatcher(_m_, _min2_, _max2_, _greedy_, _y_, _continue_, _parenIndex_, _parenCount_). - 1. Let _cap_ be a copy of _matchState_.[[Captures]]. - 1. [id="step-repeatmatcher-clear-captures"] For each integer _k_ in the inclusive interval from _parenIndex_ + 1 to _parenIndex_ + _parenCount_, set _cap_[_k_] to *undefined*. + 1. Let _capability_ be a copy of _matchState_.[[Captures]]. + 1. [id="step-repeatmatcher-clear-captures"] For each integer _k_ in the inclusive interval from _parenIndex_ + 1 to _parenIndex_ + _parenCount_, set _capability_[_k_] to *undefined*. 1. Let _input_ be _matchState_.[[Input]]. 1. Let _e_ be _matchState_.[[EndIndex]]. - 1. Let _xr_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _e_, [[Captures]]: _cap_ }. + 1. Let _xr_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _e_, [[Captures]]: _capability_ }. 1. If _min_ ≠ 0, return _m_(_xr_, _d_). 1. If _greedy_ is *false*, then 1. Let _z_ be _continue_(_matchState_). @@ -37686,8 +37682,8 @@

    1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _m1_ and _m2_ and performs the following steps when called: 1. Assert: _matchState_ is a MatchState. 1. Assert: _continue_ is a MatcherContinuation. - 1. Let _r_ be _m1_(_matchState_, _continue_). - 1. If _r_ is not ~failure~, return _r_. + 1. Let _result_ be _m1_(_matchState_, _continue_). + 1. If _result_ is not ~failure~, return _result_. 1. Return _m2_(_matchState_, _continue_). @@ -37793,13 +37789,13 @@

    1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures nothing and performs the following steps when called: 1. Assert: _y_ is a MatchState. 1. Return _y_. - 1. Let _r_ be _m_(_matchState_, _d_). - 1. If _r_ is ~failure~, return ~failure~. - 1. Assert: _r_ is a MatchState. - 1. Let _cap_ be _r_.[[Captures]]. + 1. Let _result_ be _m_(_matchState_, _d_). + 1. If _result_ is ~failure~, return ~failure~. + 1. Assert: _result_ is a MatchState. + 1. Let _capability_ be _result_.[[Captures]]. 1. Let _input_ be _matchState_.[[Input]]. 1. Let _xe_ be _matchState_.[[EndIndex]]. - 1. Let _z_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _xe_, [[Captures]]: _cap_ }. + 1. Let _z_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _xe_, [[Captures]]: _capability_ }. 1. Return _continue_(_z_). @@ -37824,8 +37820,8 @@

    1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures nothing and performs the following steps when called: 1. Assert: _y_ is a MatchState. 1. Return _y_. - 1. Let _r_ be _m_(_matchState_, _d_). - 1. If _r_ is not ~failure~, return ~failure~. + 1. Let _result_ be _m_(_matchState_, _d_). + 1. If _result_ is not ~failure~, return ~failure~. 1. Return _continue_(_matchState_). @@ -37843,13 +37839,13 @@

    1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures nothing and performs the following steps when called: 1. Assert: _y_ is a MatchState. 1. Return _y_. - 1. Let _r_ be _m_(_matchState_, _d_). - 1. If _r_ is ~failure~, return ~failure~. - 1. Assert: _r_ is a MatchState. - 1. Let _cap_ be _r_.[[Captures]]. + 1. Let _result_ be _m_(_matchState_, _d_). + 1. If _result_ is ~failure~, return ~failure~. + 1. Assert: _result_ is a MatchState. + 1. Let _capability_ be _result_.[[Captures]]. 1. Let _input_ be _matchState_.[[Input]]. 1. Let _xe_ be _matchState_.[[EndIndex]]. - 1. Let _z_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _xe_, [[Captures]]: _cap_ }. + 1. Let _z_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _xe_, [[Captures]]: _capability_ }. 1. Return _continue_(_z_). Assertion :: `(?<!` Disjunction `)` @@ -37861,8 +37857,8 @@

    1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures nothing and performs the following steps when called: 1. Assert: _y_ is a MatchState. 1. Return _y_. - 1. Let _r_ be _m_(_matchState_, _d_). - 1. If _r_ is not ~failure~, return ~failure~. + 1. Let _result_ be _m_(_matchState_, _d_). + 1. If _result_ is not ~failure~, return ~failure~. 1. Return _continue_(_matchState_). @@ -37879,8 +37875,8 @@

    1. Let _inputLength_ be the number of elements in _input_. 1. If _e_ = -1 or _e_ = _inputLength_, return *false*. - 1. Let _c_ be the character _input_[_e_]. - 1. If WordCharacters(_regexpRecord_) contains _c_, return *true*. + 1. Let _char_ be the character _input_[_e_]. + 1. If WordCharacters(_regexpRecord_) contains _char_, return *true*. 1. Return *false*. @@ -37952,8 +37948,8 @@

    Atom :: PatternCharacter - 1. Let _ch_ be the character matched by |PatternCharacter|. - 1. Let _charSet_ be a one-element CharSet containing the character _ch_. + 1. Let _char_ be the character matched by |PatternCharacter|. + 1. Let _charSet_ be a one-element CharSet containing the character _char_. 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). Atom :: `.` @@ -37969,7 +37965,7 @@

    1. Let _cs_ be _cc_.[[CharSet]]. 1. If _regexpRecord_.[[UnicodeSets]] is *false* or every CharSetElement of _cs_ consists of a single character (including if _cs_ is empty), return CharacterSetMatcher(_regexpRecord_, _cs_, _cc_.[[Invert]], _direction_). 1. Assert: _cc_.[[Invert]] is *false*. - 1. Let _lm_ be an empty List of Matchers. + 1. Let _listOfMatchers_ be an empty List of Matchers. 1. For each CharSetElement _s_ in _cs_ containing more than 1 character, iterating in descending order of length, do 1. Let _cs2_ be a one-element CharSet containing the last code point of _s_. 1. Let _m2_ be CharacterSetMatcher(_regexpRecord_, _cs2_, *false*, _direction_). @@ -37977,12 +37973,12 @@

    1. Let _cs1_ be a one-element CharSet containing _c1_. 1. Let _m1_ be CharacterSetMatcher(_regexpRecord_, _cs1_, *false*, _direction_). 1. Set _m2_ to MatchSequence(_m1_, _m2_, _direction_). - 1. Append _m2_ to _lm_. + 1. Append _m2_ to _listOfMatchers_. 1. Let _singles_ be the CharSet containing every CharSetElement of _cs_ that consists of a single character. - 1. Append CharacterSetMatcher(_regexpRecord_, _singles_, *false*, _direction_) to _lm_. - 1. If _cs_ contains the empty sequence of characters, append EmptyMatcher() to _lm_. - 1. Let _m2_ be the last Matcher in _lm_. - 1. For each Matcher _m1_ of _lm_, iterating backwards from its second-to-last element, do + 1. Append CharacterSetMatcher(_regexpRecord_, _singles_, *false*, _direction_) to _listOfMatchers_. + 1. If _cs_ contains the empty sequence of characters, append EmptyMatcher() to _listOfMatchers_. + 1. Let _m2_ be the last Matcher in _listOfMatchers_. + 1. For each Matcher _m1_ of _listOfMatchers_, iterating backwards from its second-to-last element, do 1. Set _m2_ to MatchTwoAlternatives(_m1_, _m2_). 1. Return _m2_. @@ -37995,7 +37991,7 @@

    1. Assert: _c_ is a MatcherContinuation. 1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures _x_, _c_, _direction_, and _parenIndex_ and performs the following steps when called: 1. Assert: _y_ is a MatchState. - 1. Let _cap_ be a copy of _y_.[[Captures]]. + 1. Let _capability_ be a copy of _y_.[[Captures]]. 1. Let _input_ be _x_.[[Input]]. 1. Let _xe_ be _x_.[[EndIndex]]. 1. Let _ye_ be _y_.[[EndIndex]]. @@ -38006,8 +38002,8 @@

    1. Assert: _direction_ is ~backward~. 1. Assert: _ye_ ≤ _xe_. 1. Let _r_ be the CaptureRange { [[StartIndex]]: _ye_, [[EndIndex]]: _xe_ }. - 1. Set _cap_[_parenIndex_ + 1] to _r_. - 1. Let _z_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _ye_, [[Captures]]: _cap_ }. + 1. Set _capability_[_parenIndex_ + 1] to _r_. + 1. Let _z_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _ye_, [[Captures]]: _capability_ }. 1. Return _c_(_z_). 1. Return _m_(_x_, _d_). @@ -38041,16 +38037,16 @@

    AtomEscape :: CharacterEscape - 1. Let _cv_ be the CharacterValue of |CharacterEscape|. - 1. Let _ch_ be the character whose character value is _cv_. - 1. Let _charSet_ be a one-element CharSet containing the character _ch_. + 1. Let _charValue_ be the CharacterValue of |CharacterEscape|. + 1. Let _char_ be the character whose character value is _charValue_. + 1. Let _charSet_ be a one-element CharSet containing the character _char_. 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). AtomEscape :: CharacterClassEscape 1. Let _cs_ be CompileToCharSet of |CharacterClassEscape| with argument _regexpRecord_. 1. If _regexpRecord_.[[UnicodeSets]] is *false* or every CharSetElement of _cs_ consists of a single character (including if _cs_ is empty), return CharacterSetMatcher(_regexpRecord_, _cs_, *false*, _direction_). - 1. Let _lm_ be an empty List of Matchers. + 1. Let _listOfMatchers_ be an empty List of Matchers. 1. For each CharSetElement _s_ in _cs_ containing more than 1 character, iterating in descending order of length, do 1. Let _cs2_ be a one-element CharSet containing the last code point of _s_. 1. Let _m2_ be CharacterSetMatcher(_regexpRecord_, _cs2_, *false*, _direction_). @@ -38058,12 +38054,12 @@

    1. Let _cs1_ be a one-element CharSet containing _c1_. 1. Let _m1_ be CharacterSetMatcher(_regexpRecord_, _cs1_, *false*, _direction_). 1. Set _m2_ to MatchSequence(_m1_, _m2_, _direction_). - 1. Append _m2_ to _lm_. + 1. Append _m2_ to _listOfMatchers_. 1. Let _singles_ be the CharSet containing every CharSetElement of _cs_ that consists of a single character. - 1. Append CharacterSetMatcher(_regexpRecord_, _singles_, *false*, _direction_) to _lm_. - 1. If _cs_ contains the empty sequence of characters, append EmptyMatcher() to _lm_. - 1. Let _m2_ be the last Matcher in _lm_. - 1. For each Matcher _m1_ of _lm_, iterating backwards from its second-to-last element, do + 1. Append CharacterSetMatcher(_regexpRecord_, _singles_, *false*, _direction_) to _listOfMatchers_. + 1. If _cs_ contains the empty sequence of characters, append EmptyMatcher() to _listOfMatchers_. + 1. Let _m2_ be the last Matcher in _listOfMatchers_. + 1. For each Matcher _m1_ of _listOfMatchers_, iterating backwards from its second-to-last element, do 1. Set _m2_ to MatchTwoAlternatives(_m1_, _m2_). 1. Return _m2_. @@ -38102,13 +38098,13 @@

    1. Let _inputLength_ be the number of elements in _input_. 1. If _f_ < 0 or _f_ > _inputLength_, return ~failure~. 1. Let _index_ be min(_endIndex_, _f_). - 1. Let _ch_ be the character _input_[_index_]. - 1. Let _cc_ be Canonicalize(_regexpRecord_, _ch_). + 1. Let _char_ be the character _input_[_index_]. + 1. Let _cc_ be Canonicalize(_regexpRecord_, _char_). 1. If there exists a CharSetElement in _charSet_ containing exactly one character _a_ such that Canonicalize(_regexpRecord_, _a_) is _cc_, let _found_ be *true*; else let _found_ be *false*. 1. If _invert_ is *false* and _found_ is *false*, return ~failure~. 1. If _invert_ is *true* and _found_ is *true*, return ~failure~. - 1. Let _cap_ be _x_.[[Captures]]. - 1. Let _y_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _f_, [[Captures]]: _cap_ }. + 1. Let _capability_ be _x_.[[Captures]]. + 1. Let _y_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _f_, [[Captures]]: _capability_ }. 1. Return _c_(_y_). @@ -38128,24 +38124,24 @@

    1. Assert: _x_ is a MatchState. 1. Assert: _c_ is a MatcherContinuation. 1. Let _input_ be _x_.[[Input]]. - 1. Let _cap_ be _x_.[[Captures]]. + 1. Let _capability_ be _x_.[[Captures]]. 1. Let _r_ be *undefined*. 1. For each integer _n_ of _ns_, do - 1. If _cap_[_n_] is not *undefined*, then + 1. If _capability_[_n_] is not *undefined*, then 1. Assert: _r_ is *undefined*. - 1. Set _r_ to _cap_[_n_]. + 1. Set _r_ to _capability_[_n_]. 1. If _r_ is *undefined*, return _c_(_x_). 1. Let _endIndex_ be _x_.[[EndIndex]]. 1. Let _rs_ be _r_.[[StartIndex]]. 1. Let _re_ be _r_.[[EndIndex]]. - 1. Let _len_ be _re_ - _rs_. - 1. If _direction_ is ~forward~, let _f_ be _endIndex_ + _len_. - 1. Else, let _f_ be _endIndex_ - _len_. + 1. Let _length_ be _re_ - _rs_. + 1. If _direction_ is ~forward~, let _f_ be _endIndex_ + _length_. + 1. Else, let _f_ be _endIndex_ - _length_. 1. Let _inputLength_ be the number of elements in _input_. 1. If _f_ < 0 or _f_ > _inputLength_, return ~failure~. 1. Let _g_ be min(_endIndex_, _f_). - 1. If there exists an integer _i_ in the interval from 0 (inclusive) to _len_ (exclusive) such that Canonicalize(_regexpRecord_, _input_[_rs_ + _i_]) is not Canonicalize(_regexpRecord_, _input_[_g_ + _i_]), return ~failure~. - 1. Let _y_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _f_, [[Captures]]: _cap_ }. + 1. If there exists an integer _i_ in the interval from 0 (inclusive) to _length_ (exclusive) such that Canonicalize(_regexpRecord_, _input_[_rs_ + _i_]) is not Canonicalize(_regexpRecord_, _input_[_g_ + _i_]), return ~failure~. + 1. Let _y_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _f_, [[Captures]]: _capability_ }. 1. Return _c_(_y_). @@ -38154,24 +38150,24 @@

    Canonicalize ( _regexpRecord_: a RegExp Record, - _ch_: a character, + _char_: a character, ): a character

    1. If HasEitherUnicodeFlag(_regexpRecord_) is *true* and _regexpRecord_.[[IgnoreCase]] is *true*, then - 1. If the file CaseFolding.txt of the Unicode Character Database provides a simple or common case folding mapping for _ch_, return the result of applying that mapping to _ch_. - 1. Return _ch_. - 1. If _regexpRecord_.[[IgnoreCase]] is *false*, return _ch_. - 1. Assert: _ch_ is a UTF-16 code unit. - 1. Let _cp_ be the code point whose numeric value is the numeric value of _ch_. - 1. Let _u_ be toUppercase(« _cp_ »), according to the Unicode Default Case Conversion algorithm. - 1. Let _uStr_ be CodePointsToString(_u_). - 1. If the length of _uStr_ ≠ 1, return _ch_. - 1. Let _cu_ be _uStr_'s single code unit element. - 1. If the numeric value of _ch_ ≥ 128 and the numeric value of _cu_ < 128, return _ch_. - 1. Return _cu_. + 1. If the file CaseFolding.txt of the Unicode Character Database provides a simple or common case folding mapping for _char_, return the result of applying that mapping to _char_. + 1. Return _char_. + 1. If _regexpRecord_.[[IgnoreCase]] is *false*, return _char_. + 1. Assert: _char_ is a UTF-16 code unit. + 1. Let _codePoint_ be the code point whose numeric value is the numeric value of _char_. + 1. Let _u_ be toUppercase(« _codePoint_ »), according to the Unicode Default Case Conversion algorithm. + 1. Let _uString_ be CodePointsToString(_u_). + 1. If the length of _uString_ ≠ 1, return _char_. + 1. Let _codeUnit_ be _uString_'s single code unit element. + 1. If the numeric value of _char_ ≥ 128 and the numeric value of _codeUnit_ < 128, return _char_. + 1. Return _codeUnit_.

    In case-insignificant matches when HasEitherUnicodeFlag(_regexpRecord_) is *true*, all characters are implicitly case-folded using the simple mapping provided by the Unicode Standard immediately before they are compared. The simple mapping always maps to a single code point, so it does not map, for example, `ß` (U+00DF LATIN SMALL LETTER SHARP S) to `ss` or `SS`. It may however map code points outside the Basic Latin block to code points within it—for example, `ſ` (U+017F LATIN SMALL LETTER LONG S) case-folds to `s` (U+0073 LATIN SMALL LETTER S) and `K` (U+212A KELVIN SIGN) case-folds to `k` (U+006B LATIN SMALL LETTER K). Strings containing those code points are matched by regular expressions such as `/[a-z]/ui`.

    @@ -38309,9 +38305,9 @@

    CharacterEscape - 1. Let _cv_ be the CharacterValue of this |ClassEscape|. - 1. Let _c_ be the character whose character value is _cv_. - 1. Return the CharSet containing the single character _c_. + 1. Let _charValue_ be the CharacterValue of this |ClassEscape|. + 1. Let _char_ be the character whose character value is _charValue_. + 1. Return the CharSet containing the single character _char_.

    A |ClassAtom| can use any of the escape sequences that are allowed in the rest of the regular expression except for `\\b`, `\\B`, and backreferences. Inside a |CharacterClass|, `\\b` means the backspace character, while `\\B` and backreferences raise errors. Using a backreference inside a |ClassAtom| causes an error.

    @@ -38492,9 +38488,9 @@

    `\` ClassSetReservedPunctuator - 1. Let _cv_ be the CharacterValue of this |ClassSetCharacter|. - 1. Let _c_ be the character whose character value is _cv_. - 1. Return the CharSet containing the single character _c_. + 1. Let _charValue_ be the CharacterValue of this |ClassSetCharacter|. + 1. Let _char_ be the character whose character value is _charValue_. + 1. Return the CharSet containing the single character _char_. ClassSetCharacter :: `\b` @@ -38581,15 +38577,15 @@

    description
    -
    If _regexpRecord_.[[UnicodeSets]] is *false* or _regexpRecord_.[[IgnoreCase]] is *false*, it returns _charSet_. Otherwise, it uses the Simple Case Folding (scf(_cp_)) definitions in the file CaseFolding.txt of the Unicode Character Database (each of which maps a single code point to another single code point) to map each CharSetElement of _charSet_ character-by-character into a canonical form and returns the resulting CharSet.
    +
    If _regexpRecord_.[[UnicodeSets]] is *false* or _regexpRecord_.[[IgnoreCase]] is *false*, it returns _charSet_. Otherwise, it uses the Simple Case Folding (scf(_codePoint_)) definitions in the file CaseFolding.txt of the Unicode Character Database (each of which maps a single code point to another single code point) to map each CharSetElement of _charSet_ character-by-character into a canonical form and returns the resulting CharSet.
    1. If _regexpRecord_.[[UnicodeSets]] is *false* or _regexpRecord_.[[IgnoreCase]] is *false*, return _charSet_. 1. Let _otherSet_ be a new empty CharSet. 1. For each CharSetElement _s_ of _charSet_, do 1. Let _t_ be an empty sequence of characters. - 1. For each single code point _cp_ in _s_, do - 1. Append scf(_cp_) to _t_. + 1. For each single code point _codePoint_ in _s_, do + 1. Append scf(_codePoint_) to _t_. 1. Add _t_ to _otherSet_. 1. Return _otherSet_. @@ -38814,8 +38810,8 @@

    RegExp ( _patternOrRegexp_, _flags_ )

    1. If NewTarget is *undefined*, then 1. Let _newTarget_ be the active function object. 1. If _patternIsRegExp_ is *true* and _flags_ is *undefined*, then - 1. Let _patternConstructor_ be ? Get(_patternOrRegexp_, *"constructor"*). - 1. If SameValue(_newTarget_, _patternConstructor_) is *true*, return _patternOrRegexp_. + 1. Let _patternCtor_ be ? Get(_patternOrRegexp_, *"constructor"*). + 1. If SameValue(_newTarget_, _patternCtor_) is *true*, return _patternOrRegexp_. 1. Else, 1. Let _newTarget_ be NewTarget. 1. If _patternOrRegexp_ is an Object and _patternOrRegexp_ has a [[RegExpMatcher]] internal slot, then @@ -38845,23 +38841,23 @@

    Properties of the RegExp Constructor

    -

    RegExp.escape ( _str_ )

    -

    This function returns a copy of _str_ in which characters that are potentially special in a regular expression |Pattern| have been replaced by equivalent escape sequences.

    +

    RegExp.escape ( _string_ )

    +

    This function returns a copy of _string_ in which characters that are potentially special in a regular expression |Pattern| have been replaced by equivalent escape sequences.

    It performs the following steps when called:

    - 1. If _str_ is not a String, throw a *TypeError* exception. + 1. If _string_ is not a String, throw a *TypeError* exception. 1. Let _escaped_ be the empty String. - 1. Let _cpList_ be StringToCodePoints(_str_). - 1. For each code point _cp_ of _cpList_, do - 1. If _escaped_ is the empty String and _cp_ is matched by either |DecimalDigit| or |AsciiLetter|, then - 1. NOTE: Escaping a leading digit ensures that output corresponds with pattern text which may be used after a `\0` character escape or a |DecimalEscape| such as `\1` and still match _str_ rather than be interpreted as an extension of the preceding escape sequence. Escaping a leading ASCII letter does the same for the context after `\c`. - 1. Let _numericValue_ be the numeric value of _cp_. + 1. Let _codePointList_ be StringToCodePoints(_string_). + 1. For each code point _codePoint_ of _codePointList_, do + 1. If _escaped_ is the empty String and _codePoint_ is matched by either |DecimalDigit| or |AsciiLetter|, then + 1. NOTE: Escaping a leading digit ensures that output corresponds with pattern text which may be used after a `\0` character escape or a |DecimalEscape| such as `\1` and still match _string_ rather than be interpreted as an extension of the preceding escape sequence. Escaping a leading ASCII letter does the same for the context after `\c`. + 1. Let _numericValue_ be the numeric value of _codePoint_. 1. Let _hex_ be Number::toString(𝔽(_numericValue_), 16). 1. Assert: The length of _hex_ is 2. 1. Set _escaped_ to the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), *"x"*, and _hex_. 1. Else, - 1. Set _escaped_ to the string-concatenation of _escaped_ and EncodeForRegExpEscape(_cp_). + 1. Set _escaped_ to the string-concatenation of _escaped_ and EncodeForRegExpEscape(_codePoint_). 1. Return _escaped_. @@ -38872,32 +38868,32 @@

    RegExp.escape ( _str_ )

    EncodeForRegExpEscape ( - _cp_: a code point, + _codePoint_: a code point, ): a String

    description
    -
    It returns a String representing a |Pattern| for matching _cp_. If _cp_ is white space or an ASCII punctuator, the returned value is an escape sequence. Otherwise, the returned value is a String representation of _cp_ itself.
    +
    It returns a String representing a |Pattern| for matching _codePoint_. If _codePoint_ is white space or an ASCII punctuator, the returned value is an escape sequence. Otherwise, the returned value is a String representation of _codePoint_ itself.
    - 1. If _cp_ is matched by |SyntaxCharacter| or _cp_ is U+002F (SOLIDUS), then - 1. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and UTF16EncodeCodePoint(_cp_). - 1. If _cp_ is a code point listed in the “Code Point” column of , then - 1. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains _cp_. + 1. If _codePoint_ is matched by |SyntaxCharacter| or _codePoint_ is U+002F (SOLIDUS), then + 1. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and UTF16EncodeCodePoint(_codePoint_). + 1. If _codePoint_ is a code point listed in the “Code Point” column of , then + 1. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains _codePoint_. 1. Let _otherPunctuators_ be the string-concatenation of *",-=<>#&!%:;@~'`"* and the code unit 0x0022 (QUOTATION MARK). 1. Let _toEscape_ be StringToCodePoints(_otherPunctuators_). - 1. If _toEscape_ contains _cp_, _cp_ is matched by either |WhiteSpace| or |LineTerminator|, or _cp_ has the same numeric value as a leading surrogate or trailing surrogate, then - 1. Let _cpNum_ be the numeric value of _cp_. - 1. If _cpNum_ ≤ 0xFF, then - 1. Let _hex_ be Number::toString(𝔽(_cpNum_), 16). + 1. If _toEscape_ contains _codePoint_, _codePoint_ is matched by either |WhiteSpace| or |LineTerminator|, or _codePoint_ has the same numeric value as a leading surrogate or trailing surrogate, then + 1. Let _codePointNumber_ be the numeric value of _codePoint_. + 1. If _codePointNumber_ ≤ 0xFF, then + 1. Let _hex_ be Number::toString(𝔽(_codePointNumber_), 16). 1. Return the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), *"x"*, and StringPad(_hex_, 2, *"0"*, ~start~). 1. Let _escaped_ be the empty String. - 1. Let _codeUnits_ be UTF16EncodeCodePoint(_cp_). - 1. For each code unit _cu_ of _codeUnits_, do - 1. Set _escaped_ to the string-concatenation of _escaped_ and UnicodeEscape(_cu_). + 1. Let _codeUnits_ be UTF16EncodeCodePoint(_codePoint_). + 1. For each code unit _codeUnit_ of _codeUnits_, do + 1. Set _escaped_ to the string-concatenation of _escaped_ and UnicodeEscape(_codeUnit_). 1. Return _escaped_. - 1. Return UTF16EncodeCodePoint(_cp_). + 1. Return UTF16EncodeCodePoint(_codePoint_).
    @@ -38946,8 +38942,8 @@

    RegExp.prototype.exec ( _string_ )

    1. Let _regexp_ be the *this* value. 1. Perform ? RequireInternalSlot(_regexp_, [[RegExpMatcher]]). - 1. Let _str_ be ? ToString(_string_). - 1. Return ? RegExpBuiltinExec(_regexp_, _str_). + 1. Set _string_ to ? ToString(_string_). + 1. Return ? RegExpBuiltinExec(_regexp_, _string_). @@ -38956,8 +38952,8 @@

    get RegExp.prototype.dotAll

    `RegExp.prototype.dotAll` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x0073 (LATIN SMALL LETTER S). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x0073 (LATIN SMALL LETTER S). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_). @@ -39013,8 +39009,8 @@

    get RegExp.prototype.global

    `RegExp.prototype.global` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x0067 (LATIN SMALL LETTER G). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x0067 (LATIN SMALL LETTER G). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_). @@ -39023,8 +39019,8 @@

    get RegExp.prototype.hasIndices

    `RegExp.prototype.hasIndices` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x0064 (LATIN SMALL LETTER D). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x0064 (LATIN SMALL LETTER D). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_). @@ -39033,8 +39029,8 @@

    get RegExp.prototype.ignoreCase

    `RegExp.prototype.ignoreCase` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x0069 (LATIN SMALL LETTER I). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x0069 (LATIN SMALL LETTER I). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_). @@ -39044,23 +39040,23 @@

    RegExp.prototype [ %Symbol.match% ] ( _string_ )

    1. Let _regexp_ be the *this* value. 1. If _regexp_ is not an Object, throw a *TypeError* exception. - 1. Let _str_ be ? ToString(_string_). + 1. Set _string_ to ? ToString(_string_). 1. Let _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). - 1. If _flags_ does not contain *"g"*, return ? RegExpExec(_regexp_, _str_). + 1. If _flags_ does not contain *"g"*, return ? RegExpExec(_regexp_, _string_). 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; else let _fullUnicode_ be *false*. 1. Perform ? Set(_regexp_, *"lastIndex"*, *+0*𝔽, *true*). 1. Let _array_ be ! ArrayCreate(0). 1. Let _matchCount_ be 0. 1. Repeat, - 1. Let _result_ be ? RegExpExec(_regexp_, _str_). + 1. Let _result_ be ? RegExpExec(_regexp_, _string_). 1. If _result_ is *null*, then 1. If _matchCount_ = 0, return *null*. 1. Return _array_. - 1. Let _matchStr_ be ? ToString(? Get(_result_, *"0"*)). - 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_matchCount_)), _matchStr_). - 1. If _matchStr_ is the empty String, then + 1. Let _matchString_ be ? ToString(? Get(_result_, *"0"*)). + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_matchCount_)), _matchString_). + 1. If _matchString_ is the empty String, then 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_regexp_, *"lastIndex"*))). - 1. Let _nextIndex_ be AdvanceStringIndex(_str_, _thisIndex_, _fullUnicode_). + 1. Let _nextIndex_ be AdvanceStringIndex(_string_, _thisIndex_, _fullUnicode_). 1. Perform ? Set(_regexp_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). 1. Set _matchCount_ to _matchCount_ + 1. @@ -39076,17 +39072,17 @@

    RegExp.prototype [ %Symbol.matchAll% ] ( _string_ )

    1. Let _regexp_ be the *this* value. 1. If _regexp_ is not an Object, throw a *TypeError* exception. - 1. Let _str_ be ? ToString(_string_). - 1. Let _speciesConstructor_ be ? SpeciesConstructor(_regexp_, %RegExp%). + 1. Set _string_ to ? ToString(_string_). + 1. Let _speciesCtor_ be ? SpeciesConstructor(_regexp_, %RegExp%). 1. Let _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). - 1. Let _matcher_ be ? Construct(_speciesConstructor_, « _regexp_, _flags_ »). + 1. Let _matcher_ be ? Construct(_speciesCtor_, « _regexp_, _flags_ »). 1. Let _lastIndex_ be ? ToLength(? Get(_regexp_, *"lastIndex"*)). 1. Perform ? Set(_matcher_, *"lastIndex"*, _lastIndex_, *true*). 1. If _flags_ contains *"g"*, let _global_ be *true*. 1. Else, let _global_ be *false*. 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*. 1. Else, let _fullUnicode_ be *false*. - 1. Return CreateRegExpStringIterator(_matcher_, _str_, _global_, _fullUnicode_). + 1. Return CreateRegExpStringIterator(_matcher_, _string_, _global_, _fullUnicode_).

    The value of the *"name"* property of this method is *"[Symbol.matchAll]"*.

    @@ -39096,8 +39092,8 @@

    get RegExp.prototype.multiline

    `RegExp.prototype.multiline` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x006D (LATIN SMALL LETTER M). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x006D (LATIN SMALL LETTER M). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_). @@ -39107,10 +39103,10 @@

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    1. Let _regexp_ be the *this* value. 1. If _regexp_ is not an Object, throw a *TypeError* exception. - 1. Let _str_ be ? ToString(_string_). - 1. Let _lengthS_ be the length of _str_. - 1. Let _functionalReplace_ be IsCallable(_replaceValue_). - 1. If _functionalReplace_ is *false*, then + 1. Set _string_ to ? ToString(_string_). + 1. Let _stringLength_ be the length of _string_. + 1. Let _funcalReplace_ be IsCallable(_replaceValue_). + 1. If _funcalReplace_ is *false*, then 1. Set _replaceValue_ to ? ToString(_replaceValue_). 1. Let _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). 1. If _flags_ contains *"g"*, let _global_ be *true*; else let _global_ be *false*. @@ -39119,7 +39115,7 @@

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    1. Let _results_ be a new empty List. 1. Let _done_ be *false*. 1. Repeat, while _done_ is *false*, - 1. Let _result_ be ? RegExpExec(_regexp_, _str_). + 1. Let _result_ be ? RegExpExec(_regexp_, _string_). 1. If _result_ is *null*, then 1. Set _done_ to *true*. 1. Else, @@ -39127,33 +39123,33 @@

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    1. If _global_ is *false*, then 1. Set _done_ to *true*. 1. Else, - 1. Let _matchStr_ be ? ToString(? Get(_result_, *"0"*)). - 1. If _matchStr_ is the empty String, then + 1. Let _matchString_ be ? ToString(? Get(_result_, *"0"*)). + 1. If _matchString_ is the empty String, then 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_regexp_, *"lastIndex"*))). 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; else let _fullUnicode_ be *false*. - 1. Let _nextIndex_ be AdvanceStringIndex(_str_, _thisIndex_, _fullUnicode_). + 1. Let _nextIndex_ be AdvanceStringIndex(_string_, _thisIndex_, _fullUnicode_). 1. Perform ? Set(_regexp_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). 1. Let _accumulatedResult_ be the empty String. 1. Let _nextSourcePosition_ be 0. 1. For each element _result_ of _results_, do 1. Let _resultLength_ be ? LengthOfArrayLike(_result_). - 1. Let _nCaptures_ be max(_resultLength_ - 1, 0). + 1. Let _capturesCount_ be max(_resultLength_ - 1, 0). 1. Let _matched_ be ? ToString(? Get(_result_, *"0"*)). 1. Let _matchLength_ be the length of _matched_. 1. Let _position_ be ? ToIntegerOrInfinity(? Get(_result_, *"index"*)). - 1. Set _position_ to the result of clamping _position_ between 0 and _lengthS_. + 1. Set _position_ to the result of clamping _position_ between 0 and _stringLength_. 1. Let _captures_ be a new empty List. 1. Let _captureNumber_ be 1. - 1. Repeat, while _captureNumber_ ≤ _nCaptures_, - 1. Let _capN_ be ? Get(_result_, ! ToString(𝔽(_captureNumber_))). - 1. If _capN_ is not *undefined*, then - 1. Set _capN_ to ? ToString(_capN_). - 1. Append _capN_ to _captures_. + 1. Repeat, while _captureNumber_ ≤ _capturesCount_, + 1. Let _capture_ be ? Get(_result_, ! ToString(𝔽(_captureNumber_))). + 1. If _capture_ is not *undefined*, then + 1. Set _capture_ to ? ToString(_capture_). + 1. Append _capture_ to _captures_. 1. NOTE: When _captureNumber_ = 1, the preceding step puts the first element into _captures_ (at index 0). More generally, the _captureNumber_th capture (the characters captured by the _captureNumber_th set of capturing parentheses) is at _captures_[_captureNumber_ - 1]. 1. Set _captureNumber_ to _captureNumber_ + 1. 1. Let _namedCaptures_ be ? Get(_result_, *"groups"*). - 1. If _functionalReplace_ is *true*, then - 1. Let _replacerArgs_ be the list-concatenation of « _matched_ », _captures_, and « 𝔽(_position_), _str_ ». + 1. If _funcalReplace_ is *true*, then + 1. Let _replacerArgs_ be the list-concatenation of « _matched_ », _captures_, and « 𝔽(_position_), _string_ ». 1. If _namedCaptures_ is not *undefined*, then 1. Append _namedCaptures_ to _replacerArgs_. 1. Let _replacementValue_ be ? Call(_replaceValue_, *undefined*, _replacerArgs_). @@ -39161,13 +39157,13 @@

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    1. Else, 1. If _namedCaptures_ is not *undefined*, then 1. Set _namedCaptures_ to ? ToObject(_namedCaptures_). - 1. Let _replacementString_ be ? GetSubstitution(_matched_, _str_, _position_, _captures_, _namedCaptures_, _replaceValue_). + 1. Let _replacementString_ be ? GetSubstitution(_matched_, _string_, _position_, _captures_, _namedCaptures_, _replaceValue_). 1. If _position_ ≥ _nextSourcePosition_, then 1. NOTE: _position_ should not normally move backwards. If it does, it is an indication of an ill-behaving RegExp subclass or use of an access triggered side-effect to change the global flag or other characteristics of _regexp_. In such cases, the corresponding substitution is ignored. - 1. Set _accumulatedResult_ to the string-concatenation of _accumulatedResult_, the substring of _str_ from _nextSourcePosition_ to _position_, and _replacementString_. + 1. Set _accumulatedResult_ to the string-concatenation of _accumulatedResult_, the substring of _string_ from _nextSourcePosition_ to _position_, and _replacementString_. 1. Set _nextSourcePosition_ to _position_ + _matchLength_. - 1. If _nextSourcePosition_ ≥ _lengthS_, return _accumulatedResult_. - 1. Return the string-concatenation of _accumulatedResult_ and the substring of _str_ from _nextSourcePosition_. + 1. If _nextSourcePosition_ ≥ _stringLength_, return _accumulatedResult_. + 1. Return the string-concatenation of _accumulatedResult_ and the substring of _string_ from _nextSourcePosition_.

    The value of the *"name"* property of this method is *"[Symbol.replace]"*.

    @@ -39178,11 +39174,11 @@

    RegExp.prototype [ %Symbol.search% ] ( _string_ )

    1. Let _regexp_ be the *this* value. 1. If _regexp_ is not an Object, throw a *TypeError* exception. - 1. Let _str_ be ? ToString(_string_). + 1. Set _string_ to ? ToString(_string_). 1. Let _previousLastIndex_ be ? Get(_regexp_, *"lastIndex"*). 1. If _previousLastIndex_ is not *+0*𝔽, then 1. Perform ? Set(_regexp_, *"lastIndex"*, *+0*𝔽, *true*). - 1. Let _result_ be ? RegExpExec(_regexp_, _str_). + 1. Let _result_ be ? RegExpExec(_regexp_, _string_). 1. Let _currentLastIndex_ be ? Get(_regexp_, *"lastIndex"*). 1. If SameValue(_currentLastIndex_, _previousLastIndex_) is *false*, then 1. Perform ? Set(_regexp_, *"lastIndex"*, _previousLastIndex_, *true*). @@ -39205,9 +39201,9 @@

    get RegExp.prototype.source

    1. If SameValue(_regexp_, %RegExp.prototype%) is *true*, return *"(?:)"*. 1. Throw a *TypeError* exception. 1. Assert: _regexp_ has an [[OriginalFlags]] internal slot. - 1. Let _src_ be _regexp_.[[OriginalSource]]. + 1. Let _source_ be _regexp_.[[OriginalSource]]. 1. Let _flags_ be _regexp_.[[OriginalFlags]]. - 1. Return EscapeRegExpPattern(_src_, _flags_). + 1. Return EscapeRegExpPattern(_source_, _flags_).
    @@ -39253,38 +39249,38 @@

    RegExp.prototype [ %Symbol.split% ] ( _string_, _limit_ )

    1. Let _regexp_ be the *this* value. 1. If _regexp_ is not an Object, throw a *TypeError* exception. - 1. Let _str_ be ? ToString(_string_). - 1. Let _speciesConstructor_ be ? SpeciesConstructor(_regexp_, %RegExp%). + 1. Set _string_ to ? ToString(_string_). + 1. Let _speciesCtor_ be ? SpeciesConstructor(_regexp_, %RegExp%). 1. Let _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _unicodeMatching_ be *true*. 1. Else, let _unicodeMatching_ be *false*. 1. If _flags_ contains *"y"*, let _newFlags_ be _flags_. 1. Else, let _newFlags_ be the string-concatenation of _flags_ and *"y"*. - 1. Let _splitter_ be ? Construct(_speciesConstructor_, « _regexp_, _newFlags_ »). + 1. Let _splitter_ be ? Construct(_speciesCtor_, « _regexp_, _newFlags_ »). 1. Let _array_ be ! ArrayCreate(0). 1. Let _lengthA_ be 0. 1. If _limit_ is *undefined*, let _lim_ be 232 - 1; else let _lim_ be ℝ(? ToUint32(_limit_)). 1. If _lim_ = 0, return _array_. - 1. If _str_ is the empty String, then - 1. Let _matchResult_ be ? RegExpExec(_splitter_, _str_). + 1. If _string_ is the empty String, then + 1. Let _matchResult_ be ? RegExpExec(_splitter_, _string_). 1. If _matchResult_ is not *null*, return _array_. - 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _str_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _string_). 1. Return _array_. - 1. Let _size_ be the length of _str_. + 1. Let _size_ be the length of _string_. 1. Let _lastMatchEnd_ be 0. 1. Let _searchIndex_ be _lastMatchEnd_. 1. Repeat, while _searchIndex_ < _size_, 1. Perform ? Set(_splitter_, *"lastIndex"*, 𝔽(_searchIndex_), *true*). - 1. Let _matchResult_ be ? RegExpExec(_splitter_, _str_). + 1. Let _matchResult_ be ? RegExpExec(_splitter_, _string_). 1. If _matchResult_ is *null*, then - 1. Set _searchIndex_ to AdvanceStringIndex(_str_, _searchIndex_, _unicodeMatching_). + 1. Set _searchIndex_ to AdvanceStringIndex(_string_, _searchIndex_, _unicodeMatching_). 1. Else, 1. Let _matchEnd_ be ℝ(? ToLength(? Get(_splitter_, *"lastIndex"*))). 1. Set _matchEnd_ to min(_matchEnd_, _size_). 1. If _matchEnd_ = _lastMatchEnd_, then - 1. Set _searchIndex_ to AdvanceStringIndex(_str_, _searchIndex_, _unicodeMatching_). + 1. Set _searchIndex_ to AdvanceStringIndex(_string_, _searchIndex_, _unicodeMatching_). 1. Else, - 1. Let _substring_ be the substring of _str_ from _lastMatchEnd_ to _searchIndex_. + 1. Let _substring_ be the substring of _string_ from _lastMatchEnd_ to _searchIndex_. 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_lengthA_)), _substring_). 1. Set _lengthA_ to _lengthA_ + 1. 1. If _lengthA_ = _lim_, return _array_. @@ -39299,7 +39295,7 @@

    RegExp.prototype [ %Symbol.split% ] ( _string_, _limit_ )

    1. Set _lengthA_ to _lengthA_ + 1. 1. If _lengthA_ = _lim_, return _array_. 1. Set _searchIndex_ to _lastMatchEnd_. - 1. Let _substring_ be the substring of _str_ from _lastMatchEnd_ to _size_. + 1. Let _substring_ be the substring of _string_ from _lastMatchEnd_ to _size_. 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_lengthA_)), _substring_). 1. Return _array_.
    @@ -39314,18 +39310,18 @@

    get RegExp.prototype.sticky

    `RegExp.prototype.sticky` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x0079 (LATIN SMALL LETTER Y). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x0079 (LATIN SMALL LETTER Y). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_).
    -

    RegExp.prototype.test ( _str_ )

    +

    RegExp.prototype.test ( _string_ )

    This method performs the following steps when called:

    1. Let _regexp_ be the *this* value. 1. If _regexp_ is not an Object, throw a *TypeError* exception. - 1. Let _string_ be ? ToString(_str_). + 1. Set _string_ to ? ToString(_string_). 1. Let _match_ be ? RegExpExec(_regexp_, _string_). 1. If _match_ is *null*, return *false*. 1. Return *true*. @@ -39352,8 +39348,8 @@

    get RegExp.prototype.unicode

    `RegExp.prototype.unicode` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x0075 (LATIN SMALL LETTER U). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x0075 (LATIN SMALL LETTER U). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_).
    @@ -39362,8 +39358,8 @@

    get RegExp.prototype.unicodeSets

    `RegExp.prototype.unicodeSets` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    1. Let _regexp_ be the *this* value. - 1. Let _cu_ be the code unit 0x0076 (LATIN SMALL LETTER V). - 1. Return ? RegExpHasFlag(_regexp_, _cu_). + 1. Let _codeUnit_ be the code unit 0x0076 (LATIN SMALL LETTER V). + 1. Return ? RegExpHasFlag(_regexp_, _codeUnit_). @@ -39375,7 +39371,7 @@

    Abstract Operations for RegExp Matching

    RegExpExec ( _regexp_: an Object, - _str_: a String, + _string_: a String, ): either a normal completion containing either an Object or *null*, or a throw completion

    @@ -39383,11 +39379,11 @@

    1. Let _exec_ be ? Get(_regexp_, *"exec"*). 1. If IsCallable(_exec_) is *true*, then - 1. Let _result_ be ? Call(_exec_, _regexp_, « _str_ »). + 1. Let _result_ be ? Call(_exec_, _regexp_, « _string_ »). 1. If _result_ is not an Object and _result_ is not *null*, throw a *TypeError* exception. 1. Return _result_. 1. Perform ? RequireInternalSlot(_regexp_, [[RegExpMatcher]]). - 1. Return ? RegExpBuiltinExec(_regexp_, _str_). + 1. Return ? RegExpBuiltinExec(_regexp_, _string_).

    If a callable *"exec"* property is not found this algorithm falls back to attempting to use the built-in RegExp matching algorithm. This provides compatible behaviour for code written for prior editions where most built-in algorithms that use regular expressions did not perform a dynamic property lookup of *"exec"*.

    @@ -39398,13 +39394,13 @@

    RegExpBuiltinExec ( _regexp_: an initialized RegExp instance, - _str_: a String, + _string_: a String, ): either a normal completion containing either an Array exotic object or *null*, or a throw completion

    - 1. Let _length_ be the length of _str_. + 1. Let _length_ be the length of _string_. 1. Let _lastIndex_ be ℝ(? ToLength(! Get(_regexp_, *"lastIndex"*))). 1. Let _flags_ be _regexp_.[[OriginalFlags]]. 1. If _flags_ contains *"g"*, let _global_ be *true*; else let _global_ be *false*. @@ -39414,40 +39410,40 @@

    1. Let _matcher_ be _regexp_.[[RegExpMatcher]]. 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; else let _fullUnicode_ be *false*. 1. Let _matchSucceeded_ be *false*. - 1. If _fullUnicode_ is *true*, let _input_ be StringToCodePoints(_str_); else let _input_ be a List whose elements are the code units that are the elements of _str_. + 1. If _fullUnicode_ is *true*, let _input_ be StringToCodePoints(_string_); else let _input_ be a List whose elements are the code units that are the elements of _string_. 1. NOTE: Each element of _input_ is considered to be a character. 1. Repeat, while _matchSucceeded_ is *false*, 1. If _lastIndex_ > _length_, then 1. If _global_ is *true* or _sticky_ is *true*, then 1. Perform ? Set(_regexp_, *"lastIndex"*, *+0*𝔽, *true*). 1. Return *null*. - 1. Let _inputIndex_ be the index into _input_ of the character that was obtained from element _lastIndex_ of _str_. - 1. Let _r_ be _matcher_(_input_, _inputIndex_). - 1. If _r_ is ~failure~, then + 1. Let _inputIndex_ be the index into _input_ of the character that was obtained from element _lastIndex_ of _string_. + 1. Let _result_ be _matcher_(_input_, _inputIndex_). + 1. If _result_ is ~failure~, then 1. If _sticky_ is *true*, then 1. Perform ? Set(_regexp_, *"lastIndex"*, *+0*𝔽, *true*). 1. Return *null*. - 1. Set _lastIndex_ to AdvanceStringIndex(_str_, _lastIndex_, _fullUnicode_). + 1. Set _lastIndex_ to AdvanceStringIndex(_string_, _lastIndex_, _fullUnicode_). 1. Else, - 1. Assert: _r_ is a MatchState. + 1. Assert: _result_ is a MatchState. 1. Set _matchSucceeded_ to *true*. - 1. Let _endIndex_ be _r_.[[EndIndex]]. - 1. If _fullUnicode_ is *true*, set _endIndex_ to GetStringIndex(_str_, _endIndex_). + 1. Let _endIndex_ be _result_.[[EndIndex]]. + 1. If _fullUnicode_ is *true*, set _endIndex_ to GetStringIndex(_string_, _endIndex_). 1. If _global_ is *true* or _sticky_ is *true*, then 1. Perform ? Set(_regexp_, *"lastIndex"*, 𝔽(_endIndex_), *true*). - 1. Let _n_ be the number of elements in _r_.[[Captures]]. - 1. Assert: _n_ = _regexp_.[[RegExpRecord]].[[CapturingGroupsCount]]. - 1. Assert: _n_ < 232 - 1. - 1. Let _array_ be ! ArrayCreate(_n_ + 1). - 1. Assert: The mathematical value of _array_'s *"length"* property is _n_ + 1. + 1. Let _capturingGroupsCount_ be the number of elements in _result_.[[Captures]]. + 1. Assert: _capturingGroupsCount_ = _regexp_.[[RegExpRecord]].[[CapturingGroupsCount]]. + 1. Assert: _capturingGroupsCount_ < 232 - 1. + 1. Let _array_ be ! ArrayCreate(_capturingGroupsCount_ + 1). + 1. Assert: The mathematical value of _array_'s *"length"* property is _capturingGroupsCount_ + 1. 1. Perform ! CreateDataPropertyOrThrow(_array_, *"index"*, 𝔽(_lastIndex_)). - 1. Perform ! CreateDataPropertyOrThrow(_array_, *"input"*, _str_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"input"*, _string_). 1. Let _match_ be the Match Record { [[StartIndex]]: _lastIndex_, [[EndIndex]]: _endIndex_ }. 1. Let _indices_ be a new empty List. 1. Let _groupNames_ be a new empty List. 1. Append _match_ to _indices_. - 1. Let _matchedSubstr_ be GetMatchString(_str_, _match_). - 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _matchedSubstr_). + 1. Let _matchedSubstring_ be GetMatchString(_string_, _match_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _matchedSubstring_). 1. If _regexp_ contains any |GroupName|, then 1. Let _groups_ be OrdinaryObjectCreate(*null*). 1. Let _hasGroups_ be *true*. @@ -39456,35 +39452,35 @@

    1. Let _hasGroups_ be *false*. 1. Perform ! CreateDataPropertyOrThrow(_array_, *"groups"*, _groups_). 1. Let _matchedGroupNames_ be a new empty List. - 1. For each integer _i_ such that 1 ≤ _i_ ≤ _n_, in ascending order, do - 1. Let _captureI_ be _i_th element of _r_.[[Captures]]. - 1. If _captureI_ is *undefined*, then + 1. For each integer _i_ such that 1 ≤ _i_ ≤ _capturingGroupsCount_, in ascending order, do + 1. Let _capture_ be _i_th element of _result_.[[Captures]]. + 1. If _capture_ is *undefined*, then 1. Let _capturedValue_ be *undefined*. 1. Append *undefined* to _indices_. 1. Else, - 1. Let _captureStart_ be _captureI_.[[StartIndex]]. - 1. Let _captureEnd_ be _captureI_.[[EndIndex]]. + 1. Let _captureStart_ be _capture_.[[StartIndex]]. + 1. Let _captureEnd_ be _capture_.[[EndIndex]]. 1. If _fullUnicode_ is *true*, then - 1. Set _captureStart_ to GetStringIndex(_str_, _captureStart_). - 1. Set _captureEnd_ to GetStringIndex(_str_, _captureEnd_). - 1. Let _capture_ be the Match Record { [[StartIndex]]: _captureStart_, [[EndIndex]]: _captureEnd_ }. - 1. Let _capturedValue_ be GetMatchString(_str_, _capture_). - 1. Append _capture_ to _indices_. + 1. Set _captureStart_ to GetStringIndex(_string_, _captureStart_). + 1. Set _captureEnd_ to GetStringIndex(_string_, _captureEnd_). + 1. Let _captureRecord_ be the Match Record { [[StartIndex]]: _captureStart_, [[EndIndex]]: _captureEnd_ }. + 1. Let _capturedValue_ be GetMatchString(_string_, _captureRecord_). + 1. Append _captureRecord_ to _indices_. 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_i_)), _capturedValue_). 1. If the _i_th capture of _regexp_ was defined with a |GroupName|, then - 1. Let _s_ be the CapturingGroupName of that |GroupName|. - 1. If _matchedGroupNames_ contains _s_, then + 1. Let _groupName_ be the CapturingGroupName of that |GroupName|. + 1. If _matchedGroupNames_ contains _groupName_, then 1. Assert: _capturedValue_ is *undefined*. 1. Append *undefined* to _groupNames_. 1. Else, - 1. If _capturedValue_ is not *undefined*, append _s_ to _matchedGroupNames_. - 1. NOTE: If there are multiple groups named _s_, _groups_ may already have an _s_ property at this point. However, because _groups_ is an ordinary object whose properties are all writable data properties, the call to CreateDataPropertyOrThrow is nevertheless guaranteed to succeed. - 1. Perform ! CreateDataPropertyOrThrow(_groups_, _s_, _capturedValue_). - 1. Append _s_ to _groupNames_. + 1. If _capturedValue_ is not *undefined*, append _groupName_ to _matchedGroupNames_. + 1. NOTE: If there are multiple groups named _groupName_, _groups_ may already have an _groupName_ property at this point. However, because _groups_ is an ordinary object whose properties are all writable data properties, the call to CreateDataPropertyOrThrow is nevertheless guaranteed to succeed. + 1. Perform ! CreateDataPropertyOrThrow(_groups_, _groupName_, _capturedValue_). + 1. Append _groupName_ to _groupNames_. 1. Else, 1. Append *undefined* to _groupNames_. 1. If _hasIndices_ is *true*, then - 1. Let _indicesArray_ be MakeMatchIndicesIndexPairArray(_str_, _indices_, _groupNames_, _hasGroups_). + 1. Let _indicesArray_ be MakeMatchIndicesIndexPairArray(_string_, _indices_, _groupNames_, _hasGroups_). 1. Perform ! CreateDataPropertyOrThrow(_array_, *"indices"*, _indicesArray_). 1. Return _array_. @@ -39493,7 +39489,7 @@

    AdvanceStringIndex ( - _str_: a String, + _string_: a String, _index_: a non-negative integer, _unicode_: a Boolean, ): an integer @@ -39503,35 +39499,35 @@

    1. Assert: _index_ ≤ 253 - 1. 1. If _unicode_ is *false*, return _index_ + 1. - 1. Let _length_ be the length of _str_. + 1. Let _length_ be the length of _string_. 1. If _index_ + 1 ≥ _length_, return _index_ + 1. - 1. Let _cp_ be CodePointAt(_str_, _index_). - 1. Return _index_ + _cp_.[[CodeUnitCount]]. + 1. Let _codePoint_ be CodePointAt(_string_, _index_). + 1. Return _index_ + _codePoint_.[[CodeUnitCount]].

    GetStringIndex ( - _str_: a String, + _string_: a String, _codePointIndex_: a non-negative integer, ): a non-negative integer

    description
    -
    It interprets _str_ as a sequence of UTF-16 encoded code points, as described in , and returns the code unit index corresponding to code point index _codePointIndex_ when such an index exists. Otherwise, it returns the length of _str_.
    +
    It interprets _string_ as a sequence of UTF-16 encoded code points, as described in , and returns the code unit index corresponding to code point index _codePointIndex_ when such an index exists. Otherwise, it returns the length of _string_.
    - 1. If _str_ is the empty String, return 0. - 1. Let _len_ be the length of _str_. + 1. If _string_ is the empty String, return 0. + 1. Let _length_ be the length of _string_. 1. Let _codeUnitCount_ be 0. 1. Let _codePointCount_ be 0. - 1. Repeat, while _codeUnitCount_ < _len_, + 1. Repeat, while _codeUnitCount_ < _length_, 1. If _codePointCount_ = _codePointIndex_, return _codeUnitCount_. - 1. Let _cp_ be CodePointAt(_str_, _codeUnitCount_). - 1. Set _codeUnitCount_ to _codeUnitCount_ + _cp_.[[CodeUnitCount]]. + 1. Let _codePoint_ be CodePointAt(_string_, _codeUnitCount_). + 1. Set _codeUnitCount_ to _codeUnitCount_ + _codePoint_.[[CodeUnitCount]]. 1. Set _codePointCount_ to _codePointCount_ + 1. - 1. Return _len_. + 1. Return _length_.
    @@ -39565,29 +39561,29 @@

    Match Records

    GetMatchString ( - _str_: a String, + _string_: a String, _match_: a Match Record, ): a String

    - 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _str_. - 1. Return the substring of _str_ from _match_.[[StartIndex]] to _match_.[[EndIndex]]. + 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _string_. + 1. Return the substring of _string_ from _match_.[[StartIndex]] to _match_.[[EndIndex]].

    GetMatchIndexPair ( - _str_: a String, + _string_: a String, _match_: a Match Record, ): an Array

    - 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _str_. + 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _string_. 1. Return CreateArrayFromList(« 𝔽(_match_.[[StartIndex]]), 𝔽(_match_.[[EndIndex]]) »).
    @@ -39595,7 +39591,7 @@

    MakeMatchIndicesIndexPairArray ( - _str_: a String, + _string_: a String, _indices_: a List of either Match Records or *undefined*, _groupNames_: a List of either Strings or *undefined*, _hasGroups_: a Boolean, @@ -39617,7 +39613,7 @@

    1. For each integer _i_ such that 0 ≤ _i_ < _n_, in ascending order, do 1. Let _matchIndices_ be _indices_[_i_]. 1. If _matchIndices_ is not *undefined*, then - 1. Let _matchIndexPair_ be GetMatchIndexPair(_str_, _matchIndices_). + 1. Let _matchIndexPair_ be GetMatchIndexPair(_string_, _matchIndices_). 1. Else, 1. Let _matchIndexPair_ be *undefined*. 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_i_)), _matchIndexPair_). @@ -39654,7 +39650,7 @@

    RegExp String Iterator Objects

    CreateRegExpStringIterator ( _regexp_: an Object, - _str_: a String, + _string_: a String, _global_: a Boolean, _fullUnicode_: a Boolean, ): an Object @@ -39664,7 +39660,7 @@

    1. Let _iterator_ be OrdinaryObjectCreate(%RegExpStringIteratorPrototype%, « [[IteratingRegExp]], [[IteratedString]], [[Global]], [[Unicode]], [[Done]] »). 1. Set _iterator_.[[IteratingRegExp]] to _regexp_. - 1. Set _iterator_.[[IteratedString]] to _str_. + 1. Set _iterator_.[[IteratedString]] to _string_. 1. Set _iterator_.[[Global]] to _global_. 1. Set _iterator_.[[Unicode]] to _fullUnicode_. 1. Set _iterator_.[[Done]] to *false*. @@ -39691,20 +39687,20 @@

    %RegExpStringIteratorPrototype%.next ( )

    1. If _iteratorObj_.[[Done]] is *true*, then 1. Return CreateIteratorResultObject(*undefined*, *true*). 1. Let _regexp_ be _iteratorObj_.[[IteratingRegExp]]. - 1. Let _str_ be _iteratorObj_.[[IteratedString]]. + 1. Let _string_ be _iteratorObj_.[[IteratedString]]. 1. Let _global_ be _iteratorObj_.[[Global]]. 1. Let _fullUnicode_ be _iteratorObj_.[[Unicode]]. - 1. Let _match_ be ? RegExpExec(_regexp_, _str_). + 1. Let _match_ be ? RegExpExec(_regexp_, _string_). 1. If _match_ is *null*, then 1. Set _iteratorObj_.[[Done]] to *true*. 1. Return CreateIteratorResultObject(*undefined*, *true*). 1. If _global_ is *false*, then 1. Set _iteratorObj_.[[Done]] to *true*. 1. Return CreateIteratorResultObject(_match_, *false*). - 1. Let _matchStr_ be ? ToString(? Get(_match_, *"0"*)). - 1. If _matchStr_ is the empty String, then + 1. Let _matchString_ be ? ToString(? Get(_match_, *"0"*)). + 1. If _matchString_ is the empty String, then 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_regexp_, *"lastIndex"*))). - 1. Let _nextIndex_ be AdvanceStringIndex(_str_, _thisIndex_, _fullUnicode_). + 1. Let _nextIndex_ be AdvanceStringIndex(_string_, _thisIndex_, _fullUnicode_). 1. Perform ? Set(_regexp_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). 1. Return CreateIteratorResultObject(_match_, *false*).
    @@ -39787,15 +39783,15 @@

    Array ( ..._values_ )

    1. Let _numberOfArgs_ be the number of elements in _values_. 1. If _numberOfArgs_ = 0, return ! ArrayCreate(0, _proto_). 1. If _numberOfArgs_ = 1, then - 1. Let _len_ be _values_[0]. + 1. Let _length_ be _values_[0]. 1. Let _array_ be ! ArrayCreate(0, _proto_). - 1. If _len_ is not a Number, then - 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _len_). - 1. Let _intLen_ be *1*𝔽. + 1. If _length_ is not a Number, then + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _length_). + 1. Let _intLength_ be *1*𝔽. 1. Else, - 1. Let _intLen_ be ! ToUint32(_len_). - 1. If SameValueZero(_intLen_, _len_) is *false*, throw a *RangeError* exception. - 1. Perform ! Set(_array_, *"length"*, _intLen_, *true*). + 1. Let _intLength_ be ! ToUint32(_length_). + 1. If SameValueZero(_intLength_, _length_) is *false*, throw a *RangeError* exception. + 1. Perform ! Set(_array_, *"length"*, _intLength_, *true*). 1. Return _array_. 1. Assert: _numberOfArgs_ ≥ 2. 1. Let _array_ be ? ArrayCreate(_numberOfArgs_, _proto_). @@ -39824,7 +39820,7 @@

    Properties of the Array Constructor

    Array.from ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    This function performs the following steps when called:

    - 1. Let _constructor_ be the *this* value. + 1. Let _ctor_ be the *this* value. 1. If _mapper_ is *undefined*, then 1. Let _mapping_ be *false*. 1. Else, @@ -39832,8 +39828,8 @@

    Array.from ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Let _mapping_ be *true*. 1. Let _usingIterator_ be ? GetMethod(_items_, %Symbol.iterator%). 1. If _usingIterator_ is not *undefined*, then - 1. If IsConstructor(_constructor_) is *true*, then - 1. Let _array_ be ? Construct(_constructor_). + 1. If IsConstructor(_ctor_) is *true*, then + 1. Let _array_ be ? Construct(_ctor_). 1. Else, 1. Let _array_ be ! ArrayCreate(0). 1. Let _iteratorRecord_ be ? GetIteratorFromMethod(_items_, _usingIterator_). @@ -39857,13 +39853,13 @@

    Array.from ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Set _k_ to _k_ + 1. 1. NOTE: _items_ is not iterable so assume it is an array-like object. 1. Let _arrayLike_ be ! ToObject(_items_). - 1. Let _len_ be ? LengthOfArrayLike(_arrayLike_). - 1. If IsConstructor(_constructor_) is *true*, then - 1. Let _array_ be ? Construct(_constructor_, « 𝔽(_len_) »). + 1. Let _length_ be ? LengthOfArrayLike(_arrayLike_). + 1. If IsConstructor(_ctor_) is *true*, then + 1. Let _array_ be ? Construct(_ctor_, « 𝔽(_length_) »). 1. Else, - 1. Let _array_ be ? ArrayCreate(_len_). + 1. Let _array_ be ? ArrayCreate(_length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). 1. If _mapping_ is *true*, then @@ -39872,7 +39868,7 @@

    Array.from ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Let _mappedValue_ be _kValue_. 1. Perform ? CreateDataPropertyOrThrow(_array_, _propertyKey_, _mappedValue_). 1. Set _k_ to _k_ + 1. - 1. Perform ? Set(_array_, *"length"*, 𝔽(_len_), *true*). + 1. Perform ? Set(_array_, *"length"*, 𝔽(_length_), *true*). 1. Return _array_.
    @@ -39885,7 +39881,7 @@

    Array.fromAsync ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    This async function performs the following steps when called:

    - 1. Let _constructor_ be the *this* value. + 1. Let _ctor_ be the *this* value. 1. Let _mapping_ be *false*. 1. If _mapper_ is not *undefined*, then 1. If IsCallable(_mapper_) is *false*, throw a *TypeError* exception. @@ -39899,8 +39895,8 @@

    Array.fromAsync ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Else, 1. Set _iteratorRecord_ to ? GetIteratorFromMethod(_items_, _usingAsyncIterator_). 1. If _iteratorRecord_ is not *undefined*, then - 1. If IsConstructor(_constructor_) is *true*, then - 1. Let _array_ be ? Construct(_constructor_). + 1. If IsConstructor(_ctor_) is *true*, then + 1. Let _array_ be ? Construct(_ctor_). 1. Else, 1. Let _array_ be ! ArrayCreate(0). 1. Let _k_ be 0. @@ -39930,13 +39926,13 @@

    Array.fromAsync ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Else, 1. NOTE: _items_ is neither async iterable nor iterable so assume it is an array-like object. 1. Let _arrayLike_ be ! ToObject(_items_). - 1. Let _len_ be ? LengthOfArrayLike(_arrayLike_). - 1. If IsConstructor(_constructor_) is *true*, then - 1. Let _array_ be ? Construct(_constructor_, « 𝔽(_len_) »). + 1. Let _length_ be ? LengthOfArrayLike(_arrayLike_). + 1. If IsConstructor(_ctor_) is *true*, then + 1. Let _array_ be ? Construct(_ctor_, « 𝔽(_length_) »). 1. Else, - 1. Let _array_ be ? ArrayCreate(_len_). + 1. Let _array_ be ? ArrayCreate(_length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). 1. Set _kValue_ to ? Await(_kValue_). @@ -39947,7 +39943,7 @@

    Array.fromAsync ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Let _mappedValue_ be _kValue_. 1. Perform ? CreateDataPropertyOrThrow(_array_, _propertyKey_, _mappedValue_). 1. Set _k_ to _k_ + 1. - 1. Perform ? Set(_array_, *"length"*, 𝔽(_len_), *true*). + 1. Perform ? Set(_array_, *"length"*, 𝔽(_length_), *true*). 1. Return _array_.
    @@ -39967,20 +39963,20 @@

    Array.isArray ( _arg_ )

    Array.of ( ..._items_ )

    This method performs the following steps when called:

    - 1. Let _len_ be the number of elements in _items_. - 1. Let _lenNumber_ be 𝔽(_len_). - 1. Let _constructor_ be the *this* value. - 1. If IsConstructor(_constructor_) is *true*, then - 1. Let _array_ be ? Construct(_constructor_, « _lenNumber_ »). + 1. Let _length_ be the number of elements in _items_. + 1. Let _lengthNumber_ be 𝔽(_length_). + 1. Let _ctor_ be the *this* value. + 1. If IsConstructor(_ctor_) is *true*, then + 1. Let _array_ be ? Construct(_ctor_, « _lengthNumber_ »). 1. Else, - 1. Let _array_ be ? ArrayCreate(_len_). + 1. Let _array_ be ? ArrayCreate(_length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _kValue_ be _items_[_k_]. 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Perform ? CreateDataPropertyOrThrow(_array_, _propertyKey_, _kValue_). 1. Set _k_ to _k_ + 1. - 1. Perform ? Set(_array_, *"length"*, _lenNumber_, *true*). + 1. Perform ? Set(_array_, *"length"*, _lengthNumber_, *true*). 1. Return _array_. @@ -40024,13 +40020,13 @@

    Properties of the Array Prototype Object

    Array.prototype.at ( _index_ )

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, then 1. Let _k_ be _relativeIndex_. 1. Else, - 1. Let _k_ be _len_ + _relativeIndex_. - 1. If _k_ < 0 or _k_ ≥ _len_, return *undefined*. + 1. Let _k_ be _length_ + _relativeIndex_. + 1. If _k_ < 0 or _k_ ≥ _length_, return *undefined*. 1. Return ? Get(_obj_, ! ToString(𝔽(_k_))).
    @@ -40047,10 +40043,10 @@

    Array.prototype.concat ( ..._items_ )

    1. For each element _item_ of _items_, do 1. Let _spreadable_ be ? IsConcatSpreadable(_item_). 1. If _spreadable_ is *true*, then - 1. Let _len_ be ? LengthOfArrayLike(_item_). - 1. If _nextIndex_ + _len_ > 253 - 1, throw a *TypeError* exception. + 1. Let _length_ be ? LengthOfArrayLike(_item_). + 1. If _nextIndex_ + _length_ > 253 - 1, throw a *TypeError* exception. 1. Let _sourceIndex_ be 0. - 1. Repeat, while _sourceIndex_ < _len_, + 1. Repeat, while _sourceIndex_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_sourceIndex_)). 1. Let _exists_ be ? HasProperty(_item_, _propertyKey_). 1. If _exists_ is *true*, then @@ -40107,20 +40103,20 @@

    Array.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 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). - 1. Else, let _to_ be min(_relativeTarget_, _len_). + 1. Else if _relativeTarget_ < 0, let _to_ be max(_length_ + _relativeTarget_, 0). + 1. Else, let _to_ be min(_relativeTarget_, _length_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _from_ be 0. - 1. Else if _relativeStart_ < 0, let _from_ be max(_len_ + _relativeStart_, 0). - 1. Else, let _from_ be min(_relativeStart_, _len_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _from_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _from_ be min(_relativeStart_, _length_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _length_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_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. Let _count_ be min(_final_ - _from_, _len_ - _to_). + 1. Else if _relativeEnd_ < 0, let _final_ be max(_length_ + _relativeEnd_, 0). + 1. Else, let _final_ be min(_relativeEnd_, _length_). + 1. Let _count_ be min(_final_ - _from_, _length_ - _to_). 1. If _from_ < _to_ and _to_ < _from_ + _count_, then 1. Let _direction_ be -1. 1. Set _from_ to _from_ + _count_ - 1. @@ -40168,10 +40164,10 @@

    Array.prototype.every ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -40198,15 +40194,15 @@

    Array.prototype.fill ( _value_ [ , _start_ [ , _end_ ] ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 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). - 1. Else, let _k_ be min(_relativeStart_, _len_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _k_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _k_ be min(_relativeStart_, _length_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _length_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_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. Else if _relativeEnd_ < 0, let _final_ be max(_length_ + _relativeEnd_, 0). + 1. Else, let _final_ be min(_relativeEnd_, _length_). 1. Repeat, while _k_ < _final_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Perform ? Set(_obj_, _propertyKey_, _value_, *true*). @@ -40230,12 +40226,12 @@

    Array.prototype.filter ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _array_ be ? ArraySpeciesCreate(_obj_, 0). 1. Let _k_ be 0. 1. Let _to_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -40261,9 +40257,9 @@

    Array.prototype.find ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~ascending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Value]]. + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~ascending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Value]].

    This method is intentionally generic; it does not require that its *this* value be an Array. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -40279,9 +40275,9 @@

    Array.prototype.findIndex ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~ascending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Index]]. + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~ascending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Index]].

    This method is intentionally generic; it does not require that its *this* value be an Array. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -40297,9 +40293,9 @@

    Array.prototype.findLast ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~descending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Value]]. + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~descending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Value]].

    This method is intentionally generic; it does not require that its *this* value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -40315,9 +40311,9 @@

    Array.prototype.findLastIndex ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~descending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Index]]. + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~descending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Index]].

    This method is intentionally generic; it does not require that its *this* value be an Array object. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -40327,7 +40323,7 @@

    Array.prototype.findLastIndex ( _predicate_ [ , _thisArg_ ] )

    FindViaPredicate ( _obj_: an Object, - _len_: a non-negative integer, + _length_: a non-negative integer, _direction_: ~ascending~ or ~descending~, _predicate_: an ECMAScript language value, _thisArg_: an ECMAScript language value, @@ -40346,9 +40342,9 @@

    1. If IsCallable(_predicate_) is *false*, throw a *TypeError* exception. 1. If _direction_ is ~ascending~, then - 1. Let _indices_ be a List of the integers in the interval from 0 (inclusive) to _len_ (exclusive), in ascending order. + 1. Let _indices_ be a List of the integers in the interval from 0 (inclusive) to _length_ (exclusive), in ascending order. 1. Else, - 1. Let _indices_ be a List of the integers in the interval from 0 (inclusive) to _len_ (exclusive), in descending order. + 1. Let _indices_ be a List of the integers in the interval from 0 (inclusive) to _length_ (exclusive), in descending order. 1. For each integer _k_ of _indices_, do 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. NOTE: If _obj_ is a TypedArray, the following invocation of Get will return a normal completion. @@ -40365,13 +40361,13 @@

    Array.prototype.flat ( [ _depth_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _sourceLen_ be ? LengthOfArrayLike(_obj_). - 1. Let _depthNum_ be 1. + 1. Let _sourceLength_ be ? LengthOfArrayLike(_obj_). + 1. Let _depthNumber_ be 1. 1. If _depth_ is not *undefined*, then - 1. Set _depthNum_ to ? ToIntegerOrInfinity(_depth_). - 1. If _depthNum_ < 0, set _depthNum_ to 0. + 1. Set _depthNumber_ to ? ToIntegerOrInfinity(_depth_). + 1. If _depthNumber_ < 0, set _depthNumber_ to 0. 1. Let _array_ be ? ArraySpeciesCreate(_obj_, 0). - 1. Perform ? FlattenIntoArray(_array_, _obj_, _sourceLen_, 0, _depthNum_). + 1. Perform ? FlattenIntoArray(_array_, _obj_, _sourceLength_, 0, _depthNumber_). 1. Return _array_. @@ -40380,34 +40376,34 @@

    FlattenIntoArray ( _target_: an Object, _source_: an Object, - _sourceLen_: a non-negative integer, + _sourceLength_: a non-negative integer, _start_: a non-negative integer, _depth_: a non-negative integer or +∞, - optional _mapperFunction_: a function object, + optional _mapperFunc_: a function object, optional _thisArg_: an ECMAScript language value, ): either a normal completion containing a non-negative integer or a throw completion

    - 1. Assert: If _mapperFunction_ is present, then IsCallable(_mapperFunction_) is *true*, _thisArg_ is present, and _depth_ is 1. + 1. Assert: If _mapperFunc_ is present, then IsCallable(_mapperFunc_) is *true*, _thisArg_ is present, and _depth_ is 1. 1. Let _targetIndex_ be _start_. 1. Let _sourceIndex_ be *+0*𝔽. - 1. Repeat, while ℝ(_sourceIndex_) < _sourceLen_, + 1. Repeat, while ℝ(_sourceIndex_) < _sourceLength_, 1. Let _propertyKey_ be ! ToString(_sourceIndex_). 1. Let _exists_ be ? HasProperty(_source_, _propertyKey_). 1. If _exists_ is *true*, then 1. Let _element_ be ? Get(_source_, _propertyKey_). - 1. If _mapperFunction_ is present, then - 1. Set _element_ to ? Call(_mapperFunction_, _thisArg_, « _element_, _sourceIndex_, _source_ »). + 1. If _mapperFunc_ is present, then + 1. Set _element_ to ? Call(_mapperFunc_, _thisArg_, « _element_, _sourceIndex_, _source_ »). 1. Let _shouldFlatten_ be *false*. 1. If _depth_ > 0, then 1. Set _shouldFlatten_ to ? IsArray(_element_). 1. If _shouldFlatten_ is *true*, then 1. If _depth_ = +∞, let _newDepth_ be +∞. 1. Else, let _newDepth_ be _depth_ - 1. - 1. Let _elementLen_ be ? LengthOfArrayLike(_element_). - 1. Set _targetIndex_ to ? FlattenIntoArray(_target_, _element_, _elementLen_, _targetIndex_, _newDepth_). + 1. Let _elementLength_ be ? LengthOfArrayLike(_element_). + 1. Set _targetIndex_ to ? FlattenIntoArray(_target_, _element_, _elementLength_, _targetIndex_, _newDepth_). 1. Else, 1. If _targetIndex_ ≥ 253 - 1, throw a *TypeError* exception. 1. Perform ? CreateDataPropertyOrThrow(_target_, ! ToString(𝔽(_targetIndex_)), _element_). @@ -40419,14 +40415,14 @@

    -

    Array.prototype.flatMap ( _mapperFunction_ [ , _thisArg_ ] )

    +

    Array.prototype.flatMap ( _mapperFunc_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _sourceLen_ be ? LengthOfArrayLike(_obj_). - 1. If IsCallable(_mapperFunction_) is *false*, throw a *TypeError* exception. + 1. Let _sourceLength_ be ? LengthOfArrayLike(_obj_). + 1. If IsCallable(_mapperFunc_) is *false*, throw a *TypeError* exception. 1. Let _array_ be ? ArraySpeciesCreate(_obj_, 0). - 1. Perform ? FlattenIntoArray(_array_, _obj_, _sourceLen_, 0, 1, _mapperFunction_, _thisArg_). + 1. Perform ? FlattenIntoArray(_array_, _obj_, _sourceLength_, 0, 1, _mapperFunc_, _thisArg_). 1. Return _array_.
    @@ -40443,10 +40439,10 @@

    Array.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -40469,8 +40465,8 @@

    Array.prototype.includes ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. If _len_ = 0, return *false*. + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. If _length_ = 0, return *false*. 1. Let _startIndex_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _startIndex_ is 0. 1. If _startIndex_ = +∞, return *false*. @@ -40478,9 +40474,9 @@

    Array.prototype.includes ( _searchElement_ [ , _fromIndex_ ] )

    1. If _startIndex_ ≥ 0, then 1. Let _k_ be _startIndex_. 1. Else, - 1. Let _k_ be _len_ + _startIndex_. + 1. Let _k_ be _length_ + _startIndex_. 1. If _k_ < 0, set _k_ to 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _elementK_ be ? Get(_obj_, ! ToString(𝔽(_k_))). 1. If SameValueZero(_searchElement_, _elementK_) is *true*, return *true*. 1. Set _k_ to _k_ + 1. @@ -40503,8 +40499,8 @@

    Array.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. If _len_ = 0, return *-1*𝔽. + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. If _length_ = 0, return *-1*𝔽. 1. Let _startIndex_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _startIndex_ is 0. 1. If _startIndex_ = +∞, return *-1*𝔽. @@ -40512,9 +40508,9 @@

    Array.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )

    1. If _startIndex_ ≥ 0, then 1. Let _k_ be _startIndex_. 1. Else, - 1. Let _k_ be _len_ + _startIndex_. + 1. Let _k_ be _length_ + _startIndex_. 1. If _k_ < 0, set _k_ to 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -40534,17 +40530,17 @@

    Array.prototype.join ( _separator_ )

    It performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If _separator_ is *undefined*, let _sep_ be *","*. 1. Else, let _sep_ be ? ToString(_separator_). 1. Let _result_ be the empty String. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. If _k_ > 0, set _result_ to the string-concatenation of _result_ and _sep_. 1. Let _element_ be ? Get(_obj_, ! ToString(𝔽(_k_))). 1. If _element_ is neither *undefined* nor *null*, then - 1. Let _elementStr_ be ? ToString(_element_). - 1. Set _result_ to the string-concatenation of _result_ and _elementStr_. + 1. Let _elementString_ be ? ToString(_element_). + 1. Set _result_ to the string-concatenation of _result_ and _elementString_. 1. Set _k_ to _k_ + 1. 1. Return _result_. @@ -40571,14 +40567,14 @@

    Array.prototype.lastIndexOf ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. If _len_ = 0, return *-1*𝔽. - 1. If _fromIndex_ is present, let _startIndex_ be ? ToIntegerOrInfinity(_fromIndex_); else let _startIndex_ be _len_ - 1. + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. If _length_ = 0, return *-1*𝔽. + 1. If _fromIndex_ is present, let _startIndex_ be ? ToIntegerOrInfinity(_fromIndex_); else let _startIndex_ be _length_ - 1. 1. If _startIndex_ = -∞, return *-1*𝔽. 1. If _startIndex_ ≥ 0, then - 1. Let _k_ be min(_startIndex_, _len_ - 1). + 1. Let _k_ be min(_startIndex_, _length_ - 1). 1. Else, - 1. Let _k_ be _len_ + _startIndex_. + 1. Let _k_ be _length_ + _startIndex_. 1. Repeat, while _k_ ≥ 0, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). @@ -40605,11 +40601,11 @@

    Array.prototype.map ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. Let _array_ be ? ArraySpeciesCreate(_obj_, _len_). + 1. Let _array_ be ? ArraySpeciesCreate(_obj_, _length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -40632,16 +40628,16 @@

    Array.prototype.pop ( )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. If _len_ = 0, then + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. If _length_ = 0, then 1. Perform ? Set(_obj_, *"length"*, *+0*𝔽, *true*). 1. Return *undefined*. - 1. Assert: _len_ > 0. - 1. Let _newLen_ be 𝔽(_len_ - 1). - 1. Let _index_ be ! ToString(_newLen_). + 1. Assert: _length_ > 0. + 1. Let _newLength_ be 𝔽(_length_ - 1). + 1. Let _index_ be ! ToString(_newLength_). 1. Let _element_ be ? Get(_obj_, _index_). 1. Perform ? DeletePropertyOrThrow(_obj_, _index_). - 1. Perform ? Set(_obj_, *"length"*, _newLen_, *true*). + 1. Perform ? Set(_obj_, *"length"*, _newLength_, *true*). 1. Return _element_. @@ -40657,14 +40653,14 @@

    Array.prototype.push ( ..._items_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _argCount_ be the number of elements in _items_. - 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. + 1. If _length_ + _argCount_ > 253 - 1, throw a *TypeError* exception. 1. For each element _item_ of _items_, do - 1. Perform ? Set(_obj_, ! ToString(𝔽(_len_)), _item_, *true*). - 1. Set _len_ to _len_ + 1. - 1. Perform ? Set(_obj_, *"length"*, 𝔽(_len_), *true*). - 1. Return 𝔽(_len_). + 1. Perform ? Set(_obj_, ! ToString(𝔽(_length_)), _item_, *true*). + 1. Set _length_ to _length_ + 1. + 1. Perform ? Set(_obj_, *"length"*, 𝔽(_length_), *true*). + 1. Return 𝔽(_length_).

    The *"length"* property of this method is *1*𝔽.

    @@ -40683,23 +40679,23 @@

    Array.prototype.reduce ( _callback_ [ , _initialValue_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. If _len_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. + 1. If _length_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Let _accumulator_ be *undefined*. 1. If _initialValue_ is present, then 1. Set _accumulator_ to _initialValue_. 1. Else, 1. Let _kPresent_ be *false*. - 1. Repeat, while _kPresent_ is *false* and _k_ < _len_, + 1. Repeat, while _kPresent_ is *false* and _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Set _kPresent_ to ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then 1. Set _accumulator_ to ? Get(_obj_, _propertyKey_). 1. Set _k_ to _k_ + 1. 1. If _kPresent_ is *false*, throw a *TypeError* exception. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -40724,10 +40720,10 @@

    Array.prototype.reduceRight ( _callback_ [ , _initialValue_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) 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. + 1. If _length_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. + 1. Let _k_ be _length_ - 1. 1. Let _accumulator_ be *undefined*. 1. If _initialValue_ is present, then 1. Set _accumulator_ to _initialValue_. @@ -40762,11 +40758,11 @@

    Array.prototype.reverse ( )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. Let _middle_ be floor(_len_ / 2). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. Let _middle_ be floor(_length_ / 2). 1. Let _lower_ be 0. 1. Repeat, while _lower_ ≠ _middle_, - 1. Let _upper_ be _len_ - _lower_ - 1. + 1. Let _upper_ be _length_ - _lower_ - 1. 1. Let _upperP_ be ! ToString(𝔽(_upper_)). 1. Let _lowerP_ be ! ToString(𝔽(_lower_)). 1. Let _lowerExists_ be ? HasProperty(_obj_, _lowerP_). @@ -40801,13 +40797,13 @@

    Array.prototype.shift ( )

    It performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. If _len_ = 0, then + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. If _length_ = 0, then 1. Perform ? Set(_obj_, *"length"*, *+0*𝔽, *true*). 1. Return *undefined*. 1. Let _first_ be ? Get(_obj_, *"0"*). 1. Let _k_ be 1. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _from_ be ! ToString(𝔽(_k_)). 1. Let _to_ be ! ToString(𝔽(_k_ - 1)). 1. Let _fromPresent_ be ? HasProperty(_obj_, _from_). @@ -40818,8 +40814,8 @@

    Array.prototype.shift ( )

    1. Assert: _fromPresent_ is *false*. 1. Perform ? DeletePropertyOrThrow(_obj_, _to_). 1. Set _k_ to _k_ + 1. - 1. Perform ? DeletePropertyOrThrow(_obj_, ! ToString(𝔽(_len_ - 1))). - 1. Perform ? Set(_obj_, *"length"*, 𝔽(_len_ - 1), *true*). + 1. Perform ? DeletePropertyOrThrow(_obj_, ! ToString(𝔽(_length_ - 1))). + 1. Perform ? Set(_obj_, *"length"*, 𝔽(_length_ - 1), *true*). 1. Return _first_.
    @@ -40833,15 +40829,15 @@

    Array.prototype.slice ( _start_, _end_ )

    It performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 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). - 1. Else, let _k_ be min(_relativeStart_, _len_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _k_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _k_ be min(_relativeStart_, _length_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _length_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_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. Else if _relativeEnd_ < 0, let _final_ be max(_length_ + _relativeEnd_, 0). + 1. Else, let _final_ be min(_relativeEnd_, _length_). 1. Let _count_ be max(_final_ - _k_, 0). 1. Let _array_ be ? ArraySpeciesCreate(_obj_, _count_). 1. Let _resultIndex_ be 0. @@ -40876,10 +40872,10 @@

    Array.prototype.some ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -40901,17 +40897,17 @@

    Array.prototype.sort ( _comparator_ )

    1. [id="step-array-sort-comparefn"] If _comparator_ is not *undefined* and IsCallable(_comparator_) is *false*, throw a *TypeError* exception. 1. Let _obj_ be ? ToObject(*this* value). - 1. [id="step-array-sort-len"] Let _len_ be ? LengthOfArrayLike(_obj_). + 1. [id="step-array-sort-len"] Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _sortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparator_ and performs the following steps when called: 1. Return ? CompareArrayElements(_x_, _y_, _comparator_). - 1. [id="step-array-sortindexedproperties"] Let _sortedList_ be ? SortIndexedProperties(_obj_, _len_, _sortCompare_, ~skip-holes~). + 1. [id="step-array-sortindexedproperties"] Let _sortedList_ be ? SortIndexedProperties(_obj_, _length_, _sortCompare_, ~skip-holes~). 1. Let _itemCount_ be the number of elements in _sortedList_. 1. Let _j_ be 0. 1. Repeat, while _j_ < _itemCount_, 1. Perform ? Set(_obj_, ! ToString(𝔽(_j_)), _sortedList_[_j_], *true*). 1. Set _j_ to _j_ + 1. 1. NOTE: The call to SortIndexedProperties in step uses ~skip-holes~. The remaining indices are deleted to preserve the number of holes that were detected and excluded from the sort. - 1. Repeat, while _j_ < _len_, + 1. Repeat, while _j_ < _length_, 1. Perform ? DeletePropertyOrThrow(_obj_, ! ToString(𝔽(_j_))). 1. Set _j_ to _j_ + 1. 1. Return _obj_. @@ -40930,7 +40926,7 @@

    Array.prototype.sort ( _comparator_ )

    SortIndexedProperties ( _obj_: an Object, - _len_: a non-negative integer, + _length_: a non-negative integer, _sortCompare_: an Abstract Closure with two parameters, _holes_: ~skip-holes~ or ~read-through-holes~, ): either a normal completion containing a List of ECMAScript language values or a throw completion @@ -40940,7 +40936,7 @@

    1. Let _items_ be a new empty List. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. If _holes_ is ~skip-holes~, then 1. Let _kRead_ be ? HasProperty(_obj_, _propertyKey_). @@ -41034,20 +41030,20 @@

    Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _actualStart_ be 0. - 1. Else if _relativeStart_ < 0, let _actualStart_ be max(_len_ + _relativeStart_, 0). - 1. Else, let _actualStart_ be min(_relativeStart_, _len_). + 1. Else if _relativeStart_ < 0, let _actualStart_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _actualStart_ be min(_relativeStart_, _length_). 1. Let _itemCount_ be the number of elements in _items_. 1. If _start_ is not present, then 1. Let _actualDeleteCount_ be 0. 1. Else if _deleteCount_ is not present, then - 1. Let _actualDeleteCount_ be _len_ - _actualStart_. + 1. Let _actualDeleteCount_ be _length_ - _actualStart_. 1. Else, 1. Let _dc_ be ? ToIntegerOrInfinity(_deleteCount_). - 1. Let _actualDeleteCount_ be the result of clamping _dc_ between 0 and _len_ - _actualStart_. - 1. If _len_ + _itemCount_ - _actualDeleteCount_ > 253 - 1, throw a *TypeError* exception. + 1. Let _actualDeleteCount_ be the result of clamping _dc_ between 0 and _length_ - _actualStart_. + 1. If _length_ + _itemCount_ - _actualDeleteCount_ > 253 - 1, throw a *TypeError* exception. 1. Let _deletedArray_ be ? ArraySpeciesCreate(_obj_, _actualDeleteCount_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _actualDeleteCount_, @@ -41059,7 +41055,7 @@

    Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

    1. [id="step-array-proto-splice-set-length"] Perform ? Set(_deletedArray_, *"length"*, 𝔽(_actualDeleteCount_), *true*). 1. If _itemCount_ < _actualDeleteCount_, then 1. Set _k_ to _actualStart_. - 1. Repeat, while _k_ < (_len_ - _actualDeleteCount_), + 1. Repeat, while _k_ < (_length_ - _actualDeleteCount_), 1. Let _from_ be ! ToString(𝔽(_k_ + _actualDeleteCount_)). 1. Let _to_ be ! ToString(𝔽(_k_ + _itemCount_)). 1. If ? HasProperty(_obj_, _from_) is *true*, then @@ -41068,12 +41064,12 @@

    Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

    1. Else, 1. Perform ? DeletePropertyOrThrow(_obj_, _to_). 1. Set _k_ to _k_ + 1. - 1. Set _k_ to _len_. - 1. Repeat, while _k_ > (_len_ - _actualDeleteCount_ + _itemCount_), + 1. Set _k_ to _length_. + 1. Repeat, while _k_ > (_length_ - _actualDeleteCount_ + _itemCount_), 1. Perform ? DeletePropertyOrThrow(_obj_, ! ToString(𝔽(_k_ - 1))). 1. Set _k_ to _k_ - 1. 1. Else if _itemCount_ > _actualDeleteCount_, then - 1. Set _k_ to (_len_ - _actualDeleteCount_). + 1. Set _k_ to (_length_ - _actualDeleteCount_). 1. Repeat, while _k_ > _actualStart_, 1. Let _from_ be ! ToString(𝔽(_k_ + _actualDeleteCount_ - 1)). 1. Let _to_ be ! ToString(𝔽(_k_ + _itemCount_ - 1)). @@ -41087,7 +41083,7 @@

    Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

    1. For each element _item_ of _items_, do 1. Perform ? Set(_obj_, ! ToString(𝔽(_k_)), _item_, *true*). 1. Set _k_ to _k_ + 1. - 1. [id="step-array-proto-splice-set-length-2"] Perform ? Set(_obj_, *"length"*, 𝔽(_len_ - _actualDeleteCount_ + _itemCount_), *true*). + 1. [id="step-array-proto-splice-set-length-2"] Perform ? Set(_obj_, *"length"*, 𝔽(_length_ - _actualDeleteCount_ + _itemCount_), *true*). 1. Return _deletedArray_.
    @@ -41108,16 +41104,16 @@

    Array.prototype.toLocaleString ( [ _reserved1_ [ , _reserved2_ ] ] )

    This method performs the following steps when called:

    1. Let _array_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_array_). + 1. Let _length_ be ? LengthOfArrayLike(_array_). 1. Let _separator_ be the implementation-defined list-separator String value appropriate for the host environment's current locale (such as *", "*). 1. Let _result_ be the empty String. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. If _k_ > 0, set _result_ to the string-concatenation of _result_ and _separator_. 1. Let _element_ be ? Get(_array_, ! ToString(𝔽(_k_))). 1. If _element_ is neither *undefined* nor *null*, then - 1. Let _elementStr_ be ? ToString(? Invoke(_element_, *"toLocaleString"*)). - 1. Set _result_ to the string-concatenation of _result_ and _elementStr_. + 1. Let _elementString_ be ? ToString(? Invoke(_element_, *"toLocaleString"*)). + 1. Set _result_ to the string-concatenation of _result_ and _elementString_. 1. Set _k_ to _k_ + 1. 1. Return _result_. @@ -41134,11 +41130,11 @@

    Array.prototype.toReversed ( )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. Let _array_ be ? ArrayCreate(_len_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. Let _array_ be ? ArrayCreate(_length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, - 1. Let _from_ be ! ToString(𝔽(_len_ - _k_ - 1)). + 1. Repeat, while _k_ < _length_, + 1. Let _from_ be ! ToString(𝔽(_length_ - _k_ - 1)). 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _fromValue_ be ? Get(_obj_, _from_). 1. Perform ! CreateDataPropertyOrThrow(_array_, _propertyKey_, _fromValue_). @@ -41153,13 +41149,13 @@

    Array.prototype.toSorted ( _comparator_ )

    1. If _comparator_ is not *undefined* and IsCallable(_comparator_) is *false*, throw a *TypeError* exception. 1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). - 1. Let _array_ be ? ArrayCreate(_len_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). + 1. Let _array_ be ? ArrayCreate(_length_). 1. Let _sortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparator_ and performs the following steps when called: 1. Return ? CompareArrayElements(_x_, _y_, _comparator_). - 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _len_, _sortCompare_, ~read-through-holes~). + 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _length_, _sortCompare_, ~read-through-holes~). 1. Let _j_ be 0. - 1. Repeat, while _j_ < _len_, + 1. Repeat, while _j_ < _length_, 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_j_)), _sortedList_[_j_]). 1. Set _j_ to _j_ + 1. 1. Return _array_. @@ -41171,22 +41167,22 @@

    Array.prototype.toSpliced ( _start_, _skipCount_, ..._items_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _actualStart_ be 0. - 1. Else if _relativeStart_ < 0, let _actualStart_ be max(_len_ + _relativeStart_, 0). - 1. Else, let _actualStart_ be min(_relativeStart_, _len_). + 1. Else if _relativeStart_ < 0, let _actualStart_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _actualStart_ be min(_relativeStart_, _length_). 1. Let _insertCount_ be the number of elements in _items_. 1. If _start_ is not present, then 1. Let _actualSkipCount_ be 0. 1. Else if _skipCount_ is not present, then - 1. Let _actualSkipCount_ be _len_ - _actualStart_. + 1. Let _actualSkipCount_ be _length_ - _actualStart_. 1. Else, 1. Let _sc_ be ? ToIntegerOrInfinity(_skipCount_). - 1. Let _actualSkipCount_ be the result of clamping _sc_ between 0 and _len_ - _actualStart_. - 1. Let _newLen_ be _len_ + _insertCount_ - _actualSkipCount_. - 1. If _newLen_ > 253 - 1, throw a *TypeError* exception. - 1. Let _newArray_ be ? ArrayCreate(_newLen_). + 1. Let _actualSkipCount_ be the result of clamping _sc_ between 0 and _length_ - _actualStart_. + 1. Let _newLength_ be _length_ + _insertCount_ - _actualSkipCount_. + 1. If _newLength_ > 253 - 1, throw a *TypeError* exception. + 1. Let _newArray_ be ? ArrayCreate(_newLength_). 1. Let _writeIndex_ be 0. 1. Let _readIndex_ be _actualStart_ + _actualSkipCount_. 1. Repeat, while _writeIndex_ < _actualStart_, @@ -41198,7 +41194,7 @@

    Array.prototype.toSpliced ( _start_, _skipCount_, ..._items_ )

    1. Let _propertyKey_ be ! ToString(𝔽(_writeIndex_)). 1. Perform ! CreateDataPropertyOrThrow(_newArray_, _propertyKey_, _item_). 1. Set _writeIndex_ to _writeIndex_ + 1. - 1. Repeat, while _writeIndex_ < _newLen_, + 1. Repeat, while _writeIndex_ < _newLength_, 1. Let _propertyKey_ be ! ToString(𝔽(_writeIndex_)). 1. Let _from_ be ! ToString(𝔽(_readIndex_)). 1. Let _fromValue_ be ? Get(_obj_, _from_). @@ -41229,11 +41225,11 @@

    Array.prototype.unshift ( ..._items_ )

    It performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _argCount_ be the number of elements in _items_. 1. If _argCount_ > 0, then - 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. - 1. Let _k_ be _len_. + 1. If _length_ + _argCount_ > 253 - 1, throw a *TypeError* exception. + 1. Let _k_ be _length_. 1. Repeat, while _k_ > 0, 1. Let _from_ be ! ToString(𝔽(_k_ - 1)). 1. Let _to_ be ! ToString(𝔽(_k_ + _argCount_ - 1)). @@ -41249,8 +41245,8 @@

    Array.prototype.unshift ( ..._items_ )

    1. For each element _item_ of _items_, do 1. Perform ? Set(_obj_, ! ToString(_j_), _item_, *true*). 1. Set _j_ to _j_ + *1*𝔽. - 1. Perform ? Set(_obj_, *"length"*, 𝔽(_len_ + _argCount_), *true*). - 1. Return 𝔽(_len_ + _argCount_). + 1. Perform ? Set(_obj_, *"length"*, 𝔽(_length_ + _argCount_), *true*). + 1. Return 𝔽(_length_ + _argCount_).

    The *"length"* property of this method is *1*𝔽.

    @@ -41272,14 +41268,14 @@

    Array.prototype.with ( _index_, _value_ )

    This method performs the following steps when called:

    1. Let _obj_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _length_ be ? LengthOfArrayLike(_obj_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, let _actualIndex_ be _relativeIndex_. - 1. Else, let _actualIndex_ be _len_ + _relativeIndex_. - 1. If _actualIndex_ ≥ _len_ or _actualIndex_ < 0, throw a *RangeError* exception. - 1. Let _array_ be ? ArrayCreate(_len_). + 1. Else, let _actualIndex_ be _length_ + _relativeIndex_. + 1. If _actualIndex_ ≥ _length_ or _actualIndex_ < 0, throw a *RangeError* exception. + 1. Let _array_ be ? ArrayCreate(_length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. If _k_ = _actualIndex_, let _fromValue_ be _value_. 1. Else, let _fromValue_ be ? Get(_obj_, _propertyKey_). @@ -41387,10 +41383,10 @@

    %ArrayIteratorPrototype%.next ( )

    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 _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Else, - 1. Let _len_ be ? LengthOfArrayLike(_array_). - 1. If _index_ ≥ _len_, then + 1. Let _length_ be ? LengthOfArrayLike(_array_). + 1. If _index_ ≥ _length_, then 1. Set _iteratorObj_.[[IteratedArrayLike]] to *undefined*. 1. Return CreateIteratorResultObject(*undefined*, *true*). 1. Set _iteratorObj_.[[ArrayLikeNextIndex]] to _index_ + 1. @@ -41746,8 +41742,8 @@

    Properties of the %TypedArray% Intrinsic Object

    %TypedArray%.from ( _source_ [ , _mapper_ [ , _thisArg_ ] ] )

    This method performs the following steps when called:

    - 1. Let _constructor_ be the *this* value. - 1. If IsConstructor(_constructor_) is *false*, throw a *TypeError* exception. + 1. Let _ctor_ be the *this* value. + 1. If IsConstructor(_ctor_) is *false*, throw a *TypeError* exception. 1. If _mapper_ is *undefined*, then 1. Let _mapping_ be *false*. 1. Else, @@ -41756,10 +41752,10 @@

    %TypedArray%.from ( _source_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Let _usingIterator_ be ? GetMethod(_source_, %Symbol.iterator%). 1. If _usingIterator_ is not *undefined*, then 1. Let _values_ be ? IteratorToList(? GetIteratorFromMethod(_source_, _usingIterator_)). - 1. Let _len_ be the number of elements in _values_. - 1. Let _targetObj_ be ? TypedArrayCreateFromConstructor(_constructor_, « 𝔽(_len_) »). + 1. Let _length_ be the number of elements in _values_. + 1. Let _targetObj_ be ? TypedArrayCreateFromConstructor(_ctor_, « 𝔽(_length_) »). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be the first element of _values_. 1. Remove the first element from _values_. @@ -41773,10 +41769,10 @@

    %TypedArray%.from ( _source_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Return _targetObj_. 1. NOTE: _source_ is not an iterable object, so assume it is already an array-like object. 1. Let _arrayLike_ be ! ToObject(_source_). - 1. Let _len_ be ? LengthOfArrayLike(_arrayLike_). - 1. Let _targetObj_ be ? TypedArrayCreateFromConstructor(_constructor_, « 𝔽(_len_) »). + 1. Let _length_ be ? LengthOfArrayLike(_arrayLike_). + 1. Let _targetObj_ be ? TypedArrayCreateFromConstructor(_ctor_, « 𝔽(_length_) »). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). 1. If _mapping_ is *true*, then @@ -41793,12 +41789,12 @@

    %TypedArray%.from ( _source_ [ , _mapper_ [ , _thisArg_ ] ] )

    %TypedArray%.of ( ..._items_ )

    This method performs the following steps when called:

    - 1. Let _len_ be the number of elements in _items_. - 1. Let _constructor_ be the *this* value. - 1. If IsConstructor(_constructor_) is *false*, throw a *TypeError* exception. - 1. Let _newObj_ be ? TypedArrayCreateFromConstructor(_constructor_, « 𝔽(_len_) »). + 1. Let _length_ be the number of elements in _items_. + 1. Let _ctor_ be the *this* value. + 1. If IsConstructor(_ctor_) is *false*, throw a *TypeError* exception. + 1. Let _newObj_ be ? TypedArrayCreateFromConstructor(_ctor_, « 𝔽(_length_) »). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _kValue_ be _items_[_k_]. 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Perform ? Set(_newObj_, _propertyKey_, _kValue_, *true*). @@ -41841,13 +41837,13 @@

    %TypedArray%.prototype.at ( _index_ )

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, then 1. Let _k_ be _relativeIndex_. 1. Else, - 1. Let _k_ be _len_ + _relativeIndex_. - 1. If _k_ < 0 or _k_ ≥ _len_, return *undefined*. + 1. Let _k_ be _length_ + _relativeIndex_. + 1. If _k_ < 0 or _k_ ≥ _length_, return *undefined*. 1. Return ! Get(_obj_, ! ToString(𝔽(_k_))). @@ -41904,28 +41900,28 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Let _relativeTarget_ be ? ToIntegerOrInfinity(_target_). 1. If _relativeTarget_ = -∞, let _targetIndex_ be 0. - 1. Else if _relativeTarget_ < 0, let _targetIndex_ be max(_len_ + _relativeTarget_, 0). - 1. Else, let _targetIndex_ be min(_relativeTarget_, _len_). + 1. Else if _relativeTarget_ < 0, let _targetIndex_ be max(_length_ + _relativeTarget_, 0). + 1. Else, let _targetIndex_ be min(_relativeTarget_, _length_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _startIndex_ be 0. - 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_len_ + _relativeStart_, 0). - 1. Else, let _startIndex_ be min(_relativeStart_, _len_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _startIndex_ be min(_relativeStart_, _length_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _length_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_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. Let _count_ be min(_endIndex_ - _startIndex_, _len_ - _targetIndex_). + 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_length_ + _relativeEnd_, 0). + 1. Else, let _endIndex_ be min(_relativeEnd_, _length_). + 1. Let _count_ be min(_endIndex_ - _startIndex_, _length_ - _targetIndex_). 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 _obj_.[[ViewedArrayBuffer]]. 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. - 1. Set _len_ to TypedArrayLength(_taRecord_). + 1. Set _length_ to TypedArrayLength(_taRecord_). 1. NOTE: Side-effects of the above steps may have reduced the size of _obj_, in which case copying should proceed with the longest still-applicable prefix. - 1. Set _count_ to min(_count_, _len_ - _startIndex_, _len_ - _targetIndex_). + 1. Set _count_ to min(_count_, _length_ - _startIndex_, _length_ - _targetIndex_). 1. Let _elementSize_ be TypedArrayElementSize(_obj_). 1. Let _byteOffset_ be _obj_.[[ByteOffset]]. 1. Let _toByteIndex_ be (_targetIndex_ × _elementSize_) + _byteOffset_. @@ -41964,10 +41960,10 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). @@ -41985,21 +41981,21 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If _obj_.[[ContentType]] is ~bigint~, set _value_ to ? ToBigInt(_value_). 1. Else, set _value_ to ? ToNumber(_value_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _startIndex_ be 0. - 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_len_ + _relativeStart_, 0). - 1. Else, let _startIndex_ be min(_relativeStart_, _len_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _startIndex_ be min(_relativeStart_, _length_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _length_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_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. Else if _relativeEnd_ < 0, let _endIndex_ be max(_length_ + _relativeEnd_, 0). + 1. Else, let _endIndex_ be min(_relativeEnd_, _length_). 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. - 1. Set _len_ to TypedArrayLength(_taRecord_). - 1. Set _endIndex_ to min(_endIndex_, _len_). + 1. Set _length_ to TypedArrayLength(_taRecord_). + 1. Set _endIndex_ to min(_endIndex_, _length_). 1. Let _k_ be _startIndex_. 1. Repeat, while _k_ < _endIndex_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). @@ -42016,12 +42012,12 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _kept_ be a new empty List. 1. Let _captured_ be 0. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). 1. Let _selected_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). @@ -42031,8 +42027,8 @@

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

    1. Set _k_ to _k_ + 1. 1. Let _resultTypedArray_ be ? TypedArraySpeciesCreate(_obj_, « 𝔽(_captured_) »). 1. Let _n_ be 0. - 1. For each element _e_ of _kept_, do - 1. Perform ! Set(_resultTypedArray_, ! ToString(𝔽(_n_)), _e_, *true*). + 1. For each element _element_ of _kept_, do + 1. Perform ! Set(_resultTypedArray_, ! ToString(𝔽(_n_)), _element_, *true*). 1. Set _n_ to _n_ + 1. 1. Return _resultTypedArray_.
    @@ -42046,9 +42042,9 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~ascending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Value]]. + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~ascending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Value]].

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

    @@ -42060,9 +42056,9 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~ascending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Index]]. + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~ascending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Index]].

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

    @@ -42074,9 +42070,9 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~descending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Value]]. + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~descending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Value]].

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

    @@ -42088,9 +42084,9 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~descending~, _predicate_, _thisArg_). - 1. Return _findRec_.[[Index]]. + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. Let _findRecord_ be ? FindViaPredicate(_obj_, _length_, ~descending~, _predicate_, _thisArg_). + 1. Return _findRecord_.[[Index]].

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

    @@ -42102,10 +42098,10 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). 1. Perform ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »). @@ -42122,8 +42118,8 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. If _len_ = 0, return *false*. + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. If _length_ = 0, return *false*. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. 1. If _n_ = +∞, return *false*. @@ -42131,9 +42127,9 @@

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

    1. If _n_ ≥ 0, then 1. Let _k_ be _n_. 1. Else, - 1. Let _k_ be _len_ + _n_. + 1. Let _k_ be _length_ + _n_. 1. If _k_ < 0, set _k_ to 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _elementK_ be ! Get(_obj_, ! ToString(𝔽(_k_))). 1. If SameValueZero(_searchElement_, _elementK_) is *true*, return *true*. 1. Set _k_ to _k_ + 1. @@ -42149,8 +42145,8 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. If _len_ = 0, return *-1*𝔽. + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. If _length_ = 0, return *-1*𝔽. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. 1. If _n_ = +∞, return *-1*𝔽. @@ -42158,9 +42154,9 @@

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

    1. If _n_ ≥ 0, then 1. Let _k_ be _n_. 1. Else, - 1. Let _k_ be _len_ + _n_. + 1. Let _k_ be _length_ + _n_. 1. If _k_ < 0, set _k_ to 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ! HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then @@ -42179,17 +42175,17 @@

    %TypedArray%.prototype.join ( _separator_ )

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If _separator_ is *undefined*, let _sep_ be *","*. 1. Else, let _sep_ be ? ToString(_separator_). 1. Let _result_ be the empty String. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. If _k_ > 0, set _result_ to the string-concatenation of _result_ and _sep_. 1. Let _element_ be ! Get(_obj_, ! ToString(𝔽(_k_))). 1. If _element_ is not *undefined*, then - 1. Let _elementStr_ be ! ToString(_element_). - 1. Set _result_ to the string-concatenation of _result_ and _elementStr_. + 1. Let _elementString_ be ! ToString(_element_). + 1. Set _result_ to the string-concatenation of _result_ and _elementString_. 1. Set _k_ to _k_ + 1. 1. Return _result_. @@ -42213,14 +42209,14 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~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. Let _length_ be TypedArrayLength(_taRecord_). + 1. If _length_ = 0, return *-1*𝔽. + 1. If _fromIndex_ is present, let _n_ be ? ToIntegerOrInfinity(_fromIndex_); else let _n_ be _length_ - 1. 1. If _n_ = -∞, return *-1*𝔽. 1. If _n_ ≥ 0, then - 1. Let _k_ be min(_n_, _len_ - 1). + 1. Let _k_ be min(_n_, _length_ - 1). 1. Else, - 1. Let _k_ be _len_ + _n_. + 1. Let _k_ be _length_ + _n_. 1. Repeat, while _k_ ≥ 0, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ! HasProperty(_obj_, _propertyKey_). @@ -42255,11 +42251,11 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. Let _resultTypedArray_ be ? TypedArraySpeciesCreate(_obj_, « 𝔽(_len_) »). + 1. Let _resultTypedArray_ be ? TypedArraySpeciesCreate(_obj_, « 𝔽(_length_) »). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). 1. Let _mappedValue_ be ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »). @@ -42277,9 +42273,9 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. If _len_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. + 1. If _length_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Let _accumulator_ be *undefined*. 1. If _initialValue_ is present, then @@ -42288,7 +42284,7 @@

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

    1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Set _accumulator_ to ! Get(_obj_, _propertyKey_). 1. Set _k_ to _k_ + 1. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _obj_ »). @@ -42305,10 +42301,10 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) 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. + 1. If _length_ = 0 and _initialValue_ is not present, throw a *TypeError* exception. + 1. Let _k_ be _length_ - 1. 1. Let _accumulator_ be *undefined*. 1. If _initialValue_ is present, then 1. Set _accumulator_ to _initialValue_. @@ -42333,11 +42329,11 @@

    %TypedArray%.prototype.reverse ( )

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _middle_ be floor(_len_ / 2). + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. Let _middle_ be floor(_length_ / 2). 1. Let _lower_ be 0. 1. Repeat, while _lower_ ≠ _middle_, - 1. Let _upper_ be _len_ - _lower_ - 1. + 1. Let _upper_ be _length_ - _lower_ - 1. 1. Let _upperP_ be ! ToString(𝔽(_upper_)). 1. Let _lowerP_ be ! ToString(𝔽(_lower_)). 1. Let _lowerValue_ be ! Get(_obj_, _lowerP_). @@ -42384,14 +42380,14 @@

    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. Set _source_ to ? ToObject(_source_). + 1. Let _sourceLength_ be ? LengthOfArrayLike(_source_). 1. If _targetOffset_ = +∞, throw a *RangeError* exception. - 1. If _srcLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. + 1. If _sourceLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _srcLength_, + 1. Repeat, while _k_ < _sourceLength_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). - 1. Let _value_ be ? Get(_src_, _propertyKey_). + 1. Let _value_ be ? Get(_source_, _propertyKey_). 1. Let _targetIndex_ be 𝔽(_targetOffset_ + _k_). 1. Perform ? TypedArraySetElement(_target_, _targetIndex_, _value_). 1. Set _k_ to _k_ + 1. @@ -42416,40 +42412,40 @@

    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 MakeTypedArrayWithBufferWitnessRecord(_source_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_srcRecord_) is *true*, throw a *TypeError* exception. - 1. Let _srcLength_ be TypedArrayLength(_srcRecord_). + 1. Let _sourceBuffer_ be _source_.[[ViewedArrayBuffer]]. + 1. Let _sourceRecord_ be MakeTypedArrayWithBufferWitnessRecord(_source_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_sourceRecord_) is *true*, throw a *TypeError* exception. + 1. Let _sourceLength_ be TypedArrayLength(_sourceRecord_). 1. Let _targetType_ be TypedArrayElementType(_target_). 1. Let _targetElementSize_ be TypedArrayElementSize(_target_). 1. Let _targetByteOffset_ be _target_.[[ByteOffset]]. - 1. Let _srcType_ be TypedArrayElementType(_source_). - 1. Let _srcElementSize_ be TypedArrayElementSize(_source_). - 1. Let _srcByteOffset_ be _source_.[[ByteOffset]]. + 1. Let _sourceType_ be TypedArrayElementType(_source_). + 1. Let _sourceElementSize_ be TypedArrayElementSize(_source_). + 1. Let _sourceByteOffset_ be _source_.[[ByteOffset]]. 1. If _targetOffset_ = +∞, throw a *RangeError* exception. - 1. If _srcLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. + 1. If _sourceLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. 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*; else let _sameSharedArrayBuffer_ be *false*. - 1. If SameValue(_srcBuffer_, _targetBuffer_) is *true* or _sameSharedArrayBuffer_ is *true*, then - 1. Let _srcByteLength_ be TypedArrayByteLength(_srcRecord_). - 1. Set _srcBuffer_ to ? CloneArrayBuffer(_srcBuffer_, _srcByteOffset_, _srcByteLength_). - 1. Let _srcByteIndex_ be 0. + 1. If IsSharedArrayBuffer(_sourceBuffer_) is *true*, IsSharedArrayBuffer(_targetBuffer_) is *true*, and _sourceBuffer_.[[ArrayBufferData]] is _targetBuffer_.[[ArrayBufferData]], let _sameSharedArrayBuffer_ be *true*; else let _sameSharedArrayBuffer_ be *false*. + 1. If SameValue(_sourceBuffer_, _targetBuffer_) is *true* or _sameSharedArrayBuffer_ is *true*, then + 1. Let _sourceByteLength_ be TypedArrayByteLength(_sourceRecord_). + 1. Set _sourceBuffer_ to ? CloneArrayBuffer(_sourceBuffer_, _sourceByteOffset_, _sourceByteLength_). + 1. Let _sourceByteIndex_ be 0. 1. Else, - 1. Let _srcByteIndex_ be _srcByteOffset_. + 1. Let _sourceByteIndex_ be _sourceByteOffset_. 1. Let _targetByteIndex_ be (_targetOffset_ × _targetElementSize_) + _targetByteOffset_. - 1. Let _limit_ be _targetByteIndex_ + (_targetElementSize_ × _srcLength_). - 1. If _srcType_ is _targetType_, then + 1. Let _limit_ be _targetByteIndex_ + (_targetElementSize_ × _sourceLength_). + 1. If _sourceType_ is _targetType_, then 1. NOTE: The transfer must be performed in a manner that preserves the bit-level encoding of the source data. 1. Repeat, while _targetByteIndex_ < _limit_, - 1. Let _value_ be GetValueFromBuffer(_srcBuffer_, _srcByteIndex_, ~uint8~, *true*, ~unordered~). + 1. Let _value_ be GetValueFromBuffer(_sourceBuffer_, _sourceByteIndex_, ~uint8~, *true*, ~unordered~). 1. Perform SetValueInBuffer(_targetBuffer_, _targetByteIndex_, ~uint8~, _value_, *true*, ~unordered~). - 1. Set _srcByteIndex_ to _srcByteIndex_ + 1. + 1. Set _sourceByteIndex_ to _sourceByteIndex_ + 1. 1. Set _targetByteIndex_ to _targetByteIndex_ + 1. 1. Else, 1. Repeat, while _targetByteIndex_ < _limit_, - 1. Let _value_ be GetValueFromBuffer(_srcBuffer_, _srcByteIndex_, _srcType_, *true*, ~unordered~). + 1. Let _value_ be GetValueFromBuffer(_sourceBuffer_, _sourceByteIndex_, _sourceType_, *true*, ~unordered~). 1. Perform SetValueInBuffer(_targetBuffer_, _targetByteIndex_, _targetType_, _value_, *true*, ~unordered~). - 1. Set _srcByteIndex_ to _srcByteIndex_ + _srcElementSize_. + 1. Set _sourceByteIndex_ to _sourceByteIndex_ + _sourceElementSize_. 1. Set _targetByteIndex_ to _targetByteIndex_ + _targetElementSize_. 1. Return ~unused~. @@ -42463,15 +42459,15 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _srcArrayLength_ be TypedArrayLength(_taRecord_). + 1. Let _sourceArrayLength_ be TypedArrayLength(_taRecord_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _startIndex_ be 0. - 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_srcArrayLength_ + _relativeStart_, 0). - 1. Else, let _startIndex_ be min(_relativeStart_, _srcArrayLength_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _srcArrayLength_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_sourceArrayLength_ + _relativeStart_, 0). + 1. Else, let _startIndex_ be min(_relativeStart_, _sourceArrayLength_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _sourceArrayLength_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). 1. If _relativeEnd_ = -∞, let _endIndex_ be 0. - 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_srcArrayLength_ + _relativeEnd_, 0). - 1. Else, let _endIndex_ be min(_relativeEnd_, _srcArrayLength_). + 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_sourceArrayLength_ + _relativeEnd_, 0). + 1. Else, let _endIndex_ be min(_relativeEnd_, _sourceArrayLength_). 1. Let _countBytes_ be max(_endIndex_ - _startIndex_, 0). 1. Let _resultArray_ be ? TypedArraySpeciesCreate(_obj_, « 𝔽(_countBytes_) »). 1. If _countBytes_ > 0, then @@ -42479,21 +42475,21 @@

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

    1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. 1. Set _endIndex_ to min(_endIndex_, TypedArrayLength(_taRecord_)). 1. Set _countBytes_ to max(_endIndex_ - _startIndex_, 0). - 1. Let _srcType_ be TypedArrayElementType(_obj_). + 1. Let _sourceType_ be TypedArrayElementType(_obj_). 1. Let _targetType_ be TypedArrayElementType(_resultArray_). - 1. If _srcType_ is _targetType_, then + 1. If _sourceType_ is _targetType_, then 1. NOTE: The transfer must be performed in a manner that preserves the bit-level encoding of the source data. - 1. Let _srcBuffer_ be _obj_.[[ViewedArrayBuffer]]. + 1. Let _sourceBuffer_ be _obj_.[[ViewedArrayBuffer]]. 1. Let _targetBuffer_ be _resultArray_.[[ViewedArrayBuffer]]. 1. Let _elementSize_ be TypedArrayElementSize(_obj_). - 1. Let _srcByteOffset_ be _obj_.[[ByteOffset]]. - 1. Let _srcByteIndex_ be (_startIndex_ × _elementSize_) + _srcByteOffset_. + 1. Let _sourceByteOffset_ be _obj_.[[ByteOffset]]. + 1. Let _sourceByteIndex_ be (_startIndex_ × _elementSize_) + _sourceByteOffset_. 1. Let _targetByteIndex_ be _resultArray_.[[ByteOffset]]. 1. Let _endByteIndex_ be _targetByteIndex_ + (_countBytes_ × _elementSize_). 1. Repeat, while _targetByteIndex_ < _endByteIndex_, - 1. Let _value_ be GetValueFromBuffer(_srcBuffer_, _srcByteIndex_, ~uint8~, *true*, ~unordered~). + 1. Let _value_ be GetValueFromBuffer(_sourceBuffer_, _sourceByteIndex_, ~uint8~, *true*, ~unordered~). 1. Perform SetValueInBuffer(_targetBuffer_, _targetByteIndex_, ~uint8~, _value_, *true*, ~unordered~). - 1. Set _srcByteIndex_ to _srcByteIndex_ + 1. + 1. Set _sourceByteIndex_ to _sourceByteIndex_ + 1. 1. Set _targetByteIndex_ to _targetByteIndex_ + 1. 1. Else, 1. Let _n_ be 0. @@ -42516,10 +42512,10 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). @@ -42539,13 +42535,13 @@

    %TypedArray%.prototype.sort ( _comparator_ )

    1. If _comparator_ is not *undefined* and IsCallable(_comparator_) is *false*, throw a *TypeError* exception. 1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ 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 _comparator_ and performs the following steps when called: 1. Return ? CompareTypedArrayElements(_x_, _y_, _comparator_). - 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _len_, _sortCompare_, ~read-through-holes~). + 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _length_, _sortCompare_, ~read-through-holes~). 1. Let _j_ be 0. - 1. Repeat, while _j_ < _len_, + 1. Repeat, while _j_ < _length_, 1. Perform ! Set(_obj_, ! ToString(𝔽(_j_)), _sortedList_[_j_], *true*). 1. Set _j_ to _j_ + 1. 1. Return _obj_. @@ -42564,28 +42560,28 @@

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

    1. Perform ? RequireInternalSlot(_obj_, [[TypedArrayName]]). 1. Assert: _obj_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be _obj_.[[ViewedArrayBuffer]]. - 1. Let _srcRecord_ be MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). - 1. If IsTypedArrayOutOfBounds(_srcRecord_) is *true*, then - 1. Let _srcLength_ be 0. + 1. Let _sourceRecord_ be MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_sourceRecord_) is *true*, then + 1. Let _sourceLength_ be 0. 1. Else, - 1. Let _srcLength_ be TypedArrayLength(_srcRecord_). + 1. Let _sourceLength_ be TypedArrayLength(_sourceRecord_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _startIndex_ be 0. - 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_srcLength_ + _relativeStart_, 0). - 1. Else, let _startIndex_ be min(_relativeStart_, _srcLength_). + 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_sourceLength_ + _relativeStart_, 0). + 1. Else, let _startIndex_ be min(_relativeStart_, _sourceLength_). 1. Let _elementSize_ be TypedArrayElementSize(_obj_). - 1. Let _srcByteOffset_ be _obj_.[[ByteOffset]]. - 1. Let _beginByteOffset_ be _srcByteOffset_ + (_startIndex_ × _elementSize_). + 1. Let _sourceByteOffset_ be _obj_.[[ByteOffset]]. + 1. Let _beginByteOffset_ be _sourceByteOffset_ + (_startIndex_ × _elementSize_). 1. If _obj_.[[ArrayLength]] is ~auto~ and _end_ is *undefined*, then - 1. Let _argumentsList_ be « _buffer_, 𝔽(_beginByteOffset_) ». + 1. Let _argList_ be « _buffer_, 𝔽(_beginByteOffset_) ». 1. Else, - 1. If _end_ is *undefined*, let _relativeEnd_ be _srcLength_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _sourceLength_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). 1. If _relativeEnd_ = -∞, let _endIndex_ be 0. - 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_srcLength_ + _relativeEnd_, 0). - 1. Else, let _endIndex_ be min(_relativeEnd_, _srcLength_). + 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_sourceLength_ + _relativeEnd_, 0). + 1. Else, let _endIndex_ be min(_relativeEnd_, _sourceLength_). 1. Let _newLength_ be max(_endIndex_ - _startIndex_, 0). - 1. Let _argumentsList_ be « _buffer_, 𝔽(_beginByteOffset_), 𝔽(_newLength_) ». - 1. Return ? TypedArraySpeciesCreate(_obj_, _argumentsList_). + 1. Let _argList_ be « _buffer_, 𝔽(_beginByteOffset_), 𝔽(_newLength_) ». + 1. Return ? TypedArraySpeciesCreate(_obj_, _argList_).

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

    @@ -42605,11 +42601,11 @@

    %TypedArray%.prototype.toReversed ( )

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _len_). + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, - 1. Let _from_ be ! ToString(𝔽(_len_ - _k_ - 1)). + 1. Repeat, while _k_ < _length_, + 1. Let _from_ be ! ToString(𝔽(_length_ - _k_ - 1)). 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _fromValue_ be ! Get(_obj_, _from_). 1. Perform ! Set(_resultArray_, _propertyKey_, _fromValue_, *true*). @@ -42625,14 +42621,14 @@

    %TypedArray%.prototype.toSorted ( _comparator_ )

    1. If _comparator_ is not *undefined* and IsCallable(_comparator_) is *false*, throw a *TypeError* exception. 1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _len_). + 1. Let _length_ be TypedArrayLength(_taRecord_). + 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _length_). 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 _comparator_ and performs the following steps when called: 1. Return ? CompareTypedArrayElements(_x_, _y_, _comparator_). - 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _len_, _sortCompare_, ~read-through-holes~). + 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _length_, _sortCompare_, ~read-through-holes~). 1. Let _j_ be 0. - 1. Repeat, while _j_ < _len_, + 1. Repeat, while _j_ < _length_, 1. Perform ! Set(_resultArray_, ! ToString(𝔽(_j_)), _sortedList_[_j_], *true*). 1. Set _j_ to _j_ + 1. 1. Return _resultArray_. @@ -42660,16 +42656,16 @@

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

    1. Let _obj_ be the *this* value. 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, let _actualIndex_ be _relativeIndex_. - 1. Else, let _actualIndex_ be _len_ + _relativeIndex_. + 1. Else, let _actualIndex_ be _length_ + _relativeIndex_. 1. If _obj_.[[ContentType]] is ~bigint~, let _numericValue_ be ? ToBigInt(_value_). 1. Else, let _numericValue_ be ? ToNumber(_value_). 1. If IsValidIntegerIndex(_obj_, 𝔽(_actualIndex_)) is *false*, throw a *RangeError* exception. - 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _len_). + 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. If _k_ = _actualIndex_, let _fromValue_ be _numericValue_. 1. Else, let _fromValue_ be ! Get(_obj_, _propertyKey_). @@ -42706,8 +42702,8 @@

    Abstract Operations for TypedArray Objects

    TypedArrayCreateFromConstructor ( - _constructor_: a constructor, - _argumentList_: a List of ECMAScript language values, + _ctor_: a constructor, + _argList_: a List of ECMAScript language values, ): either a normal completion containing a TypedArray or a throw completion

    @@ -42715,13 +42711,13 @@

    It is used to specify the creation of a new TypedArray using a constructor function.

    - 1. Let _newTypedArray_ be ? Construct(_constructor_, _argumentList_). + 1. Let _newTypedArray_ be ? Construct(_ctor_, _argList_). 1. Let _taRecord_ be ? ValidateTypedArray(_newTypedArray_, ~seq-cst~). 1. Assert: _newTypedArray_ has all the internal slots mentioned in . - 1. If the number of elements in _argumentList_ is 1 and _argumentList_[0] is a Number, then + 1. If the number of elements in _argList_ is 1 and _argList_[0] is a Number, then 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. If _length_ < ℝ(_argList_[0]), throw a *TypeError* exception. 1. Return _newTypedArray_.
    @@ -42738,8 +42734,8 @@

    It is used to specify the creation of a new TypedArray using a constructor function that is derived from _exemplar_. Unlike TypedArraySpeciesCreate, which can construct custom TypedArray subclasses through the use of %Symbol.species%, this operation always uses one of the built-in TypedArray constructors.

    - 1. Let _constructor_ be the intrinsic object associated with the constructor name _exemplar_.[[TypedArrayName]] in . - 1. Let _result_ be ? TypedArrayCreateFromConstructor(_constructor_, « 𝔽(_length_) »). + 1. Let _ctor_ be the intrinsic object associated with the constructor name _exemplar_.[[TypedArrayName]] in . + 1. Let _result_ be ? TypedArrayCreateFromConstructor(_ctor_, « 𝔽(_length_) »). 1. Assert: _result_ has [[TypedArrayName]] and [[ContentType]] internal slots. 1. Assert: _result_.[[ContentType]] is _exemplar_.[[ContentType]]. 1. Return _result_. @@ -42750,7 +42746,7 @@

    TypedArraySpeciesCreate ( _exemplar_: a TypedArray, - _argumentList_: a List of ECMAScript language values, + _argList_: a List of ECMAScript language values, ): either a normal completion containing a TypedArray or a throw completion

    @@ -42758,9 +42754,9 @@

    It is used to specify the creation of a new TypedArray using a constructor function that is derived from _exemplar_. Unlike ArraySpeciesCreate, which can create non-Array objects through the use of %Symbol.species%, this operation enforces that the constructor function creates an actual TypedArray.

    - 1. Let _defaultConstructor_ be the intrinsic object associated with the constructor name _exemplar_.[[TypedArrayName]] in . - 1. Let _constructor_ be ? SpeciesConstructor(_exemplar_, _defaultConstructor_). - 1. Let _result_ be ? TypedArrayCreateFromConstructor(_constructor_, _argumentList_). + 1. Let _defaultCtor_ be the intrinsic object associated with the constructor name _exemplar_.[[TypedArrayName]] in . + 1. Let _ctor_ be ? SpeciesConstructor(_exemplar_, _defaultCtor_). + 1. Let _result_ be ? TypedArrayCreateFromConstructor(_ctor_, _argList_). 1. If _result_.[[ContentType]] is not _exemplar_.[[ContentType]], throw a *TypeError* exception. 1. Return _result_. @@ -42856,38 +42852,38 @@

    _TypedArray_ ( ..._args_ )

    Each _TypedArray_ constructor performs the following steps when called:

    1. If NewTarget is *undefined*, throw a *TypeError* exception. - 1. Let _constructorName_ be the String value of the Constructor Name value specified in for this TypedArray constructor. + 1. Let _ctorName_ be the String value of the Constructor Name value specified in for this TypedArray constructor. 1. Let _proto_ be "%TypedArray.prototype%". 1. Let _numberOfArgs_ be the number of elements in _args_. - 1. If _numberOfArgs_ = 0, return ? AllocateTypedArray(_constructorName_, NewTarget, _proto_, 0). - 1. Let _firstArgument_ be _args_[0]. - 1. If _firstArgument_ is an Object, then - 1. Let _obj_ be ? AllocateTypedArray(_constructorName_, NewTarget, _proto_). - 1. If _firstArgument_ has a [[TypedArrayName]] internal slot, then - 1. Perform ? InitializeTypedArrayFromTypedArray(_obj_, _firstArgument_). - 1. Else if _firstArgument_ has an [[ArrayBufferData]] internal slot, then + 1. If _numberOfArgs_ = 0, return ? AllocateTypedArray(_ctorName_, NewTarget, _proto_, 0). + 1. Let _firstArg_ be _args_[0]. + 1. If _firstArg_ is an Object, then + 1. Let _obj_ be ? AllocateTypedArray(_ctorName_, NewTarget, _proto_). + 1. If _firstArg_ has a [[TypedArrayName]] internal slot, then + 1. Perform ? InitializeTypedArrayFromTypedArray(_obj_, _firstArg_). + 1. Else if _firstArg_ has an [[ArrayBufferData]] internal slot, then 1. If _numberOfArgs_ > 1, let _byteOffset_ be _args_[1]; else let _byteOffset_ be *undefined*. 1. If _numberOfArgs_ > 2, let _length_ be _args_[2]; else let _length_ be *undefined*. - 1. Perform ? InitializeTypedArrayFromArrayBuffer(_obj_, _firstArgument_, _byteOffset_, _length_). + 1. Perform ? InitializeTypedArrayFromArrayBuffer(_obj_, _firstArg_, _byteOffset_, _length_). 1. Else, - 1. Assert: _firstArgument_ is an Object and _firstArgument_ does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot. - 1. Let _usingIterator_ be ? GetMethod(_firstArgument_, %Symbol.iterator%). + 1. Assert: _firstArg_ is an Object and _firstArg_ does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot. + 1. Let _usingIterator_ be ? GetMethod(_firstArg_, %Symbol.iterator%). 1. If _usingIterator_ is not *undefined*, then - 1. Let _values_ be ? IteratorToList(? GetIteratorFromMethod(_firstArgument_, _usingIterator_)). + 1. Let _values_ be ? IteratorToList(? GetIteratorFromMethod(_firstArg_, _usingIterator_)). 1. Perform ? InitializeTypedArrayFromList(_obj_, _values_). 1. Else, - 1. NOTE: _firstArgument_ is not an iterable object, so assume it is already an array-like object. - 1. Perform ? InitializeTypedArrayFromArrayLike(_obj_, _firstArgument_). + 1. NOTE: _firstArg_ is not an iterable object, so assume it is already an array-like object. + 1. Perform ? InitializeTypedArrayFromArrayLike(_obj_, _firstArg_). 1. Return _obj_. - 1. Assert: _firstArgument_ is not an Object. - 1. Let _elementLength_ be ? ToIndex(_firstArgument_). - 1. Return ? AllocateTypedArray(_constructorName_, NewTarget, _proto_, _elementLength_). + 1. Assert: _firstArg_ is not an Object. + 1. Let _elementLength_ be ? ToIndex(_firstArg_). + 1. Return ? AllocateTypedArray(_ctorName_, NewTarget, _proto_, _elementLength_).

    AllocateTypedArray ( - _constructorName_: a String which is the name of a TypedArray constructor in , + _ctorName_: a String which is the name of a TypedArray constructor in , _newTarget_: a constructor, _defaultProto_: a String, optional _length_: a non-negative integer, @@ -42901,8 +42897,8 @@

    1. Let _proto_ be ? GetPrototypeFromConstructor(_newTarget_, _defaultProto_). 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~. + 1. Set _obj_.[[TypedArrayName]] to _ctorName_. + 1. If _ctorName_ is either *"BigInt64Array"* or *"BigUint64Array"*, set _obj_.[[ContentType]] to ~bigint~. 1. Else, set _obj_.[[ContentType]] to ~number~. 1. If _length_ is not present, then 1. Set _obj_.[[ByteLength]] to 0. @@ -42918,34 +42914,34 @@

    InitializeTypedArrayFromTypedArray ( _obj_: a TypedArray, - _srcArray_: a TypedArray, + _sourceArray_: a TypedArray, ): either a normal completion containing ~unused~ or a throw completion

    - 1. Let _srcData_ be _srcArray_.[[ViewedArrayBuffer]]. + 1. Let _sourceData_ be _sourceArray_.[[ViewedArrayBuffer]]. 1. Let _elementType_ be TypedArrayElementType(_obj_). 1. Let _elementSize_ be TypedArrayElementSize(_obj_). - 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 _elementLength_ be TypedArrayLength(_srcRecord_). + 1. Let _sourceType_ be TypedArrayElementType(_sourceArray_). + 1. Let _sourceElementSize_ be TypedArrayElementSize(_sourceArray_). + 1. Let _sourceByteOffset_ be _sourceArray_.[[ByteOffset]]. + 1. Let _sourceRecord_ be MakeTypedArrayWithBufferWitnessRecord(_sourceArray_, ~seq-cst~). + 1. If IsTypedArrayOutOfBounds(_sourceRecord_) is *true*, throw a *TypeError* exception. + 1. Let _elementLength_ be TypedArrayLength(_sourceRecord_). 1. Let _byteLength_ be _elementSize_ × _elementLength_. - 1. If _elementType_ is _srcType_, then - 1. Let _data_ be ? CloneArrayBuffer(_srcData_, _srcByteOffset_, _byteLength_). + 1. If _elementType_ is _sourceType_, then + 1. Let _data_ be ? CloneArrayBuffer(_sourceData_, _sourceByteOffset_, _byteLength_). 1. Else, 1. Let _data_ be ? AllocateArrayBuffer(%ArrayBuffer%, _byteLength_). - 1. If _srcArray_.[[ContentType]] is not _obj_.[[ContentType]], throw a *TypeError* exception. - 1. Let _srcByteIndex_ be _srcByteOffset_. + 1. If _sourceArray_.[[ContentType]] is not _obj_.[[ContentType]], throw a *TypeError* exception. + 1. Let _sourceByteIndex_ be _sourceByteOffset_. 1. Let _targetByteIndex_ be 0. 1. Let _count_ be _elementLength_. 1. Repeat, while _count_ > 0, - 1. Let _value_ be GetValueFromBuffer(_srcData_, _srcByteIndex_, _srcType_, *true*, ~unordered~). + 1. Let _value_ be GetValueFromBuffer(_sourceData_, _sourceByteIndex_, _sourceType_, *true*, ~unordered~). 1. Perform SetValueInBuffer(_data_, _targetByteIndex_, _elementType_, _value_, *true*, ~unordered~). - 1. Set _srcByteIndex_ to _srcByteIndex_ + _srcElementSize_. + 1. Set _sourceByteIndex_ to _sourceByteIndex_ + _sourceElementSize_. 1. Set _targetByteIndex_ to _targetByteIndex_ + _elementSize_. 1. Set _count_ to _count_ - 1. 1. Set _obj_.[[ViewedArrayBuffer]] to _data_. @@ -43006,10 +43002,10 @@

    - 1. Let _len_ be the number of elements in _values_. - 1. Perform ? AllocateTypedArrayBuffer(_obj_, _len_). + 1. Let _length_ be the number of elements in _values_. + 1. Perform ? AllocateTypedArrayBuffer(_obj_, _length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be the first element of _values_. 1. Remove the first element from _values_. @@ -43030,10 +43026,10 @@

    - 1. Let _len_ be ? LengthOfArrayLike(_arrayLike_). - 1. Perform ? AllocateTypedArrayBuffer(_obj_, _len_). + 1. Let _length_ be ? LengthOfArrayLike(_arrayLike_). + 1. Perform ? AllocateTypedArrayBuffer(_obj_, _length_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). 1. Perform ? Set(_obj_, _propertyKey_, _kValue_, *true*). @@ -43190,10 +43186,10 @@

    Uint8Array.prototype.setFromBase64 ( _string_ [ , _options_ ] )

    1. Perform SetUint8ArrayBytes(_into_, _bytes_). 1. If _result_.[[Error]] is not ~none~, then 1. Throw _result_.[[Error]]. - 1. Let _resultObject_ be OrdinaryObjectCreate(%Object.prototype%). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"read"*, 𝔽(_result_.[[Read]])). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"written"*, 𝔽(_written_)). - 1. Return _resultObject_. + 1. Let _resultObj_ be OrdinaryObjectCreate(%Object.prototype%). + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"read"*, 𝔽(_result_.[[Read]])). + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"written"*, 𝔽(_written_)). + 1. Return _resultObj_.
    @@ -43214,10 +43210,10 @@

    Uint8Array.prototype.setFromHex ( _string_ )

    1. Perform SetUint8ArrayBytes(_into_, _bytes_). 1. If _result_.[[Error]] is not ~none~, then 1. Throw _result_.[[Error]]. - 1. Let _resultObject_ be OrdinaryObjectCreate(%Object.prototype%). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"read"*, 𝔽(_result_.[[Read]])). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"written"*, 𝔽(_written_)). - 1. Return _resultObject_. + 1. Let _resultObj_ be OrdinaryObjectCreate(%Object.prototype%). + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"read"*, 𝔽(_result_.[[Read]])). + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"written"*, 𝔽(_written_)). + 1. Return _resultObj_.
    @@ -43285,11 +43281,11 @@

    1. Let _buffer_ be _ta_.[[ViewedArrayBuffer]]. 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_ta_, ~seq-cst~). 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. - 1. Let _len_ be TypedArrayLength(_taRecord_). + 1. Let _length_ be TypedArrayLength(_taRecord_). 1. Let _byteOffset_ be _ta_.[[ByteOffset]]. 1. Let _bytes_ be a new empty List. 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, + 1. Repeat, while _index_ < _length_, 1. Let _byteIndex_ be _byteOffset_ + _index_. 1. Let _byte_ be ℝ(GetValueFromBuffer(_buffer_, _byteIndex_, ~uint8~, *true*, ~unordered~)). 1. Append _byte_ to _bytes_. @@ -43308,9 +43304,9 @@

    1. Let _offset_ be _into_.[[ByteOffset]]. - 1. Let _len_ be the number of elements in _bytes_. + 1. Let _length_ be the number of elements in _bytes_. 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, + 1. Repeat, while _index_ < _length_, 1. Let _byte_ be _bytes_[_index_]. 1. Let _byteIndexInBuffer_ be _index_ + _offset_. 1. Perform SetValueInBuffer(_into_.[[ViewedArrayBuffer]], _byteIndexInBuffer_, ~uint8~, 𝔽(_byte_), *true*, ~unordered~). @@ -43684,15 +43680,15 @@

    Map.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _entries_ be _map_.[[MapData]]. - 1. Let _numEntries_ be the number of elements in _entries_. + 1. Let _entriesCount_ be the number of elements in _entries_. 1. Let _index_ be 0. - 1. Repeat, while _index_ < _numEntries_, - 1. Let _e_ be _entries_[_index_]. + 1. Repeat, while _index_ < _entriesCount_, + 1. Let _entry_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. - 1. If _e_.[[Key]] is not ~empty~, then - 1. Perform ? Call(_callback_, _thisArg_, « _e_.[[Value]], _e_.[[Key]], _map_ »). + 1. If _entry_.[[Key]] is not ~empty~, then + 1. Perform ? Call(_callback_, _thisArg_, « _entry_.[[Value]], _entry_.[[Key]], _map_ »). 1. NOTE: The number of elements in _entries_ may have increased during execution of _callback_. - 1. Set _numEntries_ to the number of elements in _entries_. + 1. Set _entriesCount_ to the number of elements in _entries_. 1. Return *undefined*.
    @@ -43851,8 +43847,8 @@

    1. Let _closure_ be a new Abstract Closure with no parameters that captures _map_ and _kind_ and performs the following steps when called: 1. Let _entries_ be _map_.[[MapData]]. 1. Let _index_ be 0. - 1. Let _numEntries_ be the number of elements in _entries_. - 1. Repeat, while _index_ < _numEntries_, + 1. Let _entriesCount_ be the number of elements in _entries_. + 1. Repeat, while _index_ < _entriesCount_, 1. Let _entry_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. 1. If _entry_.[[Key]] is not ~empty~, then @@ -43865,7 +43861,7 @@

    1. Let _result_ be CreateArrayFromList(« _entry_.[[Key]], _entry_.[[Value]] »). 1. Perform ? GeneratorYield(CreateIteratorResultObject(_result_, *false*)). 1. NOTE: The number of elements in _entries_ may have increased while execution of this abstract operation was paused by GeneratorYield. - 1. Set _numEntries_ to the number of elements in _entries_. + 1. Set _entriesCount_ to the number of elements in _entries_. 1. Return NormalCompletion(~unused~). 1. Return CreateIteratorFromClosure(_closure_, *"%MapIteratorPrototype%"*, %MapIteratorPrototype%). @@ -43981,10 +43977,10 @@

    1. If _obj_ is not an Object, throw a *TypeError* exception. 1. Let _rawSize_ be ? Get(_obj_, *"size"*). - 1. Let _numSize_ be ? ToNumber(_rawSize_). - 1. NOTE: If _rawSize_ is *undefined*, then _numSize_ will be *NaN*. - 1. If _numSize_ is *NaN*, throw a *TypeError* exception. - 1. Let _intSize_ be ! ToIntegerOrInfinity(_numSize_). + 1. Let _numberSize_ be ? ToNumber(_rawSize_). + 1. NOTE: If _rawSize_ is *undefined*, then _numberSize_ will be *NaN*. + 1. If _numberSize_ is *NaN*, throw a *TypeError* exception. + 1. Let _intSize_ be ! ToIntegerOrInfinity(_numberSize_). 1. If _intSize_ < 0, throw a *RangeError* exception. 1. Let _has_ be ? Get(_obj_, *"has"*). 1. If IsCallable(_has_) is *false*, throw a *TypeError* exception. @@ -44023,8 +44019,8 @@

    1. Let _size_ be the number of elements in _setData_. 1. Let _index_ be 0. 1. Repeat, while _index_ < _size_, - 1. Let _e_ be _setData_[_index_]. - 1. If _e_ is not ~empty~ and _e_ is _value_, then + 1. Let _element_ be _setData_[_index_]. + 1. If _element_ is not ~empty~ and _element_ is _value_, then 1. Return _index_. 1. Set _index_ to _index_ + 1. 1. Return ~not-found~. @@ -44041,8 +44037,8 @@

    1. Let _count_ be 0. - 1. For each element _e_ of _setData_, do - 1. If _e_ is not ~empty~, set _count_ to _count_ + 1. + 1. For each element _element_ of _setData_, do + 1. If _element_ is not ~empty~, set _count_ to _count_ + 1. 1. Return _count_. @@ -44175,23 +44171,23 @@

    Set.prototype.difference ( _other_ )

    1. Let _set_ be the *this* value. 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). - 1. Let _otherRec_ be ? GetSetRecord(_other_). + 1. Let _otherRecord_ be ? GetSetRecord(_other_). 1. Let _resultSetData_ be a copy of _set_.[[SetData]]. - 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRec_.[[Size]], then + 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRecord_.[[Size]], then 1. Let _thisSize_ be the number of elements in _set_.[[SetData]]. 1. Let _index_ be 0. 1. Repeat, while _index_ < _thisSize_, 1. Let _entry_ be _resultSetData_[_index_]. 1. If _entry_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _entry_ »)). + 1. Let _inOther_ be ToBoolean(? Call(_otherRecord_.[[Has]], _otherRecord_.[[SetObject]], « _entry_ »)). 1. If _inOther_ is *true*, then 1. Set _resultSetData_[_index_] to ~empty~. 1. Set _index_ to _index_ + 1. 1. Else, - 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). + 1. Let _keysIterator_ be ? GetIteratorFromMethod(_otherRecord_.[[SetObject]], _otherRecord_.[[Keys]]). 1. Let _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, - 1. Set _next_ to ? IteratorStepValue(_keysIter_). + 1. Set _next_ to ? IteratorStepValue(_keysIterator_). 1. If _next_ is not ~done~, then 1. Set _next_ to CanonicalizeKeyedCollectionKey(_next_). 1. Let _valueIndex_ be SetDataIndex(_resultSetData_, _next_). @@ -44223,15 +44219,15 @@

    Set.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _entries_ be _set_.[[SetData]]. - 1. Let _numEntries_ be the number of elements in _entries_. + 1. Let _entriesCount_ be the number of elements in _entries_. 1. Let _index_ be 0. - 1. Repeat, while _index_ < _numEntries_, + 1. Repeat, while _index_ < _entriesCount_, 1. Let _entry_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. 1. If _entry_ is not ~empty~, then 1. Perform ? Call(_callback_, _thisArg_, « _entry_, _entry_, _set_ »). 1. NOTE: The number of elements in _entries_ may have increased during execution of _callback_. - 1. Set _numEntries_ to the number of elements in _entries_. + 1. Set _entriesCount_ to the number of elements in _entries_. 1. Return *undefined*.
    @@ -44263,27 +44259,27 @@

    Set.prototype.intersection ( _other_ )

    1. Let _set_ be the *this* value. 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). - 1. Let _otherRec_ be ? GetSetRecord(_other_). + 1. Let _otherRecord_ be ? GetSetRecord(_other_). 1. Let _resultSetData_ be a new empty List. - 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRec_.[[Size]], then + 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRecord_.[[Size]], then 1. Let _thisSize_ be the number of elements in _set_.[[SetData]]. 1. Let _index_ be 0. 1. Repeat, while _index_ < _thisSize_, 1. Let _entry_ be _set_.[[SetData]][_index_]. 1. Set _index_ to _index_ + 1. 1. If _entry_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _entry_ »)). + 1. Let _inOther_ be ToBoolean(? Call(_otherRecord_.[[Has]], _otherRecord_.[[SetObject]], « _entry_ »)). 1. If _inOther_ is *true*, then - 1. NOTE: It is possible for earlier calls to _otherRec_.[[Has]] to remove and re-add an element of _set_.[[SetData]], which can cause the same element to be visited twice during this iteration. + 1. NOTE: It is possible for earlier calls to _otherRecord_.[[Has]] to remove and re-add an element of _set_.[[SetData]], which can cause the same element to be visited twice during this iteration. 1. If SetDataHas(_resultSetData_, _entry_) is *false*, then 1. Append _entry_ to _resultSetData_. - 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. + 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRecord_.[[Has]]. 1. Set _thisSize_ to the number of elements in _set_.[[SetData]]. 1. Else, - 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). + 1. Let _keysIterator_ be ? GetIteratorFromMethod(_otherRecord_.[[SetObject]], _otherRecord_.[[Keys]]). 1. Let _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, - 1. Set _next_ to ? IteratorStepValue(_keysIter_). + 1. Set _next_ to ? IteratorStepValue(_keysIterator_). 1. If _next_ is not ~done~, then 1. Set _next_ to CanonicalizeKeyedCollectionKey(_next_). 1. Let _inThis_ be SetDataHas(_set_.[[SetData]], _next_). @@ -44303,26 +44299,26 @@

    Set.prototype.isDisjointFrom ( _other_ )

    1. Let _set_ be the *this* value. 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). - 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRec_.[[Size]], then + 1. Let _otherRecord_ be ? GetSetRecord(_other_). + 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRecord_.[[Size]], then 1. Let _thisSize_ be the number of elements in _set_.[[SetData]]. 1. Let _index_ be 0. 1. Repeat, while _index_ < _thisSize_, 1. Let _entry_ be _set_.[[SetData]][_index_]. 1. Set _index_ to _index_ + 1. 1. If _entry_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _entry_ »)). + 1. Let _inOther_ be ToBoolean(? Call(_otherRecord_.[[Has]], _otherRecord_.[[SetObject]], « _entry_ »)). 1. If _inOther_ is *true*, return *false*. - 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. + 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRecord_.[[Has]]. 1. Set _thisSize_ to the number of elements in _set_.[[SetData]]. 1. Else, - 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). + 1. Let _keysIterator_ be ? GetIteratorFromMethod(_otherRecord_.[[SetObject]], _otherRecord_.[[Keys]]). 1. Let _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, - 1. Set _next_ to ? IteratorStepValue(_keysIter_). + 1. Set _next_ to ? IteratorStepValue(_keysIterator_). 1. If _next_ is not ~done~, then 1. If SetDataHas(_set_.[[SetData]], _next_) is *true*, then - 1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)). + 1. Perform ? IteratorClose(_keysIterator_, NormalCompletion(~unused~)). 1. Return *false*. 1. Return *true*. @@ -44334,17 +44330,17 @@

    Set.prototype.isSubsetOf ( _other_ )

    1. Let _set_ be the *this* value. 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). - 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. If SetDataSize(_set_.[[SetData]]) > _otherRec_.[[Size]], return *false*. + 1. Let _otherRecord_ be ? GetSetRecord(_other_). + 1. If SetDataSize(_set_.[[SetData]]) > _otherRecord_.[[Size]], return *false*. 1. Let _thisSize_ be the number of elements in _set_.[[SetData]]. 1. Let _index_ be 0. 1. Repeat, while _index_ < _thisSize_, 1. Let _entry_ be _set_.[[SetData]][_index_]. 1. Set _index_ to _index_ + 1. 1. If _entry_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _entry_ »)). + 1. Let _inOther_ be ToBoolean(? Call(_otherRecord_.[[Has]], _otherRecord_.[[SetObject]], « _entry_ »)). 1. If _inOther_ is *false*, return *false*. - 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. + 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRecord_.[[Has]]. 1. Set _thisSize_ to the number of elements in _set_.[[SetData]]. 1. Return *true*. @@ -44356,15 +44352,15 @@

    Set.prototype.isSupersetOf ( _other_ )

    1. Let _set_ be the *this* value. 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). - 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. If SetDataSize(_set_.[[SetData]]) < _otherRec_.[[Size]], return *false*. - 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). + 1. Let _otherRecord_ be ? GetSetRecord(_other_). + 1. If SetDataSize(_set_.[[SetData]]) < _otherRecord_.[[Size]], return *false*. + 1. Let _keysIterator_ be ? GetIteratorFromMethod(_otherRecord_.[[SetObject]], _otherRecord_.[[Keys]]). 1. Let _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, - 1. Set _next_ to ? IteratorStepValue(_keysIter_). + 1. Set _next_ to ? IteratorStepValue(_keysIterator_). 1. If _next_ is not ~done~, then 1. If SetDataHas(_set_.[[SetData]], _next_) is *false*, then - 1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)). + 1. Perform ? IteratorClose(_keysIterator_, NormalCompletion(~unused~)). 1. Return *false*. 1. Return *true*. @@ -44395,12 +44391,12 @@

    Set.prototype.symmetricDifference ( _other_ )

    1. Let _set_ be the *this* value. 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). - 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). + 1. Let _otherRecord_ be ? GetSetRecord(_other_). + 1. Let _keysIterator_ be ? GetIteratorFromMethod(_otherRecord_.[[SetObject]], _otherRecord_.[[Keys]]). 1. Let _resultSetData_ be a copy of _set_.[[SetData]]. 1. Let _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, - 1. Set _next_ to ? IteratorStepValue(_keysIter_). + 1. Set _next_ to ? IteratorStepValue(_keysIterator_). 1. If _next_ is not ~done~, then 1. Set _next_ to CanonicalizeKeyedCollectionKey(_next_). 1. Let _resultIndex_ be SetDataIndex(_resultSetData_, _next_). @@ -44421,12 +44417,12 @@

    Set.prototype.union ( _other_ )

    1. Let _set_ be the *this* value. 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). - 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). + 1. Let _otherRecord_ be ? GetSetRecord(_other_). + 1. Let _keysIterator_ be ? GetIteratorFromMethod(_otherRecord_.[[SetObject]], _otherRecord_.[[Keys]]). 1. Let _resultSetData_ be a copy of _set_.[[SetData]]. 1. Let _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, - 1. Set _next_ to ? IteratorStepValue(_keysIter_). + 1. Set _next_ to ? IteratorStepValue(_keysIterator_). 1. If _next_ is not ~done~, then 1. Set _next_ to CanonicalizeKeyedCollectionKey(_next_). 1. If SetDataHas(_resultSetData_, _next_) is *false*, then @@ -44483,8 +44479,8 @@

    1. Let _closure_ be a new Abstract Closure with no parameters that captures _set_ and _kind_ and performs the following steps when called: 1. Let _index_ be 0. 1. Let _entries_ be _set_.[[SetData]]. - 1. Let _numEntries_ be the number of elements in _entries_. - 1. Repeat, while _index_ < _numEntries_, + 1. Let _entriesCount_ be the number of elements in _entries_. + 1. Repeat, while _index_ < _entriesCount_, 1. Let _entry_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. 1. If _entry_ is not ~empty~, then @@ -44495,7 +44491,7 @@

    1. Assert: _kind_ is ~value~. 1. Perform ? GeneratorYield(CreateIteratorResultObject(_entry_, *false*)). 1. NOTE: The number of elements in _entries_ may have increased while execution of this abstract operation was paused by GeneratorYield. - 1. Set _numEntries_ to the number of elements in _entries_. + 1. Set _entriesCount_ to the number of elements in _entries_. 1. Return NormalCompletion(~unused~). 1. Return CreateIteratorFromClosure(_closure_, *"%SetIteratorPrototype%"*, %SetIteratorPrototype%). @@ -44894,7 +44890,7 @@

    Abstract Operations For ArrayBuffer Objects

    AllocateArrayBuffer ( - _constructor_: a constructor, + _ctor_: a constructor, _byteLength_: a non-negative integer, optional _maxByteLength_: a non-negative integer or ~empty~, ): either a normal completion containing an ArrayBuffer or a throw completion @@ -44909,7 +44905,7 @@

    1. If _allocatingResizableBuffer_ is *true*, then 1. If _byteLength_ > _maxByteLength_, throw a *RangeError* exception. 1. Append [[ArrayBufferMaxByteLength]] to _slots_. - 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_constructor_, *"%ArrayBuffer.prototype%"*, _slots_). + 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_ctor_, *"%ArrayBuffer.prototype%"*, _slots_). 1. Let _block_ be ? CreateByteDataBlock(_byteLength_). 1. Set _obj_.[[ArrayBufferData]] to _block_. 1. Set _obj_.[[ArrayBufferByteLength]] to _byteLength_. @@ -45017,21 +45013,21 @@

    CloneArrayBuffer ( - _srcBuffer_: an ArrayBuffer or a SharedArrayBuffer, - _srcByteOffset_: a non-negative integer, - _srcLength_: a non-negative integer, + _sourceBuffer_: an ArrayBuffer or a SharedArrayBuffer, + _sourceByteOffset_: a non-negative integer, + _sourceLength_: a non-negative integer, ): either a normal completion containing an ArrayBuffer or a throw completion

    description
    -
    It creates a new ArrayBuffer whose data is a copy of _srcBuffer_'s data over the range starting at _srcByteOffset_ and continuing for _srcLength_ bytes.
    +
    It creates a new ArrayBuffer whose data is a copy of _sourceBuffer_'s data over the range starting at _sourceByteOffset_ and continuing for _sourceLength_ bytes.
    - 1. Assert: IsDetachedBuffer(_srcBuffer_) is *false*. - 1. Let _targetBuffer_ be ? AllocateArrayBuffer(%ArrayBuffer%, _srcLength_). - 1. Let _srcBlock_ be _srcBuffer_.[[ArrayBufferData]]. + 1. Assert: IsDetachedBuffer(_sourceBuffer_) is *false*. + 1. Let _targetBuffer_ be ? AllocateArrayBuffer(%ArrayBuffer%, _sourceLength_). + 1. Let _sourceBlock_ be _sourceBuffer_.[[ArrayBufferData]]. 1. Let _targetBlock_ be _targetBuffer_.[[ArrayBufferData]]. - 1. Perform CopyDataBlockBytes(_targetBlock_, 0, _srcBlock_, _srcByteOffset_, _srcLength_). + 1. Perform CopyDataBlockBytes(_targetBlock_, 0, _sourceBlock_, _sourceByteOffset_, _sourceLength_). 1. Return _targetBuffer_.
    @@ -45504,30 +45500,30 @@

    ArrayBuffer.prototype.slice ( _start_, _end_ )

    1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_obj_) is *true*, throw a *TypeError* exception. 1. If IsDetachedBuffer(_obj_) is *true*, throw a *TypeError* exception. - 1. Let _len_ be _obj_.[[ArrayBufferByteLength]]. + 1. Let _length_ be _obj_.[[ArrayBufferByteLength]]. 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). - 1. Else, let _first_ be min(_relativeStart_, _len_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _first_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _first_ be min(_relativeStart_, _length_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _length_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_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. Let _newLen_ be max(_final_ - _first_, 0). + 1. Else if _relativeEnd_ < 0, let _final_ be max(_length_ + _relativeEnd_, 0). + 1. Else, let _final_ be min(_relativeEnd_, _length_). + 1. Let _newLength_ be max(_final_ - _first_, 0). 1. Let _ctor_ be ? SpeciesConstructor(_obj_, %ArrayBuffer%). - 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLen_) »). + 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLength_) »). 1. Perform ? RequireInternalSlot(_new_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_new_) is *true*, throw a *TypeError* exception. 1. If IsDetachedBuffer(_new_) is *true*, throw a *TypeError* exception. 1. If SameValue(_new_, _obj_) is *true*, throw a *TypeError* exception. - 1. If _new_.[[ArrayBufferByteLength]] < _newLen_, throw a *TypeError* exception. + 1. If _new_.[[ArrayBufferByteLength]] < _newLength_, throw a *TypeError* exception. 1. NOTE: Side-effects of the above steps may have detached or resized _obj_. 1. If IsDetachedBuffer(_obj_) is *true*, throw a *TypeError* exception. 1. Let _fromBuf_ be _obj_.[[ArrayBufferData]]. 1. Let _toBuf_ be _new_.[[ArrayBufferData]]. - 1. Let _currentLen_ be _obj_.[[ArrayBufferByteLength]]. - 1. If _first_ < _currentLen_, then - 1. Let _count_ be min(_newLen_, _currentLen_ - _first_). + 1. Let _currentLength_ be _obj_.[[ArrayBufferByteLength]]. + 1. If _first_ < _currentLength_, then + 1. Let _count_ be min(_newLength_, _currentLength_ - _first_). 1. Perform CopyDataBlockBytes(_toBuf_, 0, _fromBuf_, _first_, _count_). 1. Return _new_.
    @@ -45599,7 +45595,7 @@

    Abstract Operations for SharedArrayBuffer Objects

    AllocateSharedArrayBuffer ( - _constructor_: a constructor, + _ctor_: a constructor, _byteLength_: a non-negative integer, optional _maxByteLength_: a non-negative integer or ~empty~, ): either a normal completion containing a SharedArrayBuffer or a throw completion @@ -45616,7 +45612,7 @@

    1. Append [[ArrayBufferByteLengthData]] and [[ArrayBufferMaxByteLength]] to _slots_. 1. Else, 1. Append [[ArrayBufferByteLength]] to _slots_. - 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_constructor_, *"%SharedArrayBuffer.prototype%"*, _slots_). + 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_ctor_, *"%SharedArrayBuffer.prototype%"*, _slots_). 1. If _allocatingGrowableBuffer_ is *true*, let _allocLength_ be _maxByteLength_; else let _allocLength_ be _byteLength_. 1. Let _block_ be ? CreateSharedByteDataBlock(_allocLength_). 1. Set _obj_.[[ArrayBufferData]] to _block_. @@ -45837,25 +45833,25 @@

    SharedArrayBuffer.prototype.slice ( _start_, _end_ )

    1. Let _obj_ be the *this* value. 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_obj_) is *false*, throw a *TypeError* exception. - 1. Let _len_ be ArrayBufferByteLength(_obj_, ~seq-cst~). + 1. Let _length_ be ArrayBufferByteLength(_obj_, ~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). - 1. Else, let _first_ be min(_relativeStart_, _len_). - 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). + 1. Else if _relativeStart_ < 0, let _first_ be max(_length_ + _relativeStart_, 0). + 1. Else, let _first_ be min(_relativeStart_, _length_). + 1. If _end_ is *undefined*, let _relativeEnd_ be _length_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_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. Let _newLen_ be max(_final_ - _first_, 0). + 1. Else if _relativeEnd_ < 0, let _final_ be max(_length_ + _relativeEnd_, 0). + 1. Else, let _final_ be min(_relativeEnd_, _length_). + 1. Let _newLength_ be max(_final_ - _first_, 0). 1. Let _ctor_ be ? SpeciesConstructor(_obj_, %SharedArrayBuffer%). - 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLen_) »). + 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLength_) »). 1. Perform ? RequireInternalSlot(_new_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_new_) is *false*, throw a *TypeError* exception. 1. If _new_.[[ArrayBufferData]] is _obj_.[[ArrayBufferData]], throw a *TypeError* exception. - 1. If ArrayBufferByteLength(_new_, ~seq-cst~) < _newLen_, throw a *TypeError* exception. + 1. If ArrayBufferByteLength(_new_, ~seq-cst~) < _newLength_, throw a *TypeError* exception. 1. Let _fromBuf_ be _obj_.[[ArrayBufferData]]. 1. Let _toBuf_ be _new_.[[ArrayBufferData]]. - 1. Perform CopyDataBlockBytes(_toBuf_, 0, _fromBuf_, _first_, _newLen_). + 1. Perform CopyDataBlockBytes(_toBuf_, 0, _fromBuf_, _first_, _newLength_). 1. Return _new_.
    @@ -46061,8 +46057,8 @@

    1. Perform ? RequireInternalSlot(_view_, [[DataView]]). 1. Assert: _view_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _getIndex_ be ? ToIndex(_requestIndex_). - 1. If IsBigIntElementType(_type_) is *true*, let _numberValue_ be ? ToBigInt(_value_). - 1. Else, let _numberValue_ be ? ToNumber(_value_). + 1. If IsBigIntElementType(_type_) is *true*, let _number_ be ? ToBigInt(_value_). + 1. Else, let _number_ be ? ToNumber(_value_). 1. Set _isLittleEndian_ to ToBoolean(_isLittleEndian_). 1. Let _viewOffset_ be _view_.[[ByteOffset]]. 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_view_, ~unordered~). @@ -46072,7 +46068,7 @@

    1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. 1. If _getIndex_ + _elementSize_ > _viewSize_, throw a *RangeError* exception. 1. Let _bufferIndex_ be _getIndex_ + _viewOffset_. - 1. Perform SetValueInBuffer(_view_.[[ViewedArrayBuffer]], _bufferIndex_, _type_, _numberValue_, *false*, ~unordered~, _isLittleEndian_). + 1. Perform SetValueInBuffer(_view_.[[ViewedArrayBuffer]], _bufferIndex_, _type_, _number_, *false*, ~unordered~, _isLittleEndian_). 1. Return *undefined*. @@ -46557,19 +46553,19 @@

    Abstract Operations for Atomics

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

    - 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(_ta_, ~unordered~). + 1. NOTE: Bounds checking is not a synchronizing operation when _ta_'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. If _ta_.[[TypedArrayName]] is neither *"Int32Array"* nor *"BigInt64Array"*, throw a *TypeError* exception. 1. Else, - 1. Let _type_ be TypedArrayElementType(_typedArray_). + 1. Let _type_ be TypedArrayElementType(_ta_). 1. If IsUnclampedIntegerElementType(_type_) is *false* and IsBigIntElementType(_type_) is *false*, throw a *TypeError* exception. 1. Return _taRecord_. @@ -46589,9 +46585,9 @@

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

    ValidateAtomicAccessOnIntegerTypedArray ( - _typedArray_: an ECMAScript language value, + _ta_: an ECMAScript language value, _requestIndex_: an ECMAScript language value, ): either a normal completion containing an integer or a throw completion

    - 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, *false*). + 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_ta_, *false*). 1. Return ? ValidateAtomicAccess(_taRecord_, _requestIndex_).
    @@ -46614,19 +46610,19 @@

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

    description
    -
    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.
    +
    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 _ta_'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. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_ta_, ~unordered~). + 1. NOTE: Bounds checking is not a synchronizing operation when _ta_'s backing buffer is a growable SharedArrayBuffer. 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. - 1. Assert: _byteIndexInBuffer_ ≥ _typedArray_.[[ByteOffset]]. + 1. Assert: _byteIndexInBuffer_ ≥ _ta_.[[ByteOffset]]. 1. If _byteIndexInBuffer_ ≥ _taRecord_.[[CachedBufferByteLength]], throw a *RangeError* exception. 1. Return ~unused~. @@ -46737,8 +46733,8 @@

    1. Assert: The surrounding agent is in the critical section for _waiterList_. - 1. Let _len_ be the number of elements in _waiterList_.[[Waiters]]. - 1. Set _count_ to min(_count_, _len_). + 1. Let _length_ be the number of elements in _waiterList_.[[Waiters]]. + 1. Set _count_ to min(_count_, _length_). 1. Let _waiters_ be a List whose elements are the first _count_ elements of _waiterList_.[[Waiters]]. 1. Remove the first _count_ elements of _waiterList_.[[Waiters]]. 1. Return _waiters_. @@ -46819,7 +46815,7 @@

    DoWait ( _mode_: ~sync~ or ~async~, - _typedArray_: an ECMAScript language value, + _ta_: an ECMAScript language value, _index_: an ECMAScript language value, _value_: an ECMAScript language value, _timeout_: an ECMAScript language value, @@ -46828,11 +46824,11 @@

    - 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, *true*). + 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_ta_, *true*). 1. Let _buffer_ be _taRecord_.[[Object]].[[ViewedArrayBuffer]]. 1. If IsSharedArrayBuffer(_buffer_) is *false*, throw a *TypeError* exception. 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccess(_taRecord_, _index_). - 1. Let _arrayTypeName_ be _typedArray_.[[TypedArrayName]]. + 1. Let _arrayTypeName_ be _ta_.[[TypedArrayName]]. 1. If _arrayTypeName_ is *"BigInt64Array"*, let _expected_ be ? ToBigInt64(_value_). 1. Else, let _expected_ be ? ToInt32(_value_). 1. Let _timeoutNumber_ be ? ToNumber(_timeout_). @@ -46844,25 +46840,25 @@

    1. Let _waiterList_ be GetWaiterList(_block_, _byteIndexInBuffer_). 1. If _mode_ is ~sync~, then 1. Let _promiseCapability_ be ~blocking~. - 1. Let _resultObject_ be *undefined*. + 1. Let _resultObj_ be *undefined*. 1. Else, 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _resultObject_ be OrdinaryObjectCreate(%Object.prototype%). + 1. Let _resultObj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform EnterCriticalSection(_waiterList_). - 1. Let _elementType_ be TypedArrayElementType(_typedArray_). + 1. Let _elementType_ be TypedArrayElementType(_ta_). 1. Let _witness_ be GetValueFromBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, *true*, ~seq-cst~). 1. If _expected_ ≠ _witness_, then 1. Perform LeaveCriticalSection(_waiterList_). 1. If _mode_ is ~sync~, return *"not-equal"*. - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"async"*, *false*). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"value"*, *"not-equal"*). - 1. Return _resultObject_. + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"async"*, *false*). + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"value"*, *"not-equal"*). + 1. Return _resultObj_. 1. If _realTimeout_ = 0 and _mode_ is ~async~, then 1. NOTE: There is no special handling of synchronous immediate timeouts. Asynchronous immediate timeouts have special handling in order to fail fast and avoid unnecessary Promise jobs. 1. Perform LeaveCriticalSection(_waiterList_). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"async"*, *false*). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"value"*, *"timed-out"*). - 1. Return _resultObject_. + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"async"*, *false*). + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"value"*, *"timed-out"*). + 1. Return _resultObj_. 1. Let _thisAgent_ be AgentSignifier(). 1. Let _now_ be the time value (UTC) identifying the current time. 1. Let _additionalTimeout_ be an implementation-defined non-negative mathematical value. @@ -46876,9 +46872,9 @@

    1. Perform EnqueueAtomicsWaitAsyncTimeoutJob(_waiterList_, _waiterRecord_). 1. Perform LeaveCriticalSection(_waiterList_). 1. If _mode_ is ~sync~, return _waiterRecord_.[[Result]]. - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"async"*, *true*). - 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"value"*, _promiseCapability_.[[Promise]]). - 1. Return _resultObject_. + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"async"*, *true*). + 1. Perform ! CreateDataPropertyOrThrow(_resultObj_, *"value"*, _promiseCapability_.[[Promise]]). + 1. Return _resultObj_.

    _additionalTimeout_ allows implementations to pad timeouts as necessary, such as for reducing power consumption or coarsening timer resolution to mitigate timing attacks. This value may differ from call to call of DoWait.

    @@ -46946,7 +46942,7 @@

    AtomicReadModifyWrite ( - _typedArray_: an ECMAScript language value, + _ta_: an ECMAScript language value, _index_: an ECMAScript language value, _value_: an ECMAScript language value, _op_: a read-modify-write modification function, @@ -46957,12 +46953,12 @@

    _op_ takes two List of byte values arguments and returns a List of byte values. This operation atomically loads a value, combines it with another value, and stores the combination. It returns the loaded value.
    - 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). - 1. If _typedArray_.[[ContentType]] is ~bigint~, let _coerced_ be ? ToBigInt(_value_). + 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_ta_, _index_). + 1. If _ta_.[[ContentType]] is ~bigint~, let _coerced_ be ? ToBigInt(_value_). 1. Else, let _coerced_ be 𝔽(? ToIntegerOrInfinity(_value_)). - 1. Perform ? RevalidateAtomicAccess(_typedArray_, _byteIndexInBuffer_). - 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. - 1. Let _elementType_ be TypedArrayElementType(_typedArray_). + 1. Perform ? RevalidateAtomicAccess(_ta_, _byteIndexInBuffer_). + 1. Let _buffer_ be _ta_.[[ViewedArrayBuffer]]. + 1. Let _elementType_ be TypedArrayElementType(_ta_). 1. Return GetModifySetValueInBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, _coerced_, _op_). @@ -47020,11 +47016,11 @@

    -

    Atomics.add ( _typedArray_, _index_, _value_ )

    +

    Atomics.add ( _ta_, _index_, _value_ )

    This function performs the following steps when called:

    - 1. Let _add_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _typedArray_ and performs the following steps atomically when called: - 1. Let _type_ be TypedArrayElementType(_typedArray_). + 1. Let _add_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _ta_ and performs the following steps atomically when called: + 1. Let _type_ be TypedArrayElementType(_ta_). 1. Let _agentRecord_ be the Agent Record of the surrounding agent. 1. Let _isLittleEndian_ be _agentRecord_.[[LittleEndian]]. 1. Let _x_ be RawBytesToNumeric(_type_, _xBytes_, _isLittleEndian_). @@ -47037,36 +47033,36 @@

    Atomics.add ( _typedArray_, _index_, _value_ )

    1. Let _sumBytes_ be NumericToRawBytes(_type_, _sum_, _isLittleEndian_). 1. Assert: _sumBytes_, _xBytes_, and _yBytes_ have the same number of elements. 1. Return _sumBytes_. - 1. Return ? AtomicReadModifyWrite(_typedArray_, _index_, _value_, _add_). + 1. Return ? AtomicReadModifyWrite(_ta_, _index_, _value_, _add_).
    -

    Atomics.and ( _typedArray_, _index_, _value_ )

    +

    Atomics.and ( _ta_, _index_, _value_ )

    This function performs the following steps when called:

    1. Let _and_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures nothing and performs the following steps atomically when called: 1. Return ByteListBitwiseOp(`&`, _xBytes_, _yBytes_). - 1. Return ? AtomicReadModifyWrite(_typedArray_, _index_, _value_, _and_). + 1. Return ? AtomicReadModifyWrite(_ta_, _index_, _value_, _and_).
    -

    Atomics.compareExchange ( _typedArray_, _index_, _expectedValue_, _replacementValue_ )

    +

    Atomics.compareExchange ( _ta_, _index_, _expectedValue_, _replacementValue_ )

    This function performs the following steps when called:

    - 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). - 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. + 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_ta_, _index_). + 1. Let _buffer_ be _ta_.[[ViewedArrayBuffer]]. 1. Let _block_ be _buffer_.[[ArrayBufferData]]. - 1. If _typedArray_.[[ContentType]] is ~bigint~, then + 1. If _ta_.[[ContentType]] is ~bigint~, then 1. Let _expected_ be ? ToBigInt(_expectedValue_). 1. Let _replacement_ be ? ToBigInt(_replacementValue_). 1. Else, 1. Let _expected_ be 𝔽(? ToIntegerOrInfinity(_expectedValue_)). 1. Let _replacement_ be 𝔽(? ToIntegerOrInfinity(_replacementValue_)). - 1. Perform ? RevalidateAtomicAccess(_typedArray_, _byteIndexInBuffer_). - 1. Let _elementType_ be TypedArrayElementType(_typedArray_). - 1. Let _elementSize_ be TypedArrayElementSize(_typedArray_). + 1. Perform ? RevalidateAtomicAccess(_ta_, _byteIndexInBuffer_). + 1. Let _elementType_ be TypedArrayElementType(_ta_). + 1. Let _elementSize_ be TypedArrayElementSize(_ta_). 1. Let _agentRecord_ be the Agent Record of the surrounding agent. 1. Let _isLittleEndian_ be _agentRecord_.[[LittleEndian]]. 1. Let _expectedBytes_ be NumericToRawBytes(_elementType_, _expected_, _isLittleEndian_). @@ -47082,12 +47078,12 @@

    Atomics.compareExchange ( _typedArray_, _index_, _expectedValue_, _replaceme -

    Atomics.exchange ( _typedArray_, _index_, _value_ )

    +

    Atomics.exchange ( _ta_, _index_, _value_ )

    This function performs the following steps when called:

    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. Return ? AtomicReadModifyWrite(_typedArray_, _index_, _value_, _second_). + 1. Return ? AtomicReadModifyWrite(_ta_, _index_, _value_, _second_).
    @@ -47111,48 +47107,48 @@

    Atomics.isLockFree ( _size_ )

    -

    Atomics.load ( _typedArray_, _index_ )

    +

    Atomics.load ( _ta_, _index_ )

    This function performs the following steps when called:

    - 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). - 1. Perform ? RevalidateAtomicAccess(_typedArray_, _byteIndexInBuffer_). - 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. - 1. Let _elementType_ be TypedArrayElementType(_typedArray_). + 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_ta_, _index_). + 1. Perform ? RevalidateAtomicAccess(_ta_, _byteIndexInBuffer_). + 1. Let _buffer_ be _ta_.[[ViewedArrayBuffer]]. + 1. Let _elementType_ be TypedArrayElementType(_ta_). 1. Return GetValueFromBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, *true*, ~seq-cst~).
    -

    Atomics.or ( _typedArray_, _index_, _value_ )

    +

    Atomics.or ( _ta_, _index_, _value_ )

    This function performs the following steps when called:

    1. Let _or_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures nothing and performs the following steps atomically when called: 1. Return ByteListBitwiseOp(`|`, _xBytes_, _yBytes_). - 1. Return ? AtomicReadModifyWrite(_typedArray_, _index_, _value_, _or_). + 1. Return ? AtomicReadModifyWrite(_ta_, _index_, _value_, _or_).
    -

    Atomics.store ( _typedArray_, _index_, _value_ )

    +

    Atomics.store ( _ta_, _index_, _value_ )

    This function performs the following steps when called:

    - 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). - 1. If _typedArray_.[[ContentType]] is ~bigint~, let _coerced_ be ? ToBigInt(_value_). + 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_ta_, _index_). + 1. If _ta_.[[ContentType]] is ~bigint~, let _coerced_ be ? ToBigInt(_value_). 1. Else, let _coerced_ be 𝔽(? ToIntegerOrInfinity(_value_)). - 1. Perform ? RevalidateAtomicAccess(_typedArray_, _byteIndexInBuffer_). - 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. - 1. Let _elementType_ be TypedArrayElementType(_typedArray_). + 1. Perform ? RevalidateAtomicAccess(_ta_, _byteIndexInBuffer_). + 1. Let _buffer_ be _ta_.[[ViewedArrayBuffer]]. + 1. Let _elementType_ be TypedArrayElementType(_ta_). 1. Perform SetValueInBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, _coerced_, *true*, ~seq-cst~). 1. Return _coerced_.
    -

    Atomics.sub ( _typedArray_, _index_, _value_ )

    +

    Atomics.sub ( _ta_, _index_, _value_ )

    This function performs the following steps when called:

    - 1. Let _subtract_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _typedArray_ and performs the following steps atomically when called: - 1. Let _type_ be TypedArrayElementType(_typedArray_). + 1. Let _subtract_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _ta_ and performs the following steps atomically when called: + 1. Let _type_ be TypedArrayElementType(_ta_). 1. Let _agentRecord_ be the Agent Record of the surrounding agent. 1. Let _isLittleEndian_ be _agentRecord_.[[LittleEndian]]. 1. Let _x_ be RawBytesToNumeric(_type_, _xBytes_, _isLittleEndian_). @@ -47165,41 +47161,41 @@

    Atomics.sub ( _typedArray_, _index_, _value_ )

    1. Let _differenceBytes_ be NumericToRawBytes(_type_, _difference_, _isLittleEndian_). 1. Assert: _differenceBytes_, _xBytes_, and _yBytes_ have the same number of elements. 1. Return _differenceBytes_. - 1. Return ? AtomicReadModifyWrite(_typedArray_, _index_, _value_, _subtract_). + 1. Return ? AtomicReadModifyWrite(_ta_, _index_, _value_, _subtract_).
    -

    Atomics.wait ( _typedArray_, _index_, _value_, _timeout_ )

    +

    Atomics.wait ( _ta_, _index_, _value_, _timeout_ )

    This function puts the surrounding agent in a wait queue and suspends it until notified or until the wait times out, returning a String differentiating those cases.

    It performs the following steps when called:

    - 1. Return ? DoWait(~sync~, _typedArray_, _index_, _value_, _timeout_). + 1. Return ? DoWait(~sync~, _ta_, _index_, _value_, _timeout_).
    -

    Atomics.waitAsync ( _typedArray_, _index_, _value_, _timeout_ )

    +

    Atomics.waitAsync ( _ta_, _index_, _value_, _timeout_ )

    This function returns a Promise that is resolved when the calling agent is notified or the timeout is reached.

    It performs the following steps when called:

    - 1. Return ? DoWait(~async~, _typedArray_, _index_, _value_, _timeout_). + 1. Return ? DoWait(~async~, _ta_, _index_, _value_, _timeout_).
    -

    Atomics.notify ( _typedArray_, _index_, _count_ )

    +

    Atomics.notify ( _ta_, _index_, _count_ )

    This function notifies some agents that are sleeping in the wait queue.

    It performs the following steps when called:

    - 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, *true*). + 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_ta_, *true*). 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccess(_taRecord_, _index_). 1. If _count_ is *undefined*, then 1. Set _count_ to +∞. 1. Else, 1. Let _intCount_ be ? ToIntegerOrInfinity(_count_). 1. Set _count_ to max(_intCount_, 0). - 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. + 1. Let _buffer_ be _ta_.[[ViewedArrayBuffer]]. 1. Let _block_ be _buffer_.[[ArrayBufferData]]. 1. If IsSharedArrayBuffer(_buffer_) is *false*, return *+0*𝔽. 1. Let _waiterList_ be GetWaiterList(_block_, _byteIndexInBuffer_). @@ -47208,18 +47204,18 @@

    Atomics.notify ( _typedArray_, _index_, _count_ )

    1. For each element _waiterRecord_ of _waiters_, do 1. Perform NotifyWaiter(_waiterList_, _waiterRecord_). 1. Perform LeaveCriticalSection(_waiterList_). - 1. Let _n_ be the number of elements in _waiters_. - 1. Return 𝔽(_n_). + 1. Let _waitersCount_ be the number of elements in _waiters_. + 1. Return 𝔽(_waitersCount_).
    -

    Atomics.xor ( _typedArray_, _index_, _value_ )

    +

    Atomics.xor ( _ta_, _index_, _value_ )

    This function performs the following steps when called:

    1. Let _xor_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures nothing and performs the following steps atomically when called: 1. Return ByteListBitwiseOp(`^`, _xBytes_, _yBytes_). - 1. Return ? AtomicReadModifyWrite(_typedArray_, _index_, _value_, _xor_). + 1. Return ? AtomicReadModifyWrite(_ta_, _index_, _value_, _xor_).
    @@ -47344,50 +47340,50 @@

    CreateJSONParseRecord ( _parseNode_: a Parse Node, _key_: a property name, - _val_: an ECMAScript language value, + _value_: an ECMAScript language value, ): a JSON Parse Record

    description
    -
    It recursively combines a _parseNode_ parsed from JSON text and the _val_ produced by its evaluation.
    +
    It recursively combines a _parseNode_ parsed from JSON text and the _value_ produced by its evaluation.
    - 1. Let _typedValNode_ be ShallowestContainedJSONValue(_parseNode_). - 1. Assert: _typedValNode_ is not ~empty~. + 1. Let _typedValueNode_ be ShallowestContainedJSONValue(_parseNode_). + 1. Assert: _typedValueNode_ is not ~empty~. 1. Let _elements_ be a new empty List. 1. Let _entries_ be a new empty List. - 1. If _val_ is an Object, then - 1. Let _isArray_ be ! IsArray(_val_). + 1. If _value_ is an Object, then + 1. Let _isArray_ be ! IsArray(_value_). 1. If _isArray_ is *true*, then - 1. Assert: _typedValNode_ is an |ArrayLiteral| Parse Node. - 1. Let _contentNodes_ be the JSONArrayLiteralContentNodes of _typedValNode_. - 1. Let _len_ be the number of elements in _contentNodes_. - 1. Let _valLen_ be ! LengthOfArrayLike(_val_). - 1. Assert: _valLen_ is _len_. + 1. Assert: _typedValueNode_ is an |ArrayLiteral| Parse Node. + 1. Let _contentNodes_ be the JSONArrayLiteralContentNodes of _typedValueNode_. + 1. Let _length_ be the number of elements in _contentNodes_. + 1. Let _valueLength_ be ! LengthOfArrayLike(_value_). + 1. Assert: _valueLength_ is _length_. 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, - 1. Let _propName_ be ! ToString(𝔽(_index_)). - 1. Let _elementParseRecord_ be CreateJSONParseRecord(_contentNodes_[_index_], _propName_, ! Get(_val_, _propName_)). + 1. Repeat, while _index_ < _length_, + 1. Let _propertyName_ be ! ToString(𝔽(_index_)). + 1. Let _elementParseRecord_ be CreateJSONParseRecord(_contentNodes_[_index_], _propertyName_, ! Get(_value_, _propertyName_)). 1. Append _elementParseRecord_ to _elements_. 1. Set _index_ to _index_ + 1. 1. Else, - 1. Assert: _typedValNode_ is an |ObjectLiteral| Parse Node. - 1. Let _propertyNodes_ be the PropertyDefinitionNodes of _typedValNode_. - 1. NOTE: Because _val_ was produced from JSON text and has not been modified, all of its property keys are Strings and will be exhaustively enumerated. - 1. Let _keys_ be ! EnumerableOwnProperties(_val_, ~key~). + 1. Assert: _typedValueNode_ is an |ObjectLiteral| Parse Node. + 1. Let _propertyNodes_ be the PropertyDefinitionNodes of _typedValueNode_. + 1. NOTE: Because _value_ was produced from JSON text and has not been modified, all of its property keys are Strings and will be exhaustively enumerated. + 1. Let _keys_ be ! EnumerableOwnProperties(_value_, ~key~). 1. For each String _propertyKey_ of _keys_, do 1. NOTE: In the case of JSON text specifying multiple name/value pairs with the same name for a single object (such as {"a":"lost","a":"kept"}), the value for the corresponding property of the resulting ECMAScript object is specified by the last pair with that name. 1. Let _propertyDefinition_ be ~empty~. 1. For each Parse Node _propertyNode_ of _propertyNodes_, do - 1. Let _propName_ be the PropName of _propertyNode_. - 1. If _propName_ is _propertyKey_, set _propertyDefinition_ to _propertyNode_. + 1. Let _propertyName_ be the PropName of _propertyNode_. + 1. If _propertyName_ is _propertyKey_, set _propertyDefinition_ to _propertyNode_. 1. Assert: _propertyDefinition_ is PropertyDefinition : PropertyName `:` AssignmentExpression. 1. Let _propertyValueNode_ be the |AssignmentExpression| of _propertyDefinition_. - 1. Let _entryParseRecord_ be CreateJSONParseRecord(_propertyValueNode_, _propertyKey_, ! Get(_val_, _propertyKey_)). + 1. Let _entryParseRecord_ be CreateJSONParseRecord(_propertyValueNode_, _propertyKey_, ! Get(_value_, _propertyKey_)). 1. Append _entryParseRecord_ to _entries_. 1. Else, - 1. Assert: _typedValNode_ is neither an |ArrayLiteral| Parse Node nor an |ObjectLiteral| Parse Node. - 1. Return the JSON Parse Record { [[ParseNode]]: _typedValNode_, [[Key]]: _key_, [[Value]]: _val_, [[Elements]]: _elements_, [[Entries]]: _entries_ }. + 1. Assert: _typedValueNode_ is neither an |ArrayLiteral| Parse Node nor an |ObjectLiteral| Parse Node. + 1. Return the JSON Parse Record { [[ParseNode]]: _typedValueNode_, [[Key]]: _key_, [[Value]]: _value_, [[Elements]]: _elements_, [[Entries]]: _entries_ }.
    @@ -47407,10 +47403,10 @@

    It performs the following steps when called:

    - 1. Let _val_ be ? Get(_holder_, _name_). + 1. Let _value_ be ? Get(_holder_, _name_). 1. Let _context_ be OrdinaryObjectCreate(%Object.prototype%). - 1. If _parseRecord_ is a JSON Parse Record and SameValue(_parseRecord_.[[Value]], _val_) is *true*, then - 1. If _val_ is not an Object, then + 1. If _parseRecord_ is a JSON Parse Record and SameValue(_parseRecord_.[[Value]], _value_) is *true*, then + 1. If _value_ is not an Object, then 1. Let _parseNode_ be _parseRecord_.[[ParseNode]]. 1. Assert: _parseNode_ is neither an |ArrayLiteral| Parse Node nor an |ObjectLiteral| Parse Node. 1. Let _sourceText_ be the source text matched by _parseNode_. @@ -47420,31 +47416,31 @@

    1. Else, 1. Let _elementRecords_ be a new empty List. 1. Let _entryRecords_ be a new empty List. - 1. If _val_ is an Object, then - 1. Let _isArray_ be ? IsArray(_val_). + 1. If _value_ is an Object, then + 1. Let _isArray_ be ? IsArray(_value_). 1. If _isArray_ is *true*, then - 1. Let _elementRecordsLen_ be the number of elements in _elementRecords_. - 1. Let _len_ be ? LengthOfArrayLike(_val_). + 1. Let _elementRecordsLength_ be the number of elements in _elementRecords_. + 1. Let _length_ be ? LengthOfArrayLike(_value_). 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, + 1. Repeat, while _index_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_index_)). - 1. If _index_ < _elementRecordsLen_, let _elementRecord_ be _elementRecords_[_index_]; else let _elementRecord_ be ~empty~. - 1. Let _newElement_ be ? InternalizeJSONProperty(_val_, _propertyKey_, _reviver_, _elementRecord_). + 1. If _index_ < _elementRecordsLength_, let _elementRecord_ be _elementRecords_[_index_]; else let _elementRecord_ be ~empty~. + 1. Let _newElement_ be ? InternalizeJSONProperty(_value_, _propertyKey_, _reviver_, _elementRecord_). 1. If _newElement_ is *undefined*, then - 1. Perform ? _val_.[[Delete]](_propertyKey_). + 1. Perform ? _value_.[[Delete]](_propertyKey_). 1. Else, - 1. Perform ? CreateDataProperty(_val_, _propertyKey_, _newElement_). + 1. Perform ? CreateDataProperty(_value_, _propertyKey_, _newElement_). 1. Set _index_ to _index_ + 1. 1. Else, - 1. Let _keys_ be ? EnumerableOwnProperties(_val_, ~key~). + 1. Let _keys_ be ? EnumerableOwnProperties(_value_, ~key~). 1. For each String _propertyKey_ of _keys_, do 1. If there exists an element _entry_ of _entryRecords_ such that _entry_.[[Key]] is _propertyKey_, let _entryRecord_ be _entry_; else let _entryRecord_ be ~empty~. - 1. Let _newElement_ be ? InternalizeJSONProperty(_val_, _propertyKey_, _reviver_, _entryRecord_). + 1. Let _newElement_ be ? InternalizeJSONProperty(_value_, _propertyKey_, _reviver_, _entryRecord_). 1. If _newElement_ is *undefined*, then - 1. Perform ? _val_.[[Delete]](_propertyKey_). + 1. Perform ? _value_.[[Delete]](_propertyKey_). 1. Else, - 1. Perform ? CreateDataProperty(_val_, _propertyKey_, _newElement_). - 1. Return ? Call(_reviver_, _holder_, « _name_, _val_, _context_ »). + 1. Perform ? CreateDataProperty(_value_, _propertyKey_, _newElement_). + 1. Return ? Call(_reviver_, _holder_, « _name_, _value_, _context_ »). @@ -47462,7 +47458,7 @@

    1. Let _activeFunc_ be the active function object. 1. Assert: _activeFunc_ is a `JSON.parse` built-in function object (see JSON.parse). 1. Let _types_ be « |NullLiteral|, |BooleanLiteral|, |NumericLiteral|, |StringLiteral|, |ArrayLiteral|, |ObjectLiteral|, |UnaryExpression| ». - 1. Let _unaryExpression_ be ~empty~. + 1. Let _unaryExpr_ be ~empty~. 1. Let _queue_ be « _root_ ». 1. Repeat, while _queue_ is not empty, 1. Let _candidate_ be the first element of _queue_. @@ -47472,10 +47468,10 @@

    1. If _candidate_ is an instance of _type_, then 1. NOTE: In the JSON grammar, a number token may represent a negative value. In ECMAScript, negation is represented as a unary operation in which a |UnaryExpression| parses to a `-` followed by a derived |UnaryExpression|. 1. If _type_ is |UnaryExpression|, then - 1. If the parent of _candidate_ is not a |UnaryExpression| Parse Node, set _unaryExpression_ to _candidate_. + 1. If the parent of _candidate_ is not a |UnaryExpression| Parse Node, set _unaryExpr_ to _candidate_. 1. Else if _type_ is |NumericLiteral|, then - 1. Assert: _candidate_ is contained within _unaryExpression_. - 1. Return _unaryExpression_. + 1. Assert: _candidate_ is contained within _unaryExpr_. + 1. Return _unaryExpr_. 1. Else, 1. Return _candidate_. 1. If _queuedChildren_ is *false*, _candidate_ is an instance of a nonterminal, and _candidate_ Contains _type_ is *true*, then @@ -47553,17 +47549,17 @@

    JSON.stringify ( _value_ [ , _replacer_ [ , _space_ ] ] )

    1. Let _stack_ be a new empty List. 1. Let _indent_ be the empty String. 1. Let _propertyList_ be *undefined*. - 1. Let _replacerFunction_ be *undefined*. + 1. Let _replacerFunc_ be *undefined*. 1. If _replacer_ is an Object, then 1. If IsCallable(_replacer_) is *true*, then - 1. Set _replacerFunction_ to _replacer_. + 1. Set _replacerFunc_ to _replacer_. 1. Else, 1. Let _isArray_ be ? IsArray(_replacer_). 1. If _isArray_ is *true*, then 1. Set _propertyList_ to a new empty List. - 1. Let _len_ be ? LengthOfArrayLike(_replacer_). + 1. Let _length_ be ? LengthOfArrayLike(_replacer_). 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _propertyValue_ be ? Get(_replacer_, _propertyKey_). 1. Let _item_ be *undefined*. @@ -47591,7 +47587,7 @@

    JSON.stringify ( _value_ [ , _replacer_ [ , _space_ ] ] )

    1. Let _gap_ be the empty String. 1. Let _wrapper_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ! CreateDataPropertyOrThrow(_wrapper_, the empty String, _value_). - 1. Let _state_ be the JSON Serialization Record { [[ReplacerFunction]]: _replacerFunction_, [[Stack]]: _stack_, [[Indent]]: _indent_, [[Gap]]: _gap_, [[PropertyList]]: _propertyList_ }. + 1. Let _state_ be the JSON Serialization Record { [[ReplacerFunction]]: _replacerFunc_, [[Stack]]: _stack_, [[Indent]]: _indent_, [[Gap]]: _gap_, [[PropertyList]]: _propertyList_ }. 1. Return ? SerializeJSONProperty(_state_, the empty String, _wrapper_).

    The *"length"* property of this function is *3*𝔽.

    @@ -47734,14 +47730,14 @@

    1. Let _product_ be the String value consisting solely of the code unit 0x0022 (QUOTATION MARK). - 1. For each code point _cp_ of StringToCodePoints(_value_), do - 1. If _cp_ is listed in the “Code Point” column of , then - 1. Set _product_ to the string-concatenation of _product_ and the escape sequence for _cp_ as specified in the “Escape Sequence” column of the corresponding row. - 1. Else if _cp_ has a numeric value less than 0x0020 (SPACE) or _cp_ has the same numeric value as a leading surrogate or trailing surrogate, then - 1. Let _unit_ be the code unit whose numeric value is the numeric value of _cp_. + 1. For each code point _codePoint_ of StringToCodePoints(_value_), do + 1. If _codePoint_ is listed in the “Code Point” column of , then + 1. Set _product_ to the string-concatenation of _product_ and the escape sequence for _codePoint_ as specified in the “Escape Sequence” column of the corresponding row. + 1. Else if _codePoint_ has a numeric value less than 0x0020 (SPACE) or _codePoint_ has the same numeric value as a leading surrogate or trailing surrogate, then + 1. Let _unit_ be the code unit whose numeric value is the numeric value of _codePoint_. 1. Set _product_ to the string-concatenation of _product_ and UnicodeEscape(_unit_). 1. Else, - 1. Set _product_ to the string-concatenation of _product_ and UTF16EncodeCodePoint(_cp_). + 1. Set _product_ to the string-concatenation of _product_ and UTF16EncodeCodePoint(_codePoint_). 1. Set _product_ to the string-concatenation of _product_ and the code unit 0x0022 (QUOTATION MARK). 1. Return _product_. @@ -47844,15 +47840,15 @@

    UnicodeEscape ( - _constructor_: a code unit, + _ctor_: a code unit, ): a String

    description
    -
    It represents _constructor_ as a Unicode escape sequence.
    +
    It represents _ctor_ as a Unicode escape sequence.
    - 1. Let _n_ be the numeric value of _constructor_. + 1. Let _n_ be the numeric value of _ctor_. 1. Assert: _n_ ≤ 0xFFFF. 1. Let _hex_ be the String representation of _n_, formatted as a lowercase hexadecimal number. 1. Return the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), *"u"*, and StringPad(_hex_, 4, *"0"*, ~start~). @@ -47881,13 +47877,13 @@

    1. Let _keys_ be ? EnumerableOwnProperties(_value_, ~key~). 1. Let _partial_ be a new empty List. 1. For each element _propertyKey_ of _keys_, do - 1. Let _strP_ be ? SerializeJSONProperty(_state_, _propertyKey_, _value_). - 1. If _strP_ is not *undefined*, then + 1. Let _stringP_ be ? SerializeJSONProperty(_state_, _propertyKey_, _value_). + 1. If _stringP_ is not *undefined*, then 1. Let _member_ be QuoteJSONString(_propertyKey_). 1. Set _member_ to the string-concatenation of _member_ and *":"*. 1. If _state_.[[Gap]] is not the empty String, then 1. Set _member_ to the string-concatenation of _member_ and the code unit 0x0020 (SPACE). - 1. Set _member_ to the string-concatenation of _member_ and _strP_. + 1. Set _member_ to the string-concatenation of _member_ and _stringP_. 1. Append _member_ to _partial_. 1. If _partial_ is empty, then 1. Let _final_ be *"{}"*. @@ -47922,14 +47918,14 @@

    1. Let _stepBack_ be _state_.[[Indent]]. 1. Set _state_.[[Indent]] to the string-concatenation of _state_.[[Indent]] and _state_.[[Gap]]. 1. Let _partial_ be a new empty List. - 1. Let _len_ be ? LengthOfArrayLike(_value_). + 1. Let _length_ be ? LengthOfArrayLike(_value_). 1. Let _index_ be 0. - 1. Repeat, while _index_ < _len_, - 1. Let _strP_ be ? SerializeJSONProperty(_state_, ! ToString(𝔽(_index_)), _value_). - 1. If _strP_ is *undefined*, then + 1. Repeat, while _index_ < _length_, + 1. Let _stringP_ be ? SerializeJSONProperty(_state_, ! ToString(𝔽(_index_)), _value_). + 1. If _stringP_ is *undefined*, then 1. Append *"null"* to _partial_. 1. Else, - 1. Append _strP_ to _partial_. + 1. Append _stringP_ to _partial_. 1. Set _index_ to _index_ + 1. 1. If _partial_ is empty, then 1. Let _final_ be *"[]"*. @@ -48128,8 +48124,8 @@

    FinalizationRegistry ( _cleanupCallback_ )

    1. If NewTarget is *undefined*, throw a *TypeError* exception. 1. If IsCallable(_cleanupCallback_) is *false*, throw a *TypeError* exception. 1. Let _finalizationRegistry_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%FinalizationRegistry.prototype%"*, « [[Realm]], [[CleanupCallback]], [[Cells]] »). - 1. Let _fn_ be the active function object. - 1. Set _finalizationRegistry_.[[Realm]] to _fn_.[[Realm]]. + 1. Let _func_ be the active function object. + 1. Set _finalizationRegistry_.[[Realm]] to _func_.[[Realm]]. 1. Set _finalizationRegistry_.[[CleanupCallback]] to HostMakeJobCallback(_cleanupCallback_). 1. Set _finalizationRegistry_.[[Cells]] to a new empty List. 1. Return _finalizationRegistry_. @@ -48557,9 +48553,9 @@

    Iterator.concat ( ..._items_ )

    1. Append the Record { [[OpenMethod]]: _method_, [[Iterable]]: _item_ } to _iterables_. 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterables_ and performs the following steps when called: 1. For each Record _iterable_ of _iterables_, do - 1. Let _iter_ be ? Call(_iterable_.[[OpenMethod]], _iterable_.[[Iterable]]). - 1. If _iter_ is not an Object, throw a *TypeError* exception. - 1. Let _iteratorRecord_ be ? GetIteratorDirect(_iter_). + 1. Let _iterator_ be ? Call(_iterable_.[[OpenMethod]], _iterable_.[[Iterable]]). + 1. If _iterator_ is not an Object, throw a *TypeError* exception. + 1. Let _iteratorRecord_ be ? GetIteratorDirect(_iterator_). 1. Let _innerAlive_ be *true*. 1. Repeat, while _innerAlive_ is *true*, 1. Let _innerValue_ be ? IteratorStepValue(_iteratorRecord_). @@ -48676,18 +48672,18 @@

    Iterator.prototype.drop ( _limit_ )

    1. Let _obj_ be the *this* value. 1. If _obj_ is not an Object, throw a *TypeError* exception. 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _obj_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. - 1. Let _numLimit_ be Completion(ToNumber(_limit_)). - 1. IfAbruptCloseIterator(_numLimit_, _iterated_). - 1. If _numLimit_ is *NaN*, then + 1. Let _numberLimit_ be Completion(ToNumber(_limit_)). + 1. IfAbruptCloseIterator(_numberLimit_, _iterated_). + 1. If _numberLimit_ is *NaN*, then 1. Let _error_ be ThrowCompletion(a newly created *RangeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Let _integerLimit_ be ! ToIntegerOrInfinity(_numLimit_). - 1. If _integerLimit_ < 0, then + 1. Let _intLimit_ be ! ToIntegerOrInfinity(_numberLimit_). + 1. If _intLimit_ < 0, then 1. Let _error_ be ThrowCompletion(a newly created *RangeError* object). 1. Return ? IteratorClose(_iterated_, _error_). 1. Set _iterated_ to ? GetIteratorDirect(_obj_). - 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _integerLimit_ and performs the following steps when called: - 1. Let _remaining_ be _integerLimit_. + 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _intLimit_ and performs the following steps when called: + 1. Let _remaining_ be _intLimit_. 1. Repeat, while _remaining_ > 0, 1. If _remaining_ ≠ +∞, then 1. Set _remaining_ to _remaining_ - 1. @@ -48920,18 +48916,18 @@

    Iterator.prototype.take ( _limit_ )

    1. Let _obj_ be the *this* value. 1. If _obj_ is not an Object, throw a *TypeError* exception. 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _obj_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. - 1. Let _numLimit_ be Completion(ToNumber(_limit_)). - 1. IfAbruptCloseIterator(_numLimit_, _iterated_). - 1. If _numLimit_ is *NaN*, then + 1. Let _numberLimit_ be Completion(ToNumber(_limit_)). + 1. IfAbruptCloseIterator(_numberLimit_, _iterated_). + 1. If _numberLimit_ is *NaN*, then 1. Let _error_ be ThrowCompletion(a newly created *RangeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Let _integerLimit_ be ! ToIntegerOrInfinity(_numLimit_). - 1. If _integerLimit_ < 0, then + 1. Let _intLimit_ be ! ToIntegerOrInfinity(_numberLimit_). + 1. If _intLimit_ < 0, then 1. Let _error_ be ThrowCompletion(a newly created *RangeError* object). 1. Return ? IteratorClose(_iterated_, _error_). 1. Set _iterated_ to ? GetIteratorDirect(_obj_). - 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _integerLimit_ and performs the following steps when called: - 1. Let _remaining_ be _integerLimit_. + 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _intLimit_ and performs the following steps when called: + 1. Let _remaining_ be _intLimit_. 1. Repeat, 1. If _remaining_ = 0, then 1. Return ? IteratorClose(_iterated_, ReturnCompletion(*undefined*)). @@ -49422,28 +49418,28 @@

    NewPromiseCapability ( - _constructor_: an ECMAScript language value, + _ctor_: an ECMAScript language value, ): either a normal completion containing a PromiseCapability Record or a throw completion

    description
    -
    It attempts to use _constructor_ as a constructor in the fashion of the built-in Promise constructor to create a promise and extract its `resolve` and `reject` functions. The promise plus the `resolve` and `reject` functions are used to initialize a new PromiseCapability Record.
    +
    It attempts to use _ctor_ as a constructor in the fashion of the built-in Promise constructor to create a promise and extract its `resolve` and `reject` functions. The promise plus the `resolve` and `reject` functions are used to initialize a new PromiseCapability Record.
    - 1. If IsConstructor(_constructor_) is *false*, throw a *TypeError* exception. - 1. NOTE: _constructor_ is assumed to be a constructor function that supports the parameter conventions of the Promise constructor (see ). - 1. Let _resolvingFunctions_ be the Record { [[Resolve]]: *undefined*, [[Reject]]: *undefined* }. - 1. Let _executorClosure_ be a new Abstract Closure with parameters (_resolve_, _reject_) that captures _resolvingFunctions_ and performs the following steps when called: - 1. If _resolvingFunctions_.[[Resolve]] is not *undefined*, throw a *TypeError* exception. - 1. If _resolvingFunctions_.[[Reject]] is not *undefined*, throw a *TypeError* exception. - 1. Set _resolvingFunctions_.[[Resolve]] to _resolve_. - 1. Set _resolvingFunctions_.[[Reject]] to _reject_. + 1. If IsConstructor(_ctor_) is *false*, throw a *TypeError* exception. + 1. NOTE: _ctor_ is assumed to be a constructor function that supports the parameter conventions of the Promise constructor (see ). + 1. Let _resolvingFuncs_ be the Record { [[Resolve]]: *undefined*, [[Reject]]: *undefined* }. + 1. Let _executorClosure_ be a new Abstract Closure with parameters (_resolve_, _reject_) that captures _resolvingFuncs_ and performs the following steps when called: + 1. If _resolvingFuncs_.[[Resolve]] is not *undefined*, throw a *TypeError* exception. + 1. If _resolvingFuncs_.[[Reject]] is not *undefined*, throw a *TypeError* exception. + 1. Set _resolvingFuncs_.[[Resolve]] to _resolve_. + 1. Set _resolvingFuncs_.[[Reject]] to _reject_. 1. Return NormalCompletion(*undefined*). 1. Let _executor_ be CreateBuiltinFunction(_executorClosure_, 2, *""*, « »). - 1. Let _promise_ be ? Construct(_constructor_, « _executor_ »). - 1. If IsCallable(_resolvingFunctions_.[[Resolve]]) is *false*, throw a *TypeError* exception. - 1. If IsCallable(_resolvingFunctions_.[[Reject]]) is *false*, throw a *TypeError* exception. - 1. Return the PromiseCapability Record { [[Promise]]: _promise_, [[Resolve]]: _resolvingFunctions_.[[Resolve]], [[Reject]]: _resolvingFunctions_.[[Reject]] }. + 1. Let _promise_ be ? Construct(_ctor_, « _executor_ »). + 1. If IsCallable(_resolvingFuncs_.[[Resolve]]) is *false*, throw a *TypeError* exception. + 1. If IsCallable(_resolvingFuncs_.[[Reject]]) is *false*, throw a *TypeError* exception. + 1. Return the PromiseCapability Record { [[Promise]]: _promise_, [[Resolve]]: _resolvingFuncs_.[[Resolve]], [[Reject]]: _resolvingFuncs_.[[Reject]] }.

    This abstract operation supports Promise subclassing, as it is generic on any constructor that calls a passed executor function argument in the same way as the Promise constructor. It is used to generalize static methods of the Promise constructor to any subclass.

    @@ -49453,7 +49449,7 @@

    IsPromise ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): a Boolean

    @@ -49461,8 +49457,8 @@

    It checks for the promise brand on an object.

    - 1. If _value_ is not an Object, return *false*. - 1. If _value_ does not have a [[PromiseState]] internal slot, return *false*. + 1. If _arg_ is not an Object, return *false*. + 1. If _arg_ does not have a [[PromiseState]] internal slot, return *false*. 1. Return *true*.
    @@ -49493,7 +49489,7 @@

    TriggerPromiseReactions ( _reactions_: a List of PromiseReaction Records, - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): ~unused~

    @@ -49502,7 +49498,7 @@

    1. For each element _reaction_ of _reactions_, do - 1. Let _job_ be NewPromiseReactionJob(_reaction_, _argument_). + 1. Let _job_ be NewPromiseReactionJob(_reaction_, _arg_). 1. Perform HostEnqueuePromiseJob(_job_.[[Job]], _job_.[[Realm]]). 1. Return ~unused~. @@ -49545,7 +49541,7 @@

    Promise Jobs

    NewPromiseReactionJob ( _reaction_: a PromiseReaction Record, - _argument_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): a Record with fields [[Job]] (a Job Abstract Closure) and [[Realm]] (a Realm Record or *null*)

    @@ -49553,18 +49549,18 @@

    It returns a new Job Abstract Closure that applies the appropriate handler to the incoming value, and uses the handler's return value to resolve or reject the derived promise associated with that handler.

    - 1. Let _job_ be a new Job Abstract Closure with no parameters that captures _reaction_ and _argument_ and performs the following steps when called: + 1. Let _job_ be a new Job Abstract Closure with no parameters that captures _reaction_ and _arg_ and performs the following steps when called: 1. Let _promiseCapability_ be _reaction_.[[Capability]]. 1. Let _type_ be _reaction_.[[Type]]. 1. Let _handler_ be _reaction_.[[Handler]]. 1. If _handler_ is ~empty~, then 1. If _type_ is ~fulfill~, then - 1. Let _handlerResult_ be NormalCompletion(_argument_). + 1. Let _handlerResult_ be NormalCompletion(_arg_). 1. Else, 1. Assert: _type_ is ~reject~. - 1. Let _handlerResult_ be ThrowCompletion(_argument_). + 1. Let _handlerResult_ be ThrowCompletion(_arg_). 1. Else, - 1. Let _handlerResult_ be Completion(HostCallJobCallback(_handler_, *undefined*, « _argument_ »)). + 1. Let _handlerResult_ be Completion(HostCallJobCallback(_handler_, *undefined*, « _arg_ »)). 1. If _promiseCapability_ is *undefined*, then 1. Assert: _handlerResult_ is not an abrupt completion. 1. Return ~empty~. @@ -49594,10 +49590,10 @@

    1. Let _job_ be a new Job Abstract Closure with no parameters that captures _promiseToResolve_, _thenable_, and _then_ and performs the following steps when called: - 1. Let _resolvingFunctions_ be CreateResolvingFunctions(_promiseToResolve_). - 1. Let _thenCallResult_ be Completion(HostCallJobCallback(_then_, _thenable_, « _resolvingFunctions_.[[Resolve]], _resolvingFunctions_.[[Reject]] »)). + 1. Let _resolvingFuncs_ be CreateResolvingFunctions(_promiseToResolve_). + 1. Let _thenCallResult_ be Completion(HostCallJobCallback(_then_, _thenable_, « _resolvingFuncs_.[[Resolve]], _resolvingFuncs_.[[Reject]] »)). 1. If _thenCallResult_ is an abrupt completion, then - 1. Return ? Call(_resolvingFunctions_.[[Reject]], *undefined*, « _thenCallResult_.[[Value]] »). + 1. Return ? Call(_resolvingFuncs_.[[Reject]], *undefined*, « _thenCallResult_.[[Value]] »). 1. Return ! _thenCallResult_. 1. Let _getThenRealmResult_ be Completion(GetFunctionRealm(_then_.[[Callback]])). 1. If _getThenRealmResult_ is a normal completion, let _thenRealm_ be _getThenRealmResult_.[[Value]]. @@ -49634,10 +49630,10 @@

    Promise ( _executor_ )

    1. Set _promise_.[[PromiseFulfillReactions]] to a new empty List. 1. Set _promise_.[[PromiseRejectReactions]] to a new empty List. 1. Set _promise_.[[PromiseIsHandled]] to *false*. - 1. Let _resolvingFunctions_ be CreateResolvingFunctions(_promise_). - 1. Let _completion_ be Completion(Call(_executor_, *undefined*, « _resolvingFunctions_.[[Resolve]], _resolvingFunctions_.[[Reject]] »)). + 1. Let _resolvingFuncs_ be CreateResolvingFunctions(_promise_). + 1. Let _completion_ be Completion(Call(_executor_, *undefined*, « _resolvingFuncs_.[[Resolve]], _resolvingFuncs_.[[Reject]] »)). 1. If _completion_ is an abrupt completion, then - 1. Perform ? Call(_resolvingFunctions_.[[Reject]], *undefined*, « _completion_.[[Value]] »). + 1. Perform ? Call(_resolvingFuncs_.[[Reject]], *undefined*, « _completion_.[[Value]] »). 1. Return _promise_.
    @@ -49661,13 +49657,13 @@

    Properties of the Promise Constructor

    Promise.all ( _iterable_ )

    This function returns a new promise which is fulfilled with an array of fulfillment values for the passed promises, or rejects with the reason of the first passed promise that rejects. It resolves all elements of the passed iterable to promises as it runs this algorithm.

    - 1. Let _constructor_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). + 1. Let _ctor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_ctor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseAll(_iteratorRecord_, _constructor_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseAll(_iteratorRecord_, _ctor_, _promiseCapability_, _promiseResolve_)). 1. If _result_ is an abrupt completion, then 1. If _iteratorRecord_.[[Done]] is *false*, set _result_ to Completion(IteratorClose(_iteratorRecord_, _result_)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). @@ -49680,13 +49676,13 @@

    Promise.all ( _iterable_ )

    GetPromiseResolve ( - _promiseConstructor_: a constructor, + _promiseCtor_: a constructor, ): either a normal completion containing a function object or a throw completion

    - 1. Let _promiseResolve_ be ? Get(_promiseConstructor_, *"resolve"*). + 1. Let _promiseResolve_ be ? Get(_promiseCtor_, *"resolve"*). 1. If IsCallable(_promiseResolve_) is *false*, throw a *TypeError* exception. 1. Return _promiseResolve_. @@ -49696,7 +49692,7 @@

    PerformPromiseAll ( _iteratorRecord_: an Iterator Record, - _constructor_: a constructor, + _ctor_: a constructor, _resultCapability_: a PromiseCapability Record, _promiseResolve_: a function object, ): either a normal completion containing an ECMAScript language value or a throw completion @@ -49717,7 +49713,7 @@

    1. Perform ? Call(_resultCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return _resultCapability_.[[Promise]]. 1. Append *undefined* to _values_. - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _next_ »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _ctor_, « _next_ »). 1. Let _fulfilledSteps_ be a new Abstract Closure with parameters (_value_) that captures _values_, _resultCapability_, and _remainingElementsCount_ and performs the following steps when called: 1. Let _activeFunc_ be the active function object. 1. If _activeFunc_.[[AlreadyCalled]] is *true*, return *undefined*. @@ -49743,13 +49739,13 @@

    Promise.allSettled ( _iterable_ )

    This function returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.

    - 1. Let _constructor_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). + 1. Let _ctor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_ctor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseAllSettled(_iteratorRecord_, _constructor_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseAllSettled(_iteratorRecord_, _ctor_, _promiseCapability_, _promiseResolve_)). 1. If _result_ is an abrupt completion, then 1. If _iteratorRecord_.[[Done]] is *false*, set _result_ to Completion(IteratorClose(_iteratorRecord_, _result_)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). @@ -49763,7 +49759,7 @@

    Promise.allSettled ( _iterable_ )

    PerformPromiseAllSettled ( _iteratorRecord_: an Iterator Record, - _constructor_: a constructor, + _ctor_: a constructor, _resultCapability_: a PromiseCapability Record, _promiseResolve_: a function object, ): either a normal completion containing an ECMAScript language value or a throw completion @@ -49784,7 +49780,7 @@

    1. Perform ? Call(_resultCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return _resultCapability_.[[Promise]]. 1. Append *undefined* to _values_. - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _next_ »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _ctor_, « _next_ »). 1. Let _alreadyCalled_ be the Record { [[Value]]: *false* }. 1. Let _fulfilledSteps_ be a new Abstract Closure with parameters (_value_) that captures _values_, _resultCapability_, and _remainingElementsCount_ and performs the following steps when called: 1. Let _activeFunc_ be the active function object. @@ -49831,13 +49827,13 @@

    Promise.any ( _iterable_ )

    This function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an `AggregateError` holding the rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.

    - 1. Let _constructor_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). + 1. Let _ctor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_ctor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseAny(_iteratorRecord_, _constructor_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseAny(_iteratorRecord_, _ctor_, _promiseCapability_, _promiseResolve_)). 1. If _result_ is an abrupt completion, then 1. If _iteratorRecord_.[[Done]] is *false*, set _result_ to Completion(IteratorClose(_iteratorRecord_, _result_)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). @@ -49851,7 +49847,7 @@

    Promise.any ( _iterable_ )

    PerformPromiseAny ( _iteratorRecord_: an Iterator Record, - _constructor_: a constructor, + _ctor_: a constructor, _resultCapability_: a PromiseCapability Record, _promiseResolve_: a function object, ): either a normal completion containing an ECMAScript language value or a throw completion @@ -49873,7 +49869,7 @@

    1. Perform ? Call(_resultCapability_.[[Reject]], *undefined*, « _aggregateError_ »). 1. Return _resultCapability_.[[Promise]]. 1. Append *undefined* to _errors_. - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _next_ »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _ctor_, « _next_ »). 1. Let _rejectedSteps_ be a new Abstract Closure with parameters (_error_) that captures _errors_, _resultCapability_, and _remainingElementsCount_ and performs the following steps when called: 1. Let _activeFunc_ be the active function object. 1. If _activeFunc_.[[AlreadyCalled]] is *true*, return *undefined*. @@ -49906,13 +49902,13 @@

    Promise.prototype

    Promise.race ( _iterable_ )

    This function returns a new promise which is settled in the same way as the first passed promise to settle. It resolves all elements of the passed _iterable_ to promises as it runs this algorithm.

    - 1. Let _constructor_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). + 1. Let _ctor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_ctor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseRace(_iteratorRecord_, _constructor_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseRace(_iteratorRecord_, _ctor_, _promiseCapability_, _promiseResolve_)). 1. If _result_ is an abrupt completion, then 1. If _iteratorRecord_.[[Done]] is *false*, set _result_ to Completion(IteratorClose(_iteratorRecord_, _result_)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). @@ -49929,7 +49925,7 @@

    Promise.race ( _iterable_ )

    PerformPromiseRace ( _iteratorRecord_: an Iterator Record, - _constructor_: a constructor, + _ctor_: a constructor, _resultCapability_: a PromiseCapability Record, _promiseResolve_: a function object, ): either a normal completion containing an ECMAScript language value or a throw completion @@ -49941,7 +49937,7 @@

    1. Let _next_ be ? IteratorStepValue(_iteratorRecord_). 1. If _next_ is ~done~, then 1. Return _resultCapability_.[[Promise]]. - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _next_ »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _ctor_, « _next_ »). 1. Perform ? Invoke(_nextPromise_, *"then"*, « _resultCapability_.[[Resolve]], _resultCapability_.[[Reject]] »). @@ -49951,8 +49947,8 @@

    Promise.reject ( _reason_ )

    This function returns a new promise rejected with the passed argument.

    - 1. Let _constructor_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _ctor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _reason_ »). 1. Return _promiseCapability_.[[Promise]]. @@ -49965,9 +49961,9 @@

    Promise.reject ( _reason_ )

    Promise.resolve ( _resolution_ )

    This function returns either a new promise resolved with the passed argument, or the argument itself if the argument is a promise produced by this constructor.

    - 1. Let _constructor_ be the *this* value. - 1. If _constructor_ is not an Object, throw a *TypeError* exception. - 1. Return ? PromiseResolve(_constructor_, _resolution_). + 1. Let _ctor_ be the *this* value. + 1. If _ctor_ is not an Object, throw a *TypeError* exception. + 1. Return ? PromiseResolve(_ctor_, _resolution_).

    This function expects its *this* value to be a constructor function that supports the parameter conventions of the Promise constructor.

    @@ -49976,7 +49972,7 @@

    Promise.resolve ( _resolution_ )

    PromiseResolve ( - _constructor_: an Object, + _ctor_: an Object, _resolution_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -49986,9 +49982,9 @@

    1. If IsPromise(_resolution_) is *true*, then - 1. Let _xConstructor_ be ? Get(_resolution_, *"constructor"*). - 1. If SameValue(_xConstructor_, _constructor_) is *true*, return _resolution_. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _resolutionCtor_ be ? Get(_resolution_, *"constructor"*). + 1. If SameValue(_resolutionCtor_, _ctor_) is *true*, return _resolution_. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). 1. Perform ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _resolution_ »). 1. Return _promiseCapability_.[[Promise]]. @@ -49999,9 +49995,9 @@

    Promise.try ( _callback_, ..._args_ )

    This function performs the following steps when called:

    - 1. Let _constructor_ be the *this* value. - 1. If _constructor_ is not an Object, throw a *TypeError* exception. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _ctor_ be the *this* value. + 1. If _ctor_ is not an Object, throw a *TypeError* exception. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). 1. Let _status_ be Completion(Call(_callback_, *undefined*, _args_)). 1. If _status_ is an abrupt completion, then 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _status_.[[Value]] »). @@ -50018,8 +50014,8 @@

    Promise.try ( _callback_, ..._args_ )

    Promise.withResolvers ( )

    This function returns an object with three properties: a new promise together with the `resolve` and `reject` functions associated with it.

    - 1. Let _constructor_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _ctor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_ctor_). 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"promise"*, _promiseCapability_.[[Promise]]). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"resolve"*, _promiseCapability_.[[Resolve]]). @@ -50071,23 +50067,23 @@

    Promise.prototype.finally ( _onFinally_ )

    1. Let _promise_ be the *this* value. 1. If _promise_ is not an Object, throw a *TypeError* exception. - 1. Let _constructor_ be ? SpeciesConstructor(_promise_, %Promise%). - 1. Assert: IsConstructor(_constructor_) is *true*. + 1. Let _ctor_ be ? SpeciesConstructor(_promise_, %Promise%). + 1. Assert: IsConstructor(_ctor_) is *true*. 1. If IsCallable(_onFinally_) is *false*, then 1. Let _thenFinally_ be _onFinally_. 1. Let _catchFinally_ be _onFinally_. 1. Else, - 1. Let _thenFinallyClosure_ be a new Abstract Closure with parameters (_value_) that captures _onFinally_ and _constructor_ and performs the following steps when called: + 1. Let _thenFinallyClosure_ be a new Abstract Closure with parameters (_value_) that captures _onFinally_ and _ctor_ and performs the following steps when called: 1. Let _result_ be ? Call(_onFinally_, *undefined*). - 1. Let _p_ be ? PromiseResolve(_constructor_, _result_). + 1. Let _p_ be ? PromiseResolve(_ctor_, _result_). 1. Let _returnValue_ be a new Abstract Closure with no parameters that captures _value_ and performs the following steps when called: 1. Return NormalCompletion(_value_). 1. Let _valueThunk_ be CreateBuiltinFunction(_returnValue_, 0, *""*, « »). 1. Return ? Invoke(_p_, *"then"*, « _valueThunk_ »). 1. Let _thenFinally_ be CreateBuiltinFunction(_thenFinallyClosure_, 1, *""*, « »). - 1. Let _catchFinallyClosure_ be a new Abstract Closure with parameters (_reason_) that captures _onFinally_ and _constructor_ and performs the following steps when called: + 1. Let _catchFinallyClosure_ be a new Abstract Closure with parameters (_reason_) that captures _onFinally_ and _ctor_ and performs the following steps when called: 1. Let _result_ be ? Call(_onFinally_, *undefined*). - 1. Let _p_ be ? PromiseResolve(_constructor_, _result_). + 1. Let _p_ be ? PromiseResolve(_ctor_, _result_). 1. Let _throwReason_ be a new Abstract Closure with no parameters that captures _reason_ and performs the following steps when called: 1. Throw _reason_. 1. Let _thrower_ be CreateBuiltinFunction(_throwReason_, 0, *""*, « »). @@ -50103,8 +50099,8 @@

    Promise.prototype.then ( _onFulfilled_, _onRejected_ )

    1. Let _promise_ be the *this* value. 1. If IsPromise(_promise_) is *false*, throw a *TypeError* exception. - 1. Let _constructor_ be ? SpeciesConstructor(_promise_, %Promise%). - 1. Let _resultCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _ctor_ be ? SpeciesConstructor(_promise_, %Promise%). + 1. Let _resultCapability_ be ? NewPromiseCapability(_ctor_). 1. Return PerformPromiseThen(_promise_, _onFulfilled_, _onRejected_, _resultCapability_). @@ -50258,13 +50254,13 @@

    The GeneratorFunction Constructor

    -

    GeneratorFunction ( ..._parameterArgs_, _bodyArg_ )

    +

    GeneratorFunction ( ..._paramArgs_, _bodyArg_ )

    The last argument (if any) specifies the body (executable code) of a generator function; any preceding arguments specify formal parameters.

    This function performs the following steps when called:

    1. Let _activeFunc_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~generator~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~generator~, _paramArgs_, _bodyArg_).

    See NOTE for .

    @@ -50360,13 +50356,13 @@

    The AsyncGeneratorFunction Constructor

    -

    AsyncGeneratorFunction ( ..._parameterArgs_, _bodyArg_ )

    +

    AsyncGeneratorFunction ( ..._paramArgs_, _bodyArg_ )

    The last argument (if any) specifies the body (executable code) of an async generator function; any preceding arguments specify formal parameters.

    This function performs the following steps when called:

    1. Let _activeFunc_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~async-generator~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~async-generator~, _paramArgs_, _bodyArg_).

    See NOTE for .

    @@ -50481,9 +50477,9 @@

    %GeneratorPrototype%.next ( _value_ )

    %GeneratorPrototype%.return ( _value_ )

    This method performs the following steps when called:

    - 1. Let _generator_ be the *this* value. + 1. Let _gen_ be the *this* value. 1. Let _completion_ be ReturnCompletion(_value_). - 1. Return ? GeneratorResumeAbrupt(_generator_, _completion_, ~empty~). + 1. Return ? GeneratorResumeAbrupt(_gen_, _completion_, ~empty~).
    @@ -50491,9 +50487,9 @@

    %GeneratorPrototype%.return ( _value_ )

    %GeneratorPrototype%.throw ( _exception_ )

    This method performs the following steps when called:

    - 1. Let _generator_ be the *this* value. + 1. Let _gen_ be the *this* value. 1. Let _completion_ be ThrowCompletion(_exception_). - 1. Return ? GeneratorResumeAbrupt(_generator_, _completion_, ~empty~). + 1. Return ? GeneratorResumeAbrupt(_gen_, _completion_, ~empty~).
    @@ -50565,28 +50561,28 @@

    Generator Abstract Operations

    GeneratorStart ( - _generator_: a Generator, - _generatorBody_: a |FunctionBody| Parse Node or an Abstract Closure with no parameters, + _gen_: a Generator, + _genBody_: a |FunctionBody| Parse Node or an Abstract Closure with no parameters, ): ~unused~

    - 1. Assert: _generator_.[[GeneratorState]] is ~suspended-start~. + 1. Assert: _gen_.[[GeneratorState]] is ~suspended-start~. 1. Let _genContext_ be the running execution context. - 1. Set the Generator component of _genContext_ to _generator_. - 1. Let _closure_ be a new Abstract Closure with no parameters that captures _generatorBody_ and performs the following steps when called: + 1. Set the Generator component of _genContext_ to _gen_. + 1. Let _closure_ be a new Abstract Closure with no parameters that captures _genBody_ and performs the following steps when called: 1. Let _acGenContext_ be the running execution context. - 1. Let _acGenerator_ be the Generator component of _acGenContext_. - 1. If _generatorBody_ is a Parse Node, then - 1. Let _result_ be Completion(Evaluation of _generatorBody_). + 1. Let _acGen_ be the Generator component of _acGenContext_. + 1. If _genBody_ is a Parse Node, then + 1. Let _result_ be Completion(Evaluation of _genBody_). 1. Else, - 1. Assert: _generatorBody_ is an Abstract Closure with no parameters. - 1. Let _result_ be Completion(_generatorBody_()). + 1. Assert: _genBody_ is an Abstract Closure with no parameters. + 1. Let _result_ be Completion(_genBody_()). 1. Assert: If we return here, the generator either threw an exception or performed either an implicit or explicit return. 1. Remove _acGenContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context. - 1. Set _acGenerator_.[[GeneratorState]] to ~completed~. - 1. NOTE: Once a generator enters the ~completed~ state it never leaves it and its associated execution context is never resumed. Any execution state associated with _acGenerator_ can be discarded at this point. + 1. Set _acGen_.[[GeneratorState]] to ~completed~. + 1. NOTE: Once a generator enters the ~completed~ state it never leaves it and its associated execution context is never resumed. Any execution state associated with _acGen_ can be discarded at this point. 1. If _result_ is a normal completion, then 1. Let _resultValue_ be *undefined*. 1. Else if _result_ is a return completion, then @@ -50596,7 +50592,7 @@

    1. Return ? _result_. 1. Return NormalCompletion(CreateIteratorResultObject(_resultValue_, *true*)). 1. Set the code evaluation state of _genContext_ such that when evaluation is resumed for that execution context, _closure_ will be called with no arguments. - 1. Set _generator_.[[GeneratorContext]] to _genContext_. + 1. Set _gen_.[[GeneratorContext]] to _genContext_. 1. Return ~unused~. @@ -50604,18 +50600,18 @@

    GeneratorValidate ( - _generator_: an ECMAScript language value, - _generatorBrand_: a String or ~empty~, + _gen_: an ECMAScript language value, + _genBrand_: a String or ~empty~, ): either a normal completion containing one of ~suspended-start~, ~suspended-yield~, or ~completed~, or a throw completion

    - 1. Perform ? RequireInternalSlot(_generator_, [[GeneratorState]]). - 1. Perform ? RequireInternalSlot(_generator_, [[GeneratorBrand]]). - 1. If _generator_.[[GeneratorBrand]] is not _generatorBrand_, throw a *TypeError* exception. - 1. Assert: _generator_ has a [[GeneratorContext]] internal slot. - 1. Let _state_ be _generator_.[[GeneratorState]]. + 1. Perform ? RequireInternalSlot(_gen_, [[GeneratorState]]). + 1. Perform ? RequireInternalSlot(_gen_, [[GeneratorBrand]]). + 1. If _gen_.[[GeneratorBrand]] is not _genBrand_, throw a *TypeError* exception. + 1. Assert: _gen_ has a [[GeneratorContext]] internal slot. + 1. Let _state_ be _gen_.[[GeneratorState]]. 1. If _state_ is ~executing~, throw a *TypeError* exception. 1. Return _state_. @@ -50624,21 +50620,21 @@

    GeneratorResume ( - _generator_: an ECMAScript language value, + _gen_: an ECMAScript language value, _value_: an ECMAScript language value or ~empty~, - _generatorBrand_: a String or ~empty~, + _genBrand_: a String or ~empty~, ): either a normal completion containing an ECMAScript language value or a throw completion

    - 1. Let _state_ be ? GeneratorValidate(_generator_, _generatorBrand_). + 1. Let _state_ be ? GeneratorValidate(_gen_, _genBrand_). 1. If _state_ is ~completed~, return CreateIteratorResultObject(*undefined*, *true*). 1. Assert: _state_ is either ~suspended-start~ or ~suspended-yield~. - 1. Let _genContext_ be _generator_.[[GeneratorContext]]. + 1. Let _genContext_ be _gen_.[[GeneratorContext]]. 1. Let _methodContext_ be the running execution context. 1. Suspend _methodContext_. - 1. Set _generator_.[[GeneratorState]] to ~executing~. + 1. Set _gen_.[[GeneratorState]] to ~executing~. 1. Push _genContext_ onto the execution context stack; _genContext_ is now the running execution context. 1. Resume the suspended evaluation of _genContext_ using NormalCompletion(_value_) as the result of the operation that suspended it. Let _result_ be the value returned by the resumed computation. 1. Assert: When we return here, _genContext_ has already been removed from the execution context stack and _methodContext_ is the currently running execution context. @@ -50649,28 +50645,28 @@

    GeneratorResumeAbrupt ( - _generator_: an ECMAScript language value, + _gen_: an ECMAScript language value, _abruptCompletion_: a return completion or a throw completion, - _generatorBrand_: a String or ~empty~, + _genBrand_: a String or ~empty~, ): either a normal completion containing an ECMAScript language value or a throw completion

    - 1. Let _state_ be ? GeneratorValidate(_generator_, _generatorBrand_). + 1. Let _state_ be ? GeneratorValidate(_gen_, _genBrand_). 1. If _state_ is ~suspended-start~, then - 1. Set _generator_.[[GeneratorState]] to ~completed~. - 1. NOTE: Once a generator enters the ~completed~ state it never leaves it and its associated execution context is never resumed. Any execution state associated with _generator_ can be discarded at this point. + 1. Set _gen_.[[GeneratorState]] to ~completed~. + 1. NOTE: Once a generator enters the ~completed~ state it never leaves it and its associated execution context is never resumed. Any execution state associated with _gen_ can be discarded at this point. 1. Set _state_ to ~completed~. 1. If _state_ is ~completed~, then 1. If _abruptCompletion_ is a return completion, then 1. Return CreateIteratorResultObject(_abruptCompletion_.[[Value]], *true*). 1. Return ? _abruptCompletion_. 1. Assert: _state_ is ~suspended-yield~. - 1. Let _genContext_ be _generator_.[[GeneratorContext]]. + 1. Let _genContext_ be _gen_.[[GeneratorContext]]. 1. Let _methodContext_ be the running execution context. 1. Suspend _methodContext_. - 1. Set _generator_.[[GeneratorState]] to ~executing~. + 1. Set _gen_.[[GeneratorState]] to ~executing~. 1. Push _genContext_ onto the execution context stack; _genContext_ is now the running execution context. 1. Resume the suspended evaluation of _genContext_ using _abruptCompletion_ as the result of the operation that suspended it. Let _result_ be the Completion Record returned by the resumed computation. 1. Assert: When we return here, _genContext_ has already been removed from the execution context stack and _methodContext_ is the currently running execution context. @@ -50685,8 +50681,8 @@

    GetGeneratorKind ( ): ~non-generator~, ~sync~, or ~async~

    1. Let _genContext_ be the running execution context. 1. If _genContext_ does not have a Generator component, return ~non-generator~. - 1. Let _generator_ be the Generator component of _genContext_. - 1. If _generator_ has an [[AsyncGeneratorState]] internal slot, return ~async~. + 1. Let _gen_ be the Generator component of _genContext_. + 1. If _gen_ has an [[AsyncGeneratorState]] internal slot, return ~async~. 1. Return ~sync~.
    @@ -50704,9 +50700,9 @@

    1. Let _genContext_ be the running execution context. 1. Assert: _genContext_ is the execution context of a generator. - 1. Let _generator_ be the value of the Generator component of _genContext_. + 1. Let _gen_ be the value of the Generator component of _genContext_. 1. Assert: GetGeneratorKind() is ~sync~. - 1. Set _generator_.[[GeneratorState]] to ~suspended-yield~. + 1. Set _gen_.[[GeneratorState]] to ~suspended-yield~. 1. Remove _genContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context. 1. Let _callerContext_ be the running execution context. 1. Resume _callerContext_ passing NormalCompletion(_iteratorResult_). If _genContext_ is ever resumed again, let _resumptionValue_ be the Completion Record with which it is resumed. @@ -50718,15 +50714,15 @@

    Yield ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or an abrupt completion

    - 1. Let _generatorKind_ be GetGeneratorKind(). - 1. If _generatorKind_ is ~async~, return ? AsyncGeneratorYield(? Await(_value_)). - 1. Return ? GeneratorYield(CreateIteratorResultObject(_value_, *false*)). + 1. Let _genKind_ be GetGeneratorKind(). + 1. If _genKind_ is ~async~, return ? AsyncGeneratorYield(? Await(_arg_)). + 1. Return ? GeneratorYield(CreateIteratorResultObject(_arg_, *false*)).
    @@ -50734,8 +50730,8 @@

    CreateIteratorFromClosure ( _closure_: an Abstract Closure with no parameters, - _generatorBrand_: a String or ~empty~, - _generatorPrototype_: an Object, + _genBrand_: a String or ~empty~, + _genProto_: an Object, optional _extraSlots_: a List of names of internal slots, ): a Generator

    @@ -50745,9 +50741,9 @@

    1. NOTE: _closure_ can contain uses of the Yield operation to yield an IteratorResult object. 1. If _extraSlots_ is not present, set _extraSlots_ to a new empty List. 1. Let _internalSlotsList_ be the list-concatenation of _extraSlots_ and « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] ». - 1. Let _generator_ be OrdinaryObjectCreate(_generatorPrototype_, _internalSlotsList_). - 1. Set _generator_.[[GeneratorBrand]] to _generatorBrand_. - 1. Set _generator_.[[GeneratorState]] to ~suspended-start~. + 1. Let _gen_ be OrdinaryObjectCreate(_genProto_, _internalSlotsList_). + 1. Set _gen_.[[GeneratorBrand]] to _genBrand_. + 1. Set _gen_.[[GeneratorState]] to ~suspended-start~. 1. Let _callerContext_ be the running execution context. 1. Let _calleeContext_ be a new execution context. 1. Set the Function of _calleeContext_ to *null*. @@ -50755,9 +50751,9 @@

    1. Set the ScriptOrModule of _calleeContext_ to _callerContext_'s ScriptOrModule. 1. If _callerContext_ is not already suspended, suspend _callerContext_. 1. Push _calleeContext_ onto the execution context stack; _calleeContext_ is now the running execution context. - 1. Perform GeneratorStart(_generator_, _closure_). + 1. Perform GeneratorStart(_gen_, _closure_). 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. - 1. Return _generator_. + 1. Return _gen_. @@ -50789,19 +50785,19 @@

    %AsyncGeneratorPrototype%.constructor

    %AsyncGeneratorPrototype%.next ( _value_ )

    - 1. Let _generator_ be the *this* value. + 1. Let _gen_ be the *this* value. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _result_ be Completion(AsyncGeneratorValidate(_generator_, ~empty~)). + 1. Let _result_ be Completion(AsyncGeneratorValidate(_gen_, ~empty~)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). - 1. Let _state_ be _generator_.[[AsyncGeneratorState]]. + 1. Let _state_ be _gen_.[[AsyncGeneratorState]]. 1. If _state_ is ~completed~, then 1. Let _iteratorResult_ be CreateIteratorResultObject(*undefined*, *true*). 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iteratorResult_ »). 1. Return _promiseCapability_.[[Promise]]. 1. Let _completion_ be NormalCompletion(_value_). - 1. Perform AsyncGeneratorEnqueue(_generator_, _completion_, _promiseCapability_). + 1. Perform AsyncGeneratorEnqueue(_gen_, _completion_, _promiseCapability_). 1. If _state_ is either ~suspended-start~ or ~suspended-yield~, then - 1. Perform AsyncGeneratorResume(_generator_, _completion_). + 1. Perform AsyncGeneratorResume(_gen_, _completion_). 1. Else, 1. Assert: _state_ is either ~executing~ or ~draining-queue~. 1. Return _promiseCapability_.[[Promise]]. @@ -50811,18 +50807,18 @@

    %AsyncGeneratorPrototype%.next ( _value_ )

    %AsyncGeneratorPrototype%.return ( _value_ )

    - 1. Let _generator_ be the *this* value. + 1. Let _gen_ be the *this* value. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _result_ be Completion(AsyncGeneratorValidate(_generator_, ~empty~)). + 1. Let _result_ be Completion(AsyncGeneratorValidate(_gen_, ~empty~)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). 1. Let _completion_ be ReturnCompletion(_value_). - 1. Perform AsyncGeneratorEnqueue(_generator_, _completion_, _promiseCapability_). - 1. Let _state_ be _generator_.[[AsyncGeneratorState]]. + 1. Perform AsyncGeneratorEnqueue(_gen_, _completion_, _promiseCapability_). + 1. Let _state_ be _gen_.[[AsyncGeneratorState]]. 1. If _state_ is either ~suspended-start~ or ~completed~, then - 1. Set _generator_.[[AsyncGeneratorState]] to ~draining-queue~. - 1. Perform AsyncGeneratorAwaitReturn(_generator_). + 1. Set _gen_.[[AsyncGeneratorState]] to ~draining-queue~. + 1. Perform AsyncGeneratorAwaitReturn(_gen_). 1. Else if _state_ is ~suspended-yield~, then - 1. Perform AsyncGeneratorResume(_generator_, _completion_). + 1. Perform AsyncGeneratorResume(_gen_, _completion_). 1. Else, 1. Assert: _state_ is either ~executing~ or ~draining-queue~. 1. Return _promiseCapability_.[[Promise]]. @@ -50832,21 +50828,21 @@

    %AsyncGeneratorPrototype%.return ( _value_ )

    %AsyncGeneratorPrototype%.throw ( _exception_ )

    - 1. Let _generator_ be the *this* value. + 1. Let _gen_ be the *this* value. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _result_ be Completion(AsyncGeneratorValidate(_generator_, ~empty~)). + 1. Let _result_ be Completion(AsyncGeneratorValidate(_gen_, ~empty~)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). - 1. Let _state_ be _generator_.[[AsyncGeneratorState]]. + 1. Let _state_ be _gen_.[[AsyncGeneratorState]]. 1. If _state_ is ~suspended-start~, then - 1. Set _generator_.[[AsyncGeneratorState]] to ~completed~. + 1. Set _gen_.[[AsyncGeneratorState]] to ~completed~. 1. Set _state_ to ~completed~. 1. If _state_ is ~completed~, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _exception_ »). 1. Return _promiseCapability_.[[Promise]]. 1. Let _completion_ be ThrowCompletion(_exception_). - 1. Perform AsyncGeneratorEnqueue(_generator_, _completion_, _promiseCapability_). + 1. Perform AsyncGeneratorEnqueue(_gen_, _completion_, _promiseCapability_). 1. If _state_ is ~suspended-yield~, then - 1. Perform AsyncGeneratorResume(_generator_, _completion_). + 1. Perform AsyncGeneratorResume(_gen_, _completion_). 1. Else, 1. Assert: _state_ is either ~executing~ or ~draining-queue~. 1. Return _promiseCapability_.[[Promise]]. @@ -50929,35 +50925,35 @@

    AsyncGeneratorRequest Records

    AsyncGeneratorStart ( - _generator_: an AsyncGenerator, - _generatorBody_: a |FunctionBody| Parse Node or an Abstract Closure with no parameters, + _gen_: an AsyncGenerator, + _genBody_: a |FunctionBody| Parse Node or an Abstract Closure with no parameters, ): ~unused~

    - 1. Assert: _generator_.[[AsyncGeneratorState]] is ~suspended-start~. + 1. Assert: _gen_.[[AsyncGeneratorState]] is ~suspended-start~. 1. Let _genContext_ be the running execution context. - 1. Set the Generator component of _genContext_ to _generator_. - 1. Let _closure_ be a new Abstract Closure with no parameters that captures _generatorBody_ and performs the following steps when called: + 1. Set the Generator component of _genContext_ to _gen_. + 1. Let _closure_ be a new Abstract Closure with no parameters that captures _genBody_ and performs the following steps when called: 1. Let _acGenContext_ be the running execution context. - 1. Let _acGenerator_ be the Generator component of _acGenContext_. - 1. If _generatorBody_ is a Parse Node, then - 1. Let _result_ be Completion(Evaluation of _generatorBody_). + 1. Let _acGen_ be the Generator component of _acGenContext_. + 1. If _genBody_ is a Parse Node, then + 1. Let _result_ be Completion(Evaluation of _genBody_). 1. Else, - 1. Assert: _generatorBody_ is an Abstract Closure with no parameters. - 1. Let _result_ be Completion(_generatorBody_()). + 1. Assert: _genBody_ is an Abstract Closure with no parameters. + 1. Let _result_ be Completion(_genBody_()). 1. Assert: If we return here, the async generator either threw an exception or performed either an implicit or explicit return. 1. Remove _acGenContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context. - 1. Set _acGenerator_.[[AsyncGeneratorState]] to ~draining-queue~. + 1. Set _acGen_.[[AsyncGeneratorState]] to ~draining-queue~. 1. If _result_ is a normal completion, set _result_ to NormalCompletion(*undefined*). 1. If _result_ is a return completion, set _result_ to NormalCompletion(_result_.[[Value]]). - 1. Perform AsyncGeneratorCompleteStep(_acGenerator_, _result_, *true*). - 1. Perform AsyncGeneratorDrainQueue(_acGenerator_). + 1. Perform AsyncGeneratorCompleteStep(_acGen_, _result_, *true*). + 1. Perform AsyncGeneratorDrainQueue(_acGen_). 1. Return NormalCompletion(*undefined*). 1. Set the code evaluation state of _genContext_ such that when evaluation is resumed for that execution context, _closure_ will be called with no arguments. - 1. Set _generator_.[[AsyncGeneratorContext]] to _genContext_. - 1. Set _generator_.[[AsyncGeneratorQueue]] to a new empty List. + 1. Set _gen_.[[AsyncGeneratorContext]] to _genContext_. + 1. Set _gen_.[[AsyncGeneratorQueue]] to a new empty List. 1. Return ~unused~.
    @@ -50965,17 +50961,17 @@

    AsyncGeneratorValidate ( - _generator_: an ECMAScript language value, - _generatorBrand_: a String or ~empty~, + _gen_: an ECMAScript language value, + _genBrand_: a String or ~empty~, ): either a normal completion containing ~unused~ or a throw completion

    - 1. Perform ? RequireInternalSlot(_generator_, [[AsyncGeneratorContext]]). - 1. Perform ? RequireInternalSlot(_generator_, [[AsyncGeneratorState]]). - 1. Perform ? RequireInternalSlot(_generator_, [[AsyncGeneratorQueue]]). - 1. If _generator_.[[GeneratorBrand]] is not _generatorBrand_, throw a *TypeError* exception. + 1. Perform ? RequireInternalSlot(_gen_, [[AsyncGeneratorContext]]). + 1. Perform ? RequireInternalSlot(_gen_, [[AsyncGeneratorState]]). + 1. Perform ? RequireInternalSlot(_gen_, [[AsyncGeneratorQueue]]). + 1. If _gen_.[[GeneratorBrand]] is not _genBrand_, throw a *TypeError* exception. 1. Return ~unused~.
    @@ -50983,7 +50979,7 @@

    AsyncGeneratorEnqueue ( - _generator_: an AsyncGenerator, + _gen_: an AsyncGenerator, _completion_: a Completion Record, _promiseCapability_: a PromiseCapability Record, ): ~unused~ @@ -50992,7 +50988,7 @@

    1. Let _request_ be AsyncGeneratorRequest { [[Completion]]: _completion_, [[Capability]]: _promiseCapability_ }. - 1. Append _request_ to _generator_.[[AsyncGeneratorQueue]]. + 1. Append _request_ to _gen_.[[AsyncGeneratorQueue]]. 1. Return ~unused~. @@ -51000,7 +50996,7 @@

    AsyncGeneratorCompleteStep ( - _generator_: an AsyncGenerator, + _gen_: an AsyncGenerator, _completion_: a Completion Record, _done_: a Boolean, optional _realm_: a Realm Record, @@ -51009,9 +51005,9 @@

    - 1. Assert: _generator_.[[AsyncGeneratorQueue]] is not empty. - 1. Let _next_ be the first element of _generator_.[[AsyncGeneratorQueue]]. - 1. Remove the first element from _generator_.[[AsyncGeneratorQueue]]. + 1. Assert: _gen_.[[AsyncGeneratorQueue]] is not empty. + 1. Let _next_ be the first element of _gen_.[[AsyncGeneratorQueue]]. + 1. Remove the first element from _gen_.[[AsyncGeneratorQueue]]. 1. Let _promiseCapability_ be _next_.[[Capability]]. 1. Let _value_ be _completion_.[[Value]]. 1. If _completion_ is a throw completion, then @@ -51033,18 +51029,18 @@

    AsyncGeneratorResume ( - _generator_: an AsyncGenerator, + _gen_: an AsyncGenerator, _completion_: a Completion Record, ): ~unused~

    - 1. Assert: _generator_.[[AsyncGeneratorState]] is either ~suspended-start~ or ~suspended-yield~. - 1. Let _genContext_ be _generator_.[[AsyncGeneratorContext]]. + 1. Assert: _gen_.[[AsyncGeneratorState]] is either ~suspended-start~ or ~suspended-yield~. + 1. Let _genContext_ be _gen_.[[AsyncGeneratorContext]]. 1. Let _callerContext_ be the running execution context. 1. Suspend _callerContext_. - 1. Set _generator_.[[AsyncGeneratorState]] to ~executing~. + 1. Set _gen_.[[AsyncGeneratorState]] to ~executing~. 1. Push _genContext_ onto the execution context stack; _genContext_ is now the running execution context. 1. Resume the suspended evaluation of _genContext_ using _completion_ as the result of the operation that suspended it. Let _result_ be the Completion Record returned by the resumed computation. 1. Assert: _result_ is never an abrupt completion. @@ -51073,7 +51069,7 @@

    AsyncGeneratorYield ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or an abrupt completion

    @@ -51081,20 +51077,20 @@

    1. Let _genContext_ be the running execution context. 1. Assert: _genContext_ is the execution context of a generator. - 1. Let _generator_ be the value of the Generator component of _genContext_. + 1. Let _gen_ be the value of the Generator component of _genContext_. 1. Assert: GetGeneratorKind() is ~async~. - 1. Let _completion_ be NormalCompletion(_value_). + 1. Let _completion_ be NormalCompletion(_arg_). 1. Assert: The execution context stack has at least two elements. 1. Let _previousContext_ be the second to top element of the execution context stack. 1. Let _previousRealm_ be _previousContext_'s Realm. - 1. Perform AsyncGeneratorCompleteStep(_generator_, _completion_, *false*, _previousRealm_). - 1. Let _queue_ be _generator_.[[AsyncGeneratorQueue]]. + 1. Perform AsyncGeneratorCompleteStep(_gen_, _completion_, *false*, _previousRealm_). + 1. Let _queue_ be _gen_.[[AsyncGeneratorQueue]]. 1. If _queue_ is not empty, then 1. NOTE: Execution continues without suspending the generator. 1. Let _toYield_ be the first element of _queue_. 1. Let _resumptionValue_ be Completion(_toYield_.[[Completion]]). 1. Return ? AsyncGeneratorUnwrapYieldResumption(_resumptionValue_). - 1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-yield~. + 1. Set _gen_.[[AsyncGeneratorState]] to ~suspended-yield~. 1. Remove _genContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context. 1. Let _callerContext_ be the running execution context. 1. Resume _callerContext_ passing *undefined*. If _genContext_ is ever resumed again, let _resumptionValue_ be the Completion Record with which it is resumed. @@ -51106,37 +51102,37 @@

    AsyncGeneratorAwaitReturn ( - _generator_: an AsyncGenerator, + _gen_: an AsyncGenerator, ): ~unused~

    - 1. Assert: _generator_.[[AsyncGeneratorState]] is ~draining-queue~. - 1. Let _queue_ be _generator_.[[AsyncGeneratorQueue]]. + 1. Assert: _gen_.[[AsyncGeneratorState]] is ~draining-queue~. + 1. Let _queue_ be _gen_.[[AsyncGeneratorQueue]]. 1. Assert: _queue_ is not empty. 1. Let _next_ be the first element of _queue_. 1. Let _completion_ be Completion(_next_.[[Completion]]). 1. Assert: _completion_ is a return completion. 1. Let _promiseCompletion_ be Completion(PromiseResolve(%Promise%, _completion_.[[Value]])). 1. If _promiseCompletion_ is an abrupt completion, then - 1. Perform AsyncGeneratorCompleteStep(_generator_, _promiseCompletion_, *true*). - 1. Perform AsyncGeneratorDrainQueue(_generator_). + 1. Perform AsyncGeneratorCompleteStep(_gen_, _promiseCompletion_, *true*). + 1. Perform AsyncGeneratorDrainQueue(_gen_). 1. Return ~unused~. 1. Assert: _promiseCompletion_ is a normal completion. 1. Let _promise_ be _promiseCompletion_.[[Value]]. - 1. Let _fulfilledClosure_ be a new Abstract Closure with parameters (_value_) that captures _generator_ and performs the following steps when called: - 1. Assert: _generator_.[[AsyncGeneratorState]] is ~draining-queue~. + 1. Let _fulfilledClosure_ be a new Abstract Closure with parameters (_value_) that captures _gen_ and performs the following steps when called: + 1. Assert: _gen_.[[AsyncGeneratorState]] is ~draining-queue~. 1. Let _result_ be NormalCompletion(_value_). - 1. Perform AsyncGeneratorCompleteStep(_generator_, _result_, *true*). - 1. Perform AsyncGeneratorDrainQueue(_generator_). + 1. Perform AsyncGeneratorCompleteStep(_gen_, _result_, *true*). + 1. Perform AsyncGeneratorDrainQueue(_gen_). 1. Return NormalCompletion(*undefined*). 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 1, *""*, « »). - 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_reason_) that captures _generator_ and performs the following steps when called: - 1. Assert: _generator_.[[AsyncGeneratorState]] is ~draining-queue~. + 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_reason_) that captures _gen_ and performs the following steps when called: + 1. Assert: _gen_.[[AsyncGeneratorState]] is ~draining-queue~. 1. Let _result_ be ThrowCompletion(_reason_). - 1. Perform AsyncGeneratorCompleteStep(_generator_, _result_, *true*). - 1. Perform AsyncGeneratorDrainQueue(_generator_). + 1. Perform AsyncGeneratorCompleteStep(_gen_, _result_, *true*). + 1. Perform AsyncGeneratorDrainQueue(_gen_). 1. Return NormalCompletion(*undefined*). 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). 1. Perform PerformPromiseThen(_promise_, _onFulfilled_, _onRejected_). @@ -51147,7 +51143,7 @@

    AsyncGeneratorDrainQueue ( - _generator_: an AsyncGenerator, + _gen_: an AsyncGenerator, ): ~unused~

    @@ -51155,18 +51151,18 @@

    It drains the generator's AsyncGeneratorQueue until it encounters an AsyncGeneratorRequest which holds a return completion.

    - 1. Assert: _generator_.[[AsyncGeneratorState]] is ~draining-queue~. - 1. Let _queue_ be _generator_.[[AsyncGeneratorQueue]]. + 1. Assert: _gen_.[[AsyncGeneratorState]] is ~draining-queue~. + 1. Let _queue_ be _gen_.[[AsyncGeneratorQueue]]. 1. Repeat, while _queue_ is not empty, 1. Let _next_ be the first element of _queue_. 1. Let _completion_ be Completion(_next_.[[Completion]]). 1. If _completion_ is a return completion, then - 1. Perform AsyncGeneratorAwaitReturn(_generator_). + 1. Perform AsyncGeneratorAwaitReturn(_gen_). 1. Return ~unused~. 1. If _completion_ is a normal completion, then 1. Set _completion_ to NormalCompletion(*undefined*). - 1. Perform AsyncGeneratorCompleteStep(_generator_, _completion_, *true*). - 1. Set _generator_.[[AsyncGeneratorState]] to ~completed~. + 1. Perform AsyncGeneratorCompleteStep(_gen_, _completion_, *true*). + 1. Set _gen_.[[AsyncGeneratorState]] to ~completed~. 1. Return ~unused~.
    @@ -51189,14 +51185,14 @@

    The AsyncFunction Constructor

    -

    AsyncFunction ( ..._parameterArgs_, _bodyArg_ )

    +

    AsyncFunction ( ..._paramArgs_, _bodyArg_ )

    The last argument (if any) specifies the body (executable code) of an async function. Any preceding arguments specify formal parameters.

    This function performs the following steps when called:

    1. Let _activeFunc_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~async~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~async~, _paramArgs_, _bodyArg_). See NOTE for . @@ -51274,7 +51270,7 @@

    Async Functions Abstract Operations

    AsyncFunctionStart ( _promiseCapability_: a PromiseCapability Record, - _asyncFunctionBody_: a |FunctionBody| Parse Node, an |ExpressionBody| Parse Node, or an Abstract Closure with no parameters, + _asyncFuncBody_: a |FunctionBody| Parse Node, an |ExpressionBody| Parse Node, or an Abstract Closure with no parameters, ): ~unused~

    @@ -51283,7 +51279,7 @@

    1. Let _runningContext_ be the running execution context. 1. Let _asyncContext_ be a copy of _runningContext_. 1. NOTE: Copying the execution state is required for AsyncBlockStart to resume its execution. It is ill-defined to resume a currently executing context. - 1. Perform AsyncBlockStart(_promiseCapability_, _asyncFunctionBody_, _asyncContext_). + 1. Perform AsyncBlockStart(_promiseCapability_, _asyncFuncBody_, _asyncContext_). 1. Return ~unused~. @@ -51329,14 +51325,14 @@

    Await ( - _value_: an ECMAScript language value, + _arg_: an ECMAScript language value, ): either a normal completion containing either an ECMAScript language value or ~empty~, or a throw completion

    1. Let _asyncContext_ be the running execution context. - 1. Let _promise_ be ? PromiseResolve(%Promise%, _value_). + 1. Let _promise_ be ? PromiseResolve(%Promise%, _arg_). 1. Let _fulfilledClosure_ be a new Abstract Closure with parameters (_v_) that captures _asyncContext_ and performs the following steps when called: 1. Let _prevContext_ be the running execution context. 1. Suspend _prevContext_. @@ -51382,69 +51378,69 @@

    The Reflect Object

    -

    Reflect.apply ( _target_, _thisArgument_, _argumentsList_ )

    +

    Reflect.apply ( _target_, _thisArg_, _args_ )

    This function performs the following steps when called:

    1. If IsCallable(_target_) is *false*, throw a *TypeError* exception. - 1. Let _args_ be ? CreateListFromArrayLike(_argumentsList_). + 1. Let _argList_ be ? CreateListFromArrayLike(_args_). 1. Perform PrepareForTailCall(). - 1. Return ? Call(_target_, _thisArgument_, _args_). + 1. Return ? Call(_target_, _thisArg_, _argList_).
    -

    Reflect.construct ( _target_, _argumentsList_ [ , _newTarget_ ] )

    +

    Reflect.construct ( _target_, _args_ [ , _newTarget_ ] )

    This function performs the following steps when called:

    1. If IsConstructor(_target_) is *false*, throw a *TypeError* exception. 1. If _newTarget_ is not present, set _newTarget_ to _target_. 1. Else if IsConstructor(_newTarget_) is *false*, throw a *TypeError* exception. - 1. Let _args_ be ? CreateListFromArrayLike(_argumentsList_). - 1. Return ? Construct(_target_, _args_, _newTarget_). + 1. Let _argList_ be ? CreateListFromArrayLike(_args_). + 1. Return ? Construct(_target_, _argList_, _newTarget_).
    -

    Reflect.defineProperty ( _target_, _propertyKey_, _attributes_ )

    +

    Reflect.defineProperty ( _target_, _key_, _attrs_ )

    This function performs the following steps when called:

    1. If _target_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Let _desc_ be ? ToPropertyDescriptor(_attributes_). - 1. Return ? _target_.[[DefineOwnProperty]](_key_, _desc_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Let _propertyDesc_ be ? ToPropertyDescriptor(_attrs_). + 1. Return ? _target_.[[DefineOwnProperty]](_propertyKey_, _propertyDesc_).
    -

    Reflect.deleteProperty ( _target_, _propertyKey_ )

    +

    Reflect.deleteProperty ( _target_, _key_ )

    This function performs the following steps when called:

    1. If _target_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Return ? _target_.[[Delete]](_key_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Return ? _target_.[[Delete]](_propertyKey_).
    -

    Reflect.get ( _target_, _propertyKey_ [ , _receiver_ ] )

    +

    Reflect.get ( _target_, _key_ [ , _receiver_ ] )

    This function performs the following steps when called:

    1. If _target_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). 1. If _receiver_ is not present, then 1. Set _receiver_ to _target_. - 1. Return ? _target_.[[Get]](_key_, _receiver_). + 1. Return ? _target_.[[Get]](_propertyKey_, _receiver_).
    -

    Reflect.getOwnPropertyDescriptor ( _target_, _propertyKey_ )

    +

    Reflect.getOwnPropertyDescriptor ( _target_, _key_ )

    This function performs the following steps when called:

    1. If _target_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Let _desc_ be ? _target_.[[GetOwnProperty]](_key_). - 1. Return FromPropertyDescriptor(_desc_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Let _propertyDesc_ be ? _target_.[[GetOwnProperty]](_propertyKey_). + 1. Return FromPropertyDescriptor(_propertyDesc_).
    @@ -51458,12 +51454,12 @@

    Reflect.getPrototypeOf ( _target_ )

    -

    Reflect.has ( _target_, _propertyKey_ )

    +

    Reflect.has ( _target_, _key_ )

    This function performs the following steps when called:

    1. If _target_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). - 1. Return ? _target_.[[HasProperty]](_key_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). + 1. Return ? _target_.[[HasProperty]](_propertyKey_).
    @@ -51496,14 +51492,14 @@

    Reflect.preventExtensions ( _target_ )

    -

    Reflect.set ( _target_, _propertyKey_, _value_ [ , _receiver_ ] )

    +

    Reflect.set ( _target_, _key_, _value_ [ , _receiver_ ] )

    This function performs the following steps when called:

    1. If _target_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Let _propertyKey_ be ? ToPropertyKey(_key_). 1. If _receiver_ is not present, then 1. Set _receiver_ to _target_. - 1. Return ? _target_.[[Set]](_key_, _value_, _receiver_). + 1. Return ? _target_.[[Set]](_propertyKey_, _value_, _receiver_).
    @@ -52053,11 +52049,11 @@

    Valid Chosen Reads

    1. Let _chosenValueRecord_ be the element of _execution_.[[ChosenValues]] whose [[Event]] field is _readEvent_. 1. Let _chosenValue_ be _chosenValueRecord_.[[ChosenValue]]. 1. Let _readValue_ be ValueOfReadEvent(_execution_, _readEvent_). - 1. Let _chosenLen_ be the number of elements in _chosenValue_. - 1. Let _readLen_ be the number of elements in _readValue_. - 1. If _chosenLen_ ≠ _readLen_, then + 1. Let _chosenLength_ be the number of elements in _chosenValue_. + 1. Let _readLength_ be the number of elements in _readValue_. + 1. If _chosenLength_ ≠ _readLength_, then 1. Return *false*. - 1. If _chosenValue_[_i_] ≠ _readValue_[_i_] for some integer _i_ in the interval from 0 (inclusive) to _chosenLen_ (exclusive), then + 1. If _chosenValue_[_i_] ≠ _readValue_[_i_] for some integer _i_ in the interval from 0 (inclusive) to _chosenLength_ (exclusive), then 1. Return *false*. 1. Return *true*. @@ -52912,8 +52908,8 @@

    Static Semantics: CharacterValue

    ClassEscape :: `c` ClassControlLetter - 1. Let _ch_ be the code point matched by |ClassControlLetter|. - 1. Let _i_ be the numeric value of _ch_. + 1. Let _codePoint_ be the code point matched by |ClassControlLetter|. + 1. Let _i_ be the numeric value of _codePoint_. 1. Return the remainder of dividing _i_ by 32. CharacterEscape :: LegacyOctalEscapeSequence @@ -52946,8 +52942,8 @@

    Runtime Semantics: CompileAtom

    ExtendedAtom :: ExtendedPatternCharacter - 1. Let _ch_ be the character represented by |ExtendedPatternCharacter|. - 1. Let _charSet_ be a one-element CharSet containing the character _ch_. + 1. Let _char_ be the character represented by |ExtendedPatternCharacter|. + 1. Let _charSet_ be a one-element CharSet containing the character _char_. 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). @@ -52977,9 +52973,9 @@

    Runtime Semantics: CompileToCharSet

    In addition, the following rules are added to CompileToCharSet.

    ClassEscape :: `c` ClassControlLetter - 1. Let _cv_ be the CharacterValue of this |ClassEscape|. - 1. Let _c_ be the character whose character value is _cv_. - 1. Return the CharSet containing the single character _c_. + 1. Let _charValue_ be the CharacterValue of this |ClassEscape|. + 1. Let _char_ be the character whose character value is _charValue_. + 1. Return the CharSet containing the single character _char_. ClassAtomNoDash :: `\` [lookahead == `c`] @@ -53084,23 +53080,23 @@

    escape ( _string_ )

    It performs the following steps when called:

    1. Set _string_ to ? ToString(_string_). - 1. Let _len_ be the length of _string_. + 1. Let _length_ be the length of _string_. 1. Let _result_ be the empty String. 1. Let _unescapedSet_ be the string-concatenation of the ASCII word characters and *"@\*+-./"*. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _codeUnit_ be the code unit at index _k_ within _string_. 1. If _unescapedSet_ contains _codeUnit_, then - 1. Let _str_ be _codeUnit_. + 1. Let _nextPart_ be _codeUnit_. 1. Else, - 1. Let _n_ be the numeric value of _codeUnit_. - 1. If _n_ < 256, then - 1. Let _hex_ be the String representation of _n_, formatted as an uppercase hexadecimal number. - 1. Let _str_ be the string-concatenation of *"%"* and StringPad(_hex_, 2, *"0"*, ~start~). + 1. Let _codeUnitNumber_ be the numeric value of _codeUnit_. + 1. If _codeUnitNumber_ < 256, then + 1. Let _hex_ be the String representation of _codeUnitNumber_, formatted as an uppercase hexadecimal number. + 1. Let _nextPart_ be the string-concatenation of *"%"* and StringPad(_hex_, 2, *"0"*, ~start~). 1. Else, - 1. Let _hex_ be the String representation of _n_, formatted as an uppercase hexadecimal number. - 1. Let _str_ be the string-concatenation of *"%u"* and StringPad(_hex_, 4, *"0"*, ~start~). - 1. Set _result_ to the string-concatenation of _result_ and _str_. + 1. Let _hex_ be the String representation of _codeUnitNumber_, formatted as an uppercase hexadecimal number. + 1. Let _nextPart_ be the string-concatenation of *"%u"* and StringPad(_hex_, 4, *"0"*, ~start~). + 1. Set _result_ to the string-concatenation of _result_ and _nextPart_. 1. Set _k_ to _k_ + 1. 1. Return _result_. @@ -53116,24 +53112,24 @@

    unescape ( _string_ )

    It performs the following steps when called:

    1. Set _string_ to ? ToString(_string_). - 1. Let _len_ be the length of _string_. + 1. Let _length_ be the length of _string_. 1. Let _result_ be the empty String. 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, + 1. Repeat, while _k_ < _length_, 1. Let _codeUnit_ be the code unit at index _k_ within _string_. 1. If _codeUnit_ is the code unit 0x0025 (PERCENT SIGN), then 1. Let _hexDigits_ be the empty String. 1. Let _optionalAdvance_ be 0. - 1. If _k_ + 5 < _len_ and the code unit at index _k_ + 1 within _string_ is the code unit 0x0075 (LATIN SMALL LETTER U), then + 1. If _k_ + 5 < _length_ and the code unit at index _k_ + 1 within _string_ is the code unit 0x0075 (LATIN SMALL LETTER U), then 1. Set _hexDigits_ to the substring of _string_ from _k_ + 2 to _k_ + 6. 1. Set _optionalAdvance_ to 5. - 1. Else if _k_ + 3 ≤ _len_, then + 1. Else if _k_ + 3 ≤ _length_, then 1. Set _hexDigits_ to the substring of _string_ from _k_ + 1 to _k_ + 3. 1. Set _optionalAdvance_ to 2. 1. Let _parseResult_ be ParseText(_hexDigits_, |HexDigits[~Sep]|). 1. If _parseResult_ is a Parse Node, then - 1. Let _n_ be the MV of _parseResult_. - 1. Set _codeUnit_ to the code unit whose numeric value is _n_. + 1. Let _codeUnitNumber_ be the MV of _parseResult_. + 1. Set _codeUnit_ to the code unit whose numeric value is _codeUnitNumber_. 1. Set _k_ to _k_ + _optionalAdvance_. 1. Set _result_ to the string-concatenation of _result_ and _codeUnit_. 1. Set _k_ to _k_ + 1. @@ -53152,8 +53148,8 @@

    String.prototype.substr ( _start_, _length_ )

    1. Let _obj_ be the *this* value. 1. Perform ? RequireObjectCoercible(_obj_). - 1. Let _str_ be ? ToString(_obj_). - 1. Let _size_ be the length of _str_. + 1. Let _string_ be ? ToString(_obj_). + 1. Let _size_ be the length of _string_. 1. Let _intStart_ be ? ToIntegerOrInfinity(_start_). 1. If _intStart_ = -∞, set _intStart_ to 0. 1. Else if _intStart_ < 0, set _intStart_ to max(_size_ + _intStart_, 0). @@ -53161,7 +53157,7 @@

    String.prototype.substr ( _start_, _length_ )

    1. If _length_ is *undefined*, let _intLength_ be _size_; else let _intLength_ be ? ToIntegerOrInfinity(_length_). 1. Set _intLength_ to the result of clamping _intLength_ between 0 and _size_. 1. Let _intEnd_ be min(_intStart_ + _intLength_, _size_). - 1. Return the substring of _str_ from _intStart_ to _intEnd_. + 1. Return the substring of _string_ from _intStart_ to _intEnd_.

    This method is intentionally generic; it does not require that its *this* value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.

    @@ -53172,8 +53168,8 @@

    String.prototype.substr ( _start_, _length_ )

    String.prototype.anchor ( _name_ )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"a"*, *"name"*, _name_). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"a"*, *"name"*, _name_). @@ -53189,23 +53185,23 @@

    1. Perform ? RequireObjectCoercible(_contents_). - 1. Let _contentsStr_ be ? ToString(_contents_). - 1. Let _p1_ be the string-concatenation of *"<"* and _tag_. + 1. Let _contentsString_ be ? ToString(_contents_). + 1. Let _part1_ be the string-concatenation of *"<"* and _tag_. 1. If _attribute_ is not the empty String, then - 1. Let _attrValueStr_ be ? ToString(_attrValue_). - 1. Let _escapedAttrValue_ be the String value that is the same as _attrValueStr_ except that each occurrence of the code unit 0x0022 (QUOTATION MARK) in _attrValueStr_ has been replaced with the six code unit sequence *"&quot;"*. - 1. Set _p1_ to the string-concatenation of: - * _p1_ + 1. Let _attrValueString_ be ? ToString(_attrValue_). + 1. Let _escapedAttrValue_ be the String value that is the same as _attrValueString_ except that each occurrence of the code unit 0x0022 (QUOTATION MARK) in _attrValueString_ has been replaced with the six code unit sequence *"&quot;"*. + 1. Set _part1_ to the string-concatenation of: + * _part1_ * the code unit 0x0020 (SPACE) * _attribute_ * the code unit 0x003D (EQUALS SIGN) * the code unit 0x0022 (QUOTATION MARK) * _escapedAttrValue_ * the code unit 0x0022 (QUOTATION MARK) - 1. Let _p2_ be the string-concatenation of _p1_ and *">"*. - 1. Let _p3_ be the string-concatenation of _p2_ and _contentsStr_. - 1. Let _p4_ be the string-concatenation of _p3_, *"</"*, _tag_, and *">"*. - 1. Return _p4_. + 1. Let _part2_ be the string-concatenation of _part1_ and *">"*. + 1. Let _part3_ be the string-concatenation of _part2_ and _contentsString_. + 1. Let _part4_ be the string-concatenation of _part3_, *"</"*, _tag_, and *">"*. + 1. Return _part4_. @@ -53214,8 +53210,8 @@

    String.prototype.big ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"big"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"big"*, *""*, *""*). @@ -53223,8 +53219,8 @@

    String.prototype.big ( )

    String.prototype.blink ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"blink"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"blink"*, *""*, *""*). @@ -53232,8 +53228,8 @@

    String.prototype.blink ( )

    String.prototype.bold ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"b"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"b"*, *""*, *""*). @@ -53241,8 +53237,8 @@

    String.prototype.bold ( )

    String.prototype.fixed ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"tt"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"tt"*, *""*, *""*). @@ -53250,8 +53246,8 @@

    String.prototype.fixed ( )

    String.prototype.fontcolor ( _colour_ )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"font"*, *"color"*, _colour_). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"font"*, *"color"*, _colour_). @@ -53259,8 +53255,8 @@

    String.prototype.fontcolor ( _colour_ )

    String.prototype.fontsize ( _size_ )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"font"*, *"size"*, _size_). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"font"*, *"size"*, _size_). @@ -53268,8 +53264,8 @@

    String.prototype.fontsize ( _size_ )

    String.prototype.italics ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"i"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"i"*, *""*, *""*). @@ -53277,8 +53273,8 @@

    String.prototype.italics ( )

    String.prototype.link ( _url_ )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"a"*, *"href"*, _url_). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"a"*, *"href"*, _url_). @@ -53286,8 +53282,8 @@

    String.prototype.link ( _url_ )

    String.prototype.small ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"small"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"small"*, *""*, *""*). @@ -53295,8 +53291,8 @@

    String.prototype.small ( )

    String.prototype.strike ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"strike"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"strike"*, *""*, *""*). @@ -53304,8 +53300,8 @@

    String.prototype.strike ( )

    String.prototype.sub ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"sub"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"sub"*, *""*, *""*). @@ -53313,8 +53309,8 @@

    String.prototype.sub ( )

    String.prototype.sup ( )

    This method performs the following steps when called:

    - 1. Let _str_ be the *this* value. - 1. Return ? CreateHTML(_str_, *"sup"*, *""*, *""*). + 1. Let _string_ be the *this* value. + 1. Return ? CreateHTML(_string_, *"sup"*, *""*, *""*). @@ -53345,11 +53341,11 @@

    Date.prototype.getYear ( )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. If _t_ is *NaN*, return *NaN*. - 1. Return YearFromTime(LocalTime(_t_)) - *1900*𝔽. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _tv_ be _dateObj_.[[DateValue]]. + 1. If _tv_ is *NaN*, return *NaN*. + 1. Return YearFromTime(LocalTime(_tv_)) - *1900*𝔽. @@ -53360,16 +53356,16 @@

    Date.prototype.setYear ( _year_ )

    This method performs the following steps when called:

    - 1. Let _dateObject_ be the *this* value. - 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _time_ be _dateObject_.[[DateValue]]. + 1. Let _dateObj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]). + 1. Let _time_ be _dateObj_.[[DateValue]]. 1. Let _year_ be ? ToNumber(_year_). 1. If _time_ is *NaN*, set _time_ to *+0*𝔽; else set _time_ to LocalTime(_time_). 1. Let _fullYear_ be MakeFullYear(_year_). 1. Let _day_ be MakeDay(_fullYear_, MonthFromTime(_time_), DateFromTime(_time_)). 1. Let _date_ be MakeDate(_day_, TimeWithinDay(_time_)). 1. Let _utcTimestamp_ be TimeClip(UTC(_date_)). - 1. Set _dateObject_.[[DateValue]] to _utcTimestamp_. + 1. Set _dateObj_.[[DateValue]] to _utcTimestamp_. 1. Return _utcTimestamp_.