klisp

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

commit 4adef400bf53b7868b902f5b1f2ca465174d5ec9
parent 5fa4bf288201f0586ef00ccd61900cb57ee9d279
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Wed, 20 Apr 2011 11:43:21 -0300

GC Bugfix: guard-dynamic-extent was not adding the dynamic environment to the created inner and outer cont. (Thanks Valgrind!).

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

diff --git a/src/kgcontinuations.c b/src/kgcontinuations.c @@ -290,12 +290,12 @@ void guard_dynamic_extent(klisp_State *K, TValue *xparams, TValue ptree, /* GC: root continuations */ /* The current continuation is guarded */ TValue outer_cont = kmake_continuation(K, kget_cc(K), do_pass_value, - 1, entry_guards); + 2, entry_guards, denv); kset_outer_cont(outer_cont); kset_cc(K, outer_cont); /* this implicitly roots outer_cont */ - TValue inner_cont = kmake_continuation(K, outer_cont, - do_pass_value, 1, exit_guards); + TValue inner_cont = kmake_continuation(K, outer_cont, do_pass_value, 2, + exit_guards, denv); kset_inner_cont(inner_cont); /* call combiner with no operands in the dynamic extent of inner,