ghc-lib-9.0.1.20210207: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.StgToCmm.Closure

Synopsis

Documentation

idPrimRep :: Id -> PrimRep Source #

Assumes that there is precisely one PrimRep of the type. This assumption holds after unarise. See Note [Post-unarisation invariants]

isVoidRep :: PrimRep -> Bool #

isGcPtrRep :: PrimRep -> Bool #

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

Assumes that Ids have one PrimRep, which holds after unarisation. See Note [Post-unarisation invariants]

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

Assumes that arguments have one PrimRep, which holds after unarisation. See Note [Post-unarisation invariants]

argPrimRep :: StgArg -> PrimRep Source #

Assumes that the argument has one PrimRep, which holds after unarisation. See Note [Post-unarisation invariants]

newtype NonVoid a Source #

Constructors

NonVoid a 

Instances

Instances details
Eq a => Eq (NonVoid a) Source # 
Instance details

Defined in GHC.StgToCmm.Closure

Methods

(==) :: NonVoid a -> NonVoid a -> Bool #

(/=) :: NonVoid a -> NonVoid a -> Bool #

Show a => Show (NonVoid a) Source # 
Instance details

Defined in GHC.StgToCmm.Closure

Methods

showsPrec :: Int -> NonVoid a -> ShowS #

show :: NonVoid a -> String #

showList :: [NonVoid a] -> ShowS #

Outputable a => Outputable (NonVoid a) Source # 
Instance details

Defined in GHC.StgToCmm.Closure

Methods

ppr :: NonVoid a -> SDoc

pprPrec :: Rational -> NonVoid a -> SDoc

nonVoidStgArgs :: [StgArg] -> [NonVoid StgArg] Source #

assertNonVoidIds :: [Id] -> [NonVoid Id] Source #

Used in places where some invariant ensures that all these Ids are non-void; e.g. constructor field binders in case expressions. See Note [Post-unarisation invariants] in GHC.Stg.Unarise.

assertNonVoidStgArgs :: [StgArg] -> [NonVoid StgArg] Source #

Used in places where some invariant ensures that all these arguments are non-void; e.g. constructor arguments. See Note [Post-unarisation invariants] in GHC.Stg.Unarise.

LambdaFormInfo

data LambdaFormInfo #

Instances

Instances details
Outputable LambdaFormInfo 
Instance details

Defined in GHC.StgToCmm.Types

Methods

ppr :: LambdaFormInfo -> SDoc

pprPrec :: Rational -> LambdaFormInfo -> SDoc

data StandardFormInfo #

Instances

Instances details
Eq StandardFormInfo 
Instance details

Defined in GHC.StgToCmm.Types

Outputable StandardFormInfo 
Instance details

Defined in GHC.StgToCmm.Types

Methods

ppr :: StandardFormInfo -> SDoc

pprPrec :: Rational -> StandardFormInfo -> SDoc

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

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

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

Used by other modules

data CgLoc Source #

Constructors

CmmLoc CmmExpr 
LneLoc BlockId [LocalReg] 

Instances

Instances details
Outputable CgLoc Source # 
Instance details

Defined in GHC.StgToCmm.Closure

Methods

ppr :: CgLoc -> SDoc

pprPrec :: Rational -> CgLoc -> SDoc

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

data CallMethod Source #

Constructors

EnterIt 
JumpToIt BlockId [LocalReg] 
ReturnIt 
SlowCall 
DirectEntry CLabel RepArity 

tagForArity :: DynFlags -> RepArity -> DynTag Source #

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

ClosureInfo

mkCmmInfo :: ClosureInfo -> Id -> CostCentreStack -> CmmInfoTable Source #

Convert from ClosureInfo to CmmInfoTable.

Inspection

Labels

closureLocalEntryLabel :: Platform -> ClosureInfo -> CLabel Source #

Predicates

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

InfoTables

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

indStaticInfoTable :: CmmInfoTable Source #

staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool Source #