Skip to content

Commit f24fd1b

Browse files
remove built-in async function infrastructure from this proposal (#36)
1 parent 49cfde2 commit f24fd1b

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

spec.html

-44
Original file line numberDiff line numberDiff line change
@@ -44,50 +44,6 @@ <h1>IfAbruptCloseAsyncIterator ( _value_, _iteratorRecord_ )</h1>
4444
</emu-clause>
4545
</emu-clause>
4646
</emu-clause>
47-
48-
<emu-clause id="sec-async-function-objects">
49-
<h1>AsyncFunction Objects</h1>
50-
<emu-clause id="sec-async-functions-abstract-operations">
51-
<h1>Async Functions Abstract Operations</h1>
52-
<emu-clause id="sec-asyncblockstart" type="abstract operation">
53-
<h1>
54-
AsyncBlockStart (
55-
_promiseCapability_: a PromiseCapability Record,
56-
_asyncBody_: a Parse Node <ins>or an Abstract Closure with no parameters</ins>,
57-
_asyncContext_: an execution context,
58-
)
59-
</h1>
60-
<dl class="header">
61-
</dl>
62-
<emu-alg>
63-
1. Assert: _promiseCapability_ is a PromiseCapability Record.
64-
1. Let _runningContext_ be the running execution context.
65-
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:
66-
1. <ins> If _asyncBody_ is a Parse Node, then</ins>
67-
1. <ins> Let _result_ be the result of evaluating _asyncBody_.</ins>
68-
1. <ins> Else, </ins>
69-
1. <ins> Assert: _asyncBody_ is an Abstract Closure with no parameters.</ins>
70-
1. <ins> Let _result_ be _asyncBody_().</ins>
71-
1. <del>Let _result_ be the result of evaluating _asyncBody_. </del>
72-
1. Assert: If we return here, the async function either threw an exception or performed an implicit or explicit return; all awaiting is done.
73-
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.
74-
1. If _result_.[[Type]] is ~normal~, then
75-
1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, &laquo; *undefined* &raquo;).
76-
1. Else if _result_.[[Type]] is ~return~, then
77-
1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, &laquo; _result_.[[Value]] &raquo;).
78-
1. Else,
79-
1. Assert: _result_.[[Type]] is ~throw~.
80-
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; _result_.[[Value]] &raquo;).
81-
1. [id="step-asyncblockstart-return-undefined"] Return.
82-
1. Push _asyncContext_ onto the execution context stack; _asyncContext_ is now the running execution context.
83-
1. <emu-meta effects="user-code">Resume the suspended evaluation of _asyncContext_</emu-meta>. Let _result_ be the value returned by the resumed computation.
84-
1. Assert: When we return here, _asyncContext_ has already been removed from the execution context stack and _runningContext_ is the currently running execution context.
85-
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 <emu-xref href="#step-asyncblockstart-return-undefined"></emu-xref> above.
86-
1. Return.
87-
</emu-alg>
88-
</emu-clause>
89-
</emu-clause>
90-
</emu-clause>
9147
</emu-clause>
9248

9349
<emu-clause id="sec-indexed-collections">

0 commit comments

Comments
 (0)