mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
clear tag id from reused pointer
This commit is contained in:
parent
23867296a4
commit
bfd189aa19
1 changed files with 5 additions and 2 deletions
|
@ -1010,7 +1010,8 @@ pub fn build_exp_expr<'a, 'ctx, 'env>(
|
|||
let else_block = ctx.append_basic_block(parent, "else_decref");
|
||||
let cont_block = ctx.append_basic_block(parent, "cont");
|
||||
|
||||
let refcount_ptr = PointerToRefcount::from_ptr_to_data(env, tag_ptr);
|
||||
let refcount_ptr =
|
||||
PointerToRefcount::from_ptr_to_data(env, tag_pointer_clear_tag_id(env, tag_ptr));
|
||||
let is_unique = refcount_ptr.is_1(env);
|
||||
|
||||
env.builder
|
||||
|
@ -1752,9 +1753,11 @@ fn allocate_tag<'a, 'ctx, 'env>(
|
|||
let reuse_ptr = {
|
||||
env.builder.position_at_end(else_block);
|
||||
|
||||
let cleared = tag_pointer_clear_tag_id(env, ptr);
|
||||
|
||||
env.builder.build_unconditional_branch(cont_block);
|
||||
|
||||
ptr
|
||||
cleared
|
||||
};
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue