mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
don't explicitly add filler bytes
leaving the memory undefined is fine
This commit is contained in:
parent
b42a49035a
commit
515f717536
1 changed files with 0 additions and 9 deletions
|
@ -947,8 +947,6 @@ pub fn build_exp_expr<'a, 'ctx, 'env>(
|
|||
debug_assert!(*union_size > 1);
|
||||
let ptr_size = env.ptr_bytes;
|
||||
|
||||
let mut filler = tag_layout.stack_size(ptr_size);
|
||||
|
||||
let ctx = env.context;
|
||||
let builder = env.builder;
|
||||
|
||||
|
@ -985,16 +983,9 @@ pub fn build_exp_expr<'a, 'ctx, 'env>(
|
|||
} else {
|
||||
field_vals.push(val);
|
||||
}
|
||||
|
||||
filler -= field_size;
|
||||
}
|
||||
}
|
||||
|
||||
if filler > 0 {
|
||||
// TODO verify that this is required (better safe than sorry)
|
||||
field_types.push(env.context.i8_type().array_type(filler).into());
|
||||
}
|
||||
|
||||
// Create the struct_type
|
||||
let struct_type = ctx.struct_type(field_types.into_bump_slice(), false);
|
||||
let mut struct_val = struct_type.const_zero().into();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue