Skip to content

Commit 4c44bbe

Browse files
michaelficarraljharb
authored andcommitted
Editorial: eliminate extra verbosity with %GeneratorPrototype% refs (#3460)
1 parent d0e5feb commit 4c44bbe

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

spec.html

+15-15
Original file line numberDiff line numberDiff line change
@@ -7274,7 +7274,7 @@ <h1>
72747274
1. Perform ? GeneratorYield(CreateIteratorResultObject(_E_, *false*)).
72757275
1. Return NormalCompletion(*undefined*).
72767276
1. Let _iterator_ be CreateIteratorFromClosure(_closure_, ~empty~, %Iterator.prototype%).
7277-
1. Return the Iterator Record { [[Iterator]]: _iterator_, [[NextMethod]]: %GeneratorFunction.prototype.prototype.next%, [[Done]]: *false* }.
7277+
1. Return the Iterator Record { [[Iterator]]: _iterator_, [[NextMethod]]: %GeneratorPrototype.next%, [[Done]]: *false* }.
72787278
</emu-alg>
72797279
<emu-note>
72807280
<p>The list iterator object is never directly accessible to ECMAScript code.</p>
@@ -23980,7 +23980,7 @@ <h1>
2398023980
1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2398123981
1. Perform MakeMethod(_closure_, _object_).
2398223982
1. Perform SetFunctionName(_closure_, _propKey_).
23983-
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
23983+
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
2398423984
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2398523985
1. Return ? DefineMethodProperty(_object_, _propKey_, _closure_, _enumerable_).
2398623986
</emu-alg>
@@ -23995,7 +23995,7 @@ <h1>
2399523995
1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2399623996
1. Perform MakeMethod(_closure_, _object_).
2399723997
1. Perform SetFunctionName(_closure_, _propKey_).
23998-
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
23998+
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
2399923999
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2400024000
1. Return ? DefineMethodProperty(_object_, _propKey_, _closure_, _enumerable_).
2400124001
</emu-alg>
@@ -24115,7 +24115,7 @@ <h1>
2411524115
<emu-grammar>GeneratorBody : FunctionBody</emu-grammar>
2411624116
<emu-alg>
2411724117
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
24118-
1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorFunction.prototype.prototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »).
24118+
1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorPrototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »).
2411924119
1. Set _G_.[[GeneratorBrand]] to ~empty~.
2412024120
1. Set _G_.[[GeneratorState]] to ~suspended-start~.
2412124121
1. Perform GeneratorStart(_G_, |FunctionBody|).
@@ -24138,7 +24138,7 @@ <h1>
2413824138
1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|.
2413924139
1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2414024140
1. Perform SetFunctionName(_F_, _name_).
24141-
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
24141+
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
2414224142
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2414324143
1. Return _F_.
2414424144
</emu-alg>
@@ -24147,7 +24147,7 @@ <h1>
2414724147
1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|.
2414824148
1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2414924149
1. Perform SetFunctionName(_F_, *"default"*).
24150-
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
24150+
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
2415124151
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2415224152
1. Return _F_.
2415324153
</emu-alg>
@@ -24172,7 +24172,7 @@ <h1>
2417224172
1. Let _sourceText_ be the source text matched by |GeneratorExpression|.
2417324173
1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2417424174
1. Perform SetFunctionName(_closure_, _name_).
24175-
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
24175+
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
2417624176
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2417724177
1. Return _closure_.
2417824178
</emu-alg>
@@ -24187,7 +24187,7 @@ <h1>
2418724187
1. Let _sourceText_ be the source text matched by |GeneratorExpression|.
2418824188
1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_).
2418924189
1. Perform SetFunctionName(_closure_, _name_).
24190-
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
24190+
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
2419124191
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2419224192
1. Perform ! _funcEnv_.InitializeBinding(_name_, _closure_).
2419324193
1. Return _closure_.
@@ -24343,7 +24343,7 @@ <h1>
2434324343
</emu-grammar>
2434424344
<emu-alg>
2434524345
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
24346-
1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorFunction.prototype.prototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »).
24346+
1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorPrototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »).
2434724347
1. Set _generator_.[[GeneratorBrand]] to ~empty~.
2434824348
1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-start~.
2434924349
1. Perform AsyncGeneratorStart(_generator_, |FunctionBody|).
@@ -24368,7 +24368,7 @@ <h1>
2436824368
1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|.
2436924369
1. Let _F_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2437024370
1. Perform SetFunctionName(_F_, _name_).
24371-
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
24371+
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
2437224372
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2437324373
1. Return _F_.
2437424374
</emu-alg>
@@ -24379,7 +24379,7 @@ <h1>
2437924379
1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|.
2438024380
1. Let _F_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2438124381
1. Perform SetFunctionName(_F_, *"default"*).
24382-
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
24382+
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
2438324383
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2438424384
1. Return _F_.
2438524385
</emu-alg>
@@ -24406,7 +24406,7 @@ <h1>
2440624406
1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|.
2440724407
1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_).
2440824408
1. Perform SetFunctionName(_closure_, _name_).
24409-
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
24409+
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
2441024410
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2441124411
1. Return _closure_.
2441224412
</emu-alg>
@@ -24423,7 +24423,7 @@ <h1>
2442324423
1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|.
2442424424
1. Let _closure_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_).
2442524425
1. Perform SetFunctionName(_closure_, _name_).
24426-
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
24426+
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
2442724427
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
2442824428
1. Perform ! _funcEnv_.InitializeBinding(_name_, _closure_).
2442924429
1. Return _closure_.
@@ -30510,10 +30510,10 @@ <h1>
3051030510
1. Let _F_ be OrdinaryFunctionCreate(_proto_, _sourceText_, _parameters_, _body_, ~non-lexical-this~, _env_, _privateEnv_).
3051130511
1. Perform SetFunctionName(_F_, *"anonymous"*).
3051230512
1. If _kind_ is ~generator~, then
30513-
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
30513+
1. Let _prototype_ be OrdinaryObjectCreate(%GeneratorPrototype%).
3051430514
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
3051530515
1. Else if _kind_ is ~async-generator~, then
30516-
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%).
30516+
1. Let _prototype_ be OrdinaryObjectCreate(%AsyncGeneratorPrototype%).
3051730517
1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
3051830518
1. Else if _kind_ is ~normal~, then
3051930519
1. Perform MakeConstructor(_F_).

0 commit comments

Comments
 (0)