Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Lisp to C compiler

Name: Anonymous 2014-04-19 17:42

Hi! It is me again!

I've found that continuations in C/C++ doesn't require tail-call optimization on the part of the compiler. You can just do setjmp and longjmp when stack gets close to full. This means you can't do stack allocation, but you should allocate everything on heap anyway.

Name: Anonymous 2014-04-21 2:37

>>3
I hope you mena continuations and stack allocations don't mix well. You can always optimize tail recursion to a jump with no stack operations whatsoever.

Using setjmp/longjmp to implement continuations doesn't work if you need to transfer control to functions that've not already been invoked (and thus doesn't have a frame already on the stack somewhere).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List