Skip to content

Commit

Permalink
Adopt consensus changes from tc39/proposal-explicit-resource-manageme…
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Mar 20, 2024
1 parent f14f8ba commit bb009b2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -23903,10 +23903,8 @@ <h1>
</dl>
<emu-grammar>FunctionBody : FunctionStatementList</emu-grammar>
<emu-alg>
1. Perform ? FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
1. Let _result_ be Completion(Evaluation of |FunctionStatementList|).
1. Let _env_ be the running execution context's LexicalEnvironment.
1. Return ? DisposeResources(_env_.[[DisposeCapability]], _result_).
1. Perform ! FunctionDeclarationInstantiation(_functionObject_, _argumentsList_).
1. Return ? Evaluation of |FunctionStatementList|).
</emu-alg>
</emu-clause>

Expand Down Expand Up @@ -24006,6 +24004,13 @@ <h1>Runtime Semantics: Evaluation</h1>
<emu-alg>
1. Return *undefined*.
</emu-alg>
<emu-grammar>FunctionStatementList : StatementList</emu-grammar>
<emu-alg>
1. Let _result_ be Completion(Evaluation of |StatementList|).
1. Let _env_ be the running execution context's LexicalEnvironment.
1. Assert: _env_ is a Declarative Environment Record.
1. Return ? DisposeResources(_env_.[[DisposeCapability]], _result_).
</emu-alg>
</emu-clause>
</emu-clause>

Expand Down Expand Up @@ -48711,14 +48716,12 @@ <h1>
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:
1. Let _acGenContext_ be the running execution context.
1. Let _env_ be _acGenContext_'s LexicalEnvironment.
1. Let _acGenerator_ be the Generator component of _acGenContext_.
1. If _generatorBody_ is a Parse Node, then
1. Let _result_ be Completion(Evaluation of _generatorBody_).
1. Else,
1. Assert: _generatorBody_ is an Abstract Closure with no parameters.
1. Let _result_ be _generatorBody_().
1. Set _result_ to Completion(DisposeResources(_env_.[[DisposeCapability]], _result_)).
1. Assert: If we return here, the generator either threw an exception or performed either an implicit or explicit return.
1. Remove _acGenContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context.
1. Set _acGenerator_.[[GeneratorState]] to ~completed~.
Expand Down Expand Up @@ -49070,14 +49073,12 @@ <h1>
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:
1. Let _acGenContext_ be the running execution context.
1. Let _env_ be _acGenContext_'s LexicalEnvironment.
1. Let _acGenerator_ be the Generator component of _acGenContext_.
1. If _generatorBody_ is a Parse Node, then
1. Let _result_ be Completion(Evaluation of _generatorBody_).
1. Else,
1. Assert: _generatorBody_ is an Abstract Closure with no parameters.
1. Let _result_ be Completion(_generatorBody_()).
1. Set _result_ to Completion(DisposeResources(_env_.[[DisposeCapability]], _result_)).
1. Assert: If we return here, the async generator either threw an exception or performed either an implicit or explicit return.
1. Remove _acGenContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context.
1. Set _acGenerator_.[[AsyncGeneratorState]] to ~completed~.
Expand Down Expand Up @@ -49461,9 +49462,7 @@ <h1>
1. Let _runningContext_ be the running execution context.
1. Let _closure_ be a new Abstract Closure with no parameters that captures _promiseCapability_ and _asyncBody_ and performs the following steps when called:
1. Let _acAsyncContext_ be the running execution context.
1. Let _env_ be _acAsyncContext_'s LexicalEnvironment.
1. Let _result_ be Completion(Evaluation of _asyncBody_).
1. Set _result_ to Completion(DisposeResources(_env_.[[DisposeCapability]], _result_)).
1. Assert: If we return here, the async function either threw an exception or performed an implicit or explicit return; all awaiting is done.
1. Remove _acAsyncContext_ from the execution context stack and restore the execution context that is at the top of the execution context stack as the running execution context.
1. If _result_ is a normal completion, then
Expand Down

0 comments on commit bb009b2

Please sign in to comment.