mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Merge pull request #2071 from rtfeldman/refcount-mono-ir
Start generating refcounting code as mono IR
This commit is contained in:
commit
a3827d6636
21 changed files with 726 additions and 209 deletions
|
@ -6038,6 +6038,10 @@ fn run_low_level<'a, 'ctx, 'env>(
|
|||
| ListAny | ListAll | ListFindUnsafe | DictWalk => {
|
||||
unreachable!("these are higher order, and are handled elsewhere")
|
||||
}
|
||||
|
||||
RefCountGetPtr | RefCountInc | RefCountDec => {
|
||||
unreachable!("LLVM backend does not use lowlevels for refcounting");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ use roc_module::symbol::Interns;
|
|||
use roc_module::symbol::Symbol;
|
||||
use roc_mono::layout::{Builtin, Layout, LayoutIds, UnionLayout};
|
||||
|
||||
/// "Infinite" reference count, for static values
|
||||
/// Ref counts are encoded as negative numbers where isize::MIN represents 1
|
||||
pub const REFCOUNT_MAX: usize = 0_usize;
|
||||
|
||||
pub fn refcount_1(ctx: &Context, ptr_bytes: u32) -> IntValue<'_> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue