pub struct Plan {
pub opcode: Opcode,
pub operands: Vec<Operand>,
pub imm: Option<i64>,
pub amode: Option<Amode>,
pub symbol: Option<Symbol>,
}Expand description
What an instruction would become.
Every part is held by value rather than as a reference into the function, which is what lets a
proposal be dropped rather than undone. Changes::commit is what puts the parts in the
arenas, and until it runs the function does not know this exists.
Fields§
§opcode: OpcodeWhich instruction it becomes.
operands: Vec<Operand>Its operands, the ones it writes before the ones it reads, with the registers its
addressing mode names last. The order is the one mir::InstBuilder keeps and the
printer, the parser and the allocator all read.
imm: Option<i64>Its immediate, if the instruction carries one.
amode: Option<Amode>Its addressing mode, if the instruction has one. The base and the index are positions in
operands.
symbol: Option<Symbol>The symbol it names, which is the callee of a direct call.
Implementations§
Trait Implementations§
impl Eq for Plan
impl StructuralPartialEq for Plan
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
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