mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
add NullPointer to mono::ir::Expr
This commit is contained in:
parent
63cdd00d13
commit
09779f65ad
9 changed files with 28 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue