aboutsummaryrefslogtreecommitdiff
path: root/src/boot/ast.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-05-07 00:04:39 +0000
committerdos-reis <gdr@axiomatics.org>2010-05-07 00:04:39 +0000
commite869c4e050f29dffb51d26f53489422020f49e4f (patch)
tree19fa59732d0162b8b22c8c472f34f807a3d55122 /src/boot/ast.boot
parent62fb1ed88e7c6a94e1ba833a2078cc162e1a44f9 (diff)
downloadopen-axiom-e869c4e050f29dffb51d26f53489422020f49e4f.tar.gz
* boot/ast.boot: Translate assignment to head and tail of a list.
Remove explicit uses of RPLACA and RPLACD. * boot/includer.boot: Likewise. * boot/scanner.boot: Likewise. * boot/translator.boot: Likewise.
Diffstat (limited to 'src/boot/ast.boot')
-rw-r--r--src/boot/ast.boot8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 04a2888b..97bd8e92 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -622,7 +622,7 @@ bfISReverse(x,a) ==
x is ['CONS,:.] =>
null third x => ['CONS,second x, a]
y := bfISReverse(third x, NIL)
- RPLACA(CDDR y,['CONS,second x,a])
+ y.rest.rest.first := ['CONS,second x,a]
y
bpSpecificErrorHere '"Error in bfISReverse"
bpTrap()
@@ -904,7 +904,7 @@ shoeCompTran1 x==
U:=car x
U = "QUOTE" => nil
x is ["L%T",l,r] =>
- RPLACA (x,"SETQ")
+ x.first := "SETQ"
shoeCompTran1 r
IDENTP l =>
not bfBeginsDollar l=>
@@ -918,7 +918,7 @@ shoeCompTran1 x==
$fluidVars:=
MEMQ(second l,$fluidVars)=>$fluidVars
cons(second l,$fluidVars)
- RPLACA (rest x,second l)
+ x.rest.first := second l
U in '(PROG LAMBDA) =>
newbindings:=nil
for y in second x repeat
@@ -959,6 +959,8 @@ defSETELT(var,sel,expr)==
y := symbol? sel and sel has SHOESELFUNCTION
y =>
integer? y => ["SETF",["ELT",var,y],expr]
+ y = "CAR" => ["RPLACA",var,expr]
+ y = "CDR" => ["RPLACD",var,expr]
["SETF",[y,var],expr]
["SETF",["ELT",var,sel],expr]