Skip to main content

FactSpecResult

Struct FactSpecResult 

Source
pub struct FactSpecResult {
    pub ops: Vec<WasmOp>,
    pub block_arity: Vec<(u8, u8)>,
    pub kept: Vec<usize>,
    pub admitted: Vec<String>,
    pub declined: Vec<String>,
    pub elide_div_zero: Vec<usize>,
    pub elide_div_ovf: Vec<usize>,
    /* private fields */
}
Expand description

Outcome of specializing one function. ops/block_arity/kept are only meaningful when changed — otherwise they echo the input.

Fields§

§ops: Vec<WasmOp>

The (possibly rewritten) op stream.

§block_arity: Vec<(u8, u8)>

The blocktype-arity side-table matching ops (one entry per Block/Loop/If in op order — entries of deleted openers removed).

§kept: Vec<usize>

Indices into the ORIGINAL op stream that were kept, in order. Lets the driver filter parallel side-tables (e.g. op_offsets for DWARF).

§admitted: Vec<String>

One certificate line per ADMITTED elision (logged per function).

§declined: Vec<String>

One line per LOUD DECLINE (the general lowering is emitted for these).

§elide_div_zero: Vec<usize>

#494 phase 2b: indices (into the RETURNED ops stream) of div/rem ops whose divide-by-zero trap guard was certificate-elided (UNSAT(P ∧ divisor == 0) discharged per site).

§elide_div_ovf: Vec<usize>

#494 phase 2b: indices (into the RETURNED ops stream) of div_s ops whose INT_MIN / -1 overflow guard was certificate-elided — a SEPARATE obligation (UNSAT(P ∧ dividend == INT_MIN ∧ divisor == -1)); a divisor-nonzero fact alone never lands here (#633/#634).

Implementations§

Source§

impl FactSpecResult

Source

pub fn changed(&self) -> bool

True when the op STREAM was rewritten (region deletions). Guard-elision marks do not rewrite the stream — check elide_div_zero / elide_div_ovf separately.

Trait Implementations§

Source§

impl Debug for FactSpecResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V