mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
stage2: hook up Sema to the progress bar
This commit is contained in:
1 parent
b45c6c757c
commit
87179d91a7
2 files changed
+49
-53
No files matched your search
@@ -42,6 +42,7 @@ root_pkg: *Package,
|
||||
/// Normally, `main_pkg` and `root_pkg` are the same. The exception is `zig test`, in which
|
||||
/// `root_pkg` is the test runner, and `main_pkg` is the user's source file which has the tests.
|
||||
main_pkg: *Package,
|
||||
sema_prog_node: std.Progress.Node = undefined,
|
||||
|
||||
/// Used by AstGen worker to load and store ZIR cache.
|
||||
global_zir_cache: Compilation.Directory,
|
||||
@@ -3517,6 +3518,10 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl: *Decl) SemaError!void {
|
||||
.unreferenced => false,
|
||||
};
|
||||
|
||||
var decl_prog_node = mod.sema_prog_node.start(mem.sliceTo(decl.name, 0), 0);
|
||||
decl_prog_node.activate();
|
||||
defer decl_prog_node.end();
|
||||
|
||||
const type_changed = mod.semaDecl(decl) catch |err| switch (err) {
|
||||
error.AnalysisFail => {
|
||||
if (decl.analysis == .in_progress) {
|
||||
|
||||
Reference in new issue
Block a user