summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Martin <andrew.thaddeus@gmail.com>2017-06-17 17:35:32 -0400
committerBen Gamari <ben@smart-cactus.org>2017-06-19 10:58:35 -0400
commit564a31f32e522398c50828bcf35cf8deeec5e654 (patch)
treeac8492fd1415eb160a3cf9b8d57f522b326d7433
parent6a2264d2bd47e993c43a592bd614ab7917184e22 (diff)
downloadhaskell-564a31f32e522398c50828bcf35cf8deeec5e654.tar.gz
Reword documentation region overlap documentation for copying mutable arrays
-rw-r--r--compiler/prelude/primops.txt.pp20
1 files changed, 14 insertions, 6 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index bff45401a7..97ae89cb84 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -825,9 +825,10 @@ primop CopyMutableArrayOp "copyMutableArray#" GenPrimOp
{Given a source array, an offset into the source array, a
destination array, an offset into the destination array, and a
number of elements to copy, copy the elements from the source array
- to the destination array. The source and destination arrays can
- refer to the same array. Both arrays must fully contain the
- specified ranges, but this is not checked.}
+ to the destination array. Both arrays must fully contain the
+ specified ranges, but this is not checked. In the case where
+ the source and destination are the same array the source and
+ destination regions may overlap.}
with
out_of_line = True
has_side_effects = True
@@ -990,7 +991,9 @@ primop CopySmallMutableArrayOp "copySmallMutableArray#" GenPrimOp
number of elements to copy, copy the elements from the source array
to the destination array. The source and destination arrays can
refer to the same array. Both arrays must fully contain the
- specified ranges, but this is not checked.}
+ specified ranges, but this is not checked.
+ The regions are allowed to overlap, although this is only possible when the same
+ array is provided as both the source and the destination. }
with
out_of_line = True
has_side_effects = True
@@ -1400,7 +1403,9 @@ primop CopyByteArrayOp "copyByteArray#" GenPrimOp
primop CopyMutableByteArrayOp "copyMutableByteArray#" GenPrimOp
MutableByteArray# s -> Int# -> MutableByteArray# s -> Int# -> Int# -> State# s -> State# s
{Copy a range of the first MutableByteArray# to the specified region in the second MutableByteArray#.
- Both arrays must fully contain the specified ranges, but this is not checked.}
+ Both arrays must fully contain the specified ranges, but this is not checked. The regions are
+ allowed to overlap, although this is only possible when the same array is provided
+ as both the source and the destination.}
with
has_side_effects = True
code_size = { primOpCodeSizeForeignCall + 4 }
@@ -1627,7 +1632,10 @@ primop CopyMutableArrayArrayOp "copyMutableArrayArray#" GenPrimOp
MutableArrayArray# s -> Int# -> MutableArrayArray# s -> Int# -> Int# -> State# s -> State# s
{Copy a range of the first MutableArrayArray# to the specified region in the second
MutableArrayArray#.
- Both arrays must fully contain the specified ranges, but this is not checked.}
+ Both arrays must fully contain the specified ranges, but this is not checked.
+ The regions are allowed to overlap, although this is only possible when the same
+ array is provided as both the source and the destination.
+ }
with
out_of_line = True
has_side_effects = True