authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-01-24 22:16:50+00:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-01-24 22:33:23+00:00
logb6726913d31f9273317ab56c4d33096aee0a588f
tree16ba058e385dc23150653bb7a1a63044f984dd77
parent3232e59ab99154154631eccc177b7159633acd7f
signaturelock-open Commit is signed but in an unrecognized format.

Zcu: remove `null_stack_trace`

The new simplifications to the panic handler have eliminated the need for this piece of memoized state.

2 files changed, 0 insertions(+), 17 deletions(-)

src/Sema.zig-15
......@@ -38539,21 +38539,6 @@ pub fn analyzeMemoizedState(sema: *Sema, block: *Block, simple_src: LazySrcLoc,
3853938539 }
3854038540 }
3854138541
38542 if (stage == .panic) {
38543 // We use `getBuiltinType` because this is from an earlier stage.
38544 const stack_trace_ty = try sema.getBuiltinType(simple_src, .StackTrace);
38545 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
38546 const opt_ptr_stack_trace_ty = try pt.optionalType(ptr_stack_trace_ty.toIntern());
38547 const null_stack_trace = try pt.intern(.{ .opt = .{
38548 .ty = opt_ptr_stack_trace_ty.toIntern(),
38549 .val = .none,
38550 } });
38551 if (null_stack_trace != zcu.null_stack_trace) {
38552 zcu.null_stack_trace = null_stack_trace;
38553 any_changed = true;
38554 }
38555 }
38556
3855738542 return any_changed;
3855838543}
3855938544
src/Zcu.zig-2
......@@ -219,8 +219,6 @@ free_type_references: std.ArrayListUnmanaged(u32) = .empty,
219219
220220/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element.
221221builtin_decl_values: BuiltinDecl.Memoized = .initFill(.none),
222/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = .panic })`.
223null_stack_trace: InternPool.Index = .none,
224222
225223generation: u32 = 0,
226224