From: Kristof Bastiaensen Date: 2004-07-20T00:37:18+09:00 Subject: Re: Compiling Ruby code On Tue, 20 Jul 2004 00:00:22 +0900, Mikael Brockman wrote: Hi, > Kristof Bastiaensen writes: > >> Well, I do think it is possible to compile Ruby, but it would be to hard. >> Firstly eval and module_eval should be thrown away, because they need to >> be able to parse code at runtime. >> Continuations make compiling very messy, since the stack needs to be >> copied. > > That's not strictly true. If you convert the code to > continuation-passing style, reifying continuations doesn't require > copying the stack. CHICKEN and many other Scheme compilers choose this > approach. > > mikael That's interesting. Could you explain how that works? My idea was that when a continuation is saved, it needs to keep the information, where it is going to (return adresses), and all local bindings. I would think the best way is to save the stack, at least for compiled (machine) code. Kristof