diff --git a/spec.html b/spec.html index 54206bf86b..61eea4120f 100644 --- a/spec.html +++ b/spec.html @@ -14547,11 +14547,7 @@

Runtime Semantics: Evaluation

ExponentiationExpression : UpdateExpression `**` ExponentiationExpression - 1. Let _left_ be the result of evaluating |UpdateExpression|. - 1. Let _leftValue_ be ? GetValue(_left_). - 1. Let _right_ be the result of evaluating |ExponentiationExpression|. - 1. Let _rightValue_ be ? GetValue(_right_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_leftValue_, `**`, _rightValue_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|UpdateExpression|, `**`, |ExponentiationExpression|). @@ -14590,12 +14586,8 @@

Static Semantics: AssignmentTargetType

Runtime Semantics: Evaluation

MultiplicativeExpression : MultiplicativeExpression MultiplicativeOperator ExponentiationExpression - 1. Let _left_ be the result of evaluating |MultiplicativeExpression|. - 1. Let _leftValue_ be ? GetValue(_left_). - 1. Let _right_ be the result of evaluating |ExponentiationExpression|. - 1. Let _rightValue_ be ? GetValue(_right_). 1. Let _opText_ be the source text matched by |MultiplicativeOperator|. - 1. Return ? ApplyStringOrNumericBinaryOperator(_leftValue_, _opText_, _rightValue_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|MultiplicativeExpression|, _opText_, |ExponentiationExpression|). @@ -14646,11 +14638,7 @@

The Addition Operator ( `+` )

Runtime Semantics: Evaluation

AdditiveExpression : AdditiveExpression `+` MultiplicativeExpression - 1. Let _lref_ be the result of evaluating |AdditiveExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |MultiplicativeExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `+`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|AdditiveExpression|, `+`, |MultiplicativeExpression|). @@ -14662,11 +14650,7 @@

The Subtraction Operator ( `-` )

Runtime Semantics: Evaluation

AdditiveExpression : AdditiveExpression `-` MultiplicativeExpression - 1. Let _lref_ be the result of evaluating |AdditiveExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |MultiplicativeExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `-`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|AdditiveExpression|, `-`, |MultiplicativeExpression|). @@ -14721,11 +14705,7 @@

The Left Shift Operator ( `<<` )

Runtime Semantics: Evaluation

ShiftExpression : ShiftExpression `<<` AdditiveExpression - 1. Let _lref_ be the result of evaluating |ShiftExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |AdditiveExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `<<`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|ShiftExpression|, `<<`, |AdditiveExpression|). @@ -14740,11 +14720,7 @@

The Signed Right Shift Operator ( `>>` )

Runtime Semantics: Evaluation

ShiftExpression : ShiftExpression `>>` AdditiveExpression - 1. Let _lref_ be the result of evaluating |ShiftExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |AdditiveExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `>>`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|ShiftExpression|, `>>`, |AdditiveExpression|). @@ -14759,11 +14735,7 @@

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

Runtime Semantics: Evaluation

ShiftExpression : ShiftExpression `>>>` AdditiveExpression - 1. Let _lref_ be the result of evaluating |ShiftExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |AdditiveExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `>>>`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|ShiftExpression|, `>>>`, |AdditiveExpression|). @@ -15077,27 +15049,15 @@

Static Semantics: AssignmentTargetType

Runtime Semantics: Evaluation

BitwiseANDExpression : BitwiseANDExpression `&` EqualityExpression - 1. Let _lref_ be the result of evaluating |BitwiseANDExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |EqualityExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `&`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|BitwiseANDExpression|, `&`, |EqualityExpression|). BitwiseXORExpression : BitwiseXORExpression `^` BitwiseANDExpression - 1. Let _lref_ be the result of evaluating |BitwiseXORExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |BitwiseANDExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `^`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|BitwiseXORExpression|, `^`, |BitwiseANDExpression|). BitwiseORExpression : BitwiseORExpression `|` BitwiseXORExpression - 1. Let _lref_ be the result of evaluating |BitwiseORExpression|. - 1. Let _lval_ be ? GetValue(_lref_). - 1. Let _rref_ be the result of evaluating |BitwiseXORExpression|. - 1. Let _rval_ be ? GetValue(_rref_). - 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, `|`, _rval_). + 1. Return ? EvaluateStringOrNumericBinaryExpression(|BitwiseORExpression|, `|`, |BitwiseXORExpression|). @@ -15421,6 +15381,18 @@

Runtime Semantics: ApplyStringOrNumericBinaryOperator ( _lval_, _opText_, _r + +

Runtime Semantics: EvaluateStringOrNumericBinaryExpression ( _leftOperand_, _opText_, _rightOperand_ )

+

The abstract operation EvaluateStringOrNumericBinaryExpression takes arguments _leftOperand_ (a Parse Node), _opText_ (a sequence of Unicode code points), and _rightOperand_ (a Parse Node). It performs the following steps when called:

+ + 1. Let _lref_ be the result of evaluating _leftOperand_. + 1. Let _lval_ be ? GetValue(_lref_). + 1. Let _rref_ be the result of evaluating _rightOperand_. + 1. Let _rval_ be ? GetValue(_rref_). + 1. Return ? ApplyStringOrNumericBinaryOperator(_lval_, _opText_, _rval_). + +
+

Destructuring Assignment

Supplemental Syntax