Skip to content
Snippets Groups Projects
Commit 3fd25743 authored by Teo Camarasu's avatar Teo Camarasu Committed by Marge Bot
Browse files

base: Mark addrToByteArray as NOINLINE

This function should never be inlined in order to keep code size small.
parent b23746ad
No related branches found
No related tags found
No related merge requests found
...@@ -220,6 +220,7 @@ instance Lift ByteArray where ...@@ -220,6 +220,7 @@ instance Lift ByteArray where
ptr :: ForeignPtr Word8 ptr :: ForeignPtr Word8
ptr = ForeignPtr (byteArrayContents# pb) (PlainPtr (unsafeCoerce# pb)) ptr = ForeignPtr (byteArrayContents# pb) (PlainPtr (unsafeCoerce# pb))
{-# NOINLINE addrToByteArray #-}
addrToByteArray :: Int -> Addr# -> ByteArray addrToByteArray :: Int -> Addr# -> ByteArray
addrToByteArray (I# len) addr = runST $ ST $ addrToByteArray (I# len) addr = runST $ ST $
\s -> case newByteArray# len s of \s -> case newByteArray# len s of
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment