diff --git a/spec.html b/spec.html index 1367c85f1c..5bf2016c09 100644 --- a/spec.html +++ b/spec.html @@ -703,13 +703,13 @@

The Syntactic Grammar

Parse Nodes are specification artefacts, and implementations are not required to use an analogous data structure.

Productions of the syntactic grammar are distinguished by having just one colon “:” as punctuation.

The syntactic grammar as presented in clauses through is not a complete account of which token sequences are accepted as a correct ECMAScript |Script| or |Module|. Certain additional token sequences are also accepted, namely, those that would be described by the grammar if only semicolons were added to the sequence in certain places (such as before line terminator characters). Furthermore, certain token sequences that are described by the grammar are not considered acceptable if a line terminator character appears in certain “awkward” places.

-

In certain cases, in order to avoid ambiguities, the syntactic grammar uses generalized productions that permit token sequences that do not form a valid ECMAScript |Script| or |Module|. For example, this technique is used for object literals and object destructuring patterns. In such cases a more restrictive supplemental grammar is provided that further restricts the acceptable token sequences. Typically, an early error rule will then state that, in certain contexts, "_P_ must cover an _N_", where _P_ is a Parse Node (an instance of the generalized production) and _N_ is a nonterminal from the supplemental grammar. This means:

+

In certain cases, in order to avoid ambiguities, the syntactic grammar uses generalized productions that permit token sequences that do not form a valid ECMAScript |Script| or |Module|. For example, this technique is used for object literals and object destructuring patterns. In such cases a more restrictive supplemental grammar is provided that further restricts the acceptable token sequences. Typically, an early error rule will then state that, in certain contexts, "_p_ must cover an _n_", where _p_ is a Parse Node (an instance of the generalized production) and _n_ is a nonterminal from the supplemental grammar. This means:

    -
  1. The sequence of tokens originally matched by _P_ is parsed again using _N_ as the goal symbol. If _N_ takes grammatical parameters, then they are set to the same values used when _P_ was originally parsed.
  2. -
  3. If the sequence of tokens can be parsed as a single instance of _N_, with no tokens left over, then: +
  4. The sequence of tokens originally matched by _p_ is parsed again using _n_ as the goal symbol. If _n_ takes grammatical parameters, then they are set to the same values used when _p_ was originally parsed.
  5. +
  6. If the sequence of tokens can be parsed as a single instance of _n_, with no tokens left over, then:
      -
    1. We refer to that instance of _N_ (a Parse Node, unique for a given _P_) as "the _N_ that is covered by _P_".
    2. -
    3. All Early Error rules for _N_ and its derived productions also apply to the _N_ that is covered by _P_.
    4. +
    5. We refer to that instance of _n_ (a Parse Node, unique for a given _p_) as "the _n_ that is covered by _p_".
    6. +
    7. All Early Error rules for _n_ and its derived productions also apply to the _n_ that is covered by _p_.
  7. Otherwise (if the parse fails), it is an early Syntax Error.
  8. @@ -1284,7 +1284,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 _S_ from _inclusiveStart_ to _exclusiveEnd_" (where _S_ 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 _S_ 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 _S_ is used as the value of _exclusiveEnd_.

    +

    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 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_"*.
    @@ -3098,10 +3098,10 @@

    Object Internal Methods and Internal Slots

    [[DefineOwnProperty]] - (_propertyKey_, _PropertyDescriptor_) Boolean + (_propertyKey_, _propertyDescriptor_) 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 _propertyDescriptor_. Return *true* if that property was successfully created/updated or *false* if the property could not be created or updated. @@ -3120,10 +3120,10 @@

    Object Internal Methods and Internal Slots

    [[Get]] - (_propertyKey_, _Receiver_) any + (_propertyKey_, _receiver_) any - Return the value of the property whose key is _propertyKey_ from this object. If any ECMAScript code must be executed to retrieve the property value, _Receiver_ is used as the *this* value when evaluating the code. + Return the value of the property whose key is _propertyKey_ from this object. If any ECMAScript code must be executed to retrieve the property value, _receiver_ is used as the *this* value when evaluating the code. @@ -3131,10 +3131,10 @@

    Object Internal Methods and Internal Slots

    [[Set]] - (_propertyKey_, _value_, _Receiver_) Boolean + (_propertyKey_, _value_, _receiver_) Boolean - Set the value of the property whose key is _propertyKey_ to _value_. If any ECMAScript code must be executed to set the property value, _Receiver_ is used as the *this* value when evaluating the code. Returns *true* if the property value was set or *false* if it could not be set. + Set the value of the property whose key is _propertyKey_ to _value_. If any ECMAScript code must be executed to set the property value, _receiver_ is used as the *this* value when evaluating the code. Returns *true* if the property value was set or *false* if it could not be set. @@ -3239,19 +3239,19 @@

    [[GetPrototypeOf]] ( )

    The normal return type is either Object or Null.
  9. - If target is non-extensible, and [[GetPrototypeOf]] returns a value _V_, then any future calls to [[GetPrototypeOf]] should return the SameValue as _V_. + If target is non-extensible, and [[GetPrototypeOf]] returns a value _proto_, then any future calls to [[GetPrototypeOf]] should return the SameValue as _proto_.
  10. An object's prototype chain should have finite length (that is, starting from any object, recursively applying the [[GetPrototypeOf]] internal method to its result should eventually lead to the value *null*). However, this requirement is not enforceable as an object level invariant if the prototype chain includes any exotic objects that do not use the ordinary object definition of [[GetPrototypeOf]]. Such a circular prototype chain may result in infinite loops when accessing object properties.

    -

    [[SetPrototypeOf]] ( _V_ )

    +

    [[SetPrototypeOf]] ( _proto_ )

    [[IsExtensible]] ( )

    @@ -3272,7 +3272,7 @@

    [[PreventExtensions]] ( )

    If [[PreventExtensions]] returns *true*, all future calls to [[IsExtensible]] on the target must return *false* and the target is now considered non-extensible. -

    [[GetOwnProperty]] ( _P_ )

    +

    [[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]] ( _P_, _Desc_ )

    +

    [[DefineOwnProperty]] ( _propertyKey_, _desc_ )

    -

    [[HasProperty]] ( _P_ )

    +

    [[HasProperty]] ( _propertyKey_ )

    -

    [[Get]] ( _P_, _Receiver_ )

    +

    [[Get]] ( _propertyKey_, _receiver_ )

    -

    [[Set]] ( _P_, _V_, _Receiver_ )

    +

    [[Set]] ( _propertyKey_, _value_, _receiver_ )

    -

    [[Delete]] ( _P_ )

    +

    [[Delete]] ( _propertyKey_ )

    [[OwnPropertyKeys]] ( )

    @@ -4418,14 +4418,14 @@

    The Reference Record Specification Type

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

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

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

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

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

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

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

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

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

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

    @@ -4502,31 +4502,31 @@

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

    @@ -4536,32 +4536,32 @@

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

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

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

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

    The Property Descriptor Specification Type

    IsAccessorDescriptor ( - _Desc_: a Property Descriptor, + _desc_: 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 _desc_ has a [[Get]] field, return *true*. + 1. If _desc_ has a [[Set]] field, return *true*. 1. Return *false*.
    @@ -4607,14 +4607,14 @@

    IsDataDescriptor ( - _Desc_: a Property Descriptor, + _desc_: 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 _desc_ has a [[Value]] field, return *true*. + 1. If _desc_ has a [[Writable]] field, return *true*. 1. Return *false*.
    @@ -4622,14 +4622,14 @@

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

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

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

    - 1. If _Desc_ is *undefined*, return *undefined*. + 1. If _desc_ 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 _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. Return _obj_.
    @@ -4665,38 +4665,38 @@

    ToPropertyDescriptor ( - _Obj_: an ECMAScript language value, + _obj_: an ECMAScript language value, ): either a normal completion containing a Property Descriptor or a throw completion

    - 1. If _Obj_ is not an Object, throw a *TypeError* exception. + 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 _hasEnumerable_ be ? HasProperty(_Obj_, *"enumerable"*). + 1. Let _hasEnumerable_ be ? HasProperty(_obj_, *"enumerable"*). 1. If _hasEnumerable_ is *true*, then - 1. Let _enumerable_ be ToBoolean(? Get(_Obj_, *"enumerable"*)). + 1. Let _enumerable_ be ToBoolean(? Get(_obj_, *"enumerable"*)). 1. Set _desc_.[[Enumerable]] to _enumerable_. - 1. Let _hasConfigurable_ be ? HasProperty(_Obj_, *"configurable"*). + 1. Let _hasConfigurable_ be ? HasProperty(_obj_, *"configurable"*). 1. If _hasConfigurable_ is *true*, then - 1. Let _configurable_ be ToBoolean(? Get(_Obj_, *"configurable"*)). + 1. Let _configurable_ be ToBoolean(? Get(_obj_, *"configurable"*)). 1. Set _desc_.[[Configurable]] to _configurable_. - 1. Let _hasValue_ be ? HasProperty(_Obj_, *"value"*). + 1. Let _hasValue_ be ? HasProperty(_obj_, *"value"*). 1. If _hasValue_ is *true*, then - 1. Let _value_ be ? Get(_Obj_, *"value"*). + 1. Let _value_ be ? Get(_obj_, *"value"*). 1. Set _desc_.[[Value]] to _value_. - 1. Let _hasWritable_ be ? HasProperty(_Obj_, *"writable"*). + 1. Let _hasWritable_ be ? HasProperty(_obj_, *"writable"*). 1. If _hasWritable_ is *true*, then - 1. Let _writable_ be ToBoolean(? Get(_Obj_, *"writable"*)). + 1. Let _writable_ be ToBoolean(? Get(_obj_, *"writable"*)). 1. Set _desc_.[[Writable]] to _writable_. - 1. Let _hasGet_ be ? HasProperty(_Obj_, *"get"*). + 1. Let _hasGet_ be ? HasProperty(_obj_, *"get"*). 1. If _hasGet_ is *true*, then - 1. Let _getter_ be ? Get(_Obj_, *"get"*). + 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. Let _hasSet_ be ? HasProperty(_Obj_, *"set"*). + 1. Let _hasSet_ be ? HasProperty(_obj_, *"set"*). 1. If _hasSet_ is *true*, then - 1. Let _setter_ be ? Get(_Obj_, *"set"*). + 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 @@ -4708,21 +4708,21 @@

    CompletePropertyDescriptor ( - _Desc_: a Property Descriptor, + _desc_: 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(_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. 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 _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. Return ~unused~.
    @@ -4783,8 +4783,8 @@

    1. Let _db_ be a new Shared Data Block value consisting of _size_ bytes. If it is impossible to create such a Shared Data Block, throw a *RangeError* exception. - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 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 @@ -4813,8 +4813,8 @@

    1. Assert: _toIndex_ + _count_ ≤ _toSize_. 1. Repeat, while _count_ > 0, 1. If _fromBlock_ is a Shared Data Block, then - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. Let _bytes_ be a List whose sole element is a nondeterministically chosen byte value. 1. NOTE: In implementations, _bytes_ is the result of a non-atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. @@ -5063,7 +5063,7 @@

    OrdinaryToPrimitive ( - _O_: an Object, + _obj_: an Object, _hint_: ~string~ or ~number~, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -5075,9 +5075,9 @@

    1. Else, 1. Let _methodNames_ be « *"valueOf"*, *"toString"* ». 1. For each element _name_ of _methodNames_, do - 1. Let _method_ be ? Get(_O_, _name_). + 1. Let _method_ be ? Get(_obj_, _name_). 1. If IsCallable(_method_) is *true*, then - 1. Let _result_ be ? Call(_method_, _O_). + 1. Let _result_ be ? Call(_method_, _obj_). 1. If _result_ is not an Object, return _result_. 1. Throw a *TypeError* exception. @@ -5859,15 +5859,15 @@

    IsExtensible ( - _O_: an Object, + _obj_: an Object, ): either a normal completion containing a Boolean or a throw completion

    description
    -
    It is used to determine whether additional properties can be added to _O_.
    +
    It is used to determine whether additional properties can be added to _obj_.
    - 1. Return ? _O_.[[IsExtensible]](). + 1. Return ? _obj_.[[IsExtensible]]().
    @@ -6015,15 +6015,15 @@

    IsLessThan ( _x_: an ECMAScript language value, _y_: an ECMAScript language value, - _LeftFirst_: a Boolean, + _leftFirst_: a Boolean, ): either a normal completion containing either a Boolean or *undefined*, or a throw completion

    description
    -
    It provides the semantics for the comparison _x_ < _y_, returning *true*, *false*, or *undefined* (which indicates that at least one operand is *NaN*). The _LeftFirst_ flag is used to control the order in which operations with potentially visible side-effects are performed upon _x_ and _y_. It is necessary because ECMAScript specifies left to right evaluation of expressions. If _LeftFirst_ is *true*, the _x_ parameter corresponds to an expression that occurs to the left of the _y_ parameter's corresponding expression. If _LeftFirst_ is *false*, the reverse is the case and operations must be performed upon _y_ before _x_.
    +
    It provides the semantics for the comparison _x_ < _y_, returning *true*, *false*, or *undefined* (which indicates that at least one operand is *NaN*). The _leftFirst_ flag is used to control the order in which operations with potentially visible side-effects are performed upon _x_ and _y_. It is necessary because ECMAScript specifies left to right evaluation of expressions. If _leftFirst_ is *true*, the _x_ parameter corresponds to an expression that occurs to the left of the _y_ parameter's corresponding expression. If _leftFirst_ is *false*, the reverse is the case and operations must be performed upon _y_ before _x_.
    - 1. If _LeftFirst_ is *true*, then + 1. If _leftFirst_ is *true*, then 1. Let _px_ be ? ToPrimitive(_x_, ~number~). 1. Let _py_ be ? ToPrimitive(_y_, ~number~). 1. Else, @@ -6165,8 +6165,8 @@

    Get ( - _O_: an Object, - _P_: a property key, + _obj_: an Object, + _propertyKey_: a property key, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -6174,15 +6174,15 @@

    It is used to retrieve the value of a specific property of an object.

    - 1. Return ? _O_.[[Get]](_P_, _O_). + 1. Return ? _obj_.[[Get]](_propertyKey_, _obj_).

    GetV ( - _V_: an ECMAScript language value, - _P_: a property key, + _value_: an ECMAScript language value, + _propertyKey_: a property key, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -6190,27 +6190,27 @@

    It is used to retrieve the value of a specific property of an ECMAScript language value. If the value is not an object, the property lookup is performed using a wrapper object appropriate for the type of the value.

    - 1. Let _O_ be ? ToObject(_V_). - 1. Return ? _O_.[[Get]](_P_, _V_). + 1. Let _obj_ be ? ToObject(_value_). + 1. Return ? _obj_.[[Get]](_propertyKey_, _value_).

    Set ( - _O_: an Object, - _P_: a property key, - _V_: an ECMAScript language value, - _Throw_: a Boolean, + _obj_: an Object, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _throw_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    description
    -
    It is used to set the value of a specific property of an object. _V_ is the new value for the property.
    +
    It is used to set the value of a specific property of an object. _value_ is the new value for the property.
    - 1. Let _success_ be ? _O_.[[Set]](_P_, _V_, _O_). - 1. If _success_ is *false* and _Throw_ is *true*, throw a *TypeError* exception. + 1. Let _success_ be ? _obj_.[[Set]](_propertyKey_, _value_, _obj_). + 1. If _success_ is *false* and _throw_ is *true*, throw a *TypeError* exception. 1. Return ~unused~.
    @@ -6218,9 +6218,9 @@

    CreateDataProperty ( - _O_: an Object, - _P_: a property key, - _V_: an ECMAScript language value, + _obj_: an Object, + _propertyKey_: a property key, + _value_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    @@ -6228,20 +6228,20 @@

    It is used to create a new own property of an object.

    - 1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _V_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *true* }. - 1. Return ? _O_.[[DefineOwnProperty]](_P_, _newDesc_). + 1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *true* }. + 1. Return ? _obj_.[[DefineOwnProperty]](_propertyKey_, _newDesc_). -

    This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator. Normally, the property will not already exist. If it does exist and is not configurable or if _O_ is not extensible, [[DefineOwnProperty]] will return *false*.

    +

    This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator. Normally, the property will not already exist. If it does exist and is not configurable or if _obj_ is not extensible, [[DefineOwnProperty]] will return *false*.

    CreateDataPropertyOrThrow ( - _O_: an Object, - _P_: a property key, - _V_: an ECMAScript language value, + _obj_: an Object, + _propertyKey_: a property key, + _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

    @@ -6249,21 +6249,21 @@

    It is used to create a new own property of an object. It throws a *TypeError* exception if the requested property update cannot be performed.

    - 1. Let _success_ be ? CreateDataProperty(_O_, _P_, _V_). + 1. Let _success_ be ? CreateDataProperty(_obj_, _propertyKey_, _value_). 1. If _success_ is *false*, throw a *TypeError* exception. 1. Return ~unused~. -

    This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator. Normally, the property will not already exist. If it does exist and is not configurable or if _O_ is not extensible, [[DefineOwnProperty]] will return *false* causing this operation to throw a *TypeError* exception.

    +

    This abstract operation creates a property whose attributes are set to the same defaults used for properties created by the ECMAScript language assignment operator. Normally, the property will not already exist. If it does exist and is not configurable or if _obj_ is not extensible, [[DefineOwnProperty]] will return *false* causing this operation to throw a *TypeError* exception.

    CreateNonEnumerableDataPropertyOrThrow ( - _O_: an Object, - _P_: a property key, - _V_: an ECMAScript language value, + _obj_: an Object, + _propertyKey_: a property key, + _value_: an ECMAScript language value, ): ~unused~

    @@ -6271,9 +6271,9 @@

    It is used to create a new non-enumerable own property of an ordinary object.

    - 1. Assert: _O_ is an ordinary, extensible object with no non-configurable properties. - 1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _V_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }. - 1. Perform ! DefinePropertyOrThrow(_O_, _P_, _newDesc_). + 1. Assert: _obj_ is an ordinary, extensible object with no non-configurable properties. + 1. Let _newDesc_ be the PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }. + 1. Perform ! DefinePropertyOrThrow(_obj_, _propertyKey_, _newDesc_). 1. Return ~unused~. @@ -6284,8 +6284,8 @@

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

    @@ -6294,7 +6294,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 ? _O_.[[DefineOwnProperty]](_P_, _desc_). + 1. Let _success_ be ? _obj_.[[DefineOwnProperty]](_propertyKey_, _desc_). 1. If _success_ is *false*, throw a *TypeError* exception. 1. Return ~unused~. @@ -6303,8 +6303,8 @@

    DeletePropertyOrThrow ( - _O_: an Object, - _P_: a property key, + _obj_: an Object, + _propertyKey_: a property key, ): either a normal completion containing ~unused~ or a throw completion

    @@ -6312,7 +6312,7 @@

    It is used to remove a specific own property of an object. It throws an exception if the property is not configurable.

    - 1. Let _success_ be ? _O_.[[Delete]](_P_). + 1. Let _success_ be ? _obj_.[[Delete]](_propertyKey_). 1. If _success_ is *false*, throw a *TypeError* exception. 1. Return ~unused~. @@ -6321,8 +6321,8 @@

    GetMethod ( - _V_: an ECMAScript language value, - _P_: a property key, + _value_: an ECMAScript language value, + _propertyKey_: a property key, ): either a normal completion containing either a function object or *undefined*, or a throw completion

    @@ -6330,7 +6330,7 @@

    It is used to get the value of a specific property of an ECMAScript language value when the value of the property is expected to be a function.

    - 1. Let _func_ be ? GetV(_V_, _P_). + 1. Let _func_ be ? GetV(_value_, _propertyKey_). 1. If _func_ is either *undefined* or *null*, return *undefined*. 1. If IsCallable(_func_) is *false*, throw a *TypeError* exception. 1. Return _func_. @@ -6340,8 +6340,8 @@

    HasProperty ( - _O_: an Object, - _P_: a property key, + _obj_: an Object, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    @@ -6349,15 +6349,15 @@

    It is used to determine whether an object has a property with the specified property key. The property may be either own or inherited.

    - 1. Return ? _O_.[[HasProperty]](_P_). + 1. Return ? _obj_.[[HasProperty]](_propertyKey_).

    HasOwnProperty ( - _O_: an Object, - _P_: a property key, + _obj_: an Object, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    @@ -6365,7 +6365,7 @@

    It is used to determine whether an object has an own property with the specified property key.

    - 1. Let _desc_ be ? _O_.[[GetOwnProperty]](_P_). + 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). 1. If _desc_ is *undefined*, return *false*. 1. Return *true*. @@ -6374,38 +6374,38 @@

    Call ( - _F_: an ECMAScript language value, - _V_: an ECMAScript language value, + _func_: an ECMAScript language value, + _thisValue_: an ECMAScript language value, optional _argumentsList_: 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. _F_ is the function object, _V_ 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 _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.
    1. If _argumentsList_ is not present, set _argumentsList_ to a new empty List. - 1. If IsCallable(_F_) is *false*, throw a *TypeError* exception. - 1. Return ? _F_.[[Call]](_V_, _argumentsList_). + 1. If IsCallable(_func_) is *false*, throw a *TypeError* exception. + 1. Return ? _func_.[[Call]](_thisValue_, _argumentsList_).

    Construct ( - _F_: a constructor, + _constructor_: a constructor, optional _argumentsList_: 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, _F_ is used as its value.
    +
    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.
    - 1. If _newTarget_ is not present, set _newTarget_ to _F_. + 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 ? _F_.[[Construct]](_argumentsList_, _newTarget_). + 1. Return ? _constructor_.[[Construct]](_argumentsList_, _newTarget_).

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

    @@ -6415,7 +6415,7 @@

    SetIntegrityLevel ( - _O_: an Object, + _obj_: an Object, _level_: ~sealed~ or ~frozen~, ): either a normal completion containing a Boolean or a throw completion

    @@ -6424,22 +6424,22 @@

    It is used to fix the set of own properties of an object.
    - 1. Let _status_ be ? _O_.[[PreventExtensions]](). + 1. Let _status_ be ? _obj_.[[PreventExtensions]](). 1. If _status_ is *false*, return *false*. - 1. Let _keys_ be ? _O_.[[OwnPropertyKeys]](). + 1. Let _keys_ be ? _obj_.[[OwnPropertyKeys]](). 1. If _level_ is ~sealed~, then - 1. For each element _k_ of _keys_, do - 1. Perform ? DefinePropertyOrThrow(_O_, _k_, PropertyDescriptor { [[Configurable]]: *false* }). + 1. For each element _key_ of _keys_, do + 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, PropertyDescriptor { [[Configurable]]: *false* }). 1. Else, 1. Assert: _level_ is ~frozen~. - 1. For each element _k_ of _keys_, do - 1. Let _currentDesc_ be ? _O_.[[GetOwnProperty]](_k_). + 1. For each element _key_ of _keys_, do + 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. Else, 1. Let _desc_ be the PropertyDescriptor { [[Configurable]]: *false*, [[Writable]]: *false* }. - 1. Perform ? DefinePropertyOrThrow(_O_, _k_, _desc_). + 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _desc_). 1. Return *true*. @@ -6447,7 +6447,7 @@

    TestIntegrityLevel ( - _O_: an Object, + _obj_: an Object, _level_: ~sealed~ or ~frozen~, ): either a normal completion containing a Boolean or a throw completion

    @@ -6456,12 +6456,12 @@

    It is used to determine if the set of own properties of an object are fixed.
    - 1. Let _extensible_ be ? IsExtensible(_O_). + 1. Let _extensible_ be ? IsExtensible(_obj_). 1. If _extensible_ is *true*, return *false*. 1. NOTE: If the object is extensible, none of its properties are examined. - 1. Let _keys_ be ? _O_.[[OwnPropertyKeys]](). - 1. For each element _k_ of _keys_, do - 1. Let _currentDesc_ be ? _O_.[[GetOwnProperty]](_k_). + 1. Let _keys_ be ? _obj_.[[OwnPropertyKeys]](). + 1. For each element _key_ of _keys_, do + 1. Let _currentDesc_ be ? _obj_.[[GetOwnProperty]](_key_). 1. If _currentDesc_ is not *undefined*, then 1. If _currentDesc_.[[Configurable]] is *true*, return *false*. 1. If _level_ is ~frozen~ and IsDataDescriptor(_currentDesc_) is *true*, then @@ -6542,67 +6542,67 @@

    Invoke ( - _V_: an ECMAScript language value, - _P_: a property key, + _value_: an ECMAScript language value, + _propertyKey_: a property key, optional _argumentsList_: 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. _V_ 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. _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.
    1. If _argumentsList_ is not present, set _argumentsList_ to a new empty List. - 1. Let _func_ be ? GetV(_V_, _P_). - 1. Return ? Call(_func_, _V_, _argumentsList_). + 1. Let _func_ be ? GetV(_value_, _propertyKey_). + 1. Return ? Call(_func_, _value_, _argumentsList_).

    OrdinaryHasInstance ( - _C_: an ECMAScript language value, - _O_: an ECMAScript language value, + _constructor_: 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 _O_ inherits from the instance object inheritance path provided by _C_.
    +
    It implements the default algorithm for determining if _instance_ inherits from the instance object inheritance path provided by _constructor_.
    - 1. If IsCallable(_C_) is *false*, return *false*. - 1. If _C_ has a [[BoundTargetFunction]] internal slot, then - 1. Let _BC_ be _C_.[[BoundTargetFunction]]. - 1. Return ? InstanceofOperator(_O_, _BC_). - 1. If _O_ is not an Object, return *false*. - 1. Let _P_ be ? Get(_C_, *"prototype"*). - 1. If _P_ is not an Object, throw a *TypeError* exception. + 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 _instance_ is not an Object, return *false*. + 1. Let _proto_ be ? Get(_constructor_, *"prototype"*). + 1. If _proto_ is not an Object, throw a *TypeError* exception. 1. Repeat, - 1. Set _O_ to ? _O_.[[GetPrototypeOf]](). - 1. If _O_ is *null*, return *false*. - 1. If SameValue(_P_, _O_) is *true*, return *true*. + 1. Set _instance_ to ? _instance_.[[GetPrototypeOf]](). + 1. If _instance_ is *null*, return *false*. + 1. If SameValue(_proto_, _instance_) is *true*, return *true*.

    SpeciesConstructor ( - _O_: an Object, + _obj_: an Object, _defaultConstructor_: 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 _O_. _defaultConstructor_ is the constructor to use if a constructor %Symbol.species% property cannot be found starting from _O_.
    +
    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_.
    - 1. Let _C_ be ? Get(_O_, *"constructor"*). - 1. If _C_ is *undefined*, return _defaultConstructor_. - 1. If _C_ is not an Object, throw a *TypeError* exception. - 1. Let _S_ be ? Get(_C_, %Symbol.species%). - 1. If _S_ is either *undefined* or *null*, return _defaultConstructor_. - 1. If IsConstructor(_S_) is *true*, return _S_. + 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. If IsConstructor(_species_) is *true*, return _species_. 1. Throw a *TypeError* exception.
    @@ -6610,23 +6610,23 @@

    EnumerableOwnProperties ( - _O_: an Object, + _obj_: an Object, _kind_: ~key~, ~value~, or ~key+value~, ): either a normal completion containing a List of ECMAScript language values or a throw completion

    - 1. Let _ownKeys_ be ? _O_.[[OwnPropertyKeys]](). + 1. Let _ownKeys_ be ? _obj_.[[OwnPropertyKeys]](). 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 ? _O_.[[GetOwnProperty]](_key_). + 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_key_). 1. If _desc_ is not *undefined* and _desc_.[[Enumerable]] is *true*, then 1. If _kind_ is ~key~, then 1. Append _key_ to _results_. 1. Else, - 1. Let _value_ be ? Get(_O_, _key_). + 1. Let _value_ be ? Get(_obj_, _key_). 1. If _kind_ is ~value~, then 1. Append _value_ to _results_. 1. Else, @@ -6640,26 +6640,26 @@

    GetFunctionRealm ( - _obj_: a function object, + _func_: a function object, ): either a normal completion containing a Realm Record or a throw completion

    - 1. If _obj_ has a [[Realm]] internal slot, then - 1. Return _obj_.[[Realm]]. - 1. If _obj_ is a bound function exotic object, then - 1. Let _boundTargetFunction_ be _obj_.[[BoundTargetFunction]]. + 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. If _obj_ is a Proxy exotic object, then - 1. Perform ? ValidateNonRevokedProxy(_obj_). - 1. Let _proxyTarget_ be _obj_.[[ProxyTarget]]. + 1. If _func_ is a Proxy exotic object, then + 1. Perform ? ValidateNonRevokedProxy(_func_). + 1. Let _proxyTarget_ be _func_.[[ProxyTarget]]. 1. Assert: _proxyTarget_ is a function object. 1. Return ? GetFunctionRealm(_proxyTarget_). 1. [id="step-getfunctionrealm-default-return"] Return the current Realm Record. -

    Step will only be reached if _obj_ is a non-standard function exotic object that does not have a [[Realm]] internal slot.

    +

    Step will only be reached if _func_ is a non-standard function exotic object that does not have a [[Realm]] internal slot.

    @@ -6697,14 +6697,14 @@

    PrivateElementFind ( - _O_: an Object, - _P_: a Private Name, + _obj_: an Object, + _privateName_: a Private Name, ): a PrivateElement or ~empty~

    - 1. If _O_.[[PrivateElements]] contains a PrivateElement _pe_ such that _pe_.[[Key]] is _P_, then + 1. If _obj_.[[PrivateElements]] contains a PrivateElement _pe_ such that _pe_.[[Key]] is _privateName_, then 1. Return _pe_. 1. Return ~empty~. @@ -6713,8 +6713,8 @@

    PrivateFieldAdd ( - _O_: an Object, - _P_: a Private Name, + _obj_: an Object, + _privateName_: a Private Name, _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

    @@ -6722,10 +6722,10 @@

    1. If the host is a web browser, then - 1. Perform ? HostEnsureCanAddPrivateElement(_O_). - 1. Let _entry_ be PrivateElementFind(_O_, _P_). + 1. Perform ? HostEnsureCanAddPrivateElement(_obj_). + 1. Let _entry_ be PrivateElementFind(_obj_, _privateName_). 1. If _entry_ is not ~empty~, throw a *TypeError* exception. - 1. Append PrivateElement { [[Key]]: _P_, [[Kind]]: ~field~, [[Value]]: _value_ } to _O_.[[PrivateElements]]. + 1. Append PrivateElement { [[Key]]: _privateName_, [[Kind]]: ~field~, [[Value]]: _value_ } to _obj_.[[PrivateElements]]. 1. Return ~unused~. @@ -6733,7 +6733,7 @@

    PrivateMethodOrAccessorAdd ( - _O_: an Object, + _obj_: an Object, _method_: a PrivateElement, ): either a normal completion containing ~unused~ or a throw completion

    @@ -6742,10 +6742,10 @@

    1. Assert: _method_.[[Kind]] is either ~method~ or ~accessor~. 1. If the host is a web browser, then - 1. Perform ? HostEnsureCanAddPrivateElement(_O_). - 1. Let _entry_ be PrivateElementFind(_O_, _method_.[[Key]]). + 1. Perform ? HostEnsureCanAddPrivateElement(_obj_). + 1. Let _entry_ be PrivateElementFind(_obj_, _method_.[[Key]]). 1. If _entry_ is not ~empty~, throw a *TypeError* exception. - 1. Append _method_ to _O_.[[PrivateElements]]. + 1. Append _method_ to _obj_.[[PrivateElements]]. 1. Return ~unused~. @@ -6756,7 +6756,7 @@

    HostEnsureCanAddPrivateElement ( - _O_: an Object, + _obj_: an Object, ): either a normal completion containing ~unused~ or a throw completion

    @@ -6765,7 +6765,7 @@

    An implementation of HostEnsureCanAddPrivateElement must conform to the following requirements:

      -
    • If _O_ is not a host-defined exotic object, this abstract operation must return NormalCompletion(~unused~) and perform no other steps.
    • +
    • If _obj_ is not a host-defined exotic object, this abstract operation must return NormalCompletion(~unused~) and perform no other steps.
    • Any two calls of this abstract operation with the same argument must return the same kind of Completion Record.

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

    @@ -6775,36 +6775,36 @@

    PrivateGet ( - _O_: an Object, - _P_: a Private Name, + _obj_: an Object, + _privateName_: a Private Name, ): either a normal completion containing an ECMAScript language value or a throw completion

    - 1. Let _entry_ be PrivateElementFind(_O_, _P_). + 1. Let _entry_ be PrivateElementFind(_obj_, _privateName_). 1. If _entry_ is ~empty~, throw a *TypeError* exception. 1. If _entry_.[[Kind]] is either ~field~ or ~method~, then 1. Return _entry_.[[Value]]. 1. Assert: _entry_.[[Kind]] is ~accessor~. 1. If _entry_.[[Get]] is *undefined*, throw a *TypeError* exception. 1. Let _getter_ be _entry_.[[Get]]. - 1. Return ? Call(_getter_, _O_). + 1. Return ? Call(_getter_, _obj_).

    PrivateSet ( - _O_: an Object, - _P_: a Private Name, + _obj_: an Object, + _privateName_: a Private Name, _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

    - 1. Let _entry_ be PrivateElementFind(_O_, _P_). + 1. Let _entry_ be PrivateElementFind(_obj_, _privateName_). 1. If _entry_ is ~empty~, throw a *TypeError* exception. 1. If _entry_.[[Kind]] is ~method~, throw a *TypeError* exception. 1. If _entry_.[[Kind]] is ~field~, then @@ -6813,7 +6813,7 @@

    1. Assert: _entry_.[[Kind]] is ~accessor~. 1. If _entry_.[[Set]] is *undefined*, throw a *TypeError* exception. 1. Let _setter_ be _entry_.[[Set]]. - 1. Perform ? Call(_setter_, _O_, « _value_ »). + 1. Perform ? Call(_setter_, _obj_, « _value_ »). 1. Return ~unused~. @@ -6846,7 +6846,7 @@

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

    @@ -6855,10 +6855,10 @@

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

    - 1. For each Record { [[Key]], [[Elements]] } _g_ of _groups_, do - 1. If SameValue(_g_.[[Key]], _key_) is *true*, then + 1. For each Record { [[Key]], [[Elements]] } _group_ of _groups_, do + 1. If SameValue(_group_.[[Key]], _key_) is *true*, then 1. Assert: Exactly one element of _groups_ meets this criterion. - 1. Append _value_ to _g_.[[Elements]]. + 1. Append _value_ to _group_.[[Elements]]. 1. Return ~unused~. 1. Let _group_ be the Record { [[Key]]: _key_, [[Elements]]: « _value_ » }. 1. Append _group_ to _groups_. @@ -6944,8 +6944,8 @@

    SetterThatIgnoresPrototypeProperties ( _thisValue_: an ECMAScript language value, _home_: an Object, - _p_: a property key, - _v_: an ECMAScript language value, + _propertyKey_: a property key, + _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

    @@ -6956,11 +6956,11 @@

    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]](_p_). + 1. Let _desc_ be ? _thisValue_.[[GetOwnProperty]](_propertyKey_). 1. If _desc_ is *undefined*, then - 1. Perform ? CreateDataPropertyOrThrow(_thisValue_, _p_, _v_). + 1. Perform ? CreateDataPropertyOrThrow(_thisValue_, _propertyKey_, _value_). 1. Else, - 1. Perform ? Set(_thisValue_, _p_, _v_, *true*). + 1. Perform ? Set(_thisValue_, _propertyKey_, _value_, *true*). 1. Return ~unused~. @@ -7331,8 +7331,8 @@

    1. Let _closure_ be a new Abstract Closure with no parameters that captures _list_ and performs the following steps when called: - 1. For each element _E_ of _list_, do - 1. Perform ? GeneratorYield(CreateIteratorResultObject(_E_, *false*)). + 1. For each element _value_ of _list_, do + 1. Perform ? GeneratorYield(CreateIteratorResultObject(_value_, *false*)). 1. Return NormalCompletion(*undefined*). 1. Let _iterator_ be CreateIteratorFromClosure(_closure_, ~empty~, %Iterator.prototype%). 1. Return the Iterator Record { [[Iterator]]: _iterator_, [[NextMethod]]: %GeneratorPrototype.next%, [[Done]]: *false* }. @@ -9819,29 +9819,29 @@

    BindingRestElement : `...` BindingIdentifier 1. Let _lhs_ be ? ResolveBinding(StringValue of |BindingIdentifier|, _environment_). - 1. Let _A_ be ! ArrayCreate(0). + 1. Let _array_ be ! ArrayCreate(0). 1. Let _n_ be 0. 1. Repeat, 1. Let _next_ be ~done~. 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_, _A_). - 1. Return ? InitializeReferencedBinding(_lhs_, _A_). - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_n_)), _next_). + 1. If _environment_ is *undefined*, return ? PutValue(_lhs_, _array_). + 1. Return ? InitializeReferencedBinding(_lhs_, _array_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_n_)), _next_). 1. Set _n_ to _n_ + 1. BindingRestElement : `...` BindingPattern - 1. Let _A_ be ! ArrayCreate(0). + 1. Let _array_ be ! ArrayCreate(0). 1. Let _n_ be 0. 1. Repeat, 1. Let _next_ be ~done~. 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 _A_ and _environment_. - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_n_)), _next_). + 1. Return ? BindingInitialization of |BindingPattern| with arguments _array_ and _environment_. + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_n_)), _next_). 1. Set _n_ to _n_ + 1. FormalParameters : [empty] @@ -10195,11 +10195,11 @@

    The Environment Record Type Hierarchy

    HasBinding ( - _N_: a String, + _name_: a String, ): either a normal completion containing a Boolean or a throw completion - It determines if an Environment Record has a binding for _N_. + It determines if an Environment Record has a binding for _name_. It has concrete definitions in the following types: @@ -10209,12 +10209,12 @@

    The Environment Record Type Hierarchy

    CreateMutableBinding ( - _N_: a String, - _D_: a Boolean, + _name_: a String, + _deletable_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion - It creates a new but uninitialized mutable binding in an Environment Record. _N_ is the text of the bound name. If _D_ is *true* the binding may be subsequently deleted. + It creates a new but uninitialized mutable binding in an Environment Record. _name_ is the text of the bound name. If _deletable_ is *true* the binding may be subsequently deleted. It has concrete definitions in the following types: @@ -10224,12 +10224,12 @@

    The Environment Record Type Hierarchy

    CreateImmutableBinding ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion - It creates a new but uninitialized immutable binding in an Environment Record. _N_ is the text of the bound name. If _S_ is *true* then attempts to set it after it has been initialized will always throw an exception, regardless of the strict mode setting of operations that reference that binding. + It creates a new but uninitialized immutable binding in an Environment Record. _name_ is the text of the bound name. If _strict_ is *true* then attempts to set it after it has been initialized will always throw an exception, regardless of the strict mode setting of operations that reference that binding. It has concrete definitions in the following types: @@ -10239,12 +10239,12 @@

    The Environment Record Type Hierarchy

    InitializeBinding ( - _N_: a String, - _V_: an ECMAScript language value, + _name_: a String, + _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion - It sets the value of an already existing but uninitialized binding in an Environment Record. _N_ is the text of the bound name. _V_ is the value for the binding. + It sets the value of an already existing but uninitialized binding in an Environment Record. _name_ is the text of the bound name. _value_ is the value for the binding. It has concrete definitions in the following types: @@ -10254,13 +10254,13 @@

    The Environment Record Type Hierarchy

    SetMutableBinding ( - _N_: a String, - _V_: an ECMAScript language value, - _S_: a Boolean, + _name_: a String, + _value_: an ECMAScript language value, + _strict_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion - It sets the value of an already existing mutable binding in an Environment Record. _N_ is the text of the bound name. _V_ is the value for the binding. If _S_ is *true* and the binding cannot be set, this will throw a *TypeError* exception. + It sets the value of an already existing mutable binding in an Environment Record. _name_ is the text of the bound name. _value_ is the value for the binding. If _strict_ is *true* and the binding cannot be set, this will throw a *TypeError* exception. It has concrete definitions in the following types: @@ -10270,12 +10270,12 @@

    The Environment Record Type Hierarchy

    GetBindingValue ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): either a normal completion containing an ECMAScript language value or a throw completion - It returns the value of an already existing binding from an Environment Record. _N_ is the text of the bound name. _S_ is used to identify references originating in strict mode code or that otherwise require strict mode reference semantics. If _S_ is *true* and the binding does not exist, this will throw a *ReferenceError* exception. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _S_. + It returns the value of an already existing binding from an Environment Record. _name_ is the text of the bound name. _strict_ is used to identify references originating in strict mode code or that otherwise require strict mode reference semantics. If _strict_ is *true* and the binding does not exist, this will throw a *ReferenceError* exception. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _strict_. It has concrete definitions in the following types: @@ -10285,11 +10285,11 @@

    The Environment Record Type Hierarchy

    DeleteBinding ( - _N_: a String, + _name_: a String, ): either a normal completion containing a Boolean or a throw completion - It deletes a binding from an Environment Record. _N_ is the text of the bound name. If a binding for _N_ exists, this removes the binding and returns *true*. If the binding exists but cannot be removed, this returns *false*. If the binding does not exist, this returns *true*. + It deletes a binding from an Environment Record. _name_ is the text of the bound name. If a binding for _name_ exists, this removes the binding and returns *true*. If the binding exists but cannot be removed, this returns *false*. If the binding does not exist, this returns *true*. It has concrete definitions in the following types: @@ -10346,7 +10346,7 @@

    Declarative Environment Records

    HasBinding ( - _N_: a String, + _name_: a String, ): a normal completion containing a Boolean

    @@ -10357,7 +10357,7 @@

    It determines if the argument identifier is one of the identifiers bound by the record.

    - 1. If _envRec_ has a binding for _N_, return *true*. + 1. If _envRec_ has a binding for _name_, return *true*. 1. Return *false*.
    @@ -10365,8 +10365,8 @@

    CreateMutableBinding ( - _N_: a String, - _D_: a Boolean, + _name_: a String, + _deletable_: a Boolean, ): a normal completion containing ~unused~

    @@ -10374,11 +10374,11 @@

    a Declarative Environment Record _envRec_
    description
    -
    It creates a new mutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _D_ is *true*, the new binding is marked as being subject to deletion.
    +
    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 _N_. - 1. Create a mutable binding in _envRec_ for _N_ and record that it is uninitialized. If _D_ is *true*, record that the newly created binding may be deleted by a subsequent DeleteBinding call. + 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. Return ~unused~.
    @@ -10386,8 +10386,8 @@

    CreateImmutableBinding ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): a normal completion containing ~unused~

    @@ -10395,11 +10395,11 @@

    a Declarative Environment Record _envRec_
    description
    -
    It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ is *true*, the new binding is marked as a strict binding.
    +
    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 _N_. - 1. Create an immutable binding in _envRec_ for _N_ and record that it is uninitialized. If _S_ is *true*, record that the newly created binding is 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. Return ~unused~.
    @@ -10407,8 +10407,8 @@

    InitializeBinding ( - _N_: a String, - _V_: an ECMAScript language value, + _name_: a String, + _value_: an ECMAScript language value, ): a normal completion containing ~unused~

    @@ -10416,12 +10416,12 @@

    a Declarative Environment Record _envRec_
    description
    -
    It is used to set the bound value of the current binding of the identifier whose name is _N_ to the value _V_. An uninitialized binding for _N_ must already exist.
    +
    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 _N_. - 1. Set the bound value for _N_ in _envRec_ to _V_. - 1. Record that the binding for _N_ in _envRec_ has been initialized. + 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. Return ~unused~.
    @@ -10429,9 +10429,9 @@

    SetMutableBinding ( - _N_: a String, - _V_: an ECMAScript language value, - _S_: a Boolean, + _name_: a String, + _value_: an ECMAScript language value, + _strict_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    @@ -10439,22 +10439,22 @@

    a Declarative Environment Record _envRec_
    description
    -
    It attempts to change the bound value of the current binding of the identifier whose name is _N_ to the value _V_. A binding for _N_ normally already exists, but in rare cases it may not. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*.
    +
    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 _N_, then - 1. If _S_ is *true*, throw a *ReferenceError* exception. - 1. Perform ! _envRec_.CreateMutableBinding(_N_, *true*). - 1. Perform ! _envRec_.InitializeBinding(_N_, _V_). + 1. [id="step-setmutablebinding-missing-binding"] If _envRec_ 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. Return ~unused~. - 1. If the binding for _N_ in _envRec_ is a strict binding, set _S_ to *true*. - 1. If the binding for _N_ in _envRec_ has not yet been initialized, then + 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. Throw a *ReferenceError* exception. - 1. Else if the binding for _N_ in _envRec_ is a mutable binding, then - 1. Change its bound value to _V_. + 1. Else if the binding for _name_ in _envRec_ 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. - 1. If _S_ is *true*, throw a *TypeError* exception. + 1. If _strict_ is *true*, throw a *TypeError* exception. 1. Return ~unused~. @@ -10466,8 +10466,8 @@

    GetBindingValue ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -10475,19 +10475,19 @@

    a Declarative Environment Record _envRec_
    description
    -
    It returns the value of its bound identifier whose name is _N_. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _S_.
    +
    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 _N_. - 1. If the binding for _N_ in _envRec_ is an uninitialized binding, throw a *ReferenceError* exception. - 1. Return the value currently bound to _N_ in _envRec_. + 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_.

    DeleteBinding ( - _N_: a String, + _name_: a String, ): a normal completion containing a Boolean

    @@ -10498,9 +10498,9 @@

    It can only delete bindings that have been explicitly designated as being subject to deletion.

    - 1. Assert: _envRec_ has a binding for _N_. - 1. If the binding for _N_ in _envRec_ cannot be deleted, return *false*. - 1. Remove the binding for _N_ from _envRec_. + 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. Return *true*.
    @@ -10598,7 +10598,7 @@

    Object Environment Records

    HasBinding ( - _N_: a String, + _name_: a String, ): either a normal completion containing a Boolean or a throw completion

    @@ -10606,16 +10606,16 @@

    an Object Environment Record _envRec_
    description
    -
    It determines if its associated binding object has a property whose name is _N_.
    +
    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_, _N_). + 1. Let _foundBinding_ be ? HasProperty(_bindingObject_, _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 _unscopables_ is an Object, then - 1. Let _blocked_ be ToBoolean(? Get(_unscopables_, _N_)). + 1. Let _blocked_ be ToBoolean(? Get(_unscopables_, _name_)). 1. If _blocked_ is *true*, return *false*. 1. Return *true*. @@ -10624,8 +10624,8 @@

    CreateMutableBinding ( - _N_: a String, - _D_: a Boolean, + _name_: a String, + _deletable_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    @@ -10633,28 +10633,28 @@

    an Object Environment Record _envRec_
    description
    -
    It creates in an Environment Record's associated binding object a property whose name is _N_ and initializes it to the value *undefined*. If _D_ is *true*, the new property's [[Configurable]] attribute is set to *true*; otherwise it is set to *false*.
    +
    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_, _N_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }). + 1. Perform ? DefinePropertyOrThrow(_bindingObject_, _name_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _deletable_ }). 1. Return ~unused~. -

    Normally _envRec_ will not have a binding for _N_ 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 _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.

    -

    CreateImmutableBinding ( _N_, _S_ )

    +

    CreateImmutableBinding ( _name_, _strict_ )

    The CreateImmutableBinding concrete method of an Object Environment Record is never used within this specification.

    InitializeBinding ( - _N_: a String, - _V_: an ECMAScript language value, + _name_: a String, + _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

    @@ -10662,10 +10662,10 @@

    an Object Environment Record _envRec_
    description
    -
    It is used to set the bound value of the current binding of the identifier whose name is _N_ to the value _V_.
    +
    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(_N_, _V_, *false*). + 1. Perform ? _envRec_.SetMutableBinding(_name_, _value_, *false*). 1. Return ~unused~. @@ -10676,9 +10676,9 @@

    SetMutableBinding ( - _N_: a String, - _V_: an ECMAScript language value, - _S_: a Boolean, + _name_: a String, + _value_: an ECMAScript language value, + _strict_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    @@ -10686,13 +10686,13 @@

    an Object Environment Record _envRec_
    description
    -
    It attempts to set the value of the Environment Record's associated binding object's property whose name is _N_ to the value _V_. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_.
    +
    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_, _N_). - 1. If _stillExists_ is *false* and _S_ is *true*, throw a *ReferenceError* exception. - 1. Perform ? Set(_bindingObject_, _N_, _V_, _S_). + 1. Let _stillExists_ be ? HasProperty(_bindingObject_, _name_). + 1. If _stillExists_ is *false* and _strict_ is *true*, throw a *ReferenceError* exception. + 1. Perform ? Set(_bindingObject_, _name_, _value_, _strict_). 1. Return ~unused~.
    @@ -10700,8 +10700,8 @@

    GetBindingValue ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -10709,22 +10709,22 @@

    an Object Environment Record _envRec_
    description
    -
    It returns the value of its associated binding object's property whose name is _N_. The property should already exist but if it does not the result depends upon _S_.
    +
    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_, _N_). + 1. Let _value_ be ? HasProperty(_bindingObject_, _name_). 1. If _value_ is *false*, then - 1. If _S_ is *false*, return *undefined*. + 1. If _strict_ is *false*, return *undefined*. 1. Throw a *ReferenceError* exception. - 1. Return ? Get(_bindingObject_, _N_). + 1. Return ? Get(_bindingObject_, _name_).

    DeleteBinding ( - _N_: a String, + _name_: a String, ): either a normal completion containing a Boolean or a throw completion

    @@ -10736,7 +10736,7 @@

    1. Let _bindingObject_ be _envRec_.[[BindingObject]]. - 1. Return ? _bindingObject_.[[Delete]](_N_). + 1. Return ? _bindingObject_.[[Delete]](_name_).
    @@ -10857,7 +10857,7 @@

    Function Environment Records

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

    @@ -10867,7 +10867,7 @@

    1. Assert: _envRec_.[[ThisBindingStatus]] is not ~lexical~. 1. If _envRec_.[[ThisBindingStatus]] is ~initialized~, throw a *ReferenceError* exception. - 1. Set _envRec_.[[ThisValue]] to _V_. + 1. Set _envRec_.[[ThisValue]] to _value_. 1. Set _envRec_.[[ThisBindingStatus]] to ~initialized~. 1. Return ~unused~. @@ -10990,7 +10990,7 @@

    Global Environment Records

    HasBinding ( - _N_: a String, + _name_: a String, ): either a normal completion containing a Boolean or a throw completion

    @@ -11001,18 +11001,18 @@

    It determines if the argument identifier is one of the identifiers bound by the record.

    - 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. - 1. If ! _DclRec_.HasBinding(_N_) is *true*, return *true*. - 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _ObjRec_.HasBinding(_N_). + 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, return *true*. + 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. + 1. Return ? _objectRecord_.HasBinding(_name_).

    CreateMutableBinding ( - _N_: a String, - _D_: a Boolean, + _name_: a String, + _deletable_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    @@ -11020,20 +11020,20 @@

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

    CreateImmutableBinding ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    @@ -11041,20 +11041,20 @@

    a Global Environment Record _envRec_
    description
    -
    It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ is *true*, the new binding is marked as a strict binding.
    +
    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 _DclRec_ be _envRec_.[[DeclarativeRecord]]. - 1. If ! _DclRec_.HasBinding(_N_) is *true*, throw a *TypeError* exception. - 1. Return ! _DclRec_.CreateImmutableBinding(_N_, _S_). + 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. If ! _declarativeRecord_.HasBinding(_name_) is *true*, throw a *TypeError* exception. + 1. Return ! _declarativeRecord_.CreateImmutableBinding(_name_, _strict_).

    InitializeBinding ( - _N_: a String, - _V_: an ECMAScript language value, + _name_: a String, + _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

    @@ -11062,24 +11062,24 @@

    a Global Environment Record _envRec_
    description
    -
    It is used to set the bound value of the current binding of the identifier whose name is _N_ to the value _V_. An uninitialized binding for _N_ must already exist.
    +
    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 _DclRec_ be _envRec_.[[DeclarativeRecord]]. - 1. If ! _DclRec_.HasBinding(_N_) is *true*, then - 1. Return ! _DclRec_.InitializeBinding(_N_, _V_). + 1. Let _declarativeRecord_ be _envRec_.[[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 _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _ObjRec_.InitializeBinding(_N_, _V_). + 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. + 1. Return ? _objectRecord_.InitializeBinding(_name_, _value_).

    SetMutableBinding ( - _N_: a String, - _V_: an ECMAScript language value, - _S_: a Boolean, + _name_: a String, + _value_: an ECMAScript language value, + _strict_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    @@ -11087,22 +11087,22 @@

    a Global Environment Record _envRec_
    description
    -
    It attempts to change the bound value of the current binding of the identifier whose name is _N_ to the value _V_. If the binding is an immutable binding and _S_ is *true*, a *TypeError* is thrown. A binding named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_.
    +
    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 _DclRec_ be _envRec_.[[DeclarativeRecord]]. - 1. If ! _DclRec_.HasBinding(_N_) is *true*, then - 1. Return ? _DclRec_.SetMutableBinding(_N_, _V_, _S_). - 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _ObjRec_.SetMutableBinding(_N_, _V_, _S_). + 1. Let _declarativeRecord_ be _envRec_.[[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_).

    GetBindingValue ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -11110,21 +11110,21 @@

    a Global Environment Record _envRec_
    description
    -
    It returns the value of its bound identifier whose name is _N_. If the binding is an uninitialized binding, it will throw a *ReferenceError* exception. A binding named _N_ normally already exists but if it does not, error handling is determined by _S_.
    +
    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 _DclRec_ be _envRec_.[[DeclarativeRecord]]. - 1. If ! _DclRec_.HasBinding(_N_) is *true*, then - 1. Return ? _DclRec_.GetBindingValue(_N_, _S_). - 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Return ? _ObjRec_.GetBindingValue(_N_, _S_). + 1. Let _declarativeRecord_ be _envRec_.[[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_).

    DeleteBinding ( - _N_: a String, + _name_: a String, ): either a normal completion containing a Boolean or a throw completion

    @@ -11135,14 +11135,14 @@

    It can only delete bindings that have been explicitly designated as being subject to deletion.

    - 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. - 1. If ! _DclRec_.HasBinding(_N_) is *true*, then - 1. Return ! _DclRec_.DeleteBinding(_N_). - 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. - 1. Let _existingProp_ be ? HasOwnProperty(_globalObject_, _N_). + 1. Let _declarativeRecord_ be _envRec_.[[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 ? _ObjRec_.DeleteBinding(_N_). + 1. Return ? _objectRecord_.DeleteBinding(_name_). 1. Return *true*.
    @@ -11201,7 +11201,7 @@

    WithBaseObject ( ): *undefined*

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

    @@ -11209,8 +11209,8 @@

    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|.

    - 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. - 1. Return ! _DclRec_.HasBinding(_N_). + 1. Let _declarativeRecord_ be _envRec_.[[DeclarativeRecord]]. + 1. Return ! _declarativeRecord_.HasBinding(_name_). @@ -11218,7 +11218,7 @@

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

    @@ -11226,9 +11226,9 @@

    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 _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. - 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_N_). + 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. Return *true*. @@ -11242,17 +11242,17 @@

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

    description
    -
    It determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument _N_. Redundant var declarations and var declarations for pre-existing global object properties are allowed.
    +
    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 _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. - 1. Let _hasProperty_ be ? HasOwnProperty(_globalObject_, _N_). + 1. Let _objectRecord_ be _envRec_.[[ObjectRecord]]. + 1. Let _globalObject_ be _objectRecord_.[[BindingObject]]. + 1. Let _hasProperty_ be ? HasOwnProperty(_globalObject_, _name_). 1. If _hasProperty_ is *true*, return *true*. 1. Return ? IsExtensible(_globalObject_). @@ -11262,17 +11262,17 @@

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

    description
    -
    It determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _N_.
    +
    It determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _name_.
    - 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. - 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_N_). + 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*. @@ -11284,8 +11284,8 @@

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

    @@ -11293,13 +11293,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 _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. - 1. Let _hasProperty_ be ? HasOwnProperty(_globalObject_, _N_). + 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. If _hasProperty_ is *false* and _extensible_ is *true*, then - 1. Perform ? _ObjRec_.CreateMutableBinding(_N_, _D_). - 1. Perform ? _ObjRec_.InitializeBinding(_N_, *undefined*). + 1. Perform ? _objectRecord_.CreateMutableBinding(_name_, _deletable_). + 1. Perform ? _objectRecord_.InitializeBinding(_name_, *undefined*). 1. Return ~unused~. @@ -11308,9 +11308,9 @@

    CreateGlobalFunctionBinding ( _envRec_: a Global Environment Record, - _N_: a String, - _V_: an ECMAScript language value, - _D_: a Boolean, + _name_: a String, + _value_: an ECMAScript language value, + _deletable_: a Boolean, ): either a normal completion containing ~unused~ or a throw completion

    @@ -11318,15 +11318,15 @@

    It creates and initializes a mutable binding in the associated Object Environment Record. If a binding already exists, it is replaced.

    - 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. - 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. - 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_N_). + 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]]: _V_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }. + 1. Let _desc_ be the PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _deletable_ }. 1. Else, - 1. Let _desc_ be the PropertyDescriptor { [[Value]]: _V_ }. - 1. Perform ? DefinePropertyOrThrow(_globalObject_, _N_, _desc_). - 1. [id="step-createglobalfunctionbinding-set"] Perform ? Set(_globalObject_, _N_, _V_, *false*). + 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. Return ~unused~. @@ -11343,8 +11343,8 @@

    Module Environment Records

    GetBindingValue ( - _N_: a String, - _S_: a Boolean, + _name_: a String, + _strict_: a Boolean, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -11352,26 +11352,26 @@

    a Module Environment Record _envRec_
    description
    -
    It returns the value of its bound identifier whose name is _N_. 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.
    +
    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: _S_ is *true*. - 1. Assert: _envRec_ has a binding for _N_. - 1. If the binding for _N_ is an indirect binding, then - 1. Let _M_ and _N2_ be the indirection values provided when this binding for _N_ was created. - 1. Let _targetEnv_ be _M_.[[Environment]]. + 1. Assert: _strict_ is *true*. + 1. Assert: _envRec_ 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(_N2_, *true*). - 1. If the binding for _N_ in _envRec_ is an uninitialized binding, throw a *ReferenceError* exception. - 1. Return the value currently bound to _N_ in _envRec_. + 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_. -

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

    +

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

    -

    DeleteBinding ( _N_ )

    +

    DeleteBinding ( _name_ )

    The DeleteBinding concrete method of a Module Environment Record is never used within this specification.

    Module Environment Records are only used within strict code and an early error rule prevents the delete operator, in strict code, from being applied to a Reference Record that would resolve to a Module Environment Record binding. See .

    @@ -11407,19 +11407,19 @@

    GetThisBinding ( ): a normal completion containing *undefined*

    CreateImportBinding ( _envRec_: a Module Environment Record, - _N_: a String, - _M_: a Module Record, - _N2_: a String, + _name_: a String, + _targetModule_: a Module Record, + _targetName_: a String, ): ~unused~

    description
    -
    It creates a new initialized immutable indirect binding for the name _N_. A binding must not already exist in _envRec_ for _N_. _N2_ is the name of a binding that exists in _M_'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 _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.
    - 1. Assert: _envRec_ does not already have a binding for _N_. - 1. Assert: When _M_.[[Environment]] is instantiated, it will have a direct binding for _N2_. - 1. Create an immutable indirect binding in _envRec_ for _N_ that references _M_ and _N2_ as its target binding and record that the binding is initialized. + 1. Assert: _envRec_ 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. Return ~unused~.
    @@ -11454,14 +11454,14 @@

    NewDeclarativeEnvironment ( - _E_: an Environment Record or *null*, + _outerEnv_: an Environment Record or *null*, ): a Declarative Environment Record

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

    NewObjectEnvironment ( - _O_: an Object, - _W_: a Boolean, - _E_: an Environment Record or *null*, + _obj_: an Object, + _isWithEnvironment_: 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 _O_. - 1. Set _env_.[[IsWithEnvironment]] to _W_. - 1. Set _env_.[[OuterEnv]] to _E_. + 1. Set _env_.[[BindingObject]] to _obj_. + 1. Set _env_.[[IsWithEnvironment]] to _isWithEnvironment_. + 1. Set _env_.[[OuterEnv]] to _outerEnv_. 1. Return _env_.
    @@ -11488,7 +11488,7 @@

    NewFunctionEnvironment ( - _F_: an ECMAScript function object, + _func_: an ECMAScript function object, _newTarget_: an Object or *undefined*, ): a Function Environment Record

    @@ -11496,11 +11496,11 @@

    1. Let _env_ be a new Function Environment Record containing no bindings. - 1. Set _env_.[[FunctionObject]] to _F_. - 1. If _F_.[[ThisMode]] is ~lexical~, set _env_.[[ThisBindingStatus]] to ~lexical~. + 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 _F_.[[Environment]]. + 1. Set _env_.[[OuterEnv]] to _func_.[[Environment]]. 1. Return _env_.
    @@ -11508,14 +11508,14 @@

    NewGlobalEnvironment ( - _G_: an Object, + _obj_: an Object, _thisValue_: an Object, ): a Global Environment Record

    - 1. Let _objRec_ be NewObjectEnvironment(_G_, *false*, *null*). + 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_. @@ -11529,14 +11529,14 @@

    NewModuleEnvironment ( - _E_: an Environment Record, + _outerEnv_: an Environment Record, ): a Module Environment Record

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

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

    @@ -12133,7 +12133,7 @@

    An implementation of HostCallJobCallback must conform to the following requirements:

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

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

    @@ -12141,7 +12141,7 @@

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

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

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

    @@ -12288,8 +12288,8 @@

    AgentSignifier ( ): an agent signifier

    - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Return _AR_.[[Signifier]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Return _agentRecord_.[[Signifier]]. @@ -12298,8 +12298,8 @@

    AgentCanSuspend ( ): a Boolean

    - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Return _AR_.[[CanBlock]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Return _agentRecord_.[[CanBlock]].

    In some environments it may not be reasonable for a given agent to suspend. For example, in a web browser environment, it may be reasonable to disallow suspending a document's main event handling thread, while still allowing workers' event handling threads to suspend.

    @@ -12311,9 +12311,9 @@

    IncrementModuleAsyncEvaluationCount ( ): an integer

    - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _count_ be _AR_.[[ModuleAsyncEvaluationCount]]. - 1. Set _AR_.[[ModuleAsyncEvaluationCount]] to _count_ + 1. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _count_ be _agentRecord_.[[ModuleAsyncEvaluationCount]]. + 1. Set _agentRecord_.[[ModuleAsyncEvaluationCount]] to _count_ + 1. 1. Return _count_. @@ -12426,7 +12426,7 @@

    Objectives

    Liveness

    -

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

    +

    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*.

    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. @@ -12438,14 +12438,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 _S_ is considered live if either of the following conditions is met:

    +

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

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

    Liveness

    Execution

    -

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

    +

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

    - 1. For each element _value_ of _S_, do + 1. For each element _value_ of _objectSet_, 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 @@ -12493,7 +12493,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 _S_ in which to empty WeakRefs, this definition requires that it empties WeakRefs for all values in _S_ 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 _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_.

    @@ -12595,31 +12595,31 @@

    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 _P_ is missing from an ordinary object _O_ but exists on its [[Prototype]] object. If _P_ refers to a data property on the [[Prototype]] object, _O_ inherits it for get access, making it behave as if _P_ was a property of _O_. If _P_ refers to a writable data property on the [[Prototype]] object, set access of _P_ on _O_ creates a new data property named _P_ on _O_. If _P_ refers to a non-writable data property on the [[Prototype]] object, set access of _P_ on _O_ fails. If _P_ refers to an accessor property on the [[Prototype]] object, the accessor is inherited by _O_ for both get access and set access.

    +

    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 _O_ is an ordinary object, _P_ is a property key value, _V_ is any ECMAScript language value, and _Desc_ 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 _O_ 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.

    +

    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.

    +

    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.

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

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return OrdinaryGetPrototypeOf(_O_). + 1. Return OrdinaryGetPrototypeOf(_obj_).

    OrdinaryGetPrototypeOf ( - _O_: an Object, + _obj_: an Object, ): an Object or *null*

    - 1. Return _O_.[[Prototype]]. + 1. Return _obj_.[[Prototype]].
    @@ -12627,42 +12627,42 @@

    [[SetPrototypeOf]] ( - _V_: an Object or *null*, + _proto_: an Object or *null*, ): a normal completion containing a Boolean

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return OrdinarySetPrototypeOf(_O_, _V_). + 1. Return OrdinarySetPrototypeOf(_obj_, _proto_).

    OrdinarySetPrototypeOf ( - _O_: an Object, - _V_: an Object or *null*, + _obj_: an Object, + _proto_: an Object or *null*, ): a Boolean

    - 1. Let _current_ be _O_.[[Prototype]]. - 1. If SameValue(_V_, _current_) is *true*, return *true*. - 1. Let _extensible_ be _O_.[[Extensible]]. + 1. Let _current_ be _obj_.[[Prototype]]. + 1. If SameValue(_proto_, _current_) is *true*, return *true*. + 1. Let _extensible_ be _obj_.[[Extensible]]. 1. If _extensible_ is *false*, return *false*. - 1. Let _p_ be _V_. + 1. Let _cursor_ be _proto_. 1. Let _done_ be *false*. 1. [id="step-ordinarysetprototypeof-loop"] Repeat, while _done_ is *false*, - 1. If _p_ is *null*, then + 1. If _cursor_ is *null*, then 1. Set _done_ to *true*. - 1. Else if SameValue(_p_, _O_) is *true*, then + 1. Else if SameValue(_cursor_, _obj_) is *true*, then 1. Return *false*. 1. Else, - 1. If _p_.[[GetPrototypeOf]] is not the ordinary object internal method defined in , set _done_ to *true*. - 1. Else, set _p_ to _p_.[[Prototype]]. - 1. Set _O_.[[Prototype]] to _V_. + 1. If _cursor_.[[GetPrototypeOf]] is not the ordinary object internal method defined in , set _done_ to *true*. + 1. Else, set _cursor_ to _cursor_.[[Prototype]]. + 1. Set _obj_.[[Prototype]] to _proto_. 1. Return *true*. @@ -12675,22 +12675,22 @@

    [[IsExtensible]] ( ): a normal completion containing a Boolean

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return OrdinaryIsExtensible(_O_). + 1. Return OrdinaryIsExtensible(_obj_).

    OrdinaryIsExtensible ( - _O_: an Object, + _obj_: an Object, ): a Boolean

    - 1. Return _O_.[[Extensible]]. + 1. Return _obj_.[[Extensible]].
    @@ -12699,22 +12699,22 @@

    [[PreventExtensions]] ( ): a normal completion containing *true*

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return OrdinaryPreventExtensions(_O_). + 1. Return OrdinaryPreventExtensions(_obj_).

    OrdinaryPreventExtensions ( - _O_: an Object, + _obj_: an Object, ): *true*

    - 1. Set _O_.[[Extensible]] to *false*. + 1. Set _obj_.[[Extensible]] to *false*. 1. Return *true*.
    @@ -12723,40 +12723,40 @@

    [[GetOwnProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): a normal completion containing either a Property Descriptor or *undefined*

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return OrdinaryGetOwnProperty(_O_, _P_). + 1. Return OrdinaryGetOwnProperty(_obj_, _propertyKey_).

    OrdinaryGetOwnProperty ( - _O_: an Object, - _P_: a property key, + _obj_: an Object, + _propertyKey_: a property key, ): a Property Descriptor or *undefined*

    - 1. If _O_ does not have an own property with key _P_, return *undefined*. - 1. Let _D_ be a newly created Property Descriptor with no fields. - 1. Let _X_ be _O_'s own property whose key is _P_. - 1. If _X_ is a data property, then - 1. Set _D_.[[Value]] to the value of _X_'s [[Value]] attribute. - 1. Set _D_.[[Writable]] to the value of _X_'s [[Writable]] attribute. + 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 _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. Else, - 1. Assert: _X_ is an accessor property. - 1. Set _D_.[[Get]] to the value of _X_'s [[Get]] attribute. - 1. Set _D_.[[Set]] to the value of _X_'s [[Set]] attribute. - 1. Set _D_.[[Enumerable]] to the value of _X_'s [[Enumerable]] attribute. - 1. Set _D_.[[Configurable]] to the value of _X_'s [[Configurable]] attribute. - 1. Return _D_. + 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_.
    @@ -12764,98 +12764,98 @@

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

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return ? OrdinaryDefineOwnProperty(_O_, _P_, _Desc_). + 1. Return ? OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _desc_).

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

    - 1. Let _current_ be ? _O_.[[GetOwnProperty]](_P_). - 1. Let _extensible_ be ? IsExtensible(_O_). - 1. Return ValidateAndApplyPropertyDescriptor(_O_, _P_, _extensible_, _Desc_, _current_). + 1. Let _current_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. Let _extensible_ be ? IsExtensible(_obj_). + 1. Return ValidateAndApplyPropertyDescriptor(_obj_, _propertyKey_, _extensible_, _desc_, _current_).

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

    - 1. Return ValidateAndApplyPropertyDescriptor(*undefined*, *""*, _Extensible_, _Desc_, _Current_). + 1. Return ValidateAndApplyPropertyDescriptor(*undefined*, *""*, _extensible_, _desc_, _current_).

    ValidateAndApplyPropertyDescriptor ( - _O_: an Object or *undefined*, - _P_: a property key, + _obj_: an Object or *undefined*, + _propertyKey_: a property key, _extensible_: a Boolean, - _Desc_: a Property Descriptor, + _desc_: 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 _O_ is not *undefined*, it is performed for the property named _P_ (which is created if necessary).
    +
    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).
    - 1. Assert: _P_ is a property key. + 1. Assert: _propertyKey_ is a property key. 1. If _current_ is *undefined*, then 1. If _extensible_ is *false*, return *false*. - 1. If _O_ is *undefined*, return *true*. - 1. If IsAccessorDescriptor(_Desc_) is *true*, then - 1. Create an own accessor property named _P_ of object _O_ 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 _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. Else, - 1. Create an own data property named _P_ of object _O_ 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 _desc_ if _desc_ 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 _desc_ 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 _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 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 _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. Else if _current_.[[Writable]] is *false*, then - 1. If _Desc_ has a [[Writable]] field and _Desc_.[[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 _O_ remains unmodified. - 1. If _Desc_ has a [[Value]] field, return SameValue(_Desc_.[[Value]], _current_.[[Value]]). - 1. If _O_ 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 _P_ of object _O_ 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 _P_ of object _O_ 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 _desc_ has a [[Writable]] field and _desc_.[[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 _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. Else, - 1. For each field name _F_ of _Desc_, set the attribute named _F_ of the property named _P_ of object _O_ to the value of _Desc_'s _F_ field. + 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. Return *true*.
    @@ -12864,32 +12864,32 @@

    [[HasProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return ? OrdinaryHasProperty(_O_, _P_). + 1. Return ? OrdinaryHasProperty(_obj_, _propertyKey_).

    OrdinaryHasProperty ( - _O_: an Object, - _P_: a property key, + _obj_: an Object, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    - 1. Let _hasOwn_ be ? _O_.[[GetOwnProperty]](_P_). + 1. Let _hasOwn_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). 1. If _hasOwn_ is not *undefined*, return *true*. - 1. Let _parent_ be ? _O_.[[GetPrototypeOf]](). + 1. Let _parent_ be ? _obj_.[[GetPrototypeOf]](). 1. If _parent_ is not *null*, then - 1. Return ? _parent_.[[HasProperty]](_P_). + 1. Return ? _parent_.[[HasProperty]](_propertyKey_). 1. Return *false*.
    @@ -12898,41 +12898,41 @@

    [[Get]] ( - _P_: a property key, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _receiver_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return ? OrdinaryGet(_O_, _P_, _Receiver_). + 1. Return ? OrdinaryGet(_obj_, _propertyKey_, _receiver_).

    OrdinaryGet ( - _O_: an Object, - _P_: a property key, - _Receiver_: an ECMAScript language value, + _obj_: an Object, + _propertyKey_: a property key, + _receiver_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    - 1. Let _desc_ be ? _O_.[[GetOwnProperty]](_P_). + 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). 1. If _desc_ is *undefined*, then - 1. Let _parent_ be ? _O_.[[GetPrototypeOf]](). + 1. Let _parent_ be ? _obj_.[[GetPrototypeOf]](). 1. If _parent_ is *null*, return *undefined*. - 1. Return ? _parent_.[[Get]](_P_, _Receiver_). + 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 _getter_ is *undefined*, return *undefined*. - 1. Return ? Call(_getter_, _Receiver_). + 1. Return ? Call(_getter_, _receiver_).
    @@ -12940,44 +12940,44 @@

    [[Set]] ( - _P_: a property key, - _V_: an ECMAScript language value, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _receiver_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return ? OrdinarySet(_O_, _P_, _V_, _Receiver_). + 1. Return ? OrdinarySet(_obj_, _propertyKey_, _value_, _receiver_).

    OrdinarySet ( - _O_: an Object, - _P_: a property key, - _V_: an ECMAScript language value, - _Receiver_: an ECMAScript language value, + _obj_: an Object, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _receiver_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    - 1. Let _ownDesc_ be ? _O_.[[GetOwnProperty]](_P_). - 1. Return ? OrdinarySetWithOwnDescriptor(_O_, _P_, _V_, _Receiver_, _ownDesc_). + 1. Let _ownDesc_ be ? _obj_.[[GetOwnProperty]](_propertyKey_). + 1. Return ? OrdinarySetWithOwnDescriptor(_obj_, _propertyKey_, _value_, _receiver_, _ownDesc_).

    OrdinarySetWithOwnDescriptor ( - _O_: an Object, - _P_: a property key, - _V_: an ECMAScript language value, - _Receiver_: an ECMAScript language value, + _obj_: an Object, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _receiver_: an ECMAScript language value, _ownDesc_: a Property Descriptor or *undefined*, ): either a normal completion containing a Boolean or a throw completion

    @@ -12986,24 +12986,24 @@

    1. If _ownDesc_ is *undefined*, then - 1. Let _parent_ be ? _O_.[[GetPrototypeOf]](). - 1. If _parent_ is not *null*, return ? _parent_.[[Set]](_P_, _V_, _Receiver_). + 1. Let _parent_ be ? _obj_.[[GetPrototypeOf]](). + 1. If _parent_ is not *null*, return ? _parent_.[[Set]](_propertyKey_, _value_, _receiver_). 1. Set _ownDesc_ to the PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *true* }. 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]](_P_). + 1. If _receiver_ is not an Object, return *false*. + 1. Let _existingDescriptor_ be ? _receiver_.[[GetOwnProperty]](_propertyKey_). 1. If _existingDescriptor_ is *undefined*, then - 1. Assert: _Receiver_ does not currently have a property _P_. - 1. Return ? CreateDataProperty(_Receiver_, _P_, _V_). + 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. Let _valueDesc_ be the PropertyDescriptor { [[Value]]: _V_ }. - 1. Return ? _Receiver_.[[DefineOwnProperty]](_P_, _valueDesc_). + 1. Let _valueDesc_ be the PropertyDescriptor { [[Value]]: _value_ }. + 1. Return ? _receiver_.[[DefineOwnProperty]](_propertyKey_, _valueDesc_). 1. Assert: IsAccessorDescriptor(_ownDesc_) is *true*. 1. Let _setter_ be _ownDesc_.[[Set]]. 1. If _setter_ is *undefined*, return *false*. - 1. Perform ? Call(_setter_, _Receiver_, « _V_ »). + 1. Perform ? Call(_setter_, _receiver_, « _value_ »). 1. Return *true*. @@ -13012,31 +13012,31 @@

    [[Delete]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return ? OrdinaryDelete(_O_, _P_). + 1. Return ? OrdinaryDelete(_obj_, _propertyKey_).

    OrdinaryDelete ( - _O_: an Object, - _P_: a property key, + _obj_: an Object, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

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

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

    for
    -
    an ordinary object _O_
    +
    an ordinary object _obj_
    - 1. Return OrdinaryOwnPropertyKeys(_O_). + 1. Return OrdinaryOwnPropertyKeys(_obj_).

    OrdinaryOwnPropertyKeys ( - _O_: an Object, + _obj_: an Object, ): a List of property keys

    @@ -13064,12 +13064,12 @@

    1. Let _keys_ be a new empty List. - 1. For each own property key _P_ of _O_ such that _P_ is an array index, in ascending numeric index order, do - 1. Append _P_ to _keys_. - 1. For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an array index, in ascending chronological order of property creation, do - 1. Append _P_ to _keys_. - 1. For each own property key _P_ of _O_ such that _P_ is a Symbol, in ascending chronological order of property creation, do - 1. Append _P_ to _keys_. + 1. For each own property key _propertyKey_ of _obj_ such that _propertyKey_ is an array index, 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_. + 1. For each own property key _propertyKey_ of _obj_ such that _propertyKey_ is a Symbol, in ascending chronological order of property creation, do + 1. Append _propertyKey_ to _keys_. 1. Return _keys_. @@ -13089,9 +13089,9 @@

    1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]] ». 1. If _additionalInternalSlotsList_ is present, set _internalSlotsList_ to the list-concatenation of _internalSlotsList_ and _additionalInternalSlotsList_. - 1. Let _O_ be MakeBasicObject(_internalSlotsList_). - 1. Set _O_.[[Prototype]] to _proto_. - 1. Return _O_. + 1. Let _obj_ be MakeBasicObject(_internalSlotsList_). + 1. Set _obj_.[[Prototype]] to _proto_. + 1. Return _obj_. @@ -13147,17 +13147,17 @@

    RequireInternalSlot ( - _O_: an ECMAScript language value, + _obj_: an ECMAScript language value, _internalSlot_: an internal slot name, ): either a normal completion containing ~unused~ or a throw completion

    description
    -
    It throws an exception unless _O_ is an Object and has the given internal slot.
    +
    It throws an exception unless _obj_ is an Object and has the given internal slot.
    - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. If _O_ does not have an _internalSlot_ internal slot, throw a *TypeError* exception. + 1. If _obj_ is not an Object, throw a *TypeError* exception. + 1. If _obj_ does not have an _internalSlot_ internal slot, throw a *TypeError* exception. 1. Return ~unused~.
    @@ -13360,19 +13360,19 @@

    for
    -
    an ECMAScript function object _F_
    +
    an ECMAScript function object _func_
    1. Let _callerContext_ be the running execution context. - 1. Let _calleeContext_ be PrepareForOrdinaryCall(_F_, *undefined*). + 1. Let _calleeContext_ be PrepareForOrdinaryCall(_func_, *undefined*). 1. Assert: _calleeContext_ is now the running execution context. - 1. If _F_.[[IsClassConstructor]] is *true*, then + 1. If _func_.[[IsClassConstructor]] is *true*, then 1. Let _error_ be a newly created *TypeError* object. - 1. NOTE: _error_ is created in _calleeContext_ with _F_'s associated Realm Record. + 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(_F_, _calleeContext_, _thisArgument_). - 1. Let _result_ be Completion(OrdinaryCallEvaluateBody(_F_, _argumentsList_)). + 1. Perform OrdinaryCallBindThis(_func_, _calleeContext_, _thisArgument_). + 1. Let _result_ be Completion(OrdinaryCallEvaluateBody(_func_, _argumentsList_)). 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. @@ -13385,7 +13385,7 @@

    PrepareForOrdinaryCall ( - _F_: an ECMAScript function object, + _func_: an ECMAScript function object, _newTarget_: an Object or *undefined*, ): an execution context

    @@ -13394,14 +13394,14 @@

    1. Let _callerContext_ be the running execution context. 1. Let _calleeContext_ be a new ECMAScript code execution context. - 1. Set the Function of _calleeContext_ to _F_. - 1. Let _calleeRealm_ be _F_.[[Realm]]. + 1. Set the Function of _calleeContext_ to _func_. + 1. Let _calleeRealm_ be _func_.[[Realm]]. 1. Set the Realm of _calleeContext_ to _calleeRealm_. - 1. Set the ScriptOrModule of _calleeContext_ to _F_.[[ScriptOrModule]]. - 1. Let _localEnv_ be NewFunctionEnvironment(_F_, _newTarget_). + 1. Set the ScriptOrModule of _calleeContext_ to _func_.[[ScriptOrModule]]. + 1. Let _localEnv_ be NewFunctionEnvironment(_func_, _newTarget_). 1. Set the LexicalEnvironment of _calleeContext_ to _localEnv_. 1. Set the VariableEnvironment of _calleeContext_ to _localEnv_. - 1. Set the PrivateEnvironment of _calleeContext_ to _F_.[[PrivateEnvironment]]. + 1. Set the PrivateEnvironment of _calleeContext_ to _func_.[[PrivateEnvironment]]. 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. NOTE: Any exception objects produced after this point are associated with _calleeRealm_. @@ -13412,7 +13412,7 @@

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

    - 1. Let _thisMode_ be _F_.[[ThisMode]]. + 1. Let _thisMode_ be _func_.[[ThisMode]]. 1. If _thisMode_ is ~lexical~, return ~unused~. - 1. Let _calleeRealm_ be _F_.[[Realm]]. + 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_. @@ -13444,7 +13444,7 @@

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

    @@ -13452,33 +13452,33 @@

    FunctionBody : FunctionStatementList - 1. Return ? EvaluateFunctionBody of |FunctionBody| with arguments _functionObject_ and _argumentsList_. + 1. Return ? EvaluateFunctionBody of |FunctionBody| with arguments _func_ and _argumentsList_. ConciseBody : ExpressionBody - 1. Return ? EvaluateConciseBody of |ConciseBody| with arguments _functionObject_ and _argumentsList_. + 1. Return ? EvaluateConciseBody of |ConciseBody| with arguments _func_ and _argumentsList_. GeneratorBody : FunctionBody - 1. Return ? EvaluateGeneratorBody of |GeneratorBody| with arguments _functionObject_ and _argumentsList_. + 1. Return ? EvaluateGeneratorBody of |GeneratorBody| with arguments _func_ and _argumentsList_. AsyncGeneratorBody : FunctionBody - 1. Return ? EvaluateAsyncGeneratorBody of |AsyncGeneratorBody| with arguments _functionObject_ and _argumentsList_. + 1. Return ? EvaluateAsyncGeneratorBody of |AsyncGeneratorBody| with arguments _func_ and _argumentsList_. AsyncFunctionBody : FunctionBody - 1. Return ? EvaluateAsyncFunctionBody of |AsyncFunctionBody| with arguments _functionObject_ and _argumentsList_. + 1. Return ? EvaluateAsyncFunctionBody of |AsyncFunctionBody| with arguments _func_ and _argumentsList_. AsyncConciseBody : ExpressionBody - 1. Return ? EvaluateAsyncConciseBody of |AsyncConciseBody| with arguments _functionObject_ and _argumentsList_. + 1. Return ? EvaluateAsyncConciseBody of |AsyncConciseBody| with arguments _func_ and _argumentsList_. Initializer : @@ -13486,9 +13486,9 @@

    1. Assert: _argumentsList_ is empty. - 1. Assert: _functionObject_.[[ClassFieldInitializerName]] is not ~empty~. + 1. Assert: _func_.[[ClassFieldInitializerName]] is not ~empty~. 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true*, then - 1. Let _value_ be ? NamedEvaluation of |Initializer| with argument _functionObject_.[[ClassFieldInitializerName]]. + 1. Let _value_ be ? NamedEvaluation of |Initializer| with argument _func_.[[ClassFieldInitializerName]]. 1. Else, 1. Let _rhs_ be ? Evaluation of |AssignmentExpression|. 1. Let _value_ be ? GetValue(_rhs_). @@ -13502,21 +13502,21 @@

    1. Assert: _argumentsList_ is empty. - 1. Return ? EvaluateClassStaticBlockBody of |ClassStaticBlockBody| with argument _functionObject_. + 1. Return ? EvaluateClassStaticBlockBody of |ClassStaticBlockBody| with argument _func_.

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

    - 1. Return ? EvaluateBody of _F_.[[ECMAScriptCode]] with arguments _F_ and _argumentsList_. + 1. Return ? EvaluateBody of _func_.[[ECMAScriptCode]] with arguments _func_ and _argumentsList_.
    @@ -13530,23 +13530,23 @@

    for
    -
    an ECMAScript function object _F_
    +
    an ECMAScript function object _func_
    1. Let _callerContext_ be the running execution context. - 1. Let _kind_ be _F_.[[ConstructorKind]]. + 1. Let _kind_ be _func_.[[ConstructorKind]]. 1. If _kind_ is ~base~, then 1. Let _thisArgument_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Object.prototype%"*). - 1. Let _calleeContext_ be PrepareForOrdinaryCall(_F_, _newTarget_). + 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(_F_, _calleeContext_, _thisArgument_). - 1. Let _initializeResult_ be Completion(InitializeInstanceElements(_thisArgument_, _F_)). + 1. Perform OrdinaryCallBindThis(_func_, _calleeContext_, _thisArgument_). + 1. Let _initializeResult_ be Completion(InitializeInstanceElements(_thisArgument_, _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(_F_, _argumentsList_)). + 1. Let _result_ be Completion(OrdinaryCallEvaluateBody(_func_, _argumentsList_)). 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_. @@ -13565,8 +13565,8 @@

    OrdinaryFunctionCreate ( _functionPrototype_: an Object, _sourceText_: a sequence of Unicode code points, - _ParameterList_: a Parse Node, - _Body_: a Parse Node, + _parameterList_: a Parse Node, + _body_: a Parse Node, _thisMode_: ~lexical-this~ or ~non-lexical-this~, _env_: an Environment Record, _privateEnv_: a PrivateEnvironment Record or *null*, @@ -13578,35 +13578,35 @@

    1. Let _internalSlotsList_ be the internal slots listed in . - 1. Let _F_ be OrdinaryObjectCreate(_functionPrototype_, _internalSlotsList_). - 1. Set _F_.[[Call]] to the definition specified in . - 1. Set _F_.[[SourceText]] to _sourceText_. - 1. Set _F_.[[FormalParameters]] to _ParameterList_. - 1. Set _F_.[[ECMAScriptCode]] to _Body_. - 1. Let _Strict_ be IsStrict(_Body_). - 1. Set _F_.[[Strict]] to _Strict_. - 1. If _thisMode_ is ~lexical-this~, set _F_.[[ThisMode]] to ~lexical~. - 1. Else if _Strict_ is *true*, set _F_.[[ThisMode]] to ~strict~. - 1. Else, set _F_.[[ThisMode]] to ~global~. - 1. Set _F_.[[IsClassConstructor]] to *false*. - 1. Set _F_.[[Environment]] to _env_. - 1. Set _F_.[[PrivateEnvironment]] to _privateEnv_. - 1. Set _F_.[[ScriptOrModule]] to GetActiveScriptOrModule(). - 1. Set _F_.[[Realm]] to the current Realm Record. - 1. Set _F_.[[HomeObject]] to *undefined*. - 1. Set _F_.[[Fields]] to a new empty List. - 1. Set _F_.[[PrivateMethods]] to a new empty List. - 1. Set _F_.[[ClassFieldInitializerName]] to ~empty~. - 1. Let _len_ be the ExpectedArgumentCount of _ParameterList_. - 1. Perform SetFunctionLength(_F_, _len_). - 1. Return _F_. + 1. Let _func_ be OrdinaryObjectCreate(_functionPrototype_, _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_.[[ECMAScriptCode]] to _body_. + 1. Let _strict_ be IsStrict(_body_). + 1. Set _func_.[[Strict]] to _strict_. + 1. If _thisMode_ is ~lexical-this~, set _func_.[[ThisMode]] to ~lexical~. + 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_.[[PrivateEnvironment]] to _privateEnv_. + 1. Set _func_.[[ScriptOrModule]] to GetActiveScriptOrModule(). + 1. Set _func_.[[Realm]] to the current Realm Record. + 1. Set _func_.[[HomeObject]] to *undefined*. + 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. Return _func_.

    AddRestrictedFunctionProperties ( - _F_: a function object, + _func_: a function object, _realm_: a Realm Record, ): ~unused~

    @@ -13615,8 +13615,8 @@

    1. Assert: _realm_.[[Intrinsics]].[[%ThrowTypeError%]] exists and has been initialized. 1. Let _thrower_ be _realm_.[[Intrinsics]].[[%ThrowTypeError%]]. - 1. Perform ! DefinePropertyOrThrow(_F_, *"caller"*, PropertyDescriptor { [[Get]]: _thrower_, [[Set]]: _thrower_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). - 1. Perform ! DefinePropertyOrThrow(_F_, *"arguments"*, PropertyDescriptor { [[Get]]: _thrower_, [[Set]]: _thrower_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Perform ! DefinePropertyOrThrow(_func_, *"caller"*, PropertyDescriptor { [[Get]]: _thrower_, [[Set]]: _thrower_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Perform ! DefinePropertyOrThrow(_func_, *"arguments"*, PropertyDescriptor { [[Get]]: _thrower_, [[Set]]: _thrower_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Return ~unused~. @@ -13637,28 +13637,28 @@

    %ThrowTypeError% ( )

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

    description
    -
    It converts _F_ into a constructor.
    +
    It converts _func_ into a constructor.
    - 1. If _F_ is an ECMAScript function object, then - 1. Assert: IsConstructor(_F_) is *false*. - 1. Assert: _F_ is an extensible object that does not have a *"prototype"* own property. - 1. Set _F_.[[Construct]] to the definition specified in . + 1. If _func_ is an ECMAScript function object, then + 1. Assert: IsConstructor(_func_) is *false*. + 1. Assert: _func_ is an extensible object that does not have a *"prototype"* own property. + 1. Set _func_.[[Construct]] to the definition specified in . 1. Else, - 1. Set _F_.[[Construct]] to the definition specified in . - 1. Set _F_.[[ConstructorKind]] to ~base~. + 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]]: _F_, [[Writable]]: _writablePrototype_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). - 1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: _writablePrototype_, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 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. Return ~unused~.
    @@ -13666,14 +13666,14 @@

    MakeClassConstructor ( - _F_: an ECMAScript function object, + _func_: an ECMAScript function object, ): ~unused~

    - 1. Assert: _F_.[[IsClassConstructor]] is *false*. - 1. Set _F_.[[IsClassConstructor]] to *true*. + 1. Assert: _func_.[[IsClassConstructor]] is *false*. + 1. Set _func_.[[IsClassConstructor]] to *true*. 1. Return ~unused~.
    @@ -13681,17 +13681,17 @@

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

    description
    -
    It configures _F_ as a method.
    +
    It configures _func_ as a method.
    1. Assert: _homeObject_ is an ordinary object. - 1. Set _F_.[[HomeObject]] to _homeObject_. + 1. Set _func_.[[HomeObject]] to _homeObject_. 1. Return ~unused~.
    @@ -13720,31 +13720,31 @@

    SetFunctionName ( - _F_: a function object, + _func_: a function object, _name_: a property key or Private Name, optional _prefix_: a String, ): ~unused~

    description
    -
    It adds a *"name"* property to _F_.
    +
    It adds a *"name"* property to _func_.
    - 1. Assert: _F_ is an extensible object that does not have a *"name"* own property. + 1. Assert: _func_ is an extensible object that does not have a *"name"* own property. 1. If _name_ is a Symbol, then 1. Let _description_ be _name_.[[Description]]. 1. If _description_ is *undefined*, set _name_ to the empty String. 1. Else, set _name_ to the string-concatenation of *"["*, _description_, and *"]"*. 1. Else if _name_ is a Private Name, then 1. Set _name_ to _name_.[[Description]]. - 1. If _F_ has an [[InitialName]] internal slot, then - 1. Set _F_.[[InitialName]] to _name_. + 1. If _func_ has an [[InitialName]] internal slot, then + 1. Set _func_.[[InitialName]] to _name_. 1. If _prefix_ is present, then 1. Set _name_ to the string-concatenation of _prefix_, the code unit 0x0020 (SPACE), and _name_. - 1. If _F_ has an [[InitialName]] internal slot, then + 1. If _func_ has an [[InitialName]] internal slot, then 1. NOTE: The choice in the following step is made independently each time this Abstract Operation is invoked. - 1. Optionally, set _F_.[[InitialName]] to _name_. - 1. Perform ! DefinePropertyOrThrow(_F_, *"name"*, PropertyDescriptor { [[Value]]: _name_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Optionally, set _func_.[[InitialName]] to _name_. + 1. Perform ! DefinePropertyOrThrow(_func_, *"name"*, PropertyDescriptor { [[Value]]: _name_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Return ~unused~.
    @@ -13752,17 +13752,17 @@

    SetFunctionLength ( - _F_: a function object, + _func_: a function object, _length_: a non-negative integer or +∞, ): ~unused~

    description
    -
    It adds a *"length"* property to _F_.
    +
    It adds a *"length"* property to _func_.
    - 1. Assert: _F_ is an extensible object that does not have a *"length"* own property. - 1. Perform ! DefinePropertyOrThrow(_F_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Assert: _func_ is an extensible object that does not have a *"length"* own property. + 1. Perform ! DefinePropertyOrThrow(_func_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Return ~unused~.
    @@ -13796,14 +13796,14 @@

    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 _d_ of _varDeclarations_, in reverse List order, do - 1. If _d_ is neither a |VariableDeclaration| nor a |ForBinding| nor a |BindingIdentifier|, then - 1. Assert: _d_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|. - 1. Let _fn_ be the sole element of the BoundNames of _d_. + 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. NOTE: If there are multiple function declarations for the same name, the last declaration is used. - 1. Insert _d_ as the first element of _functionsToInitialize_. + 1. Insert _varDecl_ as the first element of _functionsToInitialize_. 1. Let _argumentsObjectNeeded_ be *true*. 1. If _func_.[[ThisMode]] is ~lexical~, then 1. NOTE: Arrow functions never have an arguments object. @@ -13879,35 +13879,35 @@

    1. Let _lexEnv_ be _varEnv_. 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| _f_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _code_ Contains _x_ is *true*, do - 1. Let _F_ be the StringValue of the |BindingIdentifier| of _f_. - 1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _func_ and _parameterNames_ does not contain _F_, then - 1. NOTE: A var binding for _F_ 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 _F_ and _F_ is not *"arguments"*, then - 1. Perform ! _varEnv_.CreateMutableBinding(_F_, *false*). - 1. Perform ! _varEnv_.InitializeBinding(_F_, *undefined*). - 1. Append _F_ to _instantiatedVarNames_. - 1. [id="step-functiondeclarationinstantiation-alt-funcdecl-eval"] When the |FunctionDeclaration| _f_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in : + 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. 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. 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(_F_, *false*). - 1. Perform ! _fEnv_.SetMutableBinding(_F_, _fObj_, *false*). + 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. 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 _d_ of _lexDeclarations_, do + 1. For each element _lexDecl_ of _lexDeclarations_, 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 _d_, do - 1. If IsConstantDeclaration of _d_ is *true*, then + 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. Else, 1. Perform ! _lexEnv_.CreateMutableBinding(_dn_, *false*). 1. Let _privateEnv_ be the PrivateEnvironment of _calleeContext_. - 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. 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. Return ~unused~. @@ -13937,10 +13937,10 @@

    for
    -
    a built-in function object _F_
    +
    a built-in function object _func_
    - 1. Return ? BuiltinCallOrConstruct(_F_, _thisArgument_, _argumentsList_, *undefined*). + 1. Return ? BuiltinCallOrConstruct(_func_, _thisArgument_, _argumentsList_, *undefined*).
    @@ -13953,10 +13953,10 @@

    for
    -
    a built-in function object _F_ (when the method is present)
    +
    a built-in function object _func_ (when the method is present)
    - 1. Let _result_ be ? BuiltinCallOrConstruct(_F_, ~uninitialized~, _argumentsList_, _newTarget_). + 1. Let _result_ be ? BuiltinCallOrConstruct(_func_, ~uninitialized~, _argumentsList_, _newTarget_). 1. Assert: _result_ is an Object. 1. Return _result_. @@ -13965,7 +13965,7 @@

    BuiltinCallOrConstruct ( - _F_: a built-in function object, + _func_: a built-in function object, _thisArgument_: an ECMAScript language value or ~uninitialized~, _argumentsList_: a List of ECMAScript language values, _newTarget_: a constructor or *undefined*, @@ -13977,23 +13977,23 @@

    1. Let _callerContext_ be the running execution context. 1. If _callerContext_ is not already suspended, suspend _callerContext_. 1. Let _calleeContext_ be a new execution context. - 1. Set the Function of _calleeContext_ to _F_. - 1. Let _calleeRealm_ be _F_.[[Realm]]. + 1. Set the Function of _calleeContext_ to _func_. + 1. Let _calleeRealm_ be _func_.[[Realm]]. 1. Set the Realm of _calleeContext_ to _calleeRealm_. 1. Set the ScriptOrModule of _calleeContext_ to *null*. 1. Perform any necessary implementation-defined initialization of _calleeContext_. 1. Push _calleeContext_ onto the execution context stack; _calleeContext_ is now the running execution context. - 1. If _F_.[[Async]] is *true*, then + 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 _F_, _thisArgument_, _argumentsList_, and _newTarget_ and performs the following steps when called: - 1. Let _result_ be the Completion Record that is the result of evaluating _F_ in a manner that conforms to the specification of _F_. 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. NOTE: If _F_ is defined in this document, “the specification of _F_” is the behaviour specified for it via algorithm steps or other means. + 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. 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 _F_ in a manner that conforms to the specification of _F_. 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. NOTE: If _F_ is defined in this document, “the specification of _F_” is the behaviour specified for it via algorithm steps or other means. + 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. 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_. @@ -14113,12 +14113,12 @@

    for
    -
    a bound function exotic object _F_
    +
    a bound function exotic object _func_
    - 1. Let _target_ be _F_.[[BoundTargetFunction]]. - 1. Let _boundThis_ be _F_.[[BoundThis]]. - 1. Let _boundArgs_ be _F_.[[BoundArguments]]. + 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. Return ? Call(_target_, _boundThis_, _args_). @@ -14133,14 +14133,14 @@

    for
    -
    a bound function exotic object _F_
    +
    a bound function exotic object _func_
    - 1. Let _target_ be _F_.[[BoundTargetFunction]]. + 1. Let _target_ be _func_.[[BoundTargetFunction]]. 1. Assert: IsConstructor(_target_) is *true*. - 1. Let _boundArgs_ be _F_.[[BoundArguments]]. + 1. Let _boundArgs_ be _func_.[[BoundArguments]]. 1. Let _args_ be the list-concatenation of _boundArgs_ and _argumentsList_. - 1. If SameValue(_F_, _newTarget_) is *true*, set _newTarget_ to _target_. + 1. If SameValue(_func_, _newTarget_) is *true*, set _newTarget_ to _target_. 1. Return ? Construct(_target_, _args_, _newTarget_).
    @@ -14182,33 +14182,33 @@

    Array Exotic Objects

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

    for
    -
    an Array exotic object _A_
    +
    an Array exotic object _array_
    - 1. If _P_ is *"length"*, return ? ArraySetLength(_A_, _Desc_). - 1. If _P_ is an array index, then - 1. Let _lengthDesc_ be OrdinaryGetOwnProperty(_A_, *"length"*). + 1. If _propertyKey_ is *"length"*, return ? ArraySetLength(_array_, _desc_). + 1. If _propertyKey_ is an array index, then + 1. Let _lengthDesc_ be OrdinaryGetOwnProperty(_array_, *"length"*). 1. Assert: _lengthDesc_ is not *undefined*. 1. Assert: IsDataDescriptor(_lengthDesc_) is *true*. 1. Assert: _lengthDesc_.[[Configurable]] is *false*. 1. Let _length_ be _lengthDesc_.[[Value]]. 1. Assert: _length_ is a non-negative integral Number. - 1. Let _index_ be ! ToUint32(_P_). + 1. Let _index_ be ! ToUint32(_propertyKey_). 1. If _index_ ≥ _length_ and _lengthDesc_.[[Writable]] is *false*, return *false*. - 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_A_, _P_, _Desc_). + 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_array_, _propertyKey_, _desc_). 1. If _succeeded_ is *false*, return *false*. 1. If _index_ ≥ _length_, then 1. Set _lengthDesc_.[[Value]] to _index_ + *1*𝔽. - 1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_A_, *"length"*, _lengthDesc_). + 1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_array_, *"length"*, _lengthDesc_). 1. Assert: _succeeded_ is *true*. 1. Return *true*. - 1. Return ? OrdinaryDefineOwnProperty(_A_, _P_, _Desc_). + 1. Return ? OrdinaryDefineOwnProperty(_array_, _propertyKey_, _desc_).
    @@ -14226,11 +14226,11 @@

    1. If _length_ > 232 - 1, throw a *RangeError* exception. 1. If _proto_ is not present, set _proto_ to %Array.prototype%. - 1. Let _A_ be MakeBasicObject(« [[Prototype]], [[Extensible]] »). - 1. Set _A_.[[Prototype]] to _proto_. - 1. Set _A_.[[DefineOwnProperty]] as specified in . - 1. Perform ! OrdinaryDefineOwnProperty(_A_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). - 1. Return _A_. + 1. Let _array_ be MakeBasicObject(« [[Prototype]], [[Extensible]] »). + 1. Set _array_.[[Prototype]] to _proto_. + 1. Set _array_.[[DefineOwnProperty]] as specified in . + 1. Perform ! OrdinaryDefineOwnProperty(_array_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Return _array_. @@ -14248,18 +14248,18 @@

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

    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.

    @@ -14269,27 +14269,27 @@

    ArraySetLength ( - _A_: an Array, - _Desc_: a Property Descriptor, + _array_: an Array, + _desc_: 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(_A_, *"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 _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(_A_, *"length"*). + 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(_A_, *"length"*, _newLenDesc_). + 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. Let _newWritable_ be *true*. @@ -14297,22 +14297,22 @@

    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(_A_, *"length"*, _newLenDesc_). + 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLenDesc_). 1. If _succeeded_ is *false*, return *false*. - 1. For each own property key _P_ of _A_ such that _P_ is an array index and ! ToUint32(_P_) ≥ _newLen_, in descending numeric index order, do - 1. Let _deleteSucceeded_ be ! _A_.[[Delete]](_P_). + 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. Let _deleteSucceeded_ be ! _array_.[[Delete]](_propertyKey_). 1. If _deleteSucceeded_ is *false*, then - 1. Set _newLenDesc_.[[Value]] to ! ToUint32(_P_) + *1*𝔽. + 1. Set _newLenDesc_.[[Value]] to ! ToUint32(_propertyKey_) + *1*𝔽. 1. If _newWritable_ is *false*, set _newLenDesc_.[[Writable]] to *false*. - 1. Perform ! OrdinaryDefineOwnProperty(_A_, *"length"*, _newLenDesc_). + 1. Perform ! OrdinaryDefineOwnProperty(_array_, *"length"*, _newLenDesc_). 1. Return *false*. 1. If _newWritable_ is *false*, then - 1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_A_, *"length"*, PropertyDescriptor { [[Writable]]: *false* }). + 1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_array_, *"length"*, PropertyDescriptor { [[Writable]]: *false* }). 1. Assert: _succeeded_ is *true*. 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 _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.

    @@ -14328,37 +14328,37 @@

    String Exotic Objects

    [[GetOwnProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): a normal completion containing either a Property Descriptor or *undefined*

    for
    -
    a String exotic object _S_
    +
    a String exotic object _str_
    - 1. Let _desc_ be OrdinaryGetOwnProperty(_S_, _P_). + 1. Let _desc_ be OrdinaryGetOwnProperty(_str_, _propertyKey_). 1. If _desc_ is not *undefined*, return _desc_. - 1. Return StringGetOwnProperty(_S_, _P_). + 1. Return StringGetOwnProperty(_str_, _propertyKey_).

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

    for
    -
    a String exotic object _S_
    +
    a String exotic object _str_
    - 1. Let _stringDesc_ be StringGetOwnProperty(_S_, _P_). + 1. Let _stringDesc_ be StringGetOwnProperty(_str_, _propertyKey_). 1. If _stringDesc_ is not *undefined*, then - 1. Let _extensible_ be _S_.[[Extensible]]. - 1. Return IsCompatiblePropertyDescriptor(_extensible_, _Desc_, _stringDesc_). - 1. Return ! OrdinaryDefineOwnProperty(_S_, _P_, _Desc_). + 1. Let _extensible_ be _str_.[[Extensible]]. + 1. Return IsCompatiblePropertyDescriptor(_extensible_, _desc_, _stringDesc_). + 1. Return ! OrdinaryDefineOwnProperty(_str_, _propertyKey_, _desc_).
    @@ -14366,21 +14366,21 @@

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

    for
    -
    a String exotic object _O_
    +
    a String exotic object _obj_
    1. Let _keys_ be a new empty List. - 1. Let _str_ be _O_.[[StringData]]. + 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. Append ! ToString(𝔽(_i_)) to _keys_. - 1. For each own property key _P_ of _O_ such that _P_ is an array index and ! ToIntegerOrInfinity(_P_) ≥ _len_, in ascending numeric index order, do - 1. Append _P_ to _keys_. - 1. For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an array index, in ascending chronological order of property creation, do - 1. Append _P_ to _keys_. - 1. For each own property key _P_ of _O_ such that _P_ is a Symbol, in ascending chronological order of property creation, do - 1. Append _P_ 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. 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_. + 1. For each own property key _propertyKey_ of _obj_ such that _propertyKey_ is a Symbol, in ascending chronological order of property creation, do + 1. Append _propertyKey_ to _keys_. 1. Return _keys_.
    @@ -14397,37 +14397,37 @@

    It is used to specify the creation of new String exotic objects.
    - 1. Let _S_ be MakeBasicObject(« [[Prototype]], [[Extensible]], [[StringData]] »). - 1. Set _S_.[[Prototype]] to _prototype_. - 1. Set _S_.[[StringData]] to _value_. - 1. Set _S_.[[GetOwnProperty]] as specified in . - 1. Set _S_.[[DefineOwnProperty]] as specified in . - 1. Set _S_.[[OwnPropertyKeys]] as specified in . + 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 _length_ be the length of _value_. - 1. Perform ! DefinePropertyOrThrow(_S_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). - 1. Return _S_. + 1. Perform ! DefinePropertyOrThrow(_str_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_length_), [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Return _str_.

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

    - 1. If _P_ is not a String, return *undefined*. - 1. Let _index_ be CanonicalNumericIndexString(_P_). + 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 _str_ be _S_.[[StringData]]. - 1. Assert: _str_ is a String. - 1. Let _len_ be the length of _str_. + 1. Let _stringData_ be _str_.[[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 _str_ from ℝ(_index_) to ℝ(_index_) + 1. + 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* }.
    @@ -14462,7 +14462,7 @@

    Arguments Exotic Objects

    [[GetOwnProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): a normal completion containing either a Property Descriptor or *undefined*

    @@ -14470,12 +14470,12 @@

    an arguments exotic object _args_

    - 1. Let _desc_ be OrdinaryGetOwnProperty(_args_, _P_). + 1. Let _desc_ be OrdinaryGetOwnProperty(_args_, _propertyKey_). 1. If _desc_ is *undefined*, return *undefined*. 1. Let _map_ be _args_.[[ParameterMap]]. - 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). + 1. Let _isMapped_ be ! HasOwnProperty(_map_, _propertyKey_). 1. If _isMapped_ is *true*, then - 1. Set _desc_.[[Value]] to ! Get(_map_, _P_). + 1. Set _desc_.[[Value]] to ! Get(_map_, _propertyKey_). 1. Return _desc_.
    @@ -14483,8 +14483,8 @@

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

    @@ -14493,23 +14493,23 @@

    1. Let _map_ be _args_.[[ParameterMap]]. - 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). - 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. Set _newArgDesc_.[[Value]] to ! Get(_map_, _P_). - 1. Let _allowed_ be ! OrdinaryDefineOwnProperty(_args_, _P_, _newArgDesc_). + 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. 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. Perform ! _map_.[[Delete]](_P_). + 1. If IsAccessorDescriptor(_desc_) is *true*, then + 1. Perform ! _map_.[[Delete]](_propertyKey_). 1. Else, - 1. If _Desc_ has a [[Value]] field, then + 1. If _desc_ 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_, _P_, _Desc_.[[Value]], *false*). - 1. If _Desc_ has a [[Writable]] field and _Desc_.[[Writable]] is *false*, then - 1. Perform ! _map_.[[Delete]](_P_). + 1. Perform ! Set(_map_, _propertyKey_, _desc_.[[Value]], *false*). + 1. If _desc_ has a [[Writable]] field and _desc_.[[Writable]] is *false*, then + 1. Perform ! _map_.[[Delete]](_propertyKey_). 1. Return *true*.
    @@ -14517,8 +14517,8 @@

    [[Get]] ( - _P_: a property key, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _receiver_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    @@ -14527,19 +14527,19 @@

    1. Let _map_ be _args_.[[ParameterMap]]. - 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). - 1. If _isMapped_ is *false*, return ? OrdinaryGet(_args_, _P_, _Receiver_). - 1. Assert: _map_ contains a formal parameter mapping for _P_. - 1. Return ! Get(_map_, _P_). + 1. Let _isMapped_ be ! HasOwnProperty(_map_, _propertyKey_). + 1. If _isMapped_ is *false*, return ? OrdinaryGet(_args_, _propertyKey_, _receiver_). + 1. Assert: _map_ contains a formal parameter mapping for _propertyKey_. + 1. Return ! Get(_map_, _propertyKey_).

    [[Set]] ( - _P_: a property key, - _V_: an ECMAScript language value, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _receiver_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    @@ -14547,22 +14547,22 @@

    an arguments exotic object _args_

    - 1. If SameValue(_args_, _Receiver_) is *false*, then + 1. If SameValue(_args_, _receiver_) is *false*, then 1. Let _isMapped_ be *false*. 1. Else, 1. Let _map_ be _args_.[[ParameterMap]]. - 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). + 1. Let _isMapped_ be ! HasOwnProperty(_map_, _propertyKey_). 1. If _isMapped_ is *true*, then 1. Assert: The following Set will succeed, since formal parameters mapped by arguments objects are always writable. - 1. Perform ! Set(_map_, _P_, _V_, *false*). - 1. Return ? OrdinarySet(_args_, _P_, _V_, _Receiver_). + 1. Perform ! Set(_map_, _propertyKey_, _value_, *false*). + 1. Return ? OrdinarySet(_args_, _propertyKey_, _value_, _receiver_).

    [[Delete]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    @@ -14571,10 +14571,10 @@

    1. Let _map_ be _args_.[[ParameterMap]]. - 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). - 1. Let _result_ be ? OrdinaryDelete(_args_, _P_). + 1. Let _isMapped_ be ! HasOwnProperty(_map_, _propertyKey_). + 1. Let _result_ be ? OrdinaryDelete(_args_, _propertyKey_). 1. If _result_ is *true* and _isMapped_ is *true*, then - 1. Perform ! _map_.[[Delete]](_P_). + 1. Perform ! _map_.[[Delete]](_propertyKey_). 1. Return _result_.
    @@ -14641,9 +14641,9 @@

    1. If _mappedNames_ does not contain _name_, then 1. Append _name_ to _mappedNames_. 1. If _index_ < _len_, then - 1. Let _g_ be MakeArgGetter(_name_, _env_). - 1. Let _p_ be MakeArgSetter(_name_, _env_). - 1. Perform ! _map_.[[DefineOwnProperty]](! ToString(𝔽(_index_)), PropertyDescriptor { [[Set]]: _p_, [[Get]]: _g_, [[Enumerable]]: *false*, [[Configurable]]: *true* }). + 1. Let _getter_ be MakeArgGetter(_name_, _env_). + 1. Let _setter_ be MakeArgSetter(_name_, _env_). + 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* }). 1. Perform ! DefinePropertyOrThrow(_obj_, *"callee"*, PropertyDescriptor { [[Value]]: _func_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). @@ -14705,141 +14705,141 @@

    TypedArray Exotic Objects

    [[PreventExtensions]] ( ): a normal completion containing a Boolean

    for
    -
    a TypedArray _O_
    +
    a TypedArray _obj_
    - 1. NOTE: The extensibility-related invariants specified in do not allow this method to return *true* when _O_ can gain (or lose and then regain) properties, which might occur for properties with integer index names when its underlying buffer is resized. - 1. If IsTypedArrayFixedLength(_O_) is *false*, return *false*. - 1. Return OrdinaryPreventExtensions(_O_). + 1. NOTE: The extensibility-related invariants specified in do not allow this method to return *true* when _obj_ can gain (or lose and then regain) properties, which might occur for properties with integer index names when its underlying buffer is resized. + 1. If IsTypedArrayFixedLength(_obj_) is *false*, return *false*. + 1. Return OrdinaryPreventExtensions(_obj_).

    [[GetOwnProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): a normal completion containing either a Property Descriptor or *undefined*

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

    [[HasProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a TypedArray _O_
    +
    a TypedArray _obj_
    - 1. If _P_ is a String, then - 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). - 1. If _numericIndex_ is not *undefined*, return IsValidIntegerIndex(_O_, _numericIndex_). - 1. Return ? OrdinaryHasProperty(_O_, _P_). + 1. If _propertyKey_ is a String, then + 1. Let _numericIndex_ be CanonicalNumericIndexString(_propertyKey_). + 1. If _numericIndex_ is not *undefined*, return IsValidIntegerIndex(_obj_, _numericIndex_). + 1. Return ? OrdinaryHasProperty(_obj_, _propertyKey_).

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

    for
    -
    a TypedArray _O_
    +
    a TypedArray _obj_
    - 1. If _P_ is a String, then - 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). + 1. If _propertyKey_ is a String, then + 1. Let _numericIndex_ be CanonicalNumericIndexString(_propertyKey_). 1. If _numericIndex_ is not *undefined*, then - 1. If IsValidIntegerIndex(_O_, _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(_O_, _numericIndex_, _Desc_.[[Value]]). + 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. Return *true*. - 1. Return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_). + 1. Return ! OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _desc_).

    [[Get]] ( - _P_: a property key, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _receiver_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    for
    -
    a TypedArray _O_
    +
    a TypedArray _obj_
    - 1. If _P_ is a String, then - 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). + 1. If _propertyKey_ is a String, then + 1. Let _numericIndex_ be CanonicalNumericIndexString(_propertyKey_). 1. If _numericIndex_ is not *undefined*, then - 1. Return TypedArrayGetElement(_O_, _numericIndex_). - 1. Return ? OrdinaryGet(_O_, _P_, _Receiver_). + 1. Return TypedArrayGetElement(_obj_, _numericIndex_). + 1. Return ? OrdinaryGet(_obj_, _propertyKey_, _receiver_).

    [[Set]] ( - _P_: a property key, - _V_: an ECMAScript language value, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _receiver_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a TypedArray _O_
    +
    a TypedArray _obj_
    - 1. If _P_ is a String, then - 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). + 1. If _propertyKey_ is a String, then + 1. Let _numericIndex_ be CanonicalNumericIndexString(_propertyKey_). 1. If _numericIndex_ is not *undefined*, then - 1. If SameValue(_O_, _Receiver_) is *true*, then - 1. Perform ? TypedArraySetElement(_O_, _numericIndex_, _V_). + 1. If SameValue(_obj_, _receiver_) is *true*, then + 1. Perform ? TypedArraySetElement(_obj_, _numericIndex_, _value_). 1. Return *true*. - 1. If IsValidIntegerIndex(_O_, _numericIndex_) is *false*, return *true*. - 1. Return ? OrdinarySet(_O_, _P_, _V_, _Receiver_). + 1. If IsValidIntegerIndex(_obj_, _numericIndex_) is *false*, return *true*. + 1. Return ? OrdinarySet(_obj_, _propertyKey_, _value_, _receiver_).

    [[Delete]] ( - _P_: a property key, + _propertyKey_: a property key, ): a normal completion containing a Boolean

    for
    -
    a TypedArray _O_
    +
    a TypedArray _obj_
    - 1. If _P_ is a String, then - 1. Let _numericIndex_ be CanonicalNumericIndexString(_P_). + 1. If _propertyKey_ is a String, then + 1. Let _numericIndex_ be CanonicalNumericIndexString(_propertyKey_). 1. If _numericIndex_ is not *undefined*, then - 1. If IsValidIntegerIndex(_O_, _numericIndex_) is *false*, return *true*. + 1. If IsValidIntegerIndex(_obj_, _numericIndex_) is *false*, return *true*. 1. Return *false*. - 1. Return ! OrdinaryDelete(_O_, _P_). + 1. Return ! OrdinaryDelete(_obj_, _propertyKey_).
    @@ -14847,19 +14847,19 @@

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

    for
    -
    a TypedArray _O_
    +
    a TypedArray _obj_
    - 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). 1. Let _keys_ be a new empty List. 1. If IsTypedArrayOutOfBounds(_taRecord_) is *false*, then 1. Let _length_ be TypedArrayLength(_taRecord_). 1. For each integer _i_ such that 0 ≤ _i_ < _length_, in ascending order, do 1. Append ! ToString(𝔽(_i_)) to _keys_. - 1. For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an integer index, in ascending chronological order of property creation, do - 1. Append _P_ to _keys_. - 1. For each own property key _P_ of _O_ such that _P_ is a Symbol, in ascending chronological order of property creation, do - 1. Append _P_ to _keys_. + 1. For each own property key _propertyKey_ of _obj_ such that _propertyKey_ is a String and _propertyKey_ is not an integer index, in ascending chronological order of property creation, do + 1. Append _propertyKey_ to _keys_. + 1. For each own property key _propertyKey_ of _obj_ such that _propertyKey_ is a Symbol, in ascending chronological order of property creation, do + 1. Append _propertyKey_ to _keys_. 1. Return _keys_. @@ -14940,17 +14940,17 @@

    1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]], [[ViewedArrayBuffer]], [[TypedArrayName]], [[ContentType]], [[ByteLength]], [[ByteOffset]], [[ArrayLength]] ». - 1. Let _A_ be MakeBasicObject(_internalSlotsList_). - 1. Set _A_.[[PreventExtensions]] as specified in . - 1. Set _A_.[[GetOwnProperty]] as specified in . - 1. Set _A_.[[HasProperty]] as specified in . - 1. Set _A_.[[DefineOwnProperty]] as specified in . - 1. Set _A_.[[Get]] as specified in . - 1. Set _A_.[[Set]] as specified in . - 1. Set _A_.[[Delete]] as specified in . - 1. Set _A_.[[OwnPropertyKeys]] as specified in . - 1. Set _A_.[[Prototype]] to _prototype_. - 1. Return _A_. + 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_. @@ -14964,10 +14964,10 @@

    1. Assert: IsTypedArrayOutOfBounds(_taRecord_) is *false*. - 1. Let _O_ be _taRecord_.[[Object]]. - 1. If _O_.[[ByteLength]] is not ~auto~, return _O_.[[ByteLength]]. + 1. Let _obj_ be _taRecord_.[[Object]]. + 1. If _obj_.[[ByteLength]] is not ~auto~, return _obj_.[[ByteLength]]. 1. Let _length_ be TypedArrayLength(_taRecord_). - 1. Let _elementSize_ be TypedArrayElementSize(_O_). + 1. Let _elementSize_ be TypedArrayElementSize(_obj_). 1. NOTE: The returned byte length is always an integer multiple of _elementSize_, even when the underlying buffer has been resized to a non-integer multiple. 1. Return _length_ × _elementSize_. @@ -14983,11 +14983,11 @@

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

    It checks if any of the object's numeric properties reference a value at an index not contained within the underlying buffer's bounds.
    - 1. Let _O_ be _taRecord_.[[Object]]. + 1. Let _obj_ be _taRecord_.[[Object]]. 1. Let _bufferByteLength_ be _taRecord_.[[CachedBufferByteLength]]. - 1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, then + 1. If IsDetachedBuffer(_obj_.[[ViewedArrayBuffer]]) is *true*, then 1. Assert: _bufferByteLength_ is ~detached~. 1. Return *true*. 1. Assert: _bufferByteLength_ is a non-negative integer. - 1. Let _byteOffsetStart_ be _O_.[[ByteOffset]]. - 1. If _O_.[[ArrayLength]] is ~auto~, then + 1. Let _byteOffsetStart_ be _obj_.[[ByteOffset]]. + 1. If _obj_.[[ArrayLength]] is ~auto~, then 1. Let _byteOffsetEnd_ be _bufferByteLength_. 1. Else, - 1. Let _elementSize_ be TypedArrayElementSize(_O_). - 1. Let _arrayByteLength_ be _O_.[[ArrayLength]] × _elementSize_. + 1. Let _elementSize_ be TypedArrayElementSize(_obj_). + 1. Let _arrayByteLength_ be _obj_.[[ArrayLength]] × _elementSize_. 1. Let _byteOffsetEnd_ be _byteOffsetStart_ + _arrayByteLength_. 1. NOTE: A 0-length TypedArray whose [[ByteOffset]] is _bufferByteLength_ is not considered out-of-bounds. 1. If _byteOffsetStart_ > _bufferByteLength_ or _byteOffsetEnd_ > _bufferByteLength_, return *true*. @@ -15027,14 +15027,14 @@

    IsTypedArrayFixedLength ( - _O_: a TypedArray, + _obj_: a TypedArray, ): a Boolean

    - 1. If _O_.[[ArrayLength]] is ~auto~, return *false*. - 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]]. + 1. If _obj_.[[ArrayLength]] is ~auto~, return *false*. + 1. Let _buffer_ be _obj_.[[ViewedArrayBuffer]]. 1. If IsFixedLengthArrayBuffer(_buffer_) is *false* and IsSharedArrayBuffer(_buffer_) is *false*, return *false*. 1. Return *true*. @@ -15043,18 +15043,18 @@

    IsValidIntegerIndex ( - _O_: a TypedArray, + _obj_: a TypedArray, _index_: a Number, ): a Boolean

    - 1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, return *false*. + 1. If IsDetachedBuffer(_obj_.[[ViewedArrayBuffer]]) is *true*, return *false*. 1. If _index_ is not an integral Number, return *false*. 1. If _index_ is *-0*𝔽 or _index_ < *-0*𝔽, return *false*. - 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~unordered~). - 1. NOTE: Bounds checking is not a synchronizing operation when _O_'s backing buffer is a growable SharedArrayBuffer. + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_obj_, ~unordered~). + 1. NOTE: Bounds checking is not a synchronizing operation when _obj_'s backing buffer is a growable SharedArrayBuffer. 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, return *false*. 1. Let _length_ be TypedArrayLength(_taRecord_). 1. If ℝ(_index_) ≥ _length_, return *false*. @@ -15065,26 +15065,26 @@

    TypedArrayGetElement ( - _O_: a TypedArray, + _obj_: a TypedArray, _index_: a Number, ): a Number, a BigInt, or *undefined*

    - 1. If IsValidIntegerIndex(_O_, _index_) is *false*, return *undefined*. - 1. Let _offset_ be _O_.[[ByteOffset]]. - 1. Let _elementSize_ be TypedArrayElementSize(_O_). + 1. If IsValidIntegerIndex(_obj_, _index_) is *false*, return *undefined*. + 1. Let _offset_ be _obj_.[[ByteOffset]]. + 1. Let _elementSize_ be TypedArrayElementSize(_obj_). 1. Let _byteIndexInBuffer_ be (ℝ(_index_) × _elementSize_) + _offset_. - 1. Let _elementType_ be TypedArrayElementType(_O_). - 1. Return GetValueFromBuffer(_O_.[[ViewedArrayBuffer]], _byteIndexInBuffer_, _elementType_, *true*, ~unordered~). + 1. Let _elementType_ be TypedArrayElementType(_obj_). + 1. Return GetValueFromBuffer(_obj_.[[ViewedArrayBuffer]], _byteIndexInBuffer_, _elementType_, *true*, ~unordered~).

    TypedArraySetElement ( - _O_: a TypedArray, + _obj_: a TypedArray, _index_: a Number, _value_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion @@ -15092,14 +15092,14 @@

    - 1. If _O_.[[ContentType]] is ~bigint~, let _numValue_ be ? ToBigInt(_value_). + 1. If _obj_.[[ContentType]] is ~bigint~, let _numValue_ be ? ToBigInt(_value_). 1. Else, let _numValue_ be ? ToNumber(_value_). - 1. If IsValidIntegerIndex(_O_, _index_) is *true*, then - 1. Let _offset_ be _O_.[[ByteOffset]]. - 1. Let _elementSize_ be TypedArrayElementSize(_O_). + 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(_O_). - 1. Perform SetValueInBuffer(_O_.[[ViewedArrayBuffer]], _byteIndexInBuffer_, _elementType_, _numValue_, *true*, ~unordered~). + 1. Let _elementType_ be TypedArrayElementType(_obj_). + 1. Perform SetValueInBuffer(_obj_.[[ViewedArrayBuffer]], _byteIndexInBuffer_, _elementType_, _numValue_, *true*, ~unordered~). 1. Return ~unused~. @@ -15110,7 +15110,7 @@

    IsArrayBufferViewOutOfBounds ( - _O_: a TypedArray or a DataView, + _obj_: a TypedArray or a DataView, ): a Boolean

    @@ -15118,10 +15118,10 @@

    It checks if either any of a TypedArray's numeric properties or a DataView object's methods can reference a value at an index not contained within the underlying data block's bounds. This abstract operation exists as a convenience for upstream specifications.

    - 1. If _O_ has a [[DataView]] internal slot, then - 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. If _obj_ has a [[DataView]] internal slot, then + 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_obj_, ~seq-cst~). 1. Return IsViewOutOfBounds(_viewRecord_). - 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). 1. Return IsTypedArrayOutOfBounds(_taRecord_).
    @@ -15186,15 +15186,15 @@

    [[GetPrototypeOf]] ( ): a normal completion containing *null*

    [[SetPrototypeOf]] ( - _V_: an Object or *null*, + _proto_: an Object or *null*, ): a normal completion containing a Boolean

    for
    -
    a module namespace exotic object _O_
    +
    a module namespace exotic object _obj_
    - 1. Return ! SetImmutablePrototype(_O_, _V_). + 1. Return ! SetImmutablePrototype(_obj_, _proto_).
    @@ -15223,18 +15223,18 @@

    [[PreventExtensions]] ( ): a normal completion containing *true*

    [[GetOwnProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing either a Property Descriptor or *undefined*, or a throw completion

    for
    -
    a module namespace exotic object _O_
    +
    a module namespace exotic object _obj_
    - 1. If _P_ is a Symbol, return OrdinaryGetOwnProperty(_O_, _P_). - 1. Let _exports_ be _O_.[[Exports]]. - 1. If _exports_ does not contain _P_, return *undefined*. - 1. Let _value_ be ? _O_.[[Get]](_P_, _O_). + 1. If _propertyKey_ is a Symbol, return OrdinaryGetOwnProperty(_obj_, _propertyKey_). + 1. Let _exports_ be _obj_.[[Exports]]. + 1. If _exports_ does not contain _propertyKey_, return *undefined*. + 1. Let _value_ be ? _obj_.[[Get]](_propertyKey_, _obj_). 1. Return PropertyDescriptor { [[Value]]: _value_, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *false* }.
    @@ -15242,23 +15242,23 @@

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

    for
    -
    a module namespace exotic object _O_
    +
    a module namespace exotic object _obj_
    - 1. If _P_ is a Symbol, return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_). - 1. Let _current_ be ? _O_.[[GetOwnProperty]](_P_). + 1. If _propertyKey_ is a Symbol, return ! OrdinaryDefineOwnProperty(_obj_, _propertyKey_, _desc_). + 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 _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. Return *true*.
    @@ -15266,17 +15266,17 @@

    [[HasProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): a normal completion containing a Boolean

    for
    -
    a module namespace exotic object _O_
    +
    a module namespace exotic object _obj_
    - 1. If _P_ is a Symbol, return ! OrdinaryHasProperty(_O_, _P_). - 1. Let _exports_ be _O_.[[Exports]]. - 1. If _exports_ contains _P_, return *true*. + 1. If _propertyKey_ is a Symbol, return ! OrdinaryHasProperty(_obj_, _propertyKey_). + 1. Let _exports_ be _obj_.[[Exports]]. + 1. If _exports_ contains _propertyKey_, return *true*. 1. Return *false*.
    @@ -15284,21 +15284,21 @@

    [[Get]] ( - _P_: a property key, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _receiver_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    for
    -
    a module namespace exotic object _O_
    +
    a module namespace exotic object _obj_
    - 1. If _P_ is a Symbol, then - 1. Return ! OrdinaryGet(_O_, _P_, _Receiver_). - 1. Let _exports_ be _O_.[[Exports]]. - 1. If _exports_ does not contain _P_, return *undefined*. - 1. Let _m_ be _O_.[[Module]]. - 1. Let _binding_ be _m_.ResolveExport(_P_). + 1. If _propertyKey_ is a Symbol, then + 1. Return ! OrdinaryGet(_obj_, _propertyKey_, _receiver_). + 1. Let _exports_ be _obj_.[[Exports]]. + 1. If _exports_ does not contain _propertyKey_, return *undefined*. + 1. Let _module_ be _obj_.[[Module]]. + 1. Let _binding_ be _module_.ResolveExport(_propertyKey_). 1. Assert: _binding_ is a ResolvedBinding Record. 1. Let _targetModule_ be _binding_.[[Module]]. 1. Assert: _targetModule_ is not *undefined*. @@ -15316,9 +15316,9 @@

    [[Set]] ( - _P_: a property key, - _V_: an ECMAScript language value, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _receiver_: an ECMAScript language value, ): a normal completion containing *false*

    @@ -15333,18 +15333,18 @@

    [[Delete]] ( - _P_: a property key, + _propertyKey_: a property key, ): a normal completion containing a Boolean

    for
    -
    a module namespace exotic object _O_
    +
    a module namespace exotic object _obj_
    - 1. If _P_ is a Symbol, then - 1. Return ! OrdinaryDelete(_O_, _P_). - 1. Let _exports_ be _O_.[[Exports]]. - 1. If _exports_ contains _P_, return *false*. + 1. If _propertyKey_ is a Symbol, then + 1. Return ! OrdinaryDelete(_obj_, _propertyKey_). + 1. Let _exports_ be _obj_.[[Exports]]. + 1. If _exports_ contains _propertyKey_, return *false*. 1. Return *true*.
    @@ -15353,11 +15353,11 @@

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

    for
    -
    a module namespace exotic object _O_
    +
    a module namespace exotic object _obj_
    - 1. Let _exports_ be _O_.[[Exports]]. - 1. Let _symbolKeys_ be OrdinaryOwnPropertyKeys(_O_). + 1. Let _exports_ be _obj_.[[Exports]]. + 1. Let _symbolKeys_ be OrdinaryOwnPropertyKeys(_obj_). 1. Return the list-concatenation of _exports_ and _symbolKeys_. @@ -15376,14 +15376,14 @@

    1. Assert: _module_.[[Namespace]] is ~empty~. 1. Let _internalSlotsList_ be the internal slots listed in . - 1. Let _M_ be MakeBasicObject(_internalSlotsList_). - 1. Set _M_'s essential internal methods to the definitions specified in . - 1. Set _M_.[[Module]] to _module_. + 1. Let _namespace_ be MakeBasicObject(_internalSlotsList_). + 1. Set _namespace_'s essential internal methods to the definitions specified in . + 1. Set _namespace_.[[Module]] to _module_. 1. Let _sortedExports_ be a List whose elements are the elements of _exports_, sorted according to lexicographic code unit order. - 1. Set _M_.[[Exports]] to _sortedExports_. - 1. Create own properties of _M_ corresponding to the definitions in . - 1. Set _module_.[[Namespace]] to _M_. - 1. Return _M_. + 1. Set _namespace_.[[Exports]] to _sortedExports_. + 1. Create own properties of _namespace_ corresponding to the definitions in . + 1. Set _module_.[[Namespace]] to _namespace_. + 1. Return _namespace_. @@ -15401,30 +15401,30 @@

    Immutable Prototype Exotic Objects

    [[SetPrototypeOf]] ( - _V_: an Object or *null*, + _proto_: an Object or *null*, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    an immutable prototype exotic object _O_
    +
    an immutable prototype exotic object _obj_
    - 1. Return ? SetImmutablePrototype(_O_, _V_). + 1. Return ? SetImmutablePrototype(_obj_, _proto_).

    SetImmutablePrototype ( - _O_: an Object, - _V_: an Object or *null*, + _obj_: an Object, + _proto_: an Object or *null*, ): either a normal completion containing a Boolean or a throw completion

    - 1. Let _current_ be ? _O_.[[GetPrototypeOf]](). - 1. If SameValue(_V_, _current_) is *true*, return *true*. + 1. Let _current_ be ? _obj_.[[GetPrototypeOf]](). + 1. If SameValue(_proto_, _current_) is *true*, return *true*. 1. Return *false*.
    @@ -15558,18 +15558,18 @@

    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 _O_ is an ECMAScript Proxy object, _P_ is a property key value, _V_ 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 _desc_ is a Property Descriptor record.

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

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"getPrototypeOf"*). 1. If _trap_ is *undefined*, then @@ -15598,27 +15598,27 @@

    [[GetPrototypeOf]] ( ): either a normal completion containing either an Obje

    [[SetPrototypeOf]] ( - _V_: an Object or *null*, + _proto_: an Object or *null*, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"setPrototypeOf"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[SetPrototypeOf]](_V_). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _V_ »)). + 1. Return ? _target_.[[SetPrototypeOf]](_proto_). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _proto_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. 1. Let _extensibleTarget_ be ? IsExtensible(_target_). 1. If _extensibleTarget_ is *true*, return *true*. 1. Let _targetProto_ be ? _target_.[[GetPrototypeOf]](). - 1. If SameValue(_V_, _targetProto_) is *false*, throw a *TypeError* exception. + 1. If SameValue(_proto_, _targetProto_) is *false*, throw a *TypeError* exception. 1. Return *true*. @@ -15638,12 +15638,12 @@

    [[IsExtensible]] ( ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"isExtensible"*). 1. If _trap_ is *undefined*, then @@ -15670,12 +15670,12 @@

    [[IsExtensible]] ( ): either a normal completion containing a Boolean or a t

    [[PreventExtensions]] ( ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"preventExtensions"*). 1. If _trap_ is *undefined*, then @@ -15702,24 +15702,24 @@

    [[PreventExtensions]] ( ): either a normal completion containing a Boolean o

    [[GetOwnProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing either a Property Descriptor or *undefined*, or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"getOwnPropertyDescriptor"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[GetOwnProperty]](_P_). - 1. Let _trapResultObj_ be ? Call(_trap_, _handler_, « _target_, _P_ »). + 1. Return ? _target_.[[GetOwnProperty]](_propertyKey_). + 1. Let _trapResultObj_ be ? Call(_trap_, _handler_, « _target_, _propertyKey_ »). 1. If _trapResultObj_ is not an Object and _trapResultObj_ is not *undefined*, throw a *TypeError* exception. - 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). + 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_propertyKey_). 1. If _trapResultObj_ is *undefined*, then 1. If _targetDesc_ is *undefined*, return *undefined*. 1. If _targetDesc_.[[Configurable]] is *false*, throw a *TypeError* exception. @@ -15767,28 +15767,28 @@

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

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"defineProperty"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[DefineOwnProperty]](_P_, _Desc_). - 1. Let _descObj_ be FromPropertyDescriptor(_Desc_). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_, _descObj_ »)). + 1. Return ? _target_.[[DefineOwnProperty]](_propertyKey_, _desc_). + 1. Let _descObj_ be FromPropertyDescriptor(_desc_). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _propertyKey_, _descObj_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. - 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). + 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 _desc_ has a [[Configurable]] field and _desc_.[[Configurable]] is *false*, then 1. Let _settingConfigFalse_ be *true*. 1. Else, 1. Let _settingConfigFalse_ be *false*. @@ -15796,10 +15796,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_, _desc_, _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 _desc_ has a [[Writable]] field and _desc_.[[Writable]] is *false*, throw a *TypeError* exception. 1. Return *true*. @@ -15827,24 +15827,24 @@

    [[HasProperty]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"has"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[HasProperty]](_P_). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_ »)). + 1. Return ? _target_.[[HasProperty]](_propertyKey_). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _propertyKey_ »)). 1. If _booleanTrapResult_ is *false*, then - 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). + 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_propertyKey_). 1. If _targetDesc_ is not *undefined*, then 1. If _targetDesc_.[[Configurable]] is *false*, throw a *TypeError* exception. 1. Let _extensibleTarget_ be ? IsExtensible(_target_). @@ -15870,24 +15870,24 @@

    [[Get]] ( - _P_: a property key, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _receiver_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"get"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[Get]](_P_, _Receiver_). - 1. Let _trapResult_ be ? Call(_trap_, _handler_, « _target_, _P_, _Receiver_ »). - 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). + 1. Return ? _target_.[[Get]](_propertyKey_, _receiver_). + 1. Let _trapResult_ be ? Call(_trap_, _handler_, « _target_, _propertyKey_, _receiver_ »). + 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_propertyKey_). 1. If _targetDesc_ is not *undefined* and _targetDesc_.[[Configurable]] is *false*, then 1. If IsDataDescriptor(_targetDesc_) is *true* and _targetDesc_.[[Writable]] is *false*, then 1. If SameValue(_trapResult_, _targetDesc_.[[Value]]) is *false*, throw a *TypeError* exception. @@ -15911,29 +15911,29 @@

    [[Set]] ( - _P_: a property key, - _V_: an ECMAScript language value, - _Receiver_: an ECMAScript language value, + _propertyKey_: a property key, + _value_: an ECMAScript language value, + _receiver_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"set"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[Set]](_P_, _V_, _Receiver_). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_, _V_, _Receiver_ »)). + 1. Return ? _target_.[[Set]](_propertyKey_, _value_, _receiver_). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _propertyKey_, _value_, _receiver_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. - 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). + 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_propertyKey_). 1. If _targetDesc_ is not *undefined* and _targetDesc_.[[Configurable]] is *false*, then 1. If IsDataDescriptor(_targetDesc_) is *true* and _targetDesc_.[[Writable]] is *false*, then - 1. If SameValue(_V_, _targetDesc_.[[Value]]) is *false*, throw a *TypeError* exception. + 1. If SameValue(_value_, _targetDesc_.[[Value]]) is *false*, throw a *TypeError* exception. 1. If IsAccessorDescriptor(_targetDesc_) is *true*, then 1. If _targetDesc_.[[Set]] is *undefined*, throw a *TypeError* exception. 1. Return *true*. @@ -15957,24 +15957,24 @@

    [[Delete]] ( - _P_: a property key, + _propertyKey_: a property key, ): either a normal completion containing a Boolean or a throw completion

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"deleteProperty"*). 1. If _trap_ is *undefined*, then - 1. Return ? _target_.[[Delete]](_P_). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_ »)). + 1. Return ? _target_.[[Delete]](_propertyKey_). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _propertyKey_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. - 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). + 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_propertyKey_). 1. If _targetDesc_ is *undefined*, return *true*. 1. If _targetDesc_.[[Configurable]] is *false*, throw a *TypeError* exception. 1. Let _extensibleTarget_ be ? IsExtensible(_target_). @@ -16001,12 +16001,12 @@

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

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"ownKeys"*). 1. If _trap_ is *undefined*, then @@ -16070,12 +16070,12 @@

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"apply"*). 1. If _trap_ is *undefined*, then @@ -16097,13 +16097,13 @@

    for
    -
    a Proxy exotic object _O_
    +
    a Proxy exotic object _obj_
    - 1. Perform ? ValidateNonRevokedProxy(_O_). - 1. Let _target_ be _O_.[[ProxyTarget]]. + 1. Perform ? ValidateNonRevokedProxy(_obj_). + 1. Let _target_ be _obj_.[[ProxyTarget]]. 1. Assert: IsConstructor(_target_) is *true*. - 1. Let _handler_ be _O_.[[ProxyHandler]]. + 1. Let _handler_ be _obj_.[[ProxyHandler]]. 1. Assert: _handler_ is an Object. 1. Let _trap_ be ? GetMethod(_handler_, *"construct"*). 1. If _trap_ is *undefined*, then @@ -16157,15 +16157,15 @@

    1. If _target_ is not an Object, throw a *TypeError* exception. 1. If _handler_ is not an Object, throw a *TypeError* exception. - 1. Let _P_ be MakeBasicObject(« [[ProxyHandler]], [[ProxyTarget]] »). - 1. Set _P_'s essential internal methods, except for [[Call]] and [[Construct]], to the definitions specified in . + 1. Let _proxy_ be MakeBasicObject(« [[ProxyHandler]], [[ProxyTarget]] »). + 1. Set _proxy_'s essential internal methods, except for [[Call]] and [[Construct]], to the definitions specified in . 1. If IsCallable(_target_) is *true*, then - 1. Set _P_.[[Call]] as specified in . + 1. Set _proxy_.[[Call]] as specified in . 1. If IsConstructor(_target_) is *true*, then - 1. Set _P_.[[Construct]] as specified in . - 1. Set _P_.[[ProxyTarget]] to _target_. - 1. Set _P_.[[ProxyHandler]] to _handler_. - 1. Return _P_. + 1. Set _proxy_.[[Construct]] as specified in . + 1. Set _proxy_.[[ProxyTarget]] to _target_. + 1. Set _proxy_.[[ProxyHandler]] to _handler_. + 1. Return _proxy_. @@ -18763,15 +18763,15 @@

    PropertyDefinition : PropertyName `:` AssignmentExpression - 1. Let _propKey_ be ? Evaluation of |PropertyName|. + 1. Let _propertyKey_ be ? Evaluation of |PropertyName|. 1. If this |PropertyDefinition| is contained within a |Script| that is being evaluated for ParseJSON (see step of ParseJSON), then 1. Let _isProtoSetter_ be *false*. - 1. Else if _propKey_ is *"__proto__"* and IsComputedPropertyKey of |PropertyName| is *false*, then + 1. Else if _propertyKey_ is *"__proto__"* and IsComputedPropertyKey of |PropertyName| is *false*, then 1. Let _isProtoSetter_ be *true*. 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 _propKey_. + 1. Let _propValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _propertyKey_. 1. Else, 1. Let _exprValueRef_ be ? Evaluation of |AssignmentExpression|. 1. Let _propValue_ be ? GetValue(_exprValueRef_). @@ -18780,7 +18780,7 @@

    1. Perform ! _object_.[[SetPrototypeOf]](_propValue_). 1. Return ~unused~. 1. Assert: _object_ is an ordinary, extensible object with no non-configurable properties. - 1. Perform ! CreateDataPropertyOrThrow(_object_, _propKey_, _propValue_). + 1. Perform ! CreateDataPropertyOrThrow(_object_, _propertyKey_, _propValue_). 1. Return ~unused~. PropertyDefinition : MethodDefinition @@ -19006,11 +19006,11 @@

    1. Let _rawObj_ be ! ArrayCreate(_count_). 1. Let _index_ be 0. 1. Repeat, while _index_ < _count_, - 1. Let _prop_ be ! ToString(𝔽(_index_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_index_)). 1. Let _cookedValue_ be _cookedStrings_[_index_]. - 1. Perform ! DefinePropertyOrThrow(_template_, _prop_, PropertyDescriptor { [[Value]]: _cookedValue_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }). + 1. Perform ! DefinePropertyOrThrow(_template_, _propertyKey_, PropertyDescriptor { [[Value]]: _cookedValue_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }). 1. Let _rawValue_ be the String value _rawStrings_[_index_]. - 1. Perform ! DefinePropertyOrThrow(_rawObj_, _prop_, PropertyDescriptor { [[Value]]: _rawValue_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }). + 1. Perform ! DefinePropertyOrThrow(_rawObj_, _propertyKey_, PropertyDescriptor { [[Value]]: _rawValue_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }). 1. Set _index_ to _index_ + 1. 1. Perform ! SetIntegrityLevel(_rawObj_, ~frozen~). 1. Perform ! DefinePropertyOrThrow(_template_, *"raw"*, PropertyDescriptor { [[Value]]: _rawObj_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -19516,16 +19516,16 @@

    Runtime Semantics: Evaluation

    1. Let _newTarget_ be GetNewTarget(). 1. Assert: _newTarget_ is a constructor. - 1. Let _func_ be GetSuperConstructor(). + 1. Let _superConstructor_ be GetSuperConstructor(). 1. Let _argList_ be ? ArgumentListEvaluation of |Arguments|. - 1. If IsConstructor(_func_) is *false*, throw a *TypeError* exception. - 1. Let _result_ be ? Construct(_func_, _argList_, _newTarget_). + 1. If IsConstructor(_superConstructor_) is *false*, throw a *TypeError* exception. + 1. Let _result_ be ? Construct(_superConstructor_, _argList_, _newTarget_). 1. Let _thisER_ be GetThisEnvironment(). 1. Assert: _thisER_ is a Function Environment Record. 1. Perform ? BindThisValue(_thisER_, _result_). - 1. Let _F_ be _thisER_.[[FunctionObject]]. - 1. Assert: _F_ is an ECMAScript function object. - 1. Perform ? InitializeInstanceElements(_result_, _F_). + 1. Let _funcObj_ be _thisER_.[[FunctionObject]]. + 1. Assert: _funcObj_ is an ECMAScript function object. + 1. Perform ? InitializeInstanceElements(_result_, _funcObj_). 1. Return _result_. @@ -20422,9 +20422,9 @@

    Runtime Semantics: Evaluation

    1. Let _lVal_ be ? GetValue(_lRef_). 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _r_ be ? IsLessThan(_lVal_, _rVal_, *true*). - 1. If _r_ is *undefined*, return *false*. - 1. Return _r_. + 1. Let _result_ be ? IsLessThan(_lVal_, _rVal_, *true*). + 1. If _result_ is *undefined*, return *false*. + 1. Return _result_.
    RelationalExpression : RelationalExpression `>` ShiftExpression @@ -20432,9 +20432,9 @@

    Runtime Semantics: Evaluation

    1. Let _lVal_ be ? GetValue(_lRef_). 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _r_ be ? IsLessThan(_rVal_, _lVal_, *false*). - 1. If _r_ is *undefined*, return *false*. - 1. Return _r_. + 1. Let _result_ be ? IsLessThan(_rVal_, _lVal_, *false*). + 1. If _result_ is *undefined*, return *false*. + 1. Return _result_.
    RelationalExpression : RelationalExpression `<=` ShiftExpression @@ -20442,8 +20442,8 @@

    Runtime Semantics: Evaluation

    1. Let _lVal_ be ? GetValue(_lRef_). 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _r_ be ? IsLessThan(_rVal_, _lVal_, *false*). - 1. If _r_ is either *true* or *undefined*, return *false*. + 1. Let _result_ be ? IsLessThan(_rVal_, _lVal_, *false*). + 1. If _result_ is either *true* or *undefined*, return *false*. 1. Return *true*.
    RelationalExpression : RelationalExpression `>=` ShiftExpression @@ -20452,8 +20452,8 @@

    Runtime Semantics: Evaluation

    1. Let _lVal_ be ? GetValue(_lRef_). 1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). - 1. Let _r_ be ? IsLessThan(_lVal_, _rVal_, *true*). - 1. If _r_ is either *true* or *undefined*, return *false*. + 1. Let _result_ be ? IsLessThan(_lVal_, _rVal_, *true*). + 1. If _result_ is either *true* or *undefined*, return *false*. 1. Return *true*.
    RelationalExpression : RelationalExpression `instanceof` ShiftExpression @@ -20490,21 +20490,21 @@

    Runtime Semantics: Evaluation

    InstanceofOperator ( - _V_: an ECMAScript language value, + _value_: an ECMAScript language value, _target_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    description
    -
    It implements the generic algorithm for determining if _V_ is an instance of _target_ either by consulting _target_'s %Symbol.hasInstance% method or, if absent, determining whether the value of _target_'s *"prototype"* property is present in _V_'s prototype chain.
    +
    It implements the generic algorithm for determining if _value_ is an instance of _target_ either by consulting _target_'s %Symbol.hasInstance% method or, if absent, determining whether the value of _target_'s *"prototype"* property is present in _value_'s prototype chain.
    1. If _target_ is not an Object, throw a *TypeError* exception. 1. Let _instOfHandler_ be ? GetMethod(_target_, %Symbol.hasInstance%). 1. If _instOfHandler_ is not *undefined*, then - 1. Return ToBoolean(? Call(_instOfHandler_, _target_, « _V_ »)). + 1. Return ToBoolean(? Call(_instOfHandler_, _target_, « _value_ »)). 1. [id="step-instanceof-check-function"] If IsCallable(_target_) is *false*, throw a *TypeError* exception. - 1. [id="step-instanceof-fallback"] Return ? OrdinaryHasInstance(_target_, _V_). + 1. [id="step-instanceof-fallback"] Return ? OrdinaryHasInstance(_target_, _value_).

    Steps and provide compatibility with previous editions of ECMAScript that did not use a %Symbol.hasInstance% method to define the `instanceof` operator semantics. If an object does not define or inherit %Symbol.hasInstance% it uses the default `instanceof` semantics.

    @@ -21147,17 +21147,17 @@

    AssignmentProperty : IdentifierReference Initializer? - 1. Let _P_ be the StringValue of |IdentifierReference|. - 1. Let _lRef_ be ? ResolveBinding(_P_). - 1. Let _v_ be ? GetV(_value_, _P_). + 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. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then - 1. Set _v_ to ? NamedEvaluation of |Initializer| with argument _P_. + 1. Set _v_ 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. Return « _P_ ». + 1. Return « _propertyName_ ». AssignmentProperty : PropertyName `:` AssignmentElement @@ -21255,17 +21255,17 @@

    1. If |DestructuringAssignmentTarget| is neither an |ObjectLiteral| nor an |ArrayLiteral|, then 1. Let _lRef_ be ? Evaluation of |DestructuringAssignmentTarget|. - 1. Let _A_ be ! ArrayCreate(0). + 1. Let _array_ be ! ArrayCreate(0). 1. Let _n_ be 0. 1. Repeat, while _iteratorRecord_.[[Done]] is *false*, 1. Let _next_ be ? IteratorStepValue(_iteratorRecord_). 1. If _next_ is not ~done~, then - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_n_)), _next_). + 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_, _A_). + 1. Return ? PutValue(_lRef_, _array_). 1. Let _nestedAssignmentPattern_ be the |AssignmentPattern| that is covered by |DestructuringAssignmentTarget|. - 1. Return ? DestructuringAssignmentEvaluation of _nestedAssignmentPattern_ with argument _A_. + 1. Return ? DestructuringAssignmentEvaluation of _nestedAssignmentPattern_ with argument _array_. @@ -21483,9 +21483,9 @@

    1. Let _declarations_ be the LexicallyScopedDeclarations of _code_. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. - 1. For each element _d_ of _declarations_, do - 1. For each element _dn_ of the BoundNames of _d_, do - 1. If IsConstantDeclaration of _d_ is *true*, then + 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. Else, 1. [id="step-blockdeclarationinstantiation-createmutablebinding", normative-optional] If the host is a web browser or otherwise supports , then @@ -21493,14 +21493,14 @@

    1. Perform ! _env_.CreateMutableBinding(_dn_, *false*). 1. Else, 1. Perform ! _env_.CreateMutableBinding(_dn_, *false*). - 1. If _d_ is either a |FunctionDeclaration|, a |GeneratorDeclaration|, an |AsyncFunctionDeclaration|, or an |AsyncGeneratorDeclaration|, then - 1. Let _fn_ be the sole element of the BoundNames of _d_. - 1. Let _fo_ be InstantiateFunctionObject of _d_ with arguments _env_ and _privateEnv_. + 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. [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. Else, - 1. Assert: _d_ is a |FunctionDeclaration|. + 1. Assert: _decl_ is a |FunctionDeclaration|. 1. Perform ! _env_.SetMutableBinding(_fn_, _fo_, *false*). 1. Else, 1. Perform ! _env_.InitializeBinding(_fn_, _fo_). @@ -21732,9 +21732,9 @@

    BindingProperty : PropertyName `:` BindingElement - 1. Let _P_ be ? Evaluation of |PropertyName|. - 1. Perform ? KeyedBindingInitialization of |BindingElement| with arguments _value_, _environment_, and _P_. - 1. Return « _P_ ». + 1. Let _propertyKey_ be ? Evaluation of |PropertyName|. + 1. Perform ? KeyedBindingInitialization of |BindingElement| with arguments _value_, _environment_, and _propertyKey_. + 1. Return « _propertyKey_ ». @@ -21983,14 +21983,14 @@

    DoWhileStatement : `do` Statement `while` `(` Expression `)` `;` - 1. Let _V_ be *undefined*. + 1. Let _iterationResult_ be *undefined*. 1. Repeat, 1. Let _stmtResult_ be Completion(Evaluation of |Statement|). - 1. If LoopContinues(_stmtResult_, _labelSet_) is *false*, return ? UpdateEmpty(_stmtResult_, _V_). - 1. If _stmtResult_.[[Value]] is not ~empty~, set _V_ to _stmtResult_.[[Value]]. + 1. If LoopContinues(_stmtResult_, _labelSet_) is *false*, return ? UpdateEmpty(_stmtResult_, _iterationResult_). + 1. If _stmtResult_.[[Value]] is not ~empty~, set _iterationResult_ to _stmtResult_.[[Value]]. 1. Let _exprRef_ be ? Evaluation of |Expression|. 1. Let _exprValue_ be ? GetValue(_exprRef_). - 1. If ToBoolean(_exprValue_) is *false*, return _V_. + 1. If ToBoolean(_exprValue_) is *false*, return _iterationResult_.
    @@ -22026,14 +22026,14 @@

    WhileStatement : `while` `(` Expression `)` Statement - 1. Let _V_ be *undefined*. + 1. Let _iterationResult_ be *undefined*. 1. Repeat, 1. Let _exprRef_ be ? Evaluation of |Expression|. 1. Let _exprValue_ be ? GetValue(_exprRef_). - 1. If ToBoolean(_exprValue_) is *false*, return _V_. + 1. If ToBoolean(_exprValue_) is *false*, return _iterationResult_. 1. Let _stmtResult_ be Completion(Evaluation of |Statement|). - 1. If LoopContinues(_stmtResult_, _labelSet_) is *false*, return ? UpdateEmpty(_stmtResult_, _V_). - 1. If _stmtResult_.[[Value]] is not ~empty~, set _V_ to _stmtResult_.[[Value]]. + 1. If LoopContinues(_stmtResult_, _labelSet_) is *false*, return ? UpdateEmpty(_stmtResult_, _iterationResult_). + 1. If _stmtResult_.[[Value]] is not ~empty~, set _iterationResult_ to _stmtResult_.[[Value]]. @@ -22134,16 +22134,16 @@

    - 1. Let _V_ be *undefined*. + 1. Let _iterationResult_ be *undefined*. 1. Perform ? CreatePerIterationEnvironment(_perIterationBindings_). 1. Repeat, 1. If _test_ is not ~empty~, then 1. Let _testRef_ be ? Evaluation of _test_. 1. Let _testValue_ be ? GetValue(_testRef_). - 1. If ToBoolean(_testValue_) is *false*, return _V_. + 1. If ToBoolean(_testValue_) is *false*, return _iterationResult_. 1. Let _result_ be Completion(Evaluation of _stmt_). - 1. If LoopContinues(_result_, _labelSet_) is *false*, return ? UpdateEmpty(_result_, _V_). - 1. If _result_.[[Value]] is not ~empty~, set _V_ to _result_.[[Value]]. + 1. If LoopContinues(_result_, _labelSet_) is *false*, return ? UpdateEmpty(_result_, _iterationResult_). + 1. If _result_.[[Value]] is not ~empty~, set _iterationResult_ to _result_.[[Value]]. 1. Perform ? CreatePerIterationEnvironment(_perIterationBindings_). 1. If _increment_ is not ~empty~, then 1. Let _incRef_ be ? Evaluation of _increment_. @@ -22452,7 +22452,7 @@

    1. If _iteratorKind_ is not present, set _iteratorKind_ to ~sync~. 1. Let _oldEnv_ be the running execution context's LexicalEnvironment. - 1. Let _V_ be *undefined*. + 1. Let _iterationResult_ be *undefined*. 1. Let _destructuring_ be IsDestructuring of _lhs_. 1. If _destructuring_ is *true* and _lhsKind_ is ~assignment~, then 1. Assert: _lhs_ is a |LeftHandSideExpression|. @@ -22462,7 +22462,7 @@

    1. If _iteratorKind_ is ~async~, set _nextResult_ to ? Await(_nextResult_). 1. If _nextResult_ is not an Object, throw a *TypeError* exception. 1. Let _done_ be ? IteratorComplete(_nextResult_). - 1. If _done_ is *true*, return _V_. + 1. If _done_ is *true*, return _iterationResult_. 1. Let _nextValue_ be ? IteratorValue(_nextResult_). 1. If _lhsKind_ is either ~assignment~ or ~var-binding~, then 1. If _destructuring_ is *true*, then @@ -22501,12 +22501,12 @@

    1. Let _result_ be Completion(Evaluation of _stmt_). 1. Set the running execution context's LexicalEnvironment to _oldEnv_. 1. If LoopContinues(_result_, _labelSet_) is *false*, then - 1. Set _status_ to Completion(UpdateEmpty(_result_, _V_)). + 1. Set _status_ to Completion(UpdateEmpty(_result_, _iterationResult_)). 1. If _iterationKind_ is ~enumerate~, return ? _status_. 1. Assert: _iterationKind_ is ~iterate~. 1. If _iteratorKind_ is ~async~, return ? AsyncIteratorClose(_iteratorRecord_, _status_). 1. Return ? IteratorClose(_iteratorRecord_, _status_). - 1. If _result_.[[Value]] is not ~empty~, set _V_ to _result_.[[Value]]. + 1. If _result_.[[Value]] is not ~empty~, set _iterationResult_ to _result_.[[Value]]. @@ -22527,22 +22527,22 @@

    Runtime Semantics: Evaluation

    EnumerateObjectProperties ( - _O_: an Object, + _obj_: an Object, ): an iterator object

    - 1. Return an iterator object whose `next` method iterates over all the String-valued keys of enumerable properties of _O_. The iterator object is never directly accessible to ECMAScript code. The mechanics and order of enumerating the properties is not specified but must conform to the rules specified below. + 1. Return an iterator object whose `next` method iterates over all the String-valued keys of enumerable properties of _obj_. The iterator object is never directly accessible to ECMAScript code. The mechanics and order of enumerating the properties is not specified but must conform to the rules specified below.

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

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

    -

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

    +

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

      -
    • the value of the [[Prototype]] internal slot of _O_ or an object in its prototype chain changes,
    • -
    • a property is removed from _O_ or an object in its prototype chain,
    • -
    • a property is added to an object in _O_'s prototype chain, or
    • -
    • the value of the [[Enumerable]] attribute of a property of _O_ or an object in its prototype chain changes.
    • +
    • the value of the [[Prototype]] internal slot of _obj_ or an object in its prototype chain changes,
    • +
    • a property is removed from _obj_ or an object in its prototype chain,
    • +
    • a property is added to an object in _obj_'s prototype chain, or
    • +
    • the value of the [[Enumerable]] attribute of a property of _obj_ or an object in its prototype chain changes.
    @@ -22610,28 +22610,28 @@

    The %ForInIteratorPrototype% Object

    %ForInIteratorPrototype%.next ( )

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

    Runtime Semantics: Evaluation

    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_. - 1. Let _C_ be Completion(Evaluation of |Statement|). + 1. Let _stmtCompletion_ be Completion(Evaluation of |Statement|). 1. Set the running execution context's LexicalEnvironment to _oldEnv_. - 1. Return ? UpdateEmpty(_C_, *undefined*). + 1. Return ? UpdateEmpty(_stmtCompletion_, *undefined*).

    No matter how control leaves the embedded |Statement|, whether normally or by some form of abrupt completion or exception, the LexicalEnvironment is always restored to its former state.

    @@ -22907,78 +22907,78 @@

    CaseBlock : `{` CaseClauses `}` - 1. Let _V_ be *undefined*. - 1. Let _A_ be the List of |CaseClause| items in |CaseClauses|, in source text order. + 1. Let _resultValue_ be *undefined*. + 1. Let _caseClauses_ be the List of |CaseClause| items in |CaseClauses|, in source text order. 1. Let _found_ be *false*. - 1. For each |CaseClause| _C_ of _A_, do + 1. For each |CaseClause| _clause_ of _caseClauses_, do 1. If _found_ is *false*, then - 1. Set _found_ to ? CaseClauseIsSelected(_C_, _input_). + 1. Set _found_ to ? CaseClauseIsSelected(_clause_, _input_). 1. If _found_ is *true*, then - 1. Let _R_ be Completion(Evaluation of _C_). - 1. If _R_.[[Value]] is not ~empty~, set _V_ to _R_.[[Value]]. - 1. If _R_ is an abrupt completion, return ? UpdateEmpty(_R_, _V_). - 1. Return _V_. + 1. Let _completion_ be Completion(Evaluation of _clause_). + 1. If _completion_.[[Value]] is not ~empty~, set _resultValue_ to _completion_.[[Value]]. + 1. If _completion_ is an abrupt completion, return ? UpdateEmpty(_completion_, _resultValue_). + 1. Return _resultValue_. CaseBlock : `{` CaseClauses? DefaultClause CaseClauses? `}` - 1. Let _V_ be *undefined*. + 1. Let _resultValue_ be *undefined*. 1. If the first |CaseClauses| is present, then - 1. Let _A_ be the List of |CaseClause| items in the first |CaseClauses|, in source text order. + 1. Let _caseClauses_ be the List of |CaseClause| items in the first |CaseClauses|, in source text order. 1. Else, - 1. Let _A_ be a new empty List. + 1. Let _caseClauses_ be a new empty List. 1. Let _found_ be *false*. - 1. For each |CaseClause| _C_ of _A_, do + 1. For each |CaseClause| _clause_ of _caseClauses_, do 1. If _found_ is *false*, then - 1. Set _found_ to ? CaseClauseIsSelected(_C_, _input_). + 1. Set _found_ to ? CaseClauseIsSelected(_clause_, _input_). 1. If _found_ is *true*, then - 1. Let _R_ be Completion(Evaluation of _C_). - 1. If _R_.[[Value]] is not ~empty~, set _V_ to _R_.[[Value]]. - 1. If _R_ is an abrupt completion, return ? UpdateEmpty(_R_, _V_). + 1. Let _completion_ be Completion(Evaluation of _clause_). + 1. If _completion_.[[Value]] is not ~empty~, set _resultValue_ to _completion_.[[Value]]. + 1. If _completion_ is an abrupt completion, return ? UpdateEmpty(_completion_, _resultValue_). 1. Let _foundInB_ be *false*. 1. If the second |CaseClauses| is present, then - 1. Let _B_ be the List of |CaseClause| items in the second |CaseClauses|, in source text order. + 1. Let _secondCaseClauses_ be the List of |CaseClause| items in the second |CaseClauses|, in source text order. 1. Else, - 1. Let _B_ be a new empty List. + 1. Let _secondCaseClauses_ be a new empty List. 1. If _found_ is *false*, then - 1. For each |CaseClause| _C_ of _B_, do + 1. For each |CaseClause| _clause_ of _secondCaseClauses_, do 1. If _foundInB_ is *false*, then - 1. Set _foundInB_ to ? CaseClauseIsSelected(_C_, _input_). + 1. Set _foundInB_ to ? CaseClauseIsSelected(_clause_, _input_). 1. If _foundInB_ is *true*, then - 1. Let _R_ be Completion(Evaluation of |CaseClause| _C_). - 1. If _R_.[[Value]] is not ~empty~, set _V_ to _R_.[[Value]]. - 1. If _R_ is an abrupt completion, return ? UpdateEmpty(_R_, _V_). - 1. If _foundInB_ is *true*, return _V_. + 1. Let _completion_ be Completion(Evaluation of |CaseClause| _clause_). + 1. If _completion_.[[Value]] is not ~empty~, set _resultValue_ to _completion_.[[Value]]. + 1. If _completion_ is an abrupt completion, return ? UpdateEmpty(_completion_, _resultValue_). + 1. If _foundInB_ is *true*, return _resultValue_. 1. Let _defaultR_ be Completion(Evaluation of |DefaultClause|). - 1. If _defaultR_.[[Value]] is not ~empty~, set _V_ to _defaultR_.[[Value]]. - 1. If _defaultR_ is an abrupt completion, return ? UpdateEmpty(_defaultR_, _V_). + 1. If _defaultR_.[[Value]] is not ~empty~, set _resultValue_ to _defaultR_.[[Value]]. + 1. If _defaultR_ is an abrupt completion, return ? UpdateEmpty(_defaultR_, _resultValue_). 1. NOTE: The following is another complete iteration of the second |CaseClauses|. - 1. For each |CaseClause| _C_ of _B_, do - 1. Let _R_ be Completion(Evaluation of |CaseClause| _C_). - 1. If _R_.[[Value]] is not ~empty~, set _V_ to _R_.[[Value]]. - 1. If _R_ is an abrupt completion, return ? UpdateEmpty(_R_, _V_). - 1. Return _V_. + 1. For each |CaseClause| _clause_ of _secondCaseClauses_, do + 1. Let _completion_ be Completion(Evaluation of |CaseClause| _clause_). + 1. If _completion_.[[Value]] is not ~empty~, set _resultValue_ to _completion_.[[Value]]. + 1. If _completion_ is an abrupt completion, return ? UpdateEmpty(_completion_, _resultValue_). + 1. Return _resultValue_.

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

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

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

    +

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

    @@ -22992,9 +22992,9 @@

    Runtime Semantics: Evaluation

    1. Let _blockEnv_ be NewDeclarativeEnvironment(_oldEnv_). 1. Perform BlockDeclarationInstantiation(|CaseBlock|, _blockEnv_). 1. Set the running execution context's LexicalEnvironment to _blockEnv_. - 1. Let _R_ be Completion(CaseBlockEvaluation of |CaseBlock| with argument _switchValue_). + 1. Let _blockResult_ be Completion(CaseBlockEvaluation of |CaseBlock| with argument _switchValue_). 1. Set the running execution context's LexicalEnvironment to _oldEnv_. - 1. Return _R_. + 1. Return _blockResult_.

    No matter how control leaves the |SwitchStatement| the LexicalEnvironment is always restored to its former state.

    @@ -23212,9 +23212,9 @@

    1. If _status_ is an abrupt completion, then 1. Set the running execution context's LexicalEnvironment to _oldEnv_. 1. Return ? _status_. - 1. Let _B_ be Completion(Evaluation of |Block|). + 1. Let _blockCompletion_ be Completion(Evaluation of |Block|). 1. Set the running execution context's LexicalEnvironment to _oldEnv_. - 1. Return ? _B_. + 1. Return ? _blockCompletion_. Catch : `catch` Block @@ -23229,26 +23229,26 @@

    Runtime Semantics: Evaluation

    TryStatement : `try` Block Catch - 1. Let _B_ be Completion(Evaluation of |Block|). - 1. If _B_ is a throw completion, let _C_ be Completion(CatchClauseEvaluation of |Catch| with argument _B_.[[Value]]). - 1. Else, let _C_ be _B_. - 1. Return ? UpdateEmpty(_C_, *undefined*). + 1. Let _blockResult_ be Completion(Evaluation of |Block|). + 1. If _blockResult_ is a throw completion, let _catchResult_ be Completion(CatchClauseEvaluation of |Catch| with argument _blockResult_.[[Value]]). + 1. Else, let _catchResult_ be _blockResult_. + 1. Return ? UpdateEmpty(_catchResult_, *undefined*). TryStatement : `try` Block Finally - 1. Let _B_ be Completion(Evaluation of |Block|). - 1. Let _F_ be Completion(Evaluation of |Finally|). - 1. If _F_ is a normal completion, set _F_ to _B_. - 1. Return ? UpdateEmpty(_F_, *undefined*). + 1. Let _blockResult_ be Completion(Evaluation of |Block|). + 1. Let _finallyResult_ be Completion(Evaluation of |Finally|). + 1. If _finallyResult_ is a normal completion, set _finallyResult_ to _blockResult_. + 1. Return ? UpdateEmpty(_finallyResult_, *undefined*). TryStatement : `try` Block Catch Finally - 1. Let _B_ be Completion(Evaluation of |Block|). - 1. If _B_ is a throw completion, let _C_ be Completion(CatchClauseEvaluation of |Catch| with argument _B_.[[Value]]). - 1. Else, let _C_ be _B_. - 1. Let _F_ be Completion(Evaluation of |Finally|). - 1. If _F_ is a normal completion, set _F_ to _C_. - 1. Return ? UpdateEmpty(_F_, *undefined*). + 1. Let _blockResult_ be Completion(Evaluation of |Block|). + 1. If _blockResult_ is a throw completion, let _catchResult_ be Completion(CatchClauseEvaluation of |Catch| with argument _blockResult_.[[Value]]). + 1. Else, let _catchResult_ be _blockResult_. + 1. Let _finallyResult_ be Completion(Evaluation of |Finally|). + 1. If _finallyResult_ is a normal completion, set _finallyResult_ to _catchResult_. + 1. Return ? UpdateEmpty(_finallyResult_, *undefined*). @@ -23698,18 +23698,18 @@

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

    An anonymous |FunctionDeclaration| can only occur as part of an `export default` declaration, and its function code is therefore always strict mode code.

    @@ -24016,7 +24016,7 @@

    MethodDefinition : ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}` - 1. Let _propKey_ be ? Evaluation of |ClassElementName|. + 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. 1. Let _env_ be the running execution context's LexicalEnvironment. 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. If _functionPrototype_ is present, then @@ -24026,7 +24026,7 @@

    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. Return the Record { [[Key]]: _propKey_, [[Closure]]: _closure_ }. + 1. Return the Record { [[Key]]: _propertyKey_, [[Closure]]: _closure_ }. @@ -24047,75 +24047,75 @@

    MethodDefinition : `get` ClassElementName `(` `)` `{` FunctionBody `}` - 1. Let _propKey_ be ? Evaluation of |ClassElementName|. + 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. 1. Let _env_ 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. Perform SetFunctionName(_closure_, _propKey_, *"get"*). - 1. If _propKey_ is a Private Name, then - 1. Return PrivateElement { [[Key]]: _propKey_, [[Kind]]: ~accessor~, [[Get]]: _closure_, [[Set]]: *undefined* }. + 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_, _propKey_, _desc_). + 1. Perform ? DefinePropertyOrThrow(_object_, _propertyKey_, _desc_). 1. Return ~unused~. MethodDefinition : `set` ClassElementName `(` PropertySetParameterList `)` `{` FunctionBody `}` - 1. Let _propKey_ be ? Evaluation of |ClassElementName|. + 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. 1. Let _env_ 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. Perform SetFunctionName(_closure_, _propKey_, *"set"*). - 1. If _propKey_ is a Private Name, then - 1. Return PrivateElement { [[Key]]: _propKey_, [[Kind]]: ~accessor~, [[Get]]: *undefined*, [[Set]]: _closure_ }. + 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_, _propKey_, _desc_). + 1. Perform ? DefinePropertyOrThrow(_object_, _propertyKey_, _desc_). 1. Return ~unused~. GeneratorMethod : `*` ClassElementName `(` UniqueFormalParameters `)` `{` GeneratorBody `}` - 1. Let _propKey_ be ? Evaluation of |ClassElementName|. + 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. 1. Let _env_ 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. Perform SetFunctionName(_closure_, _propKey_). + 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_, _propKey_, _closure_, _enumerable_). + 1. Return ? DefineMethodProperty(_object_, _propertyKey_, _closure_, _enumerable_). AsyncGeneratorMethod : `async` `*` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncGeneratorBody `}` - 1. Let _propKey_ be ? Evaluation of |ClassElementName|. + 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. 1. Let _env_ 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. Perform SetFunctionName(_closure_, _propKey_). + 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_, _propKey_, _closure_, _enumerable_). + 1. Return ? DefineMethodProperty(_object_, _propertyKey_, _closure_, _enumerable_). AsyncMethod : `async` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncFunctionBody `}` - 1. Let _propKey_ be ? Evaluation of |ClassElementName|. + 1. Let _propertyKey_ be ? Evaluation of |ClassElementName|. 1. Let _env_ 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. Perform SetFunctionName(_closure_, _propKey_). - 1. Return ? DefineMethodProperty(_object_, _propKey_, _closure_, _enumerable_). + 1. Perform SetFunctionName(_closure_, _propertyKey_). + 1. Return ? DefineMethodProperty(_object_, _propertyKey_, _closure_, _enumerable_). @@ -24220,11 +24220,11 @@

    GeneratorBody : FunctionBody 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_). - 1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorPrototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »). - 1. Set _G_.[[GeneratorBrand]] to ~empty~. - 1. Set _G_.[[GeneratorState]] to ~suspended-start~. - 1. Perform GeneratorStart(_G_, |FunctionBody|). - 1. Return ReturnCompletion(_G_). + 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_). @@ -24241,20 +24241,20 @@

    1. Let _name_ be the StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform SetFunctionName(_F_, _name_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Perform SetFunctionName(_closure_, _name_). 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). - 1. Return _F_. + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[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 _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform SetFunctionName(_F_, *"default"*). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Perform SetFunctionName(_closure_, *"default"*). 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). - 1. Return _F_. + 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Return _closure_.

    An anonymous |GeneratorDeclaration| can only occur as part of an `export default` declaration, and its function code is therefore always strict mode code.

    @@ -24472,22 +24472,22 @@

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

    An anonymous |AsyncGeneratorDeclaration| can only occur as part of an `export default` declaration.

    @@ -25172,27 +25172,27 @@

    1. Let _defaultConstructor_ 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 _F_ be the active function object. - 1. If _F_.[[ConstructorKind]] is ~derived~, then + 1. Let _constructorFunction_ be the active function object. + 1. If _constructorFunction_.[[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 ! _F_.[[GetPrototypeOf]](). + 1. Let _func_ be ! _constructorFunction_.[[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_, _F_). + 1. Perform ? InitializeInstanceElements(_result_, _constructorFunction_). 1. Return NormalCompletion(_result_). - 1. Let _F_ be CreateBuiltinFunction(_defaultConstructor_, 0, _className_, « [[ConstructorKind]], [[SourceText]], [[PrivateMethods]], [[Fields]] », the current Realm Record, _constructorParent_). + 1. Let _constructorFunction_ be CreateBuiltinFunction(_defaultConstructor_, 0, _className_, « [[ConstructorKind]], [[SourceText]], [[PrivateMethods]], [[Fields]] », the current Realm Record, _constructorParent_). 1. Else, 1. Let _constructorInfo_ be ! DefineMethod of _constructor_ with arguments _proto_ and _constructorParent_. - 1. Let _F_ be _constructorInfo_.[[Closure]]. - 1. Perform MakeClassConstructor(_F_). - 1. Perform SetFunctionName(_F_, _className_). - 1. Set _F_.[[SourceText]] to _sourceText_. - 1. Perform MakeConstructor(_F_, *false*, _proto_). - 1. If |ClassHeritage| is present, set _F_.[[ConstructorKind]] to ~derived~. - 1. Perform ! DefineMethodProperty(_proto_, *"constructor"*, _F_, *false*). + 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 _instancePrivateMethods_ be a new empty List. @@ -25203,7 +25203,7 @@

    1. If IsStatic of _e_ is *false*, then 1. Let _element_ be Completion(ClassElementEvaluation of _e_ with argument _proto_). 1. Else, - 1. Let _element_ be Completion(ClassElementEvaluation of _e_ with argument _F_). + 1. Let _element_ be Completion(ClassElementEvaluation of _e_ with argument _constructorFunction_). 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_. @@ -25229,22 +25229,22 @@

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

    1. Let _name_ be the StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |AsyncFunctionDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform SetFunctionName(_F_, _name_). - 1. Return _F_. + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Perform SetFunctionName(_closure_, _name_). + 1. Return _closure_. AsyncFunctionDeclaration : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}` 1. Let _sourceText_ be the source text matched by |AsyncFunctionDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform SetFunctionName(_F_, *"default"*). - 1. Return _F_. + 1. Let _closure_ be OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). + 1. Perform SetFunctionName(_closure_, *"default"*). + 1. Return _closure_. @@ -26227,20 +26227,20 @@

    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 _d_ of _varDeclarations_, 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. 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. 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. 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 _d_ as the first element of _functionsToInitialize_. + 1. Insert _varDecl_ as the first element of _functionsToInitialize_. 1. Let _declaredVarNames_ be a new empty List. - 1. For each element _d_ of _varDeclarations_, 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. 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. If _vnDefinable_ is *false*, throw a *TypeError* exception. @@ -26252,27 +26252,27 @@

    1. If _strict_ is *false*, then 1. Let _declaredFunctionOrVarNames_ be the list-concatenation of _declaredFunctionNames_ and _declaredVarNames_. 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 _F_ be the StringValue of the |BindingIdentifier| of _f_. - 1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _script_, then - 1. If HasLexicalDeclaration(_env_, _F_) is *false*, then - 1. Let _fnDefinable_ be ? CanDeclareGlobalVar(_env_, _F_). + 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. NOTE: A var binding for _F_ is only instantiated here if it is neither a VarDeclaredName nor the name of another |FunctionDeclaration|. - 1. If _declaredFunctionOrVarNames_ does not contain _F_, then - 1. Perform ? CreateGlobalVarBinding(_env_, _F_, *false*). - 1. Append _F_ to _declaredFunctionOrVarNames_. + 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. [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(_F_, *false*). - 1. Perform ? _gEnv_.SetMutableBinding(_F_, _fObj_, *false*). + 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 _privateEnv_ be *null*. - 1. For each element _d_ of _lexDeclarations_, do + 1. For each element _lexDecl_ of _lexDeclarations_, 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. 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. Else, 1. Perform ? _env_.CreateMutableBinding(_dn_, *false*). @@ -29803,17 +29803,17 @@

    undefined

    Function Properties of the Global Object

    -

    eval ( _x_ )

    +

    eval ( _source_ )

    This function is the %eval% intrinsic object.

    It performs the following steps when called:

    - 1. Return ? PerformEval(_x_, *false*, *false*). + 1. Return ? PerformEval(_source_, *false*, *false*).

    PerformEval ( - _x_: an ECMAScript language value, + _source_: an ECMAScript language value, _strictCaller_: a Boolean, _direct_: a Boolean, ): either a normal completion containing an ECMAScript language value or a throw completion @@ -29822,10 +29822,10 @@

    1. Assert: If _direct_ is *false*, then _strictCaller_ is also *false*. - 1. If _x_ is not a String, return _x_. + 1. If _source_ is not a String, return _source_. 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_, « », _x_, _direct_). + 1. Perform ? HostEnsureCanCompileStrings(_evalRealm_, « », _source_, _direct_). 1. Let _inFunction_ be *false*. 1. Let _inMethod_ be *false*. 1. Let _inDerivedConstructor_ be *false*. @@ -29833,14 +29833,14 @@

    1. If _direct_ is *true*, then 1. Let _thisEnvRec_ be GetThisEnvironment(). 1. If _thisEnvRec_ is a Function Environment Record, then - 1. Let _F_ be _thisEnvRec_.[[FunctionObject]]. + 1. Let _func_ be _thisEnvRec_.[[FunctionObject]]. 1. Set _inFunction_ to *true*. 1. Set _inMethod_ to _thisEnvRec_.HasSuperBinding(). - 1. If _F_.[[ConstructorKind]] is ~derived~, set _inDerivedConstructor_ to *true*. - 1. Let _classFieldInitializerName_ be _F_.[[ClassFieldInitializerName]]. + 1. If _func_.[[ConstructorKind]] is ~derived~, set _inDerivedConstructor_ 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: - 1. Let _script_ be ParseText(_x_, |Script|). + 1. Let _script_ be ParseText(_source_, |Script|). 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_. @@ -29970,41 +29970,41 @@

    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. 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 _F_ be the StringValue of the |BindingIdentifier| of _f_. - 1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _body_, then + 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. Assert: The following loop will terminate. 1. Repeat, while _thisEnv_ is not _varEnv_, 1. If _thisEnv_ is not an Object Environment Record, then - 1. If ! _thisEnv_.HasBinding(_F_) is *true*, 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 1. If _thisEnv_ is not the Environment Record for a |Catch| clause, set _bindingExists_ to *true*. 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_, _F_) is *false*, then - 1. Let _fnDefinable_ be ? CanDeclareGlobalVar(_varEnv_, _F_). + 1. If HasLexicalDeclaration(_varEnv_, _funcName_) is *false*, then + 1. Let _fnDefinable_ be ? CanDeclareGlobalVar(_varEnv_, _funcName_). 1. Else, 1. Let _fnDefinable_ 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 _F_, then + 1. If _declaredFunctionOrVarNames_ does not contain _funcName_, then 1. If _varEnv_ is a Global Environment Record, then - 1. Perform ? CreateGlobalVarBinding(_varEnv_, _F_, *true*). + 1. Perform ? CreateGlobalVarBinding(_varEnv_, _funcName_, *true*). 1. Else, - 1. Set _bindingExists_ to ! _varEnv_.HasBinding(_F_). + 1. Set _bindingExists_ to ! _varEnv_.HasBinding(_funcName_). 1. If _bindingExists_ is *false*, then - 1. Perform ! _varEnv_.CreateMutableBinding(_F_, *true*). - 1. Perform ! _varEnv_.InitializeBinding(_F_, *undefined*). - 1. Append _F_ to _declaredFunctionOrVarNames_. + 1. Perform ! _varEnv_.CreateMutableBinding(_funcName_, *true*). + 1. Perform ! _varEnv_.InitializeBinding(_funcName_, *undefined*). + 1. Append _funcName_ to _declaredFunctionOrVarNames_. 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(_F_, *false*). - 1. Perform ? _gEnv_.SetMutableBinding(_F_, _fObj_, *false*). + 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_. @@ -30093,25 +30093,25 @@

    parseInt ( _string_, _radix_ )

    It performs the following steps when called:

    1. Let _inputString_ be ? ToString(_string_). - 1. Let _S_ be ! TrimString(_inputString_, ~start~). + 1. Let _trimmedString_ be ! TrimString(_inputString_, ~start~). 1. Let _sign_ be 1. - 1. If _S_ is not empty and the first code unit of _S_ is the code unit 0x002D (HYPHEN-MINUS), set _sign_ to -1. - 1. If _S_ is not empty and the first code unit of _S_ is either the code unit 0x002B (PLUS SIGN) or the code unit 0x002D (HYPHEN-MINUS), set _S_ to the substring of _S_ from index 1. - 1. Let _R_ be ℝ(? ToInt32(_radix_)). + 1. If _trimmedString_ is not empty and the first code unit of _trimmedString_ is the code unit 0x002D (HYPHEN-MINUS), set _sign_ to -1. + 1. If _trimmedString_ is not empty and the first code unit of _trimmedString_ is either the code unit 0x002B (PLUS SIGN) or the code unit 0x002D (HYPHEN-MINUS), set _trimmedString_ to the substring of _trimmedString_ from index 1. + 1. Let _radixMV_ be ℝ(? ToInt32(_radix_)). 1. Let _stripPrefix_ be *true*. - 1. If _R_ ≠ 0, then - 1. If _R_ < 2 or _R_ > 36, return *NaN*. - 1. If _R_ ≠ 16, set _stripPrefix_ to *false*. + 1. If _radixMV_ ≠ 0, then + 1. If _radixMV_ < 2 or _radixMV_ > 36, return *NaN*. + 1. If _radixMV_ ≠ 16, set _stripPrefix_ to *false*. 1. Else, - 1. Set _R_ to 10. + 1. Set _radixMV_ to 10. 1. If _stripPrefix_ is *true*, then - 1. If the length of _S_ ≥ 2 and the first two code units of _S_ are either *"0x"* or *"0X"*, then - 1. Set _S_ to the substring of _S_ from index 2. - 1. Set _R_ to 16. - 1. If _S_ contains a code unit that is not a radix-_R_ digit, let _end_ be the index within _S_ of the first such code unit; else let _end_ be the length of _S_. - 1. Let _Z_ be the substring of _S_ from 0 to _end_. - 1. If _Z_ is empty, return *NaN*. - 1. Let _mathInt_ be the integer value that is represented by _Z_ in radix-_R_ notation, using the letters A through Z and a through z for digits with values 10 through 35. (However, if _R_ = 10 and _Z_ contains more than 20 significant digits, every significant digit after the 20th may be replaced by a 0 digit, at the option of the implementation; and if _R_ is not one of 2, 4, 8, 10, 16, or 32, then _mathInt_ may be an implementation-approximated integer representing the integer value denoted by _Z_ in radix-_R_ notation.) + 1. If the length of _trimmedString_ ≥ 2 and the first two code units of _trimmedString_ are either *"0x"* or *"0X"*, then + 1. Set _trimmedString_ to the substring of _trimmedString_ from index 2. + 1. Set _radixMV_ to 16. + 1. If _trimmedString_ contains a code unit that is not a radix-_radixMV_ digit, let _end_ be the index within _trimmedString_ of the first such code unit; else let _end_ be the length of _trimmedString_. + 1. Let _numberString_ be the substring of _trimmedString_ from 0 to _end_. + 1. If _numberString_ is empty, return *NaN*. + 1. Let _mathInt_ be the integer value that is represented by _numberString_ in radix-_radixMV_ notation, using the letters A through Z and a through z for digits with values 10 through 35. (However, if _radixMV_ = 10 and _numberString_ contains more than 20 significant digits, every significant digit after the 20th may be replaced by a 0 digit, at the option of the implementation; and if _radixMV_ is not one of 2, 4, 8, 10, 16, or 32, then _mathInt_ may be an implementation-approximated integer representing the integer value denoted by _numberString_ in radix-_radixMV_ notation.) 1. If _mathInt_ = 0, then 1. If _sign_ = -1, return *-0*𝔽. 1. Return *+0*𝔽. @@ -30193,24 +30193,24 @@

    1. Let _len_ be the length of _string_. - 1. Let _R_ be the empty 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. Let _C_ be the code unit at index _k_ within _string_. - 1. If _unescapedSet_ contains _C_, then + 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 _R_ to the string-concatenation of _R_ and _C_. + 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. For each element _octet_ of _Octets_, do + 1. Let _octets_ be the List of octets resulting by applying the UTF-8 transformation to _cp_.[[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 _R_ to the string-concatenation of _R_, *"%"*, and StringPad(_hex_, 2, *"0"*, ~start~). - 1. Return _R_. + 1. Set _result_ to the string-concatenation of _result_, *"%"*, and StringPad(_hex_, 2, *"0"*, ~start~). + 1. Return _result_.

    Because percent-encoding is used to represent individual octets, a single code point may be expressed as multiple consecutive escape sequences (one for each of its 8-bit UTF-8 code units).

    @@ -30230,24 +30230,24 @@

    1. Let _len_ be the length of _string_. - 1. Let _R_ be the empty String. + 1. Let _result_ be the empty String. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _C_ be the code unit at index _k_ within _string_. - 1. Let _S_ be _C_. - 1. If _C_ is the code unit 0x0025 (PERCENT SIGN), then + 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. Let _escape_ be the substring of _string_ from _k_ to _k_ + 3. - 1. Let _B_ be ParseHexOctet(_string_, _k_ + 1). - 1. If _B_ is not an integer, throw a *URIError* exception. + 1. Let _firstOctet_ be ParseHexOctet(_string_, _k_ + 1). + 1. If _firstOctet_ is not an integer, throw a *URIError* exception. 1. Set _k_ to _k_ + 2. - 1. Let _n_ be the number of leading 1 bits in _B_. + 1. Let _n_ be the number of leading 1 bits in _firstOctet_. 1. If _n_ = 0, then - 1. Let _asciiChar_ be the code unit whose numeric value is _B_. - 1. If _preserveEscapeSet_ contains _asciiChar_, set _S_ to _escape_; else set _S_ to _asciiChar_. + 1. Let _asciiChar_ be the code unit whose numeric value is _firstOctet_. + 1. If _preserveEscapeSet_ contains _asciiChar_, set _segment_ to _escape_; else set _segment_ to _asciiChar_. 1. Else, 1. If _n_ = 1 or _n_ > 4, throw a *URIError* exception. - 1. Let _Octets_ be « _B_ ». + 1. Let _octets_ be « _firstOctet_ ». 1. Let _j_ be 1. 1. Repeat, while _j_ < _n_, 1. Set _k_ to _k_ + 1. @@ -30255,16 +30255,16 @@

    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. - 1. Append _continuationByte_ to _Octets_. + 1. Append _continuationByte_ to _octets_. 1. Set _k_ to _k_ + 2. 1. Set _j_ to _j_ + 1. - 1. Assert: The length of _Octets_ is _n_. - 1. If _Octets_ does not contain a valid UTF-8 encoding of a Unicode code point, throw a *URIError* exception. - 1. Let _V_ be the code point obtained by applying the UTF-8 transformation to _Octets_, that is, from a List of octets into a 21-bit value. - 1. Set _S_ to UTF16EncodeCodePoint(_V_). - 1. Set _R_ to the string-concatenation of _R_ and _S_. + 1. Assert: The length of _octets_ is _n_. + 1. If _octets_ does not contain a valid UTF-8 encoding of a Unicode code point, throw a *URIError* exception. + 1. Let _codePoint_ be the code point obtained by applying the UTF-8 transformation to _octets_, that is, from a List of octets into a 21-bit value. + 1. Set _segment_ to UTF16EncodeCodePoint(_codePoint_). + 1. Set _result_ to the string-concatenation of _result_ and _segment_. 1. Set _k_ to _k_ + 1. - 1. Return _R_. + 1. Return _result_.

    RFC 3629 prohibits the decoding of invalid UTF-8 octet sequences. For example, the invalid sequence 0xC0 0x80 must not decode into the code unit 0x0000. Implementations of the Decode algorithm are required to throw a *URIError* when encountering such invalid sequences.

    @@ -30594,38 +30594,38 @@

    Object.assign ( _target_, ..._sources_ )

    -

    Object.create ( _O_, _Properties_ )

    +

    Object.create ( _proto_, _properties_ )

    This function creates a new object with a specified prototype.

    It performs the following steps when called:

    - 1. If _O_ is not an Object and _O_ is not *null*, throw a *TypeError* exception. - 1. Let _obj_ be OrdinaryObjectCreate(_O_). - 1. If _Properties_ is not *undefined*, then - 1. Return ? ObjectDefineProperties(_obj_, _Properties_). + 1. If _proto_ is not an Object and _proto_ is not *null*, throw a *TypeError* exception. + 1. Let _obj_ be OrdinaryObjectCreate(_proto_). + 1. If _properties_ is not *undefined*, then + 1. Return ? ObjectDefineProperties(_obj_, _properties_). 1. Return _obj_.
    -

    Object.defineProperties ( _O_, _Properties_ )

    +

    Object.defineProperties ( _obj_, _properties_ )

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

    It performs the following steps when called:

    - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Return ? ObjectDefineProperties(_O_, _Properties_). + 1. If _obj_ is not an Object, throw a *TypeError* exception. + 1. Return ? ObjectDefineProperties(_obj_, _properties_).

    ObjectDefineProperties ( - _O_: an Object, - _Properties_: an ECMAScript language value, + _obj_: an Object, + _properties_: an ECMAScript language value, ): either a normal completion containing an Object or a throw completion

    - 1. Let _props_ be ? ToObject(_Properties_). + 1. Let _props_ be ? ToObject(_properties_). 1. Let _keys_ be ? _props_.[[OwnPropertyKeys]](). 1. Let _descriptors_ be a new empty List. 1. For each element _nextKey_ of _keys_, do @@ -30635,43 +30635,43 @@

    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. Perform ? DefinePropertyOrThrow(_O_, _property_.[[Key]], _property_.[[Descriptor]]). - 1. Return _O_. + 1. Perform ? DefinePropertyOrThrow(_obj_, _property_.[[Key]], _property_.[[Descriptor]]). + 1. Return _obj_. -

    Object.defineProperty ( _O_, _P_, _Attributes_ )

    +

    Object.defineProperty ( _obj_, _propertyKey_, _attributes_ )

    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 _O_ is not an Object, throw a *TypeError* exception. - 1. Let _key_ be ? ToPropertyKey(_P_). - 1. Let _desc_ be ? ToPropertyDescriptor(_Attributes_). - 1. Perform ? DefinePropertyOrThrow(_O_, _key_, _desc_). - 1. Return _O_. + 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. Return _obj_.
    -

    Object.entries ( _O_ )

    +

    Object.entries ( _obj_ )

    This function performs the following steps when called:

    - 1. Let _obj_ be ? ToObject(_O_). - 1. Let _entryList_ be ? EnumerableOwnProperties(_obj_, ~key+value~). + 1. Let _coerced_ be ? ToObject(_obj_). + 1. Let _entryList_ be ? EnumerableOwnProperties(_coerced_, ~key+value~). 1. Return CreateArrayFromList(_entryList_).
    -

    Object.freeze ( _O_ )

    +

    Object.freeze ( _obj_ )

    This function performs the following steps when called:

    - 1. If _O_ is not an Object, return _O_. - 1. Let _status_ be ? SetIntegrityLevel(_O_, ~frozen~). + 1. If _obj_ is not an Object, return _obj_. + 1. Let _status_ be ? SetIntegrityLevel(_obj_, ~frozen~). 1. If _status_ is *false*, throw a *TypeError* exception. - 1. Return _O_. + 1. Return _obj_.
    @@ -30695,25 +30695,25 @@

    Object.fromEntries ( _iterable_ )

    -

    Object.getOwnPropertyDescriptor ( _O_, _P_ )

    +

    Object.getOwnPropertyDescriptor ( _obj_, _propertyKey_ )

    This function performs the following steps when called:

    - 1. Let _obj_ be ? ToObject(_O_). - 1. Let _key_ be ? ToPropertyKey(_P_). - 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_key_). + 1. Let _coerced_ be ? ToObject(_obj_). + 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Let _desc_ be ? _coerced_.[[GetOwnProperty]](_key_). 1. Return FromPropertyDescriptor(_desc_).
    -

    Object.getOwnPropertyDescriptors ( _O_ )

    +

    Object.getOwnPropertyDescriptors ( _obj_ )

    This function performs the following steps when called:

    - 1. Let _obj_ be ? ToObject(_O_). - 1. Let _ownKeys_ be ? _obj_.[[OwnPropertyKeys]](). + 1. Let _coerced_ be ? ToObject(_obj_). + 1. Let _ownKeys_ be ? _coerced_.[[OwnPropertyKeys]](). 1. Let _descriptors_ be OrdinaryObjectCreate(%Object.prototype%). 1. For each element _key_ of _ownKeys_, do - 1. Let _desc_ be ? _obj_.[[GetOwnProperty]](_key_). + 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_. @@ -30721,31 +30721,31 @@

    Object.getOwnPropertyDescriptors ( _O_ )

    -

    Object.getOwnPropertyNames ( _O_ )

    +

    Object.getOwnPropertyNames ( _obj_ )

    This function performs the following steps when called:

    - 1. Return CreateArrayFromList(? GetOwnPropertyKeys(_O_, ~string~)). + 1. Return CreateArrayFromList(? GetOwnPropertyKeys(_obj_, ~string~)).
    -

    Object.getOwnPropertySymbols ( _O_ )

    +

    Object.getOwnPropertySymbols ( _obj_ )

    This function performs the following steps when called:

    - 1. Return CreateArrayFromList(? GetOwnPropertyKeys(_O_, ~symbol~)). + 1. Return CreateArrayFromList(? GetOwnPropertyKeys(_obj_, ~symbol~)).

    GetOwnPropertyKeys ( - _O_: an ECMAScript language value, + _value_: an ECMAScript language value, _type_: ~string~ or ~symbol~, ): either a normal completion containing a List of property keys or a throw completion

    - 1. Let _obj_ be ? ToObject(_O_). + 1. Let _obj_ be ? ToObject(_value_). 1. Let _keys_ be ? _obj_.[[OwnPropertyKeys]](). 1. Let _nameList_ be a new empty List. 1. For each element _nextKey_ of _keys_, do @@ -30757,11 +30757,11 @@

    -

    Object.getPrototypeOf ( _O_ )

    +

    Object.getPrototypeOf ( _obj_ )

    This function performs the following steps when called:

    - 1. Let _obj_ be ? ToObject(_O_). - 1. Return ? _obj_.[[GetPrototypeOf]](). + 1. Let _coerced_ be ? ToObject(_obj_). + 1. Return ? _coerced_.[[GetPrototypeOf]]().
    @@ -30784,12 +30784,12 @@

    Object.groupBy ( _items_, _callback_ )

    -

    Object.hasOwn ( _O_, _P_ )

    +

    Object.hasOwn ( _obj_, _propertyKey_ )

    This function performs the following steps when called:

    - 1. Let _obj_ be ? ToObject(_O_). - 1. Let _key_ be ? ToPropertyKey(_P_). - 1. Return ? HasOwnProperty(_obj_, _key_). + 1. Let _coerced_ be ? ToObject(_obj_). + 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Return ? HasOwnProperty(_coerced_, _key_).
    @@ -30802,50 +30802,50 @@

    Object.is ( _value1_, _value2_ )

    -

    Object.isExtensible ( _O_ )

    +

    Object.isExtensible ( _obj_ )

    This function performs the following steps when called:

    - 1. If _O_ is not an Object, return *false*. - 1. Return ? IsExtensible(_O_). + 1. If _obj_ is not an Object, return *false*. + 1. Return ? IsExtensible(_obj_).
    -

    Object.isFrozen ( _O_ )

    +

    Object.isFrozen ( _obj_ )

    This function performs the following steps when called:

    - 1. If _O_ is not an Object, return *true*. - 1. Return ? TestIntegrityLevel(_O_, ~frozen~). + 1. If _obj_ is not an Object, return *true*. + 1. Return ? TestIntegrityLevel(_obj_, ~frozen~).
    -

    Object.isSealed ( _O_ )

    +

    Object.isSealed ( _obj_ )

    This function performs the following steps when called:

    - 1. If _O_ is not an Object, return *true*. - 1. Return ? TestIntegrityLevel(_O_, ~sealed~). + 1. If _obj_ is not an Object, return *true*. + 1. Return ? TestIntegrityLevel(_obj_, ~sealed~).
    -

    Object.keys ( _O_ )

    +

    Object.keys ( _obj_ )

    This function performs the following steps when called:

    - 1. Let _obj_ be ? ToObject(_O_). - 1. Let _keyList_ be ? EnumerableOwnProperties(_obj_, ~key~). + 1. Let _coerced_ be ? ToObject(_obj_). + 1. Let _keyList_ be ? EnumerableOwnProperties(_coerced_, ~key~). 1. Return CreateArrayFromList(_keyList_).
    -

    Object.preventExtensions ( _O_ )

    +

    Object.preventExtensions ( _obj_ )

    This function performs the following steps when called:

    - 1. If _O_ is not an Object, return _O_. - 1. Let _status_ be ? _O_.[[PreventExtensions]](). + 1. If _obj_ is not an Object, return _obj_. + 1. Let _status_ be ? _obj_.[[PreventExtensions]](). 1. If _status_ is *false*, throw a *TypeError* exception. - 1. Return _O_. + 1. Return _obj_.
    @@ -30856,35 +30856,35 @@

    Object.prototype

    -

    Object.seal ( _O_ )

    +

    Object.seal ( _obj_ )

    This function performs the following steps when called:

    - 1. If _O_ is not an Object, return _O_. - 1. Let _status_ be ? SetIntegrityLevel(_O_, ~sealed~). + 1. If _obj_ is not an Object, return _obj_. + 1. Let _status_ be ? SetIntegrityLevel(_obj_, ~sealed~). 1. If _status_ is *false*, throw a *TypeError* exception. - 1. Return _O_. + 1. Return _obj_.
    -

    Object.setPrototypeOf ( _O_, _proto_ )

    +

    Object.setPrototypeOf ( _obj_, _proto_ )

    This function performs the following steps when called:

    - 1. Perform ? RequireObjectCoercible(_O_). + 1. Perform ? RequireObjectCoercible(_obj_). 1. If _proto_ is not an Object and _proto_ is not *null*, throw a *TypeError* exception. - 1. If _O_ is not an Object, return _O_. - 1. Let _status_ be ? _O_.[[SetPrototypeOf]](_proto_). + 1. If _obj_ is not an Object, return _obj_. + 1. Let _status_ be ? _obj_.[[SetPrototypeOf]](_proto_). 1. If _status_ is *false*, throw a *TypeError* exception. - 1. Return _O_. + 1. Return _obj_.
    -

    Object.values ( _O_ )

    +

    Object.values ( _obj_ )

    This function performs the following steps when called:

    - 1. Let _obj_ be ? ToObject(_O_). - 1. Let _valueList_ be ? EnumerableOwnProperties(_obj_, ~value~). + 1. Let _coerced_ be ? ToObject(_obj_). + 1. Let _valueList_ be ? EnumerableOwnProperties(_coerced_, ~value~). 1. Return CreateArrayFromList(_valueList_).
    @@ -30906,12 +30906,12 @@

    Object.prototype.constructor

    -

    Object.prototype.hasOwnProperty ( _V_ )

    +

    Object.prototype.hasOwnProperty ( _value_ )

    This method performs the following steps when called:

    - 1. [id="step-hasownproperty-topropertykey"] Let _P_ be ? ToPropertyKey(_V_). - 1. [id="step-hasownproperty-toobject"] Let _O_ be ? ToObject(*this* value). - 1. Return ? HasOwnProperty(_O_, _P_). + 1. [id="step-hasownproperty-topropertykey"] Let _propertyKey_ be ? ToPropertyKey(_value_). + 1. [id="step-hasownproperty-toobject"] Let _obj_ be ? ToObject(*this* value). + 1. Return ? HasOwnProperty(_obj_, _propertyKey_).

    The ordering of steps and is chosen to ensure that any exception that would have been thrown by step in previous editions of this specification will continue to be thrown even if the *this* value is *undefined* or *null*.

    @@ -30919,28 +30919,28 @@

    Object.prototype.hasOwnProperty ( _V_ )

    -

    Object.prototype.isPrototypeOf ( _V_ )

    +

    Object.prototype.isPrototypeOf ( _value_ )

    This method performs the following steps when called:

    - 1. [id="step-isprototypeof-check-object"] If _V_ is not an Object, return *false*. - 1. [id="step-isprototypeof-toobject"] Let _O_ be ? ToObject(*this* value). + 1. [id="step-isprototypeof-check-object"] If _value_ is not an Object, return *false*. + 1. [id="step-isprototypeof-toobject"] Let _obj_ be ? ToObject(*this* value). 1. Repeat, - 1. Set _V_ to ? _V_.[[GetPrototypeOf]](). - 1. If _V_ is *null*, return *false*. - 1. If SameValue(_O_, _V_) is *true*, return *true*. + 1. Set _value_ to ? _value_.[[GetPrototypeOf]](). + 1. If _value_ is *null*, return *false*. + 1. If SameValue(_obj_, _value_) is *true*, return *true*. -

    The ordering of steps and preserves the behaviour specified by previous editions of this specification for the case where _V_ is not an object and the *this* value is *undefined* or *null*.

    +

    The ordering of steps and preserves the behaviour specified by previous editions of this specification for the case where _value_ is not an object and the *this* value is *undefined* or *null*.

    -

    Object.prototype.propertyIsEnumerable ( _V_ )

    +

    Object.prototype.propertyIsEnumerable ( _value_ )

    This method performs the following steps when called:

    - 1. [id="step-propertyisenumerable-topropertykey"] Let _P_ be ? ToPropertyKey(_V_). - 1. [id="step-propertyisenumerable-toobject"] Let _O_ be ? ToObject(*this* value). - 1. Let _desc_ be ? _O_.[[GetOwnProperty]](_P_). + 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]]. @@ -30956,8 +30956,8 @@

    Object.prototype.propertyIsEnumerable ( _V_ )

    Object.prototype.toLocaleString ( [ _reserved1_ [ , _reserved2_ ] ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Return ? Invoke(_O_, *"toString"*). + 1. Let _thisValue_ be the *this* value. + 1. Return ? Invoke(_thisValue_, *"toString"*).

    The optional parameters to this method are not used but are intended to correspond to the parameter pattern used by ECMA-402 `toLocaleString` methods. Implementations that do not include ECMA-402 support must not use those parameter positions for other purposes.

    @@ -30974,19 +30974,19 @@

    Object.prototype.toString ( )

    1. If the *this* value is *undefined*, return *"[object Undefined]"*. 1. If the *this* value is *null*, return *"[object Null]"*. - 1. Let _O_ be ! ToObject(*this* value). - 1. Let _isArray_ be ? IsArray(_O_). + 1. Let _obj_ be ! ToObject(*this* value). + 1. Let _isArray_ be ? IsArray(_obj_). 1. If _isArray_ is *true*, let _builtinTag_ be *"Array"*. - 1. Else if _O_ has a [[ParameterMap]] internal slot, let _builtinTag_ be *"Arguments"*. - 1. Else if _O_ has a [[Call]] internal method, let _builtinTag_ be *"Function"*. - 1. Else if _O_ has an [[ErrorData]] internal slot, let _builtinTag_ be *"Error"*. - 1. Else if _O_ has a [[BooleanData]] internal slot, let _builtinTag_ be *"Boolean"*. - 1. Else if _O_ has a [[NumberData]] internal slot, let _builtinTag_ be *"Number"*. - 1. Else if _O_ has a [[StringData]] internal slot, let _builtinTag_ be *"String"*. - 1. Else if _O_ has a [[DateValue]] internal slot, let _builtinTag_ be *"Date"*. - 1. Else if _O_ has a [[RegExpMatcher]] internal slot, let _builtinTag_ be *"RegExp"*. + 1. Else if _obj_ has a [[ParameterMap]] internal slot, let _builtinTag_ be *"Arguments"*. + 1. Else if _obj_ has a [[Call]] internal method, let _builtinTag_ be *"Function"*. + 1. Else if _obj_ has an [[ErrorData]] internal slot, let _builtinTag_ be *"Error"*. + 1. Else if _obj_ has a [[BooleanData]] internal slot, let _builtinTag_ be *"Boolean"*. + 1. Else if _obj_ has a [[NumberData]] internal slot, let _builtinTag_ be *"Number"*. + 1. Else if _obj_ has a [[StringData]] internal slot, let _builtinTag_ be *"String"*. + 1. Else if _obj_ has a [[DateValue]] internal slot, let _builtinTag_ be *"Date"*. + 1. Else if _obj_ has a [[RegExpMatcher]] internal slot, let _builtinTag_ be *"RegExp"*. 1. Else, let _builtinTag_ be *"Object"*. - 1. Let _tag_ be ? Get(_O_, %Symbol.toStringTag%). + 1. Let _tag_ be ? Get(_obj_, %Symbol.toStringTag%). 1. If _tag_ is not a String, set _tag_ to _builtinTag_. 1. Return the string-concatenation of *"[object "*, _tag_, and *"]"*. @@ -31011,8 +31011,8 @@

    Object.prototype.__proto__

    get Object.prototype.__proto__

    The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Return ? _O_.[[GetPrototypeOf]](). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Return ? _obj_.[[GetPrototypeOf]]().
    @@ -31020,11 +31020,11 @@

    get Object.prototype.__proto__

    set Object.prototype.__proto__

    The value of the [[Set]] attribute is a built-in function that takes an argument _proto_. It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). 1. If _proto_ is not an Object and _proto_ is not *null*, return *undefined*. - 1. If _O_ is not an Object, return *undefined*. - 1. Let _status_ be ? _O_.[[SetPrototypeOf]](_proto_). + 1. If _thisValue_ is not an Object, return *undefined*. + 1. Let _status_ be ? _thisValue_.[[SetPrototypeOf]](_proto_). 1. If _status_ is *false*, throw a *TypeError* exception. 1. Return *undefined*. @@ -31035,60 +31035,60 @@

    set Object.prototype.__proto__

    Legacy Object.prototype Accessor Methods

    -

    Object.prototype.__defineGetter__ ( _P_, _getter_ )

    +

    Object.prototype.__defineGetter__ ( _propertyKey_, _getter_ )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). + 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(_P_). - 1. Perform ? DefinePropertyOrThrow(_O_, _key_, _desc_). + 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _desc_). 1. Return *undefined*.
    -

    Object.prototype.__defineSetter__ ( _P_, _setter_ )

    +

    Object.prototype.__defineSetter__ ( _propertyKey_, _setter_ )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). + 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(_P_). - 1. Perform ? DefinePropertyOrThrow(_O_, _key_, _desc_). + 1. Let _key_ be ? ToPropertyKey(_propertyKey_). + 1. Perform ? DefinePropertyOrThrow(_obj_, _key_, _desc_). 1. Return *undefined*.
    -

    Object.prototype.__lookupGetter__ ( _P_ )

    +

    Object.prototype.__lookupGetter__ ( _propertyKey_ )

    This method performs the following steps when called:

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

    Object.prototype.__lookupSetter__ ( _P_ )

    +

    Object.prototype.__lookupSetter__ ( _propertyKey_ )

    This method performs the following steps when called:

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

    Function ( ..._parameterArgs_, _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 _C_ be the active function object. + 1. Let _constructor_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_C_, NewTarget, ~normal~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_constructor_, NewTarget, ~normal~, _parameterArgs_, _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:

    @@ -31179,18 +31179,18 @@

    1. Let _bodyString_ be ? ToString(_bodyArg_). 1. Let _currentRealm_ be the current Realm Record. 1. Perform ? HostEnsureCanCompileStrings(_currentRealm_, _parameterStrings_, _bodyString_, *false*). - 1. Let _P_ be the empty String. + 1. Let _parameterString_ be the empty String. 1. If _argCount_ > 0, then - 1. Set _P_ to _parameterStrings_[0]. + 1. Set _parameterString_ to _parameterStrings_[0]. 1. Let _k_ be 1. 1. Repeat, while _k_ < _argCount_, 1. Let _nextArgString_ be _parameterStrings_[_k_]. - 1. Set _P_ to the string-concatenation of _P_, *","* (a comma), and _nextArgString_. + 1. Set _parameterString_ to the string-concatenation of _parameterString_, *","* (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("*, _P_, 0x000A (LINE FEED), *") {"*, _bodyParseString_, and *"}"*. + 1. Let _sourceString_ be the string-concatenation of _prefix_, *" anonymous("*, _parameterString_, 0x000A (LINE FEED), *") {"*, _bodyParseString_, and *"}"*. 1. Let _sourceText_ be StringToCodePoints(_sourceString_). - 1. Let _parameters_ be ParseText(_P_, _parameterSym_). + 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. If _body_ is a List of errors, throw a *SyntaxError* exception. @@ -31201,18 +31201,18 @@

    1. Let _proto_ be ? GetPrototypeFromConstructor(_newTarget_, _fallbackProto_). 1. Let _env_ be _currentRealm_.[[GlobalEnv]]. 1. Let _privateEnv_ be *null*. - 1. Let _F_ be OrdinaryFunctionCreate(_proto_, _sourceText_, _parameters_, _body_, ~non-lexical-this~, _env_, _privateEnv_). - 1. Perform SetFunctionName(_F_, *"anonymous"*). + 1. Let _func_ be OrdinaryFunctionCreate(_proto_, _sourceText_, _parameters_, _body_, ~non-lexical-this~, _env_, _privateEnv_). + 1. Perform SetFunctionName(_func_, *"anonymous"*). 1. If _kind_ is ~generator~, then 1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Else if _kind_ is ~async-generator~, then 1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%). - 1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). + 1. Perform ! DefinePropertyOrThrow(_func_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Else if _kind_ is ~normal~, then - 1. Perform MakeConstructor(_F_). + 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. - 1. Return _F_. + 1. Return _func_.

    CreateDynamicFunction defines a *"prototype"* property on any function it creates whose _kind_ is not ~async~ to provide for the possibility that the function will be used as a constructor.

    @@ -31280,34 +31280,34 @@

    Function.prototype.apply ( _thisArg_, _argArray_ )

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

    This method performs the following steps when called:

    - 1. Let _Target_ be the *this* value. - 1. If IsCallable(_Target_) is *false*, throw a *TypeError* exception. - 1. Let _F_ be ? BoundFunctionCreate(_Target_, _thisArg_, _args_). - 1. Let _L_ be 0. - 1. Let _targetHasLength_ be ? HasOwnProperty(_Target_, *"length"*). + 1. Let _target_ be the *this* value. + 1. If IsCallable(_target_) is *false*, throw a *TypeError* exception. + 1. Let _boundFunc_ be ? BoundFunctionCreate(_target_, _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. Let _targetLen_ be ? Get(_target_, *"length"*). 1. If _targetLen_ is a Number, then 1. If _targetLen_ is *+∞*𝔽, then - 1. Set _L_ to +∞. + 1. Set _length_ to +∞. 1. Else if _targetLen_ is *-∞*𝔽, then - 1. Set _L_ to 0. + 1. Set _length_ to 0. 1. Else, 1. Let _targetLenAsInt_ be ! ToIntegerOrInfinity(_targetLen_). 1. Assert: _targetLenAsInt_ is finite. 1. Let _argCount_ be the number of elements in _args_. - 1. Set _L_ to max(_targetLenAsInt_ - _argCount_, 0). - 1. Perform SetFunctionLength(_F_, _L_). - 1. Let _targetName_ be ? Get(_Target_, *"name"*). + 1. Set _length_ to max(_targetLenAsInt_ - _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. - 1. Perform SetFunctionName(_F_, _targetName_, *"bound"*). - 1. Return _F_. + 1. Perform SetFunctionName(_boundFunc_, _targetName_, *"bound"*). + 1. Return _boundFunc_.

    Function objects created using `Function.prototype.bind` are exotic objects. They also do not have a *"prototype"* property.

    -

    If _Target_ is either an arrow function or a bound function exotic object, then the _thisArg_ passed to this method will not be used by subsequent calls to _F_.

    +

    If _target_ is either an arrow function or a bound function exotic object, then the _thisArg_ passed to this method will not be used by subsequent calls to _func_.

    @@ -31356,11 +31356,11 @@

    Function.prototype.toString ( )

    -

    Function.prototype [ %Symbol.hasInstance% ] ( _V_ )

    +

    Function.prototype [ %Symbol.hasInstance% ] ( _value_ )

    This method performs the following steps when called:

    - 1. Let _F_ be the *this* value. - 1. Return ? OrdinaryHasInstance(_F_, _V_). + 1. Let _thisValue_ be the *this* value. + 1. Return ? OrdinaryHasInstance(_thisValue_, _value_).

    This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

    @@ -31443,9 +31443,9 @@

    Boolean ( _value_ )

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

    Error ( _message_ [ , _options_ ] )

    This function performs the following steps when called:

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. - 1. Let _O_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Error.prototype%"*, « [[ErrorData]] »). + 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(_O_, *"message"*, _msg_). - 1. Perform ? InstallErrorCause(_O_, _options_). - 1. Return _O_. + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _msg_). + 1. Perform ? InstallErrorCause(_obj_, _options_). + 1. Return _obj_. @@ -31915,11 +31915,11 @@

    Error.prototype.name

    Error.prototype.toString ( )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _name_ be ? Get(_O_, *"name"*). + 1. Let _obj_ be the *this* value. + 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(_O_, *"message"*). + 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_. @@ -31992,12 +31992,12 @@

    _NativeError_ ( _message_ [ , _options_ ] )

    Each _NativeError_ function performs the following steps when called:

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. - 1. [id="step-nativeerror-ordinarycreatefromconstructor"] Let _O_ be ? OrdinaryCreateFromConstructor(_newTarget_, "%NativeError.prototype%", « [[ErrorData]] »). + 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(_O_, *"message"*, _msg_). - 1. Perform ? InstallErrorCause(_O_, _options_). - 1. Return _O_. + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _msg_). + 1. Perform ? InstallErrorCause(_obj_, _options_). + 1. Return _obj_.

    The actual value of the string passed in step is either *"%EvalError.prototype%"*, *"%RangeError.prototype%"*, *"%ReferenceError.prototype%"*, *"%SyntaxError.prototype%"*, *"%TypeError.prototype%"*, or *"%URIError.prototype%"* corresponding to which _NativeError_ constructor is being defined.

    @@ -32068,14 +32068,14 @@

    AggregateError ( _errors_, _message_ [ , _options_ ] )

    This function performs the following steps when called:

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. - 1. Let _O_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%AggregateError.prototype%"*, « [[ErrorData]] »). + 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(_O_, *"message"*, _msg_). - 1. Perform ? InstallErrorCause(_O_, _options_). + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"message"*, _msg_). + 1. Perform ? InstallErrorCause(_obj_, _options_). 1. Let _errorsList_ be ? IteratorToList(? GetIterator(_errors_, ~sync~)). - 1. Perform ! DefinePropertyOrThrow(_O_, *"errors"*, PropertyDescriptor { [[Configurable]]: *true*, [[Enumerable]]: *false*, [[Writable]]: *true*, [[Value]]: CreateArrayFromList(_errorsList_) }). - 1. Return _O_. + 1. Perform ! DefinePropertyOrThrow(_obj_, *"errors"*, PropertyDescriptor { [[Configurable]]: *true*, [[Enumerable]]: *false*, [[Writable]]: *true*, [[Value]]: CreateArrayFromList(_errorsList_) }). + 1. Return _obj_. @@ -32133,18 +32133,18 @@

    Abstract Operations for Error Objects

    InstallErrorCause ( - _O_: an Object, + _obj_: an Object, _options_: an ECMAScript language value, ): either a normal completion containing ~unused~ or a throw completion

    description
    -
    It is used to create a *"cause"* property on _O_ when a *"cause"* property is present on _options_.
    +
    It is used to create a *"cause"* property on _obj_ when a *"cause"* property is present on _options_.
    1. If _options_ is an Object and ? HasProperty(_options_, *"cause"*) is *true*, then 1. Let _cause_ be ? Get(_options_, *"cause"*). - 1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"cause"*, _cause_). + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_obj_, *"cause"*, _cause_). 1. Return ~unused~.
    @@ -32180,9 +32180,9 @@

    Number ( _value_ )

    1. Else, 1. Let _n_ be *+0*𝔽. 1. If NewTarget is *undefined*, return _n_. - 1. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Number.prototype%"*, « [[NumberData]] »). - 1. Set _O_.[[NumberData]] to _n_. - 1. Return _O_. + 1. Let _obj_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Number.prototype%"*, « [[NumberData]] »). + 1. Set _obj_.[[NumberData]] to _n_. + 1. Return _obj_.
    @@ -32334,48 +32334,48 @@

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

    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 _e_, _n_, and _ff_ be integers such that _ff_ ≥ 0, 10_ff_ ≤ _n_ < 10_ff_ + 1, 𝔽(_n_ × 10_e_ - _ff_) is 𝔽(_x_), and _ff_ is as small as possible. If there are multiple possibilities for _n_, choose _n_ such that 𝔽(_n_ × 10_e_ - _ff_) is closest to 𝔽(_x_). If there are two such possible values of _n_, 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 𝔽(_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.
    @@ -32387,32 +32387,32 @@

    Number.prototype.toFixed ( _fractionDigits_ )

    It performs the following steps when called:

    - 1. Let _x_ be ? ThisNumberValue(*this* value). - 1. Let _f_ be ? ToIntegerOrInfinity(_fractionDigits_). - 1. Assert: If _fractionDigits_ is *undefined*, then _f_ is 0. - 1. If _f_ is not finite, throw a *RangeError* exception. - 1. If _f_ < 0 or _f_ > 100, throw a *RangeError* exception. - 1. If _x_ is not finite, return Number::toString(_x_, 10). - 1. Set _x_ to ℝ(_x_). - 1. Let _s_ be the empty String. - 1. If _x_ < 0, then - 1. Set _s_ to *"-"*. - 1. Set _x_ to -_x_. - 1. If _x_ ≥ 1021, then - 1. Let _m_ be ! ToString(𝔽(_x_)). + 1. Let _numberValue_ 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. Let _sign_ be the empty String. + 1. If _numberValue_ < 0, then + 1. Set _sign_ to *"-"*. + 1. Set _numberValue_ to -_numberValue_. + 1. If _numberValue_ ≥ 1021, then + 1. Let _digitString_ be ! ToString(𝔽(_numberValue_)). 1. Else, - 1. Let _n_ be an integer for which _n_ / 10_f_ - _x_ is as close to zero as possible. If there are two such _n_, pick the larger _n_. - 1. If _n_ = 0, let _m_ be *"0"*; else let _m_ be the String value consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes). - 1. If _f_ ≠ 0, then - 1. Let _k_ be the length of _m_. - 1. If _k_ ≤ _f_, then - 1. Let _z_ be the String value consisting of _f_ + 1 - _k_ occurrences of the code unit 0x0030 (DIGIT ZERO). - 1. Set _m_ to the string-concatenation of _z_ and _m_. - 1. Set _k_ to _f_ + 1. - 1. Let _a_ be the first _k_ - _f_ code units of _m_. - 1. Let _b_ be the other _f_ code units of _m_. - 1. Set _m_ to the string-concatenation of _a_, *"."*, and _b_. - 1. Return the string-concatenation of _s_ and _m_. + 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. 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_. + 1. If _digitCount_ ≤ _fractionCount_, then + 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 _fractionalPart_ be the other _fractionCount_ code units of _digitString_. + 1. Set _digitString_ to the string-concatenation of _integerPart_, *"."*, and _fractionalPart_. + 1. Return the string-concatenation of _sign_ and _digitString_.

    The output of `toFixed` may be more precise than `toString` for some values because toString only prints enough significant digits to distinguish the number from adjacent Number values. For example,

    @@ -32435,42 +32435,42 @@

    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 _x_ be ? ThisNumberValue(*this* value). - 1. If _precision_ is *undefined*, return ! ToString(_x_). - 1. Let _p_ be ? ToIntegerOrInfinity(_precision_). - 1. If _x_ is not finite, return Number::toString(_x_, 10). - 1. If _p_ < 1 or _p_ > 100, throw a *RangeError* exception. - 1. Set _x_ to ℝ(_x_). - 1. Let _s_ be the empty String. - 1. If _x_ < 0, then - 1. Set _s_ to the code unit 0x002D (HYPHEN-MINUS). - 1. Set _x_ to -_x_. - 1. If _x_ = 0, then - 1. Let _m_ be the String value consisting of _p_ occurrences of the code unit 0x0030 (DIGIT ZERO). - 1. Let _e_ be 0. + 1. Let _numberValue_ be ? ThisNumberValue(*this* value). + 1. If _precision_ is *undefined*, return ! ToString(_numberValue_). + 1. Let _precisionCount_ be ? ToIntegerOrInfinity(_precision_). + 1. If _numberValue_ is not finite, return Number::toString(_numberValue_, 10). + 1. If _precisionCount_ < 1 or _precisionCount_ > 100, throw a *RangeError* exception. + 1. Set _numberValue_ to ℝ(_numberValue_). + 1. Let _sign_ be the empty String. + 1. If _numberValue_ < 0, then + 1. Set _sign_ to the code unit 0x002D (HYPHEN-MINUS). + 1. Set _numberValue_ to -_numberValue_. + 1. If _numberValue_ = 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 _e_ and _n_ be integers such that 10_p_ - 1 ≤ _n_ < 10_p_ and for which _n_ × 10_e_ - _p_ + 1 - _x_ is as close to zero as possible. If there are two such sets of _e_ and _n_, pick the _e_ and _n_ for which _n_ × 10_e_ - _p_ + 1 is larger. - 1. Let _m_ be the String value consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes). - 1. If _e_ < -6 or _e_ ≥ _p_, then - 1. Assert: _e_ ≠ 0. - 1. If _p_ ≠ 1, then - 1. Let _a_ be the first code unit of _m_. - 1. Let _b_ be the other _p_ - 1 code units of _m_. - 1. Set _m_ to the string-concatenation of _a_, *"."*, and _b_. - 1. If _e_ > 0, then - 1. Let _c_ be the code unit 0x002B (PLUS SIGN). + 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 _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 _fractionalPart_ be the other _precisionCount_ - 1 code units of _significand_. + 1. Set _significand_ to the string-concatenation of _integerPart_, *"."*, and _fractionalPart_. + 1. If _exponent_ > 0, then + 1. Let _exponentSign_ be the code unit 0x002B (PLUS SIGN). 1. Else, - 1. Assert: _e_ < 0. - 1. Let _c_ be the code unit 0x002D (HYPHEN-MINUS). - 1. Set _e_ to -_e_. - 1. Let _d_ be the String value consisting of the digits of the decimal representation of _e_ (in order, with no leading zeroes). - 1. Return the string-concatenation of _s_, _m_, the code unit 0x0065 (LATIN SMALL LETTER E), _c_, and _d_. - 1. If _e_ = _p_ - 1, return the string-concatenation of _s_ and _m_. - 1. If _e_ ≥ 0, then - 1. Set _m_ to the string-concatenation of the first _e_ + 1 code units of _m_, the code unit 0x002E (FULL STOP), and the remaining _p_ - (_e_ + 1) code units of _m_. + 1. Assert: _exponent_ < 0. + 1. Let _exponentSign_ be the code unit 0x002D (HYPHEN-MINUS). + 1. Set _exponent_ to -_exponent_. + 1. Let _exponentDigits_ be the String value consisting of the digits of the decimal representation of _exponent_ (in order, with no leading zeroes). + 1. Return the string-concatenation of _sign_, _significand_, the code unit 0x0065 (LATIN SMALL LETTER E), _exponentSign_, and _exponentDigits_. + 1. If _exponent_ = _precisionCount_ - 1, return the string-concatenation of _sign_ and _significand_. + 1. If _exponent_ ≥ 0, then + 1. Set _significand_ to the string-concatenation of the first _exponent_ + 1 code units of _significand_, the code unit 0x002E (FULL STOP), and the remaining _precisionCount_ - (_exponent_ + 1) code units of _significand_. 1. Else, - 1. Set _m_ to the string-concatenation of the code unit 0x0030 (DIGIT ZERO), the code unit 0x002E (FULL STOP), -(_e_ + 1) occurrences of the code unit 0x0030 (DIGIT ZERO), and the String _m_. - 1. Return the string-concatenation of _s_ and _m_. + 1. Set _significand_ to the string-concatenation of the code unit 0x0030 (DIGIT ZERO), the code unit 0x002E (FULL STOP), -(_exponent_ + 1) occurrences of the code unit 0x0030 (DIGIT ZERO), and the String _significand_. + 1. Return the string-concatenation of _sign_ and _significand_. @@ -34360,9 +34360,9 @@

    Date ( ..._values_ )

    1. Let _yr_ be MakeFullYear(_y_). 1. Let _finalDate_ be MakeDate(MakeDay(_yr_, _m_, _dt_), MakeTime(_h_, _min_, _s_, _milli_)). 1. Let _dv_ be TimeClip(UTC(_finalDate_)). - 1. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Date.prototype%"*, « [[DateValue]] »). - 1. Set _O_.[[DateValue]] to _dv_. - 1. Return _O_. + 1. Let _obj_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Date.prototype%"*, « [[DateValue]] »). + 1. Set _obj_.[[DateValue]] to _dv_. + 1. Return _obj_. @@ -35003,10 +35003,10 @@

    Date.prototype.toJSON ( _key_ )

    This method provides a String representation of a Date for use by `JSON.stringify` ().

    It performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _tv_ be ? ToPrimitive(_O_, ~number~). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _tv_ be ? ToPrimitive(_obj_, ~number~). 1. If _tv_ is a Number and _tv_ is not finite, return *null*. - 1. Return ? Invoke(_O_, *"toISOString"*). + 1. Return ? Invoke(_obj_, *"toISOString"*).

    The argument is ignored.

    @@ -35359,15 +35359,15 @@

    Date.prototype [ %Symbol.toPrimitive% ] ( _hint_ )

    This method is called by ECMAScript language operators to convert a Date to a primitive value. The allowed values for _hint_ are *"default"*, *"number"*, and *"string"*. Dates are unique among built-in ECMAScript object in that they treat *"default"* as being equivalent to *"string"*, All other built-in ECMAScript objects treat *"default"* as being equivalent to *"number"*.

    It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. + 1. Let _obj_ be the *this* value. + 1. If _obj_ is not an Object, throw a *TypeError* exception. 1. If _hint_ is either *"string"* or *"default"*, then 1. Let _tryFirst_ be ~string~. 1. Else if _hint_ is *"number"*, then 1. Let _tryFirst_ be ~number~. 1. Else, 1. Throw a *TypeError* exception. - 1. Return ? OrdinaryToPrimitive(_O_, _tryFirst_). + 1. Return ? OrdinaryToPrimitive(_obj_, _tryFirst_).

    This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.

    The value of the *"name"* property of this method is *"[Symbol.toPrimitive]"*.

    @@ -35403,12 +35403,12 @@

    String ( _value_ )

    This function performs the following steps when called:

    1. If _value_ is not present, then - 1. Let _s_ be the empty String. + 1. Let _str_ be the empty String. 1. Else, 1. If NewTarget is *undefined* and _value_ is a Symbol, return SymbolDescriptiveString(_value_). - 1. Let _s_ be ? ToString(_value_). - 1. If NewTarget is *undefined*, return _s_. - 1. Return StringCreate(_s_, ? GetPrototypeFromConstructor(NewTarget, *"%String.prototype%"*)). + 1. Let _str_ be ? ToString(_value_). + 1. If NewTarget is *undefined*, return _str_. + 1. Return StringCreate(_str_, ? GetPrototypeFromConstructor(NewTarget, *"%String.prototype%"*)). @@ -35468,17 +35468,17 @@

    String.raw ( _template_, ..._substitutions_ )

    1. Let _literals_ be ? ToObject(? Get(_cooked_, *"raw"*)). 1. Let _literalCount_ be ? LengthOfArrayLike(_literals_). 1. If _literalCount_ ≤ 0, return the empty String. - 1. Let _R_ be the empty String. + 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. Set _R_ to the string-concatenation of _R_ and _nextLiteral_. - 1. If _nextIndex_ + 1 = _literalCount_, return _R_. + 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. Set _R_ to the string-concatenation of _R_ and _nextSub_. + 1. Set _result_ to the string-concatenation of _result_ and _nextSub_. 1. Set _nextIndex_ to _nextIndex_ + 1. @@ -35502,17 +35502,17 @@

    Properties of the String Prototype Object

    String.prototype.at ( _index_ )

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Let _len_ be the length of _S_. + 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 _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 _S_ from _k_ to _k_ + 1. + 1. Return the substring of _str_ from _k_ to _k_ + 1.
    @@ -35524,13 +35524,13 @@

    String.prototype.charAt ( _pos_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 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 _S_. + 1. Let _size_ be the length of _str_. 1. If _position_ < 0 or _position_ ≥ _size_, return the empty String. - 1. Return the substring of _S_ from _position_ to _position_ + 1. + 1. Return the substring of _str_ 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.

    @@ -35544,13 +35544,13 @@

    String.prototype.charCodeAt ( _pos_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 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 _S_. + 1. Let _size_ be the length of _str_. 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 _S_. + 1. Return the Number value for the numeric value of the code unit at index _position_ within the String _str_.

    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.

    @@ -35564,13 +35564,13 @@

    String.prototype.codePointAt ( _pos_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 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 _S_. + 1. Let _size_ be the length of _str_. 1. If _position_ < 0 or _position_ ≥ _size_, return *undefined*. - 1. Let _cp_ be CodePointAt(_S_, _position_). + 1. Let _cp_ be CodePointAt(_str_, _position_). 1. Return 𝔽(_cp_.[[CodePoint]]). @@ -35585,14 +35585,14 @@

    String.prototype.concat ( ..._args_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Let _R_ be _S_. + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _result_ be _str_. 1. For each element _next_ of _args_, do 1. Let _nextString_ be ? ToString(_next_). - 1. Set _R_ to the string-concatenation of _R_ and _nextString_. - 1. Return _R_. + 1. Set _result_ to the string-concatenation of _result_ and _nextString_. + 1. Return _result_.

    The *"length"* property of this method is *1*𝔽.

    @@ -35609,20 +35609,20 @@

    String.prototype.constructor

    String.prototype.endsWith ( _searchString_ [ , _endPosition_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Let _str_ 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 _S_. + 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. If _searchLength_ = 0, return *true*. 1. Let _start_ be _end_ - _searchLength_. 1. If _start_ < 0, return *false*. - 1. Let _substring_ be the substring of _S_ from _start_ to _end_. + 1. Let _substring_ be the substring of _str_ from _start_ to _end_. 1. If _substring_ is _searchStr_, return *true*. 1. Return *false*. @@ -35641,17 +35641,17 @@

    String.prototype.endsWith ( _searchString_ [ , _endPosition_ ] )

    String.prototype.includes ( _searchString_ [ , _position_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Let _str_ 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 _S_. + 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(_S_, _searchStr_, _start_). + 1. Let _index_ be StringIndexOf(_str_, _searchStr_, _start_). 1. If _index_ is ~not-found~, return *false*. 1. Return *true*. @@ -35673,15 +35673,15 @@

    String.prototype.indexOf ( _searchString_ [ , _position_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 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 _S_. + 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(_S_, _searchStr_, _start_). + 1. Let _result_ be StringIndexOf(_str_, _searchStr_, _start_). 1. If _result_ is ~not-found~, return *-1*𝔽. 1. Return 𝔽(_result_). @@ -35694,10 +35694,10 @@

    String.prototype.indexOf ( _searchString_ [ , _position_ ] )

    String.prototype.isWellFormed ( )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Return IsStringWellFormedUnicode(_S_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Let _str_ be ? ToString(_thisValue_). + 1. Return IsStringWellFormedUnicode(_str_). @@ -35708,18 +35708,18 @@

    String.prototype.lastIndexOf ( _searchString_ [ , _position_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 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 _S_. + 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(_S_, _searchStr_, _start_). + 1. Let _result_ be StringLastIndexOf(_str_, _searchStr_, _start_). 1. If _result_ is ~not-found~, return *-1*𝔽. 1. Return 𝔽(_result_). @@ -35731,12 +35731,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 _S_) 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 _S_ is ordered before _thatValue_, positive when _S_ is ordered after _thatValue_, and zero in all other cases (representing no relative ordering between _S_ 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 _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_).

    Before performing the comparisons, this method performs the following steps to prepare the Strings:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Let _str_ 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.

    @@ -35776,18 +35776,18 @@

    String.prototype.localeCompare ( _that_ [ , _reserved1_ [ , _reserved2_ ] ] -

    String.prototype.match ( _regexp_ )

    +

    String.prototype.match ( _regexpOrPattern_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. If _regexp_ is an Object, then - 1. Let _matcher_ be ? GetMethod(_regexp_, %Symbol.match%). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. If _regexpOrPattern_ is an Object, then + 1. Let _matcher_ be ? GetMethod(_regexpOrPattern_, %Symbol.match%). 1. If _matcher_ is not *undefined*, then - 1. Return ? Call(_matcher_, _regexp_, « _O_ »). - 1. Let _S_ be ? ToString(_O_). - 1. Let _rx_ be ? RegExpCreate(_regexp_, *undefined*). - 1. Return ? Invoke(_rx_, %Symbol.match%, « _S_ »). + 1. Return ? Call(_matcher_, _regexpOrPattern_, « _thisValue_ »). + 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _regexp_ be ? RegExpCreate(_regexpOrPattern_, *undefined*). + 1. Return ? Invoke(_regexp_, %Symbol.match%, « _str_ »).

    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.

    @@ -35795,25 +35795,25 @@

    String.prototype.match ( _regexp_ )

    -

    String.prototype.matchAll ( _regexp_ )

    -

    This method performs a regular expression match of the String representing the *this* value against _regexp_ and returns an iterator that yields match results. Each match result is an Array containing the matched portion of the String as the first element, followed by the portions matched by any capturing groups. If the regular expression never matches, the returned iterator does not yield any match results.

    +

    String.prototype.matchAll ( _regexpOrPattern_ )

    +

    This method performs a regular expression match of the String representing the *this* value against _regexpOrPattern_ and returns an iterator that yields match results. Each match result is an Array containing the matched portion of the String as the first element, followed by the portions matched by any capturing groups. If the regular expression never matches, the returned iterator does not yield any match results.

    It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. If _regexp_ is an Object, then - 1. Let _isRegExp_ be ? IsRegExp(_regexp_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. If _regexpOrPattern_ is an Object, then + 1. Let _isRegExp_ be ? IsRegExp(_regexpOrPattern_). 1. If _isRegExp_ is *true*, then - 1. Let _flags_ be ? Get(_regexp_, *"flags"*). + 1. Let _flags_ be ? Get(_regexpOrPattern_, *"flags"*). 1. Perform ? RequireObjectCoercible(_flags_). 1. If ? ToString(_flags_) does not contain *"g"*, throw a *TypeError* exception. - 1. Let _matcher_ be ? GetMethod(_regexp_, %Symbol.matchAll%). + 1. Let _matcher_ be ? GetMethod(_regexpOrPattern_, %Symbol.matchAll%). 1. If _matcher_ is not *undefined*, then - 1. Return ? Call(_matcher_, _regexp_, « _O_ »). - 1. Let _S_ be ? ToString(_O_). - 1. Let _rx_ be ? RegExpCreate(_regexp_, *"g"*). - 1. Return ? Invoke(_rx_, %Symbol.matchAll%, « _S_ »). + 1. Return ? Call(_matcher_, _regexpOrPattern_, « _thisValue_ »). + 1. Let _str_ be ? ToString(_thisValue_). + 1. Let _regexp_ be ? RegExpCreate(_regexpOrPattern_, *"g"*). + 1. Return ? Invoke(_regexp_, %Symbol.matchAll%, « _str_ »). 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,13 +35823,13 @@

    String.prototype.matchAll ( _regexp_ )

    String.prototype.normalize ( [ _form_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 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 _S_ into the normalization form named by _f_ as specified in the latest Unicode Standard, Normalization Forms. + 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_. @@ -35841,9 +35841,9 @@

    String.prototype.normalize ( [ _form_ ] )

    String.prototype.padEnd ( _maxLength_ [ , _fillString_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Return ? StringPaddingBuiltinsImpl(_O_, _maxLength_, _fillString_, ~end~). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Return ? StringPaddingBuiltinsImpl(_thisValue_, _maxLength_, _fillString_, ~end~).
    @@ -35851,15 +35851,15 @@

    String.prototype.padEnd ( _maxLength_ [ , _fillString_ ] )

    String.prototype.padStart ( _maxLength_ [ , _fillString_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Return ? StringPaddingBuiltinsImpl(_O_, _maxLength_, _fillString_, ~start~). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Return ? StringPaddingBuiltinsImpl(_thisValue_, _maxLength_, _fillString_, ~start~).

    StringPaddingBuiltinsImpl ( - _O_: an ECMAScript language value, + _thisValue_: an ECMAScript language value, _maxLength_: an ECMAScript language value, _fillString_: an ECMAScript language value, _placement_: ~start~ or ~end~, @@ -35868,20 +35868,20 @@

    - 1. Let _S_ be ? ToString(_O_). + 1. Let _str_ be ? ToString(_thisValue_). 1. Let _intMaxLength_ be ℝ(? ToLength(_maxLength_)). - 1. Let _stringLength_ be the length of _S_. - 1. If _intMaxLength_ ≤ _stringLength_, return _S_. + 1. Let _stringLength_ be the length of _str_. + 1. If _intMaxLength_ ≤ _stringLength_, return _str_. 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(_S_, _intMaxLength_, _fillString_, _placement_). + 1. Return StringPad(_str_, _intMaxLength_, _fillString_, _placement_).

    StringPad ( - _S_: a String, + _str_: a String, _maxLength_: a non-negative integer, _fillString_: a String, _placement_: ~start~ or ~end~, @@ -35890,16 +35890,16 @@

    - 1. Let _stringLength_ be the length of _S_. - 1. If _maxLength_ ≤ _stringLength_, return _S_. - 1. If _fillString_ is the empty String, return _S_. + 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 _S_. - 1. Return the string-concatenation of _S_ and _truncatedStringFiller_. + 1. If _placement_ is ~start~, return the string-concatenation of _truncatedStringFiller_ and _str_. + 1. Return the string-concatenation of _str_ and _truncatedStringFiller_. -

    The argument _maxLength_ will be clamped such that it can be no smaller than the length of _S_.

    +

    The argument _maxLength_ will be clamped such that it can be no smaller than the length of _str_.

    The argument _fillString_ defaults to *" "* (the String value consisting of the code unit 0x0020 SPACE).

    @@ -35916,8 +35916,8 @@

    - 1. Let _S_ be the String representation of _n_, formatted as a decimal number. - 1. Return StringPad(_S_, _minLength_, *"0"*, ~start~). + 1. Let _str_ be the String representation of _n_, formatted as a decimal number. + 1. Return StringPad(_str_, _minLength_, *"0"*, ~start~). @@ -35926,13 +35926,13 @@

    String.prototype.repeat ( _count_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Let _str_ 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 _S_ appended together. + 1. Return the String value that is made from _n_ copies of _str_ appended together.

    This method creates the String value consisting of the code units of the *this* value (converted to String) repeated _count_ times.

    @@ -35946,13 +35946,13 @@

    String.prototype.repeat ( _count_ )

    String.prototype.replace ( _searchValue_, _replaceValue_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). 1. If _searchValue_ is an Object, then 1. Let _replacer_ be ? GetMethod(_searchValue_, %Symbol.replace%). 1. If _replacer_ is not *undefined*, then - 1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »). - 1. Let _string_ be ? ToString(_O_). + 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 @@ -36060,8 +36060,8 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). 1. If _searchValue_ is an Object, then 1. Let _isRegExp_ be ? IsRegExp(_searchValue_). 1. If _isRegExp_ is *true*, then @@ -36070,8 +36070,8 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    1. If ? ToString(_flags_) does not contain *"g"*, throw a *TypeError* exception. 1. Let _replacer_ be ? GetMethod(_searchValue_, %Symbol.replace%). 1. If _replacer_ is not *undefined*, then - 1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »). - 1. Let _string_ be ? ToString(_O_). + 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 @@ -36085,16 +36085,16 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    1. Set _position_ to StringIndexOf(_string_, _searchString_, _position_ + _advanceBy_). 1. Let _endOfLastMatch_ be 0. 1. Let _result_ be the empty String. - 1. For each element _p_ of _matchPositions_, do - 1. Let _preserved_ be the substring of _string_ from _endOfLastMatch_ to _p_. + 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. Let _replacement_ be ? ToString(? Call(_replaceValue_, *undefined*, « _searchString_, 𝔽(_p_), _string_ »)). + 1. Let _replacement_ be ? ToString(? Call(_replaceValue_, *undefined*, « _searchString_, 𝔽(_matchPosition_), _string_ »)). 1. Else, 1. Assert: _replaceValue_ is a String. 1. Let _captures_ be a new empty List. - 1. Let _replacement_ be ! GetSubstitution(_searchString_, _string_, _p_, _captures_, *undefined*, _replaceValue_). + 1. Let _replacement_ be ! GetSubstitution(_searchString_, _string_, _matchPosition_, _captures_, *undefined*, _replaceValue_). 1. Set _result_ to the string-concatenation of _result_, _preserved_, and _replacement_. - 1. Set _endOfLastMatch_ to _p_ + _searchLength_. + 1. Set _endOfLastMatch_ to _matchPosition_ + _searchLength_. 1. If _endOfLastMatch_ < the length of _string_, then 1. Set _result_ to the string-concatenation of _result_ and the substring of _string_ from _endOfLastMatch_. 1. Return _result_. @@ -36102,18 +36102,18 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    -

    String.prototype.search ( _regexp_ )

    +

    String.prototype.search ( _regexpOrPattern_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. If _regexp_ is an Object, then - 1. Let _searcher_ be ? GetMethod(_regexp_, %Symbol.search%). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. If _regexpOrPattern_ is an Object, then + 1. Let _searcher_ be ? GetMethod(_regexpOrPattern_, %Symbol.search%). 1. If _searcher_ is not *undefined*, then - 1. Return ? Call(_searcher_, _regexp_, « _O_ »). - 1. Let _string_ be ? ToString(_O_). - 1. Let _rx_ be ? RegExpCreate(_regexp_, *undefined*). - 1. Return ? Invoke(_rx_, %Symbol.search%, « _string_ »). + 1. Return ? Call(_searcher_, _regexpOrPattern_, « _thisValue_ »). + 1. Let _string_ be ? ToString(_thisValue_). + 1. Let _regexp_ be ? RegExpCreate(_regexpOrPattern_, *undefined*). + 1. Return ? Invoke(_regexp_, %Symbol.search%, « _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.

    @@ -36125,10 +36125,10 @@

    String.prototype.slice ( _start_, _end_ )

    This method returns a substring of the result of converting this object to a String, starting from index _start_ and running to, but not including, index _end_ (or through the end of the String if _end_ is *undefined*). If _start_ is negative, it is treated as _sourceLength_ + _start_ where _sourceLength_ is the length of the String. If _end_ is negative, it is treated as _sourceLength_ + _end_ where _sourceLength_ is the length of the String. The result is a String value, not a String object.

    It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Let _len_ be the length of _S_. + 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 _intStart_ be ? ToIntegerOrInfinity(_start_). 1. If _intStart_ = -∞, let _from_ be 0. 1. Else if _intStart_ < 0, let _from_ be max(_len_ + _intStart_, 0). @@ -36138,7 +36138,7 @@

    String.prototype.slice ( _start_, _end_ )

    1. Else if _intEnd_ < 0, let _to_ be max(_len_ + _intEnd_, 0). 1. Else, let _to_ be min(_intEnd_, _len_). 1. If _from_ ≥ _to_, return the empty String. - 1. Return the substring of _S_ from _from_ to _to_. + 1. Return the substring of _str_ 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.

    @@ -36150,38 +36150,38 @@

    String.prototype.split ( _separator_, _limit_ )

    This method returns an Array into which substrings of the result of converting this object to a String have been stored. The substrings are determined by searching from left to right for occurrences of _separator_; these occurrences are not part of any String in the returned array, but serve to divide up the String value. The value of _separator_ may be a String of any length or it may be an object, such as a RegExp, that has a %Symbol.split% method.

    It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). 1. If _separator_ is an Object, then 1. Let _splitter_ be ? GetMethod(_separator_, %Symbol.split%). 1. If _splitter_ is not *undefined*, then - 1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »). - 1. Let _S_ be ? ToString(_O_). + 1. Return ? Call(_splitter_, _separator_, « _thisValue_, _limit_ »). + 1. Let _str_ be ? ToString(_thisValue_). 1. If _limit_ is *undefined*, let _lim_ be 232 - 1; else let _lim_ be ℝ(? ToUint32(_limit_)). - 1. Let _R_ be ? ToString(_separator_). + 1. Let _separatorStr_ be ? ToString(_separator_). 1. If _lim_ = 0, then 1. Return CreateArrayFromList(« »). 1. If _separator_ is *undefined*, then - 1. Return CreateArrayFromList(« _S_ »). - 1. Let _separatorLength_ be the length of _R_. + 1. Return CreateArrayFromList(« _str_ »). + 1. Let _separatorLength_ be the length of _separatorStr_. 1. If _separatorLength_ = 0, then - 1. Let _strLen_ be the length of _S_. + 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 _S_ from 0 to _outLen_. + 1. Let _head_ be the substring of _str_ from 0 to _outLen_. 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 _S_ is the empty String, return CreateArrayFromList(« _S_ »). + 1. If _str_ is the empty String, return CreateArrayFromList(« _str_ »). 1. Let _substrings_ be a new empty List. - 1. Let _i_ be 0. - 1. Let _j_ be StringIndexOf(_S_, _R_, 0). - 1. Repeat, while _j_ is not ~not-found~, - 1. Let _T_ be the substring of _S_ from _i_ to _j_. - 1. Append _T_ to _substrings_. + 1. Let _searchStart_ be 0. + 1. Let _matchIndex_ be StringIndexOf(_str_, _separatorStr_, 0). + 1. Repeat, while _matchIndex_ is not ~not-found~, + 1. Let _substring_ be the substring of _str_ from _searchStart_ to _matchIndex_. + 1. Append _substring_ to _substrings_. 1. If the number of elements in _substrings_ is _lim_, return CreateArrayFromList(_substrings_). - 1. Set _i_ to _j_ + _separatorLength_. - 1. Set _j_ to StringIndexOf(_S_, _R_, _i_). - 1. Let _T_ be the substring of _S_ from _i_. - 1. Append _T_ to _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. Append _substring_ to _substrings_. 1. Return CreateArrayFromList(_substrings_). @@ -36198,20 +36198,20 @@

    String.prototype.split ( _separator_, _limit_ )

    String.prototype.startsWith ( _searchString_ [ , _position_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). + 1. Let _thisValue_ be the *this* value. + 1. Perform ? RequireObjectCoercible(_thisValue_). + 1. Let _str_ 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 _S_. + 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. If _searchLength_ = 0, return *true*. 1. Let _end_ be _start_ + _searchLength_. 1. If _end_ > _len_, return *false*. - 1. Let _substring_ be the substring of _S_ from _start_ to _end_. + 1. Let _substring_ be the substring of _str_ from _start_ to _end_. 1. If _substring_ is _searchStr_, return *true*. 1. Return *false*. @@ -36233,17 +36233,17 @@

    String.prototype.substring ( _start_, _end_ )

    If _start_ is strictly greater than _end_, they are swapped.

    It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Let _len_ be the length of _S_. + 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 _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. Let _from_ be min(_finalStart_, _finalEnd_). 1. Let _to_ be max(_finalStart_, _finalEnd_). - 1. Return the substring of _S_ from _from_ to _to_. + 1. Return the substring of _str_ 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.

    @@ -36277,13 +36277,13 @@

    String.prototype.toLowerCase ( )

    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 _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Let _sText_ be StringToCodePoints(_S_). + 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 _lowerText_ be toLowercase(_sText_), according to the Unicode Default Case Conversion algorithm. - 1. Let _L_ be CodePointsToString(_lowerText_). - 1. Return _L_. + 1. Let _lowercaseString_ be CodePointsToString(_lowerText_). + 1. Return _lowercaseString_.

    The result must be derived according to the locale-insensitive case mappings in the Unicode Character Database (this explicitly includes not only the file UnicodeData.txt, but also all locale-insensitive mappings in the file SpecialCasing.txt that accompanies it).

    @@ -36319,14 +36319,14 @@

    String.prototype.toWellFormed ( )

    This method returns a String representation of this object with all leading surrogates and trailing surrogates that are not part of a surrogate pair replaced with U+FFFD (REPLACEMENT CHARACTER).

    It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Let _strLen_ be the length of _S_. + 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 _k_ be 0. 1. Let _result_ be the empty String. 1. Repeat, while _k_ < _strLen_, - 1. Let _cp_ be CodePointAt(_S_, _k_). + 1. Let _cp_ be CodePointAt(_str_, _k_). 1. If _cp_.[[IsUnpairedSurrogate]] is *true*, then 1. Set _result_ to the string-concatenation of _result_ and 0xFFFD (REPLACEMENT CHARACTER). 1. Else, @@ -36341,8 +36341,8 @@

    String.prototype.trim ( )

    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 _S_ be the *this* value. - 1. Return ? TrimString(_S_, ~start+end~). + 1. Let _thisValue_ be the *this* value. + 1. Return ? TrimString(_thisValue_, ~start+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.

    @@ -36361,15 +36361,15 @@

    1. Perform ? RequireObjectCoercible(_string_). - 1. Let _S_ be ? ToString(_string_). + 1. Let _str_ be ? ToString(_string_). 1. If _where_ is ~start~, then - 1. Let _T_ be the String value that is a copy of _S_ with leading white space removed. + 1. Let _trimmedString_ be the String value that is a copy of _str_ with leading white space removed. 1. Else if _where_ is ~end~, then - 1. Let _T_ be the String value that is a copy of _S_ with trailing white space removed. + 1. Let _trimmedString_ be the String value that is a copy of _str_ with trailing white space removed. 1. Else, 1. Assert: _where_ is ~start+end~. - 1. Let _T_ be the String value that is a copy of _S_ with both leading and trailing white space removed. - 1. Return _T_. + 1. Let _trimmedString_ be the String value that is a copy of _str_ 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 .

    @@ -36380,8 +36380,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 _S_ be the *this* value. - 1. Return ? TrimString(_S_, ~end~). + 1. Let _str_ be the *this* value. + 1. Return ? TrimString(_str_, ~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.

    @@ -36393,8 +36393,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 _S_ be the *this* value. - 1. Return ? TrimString(_S_, ~start~). + 1. Let _str_ be the *this* value. + 1. Return ? TrimString(_str_, ~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.

    @@ -36419,9 +36419,9 @@

    1. If _value_ is a String, return _value_. 1. If _value_ is an Object and _value_ has a [[StringData]] internal slot, then - 1. Let _s_ be _value_.[[StringData]]. - 1. Assert: _s_ is a String. - 1. Return _s_. + 1. Let _str_ be _value_.[[StringData]]. + 1. Assert: _str_ is a String. + 1. Return _str_. 1. Throw a *TypeError* exception. @@ -36432,16 +36432,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 _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _s_ be ? ToString(_O_). - 1. Let _closure_ be a new Abstract Closure with no parameters that captures _s_ and performs the following steps when called: - 1. Let _len_ be the length of _s_. + 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 _position_ be 0. 1. Repeat, while _position_ < _len_, - 1. Let _cp_ be CodePointAt(_s_, _position_). + 1. Let _cp_ be CodePointAt(_str_, _position_). 1. Let _nextIndex_ be _position_ + _cp_.[[CodeUnitCount]]. - 1. Let _resultString_ be the substring of _s_ from _position_ to _nextIndex_. + 1. Let _resultString_ be the substring of _str_ from _position_ to _nextIndex_. 1. Set _position_ to _nextIndex_. 1. Perform ? GeneratorYield(CreateIteratorResultObject(_resultString_, *false*)). 1. Return NormalCompletion(~unused~). @@ -37417,10 +37417,10 @@

    Notation

    A CharSetElement is one of the two following entities:
    • - If _rer_.[[UnicodeSets]] is *false*, then a CharSetElement is a character in the sense of the Pattern Semantics above. + If _regexpRecord_.[[UnicodeSets]] is *false*, then a CharSetElement is a character in the sense of the Pattern Semantics above.
    • - If _rer_.[[UnicodeSets]] is *true*, then a CharSetElement is a sequence whose elements are characters in the sense of the Pattern Semantics above. This includes the empty sequence, sequences of one character, and sequences of more than one character. For convenience, when working with CharSetElements of this kind, an individual character is treated interchangeably with a sequence of one character. + If _regexpRecord_.[[UnicodeSets]] is *true*, then a CharSetElement is a sequence whose elements are characters in the sense of the Pattern Semantics above. This includes the empty sequence, sequences of one character, and sequences of more than one character. For convenience, when working with CharSetElements of this kind, an individual character is treated interchangeably with a sequence of one character.
    @@ -37428,13 +37428,13 @@

    Notation

    A CharSet is a mathematical set of CharSetElements.
  11. - A CaptureRange is a Record { [[StartIndex]], [[EndIndex]] } that represents the range of characters included in a capture, where [[StartIndex]] is an integer representing the start index (inclusive) of the range within _Input_, and [[EndIndex]] is an integer representing the end index (exclusive) of the range within _Input_. For any CaptureRange, these indices must satisfy the invariant that [[StartIndex]] ≤ [[EndIndex]]. + A CaptureRange is a Record { [[StartIndex]], [[EndIndex]] } that represents the range of characters included in a capture, where [[StartIndex]] is an integer representing the start index (inclusive) of the range within _input_, and [[EndIndex]] is an integer representing the end index (exclusive) of the range within _input_. For any CaptureRange, these indices must satisfy the invariant that [[StartIndex]] ≤ [[EndIndex]].
  12. A MatchState is a Record { [[Input]], [[EndIndex]], [[Captures]] } where [[Input]] is a List of characters representing the String being matched, [[EndIndex]] is an integer, and [[Captures]] is a List of values, one for each left-capturing parenthesis in the pattern. MatchStates are used to represent partial match states in the regular expression matching algorithms. The [[EndIndex]] is one plus the index of the last input character matched so far by the pattern, while [[Captures]] holds the results of capturing parentheses. The _n_th element of [[Captures]] is either a CaptureRange representing the range of characters captured by the _n_th set of capturing parentheses, or *undefined* if the _n_th set of capturing parentheses hasn't been reached yet. Due to backtracking, many MatchStates may be in use at any time during the matching process.
  13. - A MatcherContinuation is an Abstract Closure that takes one MatchState argument and returns either a MatchState or ~failure~. The MatcherContinuation attempts to match the remaining portion (specified by the closure's captured values) of the pattern against _Input_, starting at the intermediate state given by its MatchState argument. If the match succeeds, the MatcherContinuation returns the final MatchState that it reached; if the match fails, the MatcherContinuation returns ~failure~. + A MatcherContinuation is an Abstract Closure that takes one MatchState argument and returns either a MatchState or ~failure~. The MatcherContinuation attempts to match the remaining portion (specified by the closure's captured values) of the pattern against _input_, starting at the intermediate state given by its MatchState argument. If the match succeeds, the MatcherContinuation returns the final MatchState that it reached; if the match fails, the MatcherContinuation returns ~failure~.
  14. A Matcher is an Abstract Closure that takes two arguments—a MatchState and a MatcherContinuation—and returns either a MatchState or ~failure~. A Matcher attempts to match a middle subpattern (specified by the closure's captured values) of the pattern against the MatchState's [[Input]], starting at the intermediate state given by its MatchState argument. The MatcherContinuation argument should be a closure that matches the rest of the pattern. After matching the subpattern of a pattern to obtain a new MatchState, the Matcher then calls MatcherContinuation on that new MatchState to test if the rest of the pattern can match as well. If it can, the Matcher returns the MatchState returned by MatcherContinuation; if not, the Matcher may try different choices at its choice points, repeatedly calling MatcherContinuation until it either succeeds or all possibilities have been exhausted. @@ -37492,22 +37492,22 @@

    RegExp Records

    Runtime Semantics: CompilePattern ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): an Abstract Closure that takes a List of characters and a non-negative integer and returns either a MatchState or ~failure~

    Pattern :: Disjunction - 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _rer_ and ~forward~. - 1. Return a new Abstract Closure with parameters (_Input_, _index_) that captures _rer_ and _m_ and performs the following steps when called: - 1. Assert: _Input_ is a List of characters. - 1. Assert: 0 ≤ _index_ ≤ the number of elements in _Input_. + 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _regexpRecord_ and ~forward~. + 1. Return a new Abstract Closure with parameters (_input_, _index_) that captures _regexpRecord_ and _m_ and performs the following steps when called: + 1. Assert: _input_ is a List of characters. + 1. Assert: 0 ≤ _index_ ≤ the number of elements in _input_. 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 _rer_.[[CapturingGroupsCount]] *undefined* values, indexed 1 through _rer_.[[CapturingGroupsCount]]. - 1. Let _x_ be the MatchState { [[Input]]: _Input_, [[EndIndex]]: _index_, [[Captures]]: _cap_ }. + 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. Return _m_(_x_, _c_). @@ -37518,7 +37518,7 @@

    Runtime Semantics: CompileSubpattern ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, _direction_: ~forward~ or ~backward~, ): a Matcher

    @@ -37531,8 +37531,8 @@

    Disjunction :: Alternative `|` Disjunction - 1. Let _m1_ be CompileSubpattern of |Alternative| with arguments _rer_ and _direction_. - 1. Let _m2_ be CompileSubpattern of |Disjunction| with arguments _rer_ and _direction_. + 1. Let _m1_ be CompileSubpattern of |Alternative| with arguments _regexpRecord_ and _direction_. + 1. Let _m2_ be CompileSubpattern of |Disjunction| with arguments _regexpRecord_ and _direction_. 1. Return MatchTwoAlternatives(_m1_, _m2_). @@ -37554,29 +37554,29 @@

    Alternative :: Alternative Term - 1. Let _m1_ be CompileSubpattern of |Alternative| with arguments _rer_ and _direction_. - 1. Let _m2_ be CompileSubpattern of |Term| with arguments _rer_ and _direction_. + 1. Let _m1_ be CompileSubpattern of |Alternative| with arguments _regexpRecord_ and _direction_. + 1. Let _m2_ be CompileSubpattern of |Term| with arguments _regexpRecord_ and _direction_. 1. Return MatchSequence(_m1_, _m2_, _direction_). -

    Consecutive |Term|s try to simultaneously match consecutive portions of _Input_. When _direction_ is ~forward~, if the left |Alternative|, the right |Term|, and the sequel of the regular expression all have choice points, all choices in the sequel are tried before moving on to the next choice in the right |Term|, and all choices in the right |Term| are tried before moving on to the next choice in the left |Alternative|. When _direction_ is ~backward~, the evaluation order of |Alternative| and |Term| are reversed.

    +

    Consecutive |Term|s try to simultaneously match consecutive portions of _input_. When _direction_ is ~forward~, if the left |Alternative|, the right |Term|, and the sequel of the regular expression all have choice points, all choices in the sequel are tried before moving on to the next choice in the right |Term|, and all choices in the right |Term| are tried before moving on to the next choice in the left |Alternative|. When _direction_ is ~backward~, the evaluation order of |Alternative| and |Term| are reversed.

    Term :: Assertion - 1. Return CompileAssertion of |Assertion| with argument _rer_. + 1. Return CompileAssertion of |Assertion| with argument _regexpRecord_.

    The resulting Matcher is independent of _direction_.

    Term :: Atom - 1. Return CompileAtom of |Atom| with arguments _rer_ and _direction_. + 1. Return CompileAtom of |Atom| with arguments _regexpRecord_ and _direction_. Term :: Atom Quantifier - 1. Let _m_ be CompileAtom of |Atom| with arguments _rer_ and _direction_. + 1. Let _m_ be CompileAtom of |Atom| with arguments _regexpRecord_ and _direction_. 1. Let _q_ be CompileQuantifier of |Quantifier|. 1. Assert: _q_.[[Min]] ≤ _q_.[[Max]]. 1. Let _parenIndex_ be CountLeftCapturingParensBefore(|Term|). @@ -37594,8 +37594,8 @@

    _min_: a non-negative integer, _max_: a non-negative integer or +∞, _greedy_: a Boolean, - _x_: a MatchState, - _c_: a MatcherContinuation, + _matchState_: a MatchState, + _continue_: a MatcherContinuation, _parenIndex_: a non-negative integer, _parenCount_: a non-negative integer, ): either a MatchState or ~failure~ @@ -37603,26 +37603,26 @@

    - 1. If _max_ = 0, return _c_(_x_). - 1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures _m_, _min_, _max_, _greedy_, _x_, _c_, _parenIndex_, and _parenCount_ and performs the following steps when called: + 1. If _max_ = 0, return _continue_(_matchState_). + 1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures _m_, _min_, _max_, _greedy_, _matchState_, _continue_, _parenIndex_, and _parenCount_ and performs the following steps when called: 1. Assert: _y_ is a MatchState. - 1. [id="step-repeatmatcher-done"] If _min_ = 0 and _y_.[[EndIndex]] = _x_.[[EndIndex]], return ~failure~. + 1. [id="step-repeatmatcher-done"] If _min_ = 0 and _y_.[[EndIndex]] = _matchState_.[[EndIndex]], return ~failure~. 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_, _c_, _parenIndex_, _parenCount_). - 1. Let _cap_ be a copy of _x_.[[Captures]]. + 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 _Input_ be _x_.[[Input]]. - 1. Let _e_ be _x_.[[EndIndex]]. - 1. Let _xr_ be the MatchState { [[Input]]: _Input_, [[EndIndex]]: _e_, [[Captures]]: _cap_ }. + 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. If _min_ ≠ 0, return _m_(_xr_, _d_). 1. If _greedy_ is *false*, then - 1. Let _z_ be _c_(_x_). + 1. Let _z_ be _continue_(_matchState_). 1. If _z_ is not ~failure~, return _z_. 1. Return _m_(_xr_, _d_). 1. Let _z_ be _m_(_xr_, _d_). 1. If _z_ is not ~failure~, return _z_. - 1. Return _c_(_x_). + 1. Return _continue_(_matchState_).

    An |Atom| followed by a |Quantifier| is repeated the number of times specified by the |Quantifier|. A |Quantifier| can be non-greedy, in which case the |Atom| pattern is repeated as few times as possible while still matching the sequel, or it can be greedy, in which case the |Atom| pattern is repeated as many times as possible while still matching the sequel. The |Atom| pattern is repeated rather than the input character sequence that it matches, so different repetitions of the |Atom| can match different input substrings.

    @@ -37671,10 +37671,10 @@

    EmptyMatcher ( ): a Matcher

    - 1. Return a new Matcher with parameters (_x_, _c_) that captures nothing and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Return _c_(_x_). + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures nothing and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. + 1. Return _continue_(_matchState_). @@ -37688,12 +37688,12 @@

    - 1. Return a new Matcher with parameters (_x_, _c_) that captures _m1_ and _m2_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Let _r_ be _m1_(_x_, _c_). + 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. Return _m2_(_x_, _c_). + 1. Return _m2_(_matchState_, _continue_). @@ -37709,21 +37709,21 @@

    1. If _direction_ is ~forward~, then - 1. Return a new Matcher with parameters (_x_, _c_) that captures _m1_ and _m2_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures _c_ and _m2_ and performs the following steps when called: + 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 _d_ be a new MatcherContinuation with parameters (_y_) that captures _continue_ and _m2_ and performs the following steps when called: 1. Assert: _y_ is a MatchState. - 1. Return _m2_(_y_, _c_). - 1. Return _m1_(_x_, _d_). + 1. Return _m2_(_y_, _continue_). + 1. Return _m1_(_matchState_, _d_). 1. Assert: _direction_ is ~backward~. - 1. Return a new Matcher with parameters (_x_, _c_) that captures _m1_ and _m2_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures _c_ and _m1_ and performs the following steps when called: + 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 _d_ be a new MatcherContinuation with parameters (_y_) that captures _continue_ and _m1_ and performs the following steps when called: 1. Assert: _y_ is a MatchState. - 1. Return _m1_(_y_, _c_). - 1. Return _m2_(_x_, _d_). + 1. Return _m1_(_y_, _continue_). + 1. Return _m2_(_matchState_, _d_). @@ -37731,7 +37731,7 @@

    Runtime Semantics: CompileAssertion ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): a Matcher

    @@ -37741,71 +37741,71 @@

    Assertion :: `^` - 1. Return a new Matcher with parameters (_x_, _c_) that captures _rer_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Let _Input_ be _x_.[[Input]]. - 1. Let _e_ be _x_.[[EndIndex]]. - 1. If _e_ = 0, or if _rer_.[[Multiline]] is *true* and the character _Input_[_e_ - 1] is matched by |LineTerminator|, then - 1. Return _c_(_x_). + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _regexpRecord_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. + 1. Let _input_ be _matchState_.[[Input]]. + 1. Let _e_ be _matchState_.[[EndIndex]]. + 1. If _e_ = 0, or if _regexpRecord_.[[Multiline]] is *true* and the character _input_[_e_ - 1] is matched by |LineTerminator|, then + 1. Return _continue_(_matchState_). 1. Return ~failure~. -

    Even when the `y` flag is used with a pattern, `^` always matches only at the beginning of _Input_, or (if _rer_.[[Multiline]] is *true*) at the beginning of a line.

    +

    Even when the `y` flag is used with a pattern, `^` always matches only at the beginning of _input_, or (if _regexpRecord_.[[Multiline]] is *true*) at the beginning of a line.

    Assertion :: `$` - 1. Return a new Matcher with parameters (_x_, _c_) that captures _rer_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Let _Input_ be _x_.[[Input]]. - 1. Let _e_ be _x_.[[EndIndex]]. - 1. Let _InputLength_ be the number of elements in _Input_. - 1. If _e_ = _InputLength_, or if _rer_.[[Multiline]] is *true* and the character _Input_[_e_] is matched by |LineTerminator|, then - 1. Return _c_(_x_). + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _regexpRecord_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. + 1. Let _input_ be _matchState_.[[Input]]. + 1. Let _e_ be _matchState_.[[EndIndex]]. + 1. Let _inputLength_ be the number of elements in _input_. + 1. If _e_ = _inputLength_, or if _regexpRecord_.[[Multiline]] is *true* and the character _input_[_e_] is matched by |LineTerminator|, then + 1. Return _continue_(_matchState_). 1. Return ~failure~. Assertion :: `\b` - 1. Return a new Matcher with parameters (_x_, _c_) that captures _rer_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Let _Input_ be _x_.[[Input]]. - 1. Let _e_ be _x_.[[EndIndex]]. - 1. Let _a_ be IsWordChar(_rer_, _Input_, _e_ - 1). - 1. Let _b_ be IsWordChar(_rer_, _Input_, _e_). - 1. If _a_ is *true* and _b_ is *false*, or if _a_ is *false* and _b_ is *true*, return _c_(_x_). + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _regexpRecord_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. + 1. Let _input_ be _matchState_.[[Input]]. + 1. Let _e_ be _matchState_.[[EndIndex]]. + 1. Let _a_ be IsWordChar(_regexpRecord_, _input_, _e_ - 1). + 1. Let _b_ be IsWordChar(_regexpRecord_, _input_, _e_). + 1. If _a_ is *true* and _b_ is *false*, or if _a_ is *false* and _b_ is *true*, return _continue_(_matchState_). 1. Return ~failure~. Assertion :: `\B` - 1. Return a new Matcher with parameters (_x_, _c_) that captures _rer_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. - 1. Let _Input_ be _x_.[[Input]]. - 1. Let _e_ be _x_.[[EndIndex]]. - 1. Let _a_ be IsWordChar(_rer_, _Input_, _e_ - 1). - 1. Let _b_ be IsWordChar(_rer_, _Input_, _e_). - 1. If _a_ is *true* and _b_ is *true*, or if _a_ is *false* and _b_ is *false*, return _c_(_x_). + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _regexpRecord_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. + 1. Let _input_ be _matchState_.[[Input]]. + 1. Let _e_ be _matchState_.[[EndIndex]]. + 1. Let _a_ be IsWordChar(_regexpRecord_, _input_, _e_ - 1). + 1. Let _b_ be IsWordChar(_regexpRecord_, _input_, _e_). + 1. If _a_ is *true* and _b_ is *true*, or if _a_ is *false* and _b_ is *false*, return _continue_(_matchState_). 1. Return ~failure~. Assertion :: `(?=` Disjunction `)` - 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _rer_ and ~forward~. - 1. Return a new Matcher with parameters (_x_, _c_) that captures _m_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. + 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _regexpRecord_ and ~forward~. + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _m_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. 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_(_x_, _d_). + 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 _Input_ be _x_.[[Input]]. - 1. Let _xe_ be _x_.[[EndIndex]]. - 1. Let _z_ be the MatchState { [[Input]]: _Input_, [[EndIndex]]: _xe_, [[Captures]]: _cap_ }. - 1. Return _c_(_z_). + 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. Return _continue_(_z_).

    The form `(?=` |Disjunction| `)` specifies a zero-width positive lookahead. In order for it to succeed, the pattern inside |Disjunction| must match at the current position, but the current position is not advanced before matching the sequel. If |Disjunction| can match at the current position in several ways, only the first one is tried. Unlike other regular expression operators, there is no backtracking into a `(?=` form (this unusual behaviour is inherited from Perl). This only matters when the |Disjunction| contains capturing parentheses and the sequel of the pattern contains backreferences to those captures.

    @@ -37822,16 +37822,16 @@

    Assertion :: `(?!` Disjunction `)` - 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _rer_ and ~forward~. - 1. Return a new Matcher with parameters (_x_, _c_) that captures _m_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. + 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _regexpRecord_ and ~forward~. + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _m_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. 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_(_x_, _d_). + 1. Let _r_ be _m_(_matchState_, _d_). 1. If _r_ is not ~failure~, return ~failure~. - 1. Return _c_(_x_). + 1. Return _continue_(_matchState_).

    The form `(?!` |Disjunction| `)` specifies a zero-width negative lookahead. In order for it to succeed, the pattern inside |Disjunction| must fail to match at the current position. The current position is not advanced before matching the sequel. |Disjunction| can contain capturing parentheses, but backreferences to them only make sense from within |Disjunction| itself. Backreferences to these capturing parentheses from elsewhere in the pattern always return *undefined* because the negative lookahead must fail for the pattern to succeed. For example,

    @@ -37841,51 +37841,51 @@

    Assertion :: `(?<=` Disjunction `)` - 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _rer_ and ~backward~. - 1. Return a new Matcher with parameters (_x_, _c_) that captures _m_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. + 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _regexpRecord_ and ~backward~. + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _m_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. 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_(_x_, _d_). + 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 _Input_ be _x_.[[Input]]. - 1. Let _xe_ be _x_.[[EndIndex]]. - 1. Let _z_ be the MatchState { [[Input]]: _Input_, [[EndIndex]]: _xe_, [[Captures]]: _cap_ }. - 1. Return _c_(_z_). + 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. Return _continue_(_z_). Assertion :: `(?<!` Disjunction `)` - 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _rer_ and ~backward~. - 1. Return a new Matcher with parameters (_x_, _c_) that captures _m_ and performs the following steps when called: - 1. Assert: _x_ is a MatchState. - 1. Assert: _c_ is a MatcherContinuation. + 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _regexpRecord_ and ~backward~. + 1. Return a new Matcher with parameters (_matchState_, _continue_) that captures _m_ and performs the following steps when called: + 1. Assert: _matchState_ is a MatchState. + 1. Assert: _continue_ is a MatcherContinuation. 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_(_x_, _d_). + 1. Let _r_ be _m_(_matchState_, _d_). 1. If _r_ is not ~failure~, return ~failure~. - 1. Return _c_(_x_). + 1. Return _continue_(_matchState_).

    IsWordChar ( - _rer_: a RegExp Record, - _Input_: a List of characters, + _regexpRecord_: a RegExp Record, + _input_: a List of characters, _e_: an integer, ): a Boolean

    - 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(_rer_) contains _c_, return *true*. + 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. Return *false*.
    @@ -37944,7 +37944,7 @@

    Runtime Semantics: CompileQuantifierPrefix ( ): a Record with fields [[Min]]

    Runtime Semantics: CompileAtom ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, _direction_: ~forward~ or ~backward~, ): a Matcher

    @@ -37958,33 +37958,33 @@

    Atom :: PatternCharacter 1. Let _ch_ be the character matched by |PatternCharacter|. - 1. Let _A_ be a one-element CharSet containing the character _ch_. - 1. Return CharacterSetMatcher(_rer_, _A_, *false*, _direction_). + 1. Let _charSet_ be a one-element CharSet containing the character _ch_. + 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). Atom :: `.` - 1. Let _A_ be AllCharacters(_rer_). - 1. If _rer_.[[DotAll]] is not *true*, then - 1. Remove from _A_ all characters corresponding to a code point on the right-hand side of the |LineTerminator| production. - 1. Return CharacterSetMatcher(_rer_, _A_, *false*, _direction_). + 1. Let _charSet_ be AllCharacters(_regexpRecord_). + 1. If _regexpRecord_.[[DotAll]] is not *true*, then + 1. Remove from _charSet_ all characters corresponding to a code point on the right-hand side of the |LineTerminator| production. + 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). Atom :: CharacterClass - 1. Let _cc_ be CompileCharacterClass of |CharacterClass| with argument _rer_. + 1. Let _cc_ be CompileCharacterClass of |CharacterClass| with argument _regexpRecord_. 1. Let _cs_ be _cc_.[[CharSet]]. - 1. If _rer_.[[UnicodeSets]] is *false* or every CharSetElement of _cs_ consists of a single character (including if _cs_ is empty), return CharacterSetMatcher(_rer_, _cs_, _cc_.[[Invert]], _direction_). + 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. 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(_rer_, _cs2_, *false*, _direction_). + 1. Let _m2_ be CharacterSetMatcher(_regexpRecord_, _cs2_, *false*, _direction_). 1. For each code point _c1_ in _s_, iterating backwards from its second-to-last code point, do 1. Let _cs1_ be a one-element CharSet containing _c1_. - 1. Let _m1_ be CharacterSetMatcher(_rer_, _cs1_, *false*, _direction_). + 1. Let _m1_ be CharacterSetMatcher(_regexpRecord_, _cs1_, *false*, _direction_). 1. Set _m2_ to MatchSequence(_m1_, _m2_, _direction_). 1. Append _m2_ to _lm_. 1. Let _singles_ be the CharSet containing every CharSetElement of _cs_ that consists of a single character. - 1. Append CharacterSetMatcher(_rer_, _singles_, *false*, _direction_) to _lm_. + 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 @@ -37993,7 +37993,7 @@

    Atom :: `(` GroupSpecifier? Disjunction `)` - 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _rer_ and _direction_. + 1. Let _m_ be CompileSubpattern of |Disjunction| with arguments _regexpRecord_ and _direction_. 1. Let _parenIndex_ be CountLeftCapturingParensBefore(|Atom|). 1. Return a new Matcher with parameters (_x_, _c_) that captures _direction_, _m_, and _parenIndex_ and performs the following steps when called: 1. Assert: _x_ is a MatchState. @@ -38001,7 +38001,7 @@

    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 _Input_ be _x_.[[Input]]. + 1. Let _input_ be _x_.[[Input]]. 1. Let _xe_ be _x_.[[EndIndex]]. 1. Let _ye_ be _y_.[[EndIndex]]. 1. If _direction_ is ~forward~, then @@ -38012,7 +38012,7 @@

    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. Let _z_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _ye_, [[Captures]]: _cap_ }. 1. Return _c_(_z_). 1. Return _m_(_x_, _d_). @@ -38023,14 +38023,14 @@

    1. Let _addModifiers_ be the source text matched by |RegularExpressionModifiers|. 1. Let _removeModifiers_ be the empty String. - 1. Let _modifiedRer_ be UpdateModifiers(_rer_, CodePointsToString(_addModifiers_), _removeModifiers_). + 1. Let _modifiedRer_ be UpdateModifiers(_regexpRecord_, CodePointsToString(_addModifiers_), _removeModifiers_). 1. Return CompileSubpattern of |Disjunction| with arguments _modifiedRer_ and _direction_. Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)` 1. Let _addModifiers_ be the source text matched by the first |RegularExpressionModifiers|. 1. Let _removeModifiers_ be the source text matched by the second |RegularExpressionModifiers|. - 1. Let _modifiedRer_ be UpdateModifiers(_rer_, CodePointsToString(_addModifiers_), CodePointsToString(_removeModifiers_)). + 1. Let _modifiedRer_ be UpdateModifiers(_regexpRecord_, CodePointsToString(_addModifiers_), CodePointsToString(_removeModifiers_)). 1. Return CompileSubpattern of |Disjunction| with arguments _modifiedRer_ and _direction_. @@ -38038,8 +38038,8 @@

    AtomEscape :: DecimalEscape 1. Let _n_ be the CapturingGroupNumber of |DecimalEscape|. - 1. Assert: _n_ ≤ _rer_.[[CapturingGroupsCount]]. - 1. Return BackreferenceMatcher(_rer_, « _n_ », _direction_). + 1. Assert: _n_ ≤ _regexpRecord_.[[CapturingGroupsCount]]. + 1. Return BackreferenceMatcher(_regexpRecord_, « _n_ », _direction_).

    An escape sequence of the form `\\` followed by a non-zero decimal number _n_ matches the result of the _n_th set of capturing parentheses (). It is an error if the regular expression has fewer than _n_ capturing parentheses. If the regular expression has _n_ or more capturing parentheses but the _n_th one is *undefined* because it has not captured anything, then the backreference always succeeds.

    @@ -38048,24 +38048,24 @@

    1. Let _cv_ be the CharacterValue of |CharacterEscape|. 1. Let _ch_ be the character whose character value is _cv_. - 1. Let _A_ be a one-element CharSet containing the character _ch_. - 1. Return CharacterSetMatcher(_rer_, _A_, *false*, _direction_). + 1. Let _charSet_ be a one-element CharSet containing the character _ch_. + 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). AtomEscape :: CharacterClassEscape - 1. Let _cs_ be CompileToCharSet of |CharacterClassEscape| with argument _rer_. - 1. If _rer_.[[UnicodeSets]] is *false* or every CharSetElement of _cs_ consists of a single character (including if _cs_ is empty), return CharacterSetMatcher(_rer_, _cs_, *false*, _direction_). + 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. 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(_rer_, _cs2_, *false*, _direction_). + 1. Let _m2_ be CharacterSetMatcher(_regexpRecord_, _cs2_, *false*, _direction_). 1. For each code point _c1_ in _s_, iterating backwards from its second-to-last code point, do 1. Let _cs1_ be a one-element CharSet containing _c1_. - 1. Let _m1_ be CharacterSetMatcher(_rer_, _cs1_, *false*, _direction_). + 1. Let _m1_ be CharacterSetMatcher(_regexpRecord_, _cs1_, *false*, _direction_). 1. Set _m2_ to MatchSequence(_m1_, _m2_, _direction_). 1. Append _m2_ to _lm_. 1. Let _singles_ be the CharSet containing every CharSetElement of _cs_ that consists of a single character. - 1. Append CharacterSetMatcher(_rer_, _singles_, *false*, _direction_) to _lm_. + 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 @@ -38079,14 +38079,14 @@

    1. For each |GroupSpecifier| _groupSpecifier_ of _matchingGroupSpecifiers_, do 1. Let _parenIndex_ be CountLeftCapturingParensBefore(_groupSpecifier_). 1. Append _parenIndex_ to _parenIndices_. - 1. Return BackreferenceMatcher(_rer_, _parenIndices_, _direction_). + 1. Return BackreferenceMatcher(_regexpRecord_, _parenIndices_, _direction_).

    CharacterSetMatcher ( - _rer_: a RegExp Record, - _A_: a CharSet, + _regexpRecord_: a RegExp Record, + _charSet_: a CharSet, _invert_: a Boolean, _direction_: ~forward~ or ~backward~, ): a Matcher @@ -38094,26 +38094,26 @@

    - 1. If _rer_.[[UnicodeSets]] is *true*, then + 1. If _regexpRecord_.[[UnicodeSets]] is *true*, then 1. Assert: _invert_ is *false*. - 1. Assert: Every CharSetElement of _A_ consists of a single character. - 1. Return a new Matcher with parameters (_x_, _c_) that captures _rer_, _A_, _invert_, and _direction_ and performs the following steps when called: + 1. Assert: Every CharSetElement of _charSet_ consists of a single character. + 1. Return a new Matcher with parameters (_x_, _c_) that captures _regexpRecord_, _charSet_, _invert_, and _direction_ and performs the following steps when called: 1. Assert: _x_ is a MatchState. 1. Assert: _c_ is a MatcherContinuation. - 1. Let _Input_ be _x_.[[Input]]. - 1. Let _e_ be _x_.[[EndIndex]]. - 1. If _direction_ is ~forward~, let _f_ be _e_ + 1. - 1. Else, let _f_ be _e_ - 1. - 1. Let _InputLength_ be the number of elements in _Input_. - 1. If _f_ < 0 or _f_ > _InputLength_, return ~failure~. - 1. Let _index_ be min(_e_, _f_). - 1. Let _ch_ be the character _Input_[_index_]. - 1. Let _cc_ be Canonicalize(_rer_, _ch_). - 1. If there exists a CharSetElement in _A_ containing exactly one character _a_ such that Canonicalize(_rer_, _a_) is _cc_, let _found_ be *true*; else let _found_ be *false*. + 1. Let _input_ be _x_.[[Input]]. + 1. Let _endIndex_ be _x_.[[EndIndex]]. + 1. If _direction_ is ~forward~, let _f_ be _endIndex_ + 1. + 1. Else, let _f_ be _endIndex_ - 1. + 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. 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 _y_ be the MatchState { [[Input]]: _input_, [[EndIndex]]: _f_, [[Captures]]: _cap_ }. 1. Return _c_(_y_). @@ -38121,7 +38121,7 @@

    BackreferenceMatcher ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, _ns_: a List of positive integers, _direction_: ~forward~ or ~backward~, ): a Matcher @@ -38129,10 +38129,10 @@

    - 1. Return a new Matcher with parameters (_x_, _c_) that captures _rer_, _ns_, and _direction_ and performs the following steps when called: + 1. Return a new Matcher with parameters (_x_, _c_) that captures _regexpRecord_, _ns_, and _direction_ and performs the following steps when called: 1. Assert: _x_ is a MatchState. 1. Assert: _c_ is a MatcherContinuation. - 1. Let _Input_ be _x_.[[Input]]. + 1. Let _input_ be _x_.[[Input]]. 1. Let _cap_ be _x_.[[Captures]]. 1. Let _r_ be *undefined*. 1. For each integer _n_ of _ns_, do @@ -38140,17 +38140,17 @@

    1. Assert: _r_ is *undefined*. 1. Set _r_ to _cap_[_n_]. 1. If _r_ is *undefined*, return _c_(_x_). - 1. Let _e_ be _x_.[[EndIndex]]. + 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 _e_ + _len_. - 1. Else, let _f_ be _e_ - _len_. - 1. Let _InputLength_ be the number of elements in _Input_. - 1. If _f_ < 0 or _f_ > _InputLength_, return ~failure~. - 1. Let _g_ be min(_e_, _f_). - 1. If there exists an integer _i_ in the interval from 0 (inclusive) to _len_ (exclusive) such that Canonicalize(_rer_, _Input_[_rs_ + _i_]) is not Canonicalize(_rer_, _Input_[_g_ + _i_]), return ~failure~. - 1. Let _y_ be the MatchState { [[Input]]: _Input_, [[EndIndex]]: _f_, [[Captures]]: _cap_ }. + 1. If _direction_ is ~forward~, let _f_ be _endIndex_ + _len_. + 1. Else, let _f_ be _endIndex_ - _len_. + 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. Return _c_(_y_). @@ -38158,17 +38158,17 @@

    Canonicalize ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, _ch_: a character, ): a character

    - 1. If HasEitherUnicodeFlag(_rer_) is *true* and _rer_.[[IgnoreCase]] is *true*, then + 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 _rer_.[[IgnoreCase]] is *false*, 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. @@ -38179,15 +38179,15 @@

    1. Return _cu_. -

    In case-insignificant matches when HasEitherUnicodeFlag(_rer_) 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`.

    -

    In case-insignificant matches when HasEitherUnicodeFlag(_rer_) is *false*, the mapping is based on Unicode Default Case Conversion algorithm toUppercase rather than toCasefold, which results in some subtle differences. For example, `Ω` (U+2126 OHM SIGN) is mapped by toUppercase to itself but by toCasefold to `ω` (U+03C9 GREEK SMALL LETTER OMEGA) along with `Ω` (U+03A9 GREEK CAPITAL LETTER OMEGA), so *"\u2126"* is matched by `/[ω]/ui` and `/[\u03A9]/ui` but not by `/[ω]/i` or `/[\u03A9]/i`. Also, no code point outside the Basic Latin block is mapped to a code point within it, so strings such as *"\u017F ſ"* and *"\u212A K"* are not matched by `/[a-z]/i`.

    +

    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`.

    +

    In case-insignificant matches when HasEitherUnicodeFlag(_regexpRecord_) is *false*, the mapping is based on Unicode Default Case Conversion algorithm toUppercase rather than toCasefold, which results in some subtle differences. For example, `Ω` (U+2126 OHM SIGN) is mapped by toUppercase to itself but by toCasefold to `ω` (U+03C9 GREEK SMALL LETTER OMEGA) along with `Ω` (U+03A9 GREEK CAPITAL LETTER OMEGA), so *"\u2126"* is matched by `/[ω]/ui` and `/[\u03A9]/ui` but not by `/[ω]/i` or `/[\u03A9]/i`. Also, no code point outside the Basic Latin block is mapped to a code point within it, so strings such as *"\u017F ſ"* and *"\u212A K"* are not matched by `/[a-z]/i`.

    UpdateModifiers ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, _add_: a String, _remove_: a String, ): a RegExp Record @@ -38196,12 +38196,12 @@

    1. Assert: _add_ and _remove_ have no elements in common. - 1. Let _ignoreCase_ be _rer_.[[IgnoreCase]]. - 1. Let _multiline_ be _rer_.[[Multiline]]. - 1. Let _dotAll_ be _rer_.[[DotAll]]. - 1. Let _unicode_ be _rer_.[[Unicode]]. - 1. Let _unicodeSets_ be _rer_.[[UnicodeSets]]. - 1. Let _capturingGroupsCount_ be _rer_.[[CapturingGroupsCount]]. + 1. Let _ignoreCase_ be _regexpRecord_.[[IgnoreCase]]. + 1. Let _multiline_ be _regexpRecord_.[[Multiline]]. + 1. Let _dotAll_ be _regexpRecord_.[[DotAll]]. + 1. Let _unicode_ be _regexpRecord_.[[Unicode]]. + 1. Let _unicodeSets_ be _regexpRecord_.[[UnicodeSets]]. + 1. Let _capturingGroupsCount_ be _regexpRecord_.[[CapturingGroupsCount]]. 1. If _remove_ contains *"i"*, set _ignoreCase_ to *false*. 1. Else if _add_ contains *"i"*, set _ignoreCase_ to *true*. 1. If _remove_ contains *"m"*, set _multiline_ to *false*. @@ -38216,29 +38216,29 @@

    Runtime Semantics: CompileCharacterClass ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): a Record with fields [[CharSet]] (a CharSet) and [[Invert]] (a Boolean)

    CharacterClass :: `[` ClassContents `]` - 1. Let _A_ be CompileToCharSet of |ClassContents| with argument _rer_. - 1. Return the Record { [[CharSet]]: _A_, [[Invert]]: *false* }. + 1. Let _charSet_ be CompileToCharSet of |ClassContents| with argument _regexpRecord_. + 1. Return the Record { [[CharSet]]: _charSet_, [[Invert]]: *false* }. CharacterClass :: `[^` ClassContents `]` - 1. Let _A_ be CompileToCharSet of |ClassContents| with argument _rer_. - 1. If _rer_.[[UnicodeSets]] is *true*, then - 1. Return the Record { [[CharSet]]: CharacterComplement(_rer_, _A_), [[Invert]]: *false* }. - 1. Return the Record { [[CharSet]]: _A_, [[Invert]]: *true* }. + 1. Let _charSet_ be CompileToCharSet of |ClassContents| with argument _regexpRecord_. + 1. If _regexpRecord_.[[UnicodeSets]] is *true*, then + 1. Return the Record { [[CharSet]]: CharacterComplement(_regexpRecord_, _charSet_), [[Invert]]: *false* }. + 1. Return the Record { [[CharSet]]: _charSet_, [[Invert]]: *true* }.

    Runtime Semantics: CompileToCharSet ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): a CharSet

    @@ -38256,33 +38256,33 @@

    NonemptyClassRanges :: ClassAtom NonemptyClassRangesNoDash - 1. Let _A_ be CompileToCharSet of |ClassAtom| with argument _rer_. - 1. Let _B_ be CompileToCharSet of |NonemptyClassRangesNoDash| with argument _rer_. - 1. Return the union of CharSets _A_ and _B_. + 1. Let _charSet_ be CompileToCharSet of |ClassAtom| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of |NonemptyClassRangesNoDash| with argument _regexpRecord_. + 1. Return the union of CharSets _charSet_ and _otherSet_. NonemptyClassRanges :: ClassAtom `-` ClassAtom ClassContents - 1. Let _A_ be CompileToCharSet of the first |ClassAtom| with argument _rer_. - 1. Let _B_ be CompileToCharSet of the second |ClassAtom| with argument _rer_. - 1. Let _C_ be CompileToCharSet of |ClassContents| with argument _rer_. - 1. Let _D_ be CharacterRange(_A_, _B_). - 1. Return the union of _D_ and _C_. + 1. Let _charSet_ be CompileToCharSet of the first |ClassAtom| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of the second |ClassAtom| with argument _regexpRecord_. + 1. Let _remainingSet_ be CompileToCharSet of |ClassContents| with argument _regexpRecord_. + 1. Let _rangeSet_ be CharacterRange(_charSet_, _otherSet_). + 1. Return the union of _rangeSet_ and _remainingSet_. NonemptyClassRangesNoDash :: ClassAtomNoDash NonemptyClassRangesNoDash - 1. Let _A_ be CompileToCharSet of |ClassAtomNoDash| with argument _rer_. - 1. Let _B_ be CompileToCharSet of |NonemptyClassRangesNoDash| with argument _rer_. - 1. Return the union of CharSets _A_ and _B_. + 1. Let _charSet_ be CompileToCharSet of |ClassAtomNoDash| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of |NonemptyClassRangesNoDash| with argument _regexpRecord_. + 1. Return the union of CharSets _charSet_ and _otherSet_. NonemptyClassRangesNoDash :: ClassAtomNoDash `-` ClassAtom ClassContents - 1. Let _A_ be CompileToCharSet of |ClassAtomNoDash| with argument _rer_. - 1. Let _B_ be CompileToCharSet of |ClassAtom| with argument _rer_. - 1. Let _C_ be CompileToCharSet of |ClassContents| with argument _rer_. - 1. Let _D_ be CharacterRange(_A_, _B_). - 1. Return the union of _D_ and _C_. + 1. Let _charSet_ be CompileToCharSet of |ClassAtomNoDash| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of |ClassAtom| with argument _regexpRecord_. + 1. Let _remainingSet_ be CompileToCharSet of |ClassContents| with argument _regexpRecord_. + 1. Let _rangeSet_ be CharacterRange(_charSet_, _otherSet_). + 1. Return the union of _rangeSet_ and _remainingSet_.

    |ClassContents| can expand into a single |ClassAtom| and/or ranges of two |ClassAtom| separated by dashes. In the latter case the |ClassContents| includes all characters between the first |ClassAtom| and the second |ClassAtom|, inclusive; an error occurs if either |ClassAtom| does not represent a single character (for example, if one is \w) or if the first |ClassAtom|'s character value is strictly greater than the second |ClassAtom|'s character value.

    @@ -38329,8 +38329,8 @@

    CharacterClassEscape :: `D` - 1. Let _S_ be the CharSet returned by CharacterClassEscape :: `d`. - 1. Return CharacterComplement(_rer_, _S_). + 1. Let _charSet_ be the CharSet returned by CharacterClassEscape :: `d`. + 1. Return CharacterComplement(_regexpRecord_, _charSet_). CharacterClassEscape :: `s` @@ -38338,155 +38338,155 @@

    CharacterClassEscape :: `S` - 1. Let _S_ be the CharSet returned by CharacterClassEscape :: `s`. - 1. Return CharacterComplement(_rer_, _S_). + 1. Let _charSet_ be the CharSet returned by CharacterClassEscape :: `s`. + 1. Return CharacterComplement(_regexpRecord_, _charSet_). CharacterClassEscape :: `w` - 1. Return MaybeSimpleCaseFolding(_rer_, WordCharacters(_rer_)). + 1. Return MaybeSimpleCaseFolding(_regexpRecord_, WordCharacters(_regexpRecord_)). CharacterClassEscape :: `W` - 1. Let _S_ be the CharSet returned by CharacterClassEscape :: `w`. - 1. Return CharacterComplement(_rer_, _S_). + 1. Let _charSet_ be the CharSet returned by CharacterClassEscape :: `w`. + 1. Return CharacterComplement(_regexpRecord_, _charSet_). CharacterClassEscape :: `p{` UnicodePropertyValueExpression `}` - 1. Return CompileToCharSet of |UnicodePropertyValueExpression| with argument _rer_. + 1. Return CompileToCharSet of |UnicodePropertyValueExpression| with argument _regexpRecord_. CharacterClassEscape :: `P{` UnicodePropertyValueExpression `}` - 1. Let _S_ be CompileToCharSet of |UnicodePropertyValueExpression| with argument _rer_. - 1. Assert: _S_ contains only single code points. - 1. Return CharacterComplement(_rer_, _S_). + 1. Let _charSet_ be CompileToCharSet of |UnicodePropertyValueExpression| with argument _regexpRecord_. + 1. Assert: _charSet_ contains only single code points. + 1. Return CharacterComplement(_regexpRecord_, _charSet_). UnicodePropertyValueExpression :: UnicodePropertyName `=` UnicodePropertyValue 1. Let _ps_ be the source text matched by |UnicodePropertyName|. - 1. Let _p_ be UnicodeMatchProperty(_rer_, _ps_). + 1. Let _p_ be UnicodeMatchProperty(_regexpRecord_, _ps_). 1. Assert: _p_ is a Unicode property name or property alias listed in the “Property name and aliases” column of . 1. Let _vs_ be the source text matched by |UnicodePropertyValue|. 1. Let _v_ be UnicodeMatchPropertyValue(_p_, _vs_). - 1. Let _A_ be the CharSet containing all Unicode code points whose character database definition includes the property _p_ with value _v_. - 1. Return MaybeSimpleCaseFolding(_rer_, _A_). + 1. Let _charSet_ be the CharSet containing all Unicode code points whose character database definition includes the property _p_ with value _v_. + 1. Return MaybeSimpleCaseFolding(_regexpRecord_, _charSet_). UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue 1. Let _s_ be the source text matched by |LoneUnicodePropertyNameOrValue|. 1. If UnicodeMatchPropertyValue(`General_Category`, _s_) is a Unicode property value or property value alias for the General_Category (gc) property listed in PropertyValueAliases.txt, then 1. Return the CharSet containing all Unicode code points whose character database definition includes the property “General_Category” with value _s_. - 1. Let _p_ be UnicodeMatchProperty(_rer_, _s_). + 1. Let _p_ be UnicodeMatchProperty(_regexpRecord_, _s_). 1. Assert: _p_ is a binary Unicode property or binary property alias listed in the “Property name and aliases” column of , or a binary Unicode property of strings listed in the “Property name” column of . - 1. Let _A_ be the CharSet containing all CharSetElements whose character database definition includes the property _p_ with value “True”. - 1. Return MaybeSimpleCaseFolding(_rer_, _A_). + 1. Let _charSet_ be the CharSet containing all CharSetElements whose character database definition includes the property _p_ with value “True”. + 1. Return MaybeSimpleCaseFolding(_regexpRecord_, _charSet_). ClassUnion :: ClassSetRange ClassUnion? - 1. Let _A_ be CompileToCharSet of |ClassSetRange| with argument _rer_. + 1. Let _charSet_ be CompileToCharSet of |ClassSetRange| with argument _regexpRecord_. 1. If |ClassUnion| is present, then - 1. Let _B_ be CompileToCharSet of |ClassUnion| with argument _rer_. - 1. Return the union of CharSets _A_ and _B_. - 1. Return _A_. + 1. Let _otherSet_ be CompileToCharSet of |ClassUnion| with argument _regexpRecord_. + 1. Return the union of CharSets _charSet_ and _otherSet_. + 1. Return _charSet_. ClassUnion :: ClassSetOperand ClassUnion? - 1. Let _A_ be CompileToCharSet of |ClassSetOperand| with argument _rer_. + 1. Let _charSet_ be CompileToCharSet of |ClassSetOperand| with argument _regexpRecord_. 1. If |ClassUnion| is present, then - 1. Let _B_ be CompileToCharSet of |ClassUnion| with argument _rer_. - 1. Return the union of CharSets _A_ and _B_. - 1. Return _A_. + 1. Let _otherSet_ be CompileToCharSet of |ClassUnion| with argument _regexpRecord_. + 1. Return the union of CharSets _charSet_ and _otherSet_. + 1. Return _charSet_. ClassIntersection :: ClassSetOperand `&&` ClassSetOperand - 1. Let _A_ be CompileToCharSet of the first |ClassSetOperand| with argument _rer_. - 1. Let _B_ be CompileToCharSet of the second |ClassSetOperand| with argument _rer_. - 1. Return the intersection of CharSets _A_ and _B_. + 1. Let _charSet_ be CompileToCharSet of the first |ClassSetOperand| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of the second |ClassSetOperand| with argument _regexpRecord_. + 1. Return the intersection of CharSets _charSet_ and _otherSet_. ClassIntersection :: ClassIntersection `&&` ClassSetOperand - 1. Let _A_ be CompileToCharSet of the |ClassIntersection| with argument _rer_. - 1. Let _B_ be CompileToCharSet of the |ClassSetOperand| with argument _rer_. - 1. Return the intersection of CharSets _A_ and _B_. + 1. Let _charSet_ be CompileToCharSet of the |ClassIntersection| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of the |ClassSetOperand| with argument _regexpRecord_. + 1. Return the intersection of CharSets _charSet_ and _otherSet_. ClassSubtraction :: ClassSetOperand `--` ClassSetOperand - 1. Let _A_ be CompileToCharSet of the first |ClassSetOperand| with argument _rer_. - 1. Let _B_ be CompileToCharSet of the second |ClassSetOperand| with argument _rer_. - 1. Return the CharSet containing the CharSetElements of _A_ which are not also CharSetElements of _B_. + 1. Let _charSet_ be CompileToCharSet of the first |ClassSetOperand| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of the second |ClassSetOperand| with argument _regexpRecord_. + 1. Return the CharSet containing the CharSetElements of _charSet_ which are not also CharSetElements of _otherSet_. ClassSubtraction :: ClassSubtraction `--` ClassSetOperand - 1. Let _A_ be CompileToCharSet of the |ClassSubtraction| with argument _rer_. - 1. Let _B_ be CompileToCharSet of the |ClassSetOperand| with argument _rer_. - 1. Return the CharSet containing the CharSetElements of _A_ which are not also CharSetElements of _B_. + 1. Let _charSet_ be CompileToCharSet of the |ClassSubtraction| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of the |ClassSetOperand| with argument _regexpRecord_. + 1. Return the CharSet containing the CharSetElements of _charSet_ which are not also CharSetElements of _otherSet_. ClassSetRange :: ClassSetCharacter `-` ClassSetCharacter - 1. Let _A_ be CompileToCharSet of the first |ClassSetCharacter| with argument _rer_. - 1. Let _B_ be CompileToCharSet of the second |ClassSetCharacter| with argument _rer_. - 1. Return MaybeSimpleCaseFolding(_rer_, CharacterRange(_A_, _B_)). + 1. Let _charSet_ be CompileToCharSet of the first |ClassSetCharacter| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of the second |ClassSetCharacter| with argument _regexpRecord_. + 1. Return MaybeSimpleCaseFolding(_regexpRecord_, CharacterRange(_charSet_, _otherSet_)). -

    The result will often consist of two or more ranges. When UnicodeSets is *true* and IgnoreCase is *true*, then MaybeSimpleCaseFolding(_rer_, [Ā-č]) will include only the odd-numbered code points of that range.

    +

    The result will often consist of two or more ranges. When UnicodeSets is *true* and IgnoreCase is *true*, then MaybeSimpleCaseFolding(_regexpRecord_, [Ā-č]) will include only the odd-numbered code points of that range.

    ClassSetOperand :: ClassSetCharacter - 1. Let _A_ be CompileToCharSet of |ClassSetCharacter| with argument _rer_. - 1. Return MaybeSimpleCaseFolding(_rer_, _A_). + 1. Let _charSet_ be CompileToCharSet of |ClassSetCharacter| with argument _regexpRecord_. + 1. Return MaybeSimpleCaseFolding(_regexpRecord_, _charSet_). ClassSetOperand :: ClassStringDisjunction - 1. Let _A_ be CompileToCharSet of |ClassStringDisjunction| with argument _rer_. - 1. Return MaybeSimpleCaseFolding(_rer_, _A_). + 1. Let _charSet_ be CompileToCharSet of |ClassStringDisjunction| with argument _regexpRecord_. + 1. Return MaybeSimpleCaseFolding(_regexpRecord_, _charSet_). ClassSetOperand :: NestedClass - 1. Return CompileToCharSet of |NestedClass| with argument _rer_. + 1. Return CompileToCharSet of |NestedClass| with argument _regexpRecord_. NestedClass :: `[` ClassContents `]` - 1. Return CompileToCharSet of |ClassContents| with argument _rer_. + 1. Return CompileToCharSet of |ClassContents| with argument _regexpRecord_. NestedClass :: `[^` ClassContents `]` - 1. Let _A_ be CompileToCharSet of |ClassContents| with argument _rer_. - 1. Return CharacterComplement(_rer_, _A_). + 1. Let _charSet_ be CompileToCharSet of |ClassContents| with argument _regexpRecord_. + 1. Return CharacterComplement(_regexpRecord_, _charSet_). NestedClass :: `\` CharacterClassEscape - 1. Return CompileToCharSet of |CharacterClassEscape| with argument _rer_. + 1. Return CompileToCharSet of |CharacterClassEscape| with argument _regexpRecord_. ClassStringDisjunction :: `\q{` ClassStringDisjunctionContents `}` - 1. Return CompileToCharSet of |ClassStringDisjunctionContents| with argument _rer_. + 1. Return CompileToCharSet of |ClassStringDisjunctionContents| with argument _regexpRecord_. ClassStringDisjunctionContents :: ClassString - 1. Let _s_ be CompileClassSetString of |ClassString| with argument _rer_. + 1. Let _s_ be CompileClassSetString of |ClassString| with argument _regexpRecord_. 1. Return the CharSet containing the one string _s_. ClassStringDisjunctionContents :: ClassString `|` ClassStringDisjunctionContents - 1. Let _s_ be CompileClassSetString of |ClassString| with argument _rer_. - 1. Let _A_ be the CharSet containing the one string _s_. - 1. Let _B_ be CompileToCharSet of |ClassStringDisjunctionContents| with argument _rer_. - 1. Return the union of CharSets _A_ and _B_. + 1. Let _s_ be CompileClassSetString of |ClassString| with argument _regexpRecord_. + 1. Let _charSet_ be the CharSet containing the one string _s_. + 1. Let _otherSet_ be CompileToCharSet of |ClassStringDisjunctionContents| with argument _regexpRecord_. + 1. Return the union of CharSets _charSet_ and _otherSet_. @@ -38509,16 +38509,16 @@

    CharacterRange ( - _A_: a CharSet, - _B_: a CharSet, + _charSet_: a CharSet, + _otherSet_: a CharSet, ): a CharSet

    - 1. Assert: _A_ and _B_ each contain exactly one character. - 1. Let _a_ be the one character in CharSet _A_. - 1. Let _b_ be the one character in CharSet _B_. + 1. Assert: _charSet_ and _otherSet_ each contain exactly one character. + 1. Let _a_ be the one character in CharSet _charSet_. + 1. Let _b_ be the one character in CharSet _otherSet_. 1. Let _i_ be the character value of character _a_. 1. Let _j_ be the character value of character _b_. 1. Assert: _i_ ≤ _j_. @@ -38529,13 +38529,13 @@

    HasEitherUnicodeFlag ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): a Boolean

    - 1. If _rer_.[[Unicode]] is *true* or _rer_.[[UnicodeSets]] is *true*, return *true*. + 1. If _regexpRecord_.[[Unicode]] is *true* or _regexpRecord_.[[UnicodeSets]] is *true*, return *true*. 1. Return *false*.
    @@ -38543,7 +38543,7 @@

    WordCharacters ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): a CharSet

    @@ -38552,8 +38552,8 @@

    1. Let _basicWordChars_ be the CharSet containing every character in the ASCII word characters. - 1. Let _extraWordChars_ be the CharSet containing all characters _c_ such that _c_ is not in _basicWordChars_ but Canonicalize(_rer_, _c_) is in _basicWordChars_. - 1. Assert: _extraWordChars_ is empty unless HasEitherUnicodeFlag(_rer_) is *true* and _rer_.[[IgnoreCase]] is *true*. + 1. Let _extraWordChars_ be the CharSet containing all characters _c_ such that _c_ is not in _basicWordChars_ but Canonicalize(_regexpRecord_, _c_) is in _basicWordChars_. + 1. Assert: _extraWordChars_ is empty unless HasEitherUnicodeFlag(_regexpRecord_) is *true* and _regexpRecord_.[[IgnoreCase]] is *true*. 1. Return the union of _basicWordChars_ and _extraWordChars_.
    @@ -38561,7 +38561,7 @@

    AllCharacters ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): a CharSet

    @@ -38569,9 +38569,9 @@

    Returns the set of “all characters” according to the regular expression flags.

    - 1. If _rer_.[[UnicodeSets]] is *true* and _rer_.[[IgnoreCase]] is *true*, then + 1. If _regexpRecord_.[[UnicodeSets]] is *true* and _regexpRecord_.[[IgnoreCase]] is *true*, then 1. [declared="c"] Return the CharSet containing all Unicode code points _c_ that do not have a Simple Case Folding mapping (that is, scf(_c_)=_c_). - 1. If HasEitherUnicodeFlag(_rer_) is *true*, then + 1. If HasEitherUnicodeFlag(_regexpRecord_) is *true*, then 1. Return the CharSet containing all code point values. 1. Return the CharSet containing all code unit values. @@ -38580,52 +38580,52 @@

    MaybeSimpleCaseFolding ( - _rer_: a RegExp Record, - _A_: a CharSet, + _regexpRecord_: a RegExp Record, + _charSet_: a CharSet, ): a CharSet

    description
    -
    If _rer_.[[UnicodeSets]] is *false* or _rer_.[[IgnoreCase]] is *false*, it returns _A_. 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 _A_ 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(_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.
    - 1. If _rer_.[[UnicodeSets]] is *false* or _rer_.[[IgnoreCase]] is *false*, return _A_. - 1. Let _B_ be a new empty CharSet. - 1. For each CharSetElement _s_ of _A_, do + 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. Add _t_ to _B_. - 1. Return _B_. + 1. Add _t_ to _otherSet_. + 1. Return _otherSet_.

    CharacterComplement ( - _rer_: a RegExp Record, - _S_: a CharSet, + _regexpRecord_: a RegExp Record, + _complement_: a CharSet, ): a CharSet

    - 1. Let _A_ be AllCharacters(_rer_). - 1. Return the CharSet containing the CharSetElements of _A_ which are not also CharSetElements of _S_. + 1. Let _charSet_ be AllCharacters(_regexpRecord_). + 1. Return the CharSet containing the CharSetElements of _charSet_ which are not also CharSetElements of _complement_.

    UnicodeMatchProperty ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, _p_: ECMAScript source text, ): a Unicode property name

    - 1. If _rer_.[[UnicodeSets]] is *true* and _p_ is a Unicode property name listed in the “Property name” column of , then + 1. If _regexpRecord_.[[UnicodeSets]] is *true* and _p_ is a Unicode property name listed in the “Property name” column of , then 1. Return the List of Unicode code points _p_. 1. Assert: _p_ is a Unicode property name or property alias listed in the “Property name and aliases” column of or . 1. Let _c_ be the canonical property name of _p_ as given in the “Canonical property name” column of the corresponding row. @@ -38674,7 +38674,7 @@

    Runtime Semantics: CompileClassSetString ( - _rer_: a RegExp Record, + _regexpRecord_: a RegExp Record, ): a sequence of characters

    @@ -38686,14 +38686,14 @@

    ClassString :: NonEmptyClassString - 1. Return CompileClassSetString of |NonEmptyClassString| with argument _rer_. + 1. Return CompileClassSetString of |NonEmptyClassString| with argument _regexpRecord_. NonEmptyClassString :: ClassSetCharacter NonEmptyClassString? - 1. Let _cs_ be CompileToCharSet of |ClassSetCharacter| with argument _rer_. + 1. Let _cs_ be CompileToCharSet of |ClassSetCharacter| with argument _regexpRecord_. 1. Let _s1_ be the sequence of characters that is the single CharSetElement of _cs_. 1. If |NonEmptyClassString| is present, then - 1. Let _s2_ be CompileClassSetString of |NonEmptyClassString| with argument _rer_. + 1. Let _s2_ be CompileClassSetString of |NonEmptyClassString| with argument _regexpRecord_. 1. Return the concatenation of _s1_ and _s2_. 1. Return _s1_. @@ -38706,15 +38706,15 @@

    Abstract Operations for RegExp Creation

    RegExpCreate ( - _P_: an ECMAScript language value, - _F_: a String or *undefined*, + _pattern_: an ECMAScript language value, + _flags_: a String or *undefined*, ): either a normal completion containing an Object or a throw completion

    1. Let _obj_ be ! RegExpAlloc(%RegExp%). - 1. Return ? RegExpInitialize(_obj_, _P_, _F_). + 1. Return ? RegExpInitialize(_obj_, _pattern_, _flags_).
    @@ -38744,30 +38744,30 @@

    - 1. If _pattern_ is *undefined*, let _P_ be the empty String. - 1. Else, let _P_ be ? ToString(_pattern_). - 1. If _flags_ is *undefined*, let _F_ be the empty String. - 1. Else, let _F_ be ? ToString(_flags_). - 1. If _F_ contains any code unit other than *"d"*, *"g"*, *"i"*, *"m"*, *"s"*, *"u"*, *"v"*, or *"y"*, throw a *SyntaxError* exception. - 1. If _F_ contains any code unit more than once, throw a *SyntaxError* exception. - 1. If _F_ contains *"i"*, let _i_ be *true*; else let _i_ be *false*. - 1. If _F_ contains *"m"*, let _m_ be *true*; else let _m_ be *false*. - 1. If _F_ contains *"s"*, let _s_ be *true*; else let _s_ be *false*. - 1. If _F_ contains *"u"*, let _u_ be *true*; else let _u_ be *false*. - 1. If _F_ contains *"v"*, let _v_ be *true*; else let _v_ be *false*. + 1. If _pattern_ is *undefined*, set _pattern_ to the empty String. + 1. Else, set _pattern_ to ? ToString(_pattern_). + 1. If _flags_ is *undefined*, set _flags_ to the empty String. + 1. Else, set _flags_ to ? ToString(_flags_). + 1. If _flags_ contains any code unit other than *"d"*, *"g"*, *"i"*, *"m"*, *"s"*, *"u"*, *"v"*, or *"y"*, throw a *SyntaxError* exception. + 1. If _flags_ contains any code unit more than once, throw a *SyntaxError* exception. + 1. If _flags_ contains *"i"*, let _i_ be *true*; else let _i_ be *false*. + 1. If _flags_ contains *"m"*, let _m_ be *true*; else let _m_ be *false*. + 1. If _flags_ contains *"s"*, let _s_ be *true*; else let _s_ be *false*. + 1. If _flags_ contains *"u"*, let _u_ be *true*; else let _u_ be *false*. + 1. If _flags_ contains *"v"*, let _v_ be *true*; else let _v_ be *false*. 1. If _u_ is *true* or _v_ is *true*, then - 1. Let _patternText_ be StringToCodePoints(_P_). + 1. Let _patternText_ be StringToCodePoints(_pattern_). 1. Else, - 1. Let _patternText_ be the result of interpreting each of _P_'s 16-bit elements as a Unicode BMP code point. UTF-16 decoding is not applied to the elements. + 1. Let _patternText_ be the result of interpreting each of _pattern_'s 16-bit elements as a Unicode BMP code point. UTF-16 decoding is not applied to the elements. 1. Let _parseResult_ be ParsePattern(_patternText_, _u_, _v_). 1. If _parseResult_ is a non-empty List of *SyntaxError* objects, throw a *SyntaxError* exception. 1. Assert: _parseResult_ is a |Pattern| Parse Node. - 1. Set _obj_.[[OriginalSource]] to _P_. - 1. Set _obj_.[[OriginalFlags]] to _F_. + 1. Set _obj_.[[OriginalSource]] to _pattern_. + 1. Set _obj_.[[OriginalFlags]] to _flags_. 1. Let _capturingGroupsCount_ be CountLeftCapturingParensWithin(_parseResult_). - 1. Let _rer_ be the RegExp Record { [[IgnoreCase]]: _i_, [[Multiline]]: _m_, [[DotAll]]: _s_, [[Unicode]]: _u_, [[UnicodeSets]]: _v_, [[CapturingGroupsCount]]: _capturingGroupsCount_ }. - 1. Set _obj_.[[RegExpRecord]] to _rer_. - 1. Set _obj_.[[RegExpMatcher]] to CompilePattern of _parseResult_ with argument _rer_. + 1. Let _regexpRecord_ be the RegExp Record { [[IgnoreCase]]: _i_, [[Multiline]]: _m_, [[DotAll]]: _s_, [[Unicode]]: _u_, [[UnicodeSets]]: _v_, [[CapturingGroupsCount]]: _capturingGroupsCount_ }. + 1. Set _obj_.[[RegExpRecord]] to _regexpRecord_. + 1. Set _obj_.[[RegExpMatcher]] to CompilePattern of _parseResult_ with argument _regexpRecord_. 1. Perform ? Set(_obj_, *"lastIndex"*, *+0*𝔽, *true*). 1. Return _obj_. @@ -38812,32 +38812,28 @@

    The RegExp Constructor

    -

    RegExp ( _pattern_, _flags_ )

    +

    RegExp ( _patternOrRegexp_, _flags_ )

    This function performs the following steps when called:

    - 1. Let _patternIsRegExp_ be ? IsRegExp(_pattern_). + 1. Let _patternIsRegExp_ be ? IsRegExp(_patternOrRegexp_). 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(_pattern_, *"constructor"*). - 1. If SameValue(_newTarget_, _patternConstructor_) is *true*, return _pattern_. + 1. Let _patternConstructor_ be ? Get(_patternOrRegexp_, *"constructor"*). + 1. If SameValue(_newTarget_, _patternConstructor_) is *true*, return _patternOrRegexp_. 1. Else, 1. Let _newTarget_ be NewTarget. - 1. If _pattern_ is an Object and _pattern_ has a [[RegExpMatcher]] internal slot, then - 1. Let _P_ be _pattern_.[[OriginalSource]]. - 1. If _flags_ is *undefined*, let _F_ be _pattern_.[[OriginalFlags]]. - 1. Else, let _F_ be _flags_. + 1. If _patternOrRegexp_ is an Object and _patternOrRegexp_ has a [[RegExpMatcher]] internal slot, then + 1. Let _patternSource_ be _patternOrRegexp_.[[OriginalSource]]. + 1. If _flags_ is *undefined*, set _flags_ to _patternOrRegexp_.[[OriginalFlags]]. 1. Else if _patternIsRegExp_ is *true*, then - 1. Let _P_ be ? Get(_pattern_, *"source"*). + 1. Let _patternSource_ be ? Get(_patternOrRegexp_, *"source"*). 1. If _flags_ is *undefined*, then - 1. Let _F_ be ? Get(_pattern_, *"flags"*). - 1. Else, - 1. Let _F_ be _flags_. + 1. Set _flags_ to ? Get(_patternOrRegexp_, *"flags"*). 1. Else, - 1. Let _P_ be _pattern_. - 1. Let _F_ be _flags_. - 1. Let _O_ be ? RegExpAlloc(_newTarget_). - 1. Return ? RegExpInitialize(_O_, _P_, _F_). + 1. Let _patternSource_ be _patternOrRegexp_. + 1. Let _obj_ be ? RegExpAlloc(_newTarget_). + 1. Return ? RegExpInitialize(_obj_, _patternSource_, _flags_).

    If pattern is supplied using a |StringLiteral|, the usual escape sequence substitutions are performed before the String is processed by this function. If pattern must contain an escape sequence to be recognized by this function, any U+005C (REVERSE SOLIDUS) code points must be escaped within the |StringLiteral| to prevent them being removed when the contents of the |StringLiteral| are formed.

    @@ -38854,17 +38850,17 @@

    Properties of the RegExp Constructor

    -

    RegExp.escape ( _S_ )

    -

    This function returns a copy of _S_ in which characters that are potentially special in a regular expression |Pattern| have been replaced by equivalent escape sequences.

    +

    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.

    It performs the following steps when called:

    - 1. If _S_ is not a String, throw a *TypeError* exception. + 1. If _str_ is not a String, throw a *TypeError* exception. 1. Let _escaped_ be the empty String. - 1. Let _cpList_ be StringToCodePoints(_S_). + 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 _S_ 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. 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 _hex_ be Number::toString(𝔽(_numericValue_), 16). 1. Assert: The length of _hex_ is 2. @@ -38953,10 +38949,10 @@

    RegExp.prototype.exec ( _string_ )

    This method searches _string_ for an occurrence of the regular expression pattern and returns an Array containing the results of the match, or *null* if _string_ did not match.

    It performs the following steps when called:

    - 1. Let _R_ be the *this* value. - 1. Perform ? RequireInternalSlot(_R_, [[RegExpMatcher]]). - 1. Let _S_ be ? ToString(_string_). - 1. Return ? RegExpBuiltinExec(_R_, _S_). + 1. Let _regexp_ be the *this* value. + 1. Perform ? RequireInternalSlot(_regexp_, [[RegExpMatcher]]). + 1. Let _str_ be ? ToString(_string_). + 1. Return ? RegExpBuiltinExec(_regexp_, _str_).
    @@ -38964,9 +38960,9 @@

    RegExp.prototype.exec ( _string_ )

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x0073 (LATIN SMALL LETTER S). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_).
    @@ -38974,24 +38970,24 @@

    get RegExp.prototype.dotAll

    get RegExp.prototype.flags

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

    - 1. Let _R_ be the *this* value. - 1. If _R_ is not an Object, throw a *TypeError* exception. + 1. Let _regexp_ be the *this* value. + 1. If _regexp_ is not an Object, throw a *TypeError* exception. 1. Let _codeUnits_ be a new empty List. - 1. Let _hasIndices_ be ToBoolean(? Get(_R_, *"hasIndices"*)). + 1. Let _hasIndices_ be ToBoolean(? Get(_regexp_, *"hasIndices"*)). 1. If _hasIndices_ is *true*, append the code unit 0x0064 (LATIN SMALL LETTER D) to _codeUnits_. - 1. Let _global_ be ToBoolean(? Get(_R_, *"global"*)). + 1. Let _global_ be ToBoolean(? Get(_regexp_, *"global"*)). 1. If _global_ is *true*, append the code unit 0x0067 (LATIN SMALL LETTER G) to _codeUnits_. - 1. Let _ignoreCase_ be ToBoolean(? Get(_R_, *"ignoreCase"*)). + 1. Let _ignoreCase_ be ToBoolean(? Get(_regexp_, *"ignoreCase"*)). 1. If _ignoreCase_ is *true*, append the code unit 0x0069 (LATIN SMALL LETTER I) to _codeUnits_. - 1. Let _multiline_ be ToBoolean(? Get(_R_, *"multiline"*)). + 1. Let _multiline_ be ToBoolean(? Get(_regexp_, *"multiline"*)). 1. If _multiline_ is *true*, append the code unit 0x006D (LATIN SMALL LETTER M) to _codeUnits_. - 1. Let _dotAll_ be ToBoolean(? Get(_R_, *"dotAll"*)). + 1. Let _dotAll_ be ToBoolean(? Get(_regexp_, *"dotAll"*)). 1. If _dotAll_ is *true*, append the code unit 0x0073 (LATIN SMALL LETTER S) to _codeUnits_. - 1. Let _unicode_ be ToBoolean(? Get(_R_, *"unicode"*)). + 1. Let _unicode_ be ToBoolean(? Get(_regexp_, *"unicode"*)). 1. If _unicode_ is *true*, append the code unit 0x0075 (LATIN SMALL LETTER U) to _codeUnits_. - 1. Let _unicodeSets_ be ToBoolean(? Get(_R_, *"unicodeSets"*)). + 1. Let _unicodeSets_ be ToBoolean(? Get(_regexp_, *"unicodeSets"*)). 1. If _unicodeSets_ is *true*, append the code unit 0x0076 (LATIN SMALL LETTER V) to _codeUnits_. - 1. Let _sticky_ be ToBoolean(? Get(_R_, *"sticky"*)). + 1. Let _sticky_ be ToBoolean(? Get(_regexp_, *"sticky"*)). 1. If _sticky_ is *true*, append the code unit 0x0079 (LATIN SMALL LETTER Y) to _codeUnits_. 1. Return the String value whose code units are the elements of the List _codeUnits_. If _codeUnits_ has no elements, the empty String is returned. @@ -38999,18 +38995,18 @@

    get RegExp.prototype.flags

    RegExpHasFlag ( - _R_: an ECMAScript language value, + _regexp_: an ECMAScript language value, _codeUnit_: a code unit, ): either a normal completion containing either a Boolean or *undefined*, or a throw completion

    - 1. If _R_ is not an Object, throw a *TypeError* exception. - 1. If _R_ does not have an [[OriginalFlags]] internal slot, then - 1. If SameValue(_R_, %RegExp.prototype%) is *true*, return *undefined*. + 1. If _regexp_ is not an Object, throw a *TypeError* exception. + 1. If _regexp_ does not have an [[OriginalFlags]] internal slot, then + 1. If SameValue(_regexp_, %RegExp.prototype%) is *true*, return *undefined*. 1. Throw a *TypeError* exception. - 1. Let _flags_ be _R_.[[OriginalFlags]]. + 1. Let _flags_ be _regexp_.[[OriginalFlags]]. 1. If _flags_ contains _codeUnit_, return *true*. 1. Return *false*. @@ -39021,9 +39017,9 @@

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x0067 (LATIN SMALL LETTER G). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_).
    @@ -39031,9 +39027,9 @@

    get RegExp.prototype.global

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x0064 (LATIN SMALL LETTER D). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_). @@ -39041,9 +39037,9 @@

    get RegExp.prototype.hasIndices

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x0069 (LATIN SMALL LETTER I). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_). @@ -39051,27 +39047,27 @@

    get RegExp.prototype.ignoreCase

    RegExp.prototype [ %Symbol.match% ] ( _string_ )

    This method performs the following steps when called:

    - 1. Let _rx_ be the *this* value. - 1. If _rx_ is not an Object, throw a *TypeError* exception. - 1. Let _S_ be ? ToString(_string_). - 1. Let _flags_ be ? ToString(? Get(_rx_, *"flags"*)). - 1. If _flags_ does not contain *"g"*, return ? RegExpExec(_rx_, _S_). + 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 _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). + 1. If _flags_ does not contain *"g"*, return ? RegExpExec(_regexp_, _str_). 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; else let _fullUnicode_ be *false*. - 1. Perform ? Set(_rx_, *"lastIndex"*, *+0*𝔽, *true*). - 1. Let _A_ be ! ArrayCreate(0). - 1. Let _n_ be 0. + 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(_rx_, _S_). + 1. Let _result_ be ? RegExpExec(_regexp_, _str_). 1. If _result_ is *null*, then - 1. If _n_ = 0, return *null*. - 1. Return _A_. + 1. If _matchCount_ = 0, return *null*. + 1. Return _array_. 1. Let _matchStr_ be ? ToString(? Get(_result_, *"0"*)). - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_n_)), _matchStr_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_matchCount_)), _matchStr_). 1. If _matchStr_ is the empty String, then - 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_rx_, *"lastIndex"*))). - 1. Let _nextIndex_ be AdvanceStringIndex(_S_, _thisIndex_, _fullUnicode_). - 1. Perform ? Set(_rx_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). - 1. Set _n_ to _n_ + 1. + 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_regexp_, *"lastIndex"*))). + 1. Let _nextIndex_ be AdvanceStringIndex(_str_, _thisIndex_, _fullUnicode_). + 1. Perform ? Set(_regexp_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). + 1. Set _matchCount_ to _matchCount_ + 1.

    The value of the *"name"* property of this method is *"[Symbol.match]"*.

    @@ -39083,19 +39079,19 @@

    RegExp.prototype [ %Symbol.match% ] ( _string_ )

    RegExp.prototype [ %Symbol.matchAll% ] ( _string_ )

    This method performs the following steps when called:

    - 1. Let _R_ be the *this* value. - 1. If _R_ is not an Object, throw a *TypeError* exception. - 1. Let _S_ be ? ToString(_string_). - 1. Let _C_ be ? SpeciesConstructor(_R_, %RegExp%). - 1. Let _flags_ be ? ToString(? Get(_R_, *"flags"*)). - 1. Let _matcher_ be ? Construct(_C_, « _R_, _flags_ »). - 1. Let _lastIndex_ be ? ToLength(? Get(_R_, *"lastIndex"*)). + 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. Let _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). + 1. Let _matcher_ be ? Construct(_speciesConstructor_, « _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_, _S_, _global_, _fullUnicode_). + 1. Return CreateRegExpStringIterator(_matcher_, _str_, _global_, _fullUnicode_).

    The value of the *"name"* property of this method is *"[Symbol.matchAll]"*.

    @@ -39104,9 +39100,9 @@

    RegExp.prototype [ %Symbol.matchAll% ] ( _string_ )

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x006D (LATIN SMALL LETTER M). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_). @@ -39114,21 +39110,21 @@

    get RegExp.prototype.multiline

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    This method performs the following steps when called:

    - 1. Let _rx_ be the *this* value. - 1. If _rx_ is not an Object, throw a *TypeError* exception. - 1. Let _S_ be ? ToString(_string_). - 1. Let _lengthS_ be the length of _S_. + 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 _replaceValue_ to ? ToString(_replaceValue_). - 1. Let _flags_ be ? ToString(? Get(_rx_, *"flags"*)). + 1. Let _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). 1. If _flags_ contains *"g"*, let _global_ be *true*; else let _global_ be *false*. 1. If _global_ is *true*, then - 1. Perform ? Set(_rx_, *"lastIndex"*, *+0*𝔽, *true*). + 1. Perform ? Set(_regexp_, *"lastIndex"*, *+0*𝔽, *true*). 1. Let _results_ be a new empty List. 1. Let _done_ be *false*. 1. Repeat, while _done_ is *false*, - 1. Let _result_ be ? RegExpExec(_rx_, _S_). + 1. Let _result_ be ? RegExpExec(_regexp_, _str_). 1. If _result_ is *null*, then 1. Set _done_ to *true*. 1. Else, @@ -39138,10 +39134,10 @@

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    1. Else, 1. Let _matchStr_ be ? ToString(? Get(_result_, *"0"*)). 1. If _matchStr_ is the empty String, then - 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_rx_, *"lastIndex"*))). + 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(_S_, _thisIndex_, _fullUnicode_). - 1. Perform ? Set(_rx_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). + 1. Let _nextIndex_ be AdvanceStringIndex(_str_, _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 @@ -39152,17 +39148,17 @@

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    1. Let _position_ be ? ToIntegerOrInfinity(? Get(_result_, *"index"*)). 1. Set _position_ to the result of clamping _position_ between 0 and _lengthS_. 1. Let _captures_ be a new empty List. - 1. Let _n_ be 1. - 1. Repeat, while _n_ ≤ _nCaptures_, - 1. Let _capN_ be ? Get(_result_, ! ToString(𝔽(_n_))). + 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. NOTE: When _n_ = 1, the preceding step puts the first element into _captures_ (at index 0). More generally, the _n_th capture (the characters captured by the _n_th set of capturing parentheses) is at _captures_[_n_ - 1]. - 1. Set _n_ to _n_ + 1. + 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_), _S_ ». + 1. Let _replacerArgs_ be the list-concatenation of « _matched_ », _captures_, and « 𝔽(_position_), _str_ ». 1. If _namedCaptures_ is not *undefined*, then 1. Append _namedCaptures_ to _replacerArgs_. 1. Let _replacementValue_ be ? Call(_replaceValue_, *undefined*, _replacerArgs_). @@ -39170,13 +39166,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_, _S_, _position_, _captures_, _namedCaptures_, _replaceValue_). + 1. Let _replacementString_ be ? GetSubstitution(_matched_, _str_, _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 _rx_. In such cases, the corresponding substitution is ignored. - 1. Set _accumulatedResult_ to the string-concatenation of _accumulatedResult_, the substring of _S_ from _nextSourcePosition_ to _position_, and _replacementString_. + 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 _nextSourcePosition_ to _position_ + _matchLength_. 1. If _nextSourcePosition_ ≥ _lengthS_, return _accumulatedResult_. - 1. Return the string-concatenation of _accumulatedResult_ and the substring of _S_ from _nextSourcePosition_. + 1. Return the string-concatenation of _accumulatedResult_ and the substring of _str_ from _nextSourcePosition_.

    The value of the *"name"* property of this method is *"[Symbol.replace]"*.

    @@ -39185,16 +39181,16 @@

    RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

    RegExp.prototype [ %Symbol.search% ] ( _string_ )

    This method performs the following steps when called:

    - 1. Let _rx_ be the *this* value. - 1. If _rx_ is not an Object, throw a *TypeError* exception. - 1. Let _S_ be ? ToString(_string_). - 1. Let _previousLastIndex_ be ? Get(_rx_, *"lastIndex"*). + 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 _previousLastIndex_ be ? Get(_regexp_, *"lastIndex"*). 1. If _previousLastIndex_ is not *+0*𝔽, then - 1. Perform ? Set(_rx_, *"lastIndex"*, *+0*𝔽, *true*). - 1. Let _result_ be ? RegExpExec(_rx_, _S_). - 1. Let _currentLastIndex_ be ? Get(_rx_, *"lastIndex"*). + 1. Perform ? Set(_regexp_, *"lastIndex"*, *+0*𝔽, *true*). + 1. Let _result_ be ? RegExpExec(_regexp_, _str_). + 1. Let _currentLastIndex_ be ? Get(_regexp_, *"lastIndex"*). 1. If SameValue(_currentLastIndex_, _previousLastIndex_) is *false*, then - 1. Perform ? Set(_rx_, *"lastIndex"*, _previousLastIndex_, *true*). + 1. Perform ? Set(_regexp_, *"lastIndex"*, _previousLastIndex_, *true*). 1. If _result_ is *null*, return *-1*𝔽. 1. Return ? Get(_result_, *"index"*). @@ -39208,36 +39204,36 @@

    RegExp.prototype [ %Symbol.search% ] ( _string_ )

    get RegExp.prototype.source

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

    - 1. Let _R_ be the *this* value. - 1. If _R_ is not an Object, throw a *TypeError* exception. - 1. If _R_ does not have an [[OriginalSource]] internal slot, then - 1. If SameValue(_R_, %RegExp.prototype%) is *true*, return *"(?:)"*. + 1. Let _regexp_ be the *this* value. + 1. If _regexp_ is not an Object, throw a *TypeError* exception. + 1. If _regexp_ does not have an [[OriginalSource]] internal slot, then + 1. If SameValue(_regexp_, %RegExp.prototype%) is *true*, return *"(?:)"*. 1. Throw a *TypeError* exception. - 1. Assert: _R_ has an [[OriginalFlags]] internal slot. - 1. Let _src_ be _R_.[[OriginalSource]]. - 1. Let _flags_ be _R_.[[OriginalFlags]]. + 1. Assert: _regexp_ has an [[OriginalFlags]] internal slot. + 1. Let _src_ be _regexp_.[[OriginalSource]]. + 1. Let _flags_ be _regexp_.[[OriginalFlags]]. 1. Return EscapeRegExpPattern(_src_, _flags_).

    EscapeRegExpPattern ( - _P_: a String, - _F_: a String, + _pattern_: a String, + _flags_: a String, ): a String

    - 1. If _F_ contains *"v"*, then + 1. If _flags_ contains *"v"*, then 1. Let _patternSymbol_ be |Pattern[+UnicodeMode, +UnicodeSetsMode]|. - 1. Else if _F_ contains *"u"*, then + 1. Else if _flags_ contains *"u"*, then 1. Let _patternSymbol_ be |Pattern[+UnicodeMode, ~UnicodeSetsMode]|. 1. Else, 1. Let _patternSymbol_ be |Pattern[~UnicodeMode, ~UnicodeSetsMode]|. - 1. Let _S_ be a String in the form of a _patternSymbol_ equivalent to _P_ interpreted as UTF-16 encoded Unicode code points (), in which certain code points are escaped as described below. _S_ may or may not differ from _P_; however, the Abstract Closure that would result from evaluating _S_ as a _patternSymbol_ must behave identically to the Abstract Closure given by the constructed object's [[RegExpMatcher]] internal slot. Multiple calls to this abstract operation using the same values for _P_ and _F_ must produce identical results. - 1. The code points `/` or any |LineTerminator| occurring in the pattern shall be escaped in _S_ as necessary to ensure that the string-concatenation of *"/"*, _S_, *"/"*, and _F_ can be parsed (in an appropriate lexical context) as a |RegularExpressionLiteral| that behaves identically to the constructed regular expression. For example, if _P_ is *"/"*, then _S_ could be *"\\/"* or *"\\u002F"*, among other possibilities, but not *"/"*, because `///` followed by _F_ would be parsed as a |SingleLineComment| rather than a |RegularExpressionLiteral|. If _P_ is the empty String, this specification can be met by letting _S_ be *"(?:)"*. - 1. Return _S_. + 1. Let _escapedPattern_ be a String in the form of a _patternSymbol_ equivalent to _pattern_ interpreted as UTF-16 encoded Unicode code points (), in which certain code points are escaped as described below. _escapedPattern_ may or may not differ from _pattern_; however, the Abstract Closure that would result from evaluating _escapedPattern_ as a _patternSymbol_ must behave identically to the Abstract Closure given by the constructed object's [[RegExpMatcher]] internal slot. Multiple calls to this abstract operation using the same values for _pattern_ and _flags_ must produce identical results. + 1. The code points `/` or any |LineTerminator| occurring in the pattern shall be escaped in _escapedPattern_ as necessary to ensure that the string-concatenation of *"/"*, _escapedPattern_, *"/"*, and _flags_ can be parsed (in an appropriate lexical context) as a |RegularExpressionLiteral| that behaves identically to the constructed regular expression. For example, if _pattern_ is *"/"*, then _escapedPattern_ could be *"\\/"* or *"\\u002F"*, among other possibilities, but not *"/"*, because `///` followed by _flags_ would be parsed as a |SingleLineComment| rather than a |RegularExpressionLiteral|. If _pattern_ is the empty String, this specification can be met by letting _escapedPattern_ be *"(?:)"*. + 1. Return _escapedPattern_. @@ -39260,57 +39256,57 @@

    RegExp.prototype [ %Symbol.split% ] ( _string_, _limit_ )

    This method performs the following steps when called:

    - 1. Let _rx_ be the *this* value. - 1. If _rx_ is not an Object, throw a *TypeError* exception. - 1. Let _S_ be ? ToString(_string_). - 1. Let _C_ be ? SpeciesConstructor(_rx_, %RegExp%). - 1. Let _flags_ be ? ToString(? Get(_rx_, *"flags"*)). + 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. 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(_C_, « _rx_, _newFlags_ »). - 1. Let _A_ be ! ArrayCreate(0). + 1. Let _splitter_ be ? Construct(_speciesConstructor_, « _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 _A_. - 1. If _S_ is the empty String, then - 1. Let _z_ be ? RegExpExec(_splitter_, _S_). - 1. If _z_ is not *null*, return _A_. - 1. Perform ! CreateDataPropertyOrThrow(_A_, *"0"*, _S_). - 1. Return _A_. - 1. Let _size_ be the length of _S_. - 1. Let _p_ be 0. - 1. Let _q_ be _p_. - 1. Repeat, while _q_ < _size_, - 1. Perform ? Set(_splitter_, *"lastIndex"*, 𝔽(_q_), *true*). - 1. Let _z_ be ? RegExpExec(_splitter_, _S_). - 1. If _z_ is *null*, then - 1. Set _q_ to AdvanceStringIndex(_S_, _q_, _unicodeMatching_). + 1. If _lim_ = 0, return _array_. + 1. If _str_ is the empty String, then + 1. Let _matchResult_ be ? RegExpExec(_splitter_, _str_). + 1. If _matchResult_ is not *null*, return _array_. + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _str_). + 1. Return _array_. + 1. Let _size_ be the length of _str_. + 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. If _matchResult_ is *null*, then + 1. Set _searchIndex_ to AdvanceStringIndex(_str_, _searchIndex_, _unicodeMatching_). 1. Else, - 1. Let _e_ be ℝ(? ToLength(? Get(_splitter_, *"lastIndex"*))). - 1. Set _e_ to min(_e_, _size_). - 1. If _e_ = _p_, then - 1. Set _q_ to AdvanceStringIndex(_S_, _q_, _unicodeMatching_). + 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. Else, - 1. Let _T_ be the substring of _S_ from _p_ to _q_. - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_lengthA_)), _T_). + 1. Let _substring_ be the substring of _str_ from _lastMatchEnd_ to _searchIndex_. + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_lengthA_)), _substring_). 1. Set _lengthA_ to _lengthA_ + 1. - 1. If _lengthA_ = _lim_, return _A_. - 1. Set _p_ to _e_. - 1. Let _numberOfCaptures_ be ? LengthOfArrayLike(_z_). + 1. If _lengthA_ = _lim_, return _array_. + 1. Set _lastMatchEnd_ to _matchEnd_. + 1. Let _numberOfCaptures_ be ? LengthOfArrayLike(_matchResult_). 1. Set _numberOfCaptures_ to max(_numberOfCaptures_ - 1, 0). - 1. Let _i_ be 1. - 1. Repeat, while _i_ ≤ _numberOfCaptures_, - 1. Let _nextCapture_ be ? Get(_z_, ! ToString(𝔽(_i_))). - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_lengthA_)), _nextCapture_). - 1. Set _i_ to _i_ + 1. + 1. Let _captureIndex_ be 1. + 1. Repeat, while _captureIndex_ ≤ _numberOfCaptures_, + 1. Let _nextCapture_ be ? Get(_matchResult_, ! ToString(𝔽(_captureIndex_))). + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_lengthA_)), _nextCapture_). + 1. Set _captureIndex_ to _captureIndex_ + 1. 1. Set _lengthA_ to _lengthA_ + 1. - 1. If _lengthA_ = _lim_, return _A_. - 1. Set _q_ to _p_. - 1. Let _T_ be the substring of _S_ from _p_ to _size_. - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_lengthA_)), _T_). - 1. Return _A_. + 1. If _lengthA_ = _lim_, return _array_. + 1. Set _searchIndex_ to _lastMatchEnd_. + 1. Let _substring_ be the substring of _str_ from _lastMatchEnd_ to _size_. + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_lengthA_)), _substring_). + 1. Return _array_.

    The value of the *"name"* property of this method is *"[Symbol.split]"*.

    @@ -39322,20 +39318,20 @@

    RegExp.prototype [ %Symbol.split% ] ( _string_, _limit_ )

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x0079 (LATIN SMALL LETTER Y). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_).
    -

    RegExp.prototype.test ( _S_ )

    +

    RegExp.prototype.test ( _str_ )

    This method performs the following steps when called:

    - 1. Let _R_ be the *this* value. - 1. If _R_ is not an Object, throw a *TypeError* exception. - 1. Let _string_ be ? ToString(_S_). - 1. Let _match_ be ? RegExpExec(_R_, _string_). + 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. Let _match_ be ? RegExpExec(_regexp_, _string_). 1. If _match_ is *null*, return *false*. 1. Return *true*. @@ -39344,10 +39340,10 @@

    RegExp.prototype.test ( _S_ )

    RegExp.prototype.toString ( )

    - 1. Let _R_ be the *this* value. - 1. If _R_ is not an Object, throw a *TypeError* exception. - 1. Let _pattern_ be ? ToString(? Get(_R_, *"source"*)). - 1. Let _flags_ be ? ToString(? Get(_R_, *"flags"*)). + 1. Let _regexp_ be the *this* value. + 1. If _regexp_ is not an Object, throw a *TypeError* exception. + 1. Let _pattern_ be ? ToString(? Get(_regexp_, *"source"*)). + 1. Let _flags_ be ? ToString(? Get(_regexp_, *"flags"*)). 1. Let _result_ be the string-concatenation of *"/"*, _pattern_, *"/"*, and _flags_. 1. Return _result_. @@ -39360,9 +39356,9 @@

    RegExp.prototype.toString ( )

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x0075 (LATIN SMALL LETTER U). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_).
    @@ -39370,9 +39366,9 @@

    get RegExp.prototype.unicode

    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 _R_ be the *this* value. + 1. Let _regexp_ be the *this* value. 1. Let _cu_ be the code unit 0x0076 (LATIN SMALL LETTER V). - 1. Return ? RegExpHasFlag(_R_, _cu_). + 1. Return ? RegExpHasFlag(_regexp_, _cu_).
    @@ -39383,20 +39379,20 @@

    Abstract Operations for RegExp Matching

    RegExpExec ( - _R_: an Object, - _S_: a String, + _regexp_: an Object, + _str_: a String, ): either a normal completion containing either an Object or *null*, or a throw completion

    - 1. Let _exec_ be ? Get(_R_, *"exec"*). + 1. Let _exec_ be ? Get(_regexp_, *"exec"*). 1. If IsCallable(_exec_) is *true*, then - 1. Let _result_ be ? Call(_exec_, _R_, « _S_ »). + 1. Let _result_ be ? Call(_exec_, _regexp_, « _str_ »). 1. If _result_ is not an Object and _result_ is not *null*, throw a *TypeError* exception. 1. Return _result_. - 1. Perform ? RequireInternalSlot(_R_, [[RegExpMatcher]]). - 1. Return ? RegExpBuiltinExec(_R_, _S_). + 1. Perform ? RequireInternalSlot(_regexp_, [[RegExpMatcher]]). + 1. Return ? RegExpBuiltinExec(_regexp_, _str_).

    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"*.

    @@ -39406,64 +39402,64 @@

    RegExpBuiltinExec ( - _R_: an initialized RegExp instance, - _S_: a String, + _regexp_: an initialized RegExp instance, + _str_: 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 _S_. - 1. Let _lastIndex_ be ℝ(? ToLength(! Get(_R_, *"lastIndex"*))). - 1. Let _flags_ be _R_.[[OriginalFlags]]. + 1. Let _length_ be the length of _str_. + 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*. 1. If _flags_ contains *"y"*, let _sticky_ be *true*; else let _sticky_ be *false*. 1. If _flags_ contains *"d"*, let _hasIndices_ be *true*; else let _hasIndices_ be *false*. 1. If _global_ is *false* and _sticky_ is *false*, set _lastIndex_ to 0. - 1. Let _matcher_ be _R_.[[RegExpMatcher]]. + 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(_S_); else let _input_ be a List whose elements are the code units that are the elements of _S_. + 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. 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(_R_, *"lastIndex"*, *+0*𝔽, *true*). + 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 _S_. + 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. If _sticky_ is *true*, then - 1. Perform ? Set(_R_, *"lastIndex"*, *+0*𝔽, *true*). + 1. Perform ? Set(_regexp_, *"lastIndex"*, *+0*𝔽, *true*). 1. Return *null*. - 1. Set _lastIndex_ to AdvanceStringIndex(_S_, _lastIndex_, _fullUnicode_). + 1. Set _lastIndex_ to AdvanceStringIndex(_str_, _lastIndex_, _fullUnicode_). 1. Else, 1. Assert: _r_ is a MatchState. 1. Set _matchSucceeded_ to *true*. - 1. Let _e_ be _r_.[[EndIndex]]. - 1. If _fullUnicode_ is *true*, set _e_ to GetStringIndex(_S_, _e_). + 1. Let _endIndex_ be _r_.[[EndIndex]]. + 1. If _fullUnicode_ is *true*, set _endIndex_ to GetStringIndex(_str_, _endIndex_). 1. If _global_ is *true* or _sticky_ is *true*, then - 1. Perform ? Set(_R_, *"lastIndex"*, 𝔽(_e_), *true*). + 1. Perform ? Set(_regexp_, *"lastIndex"*, 𝔽(_endIndex_), *true*). 1. Let _n_ be the number of elements in _r_.[[Captures]]. - 1. Assert: _n_ = _R_.[[RegExpRecord]].[[CapturingGroupsCount]]. + 1. Assert: _n_ = _regexp_.[[RegExpRecord]].[[CapturingGroupsCount]]. 1. Assert: _n_ < 232 - 1. - 1. Let _A_ be ! ArrayCreate(_n_ + 1). - 1. Assert: The mathematical value of _A_'s *"length"* property is _n_ + 1. - 1. Perform ! CreateDataPropertyOrThrow(_A_, *"index"*, 𝔽(_lastIndex_)). - 1. Perform ! CreateDataPropertyOrThrow(_A_, *"input"*, _S_). - 1. Let _match_ be the Match Record { [[StartIndex]]: _lastIndex_, [[EndIndex]]: _e_ }. + 1. Let _array_ be ! ArrayCreate(_n_ + 1). + 1. Assert: The mathematical value of _array_'s *"length"* property is _n_ + 1. + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"index"*, 𝔽(_lastIndex_)). + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"input"*, _str_). + 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(_S_, _match_). - 1. Perform ! CreateDataPropertyOrThrow(_A_, *"0"*, _matchedSubstr_). - 1. If _R_ contains any |GroupName|, then + 1. Let _matchedSubstr_ be GetMatchString(_str_, _match_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"0"*, _matchedSubstr_). + 1. If _regexp_ contains any |GroupName|, then 1. Let _groups_ be OrdinaryObjectCreate(*null*). 1. Let _hasGroups_ be *true*. 1. Else, 1. Let _groups_ be *undefined*. 1. Let _hasGroups_ be *false*. - 1. Perform ! CreateDataPropertyOrThrow(_A_, *"groups"*, _groups_). + 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]]. @@ -39474,13 +39470,13 @@

    1. Let _captureStart_ be _captureI_.[[StartIndex]]. 1. Let _captureEnd_ be _captureI_.[[EndIndex]]. 1. If _fullUnicode_ is *true*, then - 1. Set _captureStart_ to GetStringIndex(_S_, _captureStart_). - 1. Set _captureEnd_ to GetStringIndex(_S_, _captureEnd_). + 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(_S_, _capture_). + 1. Let _capturedValue_ be GetMatchString(_str_, _capture_). 1. Append _capture_ to _indices_. - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_i_)), _capturedValue_). - 1. If the _i_th capture of _R_ was defined with a |GroupName|, then + 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. Assert: _capturedValue_ is *undefined*. @@ -39493,16 +39489,16 @@

    1. Else, 1. Append *undefined* to _groupNames_. 1. If _hasIndices_ is *true*, then - 1. Let _indicesArray_ be MakeMatchIndicesIndexPairArray(_S_, _indices_, _groupNames_, _hasGroups_). - 1. Perform ! CreateDataPropertyOrThrow(_A_, *"indices"*, _indicesArray_). - 1. Return _A_. + 1. Let _indicesArray_ be MakeMatchIndicesIndexPairArray(_str_, _indices_, _groupNames_, _hasGroups_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"indices"*, _indicesArray_). + 1. Return _array_.

    AdvanceStringIndex ( - _S_: a String, + _str_: a String, _index_: a non-negative integer, _unicode_: a Boolean, ): an integer @@ -39512,9 +39508,9 @@

    1. Assert: _index_ ≤ 253 - 1. 1. If _unicode_ is *false*, return _index_ + 1. - 1. Let _length_ be the length of _S_. + 1. Let _length_ be the length of _str_. 1. If _index_ + 1 ≥ _length_, return _index_ + 1. - 1. Let _cp_ be CodePointAt(_S_, _index_). + 1. Let _cp_ be CodePointAt(_str_, _index_). 1. Return _index_ + _cp_.[[CodeUnitCount]]. @@ -39522,22 +39518,22 @@

    GetStringIndex ( - _S_: a String, + _str_: a String, _codePointIndex_: a non-negative integer, ): a non-negative integer

    description
    -
    It interprets _S_ 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 _S_.
    +
    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_.
    - 1. If _S_ is the empty String, return 0. - 1. Let _len_ be the length of _S_. + 1. If _str_ is the empty String, return 0. + 1. Let _len_ be the length of _str_. 1. Let _codeUnitCount_ be 0. 1. Let _codePointCount_ be 0. 1. Repeat, while _codeUnitCount_ < _len_, 1. If _codePointCount_ = _codePointIndex_, return _codeUnitCount_. - 1. Let _cp_ be CodePointAt(_S_, _codeUnitCount_). + 1. Let _cp_ be CodePointAt(_str_, _codeUnitCount_). 1. Set _codeUnitCount_ to _codeUnitCount_ + _cp_.[[CodeUnitCount]]. 1. Set _codePointCount_ to _codePointCount_ + 1. 1. Return _len_. @@ -39574,29 +39570,29 @@

    Match Records

    GetMatchString ( - _S_: a String, + _str_: a String, _match_: a Match Record, ): a String

    - 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _S_. - 1. Return the substring of _S_ from _match_.[[StartIndex]] to _match_.[[EndIndex]]. + 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _str_. + 1. Return the substring of _str_ from _match_.[[StartIndex]] to _match_.[[EndIndex]].

    GetMatchIndexPair ( - _S_: a String, + _str_: a String, _match_: a Match Record, ): an Array

    - 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _S_. + 1. Assert: _match_.[[StartIndex]] ≤ _match_.[[EndIndex]] ≤ the length of _str_. 1. Return CreateArrayFromList(« 𝔽(_match_.[[StartIndex]]), 𝔽(_match_.[[EndIndex]]) »).
    @@ -39604,7 +39600,7 @@

    MakeMatchIndicesIndexPairArray ( - _S_: a String, + _str_: a String, _indices_: a List of either Match Records or *undefined*, _groupNames_: a List of either Strings or *undefined*, _hasGroups_: a Boolean, @@ -39617,26 +39613,26 @@

    1. Assert: _n_ < 232 - 1. 1. Assert: _groupNames_ has _n_ - 1 elements. 1. NOTE: The _groupNames_ List contains elements aligned with the _indices_ List starting at _indices_[1]. - 1. Let _A_ be ! ArrayCreate(_n_). + 1. Let _array_ be ! ArrayCreate(_n_). 1. If _hasGroups_ is *true*, then 1. Let _groups_ be OrdinaryObjectCreate(*null*). 1. Else, 1. Let _groups_ be *undefined*. - 1. Perform ! CreateDataPropertyOrThrow(_A_, *"groups"*, _groups_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, *"groups"*, _groups_). 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(_S_, _matchIndices_). + 1. Let _matchIndexPair_ be GetMatchIndexPair(_str_, _matchIndices_). 1. Else, 1. Let _matchIndexPair_ be *undefined*. - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_i_)), _matchIndexPair_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_i_)), _matchIndexPair_). 1. If _i_ > 0, then - 1. Let _s_ be _groupNames_[_i_ - 1]. - 1. If _s_ is not *undefined*, then + 1. Let _name_ be _groupNames_[_i_ - 1]. + 1. If _name_ is not *undefined*, then 1. Assert: _groups_ is not *undefined*. - 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_, _matchIndexPair_). - 1. Return _A_. + 1. NOTE: If there are multiple groups named _name_, _groups_ may already have an _name_ 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_, _name_, _matchIndexPair_). + 1. Return _array_. @@ -39662,8 +39658,8 @@

    RegExp String Iterator Objects

    CreateRegExpStringIterator ( - _R_: an Object, - _S_: a String, + _regexp_: an Object, + _str_: a String, _global_: a Boolean, _fullUnicode_: a Boolean, ): an Object @@ -39672,8 +39668,8 @@

    1. Let _iterator_ be OrdinaryObjectCreate(%RegExpStringIteratorPrototype%, « [[IteratingRegExp]], [[IteratedString]], [[Global]], [[Unicode]], [[Done]] »). - 1. Set _iterator_.[[IteratingRegExp]] to _R_. - 1. Set _iterator_.[[IteratedString]] to _S_. + 1. Set _iterator_.[[IteratingRegExp]] to _regexp_. + 1. Set _iterator_.[[IteratedString]] to _str_. 1. Set _iterator_.[[Global]] to _global_. 1. Set _iterator_.[[Unicode]] to _fullUnicode_. 1. Set _iterator_.[[Done]] to *false*. @@ -39694,27 +39690,27 @@

    The %RegExpStringIteratorPrototype% Object

    %RegExpStringIteratorPrototype%.next ( )

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. If _O_ does not have all of the internal slots of a RegExp String Iterator Object Instance (see ), throw a *TypeError* exception. - 1. If _O_.[[Done]] is *true*, then + 1. Let _iteratorObj_ be the *this* value. + 1. If _iteratorObj_ is not an Object, throw a *TypeError* exception. + 1. If _iteratorObj_ does not have all of the internal slots of a RegExp String Iterator Object Instance (see ), throw a *TypeError* exception. + 1. If _iteratorObj_.[[Done]] is *true*, then 1. Return CreateIteratorResultObject(*undefined*, *true*). - 1. Let _R_ be _O_.[[IteratingRegExp]]. - 1. Let _S_ be _O_.[[IteratedString]]. - 1. Let _global_ be _O_.[[Global]]. - 1. Let _fullUnicode_ be _O_.[[Unicode]]. - 1. Let _match_ be ? RegExpExec(_R_, _S_). + 1. Let _regexp_ be _iteratorObj_.[[IteratingRegExp]]. + 1. Let _str_ be _iteratorObj_.[[IteratedString]]. + 1. Let _global_ be _iteratorObj_.[[Global]]. + 1. Let _fullUnicode_ be _iteratorObj_.[[Unicode]]. + 1. Let _match_ be ? RegExpExec(_regexp_, _str_). 1. If _match_ is *null*, then - 1. Set _O_.[[Done]] to *true*. + 1. Set _iteratorObj_.[[Done]] to *true*. 1. Return CreateIteratorResultObject(*undefined*, *true*). 1. If _global_ is *false*, then - 1. Set _O_.[[Done]] to *true*. + 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 _thisIndex_ be ℝ(? ToLength(? Get(_R_, *"lastIndex"*))). - 1. Let _nextIndex_ be AdvanceStringIndex(_S_, _thisIndex_, _fullUnicode_). - 1. Perform ? Set(_R_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). + 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_regexp_, *"lastIndex"*))). + 1. Let _nextIndex_ be AdvanceStringIndex(_str_, _thisIndex_, _fullUnicode_). + 1. Perform ? Set(_regexp_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). 1. Return CreateIteratorResultObject(_match_, *false*).
    @@ -39810,9 +39806,9 @@

    Array ( ..._values_ )

    1. Let _array_ be ? ArrayCreate(_numberOfArgs_, _proto_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _numberOfArgs_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _itemK_ be _values_[_k_]. - 1. Perform ! CreateDataPropertyOrThrow(_array_, _Pk_, _itemK_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, _propertyKey_, _itemK_). 1. Set _k_ to _k_ + 1. 1. Assert: The mathematical value of _array_'s *"length"* property is _numberOfArgs_. 1. Return _array_. @@ -39833,7 +39829,7 @@

    Properties of the Array Constructor

    Array.from ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    This function performs the following steps when called:

    - 1. Let _C_ be the *this* value. + 1. Let _constructor_ be the *this* value. 1. If _mapper_ is *undefined*, then 1. Let _mapping_ be *false*. 1. Else, @@ -39841,48 +39837,48 @@

    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(_C_) is *true*, then - 1. Let _A_ be ? Construct(_C_). + 1. If IsConstructor(_constructor_) is *true*, then + 1. Let _array_ be ? Construct(_constructor_). 1. Else, - 1. Let _A_ be ! ArrayCreate(0). + 1. Let _array_ be ! ArrayCreate(0). 1. Let _iteratorRecord_ be ? GetIteratorFromMethod(_items_, _usingIterator_). 1. Let _k_ be 0. 1. Repeat, 1. If _k_ ≥ 253 - 1, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iteratorRecord_, _error_). - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _next_ be ? IteratorStepValue(_iteratorRecord_). 1. If _next_ is ~done~, then - 1. Perform ? Set(_A_, *"length"*, 𝔽(_k_), *true*). - 1. Return _A_. + 1. Perform ? Set(_array_, *"length"*, 𝔽(_k_), *true*). + 1. Return _array_. 1. If _mapping_ is *true*, then 1. Let _mappedValue_ be Completion(Call(_mapper_, _thisArg_, « _next_, 𝔽(_k_) »)). 1. IfAbruptCloseIterator(_mappedValue_, _iteratorRecord_). 1. Else, 1. Let _mappedValue_ be _next_. - 1. Let _defineStatus_ be Completion(CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_)). + 1. Let _defineStatus_ be Completion(CreateDataPropertyOrThrow(_array_, _propertyKey_, _mappedValue_)). 1. IfAbruptCloseIterator(_defineStatus_, _iteratorRecord_). 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(_C_) is *true*, then - 1. Let _A_ be ? Construct(_C_, « 𝔽(_len_) »). + 1. If IsConstructor(_constructor_) is *true*, then + 1. Let _array_ be ? Construct(_constructor_, « 𝔽(_len_) »). 1. Else, - 1. Let _A_ be ? ArrayCreate(_len_). + 1. Let _array_ be ? ArrayCreate(_len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ? Get(_arrayLike_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). 1. If _mapping_ is *true*, then 1. Let _mappedValue_ be ? Call(_mapper_, _thisArg_, « _kValue_, 𝔽(_k_) »). 1. Else, 1. Let _mappedValue_ be _kValue_. - 1. Perform ? CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_). + 1. Perform ? CreateDataPropertyOrThrow(_array_, _propertyKey_, _mappedValue_). 1. Set _k_ to _k_ + 1. - 1. Perform ? Set(_A_, *"length"*, 𝔽(_len_), *true*). - 1. Return _A_. + 1. Perform ? Set(_array_, *"length"*, 𝔽(_len_), *true*). + 1. Return _array_.

    This method is an intentionally generic factory method; it does not require that its *this* value be the Array constructor. Therefore it can be transferred to or inherited by any other constructors that may be called with a single numeric argument.

    @@ -39894,7 +39890,7 @@

    Array.fromAsync ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    This async function performs the following steps when called:

    - 1. Let _C_ be the *this* value. + 1. Let _constructor_ 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. @@ -39908,23 +39904,23 @@

    Array.fromAsync ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. Else, 1. Set _iteratorRecord_ to ? GetIteratorFromMethod(_items_, _usingAsyncIterator_). 1. If _iteratorRecord_ is not *undefined*, then - 1. If IsConstructor(_C_) is *true*, then - 1. Let _A_ be ? Construct(_C_). + 1. If IsConstructor(_constructor_) is *true*, then + 1. Let _array_ be ? Construct(_constructor_). 1. Else, - 1. Let _A_ be ! ArrayCreate(0). + 1. Let _array_ be ! ArrayCreate(0). 1. Let _k_ be 0. 1. Repeat, 1. If _k_ ≥ 253 - 1, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? AsyncIteratorClose(_iteratorRecord_, _error_). - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _nextResult_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]]). 1. Set _nextResult_ to ? Await(_nextResult_). 1. If _nextResult_ is not an Object, throw a *TypeError* exception. 1. Let _done_ be ? IteratorComplete(_nextResult_). 1. If _done_ is *true*, then - 1. Perform ? Set(_A_, *"length"*, 𝔽(_k_), *true*). - 1. Return _A_. + 1. Perform ? Set(_array_, *"length"*, 𝔽(_k_), *true*). + 1. Return _array_. 1. Let _nextValue_ be ? IteratorValue(_nextResult_). 1. If _mapping_ is *true*, then 1. Let _mappedValue_ be Completion(Call(_mapper_, _thisArg_, « _nextValue_, 𝔽(_k_) »)). @@ -39933,31 +39929,31 @@

    Array.fromAsync ( _items_ [ , _mapper_ [ , _thisArg_ ] ] )

    1. IfAbruptCloseAsyncIterator(_mappedValue_, _iteratorRecord_). 1. Else, 1. Let _mappedValue_ be _nextValue_. - 1. Let _defineStatus_ be Completion(CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_)). + 1. Let _defineStatus_ be Completion(CreateDataPropertyOrThrow(_array_, _propertyKey_, _mappedValue_)). 1. IfAbruptCloseAsyncIterator(_defineStatus_, _iteratorRecord_). 1. Set _k_ to _k_ + 1. 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(_C_) is *true*, then - 1. Let _A_ be ? Construct(_C_, « 𝔽(_len_) »). + 1. If IsConstructor(_constructor_) is *true*, then + 1. Let _array_ be ? Construct(_constructor_, « 𝔽(_len_) »). 1. Else, - 1. Let _A_ be ? ArrayCreate(_len_). + 1. Let _array_ be ? ArrayCreate(_len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ? Get(_arrayLike_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). 1. Set _kValue_ to ? Await(_kValue_). 1. If _mapping_ is *true*, then 1. Let _mappedValue_ be ? Call(_mapper_, _thisArg_, « _kValue_, 𝔽(_k_) »). 1. Set _mappedValue_ to ? Await(_mappedValue_). 1. Else, 1. Let _mappedValue_ be _kValue_. - 1. Perform ? CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_). + 1. Perform ? CreateDataPropertyOrThrow(_array_, _propertyKey_, _mappedValue_). 1. Set _k_ to _k_ + 1. - 1. Perform ? Set(_A_, *"length"*, 𝔽(_len_), *true*). - 1. Return _A_. + 1. Perform ? Set(_array_, *"length"*, 𝔽(_len_), *true*). + 1. Return _array_.

    This method is an intentionally generic factory method; it does not require that its *this* value be the Array constructor. Therefore it can be transferred to or inherited by any other constructors that may be called with a single numeric argument.

    @@ -39978,19 +39974,19 @@

    Array.of ( ..._items_ )

    1. Let _len_ be the number of elements in _items_. 1. Let _lenNumber_ be 𝔽(_len_). - 1. Let _C_ be the *this* value. - 1. If IsConstructor(_C_) is *true*, then - 1. Let _A_ be ? Construct(_C_, « _lenNumber_ »). + 1. Let _constructor_ be the *this* value. + 1. If IsConstructor(_constructor_) is *true*, then + 1. Let _array_ be ? Construct(_constructor_, « _lenNumber_ »). 1. Else, - 1. Let _A_ be ? ArrayCreate(_len_). + 1. Let _array_ be ? ArrayCreate(_len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _kValue_ be _items_[_k_]. - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Perform ? CreateDataPropertyOrThrow(_A_, _Pk_, _kValue_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Perform ? CreateDataPropertyOrThrow(_array_, _propertyKey_, _kValue_). 1. Set _k_ to _k_ + 1. - 1. Perform ? Set(_A_, *"length"*, _lenNumber_, *true*). - 1. Return _A_. + 1. Perform ? Set(_array_, *"length"*, _lenNumber_, *true*). + 1. Return _array_.

    This method is an intentionally generic factory method; it does not require that its *this* value be the Array constructor. Therefore it can be transferred to or inherited by other constructors that may be called with a single numeric argument.

    @@ -40032,15 +40028,15 @@

    Properties of the Array Prototype Object

    Array.prototype.at ( _index_ )

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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. Return ? Get(_O_, ! ToString(𝔽(_k_))). + 1. Return ? Get(_obj_, ! ToString(𝔽(_k_))).
    @@ -40049,35 +40045,35 @@

    Array.prototype.concat ( ..._items_ )

    This method returns an array containing the array elements of the object followed by the array elements of each argument.

    It performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _A_ be ? ArraySpeciesCreate(_O_, 0). - 1. Let _n_ be 0. - 1. Prepend _O_ to _items_. - 1. For each element _E_ of _items_, do - 1. Let _spreadable_ be ? IsConcatSpreadable(_E_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _array_ be ? ArraySpeciesCreate(_obj_, 0). + 1. Let _nextIndex_ be 0. + 1. Prepend _obj_ to _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(_E_). - 1. If _n_ + _len_ > 253 - 1, throw a *TypeError* exception. - 1. Let _k_ be 0. - 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _exists_ be ? HasProperty(_E_, _Pk_). + 1. Let _len_ be ? LengthOfArrayLike(_item_). + 1. If _nextIndex_ + _len_ > 253 - 1, throw a *TypeError* exception. + 1. Let _sourceIndex_ be 0. + 1. Repeat, while _sourceIndex_ < _len_, + 1. Let _propertyKey_ be ! ToString(𝔽(_sourceIndex_)). + 1. Let _exists_ be ? HasProperty(_item_, _propertyKey_). 1. If _exists_ is *true*, then - 1. Let _subElement_ be ? Get(_E_, _Pk_). - 1. Perform ? CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_n_)), _subElement_). - 1. Set _n_ to _n_ + 1. - 1. Set _k_ to _k_ + 1. + 1. Let _subElement_ be ? Get(_item_, _propertyKey_). + 1. Perform ? CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_nextIndex_)), _subElement_). + 1. Set _nextIndex_ to _nextIndex_ + 1. + 1. Set _sourceIndex_ to _sourceIndex_ + 1. 1. Else, - 1. NOTE: _E_ is added as a single item rather than spread. - 1. If _n_ ≥ 253 - 1, throw a *TypeError* exception. - 1. Perform ? CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_n_)), _E_). - 1. Set _n_ to _n_ + 1. - 1. [id="step-array-proto-concat-set-length"] Perform ? Set(_A_, *"length"*, 𝔽(_n_), *true*). - 1. Return _A_. + 1. NOTE: _item_ is added as a single item rather than spread. + 1. If _nextIndex_ ≥ 253 - 1, throw a *TypeError* exception. + 1. Perform ? CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_nextIndex_)), _item_). + 1. Set _nextIndex_ to _nextIndex_ + 1. + 1. [id="step-array-proto-concat-set-length"] Perform ? Set(_array_, *"length"*, 𝔽(_nextIndex_), *true*). + 1. Return _array_.

    The *"length"* property of this method is *1*𝔽.

    -

    The explicit setting of the *"length"* property in step is intended to ensure the length is correct when the final non-empty element of _items_ has trailing holes or when _A_ is not a built-in Array.

    +

    The explicit setting of the *"length"* property in step is intended to ensure the length is correct when the final non-empty element of _items_ has trailing holes or when _array_ is not a built-in Array.

    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.

    @@ -40086,16 +40082,16 @@

    Array.prototype.concat ( ..._items_ )

    IsConcatSpreadable ( - _O_: an ECMAScript language value, + _obj_: an ECMAScript language value, ): either a normal completion containing a Boolean or a throw completion

    - 1. If _O_ is not an Object, return *false*. - 1. Let _spreadable_ be ? Get(_O_, %Symbol.isConcatSpreadable%). + 1. If _obj_ is not an Object, return *false*. + 1. Let _spreadable_ be ? Get(_obj_, %Symbol.isConcatSpreadable%). 1. If _spreadable_ is not *undefined*, return ToBoolean(_spreadable_). - 1. Return ? IsArray(_O_). + 1. Return ? IsArray(_obj_).
    @@ -40115,8 +40111,8 @@

    Array.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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). @@ -40139,17 +40135,17 @@

    Array.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

    1. Repeat, while _count_ > 0, 1. Let _fromKey_ be ! ToString(𝔽(_from_)). 1. Let _toKey_ be ! ToString(𝔽(_to_)). - 1. Let _fromPresent_ be ? HasProperty(_O_, _fromKey_). + 1. Let _fromPresent_ be ? HasProperty(_obj_, _fromKey_). 1. If _fromPresent_ is *true*, then - 1. Let _fromValue_ be ? Get(_O_, _fromKey_). - 1. Perform ? Set(_O_, _toKey_, _fromValue_, *true*). + 1. Let _fromValue_ be ? Get(_obj_, _fromKey_). + 1. Perform ? Set(_obj_, _toKey_, _fromValue_, *true*). 1. Else, 1. Assert: _fromPresent_ is *false*. - 1. Perform ? DeletePropertyOrThrow(_O_, _toKey_). + 1. Perform ? DeletePropertyOrThrow(_obj_, _toKey_). 1. Set _from_ to _from_ + _direction_. 1. Set _to_ to _to_ + _direction_. 1. Set _count_ to _count_ - 1. - 1. Return _O_. + 1. Return _obj_.

    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.

    @@ -40160,8 +40156,8 @@

    Array.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

    Array.prototype.entries ( )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Return CreateArrayIterator(_O_, ~key+value~). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Return CreateArrayIterator(_obj_, ~key+value~).
    @@ -40176,16 +40172,16 @@

    Array.prototype.every ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). 1. If _testResult_ is *false*, return *false*. 1. Set _k_ to _k_ + 1. 1. Return *true*. @@ -40206,8 +40202,8 @@

    Array.prototype.fill ( _value_ [ , _start_ [ , _end_ ] ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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). @@ -40217,10 +40213,10 @@

    Array.prototype.fill ( _value_ [ , _start_ [ , _end_ ] ] )

    1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Repeat, while _k_ < _final_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Perform ? Set(_O_, _Pk_, _value_, *true*). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Perform ? Set(_obj_, _propertyKey_, _value_, *true*). 1. Set _k_ to _k_ + 1. - 1. Return _O_. + 1. Return _obj_.

    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.

    @@ -40238,23 +40234,23 @@

    Array.prototype.filter ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. Let _A_ be ? ArraySpeciesCreate(_O_, 0). + 1. Let _array_ be ? ArraySpeciesCreate(_obj_, 0). 1. Let _k_ be 0. 1. Let _to_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _selected_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Let _selected_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). 1. If _selected_ is *true*, then - 1. Perform ? CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_to_)), _kValue_). + 1. Perform ? CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_to_)), _kValue_). 1. Set _to_ to _to_ + 1. 1. Set _k_ to _k_ + 1. - 1. Return _A_. + 1. Return _array_.

    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.

    @@ -40269,9 +40265,9 @@

    Array.prototype.find ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~ascending~, _predicate_, _thisArg_). + 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]]. @@ -40287,9 +40283,9 @@

    Array.prototype.findIndex ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~ascending~, _predicate_, _thisArg_). + 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]]. @@ -40305,9 +40301,9 @@

    Array.prototype.findLast ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~descending~, _predicate_, _thisArg_). + 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]]. @@ -40323,9 +40319,9 @@

    Array.prototype.findLastIndex ( _predicate_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _findRec_ be ? FindViaPredicate(_O_, _len_, ~descending~, _predicate_, _thisArg_). + 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]]. @@ -40335,7 +40331,7 @@

    Array.prototype.findLastIndex ( _predicate_ [ , _thisArg_ ] )

    FindViaPredicate ( - _O_: an Object, + _obj_: an Object, _len_: a non-negative integer, _direction_: ~ascending~ or ~descending~, _predicate_: an ECMAScript language value, @@ -40345,7 +40341,7 @@

    description
    -

    _O_ should be an array-like object or a TypedArray. This operation calls _predicate_ once for each element of _O_, in either ascending index order or descending index order (as indicated by _direction_), until it finds one where _predicate_ returns a value that coerces to *true*. At that point, this operation returns a Record that gives the index and value of the element found. If no such element is found, this operation returns a Record that specifies *-1*𝔽 for the index and *undefined* for the value.

    +

    _obj_ should be an array-like object or a TypedArray. This operation calls _predicate_ once for each element of _obj_, in either ascending index order or descending index order (as indicated by _direction_), until it finds one where _predicate_ returns a value that coerces to *true*. At that point, this operation returns a Record that gives the index and value of the element found. If no such element is found, this operation returns a Record that specifies *-1*𝔽 for the index and *undefined* for the value.

    _predicate_ should be a function. When called for an element of the array, it is passed three arguments: the value of the element, the index of the element, and the object being traversed. Its return value will be coerced to a Boolean value.

    _thisArg_ will be used as the *this* value for each invocation of _predicate_.

    This operation does not directly mutate the object on which it is called, but the object may be mutated by the calls to _predicate_.

    @@ -40359,10 +40355,10 @@

    1. Else, 1. Let _indices_ be a List of the integers in the interval from 0 (inclusive) to _len_ (exclusive), in descending order. 1. For each integer _k_ of _indices_, do - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. NOTE: If _O_ is a TypedArray, the following invocation of Get will return a normal completion. - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. NOTE: If _obj_ is a TypedArray, the following invocation of Get will return a normal completion. + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Let _testResult_ be ? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »). 1. If ToBoolean(_testResult_) is *true*, return the Record { [[Index]]: 𝔽(_k_), [[Value]]: _kValue_ }. 1. Return the Record { [[Index]]: *-1*𝔽, [[Value]]: *undefined* }. @@ -40373,15 +40369,15 @@

    Array.prototype.flat ( [ _depth_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _sourceLen_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _sourceLen_ be ? LengthOfArrayLike(_obj_). 1. Let _depthNum_ be 1. 1. If _depth_ is not *undefined*, then 1. Set _depthNum_ to ? ToIntegerOrInfinity(_depth_). 1. If _depthNum_ < 0, set _depthNum_ to 0. - 1. Let _A_ be ? ArraySpeciesCreate(_O_, 0). - 1. Perform ? FlattenIntoArray(_A_, _O_, _sourceLen_, 0, _depthNum_). - 1. Return _A_. + 1. Let _array_ be ? ArraySpeciesCreate(_obj_, 0). + 1. Perform ? FlattenIntoArray(_array_, _obj_, _sourceLen_, 0, _depthNum_). + 1. Return _array_. @@ -40403,10 +40399,10 @@

    1. Let _targetIndex_ be _start_. 1. Let _sourceIndex_ be *+0*𝔽. 1. Repeat, while ℝ(_sourceIndex_) < _sourceLen_, - 1. Let _P_ be ! ToString(_sourceIndex_). - 1. Let _exists_ be ? HasProperty(_source_, _P_). + 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_, _P_). + 1. Let _element_ be ? Get(_source_, _propertyKey_). 1. If _mapperFunction_ is present, then 1. Set _element_ to ? Call(_mapperFunction_, _thisArg_, « _element_, _sourceIndex_, _source_ »). 1. Let _shouldFlatten_ be *false*. @@ -40431,12 +40427,12 @@

    Array.prototype.flatMap ( _mapperFunction_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _sourceLen_ be ? LengthOfArrayLike(_O_). + 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 _A_ be ? ArraySpeciesCreate(_O_, 0). - 1. Perform ? FlattenIntoArray(_A_, _O_, _sourceLen_, 0, 1, _mapperFunction_, _thisArg_). - 1. Return _A_. + 1. Let _array_ be ? ArraySpeciesCreate(_obj_, 0). + 1. Perform ? FlattenIntoArray(_array_, _obj_, _sourceLen_, 0, 1, _mapperFunction_, _thisArg_). + 1. Return _array_.
    @@ -40451,16 +40447,16 @@

    Array.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Perform ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Perform ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »). 1. Set _k_ to _k_ + 1. 1. Return *undefined*. @@ -40477,20 +40473,20 @@

    Array.prototype.includes ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If _len_ = 0, return *false*. - 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). - 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. - 1. If _n_ = +∞, return *false*. - 1. If _n_ = -∞, set _n_ to 0. - 1. If _n_ ≥ 0, then - 1. Let _k_ be _n_. + 1. Let _startIndex_ be ? ToIntegerOrInfinity(_fromIndex_). + 1. Assert: If _fromIndex_ is *undefined*, then _startIndex_ is 0. + 1. If _startIndex_ = +∞, return *false*. + 1. If _startIndex_ = -∞, set _startIndex_ to 0. + 1. If _startIndex_ ≥ 0, then + 1. Let _k_ be _startIndex_. 1. Else, - 1. Let _k_ be _len_ + _n_. + 1. Let _k_ be _len_ + _startIndex_. 1. If _k_ < 0, set _k_ to 0. 1. Repeat, while _k_ < _len_, - 1. Let _elementK_ be ? Get(_O_, ! ToString(𝔽(_k_))). + 1. Let _elementK_ be ? Get(_obj_, ! ToString(𝔽(_k_))). 1. If SameValueZero(_searchElement_, _elementK_) is *true*, return *true*. 1. Set _k_ to _k_ + 1. 1. Return *false*. @@ -40511,23 +40507,23 @@

    Array.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If _len_ = 0, return *-1*𝔽. - 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). - 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. - 1. If _n_ = +∞, return *-1*𝔽. - 1. If _n_ = -∞, set _n_ to 0. - 1. If _n_ ≥ 0, then - 1. Let _k_ be _n_. + 1. Let _startIndex_ be ? ToIntegerOrInfinity(_fromIndex_). + 1. Assert: If _fromIndex_ is *undefined*, then _startIndex_ is 0. + 1. If _startIndex_ = +∞, return *-1*𝔽. + 1. If _startIndex_ = -∞, set _startIndex_ to 0. + 1. If _startIndex_ ≥ 0, then + 1. Let _k_ be _startIndex_. 1. Else, - 1. Let _k_ be _len_ + _n_. + 1. Let _k_ be _len_ + _startIndex_. 1. If _k_ < 0, set _k_ to 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _elementK_ be ? Get(_O_, _Pk_). + 1. Let _elementK_ be ? Get(_obj_, _propertyKey_). 1. If IsStrictlyEqual(_searchElement_, _elementK_) is *true*, return 𝔽(_k_). 1. Set _k_ to _k_ + 1. 1. Return *-1*𝔽. @@ -40542,20 +40538,20 @@

    Array.prototype.join ( _separator_ )

    This method converts the elements of the array to Strings, and then concatenates these Strings, separated by occurrences of the _separator_. If no separator is provided, a single comma is used as the separator.

    It performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If _separator_ is *undefined*, let _sep_ be *","*. 1. Else, let _sep_ be ? ToString(_separator_). - 1. Let _R_ be the empty String. + 1. Let _result_ be the empty String. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. If _k_ > 0, set _R_ to the string-concatenation of _R_ and _sep_. - 1. Let _element_ be ? Get(_O_, ! ToString(𝔽(_k_))). + 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 _S_ be ? ToString(_element_). - 1. Set _R_ to the string-concatenation of _R_ and _S_. + 1. Let _elementStr_ be ? ToString(_element_). + 1. Set _result_ to the string-concatenation of _result_ and _elementStr_. 1. Set _k_ to _k_ + 1. - 1. Return _R_. + 1. Return _result_.

    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.

    @@ -40566,8 +40562,8 @@

    Array.prototype.join ( _separator_ )

    Array.prototype.keys ( )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Return CreateArrayIterator(_O_, ~key~). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Return CreateArrayIterator(_obj_, ~key~). @@ -40579,20 +40575,20 @@

    Array.prototype.lastIndexOf ( _searchElement_ [ , _fromIndex_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 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 _n_ be ? ToIntegerOrInfinity(_fromIndex_); else let _n_ be _len_ - 1. - 1. If _n_ = -∞, return *-1*𝔽. - 1. If _n_ ≥ 0, then - 1. Let _k_ be min(_n_, _len_ - 1). + 1. If _fromIndex_ is present, let _startIndex_ be ? ToIntegerOrInfinity(_fromIndex_); else let _startIndex_ be _len_ - 1. + 1. If _startIndex_ = -∞, return *-1*𝔽. + 1. If _startIndex_ ≥ 0, then + 1. Let _k_ be min(_startIndex_, _len_ - 1). 1. Else, - 1. Let _k_ be _len_ + _n_. + 1. Let _k_ be _len_ + _startIndex_. 1. Repeat, while _k_ ≥ 0, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _elementK_ be ? Get(_O_, _Pk_). + 1. Let _elementK_ be ? Get(_obj_, _propertyKey_). 1. If IsStrictlyEqual(_searchElement_, _elementK_) is *true*, return 𝔽(_k_). 1. Set _k_ to _k_ - 1. 1. Return *-1*𝔽. @@ -40613,20 +40609,20 @@

    Array.prototype.map ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. Let _A_ be ? ArraySpeciesCreate(_O_, _len_). + 1. Let _array_ be ? ArraySpeciesCreate(_obj_, _len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _mappedValue_ be ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). - 1. Perform ? CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Let _mappedValue_ be ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »). + 1. Perform ? CreateDataPropertyOrThrow(_array_, _propertyKey_, _mappedValue_). 1. Set _k_ to _k_ + 1. - 1. Return _A_. + 1. Return _array_.

    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.

    @@ -40640,17 +40636,17 @@

    Array.prototype.pop ( )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If _len_ = 0, then - 1. Perform ? Set(_O_, *"length"*, *+0*𝔽, *true*). + 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. Let _element_ be ? Get(_O_, _index_). - 1. Perform ? DeletePropertyOrThrow(_O_, _index_). - 1. Perform ? Set(_O_, *"length"*, _newLen_, *true*). + 1. Let _element_ be ? Get(_obj_, _index_). + 1. Perform ? DeletePropertyOrThrow(_obj_, _index_). + 1. Perform ? Set(_obj_, *"length"*, _newLen_, *true*). 1. Return _element_. @@ -40665,14 +40661,14 @@

    Array.prototype.push ( ..._items_ )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. Let _argCount_ be the number of elements in _items_. 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. - 1. For each element _E_ of _items_, do - 1. Perform ? Set(_O_, ! ToString(𝔽(_len_)), _E_, *true*). + 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(_O_, *"length"*, 𝔽(_len_), *true*). + 1. Perform ? Set(_obj_, *"length"*, 𝔽(_len_), *true*). 1. Return 𝔽(_len_).

    The *"length"* property of this method is *1*𝔽.

    @@ -40691,8 +40687,8 @@

    Array.prototype.reduce ( _callback_ [ , _initialValue_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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 0. @@ -40702,18 +40698,18 @@

    Array.prototype.reduce ( _callback_ [ , _initialValue_ ] )

    1. Else, 1. Let _kPresent_ be *false*. 1. Repeat, while _kPresent_ is *false* and _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Set _kPresent_ to ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Set _kPresent_ to ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Set _accumulator_ to ? Get(_O_, _Pk_). + 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. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _obj_ »). 1. Set _k_ to _k_ + 1. 1. Return _accumulator_.
    @@ -40732,8 +40728,8 @@

    Array.prototype.reduceRight ( _callback_ [ , _initialValue_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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. @@ -40743,18 +40739,18 @@

    Array.prototype.reduceRight ( _callback_ [ , _initialValue_ ] )

    1. Else, 1. Let _kPresent_ be *false*. 1. Repeat, while _kPresent_ is *false* and _k_ ≥ 0, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Set _kPresent_ to ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Set _kPresent_ to ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Set _accumulator_ to ? Get(_O_, _Pk_). + 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_ ≥ 0, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _obj_ »). 1. Set _k_ to _k_ - 1. 1. Return _accumulator_.
    @@ -40770,34 +40766,34 @@

    Array.prototype.reverse ( )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. Let _middle_ be floor(_len_ / 2). 1. Let _lower_ be 0. 1. Repeat, while _lower_ ≠ _middle_, 1. Let _upper_ be _len_ - _lower_ - 1. 1. Let _upperP_ be ! ToString(𝔽(_upper_)). 1. Let _lowerP_ be ! ToString(𝔽(_lower_)). - 1. Let _lowerExists_ be ? HasProperty(_O_, _lowerP_). + 1. Let _lowerExists_ be ? HasProperty(_obj_, _lowerP_). 1. If _lowerExists_ is *true*, then - 1. Let _lowerValue_ be ? Get(_O_, _lowerP_). - 1. Let _upperExists_ be ? HasProperty(_O_, _upperP_). + 1. Let _lowerValue_ be ? Get(_obj_, _lowerP_). + 1. Let _upperExists_ be ? HasProperty(_obj_, _upperP_). 1. If _upperExists_ is *true*, then - 1. Let _upperValue_ be ? Get(_O_, _upperP_). + 1. Let _upperValue_ be ? Get(_obj_, _upperP_). 1. If _lowerExists_ is *true* and _upperExists_ is *true*, then - 1. Perform ? Set(_O_, _lowerP_, _upperValue_, *true*). - 1. Perform ? Set(_O_, _upperP_, _lowerValue_, *true*). + 1. Perform ? Set(_obj_, _lowerP_, _upperValue_, *true*). + 1. Perform ? Set(_obj_, _upperP_, _lowerValue_, *true*). 1. Else if _lowerExists_ is *false* and _upperExists_ is *true*, then - 1. Perform ? Set(_O_, _lowerP_, _upperValue_, *true*). - 1. Perform ? DeletePropertyOrThrow(_O_, _upperP_). + 1. Perform ? Set(_obj_, _lowerP_, _upperValue_, *true*). + 1. Perform ? DeletePropertyOrThrow(_obj_, _upperP_). 1. Else if _lowerExists_ is *true* and _upperExists_ is *false*, then - 1. Perform ? DeletePropertyOrThrow(_O_, _lowerP_). - 1. Perform ? Set(_O_, _upperP_, _lowerValue_, *true*). + 1. Perform ? DeletePropertyOrThrow(_obj_, _lowerP_). + 1. Perform ? Set(_obj_, _upperP_, _lowerValue_, *true*). 1. Else, 1. Assert: _lowerExists_ and _upperExists_ are both *false*. 1. NOTE: No action is required. 1. Set _lower_ to _lower_ + 1. - 1. Return _O_. + 1. Return _obj_.

    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.

    @@ -40809,26 +40805,26 @@

    Array.prototype.shift ( )

    This method removes the first element of the array and returns it.

    It performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If _len_ = 0, then - 1. Perform ? Set(_O_, *"length"*, *+0*𝔽, *true*). + 1. Perform ? Set(_obj_, *"length"*, *+0*𝔽, *true*). 1. Return *undefined*. - 1. Let _first_ be ? Get(_O_, *"0"*). + 1. Let _first_ be ? Get(_obj_, *"0"*). 1. Let _k_ be 1. 1. Repeat, while _k_ < _len_, 1. Let _from_ be ! ToString(𝔽(_k_)). 1. Let _to_ be ! ToString(𝔽(_k_ - 1)). - 1. Let _fromPresent_ be ? HasProperty(_O_, _from_). + 1. Let _fromPresent_ be ? HasProperty(_obj_, _from_). 1. If _fromPresent_ is *true*, then - 1. Let _fromValue_ be ? Get(_O_, _from_). - 1. Perform ? Set(_O_, _to_, _fromValue_, *true*). + 1. Let _fromValue_ be ? Get(_obj_, _from_). + 1. Perform ? Set(_obj_, _to_, _fromValue_, *true*). 1. Else, 1. Assert: _fromPresent_ is *false*. - 1. Perform ? DeletePropertyOrThrow(_O_, _to_). + 1. Perform ? DeletePropertyOrThrow(_obj_, _to_). 1. Set _k_ to _k_ + 1. - 1. Perform ? DeletePropertyOrThrow(_O_, ! ToString(𝔽(_len_ - 1))). - 1. Perform ? Set(_O_, *"length"*, 𝔽(_len_ - 1), *true*). + 1. Perform ? DeletePropertyOrThrow(_obj_, ! ToString(𝔽(_len_ - 1))). + 1. Perform ? Set(_obj_, *"length"*, 𝔽(_len_ - 1), *true*). 1. Return _first_. @@ -40841,8 +40837,8 @@

    Array.prototype.slice ( _start_, _end_ )

    This method returns an array containing the elements of the array from element _start_ up to, but not including, element _end_ (or through the end of the array if _end_ is *undefined*). If _start_ is negative, it is treated as _length_ + _start_ where _length_ is the length of the array. If _end_ is negative, it is treated as _length_ + _end_ where _length_ is the length of the array.

    It performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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). @@ -40852,21 +40848,21 @@

    Array.prototype.slice ( _start_, _end_ )

    1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Let _count_ be max(_final_ - _k_, 0). - 1. Let _A_ be ? ArraySpeciesCreate(_O_, _count_). - 1. Let _n_ be 0. + 1. Let _array_ be ? ArraySpeciesCreate(_obj_, _count_). + 1. Let _resultIndex_ be 0. 1. Repeat, while _k_ < _final_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Perform ? CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_n_)), _kValue_). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Perform ? CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_resultIndex_)), _kValue_). 1. Set _k_ to _k_ + 1. - 1. Set _n_ to _n_ + 1. - 1. [id="step-array-proto-slice-set-length"] Perform ? Set(_A_, *"length"*, 𝔽(_n_), *true*). - 1. Return _A_. + 1. Set _resultIndex_ to _resultIndex_ + 1. + 1. [id="step-array-proto-slice-set-length"] Perform ? Set(_array_, *"length"*, 𝔽(_resultIndex_), *true*). + 1. Return _array_.
    -

    The explicit setting of the *"length"* property in step is intended to ensure the length is correct even when _A_ is not a built-in Array.

    +

    The explicit setting of the *"length"* property in step is intended to ensure the length is correct even when _array_ is not a built-in Array.

    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.

    @@ -40884,16 +40880,16 @@

    Array.prototype.some ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ? HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). + 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). 1. If _testResult_ is *true*, return *true*. 1. Set _k_ to _k_ + 1. 1. Return *false*. @@ -40911,9 +40907,9 @@

    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. Let _SortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparator_ and performs the following steps when called: + 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_, _len_, _sortCompare_, ~skip-holes~). 1. Let _itemCount_ be the number of elements in _sortedList_. 1. Let _j_ be 0. 1. Repeat, while _j_ < _itemCount_, @@ -40929,7 +40925,7 @@

    Array.prototype.sort ( _comparator_ )

    Because non-existent property values always compare greater than *undefined* property values, and *undefined* always compares greater than any other value (see CompareArrayElements), *undefined* property values always sort to the end of the result, followed by non-existent property values.

    -

    Method calls performed by the ToString abstract operations in steps and have the potential to cause _SortCompare_ to not behave as a consistent comparator.

    +

    Method calls performed by the ToString abstract operations in steps and have the potential to cause _sortCompare_ to not behave as a consistent comparator.

    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.

    @@ -40940,7 +40936,7 @@

    SortIndexedProperties ( _obj_: an Object, _len_: a non-negative integer, - _SortCompare_: an Abstract Closure with two parameters, + _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

    @@ -40950,34 +40946,34 @@

    1. Let _items_ be a new empty List. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. If _holes_ is ~skip-holes~, then - 1. Let _kRead_ be ? HasProperty(_obj_, _Pk_). + 1. Let _kRead_ be ? HasProperty(_obj_, _propertyKey_). 1. Else, 1. Assert: _holes_ is ~read-through-holes~. 1. Let _kRead_ be *true*. 1. If _kRead_ is *true*, then - 1. Let _kValue_ be ? Get(_obj_, _Pk_). + 1. Let _kValue_ be ? Get(_obj_, _propertyKey_). 1. Append _kValue_ to _items_. 1. Set _k_ to _k_ + 1. - 1. [id="step-array-sort"] Sort _items_ using an implementation-defined sequence of calls to _SortCompare_. If any such call returns an abrupt completion, stop before performing any further calls to _SortCompare_ and return that Completion Record. + 1. [id="step-array-sort"] Sort _items_ using an implementation-defined sequence of calls to _sortCompare_. If any such call returns an abrupt completion, stop before performing any further calls to _sortCompare_ and return that Completion Record. 1. Return _items_. -

    The sort order is the ordering of _items_ after completion of step of the algorithm above. The sort order is implementation-defined if _SortCompare_ is not a consistent comparator for the elements of _items_. When SortIndexedProperties is invoked by Array.prototype.sort or Array.prototype.toSorted, the sort order is also implementation-defined if _comparator_ is *undefined*, and all applications of ToString, to any specific value passed as an argument to _SortCompare_, do not produce the same result.

    +

    The sort order is the ordering of _items_ after completion of step of the algorithm above. The sort order is implementation-defined if _sortCompare_ is not a consistent comparator for the elements of _items_. When SortIndexedProperties is invoked by Array.prototype.sort or Array.prototype.toSorted, the sort order is also implementation-defined if _comparator_ is *undefined*, and all applications of ToString, to any specific value passed as an argument to _sortCompare_, do not produce the same result.

    Unless the sort order is specified to be implementation-defined, it must satisfy all of the following conditions:

    • There must be some mathematical permutation π of the non-negative integers less than _itemCount_, such that for every non-negative integer _j_ less than _itemCount_, the element old[_j_] is exactly the same as new[π(_j_)].
    • - Then for all non-negative integers _j_ and _k_, each less than _itemCount_, if ℝ(_SortCompare_(old[_j_], old[_k_])) < 0, then π(_j_) < π(_k_). + Then for all non-negative integers _j_ and _k_, each less than _itemCount_, if ℝ(_sortCompare_(old[_j_], old[_k_])) < 0, then π(_j_) < π(_k_).
    • - And for all non-negative integers _j_ and _k_ such that _j_ < _k_ < _itemCount_, if ℝ(_SortCompare_(old[_j_], old[_k_])) = 0, then π(_j_) < π(_k_); i.e., the sort is stable. + And for all non-negative integers _j_ and _k_ such that _j_ < _k_ < _itemCount_, if ℝ(_sortCompare_(old[_j_], old[_k_])) = 0, then π(_j_) < π(_k_); i.e., the sort is stable.

    Here the notation old[_j_] is used to refer to _items_[_j_] before step is executed, and the notation new[_j_] to refer to _items_[_j_] after step has been executed.

    -

    An Abstract Closure or function _comparator_ is a consistent comparator for a set of values _S_ if all of the requirements below are met for all values _a_, _b_, and _c_ (possibly the same value) in the set _S_: The notation _a_ <C _b_ means ℝ(_comparator_(_a_, _b_)) < 0; _a_ =C _b_ means ℝ(_comparator_(_a_, _b_)) = 0; and _a_ >C _b_ means ℝ(_comparator_(_a_, _b_)) > 0.

    +

    An Abstract Closure or function _comparator_ is a consistent comparator for a set of values _values_ if all of the requirements below are met for all values _a_, _b_, and _c_ (possibly the same value) in the set _values_: The notation _a_ <C _b_ means ℝ(_comparator_(_a_, _b_)) < 0; _a_ =C _b_ means ℝ(_comparator_(_a_, _b_)) = 0; and _a_ >C _b_ means ℝ(_comparator_(_a_, _b_)) > 0.

    • Calling _comparator_(_a_, _b_) always returns the same value _v_ when given a specific pair of values _a_ and _b_ as its two arguments. Furthermore, _v_ is a Number, and _v_ is not *NaN*. Note that this implies that exactly one of _a_ <C _b_, _a_ =C _b_, and _a_ >C _b_ will be true for a given pair of _a_ and _b_. @@ -41002,7 +40998,7 @@

    -

    The above conditions are necessary and sufficient to ensure that _comparator_ divides the set _S_ into equivalence classes and that these equivalence classes are totally ordered.

    +

    The above conditions are necessary and sufficient to ensure that _comparator_ divides the set _values_ into equivalence classes and that these equivalence classes are totally ordered.

    @@ -41021,9 +41017,9 @@

    1. If _x_ is *undefined*, return *1*𝔽. 1. If _y_ is *undefined*, return *-1*𝔽. 1. If _comparator_ is not *undefined*, then - 1. Let _v_ be ? ToNumber(? Call(_comparator_, *undefined*, « _x_, _y_ »)). - 1. If _v_ is *NaN*, return *+0*𝔽. - 1. Return _v_. + 1. Let _result_ be ? ToNumber(? Call(_comparator_, *undefined*, « _x_, _y_ »)). + 1. If _result_ is *NaN*, return *+0*𝔽. + 1. Return _result_. 1. [id="step-sortcompare-tostring-x"] Let _xString_ be ? ToString(_x_). 1. [id="step-sortcompare-tostring-y"] Let _yString_ be ? ToString(_y_). 1. Let _xSmaller_ be ! IsLessThan(_xString_, _yString_, *true*). @@ -41042,8 +41038,8 @@

    Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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). @@ -41057,47 +41053,47 @@

    Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

    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 _A_ be ? ArraySpeciesCreate(_O_, _actualDeleteCount_). + 1. Let _deletedArray_ be ? ArraySpeciesCreate(_obj_, _actualDeleteCount_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _actualDeleteCount_, 1. Let _from_ be ! ToString(𝔽(_actualStart_ + _k_)). - 1. If ? HasProperty(_O_, _from_) is *true*, then - 1. Let _fromValue_ be ? Get(_O_, _from_). - 1. Perform ? CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_k_)), _fromValue_). + 1. If ? HasProperty(_obj_, _from_) is *true*, then + 1. Let _fromValue_ be ? Get(_obj_, _from_). + 1. Perform ? CreateDataPropertyOrThrow(_deletedArray_, ! ToString(𝔽(_k_)), _fromValue_). 1. Set _k_ to _k_ + 1. - 1. [id="step-array-proto-splice-set-length"] Perform ? Set(_A_, *"length"*, 𝔽(_actualDeleteCount_), *true*). + 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. Let _from_ be ! ToString(𝔽(_k_ + _actualDeleteCount_)). 1. Let _to_ be ! ToString(𝔽(_k_ + _itemCount_)). - 1. If ? HasProperty(_O_, _from_) is *true*, then - 1. Let _fromValue_ be ? Get(_O_, _from_). - 1. Perform ? Set(_O_, _to_, _fromValue_, *true*). + 1. If ? HasProperty(_obj_, _from_) is *true*, then + 1. Let _fromValue_ be ? Get(_obj_, _from_). + 1. Perform ? Set(_obj_, _to_, _fromValue_, *true*). 1. Else, - 1. Perform ? DeletePropertyOrThrow(_O_, _to_). + 1. Perform ? DeletePropertyOrThrow(_obj_, _to_). 1. Set _k_ to _k_ + 1. 1. Set _k_ to _len_. 1. Repeat, while _k_ > (_len_ - _actualDeleteCount_ + _itemCount_), - 1. Perform ? DeletePropertyOrThrow(_O_, ! ToString(𝔽(_k_ - 1))). + 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. Repeat, while _k_ > _actualStart_, 1. Let _from_ be ! ToString(𝔽(_k_ + _actualDeleteCount_ - 1)). 1. Let _to_ be ! ToString(𝔽(_k_ + _itemCount_ - 1)). - 1. If ? HasProperty(_O_, _from_) is *true*, then - 1. Let _fromValue_ be ? Get(_O_, _from_). - 1. Perform ? Set(_O_, _to_, _fromValue_, *true*). + 1. If ? HasProperty(_obj_, _from_) is *true*, then + 1. Let _fromValue_ be ? Get(_obj_, _from_). + 1. Perform ? Set(_obj_, _to_, _fromValue_, *true*). 1. Else, - 1. Perform ? DeletePropertyOrThrow(_O_, _to_). + 1. Perform ? DeletePropertyOrThrow(_obj_, _to_). 1. Set _k_ to _k_ - 1. 1. Set _k_ to _actualStart_. - 1. For each element _E_ of _items_, do - 1. Perform ? Set(_O_, ! ToString(𝔽(_k_)), _E_, *true*). + 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(_O_, *"length"*, 𝔽(_len_ - _actualDeleteCount_ + _itemCount_), *true*). - 1. Return _A_. + 1. [id="step-array-proto-splice-set-length-2"] Perform ? Set(_obj_, *"length"*, 𝔽(_len_ - _actualDeleteCount_ + _itemCount_), *true*). + 1. Return _deletedArray_.

    The explicit setting of the *"length"* property in steps and is intended to ensure the lengths are correct even when the objects are not built-in Arrays.

    @@ -41119,16 +41115,16 @@

    Array.prototype.toLocaleString ( [ _reserved1_ [ , _reserved2_ ] ] )

    1. Let _array_ be ? ToObject(*this* value). 1. Let _len_ 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 _R_ be the empty String. + 1. Let _result_ be the empty String. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. If _k_ > 0, set _R_ to the string-concatenation of _R_ and _separator_. + 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 _S_ be ? ToString(? Invoke(_element_, *"toLocaleString"*)). - 1. Set _R_ to the string-concatenation of _R_ and _S_. + 1. Let _elementStr_ be ? ToString(? Invoke(_element_, *"toLocaleString"*)). + 1. Set _result_ to the string-concatenation of _result_ and _elementStr_. 1. Set _k_ to _k_ + 1. - 1. Return _R_. + 1. Return _result_.

    This method converts the elements of the array to Strings using their `toLocaleString` methods, and then concatenates these Strings, separated by occurrences of an implementation-defined locale-sensitive separator String. This method is analogous to `toString` except that it is intended to yield a locale-sensitive result corresponding with conventions of the host environment's current locale.

    @@ -41142,17 +41138,17 @@

    Array.prototype.toLocaleString ( [ _reserved1_ [ , _reserved2_ ] ] )

    Array.prototype.toReversed ( )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _A_ be ? ArrayCreate(_len_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ be ? LengthOfArrayLike(_obj_). + 1. Let _array_ be ? ArrayCreate(_len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _from_ be ! ToString(𝔽(_len_ - _k_ - 1)). - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _fromValue_ be ? Get(_O_, _from_). - 1. Perform ! CreateDataPropertyOrThrow(_A_, _Pk_, _fromValue_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _fromValue_ be ? Get(_obj_, _from_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, _propertyKey_, _fromValue_). 1. Set _k_ to _k_ + 1. - 1. Return _A_. + 1. Return _array_. @@ -41161,17 +41157,17 @@

    Array.prototype.toSorted ( _comparator_ )

    This method performs the following steps when called:

    1. If _comparator_ is not *undefined* and IsCallable(_comparator_) is *false*, throw a *TypeError* exception. - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). - 1. Let _A_ be ? ArrayCreate(_len_). - 1. Let _SortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparator_ and 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 _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(_O_, _len_, _SortCompare_, ~read-through-holes~). + 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _len_, _sortCompare_, ~read-through-holes~). 1. Let _j_ be 0. 1. Repeat, while _j_ < _len_, - 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_j_)), _sortedList_[_j_]). + 1. Perform ! CreateDataPropertyOrThrow(_array_, ! ToString(𝔽(_j_)), _sortedList_[_j_]). 1. Set _j_ to _j_ + 1. - 1. Return _A_. + 1. Return _array_. @@ -41179,8 +41175,8 @@

    Array.prototype.toSorted ( _comparator_ )

    Array.prototype.toSpliced ( _start_, _skipCount_, ..._items_ )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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). @@ -41195,26 +41191,26 @@

    Array.prototype.toSpliced ( _start_, _skipCount_, ..._items_ )

    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 _A_ be ? ArrayCreate(_newLen_). - 1. Let _i_ be 0. - 1. Let _r_ be _actualStart_ + _actualSkipCount_. - 1. Repeat, while _i_ < _actualStart_, - 1. Let _Pi_ be ! ToString(𝔽(_i_)). - 1. Let _iValue_ be ? Get(_O_, _Pi_). - 1. Perform ! CreateDataPropertyOrThrow(_A_, _Pi_, _iValue_). - 1. Set _i_ to _i_ + 1. - 1. For each element _E_ of _items_, do - 1. Let _Pi_ be ! ToString(𝔽(_i_)). - 1. Perform ! CreateDataPropertyOrThrow(_A_, _Pi_, _E_). - 1. Set _i_ to _i_ + 1. - 1. Repeat, while _i_ < _newLen_, - 1. Let _Pi_ be ! ToString(𝔽(_i_)). - 1. Let _from_ be ! ToString(𝔽(_r_)). - 1. Let _fromValue_ be ? Get(_O_, _from_). - 1. Perform ! CreateDataPropertyOrThrow(_A_, _Pi_, _fromValue_). - 1. Set _i_ to _i_ + 1. - 1. Set _r_ to _r_ + 1. - 1. Return _A_. + 1. Let _newArray_ be ? ArrayCreate(_newLen_). + 1. Let _writeIndex_ be 0. + 1. Let _readIndex_ be _actualStart_ + _actualSkipCount_. + 1. Repeat, while _writeIndex_ < _actualStart_, + 1. Let _propertyKey_ be ! ToString(𝔽(_writeIndex_)). + 1. Let _iValue_ be ? Get(_obj_, _propertyKey_). + 1. Perform ! CreateDataPropertyOrThrow(_newArray_, _propertyKey_, _iValue_). + 1. Set _writeIndex_ to _writeIndex_ + 1. + 1. For each element _item_ of _items_, do + 1. Let _propertyKey_ be ! ToString(𝔽(_writeIndex_)). + 1. Perform ! CreateDataPropertyOrThrow(_newArray_, _propertyKey_, _item_). + 1. Set _writeIndex_ to _writeIndex_ + 1. + 1. Repeat, while _writeIndex_ < _newLen_, + 1. Let _propertyKey_ be ! ToString(𝔽(_writeIndex_)). + 1. Let _from_ be ! ToString(𝔽(_readIndex_)). + 1. Let _fromValue_ be ? Get(_obj_, _from_). + 1. Perform ! CreateDataPropertyOrThrow(_newArray_, _propertyKey_, _fromValue_). + 1. Set _writeIndex_ to _writeIndex_ + 1. + 1. Set _readIndex_ to _readIndex_ + 1. + 1. Return _newArray_.
    @@ -41237,8 +41233,8 @@

    Array.prototype.unshift ( ..._items_ )

    This method prepends the arguments to the start of the array, such that their order within the array is the same as the order in which they appear in the argument list.

    It performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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. @@ -41246,19 +41242,19 @@

    Array.prototype.unshift ( ..._items_ )

    1. Repeat, while _k_ > 0, 1. Let _from_ be ! ToString(𝔽(_k_ - 1)). 1. Let _to_ be ! ToString(𝔽(_k_ + _argCount_ - 1)). - 1. Let _fromPresent_ be ? HasProperty(_O_, _from_). + 1. Let _fromPresent_ be ? HasProperty(_obj_, _from_). 1. If _fromPresent_ is *true*, then - 1. Let _fromValue_ be ? Get(_O_, _from_). - 1. Perform ? Set(_O_, _to_, _fromValue_, *true*). + 1. Let _fromValue_ be ? Get(_obj_, _from_). + 1. Perform ? Set(_obj_, _to_, _fromValue_, *true*). 1. Else, 1. Assert: _fromPresent_ is *false*. - 1. Perform ? DeletePropertyOrThrow(_O_, _to_). + 1. Perform ? DeletePropertyOrThrow(_obj_, _to_). 1. Set _k_ to _k_ - 1. 1. Let _j_ be *+0*𝔽. - 1. For each element _E_ of _items_, do - 1. Perform ? Set(_O_, ! ToString(_j_), _E_, *true*). + 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(_O_, *"length"*, 𝔽(_len_ + _argCount_), *true*). + 1. Perform ? Set(_obj_, *"length"*, 𝔽(_len_ + _argCount_), *true*). 1. Return 𝔽(_len_ + _argCount_).

    The *"length"* property of this method is *1*𝔽.

    @@ -41271,8 +41267,8 @@

    Array.prototype.unshift ( ..._items_ )

    Array.prototype.values ( )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Return CreateArrayIterator(_O_, ~value~). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Return CreateArrayIterator(_obj_, ~value~). @@ -41280,21 +41276,21 @@

    Array.prototype.values ( )

    Array.prototype.with ( _index_, _value_ )

    This method performs the following steps when called:

    - 1. Let _O_ be ? ToObject(*this* value). - 1. Let _len_ be ? LengthOfArrayLike(_O_). + 1. Let _obj_ be ? ToObject(*this* value). + 1. Let _len_ 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 _A_ be ? ArrayCreate(_len_). + 1. Let _array_ be ? ArrayCreate(_len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. If _k_ = _actualIndex_, let _fromValue_ be _value_. - 1. Else, let _fromValue_ be ? Get(_O_, _Pk_). - 1. Perform ! CreateDataPropertyOrThrow(_A_, _Pk_, _fromValue_). + 1. Else, let _fromValue_ be ? Get(_obj_, _propertyKey_). + 1. Perform ! CreateDataPropertyOrThrow(_array_, _propertyKey_, _fromValue_). 1. Set _k_ to _k_ + 1. - 1. Return _A_. + 1. Return _array_. @@ -41386,13 +41382,13 @@

    The %ArrayIteratorPrototype% Object

    %ArrayIteratorPrototype%.next ( )

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. If _O_ does not have all of the internal slots of an Array Iterator Instance (), throw a *TypeError* exception. - 1. Let _array_ be _O_.[[IteratedArrayLike]]. + 1. Let _iteratorObj_ be the *this* value. + 1. If _iteratorObj_ is not an Object, throw a *TypeError* exception. + 1. If _iteratorObj_ does not have all of the internal slots of an Array Iterator Instance (), throw a *TypeError* exception. + 1. Let _array_ be _iteratorObj_.[[IteratedArrayLike]]. 1. If _array_ is *undefined*, return CreateIteratorResultObject(*undefined*, *true*). - 1. Let _index_ be _O_.[[ArrayLikeNextIndex]]. - 1. Let _kind_ be _O_.[[ArrayLikeIterationKind]]. + 1. Let _index_ be _iteratorObj_.[[ArrayLikeNextIndex]]. + 1. Let _kind_ be _iteratorObj_.[[ArrayLikeIterationKind]]. 1. If _array_ has a [[TypedArrayName]] internal slot, then 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_array_, ~seq-cst~). 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. @@ -41400,9 +41396,9 @@

    %ArrayIteratorPrototype%.next ( )

    1. Else, 1. Let _len_ be ? LengthOfArrayLike(_array_). 1. If _index_ ≥ _len_, then - 1. Set _O_.[[IteratedArrayLike]] to *undefined*. + 1. Set _iteratorObj_.[[IteratedArrayLike]] to *undefined*. 1. Return CreateIteratorResultObject(*undefined*, *true*). - 1. Set _O_.[[ArrayLikeNextIndex]] to _index_ + 1. + 1. Set _iteratorObj_.[[ArrayLikeNextIndex]] to _index_ + 1. 1. Let _indexNumber_ be 𝔽(_index_). 1. If _kind_ is ~key~, then 1. Let _result_ be _indexNumber_. @@ -41755,8 +41751,8 @@

    Properties of the %TypedArray% Intrinsic Object

    %TypedArray%.from ( _source_ [ , _mapper_ [ , _thisArg_ ] ] )

    This method performs the following steps when called:

    - 1. Let _C_ be the *this* value. - 1. If IsConstructor(_C_) is *false*, throw a *TypeError* exception. + 1. Let _constructor_ be the *this* value. + 1. If IsConstructor(_constructor_) is *false*, throw a *TypeError* exception. 1. If _mapper_ is *undefined*, then 1. Let _mapping_ be *false*. 1. Else, @@ -41766,33 +41762,33 @@

    %TypedArray%.from ( _source_ [ , _mapper_ [ , _thisArg_ ] ] )

    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(_C_, « 𝔽(_len_) »). + 1. Let _targetObj_ be ? TypedArrayCreateFromConstructor(_constructor_, « 𝔽(_len_) »). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be the first element of _values_. 1. Remove the first element from _values_. 1. If _mapping_ is *true*, then 1. Let _mappedValue_ be ? Call(_mapper_, _thisArg_, « _kValue_, 𝔽(_k_) »). 1. Else, 1. Let _mappedValue_ be _kValue_. - 1. Perform ? Set(_targetObj_, _Pk_, _mappedValue_, *true*). + 1. Perform ? Set(_targetObj_, _propertyKey_, _mappedValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Assert: _values_ is now an empty List. 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(_C_, « 𝔽(_len_) »). + 1. Let _targetObj_ be ? TypedArrayCreateFromConstructor(_constructor_, « 𝔽(_len_) »). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ? Get(_arrayLike_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). 1. If _mapping_ is *true*, then 1. Let _mappedValue_ be ? Call(_mapper_, _thisArg_, « _kValue_, 𝔽(_k_) »). 1. Else, 1. Let _mappedValue_ be _kValue_. - 1. Perform ? Set(_targetObj_, _Pk_, _mappedValue_, *true*). + 1. Perform ? Set(_targetObj_, _propertyKey_, _mappedValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Return _targetObj_.
    @@ -41803,14 +41799,14 @@

    %TypedArray%.of ( ..._items_ )

    This method performs the following steps when called:

    1. Let _len_ be the number of elements in _items_. - 1. Let _C_ be the *this* value. - 1. If IsConstructor(_C_) is *false*, throw a *TypeError* exception. - 1. Let _newObj_ be ? TypedArrayCreateFromConstructor(_C_, « 𝔽(_len_) »). + 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 _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _kValue_ be _items_[_k_]. - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Perform ? Set(_newObj_, _Pk_, _kValue_, *true*). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Perform ? Set(_newObj_, _propertyKey_, _kValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Return _newObj_. @@ -41848,8 +41844,8 @@

    Properties of the %TypedArray% Prototype Object

    %TypedArray%.prototype.at ( _index_ )

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, then @@ -41857,7 +41853,7 @@

    %TypedArray%.prototype.at ( _index_ )

    1. Else, 1. Let _k_ be _len_ + _relativeIndex_. 1. If _k_ < 0 or _k_ ≥ _len_, return *undefined*. - 1. Return ! Get(_O_, ! ToString(𝔽(_k_))). + 1. Return ! Get(_obj_, ! ToString(𝔽(_k_))).
    @@ -41865,10 +41861,10 @@

    %TypedArray%.prototype.at ( _index_ )

    get %TypedArray%.prototype.buffer

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). - 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]]. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[TypedArrayName]]). + 1. Assert: _obj_ has a [[ViewedArrayBuffer]] internal slot. + 1. Let _buffer_ be _obj_.[[ViewedArrayBuffer]]. 1. Return _buffer_.
    @@ -41877,10 +41873,10 @@

    get %TypedArray%.prototype.buffer

    get %TypedArray%.prototype.byteLength

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). - 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[TypedArrayName]]). + 1. Assert: _obj_ has a [[ViewedArrayBuffer]] internal slot. + 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, return *+0*𝔽. 1. Let _size_ be TypedArrayByteLength(_taRecord_). 1. Return 𝔽(_size_). @@ -41891,12 +41887,12 @@

    get %TypedArray%.prototype.byteLength

    get %TypedArray%.prototype.byteOffset

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

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

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.copyWithin` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _relativeTarget_ be ? ToIntegerOrInfinity(_target_). 1. If _relativeTarget_ = -∞, let _targetIndex_ be 0. @@ -41929,14 +41925,14 @@

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

    1. Let _count_ be min(_endIndex_ - _startIndex_, _len_ - _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 _O_.[[ViewedArrayBuffer]]. - 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 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. NOTE: Side-effects of the above steps may have reduced the size of _O_, in which case copying should proceed with the longest still-applicable prefix. + 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. Let _elementSize_ be TypedArrayElementSize(_O_). - 1. Let _byteOffset_ be _O_.[[ByteOffset]]. + 1. Let _elementSize_ be TypedArrayElementSize(_obj_). + 1. Let _byteOffset_ be _obj_.[[ByteOffset]]. 1. Let _toByteIndex_ be (_targetIndex_ × _elementSize_) + _byteOffset_. 1. Let _fromByteIndex_ be (_startIndex_ × _elementSize_) + _byteOffset_. 1. Let _countBytes_ be _count_ × _elementSize_. @@ -41952,7 +41948,7 @@

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

    1. Set _fromByteIndex_ to _fromByteIndex_ + _direction_. 1. Set _toByteIndex_ to _toByteIndex_ + _direction_. 1. Set _countBytes_ to _countBytes_ - 1. - 1. Return _O_. + 1. Return _obj_.
    @@ -41960,9 +41956,9 @@

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

    %TypedArray%.prototype.entries ( )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Return CreateArrayIterator(_O_, ~key+value~). + 1. Let _obj_ be the *this* value. + 1. Perform ? ValidateTypedArray(_obj_, ~seq-cst~). + 1. Return CreateArrayIterator(_obj_, ~key+value~). @@ -41971,15 +41967,15 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.every` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). 1. If _testResult_ is *false*, return *false*. 1. Set _k_ to _k_ + 1. 1. Return *true*. @@ -41992,10 +41988,10 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.fill` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. If _O_.[[ContentType]] is ~bigint~, set _value_ to ? ToBigInt(_value_). + 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. @@ -42005,16 +42001,16 @@

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

    1. If _relativeEnd_ = -∞, let _endIndex_ be 0. 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _endIndex_ be min(_relativeEnd_, _len_). - 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. 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. Let _k_ be _startIndex_. 1. Repeat, while _k_ < _endIndex_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Perform ! Set(_O_, _Pk_, _value_, *true*). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Perform ! Set(_obj_, _propertyKey_, _value_, *true*). 1. Set _k_ to _k_ + 1. - 1. Return _O_. + 1. Return _obj_.
    @@ -42023,27 +42019,27 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.filter` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ 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. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _selected_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Let _selected_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). 1. If _selected_ is *true*, then 1. Append _kValue_ to _kept_. 1. Set _captured_ to _captured_ + 1. 1. Set _k_ to _k_ + 1. - 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_captured_) »). + 1. Let _resultTypedArray_ be ? TypedArraySpeciesCreate(_obj_, « 𝔽(_captured_) »). 1. Let _n_ be 0. 1. For each element _e_ of _kept_, do - 1. Perform ! Set(_A_, ! ToString(𝔽(_n_)), _e_, *true*). + 1. Perform ! Set(_resultTypedArray_, ! ToString(𝔽(_n_)), _e_, *true*). 1. Set _n_ to _n_ + 1. - 1. Return _A_. + 1. Return _resultTypedArray_.

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

    @@ -42053,10 +42049,10 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.find` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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(_O_, _len_, ~ascending~, _predicate_, _thisArg_). + 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~ascending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Value]].

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

    @@ -42067,10 +42063,10 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.findIndex` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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(_O_, _len_, ~ascending~, _predicate_, _thisArg_). + 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~ascending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Index]].

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

    @@ -42081,10 +42077,10 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.findLast` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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(_O_, _len_, ~descending~, _predicate_, _thisArg_). + 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~descending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Value]].

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

    @@ -42095,10 +42091,10 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.findLastIndex` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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(_O_, _len_, ~descending~, _predicate_, _thisArg_). + 1. Let _findRec_ be ? FindViaPredicate(_obj_, _len_, ~descending~, _predicate_, _thisArg_). 1. Return _findRec_.[[Index]].

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

    @@ -42109,15 +42105,15 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.forEach` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Perform ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Perform ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »). 1. Set _k_ to _k_ + 1. 1. Return *undefined*. @@ -42129,8 +42125,8 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.includes` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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 _n_ be ? ToIntegerOrInfinity(_fromIndex_). @@ -42143,7 +42139,7 @@

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

    1. Let _k_ be _len_ + _n_. 1. If _k_ < 0, set _k_ to 0. 1. Repeat, while _k_ < _len_, - 1. Let _elementK_ be ! Get(_O_, ! ToString(𝔽(_k_))). + 1. Let _elementK_ be ! Get(_obj_, ! ToString(𝔽(_k_))). 1. If SameValueZero(_searchElement_, _elementK_) is *true*, return *true*. 1. Set _k_ to _k_ + 1. 1. Return *false*. @@ -42156,8 +42152,8 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.indexOf` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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 _n_ be ? ToIntegerOrInfinity(_fromIndex_). @@ -42170,10 +42166,10 @@

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

    1. Let _k_ be _len_ + _n_. 1. If _k_ < 0, set _k_ to 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kPresent_ be ! HasProperty(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kPresent_ be ! HasProperty(_obj_, _propertyKey_). 1. If _kPresent_ is *true*, then - 1. Let _elementK_ be ! Get(_O_, _Pk_). + 1. Let _elementK_ be ! Get(_obj_, _propertyKey_). 1. If IsStrictlyEqual(_searchElement_, _elementK_) is *true*, return 𝔽(_k_). 1. Set _k_ to _k_ + 1. 1. Return *-1*𝔽. @@ -42186,21 +42182,21 @@

    %TypedArray%.prototype.join ( _separator_ )

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.join` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If _separator_ is *undefined*, let _sep_ be *","*. 1. Else, let _sep_ be ? ToString(_separator_). - 1. Let _R_ be the empty String. + 1. Let _result_ be the empty String. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. If _k_ > 0, set _R_ to the string-concatenation of _R_ and _sep_. - 1. Let _element_ be ! Get(_O_, ! ToString(𝔽(_k_))). + 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 _S_ be ! ToString(_element_). - 1. Set _R_ to the string-concatenation of _R_ and _S_. + 1. Let _elementStr_ be ! ToString(_element_). + 1. Set _result_ to the string-concatenation of _result_ and _elementStr_. 1. Set _k_ to _k_ + 1. - 1. Return _R_. + 1. Return _result_.

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

    @@ -42209,9 +42205,9 @@

    %TypedArray%.prototype.join ( _separator_ )

    %TypedArray%.prototype.keys ( )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Return CreateArrayIterator(_O_, ~key~). + 1. Let _obj_ be the *this* value. + 1. Perform ? ValidateTypedArray(_obj_, ~seq-cst~). + 1. Return CreateArrayIterator(_obj_, ~key~). @@ -42220,8 +42216,8 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.lastIndexOf` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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. @@ -42231,10 +42227,10 @@

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

    𝔽. @@ -42246,10 +42242,10 @@

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

    get %TypedArray%.prototype.length

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

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

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.map` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_len_) »). + 1. Let _resultTypedArray_ be ? TypedArraySpeciesCreate(_obj_, « 𝔽(_len_) »). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _mappedValue_ be ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). - 1. Perform ? Set(_A_, _Pk_, _mappedValue_, *true*). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Let _mappedValue_ be ? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »). + 1. Perform ? Set(_resultTypedArray_, _propertyKey_, _mappedValue_, *true*). 1. Set _k_ to _k_ + 1. - 1. Return _A_. + 1. Return _resultTypedArray_.

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

    @@ -42284,8 +42280,8 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.reduce` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ 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. @@ -42294,13 +42290,13 @@

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

    1. If _initialValue_ is present, then 1. Set _accumulator_ to _initialValue_. 1. Else, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Set _accumulator_ to ! Get(_O_, _Pk_). + 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. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _obj_ »). 1. Set _k_ to _k_ + 1. 1. Return _accumulator_.
    @@ -42312,8 +42308,8 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.reduceRight` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ 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. @@ -42322,13 +42318,13 @@

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

    1. If _initialValue_ is present, then 1. Set _accumulator_ to _initialValue_. 1. Else, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Set _accumulator_ to ! Get(_O_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Set _accumulator_ to ! Get(_obj_, _propertyKey_). 1. Set _k_ to _k_ - 1. 1. Repeat, while _k_ ≥ 0, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Set _accumulator_ to ? Call(_callback_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _obj_ »). 1. Set _k_ to _k_ - 1. 1. Return _accumulator_.
    @@ -42340,8 +42336,8 @@

    %TypedArray%.prototype.reverse ( )

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.reverse` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 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 _lower_ be 0. @@ -42349,12 +42345,12 @@

    %TypedArray%.prototype.reverse ( )

    1. Let _upper_ be _len_ - _lower_ - 1. 1. Let _upperP_ be ! ToString(𝔽(_upper_)). 1. Let _lowerP_ be ! ToString(𝔽(_lower_)). - 1. Let _lowerValue_ be ! Get(_O_, _lowerP_). - 1. Let _upperValue_ be ! Get(_O_, _upperP_). - 1. Perform ! Set(_O_, _lowerP_, _upperValue_, *true*). - 1. Perform ! Set(_O_, _upperP_, _lowerValue_, *true*). + 1. Let _lowerValue_ be ! Get(_obj_, _lowerP_). + 1. Let _upperValue_ be ! Get(_obj_, _upperP_). + 1. Perform ! Set(_obj_, _lowerP_, _upperValue_, *true*). + 1. Perform ! Set(_obj_, _upperP_, _lowerValue_, *true*). 1. Set _lower_ to _lower_ + 1. - 1. Return _O_. + 1. Return _obj_.

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

    @@ -42399,8 +42395,8 @@

    1. If _srcLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _srcLength_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _value_ be ? Get(_src_, _Pk_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _value_ be ? Get(_src_, _propertyKey_). 1. Let _targetIndex_ be 𝔽(_targetOffset_ + _k_). 1. Perform ? TypedArraySetElement(_target_, _targetIndex_, _value_). 1. Set _k_ to _k_ + 1. @@ -42470,8 +42466,8 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.slice` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _srcArrayLength_ be TypedArrayLength(_taRecord_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _startIndex_ be 0. @@ -42482,22 +42478,22 @@

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

    1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_srcArrayLength_ + _relativeEnd_, 0). 1. Else, let _endIndex_ be min(_relativeEnd_, _srcArrayLength_). 1. Let _countBytes_ be max(_endIndex_ - _startIndex_, 0). - 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_countBytes_) »). + 1. Let _resultArray_ be ? TypedArraySpeciesCreate(_obj_, « 𝔽(_countBytes_) »). 1. If _countBytes_ > 0, then - 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_obj_, ~seq-cst~). 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(_O_). - 1. Let _targetType_ be TypedArrayElementType(_A_). + 1. Let _srcType_ be TypedArrayElementType(_obj_). + 1. Let _targetType_ be TypedArrayElementType(_resultArray_). 1. If _srcType_ 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 _O_.[[ViewedArrayBuffer]]. - 1. Let _targetBuffer_ be _A_.[[ViewedArrayBuffer]]. - 1. Let _elementSize_ be TypedArrayElementSize(_O_). - 1. Let _srcByteOffset_ be _O_.[[ByteOffset]]. + 1. Let _srcBuffer_ 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 _targetByteIndex_ be _A_.[[ByteOffset]]. + 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~). @@ -42508,12 +42504,12 @@

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

    1. Let _n_ be 0. 1. Let _k_ be _startIndex_. 1. Repeat, while _k_ < _endIndex_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Perform ! Set(_A_, ! ToString(𝔽(_n_)), _kValue_, *true*). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Perform ! Set(_resultArray_, ! ToString(𝔽(_n_)), _kValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Set _n_ to _n_ + 1. - 1. Return _A_. + 1. Return _resultArray_.

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

    @@ -42523,15 +42519,15 @@

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

    The interpretation and use of the arguments of this method are the same as for `Array.prototype.some` as defined in .

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ! Get(_obj_, _propertyKey_). + 1. Let _testResult_ be ToBoolean(? Call(_callback_, _thisArg_, « _kValue_, 𝔽(_k_), _obj_ »)). 1. If _testResult_ is *true*, return *true*. 1. Set _k_ to _k_ + 1. 1. Return *false*. @@ -42550,9 +42546,9 @@

    %TypedArray%.prototype.sort ( _comparator_ )

    1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. NOTE: The following closure performs a numeric comparison rather than the string comparison used in . - 1. Let _SortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparator_ and performs the following steps when called: + 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_, _len_, _sortCompare_, ~read-through-holes~). 1. Let _j_ be 0. 1. Repeat, while _j_ < _len_, 1. Perform ! Set(_obj_, ! ToString(𝔽(_j_)), _sortedList_[_j_], *true*). @@ -42569,11 +42565,11 @@

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

    This method returns a new _TypedArray_ whose element type is the element type of this _TypedArray_ and whose ArrayBuffer is the ArrayBuffer of this _TypedArray_, referencing the elements in the interval from _start_ (inclusive) to _end_ (exclusive). If either _start_ or _end_ is negative, it refers to an index from the end of the array, as opposed to from the beginning.

    It performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). - 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]]. - 1. Let _srcRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 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. Else, @@ -42582,10 +42578,10 @@

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

    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. Let _elementSize_ be TypedArrayElementSize(_O_). - 1. Let _srcByteOffset_ be _O_.[[ByteOffset]]. + 1. Let _elementSize_ be TypedArrayElementSize(_obj_). + 1. Let _srcByteOffset_ be _obj_.[[ByteOffset]]. 1. Let _beginByteOffset_ be _srcByteOffset_ + (_startIndex_ × _elementSize_). - 1. If _O_.[[ArrayLength]] is ~auto~ and _end_ is *undefined*, then + 1. If _obj_.[[ArrayLength]] is ~auto~ and _end_ is *undefined*, then 1. Let _argumentsList_ be « _buffer_, 𝔽(_beginByteOffset_) ». 1. Else, 1. If _end_ is *undefined*, let _relativeEnd_ be _srcLength_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). @@ -42594,7 +42590,7 @@

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

    1. Else, let _endIndex_ be min(_relativeEnd_, _srcLength_). 1. Let _newLength_ be max(_endIndex_ - _startIndex_, 0). 1. Let _argumentsList_ be « _buffer_, 𝔽(_beginByteOffset_), 𝔽(_newLength_) ». - 1. Return ? TypedArraySpeciesCreate(_O_, _argumentsList_). + 1. Return ? TypedArraySpeciesCreate(_obj_, _argumentsList_).

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

    @@ -42612,18 +42608,18 @@

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

    %TypedArray%.prototype.toReversed ( )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _A_ be ? TypedArrayCreateSameType(_O_, _len_). + 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _from_ be ! ToString(𝔽(_len_ - _k_ - 1)). - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _fromValue_ be ! Get(_O_, _from_). - 1. Perform ! Set(_A_, _Pk_, _fromValue_, *true*). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _fromValue_ be ! Get(_obj_, _from_). + 1. Perform ! Set(_resultArray_, _propertyKey_, _fromValue_, *true*). 1. Set _k_ to _k_ + 1. - 1. Return _A_. + 1. Return _resultArray_. @@ -42632,19 +42628,19 @@

    %TypedArray%.prototype.toSorted ( _comparator_ )

    This method performs the following steps when called:

    1. If _comparator_ is not *undefined* and IsCallable(_comparator_) is *false*, throw a *TypeError* exception. - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). - 1. Let _A_ be ? TypedArrayCreateSameType(_O_, _len_). + 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _len_). 1. NOTE: The following closure performs a numeric comparison rather than the string comparison used in . - 1. Let _SortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparator_ and performs the following steps when called: + 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(_O_, _len_, _SortCompare_, ~read-through-holes~). + 1. Let _sortedList_ be ? SortIndexedProperties(_obj_, _len_, _sortCompare_, ~read-through-holes~). 1. Let _j_ be 0. 1. Repeat, while _j_ < _len_, - 1. Perform ! Set(_A_, ! ToString(𝔽(_j_)), _sortedList_[_j_], *true*). + 1. Perform ! Set(_resultArray_, ! ToString(𝔽(_j_)), _sortedList_[_j_], *true*). 1. Set _j_ to _j_ + 1. - 1. Return _A_. + 1. Return _resultArray_. @@ -42657,9 +42653,9 @@

    %TypedArray%.prototype.toString ( )

    %TypedArray%.prototype.values ( )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? ValidateTypedArray(_O_, ~seq-cst~). - 1. Return CreateArrayIterator(_O_, ~value~). + 1. Let _obj_ be the *this* value. + 1. Perform ? ValidateTypedArray(_obj_, ~seq-cst~). + 1. Return CreateArrayIterator(_obj_, ~value~). @@ -42667,24 +42663,24 @@

    %TypedArray%.prototype.values ( )

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

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Let _taRecord_ be ? ValidateTypedArray(_obj_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). 1. If _relativeIndex_ ≥ 0, let _actualIndex_ be _relativeIndex_. 1. Else, let _actualIndex_ be _len_ + _relativeIndex_. - 1. If _O_.[[ContentType]] is ~bigint~, let _numericValue_ be ? ToBigInt(_value_). + 1. If _obj_.[[ContentType]] is ~bigint~, let _numericValue_ be ? ToBigInt(_value_). 1. Else, let _numericValue_ be ? ToNumber(_value_). - 1. If IsValidIntegerIndex(_O_, 𝔽(_actualIndex_)) is *false*, throw a *RangeError* exception. - 1. Let _A_ be ? TypedArrayCreateSameType(_O_, _len_). + 1. If IsValidIntegerIndex(_obj_, 𝔽(_actualIndex_)) is *false*, throw a *RangeError* exception. + 1. Let _resultArray_ be ? TypedArrayCreateSameType(_obj_, _len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. If _k_ = _actualIndex_, let _fromValue_ be _numericValue_. - 1. Else, let _fromValue_ be ! Get(_O_, _Pk_). - 1. Perform ! Set(_A_, _Pk_, _fromValue_, *true*). + 1. Else, let _fromValue_ be ! Get(_obj_, _propertyKey_). + 1. Perform ! Set(_resultArray_, _propertyKey_, _fromValue_, *true*). 1. Set _k_ to _k_ + 1. - 1. Return _A_. + 1. Return _resultArray_. @@ -42697,10 +42693,10 @@

    %TypedArray%.prototype [ %Symbol.iterator% ] ( )

    get %TypedArray%.prototype [ %Symbol.toStringTag% ]

    %TypedArray%`.prototype[%Symbol.toStringTag%]` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, return *undefined*. - 1. If _O_ does not have a [[TypedArrayName]] internal slot, return *undefined*. - 1. Let _name_ be _O_.[[TypedArrayName]]. + 1. Let _obj_ be the *this* value. + 1. If _obj_ is not an Object, return *undefined*. + 1. If _obj_ does not have a [[TypedArrayName]] internal slot, return *undefined*. + 1. Let _name_ be _obj_.[[TypedArrayName]]. 1. Assert: _name_ is a String. 1. Return _name_. @@ -42778,16 +42774,16 @@

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

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

    TypedArrayElementSize ( - _O_: a TypedArray, + _obj_: a TypedArray, ): a non-negative integer

    - 1. Return the Element Size value specified in for _O_.[[TypedArrayName]]. + 1. Return the Element Size value specified in for _obj_.[[TypedArrayName]].

    TypedArrayElementType ( - _O_: a TypedArray, + _obj_: a TypedArray, ): a TypedArray element type

    - 1. Return the Element Type value specified in for _O_.[[TypedArrayName]]. + 1. Return the Element Type value specified in for _obj_.[[TypedArrayName]].
    @@ -42832,9 +42828,9 @@

    1. Assert: _x_ is a Number and _y_ is a Number, or _x_ is a BigInt and _y_ is a BigInt. 1. If _comparator_ is not *undefined*, then - 1. Let _v_ be ? ToNumber(? Call(_comparator_, *undefined*, « _x_, _y_ »)). - 1. If _v_ is *NaN*, return *+0*𝔽. - 1. Return _v_. + 1. Let _result_ be ? ToNumber(? Call(_comparator_, *undefined*, « _x_, _y_ »)). + 1. If _result_ is *NaN*, return *+0*𝔽. + 1. Return _result_. 1. If _x_ is *NaN* and _y_ is *NaN*, return *+0*𝔽. 1. If _x_ is *NaN*, return *1*𝔽. 1. If _y_ is *NaN*, return *-1*𝔽. @@ -42871,23 +42867,23 @@

    _TypedArray_ ( ..._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 _O_ be ? AllocateTypedArray(_constructorName_, NewTarget, _proto_). + 1. Let _obj_ be ? AllocateTypedArray(_constructorName_, NewTarget, _proto_). 1. If _firstArgument_ has a [[TypedArrayName]] internal slot, then - 1. Perform ? InitializeTypedArrayFromTypedArray(_O_, _firstArgument_). + 1. Perform ? InitializeTypedArrayFromTypedArray(_obj_, _firstArgument_). 1. Else if _firstArgument_ 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(_O_, _firstArgument_, _byteOffset_, _length_). + 1. Perform ? InitializeTypedArrayFromArrayBuffer(_obj_, _firstArgument_, _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. If _usingIterator_ is not *undefined*, then 1. Let _values_ be ? IteratorToList(? GetIteratorFromMethod(_firstArgument_, _usingIterator_)). - 1. Perform ? InitializeTypedArrayFromList(_O_, _values_). + 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(_O_, _firstArgument_). - 1. Return _O_. + 1. Perform ? InitializeTypedArrayFromArrayLike(_obj_, _firstArgument_). + 1. Return _obj_. 1. Assert: _firstArgument_ is not an Object. 1. Let _elementLength_ be ? ToIndex(_firstArgument_). 1. Return ? AllocateTypedArray(_constructorName_, NewTarget, _proto_, _elementLength_). @@ -42926,7 +42922,7 @@

    InitializeTypedArrayFromTypedArray ( - _O_: a TypedArray, + _obj_: a TypedArray, _srcArray_: a TypedArray, ): either a normal completion containing ~unused~ or a throw completion

    @@ -42934,8 +42930,8 @@

    1. Let _srcData_ be _srcArray_.[[ViewedArrayBuffer]]. - 1. Let _elementType_ be TypedArrayElementType(_O_). - 1. Let _elementSize_ be TypedArrayElementSize(_O_). + 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]]. @@ -42947,7 +42943,7 @@

    1. Let _data_ be ? CloneArrayBuffer(_srcData_, _srcByteOffset_, _byteLength_). 1. Else, 1. Let _data_ be ? AllocateArrayBuffer(%ArrayBuffer%, _byteLength_). - 1. If _srcArray_.[[ContentType]] is not _O_.[[ContentType]], throw a *TypeError* exception. + 1. If _srcArray_.[[ContentType]] is not _obj_.[[ContentType]], throw a *TypeError* exception. 1. Let _srcByteIndex_ be _srcByteOffset_. 1. Let _targetByteIndex_ be 0. 1. Let _count_ be _elementLength_. @@ -42957,10 +42953,10 @@

    1. Set _srcByteIndex_ to _srcByteIndex_ + _srcElementSize_. 1. Set _targetByteIndex_ to _targetByteIndex_ + _elementSize_. 1. Set _count_ to _count_ - 1. - 1. Set _O_.[[ViewedArrayBuffer]] to _data_. - 1. Set _O_.[[ByteLength]] to _byteLength_. - 1. Set _O_.[[ByteOffset]] to 0. - 1. Set _O_.[[ArrayLength]] to _elementLength_. + 1. Set _obj_.[[ViewedArrayBuffer]] to _data_. + 1. Set _obj_.[[ByteLength]] to _byteLength_. + 1. Set _obj_.[[ByteOffset]] to 0. + 1. Set _obj_.[[ArrayLength]] to _elementLength_. 1. Return ~unused~. @@ -42968,7 +42964,7 @@

    InitializeTypedArrayFromArrayBuffer ( - _O_: a TypedArray, + _obj_: a TypedArray, _buffer_: an ArrayBuffer or a SharedArrayBuffer, _byteOffset_: an ECMAScript language value, _length_: an ECMAScript language value, @@ -42977,7 +42973,7 @@

    - 1. Let _elementSize_ be TypedArrayElementSize(_O_). + 1. Let _elementSize_ be TypedArrayElementSize(_obj_). 1. Let _offset_ be ? ToIndex(_byteOffset_). 1. If _offset_ modulo _elementSize_ ≠ 0, throw a *RangeError* exception. 1. Let _bufferIsFixedLength_ be IsFixedLengthArrayBuffer(_buffer_). @@ -42987,8 +42983,8 @@

    1. Let _bufferByteLength_ be ArrayBufferByteLength(_buffer_, ~seq-cst~). 1. If _length_ is *undefined* and _bufferIsFixedLength_ is *false*, then 1. If _offset_ > _bufferByteLength_, throw a *RangeError* exception. - 1. Set _O_.[[ByteLength]] to ~auto~. - 1. Set _O_.[[ArrayLength]] to ~auto~. + 1. Set _obj_.[[ByteLength]] to ~auto~. + 1. Set _obj_.[[ArrayLength]] to ~auto~. 1. Else, 1. If _length_ is *undefined*, then 1. If _bufferByteLength_ modulo _elementSize_ ≠ 0, throw a *RangeError* exception. @@ -42997,10 +42993,10 @@

    1. Else, 1. Let _newByteLength_ be _newLength_ × _elementSize_. 1. If _offset_ + _newByteLength_ > _bufferByteLength_, throw a *RangeError* exception. - 1. Set _O_.[[ByteLength]] to _newByteLength_. - 1. Set _O_.[[ArrayLength]] to _newByteLength_ / _elementSize_. - 1. Set _O_.[[ViewedArrayBuffer]] to _buffer_. - 1. Set _O_.[[ByteOffset]] to _offset_. + 1. Set _obj_.[[ByteLength]] to _newByteLength_. + 1. Set _obj_.[[ArrayLength]] to _newByteLength_ / _elementSize_. + 1. Set _obj_.[[ViewedArrayBuffer]] to _buffer_. + 1. Set _obj_.[[ByteOffset]] to _offset_. 1. Return ~unused~. @@ -43008,7 +43004,7 @@

    InitializeTypedArrayFromList ( - _O_: a TypedArray, + _obj_: a TypedArray, _values_: a List of ECMAScript language values, ): either a normal completion containing ~unused~ or a throw completion

    @@ -43016,13 +43012,13 @@

    1. Let _len_ be the number of elements in _values_. - 1. Perform ? AllocateTypedArrayBuffer(_O_, _len_). + 1. Perform ? AllocateTypedArrayBuffer(_obj_, _len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be the first element of _values_. 1. Remove the first element from _values_. - 1. Perform ? Set(_O_, _Pk_, _kValue_, *true*). + 1. Perform ? Set(_obj_, _propertyKey_, _kValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Assert: _values_ is now an empty List. 1. Return ~unused~. @@ -43032,7 +43028,7 @@

    InitializeTypedArrayFromArrayLike ( - _O_: a TypedArray, + _obj_: a TypedArray, _arrayLike_: an Object, but not a TypedArray or an ArrayBuffer, ): either a normal completion containing ~unused~ or a throw completion

    @@ -43040,12 +43036,12 @@

    1. Let _len_ be ? LengthOfArrayLike(_arrayLike_). - 1. Perform ? AllocateTypedArrayBuffer(_O_, _len_). + 1. Perform ? AllocateTypedArrayBuffer(_obj_, _len_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ? Get(_arrayLike_, _Pk_). - 1. Perform ? Set(_O_, _Pk_, _kValue_, *true*). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _kValue_ be ? Get(_arrayLike_, _propertyKey_). + 1. Perform ? Set(_obj_, _propertyKey_, _kValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Return ~unused~. @@ -43054,23 +43050,23 @@

    AllocateTypedArrayBuffer ( - _O_: a TypedArray, + _obj_: a TypedArray, _length_: a non-negative integer, ): either a normal completion containing ~unused~ or a throw completion

    description
    -
    It allocates and associates an ArrayBuffer with _O_.
    +
    It allocates and associates an ArrayBuffer with _obj_.
    - 1. Assert: _O_.[[ViewedArrayBuffer]] is *undefined*. - 1. Let _elementSize_ be TypedArrayElementSize(_O_). + 1. Assert: _obj_.[[ViewedArrayBuffer]] is *undefined*. + 1. Let _elementSize_ be TypedArrayElementSize(_obj_). 1. Let _byteLength_ be _elementSize_ × _length_. 1. Let _data_ be ? AllocateArrayBuffer(%ArrayBuffer%, _byteLength_). - 1. Set _O_.[[ViewedArrayBuffer]] to _data_. - 1. Set _O_.[[ByteLength]] to _byteLength_. - 1. Set _O_.[[ByteOffset]] to 0. - 1. Set _O_.[[ArrayLength]] to _length_. + 1. Set _obj_.[[ViewedArrayBuffer]] to _data_. + 1. Set _obj_.[[ByteLength]] to _byteLength_. + 1. Set _obj_.[[ByteOffset]] to 0. + 1. Set _obj_.[[ArrayLength]] to _length_. 1. Return ~unused~.
    @@ -43233,14 +43229,14 @@

    Uint8Array.prototype.setFromHex ( _string_ )

    Uint8Array.prototype.toBase64 ( [ _options_ ] )

    - 1. Let _O_ be the *this* value. - 1. Perform ? ValidateUint8Array(_O_). + 1. Let _obj_ be the *this* value. + 1. Perform ? ValidateUint8Array(_obj_). 1. Let _opts_ be ? GetOptionsObject(_options_). 1. Let _alphabet_ be ? Get(_opts_, *"alphabet"*). 1. If _alphabet_ is *undefined*, set _alphabet_ to *"base64"*. 1. If _alphabet_ is neither *"base64"* nor *"base64url"*, throw a *TypeError* exception. 1. Let _omitPadding_ be ToBoolean(? Get(_opts_, *"omitPadding"*)). - 1. Let _toEncode_ be ? GetUint8ArrayBytes(_O_). + 1. Let _toEncode_ be ? GetUint8ArrayBytes(_obj_). 1. If _alphabet_ is *"base64"*, then 1. Let _outAscii_ be the sequence of code points which results from encoding _toEncode_ according to the base64 encoding specified in section 4 of RFC 4648. Padding is included if and only if _omitPadding_ is *false*. 1. Else, @@ -43253,9 +43249,9 @@

    Uint8Array.prototype.toBase64 ( [ _options_ ] )

    Uint8Array.prototype.toHex ( )

    - 1. Let _O_ be the *this* value. - 1. Perform ? ValidateUint8Array(_O_). - 1. Let _toEncode_ be ? GetUint8ArrayBytes(_O_). + 1. Let _obj_ be the *this* value. + 1. Perform ? ValidateUint8Array(_obj_). + 1. Let _toEncode_ be ? GetUint8ArrayBytes(_obj_). 1. Let _out_ be the empty String. 1. For each byte _byte_ of _toEncode_, do 1. Let _hex_ be Number::toString(𝔽(_byte_), 16). @@ -43567,11 +43563,11 @@

    1. If _next_ is not an Object, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iteratorRecord_, _error_). - 1. Let _k_ be Completion(Get(_next_, *"0"*)). - 1. IfAbruptCloseIterator(_k_, _iteratorRecord_). - 1. Let _v_ be Completion(Get(_next_, *"1"*)). - 1. IfAbruptCloseIterator(_v_, _iteratorRecord_). - 1. Let _status_ be Completion(Call(_adder_, _target_, « _k_, _v_ »)). + 1. Let _key_ be Completion(Get(_next_, *"0"*)). + 1. IfAbruptCloseIterator(_key_, _iteratorRecord_). + 1. Let _value_ be Completion(Get(_next_, *"1"*)). + 1. IfAbruptCloseIterator(_value_, _iteratorRecord_). + 1. Let _status_ be Completion(Call(_adder_, _target_, « _key_, _value_ »)). 1. IfAbruptCloseIterator(_status_, _iteratorRecord_). @@ -43599,9 +43595,9 @@

    Map.groupBy ( _items_, _callback_ )

    1. Let _groups_ be ? GroupBy(_items_, _callback_, ~collection~). 1. Let _map_ be ! Construct(%Map%). - 1. For each Record { [[Key]], [[Elements]] } _g_ of _groups_, do - 1. Let _elements_ be CreateArrayFromList(_g_.[[Elements]]). - 1. Let _entry_ be the Record { [[Key]]: _g_.[[Key]], [[Value]]: _elements_ }. + 1. For each Record { [[Key]], [[Elements]] } _group_ of _groups_, do + 1. Let _elements_ be CreateArrayFromList(_group_.[[Elements]]). + 1. Let _entry_ be the Record { [[Key]]: _group_.[[Key]], [[Value]]: _elements_ }. 1. Append _entry_ to _map_.[[MapData]]. 1. Return _map_. @@ -43640,11 +43636,11 @@

    Properties of the Map Prototype Object

    Map.prototype.clear ( )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. Set _p_.[[Key]] to ~empty~. - 1. Set _p_.[[Value]] to ~empty~. + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. Set _entry_.[[Key]] to ~empty~. + 1. Set _entry_.[[Value]] to ~empty~. 1. Return *undefined*. @@ -43661,13 +43657,13 @@

    Map.prototype.constructor

    Map.prototype.delete ( _key_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_). - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, then - 1. Set _p_.[[Key]] to ~empty~. - 1. Set _p_.[[Value]] to ~empty~. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, then + 1. Set _entry_.[[Key]] to ~empty~. + 1. Set _entry_.[[Value]] to ~empty~. 1. Return *true*. 1. Return *false*. @@ -43680,8 +43676,8 @@

    Map.prototype.delete ( _key_ )

    Map.prototype.entries ( )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Return ? CreateMapIterator(_M_, ~key+value~). + 1. Let _map_ be the *this* value. + 1. Return ? CreateMapIterator(_map_, ~key+value~). @@ -43689,17 +43685,17 @@

    Map.prototype.entries ( )

    Map.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. Let _entries_ be _M_.[[MapData]]. + 1. Let _entries_ be _map_.[[MapData]]. 1. Let _numEntries_ be the number of elements in _entries_. 1. Let _index_ be 0. 1. Repeat, while _index_ < _numEntries_, 1. Let _e_ 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]], _M_ »). + 1. Perform ? Call(_callback_, _thisArg_, « _e_.[[Value]], _e_.[[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. Return *undefined*. @@ -43716,11 +43712,11 @@

    Map.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    Map.prototype.get ( _key_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_). - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]]. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return _entry_.[[Value]]. 1. Return *undefined*. @@ -43729,13 +43725,13 @@

    Map.prototype.get ( _key_ )

    Map.prototype.getOrInsert ( _key_, _value_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_). - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]]. - 1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. - 1. Append _p_ to _M_.[[MapData]]. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return _entry_.[[Value]]. + 1. Let _entry_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. + 1. Append _entry_ to _map_.[[MapData]]. 1. Return _value_. @@ -43744,20 +43740,20 @@

    Map.prototype.getOrInsert ( _key_, _value_ )

    Map.prototype.getOrInsertComputed ( _key_, _callback_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. 1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_). - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]]. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return _entry_.[[Value]]. 1. Let _value_ be ? Call(_callback_, *undefined*, « _key_ »). 1. NOTE: The Map may have been modified during execution of _callback_. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, then - 1. Set _p_.[[Value]] to _value_. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, then + 1. Set _entry_.[[Value]] to _value_. 1. Return _value_. - 1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. - 1. Append _p_ to _M_.[[MapData]]. + 1. Let _entry_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. + 1. Append _entry_ to _map_.[[MapData]]. 1. Return _value_. @@ -43766,11 +43762,11 @@

    Map.prototype.getOrInsertComputed ( _key_, _callback_ )

    Map.prototype.has ( _key_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_). - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return *true*. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return *true*. 1. Return *false*. @@ -43779,8 +43775,8 @@

    Map.prototype.has ( _key_ )

    Map.prototype.keys ( )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Return ? CreateMapIterator(_M_, ~key~). + 1. Let _map_ be the *this* value. + 1. Return ? CreateMapIterator(_map_, ~key~). @@ -43788,16 +43784,16 @@

    Map.prototype.keys ( )

    Map.prototype.set ( _key_, _value_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. Set _key_ to CanonicalizeKeyedCollectionKey(_key_). - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, then - 1. Set _p_.[[Value]] to _value_. - 1. Return _M_. - 1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. - 1. Append _p_ to _M_.[[MapData]]. - 1. Return _M_. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, then + 1. Set _entry_.[[Value]] to _value_. + 1. Return _map_. + 1. Let _entry_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. + 1. Append _entry_ to _map_.[[MapData]]. + 1. Return _map_. @@ -43805,11 +43801,11 @@

    Map.prototype.set ( _key_, _value_ )

    get Map.prototype.size

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

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[MapData]]). + 1. Let _map_ be the *this* value. + 1. Perform ? RequireInternalSlot(_map_, [[MapData]]). 1. Let _count_ be 0. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do - 1. If _p_.[[Key]] is not ~empty~, set _count_ to _count_ + 1. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _map_.[[MapData]], do + 1. If _entry_.[[Key]] is not ~empty~, set _count_ to _count_ + 1. 1. Return 𝔽(_count_). @@ -43818,8 +43814,8 @@

    get Map.prototype.size

    Map.prototype.values ( )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Return ? CreateMapIterator(_M_, ~value~). + 1. Let _map_ be the *this* value. + 1. Return ? CreateMapIterator(_map_, ~value~). @@ -43862,16 +43858,16 @@

    1. Let _index_ be 0. 1. Let _numEntries_ be the number of elements in _entries_. 1. Repeat, while _index_ < _numEntries_, - 1. Let _e_ be _entries_[_index_]. + 1. Let _entry_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. - 1. If _e_.[[Key]] is not ~empty~, then + 1. If _entry_.[[Key]] is not ~empty~, then 1. If _kind_ is ~key~, then - 1. Let _result_ be _e_.[[Key]]. + 1. Let _result_ be _entry_.[[Key]]. 1. Else if _kind_ is ~value~, then - 1. Let _result_ be _e_.[[Value]]. + 1. Let _result_ be _entry_.[[Value]]. 1. Else, 1. Assert: _kind_ is ~key+value~. - 1. Let _result_ be CreateArrayFromList(« _e_.[[Key]], _e_.[[Value]] »). + 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_. @@ -44129,14 +44125,14 @@

    Properties of the Set Prototype Object

    Set.prototype.add ( _value_ )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Set _value_ to CanonicalizeKeyedCollectionKey(_value_). - 1. For each element _e_ of _S_.[[SetData]], do - 1. If _e_ is not ~empty~ and SameValue(_e_, _value_) is *true*, then - 1. Return _S_. - 1. Append _value_ to _S_.[[SetData]]. - 1. Return _S_. + 1. For each element _entry_ of _set_.[[SetData]], do + 1. If _entry_ is not ~empty~ and SameValue(_entry_, _value_) is *true*, then + 1. Return _set_. + 1. Append _value_ to _set_.[[SetData]]. + 1. Return _set_. @@ -44144,10 +44140,10 @@

    Set.prototype.add ( _value_ )

    Set.prototype.clear ( )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[SetData]]). - 1. For each element _e_ of _S_.[[SetData]], do - 1. Replace the element of _S_.[[SetData]] whose value is _e_ with an element whose value is ~empty~. + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). + 1. For each element _entry_ of _set_.[[SetData]], do + 1. Replace the element of _set_.[[SetData]] whose value is _entry_ with an element whose value is ~empty~. 1. Return *undefined*. @@ -44164,12 +44160,12 @@

    Set.prototype.constructor

    Set.prototype.delete ( _value_ )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Set _value_ to CanonicalizeKeyedCollectionKey(_value_). - 1. For each element _e_ of _S_.[[SetData]], do - 1. If _e_ is not ~empty~ and SameValue(_e_, _value_) is *true*, then - 1. Replace the element of _S_.[[SetData]] whose value is _e_ with an element whose value is ~empty~. + 1. For each element _entry_ of _set_.[[SetData]], do + 1. If _entry_ is not ~empty~ and SameValue(_entry_, _value_) is *true*, then + 1. Replace the element of _set_.[[SetData]] whose value is _entry_ with an element whose value is ~empty~. 1. Return *true*. 1. Return *false*. @@ -44182,17 +44178,17 @@

    Set.prototype.delete ( _value_ )

    Set.prototype.difference ( _other_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. Let _resultSetData_ be a copy of _O_.[[SetData]]. - 1. If SetDataSize(_O_.[[SetData]]) ≤ _otherRec_.[[Size]], then - 1. Let _thisSize_ be the number of elements in _O_.[[SetData]]. + 1. Let _resultSetData_ be a copy of _set_.[[SetData]]. + 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRec_.[[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 _e_ be _resultSetData_[_index_]. - 1. If _e_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _e_ »)). + 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. If _inOther_ is *true*, then 1. Set _resultSetData_[_index_] to ~empty~. 1. Set _index_ to _index_ + 1. @@ -44216,8 +44212,8 @@

    Set.prototype.difference ( _other_ )

    Set.prototype.entries ( )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Return ? CreateSetIterator(_S_, ~key+value~). + 1. Let _set_ be the *this* value. + 1. Return ? CreateSetIterator(_set_, ~key+value~).

    For iteration purposes, a Set appears similar to a Map where each entry has the same value for its key and value.

    @@ -44228,17 +44224,17 @@

    Set.prototype.entries ( )

    Set.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. Let _entries_ be _S_.[[SetData]]. + 1. Let _entries_ be _set_.[[SetData]]. 1. Let _numEntries_ be the number of elements in _entries_. 1. Let _index_ be 0. 1. Repeat, while _index_ < _numEntries_, - 1. Let _e_ be _entries_[_index_]. + 1. Let _entry_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. - 1. If _e_ is not ~empty~, then - 1. Perform ? Call(_callback_, _thisArg_, « _e_, _e_, _S_ »). + 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. Return *undefined*. @@ -44257,11 +44253,11 @@

    Set.prototype.forEach ( _callback_ [ , _thisArg_ ] )

    Set.prototype.has ( _value_ )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Set _value_ to CanonicalizeKeyedCollectionKey(_value_). - 1. For each element _e_ of _S_.[[SetData]], do - 1. If _e_ is not ~empty~ and SameValue(_e_, _value_) is *true*, return *true*. + 1. For each element _entry_ of _set_.[[SetData]], do + 1. If _entry_ is not ~empty~ and SameValue(_entry_, _value_) is *true*, return *true*. 1. Return *false*. @@ -44270,24 +44266,24 @@

    Set.prototype.has ( _value_ )

    Set.prototype.intersection ( _other_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Let _otherRec_ be ? GetSetRecord(_other_). 1. Let _resultSetData_ be a new empty List. - 1. If SetDataSize(_O_.[[SetData]]) ≤ _otherRec_.[[Size]], then - 1. Let _thisSize_ be the number of elements in _O_.[[SetData]]. + 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRec_.[[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 _e_ be _O_.[[SetData]][_index_]. + 1. Let _entry_ be _set_.[[SetData]][_index_]. 1. Set _index_ to _index_ + 1. - 1. If _e_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _e_ »)). + 1. If _entry_ is not ~empty~, then + 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[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 _O_.[[SetData]], which can cause the same element to be visited twice during this iteration. - 1. If SetDataHas(_resultSetData_, _e_) is *false*, then - 1. Append _e_ to _resultSetData_. - 1. NOTE: The number of elements in _O_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. - 1. Set _thisSize_ to the number of elements in _O_.[[SetData]]. + 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. 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. Set _thisSize_ to the number of elements in _set_.[[SetData]]. 1. Else, 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). 1. Let _next_ be ~not-started~. @@ -44295,7 +44291,7 @@

    Set.prototype.intersection ( _other_ )

    1. Set _next_ to ? IteratorStepValue(_keysIter_). 1. If _next_ is not ~done~, then 1. Set _next_ to CanonicalizeKeyedCollectionKey(_next_). - 1. Let _inThis_ be SetDataHas(_O_.[[SetData]], _next_). + 1. Let _inThis_ be SetDataHas(_set_.[[SetData]], _next_). 1. If _inThis_ is *true*, then 1. NOTE: Because _other_ is an arbitrary object, it is possible for its *"keys"* iterator to produce the same value more than once. 1. If SetDataHas(_resultSetData_, _next_) is *false*, then @@ -44310,27 +44306,27 @@

    Set.prototype.intersection ( _other_ )

    Set.prototype.isDisjointFrom ( _other_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. If SetDataSize(_O_.[[SetData]]) ≤ _otherRec_.[[Size]], then - 1. Let _thisSize_ be the number of elements in _O_.[[SetData]]. + 1. If SetDataSize(_set_.[[SetData]]) ≤ _otherRec_.[[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 _e_ be _O_.[[SetData]][_index_]. + 1. Let _entry_ be _set_.[[SetData]][_index_]. 1. Set _index_ to _index_ + 1. - 1. If _e_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _e_ »)). + 1. If _entry_ is not ~empty~, then + 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _entry_ »)). 1. If _inOther_ is *true*, return *false*. - 1. NOTE: The number of elements in _O_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. - 1. Set _thisSize_ to the number of elements in _O_.[[SetData]]. + 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRec_.[[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 _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, 1. Set _next_ to ? IteratorStepValue(_keysIter_). 1. If _next_ is not ~done~, then - 1. If SetDataHas(_O_.[[SetData]], _next_) is *true*, then + 1. If SetDataHas(_set_.[[SetData]], _next_) is *true*, then 1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)). 1. Return *false*. 1. Return *true*. @@ -44341,20 +44337,20 @@

    Set.prototype.isDisjointFrom ( _other_ )

    Set.prototype.isSubsetOf ( _other_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. If SetDataSize(_O_.[[SetData]]) > _otherRec_.[[Size]], return *false*. - 1. Let _thisSize_ be the number of elements in _O_.[[SetData]]. + 1. If SetDataSize(_set_.[[SetData]]) > _otherRec_.[[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 _e_ be _O_.[[SetData]][_index_]. + 1. Let _entry_ be _set_.[[SetData]][_index_]. 1. Set _index_ to _index_ + 1. - 1. If _e_ is not ~empty~, then - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _e_ »)). + 1. If _entry_ is not ~empty~, then + 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[SetObject]], « _entry_ »)). 1. If _inOther_ is *false*, return *false*. - 1. NOTE: The number of elements in _O_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. - 1. Set _thisSize_ to the number of elements in _O_.[[SetData]]. + 1. NOTE: The number of elements in _set_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. + 1. Set _thisSize_ to the number of elements in _set_.[[SetData]]. 1. Return *true*. @@ -44363,16 +44359,16 @@

    Set.prototype.isSubsetOf ( _other_ )

    Set.prototype.isSupersetOf ( _other_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). 1. Let _otherRec_ be ? GetSetRecord(_other_). - 1. If SetDataSize(_O_.[[SetData]]) < _otherRec_.[[Size]], return *false*. + 1. If SetDataSize(_set_.[[SetData]]) < _otherRec_.[[Size]], return *false*. 1. Let _keysIter_ be ? GetIteratorFromMethod(_otherRec_.[[SetObject]], _otherRec_.[[Keys]]). 1. Let _next_ be ~not-started~. 1. Repeat, while _next_ is not ~done~, 1. Set _next_ to ? IteratorStepValue(_keysIter_). 1. If _next_ is not ~done~, then - 1. If SetDataHas(_O_.[[SetData]], _next_) is *false*, then + 1. If SetDataHas(_set_.[[SetData]], _next_) is *false*, then 1. Perform ? IteratorClose(_keysIter_, NormalCompletion(~unused~)). 1. Return *false*. 1. Return *true*. @@ -44391,9 +44387,9 @@

    Set.prototype.keys ( )

    get Set.prototype.size

    `Set.prototype.size` 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. Perform ? RequireInternalSlot(_S_, [[SetData]]). - 1. Let _size_ be SetDataSize(_S_.[[SetData]]). + 1. Let _set_ be the *this* value. + 1. Perform ? RequireInternalSlot(_set_, [[SetData]]). + 1. Let _size_ be SetDataSize(_set_.[[SetData]]). 1. Return 𝔽(_size_). @@ -44402,11 +44398,11 @@

    get Set.prototype.size

    Set.prototype.symmetricDifference ( _other_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[SetData]]). + 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 _resultSetData_ be a copy of _O_.[[SetData]]. + 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_). @@ -44414,7 +44410,7 @@

    Set.prototype.symmetricDifference ( _other_ )

    1. Set _next_ to CanonicalizeKeyedCollectionKey(_next_). 1. Let _resultIndex_ be SetDataIndex(_resultSetData_, _next_). 1. If _resultIndex_ is ~not-found~, let _alreadyInResult_ be *false*; else let _alreadyInResult_ be *true*. - 1. If SetDataHas(_O_.[[SetData]], _next_) is *true*, then + 1. If SetDataHas(_set_.[[SetData]], _next_) is *true*, then 1. If _alreadyInResult_ is *true*, set _resultSetData_[_resultIndex_] to ~empty~. 1. Else, 1. If _alreadyInResult_ is *false*, append _next_ to _resultSetData_. @@ -44428,11 +44424,11 @@

    Set.prototype.symmetricDifference ( _other_ )

    Set.prototype.union ( _other_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[SetData]]). + 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 _resultSetData_ be a copy of _O_.[[SetData]]. + 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_). @@ -44450,8 +44446,8 @@

    Set.prototype.union ( _other_ )

    Set.prototype.values ( )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Return ? CreateSetIterator(_S_, ~value~). + 1. Let _set_ be the *this* value. + 1. Return ? CreateSetIterator(_set_, ~value~). @@ -44494,15 +44490,15 @@

    1. Let _entries_ be _set_.[[SetData]]. 1. Let _numEntries_ be the number of elements in _entries_. 1. Repeat, while _index_ < _numEntries_, - 1. Let _e_ be _entries_[_index_]. + 1. Let _entry_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. - 1. If _e_ is not ~empty~, then + 1. If _entry_ is not ~empty~, then 1. If _kind_ is ~key+value~, then - 1. Let _result_ be CreateArrayFromList(« _e_, _e_ »). + 1. Let _result_ be CreateArrayFromList(« _entry_, _entry_ »). 1. Perform ? GeneratorYield(CreateIteratorResultObject(_result_, *false*)). 1. Else, 1. Assert: _kind_ is ~value~. - 1. Perform ? GeneratorYield(CreateIteratorResultObject(_e_, *false*)). + 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. Return NormalCompletion(~unused~). @@ -44610,13 +44606,13 @@

    WeakMap.prototype.constructor

    WeakMap.prototype.delete ( _key_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[WeakMapData]]). + 1. Let _weakMap_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakMap_, [[WeakMapData]]). 1. If CanBeHeldWeakly(_key_) is *false*, return *false*. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, then - 1. Set _p_.[[Key]] to ~empty~. - 1. Set _p_.[[Value]] to ~empty~. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _weakMap_.[[WeakMapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, then + 1. Set _entry_.[[Key]] to ~empty~. + 1. Set _entry_.[[Value]] to ~empty~. 1. Return *true*. 1. Return *false*. @@ -44629,11 +44625,11 @@

    WeakMap.prototype.delete ( _key_ )

    WeakMap.prototype.get ( _key_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[WeakMapData]]). + 1. Let _weakMap_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakMap_, [[WeakMapData]]). 1. If CanBeHeldWeakly(_key_) is *false*, return *undefined*. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]]. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _weakMap_.[[WeakMapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return _entry_.[[Value]]. 1. Return *undefined*. @@ -44642,13 +44638,13 @@

    WeakMap.prototype.get ( _key_ )

    WeakMap.prototype.getOrInsert ( _key_, _value_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[WeakMapData]]). + 1. Let _weakMap_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakMap_, [[WeakMapData]]). 1. If CanBeHeldWeakly(_key_) is *false*, throw a *TypeError* exception. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]]. - 1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. - 1. Append _p_ to _M_.[[WeakMapData]]. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _weakMap_.[[WeakMapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return _entry_.[[Value]]. + 1. Let _entry_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. + 1. Append _entry_ to _weakMap_.[[WeakMapData]]. 1. Return _value_. @@ -44657,20 +44653,20 @@

    WeakMap.prototype.getOrInsert ( _key_, _value_ )

    WeakMap.prototype.getOrInsertComputed ( _key_, _callback_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[WeakMapData]]). + 1. Let _weakMap_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakMap_, [[WeakMapData]]). 1. If CanBeHeldWeakly(_key_) is *false*, throw a *TypeError* exception. 1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]]. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _weakMap_.[[WeakMapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return _entry_.[[Value]]. 1. Let _value_ be ? Call(_callback_, *undefined*, « _key_ »). 1. NOTE: The WeakMap may have been modified during execution of _callback_. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, then - 1. Set _p_.[[Value]] to _value_. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _weakMap_.[[WeakMapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, then + 1. Set _entry_.[[Value]] to _value_. 1. Return _value_. - 1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. - 1. Append _p_ to _M_.[[WeakMapData]]. + 1. Let _entry_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. + 1. Append _entry_ to _weakMap_.[[WeakMapData]]. 1. Return _value_. @@ -44679,11 +44675,11 @@

    WeakMap.prototype.getOrInsertComputed ( _key_, _callback_ )

    WeakMap.prototype.has ( _key_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[WeakMapData]]). + 1. Let _weakMap_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakMap_, [[WeakMapData]]). 1. If CanBeHeldWeakly(_key_) is *false*, return *false*. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return *true*. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _weakMap_.[[WeakMapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, return *true*. 1. Return *false*. @@ -44692,16 +44688,16 @@

    WeakMap.prototype.has ( _key_ )

    WeakMap.prototype.set ( _key_, _value_ )

    This method performs the following steps when called:

    - 1. Let _M_ be the *this* value. - 1. Perform ? RequireInternalSlot(_M_, [[WeakMapData]]). + 1. Let _weakMap_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakMap_, [[WeakMapData]]). 1. If CanBeHeldWeakly(_key_) is *false*, throw a *TypeError* exception. - 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do - 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, then - 1. Set _p_.[[Value]] to _value_. - 1. Return _M_. - 1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. - 1. Append _p_ to _M_.[[WeakMapData]]. - 1. Return _M_. + 1. For each Record { [[Key]], [[Value]] } _entry_ of _weakMap_.[[WeakMapData]], do + 1. If _entry_.[[Key]] is not ~empty~ and SameValue(_entry_.[[Key]], _key_) is *true*, then + 1. Set _entry_.[[Value]] to _value_. + 1. Return _weakMap_. + 1. Let _entry_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }. + 1. Append _entry_ to _weakMap_.[[WeakMapData]]. + 1. Return _weakMap_. @@ -44787,14 +44783,14 @@

    Properties of the WeakSet Prototype Object

    WeakSet.prototype.add ( _value_ )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[WeakSetData]]). + 1. Let _weakSet_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakSet_, [[WeakSetData]]). 1. If CanBeHeldWeakly(_value_) is *false*, throw a *TypeError* exception. - 1. For each element _e_ of _S_.[[WeakSetData]], do - 1. If _e_ is not ~empty~ and SameValue(_e_, _value_) is *true*, then - 1. Return _S_. - 1. Append _value_ to _S_.[[WeakSetData]]. - 1. Return _S_. + 1. For each element _entry_ of _weakSet_.[[WeakSetData]], do + 1. If _entry_ is not ~empty~ and SameValue(_entry_, _value_) is *true*, then + 1. Return _weakSet_. + 1. Append _value_ to _weakSet_.[[WeakSetData]]. + 1. Return _weakSet_. @@ -44807,12 +44803,12 @@

    WeakSet.prototype.constructor

    WeakSet.prototype.delete ( _value_ )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[WeakSetData]]). + 1. Let _weakSet_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakSet_, [[WeakSetData]]). 1. If CanBeHeldWeakly(_value_) is *false*, return *false*. - 1. For each element _e_ of _S_.[[WeakSetData]], do - 1. If _e_ is not ~empty~ and SameValue(_e_, _value_) is *true*, then - 1. Replace the element of _S_.[[WeakSetData]] whose value is _e_ with an element whose value is ~empty~. + 1. For each element _entry_ of _weakSet_.[[WeakSetData]], do + 1. If _entry_ is not ~empty~ and SameValue(_entry_, _value_) is *true*, then + 1. Replace the element of _weakSet_.[[WeakSetData]] whose value is _entry_ with an element whose value is ~empty~. 1. Return *true*. 1. Return *false*. @@ -44825,11 +44821,11 @@

    WeakSet.prototype.delete ( _value_ )

    WeakSet.prototype.has ( _value_ )

    This method performs the following steps when called:

    - 1. Let _S_ be the *this* value. - 1. Perform ? RequireInternalSlot(_S_, [[WeakSetData]]). + 1. Let _weakSet_ be the *this* value. + 1. Perform ? RequireInternalSlot(_weakSet_, [[WeakSetData]]). 1. If CanBeHeldWeakly(_value_) is *false*, return *false*. - 1. For each element _e_ of _S_.[[WeakSetData]], do - 1. If _e_ is not ~empty~ and SameValue(_e_, _value_) is *true*, return *true*. + 1. For each element _entry_ of _weakSet_.[[WeakSetData]], do + 1. If _entry_ is not ~empty~ and SameValue(_entry_, _value_) is *true*, return *true*. 1. Return *false*. @@ -44943,8 +44939,8 @@

    1. If IsGrowableSharedArrayBuffer(_arrayBuffer_) is *true*, then 1. Let _bufferByteLengthBlock_ be _arrayBuffer_.[[ArrayBufferByteLengthData]]. 1. Let _rawLength_ be GetRawBytesFromSharedBlock(_bufferByteLengthBlock_, 0, ~biguint64~, *true*, _order_). - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _isLittleEndian_ be _AR_.[[LittleEndian]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _isLittleEndian_ be _agentRecord_.[[LittleEndian]]. 1. Return ℝ(RawBytesToNumeric(~biguint64~, _rawLength_, _isLittleEndian_)). 1. Assert: IsDetachedBuffer(_arrayBuffer_) is *false*. 1. Return _arrayBuffer_.[[ArrayBufferByteLength]]. @@ -45208,8 +45204,8 @@

    1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. If _isTypedArray_ is *true* and IsNoTearConfiguration(_type_, _order_) is *true*, let _noTear_ be *true*; else let _noTear_ be *false*. 1. Let _rawValue_ be a List of length _elementSize_ whose elements are nondeterministically chosen byte values. @@ -45246,8 +45242,8 @@

    1. Let _rawValue_ be a List whose elements are bytes from _block_ at indices in the interval from _byteIndex_ (inclusive) to _byteIndex_ + _elementSize_ (exclusive). 1. Assert: The number of elements in _rawValue_ is _elementSize_. 1. If _isLittleEndian_ is not present, then - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Set _isLittleEndian_ to _AR_.[[LittleEndian]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Set _isLittleEndian_ to _agentRecord_.[[LittleEndian]]. 1. Return RawBytesToNumeric(_type_, _rawValue_, _isLittleEndian_). @@ -45302,12 +45298,12 @@

    1. Assert: _value_ is a BigInt if IsBigIntElementType(_type_) is *true*; else, _value_ is a Number. 1. Let _block_ be _arrayBuffer_.[[ArrayBufferData]]. 1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. - 1. Let _AR_ be the Agent Record of the surrounding agent. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. 1. If _isLittleEndian_ is not present, then - 1. Set _isLittleEndian_ to _AR_.[[LittleEndian]]. + 1. Set _isLittleEndian_ to _agentRecord_.[[LittleEndian]]. 1. Let _rawBytes_ be NumericToRawBytes(_type_, _value_, _isLittleEndian_). 1. If IsSharedArrayBuffer(_arrayBuffer_) is *true*, then - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. If _isTypedArray_ is *true* and IsNoTearConfiguration(_type_, _order_) is *true*, let _noTear_ be *true*; else let _noTear_ be *false*. 1. Append WriteSharedMemory { [[Order]]: _order_, [[NoTear]]: _noTear_, [[Block]]: _block_, [[ByteIndex]]: _byteIndex_, [[ElementSize]]: _elementSize_, [[Payload]]: _rawBytes_ } to _eventsRecord_.[[EventList]]. @@ -45335,11 +45331,11 @@

    1. Assert: _value_ is a BigInt if IsBigIntElementType(_type_) is *true*; else, _value_ is a Number. 1. Let _block_ be _arrayBuffer_.[[ArrayBufferData]]. 1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _isLittleEndian_ be _AR_.[[LittleEndian]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _isLittleEndian_ be _agentRecord_.[[LittleEndian]]. 1. Let _rawBytes_ be NumericToRawBytes(_type_, _value_, _isLittleEndian_). 1. If IsSharedArrayBuffer(_arrayBuffer_) is *true*, then - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. Let _rawBytesRead_ be a List of length _elementSize_ whose elements are nondeterministically chosen byte values. 1. NOTE: In implementations, _rawBytesRead_ is the result of a load-link, of a load-exclusive, or of an operand of a read-modify-write instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. @@ -45429,11 +45425,11 @@

    Properties of the ArrayBuffer Prototype Object

    get ArrayBuffer.prototype.byteLength

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). - 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. If IsDetachedBuffer(_O_) is *true*, return *+0*𝔽. - 1. Let _length_ be _O_.[[ArrayBufferByteLength]]. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). + 1. If IsSharedArrayBuffer(_obj_) is *true*, throw a *TypeError* exception. + 1. If IsDetachedBuffer(_obj_) is *true*, return *+0*𝔽. + 1. Let _length_ be _obj_.[[ArrayBufferByteLength]]. 1. Return 𝔽(_length_). @@ -45447,10 +45443,10 @@

    ArrayBuffer.prototype.constructor

    get ArrayBuffer.prototype.detached

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). - 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. Return IsDetachedBuffer(_O_). + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). + 1. If IsSharedArrayBuffer(_obj_) is *true*, throw a *TypeError* exception. + 1. Return IsDetachedBuffer(_obj_). @@ -45458,14 +45454,14 @@

    get ArrayBuffer.prototype.detached

    get ArrayBuffer.prototype.maxByteLength

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). - 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. If IsDetachedBuffer(_O_) is *true*, return *+0*𝔽. - 1. If IsFixedLengthArrayBuffer(_O_) is *true*, then - 1. Let _length_ be _O_.[[ArrayBufferByteLength]]. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). + 1. If IsSharedArrayBuffer(_obj_) is *true*, throw a *TypeError* exception. + 1. If IsDetachedBuffer(_obj_) is *true*, return *+0*𝔽. + 1. If IsFixedLengthArrayBuffer(_obj_) is *true*, then + 1. Let _length_ be _obj_.[[ArrayBufferByteLength]]. 1. Else, - 1. Let _length_ be _O_.[[ArrayBufferMaxByteLength]]. + 1. Let _length_ be _obj_.[[ArrayBufferMaxByteLength]]. 1. Return 𝔽(_length_). @@ -45474,10 +45470,10 @@

    get ArrayBuffer.prototype.maxByteLength

    get ArrayBuffer.prototype.resizable

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). - 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. If IsFixedLengthArrayBuffer(_O_) is *false*, return *true*. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). + 1. If IsSharedArrayBuffer(_obj_) is *true*, throw a *TypeError* exception. + 1. If IsFixedLengthArrayBuffer(_obj_) is *false*, return *true*. 1. Return *false*. @@ -45486,21 +45482,21 @@

    get ArrayBuffer.prototype.resizable

    ArrayBuffer.prototype.resize ( _newLength_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferMaxByteLength]]). - 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferMaxByteLength]]). + 1. If IsSharedArrayBuffer(_obj_) is *true*, throw a *TypeError* exception. 1. Let _newByteLength_ be ? ToIndex(_newLength_). - 1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. If _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception. - 1. Let _hostHandled_ be ? HostResizeArrayBuffer(_O_, _newByteLength_). + 1. If IsDetachedBuffer(_obj_) is *true*, throw a *TypeError* exception. + 1. If _newByteLength_ > _obj_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception. + 1. Let _hostHandled_ be ? HostResizeArrayBuffer(_obj_, _newByteLength_). 1. If _hostHandled_ is ~handled~, return *undefined*. - 1. Let _oldBlock_ be _O_.[[ArrayBufferData]]. + 1. Let _oldBlock_ be _obj_.[[ArrayBufferData]]. 1. Let _newBlock_ be ? CreateByteDataBlock(_newByteLength_). - 1. Let _copyLength_ be min(_newByteLength_, _O_.[[ArrayBufferByteLength]]). + 1. Let _copyLength_ be min(_newByteLength_, _obj_.[[ArrayBufferByteLength]]). 1. Perform CopyDataBlockBytes(_newBlock_, 0, _oldBlock_, 0, _copyLength_). 1. NOTE: Neither creation of the new Data Block nor copying from the old Data Block are observable. Implementations may implement this method as in-place growth or shrinkage. - 1. Set _O_.[[ArrayBufferData]] to _newBlock_. - 1. Set _O_.[[ArrayBufferByteLength]] to _newByteLength_. + 1. Set _obj_.[[ArrayBufferData]] to _newBlock_. + 1. Set _obj_.[[ArrayBufferByteLength]] to _newByteLength_. 1. Return *undefined*. @@ -45509,11 +45505,11 @@

    ArrayBuffer.prototype.resize ( _newLength_ )

    ArrayBuffer.prototype.slice ( _start_, _end_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). - 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. Let _len_ be _O_.[[ArrayBufferByteLength]]. + 1. Let _obj_ be the *this* value. + 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 _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _first_ be 0. 1. Else if _relativeStart_ < 0, let _first_ be max(_len_ + _relativeStart_, 0). @@ -45523,18 +45519,18 @@

    ArrayBuffer.prototype.slice ( _start_, _end_ )

    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. Let _ctor_ be ? SpeciesConstructor(_O_, %ArrayBuffer%). + 1. Let _ctor_ be ? SpeciesConstructor(_obj_, %ArrayBuffer%). 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLen_) »). 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_, _O_) 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. NOTE: Side-effects of the above steps may have detached or resized _O_. - 1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. Let _fromBuf_ be _O_.[[ArrayBufferData]]. + 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 _O_.[[ArrayBufferByteLength]]. + 1. Let _currentLen_ be _obj_.[[ArrayBufferByteLength]]. 1. If _first_ < _currentLen_, then 1. Let _count_ be min(_newLen_, _currentLen_ - _first_). 1. Perform CopyDataBlockBytes(_toBuf_, 0, _fromBuf_, _first_, _count_). @@ -45546,8 +45542,8 @@

    ArrayBuffer.prototype.slice ( _start_, _end_ )

    ArrayBuffer.prototype.transfer ( [ _newLength_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Return ? ArrayBufferCopyAndDetach(_O_, _newLength_, ~preserve-resizability~). + 1. Let _obj_ be the *this* value. + 1. Return ? ArrayBufferCopyAndDetach(_obj_, _newLength_, ~preserve-resizability~). @@ -45555,8 +45551,8 @@

    ArrayBuffer.prototype.transfer ( [ _newLength_ ] )

    ArrayBuffer.prototype.transferToFixedLength ( [ _newLength_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Return ? ArrayBufferCopyAndDetach(_O_, _newLength_, ~fixed-length~). + 1. Let _obj_ be the *this* value. + 1. Return ? ArrayBufferCopyAndDetach(_obj_, _newLength_, ~fixed-length~). @@ -45687,7 +45683,7 @@

    The implementation of HostGrowSharedArrayBuffer must conform to the following requirements:

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

    Properties of the SharedArrayBuffer Prototype Object

    get SharedArrayBuffer.prototype.byteLength

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

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

    SharedArrayBuffer.prototype.constructor

    SharedArrayBuffer.prototype.grow ( _newLength_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferMaxByteLength]]). - 1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferMaxByteLength]]). + 1. If IsSharedArrayBuffer(_obj_) is *false*, throw a *TypeError* exception. 1. Let _newByteLength_ be ? ToIndex(_newLength_). - 1. Let _hostHandled_ be ? HostGrowSharedArrayBuffer(_O_, _newByteLength_). + 1. Let _hostHandled_ be ? HostGrowSharedArrayBuffer(_obj_, _newByteLength_). 1. If _hostHandled_ is ~handled~, return *undefined*. - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _isLittleEndian_ be _AR_.[[LittleEndian]]. - 1. Let _byteLengthBlock_ be _O_.[[ArrayBufferByteLengthData]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _isLittleEndian_ be _agentRecord_.[[LittleEndian]]. + 1. Let _byteLengthBlock_ be _obj_.[[ArrayBufferByteLengthData]]. 1. Let _currentByteLengthRawBytes_ be GetRawBytesFromSharedBlock(_byteLengthBlock_, 0, ~biguint64~, *true*, ~seq-cst~). 1. Let _newByteLengthRawBytes_ be NumericToRawBytes(~biguint64~, ℤ(_newByteLength_), _isLittleEndian_). 1. Repeat, 1. NOTE: This is a compare-and-exchange loop to ensure that parallel, racing grows of the same buffer are totally ordered, are not lost, and do not silently do nothing. The loop exits if it was able to attempt to grow uncontended. 1. Let _currentByteLength_ be ℝ(RawBytesToNumeric(~biguint64~, _currentByteLengthRawBytes_, _isLittleEndian_)). 1. If _newByteLength_ = _currentByteLength_, return *undefined*. - 1. If _newByteLength_ < _currentByteLength_ or _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception. + 1. If _newByteLength_ < _currentByteLength_ or _newByteLength_ > _obj_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception. 1. Let _byteLengthDelta_ be _newByteLength_ - _currentByteLength_. 1. If it is impossible to create a new Shared Data Block value consisting of _byteLengthDelta_ bytes, throw a *RangeError* exception. 1. NOTE: No new Shared Data Block is constructed and used here. The observable behaviour of growable SharedArrayBuffers is specified by allocating a max-sized Shared Data Block at construction time, and this step captures the requirement that implementations that run out of memory must throw a *RangeError*. @@ -45816,10 +45812,10 @@

    SharedArrayBuffer.prototype.grow ( _newLength_ )

    get SharedArrayBuffer.prototype.growable

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). - 1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception. - 1. If IsFixedLengthArrayBuffer(_O_) is *false*, return *true*. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). + 1. If IsSharedArrayBuffer(_obj_) is *false*, throw a *TypeError* exception. + 1. If IsFixedLengthArrayBuffer(_obj_) is *false*, return *true*. 1. Return *false*. @@ -45828,13 +45824,13 @@

    get SharedArrayBuffer.prototype.growable

    get SharedArrayBuffer.prototype.maxByteLength

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). - 1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception. - 1. If IsFixedLengthArrayBuffer(_O_) is *true*, then - 1. Let _length_ be _O_.[[ArrayBufferByteLength]]. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[ArrayBufferData]]). + 1. If IsSharedArrayBuffer(_obj_) is *false*, throw a *TypeError* exception. + 1. If IsFixedLengthArrayBuffer(_obj_) is *true*, then + 1. Let _length_ be _obj_.[[ArrayBufferByteLength]]. 1. Else, - 1. Let _length_ be _O_.[[ArrayBufferMaxByteLength]]. + 1. Let _length_ be _obj_.[[ArrayBufferMaxByteLength]]. 1. Return 𝔽(_length_). @@ -45843,10 +45839,10 @@

    get SharedArrayBuffer.prototype.maxByteLength

    SharedArrayBuffer.prototype.slice ( _start_, _end_ )

    This method performs the following steps when called:

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

    SharedArrayBuffer.prototype.slice ( _start_, _end_ )

    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. Let _ctor_ be ? SpeciesConstructor(_O_, %SharedArrayBuffer%). + 1. Let _ctor_ be ? SpeciesConstructor(_obj_, %SharedArrayBuffer%). 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLen_) »). 1. Perform ? RequireInternalSlot(_new_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_new_) is *false*, throw a *TypeError* exception. - 1. If _new_.[[ArrayBufferData]] is _O_.[[ArrayBufferData]], throw a *TypeError* exception. + 1. If _new_.[[ArrayBufferData]] is _obj_.[[ArrayBufferData]], throw a *TypeError* exception. 1. If ArrayBufferByteLength(_new_, ~seq-cst~) < _newLen_, throw a *TypeError* exception. - 1. Let _fromBuf_ be _O_.[[ArrayBufferData]]. + 1. Let _fromBuf_ be _obj_.[[ArrayBufferData]]. 1. Let _toBuf_ be _new_.[[ArrayBufferData]]. 1. Perform CopyDataBlockBytes(_toBuf_, 0, _fromBuf_, _first_, _newLen_). 1. Return _new_. @@ -46117,16 +46113,16 @@

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

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

    Properties of the DataView Prototype Object

    get DataView.prototype.buffer

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[DataView]]). - 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _buffer_ be _O_.[[ViewedArrayBuffer]]. + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[DataView]]). + 1. Assert: _obj_ has a [[ViewedArrayBuffer]] internal slot. + 1. Let _buffer_ be _obj_.[[ViewedArrayBuffer]]. 1. Return _buffer_. @@ -46172,10 +46168,10 @@

    get DataView.prototype.buffer

    get DataView.prototype.byteLength

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

    - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[DataView]]). - 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_O_, ~seq-cst~). + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[DataView]]). + 1. Assert: _obj_ has a [[ViewedArrayBuffer]] internal slot. + 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_obj_, ~seq-cst~). 1. If IsViewOutOfBounds(_viewRecord_) is *true*, throw a *TypeError* exception. 1. Let _size_ be GetViewByteLength(_viewRecord_). 1. Return 𝔽(_size_). @@ -46186,12 +46182,12 @@

    get DataView.prototype.byteLength

    get DataView.prototype.byteOffset

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

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

    EnterCriticalSection ( - _WL_: a WaiterList Record, + _waiterList_: a WaiterList Record, ): ~unused~

    1. Assert: The surrounding agent is not in the critical section for any WaiterList Record. - 1. Wait until no agent is in the critical section for _WL_, then enter the critical section for _WL_ (without allowing any other agent to enter). - 1. If _WL_.[[MostRecentLeaveEvent]] is not ~empty~, then - 1. NOTE: A _WL_ whose critical section has been entered at least once has a Synchronize event set by LeaveCriticalSection. - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Wait until no agent is in the critical section for _waiterList_, then enter the critical section for _waiterList_ (without allowing any other agent to enter). + 1. If _waiterList_.[[MostRecentLeaveEvent]] is not ~empty~, then + 1. NOTE: A _waiterList_ whose critical section has been entered at least once has a Synchronize event set by LeaveCriticalSection. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. Let _enterEvent_ be a new Synchronize event. 1. Append _enterEvent_ to _eventsRecord_.[[EventList]]. - 1. Append (_WL_.[[MostRecentLeaveEvent]], _enterEvent_) to _eventsRecord_.[[AgentSynchronizesWith]]. + 1. Append (_waiterList_.[[MostRecentLeaveEvent]], _enterEvent_) to _eventsRecord_.[[AgentSynchronizesWith]]. 1. Return ~unused~.

    EnterCriticalSection has contention when an agent attempting to enter the critical section must wait for another agent to leave it. When there is no contention, FIFO order of EnterCriticalSection calls is observable. When there is contention, an implementation may choose an arbitrary order but may not cause an agent to wait indefinitely.

    @@ -46683,20 +46679,20 @@

    LeaveCriticalSection ( - _WL_: a WaiterList Record, + _waiterList_: a WaiterList Record, ): ~unused~

    - 1. Assert: The surrounding agent is in the critical section for _WL_. - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Assert: The surrounding agent is in the critical section for _waiterList_. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. Let _leaveEvent_ be a new Synchronize event. 1. Append _leaveEvent_ to _eventsRecord_.[[EventList]]. - 1. Set _WL_.[[MostRecentLeaveEvent]] to _leaveEvent_. - 1. Leave the critical section for _WL_. + 1. Set _waiterList_.[[MostRecentLeaveEvent]] to _leaveEvent_. + 1. Leave the critical section for _waiterList_. 1. Return ~unused~.
    @@ -46704,16 +46700,16 @@

    AddWaiter ( - _WL_: a WaiterList Record, + _waiterList_: a WaiterList Record, _waiterRecord_: a Waiter Record, ): ~unused~

    - 1. Assert: The surrounding agent is in the critical section for _WL_. - 1. Assert: There is no Waiter Record in _WL_.[[Waiters]] whose [[PromiseCapability]] field is _waiterRecord_.[[PromiseCapability]] and whose [[AgentSignifier]] field is _waiterRecord_.[[AgentSignifier]]. - 1. Append _waiterRecord_ to _WL_.[[Waiters]]. + 1. Assert: The surrounding agent is in the critical section for _waiterList_. + 1. Assert: There is no Waiter Record in _waiterList_.[[Waiters]] whose [[PromiseCapability]] field is _waiterRecord_.[[PromiseCapability]] and whose [[AgentSignifier]] field is _waiterRecord_.[[AgentSignifier]]. + 1. Append _waiterRecord_ to _waiterList_.[[Waiters]]. 1. Return ~unused~.
    @@ -46721,16 +46717,16 @@

    RemoveWaiter ( - _WL_: a WaiterList Record, + _waiterList_: a WaiterList Record, _waiterRecord_: a Waiter Record, ): ~unused~

    - 1. Assert: The surrounding agent is in the critical section for _WL_. - 1. Assert: _WL_.[[Waiters]] contains _waiterRecord_. - 1. Remove _waiterRecord_ from _WL_.[[Waiters]]. + 1. Assert: The surrounding agent is in the critical section for _waiterList_. + 1. Assert: _waiterList_.[[Waiters]] contains _waiterRecord_. + 1. Remove _waiterRecord_ from _waiterList_.[[Waiters]]. 1. Return ~unused~.
    @@ -46738,40 +46734,40 @@

    RemoveWaiters ( - _WL_: a WaiterList Record, - _c_: a non-negative integer or +∞, + _waiterList_: a WaiterList Record, + _count_: a non-negative integer or +∞, ): a List of Waiter Records

    - 1. Assert: The surrounding agent is in the critical section for _WL_. - 1. Let _len_ be the number of elements in _WL_.[[Waiters]]. - 1. Let _n_ be min(_c_, _len_). - 1. Let _L_ be a List whose elements are the first _n_ elements of _WL_.[[Waiters]]. - 1. Remove the first _n_ elements of _WL_.[[Waiters]]. - 1. Return _L_. + 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 _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_.

    SuspendThisAgent ( - _WL_: a WaiterList Record, + _waiterList_: a WaiterList Record, _waiterRecord_: a Waiter Record, ): ~unused~

    - 1. Assert: The surrounding agent is in the critical section for _WL_. - 1. Assert: _WL_.[[Waiters]] contains _waiterRecord_. + 1. Assert: The surrounding agent is in the critical section for _waiterList_. + 1. Assert: _waiterList_.[[Waiters]] contains _waiterRecord_. 1. Let _thisAgent_ be AgentSignifier(). 1. Assert: _waiterRecord_.[[AgentSignifier]] is _thisAgent_. 1. Assert: _waiterRecord_.[[PromiseCapability]] is ~blocking~. 1. Assert: AgentCanSuspend() is *true*. - 1. Perform LeaveCriticalSection(_WL_) and suspend the surrounding agent until the time is _waiterRecord_.[[TimeoutTime]], performing the combined operation in such a way that a notification that arrives after the critical section is exited but before the suspension takes effect is not lost. The surrounding agent can only wake from suspension due to a timeout or due to another agent calling NotifyWaiter with arguments _WL_ and _thisAgent_ (i.e. via a call to `Atomics.notify`). - 1. Perform EnterCriticalSection(_WL_). + 1. Perform LeaveCriticalSection(_waiterList_) and suspend the surrounding agent until the time is _waiterRecord_.[[TimeoutTime]], performing the combined operation in such a way that a notification that arrives after the critical section is exited but before the suspension takes effect is not lost. The surrounding agent can only wake from suspension due to a timeout or due to another agent calling NotifyWaiter with arguments _waiterList_ and _thisAgent_ (i.e. via a call to `Atomics.notify`). + 1. Perform EnterCriticalSection(_waiterList_). 1. Return ~unused~.
    @@ -46779,14 +46775,14 @@

    NotifyWaiter ( - _WL_: a WaiterList Record, + _waiterList_: a WaiterList Record, _waiterRecord_: a Waiter Record, ): ~unused~

    - 1. Assert: The surrounding agent is in the critical section for _WL_. + 1. Assert: The surrounding agent is in the critical section for _waiterList_. 1. If _waiterRecord_.[[PromiseCapability]] is ~blocking~, then 1. Wake the agent whose signifier is _waiterRecord_.[[AgentSignifier]] from suspension. 1. NOTE: This causes the agent to resume execution in SuspendThisAgent. @@ -46842,48 +46838,48 @@

    1. If IsSharedArrayBuffer(_buffer_) is *false*, throw a *TypeError* exception. 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccess(_taRecord_, _index_). 1. Let _arrayTypeName_ be _typedArray_.[[TypedArrayName]]. - 1. If _arrayTypeName_ is *"BigInt64Array"*, let _v_ be ? ToBigInt64(_value_). - 1. Else, let _v_ be ? ToInt32(_value_). - 1. Let _q_ be ? ToNumber(_timeout_). - 1. If _q_ is either *NaN* or *+∞*𝔽, let _t_ be +∞. - 1. Else if _q_ is *-∞*𝔽, let _t_ be 0. - 1. Else, let _t_ be max(ℝ(_q_), 0). + 1. If _arrayTypeName_ is *"BigInt64Array"*, let _expected_ be ? ToBigInt64(_value_). + 1. Else, let _expected_ be ? ToInt32(_value_). + 1. Let _timeoutNumber_ be ? ToNumber(_timeout_). + 1. If _timeoutNumber_ is either *NaN* or *+∞*𝔽, let _realTimeout_ be +∞. + 1. Else if _timeoutNumber_ is *-∞*𝔽, let _realTimeout_ be 0. + 1. Else, let _realTimeout_ be max(ℝ(_timeoutNumber_), 0). 1. If _mode_ is ~sync~ and AgentCanSuspend() is *false*, throw a *TypeError* exception. 1. Let _block_ be _buffer_.[[ArrayBufferData]]. - 1. Let _WL_ be GetWaiterList(_block_, _byteIndexInBuffer_). + 1. Let _waiterList_ be GetWaiterList(_block_, _byteIndexInBuffer_). 1. If _mode_ is ~sync~, then 1. Let _promiseCapability_ be ~blocking~. 1. Let _resultObject_ be *undefined*. 1. Else, 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). 1. Let _resultObject_ be OrdinaryObjectCreate(%Object.prototype%). - 1. Perform EnterCriticalSection(_WL_). + 1. Perform EnterCriticalSection(_waiterList_). 1. Let _elementType_ be TypedArrayElementType(_typedArray_). - 1. Let _w_ be GetValueFromBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, *true*, ~seq-cst~). - 1. If _v_ ≠ _w_, then - 1. Perform LeaveCriticalSection(_WL_). + 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. If _t_ = 0 and _mode_ is ~async~, then + 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(_WL_). + 1. Perform LeaveCriticalSection(_waiterList_). 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"async"*, *false*). 1. Perform ! CreateDataPropertyOrThrow(_resultObject_, *"value"*, *"timed-out"*). 1. Return _resultObject_. 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. - 1. Let _timeoutTime_ be ℝ(_now_) + _t_ + _additionalTimeout_. - 1. NOTE: When _t_ is +∞, _timeoutTime_ is also +∞. + 1. Let _timeoutTime_ be ℝ(_now_) + _realTimeout_ + _additionalTimeout_. + 1. NOTE: When _realTimeout_ is +∞, _timeoutTime_ is also +∞. 1. Let _waiterRecord_ be a new Waiter Record { [[AgentSignifier]]: _thisAgent_, [[PromiseCapability]]: _promiseCapability_, [[TimeoutTime]]: _timeoutTime_, [[Result]]: *"ok"* }. - 1. Perform AddWaiter(_WL_, _waiterRecord_). + 1. Perform AddWaiter(_waiterList_, _waiterRecord_). 1. If _mode_ is ~sync~, then - 1. Perform SuspendThisAgent(_WL_, _waiterRecord_). + 1. Perform SuspendThisAgent(_waiterList_, _waiterRecord_). 1. Else if _timeoutTime_ is finite, then - 1. Perform EnqueueAtomicsWaitAsyncTimeoutJob(_WL_, _waiterRecord_). - 1. Perform LeaveCriticalSection(_WL_). + 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]]). @@ -46897,22 +46893,22 @@

    EnqueueAtomicsWaitAsyncTimeoutJob ( - _WL_: a WaiterList Record, + _waiterList_: a WaiterList Record, _waiterRecord_: a Waiter Record, ): ~unused~

    - 1. Let _timeoutJob_ be a new Job Abstract Closure with no parameters that captures _WL_ and _waiterRecord_ and performs the following steps when called: - 1. Perform EnterCriticalSection(_WL_). - 1. If _WL_.[[Waiters]] contains _waiterRecord_, then + 1. Let _timeoutJob_ be a new Job Abstract Closure with no parameters that captures _waiterList_ and _waiterRecord_ and performs the following steps when called: + 1. Perform EnterCriticalSection(_waiterList_). + 1. If _waiterList_.[[Waiters]] contains _waiterRecord_, then 1. Let _timeOfJobExecution_ be the time value (UTC) identifying the current time. 1. Assert: ℝ(_timeOfJobExecution_) ≥ _waiterRecord_.[[TimeoutTime]] (ignoring potential non-monotonicity of time values). 1. Set _waiterRecord_.[[Result]] to *"timed-out"*. - 1. Perform RemoveWaiter(_WL_, _waiterRecord_). - 1. Perform NotifyWaiter(_WL_, _waiterRecord_). - 1. Perform LeaveCriticalSection(_WL_). + 1. Perform RemoveWaiter(_waiterList_, _waiterRecord_). + 1. Perform NotifyWaiter(_waiterList_, _waiterRecord_). + 1. Perform LeaveCriticalSection(_waiterList_). 1. Return ~unused~. 1. Let _now_ be the time value (UTC) identifying the current time. 1. Let _currentRealm_ be the current Realm Record. @@ -46934,8 +46930,8 @@

    - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _execution_ be _AR_.[[CandidateExecution]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. Let _execution_ be _agentRecord_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). 1. Let _rawBytesRead_ be a List of length _elementSize_ whose elements are nondeterministically chosen byte values. 1. NOTE: In implementations, _rawBytesRead_ is the result of a load-link, of a load-exclusive, or of an operand of a read-modify-write instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. @@ -46967,12 +46963,12 @@

    1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). - 1. If _typedArray_.[[ContentType]] is ~bigint~, let _v_ be ? ToBigInt(_value_). - 1. Else, let _v_ be 𝔽(? ToIntegerOrInfinity(_value_)). + 1. If _typedArray_.[[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. Return GetModifySetValueInBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, _v_, _op_). + 1. Return GetModifySetValueInBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, _coerced_, _op_). @@ -47034,8 +47030,8 @@

    Atomics.add ( _typedArray_, _index_, _value_ )

    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 _AR_ be the Agent Record of the surrounding agent. - 1. Let _isLittleEndian_ be _AR_.[[LittleEndian]]. + 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_). 1. Let _y_ be RawBytesToNumeric(_type_, _yBytes_, _isLittleEndian_). 1. If _x_ is a Number, then @@ -47076,8 +47072,8 @@

    Atomics.compareExchange ( _typedArray_, _index_, _expectedValue_, _replaceme 1. Perform ? RevalidateAtomicAccess(_typedArray_, _byteIndexInBuffer_). 1. Let _elementType_ be TypedArrayElementType(_typedArray_). 1. Let _elementSize_ be TypedArrayElementSize(_typedArray_). - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. Let _isLittleEndian_ be _AR_.[[LittleEndian]]. + 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_). 1. Let _replacementBytes_ be NumericToRawBytes(_elementType_, _replacement_, _isLittleEndian_). 1. If IsSharedArrayBuffer(_buffer_) is *true*, then @@ -47105,11 +47101,11 @@

    Atomics.isLockFree ( _size_ )

    This function performs the following steps when called:

    1. Let _n_ be ? ToIntegerOrInfinity(_size_). - 1. Let _AR_ be the Agent Record of the surrounding agent. - 1. If _n_ = 1, return _AR_.[[IsLockFree1]]. - 1. If _n_ = 2, return _AR_.[[IsLockFree2]]. + 1. Let _agentRecord_ be the Agent Record of the surrounding agent. + 1. If _n_ = 1, return _agentRecord_.[[IsLockFree1]]. + 1. If _n_ = 2, return _agentRecord_.[[IsLockFree2]]. 1. If _n_ = 4, return *true*. - 1. If _n_ = 8, return _AR_.[[IsLockFree8]]. + 1. If _n_ = 8, return _agentRecord_.[[IsLockFree8]]. 1. Return *false*. @@ -47146,13 +47142,13 @@

    Atomics.store ( _typedArray_, _index_, _value_ )

    This function performs the following steps when called:

    1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). - 1. If _typedArray_.[[ContentType]] is ~bigint~, let _v_ be ? ToBigInt(_value_). - 1. Else, let _v_ be 𝔽(? ToIntegerOrInfinity(_value_)). + 1. If _typedArray_.[[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 SetValueInBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, _v_, *true*, ~seq-cst~). - 1. Return _v_. + 1. Perform SetValueInBuffer(_buffer_, _byteIndexInBuffer_, _elementType_, _coerced_, *true*, ~seq-cst~). + 1. Return _coerced_. @@ -47162,8 +47158,8 @@

    Atomics.sub ( _typedArray_, _index_, _value_ )

    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 _AR_ be the Agent Record of the surrounding agent. - 1. Let _isLittleEndian_ be _AR_.[[LittleEndian]]. + 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_). 1. Let _y_ be RawBytesToNumeric(_type_, _yBytes_, _isLittleEndian_). 1. If _x_ is a Number, then @@ -47204,20 +47200,20 @@

    Atomics.notify ( _typedArray_, _index_, _count_ )

    1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, *true*). 1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccess(_taRecord_, _index_). 1. If _count_ is *undefined*, then - 1. Let _c_ be +∞. + 1. Set _count_ to +∞. 1. Else, 1. Let _intCount_ be ? ToIntegerOrInfinity(_count_). - 1. Let _c_ be max(_intCount_, 0). + 1. Set _count_ to max(_intCount_, 0). 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. 1. Let _block_ be _buffer_.[[ArrayBufferData]]. 1. If IsSharedArrayBuffer(_buffer_) is *false*, return *+0*𝔽. - 1. Let _WL_ be GetWaiterList(_block_, _byteIndexInBuffer_). - 1. Perform EnterCriticalSection(_WL_). - 1. Let _S_ be RemoveWaiters(_WL_, _c_). - 1. For each element _W_ of _S_, do - 1. Perform NotifyWaiter(_WL_, _W_). - 1. Perform LeaveCriticalSection(_WL_). - 1. Let _n_ be the number of elements in _S_. + 1. Let _waiterList_ be GetWaiterList(_block_, _byteIndexInBuffer_). + 1. Perform EnterCriticalSection(_waiterList_). + 1. Let _waiters_ be RemoveWaiters(_waiterList_, _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_).
    @@ -47254,10 +47250,10 @@

    The JSON Object

    The JSON Data Interchange Format is defined in ECMA-404. The JSON interchange format used in this specification is exactly that described by ECMA-404. Conforming implementations of `JSON.parse` and `JSON.stringify` must support the exact interchange format described in the ECMA-404 specification without any deletions or extensions to the format.

    -

    JSON.isRawJSON ( _O_ )

    +

    JSON.isRawJSON ( _obj_ )

    This function performs the following steps when called:

    - 1. If _O_ is an Object and _O_ has an [[IsRawJSON]] internal slot, return *true*. + 1. If _obj_ is an Object and _obj_ has an [[IsRawJSON]] internal slot, return *true*. 1. Return *false*.
    @@ -47384,15 +47380,15 @@

    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. For each String _P_ of _keys_, do + 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 _P_, set _propertyDefinition_ to _propertyNode_. + 1. If _propName_ 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_, _P_, ! Get(_val_, _P_)). + 1. Let _entryParseRecord_ be CreateJSONParseRecord(_propertyValueNode_, _propertyKey_, ! Get(_val_, _propertyKey_)). 1. Append _entryParseRecord_ to _entries_. 1. Else, 1. Assert: _typedValNode_ is neither an |ArrayLiteral| Parse Node nor an |ObjectLiteral| Parse Node. @@ -47436,23 +47432,23 @@

    1. Let _len_ be ? LengthOfArrayLike(_val_). 1. Let _index_ be 0. 1. Repeat, while _index_ < _len_, - 1. Let _prop_ be ! ToString(𝔽(_index_)). + 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_, _prop_, _reviver_, _elementRecord_). + 1. Let _newElement_ be ? InternalizeJSONProperty(_val_, _propertyKey_, _reviver_, _elementRecord_). 1. If _newElement_ is *undefined*, then - 1. Perform ? _val_.[[Delete]](_prop_). + 1. Perform ? _val_.[[Delete]](_propertyKey_). 1. Else, - 1. Perform ? CreateDataProperty(_val_, _prop_, _newElement_). + 1. Perform ? CreateDataProperty(_val_, _propertyKey_, _newElement_). 1. Set _index_ to _index_ + 1. 1. Else, 1. Let _keys_ be ? EnumerableOwnProperties(_val_, ~key~). - 1. For each String _P_ of _keys_, do - 1. If there exists an element _e_ of _entryRecords_ such that _e_.[[Key]] is _P_, let _entryRecord_ be _e_; else let _entryRecord_ be ~empty~. - 1. Let _newElement_ be ? InternalizeJSONProperty(_val_, _P_, _reviver_, _entryRecord_). + 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. If _newElement_ is *undefined*, then - 1. Perform ? _val_.[[Delete]](_P_). + 1. Perform ? _val_.[[Delete]](_propertyKey_). 1. Else, - 1. Perform ? CreateDataProperty(_val_, _P_, _newElement_). + 1. Perform ? CreateDataProperty(_val_, _propertyKey_, _newElement_). 1. Return ? Call(_reviver_, _holder_, « _name_, _val_, _context_ »). @@ -47468,8 +47464,8 @@

    It performs a breadth-first search of the parse tree rooted at _root_, and returns the first node that is an instance of a nonterminal corresponding to a JSON value, or ~empty~ if there is no such node.
    - 1. Let _F_ be the active function object. - 1. Assert: _F_ is a `JSON.parse` built-in function object (see JSON.parse). + 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 _queue_ be « _root_ ». @@ -47561,29 +47557,29 @@

    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 _propertyList_ be *undefined*. + 1. Let _replacerFunction_ be *undefined*. 1. If _replacer_ is an Object, then 1. If IsCallable(_replacer_) is *true*, then - 1. Set _ReplacerFunction_ to _replacer_. + 1. Set _replacerFunction_ 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. Set _propertyList_ to a new empty List. 1. Let _len_ be ? LengthOfArrayLike(_replacer_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _prop_ be ! ToString(𝔽(_k_)). - 1. Let _v_ be ? Get(_replacer_, _prop_). + 1. Let _propertyKey_ be ! ToString(𝔽(_k_)). + 1. Let _propertyValue_ be ? Get(_replacer_, _propertyKey_). 1. Let _item_ be *undefined*. - 1. If _v_ is a String, then - 1. Set _item_ to _v_. - 1. Else if _v_ is a Number, then - 1. Set _item_ to ! ToString(_v_). - 1. Else if _v_ is an Object, then - 1. If _v_ has a [[StringData]] or [[NumberData]] internal slot, set _item_ to ? ToString(_v_). - 1. If _item_ is not *undefined* and _PropertyList_ does not contain _item_, then - 1. Append _item_ to _PropertyList_. + 1. If _propertyValue_ is a String, then + 1. Set _item_ to _propertyValue_. + 1. Else if _propertyValue_ is a Number, then + 1. Set _item_ to ! ToString(_propertyValue_). + 1. Else if _propertyValue_ is an Object, then + 1. If _propertyValue_ has a [[StringData]] or [[NumberData]] internal slot, set _item_ to ? ToString(_propertyValue_). + 1. If _item_ is not *undefined* and _propertyList_ does not contain _item_, then + 1. Append _item_ to _propertyList_. 1. Set _k_ to _k_ + 1. 1. If _space_ is an Object, then 1. If _space_ has a [[NumberData]] internal slot, then @@ -47600,7 +47596,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]]: _replacerFunction_, [[Stack]]: _stack_, [[Indent]]: _indent_, [[Gap]]: _gap_, [[PropertyList]]: _propertyList_ }. 1. Return ? SerializeJSONProperty(_state_, the empty String, _wrapper_).

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

    @@ -47743,14 +47739,14 @@

    1. Let _product_ be the String value consisting solely of the code unit 0x0022 (QUOTATION MARK). - 1. For each code point _C_ of StringToCodePoints(_value_), do - 1. If _C_ is listed in the “Code Point” column of , then - 1. Set _product_ to the string-concatenation of _product_ and the escape sequence for _C_ as specified in the “Escape Sequence” column of the corresponding row. - 1. Else if _C_ has a numeric value less than 0x0020 (SPACE) or _C_ 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 _C_. + 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. Set _product_ to the string-concatenation of _product_ and UnicodeEscape(_unit_). 1. Else, - 1. Set _product_ to the string-concatenation of _product_ and UTF16EncodeCodePoint(_C_). + 1. Set _product_ to the string-concatenation of _product_ and UTF16EncodeCodePoint(_cp_). 1. Set _product_ to the string-concatenation of _product_ and the code unit 0x0022 (QUOTATION MARK). 1. Return _product_. @@ -47853,15 +47849,15 @@

    UnicodeEscape ( - _C_: a code unit, + _constructor_: a code unit, ): a String

    description
    -
    It represents _C_ as a Unicode escape sequence.
    +
    It represents _constructor_ as a Unicode escape sequence.
    - 1. Let _n_ be the numeric value of _C_. + 1. Let _n_ be the numeric value of _constructor_. 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~). @@ -47885,14 +47881,14 @@

    1. Let _stepBack_ be _state_.[[Indent]]. 1. Set _state_.[[Indent]] to the string-concatenation of _state_.[[Indent]] and _state_.[[Gap]]. 1. If _state_.[[PropertyList]] is not *undefined*, then - 1. Let _K_ be _state_.[[PropertyList]]. + 1. Let _keys_ be _state_.[[PropertyList]]. 1. Else, - 1. Let _K_ be ? EnumerableOwnProperties(_value_, ~key~). + 1. Let _keys_ be ? EnumerableOwnProperties(_value_, ~key~). 1. Let _partial_ be a new empty List. - 1. For each element _P_ of _K_, do - 1. Let _strP_ be ? SerializeJSONProperty(_state_, _P_, _value_). + 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 _member_ be QuoteJSONString(_P_). + 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). @@ -48504,16 +48500,16 @@

    %IteratorHelperPrototype%.next ( )

    %IteratorHelperPrototype%.return ( )

    - 1. Let _O_ be *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[UnderlyingIterators]]). - 1. Assert: _O_ has a [[GeneratorState]] internal slot. - 1. If _O_.[[GeneratorState]] is ~suspended-start~, then - 1. Set _O_.[[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 _O_ can be discarded at this point. - 1. Perform ? IteratorCloseAll(_O_.[[UnderlyingIterators]], NormalCompletion(~unused~)). + 1. Let _obj_ be *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[UnderlyingIterators]]). + 1. Assert: _obj_ has a [[GeneratorState]] internal slot. + 1. If _obj_.[[GeneratorState]] is ~suspended-start~, then + 1. Set _obj_.[[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 _obj_ can be discarded at this point. + 1. Perform ? IteratorCloseAll(_obj_.[[UnderlyingIterators]], NormalCompletion(~unused~)). 1. Return CreateIteratorResultObject(*undefined*, *true*). - 1. Let _C_ be ReturnCompletion(*undefined*). - 1. Return ? GeneratorResumeAbrupt(_O_, _C_, *"Iterator Helper"*). + 1. Let _completion_ be ReturnCompletion(*undefined*). + 1. Return ? GeneratorResumeAbrupt(_obj_, _completion_, *"Iterator Helper"*).
    @@ -48586,9 +48582,9 @@

    Iterator.concat ( ..._items_ )

    -

    Iterator.from ( _O_ )

    +

    Iterator.from ( _obj_ )

    - 1. Let _iteratorRecord_ be ? GetIteratorFlattenable(_O_, ~iterate-string-primitives~). + 1. Let _iteratorRecord_ be ? GetIteratorFlattenable(_obj_, ~iterate-string-primitives~). 1. Let _hasInstance_ be ? OrdinaryHasInstance(%Iterator%, _iteratorRecord_.[[Iterator]]). 1. If _hasInstance_ is *true*, then 1. Return _iteratorRecord_.[[Iterator]]. @@ -48608,9 +48604,9 @@

    The %WrapForValidIteratorPrototype% Object

    %WrapForValidIteratorPrototype%.next ( )

    - 1. Let _O_ be *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[Iterated]]). - 1. Let _iteratorRecord_ be _O_.[[Iterated]]. + 1. Let _obj_ be *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[Iterated]]). + 1. Let _iteratorRecord_ be _obj_.[[Iterated]]. 1. Return ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]]).
    @@ -48618,9 +48614,9 @@

    %WrapForValidIteratorPrototype%.next ( )

    %WrapForValidIteratorPrototype%.return ( )

    - 1. Let _O_ be *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[Iterated]]). - 1. Let _iterator_ be _O_.[[Iterated]].[[Iterator]]. + 1. Let _obj_ be *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[Iterated]]). + 1. Let _iterator_ be _obj_.[[Iterated]].[[Iterator]]. 1. Assert: _iterator_ is an Object. 1. Let _returnMethod_ be ? GetMethod(_iterator_, *"return"*). 1. If _returnMethod_ is *undefined*, then @@ -48682,9 +48678,9 @@

    set Iterator.prototype.constructor

    Iterator.prototype.drop ( _limit_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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 @@ -48694,7 +48690,7 @@

    Iterator.prototype.drop ( _limit_ )

    1. If _integerLimit_ < 0, then 1. Let _error_ be ThrowCompletion(a newly created *RangeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 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. Repeat, while _remaining_ > 0, @@ -48717,13 +48713,13 @@

    Iterator.prototype.drop ( _limit_ )

    Iterator.prototype.every ( _predicate_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_predicate_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. Let _counter_ be 0. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). @@ -48739,13 +48735,13 @@

    Iterator.prototype.every ( _predicate_ )

    Iterator.prototype.filter ( _predicate_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_predicate_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _predicate_ and performs the following steps when called: 1. Let _counter_ be 0. 1. Repeat, @@ -48767,13 +48763,13 @@

    Iterator.prototype.filter ( _predicate_ )

    Iterator.prototype.find ( _predicate_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_predicate_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. Let _counter_ be 0. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). @@ -48789,13 +48785,13 @@

    Iterator.prototype.find ( _predicate_ )

    Iterator.prototype.flatMap ( _mapper_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_mapper_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _mapper_ and performs the following steps when called: 1. Let _counter_ be 0. 1. Repeat, @@ -48828,13 +48824,13 @@

    Iterator.prototype.flatMap ( _mapper_ )

    Iterator.prototype.forEach ( _procedure_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_procedure_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. Let _counter_ be 0. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). @@ -48849,13 +48845,13 @@

    Iterator.prototype.forEach ( _procedure_ )

    Iterator.prototype.map ( _mapper_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_mapper_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. Let _closure_ be a new Abstract Closure with no parameters that captures _iterated_ and _mapper_ and performs the following steps when called: 1. Let _counter_ be 0. 1. Repeat, @@ -48876,13 +48872,13 @@

    Iterator.prototype.map ( _mapper_ )

    Iterator.prototype.reduce ( _reducer_ [ , _initialValue_ ] )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_reducer_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. If _initialValue_ is not present, then 1. Let _accumulator_ be ? IteratorStepValue(_iterated_). 1. If _accumulator_ is ~done~, throw a *TypeError* exception. @@ -48904,13 +48900,13 @@

    Iterator.prototype.reduce ( _reducer_ [ , _initialValue_ ] )

    Iterator.prototype.some ( _predicate_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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. If IsCallable(_predicate_) is *false*, then 1. Let _error_ be ThrowCompletion(a newly created *TypeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 1. Set _iterated_ to ? GetIteratorDirect(_obj_). 1. Let _counter_ be 0. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). @@ -48926,9 +48922,9 @@

    Iterator.prototype.some ( _predicate_ )

    Iterator.prototype.take ( _limit_ )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }. + 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 @@ -48938,7 +48934,7 @@

    Iterator.prototype.take ( _limit_ )

    1. If _integerLimit_ < 0, then 1. Let _error_ be ThrowCompletion(a newly created *RangeError* object). 1. Return ? IteratorClose(_iterated_, _error_). - 1. Set _iterated_ to ? GetIteratorDirect(_O_). + 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. Repeat, @@ -48960,9 +48956,9 @@

    Iterator.prototype.take ( _limit_ )

    Iterator.prototype.toArray ( )

    This method performs the following steps when called:

    - 1. Let _O_ be the *this* value. - 1. If _O_ is not an Object, throw a *TypeError* exception. - 1. Let _iterated_ be ? GetIteratorDirect(_O_). + 1. Let _obj_ be the *this* value. + 1. If _obj_ is not an Object, throw a *TypeError* exception. + 1. Let _iterated_ be ? GetIteratorDirect(_obj_). 1. Let _items_ be a new empty List. 1. Repeat, 1. Let _value_ be ? IteratorStepValue(_iterated_). @@ -49066,10 +49062,10 @@

    The %AsyncFromSyncIteratorPrototype% Object

    %AsyncFromSyncIteratorPrototype%.next ( [ _value_ ] )

    - 1. Let _O_ be the *this* value. - 1. Assert: _O_ is an Object that has a [[SyncIteratorRecord]] internal slot. + 1. Let _obj_ be the *this* value. + 1. Assert: _obj_ is an Object that has a [[SyncIteratorRecord]] internal slot. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _syncIteratorRecord_ be _O_.[[SyncIteratorRecord]]. + 1. Let _syncIteratorRecord_ be _obj_.[[SyncIteratorRecord]]. 1. If _value_ is present, then 1. Let _result_ be Completion(IteratorNext(_syncIteratorRecord_, _value_)). 1. Else, @@ -49083,10 +49079,10 @@

    %AsyncFromSyncIteratorPrototype%.next ( [ _value_ ] )

    %AsyncFromSyncIteratorPrototype%.return ( [ _value_ ] )

    - 1. Let _O_ be the *this* value. - 1. Assert: _O_ is an Object that has a [[SyncIteratorRecord]] internal slot. + 1. Let _obj_ be the *this* value. + 1. Assert: _obj_ is an Object that has a [[SyncIteratorRecord]] internal slot. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _syncIteratorRecord_ be _O_.[[SyncIteratorRecord]]. + 1. Let _syncIteratorRecord_ be _obj_.[[SyncIteratorRecord]]. 1. Let _syncIterator_ be _syncIteratorRecord_.[[Iterator]]. 1. Let _return_ be Completion(GetMethod(_syncIterator_, *"return"*)). 1. IfAbruptRejectPromise(_return_, _promiseCapability_). @@ -49111,10 +49107,10 @@

    %AsyncFromSyncIteratorPrototype%.throw ( [ _value_ ] )

    In this specification, _value_ is always provided, but is left optional for consistency with . - 1. Let _O_ be the *this* value. - 1. Assert: _O_ is an Object that has a [[SyncIteratorRecord]] internal slot. + 1. Let _obj_ be the *this* value. + 1. Assert: _obj_ is an Object that has a [[SyncIteratorRecord]] internal slot. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). - 1. Let _syncIteratorRecord_ be _O_.[[SyncIteratorRecord]]. + 1. Let _syncIteratorRecord_ be _obj_.[[SyncIteratorRecord]]. 1. Let _syncIterator_ be _syncIteratorRecord_.[[Iterator]]. 1. Let _throw_ be Completion(GetMethod(_syncIterator_, *"throw"*)). 1. IfAbruptRejectPromise(_throw_, _promiseCapability_). @@ -49431,16 +49427,16 @@

    NewPromiseCapability ( - _C_: an ECMAScript language value, + _constructor_: an ECMAScript language value, ): either a normal completion containing a PromiseCapability Record or a throw completion

    description
    -
    It attempts to use _C_ 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 _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.
    - 1. If IsConstructor(_C_) is *false*, throw a *TypeError* exception. - 1. NOTE: _C_ is assumed to be a constructor function that supports the parameter conventions of the Promise constructor (see ). + 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. @@ -49449,7 +49445,7 @@

    1. Set _resolvingFunctions_.[[Reject]] to _reject_. 1. Return NormalCompletion(*undefined*). 1. Let _executor_ be CreateBuiltinFunction(_executorClosure_, 2, *""*, « »). - 1. Let _promise_ be ? Construct(_C_, « _executor_ »). + 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]] }. @@ -49462,7 +49458,7 @@

    IsPromise ( - _x_: an ECMAScript language value, + _value_: an ECMAScript language value, ): a Boolean

    @@ -49470,8 +49466,8 @@

    It checks for the promise brand on an object.

    - 1. If _x_ is not an Object, return *false*. - 1. If _x_ does not have a [[PromiseState]] internal slot, return *false*. + 1. If _value_ is not an Object, return *false*. + 1. If _value_ does not have a [[PromiseState]] internal slot, return *false*. 1. Return *true*.
    @@ -49670,13 +49666,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 _C_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_C_)). + 1. Let _constructor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseAll(_iteratorRecord_, _C_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseAll(_iteratorRecord_, _constructor_, _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_). @@ -49728,10 +49724,10 @@

    1. Append *undefined* to _values_. 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _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 _F_ be the active function object. - 1. If _F_.[[AlreadyCalled]] is *true*, return *undefined*. - 1. Set _F_.[[AlreadyCalled]] to *true*. - 1. Let _thisIndex_ be _F_.[[Index]]. + 1. Let _activeFunc_ be the active function object. + 1. If _activeFunc_.[[AlreadyCalled]] is *true*, return *undefined*. + 1. Set _activeFunc_.[[AlreadyCalled]] to *true*. + 1. Let _thisIndex_ be _activeFunc_.[[Index]]. 1. Set _values_[_thisIndex_] to _value_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] = 0, then @@ -49752,13 +49748,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 _C_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_C_)). + 1. Let _constructor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseAllSettled(_iteratorRecord_, _C_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseAllSettled(_iteratorRecord_, _constructor_, _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_). @@ -49796,13 +49792,13 @@

    1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _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 _F_ be the active function object. - 1. If _F_.[[AlreadyCalled]].[[Value]] is *true*, return *undefined*. - 1. Set _F_.[[AlreadyCalled]].[[Value]] to *true*. + 1. Let _activeFunc_ be the active function object. + 1. If _activeFunc_.[[AlreadyCalled]].[[Value]] is *true*, return *undefined*. + 1. Set _activeFunc_.[[AlreadyCalled]].[[Value]] to *true*. 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"status"*, *"fulfilled"*). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"value"*, _value_). - 1. Let _thisIndex_ be _F_.[[Index]]. + 1. Let _thisIndex_ be _activeFunc_.[[Index]]. 1. Set _values_[_thisIndex_] to _obj_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] = 0, then @@ -49813,13 +49809,13 @@

    1. Set _onFulfilled_.[[AlreadyCalled]] to _alreadyCalled_. 1. Set _onFulfilled_.[[Index]] to _index_. 1. Let _rejectedSteps_ be a new Abstract Closure with parameters (_error_) that captures _values_, _resultCapability_, and _remainingElementsCount_ and performs the following steps when called: - 1. Let _F_ be the active function object. - 1. If _F_.[[AlreadyCalled]].[[Value]] is *true*, return *undefined*. - 1. Set _F_.[[AlreadyCalled]].[[Value]] to *true*. + 1. Let _activeFunc_ be the active function object. + 1. If _activeFunc_.[[AlreadyCalled]].[[Value]] is *true*, return *undefined*. + 1. Set _activeFunc_.[[AlreadyCalled]].[[Value]] to *true*. 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"status"*, *"rejected"*). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"reason"*, _error_). - 1. Let _thisIndex_ be _F_.[[Index]]. + 1. Let _thisIndex_ be _activeFunc_.[[Index]]. 1. Set _values_[_thisIndex_] to _obj_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] = 0, then @@ -49840,13 +49836,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 _C_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_C_)). + 1. Let _constructor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseAny(_iteratorRecord_, _C_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseAny(_iteratorRecord_, _constructor_, _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_). @@ -49884,10 +49880,10 @@

    1. Append *undefined* to _errors_. 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _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 _F_ be the active function object. - 1. If _F_.[[AlreadyCalled]] is *true*, return *undefined*. - 1. Set _F_.[[AlreadyCalled]] to *true*. - 1. Let _thisIndex_ be _F_.[[Index]]. + 1. Let _activeFunc_ be the active function object. + 1. If _activeFunc_.[[AlreadyCalled]] is *true*, return *undefined*. + 1. Set _activeFunc_.[[AlreadyCalled]] to *true*. + 1. Let _thisIndex_ be _activeFunc_.[[Index]]. 1. Set _errors_[_thisIndex_] to _error_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] = 0, then @@ -49915,13 +49911,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 _C_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). - 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_C_)). + 1. Let _constructor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Let _promiseResolve_ be Completion(GetPromiseResolve(_constructor_)). 1. IfAbruptRejectPromise(_promiseResolve_, _promiseCapability_). 1. Let _iteratorRecord_ be Completion(GetIterator(_iterable_, ~sync~)). 1. IfAbruptRejectPromise(_iteratorRecord_, _promiseCapability_). - 1. Let _result_ be Completion(PerformPromiseRace(_iteratorRecord_, _C_, _promiseCapability_, _promiseResolve_)). + 1. Let _result_ be Completion(PerformPromiseRace(_iteratorRecord_, _constructor_, _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_). @@ -49957,12 +49953,12 @@

    -

    Promise.reject ( _r_ )

    +

    Promise.reject ( _reason_ )

    This function returns a new promise rejected with the passed argument.

    - 1. Let _C_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). - 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _r_ »). + 1. Let _constructor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). + 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _reason_ »). 1. Return _promiseCapability_.[[Promise]]. @@ -49971,12 +49967,12 @@

    Promise.reject ( _r_ )

    -

    Promise.resolve ( _x_ )

    +

    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 _C_ be the *this* value. - 1. If _C_ is not an Object, throw a *TypeError* exception. - 1. Return ? PromiseResolve(_C_, _x_). + 1. Let _constructor_ be the *this* value. + 1. If _constructor_ is not an Object, throw a *TypeError* exception. + 1. Return ? PromiseResolve(_constructor_, _resolution_).

    This function expects its *this* value to be a constructor function that supports the parameter conventions of the Promise constructor.

    @@ -49985,20 +49981,20 @@

    Promise.resolve ( _x_ )

    PromiseResolve ( - _C_: an Object, - _x_: an ECMAScript language value, + _constructor_: an Object, + _resolution_: an ECMAScript language value, ): either a normal completion containing an ECMAScript language value or a throw completion

    description
    -
    It returns a new promise resolved with _x_.
    +
    It returns a new promise resolved with _resolution_.
    - 1. If IsPromise(_x_) is *true*, then - 1. Let _xConstructor_ be ? Get(_x_, *"constructor"*). - 1. If SameValue(_xConstructor_, _C_) is *true*, return _x_. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). - 1. Perform ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _x_ »). + 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. Perform ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _resolution_ »). 1. Return _promiseCapability_.[[Promise]].
    @@ -50008,9 +50004,9 @@

    Promise.try ( _callback_, ..._args_ )

    This function performs the following steps when called:

    - 1. Let _C_ be the *this* value. - 1. If _C_ is not an Object, throw a *TypeError* exception. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). + 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 _status_ be Completion(Call(_callback_, *undefined*, _args_)). 1. If _status_ is an abrupt completion, then 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _status_.[[Value]] »). @@ -50027,8 +50023,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 _C_ be the *this* value. - 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). + 1. Let _constructor_ be the *this* value. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_constructor_). 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"promise"*, _promiseCapability_.[[Promise]]). 1. Perform ! CreateDataPropertyOrThrow(_obj_, *"resolve"*, _promiseCapability_.[[Resolve]]). @@ -50080,23 +50076,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 _C_ be ? SpeciesConstructor(_promise_, %Promise%). - 1. Assert: IsConstructor(_C_) is *true*. + 1. Let _constructor_ be ? SpeciesConstructor(_promise_, %Promise%). + 1. Assert: IsConstructor(_constructor_) 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 _C_ and performs the following steps when called: + 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 _result_ be ? Call(_onFinally_, *undefined*). - 1. Let _p_ be ? PromiseResolve(_C_, _result_). + 1. Let _p_ be ? PromiseResolve(_constructor_, _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 _C_ and performs the following steps when called: + 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 _result_ be ? Call(_onFinally_, *undefined*). - 1. Let _p_ be ? PromiseResolve(_C_, _result_). + 1. Let _p_ be ? PromiseResolve(_constructor_, _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, *""*, « »). @@ -50112,8 +50108,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 _C_ be ? SpeciesConstructor(_promise_, %Promise%). - 1. Let _resultCapability_ be ? NewPromiseCapability(_C_). + 1. Let _constructor_ be ? SpeciesConstructor(_promise_, %Promise%). + 1. Let _resultCapability_ be ? NewPromiseCapability(_constructor_). 1. Return PerformPromiseThen(_promise_, _onFulfilled_, _onRejected_, _resultCapability_). @@ -50271,9 +50267,9 @@

    GeneratorFunction ( ..._parameterArgs_, _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 _C_ be the active function object. + 1. Let _activeFunc_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_C_, NewTarget, ~generator~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~generator~, _parameterArgs_, _bodyArg_).

    See NOTE for .

    @@ -50373,9 +50369,9 @@

    AsyncGeneratorFunction ( ..._parameterArgs_, _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 _C_ be the active function object. + 1. Let _activeFunc_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_C_, NewTarget, ~async-generator~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~async-generator~, _parameterArgs_, _bodyArg_).

    See NOTE for .

    @@ -50490,9 +50486,9 @@

    %GeneratorPrototype%.next ( _value_ )

    %GeneratorPrototype%.return ( _value_ )

    This method performs the following steps when called:

    - 1. Let _g_ be the *this* value. - 1. Let _C_ be ReturnCompletion(_value_). - 1. Return ? GeneratorResumeAbrupt(_g_, _C_, ~empty~). + 1. Let _generator_ be the *this* value. + 1. Let _completion_ be ReturnCompletion(_value_). + 1. Return ? GeneratorResumeAbrupt(_generator_, _completion_, ~empty~).
    @@ -50500,9 +50496,9 @@

    %GeneratorPrototype%.return ( _value_ )

    %GeneratorPrototype%.throw ( _exception_ )

    This method performs the following steps when called:

    - 1. Let _g_ be the *this* value. - 1. Let _C_ be ThrowCompletion(_exception_). - 1. Return ? GeneratorResumeAbrupt(_g_, _C_, ~empty~). + 1. Let _generator_ be the *this* value. + 1. Let _completion_ be ThrowCompletion(_exception_). + 1. Return ? GeneratorResumeAbrupt(_generator_, _completion_, ~empty~).
    @@ -51203,9 +51199,9 @@

    AsyncFunction ( ..._parameterArgs_, _bodyArg_ )

    This function performs the following steps when called:

    - 1. Let _C_ be the active function object. + 1. Let _activeFunc_ be the active function object. 1. If _bodyArg_ is not present, set _bodyArg_ to the empty String. - 1. Return ? CreateDynamicFunction(_C_, NewTarget, ~async~, _parameterArgs_, _bodyArg_). + 1. Return ? CreateDynamicFunction(_activeFunc_, NewTarget, ~async~, _parameterArgs_, _bodyArg_). See NOTE for . @@ -51505,14 +51501,14 @@

    Reflect.preventExtensions ( _target_ )

    -

    Reflect.set ( _target_, _propertyKey_, _V_ [ , _receiver_ ] )

    +

    Reflect.set ( _target_, _propertyKey_, _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. If _receiver_ is not present, then 1. Set _receiver_ to _target_. - 1. Return ? _target_.[[Set]](_key_, _V_, _receiver_). + 1. Return ? _target_.[[Set]](_key_, _value_, _receiver_).
    @@ -51572,10 +51568,10 @@

    Proxy.revocable ( _target_, _handler_ )

    1. Let _proxy_ be ? ProxyCreate(_target_, _handler_). 1. Let _revokerClosure_ be a new Abstract Closure with no parameters that captures nothing and performs the following steps when called: - 1. Let _F_ be the active function object. - 1. Let _p_ be _F_.[[RevocableProxy]]. + 1. Let _activeFunc_ be the active function object. + 1. Let _p_ be _activeFunc_.[[RevocableProxy]]. 1. If _p_ is *null*, return NormalCompletion(*undefined*). - 1. Set _F_.[[RevocableProxy]] to *null*. + 1. Set _activeFunc_.[[RevocableProxy]] to *null*. 1. Assert: _p_ is a Proxy exotic object. 1. Set _p_.[[ProxyTarget]] to *null*. 1. Set _p_.[[ProxyHandler]] to *null*. @@ -51853,8 +51849,8 @@

    1. Let _events_ be an empty Set. 1. For each Agent Events Record _aer_ of _execution_.[[EventsRecords]], do - 1. For each Memory event _E_ of _aer_.[[EventList]], do - 1. Add _E_ to _events_. + 1. For each Memory event _event_ of _aer_.[[EventList]], do + 1. Add _event_ to _events_. 1. Return _events_. @@ -51869,8 +51865,8 @@

    1. Let _events_ be an empty Set. - 1. For each Memory event _E_ of EventSet(_execution_), do - 1. If _E_ is a Shared Data Block event, add _E_ to _events_. + 1. For each Memory event _event_ of EventSet(_execution_), do + 1. If _event_ is a Shared Data Block event, add _event_ to _events_. 1. Return _events_. @@ -51893,7 +51889,7 @@

    ComposeWriteEventBytes ( _execution_: a candidate execution, _byteIndex_: a non-negative integer, - _Ws_: a List of either WriteSharedMemory or ReadModifyWriteSharedMemory events, + _writes_: a List of either WriteSharedMemory or ReadModifyWriteSharedMemory events, ): a List of byte values

    @@ -51901,15 +51897,15 @@

    1. Let _byteLocation_ be _byteIndex_. 1. Let _bytesRead_ be a new empty List. - 1. For each element _W_ of _Ws_, do - 1. Assert: _W_ has _byteLocation_ in its memory range. - 1. Let _payloadIndex_ be _byteLocation_ - _W_.[[ByteIndex]]. - 1. If _W_ is a WriteSharedMemory event, then - 1. Let _byte_ be _W_.[[Payload]][_payloadIndex_]. + 1. For each element _writeEvent_ of _writes_, do + 1. Assert: _writeEvent_ has _byteLocation_ in its memory range. + 1. Let _payloadIndex_ be _byteLocation_ - _writeEvent_.[[ByteIndex]]. + 1. If _writeEvent_ is a WriteSharedMemory event, then + 1. Let _byte_ be _writeEvent_.[[Payload]][_payloadIndex_]. 1. Else, - 1. Assert: _W_ is a ReadModifyWriteSharedMemory event. - 1. Let _bytes_ be ValueOfReadEvent(_execution_, _W_). - 1. Let _bytesModified_ be _W_.[[ModifyOp]](_bytes_, _W_.[[Payload]]). + 1. Assert: _writeEvent_ is a ReadModifyWriteSharedMemory event. + 1. Let _bytes_ be ValueOfReadEvent(_execution_, _writeEvent_). + 1. Let _bytesModified_ be _writeEvent_.[[ModifyOp]](_bytes_, _writeEvent_.[[Payload]]). 1. Let _byte_ be _bytesModified_[_payloadIndex_]. 1. Append _byte_ to _bytesRead_. 1. Set _byteLocation_ to _byteLocation_ + 1. @@ -51927,15 +51923,15 @@

    ValueOfReadEvent ( _execution_: a candidate execution, - _R_: a ReadSharedMemory or ReadModifyWriteSharedMemory event, + _readEvent_: a ReadSharedMemory or ReadModifyWriteSharedMemory event, ): a List of byte values

    - 1. Let _Ws_ be reads-bytes-from(_R_) in _execution_. - 1. Assert: _Ws_ is a List of WriteSharedMemory or ReadModifyWriteSharedMemory events with length equal to _R_.[[ElementSize]]. - 1. Return ComposeWriteEventBytes(_execution_, _R_.[[ByteIndex]], _Ws_). + 1. Let _writes_ be reads-bytes-from(_readEvent_) in _execution_. + 1. Assert: _writes_ is a List of WriteSharedMemory or ReadModifyWriteSharedMemory events with length equal to _readEvent_.[[ElementSize]]. + 1. Return ComposeWriteEventBytes(_execution_, _readEvent_.[[ByteIndex]], _writes_). @@ -51949,7 +51945,7 @@

    Relations of Candidate Executions

    is-agent-order-before

    For a candidate execution _execution_, its is-agent-order-before Relation is the least Relation on Memory events that satisfies the following.

      -
    • For events _E_ and _D_, _E_ is-agent-order-before _D_ in _execution_ if there is some Agent Events Record _aer_ in _execution_.[[EventsRecords]] such that _aer_.[[EventList]] contains both _E_ and _D_ and _E_ is before _D_ in List order of _aer_.[[EventList]].
    • +
    • For events _eventA_ and _eventB_, _eventA_ is-agent-order-before _eventB_ in _execution_ if there is some Agent Events Record _aer_ in _execution_.[[EventsRecords]] such that _aer_.[[EventList]] contains both _eventA_ and _eventB_ and _eventA_ is before _eventB_ in List order of _aer_.[[EventList]].
    @@ -51962,10 +51958,10 @@

    reads-bytes-from

    For a candidate execution _execution_, its reads-bytes-from function is a mathematical function mapping Memory events in SharedDataBlockEventSet(_execution_) to Lists of events in SharedDataBlockEventSet(_execution_) that satisfies the following conditions.

    • -

      For each ReadSharedMemory or ReadModifyWriteSharedMemory event _R_ in SharedDataBlockEventSet(_execution_), reads-bytes-from(_R_) in _execution_ is a List of length _R_.[[ElementSize]] whose elements are WriteSharedMemory or ReadModifyWriteSharedMemory events _Ws_ such that all of the following are true.

      +

      For each ReadSharedMemory or ReadModifyWriteSharedMemory event _readEvent_ in SharedDataBlockEventSet(_execution_), reads-bytes-from(_readEvent_) in _execution_ is a List of length _readEvent_.[[ElementSize]] whose elements are WriteSharedMemory or ReadModifyWriteSharedMemory events _writes_ such that all of the following are true.

        -
      • Each event _W_ with index _i_ in _Ws_ has _R_.[[ByteIndex]] + _i_ in its memory range.
      • -
      • _R_ is not in _Ws_.
      • +
      • Each event _writeEvent_ with index _i_ in _writes_ has _readEvent_.[[ByteIndex]] + _i_ in its memory range.
      • +
      • _result_ is not in _writes_.
    @@ -51976,7 +51972,7 @@

    reads-bytes-from

    reads-from

    For a candidate execution _execution_, its reads-from Relation is the least Relation on Memory events that satisfies the following.

      -
    • For events _R_ and _W_, _R_ reads-from _W_ in _execution_ if SharedDataBlockEventSet(_execution_) contains both _R_ and _W_, and reads-bytes-from(_R_) in _execution_ contains _W_.
    • +
    • For events _readEvent_ and _writeEvent_, _readEvent_ reads-from _writeEvent_ in _execution_ if SharedDataBlockEventSet(_execution_) contains both _readEvent_ and _writeEvent_, and reads-bytes-from(_readEvent_) in _execution_ contains _writeEvent_.
    @@ -51984,12 +51980,12 @@

    reads-from

    host-synchronizes-with

    For a candidate execution _execution_, its host-synchronizes-with Relation is a host-provided strict partial order on host-specific Memory events that satisfies at least the following.

      -
    • If _E_ host-synchronizes-with _D_ in _execution_, HostEventSet(_execution_) contains _E_ and _D_.
    • +
    • If _eventA_ host-synchronizes-with _eventB_ in _execution_, HostEventSet(_execution_) contains _eventA_ and _eventB_.
    • There is no cycle in the union of host-synchronizes-with and is-agent-order-before in _execution_.
    -

    For two host-specific events _E_ and _D_ in a candidate execution _execution_, _E_ host-synchronizes-with _D_ in _execution_ implies _E_ happens-before _D_ in _execution_.

    +

    For two host-specific events _eventA_ and _eventB_ in a candidate execution _execution_, _eventA_ host-synchronizes-with _eventB_ in _execution_ implies _eventA_ happens-before _eventB_ in _execution_.

    This Relation allows the host to provide additional synchronization mechanisms, such as `postMessage` between HTML workers.

    @@ -52001,15 +51997,15 @@

    synchronizes-with

    For a candidate execution _execution_, its synchronizes-with Relation is the least Relation on Memory events that satisfies the following.

    • - For events _R_ and _W_, _W_ synchronizes-with _R_ in _execution_ if _R_ reads-from _W_ in _execution_, _R_.[[Order]] is ~seq-cst~, _W_.[[Order]] is ~seq-cst~, and _R_ and _W_ have equal memory ranges. + For events _readEvent_ and _writeEvent_, _writeEvent_ synchronizes-with _readEvent_ in _execution_ if _readEvent_ reads-from _writeEvent_ in _execution_, _readEvent_.[[Order]] is ~seq-cst~, _writeEvent_.[[Order]] is ~seq-cst~, and _readEvent_ and _writeEvent_ have equal memory ranges.
    • For each element _eventsRecord_ of _execution_.[[EventsRecords]], the following is true.
        -
      • For events _S_ and _Sw_, _S_ synchronizes-with _Sw_ in _execution_ if _eventsRecord_.[[AgentSynchronizesWith]] contains (_S_, _Sw_).
      • +
      • For events _eventA_ and _eventB_, _eventA_ synchronizes-with _eventB_ in _execution_ if _eventsRecord_.[[AgentSynchronizesWith]] contains (_eventA_, _eventB_).
    • -
    • For events _E_ and _D_, _E_ synchronizes-with _D_ in _execution_ if _execution_.[[HostSynchronizesWith]] contains (_E_, _D_).
    • +
    • For events _eventA_ and _eventB_, _eventA_ synchronizes-with _eventB_ in _execution_ if _execution_.[[HostSynchronizesWith]] contains (_eventA_, _eventB_).
    @@ -52025,7 +52021,7 @@

    synchronizes-with

    -

    For Shared Data Block events _R_ and _W_ in a candidate execution _execution_ such that _W_ synchronizes-with _R_, _R_ may reads-from other writes than _W_.

    +

    For Shared Data Block events _readEvent_ and _writeEvent_ in a candidate execution _execution_ such that _writeEvent_ synchronizes-with _readEvent_, _readEvent_ may reads-from other writes than _writeEvent_.

    @@ -52035,12 +52031,12 @@

    happens-before

    • -

      For events _E_ and _D_, _E_ happens-before _D_ in _execution_ if any of the following conditions are true.

      +

      For events _eventA_ and _eventB_, _eventA_ happens-before _eventB_ in _execution_ if any of the following conditions are true.

        -
      • _E_ is-agent-order-before _D_ in _execution_.
      • -
      • _E_ synchronizes-with _D_ in _execution_.
      • -
      • SharedDataBlockEventSet(_execution_) contains both _E_ and _D_, _E_.[[Order]] is ~init~, and _E_ and _D_ have overlapping memory ranges.
      • -
      • There is an event _F_ such that _E_ happens-before _F_ and _F_ happens-before _D_ in _execution_.
      • +
      • _eventA_ is-agent-order-before _eventB_ in _execution_.
      • +
      • _eventA_ synchronizes-with _eventB_ in _execution_.
      • +
      • SharedDataBlockEventSet(_execution_) contains both _eventA_ and _eventB_, _eventA_.[[Order]] is ~init~, and _eventA_ and _eventB_ have overlapping memory ranges.
      • +
      • There is an event _eventC_ such that _eventA_ happens-before _eventC_ and _eventC_ happens-before _eventB_ in _execution_.
    @@ -52058,10 +52054,10 @@

    Properties of Valid Executions

    Valid Chosen Reads

    A candidate execution _execution_ has valid chosen reads if the following algorithm returns *true*.

    - 1. For each ReadSharedMemory or ReadModifyWriteSharedMemory event _R_ of SharedDataBlockEventSet(_execution_), do - 1. Let _chosenValueRecord_ be the element of _execution_.[[ChosenValues]] whose [[Event]] field is _R_. + 1. For each ReadSharedMemory or ReadModifyWriteSharedMemory event _readEvent_ of SharedDataBlockEventSet(_execution_), do + 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_, _R_). + 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 @@ -52076,13 +52072,13 @@

    Valid Chosen Reads

    Coherent Reads

    A candidate execution _execution_ has coherent reads if the following algorithm returns *true*.

    - 1. For each ReadSharedMemory or ReadModifyWriteSharedMemory event _R_ of SharedDataBlockEventSet(_execution_), do - 1. Let _Ws_ be reads-bytes-from(_R_) in _execution_. - 1. Let _byteLocation_ be _R_.[[ByteIndex]]. - 1. For each element _W_ of _Ws_, do - 1. If _R_ happens-before _W_ in _execution_, then + 1. For each ReadSharedMemory or ReadModifyWriteSharedMemory event _readEvent_ of SharedDataBlockEventSet(_execution_), do + 1. Let _writes_ be reads-bytes-from(_readEvent_) in _execution_. + 1. Let _byteLocation_ be _readEvent_.[[ByteIndex]]. + 1. For each element _writeEvent_ of _writes_, do + 1. If _readEvent_ happens-before _writeEvent_ in _execution_, then 1. Return *false*. - 1. If there exists a WriteSharedMemory or ReadModifyWriteSharedMemory event _V_ that has _byteLocation_ in its memory range such that _W_ happens-before _V_ in _execution_ and _V_ happens-before _R_ in _execution_, then + 1. If there exists a WriteSharedMemory or ReadModifyWriteSharedMemory event _value_ that has _byteLocation_ in its memory range such that _writeEvent_ happens-before _value_ in _execution_ and _value_ happens-before _readEvent_ in _execution_, then 1. Return *false*. 1. Set _byteLocation_ to _byteLocation_ + 1. 1. Return *true*. @@ -52093,11 +52089,11 @@

    Coherent Reads

    Tear Free Reads

    A candidate execution _execution_ has tear free reads if the following algorithm returns *true*.

    - 1. For each ReadSharedMemory or ReadModifyWriteSharedMemory event _R_ of SharedDataBlockEventSet(_execution_), do - 1. If _R_.[[NoTear]] is *true*, then - 1. Assert: The remainder of dividing _R_.[[ByteIndex]] by _R_.[[ElementSize]] is 0. - 1. For each Memory event _W_ such that _R_ reads-from _W_ in _execution_ and _W_.[[NoTear]] is *true*, do - 1. If _R_ and _W_ have equal memory ranges and there exists a Memory event _V_ such that _V_ and _W_ have equal memory ranges, _V_.[[NoTear]] is *true*, _W_ and _V_ are not the same Shared Data Block event, and _R_ reads-from _V_ in _execution_, then + 1. For each ReadSharedMemory or ReadModifyWriteSharedMemory event _readEvent_ of SharedDataBlockEventSet(_execution_), do + 1. If _readEvent_.[[NoTear]] is *true*, then + 1. Assert: The remainder of dividing _readEvent_.[[ByteIndex]] by _readEvent_.[[ElementSize]] is 0. + 1. For each Memory event _writeEvent_ such that _readEvent_ reads-from _writeEvent_ in _execution_ and _writeEvent_.[[NoTear]] is *true*, do + 1. If _readEvent_ and _writeEvent_ have equal memory ranges and there exists a Memory event _value_ such that _value_ and _writeEvent_ have equal memory ranges, _value_.[[NoTear]] is *true*, _writeEvent_ and _value_ are not the same Shared Data Block event, and _readEvent_ reads-from _value_ in _execution_, then 1. Return *false*. 1. Return *true*. @@ -52112,20 +52108,20 @@

    Tear Free Reads

    Sequentially Consistent Atomics

    For a candidate execution _execution_, is-memory-order-before is a strict total order of all Memory events in EventSet(_execution_) that satisfies the following.

      -
    • For events _E_ and _D_, _E_ is-memory-order-before _D_ in _execution_ if _E_ happens-before _D_ in _execution_.
    • +
    • For events _eventA_ and _eventB_, _eventA_ is-memory-order-before _eventB_ in _execution_ if _eventA_ happens-before _eventB_ in _execution_.
    • -

      For events _R_ and _W_ such that _R_ reads-from _W_ in _execution_, there is no WriteSharedMemory or ReadModifyWriteSharedMemory event _V_ in SharedDataBlockEventSet(_execution_) such that _V_.[[Order]] is ~seq-cst~, _W_ is-memory-order-before _V_ in _execution_, _V_ is-memory-order-before _R_ in _execution_, and any of the following conditions are true.

      +

      For events _readEvent_ and _writeEvent_ such that _readEvent_ reads-from _writeEvent_ in _execution_, there is no WriteSharedMemory or ReadModifyWriteSharedMemory event _value_ in SharedDataBlockEventSet(_execution_) such that _value_.[[Order]] is ~seq-cst~, _writeEvent_ is-memory-order-before _value_ in _execution_, _value_ is-memory-order-before _readEvent_ in _execution_, and any of the following conditions are true.

        -
      • _W_ synchronizes-with _R_ in _execution_, and _V_ and _R_ have equal memory ranges.
      • -
      • _W_ happens-before _R_ and _V_ happens-before _R_ in _execution_, _W_.[[Order]] is ~seq-cst~, and _W_ and _V_ have equal memory ranges.
      • -
      • _W_ happens-before _R_ and _W_ happens-before _V_ in _execution_, _R_.[[Order]] is ~seq-cst~, and _V_ and _R_ have equal memory ranges.
      • +
      • _writeEvent_ synchronizes-with _readEvent_ in _execution_, and _value_ and _readEvent_ have equal memory ranges.
      • +
      • _writeEvent_ happens-before _readEvent_ and _value_ happens-before _readEvent_ in _execution_, _writeEvent_.[[Order]] is ~seq-cst~, and _writeEvent_ and _value_ have equal memory ranges.
      • +
      • _writeEvent_ happens-before _readEvent_ and _writeEvent_ happens-before _value_ in _execution_, _readEvent_.[[Order]] is ~seq-cst~, and _value_ and _readEvent_ have equal memory ranges.

      This clause additionally constrains ~seq-cst~ events on equal memory ranges.

    • -

      For each WriteSharedMemory or ReadModifyWriteSharedMemory event _W_ in SharedDataBlockEventSet(_execution_), if _W_.[[Order]] is ~seq-cst~, then it is not the case that there is an infinite number of ReadSharedMemory or ReadModifyWriteSharedMemory events in SharedDataBlockEventSet(_execution_) with equal memory range that is memory-order before _W_.

      +

      For each WriteSharedMemory or ReadModifyWriteSharedMemory event _writeEvent_ in SharedDataBlockEventSet(_execution_), if _writeEvent_.[[Order]] is ~seq-cst~, then it is not the case that there is an infinite number of ReadSharedMemory or ReadModifyWriteSharedMemory events in SharedDataBlockEventSet(_execution_) with equal memory range that is memory-order before _writeEvent_.

      This clause together with the forward progress guarantee on agents ensure the liveness condition that ~seq-cst~ writes become visible to ~seq-cst~ reads with equal memory range in finite time.

      @@ -52155,13 +52151,13 @@

      Valid Executions

      Races

      -

      For an execution _execution_ and events _E_ and _D_ that are contained in SharedDataBlockEventSet(_execution_), _E_ and _D_ are in a race if the following algorithm returns *true*.

      +

      For an execution _execution_ and events _eventA_ and _eventB_ that are contained in SharedDataBlockEventSet(_execution_), _eventA_ and _eventB_ are in a race if the following algorithm returns *true*.

      - 1. If _E_ and _D_ are not the same Shared Data Block event, then - 1. If it is not the case that both _E_ happens-before _D_ in _execution_ and _D_ happens-before _E_ in _execution_, then - 1. If _E_ is either a WriteSharedMemory or ReadModifyWriteSharedMemory event, _D_ is either a WriteSharedMemory or ReadModifyWriteSharedMemory event, and _E_ and _D_ do not have disjoint memory ranges, then + 1. If _eventA_ and _eventB_ are not the same Shared Data Block event, then + 1. If it is not the case that both _eventA_ happens-before _eventB_ in _execution_ and _eventB_ happens-before _eventA_ in _execution_, then + 1. If _eventA_ and _eventB_ are both WriteSharedMemory or ReadModifyWriteSharedMemory events and _eventA_ and _eventB_ do not have disjoint memory ranges, then 1. Return *true*. - 1. If _E_ reads-from _D_ in _execution_ or _D_ reads-from _E_ in _execution_, then + 1. If _eventA_ reads-from _eventB_ in _execution_ or _eventB_ reads-from _eventA_ in _execution_, then 1. Return *true*. 1. Return *false*. @@ -52169,12 +52165,12 @@

      Races

      Data Races

      -

      For an execution _execution_ and events _E_ and _D_ that are contained in SharedDataBlockEventSet(_execution_), _E_ and _D_ are in a data race if the following algorithm returns *true*.

      +

      For an execution _execution_ and events _eventA_ and _eventB_ that are contained in SharedDataBlockEventSet(_execution_), _eventA_ and _eventB_ are in a data race if the following algorithm returns *true*.

      - 1. If _E_ and _D_ are in a race in _execution_, then - 1. If _E_.[[Order]] is not ~seq-cst~ or _D_.[[Order]] is not ~seq-cst~, then + 1. If _eventA_ and _eventB_ are in a race in _execution_, then + 1. If _eventA_.[[Order]] is not ~seq-cst~ or _eventB_.[[Order]] is not ~seq-cst~, then 1. Return *true*. - 1. If _E_ and _D_ have overlapping memory ranges, then + 1. If _eventA_ and _eventB_ have overlapping memory ranges, then 1. Return *true*. 1. Return *false*. @@ -52950,14 +52946,14 @@

      Runtime Semantics: CompileAtom

      CompileAtom rules for the |Atom| productions except for Atom :: PatternCharacter are also used for the |ExtendedAtom| productions, but with |ExtendedAtom| substituted for |Atom|. The following rules, with parameter _direction_, are also added:

      ExtendedAtom :: `\` [lookahead == `c`] - 1. Let _A_ be the CharSet containing the single character `\\` U+005C (REVERSE SOLIDUS). - 1. Return CharacterSetMatcher(_rer_, _A_, *false*, _direction_). + 1. Let _charSet_ be the CharSet containing the single character `\\` U+005C (REVERSE SOLIDUS). + 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). ExtendedAtom :: ExtendedPatternCharacter 1. Let _ch_ be the character represented by |ExtendedPatternCharacter|. - 1. Let _A_ be a one-element CharSet containing the character _ch_. - 1. Return CharacterSetMatcher(_rer_, _A_, *false*, _direction_). + 1. Let _charSet_ be a one-element CharSet containing the character _ch_. + 1. Return CharacterSetMatcher(_regexpRecord_, _charSet_, *false*, _direction_). @@ -52968,19 +52964,19 @@

      Runtime Semantics: CompileToCharSet

      The following two rules replace the corresponding rules of CompileToCharSet.

      NonemptyClassRanges :: ClassAtom `-` ClassAtom ClassContents - 1. Let _A_ be CompileToCharSet of the first |ClassAtom| with argument _rer_. - 1. Let _B_ be CompileToCharSet of the second |ClassAtom| with argument _rer_. - 1. Let _C_ be CompileToCharSet of |ClassContents| with argument _rer_. - 1. Let _D_ be CharacterRangeOrUnion(_rer_, _A_, _B_). - 1. Return the union of _D_ and _C_. + 1. Let _charSet_ be CompileToCharSet of the first |ClassAtom| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of the second |ClassAtom| with argument _regexpRecord_. + 1. Let _remainingSet_ be CompileToCharSet of |ClassContents| with argument _regexpRecord_. + 1. Let _rangeSet_ be CharacterRangeOrUnion(_regexpRecord_, _charSet_, _otherSet_). + 1. Return the union of _rangeSet_ and _remainingSet_. NonemptyClassRangesNoDash :: ClassAtomNoDash `-` ClassAtom ClassContents - 1. Let _A_ be CompileToCharSet of |ClassAtomNoDash| with argument _rer_. - 1. Let _B_ be CompileToCharSet of |ClassAtom| with argument _rer_. - 1. Let _C_ be CompileToCharSet of |ClassContents| with argument _rer_. - 1. Let _D_ be CharacterRangeOrUnion(_rer_, _A_, _B_). - 1. Return the union of _D_ and _C_. + 1. Let _charSet_ be CompileToCharSet of |ClassAtomNoDash| with argument _regexpRecord_. + 1. Let _otherSet_ be CompileToCharSet of |ClassAtom| with argument _regexpRecord_. + 1. Let _remainingSet_ be CompileToCharSet of |ClassContents| with argument _regexpRecord_. + 1. Let _rangeSet_ be CharacterRangeOrUnion(_regexpRecord_, _charSet_, _otherSet_). + 1. Return the union of _rangeSet_ and _remainingSet_.

      In addition, the following rules are added to CompileToCharSet.

      @@ -53000,19 +52996,19 @@

      Runtime Semantics: CompileToCharSet

      CharacterRangeOrUnion ( - _rer_: a RegExp Record, - _A_: a CharSet, - _B_: a CharSet, + _regexpRecord_: a RegExp Record, + _charSet_: a CharSet, + _otherSet_: a CharSet, ): a CharSet

      - 1. If HasEitherUnicodeFlag(_rer_) is *false*, then - 1. If _A_ does not contain exactly one character or _B_ does not contain exactly one character, then - 1. Let _C_ be the CharSet containing the single character `-` U+002D (HYPHEN-MINUS). - 1. Return the union of CharSets _A_, _B_ and _C_. - 1. Return CharacterRange(_A_, _B_). + 1. If HasEitherUnicodeFlag(_regexpRecord_) is *false*, then + 1. If _charSet_ does not contain exactly one character or _otherSet_ does not contain exactly one character, then + 1. Let _remainingSet_ be the CharSet containing the single character `-` U+002D (HYPHEN-MINUS). + 1. Return the union of CharSets _charSet_, _otherSet_ and _remainingSet_. + 1. Return CharacterRange(_charSet_, _otherSet_).
      @@ -53094,24 +53090,24 @@

      escape ( _string_ )

      1. Set _string_ to ? ToString(_string_). 1. Let _len_ be the length of _string_. - 1. Let _R_ be the empty 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. Let _C_ be the code unit at index _k_ within _string_. - 1. If _unescapedSet_ contains _C_, then - 1. Let _S_ be _C_. + 1. Let _codeUnit_ be the code unit at index _k_ within _string_. + 1. If _unescapedSet_ contains _codeUnit_, then + 1. Let _str_ be _codeUnit_. 1. Else, - 1. Let _n_ be the numeric value of _C_. + 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 _S_ be the string-concatenation of *"%"* and StringPad(_hex_, 2, *"0"*, ~start~). + 1. Let _str_ 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 _S_ be the string-concatenation of *"%u"* and StringPad(_hex_, 4, *"0"*, ~start~). - 1. Set _R_ to the string-concatenation of _R_ and _S_. + 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. Set _k_ to _k_ + 1. - 1. Return _R_. + 1. Return _result_.

      The encoding is partly based on the encoding described in RFC 1738, but the entire encoding specified in this standard is described above without regard to the contents of RFC 1738. This encoding does not reflect changes to RFC 1738 made by RFC 3986.

      @@ -53126,11 +53122,11 @@

      unescape ( _string_ )

      1. Set _string_ to ? ToString(_string_). 1. Let _len_ be the length of _string_. - 1. Let _R_ be the empty String. + 1. Let _result_ be the empty String. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. Let _C_ be the code unit at index _k_ within _string_. - 1. If _C_ is the code unit 0x0025 (PERCENT SIGN), then + 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 @@ -53142,11 +53138,11 @@

      unescape ( _string_ )

      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 _C_ to the code unit whose numeric value is _n_. + 1. Set _codeUnit_ to the code unit whose numeric value is _n_. 1. Set _k_ to _k_ + _optionalAdvance_. - 1. Set _R_ to the string-concatenation of _R_ and _C_. + 1. Set _result_ to the string-concatenation of _result_ and _codeUnit_. 1. Set _k_ to _k_ + 1. - 1. Return _R_. + 1. Return _result_.
      @@ -53159,10 +53155,10 @@

      String.prototype.substr ( _start_, _length_ )

      This method returns a substring of the result of converting the *this* value to a String, starting from index _start_ and running for _length_ code units (or through the end of the String if _length_ is *undefined*). If _start_ is negative, it is treated as _sourceLength_ + _start_ where _sourceLength_ is the length of the String. The result is a String value, not a String object.

      It performs the following steps when called:

      - 1. Let _O_ be the *this* value. - 1. Perform ? RequireObjectCoercible(_O_). - 1. Let _S_ be ? ToString(_O_). - 1. Let _size_ be the length of _S_. + 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 _intStart_ be ? ToIntegerOrInfinity(_start_). 1. If _intStart_ = -∞, set _intStart_ to 0. 1. Else if _intStart_ < 0, set _intStart_ to max(_size_ + _intStart_, 0). @@ -53170,7 +53166,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 _S_ from _intStart_ to _intEnd_. + 1. Return the substring of _str_ 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.

      @@ -53181,38 +53177,38 @@

      String.prototype.substr ( _start_, _length_ )

      String.prototype.anchor ( _name_ )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"a"*, *"name"*, _name_). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"a"*, *"name"*, _name_).

      CreateHTML ( - _string_: an ECMAScript language value, + _contents_: an ECMAScript language value, _tag_: a String, _attribute_: a String, - _value_: an ECMAScript language value, + _attrValue_: an ECMAScript language value, ): either a normal completion containing a String or a throw completion

      - 1. Perform ? RequireObjectCoercible(_string_). - 1. Let _S_ be ? ToString(_string_). + 1. Perform ? RequireObjectCoercible(_contents_). + 1. Let _contentsStr_ be ? ToString(_contents_). 1. Let _p1_ be the string-concatenation of *"<"* and _tag_. 1. If _attribute_ is not the empty String, then - 1. Let _V_ be ? ToString(_value_). - 1. Let _escapedV_ be the String value that is the same as _V_ except that each occurrence of the code unit 0x0022 (QUOTATION MARK) in _V_ has been replaced with the six code unit sequence *"&quot;"*. + 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_ * the code unit 0x0020 (SPACE) * _attribute_ * the code unit 0x003D (EQUALS SIGN) * the code unit 0x0022 (QUOTATION MARK) - * _escapedV_ + * _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 _S_. + 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_. @@ -53223,8 +53219,8 @@

      String.prototype.big ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"big"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"big"*, *""*, *""*).
      @@ -53232,8 +53228,8 @@

      String.prototype.big ( )

      String.prototype.blink ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"blink"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"blink"*, *""*, *""*). @@ -53241,8 +53237,8 @@

      String.prototype.blink ( )

      String.prototype.bold ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"b"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"b"*, *""*, *""*). @@ -53250,8 +53246,8 @@

      String.prototype.bold ( )

      String.prototype.fixed ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"tt"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"tt"*, *""*, *""*). @@ -53259,8 +53255,8 @@

      String.prototype.fixed ( )

      String.prototype.fontcolor ( _colour_ )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"font"*, *"color"*, _colour_). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"font"*, *"color"*, _colour_). @@ -53268,8 +53264,8 @@

      String.prototype.fontcolor ( _colour_ )

      String.prototype.fontsize ( _size_ )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"font"*, *"size"*, _size_). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"font"*, *"size"*, _size_). @@ -53277,8 +53273,8 @@

      String.prototype.fontsize ( _size_ )

      String.prototype.italics ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"i"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"i"*, *""*, *""*). @@ -53286,8 +53282,8 @@

      String.prototype.italics ( )

      String.prototype.link ( _url_ )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"a"*, *"href"*, _url_). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"a"*, *"href"*, _url_). @@ -53295,8 +53291,8 @@

      String.prototype.link ( _url_ )

      String.prototype.small ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"small"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"small"*, *""*, *""*). @@ -53304,8 +53300,8 @@

      String.prototype.small ( )

      String.prototype.strike ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"strike"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"strike"*, *""*, *""*). @@ -53313,8 +53309,8 @@

      String.prototype.strike ( )

      String.prototype.sub ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"sub"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"sub"*, *""*, *""*). @@ -53322,8 +53318,8 @@

      String.prototype.sub ( )

      String.prototype.sup ( )

      This method performs the following steps when called:

      - 1. Let _S_ be the *this* value. - 1. Return ? CreateHTML(_S_, *"sup"*, *""*, *""*). + 1. Let _str_ be the *this* value. + 1. Return ? CreateHTML(_str_, *"sup"*, *""*, *""*). @@ -53371,15 +53367,15 @@

      Date.prototype.setYear ( _year_ )

      1. Let _dateObject_ be the *this* value. 1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). - 1. Let _t_ be _dateObject_.[[DateValue]]. - 1. Let _y_ be ? ToNumber(_year_). - 1. If _t_ is *NaN*, set _t_ to *+0*𝔽; else set _t_ to LocalTime(_t_). - 1. Let _yyyy_ be MakeFullYear(_y_). - 1. Let _d_ be MakeDay(_yyyy_, MonthFromTime(_t_), DateFromTime(_t_)). - 1. Let _date_ be MakeDate(_d_, TimeWithinDay(_t_)). - 1. Let _u_ be TimeClip(UTC(_date_)). - 1. Set _dateObject_.[[DateValue]] to _u_. - 1. Return _u_. + 1. Let _time_ be _dateObject_.[[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. Return _utcTimestamp_. @@ -53399,16 +53395,13 @@

      Additional Properties of the RegExp.prototype Object

      RegExp.prototype.compile ( _pattern_, _flags_ )

      This method performs the following steps when called:

      - 1. Let _O_ be the *this* value. - 1. Perform ? RequireInternalSlot(_O_, [[RegExpMatcher]]). + 1. Let _obj_ be the *this* value. + 1. Perform ? RequireInternalSlot(_obj_, [[RegExpMatcher]]). 1. If _pattern_ is an Object and _pattern_ has a [[RegExpMatcher]] internal slot, then 1. If _flags_ is not *undefined*, throw a *TypeError* exception. - 1. Let _P_ be _pattern_.[[OriginalSource]]. - 1. Let _F_ be _pattern_.[[OriginalFlags]]. - 1. Else, - 1. Let _P_ be _pattern_. - 1. Let _F_ be _flags_. - 1. Return ? RegExpInitialize(_O_, _P_, _F_). + 1. Set _flags_ to _pattern_.[[OriginalFlags]]. + 1. Set _pattern_ to _pattern_.[[OriginalSource]]. + 1. Return ? RegExpInitialize(_obj_, _pattern_, _flags_).

      This method completely reinitializes the *this* value RegExp with a new pattern and flags. An implementation may interpret use of this method as an assertion that the resulting RegExp object will be used multiple times and hence is a candidate for extra optimization.