1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

* eval.c (SCM_APPLY), sort.c (closureless): Expand body when

evaluating closures.
This commit is contained in:
Mikael Djurfeldt 1999-08-19 19:01:19 +00:00
parent 7f214e6066
commit 2ddb09208b
2 changed files with 19 additions and 3 deletions

View file

@ -3542,9 +3542,23 @@ tail:
}
args = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), args, SCM_ENV (proc));
proc = SCM_CODE (proc);
while (SCM_NNULLP (proc = SCM_CDR (proc)))
arg1 = EVALCAR (proc, args);
proc = SCM_CDR (SCM_CODE (proc));
do
{
if (SCM_IMP (SCM_CAR (proc)))
{
if (SCM_ISYMP (SCM_CAR (proc)))
{
proc = scm_m_expand_body (proc, args);
continue;
}
arg1 = SCM_CAR (proc);
}
else
arg1 = SCM_CEVAL (SCM_CAR (proc), args);
proc = SCM_CDR (proc);
}
while (SCM_NNULLP (proc));
RETURN (arg1);
case scm_tc7_contin:
SCM_ASRTGO (SCM_NULLP (args), wrongnumargs);

View file

@ -354,6 +354,8 @@ closureless (SCM code, const void *a, const void *b)
SCM_ENV (code));
/* Evaluate the closure body */
code = SCM_CDR (SCM_CODE (code));
while (SCM_IMP (SCM_CAR (code)) && SCM_ISYMP (SCM_CAR (code)))
code = scm_m_expand_body (code, env);
next = code;
while (SCM_NNULLP (next = SCM_CDR (next)))
{