mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Change round_up_to_alignment to a macro to work on more Rust types
This commit is contained in:
parent
6a801ebc7e
commit
1ba654c5b2
4 changed files with 20 additions and 18 deletions
|
@ -694,8 +694,7 @@ impl<'a> WasmBackend<'a> {
|
|||
|
||||
let tag_field_layouts = &tags[tag_id as usize];
|
||||
let alignment_bytes = Layout::Struct(tag_field_layouts).alignment_bytes(PTR_SIZE);
|
||||
let tag_id_offset =
|
||||
round_up_to_alignment(field_offset as i32, alignment_bytes as i32) as u32;
|
||||
let tag_id_offset = round_up_to_alignment!(field_offset, alignment_bytes);
|
||||
let tag_id_align = Align::from(alignment_bytes);
|
||||
|
||||
match tag_id_align {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue