mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
use load_literal
This commit is contained in:
parent
0085272cb8
commit
4376db6c17
2 changed files with 7 additions and 2 deletions
|
@ -491,9 +491,11 @@ where
|
||||||
debug_assert_eq!(
|
debug_assert_eq!(
|
||||||
Layout::Builtin(Builtin::Bool),
|
Layout::Builtin(Builtin::Bool),
|
||||||
*ret_layout,
|
*ret_layout,
|
||||||
"NumIsZero: expected to have return layout of type I1"
|
"NumIsZero: expected to have return layout of type Bool"
|
||||||
);
|
);
|
||||||
self.build_num_is_zero(sym, &args[0], &arg_layouts[0])
|
|
||||||
|
self.load_literal(&Symbol::DEV_TMP, &Literal::Int(0))?;
|
||||||
|
self.build_eq(sym, &args[0], &Symbol::DEV_TMP, &arg_layouts[0])
|
||||||
}
|
}
|
||||||
_ => Err(format!(
|
_ => Err(format!(
|
||||||
"the function, {:?}, is not yet implemented",
|
"the function, {:?}, is not yet implemented",
|
||||||
|
|
|
@ -880,6 +880,9 @@ define_builtins! {
|
||||||
|
|
||||||
// the _ used in mono when a specialized symbol is deleted
|
// the _ used in mono when a specialized symbol is deleted
|
||||||
25 REMOVED_SPECIALIZATION: "#removed_specialization"
|
25 REMOVED_SPECIALIZATION: "#removed_specialization"
|
||||||
|
|
||||||
|
// used in dev backend
|
||||||
|
26 DEV_TMP: "#dev_tmp"
|
||||||
}
|
}
|
||||||
1 NUM: "Num" => {
|
1 NUM: "Num" => {
|
||||||
0 NUM_NUM: "Num" imported // the Num.Num type alias
|
0 NUM_NUM: "Num" imported // the Num.Num type alias
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue