Re: [racket] Retrofitting call/cc onto an interpreter not written in CPS

2011-03-08 Thread Tony Garnock-Jones
How is your call stack represented? If you're representing calls-in-scheme using calls-in-C, you might be in for an interesting time. If you're representing calls-in-scheme as explicit activation records on a stack maintained by the C code, you can capture that structure alongside the environme

[racket] Retrofitting call/cc onto an interpreter not written in CPS

2011-03-08 Thread Patrick Li
Hello, I'm programming a toy interpreter for Scheme for educational purposes. It's programmed in C, and I've got a basic interpreter with the basic forms working as well as tail call elimination. I'm wondering, at this point, what's the easiest way to get call/cc working? The interpreter is not p