-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial: Factor out AO RunSuspendedContext() #2664
base: main
Are you sure you want to change the base?
Conversation
e3e0a00
to
2586002
Compare
2586002
to
1bb271e
Compare
1bb271e
to
4e953c2
Compare
4e953c2
to
fe05833
Compare
spec.html
Outdated
1. Push _asyncContext_ onto the execution context stack; _asyncContext_ is now the running execution context. | ||
1. <emu-meta effects="user-code">Resume the suspended evaluation of _asyncContext_</emu-meta> using NormalCompletion(_value_) as the result of the operation that suspended it. | ||
1. Assert: When we reach this step, _asyncContext_ has already been removed from the execution context stack and _prevContext_ is the currently running execution context. | ||
1. Perform Completion(RunSuspendedContext(_asyncContext_, NormalCompletion(_value_))). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does, e.g.: error: RunSuspendedContext returns a Completion Record, but is not consumed as if it does (typecheck) at spec.html:46018:24
ed3013c
to
4cfe666
Compare
This PR's |
4cfe666
to
a05d197
Compare
... over both arms of the subsequent "If"
... because ExecuteModule does it before calling AsyncBlockStart, so it seems like AsyncFunctionStart would have to as well. (The semantics of "Suspend" are fuzzy, but this seems innoccuous to me.)
From: immediately before calls to AsyncBlockStart() To: just inside AsyncBlockStart()
This gets things ready for the refactoring that the next commit will do. It's mostly just moving certain steps earlier or later.
a05d197
to
c6bc612
Compare
This doesn't address the semantics of Suspend/Resume, just factors out a common chunk of code.
This PR is split into 6 commits where it's easier to confirm the correctness. They're probably fine to be squashed before landing.