Skip to main content

JvmInstruction

Enum JvmInstruction 

Source
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

Fields

§value: i8

The value

§

Sipush

Push short constant onto the stack

Fields

§value: i16

The value

§

Ldc

Push item from constant pool (int, float, or String)

Fields

§symbol: String

The symbol name in the pool

§

LdcW

Push item from constant pool (wide index)

Fields

§symbol: String

The symbol name in the pool

§

Ldc2W

Push long or double from constant pool (wide index)

Fields

§symbol: String

The symbol name in the pool

§

Iload

Load int from local variable

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§

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

Fields

§index: u16

Variable index

§value: i16

Increment value

§

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

Fields

§target: String

Target label

§

Ifne

Jump if not zero

Fields

§target: String

Target label

§

Iflt

Jump if less than zero

Fields

§target: String

Target label

§

Ifge

Jump if greater than or equal to zero

Fields

§target: String

Target label

§

Ifgt

Jump if greater than zero

Fields

§target: String

Target label

§

Ifle

Jump if less than or equal to zero

Fields

§target: String

Target label

§

IfIcmpeq

Jump if int comparison succeeds (equal)

Fields

§target: String

Target label

§

IfIcmpne

Jump if int comparison succeeds (not equal)

Fields

§target: String

Target label

§

IfIcmplt

Jump if int comparison succeeds (less than)

Fields

§target: String

Target label

§

IfIcmpge

Jump if int comparison succeeds (greater than or equal)

Fields

§target: String

Target label

§

IfIcmpgt

Jump if int comparison succeeds (greater than)

Fields

§target: String

Target label

§

IfIcmple

Jump if int comparison succeeds (less than or equal)

Fields

§target: String

Target label

§

IfAcmpeq

Jump if reference comparison succeeds (equal)

Fields

§target: String

Target label

§

IfAcmpne

Jump if reference comparison succeeds (not equal)

Fields

§target: String

Target label

§

Goto

Unconditional jump

Fields

§target: String

Target label

§

Jsr

Jump to subroutine (deprecated)

Fields

§target: String

Target label

§

Ret

Return from subroutine (deprecated)

Fields

§index: u16

Variable index

§

Tableswitch

Jump index into table and jump

Fields

§default: String

Default target label

§low: i32

Low key value

§high: i32

High key value

§offsets: Vec<String>

Jump offsets labels

§

Lookupswitch

Match key in table and jump

Fields

§default: String

Default target label

§npairs: i32

Number of pairs

§match_offsets: Vec<(i32, String)>

Match value and target label pairs

§

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

§class_name: String

Class name

§field_name: String

Field name

§descriptor: String

Field descriptor

§

Putstatic

Set static field in class

Fields

§class_name: String

Class name

§field_name: String

Field name

§descriptor: String

Field descriptor

§

Getfield

Get field from object

Fields

§class_name: String

Class name

§field_name: String

Field name

§descriptor: String

Field descriptor

§

Putfield

Set field in object

Fields

§class_name: String

Class name

§field_name: String

Field name

§descriptor: String

Field descriptor

§

Invokevirtual

Invoke instance method; dispatch based on class

Fields

§class_name: String

Class name

§method_name: String

Method name

§descriptor: String

Method descriptor

§

Invokespecial

Invoke instance method; special handling for superclass, private, and instance initialization method invocations

Fields

§class_name: String

Class name

§method_name: String

Method name

§descriptor: String

Method descriptor

§

Invokestatic

Invoke a class (static) method

Fields

§class_name: String

Class name

§method_name: String

Method name

§descriptor: String

Method descriptor

§

Invokeinterface

Invoke interface method

Fields

§class_name: String

Class name

§method_name: String

Method name

§descriptor: String

Method descriptor

§

Invokedynamic

Invoke dynamic method

Fields

§class_name: String

Class name

§method_name: String

Method name

§descriptor: String

Method descriptor

§

New

Create new object

Fields

§class_name: String

Class name

§

Newarray

Create new array of primitive type

Fields

§type_code: u8

Type code

§

Anewarray

Create new array of reference type

Fields

§class_name: String

Class name

§

Arraylength

Get length of array

§

Athrow

Throw exception or error

§

Checkcast

Check whether object is of given type

Fields

§class_name: String

Class name

§

Instanceof

Determine if object is of given type

Fields

§class_name: String

Class name

§

Monitorenter

Enter monitor for object

§

Monitorexit

Exit monitor for object

§

Wide

Extend local variable index by additional bytes

§

Multianewarray

Create new multidimensional array

Fields

§class_name: String

Class name

§dimensions: u8

Number of dimensions

§

Ifnull

Jump if reference is null

Fields

§target: String

Target label

§

Ifnonnull

Jump if reference is not null

Fields

§target: String

Target label

§

GotoW

Unconditional jump (wide index)

Fields

§target: String

Target label

§

JsrW

Jump to subroutine (wide index)

Fields

§target: String

Target label

§

Label

Label (pseudo-instruction, does not generate bytecode)

Fields

§name: String

Label name

Trait Implementations§

Source§

impl Clone for JvmInstruction

Source§

fn clone(&self) -> JvmInstruction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for JvmInstruction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for JvmInstruction

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for JvmInstruction

Source§

fn eq(&self, other: &JvmInstruction) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for JvmInstruction

Source§

impl StructuralPartialEq for JvmInstruction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more