Skip to content

Commit

Permalink
Editorial: Initialize [[GeneratorState]] and [[AsyncGeneratorState]] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnaldo authored and ljharb committed Aug 26, 2024
1 parent ac21460 commit cb2495c
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 @@ -23980,6 +23980,7 @@ <h1>
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
1. Let _G_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%GeneratorFunction.prototype.prototype%"*, « [[GeneratorState]], [[GeneratorContext]], [[GeneratorBrand]] »).
1. Set _G_.[[GeneratorBrand]] to ~empty~.
1. Set _G_.[[GeneratorState]] to ~suspended-start~.
1. Perform GeneratorStart(_G_, |FunctionBody|).
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _G_, [[Target]]: ~empty~ }.
</emu-alg>
Expand Down Expand Up @@ -24207,6 +24208,7 @@ <h1>
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
1. Let _generator_ be ? OrdinaryCreateFromConstructor(_functionObject_, *"%AsyncGeneratorFunction.prototype.prototype%"*, « [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]], [[GeneratorBrand]] »).
1. Set _generator_.[[GeneratorBrand]] to ~empty~.
1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-start~.
1. Perform AsyncGeneratorStart(_generator_, |FunctionBody|).
1. Return Completion Record { [[Type]]: ~return~, [[Value]]: _generator_, [[Target]]: ~empty~ }.
</emu-alg>
Expand Down Expand Up @@ -48045,7 +48047,7 @@ <h1>Properties of Generator Instances</h1>
[[GeneratorState]]
</td>
<td>
*undefined*, ~suspended-start~, ~suspended-yield~, ~executing~, or ~completed~
~suspended-start~, ~suspended-yield~, ~executing~, or ~completed~
</td>
<td>
The current execution state of the generator.
Expand Down Expand Up @@ -48090,7 +48092,7 @@ <h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: The value of _generator_.[[GeneratorState]] is *undefined*.
1. Assert: The value of _generator_.[[GeneratorState]] is ~suspended-start~.
1. Let _genContext_ be the running execution context.
1. Set the Generator component of _genContext_ to _generator_.
1. Let _closure_ be a new Abstract Closure with no parameters that captures _generatorBody_ and performs the following steps when called:
Expand All @@ -48115,7 +48117,6 @@ <h1>
1. Return CreateIteratorResultObject(_resultValue_, *true*).
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.
1. Set _generator_.[[GeneratorContext]] to _genContext_.
1. Set _generator_.[[GeneratorState]] to ~suspended-start~.
1. Return ~unused~.
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -48389,7 +48390,7 @@ <h1>Properties of AsyncGenerator Instances</h1>
</thead>
<tr>
<td>[[AsyncGeneratorState]]</td>
<td>*undefined*, ~suspended-start~, ~suspended-yield~, ~executing~, ~draining-queue~, or ~completed~</td>
<td>~suspended-start~, ~suspended-yield~, ~executing~, ~draining-queue~, or ~completed~</td>
<td>The current execution state of the async generator.</td>
</tr>
<tr>
Expand Down Expand Up @@ -48451,7 +48452,7 @@ <h1>
<dl class="header">
</dl>
<emu-alg>
1. Assert: _generator_.[[AsyncGeneratorState]] is *undefined*.
1. Assert: _generator_.[[AsyncGeneratorState]] is ~suspended-start~.
1. Let _genContext_ be the running execution context.
1. Set the Generator component of _genContext_ to _generator_.
1. Let _closure_ be a new Abstract Closure with no parameters that captures _generatorBody_ and performs the following steps when called:
Expand All @@ -48472,7 +48473,6 @@ <h1>
1. Return *undefined*.
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.
1. Set _generator_.[[AsyncGeneratorContext]] to _genContext_.
1. Set _generator_.[[AsyncGeneratorState]] to ~suspended-start~.
1. Set _generator_.[[AsyncGeneratorQueue]] to a new empty List.
1. Return ~unused~.
</emu-alg>
Expand Down

0 comments on commit cb2495c

Please sign in to comment.