mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
don't calculate RC pointer in STR decrement function
we now decrement based on the data pointer; further logic is all in zig now
This commit is contained in:
parent
75b21e6228
commit
62dac6bdf8
1 changed files with 1 additions and 13 deletions
|
@ -891,7 +891,6 @@ fn refcount_str<'a>(
|
|||
// Modify Refcount
|
||||
//
|
||||
|
||||
let rc_ptr = root.create_symbol(ident_ids, "rc_ptr");
|
||||
let alignment = root.target_info.ptr_width() as u32;
|
||||
let ret_stmt = rc_return_stmt(root, ident_ids, ctx);
|
||||
let modify_rc_stmt = modify_refcount(
|
||||
|
@ -902,17 +901,6 @@ fn refcount_str<'a>(
|
|||
alignment,
|
||||
arena.alloc(ret_stmt),
|
||||
);
|
||||
let addr = root.create_symbol(ident_ids, "addr");
|
||||
let get_and_modify_rc_stmt = rc_ptr_from_data_ptr_help(
|
||||
root,
|
||||
ident_ids,
|
||||
chars,
|
||||
rc_ptr,
|
||||
false,
|
||||
arena.alloc(modify_rc_stmt),
|
||||
addr,
|
||||
Layout::OPAQUE_PTR,
|
||||
);
|
||||
|
||||
//
|
||||
// JoinPoint for slice vs list
|
||||
|
@ -921,7 +909,7 @@ fn refcount_str<'a>(
|
|||
let joinpoint_elems = Stmt::Join {
|
||||
id: jp_chars,
|
||||
parameters: arena.alloc([param_elems]),
|
||||
body: arena.alloc(get_and_modify_rc_stmt),
|
||||
body: arena.alloc(modify_rc_stmt),
|
||||
remainder: arena.alloc(
|
||||
//
|
||||
length_stmt(arena.alloc(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue