diff --git a/spec.html b/spec.html index 419c7349a8d..a83d1c4d5f9 100644 --- a/spec.html +++ b/spec.html @@ -996,9 +996,16 @@

The String Type

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

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

- -

StringIndexOf ( _string_, _searchValue_, _fromIndex_ )

-

The abstract operation StringIndexOf takes arguments _string_ (a String), _searchValue_ (a String), and _fromIndex_ (a non-negative integer). It performs the following steps when called:

+ +

+ StringIndexOf ( + _string_: a String, + _searchValue_: a String, + _fromIndex_: a non-negative integer, + ) +

+
+
1. Assert: Type(_string_) is String. 1. Assert: Type(_searchValue_) is String. @@ -1526,27 +1533,45 @@

The Number Type

The Number::unit value is *1*𝔽.

- -

Number::unaryMinus ( _x_ )

-

The abstract operation Number::unaryMinus takes argument _x_ (a Number). It performs the following steps when called:

+ +

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

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

Number::bitwiseNOT ( _x_ )

-

The abstract operation Number::bitwiseNOT takes argument _x_ (a Number). It performs the following steps when called:

+ +

+ Number::bitwiseNOT ( + _x_: a Number, + ) +

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

Number::exponentiate ( _base_, _exponent_ )

-

The abstract operation Number::exponentiate takes arguments _base_ (a Number) and _exponent_ (a Number). It returns an implementation-approximated value representing the result of raising _base_ to the _exponent_ power. It performs the following steps when called:

+ +

+ Number::exponentiate ( + _base_: a Number, + _exponent_: a Number, + ) +

+
+
description
+
It returns an implementation-approximated value representing the result of raising _base_ to the _exponent_ power.
+
1. If _exponent_ is *NaN*, return *NaN*. 1. If _exponent_ is *+0*𝔽 or _exponent_ is *-0*𝔽, return *1*𝔽. @@ -1583,9 +1608,17 @@

Number::exponentiate ( _base_, _exponent_ )

- -

Number::multiply ( _x_, _y_ )

-

The abstract operation Number::multiply takes arguments _x_ (a Number) and _y_ (a Number). It performs multiplication according to the rules of IEEE 754-2019 binary double-precision arithmetic, producing the product of _x_ and _y_. It performs the following steps when called:

+ +

+ Number::multiply ( + _x_: a Number, + _y_: a Number, + ) +

+
+
description
+
It performs multiplication according to the rules of IEEE 754-2019 binary double-precision arithmetic, producing the product of _x_ and _y_.
+
1. If _x_ is *NaN* or _y_ is *NaN*, return *NaN*. 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, then @@ -1603,9 +1636,17 @@

Number::multiply ( _x_, _y_ )

- -

Number::divide ( _x_, _y_ )

-

The abstract operation Number::divide takes arguments _x_ (a Number) and _y_ (a Number). It performs division according to the rules of IEEE 754-2019 binary double-precision arithmetic, producing the quotient of _x_ and _y_ where _x_ is the dividend and _y_ is the divisor. It performs the following steps when called:

+ +

+ Number::divide ( + _x_: a Number, + _y_: a Number, + ) +

+
+
description
+
It performs division according to the rules of IEEE 754-2019 binary double-precision arithmetic, producing the quotient of _x_ and _y_ where _x_ is the dividend and _y_ is the divisor.
+
1. If _x_ is *NaN* or _y_ is *NaN*, return *NaN*. 1. If _x_ is *+∞*𝔽 or _x_ is *-∞*𝔽, then @@ -1628,9 +1669,17 @@

Number::divide ( _x_, _y_ )

- -

Number::remainder ( _n_, _d_ )

-

The abstract operation Number::remainder takes arguments _n_ (a Number) and _d_ (a Number). It yields the remainder from an implied division of its operands where _n_ is the dividend and _d_ is the divisor. It performs the following steps when called:

+ +

+ Number::remainder ( + _n_: a Number, + _d_: a Number, + ) +

+
+
description
+
It yields the remainder from an implied division of its operands where _n_ is the dividend and _d_ is the divisor.
+
1. If _n_ is *NaN* or _d_ is *NaN*, return *NaN*. 1. If _n_ is *+∞*𝔽 or _n_ is *-∞*𝔽, return *NaN*. @@ -1647,9 +1696,17 @@

Number::remainder ( _n_, _d_ )

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

Number::add ( _x_, _y_ )

-

The abstract operation Number::add takes arguments _x_ (a Number) and _y_ (a Number). It performs addition according to the rules of IEEE 754-2019 binary double-precision arithmetic, producing the sum of its arguments. It performs the following steps when called:

+ +

+ Number::add ( + _x_: a Number, + _y_: a Number, + ) +

+
+
description
+
It performs addition according to the rules of IEEE 754-2019 binary double-precision arithmetic, producing the sum of its arguments.
+
1. If _x_ is *NaN* or _y_ is *NaN*, return *NaN*. 1. If _x_ is *+∞*𝔽 and _y_ is *-∞*𝔽, return *NaN*. @@ -1665,9 +1722,17 @@

Number::add ( _x_, _y_ )

- -

Number::subtract ( _x_, _y_ )

-

The abstract operation Number::subtract takes arguments _x_ (a Number) and _y_ (a Number). It performs subtraction, producing the difference of its operands; _x_ is the minuend and _y_ is the subtrahend. It performs the following steps when called:

+ +

+ Number::subtract ( + _x_: a Number, + _y_: a Number, + ) +

+
+
description
+
It performs subtraction, producing the difference of its operands; _x_ is the minuend and _y_ is the subtrahend.
+
1. Return Number::add(_x_, Number::unaryMinus(_y_)). @@ -1676,9 +1741,15 @@

Number::subtract ( _x_, _y_ )

- -

Number::leftShift ( _x_, _y_ )

-

The abstract operation Number::leftShift takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::leftShift ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. Let _lnum_ be ! ToInt32(_x_). 1. Let _rnum_ be ! ToUint32(_y_). @@ -1687,9 +1758,15 @@

Number::leftShift ( _x_, _y_ )

- -

Number::signedRightShift ( _x_, _y_ )

-

The abstract operation Number::signedRightShift takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::signedRightShift ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. Let _lnum_ be ! ToInt32(_x_). 1. Let _rnum_ be ! ToUint32(_y_). @@ -1698,9 +1775,15 @@

Number::signedRightShift ( _x_, _y_ )

- -

Number::unsignedRightShift ( _x_, _y_ )

-

The abstract operation Number::unsignedRightShift takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::unsignedRightShift ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. Let _lnum_ be ! ToUint32(_x_). 1. Let _rnum_ be ! ToUint32(_y_). @@ -1709,9 +1792,15 @@

Number::unsignedRightShift ( _x_, _y_ )

- -

Number::lessThan ( _x_, _y_ )

-

The abstract operation Number::lessThan takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::lessThan ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. If _x_ is *NaN*, return *undefined*. 1. If _y_ is *NaN*, return *undefined*. @@ -1727,9 +1816,15 @@

Number::lessThan ( _x_, _y_ )

- -

Number::equal ( _x_, _y_ )

-

The abstract operation Number::equal takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::equal ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. If _x_ is *NaN*, return *false*. 1. If _y_ is *NaN*, return *false*. @@ -1740,9 +1835,15 @@

Number::equal ( _x_, _y_ )

- -

Number::sameValue ( _x_, _y_ )

-

The abstract operation Number::sameValue takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::sameValue ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. If _x_ is *NaN* and _y_ is *NaN*, return *true*. 1. If _x_ is *+0*𝔽 and _y_ is *-0*𝔽, return *false*. @@ -1752,9 +1853,15 @@

Number::sameValue ( _x_, _y_ )

- -

Number::sameValueZero ( _x_, _y_ )

-

The abstract operation Number::sameValueZero takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::sameValueZero ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. If _x_ is *NaN* and _y_ is *NaN*, return *true*. 1. If _x_ is *+0*𝔽 and _y_ is *-0*𝔽, return *true*. @@ -1764,9 +1871,16 @@

Number::sameValueZero ( _x_, _y_ )

- -

NumberBitwiseOp ( _op_, _x_, _y_ )

-

The abstract operation NumberBitwiseOp takes arguments _op_ (a sequence of Unicode code points), _x_, and _y_. It performs the following steps when called:

+ +

+ NumberBitwiseOp ( + _op_: a sequence of Unicode code points, + _x_: unknown, + _y_: unknown, + ) +

+
+
1. Assert: _op_ is `&`, `^`, or `|`. 1. Let _lnum_ be ! ToInt32(_x_). @@ -1780,33 +1894,58 @@

NumberBitwiseOp ( _op_, _x_, _y_ )

- -

Number::bitwiseAND ( _x_, _y_ )

-

The abstract operation Number::bitwiseAND takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::bitwiseAND ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. Return NumberBitwiseOp(`&`, _x_, _y_).
- -

Number::bitwiseXOR ( _x_, _y_ )

-

The abstract operation Number::bitwiseXOR takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::bitwiseXOR ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. Return NumberBitwiseOp(`^`, _x_, _y_).
- -

Number::bitwiseOR ( _x_, _y_ )

-

The abstract operation Number::bitwiseOR takes arguments _x_ (a Number) and _y_ (a Number). It performs the following steps when called:

+ +

+ Number::bitwiseOR ( + _x_: a Number, + _y_: a Number, + ) +

+
+
1. Return NumberBitwiseOp(`|`, _x_, _y_).
- -

Number::toString ( _x_ )

-

The abstract operation Number::toString takes argument _x_ (a Number). It converts _x_ to String format. It performs the following steps when called:

+ +

+ Number::toString ( + _x_: a Number, + ) +

+
+
description
+
It converts _x_ to String format.
+
1. If _x_ is *NaN*, return the String *"NaN"*. 1. If _x_ is *+0*𝔽 or *-0*𝔽, return the String *"0"*. @@ -1874,23 +2013,41 @@

The BigInt Type

The BigInt::unit value is *1*.

- -

BigInt::unaryMinus ( _x_ )

-

The abstract operation BigInt::unaryMinus takes argument _x_ (a BigInt). It performs the following steps when called:

+ +

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

+
+
1. If _x_ is *0*, return *0*. 1. Return the BigInt value that represents the negation of ℝ(_x_).
- -

BigInt::bitwiseNOT ( _x_ )

-

The abstract operation BigInt::bitwiseNOT takes argument _x_ (a BigInt). It returns the one's complement of _x_; that is, -_x_ - *1*.

+ +

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

+
+
description
+
It returns the one's complement of _x_; that is, -_x_ - *1*.
+
- -

BigInt::exponentiate ( _base_, _exponent_ )

-

The abstract operation BigInt::exponentiate takes arguments _base_ (a BigInt) and _exponent_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::exponentiate ( + _base_: a BigInt, + _exponent_: a BigInt, + ) +

+
+
1. If _exponent_ < *0*, throw a *RangeError* exception. 1. If _base_ is *0* and _exponent_ is *0*, return *1*. @@ -1898,15 +2055,29 @@

BigInt::exponentiate ( _base_, _exponent_ )

- -

BigInt::multiply ( _x_, _y_ )

-

The abstract operation BigInt::multiply takes arguments _x_ (a BigInt) and _y_ (a BigInt). It returns the BigInt value that represents the result of multiplying _x_ and _y_.

+ +

+ BigInt::multiply ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
description
+
It returns the BigInt value that represents the result of multiplying _x_ and _y_.
+
Even if the result has a much larger bit width than the input, the exact mathematical answer is given.
- -

BigInt::divide ( _x_, _y_ )

-

The abstract operation BigInt::divide takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::divide ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. If _y_ is *0*, throw a *RangeError* exception. 1. Let _quotient_ be ℝ(_x_) / ℝ(_y_). @@ -1914,9 +2085,15 @@

BigInt::divide ( _x_, _y_ )

- -

BigInt::remainder ( _n_, _d_ )

-

The abstract operation BigInt::remainder takes arguments _n_ (a BigInt) and _d_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::remainder ( + _n_: a BigInt, + _d_: a BigInt, + ) +

+
+
1. If _d_ is *0*, throw a *RangeError* exception. 1. If _n_ is *0*, return *0*. @@ -1926,19 +2103,41 @@

BigInt::remainder ( _n_, _d_ )

The sign of the result equals the sign of the dividend.
- -

BigInt::add ( _x_, _y_ )

-

The abstract operation BigInt::add takes arguments _x_ (a BigInt) and _y_ (a BigInt). It returns the BigInt value that represents the sum of _x_ and _y_.

+ +

+ BigInt::add ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
description
+
It returns the BigInt value that represents the sum of _x_ and _y_.
+
- -

BigInt::subtract ( _x_, _y_ )

-

The abstract operation BigInt::subtract takes arguments _x_ (a BigInt) and _y_ (a BigInt). It returns the BigInt value that represents the difference _x_ minus _y_.

+ +

+ BigInt::subtract ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
description
+
It returns the BigInt value that represents the difference _x_ minus _y_.
+
- -

BigInt::leftShift ( _x_, _y_ )

-

The abstract operation BigInt::leftShift takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::leftShift ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
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. @@ -1947,51 +2146,97 @@

BigInt::leftShift ( _x_, _y_ )

Semantics here should be equivalent to a bitwise shift, treating the BigInt as an infinite length string of binary two's complement digits.
- -

BigInt::signedRightShift ( _x_, _y_ )

-

The abstract operation BigInt::signedRightShift takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::signedRightShift ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Return BigInt::leftShift(_x_, -_y_).
- -

BigInt::unsignedRightShift ( _x_, _y_ )

-

The abstract operation BigInt::unsignedRightShift takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::unsignedRightShift ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Throw a *TypeError* exception.
- -

BigInt::lessThan ( _x_, _y_ )

-

The abstract operation BigInt::lessThan takes arguments _x_ (a BigInt) and _y_ (a BigInt). It returns *true* if ℝ(_x_) < ℝ(_y_) and *false* otherwise.

+ +

+ BigInt::lessThan ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
description
+
It returns *true* if ℝ(_x_) < ℝ(_y_) and *false* otherwise.
+
- -

BigInt::equal ( _x_, _y_ )

-

The abstract operation BigInt::equal takes arguments _x_ (a BigInt) and _y_ (a BigInt). It returns *true* if ℝ(_x_) = ℝ(_y_) and *false* otherwise.

+ +

+ BigInt::equal ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
description
+
It returns *true* if ℝ(_x_) = ℝ(_y_) and *false* otherwise.
+
- -

BigInt::sameValue ( _x_, _y_ )

-

The abstract operation BigInt::sameValue takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::sameValue ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Return BigInt::equal(_x_, _y_).
- -

BigInt::sameValueZero ( _x_, _y_ )

-

The abstract operation BigInt::sameValueZero takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::sameValueZero ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Return BigInt::equal(_x_, _y_).
- -

BinaryAnd ( _x_, _y_ )

-

The abstract operation BinaryAnd takes arguments _x_ and _y_. It performs the following steps when called:

+ +

+ BinaryAnd ( + _x_: unknown, + _y_: unknown, + ) +

+
+
1. Assert: _x_ is 0 or 1. 1. Assert: _y_ is 0 or 1. @@ -2000,9 +2245,15 @@

BinaryAnd ( _x_, _y_ )

- -

BinaryOr ( _x_, _y_ )

-

The abstract operation BinaryOr takes arguments _x_ and _y_. It performs the following steps when called:

+ +

+ BinaryOr ( + _x_: unknown, + _y_: unknown, + ) +

+
+
1. Assert: _x_ is 0 or 1. 1. Assert: _y_ is 0 or 1. @@ -2011,9 +2262,15 @@

BinaryOr ( _x_, _y_ )

- -

BinaryXor ( _x_, _y_ )

-

The abstract operation BinaryXor takes arguments _x_ and _y_. It performs the following steps when called:

+ +

+ BinaryXor ( + _x_: unknown, + _y_: unknown, + ) +

+
+
1. Assert: _x_ is 0 or 1. 1. Assert: _y_ is 0 or 1. @@ -2023,9 +2280,16 @@

BinaryXor ( _x_, _y_ )

- -

BigIntBitwiseOp ( _op_, _x_, _y_ )

-

