aboutsummaryrefslogtreecommitdiff
path: root/src/interp/lisp-backend.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-20 19:21:34 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-20 19:21:34 +0000
commit5887c54d95b5bc62167a5e22e56e515cda7a7244 (patch)
treeedc430accc6075c307a40f252f7f50643b6c9f0f /src/interp/lisp-backend.boot
parentadac8d95735aa3dc001658f2438b79d1c38a58d4 (diff)
downloadopen-axiom-5887c54d95b5bc62167a5e22e56e515cda7a7244.tar.gz
* interp/g-opt.boot ($VMsideEffectFreeOperators): Include
%bytevec2str and %str2bytevec opcode. * interp/lisp-backend.boot: Expand them. * algebra/data.spad.pamphlet (ByteBuffer): Tidy.
Diffstat (limited to 'src/interp/lisp-backend.boot')
-rw-r--r--src/interp/lisp-backend.boot10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index 8a9a2a4c..b5c47b39 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -317,6 +317,12 @@ expandStrlt ['%strlt,x,y] ==
expandStrstc ['%strstc,x,y,z] ==
expandToVMForm ['%store,['%schar,x,y],z]
+expandBytevec2str ['%bytevec2str,x,y] ==
+ ['COERCE,['SUBSEQ,expandToVMForm x,0,expandToVMForm y],quoteForm '%String]
+
+expandStr2bytevec ['%str2bytevec,x] ==
+ ['COERCE,expandToVMForm x,quoteForm ['%Vector,'%Byte]]
+
-- bit vector operations
expandBitvecnot ['%bitvecnot,x] ==
['BIT_-NOT,expandToVMForm x]
@@ -447,7 +453,7 @@ for x in [
['%or, :'OR],
-- character operations
- ['%ccstmax,:'_$CharCodeMax],
+ ['%ccstmax,:'_$CharCodeMaximum],
['%ceq, :'CHAR_=],
['%clt, :'CHAR_<],
['%cle, :'CHAR_<_=],
@@ -643,6 +649,8 @@ for x in [
['%streq, :function expandStreq],
['%strlt, :function expandStrlt],
['%strstc, :function expandStrstc],
+ ['%bytevec2str, :function expandBytevec2str],
+ ['%str2bytevec, :function expandStr2bytevec],
['%bitvecnot, :function expandBitvecnot],
['%bitvecand, :function expandBitvecand],