MCPcopy Create free account
hub / github.com/endbasic/endbasic / reset

Method reset

core/src/vm/mod.rs:254–261  ·  view source on GitHub ↗

Resets any existing execution state, including upcall caches and the program counter.

(&mut self)

Source from the content-addressed store, hash-verified

252
253 /// Resets any existing execution state, including upcall caches and the program counter.
254 pub fn reset(&mut self) {
255 self.upcall_names.clear();
256 self.upcalls.clear();
257 self.heap.clear();
258 self.context.clear_runtime_state();
259 self.last_error = None;
260 self.pending_upcall = None;
261 }
262
263 /// Resets runtime state (registers, heap, last error, call stack, program counter) but preserves
264 /// upcall caches so the same image can continue to be executed.

Callers 2

clearMethod · 0.45

Calls 2

clear_runtime_stateMethod · 0.80
clearMethod · 0.45

Tested by 1