diff options
| author | Brian Cully <bjc@spork.org> | 2025-08-23 13:27:50 -0400 |
|---|---|---|
| committer | Brian Cully <bjc@spork.org> | 2025-08-23 13:27:50 -0400 |
| commit | 39042a3476ffbdc79d1e49a69cb5103628eb7265 (patch) | |
| tree | 2015faa21c5769640f815564c1021310eec4a378 /src/lib.rs | |
| parent | 0753ea2b9e10b0f5030b05e84cd8490cc9ec7b34 (diff) | |
| download | automathon-39042a3476ffbdc79d1e49a69cb5103628eb7265.tar.gz automathon-39042a3476ffbdc79d1e49a69cb5103628eb7265.zip | |
render call and data stacks
Diffstat (limited to 'src/lib.rs')
| -rwxr-xr-x | src/lib.rs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -119,11 +119,19 @@ impl ExportedInterp { } pub fn ip(&self) -> ExportedInstructionPointer { - let Some(interp) = self.i.as_ref() else { + let Some(interp) = &self.i else { return ExportedInstructionPointer { word: 0, offset: 0 } }; (&interp.ip).into() } + + pub fn reset_ip(&mut self) { + let Some(interp) = &mut self.i else { + return; + }; + interp.ip.word = 0; + interp.ip.offset = 0; + } } #[wasm_bindgen] |