The abstract operation BigIntBitwiseOp takes arguments _op_ (a sequence of Unicode code points), _x_ (a BigInt), and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigIntBitwiseOp ( + _op_: a sequence of Unicode code points, + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Assert: _op_ is `&`, `^`, or `|`. 1. Set _x_ to ℝ(_x_). @@ -2055,33 +2319,58 @@

BigIntBitwiseOp ( _op_, _x_, _y_ )

- -

BigInt::bitwiseAND ( _x_, _y_ )

-

The abstract operation BigInt::bitwiseAND takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::bitwiseAND ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Return BigIntBitwiseOp(`&`, _x_, _y_).
- -

BigInt::bitwiseXOR ( _x_, _y_ )

-

The abstract operation BigInt::bitwiseXOR takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::bitwiseXOR ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Return BigIntBitwiseOp(`^`, _x_, _y_).
- -

BigInt::bitwiseOR ( _x_, _y_ )

-

The abstract operation BigInt::bitwiseOR takes arguments _x_ (a BigInt) and _y_ (a BigInt). It performs the following steps when called:

+ +

+ BigInt::bitwiseOR ( + _x_: a BigInt, + _y_: a BigInt, + ) +

+
+
1. Return BigIntBitwiseOp(`|`, _x_, _y_).
- -

BigInt::toString ( _x_ )

-

The abstract operation BigInt::toString takes argument _x_ (a BigInt). It converts _x_ to String format. It performs the following steps when called:

+ +

+ BigInt::toString ( + _x_: a BigInt, + ) +

+
+
description
+
It converts _x_ to String format.
+
1. If _x_ < *0*, return the string-concatenation of the String *"-"* and ! BigInt::toString(-_x_). 1. Return the String value consisting of the code units of the digits of the decimal representation of _x_. @@ -3627,9 +3916,15 @@

ThrowCompletion

- -

UpdateEmpty ( _completionRecord_, _value_ )

-

The abstract operation UpdateEmpty takes arguments _completionRecord_ and _value_. It performs the following steps when called:

+ +

+ UpdateEmpty ( + _completionRecord_: unknown, + _value_: unknown, + ) +

+
+
1. Assert: If _completionRecord_.[[Type]] is either ~return~ or ~throw~, then _completionRecord_.[[Value]] is not ~empty~. 1. If _completionRecord_.[[Value]] is not ~empty~, return Completion(_completionRecord_). @@ -3690,9 +3985,14 @@

The Reference Record Specification Type

The following abstract operations are used in this specification to operate upon Reference Records:

- -

IsPropertyReference ( _V_ )

-

The abstract operation IsPropertyReference takes argument _V_. It performs the following steps when called:

+ +

+ IsPropertyReference ( + _V_: unknown, + ) +

+
+
1. Assert: _V_ is a Reference Record. 1. If _V_.[[Base]] is ~unresolvable~, return *false*. @@ -3700,36 +4000,56 @@

IsPropertyReference ( _V_ )

- -

IsUnresolvableReference ( _V_ )

-

The abstract operation IsUnresolvableReference takes argument _V_. It performs the following steps when called:

+ +

+ IsUnresolvableReference ( + _V_: unknown, + ) +

+
+
1. Assert: _V_ is a Reference Record. 1. If _V_.[[Base]] is ~unresolvable~, return *true*; otherwise return *false*.
- -

IsSuperReference ( _V_ )

-

The abstract operation IsSuperReference takes argument _V_. It performs the following steps when called:

+ +

+ IsSuperReference ( + _V_: unknown, + ) +

+
+
1. Assert: _V_ is a Reference Record. 1. If _V_.[[ThisValue]] is not ~empty~, return *true*; otherwise return *false*.
- -

IsPrivateReference ( _V_ )

-

The abstract operation IsPrivateReference takes argument _V_. It performs the following steps when called:

+ +

+ IsPrivateReference ( + _V_: unknown, + ) +

+
+
1. Assert: _V_ is a Reference Record. 1. If _V_.[[ReferencedName]] is a Private Name, return *true*; otherwise return *false*.
- -

GetValue ( _V_ )

-

The abstract operation GetValue takes argument _V_. It performs the following steps when called:

+ +

+ GetValue ( + _V_: unknown, + ) +

+
+
1. ReturnIfAbrupt(_V_). 1. If _V_ is not a Reference Record, return _V_. @@ -3749,9 +4069,15 @@

GetValue ( _V_ )

- -

PutValue ( _V_, _W_ )

-

The abstract operation PutValue takes arguments _V_ and _W_. It performs the following steps when called:

+ +

+ PutValue ( + _V_: unknown, + _W_: unknown, + ) +

+
+
1. ReturnIfAbrupt(_V_). 1. ReturnIfAbrupt(_W_). @@ -3777,18 +4103,29 @@

PutValue ( _V_, _W_ )

- -

GetThisValue ( _V_ )

-

The abstract operation GetThisValue takes argument _V_. It performs the following steps when called:

+ +

+ GetThisValue ( + _V_: unknown, + ) +

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

InitializeReferencedBinding ( _V_, _W_ )

-

The abstract operation InitializeReferencedBinding takes arguments _V_ and _W_. It performs the following steps when called:

+ +

+ InitializeReferencedBinding ( + _V_: unknown, + _W_: unknown, + ) +

+
+
1. ReturnIfAbrupt(_V_). 1. ReturnIfAbrupt(_W_). @@ -3800,9 +4137,15 @@

InitializeReferencedBinding ( _V_, _W_ )

- -

MakePrivateReference ( _baseValue_, _privateIdentifier_ )

-

The abstract operation MakePrivateReference takes arguments _baseValue_ (an ECMAScript language value) and _privateIdentifier_ (a String). It performs the following steps when called:

+ +

+ MakePrivateReference ( + _baseValue_: an ECMAScript language value, + _privateIdentifier_: a String, + ) +

+
+
1. Let _privEnv_ be the running execution context's PrivateEnvironment. 1. Assert: _privEnv_ is not *null*. @@ -3818,9 +4161,14 @@

The Property Descriptor Specification Type

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. A generic Property Descriptor is a Property Descriptor value that is neither a data Property Descriptor nor an accessor 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 fields that correspond to the property attributes defined in either or .

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

- -

IsAccessorDescriptor ( _Desc_ )

-

The abstract operation IsAccessorDescriptor takes argument _Desc_ (a Property Descriptor or *undefined*). It performs the following steps when called:

+ +

+ IsAccessorDescriptor ( + _Desc_: a Property Descriptor or *undefined*, + ) +

+
+
1. If _Desc_ is *undefined*, return *false*. 1. If both _Desc_.[[Get]] and _Desc_.[[Set]] are absent, return *false*. @@ -3828,9 +4176,14 @@

IsAccessorDescriptor ( _Desc_ )

- -

IsDataDescriptor ( _Desc_ )

-

The abstract operation IsDataDescriptor takes argument _Desc_ (a Property Descriptor or *undefined*). It performs the following steps when called:

+ +

+ IsDataDescriptor ( + _Desc_: a Property Descriptor or *undefined*, + ) +

+
+
1. If _Desc_ is *undefined*, return *false*. 1. If both _Desc_.[[Value]] and _Desc_.[[Writable]] are absent, return *false*. @@ -3838,9 +4191,14 @@

IsDataDescriptor ( _Desc_ )

- -

IsGenericDescriptor ( _Desc_ )

-

The abstract operation IsGenericDescriptor takes argument _Desc_ (a Property Descriptor or *undefined*). It performs the following steps when called:

+ +

+ IsGenericDescriptor ( + _Desc_: a Property Descriptor or *undefined*, + ) +

+
+
1. If _Desc_ is *undefined*, return *false*. 1. If IsAccessorDescriptor(_Desc_) and IsDataDescriptor(_Desc_) are both *false*, return *true*. @@ -3848,9 +4206,14 @@

IsGenericDescriptor ( _Desc_ )

- -

FromPropertyDescriptor ( _Desc_ )

-

The abstract operation FromPropertyDescriptor takes argument _Desc_ (a Property Descriptor or *undefined*). It performs the following steps when called:

+ +

+ FromPropertyDescriptor ( + _Desc_: a Property Descriptor or *undefined*, + ) +

+
+
1. If _Desc_ is *undefined*, return *undefined*. 1. Let _obj_ be ! OrdinaryObjectCreate(%Object.prototype%). @@ -3871,9 +4234,14 @@

FromPropertyDescriptor ( _Desc_ )

- -

ToPropertyDescriptor ( _Obj_ )

-

The abstract operation ToPropertyDescriptor takes argument _Obj_. It performs the following steps when called:

+ +

+ ToPropertyDescriptor ( + _Obj_: unknown, + ) +

+
+
1. If Type(_Obj_) is not Object, throw a *TypeError* exception. 1. Let _desc_ be a new Property Descriptor that initially has no fields. @@ -3909,9 +4277,14 @@

ToPropertyDescriptor ( _Obj_ )

- -

CompletePropertyDescriptor ( _Desc_ )

-

The abstract operation CompletePropertyDescriptor takes argument _Desc_ (a Property Descriptor). It performs the following steps when called:

+ +

+ CompletePropertyDescriptor ( + _Desc_: a Property Descriptor, + ) +

+
+
1. Assert: _Desc_ is a Property Descriptor. 1. Let _like_ be the Record { [[Value]]: *undefined*, [[Writable]]: *false*, [[Get]]: *undefined*, [[Set]]: *undefined*, [[Enumerable]]: *false*, [[Configurable]]: *false* }. @@ -3957,9 +4330,14 @@

Data Blocks

Shared Data Block events are modeled by Records, defined in the memory model.

The following abstract operations are used in this specification to operate upon Data Block values:

- -

CreateByteDataBlock ( _size_ )

-

The abstract operation CreateByteDataBlock takes argument _size_ (an integer). It performs the following steps when called:

+ +

+ CreateByteDataBlock ( + _size_: an integer, + ) +

+
+
1. Assert: _size_ ≥ 0. 1. Let _db_ be a new Data Block value consisting of _size_ bytes. If it is impossible to create such a Data Block, throw a *RangeError* exception. @@ -3968,9 +4346,14 @@

CreateByteDataBlock ( _size_ )

- -

CreateSharedByteDataBlock ( _size_ )

-

The abstract operation CreateSharedByteDataBlock takes argument _size_ (a non-negative integer). It performs the following steps when called:

+ +

+ CreateSharedByteDataBlock ( + _size_: a non-negative integer, + ) +

+
+
1. Assert: _size_ ≥ 0. 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. @@ -3983,9 +4366,18 @@

CreateSharedByteDataBlock ( _size_ )

- -

CopyDataBlockBytes ( _toBlock_, _toIndex_, _fromBlock_, _fromIndex_, _count_ )

-

The abstract operation CopyDataBlockBytes takes arguments _toBlock_, _toIndex_ (a non-negative integer), _fromBlock_, _fromIndex_ (a non-negative integer), and _count_ (a non-negative integer). It performs the following steps when called:

+ +

+ CopyDataBlockBytes ( + _toBlock_: unknown, + _toIndex_: a non-negative integer, + _fromBlock_: unknown, + _fromIndex_: a non-negative integer, + _count_: a non-negative integer, + ) +

+
+
1. Assert: _fromBlock_ and _toBlock_ are distinct Data Block or Shared Data Block values. 1. Let _fromSize_ be the number of bytes in _fromBlock_. @@ -4173,9 +4565,17 @@

Type Conversion

The ECMAScript language implicitly performs automatic type conversion as needed. To clarify the semantics of certain constructs it is useful to define a set of conversion abstract operations. The conversion abstract operations are polymorphic; they can accept a value of any ECMAScript language type. But no other specification types are used with these operations.

The BigInt type has no implicit conversions in the ECMAScript language; programmers must call BigInt explicitly to convert values from other types.

- -

ToPrimitive ( _input_ [ , _preferredType_ ] )

-

The abstract operation ToPrimitive takes argument _input_ and optional argument _preferredType_. It converts its _input_ argument to a non-Object type. If an object is capable of converting to more than one primitive type, it may use the optional hint _preferredType_ to favour that type. It performs the following steps when called:

+ +

+ ToPrimitive ( + _input_: unknown, + optional _preferredType_: unknown, + ) +

+
+
description
+
It converts its _input_ argument to a non-Object type. If an object is capable of converting to more than one primitive type, it may use the optional hint _preferredType_ to favour that type.
+
1. Assert: _input_ is an ECMAScript language value. 1. If Type(_input_) is Object, then @@ -4197,9 +4597,15 @@

ToPrimitive ( _input_ [ , _preferredType_ ] )

When ToPrimitive is called with no hint, then it generally behaves as if the hint were ~number~. However, objects may over-ride this behaviour by defining a @@toPrimitive method. Of the objects defined in this specification only Date objects (see ) and Symbol objects (see ) over-ride the default ToPrimitive behaviour. Date objects treat no hint as if the hint were ~string~.

- -

OrdinaryToPrimitive ( _O_, _hint_ )

-

The abstract operation OrdinaryToPrimitive takes arguments _O_ and _hint_. It performs the following steps when called:

+ +

+ OrdinaryToPrimitive ( + _O_: unknown, + _hint_: unknown, + ) +

+
+
1. Assert: Type(_O_) is Object. 1. Assert: _hint_ is either ~string~ or ~number~. @@ -4217,9 +4623,16 @@

OrdinaryToPrimitive ( _O_, _hint_ )

- -

ToBoolean ( _argument_ )

-

The abstract operation ToBoolean takes argument _argument_. It converts _argument_ to a value of type Boolean according to :

+ +

+ ToBoolean ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to a value of type Boolean according to :
+
@@ -4303,9 +4716,16 @@

ToBoolean ( _argument_ )

- -

ToNumeric ( _value_ )

-

The abstract operation ToNumeric takes argument _value_. It returns _value_ converted to a Number or a BigInt. It performs the following steps when called:

+ +

+ ToNumeric ( + _value_: unknown, + ) +

+
+
description
+
It returns _value_ converted to a Number or a BigInt.
+
1. Let _primValue_ be ? ToPrimitive(_value_, ~number~). 1. If Type(_primValue_) is BigInt, return _primValue_. @@ -4313,9 +4733,16 @@

ToNumeric ( _value_ )

- -

ToNumber ( _argument_ )

-

The abstract operation ToNumber takes argument _argument_. It converts _argument_ to a value of type Number according to :

+ +

+ ToNumber ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to a value of type Number according to :
+
@@ -4510,9 +4937,16 @@

Runtime Semantics: StringNumericValue

- -

RoundMVResult ( _n_ )

-

The abstract operation RoundMVResult takes argument _n_ (a mathematical value). It converts _n_ to a Number in an implementation-defined manner. For the purposes of this abstract operation, a digit is significant if it is not zero or there is a non-zero digit to its left and there is a non-zero digit to its right. For the purposes of this abstract operation, "the mathematical value denoted by" a representation of a mathematical value is the inverse of "the decimal representation of" a mathematical value. It performs the following steps when called:

+ +

+ RoundMVResult ( + _n_: a mathematical value, + ) +

+
+
description
+
It converts _n_ to a Number in an implementation-defined manner. For the purposes of this abstract operation, a digit is significant if it is not zero or there is a non-zero digit to its left and there is a non-zero digit to its right. For the purposes of this abstract operation, "the mathematical value denoted by" a representation of a mathematical value is the inverse of "the decimal representation of" a mathematical value.
+
1. If the decimal representation of _n_ has 20 or fewer significant digits, return 𝔽(_n_). 1. Let _option1_ be the mathematical value denoted by the result of replacing each significant digit in the decimal representation of _n_ after the 20th with a 0 digit. @@ -4524,9 +4958,16 @@

RoundMVResult ( _n_ )

- -

ToIntegerOrInfinity ( _argument_ )

-

The abstract operation ToIntegerOrInfinity takes argument _argument_. It converts _argument_ to an integer, +∞, or -∞. It performs the following steps when called:

+ +

+ ToIntegerOrInfinity ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to an integer, +∞, or -∞.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, or *-0*𝔽, return 0. @@ -4538,9 +4979,16 @@

ToIntegerOrInfinity ( _argument_ )

- -

ToInt32 ( _argument_ )

-

The abstract operation ToInt32 takes argument _argument_. It converts _argument_ to one of 232 integral Number values in the range 𝔽(-231) through 𝔽(231 - 1), inclusive. It performs the following steps when called:

+ +

+ ToInt32 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 232 integral Number values in the range 𝔽(-231) through 𝔽(231 - 1), inclusive.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return *+0*𝔽. @@ -4564,9 +5012,16 @@

ToInt32 ( _argument_ )

- -

ToUint32 ( _argument_ )

-

The abstract operation ToUint32 takes argument _argument_. It converts _argument_ to one of 232 integral Number values in the range *+0*𝔽 through 𝔽(232 - 1), inclusive. It performs the following steps when called:

+ +

+ ToUint32 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 232 integral Number values in the range *+0*𝔽 through 𝔽(232 - 1), inclusive.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return *+0*𝔽. @@ -4593,9 +5048,16 @@

ToUint32 ( _argument_ )

- -

ToInt16 ( _argument_ )

-

The abstract operation ToInt16 takes argument _argument_. It converts _argument_ to one of 216 integral Number values in the range 𝔽(-215) through 𝔽(215 - 1), inclusive. It performs the following steps when called:

+ +

+ ToInt16 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 216 integral Number values in the range 𝔽(-215) through 𝔽(215 - 1), inclusive.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return *+0*𝔽. @@ -4605,9 +5067,16 @@

ToInt16 ( _argument_ )

- -

ToUint16 ( _argument_ )

-

The abstract operation ToUint16 takes argument _argument_. It converts _argument_ to one of 216 integral Number values in the range *+0*𝔽 through 𝔽(216 - 1), inclusive. It performs the following steps when called:

+ +

+ ToUint16 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 216 integral Number values in the range *+0*𝔽 through 𝔽(216 - 1), inclusive.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return *+0*𝔽. @@ -4628,9 +5097,16 @@

ToUint16 ( _argument_ )

- -

ToInt8 ( _argument_ )

-

The abstract operation ToInt8 takes argument _argument_. It converts _argument_ to one of 28 integral Number values in the range *-128*𝔽 through *127*𝔽, inclusive. It performs the following steps when called:

+ +

+ ToInt8 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 28 integral Number values in the range *-128*𝔽 through *127*𝔽, inclusive.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return *+0*𝔽. @@ -4640,9 +5116,16 @@

ToInt8 ( _argument_ )

- -

ToUint8 ( _argument_ )

-

The abstract operation ToUint8 takes argument _argument_. It converts _argument_ to one of 28 integral Number values in the range *+0*𝔽 through *255*𝔽, inclusive. It performs the following steps when called:

+ +

+ ToUint8 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 28 integral Number values in the range *+0*𝔽 through *255*𝔽, inclusive.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, *+0*𝔽, *-0*𝔽, *+∞*𝔽, or *-∞*𝔽, return *+0*𝔽. @@ -4652,9 +5135,16 @@

ToUint8 ( _argument_ )

- -

ToUint8Clamp ( _argument_ )

-

The abstract operation ToUint8Clamp takes argument _argument_. It converts _argument_ to one of 28 integral Number values in the range *+0*𝔽 through *255*𝔽, inclusive. It performs the following steps when called:

+ +

+ ToUint8Clamp ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 28 integral Number values in the range *+0*𝔽 through *255*𝔽, inclusive.
+
1. Let _number_ be ? ToNumber(_argument_). 1. If _number_ is *NaN*, return *+0*𝔽. @@ -4671,9 +5161,16 @@

ToUint8Clamp ( _argument_ )

- -

ToBigInt ( _argument_ )

-

The abstract operation ToBigInt takes argument _argument_. It converts _argument_ to a BigInt value, or throws if an implicit conversion from Number would be required. It performs the following steps when called:

+ +

+ ToBigInt ( + _argument_: unknown, + ) +

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

ToBigInt ( _argument_ )

- -

StringToBigInt ( _argument_ )

+ +

+ StringToBigInt ( + _argument_: unknown, + ) +

+
+

Apply the algorithm in with the following changes:

  • Replace the |StrUnsignedDecimalLiteral| production with |DecimalDigits| to not allow *Infinity*, decimal points, or exponents.
  • @@ -4763,9 +5266,16 @@

    StringToBigInt ( _argument_ )

- -

ToBigInt64 ( _argument_ )

-

The abstract operation ToBigInt64 takes argument _argument_. It converts _argument_ to one of 264 BigInt values in the range ℤ(-263) through ℤ(263-1), inclusive. It performs the following steps when called:

+ +

+ ToBigInt64 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 264 BigInt values in the range ℤ(-263) through ℤ(263-1), inclusive.
+
1. Let _n_ be ? ToBigInt(_argument_). 1. Let _int64bit_ be ℝ(_n_) modulo 264. @@ -4773,9 +5283,16 @@

ToBigInt64 ( _argument_ )

- -

ToBigUint64 ( _argument_ )

-

The abstract operation ToBigUint64 takes argument _argument_. It converts _argument_ to one of 264 BigInt values in the range *0* through the BigInt value for ℤ(264-1), inclusive. It performs the following steps when called:

+ +

+ ToBigUint64 ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to one of 264 BigInt values in the range *0* through the BigInt value for ℤ(264-1), inclusive.
+
1. Let _n_ be ? ToBigInt(_argument_). 1. Let _int64bit_ be ℝ(_n_) modulo 264. @@ -4783,9 +5300,16 @@

ToBigUint64 ( _argument_ )

- -

ToString ( _argument_ )

-

The abstract operation ToString takes argument _argument_. It converts _argument_ to a value of type String according to :

+ +

+ ToString ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to a value of type String according to :
+
@@ -4871,9 +5395,16 @@

ToString ( _argument_ )

- -

ToObject ( _argument_ )

-

The abstract operation ToObject takes argument _argument_. It converts _argument_ to a value of type Object according to :

+ +

+ ToObject ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to a value of type Object according to :
+
@@ -4954,9 +5485,16 @@

ToObject ( _argument_ )

- -

ToPropertyKey ( _argument_ )

-

The abstract operation ToPropertyKey takes argument _argument_. It converts _argument_ to a value that can be used as a property key. It performs the following steps when called:

+ +

+ ToPropertyKey ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to a value that can be used as a property key.
+
1. Let _key_ be ? ToPrimitive(_argument_, ~string~). 1. If Type(_key_) is Symbol, then @@ -4965,9 +5503,16 @@

ToPropertyKey ( _argument_ )

- -

ToLength ( _argument_ )

-

The abstract operation ToLength takes argument _argument_. It converts _argument_ to an integral Number suitable for use as the length of an array-like object. It performs the following steps when called:

+ +

+ ToLength ( + _argument_: unknown, + ) +

+
+
description
+
It converts _argument_ to an integral Number suitable for use as the length of an array-like object.
+
1. Let _len_ be ? ToIntegerOrInfinity(_argument_). 1. If _len_ ≤ 0, return *+0*𝔽. @@ -4975,9 +5520,16 @@

ToLength ( _argument_ )

- -

CanonicalNumericIndexString ( _argument_ )

-

The abstract operation CanonicalNumericIndexString takes argument _argument_. It returns _argument_ converted to a Number value if it is a String representation of a Number that would be produced by ToString, or the string *"-0"*. Otherwise, it returns *undefined*. It performs the following steps when called:

+ +

+ CanonicalNumericIndexString ( + _argument_: unknown, + ) +

+
+
description
+
It returns _argument_ converted to a Number value if it is a String representation of a Number that would be produced by ToString, or the string *"-0"*. Otherwise, it returns *undefined*.
+
1. Assert: Type(_argument_) is String. 1. If _argument_ is *"-0"*, return *-0*𝔽. @@ -4988,9 +5540,16 @@

CanonicalNumericIndexString ( _argument_ )

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

- -

ToIndex ( _value_ )

-

The abstract operation ToIndex takes argument _value_. It returns _value_ argument converted to a non-negative integer if it is a valid integer index value. It performs the following steps when called:

+ +

+ ToIndex ( + _value_: unknown, + ) +

+
+
description
+
It returns _value_ argument converted to a non-negative integer if it is a valid integer index value.
+
1. If _value_ is *undefined*, then 1. Return 0. @@ -5007,9 +5566,16 @@

ToIndex ( _value_ )

Testing and Comparison Operations

- -

RequireObjectCoercible ( _argument_ )

-

The abstract operation RequireObjectCoercible takes argument _argument_. It throws an error if _argument_ is a value that cannot be converted to an Object using ToObject. It is defined by :

+ +

+ RequireObjectCoercible ( + _argument_: unknown, + ) +

+
+
description
+
It throws an error if _argument_ is a value that cannot be converted to an Object using ToObject. It is defined by :
+
@@ -5090,9 +5656,14 @@

RequireObjectCoercible ( _argument_ )

- -

IsArray ( _argument_ )

-

The abstract operation IsArray takes argument _argument_. It performs the following steps when called:

+ +

+ IsArray ( + _argument_: unknown, + ) +

+
+
1. If Type(_argument_) is not Object, return *false*. 1. If _argument_ is an Array exotic object, return *true*. @@ -5104,9 +5675,16 @@

IsArray ( _argument_ )

- -

IsCallable ( _argument_ )

-

The abstract operation IsCallable takes argument _argument_ (an ECMAScript language value). It determines if _argument_ is a callable function with a [[Call]] internal method. It performs the following steps when called:

+ +

+ IsCallable ( + _argument_: an ECMAScript language value, + ) +

+
+
description
+
It determines if _argument_ is a callable function with a [[Call]] internal method.
+
1. If Type(_argument_) is not Object, return *false*. 1. If _argument_ has a [[Call]] internal method, return *true*. @@ -5114,9 +5692,16 @@

IsCallable ( _argument_ )

- -

IsConstructor ( _argument_ )

-

The abstract operation IsConstructor takes argument _argument_ (an ECMAScript language value). It determines if _argument_ is a function object with a [[Construct]] internal method. It performs the following steps when called:

+ +

+ IsConstructor ( + _argument_: an ECMAScript language value, + ) +

+
+
description
+
It determines if _argument_ is a function object with a [[Construct]] internal method.
+
1. If Type(_argument_) is not Object, return *false*. 1. If _argument_ has a [[Construct]] internal method, return *true*. @@ -5124,18 +5709,32 @@

IsConstructor ( _argument_ )

- -

IsExtensible ( _O_ )

-

The abstract operation IsExtensible takes argument _O_ (an Object) and returns a completion record which, if its [[Type]] is ~normal~, has a [[Value]] which is a Boolean. It is used to determine whether additional properties can be added to _O_. It performs the following steps when called:

+ +

+ IsExtensible ( + _O_: an Object, + ) +

+
+
description
+
It returns a completion record which, if its [[Type]] is ~normal~, has a [[Value]] which is a Boolean. It is used to determine whether additional properties can be added to _O_.
+
1. Assert: Type(_O_) is Object. 1. Return ? _O_.[[IsExtensible]]().
- -

IsIntegralNumber ( _argument_ )

-

The abstract operation IsIntegralNumber takes argument _argument_. It determines if _argument_ is a finite integral Number value. It performs the following steps when called:

+ +

+ IsIntegralNumber ( + _argument_: unknown, + ) +

+
+
description
+
It determines if _argument_ is a finite integral Number value.
+
1. If Type(_argument_) is not Number, return *false*. 1. If _argument_ is *NaN*, *+∞*𝔽, or *-∞*𝔽, return *false*. @@ -5144,9 +5743,16 @@

IsIntegralNumber ( _argument_ )

- -

IsPropertyKey ( _argument_ )

-

The abstract operation IsPropertyKey takes argument _argument_ (an ECMAScript language value). It determines if _argument_ is a value that may be used as a property key. It performs the following steps when called:

+ +

+ IsPropertyKey ( + _argument_: an ECMAScript language value, + ) +

+
+
description
+
It determines if _argument_ is a value that may be used as a property key.
+
1. If Type(_argument_) is String, return *true*. 1. If Type(_argument_) is Symbol, return *true*. @@ -5154,9 +5760,14 @@

IsPropertyKey ( _argument_ )

- -

IsRegExp ( _argument_ )

-

The abstract operation IsRegExp takes argument _argument_. It performs the following steps when called:

+ +

+ IsRegExp ( + _argument_: unknown, + ) +

+
+
1. If Type(_argument_) is not Object, return *false*. 1. Let _matcher_ be ? Get(_argument_, @@match). @@ -5166,9 +5777,17 @@

IsRegExp ( _argument_ )

- -

IsStringPrefix ( _p_, _q_ )

-

The abstract operation IsStringPrefix takes arguments _p_ (a String) and _q_ (a String). It determines if _p_ is a prefix of _q_. It performs the following steps when called:

+ +

+ IsStringPrefix ( + _p_: a String, + _q_: a String, + ) +

+
+
description
+
It determines if _p_ is a prefix of _q_.
+
1. Assert: Type(_p_) is String. 1. Assert: Type(_q_) is String. @@ -5179,9 +5798,17 @@

IsStringPrefix ( _p_, _q_ )

- -

SameValue ( _x_, _y_ )

-

The abstract operation SameValue takes arguments _x_ (an ECMAScript language value) and _y_ (an ECMAScript language value) and returns a completion record whose [[Type]] is ~normal~ and whose [[Value]] is a Boolean. It performs the following steps when called:

+ +

+ SameValue ( + _x_: an ECMAScript language value, + _y_: an ECMAScript language value, + ) +

+
+
description
+
It returns a completion record whose [[Type]] is ~normal~ and whose [[Value]] is a Boolean.
+
1. If Type(_x_) is different from Type(_y_), return *false*. 1. If Type(_x_) is Number or BigInt, then @@ -5193,9 +5820,17 @@

SameValue ( _x_, _y_ )

- -

SameValueZero ( _x_, _y_ )

-

The abstract operation SameValueZero takes arguments _x_ (an ECMAScript language value) and _y_ (an ECMAScript language value) and returns a completion record whose [[Type]] is ~normal~ and whose [[Value]] is a Boolean. It performs the following steps when called:

+ +

+ SameValueZero ( + _x_: an ECMAScript language value, + _y_: an ECMAScript language value, + ) +

+
+
description
+
It returns a completion record whose [[Type]] is ~normal~ and whose [[Value]] is a Boolean.
+
1. If Type(_x_) is different from Type(_y_), return *false*. 1. If Type(_x_) is Number or BigInt, then @@ -5207,9 +5842,17 @@

SameValueZero ( _x_, _y_ )

- -

SameValueNonNumeric ( _x_, _y_ )

-

The abstract operation SameValueNonNumeric takes arguments _x_ (an ECMAScript language value) and _y_ (an ECMAScript language value) and returns a completion record whose [[Type]] is ~normal~ and whose [[Value]] is a Boolean. It performs the following steps when called:

+ +

+ SameValueNonNumeric ( + _x_: an ECMAScript language value, + _y_: an ECMAScript language value, + ) +

+
+
description
+
It returns a completion record whose [[Type]] is ~normal~ and whose [[Value]] is a Boolean.
+
1. Assert: Type(_x_) is not Number or BigInt. 1. Assert: Type(_x_) is the same as Type(_y_). @@ -5225,9 +5868,18 @@

SameValueNonNumeric ( _x_, _y_ )

- -

IsLessThan ( _x_, _y_, _LeftFirst_ )

-

The abstract operation IsLessThan takes arguments _x_ (an ECMAScript language value), _y_ (an ECMAScript language value), and _LeftFirst_ (a Boolean). It provides the semantics for the comparison _x_ < _y_, returning *true*, *false*, or *undefined* (which indicates that at least one operand is *NaN*). The _LeftFirst_ flag is used to control the order in which operations with potentially visible side-effects are performed upon _x_ and _y_. It is necessary because ECMAScript specifies left to right evaluation of expressions. If _LeftFirst_ is *true*, the _x_ parameter corresponds to an expression that occurs to the left of the _y_ parameter's corresponding expression. If _LeftFirst_ is *false*, the reverse is the case and operations must be performed upon _y_ before _x_. It performs the following steps when called:

+ +

+ IsLessThan ( + _x_: an ECMAScript language value, + _y_: an ECMAScript language value, + _LeftFirst_: a Boolean, + ) +

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

IsLessThan ( _x_, _y_, _LeftFirst_ )

- -

IsLooselyEqual ( _x_, _y_ )

-

The abstract operation IsLooselyEqual takes arguments _x_ (an ECMAScript language value) and _y_ (an ECMAScript language value). It provides the semantics for the comparison _x_ == _y_, returning *true* or *false*. It performs the following steps when called:

+ +

+ IsLooselyEqual ( + _x_: an ECMAScript language value, + _y_: an ECMAScript language value, + ) +

+
+
description
+
It provides the semantics for the comparison _x_ == _y_, returning *true* or *false*.
+
1. If Type(_x_) is the same as Type(_y_), then 1. Return IsStrictlyEqual(_x_, _y_). @@ -5297,9 +5957,17 @@

IsLooselyEqual ( _x_, _y_ )

- -

IsStrictlyEqual ( _x_, _y_ )

-

The abstract operation IsStrictlyEqual takes arguments _x_ (an ECMAScript language value) and _y_ (an ECMAScript language value). It provides the semantics for the comparison _x_ === _y_, returning *true* or *false*. It performs the following steps when called:

+ +

+ IsStrictlyEqual ( + _x_: an ECMAScript language value, + _y_: an ECMAScript language value, + ) +

+
+
description
+
It provides the semantics for the comparison _x_ === _y_, returning *true* or *false*.
+
1. If Type(_x_) is different from Type(_y_), return *false*. 1. If Type(_x_) is Number or BigInt, then @@ -5315,9 +5983,16 @@

IsStrictlyEqual ( _x_, _y_ )

Operations on Objects

- -

MakeBasicObject ( _internalSlotsList_ )

-

The abstract operation MakeBasicObject takes argument _internalSlotsList_. It is the source of all ECMAScript objects that are created algorithmically, including both ordinary objects and exotic objects. It factors out common steps used in creating all objects, and centralizes object creation. It performs the following steps when called:

+ +

+ MakeBasicObject ( + _internalSlotsList_: unknown, + ) +

+
+
description
+
It is the source of all ECMAScript objects that are created algorithmically, including both ordinary objects and exotic objects. It factors out common steps used in creating all objects, and centralizes object creation.
+
1. Assert: _internalSlotsList_ is a List of internal slot names. @@ -5334,9 +6009,17 @@

MakeBasicObject ( _internalSlotsList_ )

- -

Get ( _O_, _P_ )

-

The abstract operation Get takes arguments _O_ (an Object) and _P_ (a property key). It is used to retrieve the value of a specific property of an object. It performs the following steps when called:

+ +

+ Get ( + _O_: an Object, + _P_: a property key, + ) +

+
+
description
+
It is used to retrieve the value of a specific property of an object.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5344,9 +6027,17 @@

Get ( _O_, _P_ )

- -

GetV ( _V_, _P_ )

-

The abstract operation GetV takes arguments _V_ (an ECMAScript language value) and _P_ (a property key). It is used to retrieve the value of a specific property of an ECMAScript language value. If the value is not an object, the property lookup is performed using a wrapper object appropriate for the type of the value. It performs the following steps when called:

+ +

+ GetV ( + _V_: an ECMAScript language value, + _P_: a property key, + ) +

+
+
description
+
It is used to retrieve the value of a specific property of an ECMAScript language value. If the value is not an object, the property lookup is performed using a wrapper object appropriate for the type of the value.
+
1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _O_ be ? ToObject(_V_). @@ -5354,9 +6045,19 @@

GetV ( _V_, _P_ )

- -

Set ( _O_, _P_, _V_, _Throw_ )

-

The abstract operation Set takes arguments _O_ (an Object), _P_ (a property key), _V_ (an ECMAScript language value), and _Throw_ (a Boolean). It is used to set the value of a specific property of an object. _V_ is the new value for the property. It performs the following steps when called:

+ +

+ Set ( + _O_: an Object, + _P_: a property key, + _V_: an ECMAScript language value, + _Throw_: a Boolean, + ) +

+
+
description
+
It is used to set the value of a specific property of an object. _V_ is the new value for the property.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5367,9 +6068,18 @@

Set ( _O_, _P_, _V_, _Throw_ )

- -

CreateDataProperty ( _O_, _P_, _V_ )

-

The abstract operation CreateDataProperty takes arguments _O_ (an Object), _P_ (a property key), and _V_ (an ECMAScript language value). It is used to create a new own property of an object. It performs the following steps when called:

+ +

+ CreateDataProperty ( + _O_: an Object, + _P_: a property key, + _V_: an ECMAScript language value, + ) +

+
+
description
+
It is used to create a new own property of an object.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5381,9 +6091,18 @@

CreateDataProperty ( _O_, _P_, _V_ )

- -

CreateMethodProperty ( _O_, _P_, _V_ )

-

The abstract operation CreateMethodProperty takes arguments _O_ (an Object), _P_ (a property key), and _V_ (an ECMAScript language value). It is used to create a new own property of an object. It performs the following steps when called:

+ +

+ CreateMethodProperty ( + _O_: an Object, + _P_: a property key, + _V_: an ECMAScript language value, + ) +

+
+
description
+
It is used to create a new own property of an object.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5395,9 +6114,18 @@

CreateMethodProperty ( _O_, _P_, _V_ )

- -

CreateDataPropertyOrThrow ( _O_, _P_, _V_ )

-

The abstract operation CreateDataPropertyOrThrow takes arguments _O_ (an Object), _P_ (a property key), and _V_ (an ECMAScript language value). It is used to create a new own property of an object. It throws a *TypeError* exception if the requested property update cannot be performed. It performs the following steps when called:

+ +

+ CreateDataPropertyOrThrow ( + _O_: an Object, + _P_: a property key, + _V_: an ECMAScript language value, + ) +

+
+
description
+
It is used to create a new own property of an object. It throws a *TypeError* exception if the requested property update cannot be performed.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5410,9 +6138,18 @@

CreateDataPropertyOrThrow ( _O_, _P_, _V_ )

- -

DefinePropertyOrThrow ( _O_, _P_, _desc_ )

-

The abstract operation DefinePropertyOrThrow takes arguments _O_ (an Object), _P_ (a property key), and _desc_ (a Property Descriptor). It is used to call the [[DefineOwnProperty]] internal method of an object in a manner that will throw a *TypeError* exception if the requested property update cannot be performed. It performs the following steps when called:

+ +

+ DefinePropertyOrThrow ( + _O_: an Object, + _P_: a property key, + _desc_: a Property Descriptor, + ) +

+
+
description
+
It is used to call the [[DefineOwnProperty]] internal method of an object in a manner that will throw a *TypeError* exception if the requested property update cannot be performed.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5422,9 +6159,17 @@

DefinePropertyOrThrow ( _O_, _P_, _desc_ )

- -

DeletePropertyOrThrow ( _O_, _P_ )

-

The abstract operation DeletePropertyOrThrow takes arguments _O_ (an Object) and _P_ (a property key). It is used to remove a specific own property of an object. It throws an exception if the property is not configurable. It performs the following steps when called:

+ +

+ DeletePropertyOrThrow ( + _O_: an Object, + _P_: a property key, + ) +

+
+
description
+
It is used to remove a specific own property of an object. It throws an exception if the property is not configurable.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5434,9 +6179,17 @@

DeletePropertyOrThrow ( _O_, _P_ )

- -

GetMethod ( _V_, _P_ )

-

The abstract operation GetMethod takes arguments _V_ (an ECMAScript language value) and _P_ (a property key). It is used to get the value of a specific property of an ECMAScript language value when the value of the property is expected to be a function. It performs the following steps when called:

+ +

+ GetMethod ( + _V_: an ECMAScript language value, + _P_: a property key, + ) +

+
+
description
+
It is used to get the value of a specific property of an ECMAScript language value when the value of the property is expected to be a function.
+
1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _func_ be ? GetV(_V_, _P_). @@ -5446,9 +6199,17 @@

GetMethod ( _V_, _P_ )

- -

HasProperty ( _O_, _P_ )

-

The abstract operation HasProperty takes arguments _O_ (an Object) and _P_ (a property key) and returns a completion record which, if its [[Type]] is ~normal~, has a [[Value]] which is a Boolean. It is used to determine whether an object has a property with the specified property key. The property may be either an own or inherited. It performs the following steps when called:

+ +

+ HasProperty ( + _O_: an Object, + _P_: a property key, + ) +

+
+
description
+
It returns a completion record which, if its [[Type]] is ~normal~, has a [[Value]] which is a Boolean. It is used to determine whether an object has a property with the specified property key. The property may be either an own or inherited.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5456,9 +6217,17 @@

HasProperty ( _O_, _P_ )

- -

HasOwnProperty ( _O_, _P_ )

-

The abstract operation HasOwnProperty takes arguments _O_ (an Object) and _P_ (a property key) and returns a completion record which, if its [[Type]] is ~normal~, has a [[Value]] which is a Boolean. It is used to determine whether an object has an own property with the specified property key. It performs the following steps when called:

+ +

+ HasOwnProperty ( + _O_: an Object, + _P_: a property key, + ) +

+
+
description
+
It returns a completion record which, if its [[Type]] is ~normal~, has a [[Value]] which is a Boolean. It is used to determine whether an object has an own property with the specified property key.
+
1. Assert: Type(_O_) is Object. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -5468,9 +6237,18 @@

HasOwnProperty ( _O_, _P_ )

- -

Call ( _F_, _V_ [ , _argumentsList_ ] )

-

The abstract operation Call takes arguments _F_ (an ECMAScript language value) and _V_ (an ECMAScript language value) and optional argument _argumentsList_ (a List of ECMAScript language values). It is used to call the [[Call]] internal method of a function object. _F_ is the function object, _V_ is an ECMAScript language value that is the *this* value of the [[Call]], and _argumentsList_ is the value passed to the corresponding argument of the internal method. If _argumentsList_ is not present, a new empty List is used as its value. It performs the following steps when called:

+ +

+ Call ( + _F_: an ECMAScript language value, + _V_: an ECMAScript language value, + optional _argumentsList_: a List of ECMAScript language values, + ) +

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

Call ( _F_, _V_ [ , _argumentsList_ ] )

- -

Construct ( _F_ [ , _argumentsList_ [ , _newTarget_ ] ] )

-

The abstract operation Construct takes argument _F_ (a function object) and optional arguments _argumentsList_ and _newTarget_. It is used to call the [[Construct]] internal method of a function object. _argumentsList_ and _newTarget_ are the values to be passed as the corresponding arguments of the internal method. If _argumentsList_ is not present, a new empty List is used as its value. If _newTarget_ is not present, _F_ is used as its value. It performs the following steps when called:

+ +

+ Construct ( + _F_: a function object, + optional _argumentsList_: unknown, + optional _newTarget_: unknown, + ) +

+
+
description
+
It is used to call the [[Construct]] internal method of a function object. _argumentsList_ and _newTarget_ are the values to be passed as the corresponding arguments of the internal method. If _argumentsList_ is not present, a new empty List is used as its value. If _newTarget_ is not present, _F_ is used as its value.
+
1. If _newTarget_ is not present, set _newTarget_ to _F_. 1. If _argumentsList_ is not present, set _argumentsList_ to a new empty List. @@ -5493,9 +6280,17 @@

Construct ( _F_ [ , _argumentsList_ [ , _newTarget_ ] ] )

- -

SetIntegrityLevel ( _O_, _level_ )

-

The abstract operation SetIntegrityLevel takes arguments _O_ and _level_. It is used to fix the set of own properties of an object. It performs the following steps when called:

+ +

+ SetIntegrityLevel ( + _O_: unknown, + _level_: unknown, + ) +

+
+
description
+
It is used to fix the set of own properties of an object.
+
1. Assert: Type(_O_) is Object. 1. Assert: _level_ is either ~sealed~ or ~frozen~. @@ -5519,9 +6314,17 @@

SetIntegrityLevel ( _O_, _level_ )

- -

TestIntegrityLevel ( _O_, _level_ )

-

The abstract operation TestIntegrityLevel takes arguments _O_ and _level_. It is used to determine if the set of own properties of an object are fixed. It performs the following steps when called:

+ +

+ TestIntegrityLevel ( + _O_: unknown, + _level_: unknown, + ) +

+
+
description
+
It is used to determine if the set of own properties of an object are fixed.
+
1. Assert: Type(_O_) is Object. 1. Assert: _level_ is either ~sealed~ or ~frozen~. @@ -5539,9 +6342,16 @@

TestIntegrityLevel ( _O_, _level_ )

- -

CreateArrayFromList ( _elements_ )

-

The abstract operation CreateArrayFromList takes argument _elements_ (a List). It is used to create an Array object whose elements are provided by _elements_. It performs the following steps when called:

+ +

+ CreateArrayFromList ( + _elements_: a List, + ) +

+
+
description
+
It is used to create an Array object whose elements are provided by _elements_.
+
1. Assert: _elements_ is a List whose elements are all ECMAScript language values. 1. Let _array_ be ! ArrayCreate(0). @@ -5553,9 +6363,16 @@

CreateArrayFromList ( _elements_ )

- -

LengthOfArrayLike ( _obj_ )

-

The abstract operation LengthOfArrayLike takes argument _obj_. It returns the value of the *"length"* property of an array-like object (as a non-negative integer). It performs the following steps when called:

+ +

+ LengthOfArrayLike ( + _obj_: unknown, + ) +

+
+
description
+
It returns the value of the *"length"* property of an array-like object (as a non-negative integer).
+
1. Assert: Type(_obj_) is Object. 1. Return ℝ(? ToLength(? Get(_obj_, *"length"*))). @@ -5569,9 +6386,17 @@

LengthOfArrayLike ( _obj_ )

- -

CreateListFromArrayLike ( _obj_ [ , _elementTypes_ ] )

-

The abstract operation CreateListFromArrayLike takes argument _obj_ and optional argument _elementTypes_ (a List of names of ECMAScript Language Types). 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. It performs the following steps when called:

+ +

+ CreateListFromArrayLike ( + _obj_: unknown, + optional _elementTypes_: a List of names of ECMAScript Language Types, + ) +

+
+
description
+
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 Type(_obj_) is not Object, throw a *TypeError* exception. @@ -5588,9 +6413,18 @@

CreateListFromArrayLike ( _obj_ [ , _elementTypes_ ] )

- -

Invoke ( _V_, _P_ [ , _argumentsList_ ] )

-

The abstract operation Invoke takes arguments _V_ (an ECMAScript language value) and _P_ (a property key) and optional argument _argumentsList_ (a List of ECMAScript language values). It is used to call a method property of an ECMAScript language value. _V_ serves as both the lookup point for the property and the *this* value of the call. _argumentsList_ is the list of arguments values passed to the method. If _argumentsList_ is not present, a new empty List is used as its value. It performs the following steps when called:

+ +

+ Invoke ( + _V_: an ECMAScript language value, + _P_: a property key, + optional _argumentsList_: a List of ECMAScript language values, + ) +

+
+
description
+
It is used to call a method property of an ECMAScript language value. _V_ serves as both the lookup point for the property and the *this* value of the call. _argumentsList_ is the list of arguments values passed to the method. If _argumentsList_ is not present, a new empty List is used as its value.
+
1. Assert: IsPropertyKey(_P_) is *true*. @@ -5600,9 +6434,17 @@

Invoke ( _V_, _P_ [ , _argumentsList_ ] )

- -

OrdinaryHasInstance ( _C_, _O_ )

-

The abstract operation OrdinaryHasInstance takes arguments _C_ (an ECMAScript language value) and _O_. It implements the default algorithm for determining if _O_ inherits from the instance object inheritance path provided by _C_. It performs the following steps when called:

+ +

+ OrdinaryHasInstance ( + _C_: an ECMAScript language value, + _O_: unknown, + ) +

+
+
description
+
It implements the default algorithm for determining if _O_ inherits from the instance object inheritance path provided by _C_.
+
1. If IsCallable(_C_) is *false*, return *false*. 1. If _C_ has a [[BoundTargetFunction]] internal slot, then @@ -5618,9 +6460,17 @@

OrdinaryHasInstance ( _C_, _O_ )

- -

SpeciesConstructor ( _O_, _defaultConstructor_ )

-

The abstract operation SpeciesConstructor takes arguments _O_ (an Object) and _defaultConstructor_ (a constructor). It is used to retrieve the constructor that should be used to create new objects that are derived from _O_. _defaultConstructor_ is the constructor to use if a constructor @@species property cannot be found starting from _O_. It performs the following steps when called:

+ +

+ SpeciesConstructor ( + _O_: an Object, + _defaultConstructor_: a constructor, + ) +

+
+
description
+
It is used to retrieve the constructor that should be used to create new objects that are derived from _O_. _defaultConstructor_ is the constructor to use if a constructor @@species property cannot be found starting from _O_.
+
1. Assert: Type(_O_) is Object. 1. Let _C_ be ? Get(_O_, *"constructor"*). @@ -5633,9 +6483,15 @@

SpeciesConstructor ( _O_, _defaultConstructor_ )

- -

EnumerableOwnPropertyNames ( _O_, _kind_ )

-

The abstract operation EnumerableOwnPropertyNames takes arguments _O_ (an Object) and _kind_ (one of ~key~, ~value~, or ~key+value~). It performs the following steps when called:

+ +

+ EnumerableOwnPropertyNames ( + _O_: an Object, + _kind_: one of ~key~, ~value~, or ~key+value~, + ) +

+
+
1. Assert: Type(_O_) is Object. 1. Let _ownKeys_ be ? _O_.[[OwnPropertyKeys]](). @@ -5656,9 +6512,14 @@

EnumerableOwnPropertyNames ( _O_, _kind_ )

- -

GetFunctionRealm ( _obj_ )

-

The abstract operation GetFunctionRealm takes argument _obj_. It performs the following steps when called:

+ +

+ GetFunctionRealm ( + _obj_: unknown, + ) +

+
+
1. Assert: ! IsCallable(_obj_) is *true*. 1. If _obj_ has a [[Realm]] internal slot, then @@ -5677,9 +6538,16 @@

GetFunctionRealm ( _obj_ )

- -

CopyDataProperties ( _target_, _source_, _excludedItems_ )

-

The abstract operation CopyDataProperties takes arguments _target_, _source_, and _excludedItems_. It performs the following steps when called:

+ +

+ CopyDataProperties ( + _target_: unknown, + _source_: unknown, + _excludedItems_: unknown, + ) +

+
+
1. Assert: Type(_target_) is Object. 1. Assert: _excludedItems_ is a List of property keys. @@ -5703,9 +6571,15 @@

CopyDataProperties ( _target_, _source_, _excludedItems_ )

- -

PrivateElementFind ( _P_, _O_ )

-

The abstract operation PrivateElementFind takes arguments _P_ (a Private Name) and _O_ (an Object). It performs the following steps when called:

+ +

+ PrivateElementFind ( + _P_: a Private Name, + _O_: an Object, + ) +

+
+
1. If _O_.[[PrivateElements]] contains a PrivateElement whose [[Key]] is _P_, then 1. Let _entry_ be that PrivateElement. @@ -5714,9 +6588,16 @@

PrivateElementFind ( _P_, _O_ )

- -

PrivateFieldAdd ( _P_, _O_, _value_ )

-

The abstract operation PrivateFieldAdd takes arguments _P_ (a Private Name), _O_ (an Object), and _value_ (an ECMAScript language value). It performs the following steps when called:

+ +

+ PrivateFieldAdd ( + _P_: a Private Name, + _O_: an Object, + _value_: an ECMAScript language value, + ) +

+
+
1. Let _entry_ be ! PrivateElementFind(_P_, _O_). 1. If _entry_ is not ~empty~, throw a *TypeError* exception. @@ -5724,9 +6605,15 @@

PrivateFieldAdd ( _P_, _O_, _value_ )

- -

PrivateMethodOrAccessorAdd ( _method_, _O_ )

-

The abstract operation PrivateMethodOrAccessorAdd takes arguments _method_ (a PrivateElement) and _O_ (an Object). It performs the following steps when called:

+ +

+ PrivateMethodOrAccessorAdd ( + _method_: a PrivateElement, + _O_: an Object, + ) +

+
+
1. Assert: _method_.[[Kind]] is either ~method~ or ~accessor~. 1. Let _entry_ be ! PrivateElementFind(_method_.[[Key]], _O_). @@ -5736,9 +6623,15 @@

PrivateMethodOrAccessorAdd ( _method_, _O_ )

- -

PrivateGet ( _P_, _O_ )

-

The abstract operation PrivateGet takes arguments _P_ (a Private Name) and _O_ (an Object). It performs the following steps when called:

+ +

+ PrivateGet ( + _P_: a Private Name, + _O_: an Object, + ) +

+
+
1. Let _entry_ be ! PrivateElementFind(_P_, _O_). 1. If _entry_ is ~empty~, throw a *TypeError* exception. @@ -5751,9 +6644,16 @@

PrivateGet ( _P_, _O_ )

- -

PrivateSet ( _P_, _O_, _value_ )

-

The abstract operation PrivateSet takes arguments _P_ (a Private Name), _O_ (an Object), and _value_ (an ECMAScript language value). It performs the following steps when called:

+ +

+ PrivateSet ( + _P_: a Private Name, + _O_: an Object, + _value_: an ECMAScript language value, + ) +

+
+
1. Let _entry_ be ! PrivateElementFind(_P_, _O_). 1. If _entry_ is ~empty~, throw a *TypeError* exception. @@ -5769,9 +6669,15 @@

PrivateSet ( _P_, _O_, _value_ )

- -

DefineField ( _receiver_, _fieldRecord_ )

-

The abstract operation DefineField takes arguments _receiver_ (an Object) and _fieldRecord_ (a ClassFieldDefinition Record). It performs the following steps when called:

+ +

+ DefineField ( + _receiver_: an Object, + _fieldRecord_: a ClassFieldDefinition Record, + ) +

+
+
1. Let _fieldName_ be _fieldRecord_.[[Name]]. 1. Let _initializer_ be _fieldRecord_.[[Initializer]]. @@ -5786,9 +6692,15 @@

DefineField ( _receiver_, _fieldRecord_ )

- -

InitializeInstanceElements ( _O_, _constructor_ )

-

The abstract operation InitializeInstanceElements takes arguments _O_ (an Object) and _constructor_ (an ECMAScript function object). It performs the following steps when called:

+ +

+ InitializeInstanceElements ( + _O_: an Object, + _constructor_: an ECMAScript function object, + ) +

+
+
1. Let _methods_ be the value of _constructor_.[[PrivateMethods]]. 1. For each PrivateElement _method_ of _methods_, do @@ -5804,9 +6716,16 @@

InitializeInstanceElements ( _O_, _constructor_ )

Operations on Iterator Objects

See Common Iteration Interfaces ().

- -

GetIterator ( _obj_ [ , _hint_ [ , _method_ ] ] )

-

The abstract operation GetIterator takes argument _obj_ and optional arguments _hint_ and _method_. It performs the following steps when called:

+ +

+ GetIterator ( + _obj_: unknown, + optional _hint_: unknown, + optional _method_: unknown, + ) +

+
+
1. If _hint_ is not present, set _hint_ to ~sync~. 1. Assert: _hint_ is either ~sync~ or ~async~. @@ -5826,9 +6745,15 @@

GetIterator ( _obj_ [ , _hint_ [ , _method_ ] ] )

- -

IteratorNext ( _iteratorRecord_ [ , _value_ ] )

-

The abstract operation IteratorNext takes argument _iteratorRecord_ and optional argument _value_. It performs the following steps when called:

+ +

+ IteratorNext ( + _iteratorRecord_: unknown, + optional _value_: unknown, + ) +

+
+
1. If _value_ is not present, then 1. Let _result_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]]). @@ -5839,27 +6764,44 @@

