From 12092c30f4f4e5d70a77084a2a8c5e6a9dd84649 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 3 Feb 2025 18:08:03 -0500 Subject: [PATCH] Roll back slightly --- dust-lang/src/instruction/divide.rs | 9 +++------ dust-lang/src/instruction/equal.rs | 9 +++------ dust-lang/src/instruction/modulo.rs | 9 +++------ dust-lang/src/instruction/multiply.rs | 9 +++------ dust-lang/src/instruction/negate.rs | 4 ++-- dust-lang/src/instruction/subtract.rs | 9 +++------ 6 files changed, 17 insertions(+), 32 deletions(-) diff --git a/dust-lang/src/instruction/divide.rs b/dust-lang/src/instruction/divide.rs index d039f90..2e20c21 100644 --- a/dust-lang/src/instruction/divide.rs +++ b/dust-lang/src/instruction/divide.rs @@ -56,14 +56,11 @@ impl Display for Divide { let Divide { destination, left, - left_type, + left_type: _, right, - right_type, + right_type: _, } = self; - write!( - f, - "R{destination} = {left_type}({left}) ÷ {right_type}({right})", - ) + write!(f, "R{destination} = {left} ÷ {right}",) } } diff --git a/dust-lang/src/instruction/equal.rs b/dust-lang/src/instruction/equal.rs index 6d1aed6..ef099a4 100644 --- a/dust-lang/src/instruction/equal.rs +++ b/dust-lang/src/instruction/equal.rs @@ -56,15 +56,12 @@ impl Display for Equal { let Equal { comparator, left, - left_type, + left_type: _, right, - right_type, + right_type: _, } = self; let operator = if *comparator { "==" } else { "≠" }; - write!( - f, - "if {left}({left_type}) {operator} {right}({right_type}) {{ JUMP +1 }}" - ) + write!(f, "if {left} {operator} {right} {{ JUMP +1 }}") } } diff --git a/dust-lang/src/instruction/modulo.rs b/dust-lang/src/instruction/modulo.rs index 64d3548..0f563fc 100644 --- a/dust-lang/src/instruction/modulo.rs +++ b/dust-lang/src/instruction/modulo.rs @@ -56,14 +56,11 @@ impl Display for Modulo { let Modulo { destination, left, - left_type, + left_type: _, right, - right_type, + right_type: _, } = self; - write!( - f, - "R{destination} = {left_type}({left}) % {right_type}({right})", - ) + write!(f, "R{destination} = {left} % {right}",) } } diff --git a/dust-lang/src/instruction/multiply.rs b/dust-lang/src/instruction/multiply.rs index 62fa34e..eef813c 100644 --- a/dust-lang/src/instruction/multiply.rs +++ b/dust-lang/src/instruction/multiply.rs @@ -56,14 +56,11 @@ impl Display for Multiply { let Multiply { destination, left, - left_type, + left_type: _, right, - right_type, + right_type: _, } = self; - write!( - f, - "R{destination} = {left_type}({left}) ✕ {right_type}({right})", - ) + write!(f, "R{destination} = {left} ✕ {right}",) } } diff --git a/dust-lang/src/instruction/negate.rs b/dust-lang/src/instruction/negate.rs index 17739b2..bc3c14d 100644 --- a/dust-lang/src/instruction/negate.rs +++ b/dust-lang/src/instruction/negate.rs @@ -46,9 +46,9 @@ impl Display for Negate { let Negate { destination, argument, - argument_type, + .. } = self; - write!(f, "R{destination} = -{argument_type}({argument})") + write!(f, "R{destination} = -{argument}") } } diff --git a/dust-lang/src/instruction/subtract.rs b/dust-lang/src/instruction/subtract.rs index df3f68f..994b0c3 100644 --- a/dust-lang/src/instruction/subtract.rs +++ b/dust-lang/src/instruction/subtract.rs @@ -56,14 +56,11 @@ impl Display for Subtract { let Subtract { destination, left, - left_type, + left_type: _, right, - right_type, + right_type: _, } = self; - write!( - f, - "R{destination} = {left_type}({left}) - {right_type}({right})", - ) + write!(f, "R{destination} = {left} - {right}",) } }