mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
pass return layout along to checked add
This commit is contained in:
parent
592a219f5d
commit
42d26a20b6
@ -769,13 +769,12 @@ impl<
|
||||
src1: &Symbol,
|
||||
src2: &Symbol,
|
||||
num_layout: &Layout<'a>,
|
||||
return_layout: &Layout<'a>,
|
||||
) {
|
||||
use Builtin::Int;
|
||||
|
||||
let buf = &mut self.buf;
|
||||
|
||||
let fields = [*num_layout, Layout::bool()];
|
||||
let return_layout = Layout::struct_no_name_order(&fields);
|
||||
let struct_size = return_layout.stack_size(self.target_info);
|
||||
|
||||
let base_offset = self.storage_manager.claim_stack_area(dst, struct_size);
|
||||
|
@ -406,7 +406,7 @@ trait Backend<'a> {
|
||||
self.build_num_add(sym, &args[0], &args[1], ret_layout)
|
||||
}
|
||||
LowLevel::NumAddChecked => {
|
||||
self.build_num_add_checked(sym, &args[0], &args[1], &arg_layouts[0])
|
||||
self.build_num_add_checked(sym, &args[0], &args[1], &arg_layouts[0], ret_layout)
|
||||
}
|
||||
LowLevel::NumAcos => self.build_fn_call(
|
||||
sym,
|
||||
@ -715,7 +715,8 @@ trait Backend<'a> {
|
||||
dst: &Symbol,
|
||||
src1: &Symbol,
|
||||
src2: &Symbol,
|
||||
layout: &Layout<'a>,
|
||||
num_layout: &Layout<'a>,
|
||||
return_layout: &Layout<'a>,
|
||||
);
|
||||
|
||||
/// build_num_mul stores `src1 * src2` into dst.
|
||||
|
Loading…
Reference in New Issue
Block a user