From f5fb84156fd48750db8f36826b44950366cebd35 Mon Sep 17 00:00:00 2001 From: Jungwoong Kim Date: Thu, 13 Nov 2025 19:51:06 +0900 Subject: [PATCH] Editorial: Unify 'else' and 'otherwise' in If step --- spec.html | 228 +++++++++++++++++++++++++++--------------------------- 1 file changed, 114 insertions(+), 114 deletions(-) diff --git a/spec.html b/spec.html index 4fa863a68f..5dbe83484a 100644 --- a/spec.html +++ b/spec.html @@ -2018,19 +2018,19 @@

1. If _exponent_ is either *+0*𝔽 or *-0*𝔽, return *1*𝔽. 1. If _base_ is *NaN*, return *NaN*. 1. If _base_ is *+∞*𝔽, then - 1. If _exponent_ > *+0*𝔽, return *+∞*𝔽; otherwise return *+0*𝔽. + 1. If _exponent_ > *+0*𝔽, return *+∞*𝔽; else return *+0*𝔽. 1. If _base_ is *-∞*𝔽, then 1. If _exponent_ > *+0*𝔽, then - 1. If _exponent_ is an odd integral Number, return *-∞*𝔽; otherwise return *+∞*𝔽. + 1. If _exponent_ is an odd integral Number, return *-∞*𝔽; else return *+∞*𝔽. 1. Else, - 1. If _exponent_ is an odd integral Number, return *-0*𝔽; otherwise return *+0*𝔽. + 1. If _exponent_ is an odd integral Number, return *-0*𝔽; else return *+0*𝔽. 1. If _base_ is *+0*𝔽, then - 1. If _exponent_ > *+0*𝔽, return *+0*𝔽; otherwise return *+∞*𝔽. + 1. If _exponent_ > *+0*𝔽, return *+0*𝔽; else return *+∞*𝔽. 1. If _base_ is *-0*𝔽, then 1. If _exponent_ > *+0*𝔽, then - 1. If _exponent_ is an odd integral Number, return *-0*𝔽; otherwise return *+0*𝔽. + 1. If _exponent_ is an odd integral Number, return *-0*𝔽; else return *+0*𝔽. 1. Else, - 1. If _exponent_ is an odd integral Number, return *-∞*𝔽; otherwise return *+∞*𝔽. + 1. If _exponent_ is an odd integral Number, return *-∞*𝔽; else return *+∞*𝔽. 1. Assert: _base_ is finite and is neither *+0*𝔽 nor *-0*𝔽. 1. If _exponent_ is *+∞*𝔽, then 1. If abs(ℝ(_base_)) > 1, return *+∞*𝔽. @@ -2101,17 +2101,17 @@

1. If _y_ is *+0*𝔽 or _y_ > *+0*𝔽, return _x_. 1. Return -_x_. 1. If _y_ is *+∞*𝔽, then - 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *+0*𝔽; otherwise return *-0*𝔽. + 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *+0*𝔽; else return *-0*𝔽. 1. If _y_ is *-∞*𝔽, then - 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *-0*𝔽; otherwise return *+0*𝔽. + 1. If _x_ is *+0*𝔽 or _x_ > *+0*𝔽, return *-0*𝔽; else return *+0*𝔽. 1. If _x_ is either *+0*𝔽 or *-0*𝔽, then 1. If _y_ is either *+0*𝔽 or *-0*𝔽, return *NaN*. 1. If _y_ > *+0*𝔽, return _x_. 1. Return -_x_. 1. If _y_ is *+0*𝔽, then - 1. If _x_ > *+0*𝔽, return *+∞*𝔽; otherwise return *-∞*𝔽. + 1. If _x_ > *+0*𝔽, return *+∞*𝔽; else return *-∞*𝔽. 1. If _y_ is *-0*𝔽, then - 1. If _x_ > *+0*𝔽, return *-∞*𝔽; otherwise return *+∞*𝔽. + 1. If _x_ > *+0*𝔽, return *-∞*𝔽; else return *+∞*𝔽. 1. Return 𝔽(ℝ(_x_) / ℝ(_y_)). @@ -2262,7 +2262,7 @@

1. If _y_ is *-∞*𝔽, return *false*. 1. If _x_ is *-∞*𝔽, return *true*. 1. Assert: _x_ and _y_ are finite. - 1. If ℝ(_x_) < ℝ(_y_), return *true*; otherwise return *false*. + 1. If ℝ(_x_) < ℝ(_y_), return *true*; else return *false*. @@ -2654,7 +2654,7 @@

- 1. If ℝ(_x_) < ℝ(_y_), return *true*; otherwise return *false*. + 1. If ℝ(_x_) < ℝ(_y_), return *true*; else return *false*. @@ -2668,7 +2668,7 @@

- 1. If ℝ(_x_) = ℝ(_y_), return *true*; otherwise return *false*. + 1. If ℝ(_x_) = ℝ(_y_), return *true*; else return *false*. @@ -4388,7 +4388,7 @@

1. If _V_.[[Base]] is ~unresolvable~, return *false*. - 1. If _V_.[[Base]] is an Environment Record, return *false*; otherwise return *true*. + 1. If _V_.[[Base]] is an Environment Record, return *false*; else return *true*. @@ -4401,7 +4401,7 @@

- 1. If _V_.[[Base]] is ~unresolvable~, return *true*; otherwise return *false*. + 1. If _V_.[[Base]] is ~unresolvable~, return *true*; else return *false*. @@ -4414,7 +4414,7 @@

- 1. If _V_.[[ThisValue]] is not ~empty~, return *true*; otherwise return *false*. + 1. If _V_.[[ThisValue]] is not ~empty~, return *true*; else return *false*. @@ -4427,7 +4427,7 @@

- 1. If _V_.[[ReferencedName]] is a Private Name, return *true*; otherwise return *false*. + 1. If _V_.[[ReferencedName]] is a Private Name, return *true*; else return *false*. @@ -4504,7 +4504,7 @@

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

Runtime Semantics: StringNumericValue ( ): a Number

1. Else, 1. Let _b_ be 0. 1. Let _n_ be 0. - 1. If |ExponentPart| is present, let _e_ be the MV of |ExponentPart|; otherwise let _e_ be 0. + 1. If |ExponentPart| is present, let _e_ be the MV of |ExponentPart|; else let _e_ be 0. 1. Return RoundMVResult((_a_ + (_b_ Γ— 10-_n_)) Γ— 10_e_). StrUnsignedDecimalLiteral ::: `.` DecimalDigits ExponentPart? 1. Let _b_ be the MV of |DecimalDigits|. - 1. If |ExponentPart| is present, let _e_ be the MV of |ExponentPart|; otherwise let _e_ be 0. + 1. If |ExponentPart| is present, let _e_ be the MV of |ExponentPart|; else let _e_ be 0. 1. Let _n_ be the number of code points in |DecimalDigits|. 1. Return RoundMVResult(_b_ Γ— 10_e_ - _n_). StrUnsignedDecimalLiteral ::: DecimalDigits ExponentPart? 1. Let _a_ be the MV of |DecimalDigits|. - 1. If |ExponentPart| is present, let _e_ be the MV of |ExponentPart|; otherwise let _e_ be 0. + 1. If |ExponentPart| is present, let _e_ be the MV of |ExponentPart|; else let _e_ be 0. 1. Return RoundMVResult(_a_ Γ— 10_e_). @@ -5291,7 +5291,7 @@

