[Git][ghc/ghc][wip/andreask/pin_array_info] Rebase fixes

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Thu Aug 8 14:20:30 UTC 2024



Andreas Klebinger pushed to branch wip/andreask/pin_array_info at Glasgow Haskell Compiler / GHC


Commits:
f9e4a417 by Andreas Klebinger at 2024-08-08T16:04:12+02:00
Rebase fixes

- - - - -


2 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- docs/users_guide/exts/ffi.rst


Changes:

=====================================
compiler/GHC/Builtin/primops.txt.pp
=====================================
@@ -1939,12 +1939,14 @@ primop  UnsafePinMutableByteArrayOp "unsafePinMutableByteArray#" GenPrimOp
    which can break code using compact region. If this is a concern it's always possible
    to explicitly allocate a new array and copy over the contents.}
    with out_of_line = True
-        has_side_effects = True
+        effect = ReadWriteEffect
 
 primop  MutableByteArrayIsPinnedOp "isMutableByteArrayPinned#" GenPrimOp
    MutableByteArray# s -> Int#
    {Determine whether a 'MutableByteArray#' is guaranteed not to move.}
    with out_of_line = True
+        -- This disallows speculative execution
+        effect = CanFail
 
 primop  MutableByteArrayIsGcPinnedOp "isMutableByteArrayGcPinned#" GenPrimOp
    MutableByteArray# s -> Int#


=====================================
docs/users_guide/exts/ffi.rst
=====================================
@@ -1114,7 +1114,7 @@ Pinned Byte Arrays
 
 A pinned byte array is one that is not allowed
 to move. Consequently, it has a stable address that can be safely
-requested with ``byteArrayContents#``. Not that being pinned doesn't
+requested with ``byteArrayContents#``. Note that being pinned doesn't
 prevent the byteArray from being gc'ed in the same fashion a regular
 byte array would be.
 There are a handful of primitive functions in :base-ref:`GHC.Exts.`



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9e4a417731bbc0f41269bcca80695752ff3322b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9e4a417731bbc0f41269bcca80695752ff3322b
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240808/9dc135a6/attachment-0001.html>


More information about the ghc-commits mailing list