Roll back slightly
This commit is contained in:
parent
93f8f31b6d
commit
12092c30f4
@ -56,14 +56,11 @@ impl Display for Divide {
|
|||||||
let Divide {
|
let Divide {
|
||||||
destination,
|
destination,
|
||||||
left,
|
left,
|
||||||
left_type,
|
left_type: _,
|
||||||
right,
|
right,
|
||||||
right_type,
|
right_type: _,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
write!(
|
write!(f, "R{destination} = {left} ÷ {right}",)
|
||||||
f,
|
|
||||||
"R{destination} = {left_type}({left}) ÷ {right_type}({right})",
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,15 +56,12 @@ impl Display for Equal {
|
|||||||
let Equal {
|
let Equal {
|
||||||
comparator,
|
comparator,
|
||||||
left,
|
left,
|
||||||
left_type,
|
left_type: _,
|
||||||
right,
|
right,
|
||||||
right_type,
|
right_type: _,
|
||||||
} = self;
|
} = self;
|
||||||
let operator = if *comparator { "==" } else { "≠" };
|
let operator = if *comparator { "==" } else { "≠" };
|
||||||
|
|
||||||
write!(
|
write!(f, "if {left} {operator} {right} {{ JUMP +1 }}")
|
||||||
f,
|
|
||||||
"if {left}({left_type}) {operator} {right}({right_type}) {{ JUMP +1 }}"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,14 +56,11 @@ impl Display for Modulo {
|
|||||||
let Modulo {
|
let Modulo {
|
||||||
destination,
|
destination,
|
||||||
left,
|
left,
|
||||||
left_type,
|
left_type: _,
|
||||||
right,
|
right,
|
||||||
right_type,
|
right_type: _,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
write!(
|
write!(f, "R{destination} = {left} % {right}",)
|
||||||
f,
|
|
||||||
"R{destination} = {left_type}({left}) % {right_type}({right})",
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,14 +56,11 @@ impl Display for Multiply {
|
|||||||
let Multiply {
|
let Multiply {
|
||||||
destination,
|
destination,
|
||||||
left,
|
left,
|
||||||
left_type,
|
left_type: _,
|
||||||
right,
|
right,
|
||||||
right_type,
|
right_type: _,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
write!(
|
write!(f, "R{destination} = {left} ✕ {right}",)
|
||||||
f,
|
|
||||||
"R{destination} = {left_type}({left}) ✕ {right_type}({right})",
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,9 @@ impl Display for Negate {
|
|||||||
let Negate {
|
let Negate {
|
||||||
destination,
|
destination,
|
||||||
argument,
|
argument,
|
||||||
argument_type,
|
..
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
write!(f, "R{destination} = -{argument_type}({argument})")
|
write!(f, "R{destination} = -{argument}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,14 +56,11 @@ impl Display for Subtract {
|
|||||||
let Subtract {
|
let Subtract {
|
||||||
destination,
|
destination,
|
||||||
left,
|
left,
|
||||||
left_type,
|
left_type: _,
|
||||||
right,
|
right,
|
||||||
right_type,
|
right_type: _,
|
||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
write!(
|
write!(f, "R{destination} = {left} - {right}",)
|
||||||
f,
|
|
||||||
"R{destination} = {left_type}({left}) - {right_type}({right})",
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user