From 54f86ac8f3cda6da3dc571da6f5215ba75077727 Mon Sep 17 00:00:00 2001 From: David Gonzalez Martin Date: Wed, 18 Jun 2025 07:58:48 -0600 Subject: [PATCH] Pass 'basic_struct_passing' --- src/compiler.bbb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/compiler.bbb b/src/compiler.bbb index b6bf931..724f4b9 100644 --- a/src/compiler.bbb +++ b/src/compiler.bbb @@ -1731,6 +1731,11 @@ get_bit_size = fn (type: &Type) u64 >bit_size = get_bit_size(type.content.alias.type); return bit_size; }, + .union => + { + >result = type.content.union.byte_size * 8; + return result; + }, else => { #trap(); @@ -2182,6 +2187,10 @@ value_is_constant = fn (value: &Value) u1 { return 0; }, + .zero => + { + return 1; + }, else => { #trap(); @@ -17539,6 +17548,7 @@ names: [_][]u8 = "forward_declared_type", "enum_array", "opaque", + "basic_struct_passing", ]; [export] main = fn [cc(c)] (argument_count: u32, argv: &&u8, envp: &&u8) s32