Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: GetValue and PutValue do not need to unwrap Completion Records #2842

Merged
merged 3 commits into from
Aug 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 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 Expand Up @@ -21244,8 +21238,8 @@ <h1>Runtime Semantics: Evaluation</h1>
</emu-alg>
<emu-grammar>LexicalBinding : BindingIdentifier</emu-grammar>
<emu-alg>
1. Let _lhs_ be Completion(ResolveBinding(StringValue of |BindingIdentifier|)).
1. Perform ? InitializeReferencedBinding(_lhs_, *undefined*).
1. Let _lhs_ be ! ResolveBinding(StringValue of |BindingIdentifier|).
1. Perform ! InitializeReferencedBinding(_lhs_, *undefined*).
1. Return ~empty~.
</emu-alg>
<emu-note>
Expand All @@ -21254,13 +21248,13 @@ <h1>Runtime Semantics: Evaluation</h1>
<emu-grammar>LexicalBinding : BindingIdentifier Initializer</emu-grammar>
<emu-alg>
1. Let _bindingId_ be StringValue of |BindingIdentifier|.
1. Let _lhs_ be Completion(ResolveBinding(_bindingId_)).
1. Let _lhs_ be ! ResolveBinding(_bindingId_).
1. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then
1. Let _value_ be ? NamedEvaluation of |Initializer| with argument _bindingId_.
1. Else,
1. Let _rhs_ be ? Evaluation of |Initializer|.
1. Let _value_ be ? GetValue(_rhs_).
1. Perform ? InitializeReferencedBinding(_lhs_, _value_).
1. Perform ! InitializeReferencedBinding(_lhs_, _value_).
1. Return ~empty~.
</emu-alg>
<emu-grammar>LexicalBinding : BindingPattern Initializer</emu-grammar>
Expand Down Expand Up @@ -22100,7 +22094,7 @@ <h1>
1. Set the running execution context's LexicalEnvironment to _newEnv_.
1. Let _exprRef_ be Completion(Evaluation of _expr_).
1. Set the running execution context's LexicalEnvironment to _oldEnv_.
1. Let _exprValue_ be ? GetValue(_exprRef_).
1. Let _exprValue_ be ? GetValue(? _exprRef_).
1. If _iterationKind_ is ~enumerate~, then
1. If _exprValue_ is *undefined* or *null*, then
1. Return Completion Record { [[Type]]: ~break~, [[Value]]: ~empty~, [[Target]]: ~empty~ }.
Expand Down Expand Up @@ -24831,7 +24825,7 @@ <h1>
1. NOTE: The running execution context's PrivateEnvironment is _outerPrivateEnvironment_ when evaluating |ClassHeritage|.
1. Let _superclassRef_ be Completion(Evaluation of |ClassHeritage|).
1. Set the running execution context's LexicalEnvironment to _env_.
1. Let _superclass_ be ? GetValue(_superclassRef_).
1. Let _superclass_ be ? GetValue(? _superclassRef_).
1. If _superclass_ is *null*, then
1. Let _protoParent_ be *null*.
1. Let _constructorParent_ be %Function.prototype%.
Expand Down