mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
add alloca as an expression
This commit is contained in:
parent
750234f2de
commit
cdd2aab217
15 changed files with 171 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue