ghc-lib-0.20221101: The GHC API, decoupled from GHC versions
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Cmm.Info

Synopsis

Documentation

srtEscape :: Platform -> StgHalfWord Source #

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

closureInfoPtr :: Platform -> DoAlignSanitisation -> 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 :: Profile -> DoAlignSanitisation -> 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 :: Profile -> DoAlignSanitisation -> 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.

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

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