From ab46580ddb5380d23d9eb6d0a31049457aa2b3be Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Mon, 24 Oct 2022 14:48:13 -0600 Subject: [PATCH] remove built-in async function infrastructure from this proposal --- spec.html | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/spec.html b/spec.html index 905a851..ee2857b 100644 --- a/spec.html +++ b/spec.html @@ -44,50 +44,6 @@

IfAbruptCloseAsyncIterator ( _value_, _iteratorRecord_ )

- - -

AsyncFunction Objects

- -

Async Functions Abstract Operations

- -

- AsyncBlockStart ( - _promiseCapability_: a PromiseCapability Record, - _asyncBody_: a Parse Node or an Abstract Closure with no parameters, - _asyncContext_: an execution context, - ) -

-
-
- - 1. Assert: _promiseCapability_ is a PromiseCapability Record. - 1. Let _runningContext_ be the running execution context. - 1. [fence-effects="user-code"] Set the code evaluation state of _asyncContext_ such that when evaluation is resumed for that execution context the following steps will be performed: - 1. If _asyncBody_ is a Parse Node, then - 1. Let _result_ be the result of evaluating _asyncBody_. - 1. Else, - 1. Assert: _asyncBody_ is an Abstract Closure with no parameters. - 1. Let _result_ be _asyncBody_(). - 1. Let _result_ be the result of evaluating _asyncBody_. - 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 _asyncContext_ 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_.[[Type]] is ~normal~, then - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « *undefined* »). - 1. Else if _result_.[[Type]] is ~return~, then - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _result_.[[Value]] »). - 1. Else, - 1. Assert: _result_.[[Type]] is ~throw~. - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _result_.[[Value]] »). - 1. [id="step-asyncblockstart-return-undefined"] Return. - 1. Push _asyncContext_ onto the execution context stack; _asyncContext_ is now the running execution context. - 1. Resume the suspended evaluation of _asyncContext_. Let _result_ be the value returned by the resumed computation. - 1. Assert: When we return here, _asyncContext_ has already been removed from the execution context stack and _runningContext_ is the currently running execution context. - 1. Assert: _result_ is a normal completion with a value of *undefined*. The possible sources of completion values are Await or, if the async function doesn't await anything, step above. - 1. Return. - -
-
-