pub enum InstructionOperand<'a> {
Show 13 variants
None,
Immediate(i32),
Local(u16),
ConstantPool(ConstantPoolIndex),
Member(MemberReference<'a>),
InvokeInterface {
method: ConstantPoolIndex,
count: u8,
},
InvokeDynamic {
call_site: ConstantPoolIndex,
},
Branch {
relative: i32,
target: i32,
},
Ldc(LdcValueRef<'a>),
Increment {
local: u16,
amount: i16,
},
TableSwitch {
default: SwitchTarget,
low: i32,
high: i32,
targets: &'a [i32],
base_offset: ByteOffset,
},
LookupSwitch {
default: SwitchTarget,
pairs: &'a [(i32, i32)],
base_offset: ByteOffset,
},
MultiArray {
class: ConstantPoolIndex,
dimensions: u8,
},
}Expand description
A decoded JVM instruction operand.
Variants expose the operand representation used by the class file. In particular, indices are not rewritten into source-level names and switch targets retain their relative offsets.
Variants§
None
An instruction with no explicit operand.
Immediate(i32)
A signed immediate operand.
Local(u16)
A local-variable slot index.
ConstantPool(ConstantPoolIndex)
A direct constant-pool index.
Member(MemberReference<'a>)
A field or method reference.
InvokeInterface
An invokeinterface method index and its encoded argument count.
Fields
method: ConstantPoolIndexIndex of the interface method reference.
InvokeDynamic
An invokedynamic call-site index.
Fields
call_site: ConstantPoolIndexIndex of the invokedynamic constant-pool entry.
Branch
A branch displacement and its calculated target offset.
Fields
Ldc(LdcValueRef<'a>)
A value loaded by an ldc, ldc_w, or ldc2_w instruction.
Increment
A local-variable increment.
TableSwitch
A tableswitch operand.
Fields
default: SwitchTargetDefault target displacement and absolute target.
base_offset: ByteOffsetOffset of the tableswitch instruction.
LookupSwitch
A lookupswitch operand.
Fields
default: SwitchTargetDefault target displacement and absolute target.
base_offset: ByteOffsetOffset of the lookupswitch instruction.
MultiArray
A multianewarray class reference and dimension count.
Fields
class: ConstantPoolIndexIndex of the array class entry.
Trait Implementations§
Source§impl<'a> Clone for InstructionOperand<'a>
impl<'a> Clone for InstructionOperand<'a>
Source§fn clone(&self) -> InstructionOperand<'a>
fn clone(&self) -> InstructionOperand<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more