mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Merge pull request #4851 from JTeeuwissen/main
replace borrowed boolean with ownership enum
This commit is contained in:
commit
61a2091b27
9 changed files with 85 additions and 58 deletions
|
@ -2,6 +2,7 @@ use bumpalo::collections::vec::Vec;
|
|||
use roc_module::low_level::LowLevel;
|
||||
use roc_module::symbol::{IdentIds, Symbol};
|
||||
|
||||
use crate::borrow::Ownership;
|
||||
use crate::ir::{
|
||||
BranchInfo, Call, CallType, Expr, JoinPointId, Literal, Param, Stmt, UpdateModeId,
|
||||
};
|
||||
|
@ -418,7 +419,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),
|
||||
});
|
||||
|
||||
|
@ -718,13 +719,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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue