From 72fd4932da7c416a1aac127ae7fe4988d9bfdcdf Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Thu, 26 Oct 2023 22:40:28 -0400 Subject: [PATCH] Simplify If-steps --- spec.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/spec.html b/spec.html index 9b1f767e097..333046f969a 100644 --- a/spec.html +++ b/spec.html @@ -11771,7 +11771,7 @@

1. If _env_ is not present or _env_ is *undefined*, then 1. Set _env_ to the running execution context's LexicalEnvironment. 1. Assert: _env_ is an Environment Record. - 1. If IsStrict(the syntactic production that is being evaluated) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(the syntactic production that is being evaluated). 1. Return ? GetIdentifierReference(_env_, _name_, _strict_). @@ -13407,7 +13407,7 @@

1. Set _F_.[[SourceText]] to _sourceText_. 1. Set _F_.[[FormalParameters]] to _ParameterList_. 1. Set _F_.[[ECMAScriptCode]] to _Body_. - 1. If IsStrict(_Body_) is *true*, let _Strict_ be *true*; else let _Strict_ be *false*. + 1. Let _Strict_ be IsStrict(_Body_). 1. Set _F_.[[Strict]] to _Strict_. 1. If _thisMode_ is ~lexical-this~, set _F_.[[ThisMode]] to ~lexical~. 1. Else if _Strict_ is *true*, set _F_.[[ThisMode]] to ~strict~. @@ -19102,14 +19102,14 @@

Runtime Semantics: Evaluation

1. Let _baseReference_ be ? Evaluation of |MemberExpression|. 1. Let _baseValue_ be ? GetValue(_baseReference_). - 1. If IsStrict(this |MemberExpression|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |MemberExpression|). 1. Return ? EvaluatePropertyAccessWithExpressionKey(_baseValue_, |Expression|, _strict_). MemberExpression : MemberExpression `.` IdentifierName 1. Let _baseReference_ be ? Evaluation of |MemberExpression|. 1. Let _baseValue_ be ? GetValue(_baseReference_). - 1. If IsStrict(this |MemberExpression|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |MemberExpression|). 1. Return EvaluatePropertyAccessWithIdentifierKey(_baseValue_, |IdentifierName|, _strict_). MemberExpression : MemberExpression `.` PrivateIdentifier @@ -19123,14 +19123,14 @@

Runtime Semantics: Evaluation

1. Let _baseReference_ be ? Evaluation of |CallExpression|. 1. Let _baseValue_ be ? GetValue(_baseReference_). - 1. If IsStrict(this |CallExpression|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |CallExpression|). 1. Return ? EvaluatePropertyAccessWithExpressionKey(_baseValue_, |Expression|, _strict_). CallExpression : CallExpression `.` IdentifierName 1. Let _baseReference_ be ? Evaluation of |CallExpression|. 1. Let _baseValue_ be ? GetValue(_baseReference_). - 1. If IsStrict(this |CallExpression|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |CallExpression|). 1. Return EvaluatePropertyAccessWithIdentifierKey(_baseValue_, |IdentifierName|, _strict_). CallExpression : CallExpression `.` PrivateIdentifier @@ -19290,7 +19290,7 @@

Runtime Semantics: Evaluation

1. Let _propertyNameReference_ be ? Evaluation of |Expression|. 1. Let _propertyNameValue_ be ? GetValue(_propertyNameReference_). 1. Let _propertyKey_ be ? ToPropertyKey(_propertyNameValue_). - 1. If IsStrict(this |SuperProperty|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |SuperProperty|). 1. Return ? MakeSuperPropertyReference(_actualThis_, _propertyKey_, _strict_). SuperProperty : `super` `.` IdentifierName @@ -19298,7 +19298,7 @@

Runtime Semantics: Evaluation

1. Let _env_ be GetThisEnvironment(). 1. Let _actualThis_ be ? _env_.GetThisBinding(). 1. Let _propertyKey_ be StringValue of |IdentifierName|. - 1. If IsStrict(this |SuperProperty|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |SuperProperty|). 1. Return ? MakeSuperPropertyReference(_actualThis_, _propertyKey_, _strict_). SuperCall : `super` Arguments @@ -19483,12 +19483,12 @@

OptionalChain : `?.` `[` Expression `]` - 1. If IsStrict(this |OptionalChain|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |OptionalChain|). 1. Return ? EvaluatePropertyAccessWithExpressionKey(_baseValue_, |Expression|, _strict_). OptionalChain : `?.` IdentifierName - 1. If IsStrict(this |OptionalChain|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |OptionalChain|). 1. Return EvaluatePropertyAccessWithIdentifierKey(_baseValue_, |IdentifierName|, _strict_). OptionalChain : `?.` PrivateIdentifier @@ -19510,7 +19510,7 @@

1. Let _optionalChain_ be |OptionalChain|. 1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_. 1. Let _newValue_ be ? GetValue(_newReference_). - 1. If IsStrict(this |OptionalChain|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |OptionalChain|). 1. Return ? EvaluatePropertyAccessWithExpressionKey(_newValue_, |Expression|, _strict_). OptionalChain : OptionalChain `.` IdentifierName @@ -19518,7 +19518,7 @@

1. Let _optionalChain_ be |OptionalChain|. 1. Let _newReference_ be ? ChainEvaluation of _optionalChain_ with arguments _baseValue_ and _baseReference_. 1. Let _newValue_ be ? GetValue(_newReference_). - 1. If IsStrict(this |OptionalChain|) is *true*, let _strict_ be *true*; else let _strict_ be *false*. + 1. Let _strict_ be IsStrict(this |OptionalChain|). 1. Return EvaluatePropertyAccessWithIdentifierKey(_newValue_, |IdentifierName|, _strict_). OptionalChain : OptionalChain `.` PrivateIdentifier