aboutsummaryrefslogtreecommitdiff
path: root/src/Zcu/PerThread.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-04 23:51:45 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-05 09:56:02 -0700
commit196e36bbb27b0f0ebd7cd7a866b85f477b3662fb (patch)
tree04efce99fc296278385acbd0a27acdb52d916358 /src/Zcu/PerThread.zig
parentc47ec4f3d7a6bf79be3adcffa33aa51bcc26ed0b (diff)
downloadzig-196e36bbb27b0f0ebd7cd7a866b85f477b3662fb.tar.gz
zig-196e36bbb27b0f0ebd7cd7a866b85f477b3662fb.zip
std: remove BoundedArray
This use case is handled by ArrayListUnmanaged via the "...Bounded" method variants, and it's more optimal to share machine code, versus generating multiple versions of each function for differing array lengths.
Diffstat (limited to 'src/Zcu/PerThread.zig')
-rw-r--r--src/Zcu/PerThread.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig
index de4be438f5..79ad9f14e9 100644
--- a/src/Zcu/PerThread.zig
+++ b/src/Zcu/PerThread.zig
@@ -2116,8 +2116,9 @@ pub fn computeAliveFiles(pt: Zcu.PerThread) Allocator.Error!bool {
// multi-threaded environment (where things like file indices could differ between compiler runs).
// The roots of our file liveness analysis will be the analysis roots.
- try zcu.alive_files.ensureTotalCapacity(gpa, zcu.analysis_roots.len);
- for (zcu.analysis_roots.slice()) |mod| {
+ const analysis_roots = zcu.analysisRoots();
+ try zcu.alive_files.ensureTotalCapacity(gpa, analysis_roots.len);
+ for (analysis_roots) |mod| {
const file_index = zcu.module_roots.get(mod).?.unwrap() orelse continue;
const file = zcu.fileByIndex(file_index);