pub enum JvmInstruction {
Show 203 variants
Nop,
AconstNull,
IconstM1,
Iconst0,
Iconst1,
Iconst2,
Iconst3,
Iconst4,
Iconst5,
Lconst0,
Lconst1,
Fconst0,
Fconst1,
Fconst2,
Dconst0,
Dconst1,
Bipush {
value: i8,
},
Sipush {
value: i16,
},
Ldc {
symbol: String,
},
LdcW {
symbol: String,
},
Ldc2W {
symbol: String,
},
Iload {
index: u16,
},
Iload0,
Iload1,
Iload2,
Iload3,
Lload {
index: u16,
},
Lload0,
Lload1,
Lload2,
Lload3,
Fload {
index: u16,
},
Fload0,
Fload1,
Fload2,
Fload3,
Dload {
index: u16,
},
Dload0,
Dload1,
Dload2,
Dload3,
Aload {
index: u16,
},
Aload0,
Aload1,
Aload2,
Aload3,
Iaload,
Laload,
Faload,
Daload,
Aaload,
Baload,
Caload,
Saload,
Istore {
index: u16,
},
Istore0,
Istore1,
Istore2,
Istore3,
Lstore {
index: u16,
},
Lstore0,
Lstore1,
Lstore2,
Lstore3,
Fstore {
index: u16,
},
Fstore0,
Fstore1,
Fstore2,
Fstore3,
Dstore {
index: u16,
},
Dstore0,
Dstore1,
Dstore2,
Dstore3,
Astore {
index: u16,
},
Astore0,
Astore1,
Astore2,
Astore3,
Iastore,
Lastore,
Fastore,
Dastore,
Aastore,
Bastore,
Castore,
Sastore,
Pop,
Pop2,
Dup,
DupX1,
DupX2,
Dup2,
Dup2X1,
Dup2X2,
Swap,
Iadd,
Ladd,
Fadd,
Dadd,
Isub,
Lsub,
Fsub,
Dsub,
Imul,
Lmul,
Fmul,
Dmul,
Idiv,
Ldiv,
Fdiv,
Ddiv,
Irem,
Lrem,
Frem,
Drem,
Ineg,
Lneg,
Fneg,
Dneg,
Ishl,
Lshl,
Ishr,
Lshr,
Iushr,
Lushr,
Iand,
Land,
Ior,
Lor,
Ixor,
Lxor,
Iinc {
index: u16,
value: i16,
},
I2l,
I2f,
I2d,
L2i,
L2f,
L2d,
F2i,
F2l,
F2d,
D2i,
D2l,
D2f,
I2b,
I2c,
I2s,
Lcmp,
Fcmpl,
Fcmpg,
Dcmpl,
Dcmpg,
Ifeq {
target: String,
},
Ifne {
target: String,
},
Iflt {
target: String,
},
Ifge {
target: String,
},
Ifgt {
target: String,
},
Ifle {
target: String,
},
IfIcmpeq {
target: String,
},
IfIcmpne {
target: String,
},
IfIcmplt {
target: String,
},
IfIcmpge {
target: String,
},
IfIcmpgt {
target: String,
},
IfIcmple {
target: String,
},
IfAcmpeq {
target: String,
},
IfAcmpne {
target: String,
},
Goto {
target: String,
},
Jsr {
target: String,
},
Ret {
index: u16,
},
Tableswitch {
default: String,
low: i32,
high: i32,
offsets: Vec<String>,
},
Lookupswitch {
default: String,
npairs: i32,
match_offsets: Vec<(i32, String)>,
},
Ireturn,
Lreturn,
Freturn,
Dreturn,
Areturn,
Return,
Getstatic {
class_name: String,
field_name: String,
descriptor: String,
},
Putstatic {
class_name: String,
field_name: String,
descriptor: String,
},
Getfield {
class_name: String,
field_name: String,
descriptor: String,
},
Putfield {
class_name: String,
field_name: String,
descriptor: String,
},
Invokevirtual {
class_name: String,
method_name: String,
descriptor: String,
},
Invokespecial {
class_name: String,
method_name: String,
descriptor: String,
},
Invokestatic {
class_name: String,
method_name: String,
descriptor: String,
},
Invokeinterface {
class_name: String,
method_name: String,
descriptor: String,
},
Invokedynamic {
class_name: String,
method_name: String,
descriptor: String,
},
New {
class_name: String,
},
Newarray {
type_code: u8,
},
Anewarray {
class_name: String,
},
Arraylength,
Athrow,
Checkcast {
class_name: String,
},
Instanceof {
class_name: String,
},
Monitorenter,
Monitorexit,
Wide,
Multianewarray {
class_name: String,
dimensions: u8,
},
Ifnull {
target: String,
},
Ifnonnull {
target: String,
},
GotoW {
target: String,
},
JsrW {
target: String,
},
Label {
name: String,
},
}Expand description
JVM instruction enumeration
Variants§
Nop
No operation
AconstNull
Push null onto the stack
IconstM1
Push int constant -1 onto the stack
Iconst0
Push int constant 0 onto the stack
Iconst1
Push int constant 1 onto the stack
Iconst2
Push int constant 2 onto the stack
Iconst3
Push int constant 3 onto the stack
Iconst4
Push int constant 4 onto the stack
Iconst5
Push int constant 5 onto the stack
Lconst0
Push long constant 0 onto the stack
Lconst1
Push long constant 1 onto the stack
Fconst0
Push float constant 0 onto the stack
Fconst1
Push float constant 1 onto the stack
Fconst2
Push float constant 2 onto the stack
Dconst0
Push double constant 0 onto the stack
Dconst1
Push double constant 1 onto the stack
Bipush
Push byte constant onto the stack
Sipush
Push short constant onto the stack
Ldc
Push item from constant pool (int, float, or String)
LdcW
Push item from constant pool (wide index)
Ldc2W
Push long or double from constant pool (wide index)
Iload
Load int from local variable
Iload0
Load int from local variable 0
Iload1
Load int from local variable 1
Iload2
Load int from local variable 2
Iload3
Load int from local variable 3
Lload
Load long from local variable
Lload0
Load long from local variable 0
Lload1
Load long from local variable 1
Lload2
Load long from local variable 2
Lload3
Load long from local variable 3
Fload
Load float from local variable
Fload0
Load float from local variable 0
Fload1
Load float from local variable 1
Fload2
Load float from local variable 2
Fload3
Load float from local variable 3
Dload
Load double from local variable
Dload0
Load double from local variable 0
Dload1
Load double from local variable 1
Dload2
Load double from local variable 2
Dload3
Load double from local variable 3
Aload
Load reference from local variable
Aload0
Load reference from local variable 0
Aload1
Load reference from local variable 1
Aload2
Load reference from local variable 2
Aload3
Load reference from local variable 3
Iaload
Load int from array
Laload
Load long from array
Faload
Load float from array
Daload
Load double from array
Aaload
Load reference from array
Baload
Load byte or boolean from array
Caload
Load char from array
Saload
Load short from array
Istore
Store int into local variable
Istore0
Store int into local variable 0
Istore1
Store int into local variable 1
Istore2
Store int into local variable 2
Istore3
Store int into local variable 3
Lstore
Store long into local variable
Lstore0
Store long into local variable 0
Lstore1
Store long into local variable 1
Lstore2
Store long into local variable 2
Lstore3
Store long into local variable 3
Fstore
Store float into local variable
Fstore0
Store float into local variable 0
Fstore1
Store float into local variable 1
Fstore2
Store float into local variable 2
Fstore3
Store float into local variable 3
Dstore
Store double into local variable
Dstore0
Store double into local variable 0
Dstore1
Store double into local variable 1
Dstore2
Store double into local variable 2
Dstore3
Store double into local variable 3
Astore
Store reference into local variable
Astore0
Store reference into local variable 0
Astore1
Store reference into local variable 1
Astore2
Store reference into local variable 2
Astore3
Store reference into local variable 3
Iastore
Store int into array
Lastore
Store long into array
Fastore
Store float into array
Dastore
Store double into array
Aastore
Store reference into array
Bastore
Store byte or boolean into array
Castore
Store char into array
Sastore
Store short into array
Pop
Pop top operand stack value
Pop2
Pop top two operand stack values
Dup
Duplicate top operand stack value
DupX1
Duplicate top operand stack value and insert two values down
DupX2
Duplicate top operand stack value and insert three values down
Dup2
Duplicate top two operand stack values
Dup2X1
Duplicate top two operand stack values and insert three values down
Dup2X2
Duplicate top two operand stack values and insert four values down
Swap
Swap top two operand stack values
Iadd
Add int
Ladd
Add long
Fadd
Add float
Dadd
Add double
Isub
Subtract int
Lsub
Subtract long
Fsub
Subtract float
Dsub
Subtract double
Imul
Multiply int
Lmul
Multiply long
Fmul
Multiply float
Dmul
Multiply double
Idiv
Divide int
Ldiv
Divide long
Fdiv
Divide float
Ddiv
Divide double
Irem
Remainder int
Lrem
Remainder long
Frem
Remainder float
Drem
Remainder double
Ineg
Negate int
Lneg
Negate long
Fneg
Negate float
Dneg
Negate double
Ishl
Shift left int
Lshl
Shift left long
Ishr
Arithmetic shift right int
Lshr
Arithmetic shift right long
Iushr
Logical shift right int
Lushr
Logical shift right long
Iand
Bitwise AND int
Land
Bitwise AND long
Ior
Bitwise OR int
Lor
Bitwise OR long
Ixor
Bitwise XOR int
Lxor
Bitwise XOR long
Iinc
Increment local variable by constant
I2l
Convert int to long
I2f
Convert int to float
I2d
Convert int to double
L2i
Convert long to int
L2f
Convert long to float
L2d
Convert long to double
F2i
Convert float to int
F2l
Convert float to long
F2d
Convert float to double
D2i
Convert double to int
D2l
Convert double to long
D2f
Convert double to float
I2b
Convert int to byte
I2c
Convert int to char
I2s
Convert int to short
Lcmp
Compare long
Fcmpl
Compare float (less than returns -1)
Fcmpg
Compare float (greater than returns 1)
Dcmpl
Compare double (less than returns -1)
Dcmpg
Compare double (greater than returns 1)
Ifeq
Jump if zero
Ifne
Jump if not zero
Iflt
Jump if less than zero
Ifge
Jump if greater than or equal to zero
Ifgt
Jump if greater than zero
Ifle
Jump if less than or equal to zero
IfIcmpeq
Jump if int comparison succeeds (equal)
IfIcmpne
Jump if int comparison succeeds (not equal)
IfIcmplt
Jump if int comparison succeeds (less than)
IfIcmpge
Jump if int comparison succeeds (greater than or equal)
IfIcmpgt
Jump if int comparison succeeds (greater than)
IfIcmple
Jump if int comparison succeeds (less than or equal)
IfAcmpeq
Jump if reference comparison succeeds (equal)
IfAcmpne
Jump if reference comparison succeeds (not equal)
Goto
Unconditional jump
Jsr
Jump to subroutine (deprecated)
Ret
Return from subroutine (deprecated)
Tableswitch
Jump index into table and jump
Fields
Lookupswitch
Match key in table and jump
Fields
Ireturn
Return int from method
Lreturn
Return long from method
Freturn
Return float from method
Dreturn
Return double from method
Areturn
Return reference from method
Return
Return void from method
Getstatic
Get static field from class
Fields
Putstatic
Set static field in class
Fields
Getfield
Get field from object
Fields
Putfield
Set field in object
Fields
Invokevirtual
Invoke instance method; dispatch based on class
Fields
Invokespecial
Invoke instance method; special handling for superclass, private, and instance initialization method invocations
Fields
Invokestatic
Invoke a class (static) method
Fields
Invokeinterface
Invoke interface method
Fields
Invokedynamic
Invoke dynamic method
Fields
New
Create new object
Newarray
Create new array of primitive type
Anewarray
Create new array of reference type
Arraylength
Get length of array
Athrow
Throw exception or error
Checkcast
Check whether object is of given type
Instanceof
Determine if object is of given type
Monitorenter
Enter monitor for object
Monitorexit
Exit monitor for object
Wide
Extend local variable index by additional bytes
Multianewarray
Create new multidimensional array
Ifnull
Jump if reference is null
Ifnonnull
Jump if reference is not null
GotoW
Unconditional jump (wide index)
JsrW
Jump to subroutine (wide index)
Label
Label (pseudo-instruction, does not generate bytecode)
Trait Implementations§
Source§impl Clone for JvmInstruction
impl Clone for JvmInstruction
Source§fn clone(&self) -> JvmInstruction
fn clone(&self) -> JvmInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more