Merge pull request #4851 from JTeeuwissen/main

replace borrowed boolean with ownership enum
This commit is contained in:
Folkert de Vries 2023-01-09 23:24:39 +01:00 committed by GitHub
commit 61a2091b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 85 additions and 58 deletions

View file

@ -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,
};