pub enum RegVal {
Small(i64),
Big(BigInt),
}Expand description
A VALUE integer register cell — the chip’s exact mirror of the VM’s Int/BigInt tower. The common
case is a machine word (Small, the FAST path that keeps the 32-bit oracle byte-identical and the
model fast over the 5e8-cycle budget); an integer that overflows the datapath promotes to an exact
Big (unbounded BigInt), EXACTLY as crate::vm::value::Value / RuntimeValue::Int promotes to
RuntimeValue::BigInt. INVARIANT (mirrors RuntimeValue::from_bigint): a Big never holds a value
that fits i64 — every arithmetic result normalizes back to Small when it fits — so a value has one
canonical representation and the printed decimal is unique. Pointers, list lengths, map tags, iterator
cursors, and register indices stay Small (they are addresses, never over-i64), so the structural
heap/pointer machinery reads them through RegVal::sm with no BigInt on the hot structural path.
Variants§
Trait Implementations§
impl StructuralPartialEq for RegVal
Auto Trait Implementations§
impl Freeze for RegVal
impl RefUnwindSafe for RegVal
impl Send for RegVal
impl Sync for RegVal
impl Unpin for RegVal
impl UnsafeUnpin for RegVal
impl UnwindSafe for RegVal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.