Instruction

Enum Instruction 

Source
pub enum Instruction {
Show 218 variants Nop, Move(u8, u8), MoveFrom16(u8, u16), Move16(u16, u16), MoveWide(u8, u8), MoveWideFrom16(u8, u16), MoveWide16(u16, u16), MoveObject(u8, u8), MoveObjectFrom16(u8, u16), MoveObject16(u16, u16), MoveResult(u8), MoveResultWide(u8), MoveResultObject(u8), MoveException(u8), ReturnVoid, Return(u8), ReturnWide(u8), ReturnObject(u8), Const4(u8, i8), Const16(u8, i16), Const(u8, u32), ConstHigh16(u8, i16), ConstWide16(u8, i16), ConstWide32(u8, u32), ConstWide(u8, u64), ConstWideHigh16(u8, u16), ConstString(u8, u16), ConstStringJumbo(u8, u32), ConstClass(u8, u16), MonitorEnter(u8), MonitorExit(u8), CheckCast(u8, u16), InstanceOf(u8, u8, u16), ArrayLength(u8, u8), NewInstance(u8, u16), NewArray(u8, u8, u16), FilledNewArray { ty: u16, nargs: u8, args: [u8; 5], }, FilledNewArrayRange { ty: u16, args: Vec<u16>, }, FillArrayData(u8, i32), Throw(u8), Goto(i8), Goto16(i16), Goto32(i32), PackedSwitch(u8, i32), SparseSwitch(u8, i32), CmplFloat(u8, u8, u8), CmpgFloat(u8, u8, u8), CmplDouble(u8, u8, u8), CmpgDouble(u8, u8, u8), CmpLong(u8, u8, u8), IfEq(u8, u8, i16), IfNe(u8, u8, i16), IfLt(u8, u8, i16), IfGe(u8, u8, i16), IfGt(u8, u8, i16), IfLe(u8, u8, i16), IfEqz(u8, i16), IfNez(u8, i16), IfLtz(u8, i16), IfGez(u8, i16), IfGtz(u8, i16), IfLez(u8, i16), AGet(u8, u8, u8), AGetWide(u8, u8, u8), AGetObject(u8, u8, u8), AGetBoolean(u8, u8, u8), AGetByte(u8, u8, u8), AGetChar(u8, u8, u8), AGetShort(u8, u8, u8), APut(u8, u8, u8), APutWide(u8, u8, u8), APutObject(u8, u8, u8), APutBoolean(u8, u8, u8), APutByte(u8, u8, u8), APutChar(u8, u8, u8), APutShort(u8, u8, u8), IGet(u8, u8, u16), IGetWide(u8, u8, u16), IGetObject(u8, u8, u16), IGetBoolean(u8, u8, u16), IGetByte(u8, u8, u16), IGetChar(u8, u8, u16), IGetShort(u8, u8, u16), IPut(u8, u8, u16), IPutWide(u8, u8, u16), IPutObject(u8, u8, u16), IPutBoolean(u8, u8, u16), IPutByte(u8, u8, u16), IPutChar(u8, u8, u16), IPutShort(u8, u8, u16), SGet(u8, u16), SGetWide(u8, u16), SGetObject(u8, u16), SGetBoolean(u8, u16), SGetByte(u8, u16), SGetChar(u8, u16), SGetShort(u8, u16), SPut(u8, u16), SPutWide(u8, u16), SPutObject(u8, u16), SPutBoolean(u8, u16), SPutByte(u8, u16), SPutChar(u8, u16), SPutShort(u8, u16), InvokeVirtual { method: u16, nargs: u8, args: [u8; 5], }, InvokeSuper { method: u16, nargs: u8, args: [u8; 5], }, InvokeDirect { method: u16, nargs: u8, args: [u8; 5], }, InvokeStatic { method: u16, nargs: u8, args: [u8; 5], }, InvokeInterface { method: u16, nargs: u8, args: [u8; 5], }, InvokeVirtualRange { method: u16, args: Vec<u16>, }, InvokeSuperRange { method: u16, args: Vec<u16>, }, InvokeDirectRange { method: u16, args: Vec<u16>, }, InvokeStaticRange { method: u16, args: Vec<u16>, }, InvokeInterfaceRange { method: u16, args: Vec<u16>, }, NegInt(u8, u8), NotInt(u8, u8), NegLong(u8, u8), NotLong(u8, u8), NegFloat(u8, u8), NegDouble(u8, u8), IntToLong(u8, u8), IntToFloat(u8, u8), IntToDouble(u8, u8), LongToInt(u8, u8), LongToFloat(u8, u8), LongToDouble(u8, u8), FloatToInt(u8, u8), FloatToLong(u8, u8), FloatToDouble(u8, u8), DoubleToInt(u8, u8), DoubleToLong(u8, u8), DoubleToFloat(u8, u8), IntTobyte(u8, u8), IntTochar(u8, u8), IntToshort(u8, u8), AddInt(u8, u8, u8), SubInt(u8, u8, u8), MulInt(u8, u8, u8), DivInt(u8, u8, u8), RemInt(u8, u8, u8), AndInt(u8, u8, u8), OrInt(u8, u8, u8), XorInt(u8, u8, u8), ShlInt(u8, u8, u8), ShrInt(u8, u8, u8), UshrInt(u8, u8, u8), AddLong(u8, u8, u8), SubLong(u8, u8, u8), MulLong(u8, u8, u8), DivLong(u8, u8, u8), RemLong(u8, u8, u8), AndLong(u8, u8, u8), OrLong(u8, u8, u8), XorLong(u8, u8, u8), ShlLong(u8, u8, u8), ShrLong(u8, u8, u8), UshrLong(u8, u8, u8), AddFloat(u8, u8, u8), SubFloat(u8, u8, u8), MulFloat(u8, u8, u8), DivFloat(u8, u8, u8), RemFloat(u8, u8, u8), AddDouble(u8, u8, u8), SubDouble(u8, u8, u8), MulDouble(u8, u8, u8), DivDouble(u8, u8, u8), RemDouble(u8, u8, u8), AddInt2(u8, u8), SubInt2(u8, u8), MulInt2(u8, u8), DivInt2(u8, u8), RemInt2(u8, u8), AndInt2(u8, u8), OrInt2(u8, u8), XorInt2(u8, u8), ShlInt2(u8, u8), ShrInt2(u8, u8), UShrInt2(u8, u8), AddLong2(u8, u8), SubLong2(u8, u8), MulLong2(u8, u8), DivLong2(u8, u8), RemLong2(u8, u8), AndLong2(u8, u8), OrLong2(u8, u8), XorLong2(u8, u8), ShlLong2(u8, u8), ShrLong2(u8, u8), UShrLong2(u8, u8), AddFloat2(u8, u8), SubFloat2(u8, u8), MulFloat2(u8, u8), DivFloat2(u8, u8), RemFloat2(u8, u8), AddDouble2(u8, u8), SubDouble2(u8, u8), MulDouble2(u8, u8), DivDouble2(u8, u8), RemDouble2(u8, u8), AddInt16(u8, u8, i16), RsubInt16(u8, u8, i16), MulInt16(u8, u8, i16), DivInt16(u8, u8, i16), RemInt16(u8, u8, i16), AndInt16(u8, u8, i16), OrInt16(u8, u8, i16), XorInt16(u8, u8, i16), AddInt8(u8, u8, i8), RsubInt8(u8, u8, i8), MulInt8(u8, u8, i8), DivInt8(u8, u8, i8), RemInt8(u8, u8, i8), AndInt8(u8, u8, i8), OrInt8(u8, u8, i8), XorInt8(u8, u8, i8), ShlInt8(u8, u8, i8), ShrInt8(u8, u8, i8), UshrInt8(u8, u8, i8),
}
Expand description

Dalvik Instruction

See the reference for instruction semantics

Most of the enum variants here are simple tuples. The ordering of the contained values matches the order of the instruction mnemonic as read from left to right.

Variants§

§

Nop

§

Move(u8, u8)

§

MoveFrom16(u8, u16)

§

Move16(u16, u16)

§

MoveWide(u8, u8)

§

MoveWideFrom16(u8, u16)

§

MoveWide16(u16, u16)

§

MoveObject(u8, u8)

§

MoveObjectFrom16(u8, u16)

§

MoveObject16(u16, u16)

§

MoveResult(u8)

§

MoveResultWide(u8)

§

MoveResultObject(u8)

§

MoveException(u8)

§

ReturnVoid

§

Return(u8)

§

ReturnWide(u8)

§

ReturnObject(u8)

§

Const4(u8, i8)

§

Const16(u8, i16)

§

Const(u8, u32)

§

ConstHigh16(u8, i16)

§

ConstWide16(u8, i16)

§

ConstWide32(u8, u32)

§

ConstWide(u8, u64)

§

ConstWideHigh16(u8, u16)

§

ConstString(u8, u16)

§

ConstStringJumbo(u8, u32)

§

ConstClass(u8, u16)

§

MonitorEnter(u8)

§

MonitorExit(u8)

