[uim-commit] r2356 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Dec 4 06:09:37 PST 2005
Author: yamaken
Date: 2005-12-04 06:09:32 -0800 (Sun, 04 Dec 2005)
New Revision: 2356
Modified:
branches/r5rs/sigscheme/operations-srfi8.c
Log:
* sigscheme/operations-srfi8.c
- (ScmExp_SRFI8_receive): Make efficient with the rewritten
Scm_ExtendEnvironment()
Modified: branches/r5rs/sigscheme/operations-srfi8.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi8.c 2005-12-04 14:02:00 UTC (rev 2355)
+++ branches/r5rs/sigscheme/operations-srfi8.c 2005-12-04 14:09:32 UTC (rev 2356)
@@ -80,6 +80,9 @@
ScmObj actuals = SCM_FALSE;
DECLARE_FUNCTION("receive", SyntaxVariadicTailRec2);
+ if (!(CONSP(formals) || NULLP(formals) || SYMBOLP(formals)))
+ ERR_OBJ("bad formals", formals);
+
/* FIXME: do we have to extend the environment first? The SRFI-8
* document contradicts itself on this part. */
actuals = EVAL(expr, env);
@@ -89,18 +92,7 @@
else
actuals = CONS(actuals, SCM_NULL);
-#if 1
- return Scm_tailcall(Scm_NewClosure(CONS(formals, body), env),
- actuals,
- eval_state);
-#else
- /* fast path */
-
- /* TODO: Support (receive args <exp> <body>) and (receive (a b . rest)
- * <exp> <body>)style forms by revising the Scm_ExtendEnvironment().
- */
eval_state->env = env = Scm_ExtendEnvironment(formals, actuals, env);
return ScmExp_begin(body, eval_state);
-#endif
}
More information about the uim-commit
mailing list