lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hallo,

On 11/12/09, David Given <dg@cowlark.com> wrote:
>
>  I know Lisp has these, but my Lisp-fu is very weak. I don't know of any
>  other languages (Smalltalk has sanitised continuations in that you can
>  return from a method from a block defined inside that method, but only
>  while the method is actually active, IIRC). I do know that you need
>  really high-tech garbage collectors to make them at all efficient (which
>  of course Lisp did).
>

     Early Scheme implementors assumed that all call frames should go
to the heap to allow first-class continuations. But in the early 80's
this was proven wrong and the call frames moved to a true stack. At
first the stack had to be copied to the heap at each continuation
capture, but since them several better algorithms were devised. My own
compiler uses a full stack copy.

http://www.cs.indiana.edu/~dyb/pubs/3imp.pdf
http://www.cs.indiana.edu/~dyb/pubs/stack.pdf
http://www.springerlink.com/content/h5808n962434j275/fulltext.pdf

-- 
-alex
@asandroq
http://www.ventonegro.org/