mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Add Lowlevel::Not
This commit is contained in:
parent
214ee6ed8e
commit
3c01ae10c6
3 changed files with 39 additions and 0 deletions
|
@ -649,6 +649,15 @@ trait Backend<'a> {
|
|||
);
|
||||
self.build_or(sym, &args[0], &args[1], &arg_layouts[0])
|
||||
}
|
||||
LowLevel::Not => {
|
||||
debug_assert_eq!(1, args.len(), "Not: expected to have exactly one argument");
|
||||
debug_assert_eq!(
|
||||
Layout::BOOL,
|
||||
*ret_layout,
|
||||
"Not: expected to have return layout of type Bool"
|
||||
);
|
||||
self.build_not(sym, &args[0], &arg_layouts[0])
|
||||
}
|
||||
LowLevel::NumLt => {
|
||||
debug_assert_eq!(
|
||||
2,
|
||||
|
@ -1048,6 +1057,9 @@ trait Backend<'a> {
|
|||
/// build_or stores the result of `src1 || src2` into dst.
|
||||
fn build_or(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>);
|
||||
|
||||
/// build_not stores the result of `!src` into dst.
|
||||
fn build_not(&mut self, dst: &Symbol, src: &Symbol, arg_layout: &InLayout<'a>);
|
||||
|
||||
/// build_num_lt stores the result of `src1 < src2` into dst.
|
||||
fn build_num_lt(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue