2 ms·
I'm curious how it handles call/cc. I at least think you would have to make your own continuation stack, unless there's some way to get at the internals of unwi
by bandrami 2y ago
I'm curious how it handles call/cc. I at least think you would have to make your own continuation stack, unless there's some way to get at the internals of unwind-protect that would make doing it natively possible.
- ReleaseCandidat 2y agoThat's how PAIP does it, their interpreter uses continuation passing style: 22.5 An Interpreter Supporting Call/cc https://github.com/norvig/paip-lisp/blob/main/docs/chapter22.md#225-an-interpreter-supporting-callcc https://github.com/norvig/paip-lisp/blob/main/docs/chapter22... 23.2 Introducing Call/cc [see the next chapter, 23.3 The Abstract Machine, for the implementation in bytecode] https://github.com/norvig/paip-lisp/blob/main/docs/chapter23.md#232-introducing-callcc https://github.com/norvig/paip-lisp/blob/main/docs/chapter23...