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

@ -319,6 +319,7 @@ fn insert_reset<'a>(
}
Literal(_)
| NullPointer
| Call(_)
| Tag { .. }
| Struct(_)
@ -839,6 +840,7 @@ fn has_live_var<'a>(jp_live_vars: &JPLiveVarMap, stmt: &'a Stmt<'a>, needle: Sym
fn has_live_var_expr<'a>(expr: &'a Expr<'a>, needle: Symbol) -> bool {
match expr {
Expr::Literal(_) => false,
Expr::NullPointer => false,
Expr::Call(call) => has_live_var_call(call, needle),
Expr::Array { elems: fields, .. } => {
for element in fields.iter() {