Reintroduce the early returns
This commit is contained in:
parent
02fb1b0b72
commit
5bb870faca
@ -606,19 +606,24 @@ fn visit_local(&mut self,
|
||||
_location: Location) {
|
||||
if *local == RETURN_POINTER {
|
||||
match self.destination {
|
||||
Lvalue::Local(l) => *local = l,
|
||||
Lvalue::Local(l) => {
|
||||
*local = l;
|
||||
return;
|
||||
},
|
||||
ref lval => bug!("Return lvalue is {:?}, not local", lval)
|
||||
}
|
||||
}
|
||||
let idx = local.index() - 1;
|
||||
if idx < self.args.len() {
|
||||
match self.args[idx] {
|
||||
Operand::Consume(Lvalue::Local(l)) => *local = l,
|
||||
Operand::Consume(Lvalue::Local(l)) => {
|
||||
*local = l;
|
||||
return;
|
||||
},
|
||||
ref op => bug!("Arg operand `{:?}` is {:?}, not local", idx, op)
|
||||
}
|
||||
} else {
|
||||
*local = self.local_map[Local::new(idx - self.args.len())];
|
||||
}
|
||||
*local = self.local_map[Local::new(idx - self.args.len())];
|
||||
}
|
||||
|
||||
fn visit_lvalue(&mut self,
|
||||
|
Loading…
Reference in New Issue
Block a user