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

* eval.c (SCM_CEVAL): fixed a couple of mysterious (probably

optimization related) bugs on powerpc by altering some
  "while (!SCM_NULLP (t.arg1 = SCM_CDR (t.arg1)))"
style constructs so that the assignment doesn't happen inside the guard.
This commit is contained in:
Rob Browning 2003-04-11 18:31:56 +00:00
parent bd4ed372ce
commit 9300912e0c

View file

@ -1941,13 +1941,17 @@ dispatch:
case SCM_BIT8(SCM_IM_AND): case SCM_BIT8(SCM_IM_AND):
x = SCM_CDR (x); x = SCM_CDR (x);
t.arg1 = x; t.arg1 = x;
while (SCM_NNULLP (t.arg1 = SCM_CDR (t.arg1))) t.arg1 = SCM_CDR (t.arg1);
if (SCM_FALSEP (EVALCAR (x, env))) while (SCM_NNULLP (t.arg1))
{ {
RETURN (SCM_BOOL_F); if (SCM_FALSEP (EVALCAR (x, env)))
} {
else RETURN (SCM_BOOL_F);
x = t.arg1; }
else
x = t.arg1;
t.arg1 = SCM_CDR (t.arg1);
}
PREP_APPLY (SCM_UNDEFINED, SCM_EOL); PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto carloop; goto carloop;
@ -1983,7 +1987,8 @@ dispatch:
x = SCM_CDR (x); x = SCM_CDR (x);
nontoplevel_begin: nontoplevel_begin:
t.arg1 = x; t.arg1 = x;
while (!SCM_NULLP (t.arg1 = SCM_CDR (t.arg1))) t.arg1 = SCM_CDR (t.arg1);
while (!SCM_NULLP (t.arg1))
{ {
if (SCM_IMP (SCM_CAR (x))) if (SCM_IMP (SCM_CAR (x)))
{ {
@ -1998,6 +2003,7 @@ dispatch:
else else
SCM_CEVAL (SCM_CAR (x), env); SCM_CEVAL (SCM_CAR (x), env);
x = t.arg1; x = t.arg1;
t.arg1 = SCM_CDR (t.arg1);
} }
carloop: /* scm_eval car of last form in list */ carloop: /* scm_eval car of last form in list */