authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-21 13:25:48-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-21 17:03:03-07:00
logf203334878d854c17c00c0447c748d9ea5e491e5
tree07b1ff3bac4a1efa824b5ebda338a07b93730fbb
parenta51ff3a9033d6befabdd3d80374f6bf2a6bbb62e

stage2: wire up AstGen to the progress bar


2 files changed, 6 insertions(+), 3 deletions(-)

src/Compilation.zig+5-1
...@@ -2283,8 +2283,12 @@ fn workerAstGenFile(...@@ -2283,8 +2283,12 @@ fn workerAstGenFile(
2283) void {2283) void {
2284 defer wg.finish();2284 defer wg.finish();
22852285
2286 var child_prog_node = prog_node.start(file.sub_file_path, 0);
2287 child_prog_node.activate();
2288 defer child_prog_node.end();
2289
2286 const mod = comp.bin_file.options.module.?;2290 const mod = comp.bin_file.options.module.?;
2287 mod.astGenFile(file, prog_node) catch |err| switch (err) {2291 mod.astGenFile(file) catch |err| switch (err) {
2288 error.AnalysisFail => return,2292 error.AnalysisFail => return,
2289 else => {2293 else => {
2290 file.status = .retryable_failure;2294 file.status = .retryable_failure;
src/Module.zig+1-2
...@@ -2211,8 +2211,7 @@ comptime {...@@ -2211,8 +2211,7 @@ comptime {
2211 }2211 }
2212}2212}
22132213
2214pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node) !void {2214pub fn astGenFile(mod: *Module, file: *Scope.File) !void {
2215 _ = prog_node;
2216 const tracy = trace(@src());2215 const tracy = trace(@src());
2217 defer tracy.end();2216 defer tracy.end();
22182217