Skip to main content

Instruction

Enum Instruction 

Source
pub enum Instruction {
Show 204 variants Aaload, Aastore, AconstNull, Aload(u8), Aload0, Aload1, Aload2, Aload3, Anewarray(u16), Areturn, ArrayLength, Astore(u8), Astore0, Astore1, Astore2, Astore3, Athrow, Baload, Bastore, Bipush(i8), Breakpoint, Caload, Castore, Checkcast(u16), D2f, D2i, D2l, Dadd, Daload, Dastore, Dcmpg, Dcmpl, Dconst0, Dconst1, Ddiv, Dload(u8), Dload0, Dload1, Dload2, Dload3, Dmul, Dneg, Drem, Dreturn, Dstore(u8), Dstore0, Dstore1, Dstore2, Dstore3, Dsub, Dup, Dup2, Dup2X1, Dup2X2, DupX1, DupX2, F2d, F2i, F2l, Fadd, Faload, Fastore, Fcmpg, Fcmpl, Fconst0, Fconst1, Fconst2, Fdiv, Fload(u8), Fload0, Fload1, Fload2, Fload3, Fmul, Fneg, Frem, Freturn, Fstore(u8), Fstore0, Fstore1, Fstore2, Fstore3, Fsub, Getfield(u16), Getstatic(u16), Goto(i16), GotoW(i32), I2b, I2c, I2d, I2f, I2l, I2s, Iadd, Iaload, Iand, Iastore, IconstM1, Iconst0, Iconst1, Iconst2, Iconst3, Iconst4, Iconst5, Idiv, IfAcmpEq(i16), IfAcmpNe(i16), IfEq(i16), IfGe(i16), IfGt(i16), IfIcmpeq(i16), IfIcmpge(i16), IfIcmpgt(i16), IfIcmple(i16), IfIcmplt(i16), IfIcmpne(i16), IfLe(i16), IfLt(i16), IfNe(i16), Ifnonnull(i16), Ifnull(i16), Iinc(u8, i8), Iload(u8), Iload0, Iload1, Iload2, Iload3, Imul, Ineg, Lookupswitch(LookupSwitchData), Instanceof(u16), InvokeDynamic(u16), InvokeInterface(u16, u8), InvokeSpecial(u16), InvokeStatic(u16), InvokeVirtual(u16), Ior, Irem, Ireturn, Ishl, Ishr, Istore(u8), Istore0, Istore1, Istore2, Istore3, Isub, Iushr, Ixor, Jsr(i16), JsrW(i32), L2d, L2f, L2i, Ladd, Laload, Land, Lastore, Lcmp, Lconst0, Lconst1, Ldc(u16), Ldc2W(u16), LdcW(u16), Ldiv, Lload(u8), Lload0, Lload1, Lload2, Lload3, Lmul, Lneg, Lor, Lrem, Lreturn, Lshl, Lshr, Lstore(u8), Lstore0, Lstore1, Lstore2, Lstore3, Lsub, Lushr, Lxor, Monitorenter, Monitorexit, Multianewarray(u16, u8), New(u16), Newarray(ArrayType), Nop, Pop, Pop2, Putfield(u16), Putstatic(u16), Ret(u8), Return, Saload, Sastore, Sipush(i16), Swap, Impdep1, Impdep2, TableSwitch(TableSwitchData),
}
Expand description

A fully decoded JVM bytecode instruction with operands.

Variants§

§

Aaload

§

Aastore

§

AconstNull

§

Aload(u8)

§

Aload0

§

Aload1

§

Aload2

§

Aload3

§

Anewarray(u16)

§

Areturn

§

ArrayLength

§

Astore(u8)

§

Astore0

§

Astore1

§

Astore2

§

Astore3

§

Athrow

§

Baload

§

Bastore

§

Bipush(i8)

§

Breakpoint

§

Caload

§

Castore

§

Checkcast(u16)

§

D2f

§

D2i

§

D2l

§

Dadd

§

Daload

§

Dastore

§

Dcmpg

§

Dcmpl

§

Dconst0

§

Dconst1

§

Ddiv

§

Dload(u8)

§

Dload0

§

Dload1

§

Dload2

§

Dload3

§

Dmul

§

Dneg

§

Drem

§

Dreturn

§

Dstore(u8)

§

Dstore0

§

Dstore1

