ClosureInfo

ghc-7.6.3: The GHC API

Safe Haskell | None

ClosureInfo

Synopsis

- idRepArity :: Id -> RepArity
- data ClosureInfo
  - = ClosureInfo {
    - closureName :: !Name
    - closureLFInfo :: !LambdaFormInfo
    - closureSMRep :: !SMRep
    - closureSRT :: !C_SRT
    - closureType :: !Type
    - closureDescr :: !String
    - closureInfLcl :: Bool
    }
  - | ConInfo {
    - closureCon :: !DataCon
    - closureSMRep :: !SMRep
    }
- data LambdaFormInfo
  - = LFReEntrant TopLevelFlag !RepArity !Bool ArgDescr
  - | LFCon DataCon
  - | LFThunk TopLevelFlag !Bool !Bool StandardFormInfo !Bool
  - | LFUnknown !Bool
  - | LFLetNoEscape !RepArity
  - | LFBlackHole
- data StandardFormInfo
  - = NonStandardThunk
  - | SelectorThunk WordOff
  - | ApThunk RepArity
- data SMRep
- data ArgDescr
  - = ArgSpec !StgHalfWord
  - | ArgGen Liveness
- type Liveness = [Bool]
- data C_SRT
  - = NoC_SRT
  - | C_SRT !CLabel !WordOff !StgHalfWord
- needsSRT :: C_SRT -> Bool
- mkLFThunk :: Type -> TopLevelFlag -> [Var] -> UpdateFlag -> LambdaFormInfo
- mkLFReEntrant :: TopLevelFlag -> [Id] -> [Id] -> ArgDescr -> LambdaFormInfo
- mkConLFInfo :: DataCon -> LambdaFormInfo
- mkSelectorLFInfo :: Id -> WordOff -> Bool -> LambdaFormInfo
- mkApLFInfo :: Id -> UpdateFlag -> RepArity -> LambdaFormInfo
- mkLFImported :: Id -> LambdaFormInfo
- mkLFArgument :: Id -> LambdaFormInfo
- mkLFLetNoEscape :: RepArity -> LambdaFormInfo
- mkClosureInfo :: Bool -> Id -> LambdaFormInfo -> Int -> Int -> C_SRT -> String -> ClosureInfo
- mkConInfo :: Bool -> DataCon -> Int -> Int -> ClosureInfo
- maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon
- closureSize :: ClosureInfo -> WordOff
- type ConTagZ = Int
- dataConTagZ :: DataCon -> ConTagZ
- infoTableLabelFromCI :: ClosureInfo -> CLabel
- entryLabelFromCI :: ClosureInfo -> CLabel
- closureLabelFromCI :: ClosureInfo -> CLabel
- isLFThunk :: LambdaFormInfo -> Bool
- closureUpdReqd :: ClosureInfo -> Bool
- closureNeedsUpdSpace :: ClosureInfo -> Bool
- closureIsThunk :: ClosureInfo -> Bool
- closureSingleEntry :: ClosureInfo -> Bool
- closureReEntrant :: ClosureInfo -> Bool
- isConstrClosure_maybe :: ClosureInfo -> Maybe DataCon
- closureFunInfo :: ClosureInfo -> Maybe (RepArity, ArgDescr)
- isKnownFun :: LambdaFormInfo -> Bool
- funTag :: ClosureInfo -> Int
- funTagLFInfo :: LambdaFormInfo -> Int
- tagForArity :: RepArity -> Maybe Int
- clHasCafRefs :: ClosureInfo -> CafInfo
- enterIdLabel :: Name -> CafInfo -> CLabel
- enterReturnPtLabel :: Unique -> CLabel
- nodeMustPointToIt :: LambdaFormInfo -> Bool
- data CallMethod
  - = EnterIt
  - | JumpToIt CLabel
  - | ReturnIt
  - | ReturnCon DataCon
  - | SlowCall
  - | DirectEntry CLabel RepArity
- getCallMethod :: DynFlags -> Name -> CafInfo -> LambdaFormInfo -> RepArity -> CallMethod
- blackHoleOnEntry :: ClosureInfo -> Bool
- staticClosureRequired :: Name -> StgBinderInfo -> LambdaFormInfo -> Bool
- isToplevClosure :: ClosureInfo -> Bool
- closureValDescr :: ClosureInfo -> String
- closureTypeDescr :: ClosureInfo -> String
- isStaticClosure :: ClosureInfo -> Bool
- cafBlackHoleClosureInfo :: ClosureInfo -> ClosureInfo
- staticClosureNeedsLink :: ClosureInfo -> Bool
- data CgRep
  - = VoidArg
  - | PtrArg
  - | NonPtrArg
  - | LongArg
  - | FloatArg
  - | DoubleArg