1. If _number_ is not finite or _number_ is either *+0*𝔽 or *-0*𝔽, return *+0*𝔽. 1. Let _int_ be truncate(ℝ(_number_)). 1. Let _int32bit_ be _int_ modulo 232. - 1. If _int32bit_ β‰₯ 231, return 𝔽(_int32bit_ - 232); otherwise return 𝔽(_int32bit_). + 1. If _int32bit_ β‰₯ 231, return 𝔽(_int32bit_ - 232); else return 𝔽(_int32bit_).

Given the above definition of ToInt32:

@@ -5360,7 +5360,7 @@

1. If _number_ is not finite or _number_ is either *+0*𝔽 or *-0*𝔽, return *+0*𝔽. 1. Let _int_ be truncate(ℝ(_number_)). 1. Let _int16bit_ be _int_ modulo 216. - 1. If _int16bit_ β‰₯ 215, return 𝔽(_int16bit_ - 216); otherwise return 𝔽(_int16bit_). + 1. If _int16bit_ β‰₯ 215, return 𝔽(_int16bit_ - 216); else return 𝔽(_int16bit_). @@ -5409,7 +5409,7 @@

1. If _number_ is not finite or _number_ is either *+0*𝔽 or *-0*𝔽, return *+0*𝔽. 1. Let _int_ be truncate(ℝ(_number_)). 1. Let _int8bit_ be _int_ modulo 28. - 1. If _int8bit_ β‰₯ 27, return 𝔽(_int8bit_ - 28); otherwise return 𝔽(_int8bit_). + 1. If _int8bit_ β‰₯ 27, return 𝔽(_int8bit_ - 28); else return 𝔽(_int8bit_). @@ -5450,7 +5450,7 @@

1. Let _f_ be floor(_clamped_). 1. If _clamped_ < _f_ + 0.5, return 𝔽(_f_). 1. If _clamped_ > _f_ + 0.5, return 𝔽(_f_ + 1). - 1. If _f_ is even, return 𝔽(_f_); otherwise return 𝔽(_f_ + 1). + 1. If _f_ is even, return 𝔽(_f_); else return 𝔽(_f_ + 1).

Unlike most other ECMAScript integer conversion operations, ToUint8Clamp rounds rather than truncates non-integral values. It also uses β€œround half to even” tie-breaking, which differs from the β€œround half up” tie-breaking of `Math.round`.

@@ -5604,7 +5604,7 @@

1. Let _n_ be ? ToBigInt(_argument_). 1. Let _int64bit_ be ℝ(_n_) modulo 264. - 1. If _int64bit_ β‰₯ 263, return β„€(_int64bit_ - 264); otherwise return β„€(_int64bit_). + 1. If _int64bit_ β‰₯ 263, return β„€(_int64bit_ - 264); else return β„€(_int64bit_). @@ -5953,11 +5953,11 @@

1. If _x_ is a BigInt, then 1. Return BigInt::equal(_x_, _y_). 1. If _x_ is a String, then - 1. If _x_ and _y_ have the same length and the same code units in the same positions, return *true*; otherwise return *false*. + 1. If _x_ and _y_ have the same length and the same code units in the same positions, return *true*; else return *false*. 1. If _x_ is a Boolean, then - 1. If _x_ and _y_ are both *true* or both *false*, return *true*; otherwise return *false*. + 1. If _x_ and _y_ are both *true* or both *false*, return *true*; else return *false*. 1. NOTE: All other ECMAScript language values are compared by identity. - 1. If _x_ is _y_, return *true*; otherwise return *false*. + 1. If _x_ is _y_, return *true*; else return *false*. For expository purposes, some cases are handled separately within this algorithm even if it is unnecessary to do so. @@ -5995,7 +5995,7 @@

1. Let _cy_ be the numeric value of the code unit at index _i_ within _py_. 1. If _cx_ < _cy_, return *true*. 1. If _cx_ > _cy_, return *false*. - 1. If _lx_ < _ly_, return *true*; otherwise return *false*. + 1. If _lx_ < _ly_, return *true*; else return *false*. 1. Else, 1. If _px_ is a BigInt and _py_ is a String, then 1. Let _ny_ be StringToBigInt(_py_). @@ -6018,7 +6018,7 @@

1. If _nx_ or _ny_ is *NaN*, return *undefined*. 1. If _nx_ is *-∞*𝔽 or _ny_ is *+∞*𝔽, return *true*. 1. If _nx_ is *+∞*𝔽 or _ny_ is *-∞*𝔽, return *false*. - 1. If ℝ(_nx_) < ℝ(_ny_), return *true*; otherwise return *false*. + 1. If ℝ(_nx_) < ℝ(_ny_), return *true*; else return *false*.

Step differs from step in the algorithm that handles the addition operator `+` () by using the logical-and operation instead of the logical-or operation.

@@ -6060,7 +6060,7 @@

1. If _x_ is an Object and _y_ is either a String, a Number, a BigInt, or a Symbol, return ! IsLooselyEqual(? ToPrimitive(_x_), _y_). 1. If _x_ is a BigInt and _y_ is a Number, or if _x_ is a Number and _y_ is a BigInt, then 1. If _x_ is not finite or _y_ is not finite, return *false*. - 1. If ℝ(_x_) = ℝ(_y_), return *true*; otherwise return *false*. + 1. If ℝ(_x_) = ℝ(_y_), return *true*; else return *false*. 1. Return *false*. @@ -9407,7 +9407,7 @@

1. If _symbol_ is |ClassBody|, return *true*. 1. If _symbol_ is |ClassHeritage|, then - 1. If |ClassHeritage| is present, return *true*; otherwise return *false*. + 1. If |ClassHeritage| is present, return *true*; else return *false*. 1. If |ClassHeritage| is present, then 1. If |ClassHeritage| Contains _symbol_ is *true*, return *true*. 1. Return the result of ComputedPropertyContains of |ClassBody| with argument _symbol_. @@ -10587,7 +10587,7 @@

1. Let _bindingObject_ be _envRec_.[[BindingObject]]. 1. Let _value_ be ? HasProperty(_bindingObject_, _N_). 1. If _value_ is *false*, then - 1. If _S_ is *false*, return *undefined*; otherwise throw a *ReferenceError* exception. + 1. If _S_ is *false*, return *undefined*; else throw a *ReferenceError* exception. 1. Return ? Get(_bindingObject_, _N_). @@ -10647,7 +10647,7 @@

WithBaseObject ( ): an Object or *undefined*

1. If _envRec_.[[IsWithEnvironment]] is *true*, return _envRec_.[[BindingObject]]. - 1. Otherwise, return *undefined*. + 1. Else, return *undefined*. @@ -10768,7 +10768,7 @@

HasThisBinding ( ): a Boolean

a Function Environment Record _envRec_
- 1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*; otherwise return *true*. + 1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*; else return *true*. @@ -10780,7 +10780,7 @@

