X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fcmm%2FCLabel.hs;h=fb13589cdc842304791826b2244962cc9e0949a5;hb=9d7da331989abcd1844e9d03b8d1e4163796fa85;hp=f9f2eadafa46a83f87cedc10fe46d41625c654be;hpb=d1c1b7d0e7b94ede238845c91f58582bad3b3ef3;p=ghc-hetmet.git diff --git a/ghc/compiler/cmm/CLabel.hs b/ghc/compiler/cmm/CLabel.hs index f9f2ead..fb13589 100644 --- a/ghc/compiler/cmm/CLabel.hs +++ b/ghc/compiler/cmm/CLabel.hs @@ -99,7 +99,7 @@ module CLabel ( #include "HsVersions.h" -import DynFlags ( DynFlags ) +import Packages ( HomeModules ) import StaticFlags ( opt_Static, opt_DoTickyProfiling ) import Packages ( isHomeModule, isDllName ) import DataCon ( ConTag ) @@ -287,20 +287,20 @@ mkLocalInfoTableLabel name = IdLabel name InfoTable mkLocalEntryLabel name = IdLabel name Entry mkLocalClosureTableLabel name = IdLabel name ClosureTable -mkClosureLabel dflags name - | isDllName dflags name = DynIdLabel name Closure +mkClosureLabel hmods name + | isDllName hmods name = DynIdLabel name Closure | otherwise = IdLabel name Closure -mkInfoTableLabel dflags name - | isDllName dflags name = DynIdLabel name InfoTable +mkInfoTableLabel hmods name + | isDllName hmods name = DynIdLabel name InfoTable | otherwise = IdLabel name InfoTable -mkEntryLabel dflags name - | isDllName dflags name = DynIdLabel name Entry +mkEntryLabel hmods name + | isDllName hmods name = DynIdLabel name Entry | otherwise = IdLabel name Entry -mkClosureTableLabel dflags name - | isDllName dflags name = DynIdLabel name ClosureTable +mkClosureTableLabel hmods name + | isDllName hmods name = DynIdLabel name ClosureTable | otherwise = IdLabel name ClosureTable mkLocalConInfoTableLabel con = IdLabel con ConInfoTable @@ -314,12 +314,12 @@ mkConInfoTableLabel name True = DynIdLabel name ConInfoTable mkStaticInfoTableLabel name False = IdLabel name StaticInfoTable mkStaticInfoTableLabel name True = DynIdLabel name StaticInfoTable -mkConEntryLabel dflags name - | isDllName dflags name = DynIdLabel name ConEntry +mkConEntryLabel hmods name + | isDllName hmods name = DynIdLabel name ConEntry | otherwise = IdLabel name ConEntry -mkStaticConEntryLabel dflags name - | isDllName dflags name = DynIdLabel name StaticConEntry +mkStaticConEntryLabel hmods name + | isDllName hmods name = DynIdLabel name StaticConEntry | otherwise = IdLabel name StaticConEntry @@ -331,13 +331,13 @@ mkDefaultLabel uniq = CaseLabel uniq CaseDefault mkStringLitLabel = StringLitLabel mkAsmTempLabel = AsmTempLabel -mkModuleInitLabel :: DynFlags -> Module -> String -> CLabel -mkModuleInitLabel dflags mod way - = ModuleInitLabel mod way $! (not (isHomeModule dflags mod)) +mkModuleInitLabel :: HomeModules -> Module -> String -> CLabel +mkModuleInitLabel hmods mod way + = ModuleInitLabel mod way $! (not (isHomeModule hmods mod)) -mkPlainModuleInitLabel :: DynFlags -> Module -> CLabel -mkPlainModuleInitLabel dflags mod - = PlainModuleInitLabel mod $! (not (isHomeModule dflags mod)) +mkPlainModuleInitLabel :: HomeModules -> Module -> CLabel +mkPlainModuleInitLabel hmods mod + = PlainModuleInitLabel mod $! (not (isHomeModule hmods mod)) -- Some fixed runtime system labels @@ -457,7 +457,6 @@ needsCDecl (ModuleInitLabel _ _ _) = True needsCDecl (PlainModuleInitLabel _ _) = True needsCDecl ModuleRegdLabel = False -needsCDecl (CaseLabel _ _) = False needsCDecl (StringLitLabel _) = False needsCDecl (AsmTempLabel _) = False needsCDecl (RtsLabel _) = False @@ -741,10 +740,10 @@ pprCLbl (CC_Label cc) = ppr cc pprCLbl (CCS_Label ccs) = ppr ccs pprCLbl (ModuleInitLabel mod way _) - = ptext SLIT("__stginit_") <> ftext (moduleFS mod) + = ptext SLIT("__stginit_") <> ppr mod <> char '_' <> text way pprCLbl (PlainModuleInitLabel mod _) - = ptext SLIT("__stginit_") <> ftext (moduleFS mod) + = ptext SLIT("__stginit_") <> ppr mod ppIdFlavor :: IdLabelInfo -> SDoc ppIdFlavor x = pp_cSEP <>