compiler: eliminate legacy Type.Tag.pointer

Now pointer types are stored only in InternPool.
This commit is contained in:
Andrew Kelley
2023-05-18 22:02:55 -07:00
parent 607737d841
commit 7bf91fc79a
15 changed files with 295 additions and 673 deletions

View File

@@ -1431,8 +1431,7 @@ pub const CType = extern union {
.complete, .parameter, .global => try lookup.typeToIndex(ty, .forward),
.payload => unreachable,
}) |fwd_idx| {
var buf: Type.SlicePtrFieldTypeBuffer = undefined;
const ptr_ty = ty.slicePtrFieldType(&buf, mod);
const ptr_ty = ty.slicePtrFieldType(mod);
if (try lookup.typeToIndex(ptr_ty, kind)) |ptr_idx| {
self.storage = .{ .anon = undefined };
self.storage.anon.fields[0] = .{