klisp

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

commit 71b84e2ce6a73156f52624ee7f820ee8f11b1c25
parent 38507b52be58fb458813073fd5b15d045929960e
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Sun, 26 Aug 2012 03:01:49 -0300

Some minor comments.

Diffstat:
Msrc/kgerrors.h | 2+-
Msrc/kstate.h | 5+++++
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/kgerrors.h b/src/kgerrors.h @@ -11,7 +11,7 @@ /* init ground */ void kinit_error_ground_env(klisp_State *K); -/* init cont names */ +/* init continuation names */ void kinit_error_cont_names(klisp_State *K); #endif diff --git a/src/kstate.h b/src/kstate.h @@ -269,6 +269,11 @@ static inline bool ks_sisempty(klisp_State *K); #define ks_selem(st_, i_) ((ks_sbuf(st_))[i_]) /* LOCK: All these functions should be called with the GIL already acquired */ +/* XXX/REFACTOR: the problem with these is that if the lock is acquired here + there's no way to protect the value just popped, it's no longer in the + stack, but the calling function has no way to protect it. One alternative + would be to take a ks_vars-protected TValue pointer and put the value there. + The other would be using a stack like lua for this... */ static inline void ks_spush(klisp_State *K, TValue obj) { ks_selem(K, ks_stop(K)) = obj;