ghc-9.15: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.ByteCode.Types

Description

Bytecode assembler types

Synopsis

Documentation

data CompiledByteCode Source #

Constructors

CompiledByteCode 

Fields

Instances

Instances details
Outputable CompiledByteCode Source # 
Instance details

Defined in GHC.ByteCode.Types

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 

data FFIInfo Source #

A libffi ffi_cif function prototype.

Constructors

FFIInfo 

Instances

Instances details
Show FFIInfo Source # 
Instance details

Defined in GHC.ByteCode.Types

newtype RegBitmap Source #

Constructors

RegBitmap 

Fields

Instances

Instances details
Outputable RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: RegBitmap -> SDoc Source #

Bits RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

FiniteBits RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Eq RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Ord RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Enum RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Num RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Integral RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Real RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

Show RegBitmap Source # 
Instance details

Defined in GHC.ByteCode.Types

newtype ByteOff Source #

Constructors

ByteOff Int 

Instances

Instances details
Outputable ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: ByteOff -> SDoc Source #

Eq ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Ord ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Enum ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Num ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Integral ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Real ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Show ByteOff Source # 
Instance details

Defined in GHC.ByteCode.Types

newtype WordOff Source #

Constructors

WordOff Int 

Instances

Instances details
Outputable WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: WordOff -> SDoc Source #

Eq WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Ord WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Enum WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Num WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Integral WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Real WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

Show WordOff Source # 
Instance details

Defined in GHC.ByteCode.Types

newtype HalfWord Source #

Constructors

HalfWord Word 

Instances

Instances details
Outputable HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

ppr :: HalfWord -> SDoc Source #

Eq HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

Ord HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

Enum HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

Num HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

Integral HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

Real HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

Show HalfWord Source # 
Instance details

Defined in GHC.ByteCode.Types

data BCOPtr Source #

Constructors

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

Converted to the actual BreakArray remote pointer at link-time

Instances

Instances details
NFData BCOPtr Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

rnf :: BCOPtr -> () Source #

data BCONPtr Source #

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

A top-level string literal. Also see Note [Allocating string literals] in GHC.ByteCode.Asm.

BCONPtrFS !FastString

Same as BCONPtrStr but with benefits of FastString interning logic.

BCONPtrFFIInfo !FFIInfo

A libffi ffi_cif function prototype.

BCONPtrCostCentre !BreakpointId

A CostCentre remote pointer array's respective BreakpointId

Instances

Instances details
NFData BCONPtr Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

rnf :: BCONPtr -> () Source #

newtype ItblPtr Source #

Instances

Instances details
NFData ItblPtr Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

rnf :: ItblPtr -> () Source #

Show ItblPtr Source # 
Instance details

Defined in GHC.ByteCode.Types

newtype AddrPtr Source #

Constructors

AddrPtr (RemotePtr ()) 

Instances

Instances details
NFData AddrPtr Source # 
Instance details

Defined in GHC.ByteCode.Types

Methods

rnf :: AddrPtr -> () Source #

data FlatBag a Source #

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

Instances details
Functor FlatBag Source # 
Instance details

Defined in GHC.Data.FlatBag

Methods

fmap :: (a -> b) -> FlatBag a -> FlatBag b Source #

(<$) :: a -> FlatBag b -> FlatBag a Source #

Foldable FlatBag Source # 
Instance details

Defined in GHC.Data.FlatBag

Methods

fold :: Monoid m => FlatBag m -> m Source #

foldMap :: Monoid m => (a -> m) -> FlatBag a -> m Source #

foldMap' :: Monoid m => (a -> m) -> FlatBag a -> m Source #

foldr :: (a -> b -> b) -> b -> FlatBag a -> b Source #

foldr' :: (a -> b -> b) -> b -> FlatBag a -> b Source #

foldl :: (b -> a -> b) -> b -> FlatBag a -> b Source #

foldl' :: (b -> a -> b) -> b -> FlatBag a -> b Source #

foldr1 :: (a -> a -> a) -> FlatBag a -> a Source #

foldl1 :: (a -> a -> a) -> FlatBag a -> a Source #

toList :: FlatBag a -> [a] Source #

null :: FlatBag a -> Bool Source #

length :: FlatBag a -> Int Source #

elem :: Eq a => a -> FlatBag a -> Bool Source #

maximum :: Ord a => FlatBag a -> a Source #

minimum :: Ord a => FlatBag a -> a Source #

sum :: Num a => FlatBag a -> a Source #

product :: Num a => FlatBag a -> a Source #

Traversable FlatBag Source # 
Instance details

Defined in GHC.Data.FlatBag

Methods

traverse :: Applicative f => (a -> f b) -> FlatBag a -> f (FlatBag b) Source #

sequenceA :: Applicative f => FlatBag (f a) -> f (FlatBag a) Source #

mapM :: Monad m => (a -> m b) -> FlatBag a -> m (FlatBag b) Source #

sequence :: Monad m => FlatBag (m a) -> m (FlatBag a) Source #

NFData a => NFData (FlatBag a) Source # 
Instance details

Defined in GHC.Data.FlatBag

Methods

rnf :: FlatBag a -> () Source #

sizeFlatBag :: FlatBag a -> Word Source #

Calculate the size of

fromSmallArray :: SmallArray 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.

Mod Breaks

data ModBreaks Source #

All the information about the source-relevant breakpoints for a module

This information is constructed once during desugaring (with mkModBreaks) from breakpoint ticks and fixed/unchanged from there on forward. It could be exported as an abstract datatype because it should never be updated after construction, only queried.

The arrays can be indexed using the int in the corresponding BreakpointId (i.e. the BreakpointId whose Module matches the Module corresponding to these ModBreaks) with the accessors modBreaks_locs, modBreaks_vars, and modBreaks_decls.

Constructors

ModBreaks 

Fields

data BreakpointId Source #

Breakpoint identifier.

Indexes into the structures in the ModBreaks created during desugaring (after inserting the breakpoint ticks in the expressions). See Note [Breakpoint identifiers]

Constructors

BreakpointId 

Fields

Instances

Instances details
NFData BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Methods

rnf :: BreakpointId -> () Source #

Outputable BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Eq BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Ord BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Data BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BreakpointId -> c BreakpointId Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BreakpointId Source #

toConstr :: BreakpointId -> Constr Source #

dataTypeOf :: BreakpointId -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BreakpointId) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BreakpointId) Source #

gmapT :: (forall b. Data b => b -> b) -> BreakpointId -> BreakpointId Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BreakpointId -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BreakpointId -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> BreakpointId -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BreakpointId -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BreakpointId -> m BreakpointId Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BreakpointId -> m BreakpointId Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BreakpointId -> m BreakpointId Source #

type BreakTickIndex = Int Source #

Breakpoint tick index newtype BreakTickIndex = BreakTickIndex Int deriving (Eq, Ord, Data, Ix, NFData, Outputable)

Internal Mod Breaks

data InternalModBreaks Source #

Internal mod breaks store the runtime-relevant information of breakpoints.

Importantly, it maps InternalBreakpointIds 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

Instances details
Outputable CgBreakInfo Source # 
Instance details

Defined in GHC.ByteCode.Breakpoints

Methods

ppr :: CgBreakInfo -> SDoc Source #

Internal breakpoint identifier

data InternalBreakpointId Source #

Internal breakpoint identifier

Indexes into the structures in the InternalModBreaks produced during ByteCode generation. See Note [Breakpoint identifiers]

Constructors

InternalBreakpointId 

Fields

type BreakInfoIndex = Int Source #

Internal breakpoint info index