IteratorNext ( _iteratorRecord_ [ , _value_ ] )

- -

IteratorComplete ( _iterResult_ )

-

The abstract operation IteratorComplete takes argument _iterResult_. It performs the following steps when called:

+ +

+ IteratorComplete ( + _iterResult_: unknown, + ) +

+
+
1. Assert: Type(_iterResult_) is Object. 1. Return ! ToBoolean(? Get(_iterResult_, *"done"*)).
- -

IteratorValue ( _iterResult_ )

-

The abstract operation IteratorValue takes argument _iterResult_. It performs the following steps when called:

+ +

+ IteratorValue ( + _iterResult_: unknown, + ) +

+
+
1. Assert: Type(_iterResult_) is Object. 1. Return ? Get(_iterResult_, *"value"*).
- -

IteratorStep ( _iteratorRecord_ )

-

The abstract operation IteratorStep takes argument _iteratorRecord_. It requests the next value from _iteratorRecord_.[[Iterator]] by calling _iteratorRecord_.[[NextMethod]] and returns either *false* indicating that the iterator has reached its end or the IteratorResult object if a next value is available. It performs the following steps when called:

+ +

+ IteratorStep ( + _iteratorRecord_: unknown, + ) +

+
+
description
+
It requests the next value from _iteratorRecord_.[[Iterator]] by calling _iteratorRecord_.[[NextMethod]] and returns either *false* indicating that the iterator has reached its end or the IteratorResult object if a next value is available.
+
1. Let _result_ be ? IteratorNext(_iteratorRecord_). 1. Let _done_ be ? IteratorComplete(_result_). @@ -5868,9 +6810,17 @@

IteratorStep ( _iteratorRecord_ )

- -

IteratorClose ( _iteratorRecord_, _completion_ )

-

The abstract operation IteratorClose takes arguments _iteratorRecord_ and _completion_. It is used to notify an iterator that it should perform any actions it would normally perform when it has reached its completed state. It performs the following steps when called:

+ +

+ IteratorClose ( + _iteratorRecord_: unknown, + _completion_: unknown, + ) +

+
+
description
+
It is used to notify an iterator that it should perform any actions it would normally perform when it has reached its completed state.
+
1. Assert: Type(_iteratorRecord_.[[Iterator]]) is Object. 1. Assert: _completion_ is a Completion Record. @@ -5887,9 +6837,17 @@

IteratorClose ( _iteratorRecord_, _completion_ )

- -

AsyncIteratorClose ( _iteratorRecord_, _completion_ )

-

The abstract operation AsyncIteratorClose takes arguments _iteratorRecord_ and _completion_. It is used to notify an async iterator that it should perform any actions it would normally perform when it has reached its completed state. It performs the following steps when called:

+ +

+ AsyncIteratorClose ( + _iteratorRecord_: unknown, + _completion_: unknown, + ) +

+
+
description
+
It is used to notify an async iterator that it should perform any actions it would normally perform when it has reached its completed state.
+
1. Assert: Type(_iteratorRecord_.[[Iterator]]) is Object. 1. Assert: _completion_ is a Completion Record. @@ -5907,9 +6865,17 @@

AsyncIteratorClose ( _iteratorRecord_, _completion_ )

- -

CreateIterResultObject ( _value_, _done_ )

-

The abstract operation CreateIterResultObject takes arguments _value_ and _done_. It creates an object that supports the IteratorResult interface. It performs the following steps when called:

+ +

+ CreateIterResultObject ( + _value_: unknown, + _done_: unknown, + ) +

+
+
description
+
It creates an object that supports the IteratorResult interface.
+
1. Assert: Type(_done_) is Boolean. 1. Let _obj_ be ! OrdinaryObjectCreate(%Object.prototype%). @@ -5919,9 +6885,16 @@

CreateIterResultObject ( _value_, _done_ )

- -

CreateListIteratorRecord ( _list_ )

-

The abstract operation CreateListIteratorRecord takes argument _list_. It creates an Iterator () object record whose `next` method returns the successive elements of _list_. It performs the following steps when called:

+ +

+ CreateListIteratorRecord ( + _list_: unknown, + ) +

+
+
description
+
It creates an Iterator () object record whose `next` method returns the successive elements of _list_.
+
1. Let _closure_ be a new Abstract Closure with no parameters that captures _list_ and performs the following steps when called: 1. For each element _E_ of _list_, do @@ -5935,9 +6908,15 @@

CreateListIteratorRecord ( _list_ )

- -

IterableToList ( _items_ [ , _method_ ] )

-

The abstract operation IterableToList takes argument _items_ and optional argument _method_. It performs the following steps when called:

+ +

+ IterableToList ( + _items_: unknown, + optional _method_: unknown, + ) +

+
+
1. If _method_ is present, then 1. Let _iteratorRecord_ be ? GetIterator(_items_, ~sync~, _method_). @@ -7775,9 +8754,16 @@

Static Semantics: IsFunctionDefinition

- -

Static Semantics: IsAnonymousFunctionDefinition ( _expr_ )

-

The abstract operation IsAnonymousFunctionDefinition takes argument _expr_ (a Parse Node for |AssignmentExpression| or a Parse Node for |Initializer|). It determines if its argument is a function definition that does not bind a name. It performs the following steps when called:

+ +

+ Static Semantics: IsAnonymousFunctionDefinition ( + _expr_: a Parse Node for |AssignmentExpression| or a Parse Node for |Initializer|, + ) +

+
+
description
+
It determines if its argument is a function definition that does not bind a name.
+
1. If IsFunctionDefinition of _expr_ is *false*, return *false*. 1. Let _hasName_ be HasName of _expr_. @@ -8162,9 +9148,16 @@

Runtime Semantics: BindingInitialization

1. Let _excludedNames_ be ? PropertyBindingInitialization of |BindingPropertyList| with arguments _value_ and _environment_. 1. Return the result of performing RestBindingInitialization of |BindingRestProperty| with arguments _value_, _environment_, and _excludedNames_.
- -

InitializeBoundName ( _name_, _value_, _environment_ )

-

The abstract operation InitializeBoundName takes arguments _name_, _value_, and _environment_. It performs the following steps when called:

+ +

+ InitializeBoundName ( + _name_: unknown, + _value_: unknown, + _environment_: unknown, + ) +

+
+
1. Assert: Type(_name_) is String. 1. If _environment_ is not *undefined*, then @@ -8716,18 +9709,39 @@

Declarative Environment Records

Each declarative Environment Record is associated with an ECMAScript program scope containing variable, constant, let, class, module, import, and/or function declarations. A declarative Environment Record binds the set of identifiers defined by the declarations contained within its scope.

The behaviour of the concrete specification methods for declarative Environment Records is defined by the following algorithms.

- -

HasBinding ( _N_ )

-

The HasBinding concrete method of a declarative Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier is one of the identifiers bound by the record. It performs the following steps when called:

+ +

+ HasBinding ( + _N_: a String, + ) +

+
+
for
+
a declarative Environment Record _envRec_
+ +
description
+
It determines if the argument identifier is one of the identifiers bound by the record.
+
1. If _envRec_ has a binding for the name that is the value of _N_, return *true*. 1. Return *false*.
- -

