CLabel

ghc-7.0.4: The GHC API

CLabel

Synopsis

- data CLabel
- data ForeignLabelSource
  - = ForeignLabelInPackage PackageId
  - | ForeignLabelInExternalPackage
  - | ForeignLabelInThisPackage
- pprDebugCLabel :: CLabel -> SDoc
- mkClosureLabel :: Name -> CafInfo -> CLabel
- mkSRTLabel :: Name -> CafInfo -> CLabel
- mkInfoTableLabel :: Name -> CafInfo -> CLabel
- mkEntryLabel :: Name -> CafInfo -> CLabel
- mkSlowEntryLabel :: Name -> CafInfo -> CLabel
- mkConEntryLabel :: Name -> CafInfo -> CLabel
- mkStaticConEntryLabel :: Name -> CafInfo -> CLabel
- mkRednCountsLabel :: Name -> CafInfo -> CLabel
- mkConInfoTableLabel :: Name -> CafInfo -> CLabel
- mkStaticInfoTableLabel :: Name -> CafInfo -> CLabel
- mkLargeSRTLabel :: Unique -> CLabel
- mkApEntryLabel :: Bool -> Int -> CLabel
- mkApInfoTableLabel :: Bool -> Int -> CLabel
- mkClosureTableLabel :: Name -> CafInfo -> CLabel
- mkLocalClosureLabel :: Name -> CafInfo -> CLabel
- mkLocalInfoTableLabel :: Name -> CafInfo -> CLabel
- mkLocalEntryLabel :: Name -> CafInfo -> CLabel
- mkLocalConEntryLabel :: CafInfo -> Name -> CLabel
- mkLocalStaticConEntryLabel :: CafInfo -> Name -> CLabel
- mkLocalConInfoTableLabel :: CafInfo -> Name -> CLabel
- mkLocalStaticInfoTableLabel :: CafInfo -> Name -> CLabel
- mkLocalClosureTableLabel :: Name -> CafInfo -> CLabel
- mkReturnPtLabel :: Unique -> CLabel
- mkReturnInfoLabel :: Unique -> CLabel
- mkAltLabel :: Unique -> ConTag -> CLabel
- mkDefaultLabel :: Unique -> CLabel
- mkBitmapLabel :: Unique -> CLabel
- mkStringLitLabel :: Unique -> CLabel
- mkAsmTempLabel :: Uniquable a => a -> CLabel
- mkModuleInitLabel :: Module -> String -> CLabel
- mkPlainModuleInitLabel :: Module -> CLabel
- mkModuleInitTableLabel :: Module -> CLabel
- mkSplitMarkerLabel :: CLabel
- mkDirty_MUT_VAR_Label :: CLabel
- mkUpdInfoLabel :: CLabel
- mkBHUpdInfoLabel :: CLabel
- mkIndStaticInfoLabel :: CLabel
- mkMainCapabilityLabel :: CLabel
- mkMAP_FROZEN_infoLabel :: CLabel
- mkMAP_DIRTY_infoLabel :: CLabel
- mkEMPTY_MVAR_infoLabel :: CLabel
- mkTopTickyCtrLabel :: CLabel
- mkCAFBlackHoleInfoTableLabel :: CLabel
- mkRtsPrimOpLabel :: PrimOp -> CLabel
- mkRtsSlowTickyCtrLabel :: String -> CLabel
- moduleRegdLabel :: CLabel
- moduleRegTableLabel :: Module -> CLabel
- mkSelectorInfoLabel :: Bool -> Int -> CLabel
- mkSelectorEntryLabel :: Bool -> Int -> CLabel
- mkCmmInfoLabel :: PackageId -> FastString -> CLabel
- mkCmmEntryLabel :: PackageId -> FastString -> CLabel
- mkCmmRetInfoLabel :: PackageId -> FastString -> CLabel
- mkCmmRetLabel :: PackageId -> FastString -> CLabel
- mkCmmCodeLabel :: PackageId -> FastString -> CLabel
- mkCmmDataLabel :: PackageId -> FastString -> CLabel
- mkCmmGcPtrLabel :: PackageId -> FastString -> CLabel
- mkRtsApFastLabel :: FastString -> CLabel
- mkPrimCallLabel :: PrimCall -> CLabel
- mkForeignLabel :: FastString -> Maybe Int -> ForeignLabelSource -> FunctionOrData -> CLabel
- addLabelSize :: CLabel -> Int -> CLabel
- foreignLabelStdcallInfo :: CLabel -> Maybe Int
- mkCCLabel :: CostCentre -> CLabel
- mkCCSLabel :: CostCentreStack -> CLabel
- data DynamicLinkerLabelInfo
  - = CodeStub
  - | SymbolPtr
  - | GotSymbolPtr
  - | GotSymbolOffset
