#[repr(u8)]pub enum Instruction {
Show 205 variants
Nop = 0,
AConstNull = 1,
IConstM1 = 2,
IConst0 = 3,
IConst1 = 4,
IConst2 = 5,
IConst3 = 6,
IConst4 = 7,
IConst5 = 8,
LConst0 = 9,
LConst1 = 10,
FConst0 = 11,
FConst1 = 12,
FConst2 = 13,
DConst0 = 14,
DConst1 = 15,
BiPush(u8),
SiPush(u16),
Ldc(ConstantValue),
LdcW(ConstantValue),
Ldc2W(ConstantValue),
ILoad(u8),
LLoad(u8),
FLoad(u8),
DLoad(u8),
ALoad(u8),
ILoad0 = 26,
ILoad1 = 27,
ILoad2 = 28,
ILoad3 = 29,
LLoad0 = 30,
LLoad1 = 31,
LLoad2 = 32,
LLoad3 = 33,
FLoad0 = 34,
FLoad1 = 35,
FLoad2 = 36,
FLoad3 = 37,
DLoad0 = 38,
DLoad1 = 39,
DLoad2 = 40,
DLoad3 = 41,
ALoad0 = 42,
ALoad1 = 43,
ALoad2 = 44,
ALoad3 = 45,
IALoad = 46,
LALoad = 47,
FALoad = 48,
DALoad = 49,
AALoad = 50,
BALoad = 51,
CALoad = 52,
SALoad = 53,
IStore(u8),
LStore(u8),
FStore(u8),
DStore(u8),
AStore(u8),
IStore0 = 59,
IStore1 = 60,
IStore2 = 61,
IStore3 = 62,
LStore0 = 63,
LStore1 = 64,
LStore2 = 65,
LStore3 = 66,
FStore0 = 67,
FStore1 = 68,
FStore2 = 69,
FStore3 = 70,
DStore0 = 71,
DStore1 = 72,
DStore2 = 73,
DStore3 = 74,
AStore0 = 75,
AStore1 = 76,
AStore2 = 77,
AStore3 = 78,
IAStore = 79,
LAStore = 80,
FAStore = 81,
DAStore = 82,
AAStore = 83,
BAStore = 84,
CAStore = 85,
SAStore = 86,
Pop = 87,
Pop2 = 88,
Dup = 89,
DupX1 = 90,
DupX2 = 91,
Dup2 = 92,
Dup2X1 = 93,
Dup2X2 = 94,
Swap = 95,
IAdd = 96,
LAdd = 97,
FAdd = 98,
DAdd = 99,
ISub = 100,
LSub = 101,
FSub = 102,
DSub = 103,
IMul = 104,
LMul = 105,
FMul = 106,
DMul = 107,
IDiv = 108,
LDiv = 109,
FDiv = 110,
DDiv = 111,
IRem = 112,
LRem = 113,
FRem = 114,
DRem = 115,
INeg = 116,
LNeg = 117,
FNeg = 118,
DNeg = 119,
IShl = 120,
LShl = 121,
IShr = 122,
LShr = 123,
IUShr = 124,
LUShr = 125,
IAnd = 126,
LAnd = 127,
IOr = 128,
LOr = 129,
IXor = 130,
LXor = 131,
IInc(u8, i32),
I2L = 133,
I2F = 134,
I2D = 135,
L2I = 136,
L2F = 137,
L2D = 138,
F2I = 139,
F2L = 140,
F2D = 141,
D2I = 142,
D2L = 143,
D2F = 144,
I2B = 145,
I2C = 146,
I2S = 147,
LCmp = 148,
FCmpL = 149,
FCmpG = 150,
DCmpL = 151,
DCmpG = 152,
IfEq(ProgramCounter),
IfNe(ProgramCounter),
IfLt(ProgramCounter),
IfGe(ProgramCounter),
IfGt(ProgramCounter),
IfLe(ProgramCounter),
IfICmpEq(ProgramCounter),
IfICmpNe(ProgramCounter),
IfICmpLt(ProgramCounter),
IfICmpGe(ProgramCounter),
IfICmpGt(ProgramCounter),
IfICmpLe(ProgramCounter),
IfACmpEq(ProgramCounter),
IfACmpNe(ProgramCounter),
Goto(ProgramCounter),
Jsr(ProgramCounter),
Ret(u8),
TableSwitch {
range: RangeInclusive<i32>,
jump_targets: Vec<ProgramCounter>,
default: ProgramCounter,
},
LookupSwitch {
default: ProgramCounter,
match_targets: BTreeMap<i32, ProgramCounter>,
},
IReturn = 172,
LReturn = 173,
FReturn = 174,
DReturn = 175,
AReturn = 176,
Return = 177,
GetStatic(FieldRef),
PutStatic(FieldRef),
GetField(FieldRef),
PutField(FieldRef),
InvokeVirtual(MethodRef),
InvokeSpecial(MethodRef),
InvokeStatic(MethodRef),
InvokeInterface(MethodRef, u8),
InvokeDynamic {
bootstrap_method_index: u16,
name: String,
descriptor: MethodDescriptor,
},
New(ClassRef),
NewArray(PrimitiveType),
ANewArray(ClassRef),
ArrayLength = 190,
AThrow = 191,
CheckCast(FieldType),
InstanceOf(FieldType),
MonitorEnter = 194,
MonitorExit = 195,
Wide(WideInstruction),
MultiANewArray(FieldType, u8),
IfNull(ProgramCounter),
IfNonNull(ProgramCounter),
GotoW(ProgramCounter),
JsrW(ProgramCounter),
Breakpoint = 202,
ImpDep1 = 254,
ImpDep2 = 255,
}
Expand description
A JVM instruction. See the JVM Specification §6.5 for more information.
Variants§
Nop = 0
AConstNull = 1
IConstM1 = 2
IConst0 = 3
IConst1 = 4
IConst2 = 5
IConst3 = 6
IConst4 = 7
IConst5 = 8
LConst0 = 9
LConst1 = 10
FConst0 = 11
FConst1 = 12
FConst2 = 13
DConst0 = 14
DConst1 = 15
BiPush(u8)
SiPush(u16)
Ldc(ConstantValue)
LdcW(ConstantValue)
Ldc2W(ConstantValue)
ILoad(u8)
LLoad(u8)
FLoad(u8)
DLoad(u8)
ALoad(u8)
ILoad0 = 26
ILoad1 = 27
ILoad2 = 28
ILoad3 = 29
LLoad0 = 30
LLoad1 = 31
LLoad2 = 32
LLoad3 = 33
FLoad0 = 34
FLoad1 = 35
FLoad2 = 36
FLoad3 = 37
DLoad0 = 38
DLoad1 = 39
DLoad2 = 40
DLoad3 = 41
ALoad0 = 42
ALoad1 = 43
ALoad2 = 44
ALoad3 = 45
IALoad = 46
LALoad = 47
FALoad = 48
DALoad = 49
AALoad = 50
BALoad = 51
CALoad = 52
SALoad = 53
IStore(u8)
LStore(u8)
FStore(u8)
DStore(u8)
AStore(u8)
IStore0 = 59
IStore1 = 60
IStore2 = 61
IStore3 = 62
LStore0 = 63
LStore1 = 64
LStore2 = 65
LStore3 = 66
FStore0 = 67
FStore1 = 68
FStore2 = 69
FStore3 = 70
DStore0 = 71
DStore1 = 72
DStore2 = 73
DStore3 = 74
AStore0 = 75
AStore1 = 76
AStore2 = 77
AStore3 = 78
IAStore = 79
LAStore = 80
FAStore = 81
DAStore = 82
AAStore = 83
BAStore = 84
CAStore = 85
SAStore = 86
Pop = 87
Pop2 = 88
Dup = 89
DupX1 = 90
DupX2 = 91
Dup2 = 92
Dup2X1 = 93
Dup2X2 = 94
Swap = 95
IAdd = 96
LAdd = 97
FAdd = 98
DAdd = 99
ISub = 100
LSub = 101
FSub = 102
DSub = 103
IMul = 104
LMul = 105
FMul = 106
DMul = 107
IDiv = 108
LDiv = 109
FDiv = 110
DDiv = 111
IRem = 112
LRem = 113
FRem = 114
DRem = 115
INeg = 116
LNeg = 117
FNeg = 118
DNeg = 119
IShl = 120
LShl = 121
IShr = 122
LShr = 123
IUShr = 124
LUShr = 125
IAnd = 126
LAnd = 127
IOr = 128
LOr = 129
IXor = 130
LXor = 131
IInc(u8, i32)
I2L = 133
I2F = 134
I2D = 135
L2I = 136
L2F = 137
L2D = 138
F2I = 139
F2L = 140
F2D = 141
D2I = 142
D2L = 143
D2F = 144
I2B = 145
I2C = 146
I2S = 147
LCmp = 148
FCmpL = 149
FCmpG = 150
DCmpL = 151
DCmpG = 152
IfEq(ProgramCounter)
IfNe(ProgramCounter)
IfLt(ProgramCounter)
IfGe(ProgramCounter)
IfGt(ProgramCounter)
IfLe(ProgramCounter)
IfICmpEq(ProgramCounter)
IfICmpNe(ProgramCounter)
IfICmpLt(ProgramCounter)
IfICmpGe(ProgramCounter)
IfICmpGt(ProgramCounter)
IfICmpLe(ProgramCounter)
IfACmpEq(ProgramCounter)
IfACmpNe(ProgramCounter)
Goto(ProgramCounter)
Jsr(ProgramCounter)
Ret(u8)
TableSwitch
LookupSwitch
IReturn = 172
LReturn = 173
FReturn = 174
DReturn = 175
AReturn = 176
Return = 177
GetStatic(FieldRef)
PutStatic(FieldRef)
GetField(FieldRef)
PutField(FieldRef)
InvokeVirtual(MethodRef)
InvokeSpecial(MethodRef)
InvokeStatic(MethodRef)
InvokeInterface(MethodRef, u8)
InvokeDynamic
New(ClassRef)
NewArray(PrimitiveType)
ANewArray(ClassRef)
ArrayLength = 190
AThrow = 191
CheckCast(FieldType)
InstanceOf(FieldType)
MonitorEnter = 194
MonitorExit = 195
Wide(WideInstruction)
MultiANewArray(FieldType, u8)
IfNull(ProgramCounter)
IfNonNull(ProgramCounter)
GotoW(ProgramCounter)
JsrW(ProgramCounter)
Breakpoint = 202
ImpDep1 = 254
ImpDep2 = 255
Implementations§
Source§impl Instruction
impl Instruction
Source§impl Instruction
impl Instruction
Sourcepub fn into_raw_instruction(
self,
pc: ProgramCounter,
cp: &mut ConstantPool,
) -> Result<RawInstruction, ToWriterError>
pub fn into_raw_instruction( self, pc: ProgramCounter, cp: &mut ConstantPool, ) -> Result<RawInstruction, ToWriterError>
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more