mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
dev backend: provide a hardcoded implementation for equality on VOID
This commit is contained in:
parent
beed1e3d6e
commit
ecf7066e6c
1 changed files with 10 additions and 0 deletions
|
@ -1800,6 +1800,11 @@ impl<
|
|||
|
||||
self.free_symbol(tmp);
|
||||
}
|
||||
LayoutRepr::Union(UnionLayout::NonRecursive([])) => {
|
||||
// This instruction will never execute, but we need a value the symbol
|
||||
let dst_reg = self.storage_manager.claim_general_reg(&mut self.buf, dst);
|
||||
ASM::mov_reg64_imm64(&mut self.buf, dst_reg, 1);
|
||||
}
|
||||
_ => {
|
||||
let ident_ids = self
|
||||
.interns
|
||||
|
@ -1876,6 +1881,11 @@ impl<
|
|||
|
||||
self.free_symbol(tmp)
|
||||
}
|
||||
LayoutRepr::Union(UnionLayout::NonRecursive([])) => {
|
||||
// This instruction will never execute, but we need a value the symbol
|
||||
let dst_reg = self.storage_manager.claim_general_reg(&mut self.buf, dst);
|
||||
ASM::mov_reg64_imm64(&mut self.buf, dst_reg, 1);
|
||||
}
|
||||
_ => {
|
||||
// defer to equality
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue