Skip to content

Commit

Permalink
Get [[Base]] after IsUnresolvableReference branch
Browse files Browse the repository at this point in the history
  • Loading branch information
shvaikalesh committed Aug 15, 2020
1 parent b488801 commit 3a705d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4395,12 +4395,12 @@ <h1>PutValue ( _V_, _W_ )</h1>
1. ReturnIfAbrupt(_V_).
1. ReturnIfAbrupt(_W_).
1. If Type(_V_) is not Reference, throw a *ReferenceError* exception.
1. Let _base_ be _V_.[[Base]].
1. If IsUnresolvableReference(_V_) is *true*, then
1. If _V_.[[Strict]] is *true*, throw a *ReferenceError* exception.
1. Let _globalObj_ be GetGlobalObject().
1. Return ? Set(_globalObj_, _V_.[[ReferencedName]], _W_, *false*).
1. Else if IsPropertyReference(_V_) is *true*, then
1. Let _base_ be _V_.[[Base]].
1. If IsPropertyReference(_V_) is *true*, then
1. If HasPrimitiveBase(_V_) is *true*, then
1. Assert: In this case, _base_ will never be *undefined* or *null*.
1. [id="step-putvalue-toobject"] Set _base_ to ! ToObject(_base_).
Expand Down Expand Up @@ -14731,16 +14731,16 @@ <h1>Runtime Semantics: Evaluation</h1>
1. If IsUnresolvableReference(_ref_) is *true*, then
1. Assert: _ref_.[[Strict]] is *false*.
1. Return *true*.
1. Let _base_ be _ref_.[[Base]].
1. If IsPropertyReference(_ref_) is *true*, then
1. If IsSuperReference(_ref_) is *true*, throw a *ReferenceError* exception.
1. Let _baseObj_ be ! ToObject(_ref_.[[Base]]).
1. Let _baseObj_ be ! ToObject(_base_).
1. Let _deleteStatus_ be ? _baseObj_.[[Delete]](_ref_.[[ReferencedName]]).
1. If _deleteStatus_ is *false* and _ref_.[[Strict]] is *true*, throw a *TypeError* exception.
1. Return _deleteStatus_.
1. Else,
1. Assert: _ref_ is a Reference to an Environment Record binding.
1. Let _bindings_ be _ref_.[[Base]].
1. Return ? _bindings_.DeleteBinding(_ref_.[[ReferencedName]]).
1. Assert: _base_ is an Environment Record.
1. Return ? _base_.DeleteBinding(_ref_.[[ReferencedName]]).
</emu-alg>
<emu-note>
<p>When a `delete` operator occurs within strict mode code, a *SyntaxError* exception is thrown if its |UnaryExpression| is a direct reference to a variable, function argument, or function name. In addition, if a `delete` operator occurs within strict mode code and the property to be deleted has the attribute { [[Configurable]]: *false* }, a *TypeError* exception is thrown.</p>
Expand Down

0 comments on commit 3a705d9

Please sign in to comment.