aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot2
-rw-r--r--src/interp/lisp-backend.boot10
2 files changed, 10 insertions, 2 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index aca6a00c..2d1f9151 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -448,7 +448,7 @@ $VMsideEffectFreeOperators ==
%ccst %ccstmax %ceq %clt %cle %cgt %cge %c2i %i2c %s2c %c2s %cup %cdown
%sname
%strlength %streq %i2s %schar %strlt %strconc %strcopy
- %vector %aref %vref %vlength
+ %vector %aref %vref %vlength %bytevec2str %str2bytevec
%bitvector
%bitvecnot %bitvecand %bitvecnand %bivecor %bitvecnor %bitvecxor
%bitveccopy %bitvecconc %bitveclength %bitvecref %bitveceq %bitveclt
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],