#[repr(u8)]pub enum ExitTag {
Untouched = 0,
Int = 1,
Float = 2,
Table = 3,
Closure = 4,
Nil = 5,
Str = 6,
}Expand description
What tag a register holds at the trace’s exit point (relative
to its entry tag). Stored per register in CompiledTrace.exit_tags
so the dispatcher knows how to re-pack the i64 payload back into
a Value after the trace runs.
Variants§
Untouched = 0
Slot is untouched by the trace — restore the entry tag.
Int = 1
Trace writes an Int value to this slot (arith result,
LoadI, Len, ForLoop step / count / visible-var).
Float = 2
Trace writes a Float bit-pattern to this slot (LoadF
result, Float arith on two Float operands).
Table = 3
Trace writes a Table ptr to this slot (NewTable result).
Closure = 4
P12-S4-step2c — trace writes a Closure ptr to this slot.
Today the only producer is Op::GetUpval whose result is
inferred (via infer_upval_exit) to feed an Op::Call as
the call target — the upval must be a closure for that
dispatch to be sound.
Nil = 5
P12-S6-A1 — trace actively writes Nil to this slot (the only
producer today is Op::LoadNil; raw payload is 0). The
dispatcher restores Value::Nil regardless of the slot’s
entry tag. Split out from Untouched so a LoadNil writer
over an Int/Float/Table entry slot doesn’t get mis-packed
back as the entry type.
Str = 6
P12-S12-C v2 — trace writes a Str ptr to this slot (LoadK
of a Str constant, Move from a Str slot, or Concat result).
Dispatcher repacks as Value::Str(Gc::from_ptr(raw)).
Trait Implementations§
impl Copy for ExitTag
impl Eq for ExitTag
impl StructuralPartialEq for ExitTag
Auto Trait Implementations§
impl Freeze for ExitTag
impl RefUnwindSafe for ExitTag
impl Send for ExitTag
impl Sync for ExitTag
impl Unpin for ExitTag
impl UnsafeUnpin for ExitTag
impl UnwindSafe for ExitTag
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.