Commit f99c826
authored
[Stack Switching] Support cross-module coroutine calls in the interpreter (#7797)
Key changes:
* In ContData, store a function Literal, not a name. The literal, same as used
for function references since #7787, contains logic for cross-module calls.
* Store continuation state in a shared location between module instances.
We need a single stack of active continuations, and a single bit that says
if we are resuming - that should not change when we call into a module.
* When we resume, we use doCall, like CallRef does, to support cross-module
calls.
self()->currContinuation is now generalized to use getCurrContinuation(),
which fetches it from the shared data. There is also a new
clearExecutionState() which is needed to wipe the stack after a trap etc.
With this, the large "scheduler" testcase can now run.1 parent bf564b5 commit f99c826
3 files changed
Lines changed: 327 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
| |||
0 commit comments