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::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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
-
- 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,
+ )
+
+
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,
+ )
+
+
-
- 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,
+ )
+
+
-
- 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,
+ )
+
+
-
- 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,
+ )
+
+
-
- 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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
@@ -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,
+ )
+
+
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,
+ )
+
+
@@ -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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
@@ -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,
+ )
+
+
@@ -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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
@@ -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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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|,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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:
+
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:
+
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:
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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:
+
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:
+
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:
+
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,
+ )
+
+
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:
+
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:
+
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:
+
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:
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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:
+
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:
+
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:
+
1. Return *undefined*.
-
+
GetThisBinding ( )
- The GetThisBinding concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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,
+ )
+
+
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:
+
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:
+
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,
+ )
+
+
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:
+
+