[commit: ghc] master: primops: Fix documentation of compactAllocateBlock# (d157762)

git at git.haskell.org git at git.haskell.org
Mon Oct 1 15:53:23 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d1577621519f7740a6cc9ecdebc70e3ba9098409/ghc

>---------------------------------------------------------------

commit d1577621519f7740a6cc9ecdebc70e3ba9098409
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Sep 26 16:03:44 2018 -0400

    primops: Fix documentation of compactAllocateBlock#
    
    Pointed out by @andrewthad.


>---------------------------------------------------------------

d1577621519f7740a6cc9ecdebc70e3ba9098409
 compiler/prelude/primops.txt.pp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index 2f8ced7..9e14648 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -2818,11 +2818,11 @@ primop  CompactGetNextBlockOp "compactGetNextBlock#" GenPrimOp
 primop  CompactAllocateBlockOp "compactAllocateBlock#" GenPrimOp
    Word# -> Addr# -> State# RealWorld -> (# State# RealWorld, Addr# #)
    { Attempt to allocate a compact block with the given size (in
-     bytes) at the given address. The first argument is a hint to
-     the allocator, allocation might be satisfied at a different
-     address (which is returned).
+     bytes, given by the first argument). The {\texttt Addr\#} is a pointer to
+     previous block of the compact or {\texttt nullAddr\#} to create a new compact.
+
      The resulting block is not known to the GC until
-     compactFixupPointers# is called on it, and care must be taken
+     {\texttt compactFixupPointers\#} is called on it, and care must be taken
      so that the address does not escape or memory will be leaked.
    }
    with



More information about the ghc-commits mailing list