3 ms·
> Adding continuation marks and delimited continuations require adding a CPS-pass. Have you considered targeting the stack switching proposal?
by titzer 9mo ago
> Adding continuation marks and delimited continuations require adding a CPS-pass.
Have you considered targeting the stack switching proposal?
- debugnik 9mo agoAnother idea, wasm_of_ocaml [1] compiles effects using either a CPS transform or the JS Promise integration proposal for Wasm [2]. [1]: https://github.com/ocsigen/js_of_ocaml/blob/1b1fcf7b06c1232452ccbb1ce2fa4b902a6b6635/README_wasm_of_ocaml.md https://github.com/ocsigen/js_of_ocaml/blob/1b1fcf7b06c12324... [2]: https://github.com/WebAssembly/js-promise-integration/blob/72b61f57ef7ea45b54bd7b463fc9f3044beee4ec/proposals/js-promise-integration/Overview.md https://github.com/WebAssembly/js-promise-integration/blob/7...
- soegaard 9mo agoMaybe. My main problem is to get light-weight support for continuation marks. If I need a CPS-pass for continuation marks, I might as well use it for continuations as well. It would be great if it were possible to avoid a CPS-pass though.
- titzer 9mo agoWith stack-switching you won't (shouldn't?) need a CPS pass.
- soegaard 9mo agoI need to study the stack-switching proposal in more detail. However, I don't see an obvious way of attach and probe continuation marks to the continuations (including the current one). I am not an expert in continuation marks, so I'll just link to this presentation by Matthew Flatt (which you probably already know). https://github.com/WebAssembly/meetings/blob/main/stack/2021/presentations/2021-5-17-flatt-racket-intermediate-language-control.pdf https://github.com/WebAssembly/meetings/blob/main/stack/2021...