h2jvm
Safe HaskellNone
LanguageGHC2021

H2JVM.Instruction

Description

High level representation of a JVM instruction, with type-safe arguments and no stack manipulation needed. This is not a 1-1 mapping to the actual instructions, use H2JVM.Internal.Raw.Instruction for that. Instead, this includes some conveniences like the Label instruction to avoid manually dealing with jump offsets.

Synopsis

Documentation

type Instruction = Instruction' Label Source #

An instruction whose labels are the Label type. This is probably the type you want.

data Instruction' label Source #

An instruction with a polymorphic label type.

Instances

Instances details
Functor Instruction' Source # 
Instance details

Defined in H2JVM.Instruction

Methods

fmap :: (a -> b) -> Instruction' a -> Instruction' b #

(<$) :: a -> Instruction' b -> Instruction' a #

Data label => Data (Instruction' label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Instruction' label -> c (Instruction' label) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Instruction' label) #

toConstr :: Instruction' label -> Constr #

dataTypeOf :: Instruction' label -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Instruction' label)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Instruction' label)) #

gmapT :: (forall b. Data b => b -> b) -> Instruction' label -> Instruction' label #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Instruction' label -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Instruction' label -> r #

gmapQ :: (forall d. Data d => d -> u) -> Instruction' label -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Instruction' label -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Instruction' label -> m (Instruction' label) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Instruction' label -> m (Instruction' label) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Instruction' label -> m (Instruction' label) #

