pub struct InstanceEntry {
pub instance_ref: CapHashOrRef,
pub image_hash_chain: CapHash,
pub image_hash: CapHash,
pub program: Arc<PvmProgram>,
pub root_cnode: CNodeCap,
pub yield_marker_slot: Option<SlotIdx>,
pub pinned_slots: Vec<SlotIdx>,
pub regs: Regs,
pub mem: Mem,
pub gas: GasCounter,
pub status: EntryStatus,
}Expand description
In-flight state of an Instance currently on the call stack.
Owns the working root cnode, regs, and memory of this invocation.
The Vm updates these in place as the interpreter runs. The
program is shared (Arc) — multiple in-flight entries can share
the same predecoded bytecode (e.g. siblings of the same image).
Fields§
§instance_ref: CapHashOrRefReference back to the CacheDirectory entry this invocation is running.
Carried across the apply so the post-HALT settle can hash the
final working state into a CapHash.
image_hash_chain: CapHashCached for quick read of the Instance’s type identity.
image_hash: CapHashCached for quick read of the bound Image hash.
program: Arc<PvmProgram>Predecoded bytecode (keyed by image_hash in ImageCache).
root_cnode: CNodeCapMainFrame cnode — the active CapTable. Owned by this entry; on HALT it’s commit-merged back into the cache.
yield_marker_slot: Option<SlotIdx>Image.yield_marker_slot, cached for yield routing.
pinned_slots: Vec<SlotIdx>Sorted slot indices declared pinned by this Image. Cached for
fast is_pinned checks.
regs: RegsWorking registers.
mem: MemWorking memory (mapped RW overlays + ephemeral).
gas: GasCounterLocal gas counter — pulls from KernelAssist::gas_meter_*
against the active gas slot.
status: EntryStatusRunning vs. Waiting.