From e791c18fbbbd1cf5cbfddb580aeaf0fe6c90f3bb Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Sun, 29 Aug 1999 01:28:49 +0000 Subject: [PATCH] * eval.c (SCM_APPLY): Fixed serious evaluator bug which returned an ILOC instead of the value if a closure with a symbol as last form was first called normally and then via `map'. --- libguile/eval.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libguile/eval.c b/libguile/eval.c index 81849a47f..eb4518db6 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -3570,23 +3570,23 @@ tail: args = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), args, SCM_ENV (proc)); proc = SCM_CDR (SCM_CODE (proc)); - do + again: + arg1 = proc; + while (SCM_NNULLP (arg1 = SCM_CDR (arg1))) { if (SCM_IMP (SCM_CAR (proc))) { if (SCM_ISYMP (SCM_CAR (proc))) { proc = scm_m_expand_body (proc, args); - continue; + goto again; } - arg1 = SCM_CAR (proc); } else - arg1 = SCM_CEVAL (SCM_CAR (proc), args); - proc = SCM_CDR (proc); + SCM_CEVAL (SCM_CAR (proc), args); + proc = arg1; } - while (SCM_NNULLP (proc)); - RETURN (arg1); + RETURN (EVALCAR (proc, args)); case scm_tc7_contin: SCM_ASRTGO (SCM_NULLP (args), wrongnumargs); scm_call_continuation (proc, arg1);