From 74bb8a429a96f105df1df9dce2b224c529a9b079 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 6 Nov 2024 15:14:12 -0500 Subject: [PATCH] Clean up --- dust-lang/src/vm.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/dust-lang/src/vm.rs b/dust-lang/src/vm.rs index ca6763b..b0a4941 100644 --- a/dust-lang/src/vm.rs +++ b/dust-lang/src/vm.rs @@ -502,15 +502,11 @@ impl Vm { log::trace!("Change R{to_register} to R{from_register}"); self.stack[to_register] = Register::Pointer(from_register); - - Ok(()) } Ordering::Equal => { log::trace!("Set R{to_register} to R{from_register}"); self.stack.push(Register::Pointer(from_register)); - - Ok(()) } Ordering::Greater => { let difference = to_register - length; @@ -524,10 +520,10 @@ impl Vm { log::trace!("Set R{to_register} to R{from_register}"); self.stack.push(Register::Pointer(from_register)); - - Ok(()) } } + + Ok(()) } fn set_constant( @@ -550,15 +546,11 @@ impl Vm { log::trace!("Change R{to_register} to C{constant_index}"); self.stack[to_register] = Register::Constant(constant_index); - - Ok(()) } Ordering::Equal => { log::trace!("Set R{to_register} to C{constant_index}"); self.stack.push(Register::Constant(constant_index)); - - Ok(()) } Ordering::Greater => { let difference = to_register - length; @@ -572,10 +564,10 @@ impl Vm { log::trace!("Set R{to_register} to C{constant_index}"); self.stack.push(Register::Constant(constant_index)); - - Ok(()) } } + + Ok(()) } fn get_constant(&self, index: u8, position: Span) -> Result<&Value, VmError> {