CreateMutableBinding ( _N_, _D_ )

-

The CreateMutableBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates a new mutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _D_ has the value *true*, the new binding is marked as being subject to deletion. It performs the following steps when called:

+ +

+ CreateMutableBinding ( + _N_: a String, + _D_: a Boolean, + ) +

+
+
for
+
a declarative Environment Record _envRec_
+ +
description
+
It creates a new mutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _D_ has the value *true*, the new binding is marked as being subject to deletion.
+
1. Assert: _envRec_ does not already have a binding for _N_. 1. Create a mutable binding in _envRec_ for _N_ and record that it is uninitialized. If _D_ is *true*, record that the newly created binding may be deleted by a subsequent DeleteBinding call. @@ -8735,9 +9749,20 @@

CreateMutableBinding ( _N_, _D_ )

- -

CreateImmutableBinding ( _N_, _S_ )

-

The CreateImmutableBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ has the value *true*, the new binding is marked as a strict binding. It performs the following steps when called:

+ +

+ CreateImmutableBinding ( + _N_: a String, + _S_: a Boolean, + ) +

+
+
for
+
a declarative Environment Record _envRec_
+ +
description
+
It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ has the value *true*, the new binding is marked as a strict binding.
+
1. Assert: _envRec_ does not already have a binding for _N_. 1. Create an immutable binding in _envRec_ for _N_ and record that it is uninitialized. If _S_ is *true*, record that the newly created binding is a strict binding. @@ -8745,9 +9770,20 @@

CreateImmutableBinding ( _N_, _S_ )

- -

InitializeBinding ( _N_, _V_ )

-

The InitializeBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _V_ (an ECMAScript language value). It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist. It performs the following steps when called:

+ +

+ InitializeBinding ( + _N_: a String, + _V_: an ECMAScript language value, + ) +

+
+
for
+
a declarative Environment Record _envRec_
+ +
description
+
It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist.
+
1. Assert: _envRec_ must have an uninitialized binding for _N_. 1. Set the bound value for _N_ in _envRec_ to _V_. @@ -8756,9 +9792,21 @@

InitializeBinding ( _N_, _V_ )

- -

SetMutableBinding ( _N_, _V_, _S_ )

-

The SetMutableBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _S_ (a Boolean). It attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. A binding for _N_ normally already exists, but in rare cases it may not. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*. It performs the following steps when called:

+ +

+ SetMutableBinding ( + _N_: a String, + _V_: an ECMAScript language value, + _S_: a Boolean, + ) +

+
+
for
+
a declarative Environment Record _envRec_
+ +
description
+
It attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. A binding for _N_ normally already exists, but in rare cases it may not. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*.
+
1. [id="step-setmutablebinding-missing-binding"] If _envRec_ does not have a binding for _N_, then 1. If _S_ is *true*, throw a *ReferenceError* exception. @@ -8779,9 +9827,20 @@

SetMutableBinding ( _N_, _V_, _S_ )

- -

GetBindingValue ( _N_, _S_ )

-

The GetBindingValue concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its bound identifier whose name is the value of the argument _N_. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _S_. It performs the following steps when called:

+ +

+ GetBindingValue ( + _N_: a String, + _S_: a Boolean, + ) +

+
+
for
+
a declarative Environment Record _envRec_
+ +
description
+
It returns the value of its bound identifier whose name is the value of the argument _N_. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _S_.
+
1. Assert: _envRec_ has a binding for _N_. 1. If the binding for _N_ in _envRec_ is an uninitialized binding, throw a *ReferenceError* exception. @@ -8789,9 +9848,19 @@

GetBindingValue ( _N_, _S_ )

- -

DeleteBinding ( _N_ )

-

The DeleteBinding concrete method of a declarative Environment Record _envRec_ takes argument _N_ (a String). It can only delete bindings that have been explicitly designated as being subject to deletion. It performs the following steps when called:

+ +

+ DeleteBinding ( + _N_: a String, + ) +

+
+
for
+
a declarative Environment Record _envRec_
+ +
description
+
It can only delete bindings that have been explicitly designated as being subject to deletion.
+
1. Assert: _envRec_ has a binding for the name that is the value of _N_. 1. If the binding for _N_ in _envRec_ cannot be deleted, return *false*. @@ -8800,9 +9869,12 @@

DeleteBinding ( _N_ )

- +

HasThisBinding ( )

-

The HasThisBinding concrete method of a declarative Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a declarative Environment Record _envRec_
+
1. Return *false*. @@ -8811,9 +9883,12 @@

HasThisBinding ( )

- +

HasSuperBinding ( )

-

The HasSuperBinding concrete method of a declarative Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a declarative Environment Record _envRec_
+
1. Return *false*. @@ -8822,9 +9897,12 @@

HasSuperBinding ( )

- +

WithBaseObject ( )

-

The WithBaseObject concrete method of a declarative Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a declarative Environment Record _envRec_
+
1. Return *undefined*. @@ -8877,9 +9955,19 @@

Object Environment Records

The behaviour of the concrete specification methods for object Environment Records is defined by the following algorithms.

- -

HasBinding ( _N_ )

-

The HasBinding concrete method of an object Environment Record _envRec_ takes argument _N_ (a String). It determines if its associated binding object has a property whose name is the value of the argument _N_. It performs the following steps when called:

+ +

+ HasBinding ( + _N_: a String, + ) +

+
+
for
+
an object Environment Record _envRec_
+ +
description
+
It determines if its associated binding object has a property whose name is the value of the argument _N_.
+
1. Let _bindingObject_ be _envRec_.[[BindingObject]]. 1. Let _foundBinding_ be ? HasProperty(_bindingObject_, _N_). @@ -8893,9 +9981,20 @@

HasBinding ( _N_ )

- -

CreateMutableBinding ( _N_, _D_ )

-

The CreateMutableBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates in an Environment Record's associated binding object a property whose name is the String value and initializes it to the value *undefined*. If _D_ has the value *true*, the new property's [[Configurable]] attribute is set to *true*; otherwise it is set to *false*. It performs the following steps when called:

+ +

+ CreateMutableBinding ( + _N_: a String, + _D_: a Boolean, + ) +

+
+
for
+
an object Environment Record _envRec_
+ +
description
+
It creates in an Environment Record's associated binding object a property whose name is the String value and initializes it to the value *undefined*. If _D_ has the value *true*, the new property's [[Configurable]] attribute is set to *true*; otherwise it is set to *false*.
+
1. Let _bindingObject_ be _envRec_.[[BindingObject]]. 1. Return ? DefinePropertyOrThrow(_bindingObject_, _N_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }). @@ -8910,9 +10009,20 @@

CreateImmutableBinding ( _N_, _S_ )

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

- -

InitializeBinding ( _N_, _V_ )

-

The InitializeBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _V_ (an ECMAScript language value). It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. It performs the following steps when called:

+ +

+ InitializeBinding ( + _N_: a String, + _V_: an ECMAScript language value, + ) +

+
+
for
+
an object Environment Record _envRec_
+ +
description
+
It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_.
+
1. Return ? _envRec_.SetMutableBinding(_N_, _V_, *false*). @@ -8921,9 +10031,21 @@

InitializeBinding ( _N_, _V_ )

- -

SetMutableBinding ( _N_, _V_, _S_ )

-

The SetMutableBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _S_ (a Boolean). It attempts to set the value of the Environment Record's associated binding object's property whose name is the value of the argument _N_ to the value of argument _V_. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_. It performs the following steps when called:

+ +

+ SetMutableBinding ( + _N_: a String, + _V_: an ECMAScript language value, + _S_: a Boolean, + ) +

+
+
for
+
an object Environment Record _envRec_
+ +
description
+
It attempts to set the value of the Environment Record's associated binding object's property whose name is the value of the argument _N_ to the value of argument _V_. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_.
+
1. Let _bindingObject_ be _envRec_.[[BindingObject]]. 1. Let _stillExists_ be ? HasProperty(_bindingObject_, _N_). @@ -8932,9 +10054,20 @@

SetMutableBinding ( _N_, _V_, _S_ )

- -

GetBindingValue ( _N_, _S_ )

-

The GetBindingValue concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its associated binding object's property whose name is the String value of the argument identifier _N_. The property should already exist but if it does not the result depends upon _S_. It performs the following steps when called:

+ +

+ GetBindingValue ( + _N_: a String, + _S_: a Boolean, + ) +

+
+
for
+
an object Environment Record _envRec_
+ +
description
+
It returns the value of its associated binding object's property whose name is the String value of the argument identifier _N_. The property should already exist but if it does not the result depends upon _S_.
+
1. Let _bindingObject_ be _envRec_.[[BindingObject]]. 1. Let _value_ be ? HasProperty(_bindingObject_, _N_). @@ -8944,18 +10077,31 @@

GetBindingValue ( _N_, _S_ )

- -

DeleteBinding ( _N_ )

-

The DeleteBinding concrete method of an object Environment Record _envRec_ takes argument _N_ (a String). It can only delete bindings that correspond to properties of the environment object whose [[Configurable]] attribute have the value *true*. It performs the following steps when called:

+ +

+ DeleteBinding ( + _N_: a String, + ) +

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

HasThisBinding ( )

-

The HasThisBinding concrete method of an object Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
an object Environment Record _envRec_
+
1. Return *false*. @@ -8964,9 +10110,12 @@

HasThisBinding ( )

- +

HasSuperBinding ( )

-

The HasSuperBinding concrete method of an object Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
an object Environment Record _envRec_
+
1. Return *false*. @@ -8975,9 +10124,12 @@

HasSuperBinding ( )

- +

WithBaseObject ( )

-

The WithBaseObject concrete method of an object Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
an object Environment Record _envRec_
+
1. If _envRec_.[[IsWithEnvironment]] is *true*, return _envRec_.[[BindingObject]]. 1. Otherwise, return *undefined*. @@ -9091,9 +10243,16 @@

Function Environment Records

The behaviour of the additional concrete specification methods for function Environment Records is defined by the following algorithms:

- -

BindThisValue ( _V_ )

-

The BindThisValue concrete method of a function Environment Record _envRec_ takes argument _V_ (an ECMAScript language value). It performs the following steps when called:

+ +

+ BindThisValue ( + _V_: an ECMAScript language value, + ) +

+
+
for
+
a function Environment Record _envRec_
+
1. Assert: _envRec_.[[ThisBindingStatus]] is not ~lexical~. 1. If _envRec_.[[ThisBindingStatus]] is ~initialized~, throw a *ReferenceError* exception. @@ -9103,26 +10262,35 @@

BindThisValue ( _V_ )

- +

HasThisBinding ( )

-

The HasThisBinding concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a function Environment Record _envRec_
+
1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*; otherwise, return *true*.
- +

HasSuperBinding ( )

-

The HasSuperBinding concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a function Environment Record _envRec_
+
1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*. 1. If _envRec_.[[FunctionObject]].[[HomeObject]] has the value *undefined*, return *false*; otherwise, return *true*.
- +

GetThisBinding ( )

-

The GetThisBinding concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a function Environment Record _envRec_
+
1. Assert: _envRec_.[[ThisBindingStatus]] is not ~lexical~. 1. If _envRec_.[[ThisBindingStatus]] is ~uninitialized~, throw a *ReferenceError* exception. @@ -9130,9 +10298,12 @@

GetThisBinding ( )

- +

GetSuperBase ( )

-

The GetSuperBase concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a function Environment Record _envRec_
+
1. Let _home_ be _envRec_.[[FunctionObject]].[[HomeObject]]. 1. If _home_ has the value *undefined*, return *undefined*. @@ -9289,9 +10460,19 @@

Global Environment Records

The behaviour of the concrete specification methods for global Environment Records is defined by the following algorithms.

- -

HasBinding ( _N_ )

-

The HasBinding concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier is one of the identifiers bound by the record. It performs the following steps when called:

+ +

