diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/prelude/primops.txt.pp | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp index 49f78faa72..15fb785058 100644 --- a/compiler/prelude/primops.txt.pp +++ b/compiler/prelude/primops.txt.pp @@ -2444,14 +2444,6 @@ primop CompactNewOp "compactNew#" GenPrimOp has_side_effects = True out_of_line = True -primop CompactAppendOp "compactAppend#" GenPrimOp - Compact# -> a -> Int# -> State# RealWorld -> (# State# RealWorld, a #) - { Append an object to a compact, return the new address in the Compact. - The third argument is 1 if sharing should be preserved, 0 otherwise. } - with - has_side_effects = True - out_of_line = True - primop CompactResizeOp "compactResize#" GenPrimOp Compact# -> Word# -> State# RealWorld -> State# RealWorld @@ -2515,6 +2507,34 @@ primop CompactFixupPointersOp "compactFixupPointers#" GenPrimOp has_side_effects = True out_of_line = True +primop CompactAdd "compactAdd#" GenPrimOp + Compact# -> a -> State# RealWorld -> (# State# RealWorld, a #) + { Recursively add a closure and its transitive closure to a + {\texttt Compact\#}, evaluating any unevaluated components at the + same time. Note: {\texttt compactAdd\#} is not thread-safe, so + only one thread may call {\texttt compactAdd\#} with a particular + {\texttt Compact#} at any given time. The primop does not + enforce any mutual exclusion; the caller is expected to + arrange this. } + with + has_side_effects = True + out_of_line = True + +primop CompactAddWithSharing "compactAddWithSharing#" GenPrimOp + Compact# -> a -> State# RealWorld -> (# State# RealWorld, a #) + { Like {\texttt compactAdd\#}, but retains sharing and cycles + during compaction. } + with + has_side_effects = True + out_of_line = True + +primop CompactSize "compactSize#" GenPrimOp + Compact# -> State# RealWorld -> (# State# RealWorld, Word# #) + { Return the size (in bytes) of the total amount of data in the Compact# } + with + has_side_effects = True + out_of_line = True + ------------------------------------------------------------------------ section "Unsafe pointer equality" -- (#1 Bad Guy: Alastair Reid :) |