From 5887c54d95b5bc62167a5e22e56e515cda7a7244 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 20 Mar 2011 19:21:34 +0000 Subject: * interp/g-opt.boot ($VMsideEffectFreeOperators): Include %bytevec2str and %str2bytevec opcode. * interp/lisp-backend.boot: Expand them. * algebra/data.spad.pamphlet (ByteBuffer): Tidy. --- src/interp/lisp-backend.boot | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/interp/lisp-backend.boot') 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], -- cgit v1.2.3