klisp

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

commit 25274d11f0f5c3393faefc8ff23876c54f7838dc
parent 7700db0ca46a276dc4c98b29513cb558ea9575d7
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 11 Mar 2011 02:31:07 -0300

Added macro ktail_eval for the common case of ktail_call to K->eval_op. Changed tail_call macro to include braces so that it is not multiple statements.

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

diff --git a/src/kstate.h b/src/kstate.h @@ -306,7 +306,11 @@ inline void klispS_tail_call(klisp_State *K, TValue top, TValue ptree, } #define ktail_call(K_, op_, p_, e_) \ - klispS_tail_call((K_), (op_), (p_), (e_)); return + { klispS_tail_call((K_), (op_), (p_), (e_)); return; } + +#define ktail_eval(K_, p_, e_) \ + { klisp_State *K__ = (K_); \ + klispS_tail_call(K__, K__->eval_op, (p_), (e_)); return; } void kcall_cont(klisp_State *K, TValue dst_cont, TValue obj); void klispS_init_repl(klisp_State *K);