Skip to main content

serializable_to_slot

Function serializable_to_slot 

Source
pub fn serializable_to_slot(
    sv: &SerializableVMValue,
    expected_kind: NativeKind,
    _store: &SnapshotStore,
) -> Result<(u64, NativeKind), String>
Expand description

Inverse of slot_to_serializable — project a SerializableVMValue back into a (bits, NativeKind) pair for placement into a stack or local slot.

expected_kind is the post-proof kind the caller has already committed to (from FrameDescriptor.slots[i] or the parallel stack-kind track). A discriminator-vs-expected-kind mismatch surfaces as a structured error rather than a Bool-default fallback (§2.7.7 #9 / §2.7.5.1 forbidden).