[uim-commit] r1725 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Fri Sep 30 23:14:38 PDT 2005
Author: kzk
Date: 2005-09-30 23:14:35 -0700 (Fri, 30 Sep 2005)
New Revision: 1725
Modified:
branches/r5rs/sigscheme/eval.c
Log:
* sigscheme/eval.c
- (lookup_frame): optimize loop for handling dot list
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-10-01 05:59:19 UTC (rev 1724)
+++ branches/r5rs/sigscheme/eval.c 2005-10-01 06:14:35 UTC (rev 1725)
@@ -205,19 +205,17 @@
/* lookup in frame */
for (vars = CAR(frame), vals = CDR(frame);
- !NULLP(vars);
+ CONSP(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;
}
+ /* handle dot list */
+ if (!NULLP(vars) && SYMBOLP(vars))
+ return (EQ(vars, var)) ? vals : SCM_NULL;
+
return SCM_NULL;
}
More information about the uim-commit
mailing list