StgCmmClosure

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

StgCmmClosure

Contents

- LambdaFormInfo
- Used by other modules
- ClosureInfo
  - Inspection
  - Labels
  - Predicates
- InfoTables

Synopsis

- type DynTag = Int
- tagForCon :: DynFlags -> DataCon -> DynTag
- isSmallFamily :: DynFlags -> 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
- lfDynTag :: DynFlags -> LambdaFormInfo -> DynTag
- maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon
- isLFThunk :: LambdaFormInfo -> Bool
- isLFReEntrant :: LambdaFormInfo -> Bool
- lfUpdatable :: LambdaFormInfo -> Bool
- data CgLoc
  - = CmmLoc CmmExpr
  - | LneLoc BlockId [LocalReg]
- type SelfLoopInfo = (Id, BlockId, [LocalReg])
- data CallMethod
  - = EnterIt
  - | JumpToIt BlockId [LocalReg]
  - | ReturnIt
  - | SlowCall
  - | DirectEntry CLabel RepArity
- nodeMustPointToIt :: DynFlags -> LambdaFormInfo -> Bool
- isKnownFun :: LambdaFormInfo -> Bool
- funTag :: DynFlags -> ClosureInfo -> DynTag
- tagForArity :: DynFlags -> RepArity -> DynTag
- getCallMethod :: DynFlags -> Name -> Id -> LambdaFormInfo -> RepArity -> CgLoc -> Maybe SelfLoopInfo -> CallMethod
- data ClosureInfo
- mkClosureInfo :: DynFlags -> Bool -> Id -> LambdaFormInfo -> Int -> Int -> String -> ClosureInfo
- mkCmmInfo :: ClosureInfo -> CmmInfoTable
- closureLFInfo :: ClosureInfo -> LambdaFormInfo
- closureName :: ClosureInfo -> Name
- closureInfoLabel :: ClosureInfo -> CLabel
- staticClosureLabel :: ClosureInfo -> CLabel
- closureSlowEntryLabel :: ClosureInfo -> CLabel
- closureLocalEntryLabel :: DynFlags -> 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 :: DynFlags -> DataCon -> Bool -> Int -> Int -> CmmInfoTable
- cafBlackHoleInfoTable :: CmmInfoTable
- indStaticInfoTable :: CmmInfoTable
- staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool

# Documentation

type DynTag = Int Source

tagForCon :: DynFlags -> DataCon -> DynTag Source

isSmallFamily :: DynFlags -> Int -> Bool Source

type ConTagZ = Int Source

dataConTagZ :: DataCon -> ConTagZ Source

idPrimRep :: Id -> PrimRep Source

isVoidRep :: PrimRep -> Bool Source

isGcPtrRep :: PrimRep -> Bool Source

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

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

argPrimRep :: StgArg -> PrimRep Source

# LambdaFormInfo

data LambdaFormInfo Source

data StandardFormInfo Source

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

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

mkConLFInfo :: DataCon -> LambdaFormInfo Source

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

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

mkLFImported :: Id -> LambdaFormInfo Source

mkLFArgument :: Id -> LambdaFormInfo Source

mkLFLetNoEscape :: LambdaFormInfo Source

lfDynTag :: DynFlags -> LambdaFormInfo -> DynTag Source

maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon Source

isLFThunk :: LambdaFormInfo -> Bool Source

isLFReEntrant :: LambdaFormInfo -> Bool Source

lfUpdatable :: LambdaFormInfo -> Bool Source

# Used by other modules

data CgLoc Source

Constructors

CmmLoc CmmExpr |
LneLoc BlockId [LocalReg] |

Instances

Outputable CgLoc |

type SelfLoopInfo = (Id, BlockId, [LocalReg]) Source

data CallMethod Source

Constructors

EnterIt |
JumpToIt BlockId [LocalReg] |
ReturnIt |
SlowCall |
DirectEntry CLabel RepArity |

nodeMustPointToIt :: DynFlags -> LambdaFormInfo -> Bool Source

isKnownFun :: LambdaFormInfo -> Bool Source

funTag :: DynFlags -> ClosureInfo -> DynTag Source

tagForArity :: DynFlags -> RepArity -> DynTag Source

getCallMethod :: DynFlags -> Name -> Id -> LambdaFormInfo -> RepArity -> CgLoc -> Maybe SelfLoopInfo -> CallMethod Source

# ClosureInfo

data ClosureInfo Source

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

mkCmmInfo :: ClosureInfo -> CmmInfoTable Source

Convert from `ClosureInfo` to `CmmInfoTable`.

## Inspection

closureLFInfo :: ClosureInfo -> LambdaFormInfo Source

closureName :: ClosureInfo -> Name Source

## Labels

closureInfoLabel :: ClosureInfo -> CLabel Source

staticClosureLabel :: ClosureInfo -> CLabel Source

closureSlowEntryLabel :: ClosureInfo -> CLabel Source

closureLocalEntryLabel :: DynFlags -> ClosureInfo -> CLabel Source

## Predicates

closureUpdReqd :: ClosureInfo -> Bool Source

closureSingleEntry :: ClosureInfo -> Bool Source

closureReEntrant :: ClosureInfo -> Bool Source

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

isToplevClosure :: ClosureInfo -> Bool Source

blackHoleOnEntry :: ClosureInfo -> Bool Source

isStaticClosure :: ClosureInfo -> Bool Source

# InfoTables

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

cafBlackHoleInfoTable :: CmmInfoTable Source

indStaticInfoTable :: CmmInfoTable Source

staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool Source