HasSuperBinding ( ): a Boolean

1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*. - 1. If _envRec_.[[FunctionObject]].[[HomeObject]] is *undefined*, return *false*; otherwise return *true*. + 1. If _envRec_.[[FunctionObject]].[[HomeObject]] is *undefined*, return *false*; else return *true*. @@ -11855,7 +11855,7 @@

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

1. If the execution context stack is empty, return *null*. 1. Let _ec_ be the topmost execution context on the execution context stack whose ScriptOrModule component is not *null*. - 1. If no such execution context exists, return *null*; otherwise return _ec_'s ScriptOrModule. + 1. If no such execution context exists, return *null*; else return _ec_'s ScriptOrModule.
@@ -13723,7 +13723,7 @@

1. Let _strict_ be _func_.[[Strict]]. 1. Let _formals_ be _func_.[[FormalParameters]]. 1. Let _parameterNames_ be the BoundNames of _formals_. - 1. If _parameterNames_ has any duplicate entries, let _hasDuplicates_ be *true*; otherwise let _hasDuplicates_ be *false*. + 1. If _parameterNames_ has any duplicate entries, let _hasDuplicates_ be *true*; else let _hasDuplicates_ be *false*. 1. Let _simpleParameterList_ be IsSimpleParameterList of _formals_. 1. Let _hasParameterExpressions_ be ContainsExpression of _formals_. 1. Let _varNames_ be the VarDeclaredNames of _code_. @@ -13917,7 +13917,7 @@

1. Set the ScriptOrModule of _calleeContext_ to *null*. 1. Perform any necessary implementation-defined initialization of _calleeContext_. 1. Push _calleeContext_ onto the execution context stack; _calleeContext_ is now the running execution context. - 1. [id="step-call-builtin-function-result"] Let _result_ be the Completion Record that is the result of evaluating _F_ in a manner that conforms to the specification of _F_. If _thisArgument_ is ~uninitialized~, the *this* value is uninitialized; otherwise _thisArgument_ provides the *this* value. _argumentsList_ provides the named parameters. _newTarget_ provides the NewTarget value. + 1. [id="step-call-builtin-function-result"] Let _result_ be the Completion Record that is the result of evaluating _F_ in a manner that conforms to the specification of _F_. If _thisArgument_ is ~uninitialized~, the *this* value is uninitialized; else _thisArgument_ provides the *this* value. _argumentsList_ provides the named parameters. _newTarget_ provides the NewTarget value. 1. NOTE: If _F_ is defined in this document, β€œthe specification of _F_” is the behaviour specified for it via algorithm steps or other means. 1. Remove _calleeContext_ from the execution context stack and restore _callerContext_ as the running execution context. 1. Return ? _result_. @@ -15017,7 +15017,7 @@

1. If _O_.[[ContentType]] is ~bigint~, let _numValue_ be ? ToBigInt(_value_). - 1. Otherwise, let _numValue_ be ? ToNumber(_value_). + 1. Else, let _numValue_ be ? ToNumber(_value_). 1. If IsValidIntegerIndex(_O_, _index_) is *true*, then 1. Let _offset_ be _O_.[[ByteOffset]]. 1. Let _elementSize_ be TypedArrayElementSize(_O_). @@ -16228,7 +16228,7 @@

1. If _sourceText_ is a String, set _sourceText_ to StringToCodePoints(_sourceText_). 1. Attempt to parse _sourceText_ using _goalSymbol_ as the goal symbol, and analyse the parse result for any early error conditions. Parsing and early error detection may be interleaved in an implementation-defined manner. 1. If the parse succeeded and no early errors were found, return the Parse Node (an instance of _goalSymbol_) at the root of the parse tree resulting from the parse. - 1. Otherwise, return a List of one or more *SyntaxError* objects representing the parsing errors and/or early errors. If more than one parsing error or early error is present, the number and ordering of error objects in the list is implementation-defined, but at least one must be present. + 1. Else, return a List of one or more *SyntaxError* objects representing the parsing errors and/or early errors. If more than one parsing error or early error is present, the number and ordering of error objects in the list is implementation-defined, but at least one must be present.

Consider a text that has an early error at a particular point, and also a syntax error at a later point. An implementation that does a parse pass followed by an early errors pass might report the syntax error and not proceed to the early errors pass. An implementation that interleaves the two activities might report the early error and not proceed to find the syntax error. A third implementation might report both errors. All of these behaviours are conformant.

@@ -19341,7 +19341,7 @@

Runtime Semantics: Evaluation

1. Let _argList_ be ? ArgumentListEvaluation of _arguments_. 1. If _argList_ has no elements, return *undefined*. 1. Let _evalArg_ be the first element of _argList_. - 1. If IsStrict(this |CallExpression|) is *true*, let _strictCaller_ be *true*; otherwise let _strictCaller_ be *false*. + 1. If IsStrict(this |CallExpression|) is *true*, let _strictCaller_ be *true*; else let _strictCaller_ be *false*. 1. [id="step-callexpression-evaluation-direct-eval"] Return ? PerformEval(_evalArg_, _strictCaller_, *true*). 1. Let _thisCall_ be this |CallExpression|. 1. Let _tailCall_ be IsInTailPosition(_thisCall_). @@ -20328,7 +20328,7 @@

Runtime Semantics: Evaluation

1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). 1. Let _r_ be ? IsLessThan(_lVal_, _rVal_, *true*). - 1. If _r_ is *undefined*, return *false*; otherwise return _r_. + 1. If _r_ is *undefined*, return *false*; else return _r_. RelationalExpression : RelationalExpression `>` ShiftExpression @@ -20337,7 +20337,7 @@

Runtime Semantics: Evaluation

1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). 1. Let _r_ be ? IsLessThan(_rVal_, _lVal_, *false*). - 1. If _r_ is *undefined*, return *false*; otherwise return _r_. + 1. If _r_ is *undefined*, return *false*; else return _r_.
RelationalExpression : RelationalExpression `<=` ShiftExpression @@ -20346,7 +20346,7 @@

Runtime Semantics: Evaluation

1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). 1. Let _r_ be ? IsLessThan(_rVal_, _lVal_, *false*). - 1. If _r_ is either *true* or *undefined*, return *false*; otherwise return *true*. + 1. If _r_ is either *true* or *undefined*, return *false*; else return *true*.
RelationalExpression : RelationalExpression `>=` ShiftExpression @@ -20355,7 +20355,7 @@

Runtime Semantics: Evaluation

1. Let _rRef_ be ? Evaluation of |ShiftExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). 1. Let _r_ be ? IsLessThan(_lVal_, _rVal_, *true*). - 1. If _r_ is either *true* or *undefined*, return *false*; otherwise return *true*. + 1. If _r_ is either *true* or *undefined*, return *false*; else return *true*.
RelationalExpression : RelationalExpression `instanceof` ShiftExpression @@ -20445,7 +20445,7 @@

Runtime Semantics: Evaluation

