Stream: cranelift

Topic: Is it plausible to implement continuations with cranelift...


view this post on Zulip Ivan Chinenov (Jan 15 2025 at 19:10):

All techniques for implementing continuations involve some funky stack manipulations, and I don't recall seeing anything suggesting cranelift abstract machine lets you do things like linked-list callstacks.

view this post on Zulip bjorn3 (Jan 15 2025 at 19:12):

https://github.com/bytecodealliance/wasmtime/pull/9078

This PR adds a new CLIF instruction for switching stacks. While the primary motivation is to support the Wasm stack switching proposal currently under development, the CLIF instruction here is lowe...

view this post on Zulip bjorn3 (Jan 15 2025 at 19:13):

And you can always call a trampoline implemented in inline assembly which changes the stack pointer as necessary. For example Wasmtime has a fiber implementation implemented in inline asm.


Last updated: Jan 24 2025 at 00:11 UTC