switch over to alloca expr

This commit is contained in:
Folkert 2023-07-29 20:20:40 +02:00
parent cdd2aab217
commit 44d03eebfa
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
8 changed files with 9 additions and 67 deletions

View file

@ -1138,8 +1138,10 @@ fn insert_refcount_operations_binding<'a>(
Expr::Reset { .. } | Expr::ResetRef { .. } => {
unreachable!("Reset(ref) should not exist at this point")
}
Expr::Alloca { .. } => {
unreachable!("Alloca should not exist at this point")
Expr::Alloca { initializer, .. } => {
let new_let = new_let!(stmt);
inc_owned!(initializer.as_ref().copied().into_iter(), new_let)
}
}
}
@ -1367,7 +1369,6 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] {
PtrStore => arena.alloc_slice_copy(&[owned, owned]),
PtrLoad => arena.alloc_slice_copy(&[owned]),
PtrCast => arena.alloc_slice_copy(&[owned]),
Alloca => arena.alloc_slice_copy(&[owned]),
SetJmp | LongJmp | SetLongJmpBuffer => {
unreachable!("only inserted in dev backend codegen")