§

Dstore2

§

Dstore3

§

Dsub

§

Dup

§

Dup2

§

Dup2X1

§

Dup2X2

§

DupX1

§

DupX2

§

F2d

§

F2i

§

F2l

§

Fadd

§

Faload

§

Fastore

§

Fcmpg

§

Fcmpl

§

Fconst0

§

Fconst1

§

Fconst2

§

Fdiv

§

Fload(u8)

§

Fload0

§

Fload1

§

Fload2

§

Fload3

§

Fmul

§

Fneg

§

Frem

§

Freturn

§

Fstore(u8)

§

Fstore0

§

Fstore1

§

Fstore2

§

Fstore3

§

Fsub

§

Getfield(u16)

§

Getstatic(u16)

§

Goto(i16)

§

GotoW(i32)

§

I2b

§

I2c

§

I2d

§

I2f

§

I2l

§

I2s

§

Iadd

§

Iaload

§

Iand

§

Iastore

§

IconstM1

§

Iconst0

§

Iconst1

§

Iconst2

§

Iconst3

§

Iconst4

§

Iconst5

§

Idiv

§

IfAcmpEq(i16)

§

IfAcmpNe(i16)

§

IfEq(i16)

§

IfGe(i16)

§

IfGt(i16)

§

IfIcmpeq(i16)

§

IfIcmpge(i16)

§

IfIcmpgt(i16)

§

IfIcmple(i16)

§

IfIcmplt(i16)

§

IfIcmpne(i16)

§

IfLe(i16)

§

IfLt(i16)

§

IfNe(i16)

§

Ifnonnull(i16)

§

Ifnull(i16)

§

Iinc(u8, i8)

§

Iload(u8)

§

Iload0

§

Iload1

§

Iload2

§

Iload3

§

Imul

§

Ineg

§

Lookupswitch(LookupSwitchData)

§

Instanceof(u16)

§

InvokeDynamic(u16)

§

InvokeInterface(u16, u8)

§

InvokeSpecial(u16)

§

InvokeStatic(u16)

§

InvokeVirtual(u16)

§

Ior

§

Irem

§

Ireturn

§

Ishl

§

Ishr

§

Istore(u8)

§

Istore0

§

Istore1

§

Istore2

§

Istore3

§

Isub

§

Iushr

§

Ixor

§

Jsr(i16)

§

JsrW(i32)

§

L2d

§

L2f

§

L2i

§

Ladd

§

Laload

§

Land

§

Lastore

§

Lcmp

§

Lconst0

§

Lconst1

§

Ldc(u16)

§

Ldc2W(u16)

§

LdcW(u16)

§

Ldiv

§

Lload(u8)

§

Lload0

§

Lload1

§

Lload2

§

Lload3

§

Lmul

§

Lneg

§

Lor

§

Lrem

§

Lreturn

§

Lshl

§

Lshr

§

Lstore(u8)

§

Lstore0

§

Lstore1

§

Lstore2

§

Lstore3

§

Lsub

§

Lushr

§

Lxor

§

Monitorenter

§

Monitorexit

§

Multianewarray(u16, u8)

§

New(u16)

§

Newarray(ArrayType)

§

Nop

§

Pop

§

Pop2

§

Putfield(u16)

§

Putstatic(u16)

§

Ret(u8)

§

Return

§

Saload

§

Sastore

§

Sipush(i16)

§

Swap

§

Impdep1

§

Impdep2

§

TableSwitch(TableSwitchData)

Implementations§

Source§

impl Instruction

Source

pub fn is_branch(&self) -> bool

Source

pub fn byte_size(&self) -> u16

Source§

impl Instruction

Source

pub fn new_at(code: &[u8], pc: usize) -> Result<Instruction, InstructionErr>

Source

pub fn opcode(&self) -> Option<Opcode>

Source

pub fn get_name(&self) -> &'static str

Returns the mnemonic name of this instruction (e.g. "aload", "invokespecial").

Delegates to Opcode::as_str for standard instructions. Reserved instructions (impdep1, impdep2) are handled as special cases since they have no corresponding Opcode variant.

Trait Implementations§

Source§

impl Clone for Instruction

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Instruction

Source§

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

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

impl Display for Instruction

Source§

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

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

impl Eq for Instruction

Source§

impl PartialEq for Instruction

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Instruction

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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