Resets any existing execution state, including upcall caches and the program counter.
(&mut self)
| 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. |