- nonVoidArg :: CgRep -> Bool
- argMachRep :: CgRep -> CmmType
- primRepToCgRep :: PrimRep -> CgRep
- isFollowableArg :: CgRep -> Bool
- isVoidArg :: CgRep -> Bool
- isFloatingArg :: CgRep -> Bool
- is64BitArg :: CgRep -> Bool
- separateByPtrFollowness :: [(CgRep, a)] -> ([(CgRep, a)], [(CgRep, a)])
- cgRepSizeW :: CgRep -> ByteOff
- cgRepSizeB :: CgRep -> ByteOff
- retAddrSizeW :: WordOff
- typeCgRep :: UnaryType -> CgRep
- idCgRep :: Id -> CgRep
- tyConCgRep :: TyCon -> CgRep

# Documentation

idRepArity :: Id -> RepArity

data ClosureInfo

Constructors

ClosureInfo |
Fields closureName :: !Name closureLFInfo :: !LambdaFormInfo closureSMRep :: !SMRep closureSRT :: !C_SRT closureType :: !Type closureDescr :: !String closureInfLcl :: Bool
ConInfo |
Fields closureCon :: !DataCon closureSMRep :: !SMRep

data LambdaFormInfo

Constructors

LFReEntrant TopLevelFlag !RepArity !Bool ArgDescr |
LFCon DataCon |
LFThunk TopLevelFlag !Bool !Bool StandardFormInfo !Bool |
LFUnknown !Bool |
LFLetNoEscape !RepArity |
LFBlackHole |

data StandardFormInfo

Constructors

NonStandardThunk |
SelectorThunk WordOff |
ApThunk RepArity |

data SMRep

A description of the layout of a closure. Corresponds directly to the closure types in includesrtsstorage/ClosureTypes.h.

Instances

Outputable SMRep |

data ArgDescr

Constructors

ArgSpec !StgHalfWord |
ArgGen Liveness |

Instances

Outputable ArgDescr |

type Liveness = [Bool]

data C_SRT

Constructors

NoC_SRT |
C_SRT !CLabel !WordOff !StgHalfWord |

Instances

Eq C_SRT |
Outputable C_SRT |

needsSRT :: C_SRT -> Bool

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

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

mkConLFInfo :: DataCon -> LambdaFormInfo

mkSelectorLFInfo :: Id -> WordOff -> Bool -> LambdaFormInfo

mkApLFInfo :: Id -> UpdateFlag -> RepArity -> LambdaFormInfo

mkLFImported :: Id -> LambdaFormInfo

mkLFArgument :: Id -> LambdaFormInfo

mkLFLetNoEscape :: RepArity -> LambdaFormInfo

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

mkConInfo :: Bool -> DataCon -> Int -> Int -> ClosureInfo

maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon

closureSize :: ClosureInfo -> WordOff

type ConTagZ = Int

dataConTagZ :: DataCon -> ConTagZ

infoTableLabelFromCI :: ClosureInfo -> CLabel

entryLabelFromCI :: ClosureInfo -> CLabel

closureLabelFromCI :: ClosureInfo -> CLabel

isLFThunk :: LambdaFormInfo -> Bool

closureUpdReqd :: ClosureInfo -> Bool

closureNeedsUpdSpace :: ClosureInfo -> Bool

closureIsThunk :: ClosureInfo -> Bool

closureSingleEntry :: ClosureInfo -> Bool

closureReEntrant :: ClosureInfo -> Bool

isConstrClosure_maybe :: ClosureInfo -> Maybe DataCon

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

isKnownFun :: LambdaFormInfo -> Bool

funTag :: ClosureInfo -> Int

funTagLFInfo :: LambdaFormInfo -> Int

tagForArity :: RepArity -> Maybe Int

clHasCafRefs :: ClosureInfo -> CafInfo

enterIdLabel :: Name -> CafInfo -> CLabel

enterReturnPtLabel :: Unique -> CLabel

nodeMustPointToIt :: LambdaFormInfo -> Bool

data CallMethod

Constructors

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

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

blackHoleOnEntry :: ClosureInfo -> Bool

staticClosureRequired :: Name -> StgBinderInfo -> LambdaFormInfo -> Bool

isToplevClosure :: ClosureInfo -> Bool

closureValDescr :: ClosureInfo -> String

closureTypeDescr :: ClosureInfo -> String

isStaticClosure :: ClosureInfo -> Bool

cafBlackHoleClosureInfo :: ClosureInfo -> ClosureInfo

staticClosureNeedsLink :: ClosureInfo -> Bool

data CgRep

Constructors

VoidArg |
PtrArg |
NonPtrArg |
LongArg |
FloatArg |
DoubleArg |

Instances

Eq CgRep |
Outputable CgRep |

nonVoidArg :: CgRep -> Bool

argMachRep :: CgRep -> CmmType

primRepToCgRep :: PrimRep -> CgRep

isFollowableArg :: CgRep -> Bool

isVoidArg :: CgRep -> Bool

isFloatingArg :: CgRep -> Bool

is64BitArg :: CgRep -> Bool

separateByPtrFollowness :: [(CgRep, a)] -> ([(CgRep, a)], [(CgRep, a)])

cgRepSizeW :: CgRep -> ByteOff

cgRepSizeB :: CgRep -> ByteOff

retAddrSizeW :: WordOff

typeCgRep :: UnaryType -> CgRep

idCgRep :: Id -> CgRep

tyConCgRep :: TyCon -> CgRep