Safe Haskell | None |
---|---|
Language | GHC2021 |
GHC.ByteCode.Breakpoints
Description
Breakpoint information constructed during ByteCode generation.
Specifically, code-generation breakpoints are referred to as "internal
breakpoints", the internal breakpoint data for a module is stored in
InternalModBreaks
, and is uniquely identified at runtime by an
InternalBreakpointId
.
See Note [Breakpoint identifiers]
Synopsis
- data InternalModBreaks = InternalModBreaks {}
- data CgBreakInfo = CgBreakInfo {
- cgb_tyvars :: ![IfaceTvBndr]
- cgb_vars :: ![Maybe (IfaceIdBndr, Word)]
- cgb_resty :: !IfaceType
- mkInternalModBreaks :: Module -> IntMap CgBreakInfo -> ModBreaks -> InternalModBreaks
- data InternalBreakpointId = InternalBreakpointId {}
- type BreakInfoIndex = Int
- toBreakpointId :: InternalBreakpointId -> BreakpointId
- getInternalBreak :: InternalBreakpointId -> InternalModBreaks -> CgBreakInfo
- addInternalBreak :: InternalBreakpointId -> CgBreakInfo -> InternalModBreaks -> InternalModBreaks
- getBreakLoc :: InternalBreakpointId -> InternalModBreaks -> SrcSpan
- getBreakVars :: InternalBreakpointId -> InternalModBreaks -> [OccName]
- getBreakDecls :: InternalBreakpointId -> InternalModBreaks -> [String]
- getBreakCCS :: InternalBreakpointId -> InternalModBreaks -> (String, String)
- seqInternalModBreaks :: InternalModBreaks -> ()
Internal Mod Breaks
data InternalModBreaks Source #
Internal mod breaks store the runtime-relevant information of breakpoints.
Importantly, it maps InternalBreakpointId
s to CgBreakInfo
.
InternalModBreaks
are constructed during bytecode generation and stored in
CompiledByteCode
afterwards.
Constructors
InternalModBreaks | |
Fields
|
data CgBreakInfo Source #
Information about a breakpoint that we know at code-generation time
In order to be used, this needs to be hydrated relative to the current HscEnv by
hydrateCgBreakInfo
. Everything here can be fully forced and that's critical for
preventing space leaks (see #22530)
Constructors
CgBreakInfo | |
Fields
|
Instances
Outputable CgBreakInfo Source # | |
Defined in GHC.ByteCode.Breakpoints Methods ppr :: CgBreakInfo -> SDoc Source # |
mkInternalModBreaks :: Module -> IntMap CgBreakInfo -> ModBreaks -> InternalModBreaks Source #
Construct an InternalModBreaks
Internal breakpoint identifier
data InternalBreakpointId Source #
Internal breakpoint identifier
Indexes into the structures in the
produced during ByteCode generation.
See Note [Breakpoint identifiers]InternalModBreaks
Constructors
InternalBreakpointId | |
Fields
|
Instances
type BreakInfoIndex = Int Source #
Internal breakpoint info index
Operations
Internal-level operations
getInternalBreak :: InternalBreakpointId -> InternalModBreaks -> CgBreakInfo Source #
Get an internal breakpoint info by InternalBreakpointId
addInternalBreak :: InternalBreakpointId -> CgBreakInfo -> InternalModBreaks -> InternalModBreaks Source #
Add a CgBreakInfo to an InternalModBreaks
at InternalBreakpointId
Source-level information operations
getBreakLoc :: InternalBreakpointId -> InternalModBreaks -> SrcSpan Source #
Get the source span for this breakpoint
getBreakVars :: InternalBreakpointId -> InternalModBreaks -> [OccName] Source #
Get the vars for this breakpoint
getBreakDecls :: InternalBreakpointId -> InternalModBreaks -> [String] Source #
Get the decls for this breakpoint
getBreakCCS :: InternalBreakpointId -> InternalModBreaks -> (String, String) Source #
Get the decls for this breakpoint
Utils
seqInternalModBreaks :: InternalModBreaks -> () Source #
Fully force an InternalModBreaks
value