Generic (Instruction' label) Source # 
Instance details

Defined in H2JVM.Instruction

Associated Types

type Rep (Instruction' label) 
Instance details

Defined in H2JVM.Instruction

type Rep (Instruction' label) = D1 ('MetaData "Instruction'" "H2JVM.Instruction" "h2jvm-0.1.0.0-LWhbtWHvrTPFtGJV7ONYMS" 'False) (((((C1 ('MetaCons "ALoad" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2)) :+: C1 ('MetaCons "AStore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2))) :+: (C1 ('MetaCons "AReturn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AConstNull" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Dup" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IAnd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "If" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IfCond label))) :+: (C1 ('MetaCons "Instanceof" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType)) :+: C1 ('MetaCons "InvokeStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))))))) :+: (((C1 ('MetaCons "InvokeInterface" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))) :+: C1 ('MetaCons "InvokeVirtual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor)))) :+: (C1 ('MetaCons "InvokeDynamic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BootstrapMethod) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))) :+: C1 ('MetaCons "InvokeSpecial" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))))) :+: ((C1 ('MetaCons "IOr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ILoad" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2))) :+: (C1 ('MetaCons "IStore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2)) :+: (C1 ('MetaCons "Label" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 label)) :+: C1 ('MetaCons "LDC" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LDCEntry))))))) :+: ((((C1 ('MetaCons "PutStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType))) :+: C1 ('MetaCons "GetField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType)))) :+: (C1 ('MetaCons "GetStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType))) :+: C1 ('MetaCons "PutField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType))))) :+: ((C1 ('MetaCons "Goto" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 label)) :+: C1 ('MetaCons "CheckCast" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType))) :+: (C1 ('MetaCons "Return" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IReturn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IConst0" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "IConst1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "New" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType))) :+: (C1 ('MetaCons "ArrayLength" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AALoad" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "IfICmp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IfCond label))) :+: C1 ('MetaCons "IAdd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ISub" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IMul" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IDiv" 'PrefixI 'False) (U1 :: Type -> Type)))))))

Methods

from :: Instruction' label -> Rep (Instruction' label) x #

to :: Rep (Instruction' label) x -> Instruction' label #

Show label => Show (Instruction' label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

showsPrec :: Int -> Instruction' label -> ShowS #

show :: Instruction' label -> String #

showList :: [Instruction' label] -> ShowS #

Eq label => Eq (Instruction' label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

(==) :: Instruction' label -> Instruction' label -> Bool #

(/=) :: Instruction' label -> Instruction' label -> Bool #

Ord label => Ord (Instruction' label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

compare :: Instruction' label -> Instruction' label -> Ordering #

(<) :: Instruction' label -> Instruction' label -> Bool #

(<=) :: Instruction' label -> Instruction' label -> Bool #

(>) :: Instruction' label -> Instruction' label -> Bool #

(>=) :: Instruction' label -> Instruction' label -> Bool #

max :: Instruction' label -> Instruction' label -> Instruction' label #

min :: Instruction' label -> Instruction' label -> Instruction' label #

Pretty label => Pretty (Instruction' label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

pretty :: Instruction' label -> Doc ann Source #

prettyList :: [Instruction' label] -> Doc ann Source #

type Rep (Instruction' label) Source # 
Instance details

Defined in H2JVM.Instruction

type Rep (Instruction' label) = D1 ('MetaData "Instruction'" "H2JVM.Instruction" "h2jvm-0.1.0.0-LWhbtWHvrTPFtGJV7ONYMS" 'False) (((((C1 ('MetaCons "ALoad" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2)) :+: C1 ('MetaCons "AStore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2))) :+: (C1 ('MetaCons "AReturn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AConstNull" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Dup" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IAnd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "If" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IfCond label))) :+: (C1 ('MetaCons "Instanceof" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType)) :+: C1 ('MetaCons "InvokeStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))))))) :+: (((C1 ('MetaCons "InvokeInterface" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))) :+: C1 ('MetaCons "InvokeVirtual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor)))) :+: (C1 ('MetaCons "InvokeDynamic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BootstrapMethod) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))) :+: C1 ('MetaCons "InvokeSpecial" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MethodDescriptor))))) :+: ((C1 ('MetaCons "IOr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ILoad" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2))) :+: (C1 ('MetaCons "IStore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2)) :+: (C1 ('MetaCons "Label" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 label)) :+: C1 ('MetaCons "LDC" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LDCEntry))))))) :+: ((((C1 ('MetaCons "PutStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType))) :+: C1 ('MetaCons "GetField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType)))) :+: (C1 ('MetaCons "GetStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType))) :+: C1 ('MetaCons "PutField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FieldType))))) :+: ((C1 ('MetaCons "Goto" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 label)) :+: C1 ('MetaCons "CheckCast" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType))) :+: (C1 ('MetaCons "Return" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IReturn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IConst0" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "IConst1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "New" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassInfoType))) :+: (C1 ('MetaCons "ArrayLength" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AALoad" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "IfICmp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IfCond label))) :+: C1 ('MetaCons "IAdd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ISub" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IMul" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IDiv" 'PrefixI 'False) (U1 :: Type -> Type)))))))

data LDCEntry Source #

A value that can be loaded by the LDC instruction.

Constructors

LDCInt JVMInt

Load an integer constant.

LDCFloat Float

Load a float constant.

LDCString Text

Load a string constant.

LDCClass ClassInfoType

Load a Class object.

Instances

Instances details
Data LDCEntry Source # 
Instance details

Defined in H2JVM.Instruction

Methods

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

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

toConstr :: LDCEntry -> Constr #

dataTypeOf :: LDCEntry -> DataType #

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

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

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

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

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

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

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

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

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

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

Generic LDCEntry Source # 
Instance details

Defined in H2JVM.Instruction

Methods

from :: LDCEntry -> Rep LDCEntry x #

to :: Rep LDCEntry x -> LDCEntry #

Show LDCEntry Source # 
Instance details

Defined in H2JVM.Instruction

Eq LDCEntry Source # 
Instance details

Defined in H2JVM.Instruction

Ord LDCEntry Source # 
Instance details

Defined in H2JVM.Instruction

Pretty LDCEntry Source # 
Instance details

Defined in H2JVM.Instruction

Methods

pretty :: LDCEntry -> Doc ann Source #

prettyList :: [LDCEntry] -> Doc ann Source #

type Rep LDCEntry Source # 
Instance details

Defined in H2JVM.Instruction

data IfCond label Source #

A condition of an if instruction.

Constructors

IfEq label 
IfNe label 
IfLt label 
IfGe label 
IfGt label 
IfLe label 

Instances

Instances details
Functor IfCond Source # 
Instance details

Defined in H2JVM.Instruction

Methods

fmap :: (a -> b) -> IfCond a -> IfCond b #

(<$) :: a -> IfCond b -> IfCond a #

Foldable IfCond Source # 
Instance details

Defined in H2JVM.Instruction

Methods

fold :: Monoid m => IfCond m -> m #

foldMap :: Monoid m => (a -> m) -> IfCond a -> m #

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

foldr :: (a -> b -> b) -> b -> IfCond a -> b #

foldr' :: (a -> b -> b) -> b -> IfCond a -> b #

foldl :: (b -> a -> b) -> b -> IfCond a -> b #

foldl' :: (b -> a -> b) -> b -> IfCond a -> b #

foldr1 :: (a -> a -> a) -> IfCond a -> a #

foldl1 :: (a -> a -> a) -> IfCond a -> a #

toList :: IfCond a -> [a] #

null :: IfCond a -> Bool #

length :: IfCond a -> Int #

elem :: Eq a => a -> IfCond a -> Bool #

maximum :: Ord a => IfCond a -> a #

minimum :: Ord a => IfCond a -> a #

sum :: Num a => IfCond a -> a #

product :: Num a => IfCond a -> a #

Traversable IfCond Source # 
Instance details

Defined in H2JVM.Instruction

Methods

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

sequenceA :: Applicative f => IfCond (f a) -> f (IfCond a) #

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

sequence :: Monad m => IfCond (m a) -> m (IfCond a) #

Data label => Data (IfCond label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IfCond label -> c (IfCond label) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IfCond label) #

toConstr :: IfCond label -> Constr #

dataTypeOf :: IfCond label -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> IfCond label -> IfCond label #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IfCond label -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IfCond label -> r #

gmapQ :: (forall d. Data d => d -> u) -> IfCond label -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IfCond label -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IfCond label -> m (IfCond label) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IfCond label -> m (IfCond label) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IfCond label -> m (IfCond label) #

Generic (IfCond label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

from :: IfCond label -> Rep (IfCond label) x #

to :: Rep (IfCond label) x -> IfCond label #

Show label => Show (IfCond label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

showsPrec :: Int -> IfCond label -> ShowS #

show :: IfCond label -> String #

showList :: [IfCond label] -> ShowS #

Eq label => Eq (IfCond label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

(==) :: IfCond label -> IfCond label -> Bool #

(/=) :: IfCond label -> IfCond label -> Bool #

Ord label => Ord (IfCond label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

compare :: IfCond label -> IfCond label -> Ordering #

(<) :: IfCond label -> IfCond label -> Bool #

(<=) :: IfCond label -> IfCond label -> Bool #

(>) :: IfCond label -> IfCond label -> Bool #

(>=) :: IfCond label -> IfCond label -> Bool #

max :: IfCond label -> IfCond label -> IfCond label #

min :: IfCond label -> IfCond label -> IfCond label #

Pretty label => Pretty (IfCond label) Source # 
Instance details

Defined in H2JVM.Instruction

Methods

pretty :: IfCond label -> Doc ann Source #

prettyList :: [IfCond label] -> Doc ann Source #

type Rep (IfCond label) Source # 
Instance details

Defined in H2JVM.Instruction

jumpTarget :: Instruction' label -> Maybe label Source #

The jump target of an instruction, if it is a jump instruction.

ldcEntryToFieldType :: LDCEntry -> FieldType Source #

Convert an 'LDCEntry to a 'FieldType.