mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Convert LayoutRepr::Struct into a tuple variant
This commit is contained in:
parent
a6bda6eccf
commit
a67c148be7
24 changed files with 85 additions and 128 deletions
|
@ -541,14 +541,12 @@ impl<'a> CodeGenHelp<'a> {
|
|||
|
||||
LayoutRepr::Builtin(_) => return layout,
|
||||
|
||||
LayoutRepr::Struct { field_layouts } => {
|
||||
LayoutRepr::Struct(field_layouts) => {
|
||||
let mut new_field_layouts = Vec::with_capacity_in(field_layouts.len(), self.arena);
|
||||
for f in field_layouts.iter() {
|
||||
new_field_layouts.push(self.replace_rec_ptr(ctx, layout_interner, *f));
|
||||
}
|
||||
LayoutRepr::Struct {
|
||||
field_layouts: new_field_layouts.into_bump_slice(),
|
||||
}
|
||||
LayoutRepr::Struct(new_field_layouts.into_bump_slice())
|
||||
}
|
||||
|
||||
LayoutRepr::Union(UnionLayout::NonRecursive(tags)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue