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

* eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,

scm_copy_tree): Place assignment expressions which are part of
	other expressions into an expression of their own.
This commit is contained in:
Dirk Herrmann 2003-04-21 01:07:09 +00:00
parent 0c88d7dfae
commit 05b1536228
2 changed files with 20 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
* eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
scm_copy_tree): Place assignment expressions which are part of
other expressions into an expression of their own.
2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
* goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't

View file

@ -1422,7 +1422,8 @@ unmemocopy (SCM x, SCM env)
if (SCM_IMP (b))
{
SCM_SETCDR (y, SCM_EOL);
ls = scm_cons (scm_sym_let, z = scm_cons (y, SCM_UNSPECIFIED));
z = scm_cons (y, SCM_UNSPECIFIED);
ls = scm_cons (scm_sym_let, z);
break;
}
do
@ -1438,7 +1439,8 @@ unmemocopy (SCM x, SCM env)
while (SCM_NIMP (b));
SCM_SETCDR (z, SCM_EOL);
letstar:
ls = scm_cons (scm_sym_letstar, z = scm_cons (y, SCM_UNSPECIFIED));
z = scm_cons (y, SCM_UNSPECIFIED);
ls = scm_cons (scm_sym_letstar, z);
break;
}
case SCM_BIT7 (SCM_IM_OR):
@ -3636,10 +3638,9 @@ tail:
else
{
SCM tl = args = scm_cons (SCM_CAR (arg1), SCM_UNSPECIFIED);
while (arg1 = SCM_CDR (arg1), SCM_CONSP (arg1))
for (arg1 = SCM_CDR (arg1); SCM_CONSP (arg1); arg1 = SCM_CDR (arg1))
{
SCM_SETCDR (tl, scm_cons (SCM_CAR (arg1),
SCM_UNSPECIFIED));
SCM_SETCDR (tl, scm_cons (SCM_CAR (arg1), SCM_UNSPECIFIED));
tl = SCM_CDR (tl);
}
SCM_SETCDR (tl, arg1);
@ -3648,8 +3649,8 @@ tail:
args = EXTEND_ENV (SCM_CLOSURE_FORMALS (proc), args, SCM_ENV (proc));
proc = SCM_CLOSURE_BODY (proc);
again:
arg1 = proc;
while (!SCM_NULLP (arg1 = SCM_CDR (arg1)))
arg1 = SCM_CDR (proc);
while (!SCM_NULLP (arg1))
{
if (SCM_IMP (SCM_CAR (proc)))
{
@ -3668,6 +3669,7 @@ tail:
else
SCM_CEVAL (SCM_CAR (proc), args);
proc = arg1;
arg1 = SCM_CDR (proc);
}
RETURN (EVALCAR (proc, args));
case scm_tc7_smob:
@ -4140,7 +4142,8 @@ scm_map (SCM proc, SCM arg1, SCM args)
}
return res;
}
args = scm_vector (arg1 = scm_cons (arg1, args));
arg1 = scm_cons (arg1, args);
args = scm_vector (arg1);
ve = SCM_VELTS (args);
check_map_args (args, len, g_map, proc, arg1, s_map);
while (1)
@ -4202,7 +4205,8 @@ scm_for_each (SCM proc, SCM arg1, SCM args)
}
return SCM_UNSPECIFIED;
}
args = scm_vector (arg1 = scm_cons (arg1, args));
arg1 = scm_cons (arg1, args);
args = scm_vector (arg1);
ve = SCM_VELTS (args);
check_map_args (args, len, g_for_each, proc, arg1, s_for_each);
while (1)
@ -4339,7 +4343,7 @@ SCM_DEFINE (scm_copy_tree, "copy-tree", 1, 0, 0,
ans = tl = scm_cons_source (obj,
scm_copy_tree (SCM_CAR (obj)),
SCM_UNSPECIFIED);
while (obj = SCM_CDR (obj), SCM_CONSP (obj))
for (obj = SCM_CDR (obj); SCM_CONSP (obj); obj = SCM_CDR (obj))
{
SCM_SETCDR (tl, scm_cons (scm_copy_tree (SCM_CAR (obj)),
SCM_UNSPECIFIED));