ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

ByteCodeTypes

Description

Bytecode assembler types

Synopsis

- data CompiledByteCode = CompiledByteCode {
  - bc_bcos :: [UnlinkedBCO]
  - bc_itbls :: ItblEnv
  - bc_ffis :: [FFIInfo]
  - bc_strs :: [RemotePtr ()]
  - bc_breaks :: Maybe ModBreaks
  }
- seqCompiledByteCode :: CompiledByteCode -> ()
- newtype FFIInfo = FFIInfo (RemotePtr C_ffi_cif)
- data UnlinkedBCO = UnlinkedBCO {
  - unlinkedBCOName :: !Name
  - unlinkedBCOArity :: !Int
  - unlinkedBCOInstrs :: !(UArray Int Word16)
  - unlinkedBCOBitmap :: !(UArray Int Word)
  - unlinkedBCOLits :: !(SizedSeq BCONPtr)
  - unlinkedBCOPtrs :: !(SizedSeq BCOPtr)
  }
- data BCOPtr
  - = BCOPtrName !Name
  - | BCOPtrPrimOp !PrimOp
  - | BCOPtrBCO !UnlinkedBCO
  - | BCOPtrBreakArray
- data BCONPtr
  - = BCONPtrWord !Word
  - | BCONPtrLbl !FastString
  - | BCONPtrItbl !Name
  - | BCONPtrStr !ByteString
- type ItblEnv = NameEnv (Name, ItblPtr)
- newtype ItblPtr = ItblPtr (RemotePtr StgInfoTable)
- data CgBreakInfo = CgBreakInfo {
  - cgb_vars :: [(Id, Word16)]
  - cgb_resty :: Type
  }
- data ModBreaks = ModBreaks {
  - modBreaks_flags :: ForeignRef BreakArray
  - modBreaks_locs :: !(Array BreakIndex SrcSpan)
  - modBreaks_vars :: !(Array BreakIndex [OccName])
  - modBreaks_decls :: !(Array BreakIndex [String])
  - modBreaks_ccs :: !(Array BreakIndex (RemotePtr CostCentre))
  - modBreaks_breakInfo :: IntMap CgBreakInfo
  }
- type BreakIndex = Int
- emptyModBreaks :: ModBreaks
- data CCostCentre

# Documentation

data CompiledByteCode Source #

Constructors

CompiledByteCode |
Fields bc_bcos :: [UnlinkedBCO] bc_itbls :: ItblEnv bc_ffis :: [FFIInfo] bc_strs :: [RemotePtr ()] bc_breaks :: Maybe ModBreaks

Instances

Outputable CompiledByteCode # |
Methods ppr :: CompiledByteCode -> SDoc Source # pprPrec :: Rational -> CompiledByteCode -> SDoc Source #

seqCompiledByteCode :: CompiledByteCode -> () Source #

newtype FFIInfo Source #

Constructors

FFIInfo (RemotePtr C_ffi_cif) |

Instances

Show FFIInfo # |
Methods showsPrec :: Int -> FFIInfo -> ShowS Source # show :: FFIInfo -> String Source # showList :: [FFIInfo] -> ShowS Source #
NFData FFIInfo # |
Methods rnf :: FFIInfo -> () Source #

data UnlinkedBCO Source #

Constructors

UnlinkedBCO |
Fields unlinkedBCOName :: !Name unlinkedBCOArity :: !Int unlinkedBCOInstrs :: !(UArray Int Word16) unlinkedBCOBitmap :: !(UArray Int Word) unlinkedBCOLits :: !(SizedSeq BCONPtr) unlinkedBCOPtrs :: !(SizedSeq BCOPtr)

Instances

NFData UnlinkedBCO # |
Methods rnf :: UnlinkedBCO -> () Source #
Outputable UnlinkedBCO # |
Methods ppr :: UnlinkedBCO -> SDoc Source # pprPrec :: Rational -> UnlinkedBCO -> SDoc Source #

data BCOPtr Source #

Constructors

BCOPtrName !Name |
BCOPtrPrimOp !PrimOp |
BCOPtrBCO !UnlinkedBCO |
BCOPtrBreakArray |

Instances

NFData BCOPtr # |
Methods rnf :: BCOPtr -> () Source #

data BCONPtr Source #

Constructors

BCONPtrWord !Word |
BCONPtrLbl !FastString |
BCONPtrItbl !Name |
BCONPtrStr !ByteString |

Instances

NFData BCONPtr # |
Methods rnf :: BCONPtr -> () Source #

type ItblEnv = NameEnv (Name, ItblPtr) Source #

newtype ItblPtr Source #

Constructors

ItblPtr (RemotePtr StgInfoTable) |

Instances

Show ItblPtr # |
Methods showsPrec :: Int -> ItblPtr -> ShowS Source # show :: ItblPtr -> String Source # showList :: [ItblPtr] -> ShowS Source #
NFData ItblPtr # |
Methods rnf :: ItblPtr -> () Source #

data CgBreakInfo Source #

Information about a breakpoint that we know at code-generation time

Constructors

CgBreakInfo |
Fields cgb_vars :: [(Id, Word16)] cgb_resty :: Type

Instances

Outputable CgBreakInfo # |
Methods ppr :: CgBreakInfo -> SDoc Source # pprPrec :: Rational -> CgBreakInfo -> SDoc Source #

data ModBreaks Source #

All the information about the breakpoints for a module

Constructors

ModBreaks |
Fields modBreaks_flags :: ForeignRef BreakArray The array of flags, one per breakpoint, indicating which breakpoints are enabled. modBreaks_locs :: !(Array BreakIndex SrcSpan) An array giving the source span of each breakpoint. modBreaks_vars :: !(Array BreakIndex [OccName]) An array giving the names of the free variables at each breakpoint. modBreaks_decls :: !(Array BreakIndex [String]) An array giving the names of the declarations enclosing each breakpoint. modBreaks_ccs :: !(Array BreakIndex (RemotePtr CostCentre)) Array pointing to cost centre for each breakpoint modBreaks_breakInfo :: IntMap CgBreakInfo info about each breakpoint from the bytecode generator

type BreakIndex = Int Source #

Breakpoint index

emptyModBreaks :: ModBreaks Source #

Construct an empty ModBreaks

data CCostCentre Source #

C CostCentre type