[uim-commit] r1723 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Fri Sep 30 22:18:50 PDT 2005
Author: kzk
Date: 2005-09-30 22:18:48 -0700 (Fri, 30 Sep 2005)
New Revision: 1723
Modified:
branches/r5rs/sigscheme/eval.c
Log:
* variable lookup optimization
* sigscheme/eval.c
- (Scm_ExtendEnvironment): change destructively "rest_vars"
when dot list appears as like as "rest_vals"
- (lookup_frame): now no need to handle dot list in this
function
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-10-01 04:55:57 UTC (rev 1722)
+++ branches/r5rs/sigscheme/eval.c 2005-10-01 05:18:48 UTC (rev 1723)
@@ -122,6 +122,7 @@
/* dot list appeared: fold the rest values into a variable */
if (SYMBOLP(CDR(rest_vars))) {
+ SET_CDR(rest_vars, LIST_1(CDR(rest_vars)));
SET_CDR(rest_vals, LIST_1(CDR(rest_vals)));
break;
}
@@ -208,14 +209,8 @@
!NULLP(vars);
vars = CDR(vars), vals = CDR(vals))
{
- if (SYMBOLP(vars)) {
- /* handle dot list */
- return (EQ(vars, var)) ? vals : SCM_NULL;
- } else {
- /* normal binding */
- if (EQ(CAR(vars), var))
- return vals;
- }
+ if (EQ(CAR(vars), var))
+ return vals;
}
return SCM_NULL;
More information about the uim-commit
mailing list