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:
15
src/Sema.zig
15
src/Sema.zig
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user