pub struct SaveLevel {
pub level: u16,
pub save_id: u32,
pub records: Vec<SaveRecord>,
pub valid: bool,
pub d_stack_depth: usize,
pub packing_mode: bool,
pub vm_alloc_mode: bool,
pub object_format: i32,
pub gstate: GraphicsState,
pub gstate_stack: Vec<GstateEntry>,
pub gstate_store_len: usize,
pub marks: VmMarks,
}Expand description
One save level’s state.
Fields§
§level: u16Numeric level (1-based, 0 = no save active).
save_id: u32Unique save id for invalidation tracking.
records: Vec<SaveRecord>COW records accumulated during this save level.
valid: boolWhether this save level is still valid (becomes false on restore).
d_stack_depth: usizeSnapshot of d_stack length at save time (for restore validation).
packing_mode: boolSaved packing mode (setpacking/currentpacking).
vm_alloc_mode: boolSaved VM allocation mode (setglobal/currentglobal).
object_format: i32Saved binary object format (setobjectformat/currentobjectformat).
gstate: GraphicsStateSaved graphics state and graphics state stack.
gstate_stack: Vec<GstateEntry>§gstate_store_len: usizeContext::gstate_store length at save time.
gstate_store backs PsValue::Gstate, and a gstate object is a
composite in local VM, so restore has to reclaim the ones created
after the save. Without this the store would grow monotonically and
each stale slot would keep naming entities the restore released.
marks: VmMarksLocal-VM high-water marks, for reclamation on restore.