1. Let _rRef_ be ? Evaluation of |RelationalExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). 1. Let _r_ be ? IsLooselyEqual(_rVal_, _lVal_). - 1. If _r_ is *true*, return *false*; otherwise return *true*. + 1. If _r_ is *true*, return *false*; else return *true*.
EqualityExpression : EqualityExpression `===` RelationalExpression @@ -20462,7 +20462,7 @@

Runtime Semantics: Evaluation

1. Let _rRef_ be ? Evaluation of |RelationalExpression|. 1. Let _rVal_ be ? GetValue(_rRef_). 1. Let _r_ be IsStrictlyEqual(_rVal_, _lVal_). - 1. If _r_ is *true*, return *false*; otherwise return *true*. + 1. If _r_ is *true*, return *false*; else return *true*.

Given the above definition of equality:

@@ -22003,15 +22003,15 @@

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

1. If _forDcl_ is an abrupt completion, then 1. Set the running execution context's LexicalEnvironment to _oldEnv_. 1. Return ? _forDcl_. - 1. If _isConst_ is *false*, let _perIterationLets_ be _boundNames_; otherwise let _perIterationLets_ be a new empty List. - 1. If the first |Expression| is present, let _test_ be the first |Expression|; otherwise let _test_ be ~empty~. - 1. If the second |Expression| is present, let _increment_ be the second |Expression|; otherwise let _increment_ be ~empty~. + 1. If _isConst_ is *false*, let _perIterationLets_ be _boundNames_; else let _perIterationLets_ be a new empty List. + 1. If the first |Expression| is present, let _test_ be the first |Expression|; else let _test_ be ~empty~. + 1. If the second |Expression| is present, let _increment_ be the second |Expression|; else let _increment_ be ~empty~. 1. Let _bodyResult_ be Completion(ForBodyEvaluation(_test_, _increment_, |Statement|, _perIterationLets_, _labelSet_)). 1. Set the running execution context's LexicalEnvironment to _oldEnv_. 1. Return ? _bodyResult_. @@ -23589,7 +23589,7 @@

Static Semantics: FunctionBodyContainsUseStrict ( ): a Boolean

FunctionBody : FunctionStatementList - 1. If the Directive Prologue of |FunctionBody| contains a Use Strict Directive, return *true*; otherwise return *false*. + 1. If the Directive Prologue of |FunctionBody| contains a Use Strict Directive, return *true*; else return *false*. @@ -25990,7 +25990,7 @@

Static Semantics: ScriptIsStrict ( ): a Boolean

Script : ScriptBody? - 1. If |ScriptBody| is present and the Directive Prologue of |ScriptBody| contains a Use Strict Directive, return *true*; otherwise return *false*. + 1. If |ScriptBody| is present and the Directive Prologue of |ScriptBody| contains a Use Strict Directive, return *true*; else return *false*. @@ -27170,7 +27170,7 @@

1. Return _index_. 1. If _module_.[[Status]] is either ~evaluating-async~ or ~evaluated~, then 1. If _module_.[[EvaluationError]] is ~empty~, return _index_. - 1. Otherwise, return ? _module_.[[EvaluationError]]. + 1. Else, return ? _module_.[[EvaluationError]]. 1. If _module_.[[Status]] is ~evaluating~, return _index_. 1. Assert: _module_.[[Status]] is ~linked~. 1. Set _module_.[[Status]] to ~evaluating~. @@ -27210,7 +27210,7 @@

1. Assert: _requiredModule_ is a Cyclic Module Record. 1. Assert: _requiredModule_.[[AsyncEvaluationOrder]] is either an integer or ~unset~. 1. If _requiredModule_.[[AsyncEvaluationOrder]] is ~unset~, set _requiredModule_.[[Status]] to ~evaluated~. - 1. Otherwise, set _requiredModule_.[[Status]] to ~evaluating-async~. + 1. Else, set _requiredModule_.[[Status]] to ~evaluating-async~. 1. If _requiredModule_ and _module_ are the same Module Record, set _done_ to *true*. 1. Set _requiredModule_.[[CycleRoot]] to _module_. 1. Return _index_. @@ -29937,7 +29937,7 @@

isFinite ( _number_ )

1. Let _num_ be ? ToNumber(_number_). 1. If _num_ is not finite, return *false*. - 1. Otherwise, return *true*. + 1. Else, return *true*. @@ -29948,7 +29948,7 @@

isNaN ( _number_ )

1. Let _num_ be ? ToNumber(_number_). 1. If _num_ is *NaN*, return *true*. - 1. Otherwise, return *false*. + 1. Else, return *false*.

A reliable way for ECMAScript code to test if a value `X` is *NaN* is an expression of the form `X !== X`. The result will be *true* if and only if `X` is *NaN*.

@@ -29996,7 +29996,7 @@

parseInt ( _string_, _radix_ )

1. If the length of _S_ β‰₯ 2 and the first two code units of _S_ are either *"0x"* or *"0X"*, then 1. Set _S_ to the substring of _S_ from index 2. 1. Set _R_ to 16. - 1. If _S_ contains a code unit that is not a radix-_R_ digit, let _end_ be the index within _S_ of the first such code unit; otherwise let _end_ be the length of _S_. + 1. If _S_ contains a code unit that is not a radix-_R_ digit, let _end_ be the index within _S_ of the first such code unit; else let _end_ be the length of _S_. 1. Let _Z_ be the substring of _S_ from 0 to _end_. 1. If _Z_ is empty, return *NaN*. 1. Let _mathInt_ be the integer value that is represented by _Z_ in radix-_R_ notation, using the letters A through Z and a through z for digits with values 10 through 35. (However, if _R_ = 10 and _Z_ contains more than 20 significant digits, every significant digit after the 20th may be replaced by a 0 digit, at the option of the implementation; and if _R_ is not one of 2, 4, 8, 10, 16, or 32, then _mathInt_ may be an implementation-approximated integer representing the integer value denoted by _Z_ in radix-_R_ notation.) @@ -30132,7 +30132,7 @@

1. Let _n_ be the number of leading 1 bits in _B_. 1. If _n_ = 0, then 1. Let _asciiChar_ be the code unit whose numeric value is _B_. - 1. If _preserveEscapeSet_ contains _asciiChar_, set _S_ to _escape_; otherwise set _S_ to _asciiChar_. + 1. If _preserveEscapeSet_ contains _asciiChar_, set _S_ to _escape_; else set _S_ to _asciiChar_. 1. Else, 1. If _n_ = 1 or _n_ > 4, throw a *URIError* exception. 1. Let _Octets_ be Β« _B_ Β». @@ -31806,9 +31806,9 @@

Error.prototype.toString ( )

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

Number ( _value_ )

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

Number.isFinite ( _number_ )

1. If _number_ is not a Number, return *false*. 1. If _number_ is not finite, return *false*. - 1. Otherwise, return *true*. + 1. Else, return *true*. @@ -32114,7 +32114,7 @@

Number.isNaN ( _number_ )

1. If _number_ is not a Number, return *false*. 1. If _number_ is *NaN*, return *true*. - 1. Otherwise, return *false*. + 1. Else, return *false*.

This function differs from the global isNaN function () in that it does not convert its argument to a Number before determining whether it is *NaN*.

@@ -32290,7 +32290,7 @@

