Skip to content

Commit

Permalink
Editorial: Make IsLessThan's _LeftFirst_ param required (#2378)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdyck authored and ljharb committed Jun 12, 2021
1 parent 19d7ca4 commit c7d208f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Expand Up @@ -5241,8 +5241,8 @@ <h1>SameValueNonNumeric ( _x_, _y_ )</h1>
</emu-clause>

<emu-clause id="sec-islessthan" aoid="IsLessThan" oldids="sec-abstract-relational-comparison">
<h1>IsLessThan ( _x_, _y_ [ , _LeftFirst_ ] )</h1>
<p>The abstract operation IsLessThan takes arguments _x_ (an ECMAScript language value) and _y_ (an ECMAScript language value), and optional argument _LeftFirst_ (a Boolean). It provides the semantics for the comparison _x_ &lt; _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. The default value of _LeftFirst_ is *true* and indicates that 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:</p>
<h1>IsLessThan ( _x_, _y_, _LeftFirst_ )</h1>
<p>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_ &lt; _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:</p>
<emu-alg>
1. If the _LeftFirst_ flag is *true*, then
1. Let _px_ be ? ToPrimitive(_x_, ~number~).
Expand Down Expand Up @@ -17184,7 +17184,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _lval_ be ? GetValue(_lref_).
1. Let _rref_ be the result of evaluating |ShiftExpression|.
1. Let _rval_ be ? GetValue(_rref_).
1. Let _r_ be ? IsLessThan(_lval_, _rval_).
1. Let _r_ be ? IsLessThan(_lval_, _rval_, *true*).
1. If _r_ is *undefined*, return *false*. Otherwise, return _r_.
</emu-alg>
<emu-grammar>RelationalExpression : RelationalExpression `&gt;` ShiftExpression</emu-grammar>
Expand All @@ -17211,7 +17211,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Let _lval_ be ? GetValue(_lref_).
1. Let _rref_ be the result of evaluating |ShiftExpression|.
1. Let _rval_ be ? GetValue(_rref_).
1. Let _r_ be ? IsLessThan(_lval_, _rval_).
1. Let _r_ be ? IsLessThan(_lval_, _rval_, *true*).
1. If _r_ is *true* or *undefined*, return *false*. Otherwise, return *true*.
</emu-alg>
<emu-grammar>RelationalExpression : RelationalExpression `instanceof` ShiftExpression</emu-grammar>
Expand Down Expand Up @@ -33424,9 +33424,9 @@ <h1>SortCompare ( _x_, _y_ )</h1>
1. Return _v_.
1. [id="step-sortcompare-tostring-x"] Let _xString_ be ? ToString(_x_).
1. [id="step-sortcompare-tostring-y"] Let _yString_ be ? ToString(_y_).
1. Let _xSmaller_ be IsLessThan(_xString_, _yString_).
1. Let _xSmaller_ be IsLessThan(_xString_, _yString_, *true*).
1. If _xSmaller_ is *true*, return *-1*<sub>𝔽</sub>.
1. Let _ySmaller_ be IsLessThan(_yString_, _xString_).
1. Let _ySmaller_ be IsLessThan(_yString_, _xString_, *true*).
1. If _ySmaller_ is *true*, return *1*<sub>𝔽</sub>.
1. Return *+0*<sub>𝔽</sub>.
</emu-alg>
Expand Down

0 comments on commit c7d208f

Please sign in to comment.