aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authorDavid Rubin <daviru007@icloud.com>2024-08-12 15:28:05 -0700
committerDavid Rubin <daviru007@icloud.com>2024-08-25 15:18:20 -0700
commitce92ccccc961992c00a10e714ce9e799956c50f2 (patch)
tree39d25560175d0787a0891c0f8fa25f68bb1ba7cd /src/InternPool.zig
parent472f3ac419386327a3ed464256509af456092785 (diff)
downloadzig-ce92ccccc961992c00a10e714ce9e799956c50f2.tar.gz
zig-ce92ccccc961992c00a10e714ce9e799956c50f2.zip
sema: `resolve{Struct,Union}Inner` don't throw away Semas
before this, calls to `resolveTypeFieldsStruct` (now renamed to the more correct `resolveStructFieldTypes`) would just throw away the sema that `resolveStructInner` created and create its own. There is no reason to do this, and we fix it to preserve the sema through it all.
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index 7adfae31f4..6949383175 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -457,7 +457,7 @@ pub const Cau = struct {
unwrapped.index);
}
};
- fn unwrap(cau_index: Cau.Index, ip: *const InternPool) Unwrapped {
+ pub fn unwrap(cau_index: Cau.Index, ip: *const InternPool) Unwrapped {
return .{
.tid = @enumFromInt(@intFromEnum(cau_index) >> ip.tid_shift_31 & ip.getTidMask()),
.index = @intFromEnum(cau_index) & ip.getIndexMask(u31),
@@ -1464,7 +1464,7 @@ pub const NamespaceIndex = enum(u32) {
unwrapped.index);
}
};
- fn unwrap(namespace_index: NamespaceIndex, ip: *const InternPool) Unwrapped {
+ pub fn unwrap(namespace_index: NamespaceIndex, ip: *const InternPool) Unwrapped {
const index = @intFromEnum(namespace_index) & ip.getIndexMask(u32);
return .{
.tid = @enumFromInt(@intFromEnum(namespace_index) >> ip.tid_shift_32 & ip.getTidMask()),