Number.prototype.toFixed ( _fractionDigits_ )

1. Let _m_ be ! ToString(𝔽(_x_)). 1. Else, 1. Let _n_ be an integer for which _n_ / 10_f_ - _x_ is as close to zero as possible. If there are two such _n_, pick the larger _n_. - 1. If _n_ = 0, let _m_ be *"0"*; otherwise let _m_ be the String value consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes). + 1. If _n_ = 0, let _m_ be *"0"*; else let _m_ be the String value consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes). 1. If _f_ β‰  0, then 1. Let _k_ be the length of _m_. 1. If _k_ ≀ _f_, then @@ -32431,7 +32431,7 @@

BigInt ( _value_ )

1. If NewTarget is not *undefined*, throw a *TypeError* exception. 1. Let _prim_ be ? ToPrimitive(_value_, ~number~). 1. If _prim_ is a Number, return ? NumberToBigInt(_prim_). - 1. Otherwise, return ? ToBigInt(_prim_). + 1. Else, return ? ToBigInt(_prim_). @@ -32465,7 +32465,7 @@

BigInt.asIntN ( _bits_, _bigint_ )

1. Set _bits_ to ? ToIndex(_bits_). 1. Set _bigint_ to ? ToBigInt(_bigint_). 1. Let _mod_ be ℝ(_bigint_) modulo 2_bits_. - 1. If _mod_ β‰₯ 2_bits_ - 1, return β„€(_mod_ - 2_bits_); otherwise return β„€(_mod_). + 1. If _mod_ β‰₯ 2_bits_ - 1, return β„€(_mod_ - 2_bits_); else return β„€(_mod_).
@@ -32954,7 +32954,7 @@

Math.imul ( _x_, _y_ )

1. Let _a_ be ℝ(? ToUint32(_x_)). 1. Let _b_ be ℝ(? ToUint32(_y_)). 1. Let _product_ be (_a_ Γ— _b_) modulo 232. - 1. If _product_ β‰₯ 231, return 𝔽(_product_ - 232); otherwise return 𝔽(_product_). + 1. If _product_ β‰₯ 231, return 𝔽(_product_ - 232); else return 𝔽(_product_). @@ -34566,9 +34566,9 @@

Date.prototype.setFullYear ( _year_ [ , _month_ [ , _date_ ] ] )

1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). 1. Let _t_ be _dateObject_.[[DateValue]]. 1. Let _y_ be ? ToNumber(_year_). - 1. If _t_ is *NaN*, set _t_ to *+0*𝔽; otherwise set _t_ to LocalTime(_t_). - 1. If _month_ is not present, let _m_ be MonthFromTime(_t_); otherwise let _m_ be ? ToNumber(_month_). - 1. If _date_ is not present, let _dt_ be DateFromTime(_t_); otherwise let _dt_ be ? ToNumber(_date_). + 1. If _t_ is *NaN*, set _t_ to *+0*𝔽; else set _t_ to LocalTime(_t_). + 1. If _month_ is not present, let _m_ be MonthFromTime(_t_); else let _m_ be ? ToNumber(_month_). + 1. If _date_ is not present, let _dt_ be DateFromTime(_t_); else let _dt_ be ? ToNumber(_date_). 1. Let _newDate_ be MakeDate(MakeDay(_y_, _m_, _dt_), TimeWithinDay(_t_)). 1. Let _u_ be TimeClip(UTC(_newDate_)). 1. Set _dateObject_.[[DateValue]] to _u_. @@ -34733,8 +34733,8 @@

Date.prototype.setUTCFullYear ( _year_ [ , _month_ [ , _date_ ] ] )

1. Let _t_ be _dateObject_.[[DateValue]]. 1. If _t_ is *NaN*, set _t_ to *+0*𝔽. 1. Let _y_ be ? ToNumber(_year_). - 1. If _month_ is not present, let _m_ be MonthFromTime(_t_); otherwise let _m_ be ? ToNumber(_month_). - 1. If _date_ is not present, let _dt_ be DateFromTime(_t_); otherwise let _dt_ be ? ToNumber(_date_). + 1. If _month_ is not present, let _m_ be MonthFromTime(_t_); else let _m_ be ? ToNumber(_month_). + 1. If _date_ is not present, let _dt_ be DateFromTime(_t_); else let _dt_ be ? ToNumber(_date_). 1. Let _newDate_ be MakeDate(MakeDay(_y_, _m_, _dt_), TimeWithinDay(_t_)). 1. Let _v_ be TimeClip(_newDate_). 1. Set _dateObject_.[[DateValue]] to _v_. @@ -34967,7 +34967,7 @@

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

Date.prototype.toUTCString ( )

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

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

1. Let _searchStr_ be ? ToString(_searchString_). 1. Let _numPos_ be ? ToNumber(_position_). 1. Assert: If _position_ is *undefined*, then _numPos_ is *NaN*. - 1. If _numPos_ is *NaN*, let _pos_ be +∞; otherwise let _pos_ be ! ToIntegerOrInfinity(_numPos_). + 1. If _numPos_ is *NaN*, let _pos_ be +∞; else let _pos_ be ! ToIntegerOrInfinity(_numPos_). 1. Let _len_ be the length of _S_. 1. Let _searchLen_ be the length of _searchStr_. 1. If _len_ < _searchLen_, return *-1*𝔽. @@ -35897,7 +35897,7 @@

1. Let _refReplacement_ be the substring of _str_ from min(_tailPos_, _stringLength_). 1. NOTE: _tailPos_ can exceed _stringLength_ only if this abstract operation was invoked by a call to the intrinsic %Symbol.replace% method of %RegExp.prototype% on an object whose *"exec"* property is not the intrinsic %RegExp.prototype.exec%. 1. Else if _templateRemainder_ starts with *"$"* followed by 1 or more decimal digits, then - 1. If _templateRemainder_ starts with *"$"* followed by 2 or more decimal digits, let _digitCount_ be 2; otherwise let _digitCount_ be 1. + 1. If _templateRemainder_ starts with *"$"* followed by 2 or more decimal digits, let _digitCount_ be 2; else let _digitCount_ be 1. 1. Let _digits_ be the substring of _templateRemainder_ from 1 to 1 + _digitCount_. 1. Let _index_ be ℝ(StringToNumber(_digits_)). 1. Assert: 0 ≀ _index_ ≀ 99. @@ -37492,8 +37492,8 @@

1. Let _d_ be a new MatcherContinuation with parameters (_y_) that captures _m_, _min_, _max_, _greedy_, _x_, _c_, _parenIndex_, and _parenCount_ and performs the following steps when called: 1. Assert: _y_ is a MatchState. 1. [id="step-repeatmatcher-done"] If _min_ = 0 and _y_.[[EndIndex]] = _x_.[[EndIndex]], return ~failure~. - 1. If _min_ = 0, let _min2_ be 0; otherwise let _min2_ be _min_ - 1. - 1. If _max_ = +∞, let _max2_ be +∞; otherwise let _max2_ be _max_ - 1. + 1. If _min_ = 0, let _min2_ be 0; else let _min2_ be _min_ - 1. + 1. If _max_ = +∞, let _max2_ be +∞; else let _max2_ be _max_ - 1. 1. Return RepeatMatcher(_m_, _min2_, _max2_, _greedy_, _y_, _c_, _parenIndex_, _parenCount_). 1. Let _cap_ be a copy of _x_.[[Captures]]. 1. [id="step-repeatmatcher-clear-captures"] For each integer _k_ in the inclusive interval from _parenIndex_ + 1 to _parenIndex_ + _parenCount_, set _cap_[_k_] to *undefined*. @@ -37995,7 +37995,7 @@

1. Let _index_ be min(_e_, _f_). 1. Let _ch_ be the character _Input_[_index_]. 1. Let _cc_ be Canonicalize(_rer_, _ch_). - 1. If there exists a CharSetElement in _A_ containing exactly one character _a_ such that Canonicalize(_rer_, _a_) is _cc_, let _found_ be *true*; otherwise let _found_ be *false*. + 1. If there exists a CharSetElement in _A_ containing exactly one character _a_ such that Canonicalize(_rer_, _a_) is _cc_, let _found_ be *true*; else let _found_ be *false*. 1. If _invert_ is *false* and _found_ is *false*, return ~failure~. 1. If _invert_ is *true* and _found_ is *true*, return ~failure~. 1. Let _cap_ be _x_.[[Captures]]. @@ -38896,7 +38896,7 @@

1. If _R_ is not an Object, throw a *TypeError* exception. 1. If _R_ does not have an [[OriginalFlags]] internal slot, then 1. If SameValue(_R_, %RegExp.prototype%) is *true*, return *undefined*. - 1. Otherwise, throw a *TypeError* exception. + 1. Else, throw a *TypeError* exception. 1. Let _flags_ be _R_.[[OriginalFlags]]. 1. If _flags_ contains _codeUnit_, return *true*. 1. Return *false*. @@ -38945,7 +38945,7 @@

RegExp.prototype [ %Symbol.match% ] ( _string_ )

1. If _flags_ does not contain *"g"*, then 1. Return ? RegExpExec(_rx_, _S_). 1. Else, - 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; otherwise let _fullUnicode_ be *false*. + 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; else let _fullUnicode_ be *false*. 1. Perform ? Set(_rx_, *"lastIndex"*, *+0*𝔽, *true*). 1. Let _A_ be ! ArrayCreate(0). 1. Let _n_ be 0. @@ -39012,7 +39012,7 @@

RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

1. If _functionalReplace_ is *false*, then 1. Set _replaceValue_ to ? ToString(_replaceValue_). 1. Let _flags_ be ? ToString(? Get(_rx_, *"flags"*)). - 1. If _flags_ contains *"g"*, let _global_ be *true*; otherwise let _global_ be *false*. + 1. If _flags_ contains *"g"*, let _global_ be *true*; else let _global_ be *false*. 1. If _global_ is *true*, then 1. Perform ? Set(_rx_, *"lastIndex"*, *+0*𝔽, *true*). 1. Let _results_ be a new empty List. @@ -39029,7 +39029,7 @@

RegExp.prototype [ %Symbol.replace% ] ( _string_, _replaceValue_ )

1. Let _matchStr_ be ? ToString(? Get(_result_, *"0"*)). 1. If _matchStr_ is the empty String, then 1. Let _thisIndex_ be ℝ(? ToLength(? Get(_rx_, *"lastIndex"*))). - 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; otherwise let _fullUnicode_ be *false*. + 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; else let _fullUnicode_ be *false*. 1. Let _nextIndex_ be AdvanceStringIndex(_S_, _thisIndex_, _fullUnicode_). 1. Perform ? Set(_rx_, *"lastIndex"*, 𝔽(_nextIndex_), *true*). 1. Let _accumulatedResult_ be the empty String. @@ -39102,7 +39102,7 @@

get RegExp.prototype.source

1. If _R_ is not an Object, throw a *TypeError* exception. 1. If _R_ does not have an [[OriginalSource]] internal slot, then 1. If SameValue(_R_, %RegExp.prototype%) is *true*, return *"(?:)"*. - 1. Otherwise, throw a *TypeError* exception. + 1. Else, throw a *TypeError* exception. 1. Assert: _R_ has an [[OriginalFlags]] internal slot. 1. Let _src_ be _R_.[[OriginalSource]]. 1. Let _flags_ be _R_.[[OriginalFlags]]. @@ -39312,7 +39312,7 @@

1. Let _matcher_ be _R_.[[RegExpMatcher]]. 1. If _flags_ contains *"u"* or _flags_ contains *"v"*, let _fullUnicode_ be *true*; else let _fullUnicode_ be *false*. 1. Let _matchSucceeded_ be *false*. - 1. If _fullUnicode_ is *true*, let _input_ be StringToCodePoints(_S_); otherwise let _input_ be a List whose elements are the code units that are the elements of _S_. + 1. If _fullUnicode_ is *true*, let _input_ be StringToCodePoints(_S_); else let _input_ be a List whose elements are the code units that are the elements of _S_. 1. NOTE: Each element of _input_ is considered to be a character. 1. Repeat, while _matchSucceeded_ is *false*, 1. If _lastIndex_ > _length_, then @@ -41813,7 +41813,7 @@

%TypedArray%.prototype.fill ( _value_ [ , _start_ [ , _end_ ] ] )

1. Let _taRecord_ be ? ValidateTypedArray(_O_, ~seq-cst~). 1. Let _len_ be TypedArrayLength(_taRecord_). 1. If _O_.[[ContentType]] is ~bigint~, set _value_ to ? ToBigInt(_value_). - 1. Otherwise, set _value_ to ? ToNumber(_value_). + 1. Else, set _value_ to ? ToNumber(_value_). 1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_). 1. If _relativeStart_ = -∞, let _startIndex_ be 0. 1. Else if _relativeStart_ < 0, let _startIndex_ be max(_len_ + _relativeStart_, 0). @@ -42255,7 +42255,7 @@

1. If _targetOffset_ = +∞, throw a *RangeError* exception. 1. If _srcLength_ + _targetOffset_ > _targetLength_, throw a *RangeError* exception. 1. If _target_.[[ContentType]] is not _source_.[[ContentType]], throw a *TypeError* exception. - 1. If IsSharedArrayBuffer(_srcBuffer_) is *true*, IsSharedArrayBuffer(_targetBuffer_) is *true*, and _srcBuffer_.[[ArrayBufferData]] is _targetBuffer_.[[ArrayBufferData]], let _sameSharedArrayBuffer_ be *true*; otherwise let _sameSharedArrayBuffer_ be *false*. + 1. If IsSharedArrayBuffer(_srcBuffer_) is *true*, IsSharedArrayBuffer(_targetBuffer_) is *true*, and _srcBuffer_.[[ArrayBufferData]] is _targetBuffer_.[[ArrayBufferData]], let _sameSharedArrayBuffer_ be *true*; else let _sameSharedArrayBuffer_ be *false*. 1. If SameValue(_srcBuffer_, _targetBuffer_) is *true* or _sameSharedArrayBuffer_ is *true*, then 1. Let _srcByteLength_ be TypedArrayByteLength(_srcRecord_). 1. Set _srcBuffer_ to ? CloneArrayBuffer(_srcBuffer_, _srcByteOffset_, _srcByteLength_). @@ -42732,7 +42732,7 @@

1. Assert: _obj_.[[ViewedArrayBuffer]] is *undefined*. 1. Set _obj_.[[TypedArrayName]] to _constructorName_. 1. If _constructorName_ is either *"BigInt64Array"* or *"BigUint64Array"*, set _obj_.[[ContentType]] to ~bigint~. - 1. Otherwise, set _obj_.[[ContentType]] to ~number~. + 1. Else, set _obj_.[[ContentType]] to ~number~. 1. If _length_ is not present, then 1. Set _obj_.[[ByteLength]] to 0. 1. Set _obj_.[[ByteOffset]] to 0. @@ -43270,7 +43270,7 @@

1. If _index_ < _length_, then 1. Let _error_ be a newly created *SyntaxError* object. 1. Return the Record { [[Read]]: _read_, [[Bytes]]: _bytes_, [[Error]]: _error_ }. - 1. If _lastChunkHandling_ is *"strict"*, let _throwOnExtraBits_ be *true*; otherwise let _throwOnExtraBits_ be *false*. + 1. If _lastChunkHandling_ is *"strict"*, let _throwOnExtraBits_ be *true*; else let _throwOnExtraBits_ be *false*. 1. Let _decodeResult_ be Completion(DecodeFinalBase64Chunk(_chunk_, _throwOnExtraBits_)). 1. If _decodeResult_ is an abrupt completion, then 1. Let _error_ be _decodeResult_.[[Value]]. @@ -44200,7 +44200,7 @@

Set.prototype.symmetricDifference ( _other_ )

1. If _next_ is not ~done~, then 1. Set _next_ to CanonicalizeKeyedCollectionKey(_next_). 1. Let _resultIndex_ be SetDataIndex(_resultSetData_, _next_). - 1. If _resultIndex_ is ~not-found~, let _alreadyInResult_ be *false*; otherwise let _alreadyInResult_ be *true*. + 1. If _resultIndex_ is ~not-found~, let _alreadyInResult_ be *false*; else let _alreadyInResult_ be *true*. 1. If SetDataHas(_O_.[[SetData]], _next_) is *true*, then 1. If _alreadyInResult_ is *true*, set _resultSetData_[_resultIndex_] to ~empty~. 1. Else, @@ -44664,7 +44664,7 @@

1. Let _slots_ be Β« [[ArrayBufferData]], [[ArrayBufferByteLength]], [[ArrayBufferDetachKey]] Β». - 1. If _maxByteLength_ is present and _maxByteLength_ is not ~empty~, let _allocatingResizableBuffer_ be *true*; otherwise let _allocatingResizableBuffer_ be *false*. + 1. If _maxByteLength_ is present and _maxByteLength_ is not ~empty~, let _allocatingResizableBuffer_ be *true*; else let _allocatingResizableBuffer_ be *false*. 1. If _allocatingResizableBuffer_ is *true*, then 1. If _byteLength_ > _maxByteLength_, throw a *RangeError* exception. 1. Append [[ArrayBufferMaxByteLength]] to _slots_. @@ -44940,7 +44940,7 @@

1. Else, 1. Let _intValue_ be the byte elements of _rawBytes_ concatenated and interpreted as a bit string encoding of a binary little-endian two's complement number of bit length _elementSize_ Γ— 8. 1. If IsBigIntElementType(_type_) is *true*, return the BigInt value that corresponds to _intValue_. - 1. Otherwise, return the Number value that corresponds to _intValue_. + 1. Else, return the Number value that corresponds to _intValue_. @@ -44961,7 +44961,7 @@

1. Let _AR_ be the Agent Record of the surrounding agent. 1. Let _execution_ be _AR_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). - 1. If _isTypedArray_ is *true* and IsNoTearConfiguration(_type_, _order_) is *true*, let _noTear_ be *true*; otherwise let _noTear_ be *false*. + 1. If _isTypedArray_ is *true* and IsNoTearConfiguration(_type_, _order_) is *true*, let _noTear_ be *true*; else let _noTear_ be *false*. 1. Let _rawValue_ be a List of length _elementSize_ whose elements are nondeterministically chosen byte values. 1. NOTE: In implementations, _rawValue_ is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. 1. Let _readEvent_ be ReadSharedMemory { [[Order]]: _order_, [[NoTear]]: _noTear_, [[Block]]: _block_, [[ByteIndex]]: _byteIndex_, [[ElementSize]]: _elementSize_ }. @@ -45049,7 +45049,7 @@

1. Assert: IsDetachedBuffer(_arrayBuffer_) is *false*. 1. Assert: There are sufficient bytes in _arrayBuffer_ starting at _byteIndex_ to represent a value of _type_. - 1. Assert: _value_ is a BigInt if IsBigIntElementType(_type_) is *true*; otherwise, _value_ is a Number. + 1. Assert: _value_ is a BigInt if IsBigIntElementType(_type_) is *true*; else, _value_ is a Number. 1. Let _block_ be _arrayBuffer_.[[ArrayBufferData]]. 1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. 1. Let _AR_ be the Agent Record of the surrounding agent. @@ -45059,7 +45059,7 @@

1. If IsSharedArrayBuffer(_arrayBuffer_) is *true*, then 1. Let _execution_ be _AR_.[[CandidateExecution]]. 1. Let _eventsRecord_ be the Agent Events Record of _execution_.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). - 1. If _isTypedArray_ is *true* and IsNoTearConfiguration(_type_, _order_) is *true*, let _noTear_ be *true*; otherwise let _noTear_ be *false*. + 1. If _isTypedArray_ is *true* and IsNoTearConfiguration(_type_, _order_) is *true*, let _noTear_ be *true*; else let _noTear_ be *false*. 1. Append WriteSharedMemory { [[Order]]: _order_, [[NoTear]]: _noTear_, [[Block]]: _block_, [[ByteIndex]]: _byteIndex_, [[ElementSize]]: _elementSize_, [[Payload]]: _rawBytes_ } to _eventsRecord_.[[EventList]]. 1. Else, 1. Store the individual bytes of _rawBytes_ into _block_, starting at _block_[_byteIndex_]. @@ -45082,7 +45082,7 @@

1. Assert: IsDetachedBuffer(_arrayBuffer_) is *false*. 1. Assert: There are sufficient bytes in _arrayBuffer_ starting at _byteIndex_ to represent a value of _type_. - 1. Assert: _value_ is a BigInt if IsBigIntElementType(_type_) is *true*; otherwise, _value_ is a Number. + 1. Assert: _value_ is a BigInt if IsBigIntElementType(_type_) is *true*; else, _value_ is a Number. 1. Let _block_ be _arrayBuffer_.[[ArrayBufferData]]. 1. Let _elementSize_ be the Element Size value specified in for Element Type _type_. 1. Let _AR_ be the Agent Record of the surrounding agent. @@ -45227,7 +45227,7 @@

get ArrayBuffer.prototype.resizable

