stage2: add interned AIR tag

This required additionally passing the `InternPool` into some AIR
methods.

Also, implement `Type.isNoReturn` for interned types.
This commit is contained in:
Andrew Kelley
2023-05-02 14:37:33 -07:00
parent c7e84ddb72
commit 00f82f1c46
17 changed files with 1050 additions and 961 deletions

View File

@@ -4397,7 +4397,7 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func: *Fn) SemaError!void {
if (no_bin_file and !dump_air and !dump_llvm_ir) return;
log.debug("analyze liveness of {s}", .{decl.name});
var liveness = try Liveness.analyze(gpa, air);
var liveness = try Liveness.analyze(gpa, air, &mod.intern_pool);
defer liveness.deinit(gpa);
if (dump_air) {
@@ -4414,6 +4414,7 @@ pub fn ensureFuncBodyAnalyzed(mod: *Module, func: *Fn) SemaError!void {
.gpa = gpa,
.air = air,
.liveness = liveness,
.intern_pool = &mod.intern_pool,
};
defer verify.deinit();