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: eliminate extra verbosity with %GeneratorPrototype% references #3460

Merged
merged 1 commit into from
Oct 31, 2024
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
30 changes: 15 additions & 15 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -7274,7 +7274,7 @@ <h1>
1. Perform ? GeneratorYield(CreateIteratorResultObject(_E_, *false*)).
1. Return NormalCompletion(*undefined*).
1. Let _iterator_ be CreateIteratorFromClosure(_closure_, ~empty~, %Iterator.prototype%).
1. Return the Iterator Record { [[Iterator]]: _iterator_, [[NextMethod]]: %GeneratorFunction.prototype.prototype.next%, [[Done]]: *false* }.
1. Return the Iterator Record { [[Iterator]]: _iterator_, [[NextMethod]]: %GeneratorPrototype.next%, [[Done]]: *false* }.
</emu-alg>
<emu-note>
<p>The list iterator object is never directly accessible to ECMAScript code.</p>
Expand Down Expand Up @@ -23980,7 +23980,7 @@ <h1>
1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform MakeMethod(_closure_, _object_).
1. Perform SetFunctionName(_closure_, _propKey_).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return ? DefineMethodProperty(_object_, _propKey_, _closure_, _enumerable_).
</emu-alg>
Expand All @@ -23995,7 +23995,7 @@ <h1>
1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform MakeMethod(_closure_, _object_).
1. Perform SetFunctionName(_closure_, _propKey_).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return ? DefineMethodProperty(_object_, _propKey_, _closure_, _enumerable_).
</emu-alg>
Expand Down Expand Up @@ -24115,7 +24115,7 @@ <h1>
<emu-grammar>GeneratorBody : FunctionBody</emu-grammar>
<emu-alg>
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorFunction.prototype.prototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »).
1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorPrototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »).
1. Set _G_.[[GeneratorBrand]] to ~empty~.
1. Set _G_.[[GeneratorState]] to ~suspended-start~.
1. Perform GeneratorStart(_G_, |FunctionBody|).
Expand All @@ -24138,7 +24138,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|.
1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform SetFunctionName(_F_, _name_).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _F_.
</emu-alg>
Expand All @@ -24147,7 +24147,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|.
1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform SetFunctionName(_F_, *"default"*).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _F_.
</emu-alg>
Expand All @@ -24172,7 +24172,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |GeneratorExpression|.
1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform SetFunctionName(_closure_, _name_).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _closure_.
</emu-alg>
Expand All @@ -24187,7 +24187,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |GeneratorExpression|.
1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_).
1. Perform SetFunctionName(_closure_, _name_).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Perform ! _funcEnv_.InitializeBinding(_name_, _closure_).
1. Return _closure_.
Expand Down Expand Up @@ -24343,7 +24343,7 @@ <h1>
</emu-grammar>
<emu-alg>
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorFunction.prototype.prototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »).
1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorPrototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »).
1. Set _generator_.[[GeneratorBrand]] to ~empty~.
1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-start~.
1. Perform AsyncGeneratorStart(_generator_, |FunctionBody|).
Expand All @@ -24368,7 +24368,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|.
1. Let _F_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform SetFunctionName(_F_, _name_).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _F_.
</emu-alg>
Expand All @@ -24379,7 +24379,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|.
1. Let _F_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform SetFunctionName(_F_, *"default"*).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _F_.
</emu-alg>
Expand All @@ -24406,7 +24406,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|.
1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform SetFunctionName(_closure_, _name_).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Return _closure_.
</emu-alg>
Expand All @@ -24423,7 +24423,7 @@ <h1>
1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|.
1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_).
1. Perform SetFunctionName(_closure_, _name_).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Perform ! _funcEnv_.InitializeBinding(_name_, _closure_).
1. Return _closure_.
Expand Down Expand Up @@ -30510,10 +30510,10 @@ <h1>
1. Let _F_ be OrdinaryFunctionCreate(_proto_, _sourceText_, _parameters_, _body_, ~non-lexical-this~, _env_, _privateEnv_).
1. Perform SetFunctionName(_F_, *"anonymous"*).
1. If _kind_ is ~generator~, then
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Else if _kind_ is ~async-generator~, then
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
1. Else if _kind_ is ~normal~, then
1. Perform MakeConstructor(_F_).
Expand Down
Loading