1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. If IsFixedLengthArrayBuffer(_O_) is *false*, return *true*; otherwise return *false*. + 1. If IsFixedLengthArrayBuffer(_O_) is *false*, return *true*; else return *false*.
@@ -45368,14 +45368,14 @@

1. Let _slots_ be Β« [[ArrayBufferData]] Β». - 1. If _maxByteLength_ is present and _maxByteLength_ is not ~empty~, let _allocatingGrowableBuffer_ be *true*; otherwise let _allocatingGrowableBuffer_ be *false*. + 1. If _maxByteLength_ is present and _maxByteLength_ is not ~empty~, let _allocatingGrowableBuffer_ be *true*; else let _allocatingGrowableBuffer_ be *false*. 1. If _allocatingGrowableBuffer_ is *true*, then 1. If _byteLength_ > _maxByteLength_, throw a *RangeError* exception. 1. Append [[ArrayBufferByteLengthData]] and [[ArrayBufferMaxByteLength]] to _slots_. 1. Else, 1. Append [[ArrayBufferByteLength]] to _slots_. 1. Let _obj_ be ? OrdinaryCreateFromConstructor(_constructor_, *"%SharedArrayBuffer.prototype%"*, _slots_). - 1. If _allocatingGrowableBuffer_ is *true*, let _allocLength_ be _maxByteLength_; otherwise let _allocLength_ be _byteLength_. + 1. If _allocatingGrowableBuffer_ is *true*, let _allocLength_ be _maxByteLength_; else let _allocLength_ be _byteLength_. 1. Let _block_ be ? CreateSharedByteDataBlock(_allocLength_). 1. Set _obj_.[[ArrayBufferData]] to _block_. 1. If _allocatingGrowableBuffer_ is *true*, then @@ -45568,7 +45568,7 @@

get SharedArrayBuffer.prototype.growable

1. Let _O_ be the *this* value. 1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferData]]). 1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception. - 1. If IsFixedLengthArrayBuffer(_O_) is *false*, return *true*; otherwise return *false*. + 1. If IsFixedLengthArrayBuffer(_O_) is *false*, return *true*; else return *false*.
@@ -45819,7 +45819,7 @@

1. Assert: _view_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _getIndex_ be ? ToIndex(_requestIndex_). 1. If IsBigIntElementType(_type_) is *true*, let _numberValue_ be ? ToBigInt(_value_). - 1. Otherwise, let _numberValue_ be ? ToNumber(_value_). + 1. Else, let _numberValue_ be ? ToNumber(_value_). 1. Set _isLittleEndian_ to ToBoolean(_isLittleEndian_). 1. Let _viewOffset_ be _view_.[[ByteOffset]]. 1. Let _viewRecord_ be MakeDataViewWithBufferWitnessRecord(_view_, ~unordered~). @@ -46714,7 +46714,7 @@

1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). 1. If _typedArray_.[[ContentType]] is ~bigint~, let _v_ be ? ToBigInt(_value_). - 1. Otherwise, let _v_ be 𝔽(? ToIntegerOrInfinity(_value_)). + 1. Else, let _v_ be 𝔽(? ToIntegerOrInfinity(_value_)). 1. Perform ? RevalidateAtomicAccess(_typedArray_, _byteIndexInBuffer_). 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. 1. Let _elementType_ be TypedArrayElementType(_typedArray_). @@ -46893,7 +46893,7 @@

Atomics.store ( _typedArray_, _index_, _value_ )

1. Let _byteIndexInBuffer_ be ? ValidateAtomicAccessOnIntegerTypedArray(_typedArray_, _index_). 1. If _typedArray_.[[ContentType]] is ~bigint~, let _v_ be ? ToBigInt(_value_). - 1. Otherwise, let _v_ be 𝔽(? ToIntegerOrInfinity(_value_)). + 1. Else, let _v_ be 𝔽(? ToIntegerOrInfinity(_value_)). 1. Perform ? RevalidateAtomicAccess(_typedArray_, _byteIndexInBuffer_). 1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]]. 1. Let _elementType_ be TypedArrayElementType(_typedArray_). @@ -47126,9 +47126,9 @@

JSON.stringify ( _value_ [ , _replacer_ [ , _space_ ] ] )

1. If _space_ is a Number, then 1. Let _spaceMV_ be ! ToIntegerOrInfinity(_space_). 1. Set _spaceMV_ to min(10, _spaceMV_). - 1. If _spaceMV_ < 1, let _gap_ be the empty String; otherwise let _gap_ be the String value containing _spaceMV_ occurrences of the code unit 0x0020 (SPACE). + 1. If _spaceMV_ < 1, let _gap_ be the empty String; else let _gap_ be the String value containing _spaceMV_ occurrences of the code unit 0x0020 (SPACE). 1. Else if _space_ is a String, then - 1. If the length of _space_ ≀ 10, let _gap_ be _space_; otherwise let _gap_ be the substring of _space_ from 0 to 10. + 1. If the length of _space_ ≀ 10, let _gap_ be _space_; else let _gap_ be the substring of _space_ from 0 to 10. 1. Else, 1. Let _gap_ be the empty String. 1. Let _wrapper_ be OrdinaryObjectCreate(%Object.prototype%). @@ -50346,7 +50346,7 @@

1. Let _generatorKind_ be GetGeneratorKind(). 1. If _generatorKind_ is ~async~, return ? AsyncGeneratorYield(? Await(_value_)). - 1. Otherwise, return ? GeneratorYield(CreateIteratorResultObject(_value_, *false*)). + 1. Else, return ? GeneratorYield(CreateIteratorResultObject(_value_, *false*)). @@ -52780,7 +52780,7 @@

String.prototype.substr ( _start_, _length_ )

1. If _intStart_ = -∞, set _intStart_ to 0. 1. Else if _intStart_ < 0, set _intStart_ to max(_size_ + _intStart_, 0). 1. Else, set _intStart_ to min(_intStart_, _size_). - 1. If _length_ is *undefined*, let _intLength_ be _size_; otherwise let _intLength_ be ? ToIntegerOrInfinity(_length_). + 1. If _length_ is *undefined*, let _intLength_ be _size_; else let _intLength_ be ? ToIntegerOrInfinity(_length_). 1. Set _intLength_ to the result of clamping _intLength_ between 0 and _size_. 1. Let _intEnd_ be min(_intStart_ + _intLength_, _size_). 1. Return the substring of _S_ from _intStart_ to _intEnd_. @@ -52986,7 +52986,7 @@

Date.prototype.setYear ( _year_ )

1. Perform ? RequireInternalSlot(_dateObject_, [[DateValue]]). 1. Let _t_ be _dateObject_.[[DateValue]]. 1. Let _y_ be ? ToNumber(_year_). - 1. If _t_ is *NaN*, set _t_ to *+0*𝔽; otherwise set _t_ to LocalTime(_t_). + 1. If _t_ is *NaN*, set _t_ to *+0*𝔽; else set _t_ to LocalTime(_t_). 1. Let _yyyy_ be MakeFullYear(_y_). 1. Let _d_ be MakeDay(_yyyy_, MonthFromTime(_t_), DateFromTime(_t_)). 1. Let _date_ be MakeDate(_d_, TimeWithinDay(_t_)).