§

CheckCast(u8, u16)

§

InstanceOf(u8, u8, u16)

§

ArrayLength(u8, u8)

§

NewInstance(u8, u16)

§

NewArray(u8, u8, u16)

§

FilledNewArray

Fields

§ty: u16
§nargs: u8
§args: [u8; 5]
§

FilledNewArrayRange

Fields

§ty: u16
§args: Vec<u16>
§

FillArrayData(u8, i32)

§

Throw(u8)

§

Goto(i8)

§

Goto16(i16)

§

Goto32(i32)

§

PackedSwitch(u8, i32)

§

SparseSwitch(u8, i32)

§

CmplFloat(u8, u8, u8)

§

CmpgFloat(u8, u8, u8)

§

CmplDouble(u8, u8, u8)

§

CmpgDouble(u8, u8, u8)

§

CmpLong(u8, u8, u8)

§

IfEq(u8, u8, i16)

§

IfNe(u8, u8, i16)

§

IfLt(u8, u8, i16)

§

IfGe(u8, u8, i16)

§

IfGt(u8, u8, i16)

§

IfLe(u8, u8, i16)

§

IfEqz(u8, i16)

§

IfNez(u8, i16)

§

IfLtz(u8, i16)

§

IfGez(u8, i16)

§

IfGtz(u8, i16)

§

IfLez(u8, i16)

§

AGet(u8, u8, u8)

§

AGetWide(u8, u8, u8)

§

AGetObject(u8, u8, u8)

§

AGetBoolean(u8, u8, u8)

§

AGetByte(u8, u8, u8)

§

AGetChar(u8, u8, u8)

§

AGetShort(u8, u8, u8)

§

APut(u8, u8, u8)

§

APutWide(u8, u8, u8)

§

APutObject(u8, u8, u8)

§

APutBoolean(u8, u8, u8)

§

APutByte(u8, u8, u8)

§

APutChar(u8, u8, u8)

§

APutShort(u8, u8, u8)

§

IGet(u8, u8, u16)

§

IGetWide(u8, u8, u16)

§

IGetObject(u8, u8, u16)

§

IGetBoolean(u8, u8, u16)

§

IGetByte(u8, u8, u16)

§

IGetChar(u8, u8, u16)

§

IGetShort(u8, u8, u16)

§

IPut(u8, u8, u16)

§

IPutWide(u8, u8, u16)

§

IPutObject(u8, u8, u16)

§

IPutBoolean(u8, u8, u16)

§

IPutByte(u8, u8, u16)

§

IPutChar(u8, u8, u16)

§

IPutShort(u8, u8, u16)

§

SGet(u8, u16)

§

SGetWide(u8, u16)

§

SGetObject(u8, u16)

§

SGetBoolean(u8, u16)

§

SGetByte(u8, u16)

§

SGetChar(u8, u16)

§

SGetShort(u8, u16)

§

SPut(u8, u16)

§

SPutWide(u8, u16)

§

SPutObject(u8, u16)

§

SPutBoolean(u8, u16)

§

SPutByte(u8, u16)

§

SPutChar(u8, u16)

§

SPutShort(u8, u16)

§

InvokeVirtual

Fields

§method: u16
§nargs: u8
§args: [u8; 5]
§

InvokeSuper

Fields

§method: u16
§nargs: u8
§args: [u8; 5]
§

InvokeDirect

Fields

§method: u16
§nargs: u8
§args: [u8; 5]
§

InvokeStatic

Fields

§method: u16
§nargs: u8
§args: [u8; 5]
§

InvokeInterface

Fields

§method: u16
§nargs: u8
§args: [u8; 5]
§

InvokeVirtualRange

Fields

§method: u16
§args: Vec<u16>
§

InvokeSuperRange

Fields

§method: u16
§args: Vec<u16>
§

InvokeDirectRange

Fields

§method: u16
§args: Vec<u16>
§

InvokeStaticRange

Fields

§method: u16
§args: Vec<u16>
§

InvokeInterfaceRange

Fields

§method: u16
§args: Vec<u16>
§

NegInt(u8, u8)

§

NotInt(u8, u8)

§

NegLong(u8, u8)

§

NotLong(u8, u8)

§

NegFloat(u8, u8)

§

NegDouble(u8, u8)

§

IntToLong(u8, u8)

§

