[uim-commit] r2352 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Dec 4 04:05:11 PST 2005
Author: yamaken
Date: 2005-12-04 04:05:06 -0800 (Sun, 04 Dec 2005)
New Revision: 2352
Modified:
branches/r5rs/sigscheme/eval.c
Log:
* sigscheme/eval.c
- (EVAL_ARGS, SUPPRESS_EVAL_ARGS): New macro
- (Scm_tailcall, Scm_call, Scm_eval, ScmOp_apply): Make 4th argument
to call() symbolic
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-12-04 11:57:57 UTC (rev 2351)
+++ branches/r5rs/sigscheme/eval.c 2005-12-04 12:05:06 UTC (rev 2352)
@@ -61,6 +61,9 @@
/*=======================================
File Local Macro Declarations
=======================================*/
+#define EVAL_ARGS 0
+#define SUPPRESS_EVAL_ARGS 1
+
#define IS_LIST_LEN_1(args) (CONSP(args) && NULLP(CDR(args)))
/* for the quasiquote family */
#define QQUOTE_SET_VERBATIM(x) ((x) = SCM_INVALID)
@@ -241,7 +244,7 @@
ScmObj Scm_tailcall(ScmObj proc, ScmObj args, ScmEvalState *eval_state)
{
eval_state->ret_type = SCM_RETTYPE_AS_IS;
- return call(proc, args, eval_state, 1);
+ return call(proc, args, eval_state, SUPPRESS_EVAL_ARGS);
}
/* Wrapper for call(). Just like ScmOp_apply(), except ARGS is used
@@ -260,7 +263,7 @@
state.env = SCM_INTERACTION_ENV;
state.ret_type = SCM_RETTYPE_AS_IS;
- ret = call(proc, args, &state, 1);
+ ret = call(proc, args, &state, SUPPRESS_EVAL_ARGS);
if (state.ret_type == SCM_RETTYPE_NEED_EVAL)
ret = EVAL(ret, state.env);
return ret;
@@ -512,7 +515,7 @@
break;
case ScmCons:
- obj = call(CAR(obj), CDR(obj), &state, 0);
+ obj = call(CAR(obj), CDR(obj), &state, EVAL_ARGS);
if (state.ret_type == SCM_RETTYPE_NEED_EVAL)
goto eval_loop;
/* FALLTHROUGH */
@@ -549,7 +552,7 @@
ASSERT_LISTP(last);
/* The last argument inhibits argument re-evaluation. */
- return call(proc, args, eval_state, 1);
+ return call(proc, args, eval_state, SUPPRESS_EVAL_ARGS);
}
/* 'var' must be a symbol as precondition */
More information about the uim-commit
mailing list