add NullPointer to mono::ir::Expr

This commit is contained in:
Folkert 2023-03-30 19:57:16 +02:00
parent 63cdd00d13
commit 09779f65ad
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
9 changed files with 28 additions and 3 deletions

View file

@ -213,7 +213,7 @@ pub fn occurring_variables_expr(expr: &Expr<'_>, result: &mut MutSet<Symbol>) {
result.insert(*symbol);
}
EmptyArray | RuntimeErrorFunction(_) | Literal(_) => {}
EmptyArray | RuntimeErrorFunction(_) | Literal(_) | NullPointer => {}
GetTagId {
structure: symbol, ..
@ -946,7 +946,7 @@ impl<'a, 'i> Context<'a, 'i> {
self.arena.alloc(Stmt::Let(z, v, l, b))
}
EmptyArray | Literal(_) | Reset { .. } | RuntimeErrorFunction(_) => {
EmptyArray | Literal(_) | Reset { .. } | NullPointer | RuntimeErrorFunction(_) => {
// EmptyArray is always stack-allocated function pointers are persistent
self.arena.alloc(Stmt::Let(z, v, l, b))
}