IntToFloat(u8, u8)

§

IntToDouble(u8, u8)

§

LongToInt(u8, u8)

§

LongToFloat(u8, u8)

§

LongToDouble(u8, u8)

§

FloatToInt(u8, u8)

§

FloatToLong(u8, u8)

§

FloatToDouble(u8, u8)

§

DoubleToInt(u8, u8)

§

DoubleToLong(u8, u8)

§

DoubleToFloat(u8, u8)

§

IntTobyte(u8, u8)

§

IntTochar(u8, u8)

§

IntToshort(u8, u8)

§

AddInt(u8, u8, u8)

§

SubInt(u8, u8, u8)

§

MulInt(u8, u8, u8)

§

DivInt(u8, u8, u8)

§

RemInt(u8, u8, u8)

§

AndInt(u8, u8, u8)

§

OrInt(u8, u8, u8)

§

XorInt(u8, u8, u8)

§

ShlInt(u8, u8, u8)

§

ShrInt(u8, u8, u8)

§

UshrInt(u8, u8, u8)

§

AddLong(u8, u8, u8)

§

SubLong(u8, u8, u8)

§

MulLong(u8, u8, u8)

§

DivLong(u8, u8, u8)

§

RemLong(u8, u8, u8)

§

AndLong(u8, u8, u8)

§

OrLong(u8, u8, u8)

§

XorLong(u8, u8, u8)

§

ShlLong(u8, u8, u8)

§

ShrLong(u8, u8, u8)

§

UshrLong(u8, u8, u8)

§

AddFloat(u8, u8, u8)

§

SubFloat(u8, u8, u8)

§

MulFloat(u8, u8, u8)

§

DivFloat(u8, u8, u8)

§

RemFloat(u8, u8, u8)

§

AddDouble(u8, u8, u8)

§

SubDouble(u8, u8, u8)

§

MulDouble(u8, u8, u8)

§

DivDouble(u8, u8, u8)

§

RemDouble(u8, u8, u8)

§

AddInt2(u8, u8)

§

SubInt2(u8, u8)

§

MulInt2(u8, u8)

§

DivInt2(u8, u8)

§

RemInt2(u8, u8)

§

AndInt2(u8, u8)

§

OrInt2(u8, u8)

§

XorInt2(u8, u8)

§

ShlInt2(u8, u8)

§

ShrInt2(u8, u8)

§

UShrInt2(u8, u8)

§

AddLong2(u8, u8)

§

SubLong2(u8, u8)

§

MulLong2(u8, u8)

§

DivLong2(u8, u8)

§

RemLong2(u8, u8)

§

AndLong2(u8, u8)

§

OrLong2(u8, u8)

§

XorLong2(u8, u8)

§

ShlLong2(u8, u8)

§

ShrLong2(u8, u8)

§

UShrLong2(u8, u8)

§

AddFloat2(u8, u8)

§

SubFloat2(u8, u8)

§

MulFloat2(u8, u8)

§

DivFloat2(u8, u8)

§

RemFloat2(u8, u8)

§

AddDouble2(u8, u8)

§

SubDouble2(u8, u8)

§

MulDouble2(u8, u8)

§

DivDouble2(u8, u8)

§

RemDouble2(u8, u8)

§

AddInt16(u8, u8, i16)

§

RsubInt16(u8, u8, i16)

§

MulInt16(u8, u8, i16)

§

DivInt16(u8, u8, i16)

§

RemInt16(u8, u8, i16)

§

AndInt16(u8, u8, i16)

§

OrInt16(u8, u8, i16)

§

XorInt16(u8, u8, i16)

§

AddInt8(u8, u8, i8)

§

RsubInt8(u8, u8, i8)

§

MulInt8(u8, u8, i8)

§

DivInt8(u8, u8, i8)

§

RemInt8(u8, u8, i8)

§

AndInt8(u8, u8, i8)

§

OrInt8(u8, u8, i8)

§

XorInt8(u8, u8, i8)

§

ShlInt8(u8, u8, i8)

§

ShrInt8(u8, u8, i8)

§

UshrInt8(u8, u8, i8)

Implementations§

Source§

impl Instruction

Source

pub fn len(&self) -> usize

Length in u16 codepoints needed to encode/decode

Source§

impl Instruction

Source

pub fn control_flow(&self) -> ControlFlow

Get the control flow behavior of the instruction

Trait Implementations§

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 PartialEq for Instruction

Source§

fn eq(&self, other: &Instruction) -> 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 Instruction

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = 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.