- mkDynamicLinkerLabel :: DynamicLinkerLabelInfo -> CLabel -> CLabel
- dynamicLinkerLabelInfo :: CLabel -> Maybe (DynamicLinkerLabelInfo, CLabel)
- mkPicBaseLabel :: CLabel
- mkDeadStripPreventer :: CLabel -> CLabel
- mkHpcTicksLabel :: Module -> CLabel
- mkHpcModuleNameLabel :: CLabel
- hasCAF :: CLabel -> Bool
- infoLblToEntryLbl :: CLabel -> CLabel
- entryLblToInfoLbl :: CLabel -> CLabel
- cvtToClosureLbl :: CLabel -> CLabel
- cvtToSRTLbl :: CLabel -> CLabel
- needsCDecl :: CLabel -> Bool
- isAsmTemp :: CLabel -> Bool
- maybeAsmTemp :: CLabel -> Maybe Unique
- externallyVisibleCLabel :: CLabel -> Bool
- isMathFun :: CLabel -> Bool
- isCFunctionLabel :: CLabel -> Bool
- isGcPtrLabel :: CLabel -> Bool
- labelDynamic :: PackageId -> CLabel -> Bool
- pprCLabel :: CLabel -> SDoc

# Documentation

data CLabel

Instances

Eq CLabel |
Ord CLabel |
Outputable CLabel |

data ForeignLabelSource

Record where a foreign label is stored.

Constructors

ForeignLabelInPackage PackageId | Label is in a named package
ForeignLabelInExternalPackage | Label is in some external, system package that doesn't also contain compiled Haskell code, and is not associated with any .hi files. We don't have to worry about Haskell code being inlined from external packages. It is safe to treat the RTS package as external.
ForeignLabelInThisPackage | Label is in the package currenly being compiled. This is only used for creating hacky tmp labels during code generation. Don't use it in any code that might be inlined across a package boundary (ie, core code) else the information will be wrong relative to the destination module.

Instances

Eq ForeignLabelSource |
Ord ForeignLabelSource |
Outputable ForeignLabelSource |

pprDebugCLabel :: CLabel -> SDoc

For debugging problems with the CLabel representation. We can't make a Show instance for CLabel because lots of its components don't have instances. The regular Outputable instance only shows the label name, and not its other info.

mkClosureLabel :: Name -> CafInfo -> CLabel

mkSRTLabel :: Name -> CafInfo -> CLabel

mkInfoTableLabel :: Name -> CafInfo -> CLabel

mkEntryLabel :: Name -> CafInfo -> CLabel

mkSlowEntryLabel :: Name -> CafInfo -> CLabel

mkConEntryLabel :: Name -> CafInfo -> CLabel

mkStaticConEntryLabel :: Name -> CafInfo -> CLabel

mkRednCountsLabel :: Name -> CafInfo -> CLabel

mkConInfoTableLabel :: Name -> CafInfo -> CLabel

mkStaticInfoTableLabel :: Name -> CafInfo -> CLabel

mkLargeSRTLabel :: Unique -> CLabel

mkApEntryLabel :: Bool -> Int -> CLabel

mkApInfoTableLabel :: Bool -> Int -> CLabel

mkClosureTableLabel :: Name -> CafInfo -> CLabel

mkLocalClosureLabel :: Name -> CafInfo -> CLabel

mkLocalInfoTableLabel :: Name -> CafInfo -> CLabel

mkLocalEntryLabel :: Name -> CafInfo -> CLabel

mkLocalConEntryLabel :: CafInfo -> Name -> CLabel

mkLocalStaticConEntryLabel :: CafInfo -> Name -> CLabel

mkLocalConInfoTableLabel :: CafInfo -> Name -> CLabel

mkLocalStaticInfoTableLabel :: CafInfo -> Name -> CLabel

mkLocalClosureTableLabel :: Name -> CafInfo -> CLabel

mkReturnPtLabel :: Unique -> CLabel

mkReturnInfoLabel :: Unique -> CLabel

