pub struct Snapshot {
pub values: Vec<u32>,
pub prev: Option<usize>,
pub jitcode_index: u32,
pub pc: u32,
}Expand description
A snapshot captures the interpreter state at a guard/exit point. opencoder.py: Snapshot
When a guard fails, the JIT needs to reconstruct the interpreter state (frames, local variables) from the snapshot to resume execution in the interpreter.
Fields§
§values: Vec<u32>Encoded values (tagged): local variables and virtual object fields.
prev: Option<usize>Index of the previous snapshot in the chain (for call stack).
jitcode_index: u32Jitcode index identifying which interpreter function this frame belongs to.
pc: u32Program counter (bytecode offset) within the jitcode.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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
Mutably borrows from an owned value. Read more