Skip to main content

MirFnRepr

Struct MirFnRepr 

Source
pub struct MirFnRepr {
    pub bare_slots: HashSet<LocalId>,
    pub bare_params: Vec<bool>,
    pub bare_return: bool,
    pub carrier_slots: HashSet<LocalId>,
}
Expand description

Per-fn Int-representation summary made explicit on the rewritten MIR (ETAP-2 SLICE 1). Default-empty ⇒ everything is the arbitrary-precision Int (aver_rt::AverInt), the fail-closed baseline. Populated only by bare_i64::rewrite_for_rust.

Fields§

§bare_slots: HashSet<LocalId>

Locals (params + let bindings + match aliases) the rewrite tagged as raw machine i64. A read of such a slot renders as a native i64 ident; arithmetic over raw slots stays raw. A missing slot is Int (boxed) – fail-closed.

§bare_params: Vec<bool>

Per-param representation, indexed by declaration order (same indexing aliased_slots / own_param use): true ⟺ the param’s Rust signature type is bare i64 (and every caller Box/Unboxes at the boundary).

§bare_return: bool

true ⟺ the fn’s Rust return type is bare i64.

§carrier_slots: HashSet<LocalId>

ETAP-2 carrier-i64 (wasm-gc only): slots holding a BARE carrier value — an eligible refinement-via-opaque carrier whose wasm storage IS a native i64. A Project(Local(slot), "value") over such a slot reads the i64 DIRECTLY (the codegen skips the $AverInt project bridge), so the .value read is a raw-i64 leaf for the native arithmetic the rewrite left raw. Empty on the Rust backend (carriers stay structs) and whenever no eligible carrier is in scope — the byte-identical default.

Implementations§

Source§

impl MirFnRepr

Source

pub fn slot_is_bare(&self, slot: LocalId) -> bool

Is the value bound to slot represented as a raw machine i64?

Source

pub fn slot_is_bare_carrier(&self, slot: LocalId) -> bool

ETAP-2 carrier-i64: does slot hold a bare carrier whose .value read renders as a raw native i64 (no project bridge)?

Source

pub fn param_is_bare(&self, i: usize) -> bool

Is param index i bare in the Rust signature?

Trait Implementations§

Source§

impl Clone for MirFnRepr

Source§

fn clone(&self) -> MirFnRepr

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MirFnRepr

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for MirFnRepr

Source§

fn default() -> MirFnRepr

Returns the “default value” for a type. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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