pub struct SaveSnapshot {
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
Interpreter state captured by save and reinstated by restore.
Grouped into a struct rather than passed positionally: every field is state the interpreter has to rewind, and the set grows as more of the interpreter learns to participate in save/restore.
Fields§
§d_stack_depth: usized_stack length at save time (for restore validation).
packing_mode: boolPacking mode (setpacking/currentpacking).
vm_alloc_mode: boolVM allocation mode (setglobal/currentglobal).
object_format: i32Binary object format (setobjectformat/currentobjectformat).
gstate: GraphicsStateGraphics 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.