Skip to content

Commit

Permalink
Editorial: swap order of arguments to PrivateElementFind (tc39#2504)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot authored and mathiasbynens committed Oct 18, 2021
1 parent bc56215 commit ed2c6d9
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 @@ -6595,8 +6595,8 @@ <h1>
<emu-clause id="sec-privateelementfind" type="abstract operation">
<h1>
PrivateElementFind (
_P_: a Private Name,
_O_: an Object,
_P_: a Private Name,
)
</h1>
<dl class="header">
Expand All @@ -6620,7 +6620,7 @@ <h1>
<dl class="header">
</dl>
<emu-alg>
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
1. Let _entry_ be ! PrivateElementFind(_O_, _P_).
1. If _entry_ is not ~empty~, throw a *TypeError* exception.
1. Append PrivateElement { [[Key]]: _P_, [[Kind]]: ~field~, [[Value]]: _value_ } to _O_.[[PrivateElements]].
</emu-alg>
Expand All @@ -6637,7 +6637,7 @@ <h1>
</dl>
<emu-alg>
1. Assert: _method_.[[Kind]] is either ~method~ or ~accessor~.
1. Let _entry_ be ! PrivateElementFind(_method_.[[Key]], _O_).
1. Let _entry_ be ! PrivateElementFind(_O_, _method_.[[Key]]).
1. If _entry_ is not ~empty~, throw a *TypeError* exception.
1. Append _method_ to _O_.[[PrivateElements]].
1. NOTE: The values for private methods and accessors are shared across instances. This step does not create a new copy of the method or accessor.
Expand All @@ -6654,7 +6654,7 @@ <h1>
<dl class="header">
</dl>
<emu-alg>
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
1. Let _entry_ be ! PrivateElementFind(_O_, _P_).
1. If _entry_ is ~empty~, throw a *TypeError* exception.
1. If _entry_.[[Kind]] is ~field~ or ~method~, then
1. Return _entry_.[[Value]].
Expand All @@ -6676,7 +6676,7 @@ <h1>
<dl class="header">
</dl>
<emu-alg>
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
1. Let _entry_ be ! PrivateElementFind(_O_, _P_).
1. If _entry_ is ~empty~, throw a *TypeError* exception.
1. If _entry_.[[Kind]] is ~field~, then
1. Set _entry_.[[Value]] to _value_.
Expand Down Expand Up @@ -19762,7 +19762,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. If Type(_rval_) is not Object, throw a *TypeError* exception.
1. Let _privateEnv_ be the running execution context's PrivateEnvironment.
1. Let _privateName_ be ! ResolvePrivateIdentifier(_privateEnv_, _privateIdentifier_).
1. If ! PrivateElementFind(_privateName_, _rval_) is not ~empty~, return *true*.
1. If ! PrivateElementFind(_rval_, _privateName_) is not ~empty~, return *true*.
1. Return *false*.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit ed2c6d9

Please sign in to comment.