start resetref

This commit is contained in:
J.Teeuwissen 2023-03-29 11:57:13 +02:00
parent 61efec6fe2
commit d4ed6f7778
No known key found for this signature in database
GPG key ID: DB5F7A1ED8D478AD
13 changed files with 214 additions and 18 deletions

View file

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