mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
replace borrowed boolean with ownership enum
This commit is contained in:
parent
6bdab37541
commit
6c95bc1fb9
9 changed files with 48 additions and 29 deletions
|
@ -417,7 +417,7 @@ fn eq_tag_union_help<'a>(
|
|||
} else {
|
||||
let loop_params_iter = operands.iter().map(|arg| Param {
|
||||
symbol: *arg,
|
||||
borrow: true,
|
||||
ownership: Ownership::Borrowed,
|
||||
layout: Layout::Union(union_layout),
|
||||
});
|
||||
|
||||
|
@ -717,13 +717,13 @@ fn eq_list<'a>(
|
|||
|
||||
let param_addr1 = Param {
|
||||
symbol: addr1,
|
||||
borrow: false,
|
||||
ownership: Ownership::Owned,
|
||||
layout: layout_isize,
|
||||
};
|
||||
|
||||
let param_addr2 = Param {
|
||||
symbol: addr2,
|
||||
borrow: false,
|
||||
ownership: Ownership::Owned,
|
||||
layout: layout_isize,
|
||||
};
|
||||
|
||||
|
|
|
@ -943,7 +943,7 @@ fn refcount_list_elems<'a>(
|
|||
|
||||
let param_addr = Param {
|
||||
symbol: addr,
|
||||
borrow: false,
|
||||
ownership: Ownership::Owned,
|
||||
layout: layout_isize,
|
||||
};
|
||||
|
||||
|
@ -1601,7 +1601,7 @@ fn refcount_union_tailrec<'a>(
|
|||
|
||||
let jp_param = Param {
|
||||
symbol: next_ptr,
|
||||
borrow: true,
|
||||
ownership: Ownership::Borrowed,
|
||||
layout,
|
||||
};
|
||||
|
||||
|
@ -1621,7 +1621,7 @@ fn refcount_union_tailrec<'a>(
|
|||
let loop_init = Stmt::Jump(tailrec_loop, root.arena.alloc([initial_structure]));
|
||||
let loop_param = Param {
|
||||
symbol: current,
|
||||
borrow: true,
|
||||
ownership: Ownership::Borrowed,
|
||||
layout: Layout::Union(union_layout),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue