Fix If
emit
This commit is contained in:
parent
a379fb2e91
commit
ce9421d549
@ -129,8 +129,6 @@ impl Driver for Backward {
|
||||
|
||||
impl Driver for If {
|
||||
fn write(&self, mng: &mut Manager, w: &mut dyn Write) -> Result<()> {
|
||||
let label = mng.push_label();
|
||||
|
||||
write!(w, "if ")?;
|
||||
write_condition(&self.cond, mng, w)?;
|
||||
write!(w, "then ")?;
|
||||
@ -144,9 +142,6 @@ impl Driver for If {
|
||||
}
|
||||
|
||||
write!(w, "end ")?;
|
||||
write!(w, "::continue_at_{label}::")?;
|
||||
|
||||
mng.pop_label();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -135,8 +135,6 @@ impl Driver for Backward {
|
||||
|
||||
impl Driver for If {
|
||||
fn write(&self, mng: &mut Manager, w: &mut dyn Write) -> Result<()> {
|
||||
let rem = mng.push_label(Label::If);
|
||||
|
||||
write!(w, "while true do ")?;
|
||||
write!(w, "if ")?;
|
||||
write_condition(&self.cond, mng, w)?;
|
||||
@ -152,10 +150,7 @@ impl Driver for If {
|
||||
|
||||
write!(w, "end ")?;
|
||||
write!(w, "break ")?;
|
||||
write!(w, "end ")?;
|
||||
|
||||
mng.pop_label();
|
||||
write_br_gadget(mng.label_list(), rem, w)
|
||||
write!(w, "end ")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user