aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-01-24 20:30:28 +0000
committerdos-reis <gdr@axiomatics.org>2011-01-24 20:30:28 +0000
commit5bcd66d747349ff167ffcd3953c95faf08aa8c1e (patch)
tree34cf0342dffa465c4c9ea6fc2732de795e99ddfd /src
parentf7ca9bfa04d335e47daab91fa556b43a5369270e (diff)
downloadopen-axiom-5bcd66d747349ff167ffcd3953c95faf08aa8c1e.tar.gz
* interp/g-opt.boot (optMkRecord): Generate %makepair forms.
($VMsideEffectFreeOperators): Include %listlit and %veclit. * interp/g-util.boot: Translate them.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/algebra/strap/INT.lsp2
-rw-r--r--src/algebra/strap/SINT.lsp2
-rw-r--r--src/interp/g-opt.boot9
-rw-r--r--src/interp/g-util.boot3
5 files changed, 16 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 145f9768..cf12f64f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2011-01-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/g-opt.boot (optMkRecord): Generate %makepair forms.
+ ($VMsideEffectFreeOperators): Include %listlit and %veclit.
+ * interp/g-util.boot: Translate them.
+
+2011-01-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* algebra/array1.spad.pamphlet: Use %aref instead of %vref.
* interp/g-opt.boot (optSETRECORDELT): Tidy code generation.
(optRECORDCOPY): Likewise.
diff --git a/src/algebra/strap/INT.lsp b/src/algebra/strap/INT.lsp
index 32e4f83b..356a972e 100644
--- a/src/algebra/strap/INT.lsp
+++ b/src/algebra/strap/INT.lsp
@@ -115,7 +115,7 @@
|INT;reducedSystem;MVR;30|))
(PUT '|INT;reducedSystem;MVR;30| '|SPADreplace|
- '(XLAM (|m| |v|) (CONS |m| '|vec|)))
+ '(XLAM (|m| |v|) (|%makepair| |m| '|vec|)))
(DECLAIM (FTYPE (FUNCTION (|%Integer| |%Shell|) |%Integer|)
|INT;abs;2$;31|))
diff --git a/src/algebra/strap/SINT.lsp b/src/algebra/strap/SINT.lsp
index cfb59ef4..70423f3e 100644
--- a/src/algebra/strap/SINT.lsp
+++ b/src/algebra/strap/SINT.lsp
@@ -265,7 +265,7 @@
(DECLAIM (FTYPE (FUNCTION (|%Thing| (|%Vector| *) |%Shell|) |%Pair|)
|SINT;reducedSystem;MVR;57|))
-(PUT '|SINT;reducedSystem;MVR;57| '|SPADreplace| 'CONS)
+(PUT '|SINT;reducedSystem;MVR;57| '|SPADreplace| '|%makepair|)
(DECLAIM (FTYPE (FUNCTION (|%Short| |%Short| |%Shell|) |%Short|)
|SINT;positiveRemainder;3$;58|))
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 1de0de78..718c06aa 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -297,7 +297,7 @@ compileTimeBindingOf u ==
optMkRecord ["mkRecord",:u] ==
u is [x] => ["LIST",x]
- #u=2 => ["CONS",:u]
+ #u=2 => ['%makepair,:u]
["VECTOR",:u]
optCond (x is ['COND,:l]) ==
@@ -449,11 +449,11 @@ $VMsideEffectFreeOperators ==
%fpow %fdiv %fneg %i2f %fminval %fmaxval %fbase %fprec %ftrunc
%fsin %fcos %ftan %fcot %fsec %fcsc %fatan %facot
%fsinh %fcosh %ftanh %fcsch %fcoth %fsech %fasinh %facsch
- %nil %pair? %lconcat %llength %lfirst %lsecond %lthird
+ %nil %pair? %lconcat %llength %lfirst %lsecond %lthird %listlit
%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
- %aref %vref %vlength
+ %aref %vref %vlength %veclit
%bitvecnot %bitvecand %bitvecnand %bivecor %bitvecnor %bitvecxor
%bitveccopy %bitvecconc %bitveclength %bitvecref %bitveceq
%before?)
@@ -462,7 +462,8 @@ $VMsideEffectFreeOperators ==
$simpleVMoperators ==
append($VMsideEffectFreeOperators,
['CONS,'LIST,'VECTOR,'STRINGIMAGE,'FUNCALL,'%gensym, '%lreverse_!,
- '%strstc,'%makebitvec,"MAKE-FULL-CVEC","BVEC-MAKE-FULL","COND"])
+ '%strstc,'%makebitvec,'%makevector,
+ "MAKE-FULL-CVEC","BVEC-MAKE-FULL","COND"])
++ Return true if the `form' is semi-simple with respect to
++ to the list of operators `ops'.
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index e0fc1d07..38882026 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -560,14 +560,17 @@ for x in [
['%lthird, :'CADDR],
['%pair?, :'CONSP],
['%tail, :'CDR],
+ ['%listlit, :'LIST],
-- binary list operations
['%lconcat, :'APPEND],
-- simple vector operations
['%vfill, :'FILL],
['%vlength, :'sizeOfSimpleArray],
+ ['%veclit, :'VECTOR],
['%vref, :'SVREF],
['%aref, :'getSimpleArrayEntry],
+ ['%makevector,:'MAKE_-ARRAY],
-- symbol unary functions
['%gensym, :'GENSYM],