mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
fix list decref
This commit is contained in:
parent
5e68d31afc
commit
cd9b32ba65
4 changed files with 27 additions and 22 deletions
|
@ -1136,3 +1136,17 @@ pub fn store_list<'a, 'ctx, 'env>(
|
|||
"cast_collection",
|
||||
)
|
||||
}
|
||||
|
||||
pub fn decref<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
wrapper_struct: StructValue<'ctx>,
|
||||
alignment: u32,
|
||||
) {
|
||||
let (_, pointer) = load_list(
|
||||
env.builder,
|
||||
wrapper_struct,
|
||||
env.context.i8_type().ptr_type(AddressSpace::Generic),
|
||||
);
|
||||
|
||||
crate::llvm::refcounting::decref_pointer_check_null(env, pointer, alignment);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue