1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-01 07:20:20 +02:00

* 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'.
This commit is contained in:
Mikael Djurfeldt 1999-08-29 01:28:49 +00:00
parent 9de33deb2e
commit e791c18fbb

View file

@ -3570,23 +3570,23 @@ tail:
args = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), args, SCM_ENV (proc)); args = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), args, SCM_ENV (proc));
proc = SCM_CDR (SCM_CODE (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_IMP (SCM_CAR (proc)))
{ {
if (SCM_ISYMP (SCM_CAR (proc))) if (SCM_ISYMP (SCM_CAR (proc)))
{ {
proc = scm_m_expand_body (proc, args); proc = scm_m_expand_body (proc, args);
continue; goto again;
} }
arg1 = SCM_CAR (proc);
} }
else else
arg1 = SCM_CEVAL (SCM_CAR (proc), args); SCM_CEVAL (SCM_CAR (proc), args);
proc = SCM_CDR (proc); proc = arg1;
} }
while (SCM_NNULLP (proc)); RETURN (EVALCAR (proc, args));
RETURN (arg1);
case scm_tc7_contin: case scm_tc7_contin:
SCM_ASRTGO (SCM_NULLP (args), wrongnumargs); SCM_ASRTGO (SCM_NULLP (args), wrongnumargs);
scm_call_continuation (proc, arg1); scm_call_continuation (proc, arg1);