mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Add Num.round to dev backend
This commit is contained in:
parent
b25862a93b
commit
1c6ac84f2f
7 changed files with 589 additions and 564 deletions
|
@ -201,6 +201,9 @@ where
|
|||
Symbol::NUM_SUB => {
|
||||
self.build_run_low_level(sym, &LowLevel::NumSub, arguments, layout)
|
||||
}
|
||||
Symbol::NUM_ROUND => {
|
||||
self.build_run_low_level(sym, &LowLevel::NumRound, arguments, layout)
|
||||
}
|
||||
Symbol::BOOL_EQ => {
|
||||
self.build_run_low_level(sym, &LowLevel::Eq, arguments, layout)
|
||||
}
|
||||
|
@ -300,7 +303,13 @@ where
|
|||
// Should we panic?
|
||||
x => Err(format!("wrong layout, {:?}, for LowLevel::Eq", x)),
|
||||
},
|
||||
|
||||
LowLevel::NumRound => self.build_fn_call(
|
||||
sym,
|
||||
bitcode::NUM_ROUND.to_string(),
|
||||
args,
|
||||
&[Layout::Builtin(Builtin::Float64)],
|
||||
layout,
|
||||
),
|
||||
x => Err(format!("low level, {:?}. is not yet implemented", x)),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue