summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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