mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Updated refcount logic
This commit is contained in:
parent
0fe94cbd90
commit
74f2b0afda
4 changed files with 29 additions and 71 deletions
|
@ -1252,8 +1252,15 @@ pub(crate) fn run_low_level<'a, 'ctx, 'env>(
|
|||
}
|
||||
|
||||
RefCountIsUnique => {
|
||||
arguments!(input);
|
||||
call_bitcode_fn(env, &[input], &bitcode::UTILS_IS_UNIQUE)
|
||||
arguments!(data_ptr);
|
||||
|
||||
let ptr = env.builder.build_pointer_cast(
|
||||
data_ptr.into_pointer_value(),
|
||||
env.context.i8_type().ptr_type(AddressSpace::default()),
|
||||
"cast_to_i8_ptr",
|
||||
);
|
||||
|
||||
call_bitcode_fn(env, &[ptr.into()], &bitcode::UTILS_IS_UNIQUE)
|
||||
}
|
||||
|
||||
Unreachable => match RocReturn::from_layout(env, layout_interner, layout) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue