klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 151a3b4c480572fcdc7cd0c6017fbdfe297bce2e
parent eac54a6a7063d4ca67e1cb2236c8cd8dcb7b2546
Author: Oto Havle <havleoto@gmail.com>
Date:   Fri,  4 Nov 2011 22:39:26 +0100

Bugfix: let/cc body now properly rooted.

Diffstat:
Msrc/kgcontinuations.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/kgcontinuations.c b/src/kgcontinuations.c @@ -253,6 +253,7 @@ void Slet_cc(klisp_State *K, TValue *xparams, TValue ptree, /* the list of instructions is copied to avoid mutation */ /* MAYBE: copy the evaluation structure, ASK John */ TValue ls = check_copy_list(K, "$let/cc", objs, false); + krooted_tvs_push(K, ls); /* this is needed because seq continuation doesn't check for nil sequence */ @@ -264,6 +265,7 @@ void Slet_cc(klisp_State *K, TValue *xparams, TValue ptree, } krooted_tvs_pop(K); + krooted_tvs_pop(K); ktail_eval(K, kcar(ls), new_env); }