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

GHC.Cmm.Info

Synopsis

Documentation

mkEmptyContInfoTable :: CLabel -> CmmInfoTable Source #

cmmToRawCmm :: Logger -> DynFlags -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a) Source #

srtEscape :: Platform -> StgHalfWord Source #

Value of the srt field of an info table when using an StgLargeSRT

data PtrOpts Source #

Constructors

PtrOpts 

Fields

closureInfoPtr :: PtrOpts -> CmmExpr -> CmmExpr Source #

Takes a closure pointer and returns the info table pointer

entryCode :: Platform -> CmmExpr -> CmmExpr Source #

Takes an info pointer (the first word of a closure) and returns its entry code

getConstrTag :: PtrOpts -> CmmExpr -> CmmExpr Source #

Takes a closure pointer, and return the *zero-indexed* constructor tag obtained from the info table This lives in the SRT field of the info table (constructors don't need SRTs).

cmmGetClosureType :: PtrOpts -> CmmExpr -> CmmExpr Source #

Takes a closure pointer, and return the closure type obtained from the info table

infoTable :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info pointer (the first word of a closure) and returns a pointer to the first word of the standard-form info table, excluding the entry-code word (if present)

infoTableConstrTag :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info table pointer (from infoTable) and returns the constr tag field of the info table (same as the srt_bitmap field)

infoTableSrtBitmap :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info table pointer (from infoTable) and returns the srt_bitmap field of the info table

infoTableClosureType :: Profile -> CmmExpr -> CmmExpr Source #

Takes an info table pointer (from infoTable) and returns the closure type field of the info table.

infoTablePtrs :: Profile -> CmmExpr -> CmmExpr Source #

infoTableNonPtrs :: Profile -> CmmExpr -> CmmExpr Source #

funInfoTable :: Profile -> CmmExpr -> CmmExpr Source #

Takes the info pointer of a function, and returns a pointer to the first word of the StgFunInfoExtra struct in the info table.

funInfoArity :: Profile -> CmmExpr -> CmmExpr Source #

Takes the info pointer of a function, returns the function's arity

stdInfoTableSizeW :: Profile -> WordOff Source #

stdInfoTableSizeB :: Profile -> ByteOff Source #

stdSrtBitmapOffset :: Profile -> ByteOff Source #

Byte offset of the SRT bitmap half-word which is in the *higher-addressed* part of the type_lit

stdClosureTypeOffset :: Profile -> ByteOff Source #

Byte offset of the closure type half-word

stdPtrsOffset :: Profile -> ByteOff Source #

stdNonPtrsOffset :: Profile -> ByteOff Source #