| ... | ... | @@ -4435,6 +4435,7 @@ fn dumpFallible(ip: InternPool, arena: Allocator) anyerror!void { |
| 4435 | 4435 | const items_size = (1 + 4) * ip.items.len; |
| 4436 | 4436 | const extra_size = 4 * ip.extra.items.len; |
| 4437 | 4437 | const limbs_size = 8 * ip.limbs.items.len; |
| 4438 | // TODO: fields size is not taken into account |
| 4438 | 4439 | const structs_size = ip.allocated_structs.len * |
| 4439 | 4440 | (@sizeOf(Module.Struct) + @sizeOf(Module.Namespace) + @sizeOf(Module.Decl)); |
| 4440 | 4441 | const unions_size = ip.allocated_unions.len * |
| ... | ... | @@ -4501,7 +4502,14 @@ fn dumpFallible(ip: InternPool, arena: Allocator) anyerror!void { |
| 4501 | 4502 | .type_enum_explicit, .type_enum_nonexhaustive => @sizeOf(EnumExplicit), |
| 4502 | 4503 | .type_enum_auto => @sizeOf(EnumAuto), |
| 4503 | 4504 | .type_opaque => @sizeOf(Key.OpaqueType), |
| 4504 | | .type_struct => @sizeOf(Module.Struct) + @sizeOf(Module.Namespace) + @sizeOf(Module.Decl), |
| 4505 | .type_struct => b: { |
| 4506 | const struct_index = @intToEnum(Module.Struct.Index, data); |
| 4507 | const struct_obj = ip.structPtrConst(struct_index); |
| 4508 | break :b @sizeOf(Module.Struct) + |
| 4509 | @sizeOf(Module.Namespace) + |
| 4510 | @sizeOf(Module.Decl) + |
| 4511 | (struct_obj.fields.count() * @sizeOf(Module.Struct.Field)); |
| 4512 | }, |
| 4505 | 4513 | .type_struct_ns => @sizeOf(Module.Namespace), |
| 4506 | 4514 | .type_struct_anon => b: { |
| 4507 | 4515 | const info = ip.extraData(TypeStructAnon, data); |