pub struct CertifiedSelection<W, A> {
pub wasm: W,
pub arm: Vec<A>,
pub witness: Option<Witness>,
}Expand description
A concrete selection produced by the instruction selector.
Generic over the source op W (initially WasmOp) and target op A
(initially ArmOp, later RiscvOp). The witness is None when the
selector emits the selection and Some(Witness) after the validator
accepts it.
Fields§
§wasm: WThe source operation (e.g. WasmOp::I32Add).
arm: Vec<A>The target instruction sequence (e.g. [ArmOp::Add { ... }]).
witness: Option<Witness>Witness attached by the validator (None until validated).
Implementations§
Source§impl<W, A> CertifiedSelection<W, A>
impl<W, A> CertifiedSelection<W, A>
Sourcepub fn with_witness(self, witness: Witness) -> Self
pub fn with_witness(self, witness: Witness) -> Self
Attach a witness, marking this selection as validated.
Sourcepub fn is_certified(&self) -> bool
pub fn is_certified(&self) -> bool
Whether this selection has been validated.
Trait Implementations§
Auto Trait Implementations§
impl<W, A> Freeze for CertifiedSelection<W, A>where
W: Freeze,
impl<W, A> RefUnwindSafe for CertifiedSelection<W, A>where
W: RefUnwindSafe,
A: RefUnwindSafe,
impl<W, A> Send for CertifiedSelection<W, A>
impl<W, A> Sync for CertifiedSelection<W, A>
impl<W, A> Unpin for CertifiedSelection<W, A>
impl<W, A> UnsafeUnpin for CertifiedSelection<W, A>where
W: UnsafeUnpin,
impl<W, A> UnwindSafe for CertifiedSelection<W, A>where
W: UnwindSafe,
A: UnwindSafe,
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