Skip to content
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: Allow ACs in Async{Function,Block}Start #3452

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

syg
Copy link
Contributor

@syg syg commented Oct 17, 2024

There is no use of Abstract Closures as async function bodies in ecma262 itself. This PR is a prereq to allow the JSPI specification to pass in an AC.

@syg syg requested a review from a team October 17, 2024 22:49
@ljharb ljharb force-pushed the asyncfunctionstart-abstract-closure branch 2 times, most recently from eb388e8 to 7d6271b Compare October 18, 2024 03:59
Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I want to see the spec text which uses this before we merge.

@syg
Copy link
Contributor Author

syg commented Oct 25, 2024

LGTM but I want to see the spec text which uses this before we merge.

You mean in 262? As explained in #3452 (comment) this is a prereq for the JSPI spec. You can see a draft here.

@bakkot
Copy link
Contributor

bakkot commented Oct 25, 2024

I meant the JSPI draft, yeah. Seems fine to use AsyncFunctionStart in this way there, though some of the other stuff (in particular the execution context map) is a bit suspicious.

@syg
Copy link
Contributor Author

syg commented Oct 25, 2024

Seems fine to use AsyncFunctionStart in this way there, though some of the other stuff (in particular the execution context map) is a bit suspicious.

I actually like that in that it programmatically makes explicit which are the pausable ECs from JSPI's perspective. If you recall I don't want 262 to grant any embedder of 262 the power to stack switch any stack sandwiched between two ECs. And that EC map is like signing a waiver "I promise to only stack switch ECs that sandwich wasm stacks, which I've thought about and know to be switchable".

Edit: Oh also it traps for reentrant use cases, so it actually has some runtime semantics.

@syg syg added ready to merge Editors believe this PR needs no further reviews, and is ready to land. editorial change labels Nov 6, 2024
There is no use of Abstract Closures as async function bodies in ecma262 itself.
This PR is a prereq to allow the JSPI specification to pass in an AC.
@ljharb ljharb force-pushed the asyncfunctionstart-abstract-closure branch from 7d6271b to 616b8c9 Compare November 8, 2024 10:39
@ljharb ljharb merged commit 616b8c9 into tc39:main Nov 8, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants