diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-03 13:01:10 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:40:03 -0700 |
| commit | 264292f430668652818b30fe6cf5d8b434530c84 (patch) | |
| tree | 170811d1df9e87806e3e0a32933590271555b0d3 /src/InternPool.zig | |
| parent | cdf6acba961648cc800027b3e0adb0a3593a610a (diff) | |
| download | zig-264292f430668652818b30fe6cf5d8b434530c84.tar.gz zig-264292f430668652818b30fe6cf5d8b434530c84.zip | |
InternPool: implement resolveTypeFields
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index eadaf0da5e..146a880493 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -78,7 +78,11 @@ pub const Key = union(enum) { }, struct_type: struct { fields_len: u32, - // TODO move Module.Struct data to here + // TODO move Module.Struct data to InternPool + }, + union_type: struct { + fields_len: u32, + // TODO move Module.Union data to InternPool }, pub const IntType = std.builtin.Type.Int; @@ -126,6 +130,10 @@ pub const Key = union(enum) { @panic("TODO"); } }, + .union_type => |union_type| { + _ = union_type; + @panic("TODO"); + }, } } @@ -195,6 +203,14 @@ pub const Key = union(enum) { @panic("TODO"); }, + + .union_type => |a_info| { + const b_info = b.union_type; + + _ = a_info; + _ = b_info; + @panic("TODO"); + }, } } @@ -208,6 +224,7 @@ pub const Key = union(enum) { .error_union_type, .simple_type, .struct_type, + .union_type, => return .type_type, .int => |x| return x.ty, @@ -978,6 +995,11 @@ pub fn get(ip: *InternPool, gpa: Allocator, key: Key) Allocator.Error!Index { .data = @enumToInt(SimpleInternal.type_empty_struct), }); }, + + .union_type => |union_type| { + _ = union_type; + @panic("TODO"); + }, } return @intToEnum(Index, ip.items.len - 1); } |
