js-promise-integration icon indicating copy to clipboard operation
js-promise-integration copied to clipboard

Where is `Active[caller]` defined?

Open jmdyck opened this issue 1 year ago • 1 comments

In the definition for "suspending function", the execution context context has a "state" that is either Suspended or Active[caller]. Where is all this defined?

I know that the ECMAScript spec defines "execution context" (and WebAssembly.promising's use of the term explicitly links to the ES spec), but an ES execution context doesn't have a "state" component, let alone one whose values are Suspended or Active[caller]. So I'm wondering if you have some other kind of execution context in mind.

jmdyck avatar Jul 31 '24 17:07 jmdyck

This text is being reworked for the specification itself. The intention in the explainer was to note that the execution context was active for some caller. As you note, this is not a real ES thing. For a snapshot look into the spec as it is being developed, see https://github.com/WebAssembly/js-promise-integration/pull/37.

fgmccabe avatar Jul 31 '24 18:07 fgmccabe

Please see the specification itself for a description of the semantics of JSPI.

fgmccabe avatar Oct 31 '24 22:10 fgmccabe