diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-07-14 17:32:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-14 17:32:51 -0700 |
| commit | d404d8a3637bc30dffc736e5fa1a68b8af0e19cb (patch) | |
| tree | 2f668bf2a185fe788fa20753ae6d8462778c4204 /src/Zcu.zig | |
| parent | 464537db62e1d4ca6bc1357135b0f6c451e48c17 (diff) | |
| parent | ad55fb7a209e1b9d41b8d4f1d3e48211ff20d2f9 (diff) | |
| download | zig-d404d8a3637bc30dffc736e5fa1a68b8af0e19cb.tar.gz zig-d404d8a3637bc30dffc736e5fa1a68b8af0e19cb.zip | |
Merge pull request #20593 from jacobly0/more-races
InternPool: fix more races
Diffstat (limited to 'src/Zcu.zig')
| -rw-r--r-- | src/Zcu.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Zcu.zig b/src/Zcu.zig index 6a9812d736..15f418c6fe 100644 --- a/src/Zcu.zig +++ b/src/Zcu.zig @@ -2968,7 +2968,7 @@ pub fn ensureFuncBodyAnalysisQueued(mod: *Module, func_index: InternPool.Index) const is_outdated = mod.outdated.contains(func_as_depender) or mod.potentially_outdated.contains(func_as_depender); - switch (func.analysis(ip).state) { + switch (func.analysisUnordered(ip).state) { .none => {}, .queued => return, // As above, we don't need to forward errors here. @@ -2983,13 +2983,13 @@ pub fn ensureFuncBodyAnalysisQueued(mod: *Module, func_index: InternPool.Index) // Decl itself is safely analyzed, and body analysis is not yet queued - try mod.comp.work_queue.writeItem(.{ .analyze_func = func_index }); + try mod.comp.queueJob(.{ .analyze_func = func_index }); if (mod.emit_h != null) { // TODO: we ideally only want to do this if the function's type changed // since the last update - try mod.comp.work_queue.writeItem(.{ .emit_h_decl = decl_index }); + try mod.comp.queueJob(.{ .emit_h_decl = decl_index }); } - func.analysis(ip).state = .queued; + func.setAnalysisState(ip, .queued); } pub const SemaDeclResult = packed struct { |
