Add a comment on REFCOUNT_MAX

This commit is contained in:
Brian Carroll 2021-11-24 14:40:42 +00:00
parent d67cc883ca
commit c8278dcb1c

View File

@ -19,6 +19,8 @@ use roc_module::symbol::Interns;
use roc_module::symbol::Symbol; use roc_module::symbol::Symbol;
use roc_mono::layout::{Builtin, Layout, LayoutIds, UnionLayout}; 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 const REFCOUNT_MAX: usize = 0_usize;
pub fn refcount_1(ctx: &Context, ptr_bytes: u32) -> IntValue<'_> { pub fn refcount_1(ctx: &Context, ptr_bytes: u32) -> IntValue<'_> {