authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-12-24 21:51:11-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-01 17:51:21-07:00
log98dd4f7847c0d50c3367a3bf12a80d5bf7b1fed2
tree56f48736f2245f42f727c921d4fa024757f5bd41
parent4f8a44cd0f636f3ffe008b2cedafa1e51a4a3796

frontend: skip astgen for builtin.zig

since it's already done ahead of time and always unchanging

2 files changed, 5 insertions(+), 4 deletions(-)

src/Compilation.zig+3-4
......@@ -2131,11 +2131,10 @@ pub fn update(comp: *Compilation, main_progress_node: *std.Progress.Node) !void
21312131 // Put a work item in for every known source file to detect if
21322132 // it changed, and, if so, re-compute ZIR and then queue the job
21332133 // to update it.
2134 // We still want AstGen work items for stage1 so that we expose compile errors
2135 // that are implemented in stage2 but not stage1.
21362134 try comp.astgen_work_queue.ensureUnusedCapacity(module.import_table.count());
2137 for (module.import_table.values()) |value| {
2138 comp.astgen_work_queue.writeItemAssumeCapacity(value);
2135 for (module.import_table.values()) |file| {
2136 if (file.mod.isBuiltin()) continue;
2137 comp.astgen_work_queue.writeItemAssumeCapacity(file);
21392138 }
21402139
21412140 // Put a work item in for checking if any files used with `@embedFile` changed.
src/Module.zig+2
......@@ -2637,6 +2637,8 @@ comptime {
26372637}
26382638
26392639pub fn astGenFile(mod: *Module, file: *File) !void {
2640 assert(!file.mod.isBuiltin());
2641
26402642 const tracy = trace(@src());
26412643 defer tracy.end();
26422644