aboutsummaryrefslogtreecommitdiff
path: root/src/boot/ast.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-04-27 22:27:33 +0000
committerdos-reis <gdr@axiomatics.org>2011-04-27 22:27:33 +0000
commit6a5ae8ebc949855925c5e5763f11601c2f64339e (patch)
tree612f2ea256a73521751d8563c7762f3c15669574 /src/boot/ast.boot
parent320d0c5d61b2fc8cb6780b9c7e426a76e126307a (diff)
downloadopen-axiom-6a5ae8ebc949855925c5e5763f11601c2f64339e.tar.gz
* boot/ast.boot (bfMakeCollectInsn): Fix thinko.
Diffstat (limited to 'src/boot/ast.boot')
-rw-r--r--src/boot/ast.boot6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index d76fcb72..1e45f7f2 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -383,8 +383,10 @@ bfListReduce(op,y,itl)==
bfLp2(extrait,itl,body)
bfMakeCollectInsn(expr,prev,head,adv) ==
- bfIf(['NULL,head],['SETQ,head,['SETQ,prev,expr]],
- bfMKPROGN [['RPLACD,prev,expr],['SETQ,prev,[adv,prev]]])
+ firstTime := bfMKPROGN
+ [['SETQ,head,expr],['SETQ,prev,(adv is 'CDR => head; [adv,head])]]
+ otherTime := bfMKPROGN [['RPLACD,prev,expr],['SETQ,prev,[adv,prev]]]
+ bfIf(['NULL,head],firstTime,otherTime)
bfDoCollect(expr,itl,adv,k) ==
head := bfGenSymbol() -- pointer to the result