aboutsummaryrefslogtreecommitdiff
path: root/src/interp/lisp-backend.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-05-13 05:10:19 +0000
committerdos-reis <gdr@axiomatics.org>2013-05-13 05:10:19 +0000
commit79e0bdea715eea9bbbe308777a1a7a8b1d8c72f4 (patch)
treede2a221c52595d917d2f55824f1b8da8b98a05c3 /src/interp/lisp-backend.boot
parent6c8119a8b2cc0b039dced28cf6cc1c6df45c59f7 (diff)
downloadopen-axiom-79e0bdea715eea9bbbe308777a1a7a8b1d8c72f4.tar.gz
* interp/g-opt.boot (%array2list): New side-effect free opcode.
* interp/lisp-backend.boot: Expand it. * algebra/array1.spad.pamphlet (PrimitiveArray): Implement maxIndex, parts, and members.
Diffstat (limited to 'src/interp/lisp-backend.boot')
-rw-r--r--src/interp/lisp-backend.boot4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index 6fb119e8..d1fa2d74 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -190,6 +190,9 @@ expandList(x is ['%list,:args]) ==
args' = 'failed => ['LIST,:args]
quote args'
+expandArray2List ['%array2list,x] ==
+ ['COERCE,expandToVMForm x,quote 'LIST]
+
expandLeave ['%leave,l,x] ==
x := expandToVMForm x
l = nil => ['RETURN,x]
@@ -672,6 +675,7 @@ for x in [
++ Table of opcode-expander pairs.
for x in [
['%list, :function expandList],
+ ['%array2list, :function expandArray2List],
['%collect, :function expandCollect],
['%repeat, :function expandRepeat],
['%return, :function expandReturn],