Convert LayoutRepr::Struct into a tuple variant

This commit is contained in:
Ayaz Hafiz 2023-05-10 16:41:13 -05:00
parent a6bda6eccf
commit a67c148be7
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
24 changed files with 85 additions and 128 deletions

View file

@ -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)) => {