| ... | ... | @@ -59,10 +59,8 @@ pub const Key = union(enum) { |
| 59 | 59 | ty: Index, |
| 60 | 60 | tag: BigIntConst, |
| 61 | 61 | }, |
| 62 | | struct_type: struct { |
| 63 | | fields_len: u32, |
| 64 | | // TODO move Module.Struct data to InternPool |
| 65 | | }, |
| 62 | struct_type: StructType, |
| 63 | |
| 66 | 64 | union_type: struct { |
| 67 | 65 | fields_len: u32, |
| 68 | 66 | // TODO move Module.Union data to InternPool |
| ... | ... | @@ -111,6 +109,11 @@ pub const Key = union(enum) { |
| 111 | 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 | 117 | pub const Int = struct { |
| 115 | 118 | ty: Index, |
| 116 | 119 | storage: Storage, |
| ... | ... | @@ -1058,7 +1061,11 @@ pub fn indexToKey(ip: InternPool, index: Index) Key { |
| 1058 | 1061 | |
| 1059 | 1062 | .type_error_union => @panic("TODO"), |
| 1060 | 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 | 1069 | .int_u8 => .{ .int = .{ |
| 1063 | 1070 | .ty = .u8_type, |
| 1064 | 1071 | .storage = .{ .u64 = data }, |