remove Expr::FunctionPointer

This commit is contained in:
Folkert 2021-05-15 21:29:10 +02:00
parent 3739f41cac
commit 16fe609464
5 changed files with 4 additions and 61 deletions

View file

@ -471,7 +471,7 @@ impl<'a> BorrowInfState<'a> {
Call(call) => self.collect_call(z, call),
Literal(_) | FunctionPointer(_, _) | RuntimeErrorFunction(_) => {}
Literal(_) | RuntimeErrorFunction(_) => {}
}
}
@ -547,18 +547,6 @@ impl<'a> BorrowInfState<'a> {
self.collect_stmt(b);
}
Let(x, Expr::FunctionPointer(fsymbol, layout), _, b) => {
// ensure that the function pointed to is in the param map
if let Some(params) = self.param_map.get_symbol(*fsymbol, *layout) {
self.param_map
.items
.insert(Key::Declaration(*x, *layout), params);
}
self.collect_stmt(b);
self.preserve_tail_call(*x, &Expr::FunctionPointer(*fsymbol, *layout), b);
}
Let(x, v, _, b) => {
self.collect_stmt(b);
self.collect_expr(*x, v);