mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-23 12:02:28 +00:00
List takes interned element
This commit is contained in:
parent
f2a42affd1
commit
e4b5252e51
16 changed files with 173 additions and 83 deletions
|
@ -444,10 +444,11 @@ impl<'a> CodeGenHelp<'a> {
|
|||
layout: Layout<'a>,
|
||||
) -> Layout<'a> {
|
||||
match layout {
|
||||
Layout::Builtin(Builtin::List(v)) => Layout::Builtin(Builtin::List(
|
||||
self.arena
|
||||
.alloc(self.replace_rec_ptr(ctx, layout_interner, *v)),
|
||||
)),
|
||||
Layout::Builtin(Builtin::List(v)) => {
|
||||
let v = self.replace_rec_ptr(ctx, layout_interner, *layout_interner.get(v));
|
||||
let v = layout_interner.insert(self.arena.alloc(v));
|
||||
Layout::Builtin(Builtin::List(v))
|
||||
}
|
||||
|
||||
Layout::Builtin(_) => layout,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue