| ... | @@ -59,10 +59,8 @@ pub const Key = union(enum) { | ... | @@ -59,10 +59,8 @@ pub const Key = union(enum) { |
| 59 | ty: Index, | 59 | ty: Index, |
| 60 | tag: BigIntConst, | 60 | tag: BigIntConst, |
| 61 | }, | 61 | }, |
| 62 | struct_type: struct { | 62 | struct_type: StructType, |
| 63 | fields_len: u32, | 63 | |
| 64 | // TODO move Module.Struct data to InternPool | | |
| 65 | }, | | |
| 66 | union_type: struct { | 64 | union_type: struct { |
| 67 | fields_len: u32, | 65 | fields_len: u32, |
| 68 | // TODO move Module.Union data to InternPool | 66 | // TODO move Module.Union data to InternPool |
| ... | @@ -111,6 +109,11 @@ pub const Key = union(enum) { | ... | @@ -111,6 +109,11 @@ pub const Key = union(enum) { |
| 111 | child: Index, | 109 | child: Index, |
| 112 | }; | 110 | }; |
| 113 | | 111 | |
| | 112 | pub const StructType = struct { |
| | 113 | fields_len: u32, |
| | 114 | // TODO move Module.Struct data to InternPool |
| | 115 | }; |
| | 116 | |
| 114 | pub const Int = struct { | 117 | pub const Int = struct { |
| 115 | ty: Index, | 118 | ty: Index, |
| 116 | storage: Storage, | 119 | storage: Storage, |
| ... | @@ -1058,7 +1061,11 @@ pub fn indexToKey(ip: InternPool, index: Index) Key { | ... | @@ -1058,7 +1061,11 @@ pub fn indexToKey(ip: InternPool, index: Index) Key { |
| 1058 | | 1061 | |
| 1059 | .type_error_union => @panic("TODO"), | 1062 | .type_error_union => @panic("TODO"), |
| 1060 | .type_enum_simple => @panic("TODO"), | 1063 | .type_enum_simple => @panic("TODO"), |
| 1061 | .simple_internal => @panic("TODO"), | 1064 | .simple_internal => switch (@intToEnum(SimpleInternal, data)) { |
| | 1065 | .type_empty_struct => .{ .struct_type = .{ |
| | 1066 | .fields_len = 0, |
| | 1067 | } }, |
| | 1068 | }, |
| 1062 | .int_u8 => .{ .int = .{ | 1069 | .int_u8 => .{ .int = .{ |
| 1063 | .ty = .u8_type, | 1070 | .ty = .u8_type, |
| 1064 | .storage = .{ .u64 = data }, | 1071 | .storage = .{ .u64 = data }, |