Skip to content

Commit

Permalink
Construct references using record literals
Browse files Browse the repository at this point in the history
  • Loading branch information
shvaikalesh committed Jul 8, 2020
1 parent ac0d4cf commit 7ec7034
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -7235,10 +7235,10 @@ <h1>GetIdentifierReference ( _env_, _name_, _strict_ )</h1>
<p>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:</p>
<emu-alg>
1. If _env_ is the value *null*, then
1. Return a value of type Reference whose base value component is *undefined*, whose referenced name component is _name_, and whose strict reference flag is _strict_.
1. Return Reference { [[ReferencedName]]: _name_, [[Strict]]: _strict_ }.
1. Let _exists_ be ? _env_.HasBinding(_name_).
1. If _exists_ is *true*, then
1. Return a value of type Reference whose base value component is _env_, whose referenced name component is _name_, and whose strict reference flag is _strict_.
1. Return Reference { [[Base]]: _env_, [[ReferencedName]]: _name_, [[Strict]]: _strict_ }.
1. Else,
1. Let _outer_ be _env_.[[OuterEnv]].
1. Return ? GetIdentifierReference(_outer_, _name_, _strict_).
Expand Down Expand Up @@ -13686,7 +13686,7 @@ <h1>Runtime Semantics: EvaluatePropertyAccessWithExpressionKey ( _baseValue_, _e
1. Let _propertyNameValue_ be ? GetValue(_propertyNameReference_).
1. Let _bv_ be ? RequireObjectCoercible(_baseValue_).
1. Let _propertyKey_ be ? ToPropertyKey(_propertyNameValue_).
1. Return a value of type Reference whose base value component is _bv_, whose referenced name component is _propertyKey_, and whose strict reference flag is _strict_.
1. Return Reference { [[Base]]: _bv_, [[ReferencedName]]: _propertyKey_, [[Strict]]: _strict_ }.
</emu-alg>
</emu-clause>
<emu-clause id="sec-evaluate-property-access-with-identifier-key" aoid="EvaluatePropertyAccessWithIdentifierKey" oldids="sec-evaluate-identifier-key-property-access">
Expand All @@ -13696,7 +13696,7 @@ <h1>Runtime Semantics: EvaluatePropertyAccessWithIdentifierKey ( _baseValue_, _i
1. Assert: _identifierName_ is an |IdentifierName|.
1. Let _bv_ be ? RequireObjectCoercible(_baseValue_).
1. Let _propertyNameString_ be StringValue of _identifierName_.
1. Return a value of type Reference whose base value component is _bv_, whose referenced name component is _propertyNameString_, and whose strict reference flag is _strict_.
1. Return Reference { [[Base]]: _bv_, [[ReferencedName]]: _propertyNameString_, [[Strict]]: _strict_ }.
</emu-alg>
</emu-clause>

Expand Down Expand Up @@ -13849,7 +13849,8 @@ <h1>Runtime Semantics: MakeSuperPropertyReference ( _actualThis_, _propertyKey_,
1. Assert: _env_.HasSuperBinding() is *true*.
1. Let _baseValue_ be ? _env_.GetSuperBase().
1. Let _bv_ be ? RequireObjectCoercible(_baseValue_).
1. Return a value of type Reference that is a Super Reference whose base value component is _bv_, whose referenced name component is _propertyKey_, whose thisValue component is _actualThis_, and whose strict reference flag is _strict_.
1. Return Reference { [[Base]]: _bv_, [[ReferencedName]]: _propertyKey_, [[Strict]]: _strict_, [[ThisValue]]: _actualThis_ }.
1. NOTE: This returns a Super Reference.
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down

0 comments on commit 7ec7034

Please sign in to comment.