mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
match
This commit is contained in:
parent
363e2e1074
commit
03149dfd89
1 changed files with 7 additions and 5 deletions
|
@ -346,14 +346,16 @@ fn eq_tag_union_help<'a>(
|
||||||
let mut tag_branches = Vec::with_capacity_in(tag_layouts.len(), root.arena);
|
let mut tag_branches = Vec::with_capacity_in(tag_layouts.len(), root.arena);
|
||||||
|
|
||||||
// If there's a null tag, check it first. We might not need to load any data from memory.
|
// If there's a null tag, check it first. We might not need to load any data from memory.
|
||||||
if let NullableId::Wrapped(id) = nullable_id {
|
match nullable_id {
|
||||||
|
NullableId::Wrapped(id) => {
|
||||||
tag_branches.push((id as u64, BranchInfo::None, Stmt::Ret(Symbol::BOOL_TRUE)))
|
tag_branches.push((id as u64, BranchInfo::None, Stmt::Ret(Symbol::BOOL_TRUE)))
|
||||||
} else if let NullableId::Unwrapped(id) = nullable_id {
|
}
|
||||||
tag_branches.push((
|
NullableId::Unwrapped(id) => tag_branches.push((
|
||||||
id as TagIdIntType as u64,
|
id as TagIdIntType as u64,
|
||||||
BranchInfo::None,
|
BranchInfo::None,
|
||||||
Stmt::Ret(Symbol::BOOL_TRUE),
|
Stmt::Ret(Symbol::BOOL_TRUE),
|
||||||
))
|
)),
|
||||||
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
let default_tag = if let NullableId::Unwrapped(tag_id) = nullable_id {
|
let default_tag = if let NullableId::Unwrapped(tag_id) = nullable_id {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue