[commit: ghc] wip/T14068: Do not inline showWord (a95a849)

git at git.haskell.org git at git.haskell.org
Tue Oct 31 03:34:52 UTC 2017


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

On branch  : wip/T14068
Link       : http://ghc.haskell.org/trac/ghc/changeset/a95a8494d94d02c63bfe2e93eb352333d9639beb/ghc

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

commit a95a8494d94d02c63bfe2e93eb352333d9639beb
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Aug 2 11:26:22 2017 -0400

    Do not inline showWord
    
    mostly because otherwise the test setup of #7014 fails.
    (The test checks for the absence of certain primops in the code, but
    inlining showWords adds many of these.)


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

a95a8494d94d02c63bfe2e93eb352333d9639beb
 libraries/base/GHC/Show.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libraries/base/GHC/Show.hs b/libraries/base/GHC/Show.hs
index 980b4a7..03b8f95 100644
--- a/libraries/base/GHC/Show.hs
+++ b/libraries/base/GHC/Show.hs
@@ -196,6 +196,7 @@ showWord w# cs
  | otherwise = case chr# (ord# '0'# +# word2Int# (w# `remWord#` 10##)) of
                c# ->
                    showWord (w# `quotWord#` 10##) (C# c# : cs)
+{-# NOINLINE showWord #-}
 
 deriving instance Show a => Show (Maybe a)
 deriving instance Show a => Show (NonEmpty a)



More information about the ghc-commits mailing list