CLabel

ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

CLabel

Contents

- Conversions

Synopsis

- data CLabel
- data ForeignLabelSource
  - = ForeignLabelInPackage UnitId
  - | ForeignLabelInExternalPackage
  - | ForeignLabelInThisPackage
- pprDebugCLabel :: CLabel -> SDoc
- mkClosureLabel :: Name -> CafInfo -> CLabel
- mkSRTLabel :: Name -> CafInfo -> CLabel
- mkTopSRTLabel :: Unique -> CLabel
- mkInfoTableLabel :: Name -> CafInfo -> CLabel
- mkEntryLabel :: Name -> CafInfo -> CLabel
- mkSlowEntryLabel :: Name -> CafInfo -> CLabel
- mkConEntryLabel :: Name -> CafInfo -> CLabel
- mkRednCountsLabel :: Name -> CLabel
- mkConInfoTableLabel :: Name -> CafInfo -> CLabel
- mkLargeSRTLabel :: Unique -> CLabel
- mkApEntryLabel :: Bool -> Int -> CLabel
- mkApInfoTableLabel :: Bool -> Int -> CLabel
- mkClosureTableLabel :: Name -> CafInfo -> CLabel
- mkBytesLabel :: Name -> CLabel
- mkLocalClosureLabel :: Name -> CafInfo -> CLabel
- mkLocalInfoTableLabel :: Name -> CafInfo -> CLabel
- mkLocalEntryLabel :: Name -> CafInfo -> CLabel
- mkLocalConEntryLabel :: CafInfo -> Name -> CLabel
- mkLocalConInfoTableLabel :: 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
- mkAsmTempDerivedLabel :: CLabel -> FastString -> CLabel
- mkAsmTempEndLabel :: CLabel -> CLabel
- mkAsmTempDieLabel :: CLabel -> CLabel
- mkPlainModuleInitLabel :: Module -> CLabel
- mkSplitMarkerLabel :: CLabel
- mkDirty_MUT_VAR_Label :: CLabel
- mkUpdInfoLabel :: CLabel
- mkBHUpdInfoLabel :: CLabel
- mkIndStaticInfoLabel :: CLabel
- mkMainCapabilityLabel :: CLabel
- mkMAP_FROZEN_infoLabel :: CLabel
- mkMAP_FROZEN0_infoLabel :: CLabel
- mkMAP_DIRTY_infoLabel :: CLabel
- mkSMAP_FROZEN_infoLabel :: CLabel
- mkSMAP_FROZEN0_infoLabel :: CLabel
- mkSMAP_DIRTY_infoLabel :: CLabel
- mkEMPTY_MVAR_infoLabel :: CLabel
- mkArrWords_infoLabel :: CLabel
- mkTopTickyCtrLabel :: CLabel
- mkCAFBlackHoleInfoTableLabel :: CLabel
- mkCAFBlackHoleEntryLabel :: CLabel
- mkRtsPrimOpLabel :: PrimOp -> CLabel
- mkRtsSlowFastTickyCtrLabel :: String -> CLabel
- mkSelectorInfoLabel :: Bool -> Int -> CLabel
- mkSelectorEntryLabel :: Bool -> Int -> CLabel
- mkCmmInfoLabel :: UnitId -> FastString -> CLabel
- mkCmmEntryLabel :: UnitId -> FastString -> CLabel
- mkCmmRetInfoLabel :: UnitId -> FastString -> CLabel
- mkCmmRetLabel :: UnitId -> FastString -> CLabel
- mkCmmCodeLabel :: UnitId -> FastString -> CLabel
- mkCmmDataLabel :: UnitId -> FastString -> CLabel
- mkCmmClosureLabel :: UnitId -> FastString -> CLabel
- mkRtsApFastLabel :: FastString -> CLabel
- mkPrimCallLabel :: PrimCall -> CLabel
- mkForeignLabel :: FastString -> Maybe Int -> ForeignLabelSource -> FunctionOrData -> CLabel
- addLabelSize :: CLabel -> Int -> CLabel
- foreignLabelStdcallInfo :: CLabel -> Maybe Int
- isBytesLabel :: CLabel -> Bool
- isForeignLabel :: CLabel -> Bool
- 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
- hasCAF :: CLabel -> Bool
- needsCDecl :: CLabel -> Bool
- maybeAsmTemp :: CLabel -> Maybe Unique
- externallyVisibleCLabel :: CLabel -> Bool
- isMathFun :: CLabel -> Bool
- isCFunctionLabel :: CLabel -> Bool
- isGcPtrLabel :: CLabel -> Bool
- labelDynamic :: DynFlags -> Module -> CLabel -> Bool
- toClosureLbl :: CLabel -> CLabel
- toSlowEntryLbl :: CLabel -> CLabel
- toEntryLbl :: CLabel -> CLabel
- toInfoLbl :: CLabel -> CLabel
- toRednCountsLbl :: CLabel -> Maybe CLabel
- hasHaskellName :: CLabel -> Maybe Name
- pprCLabel :: Platform -> CLabel -> SDoc

# Documentation

data CLabel Source #

Instances

Eq CLabel # |
Methods (==) :: CLabel -> CLabel -> Bool # (/=) :: CLabel -> CLabel -> Bool #
Ord CLabel # |
Methods compare :: CLabel -> CLabel -> Ordering # (<) :: CLabel -> CLabel -> Bool # (<=) :: CLabel -> CLabel -> Bool # (>) :: CLabel -> CLabel -> Bool # (>=) :: CLabel -> CLabel -> Bool # max :: CLabel -> CLabel -> CLabel # min :: CLabel -> CLabel -> CLabel #
Outputable CLabel # |
Methods ppr :: CLabel -> SDoc Source # pprPrec :: Rational -> CLabel -> SDoc Source #

data ForeignLabelSource Source #

Record where a foreign label is stored.

Constructors

ForeignLabelInPackage UnitId | 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 # |
Methods (==) :: ForeignLabelSource -> ForeignLabelSource -> Bool # (/=) :: ForeignLabelSource -> ForeignLabelSource -> Bool #
Ord ForeignLabelSource # |
Methods compare :: ForeignLabelSource -> ForeignLabelSource -> Ordering # (<) :: ForeignLabelSource -> ForeignLabelSource -> Bool # (<=) :: ForeignLabelSource -> ForeignLabelSource -> Bool # (>) :: ForeignLabelSource -> ForeignLabelSource -> Bool # (>=) :: ForeignLabelSource -> ForeignLabelSource -> Bool # max :: ForeignLabelSource -> ForeignLabelSource -> ForeignLabelSource # min :: ForeignLabelSource -> ForeignLabelSource -> ForeignLabelSource #
Outputable ForeignLabelSource # |
Methods ppr :: ForeignLabelSource -> SDoc Source # pprPrec :: Rational -> ForeignLabelSource -> SDoc Source #

pprDebugCLabel :: CLabel -> SDoc Source #

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 Source #

mkSRTLabel :: Name -> CafInfo -> CLabel Source #

mkTopSRTLabel :: Unique -> CLabel Source #

mkInfoTableLabel :: Name -> CafInfo -> CLabel Source #

mkEntryLabel :: Name -> CafInfo -> CLabel Source #

mkSlowEntryLabel :: Name -> CafInfo -> CLabel Source #

mkConEntryLabel :: Name -> CafInfo -> CLabel Source #

mkRednCountsLabel :: Name -> CLabel Source #

mkConInfoTableLabel :: Name -> CafInfo -> CLabel Source #

mkLargeSRTLabel :: Unique -> CLabel Source #

mkApEntryLabel :: Bool -> Int -> CLabel Source #

mkApInfoTableLabel :: Bool -> Int -> CLabel Source #

mkClosureTableLabel :: Name -> CafInfo -> CLabel Source #

mkBytesLabel :: Name -> CLabel Source #

mkLocalClosureLabel :: Name -> CafInfo -> CLabel Source #

mkLocalInfoTableLabel :: Name -> CafInfo -> CLabel Source #

mkLocalEntryLabel :: Name -> CafInfo -> CLabel Source #

mkLocalConEntryLabel :: CafInfo -> Name -> CLabel Source #

mkLocalConInfoTableLabel :: CafInfo -> Name -> CLabel Source #

mkLocalClosureTableLabel :: Name -> CafInfo -> CLabel Source #

mkReturnPtLabel :: Unique -> CLabel Source #

mkReturnInfoLabel :: Unique -> CLabel Source #

mkAltLabel :: Unique -> ConTag -> CLabel Source #

mkDefaultLabel :: Unique -> CLabel Source #

mkBitmapLabel :: Unique -> CLabel Source #

mkStringLitLabel :: Unique -> CLabel Source #

mkAsmTempLabel :: Uniquable a => a -> CLabel Source #

mkAsmTempDerivedLabel :: CLabel -> FastString -> CLabel Source #

mkAsmTempEndLabel :: CLabel -> CLabel Source #

mkAsmTempDieLabel :: CLabel -> CLabel Source #

Construct a label for a DWARF Debug Information Entity (DIE) describing another symbol.