+ HasBinding ( + _N_: a String, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It determines if the argument identifier is one of the identifiers bound by the record.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, return *true*. @@ -9300,9 +10481,20 @@

HasBinding ( _N_ )

- -

CreateMutableBinding ( _N_, _D_ )

-

The CreateMutableBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates a new mutable binding for the name _N_ that is uninitialized. The binding is created in the associated DeclarativeRecord. A binding for _N_ must not already exist in the DeclarativeRecord. If _D_ has the value *true*, the new binding is marked as being subject to deletion. It performs the following steps when called:

+ +

+ CreateMutableBinding ( + _N_: a String, + _D_: a Boolean, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It creates a new mutable binding for the name _N_ that is uninitialized. The binding is created in the associated DeclarativeRecord. A binding for _N_ must not already exist in the DeclarativeRecord. If _D_ has the value *true*, the new binding is marked as being subject to deletion.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, throw a *TypeError* exception. @@ -9310,9 +10502,20 @@

CreateMutableBinding ( _N_, _D_ )

- -

CreateImmutableBinding ( _N_, _S_ )

-

The CreateImmutableBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ has the value *true*, the new binding is marked as a strict binding. It performs the following steps when called:

+ +

+ CreateImmutableBinding ( + _N_: a String, + _S_: a Boolean, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ has the value *true*, the new binding is marked as a strict binding.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, throw a *TypeError* exception. @@ -9320,9 +10523,20 @@

CreateImmutableBinding ( _N_, _S_ )

- -

InitializeBinding ( _N_, _V_ )

-

The InitializeBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _V_ (an ECMAScript language value). It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist. It performs the following steps when called:

+ +

+ InitializeBinding ( + _N_: a String, + _V_: an ECMAScript language value, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then @@ -9333,9 +10547,21 @@

InitializeBinding ( _N_, _V_ )

- -

SetMutableBinding ( _N_, _V_, _S_ )

-

The SetMutableBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _S_ (a Boolean). It attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_. It performs the following steps when called:

+ +

+ SetMutableBinding ( + _N_: a String, + _V_: an ECMAScript language value, + _S_: a Boolean, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then @@ -9345,9 +10571,20 @@

SetMutableBinding ( _N_, _V_, _S_ )

- -

GetBindingValue ( _N_, _S_ )

-

The GetBindingValue concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its bound identifier whose name is the value of the argument _N_. If the binding is an uninitialized binding throw a *ReferenceError* exception. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_. It performs the following steps when called:

+ +

+ GetBindingValue ( + _N_: a String, + _S_: a Boolean, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It returns the value of its bound identifier whose name is the value of the argument _N_. If the binding is an uninitialized binding throw a *ReferenceError* exception. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then @@ -9357,9 +10594,19 @@

GetBindingValue ( _N_, _S_ )

- -

DeleteBinding ( _N_ )

-

The DeleteBinding concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It can only delete bindings that have been explicitly designated as being subject to deletion. It performs the following steps when called:

+ +

+ DeleteBinding ( + _N_: a String, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It can only delete bindings that have been explicitly designated as being subject to deletion.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then @@ -9377,9 +10624,12 @@

DeleteBinding ( _N_ )

- +

HasThisBinding ( )

-

The HasThisBinding concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a global Environment Record _envRec_
+
1. Return *true*. @@ -9388,9 +10638,12 @@

HasThisBinding ( )

- +

HasSuperBinding ( )

-

The HasSuperBinding concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a global Environment Record _envRec_
+
1. Return *false*. @@ -9399,25 +10652,41 @@

HasSuperBinding ( )

- +

WithBaseObject ( )

-

The WithBaseObject concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a global Environment Record _envRec_
+
1. Return *undefined*.
- +

GetThisBinding ( )

-

The GetThisBinding concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a global Environment Record _envRec_
+
1. Return _envRec_.[[GlobalThisValue]].
- -

HasVarDeclaration ( _N_ )

-

The HasVarDeclaration concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier has a binding in this record that was created using a |VariableStatement| or a |FunctionDeclaration|. It performs the following steps when called:

+ +

+ HasVarDeclaration ( + _N_: a String, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It determines if the argument identifier has a binding in this record that was created using a |VariableStatement| or a |FunctionDeclaration|.
+
1. Let _varDeclaredNames_ be _envRec_.[[VarNames]]. 1. If _varDeclaredNames_ contains _N_, return *true*. @@ -9425,18 +10694,38 @@

HasVarDeclaration ( _N_ )

- -

HasLexicalDeclaration ( _N_ )

-

The HasLexicalDeclaration concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier has a binding in this record that was created using a lexical declaration such as a |LexicalDeclaration| or a |ClassDeclaration|. It performs the following steps when called:

+ +

+ HasLexicalDeclaration ( + _N_: a String, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It determines if the argument identifier has a binding in this record that was created using a lexical declaration such as a |LexicalDeclaration| or a |ClassDeclaration|.
+
1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. Return _DclRec_.HasBinding(_N_).
- -

HasRestrictedGlobalProperty ( _N_ )

-

The HasRestrictedGlobalProperty concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier is the name of a property of the global object that must not be shadowed by a global lexical binding. It performs the following steps when called:

+ +

+ HasRestrictedGlobalProperty ( + _N_: a String, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It determines if the argument identifier is the name of a property of the global object that must not be shadowed by a global lexical binding.
+
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. @@ -9450,9 +10739,19 @@

HasRestrictedGlobalProperty ( _N_ )

- -

CanDeclareGlobalVar ( _N_ )

-

The CanDeclareGlobalVar concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument _N_. Redundant var declarations and var declarations for pre-existing global object properties are allowed. It performs the following steps when called:

+ +

+ CanDeclareGlobalVar ( + _N_: a String, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument _N_. Redundant var declarations and var declarations for pre-existing global object properties are allowed.
+
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. @@ -9462,9 +10761,19 @@

CanDeclareGlobalVar ( _N_ )

- -

CanDeclareGlobalFunction ( _N_ )

-

The CanDeclareGlobalFunction concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _N_. It performs the following steps when called:

+ +

+ CanDeclareGlobalFunction ( + _N_: a String, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _N_.
+
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. @@ -9476,9 +10785,20 @@

CanDeclareGlobalFunction ( _N_ )

- -

CreateGlobalVarBinding ( _N_, _D_ )

-

The CreateGlobalVarBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates and initializes a mutable binding in the associated object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is reused and assumed to be initialized. It performs the following steps when called:

+ +

+ CreateGlobalVarBinding ( + _N_: a String, + _D_: a Boolean, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It creates and initializes a mutable binding in the associated object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is reused and assumed to be initialized.
+
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. @@ -9494,9 +10814,21 @@

CreateGlobalVarBinding ( _N_, _D_ )

- -

CreateGlobalFunctionBinding ( _N_, _V_, _D_ )

-

The CreateGlobalFunctionBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _D_ (a Boolean). It creates and initializes a mutable binding in the associated object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is replaced. It performs the following steps when called:

+ +

+ CreateGlobalFunctionBinding ( + _N_: a String, + _V_: an ECMAScript language value, + _D_: a Boolean, + ) +

+
+
for
+
a global Environment Record _envRec_
+ +
description
+
It creates and initializes a mutable binding in the associated object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is replaced.
+
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be _ObjRec_.[[BindingObject]]. @@ -9554,9 +10886,20 @@

Module Environment Records

The behaviour of the additional concrete specification methods for module Environment Records are defined by the following algorithms:

- -

GetBindingValue ( _N_, _S_ )

-

The GetBindingValue concrete method of a module Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its bound identifier whose name is the value of the argument _N_. However, if the binding is an indirect binding the value of the target binding is returned. If the binding exists but is uninitialized a *ReferenceError* is thrown. It performs the following steps when called:

+ +

+ GetBindingValue ( + _N_: a String, + _S_: a Boolean, + ) +

+
+
for
+
a module Environment Record _envRec_
+ +
description
+
It returns the value of its bound identifier whose name is the value of the argument _N_. However, if the binding is an indirect binding the value of the target binding is returned. If the binding exists but is uninitialized a *ReferenceError* is thrown.
+
1. Assert: _S_ is *true*. 1. Assert: _envRec_ has a binding for _N_. @@ -9581,9 +10924,12 @@

DeleteBinding ( _N_ )

- +

HasThisBinding ( )

-

The HasThisBinding concrete method of a module Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a module Environment Record _envRec_
+
1. Return *true*. @@ -9592,17 +10938,32 @@

HasThisBinding ( )

- +

GetThisBinding ( )

-

The GetThisBinding concrete method of a module Environment Record _envRec_ takes no arguments. It performs the following steps when called:

+
+
for
+
a module Environment Record _envRec_
+
1. Return *undefined*.
- -

CreateImportBinding ( _N_, _M_, _N2_ )

-

The CreateImportBinding concrete method of a module Environment Record _envRec_ takes arguments _N_ (a String), _M_ (a Module Record), and _N2_ (a String). It creates a new initialized immutable indirect binding for the name _N_. A binding must not already exist in this Environment Record for _N_. _N2_ is the name of a binding that exists in _M_'s module Environment Record. Accesses to the value of the new binding will indirectly access the bound value of the target binding. It performs the following steps when called:

+ +

+ CreateImportBinding ( + _N_: a String, + _M_: a Module Record, + _N2_: a String, + ) +

+
+
for
+
a module Environment Record _envRec_
+ +
description
+
It creates a new initialized immutable indirect binding for the name _N_. A binding must not already exist in this Environment Record for _N_. _N2_ is the name of a binding that exists in _M_'s module Environment Record. Accesses to the value of the new binding will indirectly access the bound value of the target binding.
+
1. Assert: _envRec_ does not already have a binding for _N_. 1. Assert: _M_ is a Module Record. @@ -9618,9 +10979,16 @@

CreateImportBinding ( _N_, _M_, _N2_ )

Environment Record Operations

The following abstract operations are used in this specification to operate upon Environment Records:

- -

GetIdentifierReference ( _env_, _name_, _strict_ )

-

The abstract operation GetIdentifierReference takes arguments _env_ (an Environment Record or *null*), _name_ (a String), and _strict_ (a Boolean). It performs the following steps when called:

+ +

+ GetIdentifierReference ( + _env_: an Environment Record or *null*, + _name_: a String, + _strict_: a Boolean, + ) +

+
+
1. If _env_ is the value *null*, then 1. Return the Reference Record { [[Base]]: ~unresolvable~, [[ReferencedName]]: _name_, [[Strict]]: _strict_, [[ThisValue]]: ~empty~ }. @@ -9633,9 +11001,14 @@

GetIdentifierReference ( _env_, _name_, _strict_ )

- -

NewDeclarativeEnvironment ( _E_ )

-

The abstract operation NewDeclarativeEnvironment takes argument _E_ (an Environment Record). It performs the following steps when called:

+ +

+ NewDeclarativeEnvironment ( + _E_: an Environment Record, + ) +

+
+
1. Let _env_ be a new declarative Environment Record containing no bindings. 1. Set _env_.[[OuterEnv]] to _E_. @@ -9643,9 +11016,16 @@

NewDeclarativeEnvironment ( _E_ )

- -

NewObjectEnvironment ( _O_, _W_, _E_ )

-

The abstract operation NewObjectEnvironment takes arguments _O_ (an Object), _W_ (a Boolean), and _E_ (an Environment Record or *null*). It performs the following steps when called:

+ +

+ NewObjectEnvironment ( + _O_: an Object, + _W_: a Boolean, + _E_: an Environment Record or *null*, + ) +

+
+
1. Let _env_ be a new object Environment Record. 1. Set _env_.[[BindingObject]] to _O_. @@ -9655,9 +11035,15 @@

NewObjectEnvironment ( _O_, _W_, _E_ )

- -

NewFunctionEnvironment ( _F_, _newTarget_ )

-

The abstract operation NewFunctionEnvironment takes arguments _F_ and _newTarget_. It performs the following steps when called:

+ +

+ NewFunctionEnvironment ( + _F_: unknown, + _newTarget_: unknown, + ) +

+
+
1. Assert: _F_ is an ECMAScript function. 1. Assert: Type(_newTarget_) is Undefined or Object. @@ -9671,9 +11057,15 @@

NewFunctionEnvironment ( _F_, _newTarget_ )

- -

NewGlobalEnvironment ( _G_, _thisValue_ )

-

The abstract operation NewGlobalEnvironment takes arguments _G_ and _thisValue_. It performs the following steps when called:

+ +

+ NewGlobalEnvironment ( + _G_: unknown, + _thisValue_: unknown, + ) +

+
+
1. Let _objRec_ be NewObjectEnvironment(_G_, *false*, *null*). 1. Let _dclRec_ be a new declarative Environment Record containing no bindings. @@ -9687,9 +11079,14 @@

NewGlobalEnvironment ( _G_, _thisValue_ )

- -

NewModuleEnvironment ( _E_ )

-

The abstract operation NewModuleEnvironment takes argument _E_ (an Environment Record). It performs the following steps when called:

+ +

+ NewModuleEnvironment ( + _E_: an Environment Record, + ) +

+
+
1. Let _env_ be a new module Environment Record containing no bindings. 1. Set _env_.[[OuterEnv]] to _E_. @@ -9749,18 +11146,29 @@

PrivateEnvironment Records

PrivateEnvironment Record Operations

The following abstract operations are used in this specification to operate upon PrivateEnvironment Records:

- -

NewPrivateEnvironment ( _outerPrivEnv_ )

-

The abstract operation NewPrivateEnvironment takes argument _outerPrivEnv_ (a PrivateEnvironment Record or *null*). It performs the following steps when called:

+ +

+ NewPrivateEnvironment ( + _outerPrivEnv_: a PrivateEnvironment Record or *null*, + ) +

+
+
1. Let _names_ be a new empty List. 1. Return the PrivateEnvironment Record { [[OuterPrivateEnvironment]]: _outerPrivEnv_, [[Names]]: _names_ }.
- -

ResolvePrivateIdentifier ( _privEnv_, _identifier_ )

-

The abstract operation ResolvePrivateIdentifier takes arguments _privEnv_ (a PrivateEnvironment Record) and _identifier_ (a String). It performs the following steps when called:

+ +

+ ResolvePrivateIdentifier ( + _privEnv_: a PrivateEnvironment Record, + _identifier_: a String, + ) +

+
+
1. Let _names_ be _privEnv_.[[Names]]. 1. If _names_ contains a Private Name whose [[Description]] is _identifier_, then @@ -9853,9 +11261,10 @@

Realms

- +

CreateRealm ( )

-

The abstract operation CreateRealm takes no arguments. It performs the following steps when called:

+
+
1. Let _realmRec_ be a new Realm Record. 1. Perform CreateIntrinsics(_realmRec_). @@ -9866,9 +11275,14 @@

CreateRealm ( )

- -

CreateIntrinsics ( _realmRec_ )

-

The abstract operation CreateIntrinsics takes argument _realmRec_. It performs the following steps when called:

+ +

+ CreateIntrinsics ( + _realmRec_: unknown, + ) +

+
+
1. Let _intrinsics_ be a new Record. 1. Set _realmRec_.[[Intrinsics]] to _intrinsics_. @@ -9878,9 +11292,16 @@

CreateIntrinsics ( _realmRec_ )

- -

SetRealmGlobalObject ( _realmRec_, _globalObj_, _thisValue_ )

-

The abstract operation SetRealmGlobalObject takes arguments _realmRec_, _globalObj_, and _thisValue_. It performs the following steps when called:

+ +

+ SetRealmGlobalObject ( + _realmRec_: unknown, + _globalObj_: unknown, + _thisValue_: unknown, + ) +

+
+
1. If _globalObj_ is *undefined*, then 1. Let _intrinsics_ be _realmRec_.[[Intrinsics]]. @@ -9894,9 +11315,14 @@

SetRealmGlobalObject ( _realmRec_, _globalObj_, _thisValue_ )

- -

SetDefaultGlobalBindings ( _realmRec_ )

-

The abstract operation SetDefaultGlobalBindings takes argument _realmRec_. It performs the following steps when called:

+ +

+ SetDefaultGlobalBindings ( + _realmRec_: unknown, + ) +

+
+
1. Let _global_ be _realmRec_.[[GlobalObject]]. 1. For each property of the Global Object specified in clause , do @@ -10027,9 +11453,12 @@

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.

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.

- +

GetActiveScriptOrModule ( )

-

The abstract operation GetActiveScriptOrModule takes no arguments. It is used to determine the running script or module, based on the running execution context. It performs the following steps when called:

+
+
description
+
It is used to determine the running script or module, based on the running execution context.
+
1. If the execution context stack is empty, return *null*. @@ -10038,9 +11467,17 @@

GetActiveScriptOrModule ( )

- -

ResolveBinding ( _name_ [ , _env_ ] )

-

The abstract operation ResolveBinding takes argument _name_ (a String) and optional argument _env_ (an Environment Record). It is used to determine the binding of _name_. _env_ can be used to explicitly provide the Environment Record that is to be searched for the binding. It performs the following steps when called:

+ +

+ ResolveBinding ( + _name_: a String, + optional _env_: an Environment Record, + ) +

+
+
description
+
It is used to determine the binding of _name_. _env_ can be used to explicitly provide the Environment Record that is to be searched for the binding.
+
1. If _env_ is not present or if _env_ is *undefined*, then 1. Set _env_ to the running execution context's LexicalEnvironment. @@ -10053,9 +11490,12 @@

ResolveBinding ( _name_ [ , _env_ ] )

- +

GetThisEnvironment ( )

-

The abstract operation GetThisEnvironment takes no arguments. It finds the Environment Record that currently supplies the binding of the keyword `this`. It performs the following steps when called:

+
+
description
+
It finds the Environment Record that currently supplies the binding of the keyword `this`.
+
1. Let _env_ be the running execution context's LexicalEnvironment. 1. [id="step-getthisenvironment-loop"] Repeat, @@ -10070,18 +11510,24 @@

GetThisEnvironment ( )

- +

ResolveThisBinding ( )

-

The abstract operation ResolveThisBinding takes no arguments. It determines the binding of the keyword `this` using the LexicalEnvironment of the running execution context. It performs the following steps when called:

+
+
description
+
It determines the binding of the keyword `this` using the LexicalEnvironment of the running execution context.
+
1. Let _envRec_ be GetThisEnvironment(). 1. Return ? _envRec_.GetThisBinding().
- +

GetNewTarget ( )

-

The abstract operation GetNewTarget takes no arguments. It determines the NewTarget value using the LexicalEnvironment of the running execution context. It performs the following steps when called:

+
+
description
+
It determines the NewTarget value using the LexicalEnvironment of the running execution context.
+
1. Let _envRec_ be GetThisEnvironment(). 1. Assert: _envRec_ has a [[NewTarget]] field. @@ -10089,9 +11535,12 @@

GetNewTarget ( )

- +

GetGlobalObject ( )

-

The abstract operation GetGlobalObject takes no arguments. It returns the global object used by the currently running execution context. It performs the following steps when called:

+
+
description
+
It returns the global object used by the currently running execution context.
+
1. Let _currentRealm_ be the current Realm Record. 1. Return _currentRealm_.[[GlobalObject]]. @@ -10188,9 +11637,14 @@

JobCallback Records

- -

HostMakeJobCallback ( _callback_ )

-

The host-defined abstract operation HostMakeJobCallback takes argument _callback_ (a function object).

+ +

+ HostMakeJobCallback ( + _callback_: a function object, + ) +

+
+

The implementation of HostMakeJobCallback must conform to the following requirements:

  • It must always complete normally (i.e., not return an abrupt completion).
  • @@ -10207,9 +11661,16 @@

    HostMakeJobCallback ( _callback_ )

    - -

    HostCallJobCallback ( _jobCallback_, _V_, _argumentsList_ )

    -

    The host-defined abstract operation HostCallJobCallback takes arguments _jobCallback_ (a JobCallback Record), _V_ (an ECMAScript language value), and _argumentsList_ (a List of ECMAScript language values).

    + +

    + HostCallJobCallback ( + _jobCallback_: a JobCallback Record, + _V_: an ECMAScript language value, + _argumentsList_: a List of ECMAScript language values, + ) +

    +
    +

    The implementation of HostCallJobCallback must conform to the following requirements:

    • It must always perform and return the result of Call(_jobCallback_.[[Callback]], _V_, _argumentsList_).
    • @@ -10225,9 +11686,17 @@

      HostCallJobCallback ( _jobCallback_, _V_, _argumentsList_ )

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

      - -

      HostEnqueuePromiseJob ( _job_, _realm_ )

      -

      The host-defined abstract operation HostEnqueuePromiseJob takes arguments _job_ (a Job Abstract Closure) and _realm_ (a Realm Record or *null*). It schedules _job_ to be performed at some future time. The Abstract Closures used with this algorithm are intended to be related to the handling of Promises, or otherwise, to be scheduled with equal priority to Promise handling operations.

      + +

      + HostEnqueuePromiseJob ( + _job_: a Job Abstract Closure, + _realm_: a Realm Record or *null*, + ) +

      +
      +
      description
      +
      It schedules _job_ to be performed at some future time. The Abstract Closures used with this algorithm are intended to be related to the handling of Promises, or otherwise, to be scheduled with equal priority to Promise handling operations.
      +

      The implementation of HostEnqueuePromiseJob must conform to the requirements in as well as the following:

        @@ -10242,9 +11711,10 @@

        HostEnqueuePromiseJob ( _job_, _realm_ )

        - +

        InitializeHostDefinedRealm ( )

        -

        The abstract operation InitializeHostDefinedRealm takes no arguments. It performs the following steps when called:

        +
        +
        1. Let _realm_ be CreateRealm(). @@ -10339,18 +11809,20 @@

        Agents

        An agent is a specification mechanism and need not correspond to any particular artefact of an ECMAScript implementation.

        - +

        AgentSignifier ( )

        -

        The abstract operation AgentSignifier takes no arguments. It performs the following steps when called:

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

        AgentCanSuspend ( )

        -

        The abstract operation AgentCanSuspend takes no arguments. It performs the following steps when called:

        +
        +
        1. Let _AR_ be the Agent Record of the surrounding agent. 1. Return _AR_.[[CanBlock]]. @@ -10531,25 +12003,40 @@

        Execution

        Host Hooks

        - -

        HostEnqueueFinalizationRegistryCleanupJob ( _finalizationRegistry_ )

        -

        The abstract operation HostEnqueueFinalizationRegistryCleanupJob takes argument _finalizationRegistry_ (a FinalizationRegistry). HostEnqueueFinalizationRegistryCleanupJob is an implementation-defined abstract operation that is expected to call CleanupFinalizationRegistry(_finalizationRegistry_) at some point in the future, if possible. The host's responsibility is to make this call at a time which does not interrupt synchronous ECMAScript code execution.

        + +

        + HostEnqueueFinalizationRegistryCleanupJob ( + _finalizationRegistry_: a FinalizationRegistry, + ) +

        +
        +
        description
        +
        HostEnqueueFinalizationRegistryCleanupJob is an implementation-defined abstract operation that is expected to call CleanupFinalizationRegistry(_finalizationRegistry_) at some point in the future, if possible. The host's responsibility is to make this call at a time which does not interrupt synchronous ECMAScript code execution.
        +
        - +

        ClearKeptObjects ( )

        -

        The abstract operation ClearKeptObjects takes no arguments. ECMAScript implementations are expected to call ClearKeptObjects when a synchronous sequence of ECMAScript executions completes. It performs the following steps when called:

        +
        +
        description
        +
        ECMAScript implementations are expected to call ClearKeptObjects when a synchronous sequence of ECMAScript executions completes.
        +
        1. Let _agentRecord_ be the surrounding agent's Agent Record. 1. Set _agentRecord_.[[KeptAlive]] to a new empty List.
        - -

        AddToKeptObjects ( _object_ )

        -

        The abstract operation AddToKeptObjects takes argument _object_ (an Object). It performs the following steps when called:

        + +

        + AddToKeptObjects ( + _object_: an Object, + ) +

        +
        +
        1. Let _agentRecord_ be the surrounding agent's Agent Record. 1. Append _object_ to _agentRecord_.[[KeptAlive]]. @@ -10559,9 +12046,14 @@

        AddToKeptObjects ( _object_ )

        - -

        CleanupFinalizationRegistry ( _finalizationRegistry_ )

        -

        The abstract operation CleanupFinalizationRegistry takes argument _finalizationRegistry_ (a FinalizationRegistry). It performs the following steps when called:

        + +

        + CleanupFinalizationRegistry ( + _finalizationRegistry_: a FinalizationRegistry, + ) +

        +
        +
        1. Assert: _finalizationRegistry_ has [[Cells]] and [[CleanupCallback]] internal slots. 1. Let _callback_ be _finalizationRegistry_.[[CleanupCallback]]. @@ -10584,32 +12076,53 @@

        Ordinary Object Internal Methods and Internal Slots

        In the following algorithm descriptions, assume _O_ is an ordinary object, _P_ is a property key value, _V_ is any ECMAScript language value, and _Desc_ is a Property Descriptor record.

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

        - +

        [[GetPrototypeOf]] ( )

        -

        The [[GetPrototypeOf]] internal method of an ordinary object _O_ takes no arguments. It performs the following steps when called:

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

        OrdinaryGetPrototypeOf ( _O_ )

        -

        The abstract operation OrdinaryGetPrototypeOf takes argument _O_ (an Object). It performs the following steps when called:

        + +

        + OrdinaryGetPrototypeOf ( + _O_: an Object, + ) +

        +
        +
        1. Return _O_.[[Prototype]].
        - -

        [[SetPrototypeOf]] ( _V_ )

        -

        The [[SetPrototypeOf]] internal method of an ordinary object _O_ takes argument _V_ (an Object or *null*). It performs the following steps when called:

        + +

        + [[SetPrototypeOf]] ( + _V_: an Object or *null*, + ) +

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

        OrdinarySetPrototypeOf ( _O_, _V_ )

        -

        The abstract operation OrdinarySetPrototypeOf takes arguments _O_ (an Object) and _V_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + OrdinarySetPrototypeOf ( + _O_: an Object, + _V_: an ECMAScript language value, + ) +

        +
        +
        1. Assert: Either Type(_V_) is Object or Type(_V_) is Null. 1. Let _current_ be _O_.[[Prototype]]. @@ -10633,32 +12146,48 @@

        OrdinarySetPrototypeOf ( _O_, _V_ )

        - +

        [[IsExtensible]] ( )

        -

        The [[IsExtensible]] internal method of an ordinary object _O_ takes no arguments. It performs the following steps when called:

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

        OrdinaryIsExtensible ( _O_ )

        -

        The abstract operation OrdinaryIsExtensible takes argument _O_ (an Object). It performs the following steps when called:

        + +

        + OrdinaryIsExtensible ( + _O_: an Object, + ) +

        +
        +
        1. Return _O_.[[Extensible]].
        - +

        [[PreventExtensions]] ( )

        -

        The [[PreventExtensions]] internal method of an ordinary object _O_ takes no arguments. It performs the following steps when called:

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

        OrdinaryPreventExtensions ( _O_ )

        -

        The abstract operation OrdinaryPreventExtensions takes argument _O_ (an Object). It performs the following steps when called:

        + +

        + OrdinaryPreventExtensions ( + _O_: an Object, + ) +

        +
        +
        1. Set _O_.[[Extensible]] to *false*. 1. Return *true*. @@ -10666,16 +12195,29 @@

        OrdinaryPreventExtensions ( _O_ )

        - -

        [[GetOwnProperty]] ( _P_ )

        -

        The [[GetOwnProperty]] internal method of an ordinary object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[GetOwnProperty]] ( + _P_: a property key, + ) +

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

        OrdinaryGetOwnProperty ( _O_, _P_ )

        -

        The abstract operation OrdinaryGetOwnProperty takes arguments _O_ (an Object) and _P_ (a property key). It performs the following steps when called:

        + +

        + OrdinaryGetOwnProperty ( + _O_: an Object, + _P_: a property key, + ) +

        +
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. If _O_ does not have an own property with key _P_, return *undefined*. @@ -10695,16 +12237,31 @@

        OrdinaryGetOwnProperty ( _O_, _P_ )

        - -

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        -

        The [[DefineOwnProperty]] internal method of an ordinary object _O_ takes arguments _P_ (a property key) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + [[DefineOwnProperty]] ( + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

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

        OrdinaryDefineOwnProperty ( _O_, _P_, _Desc_ )

        -

        The abstract operation OrdinaryDefineOwnProperty takes arguments _O_ (an Object), _P_ (a property key), and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + OrdinaryDefineOwnProperty ( + _O_: an Object, + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

        +
        +
        1. Let _current_ be ? _O_.[[GetOwnProperty]](_P_). 1. Let _extensible_ be ? IsExtensible(_O_). @@ -10712,17 +12269,33 @@

        OrdinaryDefineOwnProperty ( _O_, _P_, _Desc_ )

        - -

        IsCompatiblePropertyDescriptor ( _Extensible_, _Desc_, _Current_ )

        -

        The abstract operation IsCompatiblePropertyDescriptor takes arguments _Extensible_ (a Boolean), _Desc_ (a Property Descriptor), and _Current_ (a Property Descriptor). It performs the following steps when called:

        + +

        + IsCompatiblePropertyDescriptor ( + _Extensible_: a Boolean, + _Desc_: a Property Descriptor, + _Current_: a Property Descriptor, + ) +

        +
        +
        1. Return ValidateAndApplyPropertyDescriptor(*undefined*, *undefined*, _Extensible_, _Desc_, _Current_).
        - -

        ValidateAndApplyPropertyDescriptor ( _O_, _P_, _extensible_, _Desc_, _current_ )

        -

        The abstract operation ValidateAndApplyPropertyDescriptor takes arguments _O_ (an Object or *undefined*), _P_ (a property key), _extensible_ (a Boolean), _Desc_ (a Property Descriptor), and _current_ (a Property Descriptor).

        + +

        + ValidateAndApplyPropertyDescriptor ( + _O_: an Object or *undefined*, + _P_: a property key, + _extensible_: a Boolean, + _Desc_: a Property Descriptor, + _current_: a Property Descriptor, + ) +

        +
        +

        If *undefined* is passed as _O_, only validation is performed and no object updates are performed.

        @@ -10768,16 +12341,29 @@

        ValidateAndApplyPropertyDescriptor ( _O_, _P_, _extensible_, _Desc_, _curren - -

        [[HasProperty]] ( _P_ )

        -

        The [[HasProperty]] internal method of an ordinary object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[HasProperty]] ( + _P_: a property key, + ) +

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

        OrdinaryHasProperty ( _O_, _P_ )

        -

        The abstract operation OrdinaryHasProperty takes arguments _O_ (an Object) and _P_ (a property key). It performs the following steps when called:

        + +

        + OrdinaryHasProperty ( + _O_: an Object, + _P_: a property key, + ) +

        +
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _hasOwn_ be ? _O_.[[GetOwnProperty]](_P_). @@ -10790,17 +12376,32 @@

        OrdinaryHasProperty ( _O_, _P_ )

        - -

        [[Get]] ( _P_, _Receiver_ )

        -

        The [[Get]] internal method of an ordinary object _O_ takes arguments _P_ (a property key) and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Get]] ( + _P_: a property key, + _Receiver_: an ECMAScript language value, + ) +

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

        OrdinaryGet ( _O_, _P_, _Receiver_ )

        -

        The abstract operation OrdinaryGet takes arguments _O_ (an Object), _P_ (a property key), and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + OrdinaryGet ( + _O_: an Object, + _P_: a property key, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        1. Assert: IsPropertyKey(_P_) is *true*. @@ -10818,16 +12419,33 @@

        OrdinaryGet ( _O_, _P_, _Receiver_ )

        - -

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

        -

        The [[Set]] internal method of an ordinary object _O_ takes arguments _P_ (a property key), _V_ (an ECMAScript language value), and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Set]] ( + _P_: a property key, + _V_: an ECMAScript language value, + _Receiver_: an ECMAScript language value, + ) +

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

        OrdinarySet ( _O_, _P_, _V_, _Receiver_ )

        -

        The abstract operation OrdinarySet takes arguments _O_ (an Object), _P_ (a property key), _V_ (an ECMAScript language value), and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + OrdinarySet ( + _O_: an Object, + _P_: a property key, + _V_: an ECMAScript language value, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        1. Assert: IsPropertyKey(_P_) is *true*. @@ -10836,9 +12454,18 @@

        OrdinarySet ( _O_, _P_, _V_, _Receiver_ )

        - -

        OrdinarySetWithOwnDescriptor ( _O_, _P_, _V_, _Receiver_, _ownDesc_ )

        -

        The abstract operation OrdinarySetWithOwnDescriptor takes arguments _O_ (an Object), _P_ (a property key), _V_ (an ECMAScript language value), _Receiver_ (an ECMAScript language value), and _ownDesc_ (a Property Descriptor or *undefined*). It performs the following steps when called:

        + +

        + OrdinarySetWithOwnDescriptor ( + _O_: an Object, + _P_: a property key, + _V_: an ECMAScript language value, + _Receiver_: an ECMAScript language value, + _ownDesc_: a Property Descriptor or *undefined*, + ) +

        +
        +
        1. Assert: IsPropertyKey(_P_) is *true*. @@ -10869,16 +12496,29 @@

        OrdinarySetWithOwnDescriptor ( _O_, _P_, _V_, _Receiver_, _ownDesc_ )

        - -

        [[Delete]] ( _P_ )

        -

        The [[Delete]] internal method of an ordinary object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[Delete]] ( + _P_: a property key, + ) +

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

        OrdinaryDelete ( _O_, _P_ )

        -

        The abstract operation OrdinaryDelete takes arguments _O_ (an Object) and _P_ (a property key). It performs the following steps when called:

        + +

        + OrdinaryDelete ( + _O_: an Object, + _P_: a property key, + ) +

        +
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _desc_ be ? _O_.[[GetOwnProperty]](_P_). @@ -10891,16 +12531,24 @@

        OrdinaryDelete ( _O_, _P_ )

        - +

        [[OwnPropertyKeys]] ( )

        -

        The [[OwnPropertyKeys]] internal method of an ordinary object _O_ takes no arguments. It performs the following steps when called:

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

        OrdinaryOwnPropertyKeys ( _O_ )

        -

        The abstract operation OrdinaryOwnPropertyKeys takes argument _O_ (an Object). It performs the following steps when called:

        + +

        + OrdinaryOwnPropertyKeys ( + _O_: an Object, + ) +

        +
        +
        1. Let _keys_ be a new empty List. @@ -10915,9 +12563,17 @@

        OrdinaryOwnPropertyKeys ( _O_ )

        - -

        OrdinaryObjectCreate ( _proto_ [ , _additionalInternalSlotsList_ ] )

        -

        The abstract operation OrdinaryObjectCreate takes argument _proto_ (an Object or *null*) and optional argument _additionalInternalSlotsList_ (a List of names of internal slots). 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. It performs the following steps when called:

        + +

        + OrdinaryObjectCreate ( + _proto_: an Object or *null*, + optional _additionalInternalSlotsList_: a List of names of internal slots, + ) +

        +
        +
        description
        +
        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. If _additionalInternalSlotsList_ is present, append each of its elements to _internalSlotsList_. @@ -10931,9 +12587,18 @@

        OrdinaryObjectCreate ( _proto_ [ , _additionalInternalSlotsList_ ] )

        - -

        OrdinaryCreateFromConstructor ( _constructor_, _intrinsicDefaultProto_ [ , _internalSlotsList_ ] )

        -

        The abstract operation OrdinaryCreateFromConstructor takes arguments _constructor_ and _intrinsicDefaultProto_ and optional argument _internalSlotsList_ (a List of names of internal slots). It creates an ordinary object whose [[Prototype]] value is retrieved from a constructor's *"prototype"* property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. If _internalSlotsList_ is not provided, a new empty List is used. It performs the following steps when called:

        + +

        + OrdinaryCreateFromConstructor ( + _constructor_: unknown, + _intrinsicDefaultProto_: unknown, + optional _internalSlotsList_: a List of names of internal slots, + ) +

        +
        +
        description
        +
        It creates an ordinary object whose [[Prototype]] value is retrieved from a constructor's *"prototype"* property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. If _internalSlotsList_ is not provided, a new empty List is used.
        +
        1. Assert: _intrinsicDefaultProto_ is a String value that is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object. 1. Let _proto_ be ? GetPrototypeFromConstructor(_constructor_, _intrinsicDefaultProto_). @@ -10941,9 +12606,17 @@

        OrdinaryCreateFromConstructor ( _constructor_, _intrinsicDefaultProto_ [ , _ - -

        GetPrototypeFromConstructor ( _constructor_, _intrinsicDefaultProto_ )

        -

        The abstract operation GetPrototypeFromConstructor takes arguments _constructor_ and _intrinsicDefaultProto_. It determines the [[Prototype]] value that should be used to create an object corresponding to a specific constructor. The value is retrieved from the constructor's *"prototype"* property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. It performs the following steps when called:

        + +

        + GetPrototypeFromConstructor ( + _constructor_: unknown, + _intrinsicDefaultProto_: unknown, + ) +

        +
        +
        description
        +
        It determines the [[Prototype]] value that should be used to create an object corresponding to a specific constructor. The value is retrieved from the constructor's *"prototype"* property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]].
        +
        1. Assert: _intrinsicDefaultProto_ is a String value that is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object. 1. Assert: IsCallable(_constructor_) is *true*. @@ -10958,9 +12631,17 @@

        GetPrototypeFromConstructor ( _constructor_, _intrinsicDefaultProto_ )

        - -

        RequireInternalSlot ( _O_, _internalSlot_ )

        -

        The abstract operation RequireInternalSlot takes arguments _O_ and _internalSlot_. It throws an exception unless _O_ is an Object and has the given internal slot. It performs the following steps when called:

        + +

        + RequireInternalSlot ( + _O_: unknown, + _internalSlot_: unknown, + ) +

        +
        +
        description
        +
        It throws an exception unless _O_ is an Object and has the given internal slot.
        +
        1. If Type(_O_) is not Object, throw a *TypeError* exception. 1. If _O_ does not have an _internalSlot_ internal slot, throw a *TypeError* exception. @@ -11156,9 +12837,17 @@

        ECMAScript Function Objects

        All ECMAScript function objects have the [[Call]] internal method defined here. ECMAScript functions that are also constructors in addition have the [[Construct]] internal method.

        - -

        [[Call]] ( _thisArgument_, _argumentsList_ )

        -

        The [[Call]] internal method of an ECMAScript function object _F_ takes arguments _thisArgument_ (an ECMAScript language value) and _argumentsList_ (a List of ECMAScript language values). It performs the following steps when called:

        + +

        + [[Call]] ( + _thisArgument_: an ECMAScript language value, + _argumentsList_: a List of ECMAScript language values, + ) +

        +
        +
        for
        +
        an ECMAScript function object _F_
        +
        1. Assert: _F_ is an ECMAScript function object. 1. Let _callerContext_ be the running execution context. @@ -11180,9 +12869,15 @@

        [[Call]] ( _thisArgument_, _argumentsList_ )

        When _calleeContext_ is removed from the execution context stack in step it must not be destroyed if it is suspended and retained for later resumption by an accessible generator object.

        - -

        PrepareForOrdinaryCall ( _F_, _newTarget_ )

        -

        The abstract operation PrepareForOrdinaryCall takes arguments _F_ (a function object) and _newTarget_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + PrepareForOrdinaryCall ( + _F_: a function object, + _newTarget_: an ECMAScript language value, + ) +

        +
        +
        1. Assert: Type(_newTarget_) is Undefined or Object. 1. Let _callerContext_ be the running execution context. @@ -11202,9 +12897,16 @@

        PrepareForOrdinaryCall ( _F_, _newTarget_ )

        - -

        OrdinaryCallBindThis ( _F_, _calleeContext_, _thisArgument_ )

        -

        The abstract operation OrdinaryCallBindThis takes arguments _F_ (a function object), _calleeContext_ (an execution context), and _thisArgument_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + OrdinaryCallBindThis ( + _F_: a function object, + _calleeContext_: an execution context, + _thisArgument_: an ECMAScript language value, + ) +

        +
        +
        1. Let _thisMode_ be _F_.[[ThisMode]]. 1. If _thisMode_ is ~lexical~, return NormalCompletion(*undefined*). @@ -11277,18 +12979,32 @@

        Runtime Semantics: EvaluateBody

        - -

        OrdinaryCallEvaluateBody ( _F_, _argumentsList_ )

        -

        The abstract operation OrdinaryCallEvaluateBody takes arguments _F_ (a function object) and _argumentsList_ (a List). It performs the following steps when called:

        + +

        + OrdinaryCallEvaluateBody ( + _F_: a function object, + _argumentsList_: a List, + ) +

        +
        +
        1. Return the result of EvaluateBody of the parsed code that is _F_.[[ECMAScriptCode]] passing _F_ and _argumentsList_ as the arguments.
        - -

        [[Construct]] ( _argumentsList_, _newTarget_ )

        -

        The [[Construct]] internal method of an ECMAScript function object _F_ takes arguments _argumentsList_ (a List of ECMAScript language values) and _newTarget_ (a constructor). It performs the following steps when called:

        + +

        + [[Construct]] ( + _argumentsList_: a List of ECMAScript language values, + _newTarget_: a constructor, + ) +

        +
        +
        for
        +
        an ECMAScript function object _F_
        +
        1. Assert: _F_ is an ECMAScript function object. 1. Assert: Type(_newTarget_) is Object. @@ -11316,9 +13032,22 @@

        [[Construct]] ( _argumentsList_, _newTarget_ )

        - -

        OrdinaryFunctionCreate ( _functionPrototype_, _sourceText_, _ParameterList_, _Body_, _thisMode_, _Scope_, _PrivateScope_ )

        -

        The abstract operation OrdinaryFunctionCreate takes arguments _functionPrototype_ (an Object), _sourceText_ (a sequence of Unicode code points), _ParameterList_ (a Parse Node), _Body_ (a Parse Node), _thisMode_ (either ~lexical-this~ or ~non-lexical-this~), _Scope_ (an Environment Record), and _PrivateScope_ (a PrivateEnvironment Record or *null*). _sourceText_ is the source text of the syntactic definition of the function to be created. It performs the following steps when called:

        + +

        + OrdinaryFunctionCreate ( + _functionPrototype_: an Object, + _sourceText_: a sequence of Unicode code points, + _ParameterList_: a Parse Node, + _Body_: a Parse Node, + _thisMode_: either ~lexical-this~ or ~non-lexical-this~, + _Scope_: an Environment Record, + _PrivateScope_: a PrivateEnvironment Record or *null*, + ) +

        +
        +
        description
        +
        _sourceText_ is the source text of the syntactic definition of the function to be created.
        +
        1. Assert: Type(_functionPrototype_) is Object. 1. Let _internalSlotsList_ be the internal slots listed in . @@ -11345,9 +13074,15 @@

        OrdinaryFunctionCreate ( _functionPrototype_, _sourceText_, _ParameterList_, - -

        AddRestrictedFunctionProperties ( _F_, _realm_ )

        -

        The abstract operation AddRestrictedFunctionProperties takes arguments _F_ (a function object) and _realm_ (a Realm Record). It performs the following steps when called:

        + +

        + AddRestrictedFunctionProperties ( + _F_: a function object, + _realm_: a Realm Record, + ) +

        +
        +
        1. Assert: _realm_.[[Intrinsics]].[[%ThrowTypeError%]] exists and has been initialized. 1. Let _thrower_ be _realm_.[[Intrinsics]].[[%ThrowTypeError%]]. @@ -11367,9 +13102,18 @@

        %ThrowTypeError% ( )

        - -

        MakeConstructor ( _F_ [ , _writablePrototype_ [ , _prototype_ ] ] )

        -

        The abstract operation MakeConstructor takes argument _F_ (a function object) and optional arguments _writablePrototype_ (a Boolean) and _prototype_ (an Object). It converts _F_ into a constructor. It performs the following steps when called:

        + +

        + MakeConstructor ( + _F_: a function object, + optional _writablePrototype_: a Boolean, + optional _prototype_: an Object, + ) +

        +
        +
        description
        +
        It converts _F_ into a constructor.
        +
        1. Assert: _F_ is an ECMAScript function object or a built-in function object. 1. If _F_ is an ECMAScript function object, then @@ -11386,9 +13130,14 @@

        MakeConstructor ( _F_ [ , _writablePrototype_ [ , _prototype_ ] ] )

        - -

        MakeClassConstructor ( _F_ )

        -

        The abstract operation MakeClassConstructor takes argument _F_. It performs the following steps when called:

        + +

        + MakeClassConstructor ( + _F_: unknown, + ) +

        +
        +
        1. Assert: _F_ is an ECMAScript function object. 1. Assert: _F_.[[IsClassConstructor]] is *false*. @@ -11397,9 +13146,17 @@

        MakeClassConstructor ( _F_ )

        - -

        MakeMethod ( _F_, _homeObject_ )

        -

        The abstract operation MakeMethod takes arguments _F_ and _homeObject_. It configures _F_ as a method. It performs the following steps when called:

        + +

        + MakeMethod ( + _F_: unknown, + _homeObject_: unknown, + ) +

        +
        +
        description
        +
        It configures _F_ as a method.
        +
        1. Assert: _F_ is an ECMAScript function object. 1. Assert: Type(_homeObject_) is Object. @@ -11408,9 +13165,17 @@

        MakeMethod ( _F_, _homeObject_ )

        - -

        DefineMethodProperty ( _key_, _homeObject_, _closure_, _enumerable_ )

        -

        The abstract operation DefineMethodProperty takes arguments _key_ (a property key or Private Name), _homeObject_ (an Object), _closure_ (a function object), and _enumerable_ (a Boolean). It performs the following steps when called:

        + +

        + DefineMethodProperty ( + _key_: a property key or Private Name, + _homeObject_: an Object, + _closure_: a function object, + _enumerable_: a Boolean, + ) +

        +
        +
        1. Perform ! SetFunctionName(_closure_, _key_). 1. If _key_ is a Private Name, then @@ -11422,9 +13187,18 @@

        DefineMethodProperty ( _key_, _homeObject_, _closure_, _enumerable_ )

        - -

        SetFunctionName ( _F_, _name_ [ , _prefix_ ] )

        -

        The abstract operation SetFunctionName takes arguments _F_ (a function object) and _name_ (a property key or Private Name) and optional argument _prefix_ (a String). It adds a *"name"* property to _F_. It performs the following steps when called:

        + +

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

        +
        +
        description
        +
        It adds a *"name"* property to _F_.
        +
        1. Assert: _F_ is an extensible object that does not have a *"name"* own property. 1. If Type(_name_) is Symbol, then @@ -11443,18 +13217,34 @@

        SetFunctionName ( _F_, _name_ [ , _prefix_ ] )

        - -

        SetFunctionLength ( _F_, _length_ )

        -

        The abstract operation SetFunctionLength takes arguments _F_ (a function object) and _length_ (a non-negative integer or +∞). It adds a *"length"* property to _F_. It performs the following steps when called:

        + +

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

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

        FunctionDeclarationInstantiation ( _func_, _argumentsList_ )

        -

        The abstract operation FunctionDeclarationInstantiation takes arguments _func_ (a function object) and _argumentsList_. _func_ is the function object for which the execution context is being established.

        + +

        + FunctionDeclarationInstantiation ( + _func_: a function object, + _argumentsList_: unknown, + ) +

        +
        +
        description
        +
        _func_ is the function object for which the execution context is being established.
        +

        When an execution context is established for evaluating an ECMAScript function a new function Environment Record is created and bindings for each formal parameter are instantiated in that Environment Record. Each declaration in the function body is also instantiated. If the function's formal parameters do not include any default value initializers then the body declarations are instantiated in the same Environment Record as the parameters. If default value parameter initializers exist, a second Environment Record is created for the body declarations. Formal parameters and functions are initialized as part of FunctionDeclarationInstantiation. All other bindings are initialized during evaluation of the function body.

        @@ -11591,9 +13381,17 @@

        Built-in Function Objects

        Built-in functions have an [[InitialName]] internal slot.

        If a built-in function object is not implemented as an ECMAScript function it must provide [[Call]] and [[Construct]] internal methods that conform to the following definitions:

        - -

        [[Call]] ( _thisArgument_, _argumentsList_ )

        -

        The [[Call]] internal method of a built-in function object _F_ takes arguments _thisArgument_ (an ECMAScript language value) and _argumentsList_ (a List of ECMAScript language values). It performs the following steps when called:

        + +

        + [[Call]] ( + _thisArgument_: an ECMAScript language value, + _argumentsList_: a List of ECMAScript language values, + ) +

        +
        +
        for
        +
        a built-in function object _F_
        +
        1. Let _callerContext_ be the running execution context. 1. If _callerContext_ is not already suspended, suspend _callerContext_. @@ -11613,17 +13411,41 @@

        [[Call]] ( _thisArgument_, _argumentsList_ )

        - -

        [[Construct]] ( _argumentsList_, _newTarget_ )

        -

        The [[Construct]] internal method of a built-in function object _F_ takes arguments _argumentsList_ (a List of ECMAScript language values) and _newTarget_ (a constructor). The steps performed are the same as [[Call]] (see ) except that step is replaced by:

        + +

        + [[Construct]] ( + _argumentsList_: a List of ECMAScript language values, + _newTarget_: a constructor, + ) +

        +
        +
        for
        +
        a built-in function object _F_
        + +
        description
        +
        The steps performed are the same as [[Call]] (see ) except that step is replaced by:
        +
        1. Let _result_ be the Completion Record that is the result of evaluating _F_ in a manner that conforms to the specification of _F_. The *this* value is uninitialized, _argumentsList_ provides the named parameters, and _newTarget_ provides the NewTarget value.
        - -

        CreateBuiltinFunction ( _behaviour_, _length_, _name_, _internalSlotsList_ [ , _realm_ [ , _prototype_ [ , _prefix_ ] ] ] )

        -

        The abstract operation CreateBuiltinFunction takes arguments _behaviour_, _length_ (a non-negative integer or +∞), _name_ (a property key), and _internalSlotsList_ (a List of names of internal slots) and optional arguments _realm_ (a Realm Record), _prototype_ (an Object or *null*), and _prefix_ (a String). _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. This operation creates a built-in function object. It performs the following steps when called:

        + +

        + CreateBuiltinFunction ( + _behaviour_: unknown, + _length_: a non-negative integer or +∞, + _name_: a property key, + _internalSlotsList_: a List of names of internal slots, + optional _realm_: a Realm Record, + optional _prototype_: an Object or *null*, + optional _prefix_: a String, + ) +

        +
        +
        description
        +
        _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. This operation creates a built-in function object.
        +
        1. Assert: _behaviour_ is either an Abstract Closure, a set of algorithm steps, or some other definition of a function's behaviour provided in this specification. 1. If _realm_ is not present, set _realm_ to the current Realm Record. @@ -11707,9 +13529,17 @@

        Bound Function Exotic Objects

        - -

        [[Call]] ( _thisArgument_, _argumentsList_ )

        -

        The [[Call]] internal method of a bound function exotic object _F_ takes arguments _thisArgument_ (an ECMAScript language value) and _argumentsList_ (a List of ECMAScript language values). It performs the following steps when called:

        + +

        + [[Call]] ( + _thisArgument_: an ECMAScript language value, + _argumentsList_: a List of ECMAScript language values, + ) +

        +
        +
        for
        +
        a bound function exotic object _F_
        +
        1. Let _target_ be _F_.[[BoundTargetFunction]]. 1. Let _boundThis_ be _F_.[[BoundThis]]. @@ -11719,9 +13549,17 @@

        [[Call]] ( _thisArgument_, _argumentsList_ )

        - -

        [[Construct]] ( _argumentsList_, _newTarget_ )

        -

        The [[Construct]] internal method of a bound function exotic object _F_ takes arguments _argumentsList_ (a List of ECMAScript language values) and _newTarget_ (a constructor). It performs the following steps when called:

        + +

        + [[Construct]] ( + _argumentsList_: a List of ECMAScript language values, + _newTarget_: a constructor, + ) +

        +
        +
        for
        +
        a bound function exotic object _F_
        +
        1. Let _target_ be _F_.[[BoundTargetFunction]]. 1. Assert: IsConstructor(_target_) is *true*. @@ -11732,9 +13570,18 @@

        [[Construct]] ( _argumentsList_, _newTarget_ )

        - -

        BoundFunctionCreate ( _targetFunction_, _boundThis_, _boundArgs_ )

        -

        The abstract operation BoundFunctionCreate takes arguments _targetFunction_, _boundThis_, and _boundArgs_. It is used to specify the creation of new bound function exotic objects. It performs the following steps when called:

        + +

        + BoundFunctionCreate ( + _targetFunction_: unknown, + _boundThis_: unknown, + _boundArgs_: unknown, + ) +

        +
        +
        description
        +
        It is used to specify the creation of new bound function exotic objects.
        +
        1. Assert: Type(_targetFunction_) is Object. 1. Let _proto_ be ? _targetFunction_.[[GetPrototypeOf]](). @@ -11761,9 +13608,17 @@

        Array Exotic Objects

        An object is an Array exotic object (or simply, an Array object) if its [[DefineOwnProperty]] internal method uses the following implementation, and its other essential internal methods use the definitions found in . These methods are installed in ArrayCreate.

        - -

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        -

        The [[DefineOwnProperty]] internal method of an Array exotic object _A_ takes arguments _P_ (a property key) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + [[DefineOwnProperty]] ( + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

        +
        +
        for
        +
        an Array exotic object _A_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. If _P_ is *"length"*, then @@ -11787,9 +13642,17 @@

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        - -

        ArrayCreate ( _length_ [ , _proto_ ] )

        -

        The abstract operation ArrayCreate takes argument _length_ (a non-negative integer) and optional argument _proto_. It is used to specify the creation of new Array exotic objects. It performs the following steps when called:

        + +

        + ArrayCreate ( + _length_: a non-negative integer, + optional _proto_: unknown, + ) +

        +
        +
        description
        +
        It is used to specify the creation of new Array exotic objects.
        +
        1. If _length_ > 232 - 1, throw a *RangeError* exception. 1. If _proto_ is not present, set _proto_ to %Array.prototype%. @@ -11801,9 +13664,17 @@

        ArrayCreate ( _length_ [ , _proto_ ] )

        - -

        ArraySpeciesCreate ( _originalArray_, _length_ )

        -

        The abstract operation ArraySpeciesCreate takes arguments _originalArray_ and _length_ (a non-negative integer). It is used to specify the creation of a new Array object using a constructor function that is derived from _originalArray_. It performs the following steps when called:

        + +

        + ArraySpeciesCreate ( + _originalArray_: unknown, + _length_: a non-negative integer, + ) +

        +
        +
        description
        +
        It is used to specify the creation of a new Array object using a constructor function that is derived from _originalArray_.
        +
        1. Let _isArray_ be ? IsArray(_originalArray_). 1. If _isArray_ is *false*, return ? ArrayCreate(_length_). @@ -11825,9 +13696,15 @@

        ArraySpeciesCreate ( _originalArray_, _length_ )

        - -

        ArraySetLength ( _A_, _Desc_ )

        -

        The abstract operation ArraySetLength takes arguments _A_ (an Array object) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + ArraySetLength ( + _A_: an Array object, + _Desc_: a Property Descriptor, + ) +

        +
        +
        1. If _Desc_.[[Value]] is absent, then 1. Return OrdinaryDefineOwnProperty(_A_, *"length"*, _Desc_). @@ -11876,9 +13753,16 @@

        String Exotic Objects

        String exotic objects have the same internal slots as ordinary objects. They also have a [[StringData]] internal slot.

        - -

        [[GetOwnProperty]] ( _P_ )

        -

        The [[GetOwnProperty]] internal method of a String exotic object _S_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[GetOwnProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        a String exotic object _S_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _desc_ be OrdinaryGetOwnProperty(_S_, _P_). @@ -11887,9 +13771,17 @@

        [[GetOwnProperty]] ( _P_ )

        - -

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        -

        The [[DefineOwnProperty]] internal method of a String exotic object _S_ takes arguments _P_ (a property key) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + [[DefineOwnProperty]] ( + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

        +
        +
        for
        +
        a String exotic object _S_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _stringDesc_ be ! StringGetOwnProperty(_S_, _P_). @@ -11900,9 +13792,12 @@

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        - +

        [[OwnPropertyKeys]] ( )

        -

        The [[OwnPropertyKeys]] internal method of a String exotic object _O_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a String exotic object _O_
        +
        1. Let _keys_ be a new empty List. 1. Let _str_ be _O_.[[StringData]]. @@ -11920,9 +13815,17 @@

        [[OwnPropertyKeys]] ( )

        - -

        StringCreate ( _value_, _prototype_ )

        -

        The abstract operation StringCreate takes arguments _value_ (a String) and _prototype_. It is used to specify the creation of new String exotic objects. It performs the following steps when called:

        + +

        + StringCreate ( + _value_: a String, + _prototype_: unknown, + ) +

        +
        +
        description
        +
        It is used to specify the creation of new String exotic objects.
        +
        1. Let _S_ be ! MakeBasicObject(« [[Prototype]], [[Extensible]], [[StringData]] »). 1. Set _S_.[[Prototype]] to _prototype_. @@ -11936,9 +13839,15 @@

        StringCreate ( _value_, _prototype_ )

        - -

        StringGetOwnProperty ( _S_, _P_ )

        -

        The abstract operation StringGetOwnProperty takes arguments _S_ and _P_. It performs the following steps when called:

        + +

        + StringGetOwnProperty ( + _S_: unknown, + _P_: unknown, + ) +

        +
        +
        1. Assert: _S_ is an Object that has a [[StringData]] internal slot. 1. Assert: IsPropertyKey(_P_) is *true*. @@ -11983,9 +13892,16 @@

        Arguments Exotic Objects

        ECMAScript implementations of arguments exotic objects have historically contained an accessor property named *"caller"*. Prior to ECMAScript 2017, this specification included the definition of a throwing *"caller"* property on ordinary arguments objects. Since implementations do not contain this extension any longer, ECMAScript 2017 dropped the requirement for a throwing *"caller"* accessor.

        - -

        [[GetOwnProperty]] ( _P_ )

        -

        The [[GetOwnProperty]] internal method of an arguments exotic object _args_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[GetOwnProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        an arguments exotic object _args_
        +
        1. Let _desc_ be OrdinaryGetOwnProperty(_args_, _P_). 1. If _desc_ is *undefined*, return _desc_. @@ -11997,9 +13913,17 @@

        [[GetOwnProperty]] ( _P_ )

        - -

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        -

        The [[DefineOwnProperty]] internal method of an arguments exotic object _args_ takes arguments _P_ (a property key) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + [[DefineOwnProperty]] ( + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

        +
        +
        for
        +
        an arguments exotic object _args_
        +
        1. Let _map_ be _args_.[[ParameterMap]]. 1. Let _isMapped_ be HasOwnProperty(_map_, _P_). @@ -12023,9 +13947,17 @@

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        - -

        [[Get]] ( _P_, _Receiver_ )

        -

        The [[Get]] internal method of an arguments exotic object _args_ takes arguments _P_ (a property key) and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Get]] ( + _P_: a property key, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        an arguments exotic object _args_
        +
        1. Let _map_ be _args_.[[ParameterMap]]. 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). @@ -12037,9 +13969,18 @@

        [[Get]] ( _P_, _Receiver_ )

        - -

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

        -

        The [[Set]] internal method of an arguments exotic object _args_ takes arguments _P_ (a property key), _V_ (an ECMAScript language value), and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Set]] ( + _P_: a property key, + _V_: an ECMAScript language value, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        an arguments exotic object _args_
        +
        1. If SameValue(_args_, _Receiver_) is *false*, then 1. Let _isMapped_ be *false*. @@ -12053,9 +13994,16 @@

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

        - -

        [[Delete]] ( _P_ )

        -

        The [[Delete]] internal method of an arguments exotic object _args_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[Delete]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        an arguments exotic object _args_
        +
        1. Let _map_ be _args_.[[ParameterMap]]. 1. Let _isMapped_ be ! HasOwnProperty(_map_, _P_). @@ -12066,9 +14014,14 @@

        [[Delete]] ( _P_ )

        - -

        CreateUnmappedArgumentsObject ( _argumentsList_ )

        -

        The abstract operation CreateUnmappedArgumentsObject takes argument _argumentsList_. It performs the following steps when called:

        + +

        + CreateUnmappedArgumentsObject ( + _argumentsList_: unknown, + ) +

        +
        +
        1. Let _len_ be the number of elements in _argumentsList_. 1. Let _obj_ be ! OrdinaryObjectCreate(%Object.prototype%, « [[ParameterMap]] »). @@ -12085,9 +14038,17 @@

        CreateUnmappedArgumentsObject ( _argumentsList_ )

        - -

        CreateMappedArgumentsObject ( _func_, _formals_, _argumentsList_, _env_ )

        -

        The abstract operation CreateMappedArgumentsObject takes arguments _func_ (an Object), _formals_ (a Parse Node), _argumentsList_ (a List), and _env_ (an Environment Record). It performs the following steps when called:

        + +

        + CreateMappedArgumentsObject ( + _func_: an Object, + _formals_: a Parse Node, + _argumentsList_: a List, + _env_: an Environment Record, + ) +

        +
        +
        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_. @@ -12124,9 +14085,17 @@

        CreateMappedArgumentsObject ( _func_, _formals_, _argumentsList_, _env_ ) - -

        MakeArgGetter ( _name_, _env_ )

        -

        The abstract operation MakeArgGetter takes arguments _name_ (a String) and _env_ (an Environment Record). It creates a built-in function object that when executed returns the value bound for _name_ in _env_. It performs the following steps when called:

        + +

        + MakeArgGetter ( + _name_: a String, + _env_: an Environment Record, + ) +

        +
        +
        description
        +
        It creates a built-in function object that when executed returns the value bound for _name_ in _env_.
        +
        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*). @@ -12136,9 +14105,17 @@

        MakeArgGetter ( _name_, _env_ )

        - -

        MakeArgSetter ( _name_, _env_ )

        -

        The abstract operation MakeArgSetter takes arguments _name_ (a String) and _env_ (an Environment Record). It creates a built-in function object that when executed sets the value bound for _name_ in _env_. It performs the following steps when called:

        + +

        + MakeArgSetter ( + _name_: a String, + _env_: an Environment Record, + ) +

        +
        +
        description
        +
        It creates a built-in function object that when executed sets the value bound for _name_ in _env_.
        +
        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*). @@ -12156,9 +14133,16 @@

        Integer-Indexed Exotic Objects

        Integer-Indexed exotic objects have the same internal slots as ordinary objects and additionally [[ViewedArrayBuffer]], [[ArrayLength]], [[ByteOffset]], [[ContentType]], and [[TypedArrayName]] internal slots.

        An object is an Integer-Indexed exotic object if its [[GetOwnProperty]], [[HasProperty]], [[DefineOwnProperty]], [[Get]], [[Set]], [[Delete]], and [[OwnPropertyKeys]] internal methods use the definitions in this section, and its other essential internal methods use the definitions found in . These methods are installed by IntegerIndexedObjectCreate.

        - -

        [[GetOwnProperty]] ( _P_ )

        -

        The [[GetOwnProperty]] internal method of an Integer-Indexed exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[GetOwnProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        an Integer-Indexed exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Assert: _O_ is an Integer-Indexed exotic object. @@ -12172,9 +14156,16 @@

        [[GetOwnProperty]] ( _P_ )

        - -

        [[HasProperty]] ( _P_ )

        -

        The [[HasProperty]] internal method of an Integer-Indexed exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[HasProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        an Integer-Indexed exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Assert: _O_ is an Integer-Indexed exotic object. @@ -12185,9 +14176,17 @@

        [[HasProperty]] ( _P_ )

        - -

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        -

        The [[DefineOwnProperty]] internal method of an Integer-Indexed exotic object _O_ takes arguments _P_ (a property key) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + [[DefineOwnProperty]] ( + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

        +
        +
        for
        +
        an Integer-Indexed exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Assert: _O_ is an Integer-Indexed exotic object. @@ -12205,9 +14204,17 @@

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        - -

        [[Get]] ( _P_, _Receiver_ )

        -

        The [[Get]] internal method of an Integer-Indexed exotic object _O_ takes arguments _P_ (a property key) and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Get]] ( + _P_: a property key, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        an Integer-Indexed exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. If Type(_P_) is String, then @@ -12218,9 +14225,18 @@

        [[Get]] ( _P_, _Receiver_ )

        - -

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

        -

        The [[Set]] internal method of an Integer-Indexed exotic object _O_ takes arguments _P_ (a property key), _V_ (an ECMAScript language value), and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Set]] ( + _P_: a property key, + _V_: an ECMAScript language value, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        an Integer-Indexed exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. If Type(_P_) is String, then @@ -12232,9 +14248,16 @@

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

        - -

        [[Delete]] ( _P_ )

        -

        The [[Delete]] internal method of an Integer-Indexed exotic object _O_ takes arguments _P_ (a property key). It performs the following steps when called:

        + +

        + [[Delete]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        an Integer-Indexed exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Assert: _O_ is an Integer-Indexed exotic object. @@ -12246,9 +14269,12 @@

        [[Delete]] ( _P_ )

        - +

        [[OwnPropertyKeys]] ( )

        -

        The [[OwnPropertyKeys]] internal method of an Integer-Indexed exotic object _O_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        an Integer-Indexed exotic object _O_
        +
        1. Let _keys_ be a new empty List. 1. Assert: _O_ is an Integer-Indexed exotic object. @@ -12263,9 +14289,16 @@

        [[OwnPropertyKeys]] ( )

        - -

        IntegerIndexedObjectCreate ( _prototype_ )

        -

        The abstract operation IntegerIndexedObjectCreate takes argument _prototype_. It is used to specify the creation of new Integer-Indexed exotic objects. It performs the following steps when called:

        + +

        + IntegerIndexedObjectCreate ( + _prototype_: unknown, + ) +

        +
        +
        description
        +
        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 _A_ be ! MakeBasicObject(_internalSlotsList_). @@ -12281,9 +14314,15 @@

        IntegerIndexedObjectCreate ( _prototype_ )

        - -

        IsValidIntegerIndex ( _O_, _index_ )

        -

        The abstract operation IsValidIntegerIndex takes arguments _O_ and _index_ (a Number). It performs the following steps when called:

        + +

        + IsValidIntegerIndex ( + _O_: unknown, + _index_: a Number, + ) +

        +
        +
        1. Assert: _O_ is an Integer-Indexed exotic object. 1. If IsDetachedBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, return *false*. @@ -12294,9 +14333,15 @@

        IsValidIntegerIndex ( _O_, _index_ )

        - -

        IntegerIndexedElementGet ( _O_, _index_ )

        -

        The abstract operation IntegerIndexedElementGet takes arguments _O_ and _index_ (a Number). It performs the following steps when called:

        + +

        + IntegerIndexedElementGet ( + _O_: unknown, + _index_: a Number, + ) +

        +
        +
        1. Assert: _O_ is an Integer-Indexed exotic object. 1. If ! IsValidIntegerIndex(_O_, _index_) is *false*, return *undefined*. @@ -12309,9 +14354,16 @@

        IntegerIndexedElementGet ( _O_, _index_ )

        - -

        IntegerIndexedElementSet ( _O_, _index_, _value_ )

        -

        The abstract operation IntegerIndexedElementSet takes arguments _O_, _index_ (a Number), and _value_. It performs the following steps when called:

        + +

        + IntegerIndexedElementSet ( + _O_: unknown, + _index_: a Number, + _value_: unknown, + ) +

        +
        +
        1. Assert: _O_ is an Integer-Indexed exotic object. 1. If _O_.[[ContentType]] is ~BigInt~, let _numValue_ be ? ToBigInt(_value_). @@ -12388,33 +14440,53 @@

        Module Namespace Exotic Objects

        Module namespace exotic objects provide alternative definitions for all of the internal methods except [[GetPrototypeOf]], which behaves as defined in .

        - -

        [[SetPrototypeOf]] ( _V_ )

        -

        The [[SetPrototypeOf]] internal method of a module namespace exotic object _O_ takes argument _V_ (an Object or *null*). It performs the following steps when called:

        + +

        + [[SetPrototypeOf]] ( + _V_: an Object or *null*, + ) +

        +
        +
        for
        +
        a module namespace exotic object _O_
        +
        1. Return ? SetImmutablePrototype(_O_, _V_).
        - +

        [[IsExtensible]] ( )

        -

        The [[IsExtensible]] internal method of a module namespace exotic object takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a module namespace exotic object
        +
        1. Return *false*.
        - +

        [[PreventExtensions]] ( )

        -

        The [[PreventExtensions]] internal method of a module namespace exotic object takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a module namespace exotic object
        +
        1. Return *true*.
        - -

        [[GetOwnProperty]] ( _P_ )

        -

        The [[GetOwnProperty]] internal method of a module namespace exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[GetOwnProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        a module namespace exotic object _O_
        +
        1. If Type(_P_) is Symbol, return OrdinaryGetOwnProperty(_O_, _P_). 1. Let _exports_ be _O_.[[Exports]]. @@ -12424,9 +14496,17 @@

        [[GetOwnProperty]] ( _P_ )

        - -

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        -

        The [[DefineOwnProperty]] internal method of a module namespace exotic object _O_ takes arguments _P_ (a property key) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + [[DefineOwnProperty]] ( + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

        +
        +
        for
        +
        a module namespace exotic object _O_
        +
        1. If Type(_P_) is Symbol, return OrdinaryDefineOwnProperty(_O_, _P_, _Desc_). 1. Let _current_ be ? _O_.[[GetOwnProperty]](_P_). @@ -12440,9 +14520,16 @@

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        - -

        [[HasProperty]] ( _P_ )

        -

        The [[HasProperty]] internal method of a module namespace exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[HasProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        a module namespace exotic object _O_
        +
        1. If Type(_P_) is Symbol, return OrdinaryHasProperty(_O_, _P_). 1. Let _exports_ be _O_.[[Exports]]. @@ -12451,9 +14538,17 @@

        [[HasProperty]] ( _P_ )

        - -

        [[Get]] ( _P_, _Receiver_ )

        -

        The [[Get]] internal method of a module namespace exotic object _O_ takes arguments _P_ (a property key) and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Get]] ( + _P_: a property key, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        a module namespace exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. If Type(_P_) is Symbol, then @@ -12476,17 +14571,33 @@

        [[Get]] ( _P_, _Receiver_ )

        - -

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

        -

        The [[Set]] internal method of a module namespace exotic object takes arguments _P_ (a property key), _V_ (an ECMAScript language value), and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Set]] ( + _P_: a property key, + _V_: an ECMAScript language value, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        a module namespace exotic object
        +
        1. Return *false*.
        - -

        [[Delete]] ( _P_ )

        -

        The [[Delete]] internal method of a module namespace exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[Delete]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        a module namespace exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. If Type(_P_) is Symbol, then @@ -12497,9 +14608,12 @@

        [[Delete]] ( _P_ )

        - +

        [[OwnPropertyKeys]] ( )

        -

        The [[OwnPropertyKeys]] internal method of a module namespace exotic object _O_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a module namespace exotic object _O_
        +
        1. Let _exports_ be _O_.[[Exports]]. 1. Let _symbolKeys_ be ! OrdinaryOwnPropertyKeys(_O_). @@ -12507,9 +14621,17 @@

        [[OwnPropertyKeys]] ( )

        - -

        ModuleNamespaceCreate ( _module_, _exports_ )

        -

        The abstract operation ModuleNamespaceCreate takes arguments _module_ and _exports_. It is used to specify the creation of new module namespace exotic objects. It performs the following steps when called:

        + +

        + ModuleNamespaceCreate ( + _module_: unknown, + _exports_: unknown, + ) +

        +
        +
        description
        +
        It is used to specify the creation of new module namespace exotic objects.
        +
        1. Assert: _module_ is a Module Record. 1. Assert: _module_.[[Namespace]] is *undefined*. @@ -12538,17 +14660,30 @@

        Immutable Prototype Exotic Objects

        Unlike other exotic objects, there is not a dedicated creation abstract operation provided for immutable prototype exotic objects. This is because they are only used by %Object.prototype% and by host environments, and in host environments, the relevant objects are potentially exotic in other ways and thus need their own dedicated creation operation.

        - -

        [[SetPrototypeOf]] ( _V_ )

        -

        The [[SetPrototypeOf]] internal method of an immutable prototype exotic object _O_ takes argument _V_ (an Object or *null*). It performs the following steps when called:

        + +

        + [[SetPrototypeOf]] ( + _V_: an Object or *null*, + ) +

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

        SetImmutablePrototype ( _O_, _V_ )

        -

        The abstract operation SetImmutablePrototype takes arguments _O_ and _V_. It performs the following steps when called:

        + +

        + SetImmutablePrototype ( + _O_: unknown, + _V_: unknown, + ) +

        +
        +
        1. Assert: Either Type(_V_) is Object or Type(_V_) is Null. 1. Let _current_ be ? _O_.[[GetPrototypeOf]](). @@ -12688,9 +14823,12 @@

        Proxy Object Internal Methods and Internal Slots

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

        In the following algorithm descriptions, assume _O_ is an ECMAScript proxy object, _P_ is a property key value, _V_ is any ECMAScript language value and _Desc_ is a Property Descriptor record.

        - +

        [[GetPrototypeOf]] ( )

        -

        The [[GetPrototypeOf]] internal method of a Proxy exotic object _O_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Let _handler_ be _O_.[[ProxyHandler]]. 1. If _handler_ is *null*, throw a *TypeError* exception. @@ -12720,9 +14858,16 @@

        [[GetPrototypeOf]] ( )

        - -

        [[SetPrototypeOf]] ( _V_ )

        -

        The [[SetPrototypeOf]] internal method of a Proxy exotic object _O_ takes argument _V_ (an Object or *null*). It performs the following steps when called:

        + +

        + [[SetPrototypeOf]] ( + _V_: an Object or *null*, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Assert: Either Type(_V_) is Object or Type(_V_) is Null. 1. Let _handler_ be _O_.[[ProxyHandler]]. @@ -12753,9 +14898,12 @@

        [[SetPrototypeOf]] ( _V_ )

        - +

        [[IsExtensible]] ( )

        -

        The [[IsExtensible]] internal method of a Proxy exotic object _O_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Let _handler_ be _O_.[[ProxyHandler]]. 1. If _handler_ is *null*, throw a *TypeError* exception. @@ -12782,9 +14930,12 @@

        [[IsExtensible]] ( )

        - +

        [[PreventExtensions]] ( )

        -

        The [[PreventExtensions]] internal method of a Proxy exotic object _O_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Let _handler_ be _O_.[[ProxyHandler]]. 1. If _handler_ is *null*, throw a *TypeError* exception. @@ -12812,9 +14963,16 @@

        [[PreventExtensions]] ( )

        - -

        [[GetOwnProperty]] ( _P_ )

        -

        The [[GetOwnProperty]] internal method of a Proxy exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[GetOwnProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _handler_ be _O_.[[ProxyHandler]]. @@ -12870,9 +15028,17 @@

        [[GetOwnProperty]] ( _P_ )

        - -

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        -

        The [[DefineOwnProperty]] internal method of a Proxy exotic object _O_ takes arguments _P_ (a property key) and _Desc_ (a Property Descriptor). It performs the following steps when called:

        + +

        + [[DefineOwnProperty]] ( + _P_: a property key, + _Desc_: a Property Descriptor, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _handler_ be _O_.[[ProxyHandler]]. @@ -12922,9 +15088,16 @@

        [[DefineOwnProperty]] ( _P_, _Desc_ )

        - -

        [[HasProperty]] ( _P_ )

        -

        The [[HasProperty]] internal method of a Proxy exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[HasProperty]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _handler_ be _O_.[[ProxyHandler]]. @@ -12959,9 +15132,17 @@

        [[HasProperty]] ( _P_ )

        - -

        [[Get]] ( _P_, _Receiver_ )

        -

        The [[Get]] internal method of a Proxy exotic object _O_ takes arguments _P_ (a property key) and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Get]] ( + _P_: a property key, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _handler_ be _O_.[[ProxyHandler]]. @@ -12993,9 +15174,18 @@

        [[Get]] ( _P_, _Receiver_ )

        - -

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

        -

        The [[Set]] internal method of a Proxy exotic object _O_ takes arguments _P_ (a property key), _V_ (an ECMAScript language value), and _Receiver_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + [[Set]] ( + _P_: a property key, + _V_: an ECMAScript language value, + _Receiver_: an ECMAScript language value, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _handler_ be _O_.[[ProxyHandler]]. @@ -13031,9 +15221,16 @@

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

        - -

        [[Delete]] ( _P_ )

        -

        The [[Delete]] internal method of a Proxy exotic object _O_ takes argument _P_ (a property key). It performs the following steps when called:

        + +

        + [[Delete]] ( + _P_: a property key, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Assert: IsPropertyKey(_P_) is *true*. 1. Let _handler_ be _O_.[[ProxyHandler]]. @@ -13068,9 +15265,12 @@

        [[Delete]] ( _P_ )

        - +

        [[OwnPropertyKeys]] ( )

        -

        The [[OwnPropertyKeys]] internal method of a Proxy exotic object _O_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Let _handler_ be _O_.[[ProxyHandler]]. 1. If _handler_ is *null*, throw a *TypeError* exception. @@ -13129,9 +15329,17 @@

        [[OwnPropertyKeys]] ( )

        - -

        [[Call]] ( _thisArgument_, _argumentsList_ )

        -

        The [[Call]] internal method of a Proxy exotic object _O_ takes arguments _thisArgument_ (an ECMAScript language value) and _argumentsList_ (a List of ECMAScript language values). It performs the following steps when called:

        + +

        + [[Call]] ( + _thisArgument_: an ECMAScript language value, + _argumentsList_: a List of ECMAScript language values, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Let _handler_ be _O_.[[ProxyHandler]]. 1. If _handler_ is *null*, throw a *TypeError* exception. @@ -13148,9 +15356,17 @@

        [[Call]] ( _thisArgument_, _argumentsList_ )

        - -

        [[Construct]] ( _argumentsList_, _newTarget_ )

        -

        The [[Construct]] internal method of a Proxy exotic object _O_ takes arguments _argumentsList_ (a List of ECMAScript language values) and _newTarget_ (a constructor). It performs the following steps when called:

        + +

        + [[Construct]] ( + _argumentsList_: a List of ECMAScript language values, + _newTarget_: a constructor, + ) +

        +
        +
        for
        +
        a Proxy exotic object _O_
        +
        1. Let _handler_ be _O_.[[ProxyHandler]]. 1. If _handler_ is *null*, throw a *TypeError* exception. @@ -13178,9 +15394,17 @@

        [[Construct]] ( _argumentsList_, _newTarget_ )

        - -

        ProxyCreate ( _target_, _handler_ )

        -

        The abstract operation ProxyCreate takes arguments _target_ and _handler_. It is used to specify the creation of new Proxy exotic objects. It performs the following steps when called:

        + +

        + ProxyCreate ( + _target_: unknown, + _handler_: unknown, + ) +

        +
        +
        description
        +
        It is used to specify the creation of new Proxy exotic objects.
        +
        1. If Type(_target_) is not Object, throw a *TypeError* exception. 1. If Type(_handler_) is not Object, throw a *TypeError* exception. @@ -13215,9 +15439,14 @@

        Syntax

        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.

        - -

        Static Semantics: UTF16EncodeCodePoint ( _cp_ )

        -

        The abstract operation UTF16EncodeCodePoint takes argument _cp_ (a Unicode code point). It performs the following steps when called:

        + +

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

        +
        +
        1. Assert: 0 ≤ _cp_ ≤ 0x10FFFF. 1. If _cp_ ≤ 0xFFFF, return the String value consisting of the code unit whose value is _cp_. @@ -13227,9 +15456,16 @@

        Static Semantics: UTF16EncodeCodePoint ( _cp_ )

        - -

        Static Semantics: CodePointsToString ( _text_ )

        -

        The abstract operation CodePointsToString takes argument _text_ (a sequence of Unicode code points). It converts _text_ into a String value, as described in . It performs the following steps when called:

        + +

        + Static Semantics: CodePointsToString ( + _text_: a sequence of Unicode code points, + ) +

        +
        +
        description
        +
        It converts _text_ into a String value, as described in .
        +
        1. Let _result_ be the empty String. 1. For each code point _cp_ of _text_, do @@ -13238,9 +15474,17 @@

        Static Semantics: CodePointsToString ( _text_ )

        - -

        Static Semantics: UTF16SurrogatePairToCodePoint ( _lead_, _trail_ )

        -

        The abstract operation UTF16SurrogatePairToCodePoint takes arguments _lead_ (a code unit) and _trail_ (a code unit). Two code units that form a UTF-16 are converted to a code point. It performs the following steps when called:

        + +

        + Static Semantics: UTF16SurrogatePairToCodePoint ( + _lead_: a code unit, + _trail_: a code unit, + ) +

        +
        +
        description
        +
        Two code units that form a UTF-16 are converted to a code point.
        +
        1. Assert: _lead_ is a and _trail_ is a . 1. Let _cp_ be (_lead_ - 0xD800) × 0x400 + (_trail_ - 0xDC00) + 0x10000. @@ -13248,9 +15492,17 @@

        Static Semantics: UTF16SurrogatePairToCodePoint ( _lead_, _trail_ )

        - -

        Static Semantics: CodePointAt ( _string_, _position_ )

        -

        The abstract operation CodePointAt takes arguments _string_ (a String) and _position_ (a non-negative integer). It interprets _string_ as a sequence of UTF-16 encoded code points, as described in , and reads from it a single code point starting with the code unit at index _position_. It performs the following steps when called:

        + +

        + Static Semantics: CodePointAt ( + _string_: a String, + _position_: a non-negative integer, + ) +

        +
        +
        description
        +
        It interprets _string_ as a sequence of UTF-16 encoded code points, as described in , and reads from it a single code point starting with the code unit at index _position_.
        +
        1. Let _size_ be the length of _string_. 1. Assert: _position_ ≥ 0 and _position_ < _size_. @@ -13268,9 +15520,16 @@

        Static Semantics: CodePointAt ( _string_, _position_ )

        - -

        Static Semantics: StringToCodePoints ( _string_ )

        -

        The abstract operation StringToCodePoints takes argument _string_ (a String). It returns the sequence of Unicode code points that results from interpreting _string_ as UTF-16 encoded Unicode text as described in . It performs the following steps when called:

        + +

        + Static Semantics: StringToCodePoints ( + _string_: a String, + ) +

        +
        +
        description
        +
        It returns the sequence of Unicode code points that results from interpreting _string_ as UTF-16 encoded Unicode text as described in .
        +
        1. Let _codePoints_ be a new empty List. 1. Let _size_ be the length of _string_. @@ -13283,9 +15542,15 @@

        Static Semantics: StringToCodePoints ( _string_ )

        - -

        Static Semantics: ParseText ( _sourceText_, _goalSymbol_ )

        -

        The abstract operation ParseText takes arguments _sourceText_ (a sequence of Unicode code points) and _goalSymbol_ (a nonterminal in one of the ECMAScript grammars). It performs the following steps when called:

        + +

        + Static Semantics: ParseText ( + _sourceText_: a sequence of Unicode code points, + _goalSymbol_: a nonterminal in one of the ECMAScript grammars, + ) +

        +
        +
        1. Attempt to parse _sourceText_ using _goalSymbol_ as the goal symbol, and analyse the parse result for any early error conditions. Parsing and early error detection may be interleaved in an implementation-defined manner. 1. If the parse succeeded and no early errors were found, return the Parse Node (an instance of _goalSymbol_) at the root of the parse tree resulting from the parse. @@ -15618,9 +17883,16 @@

        Static Semantics: Early Errors

      - -

      Static Semantics: IsValidRegularExpressionLiteral ( _literal_ )

      -

      The abstract operation IsValidRegularExpressionLiteral takes argument _literal_. It determines if its argument is a valid regular expression literal. It performs the following steps when called:

      + +

      + Static Semantics: IsValidRegularExpressionLiteral ( + _literal_: unknown, + ) +

      +
      +
      description
      +
      It determines if its argument is a valid regular expression literal.
      +
      1. Assert: _literal_ is a |RegularExpressionLiteral|. 1. If FlagText of _literal_ contains any code points other than `g`, `i`, `m`, `s`, `u`, or `y`, or if it contains the same code point more than once, return *false*. @@ -15771,9 +18043,14 @@

      Static Semantics: TemplateStrings

      - -

      GetTemplateObject ( _templateLiteral_ )

      -

      The abstract operation GetTemplateObject takes argument _templateLiteral_ (a Parse Node). It performs the following steps when called:

      + +

      + GetTemplateObject ( + _templateLiteral_: a Parse Node, + ) +

      +
      +
      1. Let _realm_ be the current Realm Record. 1. Let _templateRegistry_ be _realm_.[[TemplateMap]]. @@ -16143,9 +18420,16 @@

      Runtime Semantics: Evaluation

      - -

      EvaluatePropertyAccessWithExpressionKey ( _baseValue_, _expression_, _strict_ )

      -

      The abstract operation EvaluatePropertyAccessWithExpressionKey takes arguments _baseValue_ (an ECMAScript language value), _expression_ (a Parse Node), and _strict_ (a Boolean). It performs the following steps when called:

      + +

      + EvaluatePropertyAccessWithExpressionKey ( + _baseValue_: an ECMAScript language value, + _expression_: a Parse Node, + _strict_: a Boolean, + ) +

      +
      +
      1. Let _propertyNameReference_ be the result of evaluating _expression_. 1. Let _propertyNameValue_ be ? GetValue(_propertyNameReference_). @@ -16154,9 +18438,16 @@

      EvaluatePropertyAccessWithExpressionKey ( _baseValue_, _expression_, _strict 1. Return the Reference Record { [[Base]]: _bv_, [[ReferencedName]]: _propertyKey_, [[Strict]]: _strict_, [[ThisValue]]: ~empty~ }. - -

      EvaluatePropertyAccessWithIdentifierKey ( _baseValue_, _identifierName_, _strict_ )

      -

      The abstract operation EvaluatePropertyAccessWithIdentifierKey takes arguments _baseValue_ (an ECMAScript language value), _identifierName_ (a Parse Node), and _strict_ (a Boolean). It performs the following steps when called:

      + +

      + EvaluatePropertyAccessWithIdentifierKey ( + _baseValue_: an ECMAScript language value, + _identifierName_: a Parse Node, + _strict_: a Boolean, + ) +

      +
      +
      1. Assert: _identifierName_ is an |IdentifierName|. 1. Let _bv_ be ? RequireObjectCoercible(_baseValue_). @@ -16179,9 +18470,15 @@

      Runtime Semantics: Evaluation

      1. Return ? EvaluateNew(|MemberExpression|, |Arguments|).
      - -

      EvaluateNew ( _constructExpr_, _arguments_ )

      -

      The abstract operation EvaluateNew takes arguments _constructExpr_ and _arguments_. It performs the following steps when called:

      + +

      + EvaluateNew ( + _constructExpr_: unknown, + _arguments_: unknown, + ) +

      +
      +
      1. Assert: _constructExpr_ is either a |NewExpression| or a |MemberExpression|. 1. Assert: _arguments_ is either ~empty~ or an |Arguments|. @@ -16232,9 +18529,17 @@

      Runtime Semantics: Evaluation

      - -

      EvaluateCall ( _func_, _ref_, _arguments_, _tailPosition_ )

      -

      The abstract operation EvaluateCall takes arguments _func_ (an ECMAScript language value), _ref_ (an ECMAScript language value or a Reference Record), _arguments_ (a Parse Node), and _tailPosition_ (a Boolean). It performs the following steps when called:

      + +

      + EvaluateCall ( + _func_: an ECMAScript language value, + _ref_: an ECMAScript language value or a Reference Record, + _arguments_: a Parse Node, + _tailPosition_: a Boolean, + ) +

      +
      +
      1. If _ref_ is a Reference Record, then 1. If IsPropertyReference(_ref_) is *true*, then @@ -16297,9 +18602,10 @@

      Runtime Semantics: Evaluation

      - +

      GetSuperConstructor ( )

      -

      The abstract operation GetSuperConstructor takes no arguments. It performs the following steps when called:

      +
      +
      1. Let _envRec_ be GetThisEnvironment(). 1. Assert: _envRec_ is a function Environment Record. @@ -16310,9 +18616,16 @@

      GetSuperConstructor ( )

      - -

      MakeSuperPropertyReference ( _actualThis_, _propertyKey_, _strict_ )

      -

      The abstract operation MakeSuperPropertyReference takes arguments _actualThis_, _propertyKey_, and _strict_. It performs the following steps when called:

      + +

      + MakeSuperPropertyReference ( + _actualThis_: unknown, + _propertyKey_: unknown, + _strict_: unknown, + ) +

      +
      +
      1. Let _env_ be GetThisEnvironment(). 1. Assert: _env_.HasSuperBinding() is *true*. @@ -16572,9 +18885,16 @@

      Runtime Semantics: Evaluation

      1. Return _importMeta_.
      - -

      HostGetImportMetaProperties ( _moduleRecord_ )

      -

      The host-defined abstract operation HostGetImportMetaProperties takes argument _moduleRecord_ (a Module Record). It allows hosts to provide property keys and values for the object returned from `import.meta`.

      + +

      + HostGetImportMetaProperties ( + _moduleRecord_: a Module Record, + ) +

      +
      +
      description
      +
      It allows hosts to provide property keys and values for the object returned from `import.meta`.
      +

      The implementation of HostGetImportMetaProperties must conform to the following requirements:

        @@ -16587,9 +18907,17 @@

        HostGetImportMetaProperties ( _moduleRecord_ )

        The default implementation of HostGetImportMetaProperties is to return a new empty List.

        - -

        HostFinalizeImportMeta ( _importMeta_, _moduleRecord_ )

        -

        The host-defined abstract operation HostFinalizeImportMeta takes arguments _importMeta_ (an Object) and _moduleRecord_ (a Module Record). It allows hosts to perform any extraordinary operations to prepare the object returned from `import.meta`.

        + +

        + HostFinalizeImportMeta ( + _importMeta_: an Object, + _moduleRecord_: a Module Record, + ) +

        +
        +
        description
        +
        It allows hosts to perform any extraordinary operations to prepare the object returned from `import.meta`.
        +

        Most hosts will be able to simply define HostGetImportMetaProperties, and leave HostFinalizeImportMeta with its default behaviour. However, HostFinalizeImportMeta provides an "escape hatch" for hosts which need to directly manipulate the object before it is exposed to ECMAScript code.

        @@ -17200,9 +19528,17 @@

        Runtime Semantics: Evaluation

        - -

        InstanceofOperator ( _V_, _target_ )

        -

        The abstract operation InstanceofOperator takes arguments _V_ (an ECMAScript language value) and _target_ (an ECMAScript language value). It implements the generic algorithm for determining if _V_ is an instance of _target_ either by consulting _target_'s @@hasInstance method or, if absent, determining whether the value of _target_'s *"prototype"* property is present in _V_'s prototype chain. It performs the following steps when called:

        + +

        + InstanceofOperator ( + _V_: an ECMAScript language value, + _target_: an ECMAScript language value, + ) +

        +
        +
        description
        +
        It implements the generic algorithm for determining if _V_ is an instance of _target_ either by consulting _target_'s @@hasInstance method or, if absent, determining whether the value of _target_'s *"prototype"* property is present in _V_'s prototype chain.
        +
        1. If Type(_target_) is not Object, throw a *TypeError* exception. 1. Let _instOfHandler_ be ? GetMethod(_target_, @@hasInstance). @@ -17579,9 +19915,16 @@

        Runtime Semantics: Evaluation

        - -

        ApplyStringOrNumericBinaryOperator ( _lval_, _opText_, _rval_ )

        -

        The abstract operation ApplyStringOrNumericBinaryOperator takes arguments _lval_ (an ECMAScript language value), _opText_ (a sequence of Unicode code points), and _rval_ (an ECMAScript language value). It performs the following steps when called:

        + +

        + ApplyStringOrNumericBinaryOperator ( + _lval_: an ECMAScript language value, + _opText_: a sequence of Unicode code points, + _rval_: an ECMAScript language value, + ) +

        +
        +
        1. Assert: _opText_ is present in the table in step . 1. If _opText_ is `+`, then @@ -17628,9 +19971,16 @@

        ApplyStringOrNumericBinaryOperator ( _lval_, _opText_, _rval_ )

        - -

        EvaluateStringOrNumericBinaryExpression ( _leftOperand_, _opText_, _rightOperand_ )

        -

        The abstract operation EvaluateStringOrNumericBinaryExpression takes arguments _leftOperand_ (a Parse Node), _opText_ (a sequence of Unicode code points), and _rightOperand_ (a Parse Node). It performs the following steps when called:

        + +

        + EvaluateStringOrNumericBinaryExpression ( + _leftOperand_: a Parse Node, + _opText_: a sequence of Unicode code points, + _rightOperand_: a Parse Node, + ) +

        +
        +
        1. Let _lref_ be the result of evaluating _leftOperand_. 1. Let _lval_ be ? GetValue(_lref_). @@ -18137,9 +20487,17 @@

        Runtime Semantics: Evaluation

        - -

        BlockDeclarationInstantiation ( _code_, _env_ )

        -

        The abstract operation BlockDeclarationInstantiation takes arguments _code_ (a Parse Node) and _env_ (an Environment Record). _code_ is the Parse Node corresponding to the body of the block. _env_ is the Environment Record in which bindings are to be created.

        + +

        + BlockDeclarationInstantiation ( + _code_: a Parse Node, + _env_: an Environment Record, + ) +

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

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

        @@ -18548,9 +20906,15 @@

        Syntax

        Semantics

        - -

        LoopContinues ( _completion_, _labelSet_ )

        -

        The abstract operation LoopContinues takes arguments _completion_ and _labelSet_. It performs the following steps when called:

        + +

        + LoopContinues ( + _completion_: unknown, + _labelSet_: unknown, + ) +

        +
        +
        1. If _completion_.[[Type]] is ~normal~, return *true*. 1. If _completion_.[[Type]] is not ~continue~, return *false*. @@ -18734,9 +21098,18 @@

        Runtime Semantics: ForLoopEvaluation

        - -

        ForBodyEvaluation ( _test_, _increment_, _stmt_, _perIterationBindings_, _labelSet_ )

        -

        The abstract operation ForBodyEvaluation takes arguments _test_, _increment_, _stmt_, _perIterationBindings_, and _labelSet_. It performs the following steps when called:

        + +

        + ForBodyEvaluation ( + _test_: unknown, + _increment_: unknown, + _stmt_: unknown, + _perIterationBindings_: unknown, + _labelSet_: unknown, + ) +

        +
        +
        1. Let _V_ be *undefined*. 1. Perform ? CreatePerIterationEnvironment(_perIterationBindings_). @@ -18755,9 +21128,14 @@

        ForBodyEvaluation ( _test_, _increment_, _stmt_, _perIterationBindings_, _la - -

        CreatePerIterationEnvironment ( _perIterationBindings_ )

        -

        The abstract operation CreatePerIterationEnvironment takes argument _perIterationBindings_. It performs the following steps when called:

        + +

        + CreatePerIterationEnvironment ( + _perIterationBindings_: unknown, + ) +

        +
        +
        1. If _perIterationBindings_ has any elements, then 1. Let _lastIterationEnv_ be the running execution context's LexicalEnvironment. @@ -18991,9 +21369,16 @@

        Runtime Semantics: ForInOfLoopEvaluation

        - -

        ForIn/OfHeadEvaluation ( _uninitializedBoundNames_, _expr_, _iterationKind_ )

        -

        The abstract operation ForIn/OfHeadEvaluation takes arguments _uninitializedBoundNames_, _expr_, and _iterationKind_ (either ~enumerate~, ~iterate~, or ~async-iterate~). It performs the following steps when called:

        + +

        + ForIn/OfHeadEvaluation ( + _uninitializedBoundNames_: unknown, + _expr_: unknown, + _iterationKind_: either ~enumerate~, ~iterate~, or ~async-iterate~, + ) +

        +
        +
        1. Let _oldEnv_ be the running execution context's LexicalEnvironment. 1. If _uninitializedBoundNames_ is not an empty List, then @@ -19020,9 +21405,20 @@

        ForIn/OfHeadEvaluation ( _uninitializedBoundNames_, _expr_, _iterationKind_ - -

        ForIn/OfBodyEvaluation ( _lhs_, _stmt_, _iteratorRecord_, _iterationKind_, _lhsKind_, _labelSet_ [ , _iteratorKind_ ] )

        -

        The abstract operation ForIn/OfBodyEvaluation takes arguments _lhs_, _stmt_, _iteratorRecord_, _iterationKind_, _lhsKind_ (either ~assignment~, ~varBinding~ or ~lexicalBinding~), and _labelSet_ and optional argument _iteratorKind_ (either ~sync~ or ~async~). It performs the following steps when called:

        + +

        + ForIn/OfBodyEvaluation ( + _lhs_: unknown, + _stmt_: unknown, + _iteratorRecord_: unknown, + _iterationKind_: unknown, + _lhsKind_: either ~assignment~, ~varBinding~ or ~lexicalBinding~, + _labelSet_: unknown, + optional _iteratorKind_: either ~sync~ or ~async~, + ) +

        +
        +
        1. If _iteratorKind_ is not present, set _iteratorKind_ to ~sync~. 1. Let _oldEnv_ be the running execution context's LexicalEnvironment. @@ -19099,9 +21495,14 @@

        Runtime Semantics: Evaluation

        - -

        EnumerateObjectProperties ( _O_ )

        -

        The abstract operation EnumerateObjectProperties takes argument _O_. It performs the following steps when called:

        + +

        + EnumerateObjectProperties ( + _O_: unknown, + ) +

        +
        +
        1. Assert: Type(_O_) is Object. 1. Return an Iterator object () whose `next` method iterates over all the String-valued keys of enumerable properties of _O_. The iterator object is never directly accessible to ECMAScript code. The mechanics and order of enumerating the properties is not specified but must conform to the rules specified below. @@ -19147,9 +21548,16 @@

        EnumerateObjectProperties ( _O_ )

        For-In Iterator Objects

        A For-In Iterator is an object that represents a specific iteration over some specific object. For-In Iterator objects are never directly accessible to ECMAScript code; they exist solely to illustrate the behaviour of EnumerateObjectProperties.

        - -

        CreateForInIterator ( _object_ )

        -

        The abstract operation CreateForInIterator takes argument _object_. It is used to create a For-In Iterator object which iterates over the own and inherited enumerable string properties of _object_ in a specific order. It performs the following steps when called:

        + +

        + CreateForInIterator ( + _object_: unknown, + ) +

        +
        +
        description
        +
        It is used to create a For-In Iterator object which iterates over the own and inherited enumerable string properties of _object_ in a specific order.
        +
        1. Assert: Type(_object_) is Object. 1. Let _iterator_ be ! OrdinaryObjectCreate(%ForInIteratorPrototype%, « [[Object]], [[ObjectWasVisited]], [[VisitedKeys]], [[RemainingKeys]] »). @@ -19499,9 +21907,17 @@

        Runtime Semantics: CaseBlockEvaluation

        - -

        CaseClauseIsSelected ( _C_, _input_ )

        -

        The abstract operation CaseClauseIsSelected takes arguments _C_ (a Parse Node for |CaseClause|) and _input_ (an ECMAScript language value). It determines whether _C_ matches _input_. It performs the following steps when called:

        + +

        + CaseClauseIsSelected ( + _C_: a Parse Node for |CaseClause|, + _input_: an ECMAScript language value, + ) +

        +
        +
        description
        +
        It determines whether _C_ matches _input_.
        +
        1. Assert: _C_ is an instance of the production CaseClause : `case` Expression `:` StatementList?. 1. Let _exprRef_ be the result of evaluating the |Expression| of _C_. @@ -19577,9 +21993,14 @@

        Static Semantics: Early Errors

        - -

        Static Semantics: IsLabelledFunction ( _stmt_ )

        -

        The abstract operation IsLabelledFunction takes argument _stmt_. It performs the following steps when called:

        + +

        + Static Semantics: IsLabelledFunction ( + _stmt_: unknown, + ) +

        +
        +
        1. If _stmt_ is not a |LabelledStatement|, return *false*. 1. Let _item_ be the |LabelledItem| of _stmt_. @@ -21921,9 +24342,14 @@

        Runtime Semantics: Evaluation

        Tail Position Calls

        - -

        Static Semantics: IsInTailPosition ( _call_ )

        -

        The abstract operation IsInTailPosition takes argument _call_. It performs the following steps when called:

        + +

        + Static Semantics: IsInTailPosition ( + _call_: unknown, + ) +

        +
        +
        1. Assert: _call_ is a Parse Node. 1. If the source code matching _call_ is non-strict code, return *false*. @@ -22264,9 +24690,10 @@

        Expression Rules

        - +

        PrepareForTailCall ( )

        -

        The abstract operation PrepareForTailCall takes no arguments. It performs the following steps when called:

        +
        +
        1. Let _leafContext_ be the running execution context. 1. Suspend _leafContext_. @@ -22404,9 +24831,18 @@

        Script Records

        - -

        ParseScript ( _sourceText_, _realm_, _hostDefined_ )

        -

        The abstract operation ParseScript takes arguments _sourceText_, _realm_, and _hostDefined_. It creates a Script Record based upon the result of parsing _sourceText_ as a |Script|. It performs the following steps when called:

        + +

        + ParseScript ( + _sourceText_: unknown, + _realm_: unknown, + _hostDefined_: unknown, + ) +

        +
        +
        description
        +
        It creates a Script Record based upon the result of parsing _sourceText_ as a |Script|.
        +
        1. Assert: _sourceText_ is an ECMAScript source text (see clause ). @@ -22419,9 +24855,14 @@

        ParseScript ( _sourceText_, _realm_, _hostDefined_ )

        - -

        ScriptEvaluation ( _scriptRecord_ )

        -

        The abstract operation ScriptEvaluation takes argument _scriptRecord_. It performs the following steps when called:

        + +

        + ScriptEvaluation ( + _scriptRecord_: unknown, + ) +

        +
        +
        1. Let _globalEnv_ be _scriptRecord_.[[Realm]].[[GlobalEnv]]. @@ -22447,9 +24888,17 @@

        ScriptEvaluation ( _scriptRecord_ )

        - -

        GlobalDeclarationInstantiation ( _script_, _env_ )

        -

        The abstract operation GlobalDeclarationInstantiation takes arguments _script_ (a Parse Node for |ScriptBody|) and _env_ (an Environment Record). _script_ is the |ScriptBody| for which the execution context is being established. _env_ is the global environment in which bindings are to be created.

        + +

        + GlobalDeclarationInstantiation ( + _script_: a Parse Node for |ScriptBody|, + _env_: an Environment Record, + ) +

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

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

        @@ -22581,9 +25030,16 @@

        Static Semantics: Early Errors

        - -

        Static Semantics: ImportedLocalNames ( _importEntries_ )

        -

        The abstract operation ImportedLocalNames takes argument _importEntries_ (a List of ImportEntry Records (see )). It creates a List of all of the local name bindings defined by _importEntries_. It performs the following steps when called:

        + +

        + Static Semantics: ImportedLocalNames ( + _importEntries_: a List of ImportEntry Records (see ), + ) +

        +
        +
        description
        +
        It creates a List of all of the local name bindings defined by _importEntries_.
        +
        1. Let _localNames_ be a new empty List. 1. For each ImportEntry Record _i_ of _importEntries_, do @@ -22868,9 +25324,15 @@

        Cyclic Module Records

        - +

        Link ( )

        -

        The Link concrete method of a Cyclic Module Record _module_ takes no arguments. On success, Link transitions this module's [[Status]] from ~unlinked~ to ~linked~. On failure, an exception is thrown and this module's [[Status]] remains ~unlinked~. (Most of the work is done by the auxiliary function InnerModuleLinking.) It performs the following steps when called:

        +
        +
        for
        +
        a Cyclic Module Record _module_
        + +
        description
        +
        On success, Link transitions this module's [[Status]] from ~unlinked~ to ~linked~. On failure, an exception is thrown and this module's [[Status]] remains ~unlinked~. (Most of the work is done by the auxiliary function InnerModuleLinking.)
        +
        1. Assert: _module_.[[Status]] is not ~linking~ or ~evaluating~. @@ -22890,9 +25352,18 @@

        Link ( )

        1. Return *undefined*.
        - -

        InnerModuleLinking ( _module_, _stack_, _index_ )

        -

        The abstract operation InnerModuleLinking takes arguments _module_ (a Cyclic Module Record), _stack_, and _index_ (a non-negative integer). It is used by Link to perform the actual linking process for _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as a module's [[DFSIndex]] and [[DFSAncestorIndex]] fields, keep track of the depth-first search (DFS) traversal. In particular, [[DFSAncestorIndex]] is used to discover strongly connected components (SCCs), such that all modules in an SCC transition to ~linked~ together. It performs the following steps when called:

        + +

        + InnerModuleLinking ( + _module_: a Cyclic Module Record, + _stack_: unknown, + _index_: a non-negative integer, + ) +

        +
        +
        description
        +
        It is used by Link to perform the actual linking process for _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as a module's [[DFSIndex]] and [[DFSAncestorIndex]] fields, keep track of the depth-first search (DFS) traversal. In particular, [[DFSAncestorIndex]] is used to discover strongly connected components (SCCs), such that all modules in an SCC transition to ~linked~ together.
        +
        1. If _module_ is not a Cyclic Module Record, then @@ -22930,9 +25401,15 @@

        InnerModuleLinking ( _module_, _stack_, _index_ )

        - +

        Evaluate ( )

        -

        The Evaluate concrete method of a Cyclic Module Record _module_ takes no arguments. Evaluate transitions this module's [[Status]] from ~linked~ to ~evaluated~. If execution results in an exception, that exception is recorded in the [[EvaluationError]] field and rethrown by future invocations of Evaluate. (Most of the work is done by the auxiliary function InnerModuleEvaluation.) It performs the following steps when called:

        +
        +
        for
        +
        a Cyclic Module Record _module_
        + +
        description
        +
        Evaluate transitions this module's [[Status]] from ~linked~ to ~evaluated~. If execution results in an exception, that exception is recorded in the [[EvaluationError]] field and rethrown by future invocations of Evaluate. (Most of the work is done by the auxiliary function InnerModuleEvaluation.)
        +
        1. Assert: This call to Evaluate is not happening at the same time as another call to Evaluate within the surrounding agent. @@ -22951,9 +25428,18 @@

        Evaluate ( )

        1. Return *undefined*.
        - -

        InnerModuleEvaluation ( _module_, _stack_, _index_ )

        -

        The abstract operation InnerModuleEvaluation takes arguments _module_ (a Module Record), _stack_, and _index_ (a non-negative integer). It is used by Evaluate to perform the actual evaluation process for _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as _module_'s [[DFSIndex]] and [[DFSAncestorIndex]] fields, are used the same way as in InnerModuleLinking. It performs the following steps when called:

        + +

        + InnerModuleEvaluation ( + _module_: a Module Record, + _stack_: unknown, + _index_: a non-negative integer, + ) +

        +
        +
        description
        +
        It is used by Evaluate to perform the actual evaluation process for _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as _module_'s [[DFSIndex]] and [[DFSAncestorIndex]] fields, are used the same way as in InnerModuleLinking.
        +
        1. If _module_ is not a Cyclic Module Record, then @@ -23537,9 +26023,18 @@

        Source Text Module Records

        The following definitions specify the required concrete methods and other abstract operations for Source Text Module Records

        - -

        ParseModule ( _sourceText_, _realm_, _hostDefined_ )

        -

        The abstract operation ParseModule takes arguments _sourceText_ (ECMAScript source text), _realm_, and _hostDefined_. It creates a Source Text Module Record based upon the result of parsing _sourceText_ as a |Module|. It performs the following steps when called:

        + +

        + ParseModule ( + _sourceText_: ECMAScript source text, + _realm_: unknown, + _hostDefined_: unknown, + ) +

        +
        +
        description
        +
        It creates a Source Text Module Record based upon the result of parsing _sourceText_ as a |Module|.
        +
        1. Assert: _sourceText_ is an ECMAScript source text (see clause ). 1. Let _body_ be ParseText(_sourceText_, |Module|). @@ -23574,9 +26069,16 @@

        ParseModule ( _sourceText_, _realm_, _hostDefined_ )

        - -

        GetExportedNames ( [ _exportStarSet_ ] )

        -

        The GetExportedNames concrete method of a Source Text Module Record _module_ takes optional argument _exportStarSet_. It performs the following steps when called:

        + +

        + GetExportedNames ( + optional _exportStarSet_: unknown, + ) +

        +
        +
        for
        +
        a Source Text Module Record _module_
        +
        1. If _exportStarSet_ is not present, set _exportStarSet_ to a new empty List. 1. Assert: _exportStarSet_ is a List of Source Text Module Records. @@ -23605,12 +26107,23 @@

        GetExportedNames ( [ _exportStarSet_ ] )

        - -

        ResolveExport ( _exportName_ [ , _resolveSet_ ] )

        -

        The ResolveExport concrete method of a Source Text Module Record _module_ takes argument _exportName_ (a String) and optional argument _resolveSet_.

        -

        ResolveExport attempts to resolve an imported binding to the actual defining module and local binding name. The defining module may be the module represented by the Module Record this method was invoked on or some other module that is imported by that module. The parameter _resolveSet_ is used to detect unresolved circular import/export paths. If a pair consisting of specific Module Record and _exportName_ is reached that is already in _resolveSet_, an import circularity has been encountered. Before recursively calling ResolveExport, a pair consisting of _module_ and _exportName_ is added to _resolveSet_.

        -

        If a defining module is found, a ResolvedBinding Record { [[Module]], [[BindingName]] } is returned. This record identifies the resolved binding of the originally requested export, unless this is the export of a namespace with no local binding. In this case, [[BindingName]] will be set to *"\*namespace\*"*. If no definition was found or the request is found to be circular, *null* is returned. If the request is found to be ambiguous, the string *"ambiguous"* is returned.

        -

        This concrete method performs the following steps when called:

        + +

        + ResolveExport ( + _exportName_: a String, + optional _resolveSet_: unknown, + ) +

        +
        +
        for
        +
        a Source Text Module Record _module_
        + +
        description
        +
        +

        ResolveExport attempts to resolve an imported binding to the actual defining module and local binding name. The defining module may be the module represented by the Module Record this method was invoked on or some other module that is imported by that module. The parameter _resolveSet_ is used to detect unresolved circular import/export paths. If a pair consisting of specific Module Record and _exportName_ is reached that is already in _resolveSet_, an import circularity has been encountered. Before recursively calling ResolveExport, a pair consisting of _module_ and _exportName_ is added to _resolveSet_.

        +

        If a defining module is found, a ResolvedBinding Record { [[Module]], [[BindingName]] } is returned. This record identifies the resolved binding of the originally requested export, unless this is the export of a namespace with no local binding. In this case, [[BindingName]] will be set to *"\*namespace\*"*. If no definition was found or the request is found to be circular, *null* is returned. If the request is found to be ambiguous, the string *"ambiguous"* is returned.

        +
        +
        1. If _resolveSet_ is not present, set _resolveSet_ to a new empty List. @@ -23652,9 +26165,12 @@

        ResolveExport ( _exportName_ [ , _resolveSet_ ] )

        - +

        InitializeEnvironment ( )

        -

        The InitializeEnvironment concrete method of a Source Text Module Record _module_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a Source Text Module Record _module_
        +
        1. For each ExportEntry Record _e_ of _module_.[[IndirectExportEntries]], do @@ -23717,9 +26233,12 @@

        InitializeEnvironment ( )

        - +

        ExecuteModule ( )

        -

        The ExecuteModule concrete method of a Source Text Module Record _module_ takes no arguments. It performs the following steps when called:

        +
        +
        for
        +
        a Source Text Module Record _module_
        +
        1. Suspend the currently running execution context. @@ -23733,9 +26252,17 @@

        ExecuteModule ( )

        - -

        HostResolveImportedModule ( _referencingScriptOrModule_, _specifier_ )

        -

        The host-defined abstract operation HostResolveImportedModule takes arguments _referencingScriptOrModule_ (a Script Record or Module Record or *null*) and _specifier_ (a |ModuleSpecifier| String). It provides the concrete Module Record subclass instance that corresponds to _specifier_ occurring within the context of the script or module represented by _referencingScriptOrModule_. _referencingScriptOrModule_ may be *null* if the resolution is being performed in the context of an `import()` expression and there is no active script or module at that time.

        + +

        + HostResolveImportedModule ( + _referencingScriptOrModule_: a Script Record or Module Record or *null*, + _specifier_: a |ModuleSpecifier| String, + ) +

        +
        +
        description
        +
        It provides the concrete Module Record subclass instance that corresponds to _specifier_ occurring within the context of the script or module represented by _referencingScriptOrModule_. _referencingScriptOrModule_ may be *null* if the resolution is being performed in the context of an `import()` expression and there is no active script or module at that time.
        +

        An example of when _referencingScriptOrModule_ can be *null* is in a web browser host. There, if a user clicks on a control given by

        @@ -23760,9 +26287,18 @@

        HostResolveImportedModule ( _referencingScriptOrModule_, _specifier_ )

        Multiple different _referencingScriptOrModule_, _specifier_ pairs may map to the same Module Record instance. The actual mapping semantic is host-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as alphabetic case folding and expansion of relative and abbreviated path specifiers.

        - -

        HostImportModuleDynamically ( _referencingScriptOrModule_, _specifier_, _promiseCapability_ )

        -

        The host-defined abstract operation HostImportModuleDynamically takes arguments _referencingScriptOrModule_ (a Script Record or Module Record or *null*), _specifier_ (a |ModuleSpecifier| String), and _promiseCapability_ (a PromiseCapability Record). It performs any necessary setup work in order to make available the module corresponding to _specifier_ occurring within the context of the script or module represented by _referencingScriptOrModule_. _referencingScriptOrModule_ may be *null* if there is no active script or module when the `import()` expression occurs. It then performs FinishDynamicImport to finish the dynamic import process.

        + +

        + HostImportModuleDynamically ( + _referencingScriptOrModule_: a Script Record or Module Record or *null*, + _specifier_: a |ModuleSpecifier| String, + _promiseCapability_: a PromiseCapability Record, + ) +

        +
        +
        description
        +
        It performs any necessary setup work in order to make available the module corresponding to _specifier_ occurring within the context of the script or module represented by _referencingScriptOrModule_. _referencingScriptOrModule_ may be *null* if there is no active script or module when the `import()` expression occurs. It then performs FinishDynamicImport to finish the dynamic import process.
        +

        The implementation of HostImportModuleDynamically must conform to the following requirements:

          @@ -23804,9 +26340,19 @@

          HostImportModuleDynamically ( _referencingScriptOrModule_, _specifier_, _pro

          The actual process performed is host-defined, but typically consists of performing whatever I/O operations are necessary to allow HostResolveImportedModule to synchronously retrieve the appropriate Module Record, and then calling its Evaluate concrete method. This might require performing similar normalization as HostResolveImportedModule does.

          - -

          FinishDynamicImport ( _referencingScriptOrModule_, _specifier_, _promiseCapability_, _completion_ )

          -

          The abstract operation FinishDynamicImport takes arguments _referencingScriptOrModule_, _specifier_, _promiseCapability_ (a PromiseCapability Record), and _completion_. FinishDynamicImport completes the process of a dynamic import originally started by an `import()` call, resolving or rejecting the promise returned by that call as appropriate according to _completion_. It is performed by host environments as part of HostImportModuleDynamically. It performs the following steps when called:

          + +

          + FinishDynamicImport ( + _referencingScriptOrModule_: unknown, + _specifier_: unknown, + _promiseCapability_: a PromiseCapability Record, + _completion_: unknown, + ) +

          +
          +
          description
          +
          FinishDynamicImport completes the process of a dynamic import originally started by an `import()` call, resolving or rejecting the promise returned by that call as appropriate according to _completion_. It is performed by host environments as part of HostImportModuleDynamically.
          +
          1. If _completion_ is an abrupt completion, perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _completion_.[[Value]] »). 1. Else, @@ -23819,9 +26365,16 @@

          FinishDynamicImport ( _referencingScriptOrModule_, _specifier_, _promiseCapa - -

          GetModuleNamespace ( _module_ )

          -

          The abstract operation GetModuleNamespace takes argument _module_. It retrieves the Module Namespace Object representing _module_'s exports, lazily creating it the first time it was requested, and storing it in _module_.[[Namespace]] for future retrieval. It performs the following steps when called:

          + +

          + GetModuleNamespace ( + _module_: unknown, + ) +

          +
          +
          description
          +
          It retrieves the Module Namespace Object representing _module_'s exports, lazily creating it the first time it was requested, and storing it in _module_.[[Namespace]] for future retrieval.
          +
          1. Assert: _module_ is an instance of a concrete subclass of Module Record. @@ -24514,9 +27067,17 @@

          eval ( _x_ )

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

          PerformEval ( _x_, _callerRealm_, _strictCaller_, _direct_ )

          -

          The abstract operation PerformEval takes arguments _x_, _callerRealm_, _strictCaller_, and _direct_. It performs the following steps when called:

          + +

          + PerformEval ( + _x_: unknown, + _callerRealm_: unknown, + _strictCaller_: unknown, + _direct_: unknown, + ) +

          +
          +
          1. Assert: If _direct_ is *false*, then _strictCaller_ is also *false*. 1. If Type(_x_) is not String, return _x_. @@ -24580,15 +27141,32 @@

          PerformEval ( _x_, _callerRealm_, _strictCaller_, _direct_ )

          - -

          HostEnsureCanCompileStrings ( _callerRealm_, _calleeRealm_ )

          -

          The host-defined abstract operation HostEnsureCanCompileStrings takes arguments _callerRealm_ (a Realm Record) and _calleeRealm_ (a Realm Record). It allows host environments to block certain ECMAScript functions which allow developers to compile strings into ECMAScript code.

          + +

          + HostEnsureCanCompileStrings ( + _callerRealm_: a Realm Record, + _calleeRealm_: a Realm Record, + ) +

          +
          +
          description
          +
          It allows host environments to block certain ECMAScript functions which allow developers to compile strings into ECMAScript code.
          +

          An implementation of HostEnsureCanCompileStrings may complete normally or abruptly. Any abrupt completions will be propagated to its callers. The default implementation of HostEnsureCanCompileStrings is to unconditionally return an empty normal completion.

          - -

          EvalDeclarationInstantiation ( _body_, _varEnv_, _lexEnv_, _privateEnv_, _strict_ )

          -

          The abstract operation EvalDeclarationInstantiation takes arguments _body_, _varEnv_, _lexEnv_, _privateEnv_, and _strict_. It performs the following steps when called:

          + +

          + EvalDeclarationInstantiation ( + _body_: unknown, + _varEnv_: unknown, + _lexEnv_: unknown, + _privateEnv_: unknown, + _strict_: unknown, + ) +

          +
          +