Safe Haskell | None |
---|---|
Language | GHC2021 |
GHC.ByteCode.Types
Description
Bytecode assembler types
Synopsis
- data CompiledByteCode = CompiledByteCode {}
- seqCompiledByteCode :: CompiledByteCode -> ()
- data BCOByteArray a = BCOByteArray {}
- mkBCOByteArray :: UArray Int a -> BCOByteArray a
- newtype FFIInfo = FFIInfo (RemotePtr C_ffi_cif)
- newtype RegBitmap = RegBitmap {}
- data NativeCallType
- data NativeCallInfo = NativeCallInfo {}
- voidTupleReturnInfo :: NativeCallInfo
- voidPrimCallInfo :: NativeCallInfo
- newtype ByteOff = ByteOff Int
- newtype WordOff = WordOff Int
- newtype HalfWord = HalfWord Word
- data UnlinkedBCO = UnlinkedBCO {
- unlinkedBCOName :: !Name
- unlinkedBCOArity :: !Int
- unlinkedBCOInstrs :: !(BCOByteArray Word16)
- unlinkedBCOBitmap :: !(BCOByteArray Word)
- unlinkedBCOLits :: !(FlatBag BCONPtr)
- unlinkedBCOPtrs :: !(FlatBag BCOPtr)
- data BCOPtr
- data BCONPtr
- type ItblEnv = NameEnv (Name, ItblPtr)
- newtype ItblPtr = ItblPtr (RemotePtr StgInfoTable)
- type AddrEnv = NameEnv (Name, AddrPtr)
- newtype AddrPtr = AddrPtr (RemotePtr ())
- data CgBreakInfo = CgBreakInfo {
- cgb_tyvars :: ![IfaceTvBndr]
- cgb_vars :: ![Maybe (IfaceIdBndr, Word)]
- cgb_resty :: !IfaceType
- 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
- modBreaks_module :: RemotePtr ModuleName
- type BreakIndex = Int
- emptyModBreaks :: ModBreaks
- data CCostCentre
- data FlatBag a
- sizeFlatBag :: FlatBag a -> Word
- fromSizedSeq :: SizedSeq a -> FlatBag a
- elemsFlatBag :: FlatBag a -> [a]
Documentation
data CompiledByteCode Source #
Constructors
CompiledByteCode | |
Fields
|
Instances
Outputable CompiledByteCode Source # | |
Defined in GHC.ByteCode.Types Methods ppr :: CompiledByteCode -> SDoc Source # |
seqCompiledByteCode :: CompiledByteCode -> () Source #
data BCOByteArray a Source #
Wrapper for a ByteArray#
.
The phantom type tells what elements are stored in the ByteArray#
.
Creating a ByteArray#
can be achieved using UArray'
s API,
where the underlying ByteArray#
can be unpacked.
Constructors
BCOByteArray | |
Fields |
Instances
(Binary a, Storable a, IArray UArray a) => Binary (BCOByteArray a) Source # | |
Defined in GHCi.ResolvedBCO Methods put :: BCOByteArray a -> Put Source # get :: Get (BCOByteArray a) Source # putList :: [BCOByteArray a] -> Put Source # | |
Show (BCOByteArray Word16) Source # | |
Defined in GHCi.ResolvedBCO | |
Show (BCOByteArray Word) Source # | |
Defined in GHCi.ResolvedBCO |
mkBCOByteArray :: UArray Int a -> BCOByteArray a Source #
Constructors
RegBitmap | |
Fields |
Instances
data NativeCallType Source #
Constructors
NativePrimCall | |
NativeTupleReturn |
Instances
Eq NativeCallType Source # | |
Defined in GHC.ByteCode.Types Methods (==) :: NativeCallType -> NativeCallType -> Bool # (/=) :: NativeCallType -> NativeCallType -> Bool # |
data NativeCallInfo Source #
Constructors
NativeCallInfo | |
Fields |
Instances
Outputable NativeCallInfo Source # | |
Defined in GHC.ByteCode.Types Methods ppr :: NativeCallInfo -> SDoc Source # |
Instances
Outputable ByteOff Source # | |
Eq ByteOff Source # | |
Ord ByteOff Source # | |
Enum ByteOff Source # | |
Num ByteOff Source # | |
Integral ByteOff Source # | |
Defined in GHC.ByteCode.Types | |
Real ByteOff Source # | |
Defined in GHC.ByteCode.Types Methods toRational :: ByteOff -> Rational # | |
Show ByteOff Source # | |
Instances
Outputable WordOff Source # | |
Eq WordOff Source # | |
Ord WordOff Source # | |
Enum WordOff Source # | |
Num WordOff Source # | |
Integral WordOff Source # | |
Defined in GHC.ByteCode.Types | |
Real WordOff Source # | |
Defined in GHC.ByteCode.Types Methods toRational :: WordOff -> Rational # | |
Show WordOff Source # | |
Instances
Outputable HalfWord Source # | |
Eq HalfWord Source # | |
Ord HalfWord Source # | |
Defined in GHC.ByteCode.Types | |
Enum HalfWord Source # | |
Defined in GHC.ByteCode.Types | |
Num HalfWord Source # | |
Integral HalfWord Source # | |
Defined in GHC.ByteCode.Types | |
Real HalfWord Source # | |
Defined in GHC.ByteCode.Types Methods toRational :: HalfWord -> Rational # | |
Show HalfWord Source # | |
data UnlinkedBCO Source #
Constructors
UnlinkedBCO | |
Fields
|
Instances
NFData UnlinkedBCO Source # | |
Defined in GHC.ByteCode.Types Methods rnf :: UnlinkedBCO -> () Source # | |
Outputable UnlinkedBCO Source # | |
Defined in GHC.ByteCode.Types Methods ppr :: UnlinkedBCO -> SDoc Source # |
Constructors
BCOPtrName !Name | |
BCOPtrPrimOp !PrimOp | |
BCOPtrBCO !UnlinkedBCO | |
BCOPtrBreakArray (ForeignRef BreakArray) | a pointer to a breakpoint's module's BreakArray in GHCi's memory |
Constructors
BCONPtrWord !Word | |
BCONPtrLbl !FastString | |
BCONPtrItbl !Name | |
BCONPtrAddr !Name | A reference to a top-level string literal; see Note [Generating code for top-level string literal bindings] in GHC.StgToByteCode. |
BCONPtrStr !ByteString | Only used internally in the assembler in an intermediate representation; should never appear in a fully-assembled UnlinkedBCO. Also see Note [Allocating string literals] in GHC.ByteCode.Asm. |
Constructors
ItblPtr (RemotePtr StgInfoTable) |
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.Types Methods ppr :: CgBreakInfo -> SDoc Source # |
All the information about the breakpoints for a module
Constructors
ModBreaks | |
Fields
|
type BreakIndex = Int Source #
Breakpoint index
emptyModBreaks :: ModBreaks Source #
Construct an empty ModBreaks
data CCostCentre Source #
C CostCentre type
Store elements in a flattened representation.
A FlatBag
is a data structure that stores an ordered list of elements
in a flat structure, avoiding the overhead of a linked list.
Use this data structure, if the code requires the following properties:
- Elements are stored in a long-lived object, and benefit from a flattened representation.
- The
FlatBag
will be traversed but not extended or filtered. - The number of elements should be known.
- Sharing of the empty case improves memory behaviour.
A FlagBag
aims to have as little overhead as possible to store its elements.
To achieve that, it distinguishes between the empty case, singleton, tuple
and general case.
Thus, we only pay for the additional three words of an Array
if we have at least
three elements.
Instances
Functor FlatBag Source # | |
Foldable FlatBag Source # | |
Defined in GHC.Data.FlatBag Methods fold :: Monoid m => FlatBag m -> m # foldMap :: Monoid m => (a -> m) -> FlatBag a -> m # foldMap' :: Monoid m => (a -> m) -> FlatBag a -> m # foldr :: (a -> b -> b) -> b -> FlatBag a -> b # foldr' :: (a -> b -> b) -> b -> FlatBag a -> b # foldl :: (b -> a -> b) -> b -> FlatBag a -> b # foldl' :: (b -> a -> b) -> b -> FlatBag a -> b # foldr1 :: (a -> a -> a) -> FlatBag a -> a # foldl1 :: (a -> a -> a) -> FlatBag a -> a # elem :: Eq a => a -> FlatBag a -> Bool # maximum :: Ord a => FlatBag a -> a # minimum :: Ord a => FlatBag a -> a # | |
Traversable FlatBag Source # | |
NFData a => NFData (FlatBag a) Source # | |
Defined in GHC.Data.FlatBag |
sizeFlatBag :: FlatBag a -> Word Source #
Calculate the size of
fromSizedSeq :: SizedSeq a -> FlatBag a Source #
Convert a SizedSeq
into its flattened representation.
A 'FlatBag a' is more memory efficient than '[a]', if no further modification
is necessary.
elemsFlatBag :: FlatBag a -> [a] Source #
Get all elements that are stored in the FlatBag
.