aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-09 19:17:32 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-09 19:17:32 +0000
commitbcff036777b4f79aa17513849fc0e0a2ee5f9099 (patch)
treeebc78eb2e942ad1dc5b0284bdefe3b79bcb0058a /src/interp
parent010633b20de9643ac34409552bbbb4366038ecf7 (diff)
downloadopen-axiom-bcff036777b4f79aa17513849fc0e0a2ee5f9099.tar.gz
* interp/g-opt.boot: %pair, %list, %vector, %bitvector are now
considered side-effect free functions. * algebra/boolean.spad.pamphlet: Reflect change. * algebra/Makefile.in (oa_strap_0_sources): Include MAYBE.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot11
-rw-r--r--src/interp/lisp-backend.boot4
2 files changed, 8 insertions, 7 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index b7a72aca..59cb8363 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -443,11 +443,12 @@ $VMsideEffectFreeOperators ==
%val2z %z2val %zlit %zreal %zimag
%zexp %zlog %zsin %zcos %ztan %zasin %zacos %zatan
%zsinh %zcosh %ztanh %zasinh %zacosh %zatanh
- %nil %pair? %lconcat %llength %lfirst %lsecond %lthird
+ %nil %pair %list %pair? %lconcat %llength %lfirst %lsecond %lthird
%lreverse %lempty? %hash %ismall? %string? %f2s
%ccst %ceq %clt %cle %cgt %cge %c2i %i2c %s2c %c2s %cup %cdown %sname
%strlength %streq %i2s %schar %strlt %strconc %strcopy
- %aref %vref %vlength
+ %vector %aref %vref %vlength
+ %bitvector
%bitvecnot %bitvecand %bitvecnand %bivecor %bitvecnor %bitvecxor
%bitveccopy %bitvecconc %bitveclength %bitvecref %bitveceq %bitveclt
%before? %equal %sptreq %ident? %property %tref)
@@ -455,9 +456,8 @@ $VMsideEffectFreeOperators ==
++ List of simple VM operators
$simpleVMoperators ==
append($VMsideEffectFreeOperators,
- ['STRINGIMAGE,'FUNCALL,'%gensym, '%lreverse_!,'%pair,'%list,
- '%strstc,'%makebitvec,'%makevector,'%vector,
- "MAKE-FULL-CVEC","BVEC-MAKE-FULL"])
+ ['STRINGIMAGE,'FUNCALL,'%gensym, '%lreverse_!,
+ '%strstc,"MAKE-FULL-CVEC","BVEC-MAKE-FULL"])
++ Return true if the `form' is semi-simple with respect to
++ to the list of operators `ops'.
@@ -495,6 +495,7 @@ isVMConstantForm: %Code -> %Boolean
isVMConstantForm form ==
integer? form or string? form => true
form isnt [op,:args] => false
+ op in '(%list %pair %vector) => false
MEMQ(op,$VMsideEffectFreeOperators) and
"and"/[isVMConstantForm arg for arg in args]
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index 7a068efb..1899ec39 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -354,7 +354,7 @@ expandBitveceq ['%bitveceq,x,y] ==
expandBitveclt ['%bitveclt,x,y] ==
['BVEC_-GREATER,expandToVMForm y,expandToVMForm x]
-expandMakebitvec ['%makebitvec,x,y] ==
+expandBitvector ['%bitvector,x,y] ==
['MAKE_-ARRAY,['LIST,expandToVMForm x],
KEYWORD::ELEMENT_-TYPE,quoteForm '%Bit,
KEYWORD::INITIAL_-ELEMENT,expandToVMForm y]
@@ -651,7 +651,7 @@ for x in [
['%bitveceq, :function expandBitveceq],
['%bitveclt, :function expandBitveclt],
['%bitvecref, :function expandBitvecref],
- ['%makebitvec, :function expandMakebitvec],
+ ['%bitvector, :function expandBitvector],
['%peq, :function expandPeq],
['%before?, :function expandBefore?],