diff --git a/spec.html b/spec.html index 7d226fda31..addb3f2c4c 100644 --- a/spec.html +++ b/spec.html @@ -105,7 +105,7 @@

Introduction

ECMAScript 2017 introduced Async Functions, Shared Memory, and Atomics along with smaller language and library enhancements, bug fixes, and editorial updates. Async functions improve the asynchronous programming experience by providing syntax for promise-returning functions. Shared Memory and Atomics introduce a new memory model that allows multi-agent programs to communicate using atomic operations that ensure a well-defined execution order even on parallel CPUs. It also included new static methods on Object: `Object.values`, `Object.entries`, and `Object.getOwnPropertyDescriptors`.

ECMAScript 2018 introduced support for asynchronous iteration via the AsyncIterator protocol and async generators. It also included four new regular expression features: the `dotAll` flag, named capture groups, Unicode property escapes, and look-behind assertions. Lastly it included object rest and spread properties.

ECMAScript 2019 introduced a few new built-in functions: `flat` and `flatMap` on `Array.prototype` for flattening arrays, `Object.fromEntries` for directly turning the return value of `Object.entries` into a new Object, and `trimStart` and `trimEnd` on `String.prototype` as better-named alternatives to the widely implemented but non-standard `String.prototype.trimLeft` and `trimRight` built-ins. In addition, it included a few minor updates to syntax and semantics. Updated syntax included optional catch binding parameters and allowing U+2028 (LINE SEPARATOR) and U+2029 (PARAGRAPH SEPARATOR) in string literals to align with JSON. Other updates included requiring that `Array.prototype.sort` be a stable sort, requiring that `JSON.stringify` return well-formed UTF-8 regardless of input, and clarifying `Function.prototype.toString` by requiring that it either return the corresponding original source text or a standard placeholder.

-

ECMAScript 2020, the 11th edition, introduced the `matchAll` method for Strings, to produce an iterator for all match objects generated by a global regular expression; `import()`, a syntax to asynchronously import Modules with a dynamic specifier; `BigInt`, a new number primitive for working with arbitrary precision integers; `Promise.allSettled`, a new Promise combinator that does not short-circuit; `globalThis`, a universal way to access the global `this` value; dedicated `export * as ns from 'module'` syntax for use within modules; increased standardization of `for-in` enumeration order; `import.meta`, a host-populated object available in Modules that may contain contextual information about the Module; as well as adding two new syntax features to improve working with “nullish” values (*null* or *undefined*): nullish coalescing, a value selection operator; and optional chaining, a property access and function invocation operator that short-circuits if the value to access/invoke is nullish.

+

ECMAScript 2020, the 11th edition, introduced the `matchAll` method for Strings, to produce an iterator for all match objects generated by a global regular expression; `import()`, a syntax to asynchronously import Modules with a dynamic specifier; `BigInt`, a new number primitive for working with arbitrary precision integers; `Promise.allSettled`, a new Promise combinator that does not short-circuit; `globalThis`, a universal way to access the global `this` value; dedicated `export * as ns from 'module'` syntax for use within modules; increased standardization of `for-in` enumeration order; `import.meta`, a host-populated object available in Modules that may contain contextual information about the Module; as well as adding two new syntax features to improve working with “nullish” values (*null* or *undefined*): nullish coalescing, a value selection operator; and optional chaining, a property access and function invocation operator that short-circuits if the value to access/invoke is nullish.

ECMAScript 2021, the 12th edition, introduced the `replaceAll` method for Strings; `Promise.any`, a Promise combinator that short-circuits when an input value is fulfilled; `AggregateError`, a new Error type to represent multiple errors at once; logical assignment operators (`??=`, `&&=`, `||=`); `WeakRef`, for referring to a target object without preserving it from garbage collection, and `FinalizationRegistry`, to manage registration and unregistration of cleanup operations performed when target objects are garbage collected; separators for numeric literals (`1_000`); and `Array.prototype.sort` was made more precise, reducing the amount of cases that result in an implementation-defined sort order.

ECMAScript 2022, the 13th edition, introduced top-level `await`, allowing the keyword to be used at the top level of modules; new class elements: public and private instance fields, public and private static fields, private instance methods and accessors, and private static methods and accessors; static blocks inside classes, to perform per-class evaluation initialization; the `#x in obj` syntax, to test for presence of private fields on objects; regular expression match indices via the `/d` flag, which provides start and end indices for matched substrings; the `cause` property on `Error` objects, which can be used to record a causation chain in errors; the `at` method for Strings, Arrays, and TypedArrays, which allows relative indexing; and `Object.hasOwn`, a convenient alternative to `Object.prototype.hasOwnProperty`.

Dozens of individuals representing many organizations have made very significant contributions within Ecma TC39 to the development of this edition and to the prior editions. In addition, a vibrant community has emerged supporting TC39's ECMAScript efforts. This community has reviewed numerous drafts, filed thousands of bug reports, performed implementation experiments, contributed test suites, and educated the world-wide developer community about ECMAScript. Unfortunately, it is impossible to identify and acknowledge every person and organization who has contributed to this effort.

@@ -134,7 +134,7 @@

Conformance

A conforming implementation of ECMAScript must interpret source text input in conformance with the latest version of the Unicode Standard and ISO/IEC 10646.

A conforming implementation of ECMAScript that provides an application programming interface (API) that supports programs that need to adapt to the linguistic and cultural conventions used by different human languages and countries must implement the interface defined by the most recent edition of ECMA-402 that is compatible with this specification.

A conforming implementation of ECMAScript may provide additional types, values, objects, properties, and functions beyond those described in this specification. In particular, a conforming implementation of ECMAScript may provide properties not described in this specification, and values for those properties, for objects that are described in this specification.

-

A conforming implementation of ECMAScript may support program and regular expression syntax not described in this specification. In particular, a conforming implementation of ECMAScript may support program syntax that makes use of any “future reserved words” noted in subclause of this specification.

+

A conforming implementation of ECMAScript may support program and regular expression syntax not described in this specification. In particular, a conforming implementation of ECMAScript may support program syntax that makes use of any “future reserved words” noted in subclause of this specification.

A conforming implementation of ECMAScript must not implement any extension that is listed as a Forbidden Extension in subclause .

A conforming implementation of ECMAScript must not redefine any facilities that are not implementation-defined, implementation-approximated, or host-defined.

A conforming implementation of ECMAScript may choose to implement or not implement Normative Optional subclauses. If any Normative Optional behaviour is implemented, all of the behaviour in the containing Normative Optional clause must be implemented. A Normative Optional clause is denoted in this specification with the words "Normative Optional" in a coloured box, as shown below.

@@ -159,7 +159,7 @@

Example Legacy Normative Optional Clause Heading

Normative References

The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

-

ISO/IEC 10646 Information Technology — Universal Multiple-Octet Coded Character Set (UCS) plus Amendment 1:2005, Amendment 2:2006, Amendment 3:2008, and Amendment 4:2008, plus additional amendments and corrigenda, or successor

+

ISO/IEC 10646 Information Technology — Universal Multiple-Octet Coded Character Set (UCS) plus Amendment 1:2005, Amendment 2:2006, Amendment 3:2008, and Amendment 4:2008, plus additional amendments and corrigenda, or successor

ECMA-402, ECMAScript 2015 Internationalization API Specification.
https://ecma-international.org/publications/standards/Ecma-402.htm @@ -205,8 +205,8 @@

Hosts and Implementations

ECMAScript Overview

-

The following is an informal overview of ECMAScript—not all parts of the language are described. This overview is not part of the standard proper.

-

ECMAScript is object-based: basic language and host facilities are provided by objects, and an ECMAScript program is a cluster of communicating objects. In ECMAScript, an object is a collection of zero or more properties each with attributes that determine how each property can be used—for example, when the Writable attribute for a property is set to *false*, any attempt by executed ECMAScript code to assign a different value to the property fails. Properties are containers that hold other objects, primitive values, or functions. A primitive value is a member of one of the following built-in types: Undefined, Null, Boolean, Number, BigInt, String, and Symbol; an object is a member of the built-in type Object; and a function is a callable object. A function that is associated with an object via a property is called a method.

+

The following is an informal overview of ECMAScript—not all parts of the language are described. This overview is not part of the standard proper.

+

ECMAScript is object-based: basic language and host facilities are provided by objects, and an ECMAScript program is a cluster of communicating objects. In ECMAScript, an object is a collection of zero or more properties each with attributes that determine how each property can be used—for example, when the Writable attribute for a property is set to *false*, any attempt by executed ECMAScript code to assign a different value to the property fails. Properties are containers that hold other objects, primitive values, or functions. A primitive value is a member of one of the following built-in types: Undefined, Null, Boolean, Number, BigInt, String, and Symbol; an object is a member of the built-in type Object; and a function is a callable object. A function that is associated with an object via a property is called a method.

ECMAScript defines a collection of built-in objects that round out the definition of ECMAScript entities. These built-in objects include the global object; objects that are fundamental to the runtime semantics of the language including `Object`, `Function`, `Boolean`, `Symbol`, and various `Error` objects; objects that represent and manipulate numeric values including `Math`, `Number`, and `Date`; the text processing objects `String` and `RegExp`; objects that are indexed collections of values including `Array` and nine different kinds of Typed Arrays whose elements all have a specific numeric data representation; keyed collections including `Map` and `Set` objects; objects supporting structured data including the `JSON` object, `ArrayBuffer`, `SharedArrayBuffer`, and `DataView`; objects supporting control abstractions including generator functions and `Promise` objects; and reflection objects including `Proxy` and `Reflect`.

ECMAScript also defines a set of built-in operators. ECMAScript operators include various unary operations, multiplicative operators, additive operators, bitwise shift operators, relational operators, equality operators, binary bitwise operators, binary logical operators, assignment operators, and the comma operator.

Large ECMAScript programs are supported by modules which allow a program to be divided into multiple sequences of statements and declarations. Each module explicitly identifies declarations it uses that need to be provided by other modules and which of its declarations are available for use by other modules.

@@ -391,7 +391,7 @@

Number value

Number type

-

set of all possible Number values including the special “Not-a-Number” (NaN) value, positive infinity, and negative infinity

+

set of all possible Number values including the special “Not-a-Number” (NaN) value, positive infinity, and negative infinity

@@ -409,7 +409,7 @@

Infinity

NaN

-

Number value that is an IEEE 754-2019 “Not-a-Number” value

+

Number value that is an IEEE 754-2019 “Not-a-Number” value

@@ -525,15 +525,15 @@

Context-Free Grammars

The Lexical and RegExp Grammars

A lexical grammar for ECMAScript is given in clause . This grammar has as its terminal symbols Unicode code points that conform to the rules for |SourceCharacter| defined in . It defines a set of productions, starting from the goal symbol |InputElementDiv|, |InputElementTemplateTail|, |InputElementRegExp|, |InputElementRegExpOrTemplateTail|, or |InputElementHashbangOrRegExp|, that describe how sequences of such code points are translated into a sequence of input elements.

-

Input elements other than white space and comments form the terminal symbols for the syntactic grammar for ECMAScript and are called ECMAScript tokens. These tokens are the reserved words, identifiers, literals, and punctuators of the ECMAScript language. Moreover, line terminators, although not considered to be tokens, also become part of the stream of input elements and guide the process of automatic semicolon insertion (). Simple white space and single-line comments are discarded and do not appear in the stream of input elements for the syntactic grammar. A |MultiLineComment| (that is, a comment of the form `/*`…`*/` regardless of whether it spans more than one line) is likewise simply discarded if it contains no line terminator; but if a |MultiLineComment| contains one or more line terminators, then it is replaced by a single line terminator, which becomes part of the stream of input elements for the syntactic grammar.

+

Input elements other than white space and comments form the terminal symbols for the syntactic grammar for ECMAScript and are called ECMAScript tokens. These tokens are the reserved words, identifiers, literals, and punctuators of the ECMAScript language. Moreover, line terminators, although not considered to be tokens, also become part of the stream of input elements and guide the process of automatic semicolon insertion (). Simple white space and single-line comments are discarded and do not appear in the stream of input elements for the syntactic grammar. A |MultiLineComment| (that is, a comment of the form `/*`…`*/` regardless of whether it spans more than one line) is likewise simply discarded if it contains no line terminator; but if a |MultiLineComment| contains one or more line terminators, then it is replaced by a single line terminator, which becomes part of the stream of input elements for the syntactic grammar.

A RegExp grammar for ECMAScript is given in . This grammar also has as its terminal symbols the code points as defined by |SourceCharacter|. It defines a set of productions, starting from the goal symbol |Pattern|, that describe how sequences of code points are translated into regular expression patterns.

-

Productions of the lexical and RegExp grammars are distinguished by having two colons “::” as separating punctuation. The lexical and RegExp grammars share some productions.

+

Productions of the lexical and RegExp grammars are distinguished by having two colons “::” as separating punctuation. The lexical and RegExp grammars share some productions.

The Numeric String Grammar

A numeric string grammar appears in . It has as its terminal symbols |SourceCharacter|, and is used for translating Strings into numeric values starting from the goal symbol |StringNumericLiteral| (which is similar to but distinct from the lexical grammar for numeric literals).

-

Productions of the numeric string grammar are distinguished by having three colons “:::” as punctuation, and are never used for parsing source text.

+

Productions of the numeric string grammar are distinguished by having three colons “:::” as punctuation, and are never used for parsing source text.

@@ -552,8 +552,8 @@

The Syntactic Grammar

Each call to `eval` converts the value of `str` into ECMAScript source text and performs an independent parse that creates its own separate tree of Parse Nodes. The trees are distinct even though each parse operates upon a source text that was derived from the same String value.

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.

+

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:

  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. @@ -585,14 +585,14 @@

    Terminal Symbols

    In contrast, in the syntactic grammar, a contiguous run of fixed-width code points is a single terminal symbol.

    Terminal symbols come in two other forms:

      -
    • In the lexical and RegExp grammars, Unicode code points without a conventional printed representation are instead shown in the form "<ABBREV>" where "ABBREV" is a mnemonic for the code point or set of code points. These forms are defined in , , and .
    • +
    • In the lexical and RegExp grammars, Unicode code points without a conventional printed representation are instead shown in the form "<ABBREV>" where "ABBREV" is a mnemonic for the code point or set of code points. These forms are defined in , , and .
    • In the syntactic grammar, certain terminal symbols (e.g. |IdentifierName| and |RegularExpressionLiteral|) are shown in italics, as they refer to the nonterminals of the same name in the lexical grammar.

    Nonterminal Symbols and Productions

    -

    Nonterminal symbols are shown in italic type. The definition of a nonterminal (also called a “production”) is introduced by the name of the nonterminal being defined followed by one or more colons. (The number of colons indicates to which grammar the production belongs.) One or more alternative right-hand sides for the nonterminal then follow on succeeding lines. For example, the syntactic definition:

    +

    Nonterminal symbols are shown in italic type. The definition of a nonterminal (also called a “production”) is introduced by the name of the nonterminal being defined followed by one or more colons. (The number of colons indicates to which grammar the production belongs.) One or more alternative right-hand sides for the nonterminal then follow on succeeding lines. For example, the syntactic definition:

    WhileStatement : `while` `(` Expression `)` Statement @@ -608,7 +608,7 @@

    Nonterminal Symbols and Productions

    Optional Symbols

    -

    The subscripted suffix “opt”, which may appear after a terminal or nonterminal, indicates an optional symbol. The alternative containing the optional symbol actually specifies two right-hand sides, one that omits the optional element and one that includes it. This means that:

    +

    The subscripted suffix “opt”, which may appear after a terminal or nonterminal, indicates an optional symbol. The alternative containing the optional symbol actually specifies two right-hand sides, one that omits the optional element and one that includes it. This means that:

    VariableDeclaration : BindingIdentifier Initializer? @@ -643,7 +643,7 @@

    Optional Symbols

    Grammatical Parameters

    -

    A production may be parameterized by a subscripted annotation of the form “[parameters]”, which may appear as a suffix to the nonterminal symbol defined by the production. “parameters” may be either a single name or a comma separated list of names. A parameterized production is shorthand for a set of productions defining all combinations of the parameter names, preceded by an underscore, appended to the parameterized nonterminal symbol. This means that:

    +

    A production may be parameterized by a subscripted annotation of the form “[parameters]”, which may appear as a suffix to the nonterminal symbol defined by the production. “parameters” may be either a single name or a comma separated list of names. A parameterized production is shorthand for a set of productions defining all combinations of the parameter names, preceded by an underscore, appended to the parameterized nonterminal symbol. This means that:

    StatementList[Return] : ReturnStatement @@ -708,7 +708,7 @@

    Grammatical Parameters

    ReturnStatement ExpressionStatement
    -

    A nonterminal reference may have both a parameter list and an “opt” suffix. For example:

    +

    A nonterminal reference may have both a parameter list and an “opt” suffix. For example:

    VariableDeclaration : BindingIdentifier Initializer[+In]? @@ -719,7 +719,7 @@

    Grammatical Parameters

    BindingIdentifier BindingIdentifier Initializer_In
    -

    Prefixing a parameter name with “?” on a right-hand side nonterminal reference makes that parameter value dependent upon the occurrence of the parameter name on the reference to the current production's left-hand side symbol. For example:

    +

    Prefixing a parameter name with “?” on a right-hand side nonterminal reference makes that parameter value dependent upon the occurrence of the parameter name on the reference to the current production's left-hand side symbol. For example:

    VariableDeclaration[In] : BindingIdentifier Initializer[?In] @@ -732,7 +732,7 @@

    Grammatical Parameters

    VariableDeclaration_In : BindingIdentifier Initializer_In
    -

    If a right-hand side alternative is prefixed with “[+parameter]” that alternative is only available if the named parameter was used in referencing the production's nonterminal symbol. If a right-hand side alternative is prefixed with “[\~parameter]” that alternative is only available if the named parameter was not used in referencing the production's nonterminal symbol. This means that:

    +

    If a right-hand side alternative is prefixed with “[+parameter]” that alternative is only available if the named parameter was used in referencing the production's nonterminal symbol. If a right-hand side alternative is prefixed with “[\~parameter]” that alternative is only available if the named parameter was not used in referencing the production's nonterminal symbol. This means that:

    StatementList[Return] : [+Return] ReturnStatement @@ -766,7 +766,7 @@

    Grammatical Parameters

    one of

    -

    When the words “one of” follow the colon(s) in a grammar definition, they signify that each of the terminal symbols on the following line or lines is an alternative definition. For example, the lexical grammar for ECMAScript contains the production:

    +

    When the words “one of” follow the colon(s) in a grammar definition, they signify that each of the terminal symbols on the following line or lines is an alternative definition. For example, the lexical grammar for ECMAScript contains the production:

    NonZeroDigit :: one of `1` `2` `3` `4` `5` `6` `7` `8` `9` @@ -788,13 +788,13 @@

    one of

    [empty]

    -

    If the phrase “[empty]” appears as the right-hand side of a production, it indicates that the production's right-hand side contains no terminals or nonterminals.

    +

    If the phrase “[empty]” appears as the right-hand side of a production, it indicates that the production's right-hand side contains no terminals or nonterminals.

    Lookahead Restrictions

    -

    If the phrase “[lookahead = _seq_]” appears in the right-hand side of a production, it indicates that the production may only be used if the token sequence _seq_ is a prefix of the immediately following input token sequence. Similarly, “[lookahead ∈ _set_]”, where _set_ is a finite non-empty set of token sequences, indicates that the production may only be used if some element of _set_ is a prefix of the immediately following token sequence. For convenience, the set can also be written as a nonterminal, in which case it represents the set of all token sequences to which that nonterminal could expand. It is considered an editorial error if the nonterminal could expand to infinitely many distinct token sequences.

    -

    These conditions may be negated. “[lookahead ≠ _seq_]” indicates that the containing production may only be used if _seq_ is not a prefix of the immediately following input token sequence, and “[lookahead ∉ _set_]” indicates that the production may only be used if no element of _set_ is a prefix of the immediately following token sequence.

    +

    If the phrase “[lookahead = _seq_]” appears in the right-hand side of a production, it indicates that the production may only be used if the token sequence _seq_ is a prefix of the immediately following input token sequence. Similarly, “[lookahead ∈ _set_]”, where _set_ is a finite non-empty set of token sequences, indicates that the production may only be used if some element of _set_ is a prefix of the immediately following token sequence. For convenience, the set can also be written as a nonterminal, in which case it represents the set of all token sequences to which that nonterminal could expand. It is considered an editorial error if the nonterminal could expand to infinitely many distinct token sequences.

    +

    These conditions may be negated. “[lookahead ≠ _seq_]” indicates that the containing production may only be used if _seq_ is not a prefix of the immediately following input token sequence, and “[lookahead ∉ _set_]” indicates that the production may only be used if no element of _set_ is a prefix of the immediately following token sequence.

    As an example, given the definitions:

    DecimalDigit :: one of @@ -816,7 +816,7 @@

    Lookahead Restrictions

    [no |LineTerminator| here]

    -

    If the phrase “[no |LineTerminator| here]” appears in the right-hand side of a production of the syntactic grammar, it indicates that the production is a restricted production: it may not be used if a |LineTerminator| occurs in the input stream at the indicated position. For example, the production:

    +

    If the phrase “[no |LineTerminator| here]” appears in the right-hand side of a production of the syntactic grammar, it indicates that the production is a restricted production: it may not be used if a |LineTerminator| occurs in the input stream at the indicated position. For example, the production:

    ThrowStatement : `throw` [no LineTerminator here] Expression `;` @@ -827,7 +827,7 @@

    [no |LineTerminator| here]

    but not

    -

    The right-hand side of a production may specify that certain expansions are not permitted by using the phrase “but not” and then indicating the expansions to be excluded. For example, the production:

    +

    The right-hand side of a production may specify that certain expansions are not permitted by using the phrase “but not” and then indicating the expansions to be excluded. For example, the production:

    Identifier :: IdentifierName but not ReservedWord @@ -860,11 +860,11 @@

    Algorithm Conventions

    1. Subsubsubsubstep 1. Subsubsubsubsubstep -

    A step or substep may be written as an “if” predicate that conditions its substeps. In this case, the substeps are only applied if the predicate is true. If a step or substep begins with the word “else”, it is a predicate that is the negation of the preceding “if” predicate step at the same level.

    +

    A step or substep may be written as an “if” predicate that conditions its substeps. In this case, the substeps are only applied if the predicate is true. If a step or substep begins with the word “else”, it is a predicate that is the negation of the preceding “if” predicate step at the same level.

    A step may specify the iterative application of its substeps.

    -

    A step that begins with “Assert:” asserts an invariant condition of its algorithm. Such assertions are used to make explicit algorithmic invariants that would otherwise be implicit. Such assertions add no additional semantic requirements and hence need not be checked by an implementation. They are used simply to clarify algorithms.

    -

    Algorithm steps may declare named aliases for any value using the form “Let _x_ be _someValue_”. These aliases are reference-like in that both _x_ and _someValue_ refer to the same underlying data and modifications to either are visible to both. Algorithm steps that want to avoid this reference-like behaviour should explicitly make a copy of the right-hand side: “Let _x_ be a copy of _someValue_” creates a shallow copy of _someValue_.

    -

    Once declared, an alias may be referenced in any subsequent steps and must not be referenced from steps prior to the alias's declaration. Aliases may be modified using the form “Set _x_ to _someOtherValue_”.

    +

    A step that begins with “Assert:” asserts an invariant condition of its algorithm. Such assertions are used to make explicit algorithmic invariants that would otherwise be implicit. Such assertions add no additional semantic requirements and hence need not be checked by an implementation. They are used simply to clarify algorithms.

    +

    Algorithm steps may declare named aliases for any value using the form “Let _x_ be _someValue_”. These aliases are reference-like in that both _x_ and _someValue_ refer to the same underlying data and modifications to either are visible to both. Algorithm steps that want to avoid this reference-like behaviour should explicitly make a copy of the right-hand side: “Let _x_ be a copy of _someValue_” creates a shallow copy of _someValue_.

    +

    Once declared, an alias may be referenced in any subsequent steps and must not be referenced from steps prior to the alias's declaration. Aliases may be modified using the form “Set _x_ to _someOtherValue_”.

    Abstract Operations

    @@ -874,7 +874,7 @@

    Abstract Operations

    Syntax-Directed Operations

    A syntax-directed operation is a named operation whose definition consists of algorithms, each of which is associated with one or more productions from one of the ECMAScript grammars. A production that has multiple alternative definitions will typically have a distinct algorithm for each alternative. When an algorithm is associated with a grammar production, it may reference the terminal and nonterminal symbols of the production alternative as if they were parameters of the algorithm. When used in this manner, nonterminal symbols refer to the actual alternative definition that is matched when parsing the source text. The source text matched by a grammar production or Parse Node derived from it is the portion of the source text that starts at the beginning of the first terminal that participated in the match and ends at the end of the last terminal that participated in the match.

    -

    When an algorithm is associated with a production alternative, the alternative is typically shown without any “[ ]” grammar annotations. Such annotations should only affect the syntactic recognition of the alternative and have no effect on the associated semantics for the alternative.

    +

    When an algorithm is associated with a production alternative, the alternative is typically shown without any “[ ]” grammar annotations. Such annotations should only affect the syntactic recognition of the alternative and have no effect on the associated semantics for the alternative.

    Syntax-directed operations are invoked with a parse node and, optionally, other parameters by using the conventions on steps , , and in the following algorithm:

    1. [id="step-sdo-invocation-example-1"] Let _status_ be SyntaxDirectedOperation of |SomeNonTerminal|. @@ -882,7 +882,7 @@

    Syntax-Directed Operations

    1. [id="step-sdo-invocation-example-2"] Perform SyntaxDirectedOperation of _someParseNode_. 1. [id="step-sdo-invocation-example-3"] Perform SyntaxDirectedOperation of _someParseNode_ with argument *"value"*.
    -

    Unless explicitly specified otherwise, all chain productions have an implicit definition for every operation that might be applied to that production's left-hand side nonterminal. The implicit definition simply reapplies the same operation with the same parameters, if any, to the chain production's sole right-hand side nonterminal and then returns the result. For example, assume that some algorithm has a step of the form: “Return Evaluation of |Block|” and that there is a production:

    +

    Unless explicitly specified otherwise, all chain productions have an implicit definition for every operation that might be applied to that production's left-hand side nonterminal. The implicit definition simply reapplies the same operation with the same parameters, if any, to the chain production's sole right-hand side nonterminal and then returns the result. For example, assume that some algorithm has a step of the form: “Return Evaluation of |Block|” and that there is a production:

    Block : `{` StatementList `}` @@ -1046,23 +1046,23 @@

    Mathematical Operations

    This specification makes reference to these kinds of numeric values:

    • Mathematical values: Arbitrary real numbers, used as the default numeric type.
    • -
    • Extended mathematical values: Mathematical values together with +∞ and -∞.
    • +
    • Extended mathematical values: Mathematical values together with +∞ and -∞.
    • Numbers: IEEE 754-2019 double-precision floating point values.
    • BigInts: ECMAScript language values representing arbitrary integers in a one-to-one correspondence.

    In the language of this specification, numerical values are distinguished among different numeric kinds using subscript suffixes. The subscript 𝔽 refers to Numbers, and the subscript refers to BigInts. Numeric values without a subscript suffix refer to mathematical values.

    -

    Numeric operators such as +, ×, =, and ≥ refer to those operations as determined by the type of the operands. When applied to mathematical values, the operators refer to the usual mathematical operations. When applied to extended mathematical values, the operators refer to the usual mathematical operations over the extended real numbers; indeterminate forms are not defined and their use in this specification should be considered an editorial error. When applied to Numbers, the operators refer to the relevant operations within IEEE 754-2019. When applied to BigInts, the operators refer to the usual mathematical operations applied to the mathematical value of the BigInt.

    -

    In general, when this specification refers to a numerical value, such as in the phrase, "the length of _y_" or "the integer represented by the four hexadecimal digits ...", without explicitly specifying a numeric kind, the phrase refers to a mathematical value. Phrases which refer to a Number or a BigInt value are explicitly annotated as such; for example, "the Number value for the number of code points in …" or "the BigInt value for …".

    +

    Numeric operators such as +, ×, =, and ≥ refer to those operations as determined by the type of the operands. When applied to mathematical values, the operators refer to the usual mathematical operations. When applied to extended mathematical values, the operators refer to the usual mathematical operations over the extended real numbers; indeterminate forms are not defined and their use in this specification should be considered an editorial error. When applied to Numbers, the operators refer to the relevant operations within IEEE 754-2019. When applied to BigInts, the operators refer to the usual mathematical operations applied to the mathematical value of the BigInt.

    +

    In general, when this specification refers to a numerical value, such as in the phrase, "the length of _y_" or "the integer represented by the four hexadecimal digits ...", without explicitly specifying a numeric kind, the phrase refers to a mathematical value. Phrases which refer to a Number or a BigInt value are explicitly annotated as such; for example, "the Number value for the number of code points in …" or "the BigInt value for …".

    Numeric operators applied to mixed-type operands (such as a Number and a mathematical value) are not defined and should be considered an editorial error in this specification.

    This specification denotes most numeric values in base 10; it also uses numeric values of the form 0x followed by digits 0-9 or A-F as base-16 values.

    When the term integer is used in this specification, it refers to a mathematical value which is in the set of integers, unless otherwise stated. When the term integral Number is used in this specification, it refers to a Number value whose mathematical value is in the set of integers.

    -

    Conversions between mathematical values and Numbers or BigInts are always explicit in this document. A conversion from a mathematical value or extended mathematical value _x_ to a Number is denoted as "the Number value for _x_" or 𝔽(_x_), and is defined in . A conversion from an integer _x_ to a BigInt is denoted as "the BigInt value for _x_" or ℤ(_x_). A conversion from a Number or BigInt _x_ to a mathematical value is denoted as "the mathematical value of _x_", or ℝ(_x_). The mathematical value of *+0*𝔽 and *-0*𝔽 is the mathematical value 0. The mathematical value of non-finite values is not defined. The extended mathematical value of _x_ is the mathematical value of _x_ for finite values, and is +∞ and -∞ for *+∞*𝔽 and *-∞*𝔽 respectively; it is not defined for *NaN*.

    +

    Conversions between mathematical values and Numbers or BigInts are always explicit in this document. A conversion from a mathematical value or extended mathematical value _x_ to a Number is denoted as "the Number value for _x_" or 𝔽(_x_), and is defined in . A conversion from an integer _x_ to a BigInt is denoted as "the BigInt value for _x_" or ℤ(_x_). A conversion from a Number or BigInt _x_ to a mathematical value is denoted as "the mathematical value of _x_", or ℝ(_x_). The mathematical value of *+0*𝔽 and *-0*𝔽 is the mathematical value 0. The mathematical value of non-finite values is not defined. The extended mathematical value of _x_ is the mathematical value of _x_ for finite values, and is +∞ and -∞ for *+∞*𝔽 and *-∞*𝔽 respectively; it is not defined for *NaN*.

    The mathematical function abs(_x_) produces the absolute value of _x_, which is -_x_ if _x_ < 0 and otherwise is _x_ itself.

    -

    The mathematical function min(_x1_, _x2_, … , _xN_) produces the mathematically smallest of _x1_ through _xN_. The mathematical function max(_x1_, _x2_, ..., _xN_) produces the mathematically largest of _x1_ through _xN_. The domain and range of these mathematical functions are the extended mathematical values.

    -

    The notation “_x_ modulo _y_” (_y_ must be finite and non-zero) computes a value _k_ of the same sign as _y_ (or zero) such that abs(_k_) < abs(_y_) and _x_ - _k_ = _q_ × _y_ for some integer _q_.

    -

    The phrase "the result of clamping _x_ between _lower_ and _upper_" (where _x_ is an extended mathematical value and _lower_ and _upper_ are mathematical values such that _lower_ ≤ _upper_) produces _lower_ if _x_ < _lower_, produces _upper_ if _x_ > _upper_, and otherwise produces _x_.

    -

    The mathematical function floor(_x_) produces the largest integer (closest to +∞) that is not larger than _x_.

    +

    The mathematical function min(_x1_, _x2_, … , _xN_) produces the mathematically smallest of _x1_ through _xN_. The mathematical function max(_x1_, _x2_, ..., _xN_) produces the mathematically largest of _x1_ through _xN_. The domain and range of these mathematical functions are the extended mathematical values.

    +

    The notation “_x_ modulo _y_” (_y_ must be finite and non-zero) computes a value _k_ of the same sign as _y_ (or zero) such that abs(_k_) < abs(_y_) and _x_ - _k_ = _q_ × _y_ for some integer _q_.

    +

    The phrase "the result of clamping _x_ between _lower_ and _upper_" (where _x_ is an extended mathematical value and _lower_ and _upper_ are mathematical values such that _lower_ ≤ _upper_) produces _lower_ if _x_ < _lower_, produces _upper_ if _x_ > _upper_, and otherwise produces _x_.

    +

    The mathematical function floor(_x_) produces the largest integer (closest to +∞) that is not larger than _x_.

    The mathematical function truncate(_x_) removes the fractional part of _x_ by rounding towards zero, producing -floor(-_x_) if _x_ < 0 and otherwise producing floor(_x_).

    Mathematical functions min, max, abs, floor, and truncate are not defined for Numbers and BigInts, and any usage of those methods that have non-mathematical value arguments would be an editorial error in this specification.

    @@ -1070,9 +1070,9 @@

    Mathematical Operations

    An interval from lower bound _a_ to upper bound _b_ is a possibly-infinite, possibly-empty set of numeric values of the same numeric type. Each bound will be described as either inclusive or exclusive, but not both. There are four kinds of intervals, as follows:

      -
    • An interval from _a_ (inclusive) to _b_ (inclusive), also called an inclusive interval from _a_ to _b_, includes all values _x_ of the same numeric type such that _a_ ≤ _x_ ≤ _b_, and no others.
    • -
    • An interval from _a_ (inclusive) to _b_ (exclusive) includes all values _x_ of the same numeric type such that _a_ ≤ _x_ < _b_, and no others.
    • -
    • An interval from _a_ (exclusive) to _b_ (inclusive) includes all values _x_ of the same numeric type such that _a_ < _x_ ≤ _b_, and no others.
    • +
    • An interval from _a_ (inclusive) to _b_ (inclusive), also called an inclusive interval from _a_ to _b_, includes all values _x_ of the same numeric type such that _a_ ≤ _x_ ≤ _b_, and no others.
    • +
    • An interval from _a_ (inclusive) to _b_ (exclusive) includes all values _x_ of the same numeric type such that _a_ ≤ _x_ < _b_, and no others.
    • +
    • An interval from _a_ (exclusive) to _b_ (inclusive) includes all values _x_ of the same numeric type such that _a_ < _x_ ≤ _b_, and no others.
    • An interval from _a_ (exclusive) to _b_ (exclusive) includes all values _x_ of the same numeric type such that _a_ < _x_ < _b_, and no others.

    For example, the interval from 1 (inclusive) to 2 (exclusive) consists of all mathematical values between 1 and 2, including 1 and not including 2. For the purpose of defining intervals, *-0*𝔽 < *+0*𝔽, so, for example, an inclusive interval with a lower bound of *+0*𝔽 includes *+0*𝔽 but not *-0*𝔽. *NaN* is never included in an interval.

    @@ -1085,8 +1085,8 @@

    Value Notation

    Identity

    -

    In this specification, the word “is” is used to compare two values through equality, as in “If _bool_ is *true*, then”. For the purposes of this equality comparison, all values within this specification fall into one of the following two categories.

    -

    Values without identity are equal to other values without identity if all of their innate characteristics are the same — characteristics such as the magnitude of an integer or the length of a sequence. Because of this, values without identity may be manifest anywhere simply by fully describing their characteristics. It is not meaningful to change the characteristics of a value that does not have identity. Examples of values without identity include, but are not limited to: Booleans; mathematical values and extended mathematical values; Numbers; BigInts; *null*; *undefined*; sequences, including Strings, ECMAScript source text, surrogate pairs, Directive Prologues, etc; UTF-16 code units; Unicode code points; enums; abstract operations, including syntax-directed operations, host hooks, etc; and ordered pairs. The preceding list is exhaustive for ECMAScript language values.

    +

    In this specification, the word “is” is used to compare two values through equality, as in “If _bool_ is *true*, then”. For the purposes of this equality comparison, all values within this specification fall into one of the following two categories.

    +

    Values without identity are equal to other values without identity if all of their innate characteristics are the same — characteristics such as the magnitude of an integer or the length of a sequence. Because of this, values without identity may be manifest anywhere simply by fully describing their characteristics. It is not meaningful to change the characteristics of a value that does not have identity. Examples of values without identity include, but are not limited to: Booleans; mathematical values and extended mathematical values; Numbers; BigInts; *null*; *undefined*; sequences, including Strings, ECMAScript source text, surrogate pairs, Directive Prologues, etc; UTF-16 code units; Unicode code points; enums; abstract operations, including syntax-directed operations, host hooks, etc; and ordered pairs. The preceding list is exhaustive for ECMAScript language values.

    In contrast, each value with identity is unique and therefore only equal to itself. Values with identity are like values without identity but with an additional unguessable, unchangeable, universally-unique characteristic called identity. References to existing values with identity cannot be manifest simply by describing them, as the identity itself is indescribable; instead, references to these values must be explicitly passed from one place to another. Some values with identity are mutable and therefore can have their characteristics (except their identity) changed in-place, causing all holders of the value to observe the new characteristics. Examples of values with identity include, but are not limited to: Objects, including function objects, exotic objects, etc; any kind of Records, including Property Descriptors, PrivateElements, etc; symbols; Parse Nodes; Lists; Sets and Relations; Abstract Closures; Data Blocks; Private Names; execution contexts and execution context stacks; agent signifiers; and WaiterLists. The preceding list is exhaustive for ECMAScript language values.

    A value without identity is never equal to a value with identity.

    @@ -1096,7 +1096,7 @@

    Identity

    ECMAScript Data Types and Values

    Algorithms within this specification manipulate values each of which has an associated type. The possible value types are exactly those defined in this clause. Types are further subclassified into ECMAScript language types and specification types.

    -

    Within this specification, the notation “Type(_x_)” is used as shorthand for “the type of _x_” where “type” refers to the ECMAScript language and specification types defined in this clause.

    +

    Within this specification, the notation “Type(_x_)” is used as shorthand for “the type of _x_” where “type” refers to the ECMAScript language and specification types defined in this clause.

    ECMAScript Language Types

    @@ -1119,14 +1119,14 @@

    The Boolean Type

    The String Type

    -

    The String type is the set of all ordered sequences of zero or more 16-bit unsigned integer values (“elements”) up to a maximum length of 253 - 1 elements. The String type is generally used to represent textual data in a running ECMAScript program, in which case each element in the String is treated as a UTF-16 code unit value. Each element is regarded as occupying a position within the sequence. These positions are indexed with non-negative integers. The first element (if any) is at index 0, the next element (if any) at index 1, and so on. The length of a String is the number of elements (i.e., 16-bit values) within it. The empty String has length zero and therefore contains no elements.

    +

    The String type is the set of all ordered sequences of zero or more 16-bit unsigned integer values (“elements”) up to a maximum length of 253 - 1 elements. The String type is generally used to represent textual data in a running ECMAScript program, in which case each element in the String is treated as a UTF-16 code unit value. Each element is regarded as occupying a position within the sequence. These positions are indexed with non-negative integers. The first element (if any) is at index 0, the next element (if any) at index 1, and so on. The length of a String is the number of elements (i.e., 16-bit values) within it. The empty String has length zero and therefore contains no elements.

    ECMAScript operations that do not interpret String contents apply no further semantics. Operations that do interpret String values treat each element as a single UTF-16 code unit. However, ECMAScript does not restrict the value of or relationships between these code units, so operations that further interpret String contents as sequences of Unicode code points encoded in UTF-16 must account for ill-formed subsequences. Such operations apply special treatment to every code unit with a numeric value in the inclusive interval from 0xD800 to 0xDBFF (defined by the Unicode Standard as a leading surrogate, or more formally as a high-surrogate code unit) and every code unit with a numeric value in the inclusive interval from 0xDC00 to 0xDFFF (defined as a trailing surrogate, or more formally as a low-surrogate code unit) using the following rules:

    • A code unit that is not a and not a is interpreted as a code point with the same value.
    • - A sequence of two code units, where the first code unit _c1_ is a and the second code unit _c2_ a , is a surrogate pair and is interpreted as a code point with the value (_c1_ - 0xD800) × 0x400 + (_c2_ - 0xDC00) + 0x10000. (See ) + A sequence of two code units, where the first code unit _c1_ is a and the second code unit _c2_ a , is a surrogate pair and is interpreted as a code point with the value (_c1_ - 0xD800) × 0x400 + (_c2_ - 0xDC00) + 0x10000. (See )
    • A code unit that is a or , but is not part of a , is interpreted as a code point with the same value. @@ -1156,9 +1156,9 @@

      1. Let _len_ be the length of _string_. - 1. If _searchValue_ is the empty String and _fromIndex_ ≤ _len_, return _fromIndex_. + 1. If _searchValue_ is the empty String and _fromIndex_ ≤ _len_, return _fromIndex_. 1. Let _searchLen_ be the length of _searchValue_. - 1. For each integer _i_ such that _fromIndex_ ≤ _i_ ≤ _len_ - _searchLen_, in ascending order, do + 1. For each integer _i_ such that _fromIndex_ ≤ _i_ ≤ _len_ - _searchLen_, in ascending order, do 1. Let _candidate_ be the substring of _string_ from _i_ to _i_ + _searchLen_. 1. If _candidate_ is the same sequence of code units as _searchValue_, return _i_. 1. Return -1. @@ -1167,7 +1167,7 @@

      If _searchValue_ is the empty String and _fromIndex_ is less than or equal to the length of _string_, this algorithm returns _fromIndex_. The empty String is effectively found at every position within a string, including after the last code unit.

      -

      This algorithm always returns -1 if _fromIndex_ > the length of _string_.

      +

      This algorithm always returns -1 if _fromIndex_ > the length of _string_.

      @@ -1181,7 +1181,7 @@

      The Symbol Type

      Well-Known Symbols

      Well-known symbols are built-in Symbol values that are explicitly referenced by algorithms of this specification. They are typically used as the keys of properties whose values serve as extension points of a specification algorithm. Unless otherwise specified, well-known symbols values are shared by all realms ().

      -

      Within this specification a well-known symbol is referred to by using a notation of the form @@name, where “name” is one of the values listed in .

      +

      Within this specification a well-known symbol is referred to by using a notation of the form @@name, where “name” is one of the values listed in .

      @@ -1802,28 +1802,28 @@

      Numeric Types

      The Number Type

      -

      The Number type has exactly 18,437,736,874,454,810,627 (that is, 264 - 253 + 3) values, representing the double-precision 64-bit format IEEE 754-2019 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic, except that the 9,007,199,254,740,990 (that is, 253 - 2) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special *NaN* value. (Note that the *NaN* value is produced by the program expression `NaN`.) In some implementations, external code might be able to detect a difference between various Not-a-Number values, but such behaviour is implementation-defined; to ECMAScript code, all *NaN* values are indistinguishable from each other.

      +

      The Number type has exactly 18,437,736,874,454,810,627 (that is, 264 - 253 + 3) values, representing the double-precision 64-bit format IEEE 754-2019 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic, except that the 9,007,199,254,740,990 (that is, 253 - 2) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special *NaN* value. (Note that the *NaN* value is produced by the program expression `NaN`.) In some implementations, external code might be able to detect a difference between various Not-a-Number values, but such behaviour is implementation-defined; to ECMAScript code, all *NaN* values are indistinguishable from each other.

      The bit pattern that might be observed in an ArrayBuffer (see ) or a SharedArrayBuffer (see ) after a Number value has been stored into it is not necessarily the same as the internal representation of that Number value used by the ECMAScript implementation.

      -

      There are two other special values, called *positive Infinity* and *negative Infinity*. For brevity, these values are also referred to for expository purposes by the symbols *+∞*𝔽 and *-∞*𝔽, respectively. (Note that these two infinite Number values are produced by the program expressions `+Infinity` (or simply `Infinity`) and `-Infinity`.)

      +

      There are two other special values, called *positive Infinity* and *negative Infinity*. For brevity, these values are also referred to for expository purposes by the symbols *+∞*𝔽 and *-∞*𝔽, respectively. (Note that these two infinite Number values are produced by the program expressions `+Infinity` (or simply `Infinity`) and `-Infinity`.)

      The other 18,437,736,874,454,810,624 (that is, 264 - 253) values are called the finite numbers. Half of these are positive numbers and half are negative numbers; for every finite positive Number value there is a corresponding negative value having the same magnitude.

      Note that there is both a *positive zero* and a *negative zero*. For brevity, these values are also referred to for expository purposes by the symbols *+0*𝔽 and *-0*𝔽, respectively. (Note that these two different zero Number values are produced by the program expressions `+0` (or simply `0`) and `-0`.)

      The 18,437,736,874,454,810,622 (that is, 264 - 253 - 2) finite non-zero values are of two kinds:

      18,428,729,675,200,069,632 (that is, 264 - 254) of them are normalized, having the form

      - _s_ × _m_ × 2_e_ + _s_ × _m_ × 2_e_

      where _s_ is 1 or -1, _m_ is an integer in the interval from 252 (inclusive) to 253 (exclusive), and _e_ is an integer in the inclusive interval from -1074 to 971.

      The remaining 9,007,199,254,740,990 (that is, 253 - 2) values are denormalized, having the form

      - _s_ × _m_ × 2_e_ + _s_ × _m_ × 2_e_

      where _s_ is 1 or -1, _m_ is an integer in the interval from 0 (exclusive) to 252 (exclusive), and _e_ is -1074.

      Note that all the positive and negative integers whose magnitude is no greater than 253 are representable in the Number type. The integer 0 has two representations in the Number type: *+0*𝔽 and *-0*𝔽.

      A finite number has an odd significand if it is non-zero and the integer _m_ used to express it (in one of the two forms shown above) is odd. Otherwise, it has an even significand.

      -

      In this specification, the phrase “the Number value for _x_” where _x_ represents an exact real mathematical quantity (which might even be an irrational number such as π) means a Number value chosen in the following manner. Consider the set of all finite values of the Number type, with *-0*𝔽 removed and with two additional values added to it that are not representable in the Number type, namely 21024 (which is +1 × 253 × 2971) and -21024 (which is -1 × 253 × 2971). Choose the member of this set that is closest in value to _x_. If two values of the set are equally close, then the one with an even significand is chosen; for this purpose, the two extra values 21024 and -21024 are considered to have even significands. Finally, if 21024 was chosen, replace it with *+∞*𝔽; if -21024 was chosen, replace it with *-∞*𝔽; if *+0*𝔽 was chosen, replace it with *-0*𝔽 if and only if _x_ < 0; any other chosen value is used unchanged. The result is the Number value for _x_. (This procedure corresponds exactly to the behaviour of the IEEE 754-2019 roundTiesToEven mode.)

      -

      The Number value for +∞ is *+∞*𝔽, and the Number value for -∞ is *-∞*𝔽.

      +

      In this specification, the phrase “the Number value for _x_” where _x_ represents an exact real mathematical quantity (which might even be an irrational number such as π) means a Number value chosen in the following manner. Consider the set of all finite values of the Number type, with *-0*𝔽 removed and with two additional values added to it that are not representable in the Number type, namely 21024 (which is +1 × 253 × 2971) and -21024 (which is -1 × 253 × 2971). Choose the member of this set that is closest in value to _x_. If two values of the set are equally close, then the one with an even significand is chosen; for this purpose, the two extra values 21024 and -21024 are considered to have even significands. Finally, if 21024 was chosen, replace it with *+∞*𝔽; if -21024 was chosen, replace it with *-∞*𝔽; if *+0*𝔽 was chosen, replace it with *-0*𝔽 if and only if _x_ < 0; any other chosen value is used unchanged. The result is the Number value for _x_. (This procedure corresponds exactly to the behaviour of the IEEE 754-2019 roundTiesToEven mode.)

      +

      The Number value for +∞ is *+∞*𝔽, and the Number value for -∞ is *-∞*𝔽.

      Some ECMAScript operators deal only with integers in specific ranges such as the inclusive interval from -231 to 231 - 1 or the inclusive interval from 0 to 216 - 1. These operators accept any value of the Number type but first convert each such value to an integer value in the expected range. See the descriptions of the numeric conversion operations in .

      @@ -1869,35 +1869,35 @@

      1. If _exponent_ is *NaN*, return *NaN*. 1. If _exponent_ is *+0*𝔽 or _exponent_ is *-0*𝔽, return *1*𝔽. 1. If _base_ is *NaN*, return *NaN*. - 1. If _base_ is *+∞*𝔽, then - 1. If _exponent_ > *+0*𝔽, return *+∞*𝔽. Otherwise, return *+0*𝔽. - 1. If _base_ is *-∞*𝔽, then - 1. If _exponent_ > *+0*𝔽, then - 1. If _exponent_ is an odd integral Number, return *-∞*𝔽. Otherwise, return *+∞*𝔽. + 1. If _base_ is *+∞*𝔽, then + 1. If _exponent_ > *+0*𝔽, return *+∞*𝔽. Otherwise, return *+0*𝔽. + 1. If _base_ is *-∞*𝔽, then + 1. If _exponent_ > *+0*𝔽, then + 1. If _exponent_ is an odd integral Number, return *-∞*𝔽. Otherwise, return *+∞*𝔽. 1. Else, 1. If _exponent_ is an odd integral Number, return *-0*𝔽. Otherwise, return *+0*𝔽. 1. If _base_ is *+0*𝔽, then - 1. If _exponent_ > *+0*𝔽, return *+0*𝔽. Otherwise, return *+∞*𝔽. + 1. If _exponent_ > *+0*𝔽, return *+0*𝔽. Otherwise, return *+∞*𝔽. 1. If _base_ is *-0*𝔽, then - 1. If _exponent_ > *+0*𝔽, then + 1. If _exponent_ > *+0*𝔽, then 1. If _exponent_ is an odd integral Number, return *-0*𝔽. Otherwise, return *+0*𝔽. 1. Else, - 1. If _exponent_ is an odd integral Number, return *-∞*𝔽. Otherwise, return *+∞*𝔽. + 1. If _exponent_ is an odd integral Number, return *-∞*𝔽. Otherwise, return *+∞*𝔽. 1. Assert: _base_ is finite and is neither *+0*𝔽 nor *-0*𝔽. - 1. If _exponent_ is *+∞*𝔽, then - 1. If abs(ℝ(_base_)) > 1, return *+∞*𝔽. + 1. If _exponent_ is *+∞*𝔽, then + 1. If abs(ℝ(_base_)) > 1, return *+∞*𝔽. 1. If abs(ℝ(_base_)) is 1, return *NaN*. 1. If abs(ℝ(_base_)) < 1, return *+0*𝔽. - 1. If _exponent_ is *-∞*𝔽, then - 1. If abs(ℝ(_base_)) > 1, return *+0*𝔽. + 1. If _exponent_ is *-∞*𝔽, then + 1. If abs(ℝ(_base_)) > 1, return *+0*𝔽. 1. If abs(ℝ(_base_)) is 1, return *NaN*. - 1. If abs(ℝ(_base_)) < 1, return *+∞*𝔽. + 1. If abs(ℝ(_base_)) < 1, return *+∞*𝔽. 1. Assert: _exponent_ is finite and is neither *+0*𝔽 nor *-0*𝔽. 1. If _base_ < *-0*𝔽 and _exponent_ is not an integral Number, return *NaN*. 1. Return an implementation-approximated Number value representing the result of raising ℝ(_base_) to the ℝ(_exponent_) power. -

      The result of _base_ `**` _exponent_ when _base_ is *1*𝔽 or *-1*𝔽 and _exponent_ is *+∞*𝔽 or *-∞*𝔽, or when _base_ is *1*𝔽 and _exponent_ is *NaN*, differs from IEEE 754-2019. The first edition of ECMAScript specified a result of *NaN* for this operation, whereas later revisions of IEEE 754 specified *1*𝔽. The historical ECMAScript behaviour is preserved for compatibility reasons.

      +

      The result of _base_ `**` _exponent_ when _base_ is *1*𝔽 or *-1*𝔽 and _exponent_ is *+∞*𝔽 or *-∞*𝔽, or when _base_ is *1*𝔽 and _exponent_ is *NaN*, differs from IEEE 754-2019. The first edition of ECMAScript specified a result of *NaN* for this operation, whereas later revisions of IEEE 754 specified *1*𝔽. The historical ECMAScript behaviour is preserved for compatibility reasons.

      @@ -1914,13 +1914,13 @@

      1. If _x_ is *NaN* or _y_ is *NaN*, return *NaN*. - 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, then + 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, then 1. If _y_ is *+0*𝔽 or _y_ is *-0*𝔽, return *NaN*. - 1. If _y_ > *+0*𝔽, return _x_. + 1. If _y_ > *+0*𝔽, return _x_. 1. Return -_x_. - 1. If _y_ is *+∞*𝔽 or _y_ is *-∞*𝔽, then + 1. If _y_ is *+∞*𝔽 or _y_ is *-∞*𝔽, then 1. If _x_ is *+0*𝔽 or _x_ is *-0*𝔽, return *NaN*. - 1. If _x_ > *+0*𝔽, return _y_. + 1. If _x_ > *+0*𝔽, return _y_. 1. Return -_y_. 1. If _x_ is *-0*𝔽, then 1. If _y_ is *-0*𝔽 or _y_ < *-0*𝔽, return *+0*𝔽. @@ -1928,7 +1928,7 @@

      1. If _y_ is *-0*𝔽, then 1. If _x_ < *-0*𝔽, return *+0*𝔽. 1. Else, return *-0*𝔽. - 1. Return 𝔽(ℝ(_x_) × ℝ(_y_)). + 1. Return 𝔽(ℝ(_x_) × ℝ(_y_)).

      Finite-precision multiplication is commutative, but not always associative.

      @@ -1948,22 +1948,22 @@

      1. If _x_ is *NaN* or _y_ is *NaN*, return *NaN*. - 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, then - 1. If _y_ is *+∞*𝔽 or _y_ is *-∞*𝔽, return *NaN*. - 1. If _y_ is *+0*𝔽 or _y_ > *+0*𝔽, return _x_. + 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, then + 1. If _y_ is *+∞*𝔽 or _y_ is *-∞*𝔽, return *NaN*. + 1. If _y_ is *+0*𝔽 or _y_ > *+0*𝔽, return _x_. 1. Return -_x_. - 1. If _y_ is *+∞*𝔽, then - 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *+0*𝔽. Otherwise, return *-0*𝔽. - 1. If _y_ is *-∞*𝔽, then - 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *-0*𝔽. Otherwise, return *+0*𝔽. + 1. If _y_ is *+∞*𝔽, then + 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *+0*𝔽. Otherwise, return *-0*𝔽. + 1. If _y_ is *-∞*𝔽, then + 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *-0*𝔽. Otherwise, return *+0*𝔽. 1. If _x_ is *+0*𝔽 or _x_ is *-0*𝔽, then 1. If _y_ is *+0*𝔽 or _y_ is *-0*𝔽, return *NaN*. - 1. If _y_ > *+0*𝔽, return _x_. + 1. If _y_ > *+0*𝔽, return _x_. 1. Return -_x_. 1. If _y_ is *+0*𝔽, then - 1. If _x_ > *+0*𝔽, return *+∞*𝔽. Otherwise, return *-∞*𝔽. + 1. If _x_ > *+0*𝔽, return *+∞*𝔽. Otherwise, return *-∞*𝔽. 1. If _y_ is *-0*𝔽, then - 1. If _x_ > *+0*𝔽, return *-∞*𝔽. Otherwise, return *+∞*𝔽. + 1. If _x_ > *+0*𝔽, return *-∞*𝔽. Otherwise, return *+∞*𝔽. 1. Return 𝔽(ℝ(_x_) / ℝ(_y_)). @@ -1981,21 +1981,21 @@

      1. If _n_ is *NaN* or _d_ is *NaN*, return *NaN*. - 1. If _n_ is *+∞*𝔽 or _n_ is *-∞*𝔽, return *NaN*. - 1. If _d_ is *+∞*𝔽 or _d_ is *-∞*𝔽, return _n_. + 1. If _n_ is *+∞*𝔽 or _n_ is *-∞*𝔽, return *NaN*. + 1. If _d_ is *+∞*𝔽 or _d_ is *-∞*𝔽, return _n_. 1. If _d_ is *+0*𝔽 or _d_ is *-0*𝔽, return *NaN*. 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return _n_. 1. Assert: _n_ and _d_ are finite and non-zero. 1. Let _quotient_ be ℝ(_n_) / ℝ(_d_). 1. Let _q_ be the mathematical value whose sign is the sign of _quotient_ and whose magnitude is floor(abs(_quotient_)). - 1. Let _r_ be ℝ(_n_) - (ℝ(_d_) × _q_). + 1. Let _r_ be ℝ(_n_) - (ℝ(_d_) × _q_). 1. If _r_ is 0 and _n_ < *-0*𝔽, return *-0*𝔽. 1. Return 𝔽(_r_).

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

      - The result of a floating-point remainder operation as computed by the `%` operator is not the same as the “remainder” operation defined by IEEE 754-2019. The IEEE 754-2019 “remainder” operation computes the remainder from a rounding division, not a truncating division, and so its behaviour is not analogous to that of the usual integer remainder operator. Instead the ECMAScript language defines `%` on floating-point operations to behave in a manner analogous to that of the Java integer remainder operator; this may be compared with the C library function fmod. + The result of a floating-point remainder operation as computed by the `%` operator is not the same as the “remainder” operation defined by IEEE 754-2019. The IEEE 754-2019 “remainder” operation computes the remainder from a rounding division, not a truncating division, and so its behaviour is not analogous to that of the usual integer remainder operator. Instead the ECMAScript language defines `%` on floating-point operations to behave in a manner analogous to that of the Java integer remainder operator; this may be compared with the C library function fmod. @@ -2011,10 +2011,10 @@

      1. If _x_ is *NaN* or _y_ is *NaN*, return *NaN*. - 1. If _x_ is *+∞*𝔽 and _y_ is *-∞*𝔽, return *NaN*. - 1. If _x_ is *-∞*𝔽 and _y_ is *+∞*𝔽, return *NaN*. - 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, return _x_. - 1. If _y_ is *+∞*𝔽 or _y_ is *-∞*𝔽, return _y_. + 1. If _x_ is *+∞*𝔽 and _y_ is *-∞*𝔽, return *NaN*. + 1. If _x_ is *-∞*𝔽 and _y_ is *+∞*𝔽, return *NaN*. + 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, return _x_. + 1. If _y_ is *+∞*𝔽 or _y_ is *-∞*𝔽, return _y_. 1. Assert: _x_ and _y_ are both finite. 1. If _x_ is *-0*𝔽 and _y_ is *-0*𝔽, return *-0*𝔽. 1. Return 𝔽(ℝ(_x_) + ℝ(_y_)). @@ -2109,10 +2109,10 @@

      1. If _x_ and _y_ are the same Number value, return *false*. 1. If _x_ is *+0*𝔽 and _y_ is *-0*𝔽, return *false*. 1. If _x_ is *-0*𝔽 and _y_ is *+0*𝔽, return *false*. - 1. If _x_ is *+∞*𝔽, return *false*. - 1. If _y_ is *+∞*𝔽, return *true*. - 1. If _y_ is *-∞*𝔽, return *false*. - 1. If _x_ is *-∞*𝔽, return *true*. + 1. If _x_ is *+∞*𝔽, return *false*. + 1. If _y_ is *+∞*𝔽, return *true*. + 1. If _y_ is *-∞*𝔽, return *false*. + 1. If _x_ is *-∞*𝔽, return *true*. 1. Assert: _x_ and _y_ are finite and non-zero. 1. If ℝ(_x_) < ℝ(_y_), return *true*. Otherwise, return *false*. @@ -2252,20 +2252,20 @@

      1. If _x_ is *NaN*, return *"NaN"*. 1. If _x_ is *+0*𝔽 or *-0*𝔽, return *"0"*. 1. If _x_ < *-0*𝔽, return the string-concatenation of *"-"* and Number::toString(-_x_, _radix_). - 1. If _x_ is *+∞*𝔽, return *"Infinity"*. - 1. [id="step-number-tostring-intermediate-values"] Let _n_, _k_, and _s_ be integers such that _k_ ≥ 1, _radix__k_ - 1 ≤ _s_ < _radix__k_, 𝔽(_s_ × _radix__n_ - _k_) is _x_, and _k_ is as small as possible. Note that _k_ is the number of digits in the representation of _s_ using radix _radix_, that _s_ is not divisible by _radix_, and that the least significant digit of _s_ is not necessarily uniquely determined by these criteria. - 1. If _radix_ ≠ 10 or _n_ is in the inclusive interval from -5 to 21, then - 1. If _n_ ≥ _k_, then + 1. If _x_ is *+∞*𝔽, return *"Infinity"*. + 1. [id="step-number-tostring-intermediate-values"] Let _n_, _k_, and _s_ be integers such that _k_ ≥ 1, _radix__k_ - 1 ≤ _s_ < _radix__k_, 𝔽(_s_ × _radix__n_ - _k_) is _x_, and _k_ is as small as possible. Note that _k_ is the number of digits in the representation of _s_ using radix _radix_, that _s_ is not divisible by _radix_, and that the least significant digit of _s_ is not necessarily uniquely determined by these criteria. + 1. If _radix_ ≠ 10 or _n_ is in the inclusive interval from -5 to 21, then + 1. If _n_ ≥ _k_, then 1. Return the string-concatenation of: * the code units of the _k_ digits of the representation of _s_ using radix _radix_ * _n_ - _k_ occurrences of the code unit 0x0030 (DIGIT ZERO) - 1. Else if _n_ > 0, then + 1. Else if _n_ > 0, then 1. Return the string-concatenation of: * the code units of the most significant _n_ digits of the representation of _s_ using radix _radix_ * the code unit 0x002E (FULL STOP) * the code units of the remaining _k_ - _n_ digits of the representation of _s_ using radix _radix_ 1. Else, - 1. Assert: _n_ ≤ 0. + 1. Assert: _n_ ≤ 0. 1. Return the string-concatenation of: * the code unit 0x0030 (DIGIT ZERO) * the code unit 0x002E (FULL STOP) @@ -2305,7 +2305,7 @@

      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 _n_, _k_, and _s_ be integers such that _k_ ≥ 1, _radix__k_ - 1 ≤ _s_ < _radix__k_, 𝔽(_s_ × _radix__n_ - _k_) is _x_, and _k_ is as small as possible. If there are multiple possibilities for _s_, choose the value of _s_ for which _s_ × _radix__n_ - _k_ is closest in value to ℝ(_x_). If there are two such possible values of _s_, choose the one that is even. Note that _k_ is the number of digits in the representation of _s_ using radix _radix_ and that _s_ is not divisible by _radix_. + 1. Let _n_, _k_, and _s_ be integers such that _k_ ≥ 1, _radix__k_ - 1 ≤ _s_ < _radix__k_, 𝔽(_s_ × _radix__n_ - _k_) is _x_, and _k_ is as small as possible. If there are multiple possibilities for _s_, choose the value of _s_ for which _s_ × _radix__n_ - _k_ is closest in value to ℝ(_x_). If there are two such possible values of _s_, choose the one that is even. Note that _k_ is the number of digits in the representation of _s_ using radix _radix_ and that _s_ is not divisible by _radix_.
      @@ -2414,7 +2414,7 @@

      1. If _n_ is *0*, return *0*. 1. Let _quotient_ be ℝ(_n_) / ℝ(_d_). 1. Let _q_ be the BigInt whose sign is the sign of _quotient_ and whose magnitude is floor(abs(_quotient_)). - 1. Return _n_ - (_d_ × _q_). + 1. Return _n_ - (_d_ × _q_). The sign of the result equals the sign of the dividend. @@ -2459,7 +2459,7 @@

      1. If _y_ < *0*, then 1. Return the BigInt value that represents ℝ(_x_) / 2-ℝ(_y_), rounding down to the nearest integer, including for negative numbers. - 1. Return the BigInt value that represents ℝ(_x_) × 2ℝ(_y_). + 1. Return the BigInt value that represents ℝ(_x_) × 2ℝ(_y_). Semantics here should be equivalent to a bitwise shift, treating the BigInt as an infinite length string of binary two's complement digits. @@ -2584,11 +2584,11 @@

      1. Repeat, until (_x_ = 0 or _x_ = -1) and (_y_ = 0 or _y_ = -1), 1. Let _xDigit_ be _x_ modulo 2. 1. Let _yDigit_ be _y_ modulo 2. - 1. If _op_ is `&`, set _result_ to _result_ + 2_shift_ × BinaryAnd(_xDigit_, _yDigit_). - 1. Else if _op_ is `|`, set _result_ to _result_ + 2_shift_ × BinaryOr(_xDigit_, _yDigit_). + 1. If _op_ is `&`, set _result_ to _result_ + 2_shift_ × BinaryAnd(_xDigit_, _yDigit_). + 1. Else if _op_ is `|`, set _result_ to _result_ + 2_shift_ × BinaryOr(_xDigit_, _yDigit_). 1. Else, 1. Assert: _op_ is `^`. - 1. Set _result_ to _result_ + 2_shift_ × BinaryXor(_xDigit_, _yDigit_). + 1. Set _result_ to _result_ + 2_shift_ × BinaryXor(_xDigit_, _yDigit_). 1. Set _shift_ to _shift_ + 1. 1. Set _x_ to (_x_ - _xDigit_) / 2. 1. Set _y_ to (_y_ - _yDigit_) / 2. @@ -2597,7 +2597,7 @@

      1. Else, 1. Assert: _op_ is `^`. 1. Let _tmp_ be BinaryXor(_x_ modulo 2, _y_ modulo 2). - 1. If _tmp_ ≠ 0, then + 1. If _tmp_ ≠ 0, then 1. Set _result_ to _result_ - 2_shift_. 1. NOTE: This extends the sign. 1. Return the BigInt value for _result_. @@ -2677,7 +2677,7 @@

      The Object Type

      Properties are identified using key values. A property key value is either an ECMAScript String value or a Symbol value. All String and Symbol values, including the empty String, are valid as property keys. A property name is a property key that is a String value.

      -

      An integer index is a String-valued property key that is a canonical numeric string and whose numeric value is either *+0*𝔽 or a positive integral Number ≤ 𝔽(253 - 1). An array index is an integer index whose numeric value _i_ is in the range *+0*𝔽 ≤ _i_ < 𝔽(232 - 1).

      +

      An integer index is a String-valued property key that is a canonical numeric string and whose numeric value is either *+0*𝔽 or a positive integral Number ≤ 𝔽(253 - 1). An array index is an integer index whose numeric value _i_ is in the range *+0*𝔽 ≤ _i_ < 𝔽(232 - 1).

      Property keys are used to access properties and their values. There are two kinds of access for properties: get and set, corresponding to value retrieval and assignment, respectively. The properties accessible via get and set access includes both own properties that are a direct part of an object and inherited properties which are provided by another associated object via a property inheritance relationship. Inherited properties may be either own or inherited properties of the associated object. Each own property of an object must each have a key value that is distinct from the key values of the other own properties of that object.

      All objects are logically collections of properties, but there are multiple forms of objects that differ in their semantics for accessing and manipulating their properties. Please see for definitions of the multiple forms of objects.

      @@ -2802,7 +2802,7 @@

      Property Attributes

      Object Internal Methods and Internal Slots

      The actual semantics of objects, in ECMAScript, are specified via algorithms called internal methods. Each object in an ECMAScript engine is associated with a set of internal methods that defines its runtime behaviour. These internal methods are not part of the ECMAScript language. They are defined by this specification purely for expository purposes. However, each object within an implementation of ECMAScript must behave as specified by the internal methods associated with it. The exact manner in which this is accomplished is determined by the implementation.

      -

      Internal method names are polymorphic. This means that different object values may perform different algorithms when a common internal method name is invoked upon them. That actual object upon which an internal method is invoked is the “target” of the invocation. If, at runtime, the implementation of an algorithm attempts to use an internal method of an object that the object does not support, a *TypeError* exception is thrown.

      +

      Internal method names are polymorphic. This means that different object values may perform different algorithms when a common internal method name is invoked upon them. That actual object upon which an internal method is invoked is the “target” of the invocation. If, at runtime, the implementation of an algorithm attempts to use an internal method of an object that the object does not support, a *TypeError* exception is thrown.

      Internal slots correspond to internal state that is associated with objects and used by various ECMAScript specification algorithms. Internal slots are not object properties and they are not inherited. Depending upon the specific internal slot specification, such state may consist of values of any ECMAScript language type or of specific ECMAScript specification type values. Unless explicitly specified otherwise, internal slots are allocated as part of the process of creating an object and may not be dynamically added to an object. Unless specified otherwise, the initial value of an internal slot is the value *undefined*. Various algorithms within this specification create objects that have internal slots. However, the ECMAScript language provides no direct way to associate internal slots with an object.

      All objects have an internal slot named [[PrivateElements]], which is a List of PrivateElements. This List represents the values of the private fields, methods, and accessors for the object. Initially, it is an empty List.

      Internal methods and internal slots are identified within this specification using names enclosed in double square brackets [[ ]].

      @@ -2821,7 +2821,7 @@

      Object Internal Methods and Internal Slots

      An exotic object is an object that is not an ordinary object.

      This specification recognizes different kinds of exotic objects by those objects' internal methods. An object that is behaviourally equivalent to a particular kind of exotic object (such as an Array exotic object or a bound function exotic object), but does not have the same collection of internal methods specified for that kind, is not recognized as that kind of exotic object.

      -

      The “Signature” column of and other similar tables describes the invocation pattern for each internal method. The invocation pattern always includes a parenthesized list of descriptive parameter names. If a parameter name is the same as an ECMAScript type name then the name describes the required type of the parameter value. If an internal method explicitly returns a value, its parameter list is followed by the symbol “→” and the type name of the returned value. The type names used in signatures refer to the types defined in clause augmented by the following additional names. “any” means the value may be any ECMAScript language type.

      +

      The “Signature” column of and other similar tables describes the invocation pattern for each internal method. The invocation pattern always includes a parenthesized list of descriptive parameter names. If a parameter name is the same as an ECMAScript type name then the name describes the required type of the parameter value. If an internal method explicitly returns a value, its parameter list is followed by the symbol “→” and the type name of the returned value. The type names used in signatures refer to the types defined in clause augmented by the following additional names. “any” means the value may be any ECMAScript language type.

      In addition to its parameters, an internal method always has access to the object that is the target of the method invocation.

      An internal method implicitly returns a Completion Record, either a normal completion that wraps a value of the return type shown in its invocation pattern, or a throw completion.

      @@ -2842,7 +2842,7 @@

      Object Internal Methods and Internal Slots

      [[GetPrototypeOf]]

      - ( ) Object | Null + ( ) Object | Null Determine the object that provides inherited properties for this object. A *null* value indicates that there are no inherited properties. @@ -2853,7 +2853,7 @@

      Object Internal Methods and Internal Slots

      [[SetPrototypeOf]]
      - (Object | Null) Boolean + (Object | Null) Boolean Associate this object with another object that provides inherited properties. Passing *null* indicates that there are no inherited properties. Returns *true* indicating that the operation was completed successfully or *false* indicating that the operation was not successful. @@ -2864,7 +2864,7 @@

      Object Internal Methods and Internal Slots

      [[IsExtensible]]
      - ( ) Boolean + ( ) Boolean Determine whether it is permitted to add additional properties to this object. @@ -2875,7 +2875,7 @@

      Object Internal Methods and Internal Slots

      [[PreventExtensions]]
      - ( ) Boolean + ( ) Boolean Control whether new properties may be added to this object. Returns *true* if the operation was successful or *false* if the operation was unsuccessful. @@ -2886,7 +2886,7 @@

      Object Internal Methods and Internal Slots

      [[GetOwnProperty]]
      - (_propertyKey_) Undefined | Property Descriptor + (_propertyKey_) Undefined | Property Descriptor Return a Property Descriptor for the own property of this object whose key is _propertyKey_, or *undefined* if no such property exists. @@ -2897,7 +2897,7 @@

      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. @@ -2908,7 +2908,7 @@

      Object Internal Methods and Internal Slots

      [[HasProperty]]
      - (_propertyKey_) Boolean + (_propertyKey_) Boolean Return a Boolean value indicating whether this object already has either an own or inherited property whose key is _propertyKey_. @@ -2919,7 +2919,7 @@

      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. @@ -2930,7 +2930,7 @@

      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. @@ -2941,7 +2941,7 @@

      Object Internal Methods and Internal Slots

      [[Delete]]
      - (_propertyKey_) Boolean + (_propertyKey_) Boolean Remove the own property whose key is _propertyKey_ from this object. Return *false* if the property was not deleted and is still present. Return *true* if the property was deleted or is not present. @@ -2952,7 +2952,7 @@

      Object Internal Methods and Internal Slots

      [[OwnPropertyKeys]]
      - ( ) List of property keys + ( ) List of property keys Return a List whose elements are all of the own property keys for the object. @@ -2979,7 +2979,7 @@

      Object Internal Methods and Internal Slots

      [[Call]]
      - (any, a List of any) any + (any, a List of any) any Executes code associated with this object. Invoked via a function call expression. The arguments to the internal method are a *this* value and a List whose elements are the arguments passed to the function by a call expression. Objects that implement this internal method are callable. @@ -2990,7 +2990,7 @@

      Object Internal Methods and Internal Slots

      [[Construct]]
      - (a List of any, Object) Object + (a List of any, Object) Object Creates an object. Invoked via the `new` operator or a `super` call. The first argument to the internal method is a List whose elements are the arguments of the constructor invocation or the `super` call. The second argument is the object to which the `new` operator was initially applied. Objects that implement this internal method are called constructors. A function object is not necessarily a constructor and such non-constructor function objects do not have a [[Construct]] internal method. @@ -3952,11 +3952,11 @@

      The Enum Specification Type

      The List and Record Specification Types

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

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

      -

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

      +

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

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

      The Record type is used to describe data aggregations within the algorithms of this specification. A Record type value consists of one or more named fields. The value of each field is an ECMAScript language value or specification value. Field names are always enclosed in double brackets, for example [[Value]].

      For notational convenience within this specification, an object literal-like syntax can be used to express a Record value. For example, { [[Field1]]: 42, [[Field2]]: *false*, [[Field3]]: ~empty~ } defines a Record value that has three fields, each of which is initialized to a specific value. Field name order is not significant. Any fields that are not explicitly listed are considered to be absent.

      -

      In specification text and algorithms, dot notation may be used to refer to a specific field of a Record value. For example, if R is the record shown in the previous paragraph then R.[[Field2]] is shorthand for “the field of R named [[Field2]]”.

      +

      In specification text and algorithms, dot notation may be used to refer to a specific field of a Record value. For example, if R is the record shown in the previous paragraph then R.[[Field2]] is shorthand for “the field of R named [[Field2]]”.

      Schema for commonly used Record field combinations may be named, and that name may be used as a prefix to a literal Record value to identify the specific kind of aggregations that is being described. For example: PropertyDescriptor { [[Value]]: 42, [[Writable]]: *false*, [[Configurable]]: *true* }.

      @@ -4079,7 +4079,7 @@

      Await

      1. Resume the suspended evaluation of _asyncContext_ using NormalCompletion(_value_) as the result of the operation that suspended it. 1. Assert: When we reach this step, _asyncContext_ has already been removed from the execution context stack and _prevContext_ is the currently running execution context. 1. Return *undefined*. - 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 1, *""*, « »). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 1, *""*, « »). 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_reason_) that captures _asyncContext_ and performs the following steps when called: 1. Let _prevContext_ be the running execution context. 1. Suspend _prevContext_. @@ -4087,7 +4087,7 @@

      Await

      1. Resume the suspended evaluation of _asyncContext_ using ThrowCompletion(_reason_) as the result of the operation that suspended it. 1. Assert: When we reach this step, _asyncContext_ has already been removed from the execution context stack and _prevContext_ is the currently running execution context. 1. Return *undefined*. - 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). + 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). 1. Perform PerformPromiseThen(_promise_, _onFulfilled_, _onRejected_). 1. Remove _asyncContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context. 1. Set the code evaluation state of _asyncContext_ such that when evaluation is resumed with a Completion Record _completion_, the following steps of the algorithm that invoked Await will be performed, with _completion_ available. @@ -4356,7 +4356,7 @@

      The Property Descriptor Specification Type

      -

      The Property Descriptor type is used to explain the manipulation and reification of Object property attributes. A Property Descriptor is a Record with zero or more fields, where each field's name is an attribute name and its value is a corresponding attribute value as specified in . The schema name used within this specification to tag literal descriptions of Property Descriptor records is “PropertyDescriptor”.

      +

      The Property Descriptor type is used to explain the manipulation and reification of Object property attributes. A Property Descriptor is a Record with zero or more fields, where each field's name is an attribute name and its value is a corresponding attribute value as specified in . The schema name used within this specification to tag literal descriptions of Property Descriptor records is “PropertyDescriptor”.

      Property Descriptor values may be further classified as data Property Descriptors and accessor Property Descriptors based upon the existence or use of certain fields. A data Property Descriptor is one that includes any fields named either [[Value]] or [[Writable]]. An accessor Property Descriptor is one that includes any fields named either [[Get]] or [[Set]]. Any Property Descriptor may have fields named [[Enumerable]] and [[Configurable]]. A Property Descriptor value may not be both a data Property Descriptor and an accessor Property Descriptor; however, it may be neither (in which case it is a generic Property Descriptor). A fully populated Property Descriptor is one that is either an accessor Property Descriptor or a data Property Descriptor and that has all of the corresponding fields defined in .

      The following abstract operations are used in this specification to operate upon Property Descriptor values:

      @@ -4558,7 +4558,7 @@

      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 _execution_ be the [[CandidateExecution]] field of the surrounding agent's Agent Record. 1. Let _eventList_ be the [[EventList]] field of the element in _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). - 1. Let _zero_ be « 0 ». + 1. Let _zero_ be « 0 ». 1. For each index _i_ of _db_, do 1. Append WriteSharedMemory { [[Order]]: ~Init~, [[NoTear]]: *true*, [[Block]]: _db_, [[ByteIndex]]: _i_, [[ElementSize]]: 1, [[Payload]]: _zero_ } to _eventList_. 1. Return _db_. @@ -4580,10 +4580,10 @@

      1. Assert: _fromBlock_ and _toBlock_ are distinct values. 1. Let _fromSize_ be the number of bytes in _fromBlock_. - 1. Assert: _fromIndex_ + _count_ ≤ _fromSize_. + 1. Assert: _fromIndex_ + _count_ ≤ _fromSize_. 1. Let _toSize_ be the number of bytes in _toBlock_. - 1. Assert: _toIndex_ + _count_ ≤ _toSize_. - 1. Repeat, while _count_ > 0, + 1. Assert: _toIndex_ + _count_ ≤ _toSize_. + 1. Repeat, while _count_ > 0, 1. If _fromBlock_ is a Shared Data Block, then 1. Let _execution_ be the [[CandidateExecution]] field of the surrounding agent's Agent Record. 1. Let _eventList_ be the [[EventList]] field of the element in _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). @@ -4812,7 +4812,7 @@

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

      1. If _hint_ is ~string~, then - 1. Let _methodNames_ be « *"toString"*, *"valueOf"* ». + 1. Let _methodNames_ be « *"toString"*, *"valueOf"* ». 1. Else, - 1. Let _methodNames_ be « *"valueOf"*, *"toString"* ». + 1. Let _methodNames_ be « *"valueOf"*, *"toString"* ». 1. For each element _name_ of _methodNames_, do 1. Let _method_ be ? Get(_O_, _name_). 1. If IsCallable(_method_) is *true*, then @@ -5148,7 +5148,7 @@

      Runtime Semantics: StringNumericValue ( ): a Number

      StrUnsignedDecimalLiteral ::: `Infinity` - 1. Return *+∞*𝔽. + 1. Return *+∞*𝔽. StrUnsignedDecimalLiteral ::: DecimalDigits `.` DecimalDigits? ExponentPart? @@ -5160,20 +5160,20 @@

      Runtime Semantics: StringNumericValue ( ): a Number

      1. Let _b_ be 0. 1. Let _n_ be 0. 1. If |ExponentPart| is present, let _e_ be MV of |ExponentPart|. Otherwise, let _e_ be 0. - 1. Return RoundMVResult((_a_ + (_b_ × 10-_n_)) × 10_e_). + 1. Return RoundMVResult((_a_ + (_b_ × 10-_n_)) × 10_e_).
      StrUnsignedDecimalLiteral ::: `.` DecimalDigits ExponentPart? 1. Let _b_ be MV of |DecimalDigits|. 1. If |ExponentPart| is present, let _e_ be MV of |ExponentPart|. Otherwise, let _e_ be 0. 1. Let _n_ be the number of code points in |DecimalDigits|. - 1. Return RoundMVResult(_b_ × 10_e_ - _n_). + 1. Return RoundMVResult(_b_ × 10_e_ - _n_). StrUnsignedDecimalLiteral ::: DecimalDigits ExponentPart? 1. Let _a_ be MV of |DecimalDigits|. 1. If |ExponentPart| is present, let _e_ be MV of |ExponentPart|. Otherwise, let _e_ be 0. - 1. Return RoundMVResult(_a_ × 10_e_). + 1. Return RoundMVResult(_a_ × 10_e_). @@ -5206,13 +5206,13 @@

      description
      -
      It converts _argument_ to an integer representing its Number value with fractional part truncated, or to +∞ or -∞ when that Number value is infinite.
      +
      It converts _argument_ to an integer representing its Number value with fractional part truncated, or to +∞ or -∞ when that Number value is infinite.
      1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, or *-0*𝔽, return 0. - 1. If _number_ is *+∞*𝔽, return +∞. - 1. If _number_ is *-∞*𝔽, return -∞. + 1. If _number_ is *+∞*𝔽, return +∞. + 1. If _number_ is *-∞*𝔽, return -∞. 1. Let _integer_ be floor(abs(ℝ(_number_))). 1. If _number_ < *-0*𝔽, set _integer_ to -_integer_. 1. Return _integer_. @@ -5237,7 +5237,7 @@

      1. If _number_ is not finite or _number_ is either *+0*𝔽 or *-0*𝔽, return *+0*𝔽. 1. Let _int_ be the mathematical value whose sign is the sign of _number_ and whose magnitude is floor(abs(ℝ(_number_))). 1. Let _int32bit_ be _int_ modulo 232. - 1. If _int32bit_ ≥ 231, return 𝔽(_int32bit_ - 232); otherwise return 𝔽(_int32bit_). + 1. If _int32bit_ ≥ 231, return 𝔽(_int32bit_ - 232); otherwise return 𝔽(_int32bit_).

      Given the above definition of ToInt32:

      @@ -5246,7 +5246,7 @@

      The ToInt32 abstract operation is idempotent: if applied to a result that it produced, the second application leaves that value unchanged.
    • - ToInt32(ToUint32(_x_)) is the same value as ToInt32(_x_) for all values of _x_. (It is to preserve this latter property that *+∞*𝔽 and *-∞*𝔽 are mapped to *+0*𝔽.) + ToInt32(ToUint32(_x_)) is the same value as ToInt32(_x_) for all values of _x_. (It is to preserve this latter property that *+∞*𝔽 and *-∞*𝔽 are mapped to *+0*𝔽.)
    • ToInt32 maps *-0*𝔽 to *+0*𝔽. @@ -5282,7 +5282,7 @@

      The ToUint32 abstract operation is idempotent: if applied to a result that it produced, the second application leaves that value unchanged.

    • - ToUint32(ToInt32(_x_)) is the same value as ToUint32(_x_) for all values of _x_. (It is to preserve this latter property that *+∞*𝔽 and *-∞*𝔽 are mapped to *+0*𝔽.) + ToUint32(ToInt32(_x_)) is the same value as ToUint32(_x_) for all values of _x_. (It is to preserve this latter property that *+∞*𝔽 and *-∞*𝔽 are mapped to *+0*𝔽.)
    • ToUint32 maps *-0*𝔽 to *+0*𝔽. @@ -5306,7 +5306,7 @@

      1. If _number_ is not finite or _number_ is either *+0*𝔽 or *-0*𝔽, return *+0*𝔽. 1. Let _int_ be the mathematical value whose sign is the sign of _number_ and whose magnitude is floor(abs(ℝ(_number_))). 1. Let _int16bit_ be _int_ modulo 216. - 1. If _int16bit_ ≥ 215, return 𝔽(_int16bit_ - 216); otherwise return 𝔽(_int16bit_). + 1. If _int16bit_ ≥ 215, return 𝔽(_int16bit_ - 216); otherwise return 𝔽(_int16bit_). @@ -5355,7 +5355,7 @@

      1. If _number_ is not finite or _number_ is either *+0*𝔽 or *-0*𝔽, return *+0*𝔽. 1. Let _int_ be the mathematical value whose sign is the sign of _number_ and whose magnitude is floor(abs(ℝ(_number_))). 1. Let _int8bit_ be _int_ modulo 28. - 1. If _int8bit_ ≥ 27, return 𝔽(_int8bit_ - 28); otherwise return 𝔽(_int8bit_). + 1. If _int8bit_ ≥ 27, return 𝔽(_int8bit_ - 28); otherwise return 𝔽(_int8bit_). @@ -5391,8 +5391,8 @@

      1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, return *+0*𝔽. - 1. If ℝ(_number_) ≤ 0, return *+0*𝔽. - 1. If ℝ(_number_) ≥ 255, return *255*𝔽. + 1. If ℝ(_number_) ≤ 0, return *+0*𝔽. + 1. If ℝ(_number_) ≥ 255, return *255*𝔽. 1. Let _f_ be floor(ℝ(_number_)). 1. If _f_ + 0.5 < ℝ(_number_), return 𝔽(_f_ + 1). 1. If ℝ(_number_) < _f_ + 0.5, return 𝔽(_f_). @@ -5400,7 +5400,7 @@

      1. Return 𝔽(_f_). -

      Unlike the other ECMAScript integer conversion abstract operation, ToUint8Clamp rounds rather than truncates non-integral values and does not convert *+∞*𝔽 to *+0*𝔽. ToUint8Clamp does “round half to even” tie-breaking. This differs from `Math.round` which does “round half up” tie-breaking.

      +

      Unlike the other ECMAScript integer conversion abstract operation, ToUint8Clamp rounds rather than truncates non-integral values and does not convert *+∞*𝔽 to *+0*𝔽. ToUint8Clamp does “round half to even” tie-breaking. This differs from `Math.round` which does “round half up” tie-breaking.

      @@ -5550,7 +5550,7 @@

      1. Let _n_ be ? ToBigInt(_argument_). 1. Let _int64bit_ be ℝ(_n_) modulo 264. - 1. If _int64bit_ ≥ 263, return ℤ(_int64bit_ - 264); otherwise return ℤ(_int64bit_). + 1. If _int64bit_ ≥ 263, return ℤ(_int64bit_ - 264); otherwise return ℤ(_int64bit_). @@ -5782,7 +5782,7 @@

      1. Let _len_ be ? ToIntegerOrInfinity(_argument_). - 1. If _len_ ≤ 0, return *+0*𝔽. + 1. If _len_ ≤ 0, return *+0*𝔽. 1. Return 𝔽(min(_len_, 253 - 1)). @@ -5823,7 +5823,7 @@

      1. Let _integer_ be ? ToIntegerOrInfinity(_value_). 1. Let _clamped_ be ! ToLength(𝔽(_integer_)). 1. If SameValue(𝔽(_integer_), _clamped_) is *false*, throw a *RangeError* exception. - 1. Assert: 0 ≤ _integer_ ≤ 253 - 1. + 1. Assert: 0 ≤ _integer_ ≤ 253 - 1. 1. Return _integer_. @@ -6001,7 +6001,7 @@

      1. If _argument_ is not a Number, return *false*. 1. If _argument_ is not finite, return *false*. - 1. If floor(abs(ℝ(_argument_))) ≠ abs(ℝ(_argument_)), return *false*. + 1. If floor(abs(ℝ(_argument_))) ≠ abs(ℝ(_argument_)), return *false*. 1. Return *true*. @@ -6053,7 +6053,7 @@

      1. Let _strLen_ be the length of _string_. 1. Let _k_ be 0. - 1. Repeat, while _k_ ≠ _strLen_, + 1. Repeat, while _k_ ≠ _strLen_, 1. Let _cp_ be CodePointAt(_string_, _k_). 1. If _cp_.[[IsUnpairedSurrogate]] is *true*, return *false*. 1. Set _k_ to _k_ + _cp_.[[CodeUnitCount]]. @@ -6153,11 +6153,11 @@

      1. [id="step-arc-string-check"] If _px_ is a String and _py_ is a String, then 1. Let _lx_ be the length of _px_. 1. Let _ly_ be the length of _py_. - 1. For each integer _i_ such that 0 ≤ _i_ < min(_lx_, _ly_), in ascending order, do + 1. For each integer _i_ such that 0 ≤ _i_ < min(_lx_, _ly_), in ascending order, do 1. Let _cx_ be the integer that is the numeric value of the code unit at index _i_ within _px_. 1. Let _cy_ be the integer that is the numeric value of the code unit at index _i_ within _py_. 1. If _cx_ < _cy_, return *true*. - 1. If _cx_ > _cy_, return *false*. + 1. If _cx_ > _cy_, return *false*. 1. If _lx_ < _ly_, return *true*. Otherwise, return *false*. 1. Else, 1. If _px_ is a BigInt and _py_ is a String, then @@ -6179,8 +6179,8 @@

      1. Return BigInt::lessThan(_nx_, _ny_). 1. Assert: _nx_ is a BigInt and _ny_ is a Number, or _nx_ is a Number and _ny_ is a BigInt. 1. If _nx_ or _ny_ is *NaN*, return *undefined*. - 1. If _nx_ is *-∞*𝔽 or _ny_ is *+∞*𝔽, return *true*. - 1. If _nx_ is *+∞*𝔽 or _ny_ is *-∞*𝔽, return *false*. + 1. If _nx_ is *-∞*𝔽 or _ny_ is *+∞*𝔽, return *true*. + 1. If _nx_ is *+∞*𝔽 or _ny_ is *-∞*𝔽, return *false*. 1. If ℝ(_nx_) < ℝ(_ny_), return *true*; otherwise return *false*. @@ -6662,7 +6662,7 @@

      It is used to create a List value whose elements are provided by the indexed properties of _obj_. _elementTypes_ contains the names of ECMAScript Language Types that are allowed for element values of the List that is created.
      - 1. If _elementTypes_ is not present, set _elementTypes_ to « Undefined, Null, Boolean, String, Symbol, Number, BigInt, Object ». + 1. If _elementTypes_ is not present, set _elementTypes_ to « Undefined, Null, Boolean, String, Symbol, Number, BigInt, Object ». 1. If _obj_ is not an Object, throw a *TypeError* exception. 1. Let _len_ be ? LengthOfArrayLike(_obj_). 1. Let _list_ be a new empty List. @@ -6767,7 +6767,7 @@

      1. If _kind_ is ~value~, append _value_ to _results_. 1. Else, 1. Assert: _kind_ is ~key+value~. - 1. Let _entry_ be CreateArrayFromList(« _key_, _value_ »). + 1. Let _entry_ be CreateArrayFromList(« _key_, _value_ »). 1. Append _entry_ to _results_. 1. Return _results_. @@ -6950,7 +6950,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_, _O_, « _value_ »). 1. Return ~unused~. @@ -7099,7 +7099,7 @@

      1. If _value_ is not present, then 1. Let _result_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]]). 1. Else, - 1. Let _result_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]], « _value_ »). + 1. Let _result_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]], « _value_ »). 1. If _result_ is not an Object, throw a *TypeError* exception. 1. Return _result_. @@ -7314,11 +7314,11 @@

      Static Semantics: BoundNames ( ): a List of Strings

      BindingIdentifier : `yield` - 1. Return « *"yield"* ». + 1. Return « *"yield"* ». BindingIdentifier : `await` - 1. Return « *"await"* ». + 1. Return « *"await"* ». LexicalDeclaration : LetOrConst BindingList `;` @@ -7418,7 +7418,7 @@

      Static Semantics: BoundNames ( ): a List of Strings

      FunctionDeclaration : `function` `(` FormalParameters `)` `{` FunctionBody `}` - 1. Return « *"\*default\*"* ». + 1. Return « *"\*default\*"* ». FormalParameters : [empty] @@ -7447,7 +7447,7 @@

      Static Semantics: BoundNames ( ): a List of Strings

      GeneratorDeclaration : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` - 1. Return « *"\*default\*"* ». + 1. Return « *"\*default\*"* ». AsyncGeneratorDeclaration : `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}` @@ -7455,7 +7455,7 @@

      Static Semantics: BoundNames ( ): a List of Strings

      AsyncGeneratorDeclaration : `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}` - 1. Return « *"\*default\*"* ». + 1. Return « *"\*default\*"* ». ClassDeclaration : `class` BindingIdentifier ClassTail @@ -7463,7 +7463,7 @@

      Static Semantics: BoundNames ( ): a List of Strings

      ClassDeclaration : `class` ClassTail - 1. Return « *"\*default\*"* ». + 1. Return « *"\*default\*"* ». AsyncFunctionDeclaration : `async` `function` BindingIdentifier `(` FormalParameters `)` `{` AsyncFunctionBody `}` @@ -7475,7 +7475,7 @@

      Static Semantics: BoundNames ( ): a List of Strings

      AsyncFunctionDeclaration : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}`
      - 1. Return « *"\*default\*"* ». + 1. Return « *"\*default\*"* ». CoverCallExpressionAndAsyncArrowHead : MemberExpression Arguments @@ -7548,7 +7548,7 @@

      Static Semantics: BoundNames ( ): a List of Strings

      ExportDeclaration : `export` `default` AssignmentExpression `;` - 1. Return « *"\*default\*"* ». + 1. Return « *"\*default\*"* ». @@ -7826,7 +7826,7 @@

      Static Semantics: LexicallyScopedDeclarations ( ): a List of Parse Nodes

      LabelledItem : FunctionDeclaration - 1. Return « |FunctionDeclaration| ». + 1. Return « |FunctionDeclaration| ». FunctionStatementList : [empty] @@ -8148,12 +8148,12 @@

      Static Semantics: VarScopedDeclarations ( ): a List of Parse Nodes

      VariableDeclarationList : VariableDeclaration - 1. Return « |VariableDeclaration| ». + 1. Return « |VariableDeclaration| ». VariableDeclarationList : VariableDeclarationList `,` VariableDeclaration 1. Let _declarations1_ be VarScopedDeclarations of |VariableDeclarationList|. - 1. Return the list-concatenation of _declarations1_ and « |VariableDeclaration| ». + 1. Return the list-concatenation of _declarations1_ and « |VariableDeclaration| ». IfStatement : `if` `(` Expression `)` Statement `else` Statement @@ -8206,7 +8206,7 @@

      Static Semantics: VarScopedDeclarations ( ): a List of Parse Nodes

      `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
      - 1. Let _declarations1_ be « |ForBinding| ». + 1. Let _declarations1_ be « |ForBinding| ». 1. Let _declarations2_ be VarScopedDeclarations of |Statement|. 1. Return the list-concatenation of _declarations1_ and _declarations2_. @@ -8379,7 +8379,7 @@

      Static Semantics: TopLevelLexicallyScopedDeclarations ( ): a List of Parse N 1. If |Declaration| is Declaration : HoistableDeclaration, then 1. Return a new empty List. - 1. Return « |Declaration| ». + 1. Return « |Declaration| ». @@ -8441,7 +8441,7 @@

      Static Semantics: TopLevelVarScopedDeclarations ( ): a List of Parse Nodes 1. If |Declaration| is Declaration : HoistableDeclaration, then 1. Let _declaration_ be DeclarationPart of |HoistableDeclaration|. - 1. Return « _declaration_ ». + 1. Return « _declaration_ ». 1. Return a new empty List. LabelledStatement : LabelIdentifier `:` LabelledItem @@ -8455,7 +8455,7 @@

      Static Semantics: TopLevelVarScopedDeclarations ( ): a List of Parse Nodes LabelledItem : FunctionDeclaration - 1. Return « |FunctionDeclaration| ». + 1. Return « |FunctionDeclaration| ». @@ -8582,7 +8582,7 @@

      1. Let _label_ be the StringValue of |LabelIdentifier|. 1. If _label_ is an element of _labelSet_, return *true*. - 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». + 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». 1. Return ContainsDuplicateLabels of |LabelledItem| with argument _newLabelSet_. LabelledItem : FunctionDeclaration @@ -8761,7 +8761,7 @@

      LabelledStatement : LabelIdentifier `:` LabelledItem 1. Let _label_ be the StringValue of |LabelIdentifier|. - 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». + 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». 1. Return ContainsUndefinedBreakTarget of |LabelledItem| with argument _newLabelSet_. LabelledItem : FunctionDeclaration @@ -8844,36 +8844,36 @@

      Statement : BlockStatement - 1. Return ContainsUndefinedContinueTarget of |BlockStatement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |BlockStatement| with arguments _iterationSet_ and « ». BreakableStatement : IterationStatement 1. Let _newIterationSet_ be the list-concatenation of _iterationSet_ and _labelSet_. - 1. Return ContainsUndefinedContinueTarget of |IterationStatement| with arguments _newIterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |IterationStatement| with arguments _newIterationSet_ and « ». StatementList : StatementList StatementListItem - 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |StatementList| with arguments _iterationSet_ and « ». + 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |StatementList| with arguments _iterationSet_ and « ». 1. If _hasUndefinedLabels_ is *true*, return *true*. - 1. Return ContainsUndefinedContinueTarget of |StatementListItem| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |StatementListItem| with arguments _iterationSet_ and « ». IfStatement : `if` `(` Expression `)` Statement `else` Statement - 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of the first |Statement| with arguments _iterationSet_ and « ». + 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of the first |Statement| with arguments _iterationSet_ and « ». 1. If _hasUndefinedLabels_ is *true*, return *true*. - 1. Return ContainsUndefinedContinueTarget of the second |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of the second |Statement| with arguments _iterationSet_ and « ». IfStatement : `if` `(` Expression `)` Statement - 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». DoWhileStatement : `do` Statement `while` `(` Expression `)` `;` - 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». WhileStatement : `while` `(` Expression `)` Statement - 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». ForStatement : @@ -8882,7 +8882,7 @@

      `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement - 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». ForInOfStatement : @@ -8897,7 +8897,7 @@

      `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement - 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ».

      This section is extended by Annex .

      @@ -8913,11 +8913,11 @@

      WithStatement : `with` `(` Expression `)` Statement - 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». SwitchStatement : `switch` `(` Expression `)` CaseBlock - 1. Return ContainsUndefinedContinueTarget of |CaseBlock| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |CaseBlock| with arguments _iterationSet_ and « ». CaseBlock : `{` `}` @@ -8926,31 +8926,31 @@

      CaseBlock : `{` CaseClauses? DefaultClause CaseClauses? `}` 1. If the first |CaseClauses| is present, then - 1. If ContainsUndefinedContinueTarget of the first |CaseClauses| with arguments _iterationSet_ and « » is *true*, return *true*. - 1. If ContainsUndefinedContinueTarget of |DefaultClause| with arguments _iterationSet_ and « » is *true*, return *true*. + 1. If ContainsUndefinedContinueTarget of the first |CaseClauses| with arguments _iterationSet_ and « » is *true*, return *true*. + 1. If ContainsUndefinedContinueTarget of |DefaultClause| with arguments _iterationSet_ and « » is *true*, return *true*. 1. If the second |CaseClauses| is not present, return *false*. - 1. Return ContainsUndefinedContinueTarget of the second |CaseClauses| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of the second |CaseClauses| with arguments _iterationSet_ and « ». CaseClauses : CaseClauses CaseClause - 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |CaseClauses| with arguments _iterationSet_ and « ». + 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |CaseClauses| with arguments _iterationSet_ and « ». 1. If _hasUndefinedLabels_ is *true*, return *true*. - 1. Return ContainsUndefinedContinueTarget of |CaseClause| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |CaseClause| with arguments _iterationSet_ and « ». CaseClause : `case` Expression `:` StatementList? - 1. If the |StatementList| is present, return ContainsUndefinedContinueTarget of |StatementList| with arguments _iterationSet_ and « ». + 1. If the |StatementList| is present, return ContainsUndefinedContinueTarget of |StatementList| with arguments _iterationSet_ and « ». 1. Return *false*. DefaultClause : `default` `:` StatementList? - 1. If the |StatementList| is present, return ContainsUndefinedContinueTarget of |StatementList| with arguments _iterationSet_ and « ». + 1. If the |StatementList| is present, return ContainsUndefinedContinueTarget of |StatementList| with arguments _iterationSet_ and « ». 1. Return *false*. LabelledStatement : LabelIdentifier `:` LabelledItem 1. Let _label_ be the StringValue of |LabelIdentifier|. - 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». + 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». 1. Return ContainsUndefinedContinueTarget of |LabelledItem| with arguments _iterationSet_ and _newLabelSet_. LabelledItem : FunctionDeclaration @@ -8959,25 +8959,25 @@

      TryStatement : `try` Block Catch - 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « ». + 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « ». 1. If _hasUndefinedLabels_ is *true*, return *true*. - 1. Return ContainsUndefinedContinueTarget of |Catch| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Catch| with arguments _iterationSet_ and « ». TryStatement : `try` Block Finally - 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « ». + 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « ». 1. If _hasUndefinedLabels_ is *true*, return *true*. - 1. Return ContainsUndefinedContinueTarget of |Finally| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Finally| with arguments _iterationSet_ and « ». TryStatement : `try` Block Catch Finally - 1. If ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « » is *true*, return *true*. - 1. If ContainsUndefinedContinueTarget of |Catch| with arguments _iterationSet_ and « » is *true*, return *true*. - 1. Return ContainsUndefinedContinueTarget of |Finally| with arguments _iterationSet_ and « ». + 1. If ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « » is *true*, return *true*. + 1. If ContainsUndefinedContinueTarget of |Catch| with arguments _iterationSet_ and « » is *true*, return *true*. + 1. Return ContainsUndefinedContinueTarget of |Finally| with arguments _iterationSet_ and « ». Catch : `catch` `(` CatchParameter `)` Block - 1. Return ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Block| with arguments _iterationSet_ and « ». FunctionStatementList : [empty] @@ -8989,9 +8989,9 @@

      ModuleItemList : ModuleItemList ModuleItem - 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |ModuleItemList| with arguments _iterationSet_ and « ». + 1. Let _hasUndefinedLabels_ be ContainsUndefinedContinueTarget of |ModuleItemList| with arguments _iterationSet_ and « ». 1. If _hasUndefinedLabels_ is *true*, return *true*. - 1. Return ContainsUndefinedContinueTarget of |ModuleItem| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |ModuleItem| with arguments _iterationSet_ and « ». ModuleItem : @@ -11929,7 +11929,7 @@

      Execution Contexts

    • -

      In most situations only the running execution context (the top of the execution context stack) is directly manipulated by algorithms within this specification. Hence when the terms “LexicalEnvironment”, and “VariableEnvironment” are used without qualification they are in reference to those components of the running execution context.

      +

      In most situations only the running execution context (the top of the execution context stack) is directly manipulated by algorithms within this specification. Hence when the terms “LexicalEnvironment”, and “VariableEnvironment” are used without qualification they are in reference to those components of the running execution context.

      An execution context is purely a specification mechanism and need not correspond to any particular artefact of an ECMAScript implementation. It is impossible for ECMAScript code to directly access or observe an execution context.

      @@ -12542,7 +12542,7 @@

      1. While _finalizationRegistry_.[[Cells]] contains a Record _cell_ such that _cell_.[[WeakRefTarget]] is ~empty~, an implementation may perform the following steps: 1. Choose any such _cell_. 1. Remove _cell_ from _finalizationRegistry_.[[Cells]]. - 1. Perform ? HostCallJobCallback(_callback_, *undefined*, « _cell_.[[HeldValue]] »). + 1. Perform ? HostCallJobCallback(_callback_, *undefined*, « _cell_.[[HeldValue]] »). 1. Return ~unused~. @@ -12961,7 +12961,7 @@

      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_, « _V_ »). 1. Return *true*. @@ -13045,7 +13045,7 @@

      It is used to specify the runtime creation of new ordinary objects. _additionalInternalSlotsList_ contains the names of additional internal slots that must be defined as part of the object, beyond [[Prototype]] and [[Extensible]]. If _additionalInternalSlotsList_ is not provided, a new empty List is used.
      - 1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]] ». + 1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]] ». 1. If _additionalInternalSlotsList_ is present, append each of its elements to _internalSlotsList_. 1. Let _O_ be MakeBasicObject(_internalSlotsList_). 1. Set _O_.[[Prototype]] to _proto_. @@ -13799,7 +13799,7 @@

      1. Else, 1. Perform ! _env_.CreateMutableBinding(*"arguments"*, *false*). 1. Perform ! _env_.InitializeBinding(*"arguments"*, _ao_). - 1. Let _parameterBindings_ be the list-concatenation of _parameterNames_ and « *"arguments"* ». + 1. Let _parameterBindings_ be the list-concatenation of _parameterNames_ and « *"arguments"* ». 1. Else, 1. Let _parameterBindings_ be _parameterNames_. 1. Let _iteratorRecord_ be CreateListIteratorRecord(_argumentsList_). @@ -14069,7 +14069,7 @@

      1. Let _proto_ be ? _targetFunction_.[[GetPrototypeOf]](). - 1. Let _internalSlotsList_ be the list-concatenation of « [[Prototype]], [[Extensible]] » and the internal slots listed in . + 1. Let _internalSlotsList_ be the list-concatenation of « [[Prototype]], [[Extensible]] » and the internal slots listed in . 1. Let _obj_ be MakeBasicObject(_internalSlotsList_). 1. Set _obj_.[[Prototype]] to _proto_. 1. Set _obj_.[[Call]] as described in . @@ -14113,10 +14113,10 @@

      1. Let _length_ be _lengthDesc_.[[Value]]. 1. Assert: _length_ is a non-negative integral Number. 1. Let _index_ be ! ToUint32(_P_). - 1. If _index_ ≥ _length_ and _lengthDesc_.[[Writable]] is *false*, return *false*. + 1. If _index_ ≥ _length_ and _lengthDesc_.[[Writable]] is *false*, return *false*. 1. Let _succeeded_ be ! OrdinaryDefineOwnProperty(_A_, _P_, _Desc_). 1. If _succeeded_ is *false*, return *false*. - 1. If _index_ ≥ _length_, then + 1. If _index_ ≥ _length_, then 1. Set _lengthDesc_.[[Value]] to _index_ + *1*𝔽. 1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_A_, *"length"*, _lengthDesc_). 1. Assert: _succeeded_ is *true*. @@ -14137,9 +14137,9 @@

      It is used to specify the creation of new Arrays.
      - 1. If _length_ > 232 - 1, throw a *RangeError* exception. + 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. 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* }). @@ -14172,7 +14172,7 @@

      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. Return ? Construct(_C_, « 𝔽(_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.

      @@ -14200,7 +14200,7 @@

      1. Assert: IsDataDescriptor(_oldLenDesc_) is *true*. 1. Assert: _oldLenDesc_.[[Configurable]] is *false*. 1. Let _oldLen_ be _oldLenDesc_.[[Value]]. - 1. If _newLen_ ≥ _oldLen_, then + 1. If _newLen_ ≥ _oldLen_, then 1. Return ! OrdinaryDefineOwnProperty(_A_, *"length"*, _newLenDesc_). 1. If _oldLenDesc_.[[Writable]] is *false*, return *false*. 1. If _newLenDesc_ does not have a [[Writable]] field or _newLenDesc_.[[Writable]] is *true*, let _newWritable_ be *true*. @@ -14284,9 +14284,9 @@

      [[OwnPropertyKeys]] ( ): a normal completion containing a List of property k 1. Let _str_ be _O_.[[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. 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. 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_. @@ -14308,7 +14308,7 @@

      It is used to specify the creation of new String exotic objects.
      - 1. Let _S_ be MakeBasicObject(« [[Prototype]], [[Extensible]], [[StringData]] »). + 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 . @@ -14338,7 +14338,7 @@

      1. Let _str_ be _S_.[[StringData]]. 1. Assert: _str_ is a String. 1. Let _len_ be the length of _str_. - 1. If ℝ(_index_) < 0 or _len_ ≤ ℝ(_index_), return *undefined*. + 1. If ℝ(_index_) < 0 or _len_ ≤ ℝ(_index_), return *undefined*. 1. Let _resultStr_ be the substring of _str_ from ℝ(_index_) to ℝ(_index_) + 1. 1. Return the PropertyDescriptor { [[Value]]: _resultStr_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }. @@ -14503,7 +14503,7 @@

      1. Let _len_ be the number of elements in _argumentsList_. - 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%, « [[ParameterMap]] »). + 1. Let _obj_ be OrdinaryObjectCreate(%Object.prototype%, « [[ParameterMap]] »). 1. Set _obj_.[[ParameterMap]] to *undefined*. 1. Perform ! DefinePropertyOrThrow(_obj_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_len_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Let _index_ be 0. @@ -14531,7 +14531,7 @@

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

      1. Perform ! DefinePropertyOrThrow(_obj_, *"length"*, PropertyDescriptor { [[Value]]: 𝔽(_len_), [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }). 1. Let _mappedNames_ be a new empty List. 1. Set _index_ to _numberOfParameters_ - 1. - 1. Repeat, while _index_ ≥ 0, + 1. Repeat, while _index_ ≥ 0, 1. Let _name_ be _parameterNames_[_index_]. 1. If _name_ is not an element of _mappedNames_, then 1. Append _name_ to _mappedNames_. @@ -14578,7 +14578,7 @@

      1. Let _getterClosure_ be a new Abstract Closure with no parameters that captures _name_ and _env_ and performs the following steps when called: 1. Return _env_.GetBindingValue(_name_, *false*). - 1. Let _getter_ be CreateBuiltinFunction(_getterClosure_, 0, *""*, « »). + 1. Let _getter_ be CreateBuiltinFunction(_getterClosure_, 0, *""*, « »). 1. NOTE: _getter_ is never directly accessible to ECMAScript code. 1. Return _getter_. @@ -14598,7 +14598,7 @@

      1. Let _setterClosure_ be a new Abstract Closure with parameters (_value_) that captures _name_ and _env_ and performs the following steps when called: 1. Return ! _env_.SetMutableBinding(_name_, _value_, *false*). - 1. Let _setter_ be CreateBuiltinFunction(_setterClosure_, 1, *""*, « »). + 1. Let _setter_ be CreateBuiltinFunction(_setterClosure_, 1, *""*, « »). 1. NOTE: _setter_ is never directly accessible to ECMAScript code. 1. Return _setter_. @@ -14749,7 +14749,7 @@

      [[OwnPropertyKeys]] ( ): a normal completion containing a List of property k 1. Let _keys_ be a new empty List. 1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *false*, then - 1. For each integer _i_ such that 0 ≤ _i_ < _O_.[[ArrayLength]], in ascending order, do + 1. For each integer _i_ such that 0 ≤ _i_ < _O_.[[ArrayLength]], 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_. @@ -14770,7 +14770,7 @@

      It is used to specify the creation of new Integer-Indexed exotic objects.
      - 1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]], [[ViewedArrayBuffer]], [[TypedArrayName]], [[ContentType]], [[ByteLength]], [[ByteOffset]], [[ArrayLength]] ». + 1. Let _internalSlotsList_ be « [[Prototype]], [[Extensible]], [[ViewedArrayBuffer]], [[TypedArrayName]], [[ContentType]], [[ByteLength]], [[ByteOffset]], [[ArrayLength]] ». 1. Let _A_ be MakeBasicObject(_internalSlotsList_). 1. Set _A_.[[GetOwnProperty]] as specified in . 1. Set _A_.[[HasProperty]] as specified in . @@ -14797,7 +14797,7 @@

      1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, return *false*. 1. If IsIntegralNumber(_index_) is *false*, return *false*. 1. If _index_ is *-0*𝔽, return *false*. - 1. If ℝ(_index_) < 0 or ℝ(_index_) ≥ _O_.[[ArrayLength]], return *false*. + 1. If ℝ(_index_) < 0 or ℝ(_index_) ≥ _O_.[[ArrayLength]], return *false*. 1. Return *true*. @@ -14815,7 +14815,7 @@

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

      1. If IsValidIntegerIndex(_O_, _index_) is *true*, then 1. Let _offset_ be _O_.[[ByteOffset]]. 1. Let _elementSize_ be TypedArrayElementSize(_O_). - 1. Let _indexedPosition_ be (ℝ(_index_) × _elementSize_) + _offset_. + 1. Let _indexedPosition_ be (ℝ(_index_) × _elementSize_) + _offset_. 1. Let _elementType_ be TypedArrayElementType(_O_). 1. Perform SetValueInBuffer(_O_.[[ViewedArrayBuffer]], _indexedPosition_, _elementType_, _numValue_, *true*, ~Unordered~). 1. Return ~unused~. @@ -15291,7 +15291,7 @@

      [[GetPrototypeOf]] ( ): either a normal completion containing either an Obje 1. Let _trap_ be ? GetMethod(_handler_, *"getPrototypeOf"*). 1. If _trap_ is *undefined*, then 1. Return ? _target_.[[GetPrototypeOf]](). - 1. Let _handlerProto_ be ? Call(_trap_, _handler_, « _target_ »). + 1. Let _handlerProto_ be ? Call(_trap_, _handler_, « _target_ »). 1. If _handlerProto_ is not an Object and _handlerProto_ is not *null*, throw a *TypeError* exception. 1. Let _extensibleTarget_ be ? IsExtensible(_target_). 1. If _extensibleTarget_ is *true*, return _handlerProto_. @@ -15330,7 +15330,7 @@

      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. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _V_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. 1. Let _extensibleTarget_ be ? IsExtensible(_target_). 1. If _extensibleTarget_ is *true*, return *true*. @@ -15365,7 +15365,7 @@

      [[IsExtensible]] ( ): either a normal completion containing a Boolean or a t 1. Let _trap_ be ? GetMethod(_handler_, *"isExtensible"*). 1. If _trap_ is *undefined*, then 1. Return ? IsExtensible(_target_). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_ »)). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_ »)). 1. Let _targetResult_ be ? IsExtensible(_target_). 1. If SameValue(_booleanTrapResult_, _targetResult_) is *false*, throw a *TypeError* exception. 1. Return _booleanTrapResult_. @@ -15397,7 +15397,7 @@

      [[PreventExtensions]] ( ): either a normal completion containing a Boolean o 1. Let _trap_ be ? GetMethod(_handler_, *"preventExtensions"*). 1. If _trap_ is *undefined*, then 1. Return ? _target_.[[PreventExtensions]](). - 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_ »)). + 1. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_ »)). 1. If _booleanTrapResult_ is *true*, then 1. Let _extensibleTarget_ be ? IsExtensible(_target_). 1. If _extensibleTarget_ is *true*, throw a *TypeError* exception. @@ -15434,7 +15434,7 @@

      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. Let _trapResultObj_ be ? Call(_trap_, _handler_, « _target_, _P_ »). 1. If _trapResultObj_ is not an Object and _trapResultObj_ is not *undefined*, throw a *TypeError* exception. 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). 1. If _trapResultObj_ is *undefined*, then @@ -15501,7 +15501,7 @@

      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. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_, _descObj_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). 1. Let _extensibleTarget_ be ? IsExtensible(_target_). @@ -15558,7 +15558,7 @@

      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. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_ »)). 1. If _booleanTrapResult_ is *false*, then 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). 1. If _targetDesc_ is not *undefined*, then @@ -15602,7 +15602,7 @@

      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 _trapResult_ be ? Call(_trap_, _handler_, « _target_, _P_, _Receiver_ »). 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). 1. If _targetDesc_ is not *undefined* and _targetDesc_.[[Configurable]] is *false*, then 1. If IsDataDescriptor(_targetDesc_) is *true* and _targetDesc_.[[Writable]] is *false*, then @@ -15644,7 +15644,7 @@

      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. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_, _V_, _Receiver_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). 1. If _targetDesc_ is not *undefined* and _targetDesc_.[[Configurable]] is *false*, then @@ -15688,7 +15688,7 @@

      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. Let _booleanTrapResult_ be ToBoolean(? Call(_trap_, _handler_, « _target_, _P_ »)). 1. If _booleanTrapResult_ is *false*, return *false*. 1. Let _targetDesc_ be ? _target_.[[GetOwnProperty]](_P_). 1. If _targetDesc_ is *undefined*, return *true*. @@ -15727,8 +15727,8 @@

      [[OwnPropertyKeys]] ( ): either a normal completion containing a List of pro 1. Let _trap_ be ? GetMethod(_handler_, *"ownKeys"*). 1. If _trap_ is *undefined*, then 1. Return ? _target_.[[OwnPropertyKeys]](). - 1. Let _trapResultArray_ be ? Call(_trap_, _handler_, « _target_ »). - 1. Let _trapResult_ be ? CreateListFromArrayLike(_trapResultArray_, « String, Symbol »). + 1. Let _trapResultArray_ be ? Call(_trap_, _handler_, « _target_ »). + 1. Let _trapResult_ be ? CreateListFromArrayLike(_trapResultArray_, « String, Symbol »). 1. If _trapResult_ contains any duplicate entries, throw a *TypeError* exception. 1. Let _extensibleTarget_ be ? IsExtensible(_target_). 1. Let _targetKeys_ be ? _target_.[[OwnPropertyKeys]](). @@ -15797,7 +15797,7 @@

      1. If _trap_ is *undefined*, then 1. Return ? Call(_target_, _thisArgument_, _argumentsList_). 1. Let _argArray_ be CreateArrayFromList(_argumentsList_). - 1. Return ? Call(_trap_, _handler_, « _target_, _thisArgument_, _argArray_ »). + 1. Return ? Call(_trap_, _handler_, « _target_, _thisArgument_, _argArray_ »).

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

      @@ -15825,7 +15825,7 @@

      1. If _trap_ is *undefined*, then 1. Return ? Construct(_target_, _argumentsList_, _newTarget_). 1. Let _argArray_ be CreateArrayFromList(_argumentsList_). - 1. Let _newObj_ be ? Call(_trap_, _handler_, « _target_, _argArray_, _newTarget_ »). + 1. Let _newObj_ be ? Call(_trap_, _handler_, « _target_, _argArray_, _newTarget_ »). 1. If _newObj_ is not an Object, throw a *TypeError* exception. 1. Return _newObj_. @@ -15856,7 +15856,7 @@

      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. Let _P_ be MakeBasicObject(« [[ProxyHandler]], [[ProxyTarget]] »). 1. Set _P_'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 . @@ -15884,7 +15884,7 @@

      Syntax

      The components of a combining character sequence are treated as individual Unicode code points even though a user might think of the whole sequence as a single character.

      In string literals, regular expression literals, template literals and identifiers, any Unicode code point may also be expressed using Unicode escape sequences that explicitly express a code point's numeric value. Within a comment, such an escape sequence is effectively ignored as part of the comment.

      -

      ECMAScript differs from the Java programming language in the behaviour of Unicode escape sequences. In a Java program, if the Unicode escape sequence `\\u000A`, for example, occurs within a single-line comment, it is interpreted as a line terminator (Unicode code point U+000A is LINE FEED (LF)) and therefore the next code point is not part of the comment. Similarly, if the Unicode escape sequence `\\u000A` occurs within a string literal in a Java program, it is likewise interpreted as a line terminator, which is not allowed within a string literal—one must write `\\n` instead of `\\u000A` to cause a LINE FEED (LF) to be part of the String value of a string literal. In an ECMAScript program, a Unicode escape sequence occurring within a comment is never interpreted and therefore cannot contribute to termination of the comment. Similarly, a Unicode escape sequence occurring within a string literal in an ECMAScript program always contributes to the literal and is never interpreted as a line terminator or as a code point that might terminate the string literal.

      +

      ECMAScript differs from the Java programming language in the behaviour of Unicode escape sequences. In a Java program, if the Unicode escape sequence `\\u000A`, for example, occurs within a single-line comment, it is interpreted as a line terminator (Unicode code point U+000A is LINE FEED (LF)) and therefore the next code point is not part of the comment. Similarly, if the Unicode escape sequence `\\u000A` occurs within a string literal in a Java program, it is likewise interpreted as a line terminator, which is not allowed within a string literal—one must write `\\n` instead of `\\u000A` to cause a LINE FEED (LF) to be part of the String value of a string literal. In an ECMAScript program, a Unicode escape sequence occurring within a comment is never interpreted and therefore cannot contribute to termination of the comment. Similarly, a Unicode escape sequence occurring within a string literal in an ECMAScript program always contributes to the literal and is never interpreted as a line terminator or as a code point that might terminate the string literal.

      @@ -15896,8 +15896,8 @@

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

      1. Assert: _lead_ is a and _trail_ is a . - 1. Let _cp_ be (_lead_ - 0xD800) × 0x400 + (_trail_ - 0xDC00) + 0x10000. + 1. Let _cp_ be (_lead_ - 0xD800) × 0x400 + (_trail_ - 0xDC00) + 0x10000. 1. Return the code point _cp_. @@ -15953,7 +15953,7 @@

      1. Let _size_ be the length of _string_. - 1. Assert: _position_ ≥ 0 and _position_ < _size_. + 1. Assert: _position_ ≥ 0 and _position_ < _size_. 1. Let _first_ be the code unit at index _position_ within _string_. 1. Let _cp_ be the code point whose numeric value is that of _first_. 1. If _first_ is not a or , then @@ -16148,10 +16148,10 @@

      Syntax

      Unicode Format-Control Characters

      -

      The Unicode format-control characters (i.e., the characters in category “Cf” in the Unicode Character Database such as LEFT-TO-RIGHT MARK or RIGHT-TO-LEFT MARK) are control codes used to control the formatting of a range of text in the absence of higher-level protocols for this (such as mark-up languages).

      +

      The Unicode format-control characters (i.e., the characters in category “Cf” in the Unicode Character Database such as LEFT-TO-RIGHT MARK or RIGHT-TO-LEFT MARK) are control codes used to control the formatting of a range of text in the absence of higher-level protocols for this (such as mark-up languages).

      It is useful to allow format-control characters in source text to facilitate editing and display. All format control characters may be used within comments, and within string literals, template literals, and regular expression literals.

      U+200C (ZERO WIDTH NON-JOINER) and U+200D (ZERO WIDTH JOINER) are format-control characters that are used to make necessary distinctions when forming words or phrases in certain languages. In ECMAScript source text these code points may also be used in an |IdentifierName| after the first character.

      -

      U+FEFF (ZERO WIDTH NO-BREAK SPACE) is a format-control character used primarily at the start of a text to mark it as Unicode and to allow detection of the text's encoding and byte order. <ZWNBSP> characters intended for this purpose can sometimes also appear after the start of a text, for example as a result of concatenating files. In ECMAScript source text <ZWNBSP> code points are treated as white space characters (see ).

      +

      U+FEFF (ZERO WIDTH NO-BREAK SPACE) is a format-control character used primarily at the start of a text to mark it as Unicode and to allow detection of the text's encoding and byte order. <ZWNBSP> characters intended for this purpose can sometimes also appear after the start of a text, for example as a result of concatenating files. In ECMAScript source text <ZWNBSP> code points are treated as white space characters (see ).

      The special treatment of certain format-control characters outside of comments, string literals, and regular expression literals is summarized in .

      @@ -16177,7 +16177,7 @@

      Unicode Format-Control Characters

      ZERO WIDTH NON-JOINER @@ -16251,7 +16251,7 @@

      White Space

      LINE TABULATION @@ -16262,7 +16262,7 @@

      White Space

      FORM FEED (FF) @@ -16273,26 +16273,26 @@

      White Space

      ZERO WIDTH NO-BREAK SPACE
      - <ZWNJ> + <ZWNJ> |IdentifierPart| @@ -16191,7 +16191,7 @@

      Unicode Format-Control Characters

      ZERO WIDTH JOINER
      - <ZWJ> + <ZWJ> |IdentifierPart| @@ -16205,7 +16205,7 @@

      Unicode Format-Control Characters

      ZERO WIDTH NO-BREAK SPACE
      - <ZWNBSP> + <ZWNBSP> |WhiteSpace| @@ -16240,7 +16240,7 @@

      White Space

      CHARACTER TABULATION
      - <TAB> + <TAB>
      - <VT> + <VT>
      - <FF> + <FF>
      - <ZWNBSP> + <ZWNBSP>
      - any code point in general category “Space_Separator” + any code point in general category “Space_Separator” - <USP> + <USP>
      -

      U+0020 (SPACE) and U+00A0 (NO-BREAK SPACE) code points are part of <USP>.

      +

      U+0020 (SPACE) and U+00A0 (NO-BREAK SPACE) code points are part of <USP>.

      -

      Other than for the code points listed in , ECMAScript |WhiteSpace| intentionally excludes all code points that have the Unicode “White_Space” property but which are not classified in general category “Space_Separator” (“Zs”).

      +

      Other than for the code points listed in , ECMAScript |WhiteSpace| intentionally excludes all code points that have the Unicode “White_Space” property but which are not classified in general category “Space_Separator” (“Zs”).

      Syntax

      @@ -16307,7 +16307,7 @@

      Syntax

      Line Terminators

      -

      Like white space code points, line terminator code points are used to improve source text readability and to separate tokens (indivisible lexical units) from each other. However, unlike white space code points, line terminators have some influence over the behaviour of the syntactic grammar. In general, line terminators may occur between any two tokens, but there are a few places where they are forbidden by the syntactic grammar. Line terminators also affect the process of automatic semicolon insertion (). A line terminator cannot occur within any token except a |StringLiteral|, |Template|, or |TemplateSubstitutionTail|. <LF> and <CR> line terminators cannot occur within a |StringLiteral| token except as part of a |LineContinuation|.

      +

      Like white space code points, line terminator code points are used to improve source text readability and to separate tokens (indivisible lexical units) from each other. However, unlike white space code points, line terminators have some influence over the behaviour of the syntactic grammar. In general, line terminators may occur between any two tokens, but there are a few places where they are forbidden by the syntactic grammar. Line terminators also affect the process of automatic semicolon insertion (). A line terminator cannot occur within any token except a |StringLiteral|, |Template|, or |TemplateSubstitutionTail|. <LF> and <CR> line terminators cannot occur within a |StringLiteral| token except as part of a |LineContinuation|.

      A line terminator can occur within a |MultiLineComment| but cannot occur within a |SingleLineComment|.

      Line terminators are included in the set of white space code points that are matched by the `\\s` class in regular expressions.

      The ECMAScript line terminator code points are listed in .

      @@ -16332,7 +16332,7 @@

      Line Terminators

      LINE FEED (LF) - <LF> + <LF> @@ -16343,7 +16343,7 @@

      Line Terminators

      CARRIAGE RETURN (CR) - <CR> + <CR> @@ -16354,7 +16354,7 @@

      Line Terminators

      LINE SEPARATOR - <LS> + <LS> @@ -16365,12 +16365,12 @@

      Line Terminators

      PARAGRAPH SEPARATOR - <PS> + <PS> -

      Only the Unicode code points in are treated as line terminators. Other new line or line breaking Unicode code points are not treated as line terminators but are treated as white space if they meet the requirements listed in . The sequence <CR><LF> is commonly used as a line terminator. It should be considered a single |SourceCharacter| for the purpose of reporting line numbers.

      +

      Only the Unicode code points in are treated as line terminators. Other new line or line breaking Unicode code points are not treated as line terminators but are treated as white space if they meet the requirements listed in . The sequence <CR><LF> is commonly used as a line terminator. It should be considered a single |SourceCharacter| for the purpose of reporting line numbers.

      Syntax

      LineTerminator :: @@ -16507,7 +16507,7 @@

      Syntax

      The nonterminal |IdentifierPart| derives `_` via |UnicodeIDContinue|.

      -

      The sets of code points with Unicode properties “ID_Start” and “ID_Continue” include, respectively, the code points with Unicode properties “Other_ID_Start” and “Other_ID_Continue”.

      +

      The sets of code points with Unicode properties “ID_Start” and “ID_Continue” include, respectively, the code points with Unicode properties “Other_ID_Start” and “Other_ID_Continue”.

      @@ -16538,13 +16538,13 @@

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

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

      Static Semantics: MV

      A numeric literal stands for a value of the Number type or the BigInt type.

      • - The MV of DecimalLiteral :: DecimalIntegerLiteral `.` DecimalDigits is the MV of |DecimalIntegerLiteral| plus (the MV of |DecimalDigits| × 10-_n_), where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|. + The MV of DecimalLiteral :: DecimalIntegerLiteral `.` DecimalDigits is the MV of |DecimalIntegerLiteral| plus (the MV of |DecimalDigits| × 10-_n_), where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|.
      • - The MV of DecimalLiteral :: DecimalIntegerLiteral `.` ExponentPart is the MV of |DecimalIntegerLiteral| × 10_e_, where _e_ is the MV of |ExponentPart|. + The MV of DecimalLiteral :: DecimalIntegerLiteral `.` ExponentPart is the MV of |DecimalIntegerLiteral| × 10_e_, where _e_ is the MV of |ExponentPart|.
      • - The MV of DecimalLiteral :: DecimalIntegerLiteral `.` DecimalDigits ExponentPart is (the MV of |DecimalIntegerLiteral| plus (the MV of |DecimalDigits| × 10-_n_)) × 10_e_, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator| and _e_ is the MV of |ExponentPart|. + The MV of DecimalLiteral :: DecimalIntegerLiteral `.` DecimalDigits ExponentPart is (the MV of |DecimalIntegerLiteral| plus (the MV of |DecimalDigits| × 10-_n_)) × 10_e_, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator| and _e_ is the MV of |ExponentPart|.
      • - The MV of DecimalLiteral :: `.` DecimalDigits is the MV of |DecimalDigits| × 10-_n_, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|. + The MV of DecimalLiteral :: `.` DecimalDigits is the MV of |DecimalDigits| × 10-_n_, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|.
      • - The MV of DecimalLiteral :: `.` DecimalDigits ExponentPart is the MV of |DecimalDigits| × 10_e_ - _n_, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|, and _e_ is the MV of |ExponentPart|. + The MV of DecimalLiteral :: `.` DecimalDigits ExponentPart is the MV of |DecimalDigits| × 10_e_ - _n_, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|, and _e_ is the MV of |ExponentPart|.
      • - The MV of DecimalLiteral :: DecimalIntegerLiteral ExponentPart is the MV of |DecimalIntegerLiteral| × 10_e_, where _e_ is the MV of |ExponentPart|. + The MV of DecimalLiteral :: DecimalIntegerLiteral ExponentPart is the MV of |DecimalIntegerLiteral| × 10_e_, where _e_ is the MV of |ExponentPart|.
      • The MV of DecimalIntegerLiteral :: `0` is 0.
      • - The MV of DecimalIntegerLiteral :: NonZeroDigit NumericLiteralSeparator? DecimalDigits is (the MV of |NonZeroDigit| × 10_n_) plus the MV of |DecimalDigits|, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|. + The MV of DecimalIntegerLiteral :: NonZeroDigit NumericLiteralSeparator? DecimalDigits is (the MV of |NonZeroDigit| × 10_n_) plus the MV of |DecimalDigits|, where _n_ is the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|.
      • - The MV of DecimalDigits :: DecimalDigits DecimalDigit is (the MV of |DecimalDigits| × 10) plus the MV of |DecimalDigit|. + The MV of DecimalDigits :: DecimalDigits DecimalDigit is (the MV of |DecimalDigits| × 10) plus the MV of |DecimalDigit|.
      • - The MV of DecimalDigits :: DecimalDigits NumericLiteralSeparator DecimalDigit is (the MV of |DecimalDigits| × 10) plus the MV of |DecimalDigit|. + The MV of DecimalDigits :: DecimalDigits NumericLiteralSeparator DecimalDigit is (the MV of |DecimalDigits| × 10) plus the MV of |DecimalDigit|.
      • The MV of ExponentPart :: ExponentIndicator SignedInteger is the MV of |SignedInteger|. @@ -16906,16 +16906,16 @@

        Static Semantics: MV

        The MV of HexDigit :: `f` or of HexDigit :: `F` is 15.
      • - The MV of BinaryDigits :: BinaryDigits BinaryDigit is (the MV of |BinaryDigits| × 2) plus the MV of |BinaryDigit|. + The MV of BinaryDigits :: BinaryDigits BinaryDigit is (the MV of |BinaryDigits| × 2) plus the MV of |BinaryDigit|.
      • - The MV of BinaryDigits :: BinaryDigits NumericLiteralSeparator BinaryDigit is (the MV of |BinaryDigits| × 2) plus the MV of |BinaryDigit|. + The MV of BinaryDigits :: BinaryDigits NumericLiteralSeparator BinaryDigit is (the MV of |BinaryDigits| × 2) plus the MV of |BinaryDigit|.
      • - The MV of OctalDigits :: OctalDigits OctalDigit is (the MV of |OctalDigits| × 8) plus the MV of |OctalDigit|. + The MV of OctalDigits :: OctalDigits OctalDigit is (the MV of |OctalDigits| × 8) plus the MV of |OctalDigit|.
      • - The MV of OctalDigits :: OctalDigits NumericLiteralSeparator OctalDigit is (the MV of |OctalDigits| × 8) plus the MV of |OctalDigit|. + The MV of OctalDigits :: OctalDigits NumericLiteralSeparator OctalDigit is (the MV of |OctalDigits| × 8) plus the MV of |OctalDigit|.
      • The MV of LegacyOctalIntegerLiteral :: LegacyOctalIntegerLiteral OctalDigit is (the MV of |LegacyOctalIntegerLiteral| times 8) plus the MV of |OctalDigit|. @@ -16930,10 +16930,10 @@

        Static Semantics: MV

        The MV of LegacyOctalLikeDecimalIntegerLiteral :: LegacyOctalLikeDecimalIntegerLiteral OctalDigit is (the MV of |LegacyOctalLikeDecimalIntegerLiteral| times 10) plus the MV of |OctalDigit|.
      • - The MV of HexDigits :: HexDigits HexDigit is (the MV of |HexDigits| × 16) plus the MV of |HexDigit|. + The MV of HexDigits :: HexDigits HexDigit is (the MV of |HexDigits| × 16) plus the MV of |HexDigit|.
      • - The MV of HexDigits :: HexDigits NumericLiteralSeparator HexDigit is (the MV of |HexDigits| × 16) plus the MV of |HexDigit|. + The MV of HexDigits :: HexDigits NumericLiteralSeparator HexDigit is (the MV of |HexDigits| × 16) plus the MV of |HexDigit|.
      @@ -16973,7 +16973,7 @@

      Static Semantics: NumericValue ( ): a Number or a BigInt

      1. Let _n_ be the number of code points in |DecimalDigits|, excluding all occurrences of |NumericLiteralSeparator|. - 1. Let _mv_ be (the MV of |NonZeroDigit| × 10_n_) plus the MV of |DecimalDigits|. + 1. Let _mv_ be (the MV of |NonZeroDigit| × 10_n_) plus the MV of |DecimalDigits|. 1. Return ℤ(_mv_).
      @@ -17068,7 +17068,7 @@

      Syntax

      The definition of the nonterminal |HexDigit| is given in . |SourceCharacter| is defined in .

      -

      <LF> and <CR> cannot appear in a string literal, except as part of a |LineContinuation| to produce the empty code points sequence. The proper way to include either in the String value of a string literal is to use an escape sequence such as `\\n` or `\\u000A`.

      +

      <LF> and <CR> cannot appear in a string literal, except as part of a |LineContinuation| to produce the empty code points sequence. The proper way to include either in the String value of a string literal is to use an escape sequence such as `\\n` or `\\u000A`.

      @@ -17169,7 +17169,7 @@

      Static Semantics: SV ( ): a String

      BACKSPACE - <BS> + <BS> @@ -17183,7 +17183,7 @@

      Static Semantics: SV ( ): a String

      CHARACTER TABULATION - <HT> + <HT> @@ -17197,7 +17197,7 @@

      Static Semantics: SV ( ): a String

      LINE FEED (LF) - <LF> + <LF> @@ -17211,7 +17211,7 @@

      Static Semantics: SV ( ): a String

      LINE TABULATION - <VT> + <VT> @@ -17225,7 +17225,7 @@

      Static Semantics: SV ( ): a String

      FORM FEED (FF) - <FF> + <FF> @@ -17239,7 +17239,7 @@

      Static Semantics: SV ( ): a String

      CARRIAGE RETURN (CR) - <CR> + <CR> @@ -17354,7 +17354,7 @@

      Static Semantics: MV

      The MV of HexEscapeSequence :: `x` HexDigit HexDigit is (16 times the MV of the first |HexDigit|) plus the MV of the second |HexDigit|.

    • - The MV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is (0x1000 × the MV of the first |HexDigit|) plus (0x100 × the MV of the second |HexDigit|) plus (0x10 × the MV of the third |HexDigit|) plus the MV of the fourth |HexDigit|. + The MV of Hex4Digits :: HexDigit HexDigit HexDigit HexDigit is (0x1000 × the MV of the first |HexDigit|) plus (0x100 × the MV of the second |HexDigit|) plus (0x10 × the MV of the third |HexDigit|) plus the MV of the fourth |HexDigit|.
    @@ -17656,7 +17656,7 @@

    Static Semantics: TRV ( ): a String

    -

    TV excludes the code units of |LineContinuation| while TRV includes them. <CR><LF> and <CR> |LineTerminatorSequence|s are normalized to <LF> for both TV and TRV. An explicit |TemplateEscapeSequence| is needed to include a <CR> or <CR><LF> sequence.

    +

    TV excludes the code units of |LineContinuation| while TRV includes them. <CR><LF> and <CR> |LineTerminatorSequence|s are normalized to <LF> for both TV and TRV. An explicit |TemplateEscapeSequence| is needed to include a <CR> or <CR><LF> sequence.

    @@ -17668,7 +17668,7 @@

    Automatic Semicolon Insertion

    Rules of Automatic Semicolon Insertion

    -

    In the following rules, “token” means the actual recognized lexical token determined using the current lexical goal symbol as described in clause .

    +

    In the following rules, “token” means the actual recognized lexical token determined using the current lexical goal symbol as described in clause .

    There are three basic rules of semicolon insertion:

    1. @@ -17689,7 +17689,7 @@

      Rules of Automatic Semicolon Insertion

      When, as the source text is parsed from left to right, the end of the input stream of tokens is encountered and the parser is unable to parse the input token stream as a single instance of the goal nonterminal, then a semicolon is automatically inserted at the end of the input stream.
    2. - When, as the source text is parsed from left to right, a token is encountered that is allowed by some production of the grammar, but the production is a restricted production and the token would be the first token for a terminal or nonterminal immediately following the annotation “[no |LineTerminator| here]” within the restricted production (and therefore such a token is called a restricted token), and the restricted token is separated from the previous token by at least one |LineTerminator|, then a semicolon is automatically inserted before the restricted token. + When, as the source text is parsed from left to right, a token is encountered that is allowed by some production of the grammar, but the production is a restricted production and the token would be the first token for a terminal or nonterminal immediately following the annotation “[no |LineTerminator| here]” within the restricted production (and therefore such a token is called a restricted token), and the restricted token is separated from the previous token by at least one |LineTerminator|, then a semicolon is automatically inserted before the restricted token.

    However, there is an additional overriding condition on the preceding rules: a semicolon is never inserted automatically if the semicolon would then be parsed as an empty statement or if that semicolon would become one of the two semicolons in the header of a `for` statement (see ).

    @@ -17875,14 +17875,14 @@

    Interesting Cases of Automatic Semicolon Insertion in Statement Lists

    -

    Cases of Automatic Semicolon Insertion and “[no |LineTerminator| here]”

    +

    Cases of Automatic Semicolon Insertion and “[no |LineTerminator| here]”

    This section is non-normative. -

    ECMAScript contains grammar productions which include “[no |LineTerminator| here]”. These productions are sometimes a means to have optional operands in the grammar. Introducing a |LineTerminator| in these locations would change the grammar production of a source text by using the grammar production without the optional operand.

    +

    ECMAScript contains grammar productions which include “[no |LineTerminator| here]”. These productions are sometimes a means to have optional operands in the grammar. Introducing a |LineTerminator| in these locations would change the grammar production of a source text by using the grammar production without the optional operand.

    -

    The rest of this section describes a number of productions using “[no |LineTerminator| here]” in this version of ECMAScript.

    +

    The rest of this section describes a number of productions using “[no |LineTerminator| here]” in this version of ECMAScript.

    -

    List of Grammar Productions with Optional Operands and “[no |LineTerminator| here]”

    +

    List of Grammar Productions with Optional Operands and “[no |LineTerminator| here]”

    • |UpdateExpression|.
    • |ContinueStatement|.
    • @@ -18403,14 +18403,14 @@

      Static Semantics: PropertyNameList ( ): a List of Strings

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

      TemplateLiteral : NoSubstitutionTemplate - 1. Return « TemplateString(|NoSubstitutionTemplate|, _raw_) ». + 1. Return « TemplateString(|NoSubstitutionTemplate|, _raw_) ». SubstitutionTemplate : TemplateHead Expression TemplateSpans - 1. Let _head_ be « TemplateString(|TemplateHead|, _raw_) ». + 1. Let _head_ be « TemplateString(|TemplateHead|, _raw_) ». 1. Let _tail_ be TemplateStrings of |TemplateSpans| with argument _raw_. 1. Return the list-concatenation of _head_ and _tail_. TemplateSpans : TemplateTail - 1. Return « TemplateString(|TemplateTail|, _raw_) ». + 1. Return « TemplateString(|TemplateTail|, _raw_) ». TemplateSpans : TemplateMiddleList TemplateTail 1. Let _middle_ be TemplateStrings of |TemplateMiddleList| with argument _raw_. - 1. Let _tail_ be « TemplateString(|TemplateTail|, _raw_) ». + 1. Let _tail_ be « TemplateString(|TemplateTail|, _raw_) ». 1. Return the list-concatenation of _middle_ and _tail_. TemplateMiddleList : TemplateMiddle Expression - 1. Return « TemplateString(|TemplateMiddle|, _raw_) ». + 1. Return « TemplateString(|TemplateMiddle|, _raw_) ». TemplateMiddleList : TemplateMiddleList TemplateMiddle Expression 1. Let _front_ be TemplateStrings of |TemplateMiddleList| with argument _raw_. - 1. Let _last_ be « TemplateString(|TemplateMiddle|, _raw_) ». + 1. Let _last_ be « TemplateString(|TemplateMiddle|, _raw_) ». 1. Return the list-concatenation of _front_ and _last_. @@ -18714,7 +18714,7 @@

      1. Let _rawStrings_ be TemplateStrings of _templateLiteral_ with argument *true*. 1. Let _cookedStrings_ be TemplateStrings of _templateLiteral_ with argument *false*. 1. Let _count_ be the number of elements in the List _cookedStrings_. - 1. Assert: _count_ ≤ 232 - 1. + 1. Assert: _count_ ≤ 232 - 1. 1. Let _template_ be ! ArrayCreate(_count_). 1. Let _rawObj_ be ! ArrayCreate(_count_). 1. Let _index_ be 0. @@ -18758,14 +18758,14 @@

      Runtime Semantics: SubstitutionEvaluation ( ): either a normal completion co 1. Let _subRef_ be ? Evaluation of |Expression|. 1. Let _sub_ be ? GetValue(_subRef_). - 1. Return « _sub_ ». + 1. Return « _sub_ ». TemplateMiddleList : TemplateMiddleList TemplateMiddle Expression 1. Let _preceding_ be ? SubstitutionEvaluation of |TemplateMiddleList|. 1. Let _nextRef_ be ? Evaluation of |Expression|. 1. Let _next_ be ? GetValue(_nextRef_). - 1. Return the list-concatenation of _preceding_ and « _next_ ». + 1. Return the list-concatenation of _preceding_ and « _next_ ». @@ -19006,7 +19006,7 @@

      Property Accessors

      is identical in its behaviour to

      - |MemberExpression| `[` <identifier-name-string> `]` + |MemberExpression| `[` <identifier-name-string> `]`

      and similarly

      @@ -19014,9 +19014,9 @@

      Property Accessors

      is identical in its behaviour to

      - |CallExpression| `[` <identifier-name-string> `]` + |CallExpression| `[` <identifier-name-string> `]`
      -

      where <identifier-name-string> is the result of evaluating StringValue of |IdentifierName|.

      +

      where <identifier-name-string> is the result of evaluating StringValue of |IdentifierName|.

      @@ -19291,7 +19291,7 @@

      Runtime Semantics: ArgumentListEvaluation ( ): either a normal completion co 1. Let _ref_ be ? Evaluation of |AssignmentExpression|. 1. Let _arg_ be ? GetValue(_ref_). - 1. Return « _arg_ ». + 1. Return « _arg_ ». ArgumentList : `...` AssignmentExpression @@ -19310,7 +19310,7 @@

      Runtime Semantics: ArgumentListEvaluation ( ): either a normal completion co 1. Let _precedingArgs_ be ? ArgumentListEvaluation of |ArgumentList|. 1. Let _ref_ be ? Evaluation of |AssignmentExpression|. 1. Let _arg_ be ? GetValue(_ref_). - 1. Return the list-concatenation of _precedingArgs_ and « _arg_ ». + 1. Return the list-concatenation of _precedingArgs_ and « _arg_ ». ArgumentList : ArgumentList `,` `...` AssignmentExpression @@ -19327,14 +19327,14 @@

      Runtime Semantics: ArgumentListEvaluation ( ): either a normal completion co 1. Let _templateLiteral_ be this |TemplateLiteral|. 1. Let _siteObj_ be GetTemplateObject(_templateLiteral_). - 1. Return « _siteObj_ ». + 1. Return « _siteObj_ ». TemplateLiteral : SubstitutionTemplate 1. Let _templateLiteral_ be this |TemplateLiteral|. 1. Let _siteObj_ be GetTemplateObject(_templateLiteral_). 1. Let _remaining_ be ? ArgumentListEvaluation of |SubstitutionTemplate|. - 1. Return the list-concatenation of « _siteObj_ » and _remaining_. + 1. Return the list-concatenation of « _siteObj_ » and _remaining_. SubstitutionTemplate : TemplateHead Expression TemplateSpans @@ -19342,7 +19342,7 @@

      Runtime Semantics: ArgumentListEvaluation ( ): either a normal completion co 1. Let _firstSub_ be ? GetValue(_firstSubRef_). 1. Let _restSub_ be ? SubstitutionEvaluation of |TemplateSpans|. 1. Assert: _restSub_ is a possibly empty List. - 1. Return the list-concatenation of « _firstSub_ » and _restSub_. + 1. Return the list-concatenation of « _firstSub_ » and _restSub_. @@ -20072,7 +20072,7 @@

      Runtime Semantics: Evaluation

      -

      The Signed Right Shift Operator ( `>>` )

      +

      The Signed Right Shift Operator ( `>>` )

      Performs a sign-filling bitwise right shift operation on the left operand by the amount specified by the right operand.

      @@ -20081,13 +20081,13 @@

      The Signed Right Shift Operator ( `>>` )

      Runtime Semantics: Evaluation

      ShiftExpression : ShiftExpression `>>` AdditiveExpression - 1. Return ? EvaluateStringOrNumericBinaryExpression(|ShiftExpression|, `>>`, |AdditiveExpression|). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|ShiftExpression|, `>>`, |AdditiveExpression|).
      -

      The Unsigned Right Shift Operator ( `>>>` )

      +

      The Unsigned Right Shift Operator ( `>>>` )

      Performs a zero-filling bitwise right shift operation on the left operand by the amount specified by the right operand.

      @@ -20096,7 +20096,7 @@

      The Unsigned Right Shift Operator ( `>>>` )

      Runtime Semantics: Evaluation

      ShiftExpression : ShiftExpression `>>>` AdditiveExpression - 1. Return ? EvaluateStringOrNumericBinaryExpression(|ShiftExpression|, `>>>`, |AdditiveExpression|). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|ShiftExpression|, `>>>`, |AdditiveExpression|).
      @@ -20206,7 +20206,7 @@

      1. If _target_ is not an Object, throw a *TypeError* exception. 1. Let _instOfHandler_ be ? GetMethod(_target_, @@hasInstance). 1. If _instOfHandler_ is not *undefined*, then - 1. Return ToBoolean(? Call(_instOfHandler_, _target_, « _V_ »)). + 1. Return ToBoolean(? Call(_instOfHandler_, _target_, « _V_ »)). 1. [id="step-instanceof-check-function"] If IsCallable(_target_) is *false*, throw a *TypeError* exception. 1. [id="step-instanceof-fallback"] Return ? OrdinaryHasInstance(_target_, _V_). @@ -20602,7 +20602,7 @@

      1. If _opText_ is `**`, return ? BigInt::exponentiate(_lnum_, _rnum_). 1. If _opText_ is `/`, return ? BigInt::divide(_lnum_, _rnum_). 1. If _opText_ is `%`, return ? BigInt::remainder(_lnum_, _rnum_). - 1. If _opText_ is `>>>`, return ? BigInt::unsignedRightShift(_lnum_, _rnum_). + 1. If _opText_ is `>>>`, return ? BigInt::unsignedRightShift(_lnum_, _rnum_). 1. Let _operation_ be the abstract operation associated with _opText_ and Type(_lnum_) in the following table:
      @@ -20854,14 +20854,14 @@

      1. Let _defaultValue_ be ? Evaluation of |Initializer|. 1. Set _v_ to ? GetValue(_defaultValue_). 1. Perform ? PutValue(_lref_, _v_). - 1. Return « _P_ ». + 1. Return « _P_ ». AssignmentProperty : PropertyName `:` AssignmentElement 1. Let _name_ be ? Evaluation of |PropertyName|. 1. Perform ? KeyedDestructuringAssignmentEvaluation of |AssignmentElement| with arguments _value_ and _name_. - 1. Return « _name_ ». + 1. Return « _name_ ». @@ -21427,14 +21427,14 @@

      1. Let _name_ be the sole element of the BoundNames of |SingleNameBinding|. 1. Perform ? KeyedBindingInitialization of |SingleNameBinding| with arguments _value_, _environment_, and _name_. - 1. Return « _name_ ». + 1. Return « _name_ ». 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. Return « _P_ ». @@ -21543,7 +21543,7 @@

      Syntax

      `if` `(` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return] `else` Statement[?Yield, ?Await, ?Return] `if` `(` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return] [lookahead != `else`] - The lookahead-restriction [lookahead ≠ `else`] resolves the classic "dangling else" problem in the usual way. That is, when the choice of associated `if` is otherwise ambiguous, the `else` is associated with the nearest (innermost) of the candidate `if`s + The lookahead-restriction [lookahead ≠ `else`] resolves the classic "dangling else" problem in the usual way. That is, when the choice of associated `if` is otherwise ambiguous, the `else` is associated with the nearest (innermost) of the candidate `if`s

      Static Semantics: Early Errors

      @@ -21789,14 +21789,14 @@

      1. Perform ? GetValue(_exprRef_). 1. If the second |Expression| is present, let _test_ be the second |Expression|; otherwise, let _test_ be ~empty~. 1. If the third |Expression| is present, let _increment_ be the third |Expression|; otherwise, let _increment_ be ~empty~. - 1. Return ? ForBodyEvaluation(_test_, _increment_, |Statement|, « », _labelSet_). + 1. Return ? ForBodyEvaluation(_test_, _increment_, |Statement|, « », _labelSet_). ForStatement : `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement 1. Perform ? Evaluation of |VariableDeclarationList|. 1. If the first |Expression| is present, let _test_ be the first |Expression|; otherwise, let _test_ be ~empty~. 1. If the second |Expression| is present, let _increment_ be the second |Expression|; otherwise, let _increment_ be ~empty~. - 1. Return ? ForBodyEvaluation(_test_, _increment_, |Statement|, « », _labelSet_). + 1. Return ? ForBodyEvaluation(_test_, _increment_, |Statement|, « », _labelSet_). ForStatement : `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement @@ -22055,12 +22055,12 @@

      ForInOfStatement : `for` `(` LeftHandSideExpression `in` Expression `)` Statement - 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |Expression|, ~enumerate~). + 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |Expression|, ~enumerate~). 1. Return ? ForIn/OfBodyEvaluation(|LeftHandSideExpression|, |Statement|, _keyResult_, ~enumerate~, ~assignment~, _labelSet_). ForInOfStatement : `for` `(` `var` ForBinding `in` Expression `)` Statement - 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |Expression|, ~enumerate~). + 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |Expression|, ~enumerate~). 1. Return ? ForIn/OfBodyEvaluation(|ForBinding|, |Statement|, _keyResult_, ~enumerate~, ~varBinding~, _labelSet_). ForInOfStatement : `for` `(` ForDeclaration `in` Expression `)` Statement @@ -22070,12 +22070,12 @@

      ForInOfStatement : `for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement - 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~iterate~). + 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~iterate~). 1. Return ? ForIn/OfBodyEvaluation(|LeftHandSideExpression|, |Statement|, _keyResult_, ~iterate~, ~assignment~, _labelSet_). ForInOfStatement : `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement - 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~iterate~). + 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~iterate~). 1. Return ? ForIn/OfBodyEvaluation(|ForBinding|, |Statement|, _keyResult_, ~iterate~, ~varBinding~, _labelSet_). ForInOfStatement : `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement @@ -22087,14 +22087,14 @@

      ForInOfStatement : `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement - 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~async-iterate~). + 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~async-iterate~). 1. Return ? ForIn/OfBodyEvaluation(|LeftHandSideExpression|, |Statement|, _keyResult_, ~iterate~, ~assignment~, _labelSet_, ~async~). ForInOfStatement : `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement - 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~async-iterate~). + 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |AssignmentExpression|, ~async-iterate~). 1. Return ? ForIn/OfBodyEvaluation(|ForBinding|, |Statement|, _keyResult_, ~iterate~, ~varBinding~, _labelSet_, ~async~). @@ -22300,7 +22300,7 @@

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

      Syntax

      FunctionDeclaration[?Yield, ?Await, ~Default] -

      A |Statement| may be prefixed by a label. Labelled statements are only used in conjunction with labelled `break` and `continue` statements. ECMAScript has no `goto` statement. A |Statement| can be part of a |LabelledStatement|, which itself can be part of a |LabelledStatement|, and so on. The labels introduced this way are collectively referred to as the “current label set” when describing the semantics of individual statements.

      +

      A |Statement| may be prefixed by a label. Labelled statements are only used in conjunction with labelled `break` and `continue` statements. ECMAScript has no `goto` statement. A |Statement| can be part of a |LabelledStatement|, which itself can be part of a |LabelledStatement|, and so on. The labels introduced this way are collectively referred to as the “current label set” when describing the semantics of individual statements.

      @@ -22776,7 +22776,7 @@

      Runtime Semantics: Evaluation

      LabelledStatement : LabelIdentifier `:` LabelledItem - 1. Return ? LabelledEvaluation of this |LabelledStatement| with argument « ». + 1. Return ? LabelledEvaluation of this |LabelledStatement| with argument « ».
      @@ -22812,7 +22812,7 @@

      LabelledStatement : LabelIdentifier `:` LabelledItem 1. Let _label_ be the StringValue of |LabelIdentifier|. - 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». + 1. Let _newLabelSet_ be the list-concatenation of _labelSet_ and « _label_ ». 1. Let _stmtResult_ be Completion(LabelledEvaluation of |LabelledItem| with argument _newLabelSet_). 1. If _stmtResult_.[[Type]] is ~break~ and SameValue(_stmtResult_.[[Target]], _label_) is *true*, then 1. Set _stmtResult_ to NormalCompletion(_stmtResult_.[[Value]]). @@ -23361,13 +23361,13 @@

      Static Semantics: Early Errors

      It is a Syntax Error if any element of the LexicallyDeclaredNames of |FunctionStatementList| also occurs in the VarDeclaredNames of |FunctionStatementList|.
    • - It is a Syntax Error if ContainsDuplicateLabels of |FunctionStatementList| with argument « » is *true*. + It is a Syntax Error if ContainsDuplicateLabels of |FunctionStatementList| with argument « » is *true*.
    • - It is a Syntax Error if ContainsUndefinedBreakTarget of |FunctionStatementList| with argument « » is *true*. + It is a Syntax Error if ContainsUndefinedBreakTarget of |FunctionStatementList| with argument « » is *true*.
    • - It is a Syntax Error if ContainsUndefinedContinueTarget of |FunctionStatementList| with arguments « » and « » is *true*. + It is a Syntax Error if ContainsUndefinedContinueTarget of |FunctionStatementList| with arguments « » and « » is *true*.
    @@ -23935,7 +23935,7 @@

    GeneratorBody : FunctionBody 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_). - 1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorFunction.prototype.prototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »). + 1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorFunction.prototype.prototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »). 1. Set _G_.[[GeneratorBrand]] to ~empty~. 1. Perform GeneratorStart(_G_, |FunctionBody|). 1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _G_, [[Target]]: ~empty~ }. @@ -24044,7 +24044,7 @@

    Runtime Semantics: Evaluation

    1. Let _received_ be NormalCompletion(*undefined*). 1. Repeat, 1. If _received_.[[Type]] is ~normal~, then - 1. Let _innerResult_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]], « _received_.[[Value]] »). + 1. Let _innerResult_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]], « _received_.[[Value]] »). 1. If _generatorKind_ is ~async~, set _innerResult_ to ? Await(_innerResult_). 1. If _innerResult_ is not an Object, throw a *TypeError* exception. 1. Let _done_ be ? IteratorComplete(_innerResult_). @@ -24055,7 +24055,7 @@

    Runtime Semantics: Evaluation

    1. Else if _received_.[[Type]] is ~throw~, then 1. Let _throw_ be ? GetMethod(_iterator_, *"throw"*). 1. If _throw_ is not *undefined*, then - 1. Let _innerResult_ be ? Call(_throw_, _iterator_, « _received_.[[Value]] »). + 1. Let _innerResult_ be ? Call(_throw_, _iterator_, « _received_.[[Value]] »). 1. If _generatorKind_ is ~async~, set _innerResult_ to ? Await(_innerResult_). 1. NOTE: Exceptions from the inner iterator `throw` method are propagated. Normal completions from an inner `throw` method are processed similarly to an inner `next`. 1. If _innerResult_ is not an Object, throw a *TypeError* exception. @@ -24077,7 +24077,7 @@

    Runtime Semantics: Evaluation

    1. If _return_ is *undefined*, then 1. If _generatorKind_ is ~async~, set _received_.[[Value]] to ? Await(_received_.[[Value]]). 1. Return ? _received_. - 1. Let _innerReturnResult_ be ? Call(_return_, _iterator_, « _received_.[[Value]] »). + 1. Let _innerReturnResult_ be ? Call(_return_, _iterator_, « _received_.[[Value]] »). 1. If _generatorKind_ is ~async~, set _innerReturnResult_ to ? Await(_innerReturnResult_). 1. If _innerReturnResult_ is not an Object, throw a *TypeError* exception. 1. Let _done_ be ? IteratorComplete(_innerReturnResult_). @@ -24160,7 +24160,7 @@

    1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_). - 1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorFunction.prototype.prototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »). + 1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorFunction.prototype.prototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »). 1. Set _generator_.[[GeneratorBrand]] to ~empty~. 1. Perform AsyncGeneratorStart(_generator_, |FunctionBody|). 1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _generator_, [[Target]]: ~empty~ }. @@ -24388,13 +24388,13 @@

    Static Semantics: Early Errors

    It is a Syntax Error if any element of the LexicallyDeclaredNames of |ClassStaticBlockStatementList| also occurs in the VarDeclaredNames of |ClassStaticBlockStatementList|.
  3. - It is a Syntax Error if ContainsDuplicateLabels of |ClassStaticBlockStatementList| with argument « » is *true*. + It is a Syntax Error if ContainsDuplicateLabels of |ClassStaticBlockStatementList| with argument « » is *true*.
  4. - It is a Syntax Error if ContainsUndefinedBreakTarget of |ClassStaticBlockStatementList| with argument « » is *true*. + It is a Syntax Error if ContainsUndefinedBreakTarget of |ClassStaticBlockStatementList| with argument « » is *true*.
  5. - It is a Syntax Error if ContainsUndefinedContinueTarget of |ClassStaticBlockStatementList| with arguments « » and « » is *true*. + It is a Syntax Error if ContainsUndefinedContinueTarget of |ClassStaticBlockStatementList| with arguments « » and « » is *true*.
  6. It is a Syntax Error if ContainsArguments of |ClassStaticBlockStatementList| is *true*. @@ -24494,7 +24494,7 @@

    Static Semantics: NonConstructorElements ( ): a List of |ClassElement| Parse ClassElementList : ClassElement 1. If ClassElementKind of |ClassElement| is ~NonConstructorMethod~, then - 1. Return « |ClassElement| ». + 1. Return « |ClassElement| ». 1. Return a new empty List. ClassElementList : ClassElementList ClassElement @@ -24515,7 +24515,7 @@

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

    ClassElementList : ClassElementList ClassElement @@ -24523,7 +24523,7 @@

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

    @@ -24778,7 +24778,7 @@

    ClassStaticBlockBody : ClassStaticBlockStatementList - 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, « »). + 1. Perform ? FunctionDeclarationInstantiation(_functionObject_, « »). 1. Return ? Evaluation of |ClassStaticBlockStatementList|. @@ -24889,7 +24889,7 @@

    1. Let _result_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Object.prototype%"*). 1. Perform ? InitializeInstanceElements(_result_, _F_). 1. Return _result_. - 1. Let _F_ be CreateBuiltinFunction(_defaultConstructor_, 0, _className_, « [[ConstructorKind]], [[SourceText]] », the current Realm Record, _constructorParent_). + 1. Let _F_ be CreateBuiltinFunction(_defaultConstructor_, 0, _className_, « [[ConstructorKind]], [[SourceText]] », 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]]. @@ -25175,7 +25175,7 @@

    1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). 1. Let _declResult_ be Completion(FunctionDeclarationInstantiation(_functionObject_, _argumentsList_)). 1. If _declResult_ is an abrupt completion, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _declResult_.[[Value]] »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _declResult_.[[Value]] »). 1. Else, 1. Perform AsyncFunctionStart(_promiseCapability_, |FunctionBody|). 1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _promiseCapability_.[[Promise]], [[Target]]: ~empty~ }. @@ -25282,7 +25282,7 @@

    1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). 1. Let _declResult_ be Completion(FunctionDeclarationInstantiation(_functionObject_, _argumentsList_)). 1. If _declResult_ is an abrupt completion, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _declResult_.[[Value]] »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _declResult_.[[Value]] »). 1. Else, 1. Perform AsyncFunctionStart(_promiseCapability_, |ExpressionBody|). 1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _promiseCapability_.[[Promise]], [[Target]]: ~empty~ }. @@ -25750,16 +25750,16 @@

    Static Semantics: Early Errors

    It is a Syntax Error if |StatementList| Contains |NewTarget| unless the source text containing |NewTarget| is eval code that is being processed by a direct eval. Additional early error rules for |NewTarget| in direct eval are defined in .
  7. - It is a Syntax Error if ContainsDuplicateLabels of |StatementList| with argument « » is *true*. + It is a Syntax Error if ContainsDuplicateLabels of |StatementList| with argument « » is *true*.
  8. - It is a Syntax Error if ContainsUndefinedBreakTarget of |StatementList| with argument « » is *true*. + It is a Syntax Error if ContainsUndefinedBreakTarget of |StatementList| with argument « » is *true*.
  9. - It is a Syntax Error if ContainsUndefinedContinueTarget of |StatementList| with arguments « » and « » is *true*. + It is a Syntax Error if ContainsUndefinedContinueTarget of |StatementList| with arguments « » and « » is *true*.
  10. - It is a Syntax Error if AllPrivateIdentifiersValid of |StatementList| with argument « » is *false* unless the source text containing |ScriptBody| is eval code that is being processed by a direct eval. + It is a Syntax Error if AllPrivateIdentifiersValid of |StatementList| with argument « » is *false* unless the source text containing |ScriptBody| is eval code that is being processed by a direct eval.
  11. @@ -26023,16 +26023,16 @@

    Static Semantics: Early Errors

    It is a Syntax Error if |ModuleItemList| Contains |NewTarget|.
  12. - It is a Syntax Error if ContainsDuplicateLabels of |ModuleItemList| with argument « » is *true*. + It is a Syntax Error if ContainsDuplicateLabels of |ModuleItemList| with argument « » is *true*.
  13. - It is a Syntax Error if ContainsUndefinedBreakTarget of |ModuleItemList| with argument « » is *true*. + It is a Syntax Error if ContainsUndefinedBreakTarget of |ModuleItemList| with argument « » is *true*.
  14. - It is a Syntax Error if ContainsUndefinedContinueTarget of |ModuleItemList| with arguments « » and « » is *true*. + It is a Syntax Error if ContainsUndefinedContinueTarget of |ModuleItemList| with arguments « » and « » is *true*.
  15. - It is a Syntax Error if AllPrivateIdentifiersValid of |ModuleItemList| with argument « » is *false*. + It is a Syntax Error if AllPrivateIdentifiersValid of |ModuleItemList| with argument « » is *false*.
  16. @@ -26457,7 +26457,7 @@

    1. Set _module_.[[DFSAncestorIndex]] to min(_module_.[[DFSAncestorIndex]], _requiredModule_.[[DFSAncestorIndex]]). 1. Perform ? _module_.InitializeEnvironment(). 1. Assert: _module_ occurs exactly once in _stack_. - 1. Assert: _module_.[[DFSAncestorIndex]] ≤ _module_.[[DFSIndex]]. + 1. Assert: _module_.[[DFSAncestorIndex]] ≤ _module_.[[DFSIndex]]. 1. If _module_.[[DFSAncestorIndex]] = _module_.[[DFSIndex]], then 1. Let _done_ be *false*. 1. Repeat, while _done_ is *false*, @@ -26498,13 +26498,13 @@

    Evaluate ( ): a Promise

    1. Set _m_.[[EvaluationError]] to _result_. 1. Assert: _module_.[[Status]] is ~evaluated~. 1. Assert: _module_.[[EvaluationError]] is _result_. - 1. Perform ! Call(_capability_.[[Reject]], *undefined*, « _result_.[[Value]] »). + 1. Perform ! Call(_capability_.[[Reject]], *undefined*, « _result_.[[Value]] »). 1. Else, 1. Assert: _module_.[[Status]] is ~evaluating-async~ or ~evaluated~. 1. Assert: _module_.[[EvaluationError]] is ~empty~. 1. If _module_.[[AsyncEvaluation]] is *false*, then 1. Assert: _module_.[[Status]] is ~evaluated~. - 1. Perform ! Call(_capability_.[[Resolve]], *undefined*, « *undefined* »). + 1. Perform ! Call(_capability_.[[Resolve]], *undefined*, « *undefined* »). 1. Assert: _stack_ is empty. 1. Return _capability_.[[Promise]].
    @@ -26556,14 +26556,14 @@

    1. If _requiredModule_.[[AsyncEvaluation]] is *true*, then 1. Set _module_.[[PendingAsyncDependencies]] to _module_.[[PendingAsyncDependencies]] + 1. 1. Append _module_ to _requiredModule_.[[AsyncParentModules]]. - 1. If _module_.[[PendingAsyncDependencies]] > 0 or _module_.[[HasTLA]] is *true*, then + 1. If _module_.[[PendingAsyncDependencies]] > 0 or _module_.[[HasTLA]] is *true*, then 1. Assert: _module_.[[AsyncEvaluation]] is *false* and was never previously set to *true*. 1. Set _module_.[[AsyncEvaluation]] to *true*. 1. NOTE: The order in which module records have their [[AsyncEvaluation]] fields transition to *true* is significant. (See .) 1. If _module_.[[PendingAsyncDependencies]] is 0, perform ExecuteAsyncModule(_module_). 1. Otherwise, perform ? _module_.ExecuteModule(). 1. Assert: _module_ occurs exactly once in _stack_. - 1. Assert: _module_.[[DFSAncestorIndex]] ≤ _module_.[[DFSIndex]]. + 1. Assert: _module_.[[DFSAncestorIndex]] ≤ _module_.[[DFSIndex]]. 1. If _module_.[[DFSAncestorIndex]] = _module_.[[DFSIndex]], then 1. Let _done_ be *false*. 1. Repeat, while _done_ is *false*, @@ -26600,11 +26600,11 @@

    1. Let _fulfilledClosure_ be a new Abstract Closure with no parameters that captures _module_ and performs the following steps when called: 1. Perform AsyncModuleExecutionFulfilled(_module_). 1. Return *undefined*. - 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 0, *""*, « »). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 0, *""*, « »). 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_error_) that captures _module_ and performs the following steps when called: 1. Perform AsyncModuleExecutionRejected(_module_, _error_). 1. Return *undefined*. - 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 0, *""*, « »). + 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 0, *""*, « »). 1. Perform PerformPromiseThen(_capability_.[[Promise]], _onFulfilled_, _onRejected_). 1. Perform ! _module_.ExecuteModule(_capability_). 1. Return ~unused~. @@ -26626,7 +26626,7 @@

    1. Assert: _m_.[[Status]] is ~evaluating-async~. 1. Assert: _m_.[[EvaluationError]] is ~empty~. 1. Assert: _m_.[[AsyncEvaluation]] is *true*. - 1. Assert: _m_.[[PendingAsyncDependencies]] > 0. + 1. Assert: _m_.[[PendingAsyncDependencies]] > 0. 1. Set _m_.[[PendingAsyncDependencies]] to _m_.[[PendingAsyncDependencies]] - 1. 1. If _m_.[[PendingAsyncDependencies]] = 0, then 1. Append _m_ to _execList_. @@ -26657,7 +26657,7 @@

    1. Set _module_.[[Status]] to ~evaluated~. 1. If _module_.[[TopLevelCapability]] is not ~empty~, then 1. Assert: _module_.[[CycleRoot]] is _module_. - 1. Perform ! Call(_module_.[[TopLevelCapability]].[[Resolve]], *undefined*, « *undefined* »). + 1. Perform ! Call(_module_.[[TopLevelCapability]].[[Resolve]], *undefined*, « *undefined* »). 1. Let _execList_ be a new empty List. 1. Perform GatherAvailableAncestors(_module_, _execList_). 1. Let _sortedExecList_ be a List whose elements are the elements of _execList_, in the order in which they had their [[AsyncEvaluation]] fields set to *true* in InnerModuleEvaluation. @@ -26675,7 +26675,7 @@

    1. Set _m_.[[Status]] to ~evaluated~. 1. If _m_.[[TopLevelCapability]] is not ~empty~, then 1. Assert: _m_.[[CycleRoot]] is _m_. - 1. Perform ! Call(_m_.[[TopLevelCapability]].[[Resolve]], *undefined*, « *undefined* »). + 1. Perform ! Call(_m_.[[TopLevelCapability]].[[Resolve]], *undefined*, « *undefined* »). 1. Return ~unused~. @@ -26702,7 +26702,7 @@

    1. Perform AsyncModuleExecutionRejected(_m_, _error_). 1. If _module_.[[TopLevelCapability]] is not ~empty~, then 1. Assert: _module_.[[CycleRoot]] is _module_. - 1. Perform ! Call(_module_.[[TopLevelCapability]].[[Reject]], *undefined*, « _error_ »). + 1. Perform ! Call(_module_.[[TopLevelCapability]].[[Reject]], *undefined*, « _error_ »). 1. Return ~unused~. @@ -26775,7 +26775,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « » + « » 2 (_B_ and _C_) @@ -26784,7 +26784,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « _A_ » + « _A_ » 1 (_D_) @@ -26793,7 +26793,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « _A_ » + « _A_ » 2 (_D_ and _E_) @@ -26802,7 +26802,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « _B_, _C_ » + « _B_, _C_ » 0 @@ -26811,7 +26811,7 @@

    Example Cyclic Module Record Graphs

    4 ~evaluating-async~ *true* - « _C_ » + « _C_ » 0 @@ -26838,7 +26838,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « _A_ » + « _A_ » 1 (_D_) @@ -26847,7 +26847,7 @@

    Example Cyclic Module Record Graphs

    4 ~evaluated~ *true* - « _C_ » + « _C_ » 0 @@ -26874,7 +26874,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « _A_ » + « _A_ » 0 @@ -26883,7 +26883,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « _A_ » + « _A_ » 0 @@ -26892,7 +26892,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « _B_, _C_ » + « _B_, _C_ » 0 @@ -26919,7 +26919,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « » + « » 1 (_B_) @@ -26928,7 +26928,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « _A_ » + « _A_ » 0 @@ -26955,7 +26955,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluating-async~ *true* - « » + « » 0 @@ -26964,7 +26964,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « _A_ » + « _A_ » 0 @@ -26991,7 +26991,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « » + « » 0 @@ -27019,7 +27019,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « » + « » 1 (_B_) ~empty~ @@ -27029,7 +27029,7 @@

    Example Cyclic Module Record Graphs

    1 ~evaluated~ *true* - « _A_ » + « _A_ » 0 _C_'s evaluation error @@ -27058,7 +27058,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « » + « » 0 _C_'s Evaluation Error @@ -27087,7 +27087,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « » + « » 0 _C_'s Evaluation Error @@ -27097,7 +27097,7 @@

    Example Cyclic Module Record Graphs

    0 ~evaluated~ *true* - « _A_ » + « _A_ » 0 ~empty~ @@ -27636,7 +27636,7 @@

    1. Else, 1. Append _ee_ to _indirectExportEntries_. 1. Let _async_ be _body_ Contains `await`. - 1. Return Source Text Module Record { [[Realm]]: _realm_, [[Environment]]: ~empty~, [[Namespace]]: ~empty~, [[CycleRoot]]: ~empty~, [[HasTLA]]: _async_, [[AsyncEvaluation]]: *false*, [[TopLevelCapability]]: ~empty~, [[AsyncParentModules]]: « », [[PendingAsyncDependencies]]: ~empty~, [[Status]]: ~unlinked~, [[EvaluationError]]: ~empty~, [[HostDefined]]: _hostDefined_, [[ECMAScriptCode]]: _body_, [[Context]]: ~empty~, [[ImportMeta]]: ~empty~, [[RequestedModules]]: _requestedModules_, [[ImportEntries]]: _importEntries_, [[LocalExportEntries]]: _localExportEntries_, [[IndirectExportEntries]]: _indirectExportEntries_, [[StarExportEntries]]: _starExportEntries_, [[DFSIndex]]: ~empty~, [[DFSAncestorIndex]]: ~empty~ }. + 1. Return Source Text Module Record { [[Realm]]: _realm_, [[Environment]]: ~empty~, [[Namespace]]: ~empty~, [[CycleRoot]]: ~empty~, [[HasTLA]]: _async_, [[AsyncEvaluation]]: *false*, [[TopLevelCapability]]: ~empty~, [[AsyncParentModules]]: « », [[PendingAsyncDependencies]]: ~empty~, [[Status]]: ~unlinked~, [[EvaluationError]]: ~empty~, [[HostDefined]]: _hostDefined_, [[ECMAScriptCode]]: _body_, [[Context]]: ~empty~, [[ImportMeta]]: ~empty~, [[RequestedModules]]: _requestedModules_, [[ImportEntries]]: _importEntries_, [[LocalExportEntries]]: _localExportEntries_, [[IndirectExportEntries]]: _indirectExportEntries_, [[StarExportEntries]]: _starExportEntries_, [[DFSIndex]]: ~empty~, [[DFSAncestorIndex]]: ~empty~ }.

    An implementation may parse module source text and analyse it for Early Error conditions prior to the evaluation of ParseModule for that module source text. However, the reporting of any errors must be deferred until the point where this specification actually performs ParseModule upon that source text.

    @@ -27949,15 +27949,15 @@

    1. Assert: Evaluate has already been invoked on _moduleRecord_ and successfully completed. 1. Let _namespace_ be Completion(GetModuleNamespace(_moduleRecord_)). 1. If _namespace_ is an abrupt completion, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _namespace_.[[Value]] »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _namespace_.[[Value]] »). 1. Else, - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _namespace_.[[Value]] »). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _namespace_.[[Value]] »). 1. Return ~unused~. - 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 0, *""*, « »). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 0, *""*, « »). 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_error_) that captures _promiseCapability_ and performs the following steps when called: - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _error_ »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _error_ »). 1. Return ~unused~. - 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 0, *""*, « »). + 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 0, *""*, « »). 1. Perform PerformPromiseThen(_innerPromise_, _onFulfilled_, _onRejected_). 1. Return ~unused~. @@ -28131,13 +28131,13 @@

    1. Let _localName_ be the sole element of BoundNames of |ImportedBinding|. 1. Let _defaultEntry_ be the ImportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: *"default"*, [[LocalName]]: _localName_ }. - 1. Return « _defaultEntry_ ». + 1. Return « _defaultEntry_ ». NameSpaceImport : `*` `as` ImportedBinding 1. Let _localName_ be the StringValue of |ImportedBinding|. 1. Let _entry_ be the ImportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: ~namespace-object~, [[LocalName]]: _localName_ }. - 1. Return « _entry_ ». + 1. Return « _entry_ ». NamedImports : `{` `}` @@ -28153,14 +28153,14 @@

    1. Let _localName_ be the sole element of BoundNames of |ImportedBinding|. 1. Let _entry_ be the ImportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: _localName_, [[LocalName]]: _localName_ }. - 1. Return « _entry_ ». + 1. Return « _entry_ ». ImportSpecifier : ModuleExportName `as` ImportedBinding 1. Let _importName_ be the StringValue of |ModuleExportName|. 1. Let _localName_ be the StringValue of |ImportedBinding|. 1. Let _entry_ be the ImportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: _importName_, [[LocalName]]: _localName_ }. - 1. Return « _entry_ ». + 1. Return « _entry_ ». @@ -28338,7 +28338,7 @@

    Static Semantics: ExportedNames ( ): a List of Strings

    `export` `default` AssignmentExpression `;` - 1. Return « *"default"* ». + 1. Return « *"default"* ». NamedExports : `{` `}` @@ -28422,7 +28422,7 @@

    Static Semantics: ExportEntries ( ): a List of ExportEntry Records

    ExportDeclaration : `export` `default` AssignmentExpression `;` 1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: *null*, [[ImportName]]: *null*, [[LocalName]]: *"\*default\*"*, [[ExportName]]: *"default"* }. - 1. Return « _entry_ ». + 1. Return « _entry_ ».

    *"\*default\*"* is used within this specification as a synthetic name for anonymous default export values. See this note for more details.

    @@ -28440,13 +28440,13 @@

    ExportFromClause : `*` 1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: ~all-but-default~, [[LocalName]]: *null*, [[ExportName]]: *null* }. - 1. Return « _entry_ ». + 1. Return « _entry_ ». ExportFromClause : `*` `as` ModuleExportName 1. Let _exportName_ be the StringValue of |ModuleExportName|. 1. Let _entry_ be the ExportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: ~all~, [[LocalName]]: *null*, [[ExportName]]: _exportName_ }. - 1. Return « _entry_ ». + 1. Return « _entry_ ». NamedExports : `{` `}` @@ -28561,7 +28561,7 @@

    Runtime Semantics: Evaluation

    Error Handling and Language Extensions

    An implementation must report most errors at the time the relevant ECMAScript language construct is evaluated. An early error is an error that can be detected and reported prior to the evaluation of any construct in the |Script| containing the error. The presence of an early error prevents the evaluation of the construct. An implementation must report early errors in a |Script| as part of parsing that |Script| in ParseScript. Early errors in a |Module| are reported at the point when the |Module| would be evaluated and the |Module| is never initialized. Early errors in eval code are reported at the time `eval` is called and prevent evaluation of the eval code. All errors that are not early errors are runtime errors.

    -

    An implementation must report as an early error any occurrence of a condition that is listed in a “Static Semantics: Early Errors” subclause of this specification.

    +

    An implementation must report as an early error any occurrence of a condition that is listed in a “Static Semantics: Early Errors” subclause of this specification.

    An implementation shall not treat other kinds of errors as early errors even if the compiler can prove that a construct cannot execute without error under any circumstances. An implementation may issue an early warning in such a case, but it should not report the error until the relevant construct is actually executed.

    An implementation shall report all errors as specified, except for the following:

      @@ -28620,7 +28620,7 @@

      ECMAScript Standard Built-in Objects

      There are certain built-in objects available whenever an ECMAScript |Script| or |Module| begins execution. One, the global object, is part of the global environment of the executing program. Others are accessible as initial properties of the global object or indirectly as properties of accessible built-in objects.

      Unless specified otherwise, a built-in object that is callable as a function is a built-in function object with the characteristics described in . Unless specified otherwise, the [[Extensible]] internal slot of a built-in object initially has the value *true*. Every built-in function object has a [[Realm]] internal slot whose value is the Realm Record of the realm for which the object was initially created.

      Many built-in objects are functions: they can be invoked with arguments. Some of them furthermore are constructors: they are functions intended for use with the `new` operator. For each built-in function, this specification describes the arguments required by that function and the properties of that function object. For each built-in constructor, this specification furthermore describes properties of the prototype object of that constructor and properties of specific object instances returned by a `new` expression that invokes that constructor.

      -

      Unless otherwise specified in the description of a particular function, if a built-in function or constructor is given fewer arguments than the function is specified to require, the function or constructor shall behave exactly as if it had been given sufficient additional arguments, each such argument being the *undefined* value. Such missing arguments are considered to be “not present” and may be identified in that manner by specification algorithms. In the description of a particular function, the terms “*this* value” and “NewTarget” have the meanings given in .

      +

      Unless otherwise specified in the description of a particular function, if a built-in function or constructor is given fewer arguments than the function is specified to require, the function or constructor shall behave exactly as if it had been given sufficient additional arguments, each such argument being the *undefined* value. Such missing arguments are considered to be “not present” and may be identified in that manner by specification algorithms. In the description of a particular function, the terms “*this* value” and “NewTarget” have the meanings given in .

      Unless otherwise specified in the description of a particular function, if a built-in function or constructor described is given more arguments than the function is specified to allow, the extra arguments are evaluated by the call and then ignored by the function. However, an implementation may define implementation specific behaviour relating to such arguments as long as the behaviour is not the throwing of a *TypeError* exception that is predicated simply on the presence of an extra argument.

      Implementations that add additional capabilities to the set of built-in functions are encouraged to do so by adding new functions rather than adding new parameters to existing functions.

      @@ -28631,7 +28631,7 @@

      ECMAScript Standard Built-in Objects

      Each built-in function defined in this specification is created by calling the CreateBuiltinFunction abstract operation (). The values of the _length_ and _name_ parameters are the initial values of the *"length"* and *"name"* properties as discussed below. The values of the _prefix_ parameter are similarly discussed below.

      Every built-in function object, including constructors, has a *"length"* property whose value is a non-negative integral Number. Unless otherwise specified, this value is equal to the number of required parameters shown in the subclause heading for the function description. Optional parameters and rest parameters are not included in the parameter count.

      -

      For example, the function object that is the initial value of the *"map"* property of the Array prototype object is described under the subclause heading «Array.prototype.map (callbackFn [ , thisArg])» which shows the two named arguments callbackFn and thisArg, the latter being optional; therefore the value of the *"length"* property of that function object is *1*𝔽.

      +

      For example, the function object that is the initial value of the *"map"* property of the Array prototype object is described under the subclause heading «Array.prototype.map (callbackFn [ , thisArg])» which shows the two named arguments callbackFn and thisArg, the latter being optional; therefore the value of the *"length"* property of that function object is *1*𝔽.

      Unless otherwise specified, the *"length"* property of a built-in function object has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.

      Every built-in function object, including constructors, has a *"name"* property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are identified as anonymous functions use the empty String as the value of the *"name"* property. For functions that are specified as properties of objects, the name value is the property name string used to access the function. Functions that are specified as get or set accessor functions of built-in properties have *"get"* or *"set"* (respectively) passed to the _prefix_ parameter when calling CreateBuiltinFunction.

      @@ -28663,7 +28663,7 @@

      globalThis

      Infinity

      -

      The value of `Infinity` is *+∞*𝔽 (see ). This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

      +

      The value of `Infinity` is *+∞*𝔽 (see ). This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

      @@ -28943,9 +28943,9 @@

      parseInt ( _string_, _radix_ )

      1. If _S_ is not empty and the first code unit of _S_ is 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. 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 _R_ ≠ 0, then + 1. If _R_ < 2 or _R_ > 36, return *NaN*. + 1. If _R_ ≠ 16, set _stripPrefix_ to *false*. 1. Else, 1. Set _R_ to 10. 1. If _stripPrefix_ is *true*, then @@ -28959,7 +28959,7 @@

      parseInt ( _string_, _radix_ )

      1. If _mathInt_ = 0, then 1. If _sign_ = -1, return *-0*𝔽. 1. Return *+0*𝔽. - 1. Return 𝔽(_sign_ × _mathInt_). + 1. Return 𝔽(_sign_ × _mathInt_).

      This function may interpret only a leading portion of _string_ as an integer value; it ignores any code units that cannot be interpreted as part of the notation of an integer, and no indication is given that any such code units were ignored.

      @@ -29083,7 +29083,7 @@

      1. Let _S_ be the String value containing only the code unit _C_. 1. Else, 1. Let _start_ be _k_. - 1. If _k_ + 2 ≥ _strLen_, throw a *URIError* exception. + 1. If _k_ + 2 ≥ _strLen_, throw a *URIError* exception. 1. If the code units at index (_k_ + 1) and (_k_ + 2) within _string_ do not represent hexadecimal digits, throw a *URIError* exception. 1. Let _B_ be the 8-bit value represented by the two hexadecimal digits at index (_k_ + 1) and (_k_ + 2). 1. Set _k_ to _k_ + 2. @@ -29095,9 +29095,9 @@

      1. Else, 1. Let _S_ be the substring of _string_ from _start_ to _k_ + 1. 1. Else, - 1. If _n_ = 1 or _n_ > 4, throw a *URIError* exception. - 1. If _k_ + (3 × (_n_ - 1)) ≥ _strLen_, throw a *URIError* exception. - 1. Let _Octets_ be « _B_ ». + 1. If _n_ = 1 or _n_ > 4, throw a *URIError* exception. + 1. If _k_ + (3 × (_n_ - 1)) ≥ _strLen_, throw a *URIError* exception. + 1. Let _Octets_ be « _B_ ». 1. Let _j_ be 1. 1. Repeat, while _j_ < _n_, 1. Set _k_ to _k_ + 1. @@ -29505,7 +29505,7 @@

      Object.fromEntries ( _iterable_ )

      1. Let _propertyKey_ be ? ToPropertyKey(_key_). 1. Perform ! CreateDataPropertyOrThrow(_obj_, _propertyKey_, _value_). 1. Return *undefined*. - 1. Let _adder_ be CreateBuiltinFunction(_closure_, 2, *""*, « »). + 1. Let _adder_ be CreateBuiltinFunction(_closure_, 2, *""*, « »). 1. Return ? AddEntriesFromIterable(_obj_, _iterable_, _adder_). @@ -29909,12 +29909,12 @@

      The Function Constructor

      • is %Function%.
      • is the initial value of the *"Function"* property of the global object.
      • -
      • creates and initializes a new function object when called as a function rather than as a constructor. Thus the function call `Function(…)` is equivalent to the object creation expression `new Function(…)` with the same arguments.
      • +
      • creates and initializes a new function object when called as a function rather than as a constructor. Thus the function call `Function(…)` is equivalent to the object creation expression `new Function(…)` with the same arguments.
      • may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified Function behaviour must include a `super` call to the Function constructor to create and initialize a subclass instance with the internal slots necessary for built-in function behaviour. All ECMAScript syntactic forms for defining function objects create instances of Function. There is no syntactic means to create instances of Function subclasses except for the built-in GeneratorFunction, AsyncFunction, and AsyncGeneratorFunction subclasses.
      -

      Function ( _p1_, _p2_, … , _pn_, _body_ )

      +

      Function ( _p1_, _p2_, … , _pn_, _body_ )

      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:

      @@ -29978,7 +29978,7 @@

      1. If _argCount_ = 0, let _bodyArg_ be the empty String. 1. Else if _argCount_ = 1, let _bodyArg_ be _args_[0]. 1. Else, - 1. Assert: _argCount_ > 1. + 1. Assert: _argCount_ > 1. 1. Let _firstArg_ be _args_[0]. 1. Set _P_ to ? ToString(_firstArg_). 1. Let _k_ be 1. @@ -30093,8 +30093,8 @@

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

      1. If _targetHasLength_ is *true*, then 1. Let _targetLen_ be ? Get(_Target_, *"length"*). 1. If _targetLen_ is a Number, then - 1. If _targetLen_ is *+∞*𝔽, set _L_ to +∞. - 1. Else if _targetLen_ is *-∞*𝔽, set _L_ to 0. + 1. If _targetLen_ is *+∞*𝔽, set _L_ to +∞. + 1. Else if _targetLen_ is *-∞*𝔽, set _L_ to 0. 1. Else, 1. Let _targetLenAsInt_ be ! ToIntegerOrInfinity(_targetLen_). 1. Assert: _targetLenAsInt_ is finite. @@ -30246,7 +30246,7 @@

      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. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Boolean.prototype%"*, « [[BooleanData]] »). 1. Set _O_.[[BooleanData]] to _b_. 1. Return _O_. @@ -30605,7 +30605,7 @@

      The Error Constructor

      • is %Error%.
      • is the initial value of the *"Error"* property of the global object.
      • -
      • creates and initializes a new Error object when called as a function rather than as a constructor. Thus the function call `Error(…)` is equivalent to the object creation expression `new Error(…)` with the same arguments.
      • +
      • creates and initializes a new Error object when called as a function rather than as a constructor. Thus the function call `Error(…)` is equivalent to the object creation expression `new Error(…)` with the same arguments.
      • may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified Error behaviour must include a `super` call to the Error constructor to create and initialize subclass instances with an [[ErrorData]] internal slot.
      @@ -30614,7 +30614,7 @@

      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 _O_ 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_). @@ -30745,7 +30745,7 @@

      _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-nativerror-ordinarycreatefromconstructor"] Let _O_ be ? OrdinaryCreateFromConstructor(_newTarget_, "%NativeError.prototype%", « [[ErrorData]] »). + 1. [id="step-nativerror-ordinarycreatefromconstructor"] Let _O_ 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_). @@ -30812,7 +30812,7 @@

      The AggregateError Constructor

      • is %AggregateError%.
      • is the initial value of the *"AggregateError"* property of the global object.
      • -
      • creates and initializes a new AggregateError object when called as a function rather than as a constructor. Thus the function call `AggregateError(…)` is equivalent to the object creation expression `new AggregateError(…)` with the same arguments.
      • +
      • creates and initializes a new AggregateError object when called as a function rather than as a constructor. Thus the function call `AggregateError(…)` is equivalent to the object creation expression `new AggregateError(…)` with the same arguments.
      • may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified AggregateError behaviour must include a `super` call to the AggregateError constructor to create and initialize subclass instances with an [[ErrorData]] internal slot.
      @@ -30821,7 +30821,7 @@

      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 _O_ 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_). @@ -30933,7 +30933,7 @@

      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. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Number.prototype%"*, « [[NumberData]] »). 1. Set _O_.[[NumberData]] to _n_. 1. Return _O_.
      @@ -30950,7 +30950,7 @@

      Properties of the Number Constructor

      Number.EPSILON

      -

      The value of `Number.EPSILON` is the Number value for the magnitude of the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 × 10-16.

      +

      The value of `Number.EPSILON` is the Number value for the magnitude of the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 × 10-16.

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

      @@ -30993,7 +30993,7 @@

      Number.isSafeInteger ( _number_ )

      This function performs the following steps when called:

      1. If IsIntegralNumber(_number_) is *true*, then - 1. If abs(ℝ(_number_)) ≤ 253 - 1, return *true*. + 1. If abs(ℝ(_number_)) ≤ 253 - 1, return *true*. 1. Return *false*.
      @@ -31009,7 +31009,7 @@

      Number.MAX_SAFE_INTEGER

      Number.MAX_VALUE

      -

      The value of `Number.MAX_VALUE` is the largest positive finite value of the Number type, which is approximately 1.7976931348623157 × 10308.

      +

      The value of `Number.MAX_VALUE` is the largest positive finite value of the Number type, which is approximately 1.7976931348623157 × 10308.

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

      @@ -31024,7 +31024,7 @@

      Number.MIN_SAFE_INTEGER

      Number.MIN_VALUE

      -

      The value of `Number.MIN_VALUE` is the smallest positive value of the Number type, which is approximately 5 × 10-324.

      +

      The value of `Number.MIN_VALUE` is the smallest positive value of the Number type, which is approximately 5 × 10-324.

      In the IEEE 754-2019 double precision binary representation, the smallest possible value is a denormalized number. If an implementation does not support denormalized values, the value of `Number.MIN_VALUE` must be the smallest non-zero positive value that can actually be represented by the implementation.

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

      @@ -31037,7 +31037,7 @@

      Number.NaN

      Number.NEGATIVE_INFINITY

      -

      The value of `Number.NEGATIVE_INFINITY` is *-∞*𝔽.

      +

      The value of `Number.NEGATIVE_INFINITY` is *-∞*𝔽.

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

      @@ -31053,7 +31053,7 @@

      Number.parseInt ( _string_, _radix_ )

      Number.POSITIVE_INFINITY

      -

      The value of `Number.POSITIVE_INFINITY` is *+∞*𝔽.

      +

      The value of `Number.POSITIVE_INFINITY` is *+∞*𝔽.

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

      @@ -31083,7 +31083,7 @@

      Properties of the Number Prototype Object

      1. Return _n_. 1. Throw a *TypeError* exception. -

      The phrase “this Number value” within the specification of a method refers to the result returned by calling the abstract operation thisNumberValue with the *this* value of the method invocation passed as the argument.

      +

      The phrase “this Number value” within the specification of a method refers to the result returned by calling the abstract operation thisNumberValue with the *this* value of the method invocation passed as the argument.

      Number.prototype.constructor

      @@ -31099,7 +31099,7 @@

      Number.prototype.toExponential ( _fractionDigits_ )

      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. 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 @@ -31110,11 +31110,11 @@

      Number.prototype.toExponential ( _fractionDigits_ )

      1. Let _e_ 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 _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. Else, - 1. [id="step-number-proto-toexponential-intermediate-values"] Let _e_, _n_, and _f_ be integers such that _f_ ≥ 0, 10_f_ ≤ _n_ < 10_f_ + 1, 𝔽(_n_ × 10_e_ - _f_) is 𝔽(_x_), and _f_ is as small as possible. Note that the decimal representation of _n_ has _f_ + 1 digits, _n_ is not divisible by 10, and the least significant digit of _n_ is not necessarily uniquely determined by these criteria. + 1. [id="step-number-proto-toexponential-intermediate-values"] Let _e_, _n_, and _f_ be integers such that _f_ ≥ 0, 10_f_ ≤ _n_ < 10_f_ + 1, 𝔽(_n_ × 10_e_ - _f_) is 𝔽(_x_), and _f_ is as small as possible. Note that the decimal representation of _n_ has _f_ + 1 digits, _n_ is not divisible by 10, and the least significant digit of _n_ is not necessarily uniquely determined by these criteria. 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. 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_. @@ -31122,7 +31122,7 @@

      Number.prototype.toExponential ( _fractionDigits_ )

      1. Let _c_ be *"+"*. 1. Let _d_ be *"0"*. 1. Else, - 1. If _e_ > 0, let _c_ be *"+"*. + 1. If _e_ > 0, let _c_ be *"+"*. 1. Else, 1. Assert: _e_ < 0. 1. Let _c_ be *"-"*. @@ -31134,7 +31134,7 @@

      Number.prototype.toExponential ( _fractionDigits_ )

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

      - 1. Let _e_, _n_, and _f_ be integers such that _f_ ≥ 0, 10_f_ ≤ _n_ < 10_f_ + 1, 𝔽(_n_ × 10_e_ - _f_) is 𝔽(_x_), and _f_ is as small as possible. If there are multiple possibilities for _n_, choose the value of _n_ for which 𝔽(_n_ × 10_e_ - _f_) is closest in value to 𝔽(_x_). If there are two such possible values of _n_, choose the one that is even. + 1. Let _e_, _n_, and _f_ be integers such that _f_ ≥ 0, 10_f_ ≤ _n_ < 10_f_ + 1, 𝔽(_n_ × 10_e_ - _f_) is 𝔽(_x_), and _f_ is as small as possible. If there are multiple possibilities for _n_, choose the value of _n_ for which 𝔽(_n_ × 10_e_ - _f_) is closest in value to 𝔽(_x_). If there are two such possible values of _n_, choose the one that is even.
      @@ -31150,21 +31150,21 @@

      Number.prototype.toFixed ( _fractionDigits_ )

      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 _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. If _x_ ≥ 1021, then 1. Let _m_ be ! ToString(𝔽(_x_)). 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"*. Otherwise, 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. If _f_ ≠ 0, then 1. Let _k_ be the length of _m_. - 1. If _k_ ≤ _f_, then + 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. @@ -31198,7 +31198,7 @@

      Number.prototype.toPrecision ( _precision_ )

      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. 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 @@ -31208,15 +31208,15 @@

      Number.prototype.toPrecision ( _precision_ )

      1. Let _m_ be the String value consisting of _p_ occurrences of the code unit 0x0030 (DIGIT ZERO). 1. Let _e_ 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 _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. 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. If _e_ > 0, then 1. Let _c_ be the code unit 0x002B (PLUS SIGN). 1. Else, 1. Assert: _e_ < 0. @@ -31225,7 +31225,7 @@

      Number.prototype.toPrecision ( _precision_ )

      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. 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. 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_. @@ -31318,7 +31318,7 @@

      BigInt.asIntN ( _bits_, _bigint_ )

      1. Set _bits_ to ? ToIndex(_bits_). 1. Set _bigint_ to ? ToBigInt(_bigint_). 1. Let _mod_ be ℝ(_bigint_) modulo 2_bits_. - 1. If _mod_ ≥ 2_bits_ - 1, return ℤ(_mod_ - 2_bits_); otherwise, return ℤ(_mod_). + 1. If _mod_ ≥ 2_bits_ - 1, return ℤ(_mod_ - 2_bits_); otherwise, return ℤ(_mod_).
      @@ -31356,7 +31356,7 @@

      Properties of the BigInt Prototype Object

      1. Return _value_.[[BigIntData]]. 1. Throw a *TypeError* exception. -

      The phrase “this BigInt value” within the specification of a method refers to the result returned by calling the abstract operation thisBigIntValue with the *this* value of the method invocation passed as the argument.

      +

      The phrase “this BigInt value” within the specification of a method refers to the result returned by calling the abstract operation thisBigIntValue with the *this* value of the method invocation passed as the argument.

      BigInt.prototype.constructor

      @@ -31414,7 +31414,7 @@

      The Math Object

    • does not have a [[Call]] internal method; it cannot be invoked as a function.
    -

    In this specification, the phrase “the Number value for _x_” has a technical meaning defined in .

    +

    In this specification, the phrase “the Number value for _x_” has a technical meaning defined in .

    @@ -31458,13 +31458,13 @@

    Math.LOG2E

    Math.PI

    -

    The Number value for π, the ratio of the circumference of a circle to its diameter, which is approximately 3.1415926535897932.

    +

    The Number value for π, the ratio of the circumference of a circle to its diameter, which is approximately 3.1415926535897932.

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

    Math.SQRT1_2

    -

    The Number value for the square root of ½, which is approximately 0.7071067811865476.

    +

    The Number value for the square root of ½, which is approximately 0.7071067811865476.

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

    The value of `Math.SQRT1_2` is approximately the reciprocal of the value of `Math.SQRT2`.

    @@ -31499,7 +31499,7 @@

    Math.abs ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, return *NaN*. 1. If _n_ is *-0*𝔽, return *+0*𝔽. - 1. If _n_ is *-∞*𝔽, return *+∞*𝔽. + 1. If _n_ is *-∞*𝔽, return *+∞*𝔽. 1. If _n_ < *-0*𝔽, return -_n_. 1. Return _n_.
    @@ -31507,11 +31507,11 @@

    Math.abs ( _x_ )

    Math.acos ( _x_ )

    -

    This function returns the inverse cosine of _x_. The result is expressed in radians and is in the inclusive interval from *+0*𝔽 to 𝔽(π).

    +

    This function returns the inverse cosine of _x_. The result is expressed in radians and is in the inclusive interval from *+0*𝔽 to 𝔽(π).

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN*, _n_ > *1*𝔽, or _n_ < *-1*𝔽, return *NaN*. + 1. If _n_ is *NaN*, _n_ > *1*𝔽, or _n_ < *-1*𝔽, return *NaN*. 1. If _n_ is *1*𝔽, return *+0*𝔽. 1. Return an implementation-approximated Number value representing the result of the inverse cosine of ℝ(_n_). @@ -31523,7 +31523,7 @@

    Math.acosh ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. 1. If _n_ is *1*𝔽, return *+0*𝔽. 1. If _n_ < *1*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the inverse hyperbolic cosine of ℝ(_n_). @@ -31532,12 +31532,12 @@

    Math.acosh ( _x_ )

    Math.asin ( _x_ )

    -

    This function returns the inverse sine of _x_. The result is expressed in radians and is in the inclusive interval from 𝔽(-π / 2) to 𝔽(π / 2).

    +

    This function returns the inverse sine of _x_. The result is expressed in radians and is in the inclusive interval from 𝔽(-π / 2) to 𝔽(π / 2).

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. - 1. If _n_ > *1*𝔽 or _n_ < *-1*𝔽, return *NaN*. + 1. If _n_ > *1*𝔽 or _n_ < *-1*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the inverse sine of ℝ(_n_).
    @@ -31555,13 +31555,13 @@

    Math.asinh ( _x_ )

    Math.atan ( _x_ )

    -

    This function returns the inverse tangent of _x_. The result is expressed in radians and is in the inclusive interval from 𝔽(-π / 2) to 𝔽(π / 2).

    +

    This function returns the inverse tangent of _x_. The result is expressed in radians and is in the inclusive interval from 𝔽(-π / 2) to 𝔽(π / 2).

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. - 1. If _n_ is *+∞*𝔽, return an implementation-approximated Number value representing π / 2. - 1. If _n_ is *-∞*𝔽, return an implementation-approximated Number value representing -π / 2. + 1. If _n_ is *+∞*𝔽, return an implementation-approximated Number value representing π / 2. + 1. If _n_ is *-∞*𝔽, return an implementation-approximated Number value representing -π / 2. 1. Return an implementation-approximated Number value representing the result of the inverse tangent of ℝ(_n_).
    @@ -31573,44 +31573,44 @@

    Math.atanh ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. - 1. If _n_ > *1*𝔽 or _n_ < *-1*𝔽, return *NaN*. - 1. If _n_ is *1*𝔽, return *+∞*𝔽. - 1. If _n_ is *-1*𝔽, return *-∞*𝔽. + 1. If _n_ > *1*𝔽 or _n_ < *-1*𝔽, return *NaN*. + 1. If _n_ is *1*𝔽, return *+∞*𝔽. + 1. If _n_ is *-1*𝔽, return *-∞*𝔽. 1. Return an implementation-approximated Number value representing the result of the inverse hyperbolic tangent of ℝ(_n_).

    Math.atan2 ( _y_, _x_ )

    -

    This function returns the inverse tangent of the quotient _y_ / _x_ of the arguments _y_ and _x_, where the signs of _y_ and _x_ are used to determine the quadrant of the result. Note that it is intentional and traditional for the two-argument inverse tangent function that the argument named _y_ be first and the argument named _x_ be second. The result is expressed in radians and is in the inclusive interval from -π to +π.

    +

    This function returns the inverse tangent of the quotient _y_ / _x_ of the arguments _y_ and _x_, where the signs of _y_ and _x_ are used to determine the quadrant of the result. Note that it is intentional and traditional for the two-argument inverse tangent function that the argument named _y_ be first and the argument named _x_ be second. The result is expressed in radians and is in the inclusive interval from -π to +π.

    It performs the following steps when called:

    1. Let _ny_ be ? ToNumber(_y_). 1. Let _nx_ be ? ToNumber(_x_). 1. If _ny_ is *NaN* or _nx_ is *NaN*, return *NaN*. - 1. If _ny_ is *+∞*𝔽, then - 1. If _nx_ is *+∞*𝔽, return an implementation-approximated Number value representing π / 4. - 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing 3π / 4. - 1. Return an implementation-approximated Number value representing π / 2. - 1. If _ny_ is *-∞*𝔽, then - 1. If _nx_ is *+∞*𝔽, return an implementation-approximated Number value representing -π / 4. - 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing -3π / 4. - 1. Return an implementation-approximated Number value representing -π / 2. + 1. If _ny_ is *+∞*𝔽, then + 1. If _nx_ is *+∞*𝔽, return an implementation-approximated Number value representing π / 4. + 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing 3π / 4. + 1. Return an implementation-approximated Number value representing π / 2. + 1. If _ny_ is *-∞*𝔽, then + 1. If _nx_ is *+∞*𝔽, return an implementation-approximated Number value representing -π / 4. + 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing -3π / 4. + 1. Return an implementation-approximated Number value representing -π / 2. 1. If _ny_ is *+0*𝔽, then - 1. If _nx_ > *+0*𝔽 or _nx_ is *+0*𝔽, return *+0*𝔽. - 1. Return an implementation-approximated Number value representing π. + 1. If _nx_ > *+0*𝔽 or _nx_ is *+0*𝔽, return *+0*𝔽. + 1. Return an implementation-approximated Number value representing π. 1. If _ny_ is *-0*𝔽, then - 1. If _nx_ > *+0*𝔽 or _nx_ is *+0*𝔽, return *-0*𝔽. - 1. Return an implementation-approximated Number value representing -π. + 1. If _nx_ > *+0*𝔽 or _nx_ is *+0*𝔽, return *-0*𝔽. + 1. Return an implementation-approximated Number value representing -π. 1. Assert: _ny_ is finite and is neither *+0*𝔽 nor *-0*𝔽. - 1. If _ny_ > *+0*𝔽, then - 1. If _nx_ is *+∞*𝔽, return *+0*𝔽. - 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing π. - 1. If _nx_ is *+0*𝔽 or _nx_ is *-0*𝔽, return an implementation-approximated Number value representing π / 2. + 1. If _ny_ > *+0*𝔽, then + 1. If _nx_ is *+∞*𝔽, return *+0*𝔽. + 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing π. + 1. If _nx_ is *+0*𝔽 or _nx_ is *-0*𝔽, return an implementation-approximated Number value representing π / 2. 1. If _ny_ < *-0*𝔽, then - 1. If _nx_ is *+∞*𝔽, return *-0*𝔽. - 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing -π. - 1. If _nx_ is *+0*𝔽 or _nx_ is *-0*𝔽, return an implementation-approximated Number value representing -π / 2. + 1. If _nx_ is *+∞*𝔽, return *-0*𝔽. + 1. If _nx_ is *-∞*𝔽, return an implementation-approximated Number value representing -π. + 1. If _nx_ is *+0*𝔽 or _nx_ is *-0*𝔽, return an implementation-approximated Number value representing -π / 2. 1. Assert: _nx_ is finite and is neither *+0*𝔽 nor *-0*𝔽. 1. Return an implementation-approximated Number value representing the result of the inverse tangent of the quotient ℝ(_ny_) / ℝ(_nx_). @@ -31629,14 +31629,14 @@

    Math.cbrt ( _x_ )

    Math.ceil ( _x_ )

    -

    This function returns the smallest (closest to -∞) integral Number value that is not less than _x_. If _x_ is already an integral Number, the result is _x_.

    +

    This function returns the smallest (closest to -∞) integral Number value that is not less than _x_. If _x_ is already an integral Number, the result is _x_.

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is not finite or _n_ is either *+0*𝔽 or *-0*𝔽, return _n_. - 1. If _n_ < *-0*𝔽 and _n_ > *-1*𝔽, return *-0*𝔽. + 1. If _n_ < *-0*𝔽 and _n_ > *-1*𝔽, return *-0*𝔽. 1. If _n_ is an integral Number, return _n_. - 1. Return the smallest (closest to -∞) integral Number value that is not less than _n_. + 1. Return the smallest (closest to -∞) integral Number value that is not less than _n_.

    The value of `Math.ceil(x)` is the same as the value of `-Math.floor(-x)`.

    @@ -31675,7 +31675,7 @@

    Math.cosh ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, return *NaN*. - 1. If _n_ is *+∞*𝔽 or _n_ is *-∞*𝔽, return *+∞*𝔽. + 1. If _n_ is *+∞*𝔽 or _n_ is *-∞*𝔽, return *+∞*𝔽. 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *1*𝔽. 1. Return an implementation-approximated Number value representing the result of the hyperbolic cosine of ℝ(_n_). @@ -31690,9 +31690,9 @@

    Math.exp ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *1*𝔽. - 1. If _n_ is *-∞*𝔽, return *+0*𝔽. + 1. If _n_ is *-∞*𝔽, return *+0*𝔽. 1. Return an implementation-approximated Number value representing the result of the exponential function of ℝ(_n_).
    @@ -31703,22 +31703,22 @@

    Math.expm1 ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. - 1. If _n_ is *-∞*𝔽, return *-1*𝔽. + 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *-∞*𝔽, return *-1*𝔽. 1. Return an implementation-approximated Number value representing the result of subtracting 1 from the exponential function of ℝ(_n_).

    Math.floor ( _x_ )

    -

    This function returns the greatest (closest to +∞) integral Number value that is not greater than _x_. If _x_ is already an integral Number, the result is _x_.

    +

    This function returns the greatest (closest to +∞) integral Number value that is not greater than _x_. If _x_ is already an integral Number, the result is _x_.

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is not finite or _n_ is either *+0*𝔽 or *-0*𝔽, return _n_. - 1. If _n_ < *1*𝔽 and _n_ > *+0*𝔽, return *+0*𝔽. + 1. If _n_ < *1*𝔽 and _n_ > *+0*𝔽, return *+0*𝔽. 1. If _n_ is an integral Number, return _n_. - 1. Return the greatest (closest to +∞) integral Number value that is not greater than _n_. + 1. Return the greatest (closest to +∞) integral Number value that is not greater than _n_.

    The value of `Math.floor(x)` is the same as the value of `-Math.ceil(-x)`.

    @@ -31731,7 +31731,7 @@

    Math.fround ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, return *NaN*. - 1. If _n_ is one of *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return _n_. + 1. If _n_ is one of *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return _n_. 1. Let _n32_ be the result of converting _n_ to a value in IEEE 754-2019 binary32 format using roundTiesToEven mode. 1. Let _n64_ be the result of converting _n32_ to a value in IEEE 754-2019 binary64 format. 1. Return the ECMAScript Number value corresponding to _n64_. @@ -31748,7 +31748,7 @@

    Math.hypot ( ..._args_ )

    1. Let _n_ be ? ToNumber(_arg_). 1. Append _n_ to _coerced_. 1. For each element _number_ of _coerced_, do - 1. If _number_ is *+∞*𝔽 or _number_ is *-∞*𝔽, return *+∞*𝔽. + 1. If _number_ is *+∞*𝔽 or _number_ is *-∞*𝔽, return *+∞*𝔽. 1. Let _onlyZero_ be *true*. 1. For each element _number_ of _coerced_, do 1. If _number_ is *NaN*, return *NaN*. @@ -31768,8 +31768,8 @@

    Math.imul ( _x_, _y_ )

    1. Let _a_ be ℝ(? ToUint32(_x_)). 1. Let _b_ be ℝ(? ToUint32(_y_)). - 1. Let _product_ be (_a_ × _b_) modulo 232. - 1. If _product_ ≥ 231, return 𝔽(_product_ - 232); otherwise return 𝔽(_product_). + 1. Let _product_ be (_a_ × _b_) modulo 232. + 1. If _product_ ≥ 231, return 𝔽(_product_ - 232); otherwise return 𝔽(_product_).
    @@ -31779,9 +31779,9 @@

    Math.log ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. 1. If _n_ is *1*𝔽, return *+0*𝔽. - 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *-∞*𝔽. + 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *-∞*𝔽. 1. If _n_ < *-0*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the natural logarithm of ℝ(_n_). @@ -31793,8 +31793,8 @@

    Math.log1p ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. - 1. If _n_ is *-1*𝔽, return *-∞*𝔽. + 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *-1*𝔽, return *-∞*𝔽. 1. If _n_ < *-1*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the natural logarithm of 1 + ℝ(_n_). @@ -31806,9 +31806,9 @@

    Math.log10 ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. 1. If _n_ is *1*𝔽, return *+0*𝔽. - 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *-∞*𝔽. + 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *-∞*𝔽. 1. If _n_ < *-0*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the base 10 logarithm of ℝ(_n_). @@ -31820,9 +31820,9 @@

    Math.log2 ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *NaN* or _n_ is *+∞*𝔽, return _n_. 1. If _n_ is *1*𝔽, return *+0*𝔽. - 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *-∞*𝔽. + 1. If _n_ is *+0*𝔽 or _n_ is *-0*𝔽, return *-∞*𝔽. 1. If _n_ < *-0*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the base 2 logarithm of ℝ(_n_). @@ -31837,11 +31837,11 @@

    Math.max ( ..._args_ )

    1. For each element _arg_ of _args_, do 1. Let _n_ be ? ToNumber(_arg_). 1. Append _n_ to _coerced_. - 1. Let _highest_ be *-∞*𝔽. + 1. Let _highest_ be *-∞*𝔽. 1. For each element _number_ of _coerced_, do 1. If _number_ is *NaN*, return *NaN*. 1. If _number_ is *+0*𝔽 and _highest_ is *-0*𝔽, set _highest_ to *+0*𝔽. - 1. If _number_ > _highest_, set _highest_ to _number_. + 1. If _number_ > _highest_, set _highest_ to _number_. 1. Return _highest_.
    @@ -31859,7 +31859,7 @@

    Math.min ( ..._args_ )

    1. For each element _arg_ of _args_, do 1. Let _n_ be ? ToNumber(_arg_). 1. Append _n_ to _coerced_. - 1. Let _lowest_ be *+∞*𝔽. + 1. Let _lowest_ be *+∞*𝔽. 1. For each element _number_ of _coerced_, do 1. If _number_ is *NaN*, return *NaN*. 1. If _number_ is *-0*𝔽 and _lowest_ is *+0*𝔽, set _lowest_ to *-0*𝔽. @@ -31890,14 +31890,14 @@

    Math.random ( )

    Math.round ( _x_ )

    -

    This function returns the Number value that is closest to _x_ and is integral. If two integral Numbers are equally close to _x_, then the result is the Number value that is closer to +∞. If _x_ is already integral, the result is _x_.

    +

    This function returns the Number value that is closest to _x_ and is integral. If two integral Numbers are equally close to _x_, then the result is the Number value that is closer to +∞. If _x_ is already integral, the result is _x_.

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is not finite or _n_ is an integral Number, return _n_. - 1. If _n_ < *0.5*𝔽 and _n_ > *+0*𝔽, return *+0*𝔽. - 1. If _n_ < *-0*𝔽 and _n_ ≥ *-0.5*𝔽, return *-0*𝔽. - 1. Return the integral Number closest to _n_, preferring the Number closer to +∞ in the case of a tie. + 1. If _n_ < *0.5*𝔽 and _n_ > *+0*𝔽, return *+0*𝔽. + 1. If _n_ < *-0*𝔽 and _n_ ≥ *-0.5*𝔽, return *-0*𝔽. + 1. Return the integral Number closest to _n_, preferring the Number closer to +∞ in the case of a tie.

    `Math.round(3.5)` returns 4, but `Math.round(-3.5)` returns -3.

    @@ -31926,7 +31926,7 @@

    Math.sin ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. - 1. If _n_ is *+∞*𝔽 or _n_ is *-∞*𝔽, return *NaN*. + 1. If _n_ is *+∞*𝔽 or _n_ is *-∞*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the sine of ℝ(_n_).
    @@ -31951,7 +31951,7 @@

    Math.sqrt ( _x_ )

    It performs the following steps when called:

    1. Let _n_ be ? ToNumber(_x_). - 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. + 1. If _n_ is *NaN*, _n_ is *+0*𝔽, _n_ is *-0*𝔽, or _n_ is *+∞*𝔽, return _n_. 1. If _n_ < *-0*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the square root of ℝ(_n_). @@ -31964,7 +31964,7 @@

    Math.tan ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. - 1. If _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return *NaN*. + 1. If _n_ is *+∞*𝔽, or _n_ is *-∞*𝔽, return *NaN*. 1. Return an implementation-approximated Number value representing the result of the tangent of ℝ(_n_). @@ -31976,8 +31976,8 @@

    Math.tanh ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is *NaN*, _n_ is *+0*𝔽, or _n_ is *-0*𝔽, return _n_. - 1. If _n_ is *+∞*𝔽, return *1*𝔽. - 1. If _n_ is *-∞*𝔽, return *-1*𝔽. + 1. If _n_ is *+∞*𝔽, return *1*𝔽. + 1. If _n_ is *-∞*𝔽, return *-1*𝔽. 1. Return an implementation-approximated Number value representing the result of the hyperbolic tangent of ℝ(_n_). @@ -31992,8 +31992,8 @@

    Math.trunc ( _x_ )

    1. Let _n_ be ? ToNumber(_x_). 1. If _n_ is not finite or _n_ is either *+0*𝔽 or *-0*𝔽, return _n_. - 1. If _n_ < *1*𝔽 and _n_ > *+0*𝔽, return *+0*𝔽. - 1. If _n_ < *-0*𝔽 and _n_ > *-1*𝔽, return *-0*𝔽. + 1. If _n_ < *1*𝔽 and _n_ > *+0*𝔽, return *+0*𝔽. + 1. If _n_ < *-0*𝔽 and _n_ > *-1*𝔽, return *-0*𝔽. 1. Return the integral Number nearest _n_ in the direction of *+0*𝔽. @@ -32010,8 +32010,8 @@

    Overview of Date Objects and Definitions of Abstract Operations

    Time Values and Time Range

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

    -

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

    -

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

    +

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

    +

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

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

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

    @@ -32034,17 +32034,17 @@

    Year Number

    ECMAScript uses a proleptic Gregorian calendar to map a day number to a year number and to determine the month and date within that year. In this calendar, leap years are precisely those which are (divisible by 4) and ((not divisible by 100) or (divisible by 400)). The number of days in year number _y_ is therefore defined by

    DaysInYear(_y_) - = *365*𝔽 if (ℝ(_y_) modulo 4) ≠ 0 - = *366*𝔽 if (ℝ(_y_) modulo 4) = 0 and (ℝ(_y_) modulo 100) ≠ 0 - = *365*𝔽 if (ℝ(_y_) modulo 100) = 0 and (ℝ(_y_) modulo 400) ≠ 0 + = *365*𝔽 if (ℝ(_y_) modulo 4) ≠ 0 + = *366*𝔽 if (ℝ(_y_) modulo 4) = 0 and (ℝ(_y_) modulo 100) ≠ 0 + = *365*𝔽 if (ℝ(_y_) modulo 100) = 0 and (ℝ(_y_) modulo 400) ≠ 0 = *366*𝔽 if (ℝ(_y_) modulo 400) = 0

    All non-leap years have 365 days with the usual number of days per month and leap years have an extra day in February. The day number of the first day of year _y_ is given by:

    - DayFromYear(_y_) = 𝔽(365 × (ℝ(_y_) - 1970) + floor((ℝ(_y_) - 1969) / 4) - floor((ℝ(_y_) - 1901) / 100) + floor((ℝ(_y_) - 1601) / 400)) + DayFromYear(_y_) = 𝔽(365 × (ℝ(_y_) - 1970) + floor((ℝ(_y_) - 1969) / 4) - floor((ℝ(_y_) - 1901) / 100) + floor((ℝ(_y_) - 1601) / 400))

    The time value of the start of a year is:

    - TimeFromYear(_y_) = msPerDay × DayFromYear(_y_) + TimeFromYear(_y_) = msPerDay × DayFromYear(_y_)

    A time value determines a year by:

    - YearFromTime(_t_) = the largest integral Number _y_ (closest to +∞) such that TimeFromYear(_y_) ≤ _t_ + YearFromTime(_t_) = the largest integral Number _y_ (closest to +∞) such that TimeFromYear(_y_) ≤ _t_

    The leap-year function is *1*𝔽 for a time within a leap year and otherwise is *+0*𝔽:

    InLeapYear(_t_) @@ -32058,18 +32058,18 @@

    Month Number

    Months are identified by an integral Number in the inclusive interval from *+0*𝔽 to *11*𝔽. The mapping MonthFromTime(_t_) from a time value _t_ to a month number is defined by:

    MonthFromTime(_t_) - = *+0*𝔽 if *+0*𝔽 ≤ DayWithinYear(_t_) < *31*𝔽 - = *1*𝔽 if *31*𝔽 ≤ DayWithinYear(_t_) < *59*𝔽 + InLeapYear(_t_) - = *2*𝔽 if *59*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *90*𝔽 + InLeapYear(_t_) - = *3*𝔽 if *90*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *120*𝔽 + InLeapYear(_t_) - = *4*𝔽 if *120*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *151*𝔽 + InLeapYear(_t_) - = *5*𝔽 if *151*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *181*𝔽 + InLeapYear(_t_) - = *6*𝔽 if *181*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *212*𝔽 + InLeapYear(_t_) - = *7*𝔽 if *212*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *243*𝔽 + InLeapYear(_t_) - = *8*𝔽 if *243*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *273*𝔽 + InLeapYear(_t_) - = *9*𝔽 if *273*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *304*𝔽 + InLeapYear(_t_) - = *10*𝔽 if *304*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *334*𝔽 + InLeapYear(_t_) - = *11*𝔽 if *334*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *365*𝔽 + InLeapYear(_t_) + = *+0*𝔽 if *+0*𝔽 ≤ DayWithinYear(_t_) < *31*𝔽 + = *1*𝔽 if *31*𝔽 ≤ DayWithinYear(_t_) < *59*𝔽 + InLeapYear(_t_) + = *2*𝔽 if *59*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *90*𝔽 + InLeapYear(_t_) + = *3*𝔽 if *90*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *120*𝔽 + InLeapYear(_t_) + = *4*𝔽 if *120*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *151*𝔽 + InLeapYear(_t_) + = *5*𝔽 if *151*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *181*𝔽 + InLeapYear(_t_) + = *6*𝔽 if *181*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *212*𝔽 + InLeapYear(_t_) + = *7*𝔽 if *212*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *243*𝔽 + InLeapYear(_t_) + = *8*𝔽 if *243*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *273*𝔽 + InLeapYear(_t_) + = *9*𝔽 if *273*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *304*𝔽 + InLeapYear(_t_) + = *10*𝔽 if *304*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *334*𝔽 + InLeapYear(_t_) + = *11*𝔽 if *334*𝔽 + InLeapYear(_t_) ≤ DayWithinYear(_t_) < *365*𝔽 + InLeapYear(_t_)

    where

    DayWithinYear(_t_) = Day(_t_) - DayFromYear(YearFromTime(_t_)) @@ -32126,7 +32126,7 @@

    1. Let _time_ be MakeTime(𝔽(_hour_), 𝔽(_minute_), 𝔽(_second_), 𝔽(_millisecond_)). 1. Let _ms_ be MakeDate(_date_, _time_). 1. Assert: _ms_ is an integral Number. - 1. Return ℤ(ℝ(_ms_) × 106 + _microsecond_ × 103 + _nanosecond_). + 1. Return ℤ(ℝ(_ms_) × 106 + _microsecond_ × 103 + _nanosecond_). @@ -32160,7 +32160,7 @@

    1. Assert: _timeZoneIdentifier_ is *"UTC"*. 1. Let _epochNanoseconds_ be GetUTCEpochNanoseconds(_year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_). - 1. Return « _epochNanoseconds_ ». + 1. Return « _epochNanoseconds_ ».

    It is recommended that implementations use the time zone information of the IANA Time Zone Database https://www.iana.org/time-zones/.

    @@ -32230,7 +32230,7 @@

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

    Input _t_ is nominally a time value but may be any Number value. The algorithm must not limit _t_ to the time value range, so that inputs corresponding with a boundary of the time value range can be supported regardless of local UTC offset. - For example, the maximum time value is 8.64 × 1015, corresponding with *"+275760-09-13T00:00:00Z"*. - In an environment where the local time zone offset is ahead of UTC by 1 hour at that instant, it is represented by the larger input of 8.64 × 1015 + 3.6 × 106, corresponding with *"+275760-09-13T01:00:00+01:00"*. + For example, the maximum time value is 8.64 × 1015, corresponding with *"+275760-09-13T00:00:00Z"*. + In an environment where the local time zone offset is ahead of UTC by 1 hour at that instant, it is represented by the larger input of 8.64 × 1015 + 3.6 × 106, corresponding with *"+275760-09-13T01:00:00+01:00"*.

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

    It is recommended that implementations use the time zone information of the IANA Time Zone Database https://www.iana.org/time-zones/.

    1:30 AM on 5 November 2017 in America/New_York is repeated twice (fall backward), but it must be interpreted as 1:30 AM UTC-04 instead of 1:30 AM UTC-05. - In UTC(TimeClip(MakeDate(MakeDay(2017, 10, 5), MakeTime(1, 30, 0, 0)))), the value of _offsetMs_ is -4 × msPerHour. + In UTC(TimeClip(MakeDate(MakeDay(2017, 10, 5), MakeTime(1, 30, 0, 0)))), the value of _offsetMs_ is -4 × msPerHour.

    2:30 AM on 12 March 2017 in America/New_York does not exist, but it must be interpreted as 2:30 AM UTC-05 (equivalent to 3:30 AM UTC-04). - In UTC(TimeClip(MakeDate(MakeDay(2017, 2, 12), MakeTime(2, 30, 0, 0)))), the value of _offsetMs_ is -5 × msPerHour. + In UTC(TimeClip(MakeDate(MakeDay(2017, 2, 12), MakeTime(2, 30, 0, 0)))), the value of _offsetMs_ is -5 × msPerHour.

    @@ -32309,8 +32309,8 @@

    Hours, Minutes, Second, and Milliseconds

    MinutesPerHour = 60 SecondsPerMinute = 60 msPerSecond = *1000*𝔽 - msPerMinute = *60000*𝔽 = msPerSecond × 𝔽(SecondsPerMinute) - msPerHour = *3600000*𝔽 = msPerMinute × 𝔽(MinutesPerHour) + msPerMinute = *60000*𝔽 = msPerSecond × 𝔽(SecondsPerMinute) + msPerHour = *3600000*𝔽 = msPerMinute × 𝔽(MinutesPerHour) @@ -32375,7 +32375,7 @@

    1. If _day_ is not finite or _time_ is not finite, return *NaN*. - 1. Let _tv_ be _day_ × msPerDay + _time_. + 1. Let _tv_ be _day_ × msPerDay + _time_. 1. If _tv_ is not finite, return *NaN*. 1. Return _tv_. @@ -32393,7 +32393,7 @@

    1. If _time_ is not finite, return *NaN*. - 1. If abs(ℝ(_time_)) > 8.64 × 1015, return *NaN*. + 1. If abs(ℝ(_time_)) > 8.64 × 1015, return *NaN*. 1. Return 𝔽(! ToIntegerOrInfinity(_time_)). @@ -32508,7 +32508,7 @@

    Date Time String Format

    YYYY-MM YYYY-MM-DD -

    It also includes “date-time” forms that consist of one of the above date-only forms immediately followed by one of the following time forms with an optional UTC offset representation appended:

    +

    It also includes “date-time” forms that consist of one of the above date-only forms immediately followed by one of the following time forms with an optional UTC offset representation appended:

     THH:mm
     THH:mm:ss
    @@ -32593,7 +32593,7 @@ 

    Time Zone Offset String Format

    MINUS SIGN - <MINUS> + <MINUS> @@ -32709,7 +32709,7 @@

    1. Let _fraction_ be the string-concatenation of CodePointsToString(_parsedFraction_) and *"000000000"*. 1. Let _nanosecondsString_ be the substring of _fraction_ from 1 to 10. 1. Let _nanoseconds_ be ℝ(StringToNumber(_nanosecondsString_)). - 1. Return _sign_ × (((_hours_ × 60 + _minutes_) × 60 + _seconds_) × 109 + _nanoseconds_). + 1. Return _sign_ × (((_hours_ × 60 + _minutes_) × 60 + _seconds_) × 109 + _nanoseconds_). @@ -32751,21 +32751,21 @@

    Date ( ..._values_ )

    1. Let _tv_ be ? ToNumber(_v_). 1. Let _dv_ be TimeClip(_tv_). 1. Else, - 1. Assert: _numberOfArgs_ ≥ 2. + 1. Assert: _numberOfArgs_ ≥ 2. 1. Let _y_ be ? ToNumber(_values_[0]). 1. Let _m_ be ? ToNumber(_values_[1]). - 1. If _numberOfArgs_ > 2, let _dt_ be ? ToNumber(_values_[2]); else let _dt_ be *1*𝔽. - 1. If _numberOfArgs_ > 3, let _h_ be ? ToNumber(_values_[3]); else let _h_ be *+0*𝔽. - 1. If _numberOfArgs_ > 4, let _min_ be ? ToNumber(_values_[4]); else let _min_ be *+0*𝔽. - 1. If _numberOfArgs_ > 5, let _s_ be ? ToNumber(_values_[5]); else let _s_ be *+0*𝔽. - 1. If _numberOfArgs_ > 6, let _milli_ be ? ToNumber(_values_[6]); else let _milli_ be *+0*𝔽. + 1. If _numberOfArgs_ > 2, let _dt_ be ? ToNumber(_values_[2]); else let _dt_ be *1*𝔽. + 1. If _numberOfArgs_ > 3, let _h_ be ? ToNumber(_values_[3]); else let _h_ be *+0*𝔽. + 1. If _numberOfArgs_ > 4, let _min_ be ? ToNumber(_values_[4]); else let _min_ be *+0*𝔽. + 1. If _numberOfArgs_ > 5, let _s_ be ? ToNumber(_values_[5]); else let _s_ be *+0*𝔽. + 1. If _numberOfArgs_ > 6, let _milli_ be ? ToNumber(_values_[6]); else let _milli_ be *+0*𝔽. 1. If _y_ is *NaN*, let _yr_ be *NaN*. 1. Else, 1. Let _yi_ be ! ToIntegerOrInfinity(_y_). - 1. If 0 ≤ _yi_ ≤ 99, let _yr_ be *1900*𝔽 + 𝔽(_yi_); otherwise, let _yr_ be _y_. + 1. If 0 ≤ _yi_ ≤ 99, let _yr_ be *1900*𝔽 + 𝔽(_yi_); otherwise, let _yr_ be _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. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Date.prototype%"*, « [[DateValue]] »). 1. Set _O_.[[DateValue]] to _dv_. 1. Return _O_. @@ -32823,7 +32823,7 @@

    Date.UTC ( _year_ [ , _month_ [ , _date_ [ , _hours_ [ , _minutes_ [ , _seco 1. If _y_ is *NaN*, let _yr_ be *NaN*. 1. Else, 1. Let _yi_ be ! ToIntegerOrInfinity(_y_). - 1. If 0 ≤ _yi_ ≤ 99, let _yr_ be *1900*𝔽 + 𝔽(_yi_); otherwise, let _yr_ be _y_. + 1. If 0 ≤ _yi_ ≤ 99, let _yr_ be *1900*𝔽 + 𝔽(_yi_); otherwise, let _yr_ be _y_. 1. Return TimeClip(MakeDate(MakeDay(_yr_, _m_, _dt_), MakeTime(_h_, _min_, _s_, _milli_))).

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

    @@ -32849,7 +32849,7 @@

    Properties of the Date Prototype Object

    1. Return _value_.[[DateValue]]. 1. Throw a *TypeError* exception. -

    In following descriptions of functions that are properties of the Date prototype object, the phrase “this Date object” refers to the object that is the *this* value for the invocation of the function. If the Type of the *this* value is not Object, a *TypeError* exception is thrown. The phrase “this time value” within the specification of a method refers to the result returned by calling the abstract operation thisTimeValue with the *this* value of the method invocation passed as the argument.

    +

    In following descriptions of functions that are properties of the Date prototype object, the phrase “this Date object” refers to the object that is the *this* value for the invocation of the function. If the Type of the *this* value is not Object, a *TypeError* exception is thrown. The phrase “this time value” within the specification of a method refers to the result returned by calling the abstract operation thisTimeValue with the *this* value of the method invocation passed as the argument.

    Date.prototype.constructor

    @@ -33358,7 +33358,7 @@

    Date.prototype.toJSON ( _key_ )

    Date.prototype.toLocaleDateString ( [ _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 String value. The contents of the String are implementation-defined, but are intended to represent the “date” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.

    +

    This method returns a String value. The contents of the String are implementation-defined, but are intended to represent the “date” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.

    The meaning of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.

    @@ -33372,7 +33372,7 @@

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

    Date.prototype.toLocaleTimeString ( [ _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 String value. The contents of the String are implementation-defined, but are intended to represent the “time” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.

    +

    This method returns a String value. The contents of the String are implementation-defined, but are intended to represent the “time” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.

    The meaning of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.

    @@ -33419,7 +33419,7 @@

    1. Let _month_ be the Name of the entry in with the Number MonthFromTime(_tv_). 1. Let _day_ be ToZeroPaddedDecimalString(ℝ(DateFromTime(_tv_)), 2). 1. Let _yv_ be YearFromTime(_tv_). - 1. If _yv_ is *+0*𝔽 or _yv_ > *+0*𝔽, let _yearSign_ be the empty String; otherwise, let _yearSign_ be *"-"*. + 1. If _yv_ is *+0*𝔽 or _yv_ > *+0*𝔽, let _yearSign_ be the empty String; otherwise, let _yearSign_ be *"-"*. 1. Let _paddedYear_ be ToZeroPaddedDecimalString(abs(ℝ(_yv_)), 4). 1. Return the string-concatenation of _weekday_, the code unit 0x0020 (SPACE), _month_, the code unit 0x0020 (SPACE), _day_, the code unit 0x0020 (SPACE), _yearSign_, and _paddedYear_. @@ -33614,9 +33614,9 @@

    1. If IsTimeZoneOffsetString(_localTimeZone_) is *true*, then 1. Let _offsetNs_ be ParseTimeZoneOffsetString(_localTimeZone_). 1. Else, - 1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_localTimeZone_, ℤ(ℝ(_tv_) × 106)). + 1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_localTimeZone_, ℤ(ℝ(_tv_) × 106)). 1. Let _offset_ be 𝔽(truncate(_offsetNs_ / 106)). - 1. If _offset_ is *+0*𝔽 or _offset_ > *+0*𝔽, then + 1. If _offset_ is *+0*𝔽 or _offset_ > *+0*𝔽, then 1. Let _offsetSign_ be *"+"*. 1. Let _absOffset_ be _offset_. 1. Else, @@ -33669,7 +33669,7 @@

    Date.prototype.toUTCString ( )

    1. Let _month_ be the Name of the entry in with the Number MonthFromTime(_tv_). 1. Let _day_ be ToZeroPaddedDecimalString(ℝ(DateFromTime(_tv_)), 2). 1. Let _yv_ be YearFromTime(_tv_). - 1. If _yv_ is *+0*𝔽 or _yv_ > *+0*𝔽, let _yearSign_ be the empty String; otherwise, let _yearSign_ be *"-"*. + 1. If _yv_ is *+0*𝔽 or _yv_ > *+0*𝔽, let _yearSign_ be the empty String; otherwise, let _yearSign_ be *"-"*. 1. Let _paddedYear_ be ToZeroPaddedDecimalString(abs(ℝ(_yv_)), 4). 1. Return the string-concatenation of _weekday_, *","*, the code unit 0x0020 (SPACE), _day_, the code unit 0x0020 (SPACE), _month_, the code unit 0x0020 (SPACE), _yearSign_, _paddedYear_, the code unit 0x0020 (SPACE), and TimeString(_tv_). @@ -33771,7 +33771,7 @@

    String.fromCodePoint ( ..._codePoints_ )

    1. For each element _next_ of _codePoints_, do 1. Let _nextCP_ be ? ToNumber(_next_). 1. If IsIntegralNumber(_nextCP_) is *false*, throw a *RangeError* exception. - 1. If ℝ(_nextCP_) < 0 or ℝ(_nextCP_) > 0x10FFFF, throw a *RangeError* exception. + 1. If ℝ(_nextCP_) < 0 or ℝ(_nextCP_) > 0x10FFFF, throw a *RangeError* exception. 1. Set _result_ to the string-concatenation of _result_ and UTF16EncodeCodePoint(ℝ(_nextCP_)). 1. Assert: If _codePoints_ is empty, then _result_ is the empty String. 1. Return _result_. @@ -33794,7 +33794,7 @@

    String.raw ( _template_, ..._substitutions_ )

    1. Let _cooked_ be ? ToObject(_template_). 1. Let _literals_ be ? ToObject(? Get(_cooked_, *"raw"*)). 1. Let _literalCount_ be ? LengthOfArrayLike(_literals_). - 1. If _literalCount_ ≤ 0, return the empty String. + 1. If _literalCount_ ≤ 0, return the empty String. 1. Let _R_ be the empty String. 1. Let _nextIndex_ be 0. 1. Repeat, @@ -33842,11 +33842,11 @@

    String.prototype.at ( _index_ )

    1. Let _S_ be ? ToString(_O_). 1. Let _len_ be the length of _S_. 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). - 1. If _relativeIndex_ ≥ 0, then + 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. If _k_ < 0 or _k_ ≥ _len_, return *undefined*. 1. Return the substring of _S_ from _k_ to _k_ + 1.
    @@ -33863,7 +33863,7 @@

    String.prototype.charAt ( _pos_ )

    1. Let _S_ be ? ToString(_O_). 1. Let _position_ be ? ToIntegerOrInfinity(_pos_). 1. Let _size_ be the length of _S_. - 1. If _position_ < 0 or _position_ ≥ _size_, return the empty String. + 1. If _position_ < 0 or _position_ ≥ _size_, return the empty String. 1. Return the substring of _S_ from _position_ to _position_ + 1. @@ -33882,7 +33882,7 @@

    String.prototype.charCodeAt ( _pos_ )

    1. Let _S_ be ? ToString(_O_). 1. Let _position_ be ? ToIntegerOrInfinity(_pos_). 1. Let _size_ be the length of _S_. - 1. If _position_ < 0 or _position_ ≥ _size_, return *NaN*. + 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_. @@ -33901,7 +33901,7 @@

    String.prototype.codePointAt ( _pos_ )

    1. Let _S_ be ? ToString(_O_). 1. Let _position_ be ? ToIntegerOrInfinity(_pos_). 1. Let _size_ be the length of _S_. - 1. If _position_ < 0 or _position_ ≥ _size_, return *undefined*. + 1. If _position_ < 0 or _position_ ≥ _size_, return *undefined*. 1. Let _cp_ be CodePointAt(_S_, _position_). 1. Return 𝔽(_cp_.[[CodePoint]]). @@ -34028,12 +34028,12 @@

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

    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 +∞; otherwise, let _pos_ be ! ToIntegerOrInfinity(_numPos_). + 1. If _numPos_ is *NaN*, let _pos_ be +∞; otherwise, let _pos_ be ! ToIntegerOrInfinity(_numPos_). 1. Let _len_ be the length of _S_. 1. Let _searchLen_ be the length of _searchStr_. 1. Let _start_ be the result of clamping _pos_ between 0 and _len_ - _searchLen_. 1. If _searchStr_ is the empty String, return 𝔽(_start_). - 1. For each integer _i_ such that 0 ≤ _i_ ≤ _start_, in descending order, do + 1. For each integer _i_ such that 0 ≤ _i_ ≤ _start_, in descending order, do 1. Let _candidate_ be the substring of _S_ from _i_ to _i_ + _searchLen_. 1. If _candidate_ is the same sequence of code units as _searchStr_, return 𝔽(_i_). 1. Return *-1*𝔽. @@ -34059,7 +34059,7 @@

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

    This method itself is not directly suitable as an argument to `Array.prototype.sort` because the latter requires a function of two arguments.

    -

    This method may rely on whatever language- and/or locale-sensitive comparison functionality is available to the ECMAScript environment from the host environment, and is intended to compare according to the conventions of the host environment's current locale. However, regardless of comparison capabilities, this method must recognize and honour canonical equivalence according to the Unicode Standard—for example, the following comparisons must all return *+0*𝔽:

    +

    This method may rely on whatever language- and/or locale-sensitive comparison functionality is available to the ECMAScript environment from the host environment, and is intended to compare according to the conventions of the host environment's current locale. However, regardless of comparison capabilities, this method must recognize and honour canonical equivalence according to the Unicode Standard—for example, the following comparisons must all return *+0*𝔽:

    
                 // Å ANGSTROM SIGN vs.
                 // Å LATIN CAPITAL LETTER A + COMBINING RING ABOVE
    @@ -34097,10 +34097,10 @@ 

    String.prototype.match ( _regexp_ )

    1. If _regexp_ is neither *undefined* nor *null*, then 1. Let _matcher_ be ? GetMethod(_regexp_, @@match). 1. If _matcher_ is not *undefined*, then - 1. Return ? Call(_matcher_, _regexp_, « _O_ »). + 1. Return ? Call(_matcher_, _regexp_, « _O_ »). 1. Let _S_ be ? ToString(_O_). 1. Let _rx_ be ? RegExpCreate(_regexp_, *undefined*). - 1. Return ? Invoke(_rx_, @@match, « _S_ »). + 1. Return ? Invoke(_rx_, @@match, « _S_ »).

    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.

    @@ -34122,10 +34122,10 @@

    String.prototype.matchAll ( _regexp_ )

    1. If ? ToString(_flags_) does not contain *"g"*, throw a *TypeError* exception. 1. Let _matcher_ be ? GetMethod(_regexp_, @@matchAll). 1. If _matcher_ is not *undefined*, then - 1. Return ? Call(_matcher_, _regexp_, « _O_ »). + 1. Return ? Call(_matcher_, _regexp_, « _O_ »). 1. Let _S_ be ? ToString(_O_). 1. Let _rx_ be ? RegExpCreate(_regexp_, *"g"*). - 1. Return ? Invoke(_rx_, @@matchAll, « _S_ »). + 1. Return ? Invoke(_rx_, @@matchAll, « _S_ »). 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. @@ -34180,7 +34180,7 @@

    1. Let _S_ be ? ToString(_O_). 1. Let _intMaxLength_ be ℝ(? ToLength(_maxLength_)). 1. Let _stringLength_ be the length of _S_. - 1. If _intMaxLength_ ≤ _stringLength_, return _S_. + 1. If _intMaxLength_ ≤ _stringLength_, return _S_. 1. If _fillString_ is *undefined*, let _filler_ be the String value consisting solely of the code unit 0x0020 (SPACE). 1. Else, let _filler_ be ? ToString(_fillString_). 1. If _filler_ is the empty String, return _S_. @@ -34220,7 +34220,7 @@

    String.prototype.repeat ( _count_ )

    1. Let _O_ be ? RequireObjectCoercible(*this* value). 1. Let _S_ be ? ToString(_O_). 1. Let _n_ be ? ToIntegerOrInfinity(_count_). - 1. If _n_ < 0 or _n_ is +∞, throw a *RangeError* exception. + 1. If _n_ < 0 or _n_ is +∞, throw a *RangeError* exception. 1. If _n_ is 0, return the empty String. 1. Return the String value that is made from _n_ copies of _S_ appended together. @@ -34240,7 +34240,7 @@

    String.prototype.replace ( _searchValue_, _replaceValue_ )

    1. If _searchValue_ is neither *undefined* nor *null*, then 1. Let _replacer_ be ? GetMethod(_searchValue_, @@replace). 1. If _replacer_ is not *undefined*, then - 1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »). + 1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »). 1. Let _string_ be ? ToString(_O_). 1. Let _searchString_ be ? ToString(_searchValue_). 1. Let _functionalReplace_ be IsCallable(_replaceValue_). @@ -34252,7 +34252,7 @@

    String.prototype.replace ( _searchValue_, _replaceValue_ )

    1. Let _preceding_ be the substring of _string_ from 0 to _position_. 1. Let _following_ be the substring of _string_ from _position_ + _searchLength_. 1. If _functionalReplace_ is *true*, then - 1. Let _replacement_ be ? ToString(? Call(_replaceValue_, *undefined*, « _searchString_, 𝔽(_position_), _string_ »)). + 1. Let _replacement_ be ? ToString(? Call(_replaceValue_, *undefined*, « _searchString_, 𝔽(_position_), _string_ »)). 1. Else, 1. Assert: _replaceValue_ is a String. 1. Let _captures_ be a new empty List. @@ -34280,7 +34280,7 @@

    1. Let _stringLength_ be the length of _str_. - 1. Assert: _position_ ≤ _stringLength_. + 1. Assert: _position_ ≤ _stringLength_. 1. Let _result_ be the empty String. 1. Let _templateRemainder_ be _replacementTemplate_. 1. Repeat, while _templateRemainder_ is not the empty String, @@ -34305,9 +34305,9 @@

    1. Let _ref_ be the substring of _templateRemainder_ from 0 to 1 + _digitCount_. 1. Let _digits_ be the substring of _templateRemainder_ from 1 to 1 + _digitCount_. 1. Let _index_ be ℝ(StringToNumber(_digits_)). - 1. Assert: 0 ≤ _index_ ≤ 99. + 1. Assert: 0 ≤ _index_ ≤ 99. 1. Let _captureLen_ be the number of elements in _captures_. - 1. If 1 ≤ _index_ ≤ _captureLen_, then + 1. If 1 ≤ _index_ ≤ _captureLen_, then 1. Let _capture_ be _captures_[_index_ - 1]. 1. If _capture_ is *undefined*, then 1. Let _refReplacement_ be the empty String. @@ -34316,7 +34316,7 @@

    1. Else, 1. Let _refReplacement_ be _ref_. 1. Else if _templateRemainder_ starts with *"$<"*, then - 1. Let _gtPos_ be StringIndexOf(_templateRemainder_, *">"*, 0). + 1. Let _gtPos_ be StringIndexOf(_templateRemainder_, *">"*, 0). 1. If _gtPos_ = -1 or _namedCaptures_ is *undefined*, then 1. Let _ref_ be *"$<"*. 1. Let _refReplacement_ be _ref_. @@ -34353,7 +34353,7 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    1. If ? ToString(_flags_) does not contain *"g"*, throw a *TypeError* exception. 1. Let _replacer_ be ? GetMethod(_searchValue_, @@replace). 1. If _replacer_ is not *undefined*, then - 1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »). + 1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »). 1. Let _string_ be ? ToString(_O_). 1. Let _searchString_ be ? ToString(_searchValue_). 1. Let _functionalReplace_ be IsCallable(_replaceValue_). @@ -34371,7 +34371,7 @@

    String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

    1. For each element _p_ of _matchPositions_, do 1. Let _preserved_ be the substring of _string_ from _endOfLastMatch_ to _p_. 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_, 𝔽(_p_), _string_ »)). 1. Else, 1. Assert: _replaceValue_ is a String. 1. Let _captures_ be a new empty List. @@ -34392,10 +34392,10 @@

    String.prototype.search ( _regexp_ )

    1. If _regexp_ is neither *undefined* nor *null*, then 1. Let _searcher_ be ? GetMethod(_regexp_, @@search). 1. If _searcher_ is not *undefined*, then - 1. Return ? Call(_searcher_, _regexp_, « _O_ »). + 1. Return ? Call(_searcher_, _regexp_, « _O_ »). 1. Let _string_ be ? ToString(_O_). 1. Let _rx_ be ? RegExpCreate(_regexp_, *undefined*). - 1. Return ? Invoke(_rx_, @@search, « _string_ »). + 1. Return ? Invoke(_rx_, @@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.

    @@ -34411,14 +34411,14 @@

    String.prototype.slice ( _start_, _end_ )

    1. Let _S_ be ? ToString(_O_). 1. Let _len_ be the length of _S_. 1. Let _intStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _intStart_ is -∞, let _from_ be 0. + 1. If _intStart_ is -∞, let _from_ be 0. 1. Else if _intStart_ < 0, let _from_ be max(_len_ + _intStart_, 0). 1. Else, let _from_ be min(_intStart_, _len_). 1. If _end_ is *undefined*, let _intEnd_ be _len_; else let _intEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _intEnd_ is -∞, let _to_ be 0. + 1. If _intEnd_ is -∞, let _to_ be 0. 1. Else if _intEnd_ < 0, let _to_ be max(_len_ + _intEnd_, 0). 1. Else, let _to_ be min(_intEnd_, _len_). - 1. If _from_ ≥ _to_, return the empty String. + 1. If _from_ ≥ _to_, return the empty String. 1. Return the substring of _S_ from _from_ to _to_. @@ -34435,20 +34435,20 @@

    String.prototype.split ( _separator_, _limit_ )

    1. If _separator_ is neither *undefined* nor *null*, then 1. Let _splitter_ be ? GetMethod(_separator_, @@split). 1. If _splitter_ is not *undefined*, then - 1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »). + 1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »). 1. Let _S_ be ? ToString(_O_). 1. If _limit_ is *undefined*, let _lim_ be 232 - 1; else let _lim_ be ℝ(? ToUint32(_limit_)). 1. Let _R_ be ? ToString(_separator_). 1. If _lim_ = 0, then - 1. Return CreateArrayFromList(« »). + 1. Return CreateArrayFromList(« »). 1. If _separator_ is *undefined*, then - 1. Return CreateArrayFromList(« _S_ »). + 1. Return CreateArrayFromList(« _S_ »). 1. Let _separatorLength_ be the length of _R_. 1. If _separatorLength_ is 0, then 1. Let _head_ be the substring of _S_ from 0 to _lim_. 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 _S_ is the empty String, return CreateArrayFromList(« _S_ »). 1. Let _substrings_ be a new empty List. 1. Let _i_ be 0. 1. Let _j_ be StringIndexOf(_S_, _R_, 0). @@ -34487,7 +34487,7 @@

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

    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. If _end_ > _len_, return *false*. 1. Let _substring_ be the substring of _S_ from _start_ to _end_. 1. If _substring_ is _searchStr_, return *true*. 1. Return *false*. @@ -34622,7 +34622,7 @@

    1. Let _T_ be the String value that is a copy of _S_ with both leading and trailing white space removed. 1. Return _T_. -

    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 .

    +

    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 .

    @@ -34941,7 +34941,7 @@

    Static Semantics: Early Errors

    Pattern :: Disjunction
    • - It is a Syntax Error if CountLeftCapturingParensWithin(|Pattern|) ≥ 232 - 1. + It is a Syntax Error if CountLeftCapturingParensWithin(|Pattern|) ≥ 232 - 1.
    • It is a Syntax Error if |Pattern| contains two or more |GroupSpecifier|s for which CapturingGroupName of |GroupSpecifier| is the same. @@ -35010,7 +35010,7 @@

      Static Semantics: Early Errors

      UnicodePropertyValueExpression :: UnicodePropertyName `=` UnicodePropertyValue
      • - It is a Syntax Error if the source text matched by |UnicodePropertyName| is not a Unicode property name or property alias listed in the “Property name and aliases” column of . + It is a Syntax Error if the source text matched by |UnicodePropertyName| is not a Unicode property name or property alias listed in the “Property name and aliases” column of .
      • It is a Syntax Error if the source text matched by |UnicodePropertyValue| is not a property value or property value alias for the Unicode property or property alias given by the source text matched by |UnicodePropertyName| listed in PropertyValueAliases.txt. @@ -35019,7 +35019,7 @@

        Static Semantics: Early Errors

        UnicodePropertyValueExpression :: LoneUnicodePropertyNameOrValue
        • - It is a Syntax Error if the source text matched by |LoneUnicodePropertyNameOrValue| is not a Unicode property value or property value alias for the General_Category (gc) property listed in PropertyValueAliases.txt, nor a binary property or binary property alias listed in the “Property name and aliases” column of . + It is a Syntax Error if the source text matched by |LoneUnicodePropertyNameOrValue| is not a Unicode property value or property value alias for the General_Category (gc) property listed in PropertyValueAliases.txt, nor a binary property or binary property alias listed in the “Property name and aliases” column of .
        @@ -35077,9 +35077,9 @@

        Static Semantics: CapturingGroupNumber ( ): a positive integer

        DecimalEscape :: NonZeroDigit DecimalDigits 1. Let _n_ be the number of code points in |DecimalDigits|. - 1. Return (the MV of |NonZeroDigit| × 10_n_ plus the MV of |DecimalDigits|). + 1. Return (the MV of |NonZeroDigit| × 10_n_ plus the MV of |DecimalDigits|). -

        The definitions of “the MV of |NonZeroDigit|” and “the MV of |DecimalDigits|” are in .

        +

        The definitions of “the MV of |NonZeroDigit|” and “the MV of |DecimalDigits|” are in .

        @@ -35179,7 +35179,7 @@

        Static Semantics: CharacterValue ( ): a non-negative integer

        CHARACTER TABULATION - <HT> + <HT> @@ -35196,7 +35196,7 @@

        Static Semantics: CharacterValue ( ): a non-negative integer

        LINE FEED (LF) - <LF> + <LF> @@ -35213,7 +35213,7 @@

        Static Semantics: CharacterValue ( ): a non-negative integer

        LINE TABULATION - <VT> + <VT> @@ -35230,7 +35230,7 @@

        Static Semantics: CharacterValue ( ): a non-negative integer

        FORM FEED (FF) - <FF> + <FF> @@ -35247,7 +35247,7 @@

        Static Semantics: CharacterValue ( ): a non-negative integer

        CARRIAGE RETURN (CR) - <CR> + <CR> @@ -35263,7 +35263,7 @@

        Static Semantics: CharacterValue ( ): a non-negative integer

        1. Return the numeric value of U+0000 (NULL). -

        `\\0` represents the <NUL> character and cannot be followed by a decimal digit.

        +

        `\\0` represents the <NUL> character and cannot be followed by a decimal digit.

        CharacterEscape :: HexEscapeSequence @@ -35340,13 +35340,13 @@

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

        RegExpIdentifierName :: RegExpIdentifierStart 1. Let _cp_ be RegExpIdentifierCodePoint of |RegExpIdentifierStart|. - 1. Return « _cp_ ». + 1. Return « _cp_ ». RegExpIdentifierName :: RegExpIdentifierName RegExpIdentifierPart 1. Let _cps_ be RegExpIdentifierCodePoints of the derived |RegExpIdentifierName|. 1. Let _cp_ be RegExpIdentifierCodePoint of |RegExpIdentifierPart|. - 1. Return the list-concatenation of _cps_ and « _cp_ ». + 1. Return the list-concatenation of _cps_ and « _cp_ ».
        @@ -35386,7 +35386,7 @@

        Static Semantics: RegExpIdentifierCodePoint ( ): a code point

        Pattern Semantics

        A regular expression pattern is converted into an Abstract Closure using the process described below. An implementation is encouraged to use more efficient algorithms than the ones listed below, as long as the results are the same. The Abstract Closure is used as the value of a RegExp object's [[RegExpMatcher]] internal slot.

        -

        A |Pattern| is either a BMP pattern or a Unicode pattern depending upon whether or not its associated flags contain a `u`. A BMP pattern matches against a String interpreted as consisting of a sequence of 16-bit values that are Unicode code points in the range of the Basic Multilingual Plane. A Unicode pattern matches against a String interpreted as consisting of Unicode code points encoded using UTF-16. In the context of describing the behaviour of a BMP pattern “character” means a single 16-bit Unicode BMP code point. In the context of describing the behaviour of a Unicode pattern “character” means a UTF-16 encoded code point (). In either context, “character value” means the numeric value of the corresponding non-encoded code point.

        +

        A |Pattern| is either a BMP pattern or a Unicode pattern depending upon whether or not its associated flags contain a `u`. A BMP pattern matches against a String interpreted as consisting of a sequence of 16-bit values that are Unicode code points in the range of the Basic Multilingual Plane. A Unicode pattern matches against a String interpreted as consisting of Unicode code points encoded using UTF-16. In the context of describing the behaviour of a BMP pattern “character” means a single 16-bit Unicode BMP code point. In the context of describing the behaviour of a Unicode pattern “character” means a UTF-16 encoded code point (). In either context, “character value” means the numeric value of the corresponding non-encoded code point.

        The syntax and semantics of |Pattern| is defined as if the source text for the |Pattern| was a List of |SourceCharacter| values where each |SourceCharacter| corresponds to a Unicode code point. If a BMP pattern contains a non-BMP |SourceCharacter| the entire pattern is encoded using UTF-16 and the individual code units of that encoding are used as the elements of the List.

        For example, consider a pattern expressed in source text as the single non-BMP character U+1D11E (MUSICAL SYMBOL G CLEF). Interpreted as a Unicode pattern, it would be a single element (character) List consisting of the single code point U+1D11E. However, interpreted as a BMP pattern, it is first UTF-16 encoded to produce a two element List consisting of the code units 0xD834 and 0xDD1E.

        @@ -35399,10 +35399,10 @@

        Notation

        The descriptions below use the following internal data structures:

        • - A CharSet is a mathematical set of characters. In the context of a Unicode pattern, “all characters” means the CharSet containing all code point values; otherwise “all characters” means the CharSet containing all code unit values. + A CharSet is a mathematical set of characters. In the context of a Unicode pattern, “all characters” means the CharSet containing all code point values; otherwise “all characters” means the CharSet containing all code unit values.
        • - A CaptureRange is an ordered pair (_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 an ordered pair (_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 MatchState is an ordered triple (_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. States 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 States may be in use at any time during the matching process. @@ -35414,7 +35414,7 @@

          Notation

          A MatcherContinuation is an Abstract Closure that takes one MatchState argument and returns a MatchResult result. 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 Matcher is an Abstract Closure that takes two arguments—a MatchState and a MatcherContinuation—and returns a MatchResult result. 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. + A Matcher is an Abstract Closure that takes two arguments—a MatchState and a MatcherContinuation—and returns a MatchResult result. 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.
        @@ -35472,7 +35472,7 @@

        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: _index_ is a non-negative integer which is ≤ the number of elements in _Input_. + 1. Assert: _index_ is a non-negative integer which is ≤ 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_. @@ -35572,7 +35572,7 @@

        1. Let _m_ be CompileAtom of |Atom| with arguments _rer_ and _direction_. 1. Let _q_ be CompileQuantifier of |Quantifier|. - 1. Assert: _q_.[[Min]] ≤ _q_.[[Max]]. + 1. Assert: _q_.[[Min]] ≤ _q_.[[Max]]. 1. Let _parenIndex_ be CountLeftCapturingParensBefore(|Term|). 1. Let _parenCount_ be CountLeftCapturingParensWithin(|Atom|). 1. Return a new Matcher with parameters (_x_, _c_) that captures _m_, _q_, _parenIndex_, and _parenCount_ and performs the following steps when called: @@ -35602,14 +35602,14 @@

        1. Assert: _y_ is a MatchState. 1. [id="step-repeatmatcher-done"] If _min_ = 0 and _y_'s _endIndex_ = _x_'s _endIndex_, return ~failure~. 1. If _min_ = 0, let _min2_ be 0; otherwise let _min2_ be _min_ - 1. - 1. If _max_ is +∞, let _max2_ be +∞; otherwise let _max2_ be _max_ - 1. + 1. If _max_ is +∞, let _max2_ be +∞; otherwise let _max2_ be _max_ - 1. 1. Return RepeatMatcher(_m_, _min2_, _max2_, _greedy_, _y_, _c_, _parenIndex_, _parenCount_). 1. Let _cap_ be a copy of _x_'s _captures_ List. 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_'s _input_. 1. Let _e_ be _x_'s _endIndex_. 1. Let _xr_ be the MatchState (_Input_, _e_, _cap_). - 1. If _min_ ≠ 0, return _m_(_xr_, _d_). + 1. If _min_ ≠ 0, return _m_(_xr_, _d_). 1. If _greedy_ is *false*, then 1. Let _z_ be _c_(_x_). 1. If _z_ is not ~failure~, return _z_. @@ -35827,11 +35827,11 @@

        Runtime Semantics: CompileQuantifierPrefix ( ): a Record with fields [[Min]] QuantifierPrefix :: `*` - 1. Return the Record { [[Min]]: 0, [[Max]]: +∞ }. + 1. Return the Record { [[Min]]: 0, [[Max]]: +∞ }. QuantifierPrefix :: `+` - 1. Return the Record { [[Min]]: 1, [[Max]]: +∞ }. + 1. Return the Record { [[Min]]: 1, [[Max]]: +∞ }. QuantifierPrefix :: `?` @@ -35845,7 +35845,7 @@

        Runtime Semantics: CompileQuantifierPrefix ( ): a Record with fields [[Min]] QuantifierPrefix :: `{` DecimalDigits `,` `}` 1. Let _i_ be the MV of |DecimalDigits|. - 1. Return the Record { [[Min]]: _i_, [[Max]]: +∞ }. + 1. Return the Record { [[Min]]: _i_, [[Max]]: +∞ }. QuantifierPrefix :: `{` DecimalDigits `,` DecimalDigits `}` @@ -35901,11 +35901,11 @@

        1. Let _xe_ be _x_'s _endIndex_. 1. Let _ye_ be _y_'s _endIndex_. 1. If _direction_ is ~forward~, then - 1. Assert: _xe_ ≤ _ye_. + 1. Assert: _xe_ ≤ _ye_. 1. Let _r_ be the CaptureRange (_xe_, _ye_). 1. Else, 1. Assert: _direction_ is ~backward~. - 1. Assert: _ye_ ≤ _xe_. + 1. Assert: _ye_ ≤ _xe_. 1. Let _r_ be the CaptureRange (_ye_, _xe_). 1. Set _cap_[_parenIndex_ + 1] to _r_. 1. Let _z_ be the MatchState (_Input_, _ye_, _cap_). @@ -35921,7 +35921,7 @@

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

        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. 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_). @@ -35992,7 +35992,7 @@

        - 1. Assert: _n_ ≥ 1. + 1. Assert: _n_ ≥ 1. 1. Return a new Matcher with parameters (_x_, _c_) that captures _rer_, _n_, and _direction_ and performs the following steps when called: 1. Assert: _x_ is a MatchState. 1. Assert: _c_ is a MatcherContinuation. @@ -36007,7 +36007,7 @@

        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. 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 the same character value as Canonicalize(_rer_, _Input_[_g_ + _i_]), return ~failure~. 1. Let _y_ be the MatchState (_Input_, _f_, _cap_). @@ -36031,11 +36031,11 @@

        1. If _rer_.[[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 that of _ch_. - 1. Let _u_ be the result of toUppercase(« _cp_ »), according to the Unicode Default Case Conversion algorithm. + 1. Let _u_ be the result of toUppercase(« _cp_ »), according to the Unicode Default Case Conversion algorithm. 1. Let _uStr_ be CodePointsToString(_u_). 1. If _uStr_ does not consist of a single code unit, return _ch_. 1. Let _cu_ be _uStr_'s single code unit element. - 1. If the numeric value of _ch_ ≥ 128 and the numeric value of _cu_ < 128, return _ch_. + 1. If the numeric value of _ch_ ≥ 128 and the numeric value of _cu_ < 128, return _ch_. 1. Return _cu_. @@ -36061,7 +36061,7 @@

        ["baaabaac", "ba", undefined, "abaac"]
        -

        In case-insignificant matches when _rer_.[[Unicode]] 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) to `SS`. It may however map a code point outside the Basic Latin block to a character within, for example, `ſ` (U+017F) to `s`. Such characters are not mapped if _rer_.[[Unicode]] is *false*. This prevents Unicode code points such as U+017F and U+212A from matching regular expressions such as `/[a-z]/i`, but they will match `/[a-z]/ui`.

        +

        In case-insignificant matches when _rer_.[[Unicode]] 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) to `SS`. It may however map a code point outside the Basic Latin block to a character within, for example, `ſ` (U+017F) to `s`. Such characters are not mapped if _rer_.[[Unicode]] is *false*. This prevents Unicode code points such as U+017F and U+212A from matching regular expressions such as `/[a-z]/i`, but they will match `/[a-z]/ui`.

        @@ -36210,7 +36210,7 @@

        1. Let _ps_ be the source text matched by |UnicodePropertyName|. 1. Let _p_ be UnicodeMatchProperty(_ps_). - 1. Assert: _p_ is a Unicode property name or property alias listed in the “Property name and aliases” column of . + 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. Return the CharSet containing all Unicode code points whose character database definition includes the property _p_ with value _v_. @@ -36219,10 +36219,10 @@

        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. 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(_s_). - 1. Assert: _p_ is a binary Unicode property or binary property alias listed in the “Property name and aliases” column of . - 1. Return the CharSet containing all Unicode code points whose character database definition includes the property _p_ with value “True”. + 1. Assert: _p_ is a binary Unicode property or binary property alias listed in the “Property name and aliases” column of . + 1. Return the CharSet containing all Unicode code points whose character database definition includes the property _p_ with value “True”. @@ -36240,7 +36240,7 @@

        1. Let _b_ be the one character in CharSet _B_. 1. Let _i_ be the character value of character _a_. 1. Let _j_ be the character value of character _b_. - 1. Assert: _i_ ≤ _j_. + 1. Assert: _i_ ≤ _j_. 1. Return the CharSet containing all characters with a character value greater than or equal to _i_ and less than or equal to _j_. @@ -36272,8 +36272,8 @@

        - 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. + 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. 1. Return the List of Unicode code points _c_.

        Implementations must support the Unicode property names and aliases listed in and . To ensure interoperability, implementations must not support any other property names or aliases.

        @@ -36300,9 +36300,9 @@

        - 1. Assert: _p_ is a canonical, unaliased Unicode property name listed in the “Canonical property name” column of . + 1. Assert: _p_ is a canonical, unaliased Unicode property name listed in the “Canonical property name” column of . 1. Assert: _v_ is a property value or property value alias for the Unicode property _p_ listed in PropertyValueAliases.txt. - 1. Let _value_ be the canonical property value of _v_ as given in the “Canonical property value” column of the corresponding row. + 1. Let _value_ be the canonical property value of _v_ as given in the “Canonical property value” column of the corresponding row. 1. Return the List of Unicode code points _value_.

        Implementations must support the Unicode property values and property value aliases listed in PropertyValueAliases.txt for the properties listed in . To ensure interoperability, implementations must not support any other property values or property value aliases.

        @@ -36343,7 +36343,7 @@

        - 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%RegExp.prototype%"*, « [[OriginalSource]], [[OriginalFlags]], [[RegExpRecord]], [[RegExpMatcher]] »). + 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%RegExp.prototype%"*, « [[OriginalSource]], [[OriginalFlags]], [[RegExpRecord]], [[RegExpMatcher]] »). 1. Perform ! DefinePropertyOrThrow(_obj_, *"lastIndex"*, PropertyDescriptor { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Return _obj_. @@ -36414,7 +36414,7 @@

        The RegExp Constructor

        • is %RegExp%.
        • is the initial value of the *"RegExp"* property of the global object.
        • -
        • creates and initializes a new RegExp object when called as a function rather than as a constructor. Thus the function call `RegExp(…)` is equivalent to the object creation expression `new RegExp(…)` with the same arguments.
        • +
        • creates and initializes a new RegExp object when called as a function rather than as a constructor. Thus the function call `RegExp(…)` is equivalent to the object creation expression `new RegExp(…)` with the same arguments.
        • may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified RegExp behaviour must include a `super` call to the RegExp constructor to create and initialize subclass instances with the necessary internal slots.
        @@ -36636,7 +36636,7 @@

        RegExp.prototype [ @@matchAll ] ( _string_ )

        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 _matcher_ be ? Construct(_C_, « _R_, _flags_ »). 1. Let _lastIndex_ be ? ToLength(? Get(_R_, *"lastIndex"*)). 1. Perform ? Set(_matcher_, *"lastIndex"*, _lastIndex_, *true*). 1. If _flags_ contains *"g"*, let _global_ be *true*. @@ -36699,7 +36699,7 @@

        RegExp.prototype [ @@replace ] ( _string_, _replaceValue_ )

        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. Repeat, while _n_ ≤ _nCaptures_, 1. Let _capN_ be ? Get(_result_, ! ToString(𝔽(_n_))). 1. If _capN_ is not *undefined*, then 1. Set _capN_ to ? ToString(_capN_). @@ -36708,7 +36708,7 @@

        RegExp.prototype [ @@replace ] ( _string_, _replaceValue_ )

        1. Set _n_ to _n_ + 1. 1. Let _namedCaptures_ be ? Get(_result_, *"groups"*). 1. If _functionalReplace_ is *true*, then - 1. Let _replacerArgs_ be « _matched_ ». + 1. Let _replacerArgs_ be « _matched_ ». 1. Append in List order the elements of _captures_ to the end of the List _replacerArgs_. 1. Append 𝔽(_position_) and _S_ to _replacerArgs_. 1. If _namedCaptures_ is not *undefined*, then @@ -36719,11 +36719,11 @@

        RegExp.prototype [ @@replace ] ( _string_, _replaceValue_ )

        1. If _namedCaptures_ is not *undefined*, then 1. Set _namedCaptures_ to ? ToObject(_namedCaptures_). 1. Let _replacement_ be ? GetSubstitution(_matched_, _S_, _position_, _captures_, _namedCaptures_, _replaceValue_). - 1. If _position_ ≥ _nextSourcePosition_, then + 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 _replacement_. 1. Set _nextSourcePosition_ to _position_ + _matchLength_. - 1. If _nextSourcePosition_ ≥ _lengthS_, return _accumulatedResult_. + 1. If _nextSourcePosition_ ≥ _lengthS_, return _accumulatedResult_. 1. Return the string-concatenation of _accumulatedResult_ and the substring of _S_ from _nextSourcePosition_.

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

        @@ -36807,7 +36807,7 @@

        RegExp.prototype [ @@split ] ( _string_, _limit_ )

        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 _splitter_ be ? Construct(_C_, « _rx_, _newFlags_ »). 1. Let _A_ be ! ArrayCreate(0). 1. Let _lengthA_ be 0. 1. If _limit_ is *undefined*, let _lim_ be 232 - 1; else let _lim_ be ℝ(? ToUint32(_limit_)). @@ -36837,7 +36837,7 @@

        RegExp.prototype [ @@split ] ( _string_, _limit_ )

        1. Let _numberOfCaptures_ be ? LengthOfArrayLike(_z_). 1. Set _numberOfCaptures_ to max(_numberOfCaptures_ - 1, 0). 1. Let _i_ be 1. - 1. Repeat, while _i_ ≤ _numberOfCaptures_, + 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. @@ -36917,7 +36917,7 @@

        1. Let _exec_ be ? Get(_R_, *"exec"*). 1. If IsCallable(_exec_) is *true*, then - 1. Let _result_ be ? Call(_exec_, _R_, « _S_ »). + 1. Let _result_ be ? Call(_exec_, _R_, « _S_ »). 1. If _result_ is not an Object and _result_ is not *null*, throw a *TypeError* exception. 1. Return _result_. 1. Perform ? RequireInternalSlot(_R_, [[RegExpMatcher]]). @@ -36951,7 +36951,7 @@

        1. If _fullUnicode_ is *true*, let _input_ be StringToCodePoints(_S_). Otherwise, let _input_ be a List whose elements are the code units that are the elements of _S_. 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 _lastIndex_ > _length_, then 1. If _global_ is *true* or _sticky_ is *true*, then 1. Perform ? Set(_R_, *"lastIndex"*, *+0*𝔽, *true*). 1. Return *null*. @@ -36989,7 +36989,7 @@

        1. Let _groups_ be *undefined*. 1. Let _hasGroups_ be *false*. 1. Perform ! CreateDataPropertyOrThrow(_A_, *"groups"*, _groups_). - 1. For each integer _i_ such that 1 ≤ _i_ ≤ _n_, in ascending order, do + 1. For each integer _i_ such that 1 ≤ _i_ ≤ _n_, in ascending order, do 1. Let _captureI_ be _i_th element of _r_'s _captures_ List. 1. If _captureI_ is *undefined*, then 1. Let _capturedValue_ be *undefined*. @@ -37028,10 +37028,10 @@

        - 1. Assert: _index_ ≤ 253 - 1. + 1. Assert: _index_ ≤ 253 - 1. 1. If _unicode_ is *false*, return _index_ + 1. 1. Let _length_ be the length of _S_. - 1. If _index_ + 1 ≥ _length_, return _index_ + 1. + 1. If _index_ + 1 ≥ _length_, return _index_ + 1. 1. Let _cp_ be CodePointAt(_S_, _index_). 1. Return _index_ + _cp_.[[CodeUnitCount]]. @@ -37080,7 +37080,7 @@

        Match Records

        [[EndIndex]] - an integer ≥ [[StartIndex]] + an integer ≥ [[StartIndex]] The number of code units from the start of a string at which the match ends (exclusive). @@ -37115,7 +37115,7 @@

        1. Assert: _match_.[[StartIndex]] is a non-negative integer less than or equal to the length of _S_. 1. Assert: _match_.[[EndIndex]] is an integer in the inclusive interval from _match_.[[StartIndex]] to the length of _S_. - 1. Return CreateArrayFromList(« 𝔽(_match_.[[StartIndex]]), 𝔽(_match_.[[EndIndex]]) »). + 1. Return CreateArrayFromList(« 𝔽(_match_.[[StartIndex]]), 𝔽(_match_.[[EndIndex]]) »). @@ -37141,14 +37141,14 @@

        1. Else, 1. Let _groups_ be *undefined*. 1. Perform ! CreateDataPropertyOrThrow(_A_, *"groups"*, _groups_). - 1. For each integer _i_ such that 0 ≤ _i_ < _n_, in ascending order, do + 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. Else, 1. Let _matchIndexPair_ be *undefined*. 1. Perform ! CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_i_)), _matchIndexPair_). - 1. If _i_ > 0 and _groupNames_[_i_ - 1] is not *undefined*, then + 1. If _i_ > 0 and _groupNames_[_i_ - 1] is not *undefined*, then 1. Assert: _groups_ is not *undefined*. 1. Perform ! CreateDataPropertyOrThrow(_groups_, _groupNames_[_i_ - 1], _matchIndexPair_). 1. Return _A_. @@ -37244,7 +37244,7 @@

        The Array Constructor

      • is %Array%.
      • is the initial value of the *"Array"* property of the global object.
      • creates and initializes a new Array when called as a constructor.
      • -
      • also creates and initializes a new Array when called as a function rather than as a constructor. Thus the function call `Array(…)` is equivalent to the object creation expression `new Array(…)` with the same arguments.
      • +
      • also creates and initializes a new Array when called as a function rather than as a constructor. Thus the function call `Array(…)` is equivalent to the object creation expression `new Array(…)` with the same arguments.
      • is a function whose behaviour differs based upon the number and types of its arguments.
      • may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the exotic Array behaviour must include a `super` call to the Array constructor to initialize subclass instances that are Array exotic objects. However, most of the `Array.prototype` methods are generic methods that are not dependent upon their *this* value being an Array exotic object.
      • has a *"length"* property whose value is *1*𝔽.
      • @@ -37271,7 +37271,7 @@

        Array ( ..._values_ )

        1. Perform ! Set(_array_, *"length"*, _intLen_, *true*). 1. Return _array_. 1. Else, - 1. Assert: _numberOfArgs_ ≥ 2. + 1. Assert: _numberOfArgs_ ≥ 2. 1. Let _array_ be ? ArrayCreate(_numberOfArgs_, _proto_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _numberOfArgs_, @@ -37311,7 +37311,7 @@

        Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )

        1. Let _iteratorRecord_ be ? GetIterator(_items_, ~sync~, _usingIterator_). 1. Let _k_ be 0. 1. Repeat, - 1. If _k_ ≥ 253 - 1, then + 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_)). @@ -37321,7 +37321,7 @@

        Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )

        1. Return _A_. 1. Let _nextValue_ be ? IteratorValue(_next_). 1. If _mapping_ is *true*, then - 1. Let _mappedValue_ be Completion(Call(_mapfn_, _thisArg_, « _nextValue_, 𝔽(_k_) »)). + 1. Let _mappedValue_ be Completion(Call(_mapfn_, _thisArg_, « _nextValue_, 𝔽(_k_) »)). 1. IfAbruptCloseIterator(_mappedValue_, _iteratorRecord_). 1. Else, let _mappedValue_ be _nextValue_. 1. Let _defineStatus_ be Completion(CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_)). @@ -37331,7 +37331,7 @@

        Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )

        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. Let _A_ be ? Construct(_C_, « 𝔽(_len_) »). 1. Else, 1. Let _A_ be ? ArrayCreate(_len_). 1. Let _k_ be 0. @@ -37339,7 +37339,7 @@

        Array.from ( _items_ [ , _mapfn_ [ , _thisArg_ ] ] )

        1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_arrayLike_, _Pk_). 1. If _mapping_ is *true*, then - 1. Let _mappedValue_ be ? Call(_mapfn_, _thisArg_, « _kValue_, 𝔽(_k_) »). + 1. Let _mappedValue_ be ? Call(_mapfn_, _thisArg_, « _kValue_, 𝔽(_k_) »). 1. Else, let _mappedValue_ be _kValue_. 1. Perform ? CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_). 1. Set _k_ to _k_ + 1. @@ -37367,7 +37367,7 @@

        Array.of ( ..._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 _A_ be ? Construct(_C_, « _lenNumber_ »). 1. Else, 1. Let _A_ be ? ArrayCreate(_len_). 1. Let _k_ be 0. @@ -37422,11 +37422,11 @@

        Array.prototype.at ( _index_ )

        1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). - 1. If _relativeIndex_ ≥ 0, then + 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. If _k_ < 0 or _k_ ≥ _len_, return *undefined*. 1. Return ? Get(_O_, ! ToString(𝔽(_k_))).
        @@ -37444,7 +37444,7 @@

        Array.prototype.concat ( ..._items_ )

        1. Let _spreadable_ be ? IsConcatSpreadable(_E_). 1. If _spreadable_ is *true*, then 1. Let _len_ be ? LengthOfArrayLike(_E_). - 1. If _n_ + _len_ > 253 - 1, throw a *TypeError* exception. + 1. If _n_ + _len_ > 253 - 1, throw a *TypeError* exception. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _P_ be ! ToString(𝔽(_k_)). @@ -37456,7 +37456,7 @@

        Array.prototype.concat ( ..._items_ )

        1. Set _k_ to _k_ + 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. 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*). @@ -37505,15 +37505,15 @@

        Array.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

        1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _relativeTarget_ be ? ToIntegerOrInfinity(_target_). - 1. If _relativeTarget_ is -∞, let _to_ be 0. + 1. If _relativeTarget_ is -∞, let _to_ be 0. 1. Else if _relativeTarget_ < 0, let _to_ be max(_len_ + _relativeTarget_, 0). 1. Else, let _to_ be min(_relativeTarget_, _len_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _from_ be 0. + 1. If _relativeStart_ is -∞, let _from_ be 0. 1. Else if _relativeStart_ < 0, let _from_ be max(_len_ + _relativeStart_, 0). 1. Else, let _from_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Let _count_ be min(_final_ - _from_, _len_ - _to_). @@ -37523,7 +37523,7 @@

        Array.prototype.copyWithin ( _target_, _start_ [ , _end_ ] )

        1. Set _to_ to _to_ + _count_ - 1. 1. Else, 1. Let _direction_ be 1. - 1. Repeat, while _count_ > 0, + 1. Repeat, while _count_ > 0, 1. Let _fromKey_ be ! ToString(𝔽(_from_)). 1. Let _toKey_ be ! ToString(𝔽(_to_)). 1. Let _fromPresent_ be ? HasProperty(_O_, _fromKey_). @@ -37572,7 +37572,7 @@

        Array.prototype.every ( _callbackfn_ [ , _thisArg_ ] )

        1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *false*, return *false*. 1. Set _k_ to _k_ + 1. 1. Return *true*. @@ -37596,11 +37596,11 @@

        Array.prototype.fill ( _value_ [ , _start_ [ , _end_ ] ] )

        1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _k_ be 0. + 1. If _relativeStart_ is -∞, let _k_ be 0. 1. Else if _relativeStart_ < 0, let _k_ be max(_len_ + _relativeStart_, 0). 1. Else, let _k_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Repeat, while _k_ < _final_, @@ -37636,7 +37636,7 @@

        Array.prototype.filter ( _callbackfn_ [ , _thisArg_ ] )

        1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _selected_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _selected_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _selected_ is *true*, then 1. Perform ? CreateDataPropertyOrThrow(_A_, ! ToString(𝔽(_to_)), _kValue_). 1. Set _to_ to _to_ + 1. @@ -37666,7 +37666,7 @@

        Array.prototype.find ( _predicate_ [ , _thisArg_ ] )

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return _kValue_. 1. Set _k_ to _k_ + 1. 1. Return *undefined*. @@ -37694,7 +37694,7 @@

        Array.prototype.findIndex ( _predicate_ [ , _thisArg_ ] )

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return 𝔽(_k_). 1. Set _k_ to _k_ + 1. 1. Return *-1*𝔽. @@ -37719,10 +37719,10 @@

        Array.prototype.findLast ( _predicate_ [ , _thisArg_ ] )

        1. Let _len_ be ? LengthOfArrayLike(_O_). 1. If IsCallable(_predicate_) is *false*, throw a *TypeError* exception. 1. Let _k_ be _len_ - 1. - 1. Repeat, while _k_ ≥ 0, + 1. Repeat, while _k_ ≥ 0, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return _kValue_. 1. Set _k_ to _k_ - 1. 1. Return *undefined*. @@ -37747,10 +37747,10 @@

        Array.prototype.findLastIndex ( _predicate_ [ , _thisArg_ ] )

        1. Let _len_ be ? LengthOfArrayLike(_O_). 1. If IsCallable(_predicate_) is *false*, throw a *TypeError* exception. 1. Let _k_ be _len_ - 1. - 1. Repeat, while _k_ ≥ 0, + 1. Repeat, while _k_ ≥ 0, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return 𝔽(_k_). 1. Set _k_ to _k_ - 1. 1. Return *-1*𝔽. @@ -37799,17 +37799,17 @@

        1. If _exists_ is *true*, then 1. Let _element_ be ? Get(_source_, _P_). 1. If _mapperFunction_ is present, then - 1. Set _element_ to ? Call(_mapperFunction_, _thisArg_, « _element_, _sourceIndex_, _source_ »). + 1. Set _element_ to ? Call(_mapperFunction_, _thisArg_, « _element_, _sourceIndex_, _source_ »). 1. Let _shouldFlatten_ be *false*. - 1. If _depth_ > 0, then + 1. If _depth_ > 0, then 1. Set _shouldFlatten_ to ? IsArray(_element_). 1. If _shouldFlatten_ is *true*, then - 1. If _depth_ is +∞, let _newDepth_ be +∞. + 1. If _depth_ is +∞, let _newDepth_ be +∞. 1. Else, let _newDepth_ be _depth_ - 1. 1. Let _elementLen_ be ? LengthOfArrayLike(_element_). 1. Set _targetIndex_ to ? FlattenIntoArray(_target_, _element_, _elementLen_, _targetIndex_, _newDepth_). 1. Else, - 1. If _targetIndex_ ≥ 253 - 1, throw a *TypeError* exception. + 1. If _targetIndex_ ≥ 253 - 1, throw a *TypeError* exception. 1. Perform ? CreateDataPropertyOrThrow(_target_, ! ToString(𝔽(_targetIndex_)), _element_). 1. Set _targetIndex_ to _targetIndex_ + 1. 1. Set _sourceIndex_ to _sourceIndex_ + *1*𝔽. @@ -37851,7 +37851,7 @@

        Array.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )

        1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Perform ? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). + 1. Perform ? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). 1. Set _k_ to _k_ + 1. 1. Return *undefined*. @@ -37873,9 +37873,9 @@

        Array.prototype.includes ( _searchElement_ [ , _fromIndex_ ] )

        1. If _len_ is 0, return *false*. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. - 1. If _n_ is +∞, return *false*. - 1. Else if _n_ is -∞, set _n_ to 0. - 1. If _n_ ≥ 0, then + 1. If _n_ is +∞, return *false*. + 1. Else if _n_ is -∞, set _n_ to 0. + 1. If _n_ ≥ 0, then 1. Let _k_ be _n_. 1. Else, 1. Let _k_ be _len_ + _n_. @@ -37907,9 +37907,9 @@

        Array.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )

        1. If _len_ is 0, return *-1*𝔽. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. - 1. If _n_ is +∞, return *-1*𝔽. - 1. Else if _n_ is -∞, set _n_ to 0. - 1. If _n_ ≥ 0, then + 1. If _n_ is +∞, return *-1*𝔽. + 1. Else if _n_ is -∞, set _n_ to 0. + 1. If _n_ ≥ 0, then 1. Let _k_ be _n_. 1. Else, 1. Let _k_ be _len_ + _n_. @@ -37940,7 +37940,7 @@

        Array.prototype.join ( _separator_ )

        1. Let _R_ 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. If _k_ > 0, set _R_ to the string-concatenation of _R_ and _sep_. 1. Let _element_ be ? Get(_O_, ! ToString(𝔽(_k_))). 1. If _element_ is *undefined* or *null*, let _next_ be the empty String; otherwise, let _next_ be ? ToString(_element_). 1. Set _R_ to the string-concatenation of _R_ and _next_. @@ -37973,12 +37973,12 @@

        Array.prototype.lastIndexOf ( _searchElement_ [ , _fromIndex_ ] )

        1. Let _len_ be ? LengthOfArrayLike(_O_). 1. If _len_ is 0, return *-1*𝔽. 1. If _fromIndex_ is present, let _n_ be ? ToIntegerOrInfinity(_fromIndex_); else let _n_ be _len_ - 1. - 1. If _n_ is -∞, return *-1*𝔽. - 1. If _n_ ≥ 0, then + 1. If _n_ is -∞, return *-1*𝔽. + 1. If _n_ ≥ 0, then 1. Let _k_ be min(_n_, _len_ - 1). 1. Else, 1. Let _k_ be _len_ + _n_. - 1. Repeat, while _k_ ≥ 0, + 1. Repeat, while _k_ ≥ 0, 1. Let _kPresent_ be ? HasProperty(_O_, ! ToString(𝔽(_k_))). 1. If _kPresent_ is *true*, then 1. Let _elementK_ be ? Get(_O_, ! ToString(𝔽(_k_))). @@ -38013,7 +38013,7 @@

        Array.prototype.map ( _callbackfn_ [ , _thisArg_ ] )

        1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _mappedValue_ be ? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). + 1. Let _mappedValue_ be ? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). 1. Perform ? CreateDataPropertyOrThrow(_A_, _Pk_, _mappedValue_). 1. Set _k_ to _k_ + 1. 1. Return _A_. @@ -38036,7 +38036,7 @@

        Array.prototype.pop ( )

        1. Perform ? Set(_O_, *"length"*, *+0*𝔽, *true*). 1. Return *undefined*. 1. Else, - 1. Assert: _len_ > 0. + 1. Assert: _len_ > 0. 1. Let _newLen_ be 𝔽(_len_ - 1). 1. Let _index_ be ! ToString(_newLen_). 1. Let _element_ be ? Get(_O_, _index_). @@ -38059,7 +38059,7 @@

        Array.prototype.push ( ..._items_ )

        1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _argCount_ be the number of elements in _items_. - 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. + 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. Set _len_ to _len_ + 1. @@ -38104,7 +38104,7 @@

        Array.prototype.reduce ( _callbackfn_ [ , _initialValue_ ] )

        1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Set _accumulator_ to ? Call(_callbackfn_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). + 1. Set _accumulator_ to ? Call(_callbackfn_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). 1. Set _k_ to _k_ + 1. 1. Return _accumulator_. @@ -38133,19 +38133,19 @@

        Array.prototype.reduceRight ( _callbackfn_ [ , _initialValue_ ] )

        1. Set _accumulator_ to _initialValue_. 1. Else, 1. Let _kPresent_ be *false*. - 1. Repeat, while _kPresent_ is *false* and _k_ ≥ 0, + 1. Repeat, while _kPresent_ is *false* and _k_ ≥ 0, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Set _kPresent_ to ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Set _accumulator_ to ? Get(_O_, _Pk_). 1. Set _k_ to _k_ - 1. 1. If _kPresent_ is *false*, throw a *TypeError* exception. - 1. Repeat, while _k_ ≥ 0, + 1. Repeat, while _k_ ≥ 0, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Set _accumulator_ to ? Call(_callbackfn_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). + 1. Set _accumulator_ to ? Call(_callbackfn_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). 1. Set _k_ to _k_ - 1. 1. Return _accumulator_. @@ -38165,7 +38165,7 @@

        Array.prototype.reverse ( )

        1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _middle_ be floor(_len_ / 2). 1. Let _lower_ be 0. - 1. Repeat, while _lower_ ≠ _middle_, + 1. Repeat, while _lower_ ≠ _middle_, 1. Let _upper_ be _len_ - _lower_ - 1. 1. Let _upperP_ be ! ToString(𝔽(_upper_)). 1. Let _lowerP_ be ! ToString(𝔽(_lower_)). @@ -38235,11 +38235,11 @@

        Array.prototype.slice ( _start_, _end_ )

        1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _k_ be 0. + 1. If _relativeStart_ is -∞, let _k_ be 0. 1. Else if _relativeStart_ < 0, let _k_ be max(_len_ + _relativeStart_, 0). 1. Else, let _k_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Let _count_ be max(_final_ - _k_, 0). @@ -38284,7 +38284,7 @@

        Array.prototype.some ( _callbackfn_ [ , _thisArg_ ] )

        1. Let _kPresent_ be ? HasProperty(_O_, _Pk_). 1. If _kPresent_ is *true*, then 1. Let _kValue_ be ? Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return *true*. 1. Set _k_ to _k_ + 1. 1. Return *false*. @@ -38296,7 +38296,7 @@

        Array.prototype.some ( _callbackfn_ [ , _thisArg_ ] )

        Array.prototype.sort ( _comparefn_ )

        -

        This method sorts the elements of this array. The sort must be stable (that is, elements that compare equal must remain in their original order). If _comparefn_ is not *undefined*, it should be a function that accepts two arguments _x_ and _y_ and returns a negative Number if _x_ < _y_, a positive Number if _x_ > _y_, or a zero otherwise.

        +

        This method sorts the elements of this array. The sort must be stable (that is, elements that compare equal must remain in their original order). If _comparefn_ is not *undefined*, it should be a function that accepts two arguments _x_ and _y_ and returns a negative Number if _x_ < _y_, a positive Number if _x_ > _y_, or a zero otherwise.

        It performs the following steps when called:

        1. [id="step-array-sort-comparefn"] If _comparefn_ is not *undefined* and IsCallable(_comparefn_) is *false*, throw a *TypeError* exception. @@ -38307,7 +38307,7 @@

        Array.prototype.sort ( _comparefn_ )

        1. If _x_ is *undefined*, return *1*𝔽. 1. If _y_ is *undefined*, return *-1*𝔽. 1. If _comparefn_ is not *undefined*, then - 1. Let _v_ be ? ToNumber(? Call(_comparefn_, *undefined*, « _x_, _y_ »)). + 1. Let _v_ be ? ToNumber(? Call(_comparefn_, *undefined*, « _x_, _y_ »)). 1. If _v_ is *NaN*, return *+0*𝔽. 1. Return _v_. 1. [id="step-sortcompare-tostring-x"] Let _xString_ be ? ToString(_x_). @@ -38364,17 +38364,17 @@

        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_)]. + 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_).

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

        • - 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_. + 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_.
        • Calling _comparator_(_a_, _b_) does not modify _obj_ or any object on _obj_'s prototype chain. @@ -38392,7 +38392,7 @@

          If _a_ <C _b_ and _b_ <C _c_, then _a_ <C _c_ (transitivity of <C)

        • - If _a_ >C _b_ and _b_ >C _c_, then _a_ >C _c_ (transitivity of >C) + If _a_ >C _b_ and _b_ >C _c_, then _a_ >C _c_ (transitivity of >C)
        @@ -38411,7 +38411,7 @@

        Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

        1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _actualStart_ be 0. + 1. If _relativeStart_ is -∞, let _actualStart_ be 0. 1. Else if _relativeStart_ < 0, let _actualStart_ be max(_len_ + _relativeStart_, 0). 1. Else, let _actualStart_ be min(_relativeStart_, _len_). 1. Let _itemCount_ be the number of elements in _items_. @@ -38422,7 +38422,7 @@

        Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

        1. Else, 1. Let _dc_ be ? ToIntegerOrInfinity(_deleteCount_). 1. Let _actualDeleteCount_ be the result of clamping _dc_ between 0 and _len_ - _actualStart_. - 1. If _len_ + _itemCount_ - _actualDeleteCount_ > 253 - 1, throw a *TypeError* exception. + 1. If _len_ + _itemCount_ - _actualDeleteCount_ > 253 - 1, throw a *TypeError* exception. 1. Let _A_ be ? ArraySpeciesCreate(_O_, _actualDeleteCount_). 1. Let _k_ be 0. 1. Repeat, while _k_ < _actualDeleteCount_, @@ -38444,12 +38444,12 @@

        Array.prototype.splice ( _start_, _deleteCount_, ..._items_ )

        1. Perform ? DeletePropertyOrThrow(_O_, _to_). 1. Set _k_ to _k_ + 1. 1. Set _k_ to _len_. - 1. Repeat, while _k_ > (_len_ - _actualDeleteCount_ + _itemCount_), + 1. Repeat, while _k_ > (_len_ - _actualDeleteCount_ + _itemCount_), 1. Perform ? DeletePropertyOrThrow(_O_, ! ToString(𝔽(_k_ - 1))). 1. Set _k_ to _k_ - 1. - 1. Else if _itemCount_ > _actualDeleteCount_, then + 1. Else if _itemCount_ > _actualDeleteCount_, then 1. Set _k_ to (_len_ - _actualDeleteCount_). - 1. Repeat, while _k_ > _actualStart_, + 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 @@ -38488,7 +38488,7 @@

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

        1. Let _R_ be the empty String. 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, - 1. If _k_ > 0, then + 1. If _k_ > 0, then 1. Set _R_ to the string-concatenation of _R_ and _separator_. 1. Let _nextElement_ be ? Get(_array_, ! ToString(𝔽(_k_))). 1. If _nextElement_ is not *undefined* or *null*, then @@ -38527,10 +38527,10 @@

        Array.prototype.unshift ( ..._items_ )

        1. Let _O_ be ? ToObject(*this* value). 1. Let _len_ be ? LengthOfArrayLike(_O_). 1. Let _argCount_ be the number of elements in _items_. - 1. If _argCount_ > 0, then - 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. + 1. If _argCount_ > 0, then + 1. If _len_ + _argCount_ > 253 - 1, throw a *TypeError* exception. 1. Let _k_ be _len_. - 1. Repeat, while _k_ > 0, + 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_). @@ -38634,7 +38634,7 @@

        1. Let _len_ be _array_.[[ArrayLength]]. 1. Else, 1. Let _len_ be ? LengthOfArrayLike(_array_). - 1. If _index_ ≥ _len_, return NormalCompletion(*undefined*). + 1. If _index_ ≥ _len_, return NormalCompletion(*undefined*). 1. If _kind_ is ~key~, perform ? GeneratorYield(CreateIterResultObject(𝔽(_index_), *false*)). 1. Else, 1. Let _elementKey_ be ! ToString(𝔽(_index_)). @@ -38642,7 +38642,7 @@

        1. If _kind_ is ~value~, perform ? GeneratorYield(CreateIterResultObject(_elementValue_, *false*)). 1. Else, 1. Assert: _kind_ is ~key+value~. - 1. Let _result_ be CreateArrayFromList(« 𝔽(_index_), _elementValue_ »). + 1. Let _result_ be CreateArrayFromList(« 𝔽(_index_), _elementValue_ »). 1. Perform ? GeneratorYield(CreateIterResultObject(_result_, *false*)). 1. Set _index_ to _index_ + 1. 1. Return CreateIteratorFromClosure(_closure_, *"%ArrayIteratorPrototype%"*, %ArrayIteratorPrototype%). @@ -38941,13 +38941,13 @@

        %TypedArray%.from ( _source_ [ , _mapfn_ [ , _thisArg_ ] ] )

        1. If _usingIterator_ is not *undefined*, then 1. Let _values_ be ? IterableToList(_source_, _usingIterator_). 1. Let _len_ be the number of elements in _values_. - 1. Let _targetObj_ be ? TypedArrayCreate(_C_, « 𝔽(_len_) »). + 1. Let _targetObj_ be ? TypedArrayCreate(_C_, « 𝔽(_len_) »). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be the first element of _values_ and remove that element from _values_. 1. If _mapping_ is *true*, then - 1. Let _mappedValue_ be ? Call(_mapfn_, _thisArg_, « _kValue_, 𝔽(_k_) »). + 1. Let _mappedValue_ be ? Call(_mapfn_, _thisArg_, « _kValue_, 𝔽(_k_) »). 1. Else, let _mappedValue_ be _kValue_. 1. Perform ? Set(_targetObj_, _Pk_, _mappedValue_, *true*). 1. Set _k_ to _k_ + 1. @@ -38956,13 +38956,13 @@

        %TypedArray%.from ( _source_ [ , _mapfn_ [ , _thisArg_ ] ] )

        1. NOTE: _source_ is not an Iterable 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 ? TypedArrayCreate(_C_, « 𝔽(_len_) »). + 1. Let _targetObj_ be ? TypedArrayCreate(_C_, « 𝔽(_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. If _mapping_ is *true*, then - 1. Let _mappedValue_ be ? Call(_mapfn_, _thisArg_, « _kValue_, 𝔽(_k_) »). + 1. Let _mappedValue_ be ? Call(_mapfn_, _thisArg_, « _kValue_, 𝔽(_k_) »). 1. Else, let _mappedValue_ be _kValue_. 1. Perform ? Set(_targetObj_, _Pk_, _mappedValue_, *true*). 1. Set _k_ to _k_ + 1. @@ -38977,7 +38977,7 @@

        %TypedArray%.of ( ..._items_ )

        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 ? TypedArrayCreate(_C_, « 𝔽(_len_) »). + 1. Let _newObj_ be ? TypedArrayCreate(_C_, « 𝔽(_len_) »). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _kValue_ be _items_[_k_]. @@ -39024,11 +39024,11 @@

        %TypedArray%.prototype.at ( _index_ )

        1. Perform ? ValidateTypedArray(_O_). 1. Let _len_ be _O_.[[ArrayLength]]. 1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_). - 1. If _relativeIndex_ ≥ 0, then + 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. If _k_ < 0 or _k_ ≥ _len_, return *undefined*. 1. Return ! Get(_O_, ! ToString(𝔽(_k_))). @@ -39087,34 +39087,34 @@

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

        1. Perform ? ValidateTypedArray(_O_). 1. Let _len_ be _O_.[[ArrayLength]]. 1. Let _relativeTarget_ be ? ToIntegerOrInfinity(_target_). - 1. If _relativeTarget_ is -∞, let _to_ be 0. + 1. If _relativeTarget_ is -∞, let _to_ be 0. 1. Else if _relativeTarget_ < 0, let _to_ be max(_len_ + _relativeTarget_, 0). 1. Else, let _to_ be min(_relativeTarget_, _len_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _from_ be 0. + 1. If _relativeStart_ is -∞, let _from_ be 0. 1. Else if _relativeStart_ < 0, let _from_ be max(_len_ + _relativeStart_, 0). 1. Else, let _from_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Let _count_ be min(_final_ - _from_, _len_ - _to_). - 1. If _count_ > 0, then + 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. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. 1. Let _elementSize_ be TypedArrayElementSize(_O_). 1. Let _byteOffset_ be _O_.[[ByteOffset]]. - 1. Let _toByteIndex_ be _to_ × _elementSize_ + _byteOffset_. - 1. Let _fromByteIndex_ be _from_ × _elementSize_ + _byteOffset_. - 1. Let _countBytes_ be _count_ × _elementSize_. + 1. Let _toByteIndex_ be _to_ × _elementSize_ + _byteOffset_. + 1. Let _fromByteIndex_ be _from_ × _elementSize_ + _byteOffset_. + 1. Let _countBytes_ be _count_ × _elementSize_. 1. If _fromByteIndex_ < _toByteIndex_ and _toByteIndex_ < _fromByteIndex_ + _countBytes_, then 1. Let _direction_ be -1. 1. Set _fromByteIndex_ to _fromByteIndex_ + _countBytes_ - 1. 1. Set _toByteIndex_ to _toByteIndex_ + _countBytes_ - 1. 1. Else, 1. Let _direction_ be 1. - 1. Repeat, while _countBytes_ > 0, + 1. Repeat, while _countBytes_ > 0, 1. Let _value_ be GetValueFromBuffer(_buffer_, _fromByteIndex_, ~Uint8~, *true*, ~Unordered~). 1. Perform SetValueInBuffer(_buffer_, _toByteIndex_, ~Uint8~, _value_, *true*, ~Unordered~). 1. Set _fromByteIndex_ to _fromByteIndex_ + _direction_. @@ -39147,7 +39147,7 @@

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

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *false*, return *false*. 1. Set _k_ to _k_ + 1. 1. Return *true*. @@ -39166,11 +39166,11 @@

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

        1. If _O_.[[ContentType]] is ~BigInt~, set _value_ to ? ToBigInt(_value_). 1. Otherwise, set _value_ to ? ToNumber(_value_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _k_ be 0. + 1. If _relativeStart_ is -∞, let _k_ be 0. 1. Else if _relativeStart_ < 0, let _k_ be max(_len_ + _relativeStart_, 0). 1. Else, let _k_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, throw a *TypeError* exception. @@ -39197,12 +39197,12 @@

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

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _selected_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _selected_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 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 _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_captured_) »). 1. Let _n_ be 0. 1. For each element _e_ of _kept_, do 1. Perform ! Set(_A_, ! ToString(𝔽(_n_)), _e_, *true*). @@ -39225,7 +39225,7 @@

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

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return _kValue_. 1. Set _k_ to _k_ + 1. 1. Return *undefined*. @@ -39246,7 +39246,7 @@

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

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return 𝔽(_k_). 1. Set _k_ to _k_ + 1. 1. Return *-1*𝔽. @@ -39264,10 +39264,10 @@

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

        1. Let _len_ be _O_.[[ArrayLength]]. 1. If IsCallable(_predicate_) is *false*, throw a *TypeError* exception. 1. Let _k_ be _len_ - 1. - 1. Repeat, while _k_ ≥ 0, + 1. Repeat, while _k_ ≥ 0, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return _kValue_. 1. Set _k_ to _k_ - 1. 1. Return *undefined*. @@ -39285,10 +39285,10 @@

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

        1. Let _len_ be _O_.[[ArrayLength]]. 1. If IsCallable(_predicate_) is *false*, throw a *TypeError* exception. 1. Let _k_ be _len_ - 1. - 1. Repeat, while _k_ ≥ 0, + 1. Repeat, while _k_ ≥ 0, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_predicate_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return 𝔽(_k_). 1. Set _k_ to _k_ - 1. 1. Return *-1*𝔽. @@ -39309,7 +39309,7 @@

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

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Perform ? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). + 1. Perform ? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). 1. Set _k_ to _k_ + 1. 1. Return *undefined*. @@ -39327,9 +39327,9 @@

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

        1. If _len_ is 0, return *false*. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. - 1. If _n_ is +∞, return *false*. - 1. Else if _n_ is -∞, set _n_ to 0. - 1. If _n_ ≥ 0, then + 1. If _n_ is +∞, return *false*. + 1. Else if _n_ is -∞, set _n_ to 0. + 1. If _n_ ≥ 0, then 1. Let _k_ be _n_. 1. Else, 1. Let _k_ be _len_ + _n_. @@ -39354,9 +39354,9 @@

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

        1. If _len_ is 0, return *-1*𝔽. 1. Let _n_ be ? ToIntegerOrInfinity(_fromIndex_). 1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0. - 1. If _n_ is +∞, return *-1*𝔽. - 1. Else if _n_ is -∞, set _n_ to 0. - 1. If _n_ ≥ 0, then + 1. If _n_ is +∞, return *-1*𝔽. + 1. Else if _n_ is -∞, set _n_ to 0. + 1. If _n_ ≥ 0, then 1. Let _k_ be _n_. 1. Else, 1. Let _k_ be _len_ + _n_. @@ -39386,7 +39386,7 @@

        %TypedArray%.prototype.join ( _separator_ )

        1. Let _R_ 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. If _k_ > 0, set _R_ to the string-concatenation of _R_ and _sep_. 1. Let _element_ be ! Get(_O_, ! ToString(𝔽(_k_))). 1. If _element_ is *undefined*, let _next_ be the empty String; otherwise, let _next_ be ! ToString(_element_). 1. Set _R_ to the string-concatenation of _R_ and _next_. @@ -39416,12 +39416,12 @@

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

        𝔽. 1. If _fromIndex_ is present, let _n_ be ? ToIntegerOrInfinity(_fromIndex_); else let _n_ be _len_ - 1. - 1. If _n_ is -∞, return *-1*𝔽. - 1. If _n_ ≥ 0, then + 1. If _n_ is -∞, return *-1*𝔽. + 1. If _n_ ≥ 0, then 1. Let _k_ be min(_n_, _len_ - 1). 1. Else, 1. Let _k_ be _len_ + _n_. - 1. Repeat, while _k_ ≥ 0, + 1. Repeat, while _k_ ≥ 0, 1. Let _kPresent_ be ! HasProperty(_O_, ! ToString(𝔽(_k_))). 1. If _kPresent_ is *true*, then 1. Let _elementK_ be ! Get(_O_, ! ToString(𝔽(_k_))). @@ -39457,12 +39457,12 @@

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

        1. Perform ? ValidateTypedArray(_O_). 1. Let _len_ be _O_.[[ArrayLength]]. 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. - 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_len_) »). + 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_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(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). + 1. Let _mappedValue_ be ? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »). 1. Perform ? Set(_A_, _Pk_, _mappedValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Return _A_. @@ -39491,7 +39491,7 @@

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

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Set _accumulator_ to ? Call(_callbackfn_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). + 1. Set _accumulator_ to ? Call(_callbackfn_, *undefined*, « _accumulator_, _kValue_, 𝔽(_k_), _O_ »). 1. Set _k_ to _k_ + 1. 1. Return _accumulator_. @@ -39516,10 +39516,10 @@

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

        @@ -39536,7 +39536,7 @@

        %TypedArray%.prototype.reverse ( )

        1. Let _len_ be _O_.[[ArrayLength]]. 1. Let _middle_ be floor(_len_ / 2). 1. Let _lower_ be 0. - 1. Repeat, while _lower_ ≠ _middle_, + 1. Repeat, while _lower_ ≠ _middle_, 1. Let _upper_ be _len_ - _lower_ - 1. 1. Let _upperP_ be ! ToString(𝔽(_upper_)). 1. Let _lowerP_ be ! ToString(𝔽(_lower_)). @@ -39593,9 +39593,9 @@

        1. Let _srcElementSize_ be TypedArrayElementSize(_source_). 1. Let _srcLength_ be _source_.[[ArrayLength]]. 1. Let _srcByteOffset_ be _source_.[[ByteOffset]]. - 1. If _targetOffset_ is +∞, throw a *RangeError* exception. - 1. If _srcLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. - 1. If _target_.[[ContentType]] ≠ _source_.[[ContentType]], throw a *TypeError* exception. + 1. If _targetOffset_ is +∞, throw a *RangeError* exception. + 1. If _srcLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. + 1. If _target_.[[ContentType]] ≠ _source_.[[ContentType]], throw a *TypeError* exception. 1. If both IsSharedArrayBuffer(_srcBuffer_) and IsSharedArrayBuffer(_targetBuffer_) are *true*, then 1. If _srcBuffer_.[[ArrayBufferData]] and _targetBuffer_.[[ArrayBufferData]] are the same Shared Data Block values, let _same_ be *true*; else let _same_ be *false*. 1. Else, let _same_ be SameValue(_srcBuffer_, _targetBuffer_). @@ -39604,8 +39604,8 @@

        1. Set _srcBuffer_ to ? CloneArrayBuffer(_srcBuffer_, _srcByteOffset_, _srcByteLength_). 1. Let _srcByteIndex_ be 0. 1. Else, let _srcByteIndex_ be _srcByteOffset_. - 1. Let _targetByteIndex_ be _targetOffset_ × _targetElementSize_ + _targetByteOffset_. - 1. Let _limit_ be _targetByteIndex_ + _targetElementSize_ × _srcLength_. + 1. Let _targetByteIndex_ be _targetOffset_ × _targetElementSize_ + _targetByteOffset_. + 1. Let _limit_ be _targetByteIndex_ + _targetElementSize_ × _srcLength_. 1. If _srcType_ is the same as _targetType_, then 1. NOTE: If _srcType_ and _targetType_ are the same, the transfer must be performed in a manner that preserves the bit-level encoding of the source data. 1. Repeat, while _targetByteIndex_ < _limit_, @@ -39641,8 +39641,8 @@

        1. Let _targetLength_ be _target_.[[ArrayLength]]. 1. Let _src_ be ? ToObject(_source_). 1. Let _srcLength_ be ? LengthOfArrayLike(_src_). - 1. If _targetOffset_ is +∞, throw a *RangeError* exception. - 1. If _srcLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. + 1. If _targetOffset_ is +∞, throw a *RangeError* exception. + 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_)). @@ -39664,16 +39664,16 @@

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

        1. Perform ? ValidateTypedArray(_O_). 1. Let _len_ be _O_.[[ArrayLength]]. 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _k_ be 0. + 1. If _relativeStart_ is -∞, let _k_ be 0. 1. Else if _relativeStart_ < 0, let _k_ be max(_len_ + _relativeStart_, 0). 1. Else, let _k_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Let _count_ be max(_final_ - _k_, 0). - 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_count_) »). - 1. If _count_ > 0, then + 1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_count_) »). + 1. If _count_ > 0, then 1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, throw a *TypeError* exception. 1. Let _srcType_ be TypedArrayElementType(_O_). 1. Let _targetType_ be TypedArrayElementType(_A_). @@ -39691,9 +39691,9 @@

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

        1. Let _elementSize_ be TypedArrayElementSize(_O_). 1. NOTE: If _srcType_ and _targetType_ are the same, the transfer must be performed in a manner that preserves the bit-level encoding of the source data. 1. Let _srcByteOffset_ be _O_.[[ByteOffset]]. - 1. Let _srcByteIndex_ be (_k_ × _elementSize_) + _srcByteOffset_. + 1. Let _srcByteIndex_ be (_k_ × _elementSize_) + _srcByteOffset_. 1. Let _targetByteIndex_ be _A_.[[ByteOffset]]. - 1. Let _limit_ be _targetByteIndex_ + _count_ × _elementSize_. + 1. Let _limit_ be _targetByteIndex_ + _count_ × _elementSize_. 1. Repeat, while _targetByteIndex_ < _limit_, 1. Let _value_ be GetValueFromBuffer(_srcBuffer_, _srcByteIndex_, ~Uint8~, *true*, ~Unordered~). 1. Perform SetValueInBuffer(_targetBuffer_, _targetByteIndex_, ~Uint8~, _value_, *true*, ~Unordered~). @@ -39717,7 +39717,7 @@

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

        1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). 1. Let _kValue_ be ! Get(_O_, _Pk_). - 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). + 1. Let _testResult_ be ToBoolean(? Call(_callbackfn_, _thisArg_, « _kValue_, 𝔽(_k_), _O_ »)). 1. If _testResult_ is *true*, return *true*. 1. Set _k_ to _k_ + 1. 1. Return *false*. @@ -39739,14 +39739,14 @@

        %TypedArray%.prototype.sort ( _comparefn_ )

        1. Let _SortCompare_ be a new Abstract Closure with parameters (_x_, _y_) that captures _comparefn_ and performs the following steps when called: 1. Assert: _x_ is a Number and _y_ is a Number, or _x_ is a BigInt and _y_ is a BigInt. 1. If _comparefn_ is not *undefined*, then - 1. Let _v_ be ? ToNumber(? Call(_comparefn_, *undefined*, « _x_, _y_ »)). + 1. Let _v_ be ? ToNumber(? Call(_comparefn_, *undefined*, « _x_, _y_ »)). 1. If _v_ is *NaN*, return *+0*𝔽. 1. Return _v_. 1. If _x_ and _y_ are both *NaN*, return *+0*𝔽. 1. If _x_ is *NaN*, return *1*𝔽. 1. If _y_ is *NaN*, return *-1*𝔽. 1. If _x_ < _y_, return *-1*𝔽. - 1. If _x_ > _y_, return *1*𝔽. + 1. If _x_ > _y_, return *1*𝔽. 1. If _x_ is *-0*𝔽 and _y_ is *+0*𝔽, return *-1*𝔽. 1. If _x_ is *+0*𝔽 and _y_ is *-0*𝔽, return *1*𝔽. 1. Return *+0*𝔽. @@ -39768,18 +39768,18 @@

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

        1. Let _buffer_ be _O_.[[ViewedArrayBuffer]]. 1. Let _srcLength_ be _O_.[[ArrayLength]]. 1. Let _relativeBegin_ be ? ToIntegerOrInfinity(_begin_). - 1. If _relativeBegin_ is -∞, let _beginIndex_ be 0. + 1. If _relativeBegin_ is -∞, let _beginIndex_ be 0. 1. Else if _relativeBegin_ < 0, let _beginIndex_ be max(_srcLength_ + _relativeBegin_, 0). 1. Else, let _beginIndex_ be min(_relativeBegin_, _srcLength_). 1. If _end_ is *undefined*, let _relativeEnd_ be _srcLength_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _endIndex_ be 0. + 1. If _relativeEnd_ is -∞, let _endIndex_ be 0. 1. Else if _relativeEnd_ < 0, let _endIndex_ be max(_srcLength_ + _relativeEnd_, 0). 1. Else, let _endIndex_ be min(_relativeEnd_, _srcLength_). 1. Let _newLength_ be max(_endIndex_ - _beginIndex_, 0). 1. Let _elementSize_ be TypedArrayElementSize(_O_). 1. Let _srcByteOffset_ be _O_.[[ByteOffset]]. - 1. Let _beginByteOffset_ be _srcByteOffset_ + _beginIndex_ × _elementSize_. - 1. Let _argumentsList_ be « _buffer_, 𝔽(_beginByteOffset_), 𝔽(_newLength_) ». + 1. Let _beginByteOffset_ be _srcByteOffset_ + _beginIndex_ × _elementSize_. + 1. Let _argumentsList_ be « _buffer_, 𝔽(_beginByteOffset_), 𝔽(_newLength_) ». 1. Return ? TypedArraySpeciesCreate(_O_, _argumentsList_).

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

        @@ -39849,7 +39849,7 @@

        1. Let _constructor_ be ? SpeciesConstructor(_exemplar_, _defaultConstructor_). 1. Let _result_ be ? TypedArrayCreate(_constructor_, _argumentList_). 1. Assert: _result_ has [[TypedArrayName]] and [[ContentType]] internal slots. - 1. If _result_.[[ContentType]] ≠ _exemplar_.[[ContentType]], throw a *TypeError* exception. + 1. If _result_.[[ContentType]] ≠ _exemplar_.[[ContentType]], throw a *TypeError* exception. 1. Return _result_. @@ -39946,8 +39946,8 @@

        _TypedArray_ ( ..._args_ )

        1. If _firstArgument_ has a [[TypedArrayName]] internal slot, then 1. Perform ? InitializeTypedArrayFromTypedArray(_O_, _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. 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. Else, 1. Assert: _firstArgument_ is an Object and _firstArgument_ does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot. @@ -40013,16 +40013,16 @@

        1. Let _srcElementSize_ be TypedArrayElementSize(_srcArray_). 1. Let _srcByteOffset_ be _srcArray_.[[ByteOffset]]. 1. Let _elementLength_ be _srcArray_.[[ArrayLength]]. - 1. Let _byteLength_ be _elementSize_ × _elementLength_. + 1. Let _byteLength_ be _elementSize_ × _elementLength_. 1. If _elementType_ is the same as _srcType_, then 1. Let _data_ be ? CloneArrayBuffer(_srcData_, _srcByteOffset_, _byteLength_). 1. Else, 1. Let _data_ be ? AllocateArrayBuffer(%ArrayBuffer%, _byteLength_). - 1. If _srcArray_.[[ContentType]] ≠ _O_.[[ContentType]], throw a *TypeError* exception. + 1. If _srcArray_.[[ContentType]] ≠ _O_.[[ContentType]], throw a *TypeError* exception. 1. Let _srcByteIndex_ be _srcByteOffset_. 1. Let _targetByteIndex_ be 0. 1. Let _count_ be _elementLength_. - 1. Repeat, while _count_ > 0, + 1. Repeat, while _count_ > 0, 1. Let _value_ be GetValueFromBuffer(_srcData_, _srcByteIndex_, _srcType_, *true*, ~Unordered~). 1. Perform SetValueInBuffer(_data_, _targetByteIndex_, _elementType_, _value_, *true*, ~Unordered~). 1. Set _srcByteIndex_ to _srcByteIndex_ + _srcElementSize_. @@ -40050,18 +40050,18 @@

        1. Let _elementSize_ be TypedArrayElementSize(_O_). 1. Let _offset_ be ? ToIndex(_byteOffset_). - 1. If _offset_ modulo _elementSize_ ≠ 0, throw a *RangeError* exception. + 1. If _offset_ modulo _elementSize_ ≠ 0, throw a *RangeError* exception. 1. If _length_ is not *undefined*, then 1. Let _newLength_ be ? ToIndex(_length_). 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. 1. Let _bufferByteLength_ be _buffer_.[[ArrayBufferByteLength]]. 1. If _length_ is *undefined*, then - 1. If _bufferByteLength_ modulo _elementSize_ ≠ 0, throw a *RangeError* exception. + 1. If _bufferByteLength_ modulo _elementSize_ ≠ 0, throw a *RangeError* exception. 1. Let _newByteLength_ be _bufferByteLength_ - _offset_. 1. If _newByteLength_ < 0, throw a *RangeError* exception. 1. Else, - 1. Let _newByteLength_ be _newLength_ × _elementSize_. - 1. If _offset_ + _newByteLength_ > _bufferByteLength_, throw a *RangeError* exception. + 1. Let _newByteLength_ be _newLength_ × _elementSize_. + 1. If _offset_ + _newByteLength_ > _bufferByteLength_, throw a *RangeError* exception. 1. Set _O_.[[ViewedArrayBuffer]] to _buffer_. 1. Set _O_.[[ByteLength]] to _newByteLength_. 1. Set _O_.[[ByteOffset]] to _offset_. @@ -40129,7 +40129,7 @@

        1. Assert: _O_.[[ViewedArrayBuffer]] is *undefined*. 1. Let _elementSize_ be TypedArrayElementSize(_O_). - 1. Let _byteLength_ be _elementSize_ × _length_. + 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_. @@ -40215,7 +40215,7 @@

        Map ( [ _iterable_ ] )

        This function performs the following steps when called:

        1. If NewTarget is *undefined*, throw a *TypeError* exception. - 1. Let _map_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Map.prototype%"*, « [[MapData]] »). + 1. Let _map_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Map.prototype%"*, « [[MapData]] »). 1. Set _map_.[[MapData]] to a new empty List. 1. If _iterable_ is either *undefined* or *null*, return _map_. 1. Let _adder_ be ? Get(_map_, *"set"*). @@ -40252,7 +40252,7 @@

        1. IfAbruptCloseIterator(_k_, _iteratorRecord_). 1. Let _v_ be Completion(Get(_nextItem_, *"1"*)). 1. IfAbruptCloseIterator(_v_, _iteratorRecord_). - 1. Let _status_ be Completion(Call(_adder_, _target_, « _k_, _v_ »)). + 1. Let _status_ be Completion(Call(_adder_, _target_, « _k_, _v_ »)). 1. IfAbruptCloseIterator(_status_, _iteratorRecord_). @@ -40362,7 +40362,7 @@

        Map.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )

        1. Let _e_ be the Record { [[Key]], [[Value]] } that is the value of _entries_[_index_]. 1. Set _index_ to _index_ + 1. 1. If _e_.[[Key]] is not ~empty~, then - 1. Perform ? Call(_callbackfn_, _thisArg_, « _e_.[[Value]], _e_.[[Key]], _M_ »). + 1. Perform ? Call(_callbackfn_, _thisArg_, « _e_.[[Value]], _e_.[[Key]], _M_ »). 1. NOTE: The number of elements in _entries_ may have increased during execution of _callbackfn_. 1. Set _numEntries_ to the number of elements of _entries_. 1. Return *undefined*. @@ -40497,7 +40497,7 @@

        1. Else if _kind_ is ~value~, let _result_ be _e_.[[Value]]. 1. Else, 1. Assert: _kind_ is ~key+value~. - 1. Let _result_ be CreateArrayFromList(« _e_.[[Key]], _e_.[[Value]] »). + 1. Let _result_ be CreateArrayFromList(« _e_.[[Key]], _e_.[[Value]] »). 1. Perform ? GeneratorYield(CreateIterResultObject(_result_, *false*)). 1. NOTE: The number of elements in _entries_ may have increased while execution of this abstract operation was paused by Yield. 1. Set _numEntries_ to the number of elements of _entries_. @@ -40553,7 +40553,7 @@

        Set ( [ _iterable_ ] )

        This function performs the following steps when called:

        1. If NewTarget is *undefined*, throw a *TypeError* exception. - 1. Let _set_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Set.prototype%"*, « [[SetData]] »). + 1. Let _set_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Set.prototype%"*, « [[SetData]] »). 1. Set _set_.[[SetData]] to a new empty List. 1. If _iterable_ is either *undefined* or *null*, return _set_. 1. Let _adder_ be ? Get(_set_, *"add"*). @@ -40563,7 +40563,7 @@

        Set ( [ _iterable_ ] )

        1. Let _next_ be ? IteratorStep(_iteratorRecord_). 1. If _next_ is *false*, return _set_. 1. Let _nextValue_ be ? IteratorValue(_next_). - 1. Let _status_ be Completion(Call(_adder_, _set_, « _nextValue_ »)). + 1. Let _status_ be Completion(Call(_adder_, _set_, « _nextValue_ »)). 1. IfAbruptCloseIterator(_status_, _iteratorRecord_).
        @@ -40687,7 +40687,7 @@

        Set.prototype.forEach ( _callbackfn_ [ , _thisArg_ ] )

        1. Let _e_ be _entries_[_index_]. 1. Set _index_ to _index_ + 1. 1. If _e_ is not ~empty~, then - 1. Perform ? Call(_callbackfn_, _thisArg_, « _e_, _e_, _S_ »). + 1. Perform ? Call(_callbackfn_, _thisArg_, « _e_, _e_, _S_ »). 1. NOTE: The number of elements in _entries_ may have increased during execution of _callbackfn_. 1. Set _numEntries_ to the number of elements of _entries_. 1. Return *undefined*. @@ -40789,7 +40789,7 @@

        1. Set _index_ to _index_ + 1. 1. If _e_ is not ~empty~, then 1. If _kind_ is ~key+value~, then - 1. Let _result_ be CreateArrayFromList(« _e_, _e_ »). + 1. Let _result_ be CreateArrayFromList(« _e_, _e_ »). 1. Perform ? GeneratorYield(CreateIterResultObject(_result_, *false*)). 1. Else, 1. Assert: _kind_ is ~value~. @@ -40833,7 +40833,7 @@

        WeakMap Objects

        An implementation may impose an arbitrarily determined latency between the time a key/value pair of a WeakMap becomes inaccessible and the time when the key/value pair is removed from the WeakMap. If this latency was observable to ECMAScript program, it would be a source of indeterminacy that could impact program execution. For that reason, an ECMAScript implementation must not provide any means to observe a key of a WeakMap that does not require the observer to present the observed key.

        WeakMaps must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of key/value pairs in the collection. The data structure used in this specification is only intended to describe the required observable semantics of WeakMaps. It is not intended to be a viable implementation model.

        -

        WeakMap and WeakSets are intended to provide mechanisms for dynamically associating state with an object in a manner that does not “leak” memory resources if, in the absence of the WeakMap or WeakSet, the object otherwise became inaccessible and subject to resource reclamation by the implementation's garbage collection mechanisms. This characteristic can be achieved by using an inverted per-object mapping of weak map instances to keys. Alternatively each weak map may internally store its key to value mappings but this approach requires coordination between the WeakMap or WeakSet implementation and the garbage collector. The following references describe mechanism that may be useful to implementations of WeakMap and WeakSets:

        +

        WeakMap and WeakSets are intended to provide mechanisms for dynamically associating state with an object in a manner that does not “leak” memory resources if, in the absence of the WeakMap or WeakSet, the object otherwise became inaccessible and subject to resource reclamation by the implementation's garbage collection mechanisms. This characteristic can be achieved by using an inverted per-object mapping of weak map instances to keys. Alternatively each weak map may internally store its key to value mappings but this approach requires coordination between the WeakMap or WeakSet implementation and the garbage collector. The following references describe mechanism that may be useful to implementations of WeakMap and WeakSets:

        Barry Hayes. 1997. Ephemerons: a new finalization mechanism. In Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA '97), A. Michael Berman (Ed.). ACM, New York, NY, USA, 176-183, http://doi.acm.org/10.1145/263698.263733.

        Alexandra Barros, Roberto Ierusalimschy, Eliminating Cycles in Weak Tables. Journal of Universal Computer Science - J.UCS, vol. 14, no. 21, pp. 3481-3497, 2008, http://www.jucs.org/jucs_14_21/eliminating_cycles_in_weak

        @@ -40854,7 +40854,7 @@

        WeakMap ( [ _iterable_ ] )

        This function performs the following steps when called:

        1. If NewTarget is *undefined*, throw a *TypeError* exception. - 1. Let _map_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakMap.prototype%"*, « [[WeakMapData]] »). + 1. Let _map_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakMap.prototype%"*, « [[WeakMapData]] »). 1. Set _map_.[[WeakMapData]] to a new empty List. 1. If _iterable_ is either *undefined* or *null*, return _map_. 1. Let _adder_ be ? Get(_map_, *"set"*). @@ -41001,7 +41001,7 @@

        WeakSet ( [ _iterable_ ] )

        This function performs the following steps when called:

        1. If NewTarget is *undefined*, throw a *TypeError* exception. - 1. Let _set_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakSet.prototype%"*, « [[WeakSetData]] »). + 1. Let _set_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakSet.prototype%"*, « [[WeakSetData]] »). 1. Set _set_.[[WeakSetData]] to a new empty List. 1. If _iterable_ is either *undefined* or *null*, return _set_. 1. Let _adder_ be ? Get(_set_, *"add"*). @@ -41011,7 +41011,7 @@

        WeakSet ( [ _iterable_ ] )

        1. Let _next_ be ? IteratorStep(_iteratorRecord_). 1. If _next_ is *false*, return _set_. 1. Let _nextValue_ be ? IteratorValue(_next_). - 1. Let _status_ be Completion(Call(_adder_, _set_, « _nextValue_ »)). + 1. Let _status_ be Completion(Call(_adder_, _set_, « _nextValue_ »)). 1. IfAbruptCloseIterator(_status_, _iteratorRecord_).
        @@ -41148,7 +41148,7 @@

        It is used to create an ArrayBuffer.
        - 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_constructor_, *"%ArrayBuffer.prototype%"*, « [[ArrayBufferData]], [[ArrayBufferByteLength]], [[ArrayBufferDetachKey]] »). + 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_constructor_, *"%ArrayBuffer.prototype%"*, « [[ArrayBufferData]], [[ArrayBufferByteLength]], [[ArrayBufferDetachKey]] »). 1. Let _block_ be ? CreateByteDataBlock(_byteLength_). 1. Set _obj_.[[ArrayBufferData]] to _block_. 1. Set _obj_.[[ArrayBufferByteLength]] to _byteLength_. @@ -41302,7 +41302,7 @@

        1. If IsUnsignedElementType(_type_) is *true*, then 1. Let _intValue_ be the byte elements of _rawBytes_ concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. 1. Else, - 1. Let _intValue_ be the byte elements of _rawBytes_ concatenated and interpreted as a bit string encoding of a binary little-endian two's complement number of bit length _elementSize_ × 8. + 1. Let _intValue_ be the byte elements of _rawBytes_ concatenated and interpreted as a bit string encoding of a binary little-endian two's complement number of bit length _elementSize_ × 8. 1. If IsBigIntElementType(_type_) is *true*, return the BigInt value that corresponds to _intValue_. 1. Otherwise, return the Number value that corresponds to _intValue_. @@ -41361,7 +41361,7 @@

        1. Let _n_ be the Element Size value specified in for Element Type _type_. 1. Let _convOp_ be the abstract operation named in the Conversion Operation column in for Element Type _type_. 1. Let _intValue_ be ℝ(_convOp_(_value_)). - 1. If _intValue_ ≥ 0, then + 1. If _intValue_ ≥ 0, then 1. Let _rawBytes_ be a List whose elements are the _n_-byte binary encoding of _intValue_. The bytes are ordered in little endian order. 1. Else, 1. Let _rawBytes_ be a List whose elements are the _n_-byte binary two's complement encoding of _intValue_. The bytes are ordered in little endian order. @@ -41537,16 +41537,16 @@

        ArrayBuffer.prototype.slice ( _start_, _end_ )

        1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception. 1. Let _len_ be _O_.[[ArrayBufferByteLength]]. 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _first_ be 0. + 1. If _relativeStart_ is -∞, let _first_ be 0. 1. Else if _relativeStart_ < 0, let _first_ be max(_len_ + _relativeStart_, 0). 1. Else, let _first_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Let _newLen_ be max(_final_ - _first_, 0). 1. Let _ctor_ be ? SpeciesConstructor(_O_, %ArrayBuffer%). - 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLen_) »). + 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. @@ -41594,7 +41594,7 @@

        It is used to create a SharedArrayBuffer.
        - 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_constructor_, *"%SharedArrayBuffer.prototype%"*, « [[ArrayBufferData]], [[ArrayBufferByteLength]] »). + 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_constructor_, *"%SharedArrayBuffer.prototype%"*, « [[ArrayBufferData]], [[ArrayBufferByteLength]] »). 1. Let _block_ be ? CreateSharedByteDataBlock(_byteLength_). 1. Set _obj_.[[ArrayBufferData]] to _block_. 1. Set _obj_.[[ArrayBufferByteLength]] to _byteLength_. @@ -41710,16 +41710,16 @@

        SharedArrayBuffer.prototype.slice ( _start_, _end_ )

        1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception. 1. Let _len_ be _O_.[[ArrayBufferByteLength]]. 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _relativeStart_ is -∞, let _first_ be 0. + 1. If _relativeStart_ is -∞, let _first_ be 0. 1. Else if _relativeStart_ < 0, let _first_ be max(_len_ + _relativeStart_, 0). 1. Else, let _first_ be min(_relativeStart_, _len_). 1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_). - 1. If _relativeEnd_ is -∞, let _final_ be 0. + 1. If _relativeEnd_ is -∞, let _final_ be 0. 1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0). 1. Else, let _final_ be min(_relativeEnd_, _len_). 1. Let _newLen_ be max(_final_ - _first_, 0). 1. Let _ctor_ be ? SpeciesConstructor(_O_, %SharedArrayBuffer%). - 1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLen_) »). + 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]] and _O_.[[ArrayBufferData]] are the same Shared Data Block values, throw a *TypeError* exception. @@ -41777,7 +41777,7 @@

        1. Let _viewOffset_ be _view_.[[ByteOffset]]. 1. Let _viewSize_ be _view_.[[ByteLength]]. 1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. - 1. If _getIndex_ + _elementSize_ > _viewSize_, throw a *RangeError* exception. + 1. If _getIndex_ + _elementSize_ > _viewSize_, throw a *RangeError* exception. 1. Let _bufferIndex_ be _getIndex_ + _viewOffset_. 1. Return GetValueFromBuffer(_buffer_, _bufferIndex_, _type_, *false*, ~Unordered~, _isLittleEndian_). @@ -41809,7 +41809,7 @@

        1. Let _viewOffset_ be _view_.[[ByteOffset]]. 1. Let _viewSize_ be _view_.[[ByteLength]]. 1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. - 1. If _getIndex_ + _elementSize_ > _viewSize_, throw a *RangeError* exception. + 1. If _getIndex_ + _elementSize_ > _viewSize_, throw a *RangeError* exception. 1. Let _bufferIndex_ be _getIndex_ + _viewOffset_. 1. Perform SetValueInBuffer(_buffer_, _bufferIndex_, _type_, _numberValue_, *false*, ~Unordered~, _isLittleEndian_). 1. Return *undefined*. @@ -41837,13 +41837,13 @@

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

        1. Let _offset_ be ? ToIndex(_byteOffset_). 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. 1. Let _bufferByteLength_ be _buffer_.[[ArrayBufferByteLength]]. - 1. If _offset_ > _bufferByteLength_, throw a *RangeError* exception. + 1. If _offset_ > _bufferByteLength_, throw a *RangeError* exception. 1. If _byteLength_ is *undefined*, then 1. Let _viewByteLength_ be _bufferByteLength_ - _offset_. 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. If _offset_ + _viewByteLength_ > _bufferByteLength_, throw a *RangeError* exception. + 1. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%DataView.prototype%"*, « [[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]] »). 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. 1. Set _O_.[[ViewedArrayBuffer]] to _buffer_. 1. Set _O_.[[ByteLength]] to _viewByteLength_. @@ -42152,7 +42152,7 @@

        WaiterList Objects

        A WaiterList is a semantic object that contains an ordered list of agent signifiers for those agents that are waiting on a location (_block_, _i_) in shared memory; _block_ is a Shared Data Block and _i_ a byte offset into the memory of _block_. A WaiterList object also optionally contains a Synchronize event denoting the previous leaving of its critical section.

        Initially a WaiterList object has an empty list and no Synchronize event.

        The agent cluster has a store of WaiterList objects; the store is indexed by (_block_, _i_). WaiterLists are agent-independent: a lookup in the store of WaiterLists by (_block_, _i_) will result in the same WaiterList object in any agent in the agent cluster.

        -

        Each WaiterList has a critical section that controls exclusive access to that WaiterList during evaluation. Only a single agent may enter a WaiterList's critical section at one time. Entering and leaving a WaiterList's critical section is controlled by the abstract operations EnterCriticalSection and LeaveCriticalSection. Operations on a WaiterList—adding and removing waiting agents, traversing the list of agents, suspending and notifying agents on the list, setting and retrieving the Synchronize event—may only be performed by agents that have entered the WaiterList's critical section.

        +

        Each WaiterList has a critical section that controls exclusive access to that WaiterList during evaluation. Only a single agent may enter a WaiterList's critical section at one time. Entering and leaving a WaiterList's critical section is controlled by the abstract operations EnterCriticalSection and LeaveCriticalSection. Operations on a WaiterList—adding and removing waiting agents, traversing the list of agents, suspending and notifying agents on the list, setting and retrieving the Synchronize event—may only be performed by agents that have entered the WaiterList's critical section.

        @@ -42192,11 +42192,11 @@

        1. Let _length_ be _typedArray_.[[ArrayLength]]. 1. Let _accessIndex_ be ? ToIndex(_requestIndex_). - 1. Assert: _accessIndex_ ≥ 0. - 1. If _accessIndex_ ≥ _length_, throw a *RangeError* exception. + 1. Assert: _accessIndex_ ≥ 0. + 1. If _accessIndex_ ≥ _length_, throw a *RangeError* exception. 1. Let _elementSize_ be TypedArrayElementSize(_typedArray_). 1. Let _offset_ be _typedArray_.[[ByteOffset]]. - 1. Return (_accessIndex_ × _elementSize_) + _offset_. + 1. Return (_accessIndex_ × _elementSize_) + _offset_. @@ -42308,7 +42308,7 @@

        1. Assert: The surrounding agent is in the critical section for _WL_. 1. Let _L_ be a new empty List. 1. Let _S_ be a reference to the list of waiters in _WL_. - 1. Repeat, while _c_ > 0 and _S_ is not empty, + 1. Repeat, while _c_ > 0 and _S_ is not empty, 1. Let _W_ be the first waiter in _S_. 1. Append _W_ to _L_. 1. Remove _W_ from _S_. @@ -42424,7 +42424,7 @@

        1. Let _i_ be 0. 1. For each element _xByte_ of _xBytes_, do 1. Let _yByte_ be _yBytes_[_i_]. - 1. If _xByte_ ≠ _yByte_, return *false*. + 1. If _xByte_ ≠ _yByte_, return *false*. 1. Set _i_ to _i_ + 1. 1. Return *true*. @@ -42604,7 +42604,7 @@

        Atomics.wait ( _typedArray_, _index_, _value_, _timeout_ )

        1. If _typedArray_.[[TypedArrayName]] is *"BigInt64Array"*, let _v_ be ? ToBigInt64(_value_). 1. Otherwise, let _v_ be ? ToInt32(_value_). 1. Let _q_ be ? ToNumber(_timeout_). - 1. If _q_ is *NaN* or *+∞*𝔽, let _t_ be +∞; else if _q_ is *-∞*𝔽, let _t_ be 0; else let _t_ be max(ℝ(_q_), 0). + 1. If _q_ is *NaN* or *+∞*𝔽, let _t_ be +∞; else if _q_ is *-∞*𝔽, let _t_ be 0; else let _t_ be max(ℝ(_q_), 0). 1. Let _B_ be AgentCanSuspend(). 1. If _B_ is *false*, throw a *TypeError* exception. 1. Let _block_ be _buffer_.[[ArrayBufferData]]. @@ -42612,7 +42612,7 @@

        Atomics.wait ( _typedArray_, _index_, _value_, _timeout_ )

        1. Perform EnterCriticalSection(_WL_). 1. Let _elementType_ be TypedArrayElementType(_typedArray_). 1. Let _w_ be GetValueFromBuffer(_buffer_, _indexedPosition_, _elementType_, *true*, ~SeqCst~). - 1. If _v_ ≠ _w_, then + 1. If _v_ ≠ _w_, then 1. Perform LeaveCriticalSection(_WL_). 1. Return *"not-equal"*. 1. Let _W_ be AgentSignifier(). @@ -42635,7 +42635,7 @@

        Atomics.notify ( _typedArray_, _index_, _count_ )

        1. Let _buffer_ be ? ValidateIntegerTypedArray(_typedArray_, *true*). 1. Let _indexedPosition_ be ? ValidateAtomicAccess(_typedArray_, _index_). - 1. If _count_ is *undefined*, let _c_ be +∞. + 1. If _count_ is *undefined*, let _c_ be +∞. 1. Else, 1. Let _intCount_ be ? ToIntegerOrInfinity(_count_). 1. Let _c_ be max(_intCount_, 0). @@ -42752,7 +42752,7 @@

        1. Perform ? _val_.[[Delete]](_P_). 1. Else, 1. Perform ? CreateDataProperty(_val_, _P_, _newElement_). - 1. Return ? Call(_reviver_, _holder_, « _name_, _val_ »). + 1. Return ? Call(_reviver_, _holder_, « _name_, _val_ »).

        It is not permitted for a conforming implementation of `JSON.parse` to extend the JSON grammars. If an implementation wishes to support a modified or extended JSON interchange format it must do so by defining a different parse function.

        @@ -42902,9 +42902,9 @@

        1. If _value_ is an Object or _value_ is a BigInt, then 1. Let _toJSON_ be ? GetV(_value_, *"toJSON"*). 1. If IsCallable(_toJSON_) is *true*, then - 1. Set _value_ to ? Call(_toJSON_, _value_, « _key_ »). + 1. Set _value_ to ? Call(_toJSON_, _value_, « _key_ »). 1. If _state_.[[ReplacerFunction]] is not *undefined*, then - 1. Set _value_ to ? Call(_state_.[[ReplacerFunction]], _holder_, « _key_, _value_ »). + 1. Set _value_ to ? Call(_state_.[[ReplacerFunction]], _holder_, « _key_, _value_ »). 1. If _value_ is an Object, then 1. If _value_ has a [[NumberData]] internal slot, then 1. Set _value_ to ? ToNumber(_value_). @@ -42943,8 +42943,8 @@

        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. 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 if _C_ has the same numeric value as a or , then 1. Let _unit_ be the code unit whose numeric value is that of _C_. 1. Set _product_ to the string-concatenation of _product_ and UnicodeEscape(_unit_). @@ -43059,7 +43059,7 @@

        1. Let _n_ be the numeric value of _C_. - 1. Assert: _n_ ≤ 0xFFFF. + 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~). @@ -43197,7 +43197,7 @@

        WeakRef ( _target_ )

        1. If NewTarget is *undefined*, throw a *TypeError* exception. 1. If _target_ is not an Object, throw a *TypeError* exception. - 1. Let _weakRef_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakRef.prototype%"*, « [[WeakRefTarget]] »). + 1. Let _weakRef_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakRef.prototype%"*, « [[WeakRefTarget]] »). 1. Perform AddToKeptObjects(_target_). 1. Set _weakRef_.[[WeakRefTarget]] to _target_. 1. Return _weakRef_. @@ -43335,7 +43335,7 @@

        FinalizationRegistry ( _cleanupCallback_ )

        1. If NewTarget is *undefined*, throw a *TypeError* exception. 1. If IsCallable(_cleanupCallback_) is *false*, throw a *TypeError* exception. - 1. Let _finalizationRegistry_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%FinalizationRegistry.prototype%"*, « [[Realm]], [[CleanupCallback]], [[Cells]] »). + 1. Let _finalizationRegistry_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%FinalizationRegistry.prototype%"*, « [[Realm]], [[CleanupCallback]], [[Cells]] »). 1. Let _fn_ be the active function object. 1. Set _finalizationRegistry_.[[Realm]] to _fn_.[[Realm]]. 1. Set _finalizationRegistry_.[[CleanupCallback]] to HostMakeJobCallback(_cleanupCallback_). @@ -43724,7 +43724,7 @@

        It is used to create an async Iterator Record from a synchronous Iterator Record.
        - 1. Let _asyncIterator_ be OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »). + 1. Let _asyncIterator_ be OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »). 1. Set _asyncIterator_.[[SyncIteratorRecord]] to _syncIteratorRecord_. 1. Let _nextMethod_ be ! Get(_asyncIterator_, *"next"*). 1. Let _iteratorRecord_ be the Iterator Record { [[Iterator]]: _asyncIterator_, [[NextMethod]]: _nextMethod_, [[Done]]: *false* }. @@ -43770,15 +43770,15 @@

        %AsyncFromSyncIteratorPrototype%.return ( [ _value_ ] )

        1. IfAbruptRejectPromise(_return_, _promiseCapability_). 1. If _return_ is *undefined*, then 1. Let _iterResult_ be CreateIterResultObject(_value_, *true*). - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iterResult_ »). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iterResult_ »). 1. Return _promiseCapability_.[[Promise]]. 1. If _value_ is present, then - 1. Let _result_ be Completion(Call(_return_, _syncIterator_, « _value_ »)). + 1. Let _result_ be Completion(Call(_return_, _syncIterator_, « _value_ »)). 1. Else, 1. Let _result_ be Completion(Call(_return_, _syncIterator_)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). 1. If _result_ is not an Object, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). 1. Return _promiseCapability_.[[Promise]]. 1. Return AsyncFromSyncIteratorContinuation(_result_, _promiseCapability_).
        @@ -43796,15 +43796,15 @@

        %AsyncFromSyncIteratorPrototype%.throw ( [ _value_ ] )

        1. Let _throw_ be Completion(GetMethod(_syncIterator_, *"throw"*)). 1. IfAbruptRejectPromise(_throw_, _promiseCapability_). 1. If _throw_ is *undefined*, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _value_ »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _value_ »). 1. Return _promiseCapability_.[[Promise]]. 1. If _value_ is present, then - 1. Let _result_ be Completion(Call(_throw_, _syncIterator_, « _value_ »)). + 1. Let _result_ be Completion(Call(_throw_, _syncIterator_, « _value_ »)). 1. Else, 1. Let _result_ be Completion(Call(_throw_, _syncIterator_)). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). 1. If _result_ is not an Object, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). 1. Return _promiseCapability_.[[Promise]]. 1. Return AsyncFromSyncIteratorContinuation(_result_, _promiseCapability_).
        @@ -43864,7 +43864,7 @@

        1. IfAbruptRejectPromise(_valueWrapper_, _promiseCapability_). 1. Let _unwrap_ be a new Abstract Closure with parameters (_value_) that captures _done_ and performs the following steps when called: 1. Return CreateIterResultObject(_value_, _done_). - 1. Let _onFulfilled_ be CreateBuiltinFunction(_unwrap_, 1, *""*, « »). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_unwrap_, 1, *""*, « »). 1. NOTE: _onFulfilled_ is used when processing the *"value"* property of an IteratorResult object in order to wait for its value if it is a promise and re-package the result in a new "unwrapped" IteratorResult object. 1. Perform PerformPromiseThen(_valueWrapper_, _onFulfilled_, *undefined*, _promiseCapability_). 1. Return _promiseCapability_.[[Promise]]. @@ -43889,7 +43889,7 @@

        Promise Objects

      A promise is said to be settled if it is not pending, i.e. if it is either fulfilled or rejected.

      -

      A promise is resolved if it is settled or if it has been “locked in” to match the state of another promise. Attempting to resolve or reject a resolved promise has no effect. A promise is unresolved if it is not resolved. An unresolved promise is always in the pending state. A resolved promise may be pending, fulfilled or rejected.

      +

      A promise is resolved if it is settled or if it has been “locked in” to match the state of another promise. Attempting to resolve or reject a resolved promise has no effect. A promise is unresolved if it is not resolved. An unresolved promise is always in the pending state. A resolved promise may be pending, fulfilled or rejected.

      Promise Abstract Operations

      @@ -43957,7 +43957,7 @@

      IfAbruptRejectPromise ( _value_, _capability_ )

      1. Assert: _value_ is a Completion Record. 1. If _value_ is an abrupt completion, then - 1. Perform ? Call(_capability_.[[Reject]], *undefined*, « _value_.[[Value]] »). + 1. Perform ? Call(_capability_.[[Reject]], *undefined*, « _value_.[[Value]] »). 1. Return _capability_.[[Promise]]. 1. Else, set _value_ to _value_.[[Value]]. @@ -44030,12 +44030,12 @@

      1. Let _alreadyResolved_ be the Record { [[Value]]: *false* }. 1. Let _stepsResolve_ be the algorithm steps defined in . 1. Let _lengthResolve_ be the number of non-optional parameters of the function definition in . - 1. Let _resolve_ be CreateBuiltinFunction(_stepsResolve_, _lengthResolve_, *""*, « [[Promise]], [[AlreadyResolved]] »). + 1. Let _resolve_ be CreateBuiltinFunction(_stepsResolve_, _lengthResolve_, *""*, « [[Promise]], [[AlreadyResolved]] »). 1. Set _resolve_.[[Promise]] to _promise_. 1. Set _resolve_.[[AlreadyResolved]] to _alreadyResolved_. 1. Let _stepsReject_ be the algorithm steps defined in . 1. Let _lengthReject_ be the number of non-optional parameters of the function definition in . - 1. Let _reject_ be CreateBuiltinFunction(_stepsReject_, _lengthReject_, *""*, « [[Promise]], [[AlreadyResolved]] »). + 1. Let _reject_ be CreateBuiltinFunction(_stepsReject_, _lengthReject_, *""*, « [[Promise]], [[AlreadyResolved]] »). 1. Set _reject_.[[Promise]] to _promise_. 1. Set _reject_.[[AlreadyResolved]] to _alreadyResolved_. 1. Return the Record { [[Resolve]]: _resolve_, [[Reject]]: _reject_ }. @@ -44134,8 +44134,8 @@

      1. Set _promiseCapability_.[[Resolve]] to _resolve_. 1. Set _promiseCapability_.[[Reject]] to _reject_. 1. Return *undefined*. - 1. Let _executor_ be CreateBuiltinFunction(_executorClosure_, 2, *""*, « »). - 1. Let _promise_ be ? Construct(_C_, « _executor_ »). + 1. Let _executor_ be CreateBuiltinFunction(_executorClosure_, 2, *""*, « »). + 1. Let _promise_ be ? Construct(_C_, « _executor_ »). 1. If IsCallable(_promiseCapability_.[[Resolve]]) is *false*, throw a *TypeError* exception. 1. If IsCallable(_promiseCapability_.[[Reject]]) is *false*, throw a *TypeError* exception. 1. Set _promiseCapability_.[[Promise]] to _promise_. @@ -44262,15 +44262,15 @@

      1. Else, 1. Assert: _type_ is ~Reject~. 1. Let _handlerResult_ be ThrowCompletion(_argument_). - 1. Else, let _handlerResult_ be Completion(HostCallJobCallback(_handler_, *undefined*, « _argument_ »)). + 1. Else, let _handlerResult_ be Completion(HostCallJobCallback(_handler_, *undefined*, « _argument_ »)). 1. If _promiseCapability_ is *undefined*, then 1. Assert: _handlerResult_ is not an abrupt completion. 1. Return ~empty~. 1. Assert: _promiseCapability_ is a PromiseCapability Record. 1. If _handlerResult_ is an abrupt completion, then - 1. Return ? Call(_promiseCapability_.[[Reject]], *undefined*, « _handlerResult_.[[Value]] »). + 1. Return ? Call(_promiseCapability_.[[Reject]], *undefined*, « _handlerResult_.[[Value]] »). 1. Else, - 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _handlerResult_.[[Value]] »). + 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _handlerResult_.[[Value]] »). 1. Let _handlerRealm_ be *null*. 1. If _reaction_.[[Handler]] is not ~empty~, then 1. Let _getHandlerRealmResult_ be Completion(GetFunctionRealm(_reaction_.[[Handler]].[[Callback]])). @@ -44294,9 +44294,9 @@

      1. Let _job_ be a new Job Abstract Closure with no parameters that captures _promiseToResolve_, _thenable_, and _then_ and performs the following steps when called: 1. Let _resolvingFunctions_ be CreateResolvingFunctions(_promiseToResolve_). - 1. Let _thenCallResult_ be Completion(HostCallJobCallback(_then_, _thenable_, « _resolvingFunctions_.[[Resolve]], _resolvingFunctions_.[[Reject]] »)). + 1. Let _thenCallResult_ be Completion(HostCallJobCallback(_then_, _thenable_, « _resolvingFunctions_.[[Resolve]], _resolvingFunctions_.[[Reject]] »)). 1. If _thenCallResult_ is an abrupt completion, then - 1. Return ? Call(_resolvingFunctions_.[[Reject]], *undefined*, « _thenCallResult_.[[Value]] »). + 1. Return ? Call(_resolvingFunctions_.[[Reject]], *undefined*, « _thenCallResult_.[[Value]] »). 1. Return ? _thenCallResult_. 1. Let _getThenRealmResult_ be Completion(GetFunctionRealm(_then_.[[Callback]])). 1. If _getThenRealmResult_ is a normal completion, let _thenRealm_ be _getThenRealmResult_.[[Value]]. @@ -44327,15 +44327,15 @@

      Promise ( _executor_ )

      1. If NewTarget is *undefined*, throw a *TypeError* exception. 1. If IsCallable(_executor_) is *false*, throw a *TypeError* exception. - 1. Let _promise_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Promise.prototype%"*, « [[PromiseState]], [[PromiseResult]], [[PromiseFulfillReactions]], [[PromiseRejectReactions]], [[PromiseIsHandled]] »). + 1. Let _promise_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Promise.prototype%"*, « [[PromiseState]], [[PromiseResult]], [[PromiseFulfillReactions]], [[PromiseRejectReactions]], [[PromiseIsHandled]] »). 1. Set _promise_.[[PromiseState]] to ~pending~. 1. Set _promise_.[[PromiseFulfillReactions]] to a new empty List. 1. Set _promise_.[[PromiseRejectReactions]] to a new empty List. 1. Set _promise_.[[PromiseIsHandled]] to *false*. 1. Let _resolvingFunctions_ be CreateResolvingFunctions(_promise_). - 1. Let _completion_ be Completion(Call(_executor_, *undefined*, « _resolvingFunctions_.[[Resolve]], _resolvingFunctions_.[[Reject]] »)). + 1. Let _completion_ be Completion(Call(_executor_, *undefined*, « _resolvingFunctions_.[[Resolve]], _resolvingFunctions_.[[Reject]] »)). 1. If _completion_ is an abrupt completion, then - 1. Perform ? Call(_resolvingFunctions_.[[Reject]], *undefined*, « _completion_.[[Value]] »). + 1. Perform ? Call(_resolvingFunctions_.[[Reject]], *undefined*, « _completion_.[[Value]] »). 1. Return _promise_. @@ -44414,23 +44414,23 @@

      1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] is 0, then 1. Let _valuesArray_ be CreateArrayFromList(_values_). - 1. Perform ? Call(_resultCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). + 1. Perform ? Call(_resultCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return _resultCapability_.[[Promise]]. 1. Let _nextValue_ be Completion(IteratorValue(_next_)). 1. If _nextValue_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*. 1. ReturnIfAbrupt(_nextValue_). 1. Append *undefined* to _values_. - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). 1. Let _steps_ be the algorithm steps defined in . 1. Let _length_ be the number of non-optional parameters of the function definition in . - 1. Let _onFulfilled_ be CreateBuiltinFunction(_steps_, _length_, *""*, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_steps_, _length_, *""*, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »). 1. Set _onFulfilled_.[[AlreadyCalled]] to *false*. 1. Set _onFulfilled_.[[Index]] to _index_. 1. Set _onFulfilled_.[[Values]] to _values_. 1. Set _onFulfilled_.[[Capability]] to _resultCapability_. 1. Set _onFulfilled_.[[RemainingElements]] to _remainingElementsCount_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] + 1. - 1. Perform ? Invoke(_nextPromise_, *"then"*, « _onFulfilled_, _resultCapability_.[[Reject]] »). + 1. Perform ? Invoke(_nextPromise_, *"then"*, « _onFulfilled_, _resultCapability_.[[Reject]] »). 1. Set _index_ to _index_ + 1. @@ -44451,7 +44451,7 @@

      `Promise.all` Resolve Element Functions

      1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] is 0, then 1. Let _valuesArray_ be CreateArrayFromList(_values_). - 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). + 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return *undefined*.

      The *"length"* property of a `Promise.all` resolve element function is *1*𝔽.

      @@ -44502,16 +44502,16 @@

      1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] is 0, then 1. Let _valuesArray_ be CreateArrayFromList(_values_). - 1. Perform ? Call(_resultCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). + 1. Perform ? Call(_resultCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return _resultCapability_.[[Promise]]. 1. Let _nextValue_ be Completion(IteratorValue(_next_)). 1. If _nextValue_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*. 1. ReturnIfAbrupt(_nextValue_). 1. Append *undefined* to _values_. - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). 1. Let _stepsFulfilled_ be the algorithm steps defined in . 1. Let _lengthFulfilled_ be the number of non-optional parameters of the function definition in . - 1. Let _onFulfilled_ be CreateBuiltinFunction(_stepsFulfilled_, _lengthFulfilled_, *""*, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_stepsFulfilled_, _lengthFulfilled_, *""*, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »). 1. Let _alreadyCalled_ be the Record { [[Value]]: *false* }. 1. Set _onFulfilled_.[[AlreadyCalled]] to _alreadyCalled_. 1. Set _onFulfilled_.[[Index]] to _index_. @@ -44520,14 +44520,14 @@

      1. Set _onFulfilled_.[[RemainingElements]] to _remainingElementsCount_. 1. Let _stepsRejected_ be the algorithm steps defined in . 1. Let _lengthRejected_ be the number of non-optional parameters of the function definition in . - 1. Let _onRejected_ be CreateBuiltinFunction(_stepsRejected_, _lengthRejected_, *""*, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »). + 1. Let _onRejected_ be CreateBuiltinFunction(_stepsRejected_, _lengthRejected_, *""*, « [[AlreadyCalled]], [[Index]], [[Values]], [[Capability]], [[RemainingElements]] »). 1. Set _onRejected_.[[AlreadyCalled]] to _alreadyCalled_. 1. Set _onRejected_.[[Index]] to _index_. 1. Set _onRejected_.[[Values]] to _values_. 1. Set _onRejected_.[[Capability]] to _resultCapability_. 1. Set _onRejected_.[[RemainingElements]] to _remainingElementsCount_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] + 1. - 1. Perform ? Invoke(_nextPromise_, *"then"*, « _onFulfilled_, _onRejected_ »). + 1. Perform ? Invoke(_nextPromise_, *"then"*, « _onFulfilled_, _onRejected_ »). 1. Set _index_ to _index_ + 1. @@ -44552,7 +44552,7 @@

      `Promise.allSettled` Resolve Element Functions

      1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] is 0, then 1. Let _valuesArray_ be CreateArrayFromList(_values_). - 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). + 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return *undefined*.

      The *"length"* property of a `Promise.allSettled` resolve element function is *1*𝔽.

      @@ -44578,7 +44578,7 @@

      `Promise.allSettled` Reject Element Functions

      1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] - 1. 1. If _remainingElementsCount_.[[Value]] is 0, then 1. Let _valuesArray_ be CreateArrayFromList(_values_). - 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). + 1. Return ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _valuesArray_ »). 1. Return *undefined*.

      The *"length"* property of a `Promise.allSettled` reject element function is *1*𝔽.

      @@ -44636,17 +44636,17 @@

      1. If _nextValue_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*. 1. ReturnIfAbrupt(_nextValue_). 1. Append *undefined* to _errors_. - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). 1. Let _stepsRejected_ be the algorithm steps defined in . 1. Let _lengthRejected_ be the number of non-optional parameters of the function definition in . - 1. Let _onRejected_ be CreateBuiltinFunction(_stepsRejected_, _lengthRejected_, *""*, « [[AlreadyCalled]], [[Index]], [[Errors]], [[Capability]], [[RemainingElements]] »). + 1. Let _onRejected_ be CreateBuiltinFunction(_stepsRejected_, _lengthRejected_, *""*, « [[AlreadyCalled]], [[Index]], [[Errors]], [[Capability]], [[RemainingElements]] »). 1. Set _onRejected_.[[AlreadyCalled]] to *false*. 1. Set _onRejected_.[[Index]] to _index_. 1. Set _onRejected_.[[Errors]] to _errors_. 1. Set _onRejected_.[[Capability]] to _resultCapability_. 1. Set _onRejected_.[[RemainingElements]] to _remainingElementsCount_. 1. Set _remainingElementsCount_.[[Value]] to _remainingElementsCount_.[[Value]] + 1. - 1. Perform ? Invoke(_nextPromise_, *"then"*, « _resultCapability_.[[Resolve]], _onRejected_ »). + 1. Perform ? Invoke(_nextPromise_, *"then"*, « _resultCapability_.[[Resolve]], _onRejected_ »). 1. Set _index_ to _index_ + 1. @@ -44668,7 +44668,7 @@

      `Promise.any` Reject Element Functions

      1. If _remainingElementsCount_.[[Value]] is 0, then 1. Let _error_ be a newly created *AggregateError* object. 1. Perform ! DefinePropertyOrThrow(_error_, *"errors"*, PropertyDescriptor { [[Configurable]]: *true*, [[Enumerable]]: *false*, [[Writable]]: *true*, [[Value]]: CreateArrayFromList(_errors_) }). - 1. Return ? Call(_promiseCapability_.[[Reject]], *undefined*, « _error_ »). + 1. Return ? Call(_promiseCapability_.[[Reject]], *undefined*, « _error_ »). 1. Return *undefined*.

      The *"length"* property of a `Promise.any` reject element function is *1*𝔽.

      @@ -44726,8 +44726,8 @@

      1. Let _nextValue_ be Completion(IteratorValue(_next_)). 1. If _nextValue_ is an abrupt completion, set _iteratorRecord_.[[Done]] to *true*. 1. ReturnIfAbrupt(_nextValue_). - 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). - 1. Perform ? Invoke(_nextPromise_, *"then"*, « _resultCapability_.[[Resolve]], _resultCapability_.[[Reject]] »). + 1. Let _nextPromise_ be ? Call(_promiseResolve_, _constructor_, « _nextValue_ »). + 1. Perform ? Invoke(_nextPromise_, *"then"*, « _resultCapability_.[[Resolve]], _resultCapability_.[[Reject]] »). @@ -44738,7 +44738,7 @@

      Promise.reject ( _r_ )

      1. Let _C_ be the *this* value. 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). - 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _r_ »). + 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _r_ »). 1. Return _promiseCapability_.[[Promise]]. @@ -44774,7 +44774,7 @@

      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. Perform ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _x_ »). 1. Return _promiseCapability_.[[Promise]]. @@ -44808,7 +44808,7 @@

      Promise.prototype.catch ( _onRejected_ )

      This method performs the following steps when called:

      1. Let _promise_ be the *this* value. - 1. Return ? Invoke(_promise_, *"then"*, « *undefined*, _onRejected_ »). + 1. Return ? Invoke(_promise_, *"then"*, « *undefined*, _onRejected_ »).
      @@ -44834,18 +44834,18 @@

      Promise.prototype.finally ( _onFinally_ )

      1. Let _promise_ be ? PromiseResolve(_C_, _result_). 1. Let _returnValue_ be a new Abstract Closure with no parameters that captures _value_ and performs the following steps when called: 1. Return _value_. - 1. Let _valueThunk_ be CreateBuiltinFunction(_returnValue_, 0, *""*, « »). - 1. Return ? Invoke(_promise_, *"then"*, « _valueThunk_ »). - 1. Let _thenFinally_ be CreateBuiltinFunction(_thenFinallyClosure_, 1, *""*, « »). + 1. Let _valueThunk_ be CreateBuiltinFunction(_returnValue_, 0, *""*, « »). + 1. Return ? Invoke(_promise_, *"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 _result_ be ? Call(_onFinally_, *undefined*). 1. Let _promise_ be ? PromiseResolve(_C_, _result_). 1. Let _throwReason_ be a new Abstract Closure with no parameters that captures _reason_ and performs the following steps when called: 1. Return ThrowCompletion(_reason_). - 1. Let _thrower_ be CreateBuiltinFunction(_throwReason_, 0, *""*, « »). - 1. Return ? Invoke(_promise_, *"then"*, « _thrower_ »). - 1. Let _catchFinally_ be CreateBuiltinFunction(_catchFinallyClosure_, 1, *""*, « »). - 1. Return ? Invoke(_promise_, *"then"*, « _thenFinally_, _catchFinally_ »). + 1. Let _thrower_ be CreateBuiltinFunction(_throwReason_, 0, *""*, « »). + 1. Return ? Invoke(_promise_, *"then"*, « _thrower_ »). + 1. Let _catchFinally_ be CreateBuiltinFunction(_catchFinallyClosure_, 1, *""*, « »). + 1. Return ? Invoke(_promise_, *"then"*, « _thenFinally_, _catchFinally_ »). @@ -44871,7 +44871,7 @@

      description
      -
      It performs the “then” operation on _promise_ using _onFulfilled_ and _onRejected_ as its settlement actions. If _resultCapability_ is passed, the result is stored by updating _resultCapability_'s promise. If it is not passed, then PerformPromiseThen is being called by a specification-internal operation where the result does not matter.
      +
      It performs the “then” operation on _promise_ using _onFulfilled_ and _onRejected_ as its settlement actions. If _resultCapability_ is passed, the result is stored by updating _resultCapability_'s promise. If it is not passed, then PerformPromiseThen is being called by a specification-internal operation where the result does not matter.
      1. Assert: IsPromise(_promise_) is *true*. @@ -45005,12 +45005,12 @@

      The GeneratorFunction Constructor

      • is %GeneratorFunction%.
      • is a subclass of `Function`.
      • -
      • creates and initializes a new GeneratorFunction when called as a function rather than as a constructor. Thus the function call `GeneratorFunction (…)` is equivalent to the object creation expression `new GeneratorFunction (…)` with the same arguments.
      • +
      • creates and initializes a new GeneratorFunction when called as a function rather than as a constructor. Thus the function call `GeneratorFunction (…)` is equivalent to the object creation expression `new GeneratorFunction (…)` with the same arguments.
      • may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified GeneratorFunction behaviour must include a `super` call to the GeneratorFunction constructor to create and initialize subclass instances with the internal slots necessary for built-in GeneratorFunction behaviour. All ECMAScript syntactic forms for defining generator function objects create direct instances of GeneratorFunction. There is no syntactic means to create instances of GeneratorFunction subclasses.
      -

      GeneratorFunction ( _p1_, _p2_, … , _pn_, _body_ )

      +

      GeneratorFunction ( _p1_, _p2_, … , _pn_, _body_ )

      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:

      @@ -45116,7 +45116,7 @@

      The AsyncGeneratorFunction Constructor

    -

    AsyncGeneratorFunction ( _p1_, _p2_, … , _pn_, _body_ )

    +

    AsyncGeneratorFunction ( _p1_, _p2_, … , _pn_, _body_ )

    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:

    @@ -45495,7 +45495,7 @@

    1. NOTE: _closure_ can contain uses of the Yield shorthand to yield an IteratorResult object. - 1. Let _internalSlotsList_ be « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] ». + 1. Let _internalSlotsList_ be « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] ». 1. Let _generator_ be OrdinaryObjectCreate(_generatorPrototype_, _internalSlotsList_). 1. Set _generator_.[[GeneratorBrand]] to _generatorBrand_. 1. Set _generator_.[[GeneratorState]] to *undefined*. @@ -45547,7 +45547,7 @@

    AsyncGenerator.prototype.next ( _value_ )

    1. Let _state_ be _generator_.[[AsyncGeneratorState]]. 1. If _state_ is ~completed~, then 1. Let _iteratorResult_ be CreateIterResultObject(*undefined*, *true*). - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iteratorResult_ »). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iteratorResult_ »). 1. Return _promiseCapability_.[[Promise]]. 1. Let _completion_ be NormalCompletion(_value_). 1. Perform AsyncGeneratorEnqueue(_generator_, _completion_, _promiseCapability_). @@ -45592,7 +45592,7 @@

    AsyncGenerator.prototype.throw ( _exception_ )

    1. Set _generator_.[[AsyncGeneratorState]] to ~completed~. 1. Set _state_ to ~completed~. 1. If _state_ is ~completed~, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _exception_ »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _exception_ »). 1. Return _promiseCapability_.[[Promise]]. 1. Let _completion_ be ThrowCompletion(_exception_). 1. Perform AsyncGeneratorEnqueue(_generator_, _completion_, _promiseCapability_). @@ -45761,7 +45761,7 @@

    1. Let _promiseCapability_ be _next_.[[Capability]]. 1. Let _value_ be _completion_.[[Value]]. 1. If _completion_.[[Type]] is ~throw~, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _value_ »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _value_ »). 1. Else, 1. Assert: _completion_.[[Type]] is ~normal~. 1. If _realm_ is present, then @@ -45771,7 +45771,7 @@

    1. Set the running execution context's Realm to _oldRealm_. 1. Else, 1. Let _iteratorResult_ be CreateIterResultObject(_value_, _done_). - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iteratorResult_ »). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iteratorResult_ »). 1. Return ~unused~. @@ -45873,14 +45873,14 @@

    1. Perform AsyncGeneratorCompleteStep(_generator_, _result_, *true*). 1. Perform AsyncGeneratorDrainQueue(_generator_). 1. Return *undefined*. - 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 1, *""*, « »). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 1, *""*, « »). 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_reason_) that captures _generator_ and performs the following steps when called: 1. Set _generator_.[[AsyncGeneratorState]] to ~completed~. 1. Let _result_ be ThrowCompletion(_reason_). 1. Perform AsyncGeneratorCompleteStep(_generator_, _result_, *true*). 1. Perform AsyncGeneratorDrainQueue(_generator_). 1. Return *undefined*. - 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). + 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). 1. Perform PerformPromiseThen(_promise_, _onFulfilled_, _onRejected_). 1. Return ~unused~. @@ -45929,7 +45929,7 @@

    1. NOTE: _closure_ can contain uses of the Await shorthand and uses of the Yield shorthand to yield an IteratorResult object. - 1. Let _internalSlotsList_ be « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] ». + 1. Let _internalSlotsList_ be « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] ». 1. Let _generator_ be OrdinaryObjectCreate(_generatorPrototype_, _internalSlotsList_). 1. Set _generator_.[[GeneratorBrand]] to _generatorBrand_. 1. Set _generator_.[[AsyncGeneratorState]] to *undefined*. @@ -45959,12 +45959,12 @@

    The AsyncFunction Constructor

    • is %AsyncFunction%.
    • is a subclass of `Function`.
    • -
    • creates and initializes a new AsyncFunction when called as a function rather than as a constructor. Thus the function call `AsyncFunction(…)` is equivalent to the object creation expression `new AsyncFunction(…)` with the same arguments.
    • +
    • creates and initializes a new AsyncFunction when called as a function rather than as a constructor. Thus the function call `AsyncFunction(…)` is equivalent to the object creation expression `new AsyncFunction(…)` with the same arguments.
    • may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified AsyncFunction behaviour must include a `super` call to the AsyncFunction constructor to create and initialize a subclass instance with the internal slots necessary for built-in async function behaviour. All ECMAScript syntactic forms for defining async function objects create direct instances of AsyncFunction. There is no syntactic means to create instances of AsyncFunction subclasses.
    -

    AsyncFunction ( _p1_, _p2_, … , _pn_, _body_ )

    +

    AsyncFunction ( _p1_, _p2_, … , _pn_, _body_ )

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

    This function performs the following steps when called:

    @@ -46085,12 +46085,12 @@

    1. Assert: If we return here, the async function either threw an exception or performed an implicit or explicit return; all awaiting is done. 1. Remove _asyncContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context. 1. If _result_.[[Type]] is ~normal~, then - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « *undefined* »). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « *undefined* »). 1. Else if _result_.[[Type]] is ~return~, then - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _result_.[[Value]] »). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _result_.[[Value]] »). 1. Else, 1. Assert: _result_.[[Type]] is ~throw~. - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _result_.[[Value]] »). + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _result_.[[Value]] »). 1. [id="step-asyncblockstart-return-undefined"] Return ~unused~. 1. Push _asyncContext_ onto the execution context stack; _asyncContext_ is now the running execution context. 1. Resume the suspended evaluation of _asyncContext_. Let _result_ be the value returned by the resumed computation. @@ -46309,7 +46309,7 @@

    Proxy.revocable ( _target_, _handler_ )

    1. Set _p_.[[ProxyTarget]] to *null*. 1. Set _p_.[[ProxyHandler]] to *null*. 1. Return *undefined*. - 1. Let _revoker_ be CreateBuiltinFunction(_revokerClosure_, 0, *""*, « [[RevocableProxy]] »). + 1. Let _revoker_ be CreateBuiltinFunction(_revokerClosure_, 0, *""*, « [[RevocableProxy]] »). 1. Set _revoker_.[[RevocableProxy]] to _p_. 1. Let _result_ be OrdinaryObjectCreate(%Object.prototype%). 1. Perform ! CreateDataPropertyOrThrow(_result_, *"proxy"*, _p_). @@ -46808,9 +46808,9 @@

    Valid Chosen Reads

    1. Let _readValue_ be ValueOfReadEvent(_execution_, _R_). 1. Let _chosenLen_ be the number of elements of _chosenValue_. 1. Let _readLen_ be the number of elements of _readValue_. - 1. If _chosenLen_ ≠ _readLen_, then + 1. If _chosenLen_ ≠ _readLen_, then 1. Return *false*. - 1. If _chosenValue_[_i_] ≠ _readValue_[_i_] for some integer _i_ in the interval from 0 (inclusive) to _chosenLen_ (exclusive), then + 1. If _chosenValue_[_i_] ≠ _readValue_[_i_] for some integer _i_ in the interval from 0 (inclusive) to _chosenLen_ (exclusive), then 1. Return *false*. 1. Return *true*.
    @@ -47609,7 +47609,7 @@

    Static Semantics: Early Errors

    Static Semantics: CountLeftCapturingParensWithin and CountLeftCapturingParensBefore

    -

    In the definitions of CountLeftCapturingParensWithin and CountLeftCapturingParensBefore, references to “Atom :: `(` GroupSpecifier? Disjunction `)` ” are to be interpreted as meaning “Atom :: `(` GroupSpecifier? Disjunction `)` ” or “ExtendedAtom :: `(` GroupSpecifier? Disjunction `)` ”.

    +

    In the definitions of CountLeftCapturingParensWithin and CountLeftCapturingParensBefore, references to “Atom :: `(` GroupSpecifier? Disjunction `)` ” are to be interpreted as meaning “Atom :: `(` GroupSpecifier? Disjunction `)` ” or “ExtendedAtom :: `(` GroupSpecifier? Disjunction `)` ”.

    @@ -47820,15 +47820,15 @@

    unescape ( _string_ )

    1. Let _length_ be the length of _string_. 1. Let _R_ be the empty String. 1. Let _k_ be 0. - 1. Repeat, while _k_ ≠ _length_, + 1. Repeat, while _k_ ≠ _length_, 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 _hexEscape_ be the empty String. 1. Let _skip_ be 0. - 1. If _k_ ≤ _length_ - 6 and the code unit at index _k_ + 1 within _string_ is the code unit 0x0075 (LATIN SMALL LETTER U), then + 1. If _k_ ≤ _length_ - 6 and the code unit at index _k_ + 1 within _string_ is the code unit 0x0075 (LATIN SMALL LETTER U), then 1. Set _hexEscape_ to the substring of _string_ from _k_ + 2 to _k_ + 6. 1. Set _skip_ to 5. - 1. Else if _k_ ≤ _length_ - 3, then + 1. Else if _k_ ≤ _length_ - 3, then 1. Set _hexEscape_ to the substring of _string_ from _k_ + 1 to _k_ + 3. 1. Set _skip_ to 2. 1. If _hexEscape_ can be interpreted as an expansion of |HexDigits[~Sep]|, then @@ -47855,7 +47855,7 @@

    String.prototype.substr ( _start_, _length_ )

    1. Let _S_ be ? ToString(_O_). 1. Let _size_ be the length of _S_. 1. Let _intStart_ be ? ToIntegerOrInfinity(_start_). - 1. If _intStart_ is -∞, set _intStart_ to 0. + 1. If _intStart_ is -∞, set _intStart_ to 0. 1. Else if _intStart_ < 0, set _intStart_ to max(_size_ + _intStart_, 0). 1. Else, set _intStart_ to min(_intStart_, _size_). 1. If _length_ is *undefined*, let _intLength_ be _size_; otherwise let _intLength_ be ? ToIntegerOrInfinity(_length_). @@ -47902,9 +47902,9 @@

    * the code unit 0x0022 (QUOTATION MARK) * _escapedV_ * the code unit 0x0022 (QUOTATION MARK) - 1. Let _p2_ be the string-concatenation of _p1_ and *">"*. + 1. Let _p2_ be the string-concatenation of _p1_ and *">"*. 1. Let _p3_ be the string-concatenation of _p2_ and _S_. - 1. Let _p4_ be the string-concatenation of _p3_, *"</"*, _tag_, and *">"*. + 1. Let _p4_ be the string-concatenation of _p3_, *"</"*, _tag_, and *">"*. 1. Return _p4_. @@ -48041,7 +48041,7 @@

    Additional Properties of the Date.prototype Object

    Date.prototype.getYear ( )

    -

    The `getFullYear` method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”

    +

    The `getFullYear` method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”

    This method performs the following steps when called:

    @@ -48054,7 +48054,7 @@

    Date.prototype.getYear ( )

    Date.prototype.setYear ( _year_ )

    -

    The `setFullYear` method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”

    +

    The `setFullYear` method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”

    This method performs the following steps when called:

    @@ -48065,7 +48065,7 @@

    Date.prototype.setYear ( _year_ )

    1. Set the [[DateValue]] internal slot of this Date object to *NaN*. 1. Return *NaN*. 1. Let _yi_ be ! ToIntegerOrInfinity(_y_). - 1. If 0 ≤ _yi_ ≤ 99, let _yyyy_ be *1900*𝔽 + 𝔽(_yi_). + 1. If 0 ≤ _yi_ ≤ 99, let _yyyy_ be *1900*𝔽 + 𝔽(_yi_). 1. Else, let _yyyy_ be _y_. 1. Let _d_ be MakeDay(_yyyy_, MonthFromTime(_t_), DateFromTime(_t_)). 1. Let _date_ be UTC(MakeDate(_d_, TimeWithinDay(_t_))). @@ -48387,7 +48387,7 @@

    Initializers in ForIn Statement Heads

    The static semantics of ContainsUndefinedContinueTarget in are augmented with the following:

    ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement - 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ». + 1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ».

    The static semantics of IsDestructuring in are augmented with the following:

    @@ -48409,7 +48409,7 @@

    Initializers in ForIn Statement Heads

    The static semantics of VarScopedDeclarations in are augmented with the following:

    ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement - 1. Let _declarations1_ be « |BindingIdentifier| ». + 1. Let _declarations1_ be « |BindingIdentifier| ». 1. Let _declarations2_ be the VarScopedDeclarations of |Statement|. 1. Return the list-concatenation of _declarations1_ and _declarations2_. @@ -48424,7 +48424,7 @@

    Initializers in ForIn Statement Heads

    1. Let _rhs_ be ? Evaluation of |Initializer|. 1. Let _value_ be ? GetValue(_rhs_). 1. Perform ? PutValue(_lhs_, _value_). - 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |Expression|, ~enumerate~). + 1. Let _keyResult_ be ? ForIn/OfHeadEvaluation(« », |Expression|, ~enumerate~). 1. Return ? ForIn/OfBodyEvaluation(|BindingIdentifier|, |Statement|, _keyResult_, ~enumerate~, ~varBinding~, _labelSet_).
    @@ -48604,7 +48604,7 @@

    Additions and Changes That Introduce Incompatibilities with Prior Editions: In ECMAScript 2015, ToNumber applied to a String value now recognizes and converts |BinaryIntegerLiteral| and |OctalIntegerLiteral| numeric strings. In previous editions such strings were converted to *NaN*.

    : In ECMAScript 2018, Template objects are canonicalized based on Parse Node (source location), instead of across all occurrences of that template literal or tagged template in a Realm in previous editions.

    : In ECMAScript 2016, Unicode 8.0.0 or higher is mandated, as opposed to ECMAScript 2015 which mandated Unicode 5.1. In particular, this caused U+180E MONGOLIAN VOWEL SEPARATOR, which was in the `Space_Separator` (`Zs`) category and thus treated as whitespace in ECMAScript 2015, to be moved to the `Format` (`Cf`) category (as of Unicode 6.3.0). This causes whitespace-sensitive methods to behave differently. For example, `"\u180E".trim().length` was `0` in previous editions, but `1` in ECMAScript 2016 and later. Additionally, ECMAScript 2017 mandated always using the latest version of the Unicode Standard.

    -

    : In ECMAScript 2015, the valid code points for an |IdentifierName| are specified in terms of the Unicode properties “ID_Start” and “ID_Continue”. In previous editions, the valid |IdentifierName| or |Identifier| code points were specified by enumerating various Unicode code point categories.

    +

    : In ECMAScript 2015, the valid code points for an |IdentifierName| are specified in terms of the Unicode properties “ID_Start” and “ID_Continue”. In previous editions, the valid |IdentifierName| or |Identifier| code points were specified by enumerating various Unicode code point categories.

    : In ECMAScript 2015, Automatic Semicolon Insertion adds a semicolon at the end of a do-while statement if the semicolon is missing. This change aligns the specification with the actual behaviour of most existing implementations.

    : In ECMAScript 2015, it is no longer an early error to have duplicate property names in Object Initializers.

    : In ECMAScript 2015, strict mode code containing an assignment to an immutable binding such as the function name of a |FunctionExpression| does not produce an early error. Instead it produces a runtime error.

    @@ -48648,7 +48648,7 @@

    Additions and Changes That Introduce Incompatibilities with Prior Editions

    Colophon

    This specification is authored on GitHub in a plaintext source format called Ecmarkup. Ecmarkup is an HTML and Markdown dialect that provides a framework and toolset for authoring ECMAScript specifications in plaintext and processing the specification into a full-featured HTML rendering that follows the editorial conventions for this document. Ecmarkup builds on and integrates a number of other formats and technologies including Grammarkdown for defining syntax and Ecmarkdown for authoring algorithm steps. PDF renderings of this specification are produced by printing the HTML rendering to a PDF.

    -

    Prior editions of this specification were authored using Word—the Ecmarkup source text that formed the basis of this edition was produced by converting the ECMAScript 2015 Word document to Ecmarkup using an automated conversion tool.

    +

    Prior editions of this specification were authored using Word—the Ecmarkup source text that formed the basis of this edition was produced by converting the ECMAScript 2015 Word document to Ecmarkup using an automated conversion tool.

    @@ -48661,49 +48661,49 @@

    Bibliography

  17. - The Unicode Standard, available at <https://unicode.org/versions/latest> + The Unicode Standard, available at <https://unicode.org/versions/latest>
  18. - Unicode Technical Note #5: Canonical Equivalence in Applications, available at <https://unicode.org/notes/tn5/> + Unicode Technical Note #5: Canonical Equivalence in Applications, available at <https://unicode.org/notes/tn5/>
  19. - Unicode Technical Standard #10: Unicode Collation Algorithm, available at <https://unicode.org/reports/tr10/> + Unicode Technical Standard #10: Unicode Collation Algorithm, available at <https://unicode.org/reports/tr10/>
  20. - Unicode Standard Annex #15, Unicode Normalization Forms, available at <https://unicode.org/reports/tr15/> + Unicode Standard Annex #15, Unicode Normalization Forms, available at <https://unicode.org/reports/tr15/>
  21. - Unicode Standard Annex #18: Unicode Regular Expressions, available at <https://unicode.org/reports/tr18/> + Unicode Standard Annex #18: Unicode Regular Expressions, available at <https://unicode.org/reports/tr18/>
  22. - Unicode Standard Annex #24: Unicode `Script` Property, available at <https://unicode.org/reports/tr24/> + Unicode Standard Annex #24: Unicode `Script` Property, available at <https://unicode.org/reports/tr24/>
  23. - Unicode Standard Annex #31, Unicode Identifiers and Pattern Syntax, available at <https://unicode.org/reports/tr31/> + Unicode Standard Annex #31, Unicode Identifiers and Pattern Syntax, available at <https://unicode.org/reports/tr31/>
  24. - Unicode Standard Annex #44: Unicode Character Database, available at <https://unicode.org/reports/tr44/> + Unicode Standard Annex #44: Unicode Character Database, available at <https://unicode.org/reports/tr44/>
  25. - Unicode Technical Standard #51: Unicode Emoji, available at <https://unicode.org/reports/tr51/> + Unicode Technical Standard #51: Unicode Emoji, available at <https://unicode.org/reports/tr51/>
  26. - IANA Time Zone Database, available at <https://www.iana.org/time-zones> + IANA Time Zone Database, available at <https://www.iana.org/time-zones>
  27. - ISO 8601:2004(E) Data elements and interchange formats — Information interchange — Representation of dates and times + ISO 8601:2004(E) Data elements and interchange formats — Information interchange — Representation of dates and times
  28. - RFC 1738 “Uniform Resource Locators (URL)”, available at <https://tools.ietf.org/html/rfc1738> + RFC 1738 “Uniform Resource Locators (URL)”, available at <https://tools.ietf.org/html/rfc1738>
  29. - RFC 2396 “Uniform Resource Identifiers (URI): Generic Syntax”, available at <https://tools.ietf.org/html/rfc2396> + RFC 2396 “Uniform Resource Identifiers (URI): Generic Syntax”, available at <https://tools.ietf.org/html/rfc2396>
  30. - RFC 3629 “UTF-8, a transformation format of ISO 10646”, available at <https://tools.ietf.org/html/rfc3629> + RFC 3629 “UTF-8, a transformation format of ISO 10646”, available at <https://tools.ietf.org/html/rfc3629>
  31. - RFC 7231 “Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content”, available at <https://tools.ietf.org/html/rfc7231> + RFC 7231 “Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content”, available at <https://tools.ietf.org/html/rfc7231>