aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig24
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);
}