aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-06-24 15:40:23 +0100
committermlugg <mlugg@mlugg.co.uk>2024-06-26 05:28:04 +0100
commit4cb5318088b2eb66891f0d83b76a2740644b4156 (patch)
tree87e9ae619d448ae4252931ba20393198f47dddc0 /src/Sema.zig
parent5b523d04690d8a01cb5d97e4f5a35443cb0cbde8 (diff)
downloadzig-4cb5318088b2eb66891f0d83b76a2740644b4156.tar.gz
zig-4cb5318088b2eb66891f0d83b76a2740644b4156.zip
InternPool: rename `Depender` to `AnalSubject`
This is essentially just a rename. I also changed the representation of `AnalSubject` to use a `packed struct` rather than a non-exhaustive enum, but that change is relatively trivial.
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 9317998288..db520f5789 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -2735,12 +2735,12 @@ fn maybeRemoveOutdatedType(sema: *Sema, ty: InternPool.Index) !bool {
if (!zcu.comp.debug_incremental) return false;
const decl_index = Type.fromInterned(ty).getOwnerDecl(zcu);
- const decl_as_depender = InternPool.Depender.wrap(.{ .decl = decl_index });
+ const decl_as_depender = InternPool.AnalSubject.wrap(.{ .decl = decl_index });
const was_outdated = zcu.outdated.swapRemove(decl_as_depender) or
zcu.potentially_outdated.swapRemove(decl_as_depender);
if (!was_outdated) return false;
_ = zcu.outdated_ready.swapRemove(decl_as_depender);
- zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.Depender.wrap(.{ .decl = decl_index }));
+ zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.AnalSubject.wrap(.{ .decl = decl_index }));
zcu.intern_pool.remove(ty);
zcu.declPtr(decl_index).analysis = .dependency_failure;
try zcu.markDependeeOutdated(.{ .decl_val = decl_index });
@@ -2834,7 +2834,7 @@ fn zirStructDecl(
if (sema.mod.comp.debug_incremental) {
try ip.addDependency(
sema.gpa,
- InternPool.Depender.wrap(.{ .decl = new_decl_index }),
+ InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
.{ .src_hash = try ip.trackZir(sema.gpa, block.getFileScope(mod), inst) },
);
}
@@ -3068,7 +3068,7 @@ fn zirEnumDecl(
if (sema.mod.comp.debug_incremental) {
try mod.intern_pool.addDependency(
sema.gpa,
- InternPool.Depender.wrap(.{ .decl = new_decl_index }),
+ InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
.{ .src_hash = try mod.intern_pool.trackZir(sema.gpa, block.getFileScope(mod), inst) },
);
}
@@ -3334,7 +3334,7 @@ fn zirUnionDecl(
if (sema.mod.comp.debug_incremental) {
try mod.intern_pool.addDependency(
sema.gpa,
- InternPool.Depender.wrap(.{ .decl = new_decl_index }),
+ InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
.{ .src_hash = try mod.intern_pool.trackZir(sema.gpa, block.getFileScope(mod), inst) },
);
}
@@ -3422,7 +3422,7 @@ fn zirOpaqueDecl(
if (sema.mod.comp.debug_incremental) {
try ip.addDependency(
gpa,
- InternPool.Depender.wrap(.{ .decl = new_decl_index }),
+ InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
.{ .src_hash = try ip.trackZir(gpa, block.getFileScope(mod), inst) },
);
}
@@ -38362,7 +38362,7 @@ pub fn declareDependency(sema: *Sema, dependee: InternPool.Dependee) !void {
return;
}
- const depender = InternPool.Depender.wrap(
+ const depender = InternPool.AnalSubject.wrap(
if (sema.owner_func_index != .none)
.{ .func = sema.owner_func_index }
else