pub struct Instruction {
pub opcode: Opcode,
pub operand: Operand,
}Expand description
A single instruction in the compiled bytecode.
Fields§
§opcode: Opcode§operand: OperandImplementations§
Source§impl Instruction
impl Instruction
pub fn new(opcode: Opcode, operand: Operand) -> Self
pub fn simple(opcode: Opcode) -> Self
pub fn push_int(value: i32) -> Self
pub fn push_long(value: i64) -> Self
pub fn jump(target: usize) -> Self
pub fn branch_not(target: usize) -> Self
pub fn branch_equals(target: usize) -> Self
pub fn branch_less_than(target: usize) -> Self
pub fn branch_greater_than(target: usize) -> Self
pub fn branch_less_than_or_equals(target: usize) -> Self
pub fn branch_greater_than_or_equals(target: usize) -> Self
pub fn gosub(script_id: i32) -> Self
pub fn gosub_with_params(script_id: i32) -> Self
pub fn push_int_local(var_id: i32) -> Self
pub fn pop_int_local(var_id: i32) -> Self
pub fn push_string_local(var_id: i32) -> Self
pub fn pop_string_local(var_id: i32) -> Self
pub fn push_long_local(var_id: i32) -> Self
pub fn pop_long_local(var_id: i32) -> Self
pub fn join_string(count: u32) -> Self
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Auto Trait Implementations§
impl Forget for Instruction
impl Freeze for Instruction
impl Move for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more