aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/algebra/data.spad.pamphlet4
-rw-r--r--src/interp/lisp-backend.boot8
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] ==