X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCLabel.hs;h=ba89a06db33a0786472ef6da2417e35dabaf12f0;hb=c8bebd3d95f8ec4d723b5628108745c8174bb3c4;hp=fcb8dfa68a2e0c01f963ff4a7196a333369191d7;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index fcb8dfa..ba89a06 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -10,7 +10,7 @@ -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module CLabel ( @@ -89,6 +89,7 @@ module CLabel ( mkRtsApFastLabel, mkForeignLabel, + addLabelSize, mkCCLabel, mkCCSLabel, @@ -324,7 +325,8 @@ mkAltLabel uniq tag = CaseLabel uniq (CaseAlt tag) mkDefaultLabel uniq = CaseLabel uniq CaseDefault mkStringLitLabel = StringLitLabel -mkAsmTempLabel = AsmTempLabel +mkAsmTempLabel :: Uniquable a => a -> CLabel +mkAsmTempLabel a = AsmTempLabel (getUnique a) mkModuleInitLabel :: Module -> String -> CLabel mkModuleInitLabel mod way = ModuleInitLabel mod way @@ -364,6 +366,12 @@ mkApEntryLabel upd off = RtsLabel (RtsApEntry upd off) mkForeignLabel :: FastString -> Maybe Int -> Bool -> CLabel mkForeignLabel str mb_sz is_dynamic = ForeignLabel str mb_sz is_dynamic +addLabelSize :: CLabel -> Int -> CLabel +addLabelSize (ForeignLabel str _ is_dynamic) sz + = ForeignLabel str (Just sz) is_dynamic +addLabelSize label _ + = label + -- Cost centres etc. mkCCLabel cc = CC_Label cc