mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
remove label from Struct layout
This commit is contained in:
parent
e2a7c970bc
commit
46062439b5
7 changed files with 233 additions and 211 deletions
|
@ -370,8 +370,6 @@ pub fn build_expr<'a, 'ctx, 'env>(
|
|||
Tag {
|
||||
arguments,
|
||||
tag_layout,
|
||||
union_size,
|
||||
tag_id,
|
||||
..
|
||||
} => {
|
||||
let ptr_size = env.ptr_bytes;
|
||||
|
@ -387,23 +385,6 @@ pub fn build_expr<'a, 'ctx, 'env>(
|
|||
let mut field_types = Vec::with_capacity_in(num_fields, env.arena);
|
||||
let mut field_vals = Vec::with_capacity_in(num_fields, env.arena);
|
||||
|
||||
// insert the discriminant value
|
||||
if *union_size > 1 {
|
||||
let val = env
|
||||
.context
|
||||
.i64_type()
|
||||
.const_int(*tag_id as u64, true)
|
||||
.into();
|
||||
|
||||
let field_type = env.context.i64_type().into();
|
||||
|
||||
field_types.push(field_type);
|
||||
field_vals.push(val);
|
||||
|
||||
let field_size = ptr_size;
|
||||
filler -= field_size;
|
||||
}
|
||||
|
||||
for (field_expr, field_layout) in arguments.iter() {
|
||||
let val = build_expr(env, &scope, parent, field_expr, procs);
|
||||
let field_type =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue