Skip to content

Commit

Permalink
Editorial: AOs do not need to unwrap passed-in Completion Records (#2842
Browse files Browse the repository at this point in the history
)

InitializeReferencedBinding, GetValue, and PutValue are not ever passed a Completion Record, so they don't need to ReturnIfAbrupt their arguments.
  • Loading branch information
bakkot authored and ljharb committed Aug 19, 2022
1 parent 6fdf3a9 commit b38fb13
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4218,13 +4218,12 @@ <h1>
<emu-clause id="sec-getvalue" type="abstract operation">
<h1>
GetValue (
_V_: unknown,
_V_: a Reference Record or an ECMAScript language value,
): either a normal completion containing an ECMAScript language value or an abrupt completion
</h1>
<dl class="header">
</dl>
<emu-alg>
1. ReturnIfAbrupt(_V_).
1. If _V_ is not a Reference Record, return _V_.
1. If IsUnresolvableReference(_V_) is *true*, throw a *ReferenceError* exception.
1. If IsPropertyReference(_V_) is *true*, then
Expand All @@ -4245,15 +4244,13 @@ <h1>
<emu-clause id="sec-putvalue" type="abstract operation">
<h1>
PutValue (
_V_: unknown,
_W_: unknown,
_V_: a Reference Record or an ECMAScript language value,
_W_: an ECMAScript language value,
): either a normal completion containing ~unused~ or an abrupt completion
</h1>
<dl class="header">
</dl>
<emu-alg>
1. ReturnIfAbrupt(_V_).
1. ReturnIfAbrupt(_W_).
1. If _V_ is not a Reference Record, throw a *ReferenceError* exception.
1. If IsUnresolvableReference(_V_) is *true*, then
1. If _V_.[[Strict]] is *true*, throw a *ReferenceError* exception.
Expand Down Expand Up @@ -4294,16 +4291,13 @@ <h1>
<emu-clause id="sec-initializereferencedbinding" type="abstract operation">
<h1>
InitializeReferencedBinding (
_V_: unknown,
_W_: unknown,
_V_: a Reference Record,
_W_: an ECMAScript language value,
): either a normal completion containing ~unused~ or an abrupt completion
</h1>
<dl class="header">
</dl>
<emu-alg>
1. ReturnIfAbrupt(_V_).
1. ReturnIfAbrupt(_W_).
1. Assert: _V_ is a Reference Record.
1. Assert: IsUnresolvableReference(_V_) is *false*.
1. Let _base_ be _V_.[[Base]].
1. Assert: _base_ is an Environment Record.
Expand Down

0 comments on commit b38fb13

Please sign in to comment.