diff options
author | dos-reis <gdr@axiomatics.org> | 2011-08-11 04:58:15 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-08-11 04:58:15 +0000 |
commit | 7d8802bb51e5f907e661469b94bf352766d7ffde (patch) | |
tree | 0df2118585747139d2e6a0a0c50086f73abe6b55 /src | |
parent | 7c7d44f1dc284e4c4e231d97023aa87ecd5f8e44 (diff) | |
download | open-axiom-7d8802bb51e5f907e661469b94bf352766d7ffde.tar.gz |
* interp/lisp-backend.boot (expandBytevec2str): Use MAP instead of
COERCE. Eliminate second argument.
(expandStr2bytevec): Use MAP instead of COERCE.
* algebra/data.spad.pamphlet (ByteBuffer) [coerce]: Adjust call to
%bytevec2str.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/algebra/data.spad.pamphlet | 4 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 8 |
3 files changed, 15 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8a3b40b0..f017d8bb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-08-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/lisp-backend.boot (expandBytevec2str): Use MAP instead of + COERCE. Eliminate second argument. + (expandStr2bytevec): Use MAP instead of COERCE. + * algebra/data.spad.pamphlet (ByteBuffer) [coerce]: Adjust call to + %bytevec2str. + +2011-08-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + * algebra/float.spad.pamphlet (Float): Tidy. * algebra/fortmac.spad.pamphlet (MachineInteger): Likewise. * algebra/fspace.spad.pamphlet (FunctionSpace): Likewise. diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet index 5f060343..bcb80de0 100644 --- a/src/algebra/data.spad.pamphlet +++ b/src/algebra/data.spad.pamphlet @@ -313,7 +313,7 @@ ByteBuffer(): Public == Private where ++ `buf'. Error if `n' is more than the capacity. finiteAggregate ++ A ByteBuffer object is a finite aggregate Private == add - import %bytevec2str: (PrimitiveArray Byte,NNI) -> String + import %bytevec2str: PrimitiveArray Byte -> String from Foreign Builtin -- A buffer object is a pair of a simple array, and the count @@ -364,7 +364,7 @@ ByteBuffer(): Public == Private where rep(buf).ary coerce(buf: %): String == - %bytevec2str(rep(buf).ary,#buf) + %bytevec2str rep(buf).ary construct l == buf := makeByteBuffer(#l) diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index 8426a531..36075241 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -317,11 +317,13 @@ 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] +expandBytevec2str ['%bytevec2str,x] == + ['MAP,quoteForm 'STRING, --FIXME: should be '%String, fix when SBCL is fixed. + ['FUNCTION,['LAMBDA,['c],['CODE_-CHAR,'c]]],expandToVMForm x] expandStr2bytevec ['%str2bytevec,x] == - ['COERCE,expandToVMForm x,quoteForm ['%Vector,'%Byte]] + ['MAP,quoteForm ['%Vector,'%Byte], + ['FUNCTION,['LAMBDA,['c],['CHAR_-CODE,'c]]],expandToVMForm x] -- bit vector operations expandBitvecnot ['%bitvecnot,x] == |