| 21:57 | <Michael Ficarra> | @shu I want to work to get the spelling PR over the line with you at next week's editor call |
| 22:40 | <shu> | ok |
| 23:38 | <shu> | Michael Ficarra: we need to talk about how much heavy lifting we want "Suspend" and "Resume" to do at the next call, wasm wants to do something that makes me deeply uncomfortable |
| 23:41 | <jmdyck> | https://github.com/tc39/ecma262/pull/2962 eliminates "Suspend" and "Resume" steps, if that helps. |
| 23:42 | <shu> | the recap is wasm wants to specify a way to suspend its execution in a web embedding without touching the wasm spec, and wants to do this by suspending and resume 262 execution context. in a web embedding, you gotta call into wasm from JS, so you always have a JS execution context that called into wasm, let's call this the entry execution context. say you're in the middle of a wasm execution, i.e. JS -> Wasm the question is: if there is a step that says "Suspend the running execution context" during wasm execution, where the running execution context is the entry one, do we understand that to mean "magically pauses whatever stuff wasm is doing such that when we say Resume, that it'll resume into the wasm machinery"? |
| 23:42 | <shu> | i feel like the answer is clearly no but we don't have a lot of formalism around Suspend and Resume |
| 23:42 | <shu> | jmdyck: thanks, let me read that |
| 23:47 | <shu> | i don't think the transfer-of-control clarification helps this question, which is that if another spec embeds JS, and is running its own machinery, then removes a JS execution context in the middle of its own steps, do we think that pauses at that point in the embedder's spec's machinery |
| 23:47 | <jmdyck> | In that example, where is the step that says "Suspend the r.e.c."? |
| 23:47 | <shu> | let me see if i can spell out a full example: |
| 23:48 | <shu> |
|
| 23:48 | <shu> | what happens when we resume it? |
| 23:51 | <jmdyck> | When wasm calls the host function, the host function is to operate with respect to some pre-existing realm? |
| 23:51 | <shu> | i don't think the realm has to do with anything here, it's the same realm as the entry realm |
| 23:52 | <shu> | wasm calls imported JS functions and web API functions "host functions" |
| 23:53 | <shu> | my question is: the entry EC is suspended in the middle of wasm doing its own thing in step 2. when we resume, is it reasonable to say that we'll magically return to step 3 and then 2? |
| 23:54 | <shu> | that is, does the Suspend verb have the power to capture embedder spec steps as a continuation? this seems too powerful to me if it had that power |