commit 237cb2a3b9c09990fa846eb48c1ad2e217318712
parent 4cf1a4b2f1fed3860c33f8f279d11fe4247cabb5
Author: Andres Navarro <canavarro82@gmail.com>
Date: Sat, 16 Apr 2011 17:07:15 -0300
Adapted kevel to new gc rooting policies.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/keval.c b/src/keval.c
@@ -110,13 +110,17 @@ void combine_cfn(klisp_State *K, TValue *xparams, TValue obj)
/* make a copy of the operands (for storing arguments) */
TValue tail;
TValue arg_ls = make_arg_ls(K, operands, &tail);
+ krooted_tvs_push(K, arg_ls);
TValue comb_cont = kmake_continuation(K, kget_cc(K), &combine_cfn,
2, arg_ls, env);
+ krooted_tvs_pop(K, arg_ls); /* already in cont */
+ krooted_tvs_push(K, comb_cont);
TValue els_cont =
kmake_continuation(K, comb_cont, &eval_ls_cfn, 4, arg_ls, env,
tail, tv2app(obj)->underlying);
kset_cc(K, els_cont);
+ krooted_tvs_pop(K);
ktail_eval(K, kcar(arg_ls), env);
} else {
klispE_throw(K, "Not a list in applicative combination");
@@ -134,7 +138,7 @@ void combine_cfn(klisp_State *K, TValue *xparams, TValue obj)
/* the underlying function of the eval operative */
void keval_ofn(klisp_State *K, TValue *xparams, TValue obj, TValue env)
{
- (void) xparams;
+ UNUSED(xparams);
switch(ttype(obj)) {
case K_TPAIR: {