mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Attempt bool true/false impl in dev backend
This commit is contained in:
parent
e3c91e1d4d
commit
b72ee8a68e
1 changed files with 10 additions and 0 deletions
|
@ -728,6 +728,16 @@ trait Backend<'a> {
|
|||
self.load_literal_symbols(args);
|
||||
self.build_fn_call(sym, fn_name, args, arg_layouts, ret_layout)
|
||||
}
|
||||
Symbol::BOOL_TRUE => {
|
||||
let bool_layout = Layout::Builtin(Builtin::Bool);
|
||||
self.load_literal(&Symbol::DEV_TMP, &bool_layout, &Literal::Bool(true));
|
||||
self.return_symbol(&Symbol::DEV_TMP, &bool_layout);
|
||||
}
|
||||
Symbol::BOOL_FALSE => {
|
||||
let bool_layout = Layout::Builtin(Builtin::Bool);
|
||||
self.load_literal(&Symbol::DEV_TMP, &bool_layout, &Literal::Bool(false));
|
||||
self.return_symbol(&Symbol::DEV_TMP, &bool_layout);
|
||||
}
|
||||
_ => todo!("the function, {:?}", func_sym),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue