Skip to content

Commit cb2495c

Browse files
jhnaldoljharb
authored andcommitted
Editorial: Initialize [[GeneratorState]] and [[AsyncGeneratorState]] (#3383)
1 parent ac21460 commit cb2495c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23980,6 +23980,7 @@ <h1>
2398023980
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
2398123981
1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorFunction.prototype.prototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »).
2398223982
1. Set _G_.[[GeneratorBrand]] to ~empty~.
23983+
1. Set _G_.[[GeneratorState]] to ~suspended-start~.
2398323984
1. Perform GeneratorStart(_G_, |FunctionBody|).
2398423985
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _G_, [[Target]]: ~empty~ }.
2398523986
</emu-alg>
@@ -24207,6 +24208,7 @@ <h1>
2420724208
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
2420824209
1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorFunction.prototype.prototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »).
2420924210
1. Set _generator_.[[GeneratorBrand]] to ~empty~.
24211+
1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-start~.
2421024212
1. Perform AsyncGeneratorStart(_generator_, |FunctionBody|).
2421124213
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _generator_, [[Target]]: ~empty~ }.
2421224214
</emu-alg>
@@ -48045,7 +48047,7 @@ <h1>Properties of Generator Instances</h1>
4804548047
[[GeneratorState]]
4804648048
</td>
4804748049
<td>
48048-
*undefined*, ~suspended-start~, ~suspended-yield~, ~executing~, or ~completed~
48050+
~suspended-start~, ~suspended-yield~, ~executing~, or ~completed~
4804948051
</td>
4805048052
<td>
4805148053
The current execution state of the generator.
@@ -48090,7 +48092,7 @@ <h1>
4809048092
<dl class="header">
4809148093
</dl>
4809248094
<emu-alg>
48093-
1. Assert: The value of _generator_.[[GeneratorState]] is *undefined*.
48095+
1. Assert: The value of _generator_.[[GeneratorState]] is ~suspended-start~.
4809448096
1. Let _genContext_ be the running execution context.
4809548097
1. Set the Generator component of _genContext_ to _generator_.
4809648098
1. Let _closure_ be a new Abstract Closure with no parameters that captures _generatorBody_ and performs the following steps when called:
@@ -48115,7 +48117,6 @@ <h1>
4811548117
1. Return CreateIteratorResultObject(_resultValue_, *true*).
4811648118
1. Set the code evaluation state of _genContext_ such that when evaluation is resumed for that execution context, _closure_ will be called with no arguments.
4811748119
1. Set _generator_.[[GeneratorContext]] to _genContext_.
48118-
1. Set _generator_.[[GeneratorState]] to ~suspended-start~.
4811948120
1. Return ~unused~.
4812048121
</emu-alg>
4812148122
</emu-clause>
@@ -48389,7 +48390,7 @@ <h1>Properties of AsyncGenerator Instances</h1>
4838948390
</thead>
4839048391
<tr>
4839148392
<td>[[AsyncGeneratorState]]</td>
48392-
<td>*undefined*, ~suspended-start~, ~suspended-yield~, ~executing~, ~draining-queue~, or ~completed~</td>
48393+
<td>~suspended-start~, ~suspended-yield~, ~executing~, ~draining-queue~, or ~completed~</td>
4839348394
<td>The current execution state of the async generator.</td>
4839448395
</tr>
4839548396
<tr>
@@ -48451,7 +48452,7 @@ <h1>
4845148452
<dl class="header">
4845248453
</dl>
4845348454
<emu-alg>
48454-
1. Assert: _generator_.[[AsyncGeneratorState]] is *undefined*.
48455+
1. Assert: _generator_.[[AsyncGeneratorState]] is ~suspended-start~.
4845548456
1. Let _genContext_ be the running execution context.
4845648457
1. Set the Generator component of _genContext_ to _generator_.
4845748458
1. Let _closure_ be a new Abstract Closure with no parameters that captures _generatorBody_ and performs the following steps when called:
@@ -48472,7 +48473,6 @@ <h1>
4847248473
1. Return *undefined*.
4847348474
1. Set the code evaluation state of _genContext_ such that when evaluation is resumed for that execution context, _closure_ will be called with no arguments.
4847448475
1. Set _generator_.[[AsyncGeneratorContext]] to _genContext_.
48475-
1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-start~.
4847648476
1. Set _generator_.[[AsyncGeneratorQueue]] to a new empty List.
4847748477
1. Return ~unused~.
4847848478
</emu-alg>

0 commit comments

Comments
 (0)