authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-06-24 15:40:23+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-06-26 05:28:04+01:00
log4cb5318088b2eb66891f0d83b76a2740644b4156
tree87e9ae619d448ae4252931ba20393198f47dddc0
parent5b523d04690d8a01cb5d97e4f5a35443cb0cbde8
signaturelock-open Commit is signed but in an unrecognized format.

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.

4 files changed, 68 insertions(+), 68 deletions(-)

src/Compilation.zig+1-1
......@@ -3494,7 +3494,7 @@ fn processOneJob(comp: *Compilation, job: Job, prog_node: std.Progress.Node) !vo
34943494 .{@errorName(err)},
34953495 ));
34963496 decl.analysis = .codegen_failure;
3497 try module.retryable_failures.append(gpa, InternPool.Depender.wrap(.{ .decl = decl_index }));
3497 try module.retryable_failures.append(gpa, InternPool.AnalSubject.wrap(.{ .decl = decl_index }));
34983498 };
34993499 },
35003500 .analyze_mod => |pkg| {
src/InternPool.zig+25-25
......@@ -81,7 +81,7 @@ namespace_name_deps: std.AutoArrayHashMapUnmanaged(NamespaceNameKey, DepEntry.In
8181/// Given a `Depender`, points to an entry in `dep_entries` whose `depender`
8282/// matches. The `next_dependee` field can be used to iterate all such entries
8383/// and remove them from the corresponding lists.
84first_dependency: std.AutoArrayHashMapUnmanaged(Depender, DepEntry.Index) = .{},
84first_dependency: std.AutoArrayHashMapUnmanaged(AnalSubject, DepEntry.Index) = .{},
8585
8686/// Stores dependency information. The hashmaps declared above are used to look
8787/// up entries in this list as required. This is not stored in `extra` so that
......@@ -132,39 +132,39 @@ pub fn trackZir(ip: *InternPool, gpa: Allocator, file: *Module.File, inst: Zir.I
132132 return @enumFromInt(gop.index);
133133}
134134
135/// Reperesents the "source" of a dependency edge, i.e. either a Decl or a
136/// runtime function (represented as an InternPool index).
137/// MSB is 0 for a Decl, 1 for a function.
138pub const Depender = enum(u32) {
139 _,
135/// Analysis Subject. Represents a single entity which undergoes semantic analysis.
136/// This is either a `Decl` (in future `Cau`) or a runtime function.
137/// The LSB is used as a tag bit.
138/// This is the "source" of an incremental dependency edge.
139pub const AnalSubject = packed struct(u32) {
140 kind: enum(u1) { decl, func },
141 index: u31,
140142 pub const Unwrapped = union(enum) {
141143 decl: DeclIndex,
142144 func: InternPool.Index,
143145 };
144 pub fn unwrap(dep: Depender) Unwrapped {
145 const tag: u1 = @truncate(@intFromEnum(dep) >> 31);
146 const val: u31 = @truncate(@intFromEnum(dep));
147 return switch (tag) {
148 0 => .{ .decl = @enumFromInt(val) },
149 1 => .{ .func = @enumFromInt(val) },
146 pub fn unwrap(as: AnalSubject) Unwrapped {
147 return switch (as.kind) {
148 .decl => .{ .decl = @enumFromInt(as.index) },
149 .func => .{ .func = @enumFromInt(as.index) },
150150 };
151151 }
152 pub fn wrap(raw: Unwrapped) Depender {
153 return @enumFromInt(switch (raw) {
154 .decl => |decl| @intFromEnum(decl),
155 .func => |func| (1 << 31) | @intFromEnum(func),
156 });
152 pub fn wrap(raw: Unwrapped) AnalSubject {
153 return switch (raw) {
154 .decl => |decl| .{ .kind = .decl, .index = @intCast(@intFromEnum(decl)) },
155 .func => |func| .{ .kind = .func, .index = @intCast(@intFromEnum(func)) },
156 };
157157 }
158 pub fn toOptional(dep: Depender) Optional {
159 return @enumFromInt(@intFromEnum(dep));
158 pub fn toOptional(as: AnalSubject) Optional {
159 return @enumFromInt(@as(u32, @bitCast(as)));
160160 }
161161 pub const Optional = enum(u32) {
162162 none = std.math.maxInt(u32),
163163 _,
164 pub fn unwrap(opt: Optional) ?Depender {
164 pub fn unwrap(opt: Optional) ?AnalSubject {
165165 return switch (opt) {
166166 .none => null,
167 _ => @enumFromInt(@intFromEnum(opt)),
167 _ => @bitCast(@intFromEnum(opt)),
168168 };
169169 }
170170 };
......@@ -178,7 +178,7 @@ pub const Dependee = union(enum) {
178178 namespace_name: NamespaceNameKey,
179179};
180180
181pub fn removeDependenciesForDepender(ip: *InternPool, gpa: Allocator, depender: Depender) void {
181pub fn removeDependenciesForDepender(ip: *InternPool, gpa: Allocator, depender: AnalSubject) void {
182182 var opt_idx = (ip.first_dependency.fetchSwapRemove(depender) orelse return).value.toOptional();
183183
184184 while (opt_idx.unwrap()) |idx| {
......@@ -207,7 +207,7 @@ pub fn removeDependenciesForDepender(ip: *InternPool, gpa: Allocator, depender:
207207pub const DependencyIterator = struct {
208208 ip: *const InternPool,
209209 next_entry: DepEntry.Index.Optional,
210 pub fn next(it: *DependencyIterator) ?Depender {
210 pub fn next(it: *DependencyIterator) ?AnalSubject {
211211 const idx = it.next_entry.unwrap() orelse return null;
212212 const entry = it.ip.dep_entries.items[@intFromEnum(idx)];
213213 it.next_entry = entry.next;
......@@ -236,7 +236,7 @@ pub fn dependencyIterator(ip: *const InternPool, dependee: Dependee) DependencyI
236236 };
237237}
238238
239pub fn addDependency(ip: *InternPool, gpa: Allocator, depender: Depender, dependee: Dependee) Allocator.Error!void {
239pub fn addDependency(ip: *InternPool, gpa: Allocator, depender: AnalSubject, dependee: Dependee) Allocator.Error!void {
240240 const first_depender_dep: DepEntry.Index.Optional = if (ip.first_dependency.get(depender)) |idx| dep: {
241241 // The entry already exists, so there is capacity to overwrite it later.
242242 break :dep idx.toOptional();
......@@ -300,7 +300,7 @@ pub const DepEntry = extern struct {
300300 /// the first and only entry in one of `intern_pool.*_deps`, and does not
301301 /// appear in any list by `first_dependency`, but is not in
302302 /// `free_dep_entries` since `*_deps` stores a reference to it.
303 depender: Depender.Optional,
303 depender: AnalSubject.Optional,
304304 /// Index into `dep_entries` forming a doubly linked list of all dependencies on this dependee.
305305 /// Used to iterate all dependers for a given dependee during an update.
306306 /// null if this is the end of the list.
src/Sema.zig+7-7
......@@ -2735,12 +2735,12 @@ fn maybeRemoveOutdatedType(sema: *Sema, ty: InternPool.Index) !bool {
27352735 if (!zcu.comp.debug_incremental) return false;
27362736
27372737 const decl_index = Type.fromInterned(ty).getOwnerDecl(zcu);
2738 const decl_as_depender = InternPool.Depender.wrap(.{ .decl = decl_index });
2738 const decl_as_depender = InternPool.AnalSubject.wrap(.{ .decl = decl_index });
27392739 const was_outdated = zcu.outdated.swapRemove(decl_as_depender) or
27402740 zcu.potentially_outdated.swapRemove(decl_as_depender);
27412741 if (!was_outdated) return false;
27422742 _ = zcu.outdated_ready.swapRemove(decl_as_depender);
2743 zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.Depender.wrap(.{ .decl = decl_index }));
2743 zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.AnalSubject.wrap(.{ .decl = decl_index }));
27442744 zcu.intern_pool.remove(ty);
27452745 zcu.declPtr(decl_index).analysis = .dependency_failure;
27462746 try zcu.markDependeeOutdated(.{ .decl_val = decl_index });
......@@ -2834,7 +2834,7 @@ fn zirStructDecl(
28342834 if (sema.mod.comp.debug_incremental) {
28352835 try ip.addDependency(
28362836 sema.gpa,
2837 InternPool.Depender.wrap(.{ .decl = new_decl_index }),
2837 InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
28382838 .{ .src_hash = try ip.trackZir(sema.gpa, block.getFileScope(mod), inst) },
28392839 );
28402840 }
......@@ -3068,7 +3068,7 @@ fn zirEnumDecl(
30683068 if (sema.mod.comp.debug_incremental) {
30693069 try mod.intern_pool.addDependency(
30703070 sema.gpa,
3071 InternPool.Depender.wrap(.{ .decl = new_decl_index }),
3071 InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
30723072 .{ .src_hash = try mod.intern_pool.trackZir(sema.gpa, block.getFileScope(mod), inst) },
30733073 );
30743074 }
......@@ -3334,7 +3334,7 @@ fn zirUnionDecl(
33343334 if (sema.mod.comp.debug_incremental) {
33353335 try mod.intern_pool.addDependency(
33363336 sema.gpa,
3337 InternPool.Depender.wrap(.{ .decl = new_decl_index }),
3337 InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
33383338 .{ .src_hash = try mod.intern_pool.trackZir(sema.gpa, block.getFileScope(mod), inst) },
33393339 );
33403340 }
......@@ -3422,7 +3422,7 @@ fn zirOpaqueDecl(
34223422 if (sema.mod.comp.debug_incremental) {
34233423 try ip.addDependency(
34243424 gpa,
3425 InternPool.Depender.wrap(.{ .decl = new_decl_index }),
3425 InternPool.AnalSubject.wrap(.{ .decl = new_decl_index }),
34263426 .{ .src_hash = try ip.trackZir(gpa, block.getFileScope(mod), inst) },
34273427 );
34283428 }
......@@ -38362,7 +38362,7 @@ pub fn declareDependency(sema: *Sema, dependee: InternPool.Dependee) !void {
3836238362 return;
3836338363 }
3836438364
38365 const depender = InternPool.Depender.wrap(
38365 const depender = InternPool.AnalSubject.wrap(
3836638366 if (sema.owner_func_index != .none)
3836738367 .{ .func = sema.owner_func_index }
3836838368 else
src/Zcu.zig+35-35
......@@ -139,26 +139,26 @@ global_error_set: GlobalErrorSet = .{},
139139/// Maximum amount of distinct error values, set by --error-limit
140140error_limit: ErrorInt,
141141
142/// Value is the number of PO or outdated Decls which this Depender depends on.
143potentially_outdated: std.AutoArrayHashMapUnmanaged(InternPool.Depender, u32) = .{},
144/// Value is the number of PO or outdated Decls which this Depender depends on.
145/// Once this value drops to 0, the Depender is a candidate for re-analysis.
146outdated: std.AutoArrayHashMapUnmanaged(InternPool.Depender, u32) = .{},
147/// This contains all `Depender`s in `outdated` whose PO dependency count is 0.
148/// Such `Depender`s are ready for immediate re-analysis.
142/// Value is the number of PO or outdated Decls which this AnalSubject depends on.
143potentially_outdated: std.AutoArrayHashMapUnmanaged(InternPool.AnalSubject, u32) = .{},
144/// Value is the number of PO or outdated Decls which this AnalSubject depends on.
145/// Once this value drops to 0, the AnalSubject is a candidate for re-analysis.
146outdated: std.AutoArrayHashMapUnmanaged(InternPool.AnalSubject, u32) = .{},
147/// This contains all `AnalSubject`s in `outdated` whose PO dependency count is 0.
148/// Such `AnalSubject`s are ready for immediate re-analysis.
149149/// See `findOutdatedToAnalyze` for details.
150outdated_ready: std.AutoArrayHashMapUnmanaged(InternPool.Depender, void) = .{},
150outdated_ready: std.AutoArrayHashMapUnmanaged(InternPool.AnalSubject, void) = .{},
151151/// This contains a set of Decls which may not be in `outdated`, but are the
152152/// root Decls of files which have updated source and thus must be re-analyzed.
153153/// If such a Decl is only in this set, the struct type index may be preserved
154154/// (only the namespace might change). If such a Decl is also `outdated`, the
155155/// struct type index must be recreated.
156156outdated_file_root: std.AutoArrayHashMapUnmanaged(Decl.Index, void) = .{},
157/// This contains a list of Dependers whose analysis or codegen failed, but the
157/// This contains a list of AnalSubject whose analysis or codegen failed, but the
158158/// failure was something like running out of disk space, and trying again may
159159/// succeed. On the next update, we will flush this list, marking all members of
160160/// it as outdated.
161retryable_failures: std.ArrayListUnmanaged(InternPool.Depender) = .{},
161retryable_failures: std.ArrayListUnmanaged(InternPool.AnalSubject) = .{},
162162
163163stage1_flags: packed struct {
164164 have_winmain: bool = false,
......@@ -3137,9 +3137,9 @@ fn markPoDependeeUpToDate(zcu: *Zcu, dependee: InternPool.Dependee) !void {
31373137 }
31383138}
31393139
3140/// Given a Depender which is newly outdated or PO, mark all Dependers which may
3141/// in turn be PO, due to a dependency on the original Depender's tyval or IES.
3142fn markTransitiveDependersPotentiallyOutdated(zcu: *Zcu, maybe_outdated: InternPool.Depender) !void {
3140/// Given a AnalSubject which is newly outdated or PO, mark all AnalSubjects which may
3141/// in turn be PO, due to a dependency on the original AnalSubject's tyval or IES.
3142fn markTransitiveDependersPotentiallyOutdated(zcu: *Zcu, maybe_outdated: InternPool.AnalSubject) !void {
31433143 var it = zcu.intern_pool.dependencyIterator(switch (maybe_outdated.unwrap()) {
31443144 .decl => |decl_index| .{ .decl_val = decl_index }, // TODO: also `decl_ref` deps when introduced
31453145 .func => |func_index| .{ .func_ies = func_index },
......@@ -3161,12 +3161,12 @@ fn markTransitiveDependersPotentiallyOutdated(zcu: *Zcu, maybe_outdated: InternP
31613161 continue;
31623162 }
31633163 try zcu.potentially_outdated.putNoClobber(zcu.gpa, po, 1);
3164 // This Depender was not already PO, so we must recursively mark its dependers as also PO.
3164 // This AnalSubject was not already PO, so we must recursively mark its dependers as also PO.
31653165 try zcu.markTransitiveDependersPotentiallyOutdated(po);
31663166 }
31673167}
31683168
3169pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.Depender {
3169pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.AnalSubject {
31703170 if (!zcu.comp.debug_incremental) return null;
31713171
31723172 if (zcu.outdated.count() == 0 and zcu.potentially_outdated.count() == 0) {
......@@ -3174,8 +3174,8 @@ pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.Depender {
31743174 return null;
31753175 }
31763176
3177 // Our goal is to find an outdated Depender which itself has no outdated or
3178 // PO dependencies. Most of the time, such a Depender will exist - we track
3177 // Our goal is to find an outdated AnalSubject which itself has no outdated or
3178 // PO dependencies. Most of the time, such an AnalSubject will exist - we track
31793179 // them in the `outdated_ready` set for efficiency. However, this is not
31803180 // necessarily the case, since the Decl dependency graph may contain loops
31813181 // via mutually recursive definitions:
......@@ -3197,7 +3197,7 @@ pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.Depender {
31973197 // `outdated`. This set will be small (number of files changed in this
31983198 // update), so it's alright for us to just iterate here.
31993199 for (zcu.outdated_file_root.keys()) |file_decl| {
3200 const decl_depender = InternPool.Depender.wrap(.{ .decl = file_decl });
3200 const decl_depender = InternPool.AnalSubject.wrap(.{ .decl = file_decl });
32013201 if (zcu.outdated.contains(decl_depender)) {
32023202 // Since we didn't hit this in the first loop, this Decl must have
32033203 // pending dependencies, so is ineligible.
......@@ -3213,7 +3213,7 @@ pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.Depender {
32133213 return decl_depender;
32143214 }
32153215
3216 // There is no single Depender which is ready for re-analysis. Instead, we
3216 // There is no single AnalSubject which is ready for re-analysis. Instead, we
32173217 // must assume that some Decl with PO dependencies is outdated - e.g. in the
32183218 // above example we arbitrarily pick one of A or B. We should select a Decl,
32193219 // since a Decl is definitely responsible for the loop in the dependency
......@@ -3221,7 +3221,7 @@ pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.Depender {
32213221
32223222 // The choice of this Decl could have a big impact on how much total
32233223 // analysis we perform, since if analysis concludes its tyval is unchanged,
3224 // then other PO Dependers may be resolved as up-to-date. To hopefully avoid
3224 // then other PO AnalSubject may be resolved as up-to-date. To hopefully avoid
32253225 // doing too much work, let's find a Decl which the most things depend on -
32263226 // the idea is that this will resolve a lot of loops (but this is only a
32273227 // heuristic).
......@@ -3271,7 +3271,7 @@ pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.Depender {
32713271 chosen_decl_dependers,
32723272 });
32733273
3274 return InternPool.Depender.wrap(.{ .decl = chosen_decl_idx.? });
3274 return InternPool.AnalSubject.wrap(.{ .decl = chosen_decl_idx.? });
32753275}
32763276
32773277/// During an incremental update, before semantic analysis, call this to flush all values from
......@@ -3281,12 +3281,12 @@ pub fn flushRetryableFailures(zcu: *Zcu) !void {
32813281 for (zcu.retryable_failures.items) |depender| {
32823282 if (zcu.outdated.contains(depender)) continue;
32833283 if (zcu.potentially_outdated.fetchSwapRemove(depender)) |kv| {
3284 // This Depender was already PO, but we now consider it outdated.
3284 // This AnalSubject was already PO, but we now consider it outdated.
32853285 // Any transitive dependencies are already marked PO.
32863286 try zcu.outdated.put(gpa, depender, kv.value);
32873287 continue;
32883288 }
3289 // This Depender was not marked PO, but is now outdated. Mark it as
3289 // This AnalSubject was not marked PO, but is now outdated. Mark it as
32903290 // such, then recursively mark transitive dependencies as PO.
32913291 try zcu.outdated.put(gpa, depender, 0);
32923292 try zcu.markTransitiveDependersPotentiallyOutdated(depender);
......@@ -3456,7 +3456,7 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {
34563456 // which tries to limit re-analysis to Decls whose previously listed
34573457 // dependencies are all up-to-date.
34583458
3459 const decl_as_depender = InternPool.Depender.wrap(.{ .decl = decl_index });
3459 const decl_as_depender = InternPool.AnalSubject.wrap(.{ .decl = decl_index });
34603460 const decl_was_outdated = mod.outdated.swapRemove(decl_as_depender) or
34613461 mod.potentially_outdated.swapRemove(decl_as_depender);
34623462
......@@ -3522,7 +3522,7 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {
35223522 else => |e| {
35233523 decl.analysis = .sema_failure;
35243524 try mod.failed_decls.ensureUnusedCapacity(mod.gpa, 1);
3525 try mod.retryable_failures.append(mod.gpa, InternPool.Depender.wrap(.{ .decl = decl_index }));
3525 try mod.retryable_failures.append(mod.gpa, InternPool.AnalSubject.wrap(.{ .decl = decl_index }));
35263526 mod.failed_decls.putAssumeCapacityNoClobber(decl_index, try ErrorMsg.create(
35273527 mod.gpa,
35283528 decl.navSrcLoc(mod).upgrade(mod),
......@@ -3581,7 +3581,7 @@ pub fn ensureFuncBodyAnalyzed(zcu: *Zcu, maybe_coerced_func_index: InternPool.In
35813581 // that's the case, we should remove this function from the binary.
35823582 if (decl.val.ip_index != func_index) {
35833583 try zcu.markDependeeOutdated(.{ .func_ies = func_index });
3584 ip.removeDependenciesForDepender(gpa, InternPool.Depender.wrap(.{ .func = func_index }));
3584 ip.removeDependenciesForDepender(gpa, InternPool.AnalSubject.wrap(.{ .func = func_index }));
35853585 ip.remove(func_index);
35863586 @panic("TODO: remove orphaned function from binary");
35873587 }
......@@ -3607,7 +3607,7 @@ pub fn ensureFuncBodyAnalyzed(zcu: *Zcu, maybe_coerced_func_index: InternPool.In
36073607 .complete => {},
36083608 }
36093609
3610 const func_as_depender = InternPool.Depender.wrap(.{ .func = func_index });
3610 const func_as_depender = InternPool.AnalSubject.wrap(.{ .func = func_index });
36113611 const was_outdated = zcu.outdated.swapRemove(func_as_depender) or
36123612 zcu.potentially_outdated.swapRemove(func_as_depender);
36133613
......@@ -3728,7 +3728,7 @@ pub fn ensureFuncBodyAnalyzed(zcu: *Zcu, maybe_coerced_func_index: InternPool.In
37283728 .{@errorName(err)},
37293729 ));
37303730 func.analysis(ip).state = .codegen_failure;
3731 try zcu.retryable_failures.append(zcu.gpa, InternPool.Depender.wrap(.{ .func = func_index }));
3731 try zcu.retryable_failures.append(zcu.gpa, InternPool.AnalSubject.wrap(.{ .func = func_index }));
37323732 },
37333733 };
37343734 } else if (zcu.llvm_object) |llvm_object| {
......@@ -3773,7 +3773,7 @@ pub fn ensureFuncBodyAnalysisQueued(mod: *Module, func_index: InternPool.Index)
37733773
37743774 assert(decl.has_tv);
37753775
3776 const func_as_depender = InternPool.Depender.wrap(.{ .func = func_index });
3776 const func_as_depender = InternPool.AnalSubject.wrap(.{ .func = func_index });
37773777 const is_outdated = mod.outdated.contains(func_as_depender) or
37783778 mod.potentially_outdated.contains(func_as_depender);
37793779
......@@ -3857,7 +3857,7 @@ fn getFileRootStruct(zcu: *Zcu, decl_index: Decl.Index, namespace_index: Namespa
38573857 if (zcu.comp.debug_incremental) {
38583858 try ip.addDependency(
38593859 gpa,
3860 InternPool.Depender.wrap(.{ .decl = decl_index }),
3860 InternPool.AnalSubject.wrap(.{ .decl = decl_index }),
38613861 .{ .src_hash = tracked_inst },
38623862 );
38633863 }
......@@ -3906,7 +3906,7 @@ fn semaFileUpdate(zcu: *Zcu, file: *File, type_outdated: bool) SemaError!bool {
39063906
39073907 if (type_outdated) {
39083908 // Invalidate the existing type, reusing the decl and namespace.
3909 zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.Depender.wrap(.{ .decl = file.root_decl.unwrap().? }));
3909 zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.AnalSubject.wrap(.{ .decl = file.root_decl.unwrap().? }));
39103910 zcu.intern_pool.remove(decl.val.toIntern());
39113911 decl.val = undefined;
39123912 _ = try zcu.getFileRootStruct(file.root_decl.unwrap().?, decl.src_namespace, file);
......@@ -4097,7 +4097,7 @@ fn semaDecl(mod: *Module, decl_index: Decl.Index) !SemaDeclResult {
40974097 break :ip_index .none;
40984098 };
40994099
4100 mod.intern_pool.removeDependenciesForDepender(gpa, InternPool.Depender.wrap(.{ .decl = decl_index }));
4100 mod.intern_pool.removeDependenciesForDepender(gpa, InternPool.AnalSubject.wrap(.{ .decl = decl_index }));
41014101
41024102 decl.analysis = .in_progress;
41034103
......@@ -4323,7 +4323,7 @@ fn semaAnonOwnerDecl(zcu: *Zcu, decl_index: Decl.Index) !SemaDeclResult {
43234323 // with a new Decl.
43244324 //
43254325 // Yes, this does mean that any type owner Decl has a constant value for its entire lifetime.
4326 zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.Depender.wrap(.{ .decl = decl_index }));
4326 zcu.intern_pool.removeDependenciesForDepender(zcu.gpa, InternPool.AnalSubject.wrap(.{ .decl = decl_index }));
43274327 zcu.intern_pool.remove(decl.val.toIntern());
43284328 decl.analysis = .dependency_failure;
43294329 return .{
......@@ -5026,7 +5026,7 @@ pub fn analyzeFnBody(mod: *Module, func_index: InternPool.Index, arena: Allocato
50265026 const decl_prog_node = mod.sema_prog_node.start((try decl.fullyQualifiedName(mod)).toSlice(ip), 0);
50275027 defer decl_prog_node.end();
50285028
5029 mod.intern_pool.removeDependenciesForDepender(gpa, InternPool.Depender.wrap(.{ .func = func_index }));
5029 mod.intern_pool.removeDependenciesForDepender(gpa, InternPool.AnalSubject.wrap(.{ .func = func_index }));
50305030
50315031 var comptime_err_ret_trace = std.ArrayList(LazySrcLoc).init(gpa);
50325032 defer comptime_err_ret_trace.deinit();
......@@ -5627,7 +5627,7 @@ pub fn linkerUpdateDecl(zcu: *Zcu, decl_index: Decl.Index) !void {
56275627 .{@errorName(err)},
56285628 ));
56295629 decl.analysis = .codegen_failure;
5630 try zcu.retryable_failures.append(zcu.gpa, InternPool.Depender.wrap(.{ .decl = decl_index }));
5630 try zcu.retryable_failures.append(zcu.gpa, InternPool.AnalSubject.wrap(.{ .decl = decl_index }));
56315631 },
56325632 };
56335633 } else if (zcu.llvm_object) |llvm_object| {