mkAltLabel :: Unique -> ConTag -> CLabel

mkDefaultLabel :: Unique -> CLabel

mkBitmapLabel :: Unique -> CLabel

mkStringLitLabel :: Unique -> CLabel

mkAsmTempLabel :: Uniquable a => a -> CLabel

mkModuleInitLabel :: Module -> String -> CLabel

mkPlainModuleInitLabel :: Module -> CLabel

mkModuleInitTableLabel :: Module -> CLabel

mkSplitMarkerLabel :: CLabel

mkDirty_MUT_VAR_Label :: CLabel

mkUpdInfoLabel :: CLabel

mkBHUpdInfoLabel :: CLabel

mkIndStaticInfoLabel :: CLabel

mkMainCapabilityLabel :: CLabel

mkMAP_FROZEN_infoLabel :: CLabel

mkMAP_DIRTY_infoLabel :: CLabel

mkEMPTY_MVAR_infoLabel :: CLabel

mkTopTickyCtrLabel :: CLabel

mkCAFBlackHoleInfoTableLabel :: CLabel

mkRtsPrimOpLabel :: PrimOp -> CLabel

mkRtsSlowTickyCtrLabel :: String -> CLabel

moduleRegdLabel :: CLabel

moduleRegTableLabel :: Module -> CLabel

mkSelectorInfoLabel :: Bool -> Int -> CLabel

mkSelectorEntryLabel :: Bool -> Int -> CLabel

mkCmmInfoLabel :: PackageId -> FastString -> CLabel

mkCmmEntryLabel :: PackageId -> FastString -> CLabel

mkCmmRetInfoLabel :: PackageId -> FastString -> CLabel

mkCmmRetLabel :: PackageId -> FastString -> CLabel

mkCmmCodeLabel :: PackageId -> FastString -> CLabel

mkCmmDataLabel :: PackageId -> FastString -> CLabel

mkCmmGcPtrLabel :: PackageId -> FastString -> CLabel

mkRtsApFastLabel :: FastString -> CLabel

mkPrimCallLabel :: PrimCall -> CLabel

mkForeignLabel :: FastString -> Maybe Int -> ForeignLabelSource -> FunctionOrData -> CLabel

Make a foreign label

addLabelSize :: CLabel -> Int -> CLabel

Update the label size field in a ForeignLabel

foreignLabelStdcallInfo :: CLabel -> Maybe Int

Get the label size field from a ForeignLabel

mkCCLabel :: CostCentre -> CLabel

mkCCSLabel :: CostCentreStack -> CLabel

data DynamicLinkerLabelInfo

Constructors

CodeStub |
SymbolPtr |
GotSymbolPtr |
GotSymbolOffset |

Instances

Eq DynamicLinkerLabelInfo |
Ord DynamicLinkerLabelInfo |

mkDynamicLinkerLabel :: DynamicLinkerLabelInfo -> CLabel -> CLabel

dynamicLinkerLabelInfo :: CLabel -> Maybe (DynamicLinkerLabelInfo, CLabel)

mkPicBaseLabel :: CLabel

mkDeadStripPreventer :: CLabel -> CLabel

mkHpcTicksLabel :: Module -> CLabel

mkHpcModuleNameLabel :: CLabel

hasCAF :: CLabel -> Bool

infoLblToEntryLbl :: CLabel -> CLabel

entryLblToInfoLbl :: CLabel -> CLabel

cvtToClosureLbl :: CLabel -> CLabel

cvtToSRTLbl :: CLabel -> CLabel

needsCDecl :: CLabel -> Bool

isAsmTemp :: CLabel -> Bool

Check whether a label is a local temporary for native code generation

maybeAsmTemp :: CLabel -> Maybe Unique

If a label is a local temporary used for native code generation then return just its unique, otherwise nothing.

externallyVisibleCLabel :: CLabel -> Bool

Is a CLabel visible outside this object file or not? From the point of view of the code generator, a name is externally visible if it has to be declared as exported in the .o file's symbol table; that is, made non-static.

isMathFun :: CLabel -> Bool

Check whether a label corresponds to a C function that has a prototype in a system header somehere, or is built-in to the C compiler. For these labels we abovoid generating our own C prototypes.

isCFunctionLabel :: CLabel -> Bool

isGcPtrLabel :: CLabel -> Bool

labelDynamic :: PackageId -> CLabel -> Bool

pprCLabel :: CLabel -> SDoc