aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-01-24 17:10:48 +0000
committerdos-reis <gdr@axiomatics.org>2011-01-24 17:10:48 +0000
commitf7ca9bfa04d335e47daab91fa556b43a5369270e (patch)
tree75b7d7e62056a10ac88b7017dc75f128af772abf /src/interp
parentc8e50c69725188f4a48d1e215d00d917dfc7c3d1 (diff)
downloadopen-axiom-f7ca9bfa04d335e47daab91fa556b43a5369270e.tar.gz
* algebra/array1.spad.pamphlet: Use %aref instead of %vref.
* interp/g-opt.boot (optSETRECORDELT): Tidy code generation. (optRECORDCOPY): Likewise. (optRECORDELT): Likewise. ($VMsideEffectFreeOperators): Include %aref. Translate.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot16
-rw-r--r--src/interp/g-util.boot3
2 files changed, 10 insertions, 9 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 827a750a..1de0de78 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -407,21 +407,21 @@ optRECORDELT ["RECORDELT",name,ind,len] ==
ind=0 => ['%head,name]
ind=1 => ['%tail,name]
keyedSystemError("S2OO0002",[ind])
- ["QVELT",name,ind]
+ ['%vref,name,ind]
optSETRECORDELT ["SETRECORDELT",name,ind,len,expr] ==
len=1 =>
- ind=0 => ["PROGN",["RPLACA",name,expr],['%head,name]]
+ ind = 0 => ['SEQ,['%store,['%head,name],expr],['EXIT,['%head,name]]]
keyedSystemError("S2OO0002",[ind])
len=2 =>
- ind=0 => ["PROGN",['%store,['%head,name],expr],['%head,name]]
- ind=1 => ["PROGN",['%store,['%tail,name],expr],['%tail,name]]
+ ind = 0 => ['SEQ,['%store,['%head,name],expr],['EXIT,['%head,name]]]
+ ind = 1 => ['SEQ,['%store,['%tail,name],expr],['EXIT,['%tail,name]]]
keyedSystemError("S2OO0002",[ind])
- ["QSETVELT",name,ind,expr]
+ ['%store,['%vref,name,ind],expr]
optRECORDCOPY ["RECORDCOPY",name,len] ==
- len=1 => ["LIST",['%head,name]]
- len=2 => ["CONS",['%head,name],['%tail,name]]
+ len = 1 => ["LIST",['%head,name]]
+ len = 2 => ['%makepair,['%head,name],['%tail,name]]
["REPLACE",["MAKE_-VEC",len],name]
optSuchthat [.,:u] == ["SUCHTHAT",:u]
@@ -453,7 +453,7 @@ $VMsideEffectFreeOperators ==
%lreverse %lempty? %hash %ismall? %string? %f2s
%ccst %ceq %clt %cle %cgt %cge %c2i %i2c %s2c %cup %cdown %sname
%strlength %streq %i2s %schar %strlt %strconc %strcopy %strstc
- %vref %vlength
+ %aref %vref %vlength
%bitvecnot %bitvecand %bitvecnand %bivecor %bitvecnor %bitvecxor
%bitveccopy %bitvecconc %bitveclength %bitvecref %bitveceq
%before?)
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 197da15a..e0fc1d07 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -566,7 +566,8 @@ for x in [
-- simple vector operations
['%vfill, :'FILL],
['%vlength, :'sizeOfSimpleArray],
- ['%vref, :'getSimpleArrayEntry],
+ ['%vref, :'SVREF],
+ ['%aref, :'getSimpleArrayEntry],
-- symbol unary functions
['%gensym, :'GENSYM],