summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2003-04-21 01:07:09 +0000
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2003-04-21 01:07:09 +0000
commit05b1536228c22eeeeb5db66dd0a929e5e2888bc9 (patch)
tree5309ecfef180735dc69c02cdc96ee730c3e21f8a
parent0c88d7dfae7a3a3fb1cfe5d4422666d1dc34ca70 (diff)
downloadguile-05b1536228c22eeeeb5db66dd0a929e5e2888bc9.tar.gz
* 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.
-rw-r--r--libguile/ChangeLog6
-rw-r--r--libguile/eval.c24
2 files changed, 20 insertions, 10 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 3e38bb95e..791af93e7 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,5 +1,11 @@
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
compare SCM values with !=.
diff --git a/libguile/eval.c b/libguile/eval.c
index f7d1c584c..7c2d6e81a 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -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));