#[non_exhaustive]pub struct Resolved {
pub steps: usize,
pub scratch_slot: bool,
pub victim_slot: bool,
}Expand description
What a resolution used beyond the moves’ own locations.
§Examples
use backend_lang::mir::StackSlot;
use backend_lang::moves::{Move, MoveEnv, MoveResolver};
use backend_lang::x86_64::{self, GPR};
let (a, b) = (StackSlot::new(0), StackSlot::new(1));
let swap = [Move::new(a, b, GPR), Move::new(b, a, GPR)];
let env = MoveEnv::new().with_scratch_slot(StackSlot::new(2)).with_victim_slot(StackSlot::new(3));
let used = MoveResolver::new().resolve(&x86_64::TARGET, &swap, &env, &mut Vec::new())?;
assert!(used.scratch_slot && used.victim_slot);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.steps: usizeSteps appended.
scratch_slot: boolWhether the scratch slot was used.
victim_slot: boolWhether the victim slot was used.
Trait Implementations§
impl Copy for Resolved
impl Eq for Resolved
impl StructuralPartialEq for Resolved
Auto Trait Implementations§
impl Freeze for Resolved
impl RefUnwindSafe for Resolved
impl Send for Resolved
impl Sync for Resolved
impl Unpin for Resolved
impl UnsafeUnpin for Resolved
impl UnwindSafe for Resolved
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