[commit: ghc] : sptModuleInitCode: Look for ConApp (5bdf9d0)

git at git.haskell.org git at git.haskell.org
Mon Oct 10 21:43:47 UTC 2016


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

On branch  : 
Link       : http://ghc.haskell.org/trac/ghc/changeset/5bdf9d042d812fdfeece8db9037c0175c2b8ed6b/ghc

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

commit 5bdf9d042d812fdfeece8db9037c0175c2b8ed6b
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Oct 10 17:27:19 2016 -0400

    sptModuleInitCode: Look for ConApp


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

5bdf9d042d812fdfeece8db9037c0175c2b8ed6b
 compiler/main/StaticPtrTable.hs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compiler/main/StaticPtrTable.hs b/compiler/main/StaticPtrTable.hs
index 9ec970f..2b947e5 100644
--- a/compiler/main/StaticPtrTable.hs
+++ b/compiler/main/StaticPtrTable.hs
@@ -82,6 +82,11 @@ sptModuleInitCode this_mod binds =
       , Just w0 <- fromPlatformWord64Rep lit0
       , Just w1 <- fromPlatformWord64Rep lit1
       = Just $ Fingerprint (fromInteger w0) (fromInteger w1)
+      | ConApp dc (_ : Lit lit0 : Lit lit1 : _) <- e
+      , dataConName dc == staticPtrDataConName
+      , Just w0 <- fromPlatformWord64Rep lit0
+      , Just w1 <- fromPlatformWord64Rep lit1
+      = Just $ Fingerprint (fromInteger w0) (fromInteger w1)
     staticPtrFp _ = Nothing
 
     fromPlatformWord64Rep (MachWord w)   = Just w



More information about the ghc-commits mailing list