Merge branch 'resetref' into Frame-Limited

This commit is contained in:
J.Teeuwissen 2023-04-03 10:02:31 +02:00
commit 87abe8df7d
No known key found for this signature in database
GPG key ID: DB5F7A1ED8D478AD
13 changed files with 387 additions and 16 deletions

View file

@ -327,6 +327,7 @@ fn insert_reset<'a>(
| EmptyArray
| Reuse { .. }
| Reset { .. }
| ResetRef { .. }
| RuntimeErrorFunction(_) => break,
}
}
@ -864,7 +865,7 @@ fn has_live_var_expr<'a>(expr: &'a Expr<'a>, needle: Symbol) -> bool {
Expr::Reuse {
symbol, arguments, ..
} => needle == *symbol || arguments.iter().any(|s| *s == needle),
Expr::Reset { symbol, .. } => needle == *symbol,
Expr::Reset { symbol, .. } | Expr::ResetRef { symbol, .. } => needle == *symbol,
Expr::ExprBox { symbol, .. } => needle == *symbol,
Expr::ExprUnbox { symbol, .. } => needle == *symbol,
Expr::RuntimeErrorFunction(_) => false,