| ... | @@ -3779,7 +3779,7 @@ fn performAllTheWorkInner( | ... | @@ -3779,7 +3779,7 @@ fn performAllTheWorkInner( |
| 3779 | // will be needed by the worker threads. | 3779 | // will be needed by the worker threads. |
| 3780 | const path_digest = zcu.filePathDigest(file_index); | 3780 | const path_digest = zcu.filePathDigest(file_index); |
| 3781 | const file = zcu.fileByIndex(file_index); | 3781 | const file = zcu.fileByIndex(file_index); |
| 3782 | comp.thread_pool.spawnWgId(&astgen_wait_group, workerAstGenFile, .{ | 3782 | comp.thread_pool.spawnWgId(&astgen_wait_group, workerUpdateFile, .{ |
| 3783 | comp, file, file_index, path_digest, zir_prog_node, &astgen_wait_group, .root, | 3783 | comp, file, file_index, path_digest, zir_prog_node, &astgen_wait_group, .root, |
| 3784 | }); | 3784 | }); |
| 3785 | } | 3785 | } |
| ... | @@ -3787,7 +3787,7 @@ fn performAllTheWorkInner( | ... | @@ -3787,7 +3787,7 @@ fn performAllTheWorkInner( |
| 3787 | | 3787 | |
| 3788 | for (0.., zcu.embed_table.values()) |ef_index_usize, ef| { | 3788 | for (0.., zcu.embed_table.values()) |ef_index_usize, ef| { |
| 3789 | const ef_index: Zcu.EmbedFile.Index = @enumFromInt(ef_index_usize); | 3789 | const ef_index: Zcu.EmbedFile.Index = @enumFromInt(ef_index_usize); |
| 3790 | comp.thread_pool.spawnWgId(&astgen_wait_group, workerCheckEmbedFile, .{ | 3790 | comp.thread_pool.spawnWgId(&astgen_wait_group, workerUpdateEmbedFile, .{ |
| 3791 | comp, ef_index, ef, | 3791 | comp, ef_index, ef, |
| 3792 | }); | 3792 | }); |
| 3793 | } | 3793 | } |
| ... | @@ -4280,7 +4280,7 @@ fn workerDocsWasmFallible(comp: *Compilation, prog_node: std.Progress.Node) anye | ... | @@ -4280,7 +4280,7 @@ fn workerDocsWasmFallible(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 4280 | }; | 4280 | }; |
| 4281 | } | 4281 | } |
| 4282 | | 4282 | |
| 4283 | fn workerAstGenFile( | 4283 | fn workerUpdateFile( |
| 4284 | tid: usize, | 4284 | tid: usize, |
| 4285 | comp: *Compilation, | 4285 | comp: *Compilation, |
| 4286 | file: *Zcu.File, | 4286 | file: *Zcu.File, |
| ... | @@ -4296,7 +4296,7 @@ fn workerAstGenFile( | ... | @@ -4296,7 +4296,7 @@ fn workerAstGenFile( |
| 4296 | | 4296 | |
| 4297 | const pt: Zcu.PerThread = .activate(comp.zcu.?, @enumFromInt(tid)); | 4297 | const pt: Zcu.PerThread = .activate(comp.zcu.?, @enumFromInt(tid)); |
| 4298 | defer pt.deactivate(); | 4298 | defer pt.deactivate(); |
| 4299 | pt.astGenFile(file, path_digest) catch |err| switch (err) { | 4299 | pt.updateFile(file, path_digest) catch |err| switch (err) { |
| 4300 | error.AnalysisFail => return, | 4300 | error.AnalysisFail => return, |
| 4301 | else => { | 4301 | else => { |
| 4302 | pt.reportRetryableAstGenError(src, file_index, err) catch |oom| switch (oom) { | 4302 | pt.reportRetryableAstGenError(src, file_index, err) catch |oom| switch (oom) { |
| ... | @@ -4352,7 +4352,7 @@ fn workerAstGenFile( | ... | @@ -4352,7 +4352,7 @@ fn workerAstGenFile( |
| 4352 | .importing_file = file_index, | 4352 | .importing_file = file_index, |
| 4353 | .import_tok = item.data.token, | 4353 | .import_tok = item.data.token, |
| 4354 | } }; | 4354 | } }; |
| 4355 | comp.thread_pool.spawnWgId(wg, workerAstGenFile, .{ | 4355 | comp.thread_pool.spawnWgId(wg, workerUpdateFile, .{ |
| 4356 | comp, import_result.file, import_result.file_index, imported_path_digest, prog_node, wg, sub_src, | 4356 | comp, import_result.file, import_result.file_index, imported_path_digest, prog_node, wg, sub_src, |
| 4357 | }); | 4357 | }); |
| 4358 | } | 4358 | } |
| ... | @@ -4375,7 +4375,7 @@ fn workerUpdateBuiltinZigFile( | ... | @@ -4375,7 +4375,7 @@ fn workerUpdateBuiltinZigFile( |
| 4375 | }; | 4375 | }; |
| 4376 | } | 4376 | } |
| 4377 | | 4377 | |
| 4378 | fn workerCheckEmbedFile(tid: usize, comp: *Compilation, ef_index: Zcu.EmbedFile.Index, ef: *Zcu.EmbedFile) void { | 4378 | fn workerUpdateEmbedFile(tid: usize, comp: *Compilation, ef_index: Zcu.EmbedFile.Index, ef: *Zcu.EmbedFile) void { |
| 4379 | comp.detectEmbedFileUpdate(@enumFromInt(tid), ef_index, ef) catch |err| switch (err) { | 4379 | comp.detectEmbedFileUpdate(@enumFromInt(tid), ef_index, ef) catch |err| switch (err) { |
| 4380 | error.OutOfMemory => { | 4380 | error.OutOfMemory => { |
| 4381 | comp.mutex.lock(); | 4381 | comp.mutex.lock(); |