mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
mono: Fix recursive union arg layout for calls to helper functions
This commit is contained in:
parent
3952a7cc7c
commit
ce6d5b1727
1 changed files with 4 additions and 3 deletions
|
@ -194,10 +194,11 @@ impl<'a> CodeGenHelp<'a> {
|
|||
let proc_name = self.find_or_create_proc(ident_ids, ctx, layout);
|
||||
|
||||
let (ret_layout, arg_layouts): (&'a Layout<'a>, &'a [Layout<'a>]) = {
|
||||
let arg = self.replace_rec_ptr(ctx, layout);
|
||||
match ctx.op {
|
||||
Dec | DecRef(_) => (&LAYOUT_UNIT, self.arena.alloc([layout])),
|
||||
Inc => (&LAYOUT_UNIT, self.arena.alloc([layout, self.layout_isize])),
|
||||
Eq => (&LAYOUT_BOOL, self.arena.alloc([layout, layout])),
|
||||
Dec | DecRef(_) => (&LAYOUT_UNIT, self.arena.alloc([arg])),
|
||||
Inc => (&LAYOUT_UNIT, self.arena.alloc([arg, self.layout_isize])),
|
||||
Eq => (&LAYOUT_BOOL, self.arena.alloc([arg, arg])),
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue