add alloca as an expression

This commit is contained in:
Folkert 2023-07-29 20:10:52 +02:00
parent 750234f2de
commit cdd2aab217
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
15 changed files with 171 additions and 14 deletions

View file

@ -1138,6 +1138,9 @@ 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")
}
}
}
@ -1366,6 +1369,10 @@ fn lowlevel_borrow_signature(arena: &Bump, op: LowLevel) -> &[Ownership] {
PtrCast => arena.alloc_slice_copy(&[owned]),
Alloca => arena.alloc_slice_copy(&[owned]),
SetJmp | LongJmp | SetLongJmpBuffer => {
unreachable!("only inserted in dev backend codegen")
}
PtrClearTagId | RefCountIncRcPtr | RefCountDecRcPtr | RefCountIncDataPtr
| RefCountDecDataPtr | RefCountIsUnique => {
unreachable!("Only inserted *after* borrow checking: {:?}", op);