Skip to content

Commit

Permalink
Editorial: avoid duplicate SetFunctionName in {async,}generator metho…
Browse files Browse the repository at this point in the history
…ds (#2463)
  • Loading branch information
bakkot authored and ljharb committed Aug 7, 2021
1 parent 99b36f0 commit fcabfe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -13220,7 +13220,6 @@ <h1>
<dl class="header">
</dl>
<emu-alg>
1. Perform ! SetFunctionName(_closure_, _key_).
1. If _key_ is a Private Name, then
1. Return PrivateElement { [[Key]]: _key_, [[Kind]]: ~method~, [[Value]]: _closure_ }.
1. Else,
Expand Down Expand Up @@ -22992,6 +22991,7 @@ <h1>Runtime Semantics: MethodDefinitionEvaluation</h1>
<emu-grammar>MethodDefinition : ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}`</emu-grammar>
<emu-alg>
1. Let _methodDef_ be ? DefineMethod of |MethodDefinition| with argument _object_.
1. Perform ! SetFunctionName(_methodDef_.[[Closure]], _methodDef_.[[Key]]).
1. Return ? DefineMethodProperty(_methodDef_.[[Key]], _object_, _methodDef_.[[Closure]], _enumerable_).
</emu-alg>
<emu-grammar>MethodDefinition : `get` ClassElementName `(` `)` `{` FunctionBody `}`</emu-grammar>
Expand Down Expand Up @@ -23070,6 +23070,7 @@ <h1>Runtime Semantics: MethodDefinitionEvaluation</h1>
1. Let _sourceText_ be the source text matched by |AsyncMethod|.
1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_, _privateScope_).
1. Perform ! MakeMethod(_closure_, _object_).
1. Perform ! SetFunctionName(_closure_, _propKey_).
1. Return ? DefineMethodProperty(_propKey_, _object_, _closure_, _enumerable_).
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit fcabfe0

Please sign in to comment.