klisp

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

commit f47cd77a98a21d4efcb7223c09a26a92731cab3a
parent bbfb9b6f1f22f2af5afe7c6c939939ee3c1034af
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 25 Nov 2011 12:47:31 -0300

Bugfix: changed a couple of gc object pushes to var pushes.

Diffstat:
MTODO | 4++++
Msrc/klisp.c | 8++++----
2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/TODO b/TODO @@ -8,6 +8,10 @@ ** use some convention for ground operative underlaying function names maybe add "kgop_" ** use a better convention for continuation underlaying function names +** try to use krooted_vars_push more to save some lines and avoid + clutter (e.g. when creating continuations) +** Study differrent c interfaces (maybe a stack like in lua would be + better than dealing with gc push/pop * fix: ** current-jiffy (r7rs) ** jiffies-per-second (r7rs) diff --git a/src/klisp.c b/src/klisp.c @@ -514,8 +514,8 @@ static void populate_argument_lists(klisp_State *K, char **argv, int argc, /* first create the script list */ TValue tail = KNIL; TValue obj = KINERT; - krooted_tvs_push(K, tail); - krooted_tvs_push(K, obj); + krooted_vars_push(K, &tail); + krooted_vars_push(K, &obj); while(argc > script) { char *arg = argv[--argc]; obj = kstring_new_b_imm(K, arg); @@ -538,8 +538,8 @@ static void populate_argument_lists(klisp_State *K, char **argv, int argc, obj = kunwrap(kget_binding(K, K->ground_env, obj)); tv2op(obj)->extra[0] = tail; - krooted_tvs_pop(K); - krooted_tvs_pop(K); + krooted_vars_pop(K); + krooted_vars_pop(K); } static int handle_klispinit(klisp_State *K)