diff --git a/src/vm.rs b/src/vm.rs index a6a8fb2..c03c3bf 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -1005,7 +1005,7 @@ impl VmContext<'_, '_> { Ordering::Equal => return Ok(StepResult::Complete), Ordering::Greater => return Err(Fault::InvalidInstructionAddress), }; - println!("Executing {instruction:?}"); + // println!("Executing {instruction:?}"); let next_instruction = StepResult::from(address.checked_add(1)); let result = match instruction { LoadedOp::Return => return Ok(StepResult::Complete), @@ -2448,6 +2448,16 @@ impl StackFrame { Self { code, instruction } } + #[must_use] + pub const fn code(&self) -> &Code { + &self.code + } + + #[must_use] + pub const fn instruction(&self) -> usize { + self.instruction + } + #[must_use] pub fn source_range(&self) -> Option { self.code.data.map.get(self.instruction)