mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Merge branch 'main' into ayaz/optimize-list-literal-alloc
This commit is contained in:
commit
49dedf0b7b
424 changed files with 15945 additions and 11035 deletions
|
@ -263,7 +263,7 @@ fn alignment_type(context: &Context, alignment: u32) -> BasicTypeEnum {
|
|||
2 => context.i16_type().into(),
|
||||
4 => context.i32_type().into(),
|
||||
8 => context.i64_type().into(),
|
||||
16 => context.i128_type().into(),
|
||||
16 => context.f128_type().into(),
|
||||
_ => unimplemented!("weird alignment: {alignment}"),
|
||||
}
|
||||
}
|
||||
|
@ -404,7 +404,8 @@ impl<'ctx> RocUnion<'ctx> {
|
|||
let mut width = self.data_width;
|
||||
|
||||
// add padding between data and the tag id
|
||||
width = round_up_to_alignment(width, tag_id_width);
|
||||
let tag_id_alignment = tag_id_width.max(1);
|
||||
width = round_up_to_alignment(width, tag_id_alignment);
|
||||
|
||||
// add tag id
|
||||
width += tag_id_width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue