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: booltrue ⟺ 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
impl MirFnRepr
Sourcepub fn slot_is_bare(&self, slot: LocalId) -> bool
pub fn slot_is_bare(&self, slot: LocalId) -> bool
Is the value bound to slot represented as a raw machine i64?
Sourcepub fn slot_is_bare_carrier(&self, slot: LocalId) -> bool
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)?
Sourcepub fn param_is_bare(&self, i: usize) -> bool
pub fn param_is_bare(&self, i: usize) -> bool
Is param index i bare in the Rust signature?