X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fprelude%2Fprimops.txt.pp;h=fc99dee53dda4be97cd004487e147c395313a49c;hb=79957d77c1bff767f1041d3fabdeb94d92a52878;hp=3aa093a81793168175208796aa0b545c2dc7ac7d;hpb=5407ad8e0a5c08ac5193c1a9ede2a12570baee0b;p=ghc-hetmet.git diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp index 3aa093a..fc99dee 100644 --- a/compiler/prelude/primops.txt.pp +++ b/compiler/prelude/primops.txt.pp @@ -632,14 +632,15 @@ primop UnsafeThawArrayOp "unsafeThawArray#" GenPrimOp ------------------------------------------------------------------------ section "Byte Arrays" {Operations on {\tt ByteArray\#}. A {\tt ByteArray\#} is a just a region of - raw memory in the garbage-collected heap, which is not scanned - for pointers. It carries its own size (in bytes). There are - three sets of operations for accessing byte array contents: - index for reading from immutable byte arrays, and read/write - for mutable byte arrays. Each set contains operations for - a range of useful primitive data types. Each operation takes - an offset measured in terms of the size fo the primitive type - being read or written.} + raw memory in the garbage-collected heap, which is not + scanned for pointers. It carries its own size (in bytes, + rounded up to the nearest multiple of a word). There are + three sets of operations for accessing byte array contents: + index for reading from immutable byte arrays, and read/write + for mutable byte arrays. Each set contains operations for a + range of useful primitive data types. Each operation takes + an offset measured in terms of the size fo the primitive type + being read or written.} ------------------------------------------------------------------------ @@ -681,10 +682,13 @@ primop UnsafeFreezeByteArrayOp "unsafeFreezeByteArray#" GenPrimOp primop SizeofByteArrayOp "sizeofByteArray#" GenPrimOp ByteArray# -> Int# + {Return the size of the array in bytes, rounded up to the nearest multiple + of a word.} primop SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp MutableByteArray# s -> Int# - + {Return the size of the array in bytes, rounded up to the nearest multiple + of a word.} primop IndexByteArrayOp_Char "indexCharArray#" GenPrimOp ByteArray# -> Int# -> Char#