On Wed, Apr 23, 2008 at 7:00 PM, Jon Harrop <[EMAIL PROTECTED]> wrote:

>  > >  So it works if you do a CPS transformation on all your code leaving
>  > >  your frames on the heap.
>
>  Yes.

You don't have to use the heap.  You can do what Chicken Scheme does:
CPS convert everything, but leave the calls as ordinary calls with the
call frames on the stack; then when the stack gets too big, long-jump
(fire an exception) to reset it and carry on.  The calls never return,
so this is safe.

Chicken goes further: it allocates all objects on the stack as well,
and then when the stack is reset all live objects are copied to the
heap.  This makes the stack function as the nursery generation of a
multigenerational heap.

See http://home.pipeline.com/~hbaker1/CheneyMTA.html for a brief explication.

-- 
GMail doesn't have rotating .sigs, but you can see mine at
http://www.ccil.org/~cowan/signatures

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to