mkPlainModuleInitLabel :: Module -> CLabel Source #

mkSplitMarkerLabel :: CLabel Source #

mkDirty_MUT_VAR_Label :: CLabel Source #

mkUpdInfoLabel :: CLabel Source #

mkBHUpdInfoLabel :: CLabel Source #

mkIndStaticInfoLabel :: CLabel Source #

mkMainCapabilityLabel :: CLabel Source #

mkMAP_FROZEN_infoLabel :: CLabel Source #

mkMAP_FROZEN0_infoLabel :: CLabel Source #

mkMAP_DIRTY_infoLabel :: CLabel Source #

mkSMAP_FROZEN_infoLabel :: CLabel Source #

mkSMAP_FROZEN0_infoLabel :: CLabel Source #

mkSMAP_DIRTY_infoLabel :: CLabel Source #

mkEMPTY_MVAR_infoLabel :: CLabel Source #

mkArrWords_infoLabel :: CLabel Source #

mkTopTickyCtrLabel :: CLabel Source #

mkCAFBlackHoleInfoTableLabel :: CLabel Source #

mkCAFBlackHoleEntryLabel :: CLabel Source #

mkRtsPrimOpLabel :: PrimOp -> CLabel Source #

mkRtsSlowFastTickyCtrLabel :: String -> CLabel Source #

mkSelectorInfoLabel :: Bool -> Int -> CLabel Source #

mkSelectorEntryLabel :: Bool -> Int -> CLabel Source #

mkCmmInfoLabel :: UnitId -> FastString -> CLabel Source #

mkCmmEntryLabel :: UnitId -> FastString -> CLabel Source #

mkCmmRetInfoLabel :: UnitId -> FastString -> CLabel Source #

mkCmmRetLabel :: UnitId -> FastString -> CLabel Source #

mkCmmCodeLabel :: UnitId -> FastString -> CLabel Source #

mkCmmDataLabel :: UnitId -> FastString -> CLabel Source #

mkCmmClosureLabel :: UnitId -> FastString -> CLabel Source #

mkRtsApFastLabel :: FastString -> CLabel Source #

mkPrimCallLabel :: PrimCall -> CLabel Source #

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

Make a foreign label

addLabelSize :: CLabel -> Int -> CLabel Source #

Update the label size field in a ForeignLabel

foreignLabelStdcallInfo :: CLabel -> Maybe Int Source #

Get the label size field from a ForeignLabel

isBytesLabel :: CLabel -> Bool Source #

Whether label is a top-level string literal

isForeignLabel :: CLabel -> Bool Source #

Whether label is a non-haskell label (defined in C code)

mkCCLabel :: CostCentre -> CLabel Source #

mkCCSLabel :: CostCentreStack -> CLabel Source #

data DynamicLinkerLabelInfo Source #

Constructors

CodeStub |
SymbolPtr |
GotSymbolPtr |
GotSymbolOffset |

Instances

Eq DynamicLinkerLabelInfo # |
Methods (==) :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> Bool # (/=) :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> Bool #
Ord DynamicLinkerLabelInfo # |
Methods compare :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> Ordering # (<) :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> Bool # (<=) :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> Bool # (>) :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> Bool # (>=) :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> Bool # max :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo # min :: DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo -> DynamicLinkerLabelInfo #

mkDynamicLinkerLabel :: DynamicLinkerLabelInfo -> CLabel -> CLabel Source #

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

mkPicBaseLabel :: CLabel Source #

mkDeadStripPreventer :: CLabel -> CLabel Source #

mkHpcTicksLabel :: Module -> CLabel Source #

hasCAF :: CLabel -> Bool Source #

needsCDecl :: CLabel -> Bool Source #

maybeAsmTemp :: CLabel -> Maybe Unique Source #

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

externallyVisibleCLabel :: CLabel -> Bool Source #

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 Source #

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 avoid generating our own C prototypes.

isCFunctionLabel :: CLabel -> Bool Source #

isGcPtrLabel :: CLabel -> Bool Source #

labelDynamic :: DynFlags -> Module -> CLabel -> Bool Source #

# Conversions

toClosureLbl :: CLabel -> CLabel Source #

toSlowEntryLbl :: CLabel -> CLabel Source #

toEntryLbl :: CLabel -> CLabel Source #

toInfoLbl :: CLabel -> CLabel Source #

toRednCountsLbl :: CLabel -> Maybe CLabel Source #

hasHaskellName :: CLabel -> Maybe Name Source #

pprCLabel :: Platform -> CLabel -> SDoc Source #