Zcu: remove null_stack_trace

The new simplifications to the panic handler have eliminated the need
for this piece of memoized state.
This commit is contained in:
mlugg
2025-01-24 22:16:50 +00:00
parent 3232e59ab9
commit b6726913d3
2 changed files with 0 additions and 17 deletions

View File

@@ -38539,21 +38539,6 @@ pub fn analyzeMemoizedState(sema: *Sema, block: *Block, simple_src: LazySrcLoc,
}
}
if (stage == .panic) {
// We use `getBuiltinType` because this is from an earlier stage.
const stack_trace_ty = try sema.getBuiltinType(simple_src, .StackTrace);
const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
const opt_ptr_stack_trace_ty = try pt.optionalType(ptr_stack_trace_ty.toIntern());
const null_stack_trace = try pt.intern(.{ .opt = .{
.ty = opt_ptr_stack_trace_ty.toIntern(),
.val = .none,
} });
if (null_stack_trace != zcu.null_stack_trace) {
zcu.null_stack_trace = null_stack_trace;
any_changed = true;
}
}
return any_changed;
}

View File

@@ -219,8 +219,6 @@ free_type_references: std.ArrayListUnmanaged(u32) = .empty,
/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element.
builtin_decl_values: BuiltinDecl.Memoized = .initFill(.none),
/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = .panic })`.
null_stack_trace: InternPool.Index = .none,
generation: u32 = 0,