[gambit-list] How to implement call/cc in a GVM interpreter?
Oleg Parashchenko
olpa at uucode.com
Fri Feb 4 08:38:42 EST 2011
Hello,
answering to myself:
>
> How to restore the stack correctly when jumping to a continuation?
After some observation, I decided that GVM code has the property: values
in the stack are read-only. Therefore, call/cc makes a copy of the stack,
and a jump to a continuation restores this copy.
Maybe this solution is not optimal, but it works at least for the
yin-yang puzzle.
(http://en.wikipedia.org/wiki/Call-with-current-continuation )
>
--
Oleg Parashchenko olpa@ http://uucode.com/
http://uucode.com/blog/ XML, TeX, Python, Mac, Chess
More information about the Gambit-list
mailing list