ghc-7.6.3: The GHC API

Safe Haskell | None

StgCmmClosure

Contents

- LambdaFormInfo
- ClosureInfo
  - Inspection
  - Labels
  - Predicates
- InfoTables

Synopsis

- type DynTag = Int
- tagForCon :: DataCon -> DynTag
- isSmallFamily :: Int -> Bool
- type ConTagZ = Int
- dataConTagZ :: DataCon -> ConTagZ
- idPrimRep :: Id -> PrimRep
- isVoidRep :: PrimRep -> Bool
- isGcPtrRep :: PrimRep -> Bool
- addIdReps :: [Id] -> [(PrimRep, Id)]
- addArgReps :: [StgArg] -> [(PrimRep, StgArg)]
- argPrimRep :: StgArg -> PrimRep
- data LambdaFormInfo
- data StandardFormInfo
- mkLFThunk :: Type -> TopLevelFlag -> [Id] -> UpdateFlag -> LambdaFormInfo
- mkLFReEntrant :: TopLevelFlag -> [Id] -> [Id] -> ArgDescr -> LambdaFormInfo
- mkConLFInfo :: DataCon -> LambdaFormInfo
- mkSelectorLFInfo :: Id -> Int -> Bool -> LambdaFormInfo
- mkApLFInfo :: Id -> UpdateFlag -> Arity -> LambdaFormInfo
- mkLFImported :: Id -> LambdaFormInfo
- mkLFArgument :: Id -> LambdaFormInfo
- mkLFLetNoEscape :: LambdaFormInfo
- mkLFBlackHole :: LambdaFormInfo
- lfDynTag :: LambdaFormInfo -> DynTag
- maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon
- isLFThunk :: LambdaFormInfo -> Bool
- isLFReEntrant :: LambdaFormInfo -> Bool
- lfUpdatable :: LambdaFormInfo -> Bool
- nodeMustPointToIt :: LambdaFormInfo -> Bool
- data CallMethod
  - = EnterIt
  - | JumpToIt
  - | ReturnIt
  - | SlowCall
  - | DirectEntry CLabel RepArity
- getCallMethod :: DynFlags -> Name -> CafInfo -> LambdaFormInfo -> RepArity -> CallMethod
- isKnownFun :: LambdaFormInfo -> Bool
- funTag :: ClosureInfo -> DynTag
- tagForArity :: RepArity -> DynTag
- data ClosureInfo
- mkClosureInfo :: Bool -> Id -> LambdaFormInfo -> Int -> Int -> String -> ClosureInfo
- mkCmmInfo :: ClosureInfo -> CmmInfoTable
- closureLFInfo :: ClosureInfo -> LambdaFormInfo
- closureName :: ClosureInfo -> Name
- closureInfoLabel :: ClosureInfo -> CLabel
- staticClosureLabel :: ClosureInfo -> CLabel
- closureRednCountsLabel :: ClosureInfo -> CLabel
- closureSlowEntryLabel :: ClosureInfo -> CLabel
- closureLocalEntryLabel :: ClosureInfo -> CLabel
- closureUpdReqd :: ClosureInfo -> Bool
- closureSingleEntry :: ClosureInfo -> Bool
- closureReEntrant :: ClosureInfo -> Bool
- closureFunInfo :: ClosureInfo -> Maybe (RepArity, ArgDescr)
- isToplevClosure :: ClosureInfo -> Bool
- blackHoleOnEntry :: ClosureInfo -> Bool
- isStaticClosure :: ClosureInfo -> Bool
- mkDataConInfoTable :: DataCon -> Bool -> Int -> Int -> CmmInfoTable
- cafBlackHoleInfoTable :: CmmInfoTable
- staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool

# Documentation

type DynTag = Int

tagForCon :: DataCon -> DynTag

isSmallFamily :: Int -> Bool

type ConTagZ = Int

dataConTagZ :: DataCon -> ConTagZ

idPrimRep :: Id -> PrimRep

isVoidRep :: PrimRep -> Bool

isGcPtrRep :: PrimRep -> Bool

addIdReps :: [Id] -> [(PrimRep, Id)]

addArgReps :: [StgArg] -> [(PrimRep, StgArg)]

argPrimRep :: StgArg -> PrimRep

# LambdaFormInfo

data LambdaFormInfo

data StandardFormInfo

mkLFThunk :: Type -> TopLevelFlag -> [Id] -> UpdateFlag -> LambdaFormInfo

mkLFReEntrant :: TopLevelFlag -> [Id] -> [Id] -> ArgDescr -> LambdaFormInfo

mkConLFInfo :: DataCon -> LambdaFormInfo

mkSelectorLFInfo :: Id -> Int -> Bool -> LambdaFormInfo

mkApLFInfo :: Id -> UpdateFlag -> Arity -> LambdaFormInfo

mkLFImported :: Id -> LambdaFormInfo

mkLFArgument :: Id -> LambdaFormInfo

mkLFLetNoEscape :: LambdaFormInfo

mkLFBlackHole :: LambdaFormInfo

lfDynTag :: LambdaFormInfo -> DynTag

maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon

isLFThunk :: LambdaFormInfo -> Bool

isLFReEntrant :: LambdaFormInfo -> Bool

lfUpdatable :: LambdaFormInfo -> Bool

nodeMustPointToIt :: LambdaFormInfo -> Bool

data CallMethod

Constructors

EnterIt |
JumpToIt |
ReturnIt |
SlowCall |
DirectEntry CLabel RepArity |

getCallMethod :: DynFlags -> Name -> CafInfo -> LambdaFormInfo -> RepArity -> CallMethod

isKnownFun :: LambdaFormInfo -> Bool

funTag :: ClosureInfo -> DynTag

tagForArity :: RepArity -> DynTag

# ClosureInfo

data ClosureInfo

mkClosureInfo :: Bool -> Id -> LambdaFormInfo -> Int -> Int -> String -> ClosureInfo

mkCmmInfo :: ClosureInfo -> CmmInfoTable

Convert from `ClosureInfo` to `CmmInfoTable`.

## Inspection

closureLFInfo :: ClosureInfo -> LambdaFormInfo

closureName :: ClosureInfo -> Name

## Labels

closureInfoLabel :: ClosureInfo -> CLabel

staticClosureLabel :: ClosureInfo -> CLabel

closureRednCountsLabel :: ClosureInfo -> CLabel

closureSlowEntryLabel :: ClosureInfo -> CLabel

closureLocalEntryLabel :: ClosureInfo -> CLabel

## Predicates

closureUpdReqd :: ClosureInfo -> Bool

closureSingleEntry :: ClosureInfo -> Bool

closureReEntrant :: ClosureInfo -> Bool

closureFunInfo :: ClosureInfo -> Maybe (RepArity, ArgDescr)

isToplevClosure :: ClosureInfo -> Bool

blackHoleOnEntry :: ClosureInfo -> Bool

isStaticClosure :: ClosureInfo -> Bool

# InfoTables

mkDataConInfoTable :: DataCon -> Bool -> Int -> Int -> CmmInfoTable

cafBlackHoleInfoTable :: CmmInfoTable

staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool