authorgravatar for 106487517+bnjmnjrk@users.noreply.github.comBenjamin Jurk <106487517+bnjmnjrk@users.noreply.github.com> 2025-11-20 23:46:23+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-11-20 14:46:23-08:00
log4b5351bc0ddc248d6935d7d160a57cb4dfe4dedd
tree8ce84d4e44a8ee1abaf0ef71d8287cec4b0f8c0a
parentdb622f14c445b4f55981636543c546e22346abd5
signaturebadge-check Signed by PGP key B5690EEEBB952194

update deprecated ArrayListUnmanaged usage (#25958)


112 files changed, 630 insertions(+), 631 deletions(-)

doc/langref/test_switch_dispatch_loop.zig+1-1
......@@ -9,7 +9,7 @@ const Instruction = enum {
99
1010fn evaluate(initial_stack: []const i32, code: []const Instruction) !i32 {
1111 var buffer: [8]i32 = undefined;
12 var stack = std.ArrayListUnmanaged(i32).initBuffer(&buffer);
12 var stack = std.ArrayList(i32).initBuffer(&buffer);
1313 try stack.appendSliceBounded(initial_stack);
1414 var ip: usize = 0;
1515
lib/build-web/fuzz.zig+9-9
......@@ -42,7 +42,7 @@ pub fn sourceIndexMessage(msg_bytes: []u8) error{OutOfMemory}!void {
4242
4343var coverage = Coverage.init;
4444/// Index of type `SourceLocationIndex`.
45var coverage_source_locations: std.ArrayListUnmanaged(Coverage.SourceLocation) = .empty;
45var coverage_source_locations: std.ArrayList(Coverage.SourceLocation) = .empty;
4646/// Contains the most recent coverage update message, unmodified.
4747var recent_coverage_update: std.ArrayListAlignedUnmanaged(u8, .of(u64)) = .empty;
4848
......@@ -76,7 +76,7 @@ pub fn coverageUpdateMessage(msg_bytes: []u8) error{OutOfMemory}!void {
7676 try updateCoverage();
7777}
7878
79var entry_points: std.ArrayListUnmanaged(SourceLocationIndex) = .empty;
79var entry_points: std.ArrayList(SourceLocationIndex) = .empty;
8080
8181pub fn entryPointsMessage(msg_bytes: []u8) error{OutOfMemory}!void {
8282 const header: abi.fuzz.EntryPointHeader = @bitCast(msg_bytes[0..@sizeOf(abi.fuzz.EntryPointHeader)].*);
......@@ -127,7 +127,7 @@ const SourceLocationIndex = enum(u32) {
127127 }
128128
129129 fn toWalkFile(sli: SourceLocationIndex) ?Walk.File.Index {
130 var buf: std.ArrayListUnmanaged(u8) = .empty;
130 var buf: std.ArrayList(u8) = .empty;
131131 defer buf.deinit(gpa);
132132 sli.appendPath(&buf) catch @panic("OOM");
133133 return @enumFromInt(Walk.files.getIndex(buf.items) orelse return null);
......@@ -135,11 +135,11 @@ const SourceLocationIndex = enum(u32) {
135135
136136 fn fileHtml(
137137 sli: SourceLocationIndex,
138 out: *std.ArrayListUnmanaged(u8),
138 out: *std.ArrayList(u8),
139139 ) error{ OutOfMemory, SourceUnavailable }!void {
140140 const walk_file_index = sli.toWalkFile() orelse return error.SourceUnavailable;
141141 const root_node = walk_file_index.findRootDecl().get().ast_node;
142 var annotations: std.ArrayListUnmanaged(html_render.Annotation) = .empty;
142 var annotations: std.ArrayList(html_render.Annotation) = .empty;
143143 defer annotations.deinit(gpa);
144144 try computeSourceAnnotations(sli.ptr().file, walk_file_index, &annotations, coverage_source_locations.items);
145145 html_render.fileSourceHtml(walk_file_index, out, root_node, .{
......@@ -153,13 +153,13 @@ const SourceLocationIndex = enum(u32) {
153153fn computeSourceAnnotations(
154154 cov_file_index: Coverage.File.Index,
155155 walk_file_index: Walk.File.Index,
156 annotations: *std.ArrayListUnmanaged(html_render.Annotation),
156 annotations: *std.ArrayList(html_render.Annotation),
157157 source_locations: []const Coverage.SourceLocation,
158158) !void {
159159 // Collect all the source locations from only this file into this array
160160 // first, then sort by line, col, so that we can collect annotations with
161161 // O(N) time complexity.
162 var locs: std.ArrayListUnmanaged(SourceLocationIndex) = .empty;
162 var locs: std.ArrayList(SourceLocationIndex) = .empty;
163163 defer locs.deinit(gpa);
164164
165165 for (source_locations, 0..) |sl, sli_usize| {
......@@ -309,7 +309,7 @@ fn updateCoverage() error{OutOfMemory}!void {
309309 if (recent_coverage_update.items.len == 0) return;
310310 const want_file = (selected_source_location orelse return).ptr().file;
311311
312 var covered: std.ArrayListUnmanaged(SourceLocationIndex) = .empty;
312 var covered: std.ArrayList(SourceLocationIndex) = .empty;
313313 defer covered.deinit(gpa);
314314
315315 // This code assumes 64-bit elements, which is incorrect if the executable
......@@ -340,7 +340,7 @@ fn updateCoverage() error{OutOfMemory}!void {
340340fn updateSource() error{OutOfMemory}!void {
341341 if (recent_coverage_update.items.len == 0) return;
342342 const file_sli = selected_source_location.?;
343 var html: std.ArrayListUnmanaged(u8) = .empty;
343 var html: std.ArrayList(u8) = .empty;
344344 defer html.deinit(gpa);
345345 file_sli.fileHtml(&html) catch |err| switch (err) {
346346 error.OutOfMemory => |e| return e,
lib/build-web/time_report.zig+1-1
......@@ -254,7 +254,7 @@ pub fn runTestResultMessage(msg_bytes: []u8) error{OutOfMemory}!void {
254254 const durations: []align(1) const u64 = @ptrCast(trailing[0 .. hdr.tests_len * 8]);
255255 var offset: usize = hdr.tests_len * 8;
256256
257 var table_html: std.ArrayListUnmanaged(u8) = .empty;
257 var table_html: std.ArrayList(u8) = .empty;
258258 defer table_html.deinit(gpa);
259259
260260 for (durations) |test_ns| {
lib/compiler/build_runner.zig+3-3
......@@ -459,7 +459,7 @@ pub fn main() !void {
459459 }
460460
461461 if (graph.needed_lazy_dependencies.entries.len != 0) {
462 var buffer: std.ArrayListUnmanaged(u8) = .empty;
462 var buffer: std.ArrayList(u8) = .empty;
463463 for (graph.needed_lazy_dependencies.keys()) |k| {
464464 try buffer.appendSlice(arena, k);
465465 try buffer.append(arena, '\n');
......@@ -672,7 +672,7 @@ const Run = struct {
672672 watch: bool,
673673 web_server: if (!builtin.single_threaded) ?WebServer else ?noreturn,
674674 /// Allocated into `gpa`.
675 memory_blocked_steps: std.ArrayListUnmanaged(*Step),
675 memory_blocked_steps: std.ArrayList(*Step),
676676 /// Allocated into `gpa`.
677677 step_stack: std.AutoArrayHashMapUnmanaged(*Step, void),
678678 thread_pool: std.Thread.Pool,
......@@ -1468,7 +1468,7 @@ pub fn printErrorMessages(
14681468 if (error_style.verboseContext()) {
14691469 // Provide context for where these error messages are coming from by
14701470 // printing the corresponding Step subtree.
1471 var step_stack: std.ArrayListUnmanaged(*Step) = .empty;
1471 var step_stack: std.ArrayList(*Step) = .empty;
14721472 defer step_stack.deinit(gpa);
14731473 try step_stack.append(gpa, failing_step);
14741474 while (step_stack.items[step_stack.items.len - 1].dependants.items.len != 0) {
lib/compiler/objcopy.zig+2-2
......@@ -381,8 +381,8 @@ const BinaryElfSegment = struct {
381381};
382382
383383const BinaryElfOutput = struct {
384 segments: std.ArrayListUnmanaged(*BinaryElfSegment),
385 sections: std.ArrayListUnmanaged(*BinaryElfSection),
384 segments: std.ArrayList(*BinaryElfSegment),
385 sections: std.ArrayList(*BinaryElfSection),
386386 allocator: Allocator,
387387 shstrtab: ?[]const u8,
388388
lib/compiler/reduce.zig+1-1
......@@ -109,7 +109,7 @@ pub fn main() !void {
109109 const root_source_file_path = opt_root_source_file_path orelse
110110 fatal("missing root source file path argument; see -h for usage", .{});
111111
112 var interestingness_argv: std.ArrayListUnmanaged([]const u8) = .empty;
112 var interestingness_argv: std.ArrayList([]const u8) = .empty;
113113 try interestingness_argv.ensureUnusedCapacity(arena, argv.len + 1);
114114 interestingness_argv.appendAssumeCapacity(checker_path);
115115 interestingness_argv.appendSliceAssumeCapacity(argv);
lib/compiler/reduce/Walk.zig+1-1
......@@ -23,7 +23,7 @@ pub const Transformation = union(enum) {
2323 delete_var_decl: struct {
2424 var_decl_node: Ast.Node.Index,
2525 /// Identifier nodes that reference the variable.
26 references: std.ArrayListUnmanaged(Ast.Node.Index),
26 references: std.ArrayList(Ast.Node.Index),
2727 },
2828 /// Replace an expression with `undefined`.
2929 replace_with_undef: Ast.Node.Index,
lib/compiler/std-docs.zig+1-1
......@@ -284,7 +284,7 @@ fn buildWasmBinary(
284284) !Cache.Path {
285285 const gpa = context.gpa;
286286
287 var argv: std.ArrayListUnmanaged([]const u8) = .empty;
287 var argv: std.ArrayList([]const u8) = .empty;
288288
289289 try argv.appendSlice(arena, &.{
290290 context.zig_exe_path, //
lib/compiler/test_runner.zig+1-1
......@@ -104,7 +104,7 @@ fn mainServer() !void {
104104 @panic("internal test runner memory leak");
105105 };
106106
107 var string_bytes: std.ArrayListUnmanaged(u8) = .empty;
107 var string_bytes: std.ArrayList(u8) = .empty;
108108 defer string_bytes.deinit(testing.allocator);
109109 try string_bytes.append(testing.allocator, 0); // Reserve 0 for null.
110110
lib/docs/wasm/Walk.zig+1-1
......@@ -11,7 +11,7 @@ const Oom = error{OutOfMemory};
1111pub const Decl = @import("Decl.zig");
1212
1313pub var files: std.StringArrayHashMapUnmanaged(File) = .empty;
14pub var decls: std.ArrayListUnmanaged(Decl) = .empty;
14pub var decls: std.ArrayList(Decl) = .empty;
1515pub var modules: std.StringArrayHashMapUnmanaged(File.Index) = .empty;
1616
1717file: File.Index,
lib/docs/wasm/markdown/Parser.zig+1-1
......@@ -29,7 +29,7 @@ const Node = Document.Node;
2929const ExtraIndex = Document.ExtraIndex;
3030const ExtraData = Document.ExtraData;
3131const StringIndex = Document.StringIndex;
32const ArrayList = std.ArrayListUnmanaged;
32const ArrayList = std.ArrayList;
3333
3434nodes: Node.List = .{},
3535extra: ArrayList(u32) = .empty,
lib/fuzzer.zig+7-7
......@@ -280,10 +280,10 @@ const Instrumentation = struct {
280280 /// Values that have been constant operands in comparisons and switch cases.
281281 /// There may be duplicates in this array if they came from different addresses, which is
282282 /// fine as they are likely more important and hence more likely to be selected.
283 const_vals2: std.ArrayListUnmanaged(u16) = .empty,
284 const_vals4: std.ArrayListUnmanaged(u32) = .empty,
285 const_vals8: std.ArrayListUnmanaged(u64) = .empty,
286 const_vals16: std.ArrayListUnmanaged(u128) = .empty,
283 const_vals2: std.ArrayList(u16) = .empty,
284 const_vals4: std.ArrayList(u32) = .empty,
285 const_vals8: std.ArrayList(u64) = .empty,
286 const_vals16: std.ArrayList(u128) = .empty,
287287
288288 /// A minimal state for this struct which instrumentation can function on.
289289 /// Used before this structure is initialized to avoid illegal behavior
......@@ -384,11 +384,11 @@ const Fuzzer = struct {
384384 /// Minimized past inputs leading to new pc hits.
385385 /// These are randomly mutated in round-robin fashion
386386 /// Element zero is always an empty input. It is gauraunteed no other elements are empty.
387 corpus: std.ArrayListUnmanaged([]const u8),
387 corpus: std.ArrayList([]const u8),
388388 corpus_pos: usize,
389389 /// List of past mutations that have led to new inputs. This way, the mutations that are the
390390 /// most effective are the most likely to be selected again. Starts with one of each mutation.
391 mutations: std.ArrayListUnmanaged(Mutation) = .empty,
391 mutations: std.ArrayList(Mutation) = .empty,
392392
393393 /// Filesystem directory containing found inputs for future runs
394394 corpus_dir: std.fs.Dir,
......@@ -1308,7 +1308,7 @@ const Mutation = enum {
13081308 }
13091309};
13101310
1311/// Like `std.ArrayListUnmanaged(u8)` but backed by memory mapping.
1311/// Like `std.ArrayList(u8)` but backed by memory mapping.
13121312pub const MemoryMappedList = struct {
13131313 /// Contents of the list.
13141314 ///
lib/std/Build/Cache.zig+3-3
......@@ -1063,10 +1063,10 @@ pub const Manifest = struct {
10631063 const dep_file_contents = try dir.readFileAlloc(dep_file_sub_path, gpa, .limited(manifest_file_size_max));
10641064 defer gpa.free(dep_file_contents);
10651065
1066 var error_buf: std.ArrayListUnmanaged(u8) = .empty;
1066 var error_buf: std.ArrayList(u8) = .empty;
10671067 defer error_buf.deinit(gpa);
10681068
1069 var resolve_buf: std.ArrayListUnmanaged(u8) = .empty;
1069 var resolve_buf: std.ArrayList(u8) = .empty;
10701070 defer resolve_buf.deinit(gpa);
10711071
10721072 var it: DepTokenizer = .{ .bytes = dep_file_contents };
......@@ -1217,7 +1217,7 @@ pub const Manifest = struct {
12171217 self.files.deinit(self.cache.gpa);
12181218 }
12191219
1220 pub fn populateFileSystemInputs(man: *Manifest, buf: *std.ArrayListUnmanaged(u8)) Allocator.Error!void {
1220 pub fn populateFileSystemInputs(man: *Manifest, buf: *std.ArrayList(u8)) Allocator.Error!void {
12211221 assert(@typeInfo(std.zig.Server.Message.PathPrefix).@"enum".fields.len == man.cache.prefixes_len);
12221222 buf.clearRetainingCapacity();
12231223 const gpa = man.cache.gpa;
lib/std/Build/Cache/DepTokenizer.zig+6-6
......@@ -363,7 +363,7 @@ pub const Token = union(enum) {
363363 };
364364
365365 /// Resolve escapes in target or prereq. Only valid with .target_must_resolve or .prereq_must_resolve.
366 pub fn resolve(self: Token, gpa: Allocator, list: *std.ArrayListUnmanaged(u8)) error{OutOfMemory}!void {
366 pub fn resolve(self: Token, gpa: Allocator, list: *std.ArrayList(u8)) error{OutOfMemory}!void {
367367 switch (self) {
368368 .target_must_resolve => |bytes| {
369369 var state: enum { start, escape, dollar } = .start;
......@@ -429,7 +429,7 @@ pub const Token = union(enum) {
429429 }
430430 }
431431
432 pub fn printError(self: Token, gpa: Allocator, list: *std.ArrayListUnmanaged(u8)) error{OutOfMemory}!void {
432 pub fn printError(self: Token, gpa: Allocator, list: *std.ArrayList(u8)) error{OutOfMemory}!void {
433433 switch (self) {
434434 .target, .target_must_resolve, .prereq, .prereq_must_resolve => unreachable, // not an error
435435 .incomplete_quoted_prerequisite,
......@@ -1027,8 +1027,8 @@ fn depTokenizer(input: []const u8, expect: []const u8) !void {
10271027 defer arena_allocator.deinit();
10281028
10291029 var it: Tokenizer = .{ .bytes = input };
1030 var buffer: std.ArrayListUnmanaged(u8) = .empty;
1031 var resolve_buf: std.ArrayListUnmanaged(u8) = .empty;
1030 var buffer: std.ArrayList(u8) = .empty;
1031 var resolve_buf: std.ArrayList(u8) = .empty;
10321032 var i: usize = 0;
10331033 while (it.next()) |token| {
10341034 if (i != 0) try buffer.appendSlice(arena, "\n");
......@@ -1076,11 +1076,11 @@ fn depTokenizer(input: []const u8, expect: []const u8) !void {
10761076 try testing.expectEqualStrings(expect, buffer.items);
10771077}
10781078
1079fn printCharValues(gpa: Allocator, list: *std.ArrayListUnmanaged(u8), bytes: []const u8) !void {
1079fn printCharValues(gpa: Allocator, list: *std.ArrayList(u8), bytes: []const u8) !void {
10801080 for (bytes) |b| try list.append(gpa, printable_char_tab[b]);
10811081}
10821082
1083fn printUnderstandableChar(gpa: Allocator, list: *std.ArrayListUnmanaged(u8), char: u8) !void {
1083fn printUnderstandableChar(gpa: Allocator, list: *std.ArrayList(u8), char: u8) !void {
10841084 if (std.ascii.isPrint(char)) {
10851085 try list.print(gpa, "'{c}'", .{char});
10861086 } else {
lib/std/Build/Fuzz.zig+3-3
......@@ -33,7 +33,7 @@ coverage_files: std.AutoArrayHashMapUnmanaged(u64, CoverageMap),
3333
3434queue_mutex: std.Thread.Mutex,
3535queue_cond: std.Thread.Condition,
36msg_queue: std.ArrayListUnmanaged(Msg),
36msg_queue: std.ArrayList(Msg),
3737
3838pub const Mode = union(enum) {
3939 forever: struct { ws: *Build.WebServer },
......@@ -65,7 +65,7 @@ const CoverageMap = struct {
6565 coverage: Coverage,
6666 source_locations: []Coverage.SourceLocation,
6767 /// Elements are indexes into `source_locations` pointing to the unit tests that are being fuzz tested.
68 entry_points: std.ArrayListUnmanaged(u32),
68 entry_points: std.ArrayList(u32),
6969 start_timestamp: i64,
7070
7171 fn deinit(cm: *CoverageMap, gpa: Allocator) void {
......@@ -85,7 +85,7 @@ pub fn init(
8585 mode: Mode,
8686) Allocator.Error!Fuzz {
8787 const run_steps: []const *Step.Run = steps: {
88 var steps: std.ArrayListUnmanaged(*Step.Run) = .empty;
88 var steps: std.ArrayList(*Step.Run) = .empty;
8989 defer steps.deinit(gpa);
9090 const rebuild_node = root_prog_node.start("Rebuilding Unit Tests", 0);
9191 defer rebuild_node.end();
lib/std/Build/Step/CheckObject.zig+8-8
......@@ -721,12 +721,12 @@ const MachODumper = struct {
721721 gpa: Allocator,
722722 data: []const u8,
723723 header: macho.mach_header_64,
724 segments: std.ArrayListUnmanaged(macho.segment_command_64) = .empty,
725 sections: std.ArrayListUnmanaged(macho.section_64) = .empty,
726 symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty,
727 strtab: std.ArrayListUnmanaged(u8) = .empty,
728 indsymtab: std.ArrayListUnmanaged(u32) = .empty,
729 imports: std.ArrayListUnmanaged([]const u8) = .empty,
724 segments: std.ArrayList(macho.segment_command_64) = .empty,
725 sections: std.ArrayList(macho.section_64) = .empty,
726 symtab: std.ArrayList(macho.nlist_64) = .empty,
727 strtab: std.ArrayList(u8) = .empty,
728 indsymtab: std.ArrayList(u32) = .empty,
729 imports: std.ArrayList([]const u8) = .empty,
730730
731731 fn parse(ctx: *ObjectContext) !void {
732732 var it = try ctx.getLoadCommandIterator();
......@@ -1767,9 +1767,9 @@ const ElfDumper = struct {
17671767 const ArchiveContext = struct {
17681768 gpa: Allocator,
17691769 data: []const u8,
1770 symtab: std.ArrayListUnmanaged(ArSymtabEntry) = .empty,
1770 symtab: std.ArrayList(ArSymtabEntry) = .empty,
17711771 strtab: []const u8,
1772 objects: std.ArrayListUnmanaged(struct { name: []const u8, off: usize, len: usize }) = .empty,
1772 objects: std.ArrayList(struct { name: []const u8, off: usize, len: usize }) = .empty,
17731773
17741774 fn parseSymtab(ctx: *ArchiveContext, raw: []const u8, ptr_width: enum { p32, p64 }) !void {
17751775 var reader: std.Io.Reader = .fixed(raw);
lib/std/Build/Step/Compile.zig+2-2
......@@ -1801,7 +1801,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 {
18011801 for (arg, 0..) |c, arg_idx| {
18021802 if (c == '\\' or c == '"') {
18031803 // Slow path for arguments that need to be escaped. We'll need to allocate and copy
1804 var escaped: std.ArrayListUnmanaged(u8) = .empty;
1804 var escaped: std.ArrayList(u8) = .empty;
18051805 try escaped.ensureTotalCapacityPrecise(arena, arg.len + 1);
18061806 try escaped.appendSlice(arena, arg[0..arg_idx]);
18071807 for (arg[arg_idx..]) |to_escape| {
......@@ -2035,7 +2035,7 @@ fn checkCompileErrors(compile: *Compile) !void {
20352035 };
20362036
20372037 // Render the expected lines into a string that we can compare verbatim.
2038 var expected_generated: std.ArrayListUnmanaged(u8) = .empty;
2038 var expected_generated: std.ArrayList(u8) = .empty;
20392039 const expect_errors = compile.expect_errors.?;
20402040
20412041 var actual_line_it = mem.splitScalar(u8, actual_errors, '\n');
lib/std/Build/Step/Fmt.zig+1-1
......@@ -48,7 +48,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
4848 const arena = b.allocator;
4949 const fmt: *Fmt = @fieldParentPtr("step", step);
5050
51 var argv: std.ArrayListUnmanaged([]const u8) = .empty;
51 var argv: std.ArrayList([]const u8) = .empty;
5252 try argv.ensureUnusedCapacity(arena, 2 + 1 + fmt.paths.len + 2 * fmt.exclude_paths.len);
5353
5454 argv.appendAssumeCapacity(b.graph.zig_exe);
lib/std/Build/Step/ObjCopy.zig-1
......@@ -3,7 +3,6 @@ const ObjCopy = @This();
33
44const Allocator = std.mem.Allocator;
55const ArenaAllocator = std.heap.ArenaAllocator;
6const ArrayListUnmanaged = std.ArrayListUnmanaged;
76const File = std.fs.File;
87const InstallDir = std.Build.InstallDir;
98const Step = std.Build.Step;
lib/std/Build/Step/Options.zig+7-7
......@@ -12,8 +12,8 @@ pub const base_id: Step.Id = .options;
1212step: Step,
1313generated_file: GeneratedFile,
1414
15contents: std.ArrayListUnmanaged(u8),
16args: std.ArrayListUnmanaged(Arg),
15contents: std.ArrayList(u8),
16args: std.ArrayList(Arg),
1717encountered_types: std.StringHashMapUnmanaged(void),
1818
1919pub fn create(owner: *std.Build) *Options {
......@@ -45,7 +45,7 @@ fn addOptionFallible(options: *Options, comptime T: type, name: []const u8, valu
4545
4646fn printType(
4747 options: *Options,
48 out: *std.ArrayListUnmanaged(u8),
48 out: *std.ArrayList(u8),
4949 comptime T: type,
5050 value: T,
5151 indent: u8,
......@@ -267,7 +267,7 @@ fn printType(
267267 }
268268}
269269
270fn printUserDefinedType(options: *Options, out: *std.ArrayListUnmanaged(u8), comptime T: type, indent: u8) !void {
270fn printUserDefinedType(options: *Options, out: *std.ArrayList(u8), comptime T: type, indent: u8) !void {
271271 switch (@typeInfo(T)) {
272272 .@"enum" => |info| {
273273 return try printEnum(options, out, T, info, indent);
......@@ -281,7 +281,7 @@ fn printUserDefinedType(options: *Options, out: *std.ArrayListUnmanaged(u8), com
281281
282282fn printEnum(
283283 options: *Options,
284 out: *std.ArrayListUnmanaged(u8),
284 out: *std.ArrayList(u8),
285285 comptime T: type,
286286 comptime val: std.builtin.Type.Enum,
287287 indent: u8,
......@@ -309,7 +309,7 @@ fn printEnum(
309309 try out.appendSlice(gpa, "};\n");
310310}
311311
312fn printStruct(options: *Options, out: *std.ArrayListUnmanaged(u8), comptime T: type, comptime val: std.builtin.Type.Struct, indent: u8) !void {
312fn printStruct(options: *Options, out: *std.ArrayList(u8), comptime T: type, comptime val: std.builtin.Type.Struct, indent: u8) !void {
313313 const gpa = options.step.owner.allocator;
314314 const gop = try options.encountered_types.getOrPut(gpa, @typeName(T));
315315 if (gop.found_existing) return;
......@@ -369,7 +369,7 @@ fn printStruct(options: *Options, out: *std.ArrayListUnmanaged(u8), comptime T:
369369
370370fn printStructValue(
371371 options: *Options,
372 out: *std.ArrayListUnmanaged(u8),
372 out: *std.ArrayList(u8),
373373 comptime struct_val: std.builtin.Type.Struct,
374374 val: anytype,
375375 indent: u8,
lib/std/Build/Step/Run.zig+4-4
......@@ -16,7 +16,7 @@ pub const base_id: Step.Id = .run;
1616step: Step,
1717
1818/// See also addArg and addArgs to modifying this directly
19argv: std.ArrayListUnmanaged(Arg),
19argv: std.ArrayList(Arg),
2020
2121/// Use `setCwd` to set the initial current working directory
2222cwd: ?Build.LazyPath,
......@@ -63,7 +63,7 @@ stdin: StdIn,
6363/// If the Run step is determined to have side-effects, the Run step is always
6464/// executed when it appears in the build graph, regardless of whether these
6565/// files have been modified.
66file_inputs: std.ArrayListUnmanaged(std.Build.LazyPath),
66file_inputs: std.ArrayList(std.Build.LazyPath),
6767
6868/// After adding an output argument, this step will by default rename itself
6969/// for a better display name in the build summary.
......@@ -104,7 +104,7 @@ has_side_effects: bool,
104104
105105/// If this is a Zig unit test binary, this tracks the indexes of the unit
106106/// tests that are also fuzz tests.
107fuzz_tests: std.ArrayListUnmanaged(u32),
107fuzz_tests: std.ArrayList(u32),
108108cached_test_metadata: ?CachedTestMetadata = null,
109109
110110/// Populated during the fuzz phase if this run step corresponds to a unit test
......@@ -139,7 +139,7 @@ pub const StdIo = union(enum) {
139139 /// conditions.
140140 /// Note that an explicit check for exit code 0 needs to be added to this
141141 /// list if such a check is desirable.
142 check: std.ArrayListUnmanaged(Check),
142 check: std.ArrayList(Check),
143143 /// This Run step is running a zig unit test binary and will communicate
144144 /// extra metadata over the IPC protocol.
145145 zig_test,
lib/std/Build/Step/UpdateSourceFiles.zig+1-1
......@@ -12,7 +12,7 @@ const fs = std.fs;
1212const ArrayList = std.ArrayList;
1313
1414step: Step,
15output_source_files: std.ArrayListUnmanaged(OutputSourceFile),
15output_source_files: std.ArrayList(OutputSourceFile),
1616
1717pub const base_id: Step.Id = .update_source_files;
1818
lib/std/Build/Step/WriteFile.zig+2-2
......@@ -11,8 +11,8 @@ const WriteFile = @This();
1111step: Step,
1212
1313// The elements here are pointers because we need stable pointers for the GeneratedFile field.
14files: std.ArrayListUnmanaged(File),
15directories: std.ArrayListUnmanaged(Directory),
14files: std.ArrayList(File),
15directories: std.ArrayList(Directory),
1616generated_directory: std.Build.GeneratedFile,
1717
1818pub const base_id: Step.Id = .write_file;
lib/std/Build/WebServer.zig+1-1
......@@ -549,7 +549,7 @@ fn buildClientWasm(ws: *WebServer, arena: Allocator, optimize: std.builtin.Optim
549549 .sub_path = "docs/wasm/html_render.zig",
550550 };
551551
552 var argv: std.ArrayListUnmanaged([]const u8) = .empty;
552 var argv: std.ArrayList([]const u8) = .empty;
553553
554554 try argv.appendSlice(arena, &.{
555555 graph.zig_exe, "build-exe", //
lib/std/Io.zig+1-1
......@@ -361,7 +361,7 @@ pub fn Poller(comptime StreamEnum: type) type {
361361 r.end = data.len;
362362 }
363363 {
364 var list: std.ArrayListUnmanaged(u8) = .{
364 var list: std.ArrayList(u8) = .{
365365 .items = r.buffer[0..r.end],
366366 .capacity = r.buffer.len,
367367 };
lib/std/Io/Threaded.zig+1-1
......@@ -22,7 +22,7 @@ mutex: std.Thread.Mutex = .{},
2222cond: std.Thread.Condition = .{},
2323run_queue: std.SinglyLinkedList = .{},
2424join_requested: bool = false,
25threads: std.ArrayListUnmanaged(std.Thread),
25threads: std.ArrayList(std.Thread),
2626stack_size: usize,
2727cpu_count: std.Thread.CpuCountError!usize,
2828concurrent_count: usize,
lib/std/array_hash_map.zig+1-1
......@@ -505,7 +505,7 @@ pub fn ArrayHashMapWithAllocator(
505505/// A hash table of keys and values, each stored sequentially.
506506///
507507/// Insertion order is preserved. In general, this data structure supports the same
508/// operations as `std.ArrayListUnmanaged`.
508/// operations as `std.ArrayList`.
509509///
510510/// Deletion operations:
511511/// * `swapRemove` - O(1)
lib/std/crypto/Certificate/Bundle.zig+1-1
......@@ -21,7 +21,7 @@ const base64 = std.base64.standard.decoderWithIgnore(" \t\r\n");
2121
2222/// The key is the contents slice of the subject.
2323map: std.HashMapUnmanaged(der.Element.Slice, u32, MapContext, std.hash_map.default_max_load_percentage) = .empty,
24bytes: std.ArrayListUnmanaged(u8) = .empty,
24bytes: std.ArrayList(u8) = .empty,
2525
2626pub const VerifyError = Certificate.Parsed.VerifyError || error{
2727 CertificateIssuerNotFound,
lib/std/debug/Coverage.zig+1-1
......@@ -21,7 +21,7 @@ directories: std.ArrayHashMapUnmanaged(String, void, String.MapContext, false),
2121///
2222/// Protected by `mutex`.
2323files: std.ArrayHashMapUnmanaged(File, void, File.MapContext, false),
24string_bytes: std.ArrayListUnmanaged(u8),
24string_bytes: std.ArrayList(u8),
2525/// Protects the other fields.
2626mutex: std.Thread.Mutex,
2727
lib/std/debug/Dwarf/expression.zig+1-1
......@@ -158,7 +158,7 @@ pub fn StackMachine(comptime options: Options) type {
158158 }
159159 };
160160
161 stack: std.ArrayListUnmanaged(Value) = .empty,
161 stack: std.ArrayList(Value) = .empty,
162162
163163 pub fn reset(self: *Self) void {
164164 self.stack.clearRetainingCapacity();
lib/std/debug/SelfInfo/Windows.zig+1-1
......@@ -1,5 +1,5 @@
11mutex: std.Thread.Mutex,
2modules: std.ArrayListUnmanaged(Module),
2modules: std.ArrayList(Module),
33module_name_arena: std.heap.ArenaAllocator.State,
44
55pub const init: SelfInfo = .{
lib/std/fs/Dir.zig+4-4
......@@ -667,8 +667,8 @@ fn iterateImpl(self: Dir, first_iter_start_value: bool) Iterator {
667667}
668668
669669pub const SelectiveWalker = struct {
670 stack: std.ArrayListUnmanaged(Walker.StackItem),
671 name_buffer: std.ArrayListUnmanaged(u8),
670 stack: std.ArrayList(Walker.StackItem),
671 name_buffer: std.ArrayList(u8),
672672 allocator: Allocator,
673673
674674 pub const Error = IteratorError || Allocator.Error;
......@@ -767,7 +767,7 @@ pub const SelectiveWalker = struct {
767767///
768768/// See also `walk`.
769769pub fn walkSelectively(self: Dir, allocator: Allocator) !SelectiveWalker {
770 var stack: std.ArrayListUnmanaged(Walker.StackItem) = .empty;
770 var stack: std.ArrayList(Walker.StackItem) = .empty;
771771
772772 try stack.append(allocator, .{
773773 .iter = self.iterate(),
......@@ -1521,7 +1521,7 @@ pub fn deleteTree(self: Dir, sub_path: []const u8) DeleteTreeError!void {
15211521 };
15221522
15231523 var stack_buffer: [16]StackItem = undefined;
1524 var stack = std.ArrayListUnmanaged(StackItem).initBuffer(&stack_buffer);
1524 var stack = std.ArrayList(StackItem).initBuffer(&stack_buffer);
15251525 defer StackItem.closeAll(stack.items);
15261526
15271527 stack.appendAssumeCapacity(.{
lib/std/fs/wasi.zig+1-1
......@@ -24,7 +24,7 @@ pub const Preopens = struct {
2424};
2525
2626pub fn preopensAlloc(gpa: Allocator) Allocator.Error!Preopens {
27 var names: std.ArrayListUnmanaged([]const u8) = .empty;
27 var names: std.ArrayList([]const u8) = .empty;
2828 defer names.deinit(gpa);
2929
3030 try names.ensureUnusedCapacity(gpa, 3);
lib/std/hash_map.zig+2-2
......@@ -91,7 +91,7 @@ pub fn hashString(s: []const u8) u64 {
9191}
9292
9393pub const StringIndexContext = struct {
94 bytes: *const std.ArrayListUnmanaged(u8),
94 bytes: *const std.ArrayList(u8),
9595
9696 pub fn eql(_: @This(), a: u32, b: u32) bool {
9797 return a == b;
......@@ -103,7 +103,7 @@ pub const StringIndexContext = struct {
103103};
104104
105105pub const StringIndexAdapter = struct {
106 bytes: *const std.ArrayListUnmanaged(u8),
106 bytes: *const std.ArrayList(u8),
107107
108108 pub fn eql(ctx: @This(), a: []const u8, b: u32) bool {
109109 return mem.eql(u8, a, mem.sliceTo(ctx.bytes.items[b..], 0));
lib/std/tar.zig+1-1
......@@ -27,7 +27,7 @@ pub const Writer = @import("tar/Writer.zig");
2727/// the errors in diagnostics to know whether the operation succeeded or failed.
2828pub const Diagnostics = struct {
2929 allocator: std.mem.Allocator,
30 errors: std.ArrayListUnmanaged(Error) = .empty,
30 errors: std.ArrayList(Error) = .empty,
3131
3232 entries: usize = 0,
3333 root_dir: []const u8 = "",
lib/std/zig/AstGen.zig+22-22
......@@ -6,7 +6,7 @@ const Ast = std.zig.Ast;
66const mem = std.mem;
77const Allocator = std.mem.Allocator;
88const assert = std.debug.assert;
9const ArrayListUnmanaged = std.ArrayListUnmanaged;
9const ArrayList = std.ArrayList;
1010const StringIndexAdapter = std.hash_map.StringIndexAdapter;
1111const StringIndexContext = std.hash_map.StringIndexContext;
1212
......@@ -22,8 +22,8 @@ tree: *const Ast,
2222/// sub-expressions. See `AstRlAnnotate` for details.
2323nodes_need_rl: *const AstRlAnnotate.RlNeededSet,
2424instructions: std.MultiArrayList(Zir.Inst) = .{},
25extra: ArrayListUnmanaged(u32) = .empty,
26string_bytes: ArrayListUnmanaged(u8) = .empty,
25extra: ArrayList(u32) = .empty,
26string_bytes: ArrayList(u8) = .empty,
2727/// Tracks the current byte offset within the source file.
2828/// Used to populate line deltas in the ZIR. AstGen maintains
2929/// this "cursor" throughout the entire AST lowering process in order
......@@ -40,7 +40,7 @@ source_column: u32 = 0,
4040/// The resulting ZIR code has no references to anything in this arena.
4141arena: Allocator,
4242string_table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage) = .empty,
43compile_errors: ArrayListUnmanaged(Zir.Inst.CompileErrors.Item) = .empty,
43compile_errors: ArrayList(Zir.Inst.CompileErrors.Item) = .empty,
4444/// The topmost block of the current function.
4545fn_block: ?*GenZir = null,
4646fn_var_args: bool = false,
......@@ -54,7 +54,7 @@ fn_ret_ty: Zir.Inst.Ref = .none,
5454/// that uses this string as the operand.
5555imports: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, Ast.TokenIndex) = .empty,
5656/// Used for temporary storage when building payloads.
57scratch: std.ArrayListUnmanaged(u32) = .empty,
57scratch: std.ArrayList(u32) = .empty,
5858/// Whenever a `ref` instruction is needed, it is created and saved in this
5959/// table instead of being immediately appended to the current block body.
6060/// Then, when the instruction is being added to the parent block (typically from
......@@ -173,7 +173,7 @@ pub fn generate(gpa: Allocator, tree: Ast) Allocator.Error!Zir {
173173
174174 var top_scope: Scope.Top = .{};
175175
176 var gz_instructions: std.ArrayListUnmanaged(Zir.Inst.Index) = .empty;
176 var gz_instructions: std.ArrayList(Zir.Inst.Index) = .empty;
177177 var gen_scope: GenZir = .{
178178 .is_comptime = true,
179179 .parent = &top_scope.base,
......@@ -1766,7 +1766,7 @@ fn structInitExpr(
17661766 var sfba = std.heap.stackFallback(256, astgen.arena);
17671767 const sfba_allocator = sfba.get();
17681768
1769 var duplicate_names = std.AutoArrayHashMap(Zir.NullTerminatedString, ArrayListUnmanaged(Ast.TokenIndex)).init(sfba_allocator);
1769 var duplicate_names = std.AutoArrayHashMap(Zir.NullTerminatedString, ArrayList(Ast.TokenIndex)).init(sfba_allocator);
17701770 try duplicate_names.ensureTotalCapacity(@intCast(struct_init.ast.fields.len));
17711771
17721772 // When there aren't errors, use this to avoid a second iteration.
......@@ -3996,7 +3996,7 @@ fn arrayTypeSentinel(gz: *GenZir, scope: *Scope, ri: ResultInfo, node: Ast.Node.
39963996}
39973997
39983998const WipMembers = struct {
3999 payload: *ArrayListUnmanaged(u32),
3999 payload: *ArrayList(u32),
40004000 payload_top: usize,
40014001 field_bits_start: u32,
40024002 fields_start: u32,
......@@ -4006,7 +4006,7 @@ const WipMembers = struct {
40064006
40074007 const Self = @This();
40084008
4009 fn init(gpa: Allocator, payload: *ArrayListUnmanaged(u32), decl_count: u32, field_count: u32, comptime bits_per_field: u32, comptime max_field_size: u32) Allocator.Error!Self {
4009 fn init(gpa: Allocator, payload: *ArrayList(u32), decl_count: u32, field_count: u32, comptime bits_per_field: u32, comptime max_field_size: u32) Allocator.Error!Self {
40104010 const payload_top: u32 = @intCast(payload.items.len);
40114011 const field_bits_start = payload_top + decl_count;
40124012 const fields_start = field_bits_start + if (bits_per_field > 0) blk: {
......@@ -4260,7 +4260,7 @@ fn fnDeclInner(
42604260 const is_inferred_error = tree.tokenTag(maybe_bang) == .bang;
42614261
42624262 // Note that the capacity here may not be sufficient, as this does not include `anytype` parameters.
4263 var param_insts: std.ArrayListUnmanaged(Zir.Inst.Index) = try .initCapacity(astgen.arena, fn_proto.ast.params.len);
4263 var param_insts: std.ArrayList(Zir.Inst.Index) = try .initCapacity(astgen.arena, fn_proto.ast.params.len);
42644264
42654265 // We use this as `is_used_or_discarded` to figure out if parameters / return types are generic.
42664266 var any_param_used = false;
......@@ -11311,7 +11311,7 @@ fn identifierTokenString(astgen: *AstGen, token: Ast.TokenIndex) InnerError![]co
1131111311 if (!mem.startsWith(u8, ident_name, "@")) {
1131211312 return ident_name;
1131311313 }
11314 var buf: ArrayListUnmanaged(u8) = .empty;
11314 var buf: ArrayList(u8) = .empty;
1131511315 defer buf.deinit(astgen.gpa);
1131611316 try astgen.parseStrLit(token, &buf, ident_name, 1);
1131711317 if (mem.indexOfScalar(u8, buf.items, 0) != null) {
......@@ -11329,7 +11329,7 @@ fn identifierTokenString(astgen: *AstGen, token: Ast.TokenIndex) InnerError![]co
1132911329fn appendIdentStr(
1133011330 astgen: *AstGen,
1133111331 token: Ast.TokenIndex,
11332 buf: *ArrayListUnmanaged(u8),
11332 buf: *ArrayList(u8),
1133311333) InnerError!void {
1133411334 const tree = astgen.tree;
1133511335 assert(tree.tokenTag(token) == .identifier);
......@@ -11352,7 +11352,7 @@ fn appendIdentStr(
1135211352fn parseStrLit(
1135311353 astgen: *AstGen,
1135411354 token: Ast.TokenIndex,
11355 buf: *ArrayListUnmanaged(u8),
11355 buf: *ArrayList(u8),
1135611356 bytes: []const u8,
1135711357 offset: u32,
1135811358) InnerError!void {
......@@ -11833,7 +11833,7 @@ const GenZir = struct {
1183311833 astgen: *AstGen,
1183411834 /// Keeps track of the list of instructions in this scope. Possibly shared.
1183511835 /// Indexes to instructions in `astgen`.
11836 instructions: *ArrayListUnmanaged(Zir.Inst.Index),
11836 instructions: *ArrayList(Zir.Inst.Index),
1183711837 /// A sub-block may share its instructions ArrayList with containing GenZir,
1183811838 /// if use is strictly nested. This saves prior size of list for unstacking.
1183911839 instructions_top: usize,
......@@ -13641,7 +13641,7 @@ fn scanContainer(
1364113641
1364213642 for (names.keys(), names.values()) |name, first| {
1364313643 if (first.next == null) continue;
13644 var notes: std.ArrayListUnmanaged(u32) = .empty;
13644 var notes: std.ArrayList(u32) = .empty;
1364513645 var prev: NameEntry = first;
1364613646 while (prev.next) |cur| : (prev = cur.*) {
1364713647 try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate name here", .{}));
......@@ -13654,7 +13654,7 @@ fn scanContainer(
1365413654
1365513655 for (test_names.keys(), test_names.values()) |name, first| {
1365613656 if (first.next == null) continue;
13657 var notes: std.ArrayListUnmanaged(u32) = .empty;
13657 var notes: std.ArrayList(u32) = .empty;
1365813658 var prev: NameEntry = first;
1365913659 while (prev.next) |cur| : (prev = cur.*) {
1366013660 try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate test here", .{}));
......@@ -13667,7 +13667,7 @@ fn scanContainer(
1366713667
1366813668 for (decltest_names.keys(), decltest_names.values()) |name, first| {
1366913669 if (first.next == null) continue;
13670 var notes: std.ArrayListUnmanaged(u32) = .empty;
13670 var notes: std.ArrayList(u32) = .empty;
1367113671 var prev: NameEntry = first;
1367213672 while (prev.next) |cur| : (prev = cur.*) {
1367313673 try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate decltest here", .{}));
......@@ -13690,7 +13690,7 @@ fn appendBodyWithFixups(astgen: *AstGen, body: []const Zir.Inst.Index) void {
1369013690
1369113691fn appendBodyWithFixupsArrayList(
1369213692 astgen: *AstGen,
13693 list: *std.ArrayListUnmanaged(u32),
13693 list: *std.ArrayList(u32),
1369413694 body: []const Zir.Inst.Index,
1369513695) void {
1369613696 astgen.appendBodyWithFixupsExtraRefsArrayList(list, body, &.{});
......@@ -13698,7 +13698,7 @@ fn appendBodyWithFixupsArrayList(
1369813698
1369913699fn appendBodyWithFixupsExtraRefsArrayList(
1370013700 astgen: *AstGen,
13701 list: *std.ArrayListUnmanaged(u32),
13701 list: *std.ArrayList(u32),
1370213702 body: []const Zir.Inst.Index,
1370313703 extra_refs: []const Zir.Inst.Index,
1370413704) void {
......@@ -13714,7 +13714,7 @@ fn appendBodyWithFixupsExtraRefsArrayList(
1371413714
1371513715fn appendPossiblyRefdBodyInst(
1371613716 astgen: *AstGen,
13717 list: *std.ArrayListUnmanaged(u32),
13717 list: *std.ArrayList(u32),
1371813718 body_inst: Zir.Inst.Index,
1371913719) void {
1372013720 list.appendAssumeCapacity(@intFromEnum(body_inst));
......@@ -13808,7 +13808,7 @@ fn lowerAstErrors(astgen: *AstGen) error{OutOfMemory}!void {
1380813808 defer msg.deinit();
1380913809 const msg_w = &msg.writer;
1381013810
13811 var notes: std.ArrayListUnmanaged(u32) = .empty;
13811 var notes: std.ArrayList(u32) = .empty;
1381213812 defer notes.deinit(gpa);
1381313813
1381413814 const token_starts = tree.tokens.items(.start);
......@@ -14104,7 +14104,7 @@ fn setDeclaration(
1410414104/// *all* of the bodies into a big `GenZir` stack. Therefore, we use this function to pull out these per-body `ref`
1410514105/// instructions which must be emitted.
1410614106fn fetchRemoveRefEntries(astgen: *AstGen, param_insts: []const Zir.Inst.Index) ![]Zir.Inst.Index {
14107 var refs: std.ArrayListUnmanaged(Zir.Inst.Index) = .empty;
14107 var refs: std.ArrayList(Zir.Inst.Index) = .empty;
1410814108 for (param_insts) |param_inst| {
1410914109 if (astgen.ref_table.fetchRemove(param_inst)) |kv| {
1411014110 try refs.append(astgen.arena, kv.value);
lib/std/zig/ErrorBundle.zig+4-4
......@@ -320,10 +320,10 @@ fn writeMsg(eb: ErrorBundle, err_msg: ErrorMessage, w: *Writer, indent: usize) !
320320
321321pub const Wip = struct {
322322 gpa: Allocator,
323 string_bytes: std.ArrayListUnmanaged(u8),
323 string_bytes: std.ArrayList(u8),
324324 /// The first thing in this array is a ErrorMessageList.
325 extra: std.ArrayListUnmanaged(u32),
326 root_list: std.ArrayListUnmanaged(MessageIndex),
325 extra: std.ArrayList(u32),
326 root_list: std.ArrayList(MessageIndex),
327327
328328 pub fn init(wip: *Wip, gpa: Allocator) !void {
329329 wip.* = .{
......@@ -666,7 +666,7 @@ pub const Wip = struct {
666666 if (index == .none) return .none;
667667 const other_sl = other.getSourceLocation(index);
668668
669 var ref_traces: std.ArrayListUnmanaged(ReferenceTrace) = .empty;
669 var ref_traces: std.ArrayList(ReferenceTrace) = .empty;
670670 defer ref_traces.deinit(wip.gpa);
671671
672672 if (other_sl.reference_trace_len > 0) {
lib/std/zig/Parse.zig+3-3
......@@ -6,10 +6,10 @@ gpa: Allocator,
66source: []const u8,
77tokens: Ast.TokenList.Slice,
88tok_i: TokenIndex,
9errors: std.ArrayListUnmanaged(AstError),
9errors: std.ArrayList(AstError),
1010nodes: Ast.NodeList,
11extra_data: std.ArrayListUnmanaged(u32),
12scratch: std.ArrayListUnmanaged(Node.Index),
11extra_data: std.ArrayList(u32),
12scratch: std.ArrayList(Node.Index),
1313
1414fn tokenTag(p: *const Parse, token_index: TokenIndex) Token.Tag {
1515 return p.tokens.items(.tag)[token_index];
lib/std/zig/WindowsSdk.zig+1-1
......@@ -752,7 +752,7 @@ const MsvcLibDir = struct {
752752 defer instances_dir.close();
753753
754754 var state_subpath_buf: [std.fs.max_name_bytes + 32]u8 = undefined;
755 var latest_version_lib_dir: std.ArrayListUnmanaged(u8) = .empty;
755 var latest_version_lib_dir: std.ArrayList(u8) = .empty;
756756 errdefer latest_version_lib_dir.deinit(allocator);
757757
758758 var latest_version: u64 = 0;
lib/std/zig/Zir.zig+3-3
......@@ -4093,8 +4093,8 @@ pub const DeclContents = struct {
40934093 /// This is a simple optional because ZIR guarantees that a `func`/`func_inferred`/`func_fancy` instruction
40944094 /// can only occur once per `declaration`.
40954095 func_decl: ?Inst.Index,
4096 explicit_types: std.ArrayListUnmanaged(Inst.Index),
4097 other: std.ArrayListUnmanaged(Inst.Index),
4096 explicit_types: std.ArrayList(Inst.Index),
4097 other: std.ArrayList(Inst.Index),
40984098
40994099 pub const init: DeclContents = .{
41004100 .func_decl = null,
......@@ -4118,7 +4118,7 @@ pub const DeclContents = struct {
41184118/// nested declarations; to find all declarations, call this function recursively on the type declarations discovered
41194119/// in `contents.explicit_types`.
41204120///
4121/// This populates an `ArrayListUnmanaged` because an iterator would need to allocate memory anyway.
4121/// This populates an `ArrayList` because an iterator would need to allocate memory anyway.
41224122pub fn findTrackable(zir: Zir, gpa: Allocator, contents: *DeclContents, decl_inst: Zir.Inst.Index) !void {
41234123 contents.clear();
41244124
lib/std/zig/ZonGen.zig+6-6
......@@ -17,13 +17,13 @@ tree: Ast,
1717options: Options,
1818
1919nodes: std.MultiArrayList(Zoir.Node.Repr),
20extra: std.ArrayListUnmanaged(u32),
21limbs: std.ArrayListUnmanaged(std.math.big.Limb),
22string_bytes: std.ArrayListUnmanaged(u8),
20extra: std.ArrayList(u32),
21limbs: std.ArrayList(std.math.big.Limb),
22string_bytes: std.ArrayList(u8),
2323string_table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage),
2424
25compile_errors: std.ArrayListUnmanaged(Zoir.CompileError),
26error_notes: std.ArrayListUnmanaged(Zoir.CompileError.Note),
25compile_errors: std.ArrayList(Zoir.CompileError),
26error_notes: std.ArrayList(Zoir.CompileError.Note),
2727
2828pub const Options = struct {
2929 /// When false, string literals are not parsed. `string_literal` nodes will contain empty
......@@ -889,7 +889,7 @@ fn lowerAstErrors(zg: *ZonGen) Allocator.Error!void {
889889 defer msg.deinit();
890890 const msg_bw = &msg.writer;
891891
892 var notes: std.ArrayListUnmanaged(Zoir.CompileError.Note) = .empty;
892 var notes: std.ArrayList(Zoir.CompileError.Note) = .empty;
893893 defer notes.deinit(gpa);
894894
895895 var cur_err = tree.errors[0];
lib/std/zig/llvm/BitcodeReader.zig+2-2
......@@ -9,7 +9,7 @@ reader: *std.Io.Reader,
99keep_names: bool,
1010bit_buffer: u32,
1111bit_offset: u5,
12stack: std.ArrayListUnmanaged(State),
12stack: std.ArrayList(State),
1313block_info: std.AutoHashMapUnmanaged(u32, Block.Info),
1414
1515pub const Item = union(enum) {
......@@ -488,7 +488,7 @@ const Abbrev = struct {
488488 };
489489
490490 const Store = struct {
491 abbrevs: std.ArrayListUnmanaged(Abbrev),
491 abbrevs: std.ArrayList(Abbrev),
492492
493493 fn deinit(store: *Store, allocator: std.mem.Allocator) void {
494494 for (store.abbrevs.items) |abbrev| allocator.free(abbrev.operands);
lib/std/zig/llvm/Builder.zig+25-25
......@@ -15,23 +15,23 @@ strip: bool,
1515source_filename: String,
1616data_layout: String,
1717target_triple: String,
18module_asm: std.ArrayListUnmanaged(u8),
18module_asm: std.ArrayList(u8),
1919
2020string_map: std.AutoArrayHashMapUnmanaged(void, void),
21string_indices: std.ArrayListUnmanaged(u32),
22string_bytes: std.ArrayListUnmanaged(u8),
21string_indices: std.ArrayList(u32),
22string_bytes: std.ArrayList(u8),
2323
2424types: std.AutoArrayHashMapUnmanaged(String, Type),
2525next_unnamed_type: String,
2626next_unique_type_id: std.AutoHashMapUnmanaged(String, u32),
2727type_map: std.AutoArrayHashMapUnmanaged(void, void),
28type_items: std.ArrayListUnmanaged(Type.Item),
29type_extra: std.ArrayListUnmanaged(u32),
28type_items: std.ArrayList(Type.Item),
29type_extra: std.ArrayList(u32),
3030
3131attributes: std.AutoArrayHashMapUnmanaged(Attribute.Storage, void),
3232attributes_map: std.AutoArrayHashMapUnmanaged(void, void),
33attributes_indices: std.ArrayListUnmanaged(u32),
34attributes_extra: std.ArrayListUnmanaged(u32),
33attributes_indices: std.ArrayList(u32),
34attributes_extra: std.ArrayList(u32),
3535
3636function_attributes_set: std.AutoArrayHashMapUnmanaged(FunctionAttributes, void),
3737
......@@ -39,32 +39,32 @@ globals: std.AutoArrayHashMapUnmanaged(StrtabString, Global),
3939next_unnamed_global: StrtabString,
4040next_replaced_global: StrtabString,
4141next_unique_global_id: std.AutoHashMapUnmanaged(StrtabString, u32),
42aliases: std.ArrayListUnmanaged(Alias),
43variables: std.ArrayListUnmanaged(Variable),
44functions: std.ArrayListUnmanaged(Function),
42aliases: std.ArrayList(Alias),
43variables: std.ArrayList(Variable),
44functions: std.ArrayList(Function),
4545
4646strtab_string_map: std.AutoArrayHashMapUnmanaged(void, void),
47strtab_string_indices: std.ArrayListUnmanaged(u32),
48strtab_string_bytes: std.ArrayListUnmanaged(u8),
47strtab_string_indices: std.ArrayList(u32),
48strtab_string_bytes: std.ArrayList(u8),
4949
5050constant_map: std.AutoArrayHashMapUnmanaged(void, void),
5151constant_items: std.MultiArrayList(Constant.Item),
52constant_extra: std.ArrayListUnmanaged(u32),
53constant_limbs: std.ArrayListUnmanaged(std.math.big.Limb),
52constant_extra: std.ArrayList(u32),
53constant_limbs: std.ArrayList(std.math.big.Limb),
5454
5555metadata_map: std.AutoArrayHashMapUnmanaged(void, void),
5656metadata_items: std.MultiArrayList(Metadata.Item),
57metadata_extra: std.ArrayListUnmanaged(u32),
58metadata_limbs: std.ArrayListUnmanaged(std.math.big.Limb),
59metadata_forward_references: std.ArrayListUnmanaged(Metadata.Optional),
57metadata_extra: std.ArrayList(u32),
58metadata_limbs: std.ArrayList(std.math.big.Limb),
59metadata_forward_references: std.ArrayList(Metadata.Optional),
6060metadata_named: std.AutoArrayHashMapUnmanaged(String, struct {
6161 len: u32,
6262 index: Metadata.Item.ExtraIndex,
6363}),
6464
6565metadata_string_map: std.AutoArrayHashMapUnmanaged(void, void),
66metadata_string_indices: std.ArrayListUnmanaged(u32),
67metadata_string_bytes: std.ArrayListUnmanaged(u8),
66metadata_string_indices: std.ArrayList(u32),
67metadata_string_bytes: std.ArrayList(u8),
6868
6969pub const expected_args_len = 16;
7070pub const expected_attrs_len = 16;
......@@ -1627,7 +1627,7 @@ pub const FunctionAttributes = enum(u32) {
16271627 maps: Maps = .{},
16281628
16291629 const Map = std.AutoArrayHashMapUnmanaged(Attribute.Kind, Attribute.Index);
1630 const Maps = std.ArrayListUnmanaged(Map);
1630 const Maps = std.ArrayList(Map);
16311631
16321632 pub fn deinit(self: *Wip, builder: *const Builder) void {
16331633 for (self.maps.items) |*map| map.deinit(builder.gpa);
......@@ -5173,13 +5173,13 @@ pub const WipFunction = struct {
51735173 prev_debug_location: DebugLocation,
51745174 debug_location: DebugLocation,
51755175 cursor: Cursor,
5176 blocks: std.ArrayListUnmanaged(Block),
5176 blocks: std.ArrayList(Block),
51775177 instructions: std.MultiArrayList(Instruction),
5178 names: std.ArrayListUnmanaged(String),
5178 names: std.ArrayList(String),
51795179 strip: bool,
51805180 debug_locations: std.AutoArrayHashMapUnmanaged(Instruction.Index, DebugLocation),
51815181 debug_values: std.AutoArrayHashMapUnmanaged(Instruction.Index, void),
5182 extra: std.ArrayListUnmanaged(u32),
5182 extra: std.ArrayList(u32),
51835183
51845184 pub const Cursor = struct { block: Block.Index, instruction: u32 = 0 };
51855185
......@@ -5187,7 +5187,7 @@ pub const WipFunction = struct {
51875187 name: String,
51885188 incoming: u32,
51895189 branches: u32 = 0,
5190 instructions: std.ArrayListUnmanaged(Instruction.Index),
5190 instructions: std.ArrayList(Instruction.Index),
51915191
51925192 const Index = enum(u32) {
51935193 entry,
......@@ -13193,7 +13193,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1319313193 // Write LLVM IR magic
1319413194 try bitcode.writeBits(ir.MAGIC, 32);
1319513195
13196 var record: std.ArrayListUnmanaged(u64) = .empty;
13196 var record: std.ArrayList(u64) = .empty;
1319713197 defer record.deinit(self.gpa);
1319813198
1319913199 // IDENTIFICATION_BLOCK
lib/std/zig/system/NativePaths.zig+5-5
......@@ -7,11 +7,11 @@ const mem = std.mem;
77const NativePaths = @This();
88
99arena: Allocator,
10include_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
11lib_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
12framework_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
13rpaths: std.ArrayListUnmanaged([]const u8) = .empty,
14warnings: std.ArrayListUnmanaged([]const u8) = .empty,
10include_dirs: std.ArrayList([]const u8) = .empty,
11lib_dirs: std.ArrayList([]const u8) = .empty,
12framework_dirs: std.ArrayList([]const u8) = .empty,
13rpaths: std.ArrayList([]const u8) = .empty,
14warnings: std.ArrayList([]const u8) = .empty,
1515
1616pub fn detect(arena: Allocator, native_target: *const std.Target) !NativePaths {
1717 var self: NativePaths = .{ .arena = arena };
lib/std/zon/parse.zig+2-2
......@@ -19,7 +19,7 @@ const Base = std.zig.number_literal.Base;
1919const StrLitErr = std.zig.string_literal.Error;
2020const NumberLiteralError = std.zig.number_literal.Error;
2121const assert = std.debug.assert;
22const ArrayListUnmanaged = std.ArrayListUnmanaged;
22const ArrayList = std.ArrayList;
2323
2424/// Rename when adding or removing support for a type.
2525const valid_types = {};
......@@ -1115,7 +1115,7 @@ const Parser = struct {
11151115 };
11161116 } else b: {
11171117 const msg = "supported: ";
1118 var buf: std.ArrayListUnmanaged(u8) = try .initCapacity(gpa, 64);
1118 var buf: std.ArrayList(u8) = try .initCapacity(gpa, 64);
11191119 defer buf.deinit(gpa);
11201120 try buf.appendSlice(gpa, msg);
11211121 inline for (info.fields, 0..) |field_info, i| {
src/Air.zig+1-1
......@@ -22,7 +22,7 @@ pub const Liveness = @import("Air/Liveness.zig");
2222instructions: std.MultiArrayList(Inst).Slice,
2323/// The meaning of this data is determined by `Inst.Tag` value.
2424/// The first few indexes are reserved. See `ExtraIndex` for the values.
25extra: std.ArrayListUnmanaged(u32),
25extra: std.ArrayList(u32),
2626
2727pub const ExtraIndex = enum(u32) {
2828 /// Payload index of the main `Block` in the `extra` array.
src/Air/Legalize.zig+1-1
......@@ -1,6 +1,6 @@
11pt: Zcu.PerThread,
22air_instructions: std.MultiArrayList(Air.Inst),
3air_extra: std.ArrayListUnmanaged(u32),
3air_extra: std.ArrayList(u32),
44features: if (switch (dev.env) {
55 .bootstrap => @import("../codegen/c.zig").legalizeFeatures(undefined),
66 else => null,
src/Air/Liveness.zig+5-5
......@@ -117,7 +117,7 @@ fn LivenessPassData(comptime pass: LivenessPass) type {
117117
118118 /// The extra data initialized by the `loop_analysis` pass for this pass to consume.
119119 /// Owned by this struct during this pass.
120 old_extra: std.ArrayListUnmanaged(u32) = .empty,
120 old_extra: std.ArrayList(u32) = .empty,
121121
122122 const BlockScope = struct {
123123 /// If this is a `block`, these instructions are alive upon a `br` to this block.
......@@ -347,7 +347,7 @@ const Analysis = struct {
347347 intern_pool: *InternPool,
348348 tomb_bits: []usize,
349349 special: std.AutoHashMapUnmanaged(Air.Inst.Index, u32),
350 extra: std.ArrayListUnmanaged(u32),
350 extra: std.ArrayList(u32),
351351
352352 fn addExtra(a: *Analysis, extra: anytype) Allocator.Error!u32 {
353353 const fields = std.meta.fields(@TypeOf(extra));
......@@ -1235,10 +1235,10 @@ fn analyzeInstCondBr(
12351235 // Operands which are alive in one branch but not the other need to die at the start of
12361236 // the peer branch.
12371237
1238 var then_mirrored_deaths: std.ArrayListUnmanaged(Air.Inst.Index) = .empty;
1238 var then_mirrored_deaths: std.ArrayList(Air.Inst.Index) = .empty;
12391239 defer then_mirrored_deaths.deinit(gpa);
12401240
1241 var else_mirrored_deaths: std.ArrayListUnmanaged(Air.Inst.Index) = .empty;
1241 var else_mirrored_deaths: std.ArrayList(Air.Inst.Index) = .empty;
12421242 defer else_mirrored_deaths.deinit(gpa);
12431243
12441244 // Note: this invalidates `else_live`, but expands `then_live` to be their union
......@@ -1351,7 +1351,7 @@ fn analyzeInstSwitchBr(
13511351 // to understand it, I encourage looking at `analyzeInstCondBr` first.
13521352
13531353 const DeathSet = std.AutoHashMapUnmanaged(Air.Inst.Index, void);
1354 const DeathList = std.ArrayListUnmanaged(Air.Inst.Index);
1354 const DeathList = std.ArrayList(Air.Inst.Index);
13551355
13561356 var case_live_sets = try gpa.alloc(std.AutoHashMapUnmanaged(Air.Inst.Index, void), ncases + 1); // +1 for else
13571357 defer gpa.free(case_live_sets);
src/Compilation.zig+13-13
......@@ -263,7 +263,7 @@ llvm_opt_bisect_limit: c_int,
263263
264264time_report: ?TimeReport,
265265
266file_system_inputs: ?*std.ArrayListUnmanaged(u8),
266file_system_inputs: ?*std.ArrayList(u8),
267267
268268/// This is the digest of the cache for the current compilation.
269269/// This digest will be known after update() is called.
......@@ -1166,8 +1166,8 @@ pub const CObject = struct {
11661166 category: u32 = 0,
11671167 msg: []const u8 = &.{},
11681168 src_loc: SrcLoc = .{},
1169 src_ranges: std.ArrayListUnmanaged(SrcRange) = .empty,
1170 sub_diags: std.ArrayListUnmanaged(Diag) = .empty,
1169 src_ranges: std.ArrayList(SrcRange) = .empty,
1170 sub_diags: std.ArrayList(Diag) = .empty,
11711171
11721172 fn deinit(wip_diag: *@This(), allocator: Allocator) void {
11731173 allocator.free(wip_diag.msg);
......@@ -1197,7 +1197,7 @@ pub const CObject = struct {
11971197 category_names.deinit(gpa);
11981198 }
11991199
1200 var stack: std.ArrayListUnmanaged(WipDiag) = .empty;
1200 var stack: std.ArrayList(WipDiag) = .empty;
12011201 defer {
12021202 for (stack.items) |*wip_diag| wip_diag.deinit(gpa);
12031203 stack.deinit(gpa);
......@@ -1784,7 +1784,7 @@ pub const CreateOptions = struct {
17841784 global_cc_argv: []const []const u8 = &.{},
17851785
17861786 /// Tracks all files that can cause the Compilation to be invalidated and need a rebuild.
1787 file_system_inputs: ?*std.ArrayListUnmanaged(u8) = null,
1787 file_system_inputs: ?*std.ArrayList(u8) = null,
17881788
17891789 parent_whole_cache: ?ParentWholeCache = null,
17901790
......@@ -4150,7 +4150,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle {
41504150
41514151 const refs = try zcu.resolveReferences();
41524152
4153 var messages: std.ArrayListUnmanaged(Zcu.ErrorMsg) = .empty;
4153 var messages: std.ArrayList(Zcu.ErrorMsg) = .empty;
41544154 defer messages.deinit(gpa);
41554155 for (zcu.compile_logs.keys(), zcu.compile_logs.values()) |logging_unit, compile_log| {
41564156 if (!refs.contains(logging_unit)) continue;
......@@ -4197,7 +4197,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle {
41974197 }
41984198 }
41994199
4200 var log_text: std.ArrayListUnmanaged(u8) = .empty;
4200 var log_text: std.ArrayList(u8) = .empty;
42014201 defer log_text.deinit(gpa);
42024202
42034203 // Index 0 will be the root message; the rest will be notes.
......@@ -4250,7 +4250,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle {
42504250}
42514251
42524252/// Writes all compile log lines belonging to `logging_unit` into `log_text` using `zcu.gpa`.
4253fn appendCompileLogLines(log_text: *std.ArrayListUnmanaged(u8), zcu: *Zcu, logging_unit: InternPool.AnalUnit) Allocator.Error!void {
4253fn appendCompileLogLines(log_text: *std.ArrayList(u8), zcu: *Zcu, logging_unit: InternPool.AnalUnit) Allocator.Error!void {
42544254 const gpa = zcu.gpa;
42554255 const ip = &zcu.intern_pool;
42564256 var opt_line_idx = zcu.compile_logs.get(logging_unit).?.first_line.toOptional();
......@@ -4336,7 +4336,7 @@ pub fn addModuleErrorMsg(
43364336 };
43374337 const err_loc = std.zig.findLineColumn(err_source, err_span.main);
43384338
4339 var ref_traces: std.ArrayListUnmanaged(ErrorBundle.ReferenceTrace) = .empty;
4339 var ref_traces: std.ArrayList(ErrorBundle.ReferenceTrace) = .empty;
43404340 defer ref_traces.deinit(gpa);
43414341
43424342 rt: {
......@@ -4470,7 +4470,7 @@ pub fn addModuleErrorMsg(
44704470fn addReferenceTraceFrame(
44714471 zcu: *Zcu,
44724472 eb: *ErrorBundle.Wip,
4473 ref_traces: *std.ArrayListUnmanaged(ErrorBundle.ReferenceTrace),
4473 ref_traces: *std.ArrayList(ErrorBundle.ReferenceTrace),
44744474 name: []const u8,
44754475 lazy_src: Zcu.LazySrcLoc,
44764476 inlined: bool,
......@@ -5678,7 +5678,7 @@ pub fn translateC(
56785678 try argv.appendSlice(&[_][]const u8{ "-target", try target.zigTriple(arena) });
56795679
56805680 const mcpu = mcpu: {
5681 var buf: std.ArrayListUnmanaged(u8) = .empty;
5681 var buf: std.ArrayList(u8) = .empty;
56825682 defer buf.deinit(gpa);
56835683
56845684 try buf.print(gpa, "-mcpu={s}", .{target.cpu.model.name});
......@@ -6671,7 +6671,7 @@ fn spawnZigRc(
66716671 argv: []const []const u8,
66726672 child_progress_node: std.Progress.Node,
66736673) !void {
6674 var node_name: std.ArrayListUnmanaged(u8) = .empty;
6674 var node_name: std.ArrayList(u8) = .empty;
66756675 defer node_name.deinit(arena);
66766676
66776677 var child = std.process.Child.init(argv, arena);
......@@ -6986,7 +6986,7 @@ fn addCommonCCArgs(
69866986 }
69876987
69886988 if (is_clang) {
6989 var san_arg: std.ArrayListUnmanaged(u8) = .empty;
6989 var san_arg: std.ArrayList(u8) = .empty;
69906990 const prefix = "-fsanitize=";
69916991 if (mod.sanitize_c != .off) {
69926992 if (san_arg.items.len == 0) try san_arg.appendSlice(arena, prefix);
src/IncrementalDebugServer.zig+1-1
......@@ -47,7 +47,7 @@ fn runThread(ids: *IncrementalDebugServer) void {
4747 const io = ids.zcu.comp.io;
4848
4949 var cmd_buf: [1024]u8 = undefined;
50 var text_out: std.ArrayListUnmanaged(u8) = .empty;
50 var text_out: std.ArrayList(u8) = .empty;
5151 defer text_out.deinit(gpa);
5252
5353 const addr: std.Io.net.IpAddress = .{ .ip6 = .loopback(port) };
src/InternPool.zig+4-4
......@@ -79,10 +79,10 @@ first_dependency: std.AutoArrayHashMapUnmanaged(AnalUnit, DepEntry.Index),
7979/// up entries in this list as required. This is not stored in `extra` so that
8080/// we can use `free_dep_entries` to track free indices, since dependencies are
8181/// removed frequently.
82dep_entries: std.ArrayListUnmanaged(DepEntry),
82dep_entries: std.ArrayList(DepEntry),
8383/// Stores unused indices in `dep_entries` which can be reused without a full
8484/// garbage collection pass.
85free_dep_entries: std.ArrayListUnmanaged(DepEntry.Index),
85free_dep_entries: std.ArrayList(DepEntry.Index),
8686
8787/// Whether a multi-threaded intern pool is useful.
8888/// Currently `false` until the intern pool is actually accessed
......@@ -11436,7 +11436,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator)
1143611436 defer arena_allocator.deinit();
1143711437 const arena = arena_allocator.allocator();
1143811438
11439 var instances: std.AutoArrayHashMapUnmanaged(Index, std.ArrayListUnmanaged(Index)) = .empty;
11439 var instances: std.AutoArrayHashMapUnmanaged(Index, std.ArrayList(Index)) = .empty;
1144011440 for (ip.locals, 0..) |*local, tid| {
1144111441 const items = local.shared.items.view().slice();
1144211442 const extra_list = local.shared.extra;
......@@ -11463,7 +11463,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator)
1146311463 defer std.debug.unlockStderrWriter();
1146411464
1146511465 const SortContext = struct {
11466 values: []std.ArrayListUnmanaged(Index),
11466 values: []std.ArrayList(Index),
1146711467 pub fn lessThan(ctx: @This(), a_index: usize, b_index: usize) bool {
1146811468 return ctx.values[a_index].items.len > ctx.values[b_index].items.len;
1146911469 }
src/Package.zig+1-1
......@@ -105,7 +105,7 @@ pub const Hash = struct {
105105 assert(name.len <= 32);
106106 assert(ver.len <= 32);
107107 var result: Hash = undefined;
108 var buf: std.ArrayListUnmanaged(u8) = .initBuffer(&result.bytes);
108 var buf: std.ArrayList(u8) = .initBuffer(&result.bytes);
109109 buf.appendSliceAssumeCapacity(name);
110110 buf.appendAssumeCapacity('-');
111111 buf.appendSliceAssumeCapacity(ver);
src/Package/Fetch.zig+2-2
......@@ -112,7 +112,7 @@ pub const JobQueue = struct {
112112 /// `table` may be missing some tasks such as ones that failed, so this
113113 /// field contains references to all of them.
114114 /// Protected by `mutex`.
115 all_fetches: std.ArrayListUnmanaged(*Fetch) = .empty,
115 all_fetches: std.ArrayList(*Fetch) = .empty,
116116
117117 http_client: *std.http.Client,
118118 thread_pool: *ThreadPool,
......@@ -2323,7 +2323,7 @@ const TestFetchBuilder = struct {
23232323 var package_dir = try self.packageDir();
23242324 defer package_dir.close();
23252325
2326 var actual_files: std.ArrayListUnmanaged([]u8) = .empty;
2326 var actual_files: std.ArrayList([]u8) = .empty;
23272327 defer actual_files.deinit(std.testing.allocator);
23282328 defer for (actual_files.items) |file| std.testing.allocator.free(file);
23292329 var walker = try package_dir.walk(std.testing.allocator);
src/Package/Fetch/git.zig+8-8
......@@ -160,7 +160,7 @@ pub const Oid = union(Format) {
160160
161161pub const Diagnostics = struct {
162162 allocator: Allocator,
163 errors: std.ArrayListUnmanaged(Error) = .empty,
163 errors: std.ArrayList(Error) = .empty,
164164
165165 pub const Error = union(enum) {
166166 unable_to_create_sym_link: struct {
......@@ -405,7 +405,7 @@ const Odb = struct {
405405 fn readObject(odb: *Odb) !Object {
406406 var base_offset = odb.pack_file.logicalPos();
407407 var base_header: EntryHeader = undefined;
408 var delta_offsets: std.ArrayListUnmanaged(u64) = .empty;
408 var delta_offsets: std.ArrayList(u64) = .empty;
409409 defer delta_offsets.deinit(odb.allocator);
410410 const base_object = while (true) {
411411 if (odb.cache.get(base_offset)) |base_object| break base_object;
......@@ -1277,7 +1277,7 @@ pub fn indexPack(
12771277
12781278 var index_entries: std.AutoHashMapUnmanaged(Oid, IndexEntry) = .empty;
12791279 defer index_entries.deinit(allocator);
1280 var pending_deltas: std.ArrayListUnmanaged(IndexEntry) = .empty;
1280 var pending_deltas: std.ArrayList(IndexEntry) = .empty;
12811281 defer pending_deltas.deinit(allocator);
12821282
12831283 const pack_checksum = try indexPackFirstPass(allocator, format, pack, &index_entries, &pending_deltas);
......@@ -1299,7 +1299,7 @@ pub fn indexPack(
12991299 remaining_deltas = pending_deltas.items.len;
13001300 }
13011301
1302 var oids: std.ArrayListUnmanaged(Oid) = .empty;
1302 var oids: std.ArrayList(Oid) = .empty;
13031303 defer oids.deinit(allocator);
13041304 try oids.ensureTotalCapacityPrecise(allocator, index_entries.count());
13051305 var index_entries_iter = index_entries.iterator();
......@@ -1341,7 +1341,7 @@ pub fn indexPack(
13411341 try writer.writeInt(u32, index_entries.get(oid).?.crc32, .big);
13421342 }
13431343
1344 var big_offsets: std.ArrayListUnmanaged(u64) = .empty;
1344 var big_offsets: std.ArrayList(u64) = .empty;
13451345 defer big_offsets.deinit(allocator);
13461346 for (oids.items) |oid| {
13471347 const offset = index_entries.get(oid).?.offset;
......@@ -1372,7 +1372,7 @@ fn indexPackFirstPass(
13721372 format: Oid.Format,
13731373 pack: *std.fs.File.Reader,
13741374 index_entries: *std.AutoHashMapUnmanaged(Oid, IndexEntry),
1375 pending_deltas: *std.ArrayListUnmanaged(IndexEntry),
1375 pending_deltas: *std.ArrayList(IndexEntry),
13761376) !Oid {
13771377 var flate_buffer: [std.compress.flate.max_window_len]u8 = undefined;
13781378 var pack_buffer: [2048]u8 = undefined; // Reasonably large buffer for file system.
......@@ -1431,7 +1431,7 @@ fn indexPackHashDelta(
14311431 // Figure out the chain of deltas to resolve
14321432 var base_offset = delta.offset;
14331433 var base_header: EntryHeader = undefined;
1434 var delta_offsets: std.ArrayListUnmanaged(u64) = .empty;
1434 var delta_offsets: std.ArrayList(u64) = .empty;
14351435 defer delta_offsets.deinit(allocator);
14361436 const base_object = while (true) {
14371437 if (cache.get(base_offset)) |base_object| break base_object;
......@@ -1641,7 +1641,7 @@ fn runRepositoryTest(io: Io, comptime format: Oid.Format, head_commit: []const u
16411641 "file8",
16421642 "file9",
16431643 };
1644 var actual_files: std.ArrayListUnmanaged([]u8) = .empty;
1644 var actual_files: std.ArrayList([]u8) = .empty;
16451645 defer actual_files.deinit(testing.allocator);
16461646 defer for (actual_files.items) |file| testing.allocator.free(file);
16471647 var walker = try worktree.dir.walk(testing.allocator);
src/Package/Manifest.zig+3-3
......@@ -140,8 +140,8 @@ const Parse = struct {
140140 gpa: Allocator,
141141 ast: Ast,
142142 arena: Allocator,
143 buf: std.ArrayListUnmanaged(u8),
144 errors: std.ArrayListUnmanaged(ErrorMessage),
143 buf: std.ArrayList(u8),
144 errors: std.ArrayList(ErrorMessage),
145145
146146 name: []const u8,
147147 id: u32,
......@@ -466,7 +466,7 @@ const Parse = struct {
466466 fn parseStrLit(
467467 p: *Parse,
468468 token: Ast.TokenIndex,
469 buf: *std.ArrayListUnmanaged(u8),
469 buf: *std.ArrayList(u8),
470470 bytes: []const u8,
471471 offset: u32,
472472 ) InnerError!void {
src/Sema.zig+26-26
......@@ -46,7 +46,7 @@ gpa: Allocator,
4646arena: Allocator,
4747code: Zir,
4848air_instructions: std.MultiArrayList(Air.Inst) = .{},
49air_extra: std.ArrayListUnmanaged(u32) = .empty,
49air_extra: std.ArrayList(u32) = .empty,
5050/// Maps ZIR to AIR.
5151inst_map: InstMap = .{},
5252/// The "owner" of a `Sema` represents the root "thing" that is being analyzed.
......@@ -111,11 +111,11 @@ maybe_comptime_allocs: std.AutoHashMapUnmanaged(Air.Inst.Index, MaybeComptimeAll
111111/// stored as elements of this array.
112112/// Pointers to such memory are represented via an index into this array.
113113/// Backed by gpa.
114comptime_allocs: std.ArrayListUnmanaged(ComptimeAlloc) = .empty,
114comptime_allocs: std.ArrayList(ComptimeAlloc) = .empty,
115115
116116/// A list of exports performed by this analysis. After this `Sema` terminates,
117117/// these are flushed to `Zcu.single_exports` or `Zcu.multi_exports`.
118exports: std.ArrayListUnmanaged(Zcu.Export) = .empty,
118exports: std.ArrayList(Zcu.Export) = .empty,
119119
120120/// All references registered so far by this `Sema`. This is a temporary duplicate
121121/// of data stored in `Zcu.all_references`. It exists to avoid adding references to
......@@ -343,7 +343,7 @@ pub const Block = struct {
343343 /// The namespace to use for lookups from this source block
344344 namespace: InternPool.NamespaceIndex,
345345 /// The AIR instructions generated for this block.
346 instructions: std.ArrayListUnmanaged(Air.Inst.Index),
346 instructions: std.ArrayList(Air.Inst.Index),
347347 // `param` instructions are collected here to be used by the `func` instruction.
348348 /// When doing a generic function instantiation, this array collects a type
349349 /// for each *runtime-known* parameter. This array corresponds to the instance
......@@ -475,23 +475,23 @@ pub const Block = struct {
475475 block_inst: Air.Inst.Index,
476476 /// Separate array list from break_inst_list so that it can be passed directly
477477 /// to resolvePeerTypes.
478 results: std.ArrayListUnmanaged(Air.Inst.Ref),
478 results: std.ArrayList(Air.Inst.Ref),
479479 /// Keeps track of the break instructions so that the operand can be replaced
480480 /// if we need to add type coercion at the end of block analysis.
481481 /// Same indexes, capacity, length as `results`.
482 br_list: std.ArrayListUnmanaged(Air.Inst.Index),
482 br_list: std.ArrayList(Air.Inst.Index),
483483 /// Keeps the source location of the rhs operand of the break instruction,
484484 /// to enable more precise compile errors.
485485 /// Same indexes, capacity, length as `results`.
486 src_locs: std.ArrayListUnmanaged(?LazySrcLoc),
486 src_locs: std.ArrayList(?LazySrcLoc),
487487 /// Most blocks do not utilize this field. When it is used, its use is
488488 /// contextual. The possible uses are as follows:
489489 /// * for a `switch_block[_ref]`, this refers to dummy `br` instructions
490490 /// which correspond to `switch_continue` ZIR. The switch logic will
491491 /// rewrite these to appropriate AIR switch dispatches.
492 extra_insts: std.ArrayListUnmanaged(Air.Inst.Index) = .empty,
492 extra_insts: std.ArrayList(Air.Inst.Index) = .empty,
493493 /// Same indexes, capacity, length as `extra_insts`.
494 extra_src_locs: std.ArrayListUnmanaged(LazySrcLoc) = .empty,
494 extra_src_locs: std.ArrayList(LazySrcLoc) = .empty,
495495
496496 pub fn deinit(merges: *@This(), allocator: Allocator) void {
497497 merges.results.deinit(allocator);
......@@ -985,7 +985,7 @@ const InferredAlloc = struct {
985985 /// is known. These should be rewritten to perform any required coercions
986986 /// when the type is resolved.
987987 /// Allocated from `sema.arena`.
988 prongs: std.ArrayListUnmanaged(Air.Inst.Index) = .empty,
988 prongs: std.ArrayList(Air.Inst.Index) = .empty,
989989};
990990
991991pub fn deinit(sema: *Sema) void {
......@@ -7547,8 +7547,8 @@ fn analyzeCall(
75477547
75487548 // This may be an overestimate, but it's definitely sufficient.
75497549 const max_runtime_args = args_info.count() - @popCount(func_ty_info.comptime_bits);
7550 var runtime_args: std.ArrayListUnmanaged(Air.Inst.Ref) = try .initCapacity(arena, max_runtime_args);
7551 var runtime_param_tys: std.ArrayListUnmanaged(InternPool.Index) = try .initCapacity(arena, max_runtime_args);
7550 var runtime_args: std.ArrayList(Air.Inst.Ref) = try .initCapacity(arena, max_runtime_args);
7551 var runtime_param_tys: std.ArrayList(InternPool.Index) = try .initCapacity(arena, max_runtime_args);
75527552
75537553 const comptime_args = try arena.alloc(InternPool.Index, args_info.count());
75547554
......@@ -11107,7 +11107,7 @@ fn zirSwitchBlockErrUnion(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp
1110711107 break :blk err_capture_inst;
1110811108 } else undefined;
1110911109
11110 var case_vals = try std.ArrayListUnmanaged(Air.Inst.Ref).initCapacity(gpa, scalar_cases_len + 2 * multi_cases_len);
11110 var case_vals = try std.ArrayList(Air.Inst.Ref).initCapacity(gpa, scalar_cases_len + 2 * multi_cases_len);
1111111111 defer case_vals.deinit(gpa);
1111211112
1111311113 const NonError = struct {
......@@ -11490,7 +11490,7 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index, operand_is_r
1149011490 break :blk tag_capture_inst;
1149111491 } else undefined;
1149211492
11493 var case_vals = try std.ArrayListUnmanaged(Air.Inst.Ref).initCapacity(gpa, scalar_cases_len + 2 * multi_cases_len);
11493 var case_vals = try std.ArrayList(Air.Inst.Ref).initCapacity(gpa, scalar_cases_len + 2 * multi_cases_len);
1149411494 defer case_vals.deinit(gpa);
1149511495
1149611496 var single_absorbed_item: Zir.Inst.Ref = .none;
......@@ -12144,8 +12144,8 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index, operand_is_r
1214412144 }
1214512145
1214612146 var extra_case_vals: struct {
12147 items: std.ArrayListUnmanaged(Air.Inst.Ref),
12148 ranges: std.ArrayListUnmanaged([2]Air.Inst.Ref),
12147 items: std.ArrayList(Air.Inst.Ref),
12148 ranges: std.ArrayList([2]Air.Inst.Ref),
1214912149 } = .{ .items = .empty, .ranges = .empty };
1215012150 defer {
1215112151 extra_case_vals.items.deinit(gpa);
......@@ -12337,7 +12337,7 @@ fn analyzeSwitchRuntimeBlock(
1233712337 operand: Air.Inst.Ref,
1233812338 operand_ty: Type,
1233912339 operand_src: LazySrcLoc,
12340 case_vals: std.ArrayListUnmanaged(Air.Inst.Ref),
12340 case_vals: std.ArrayList(Air.Inst.Ref),
1234112341 else_prong: SpecialProng,
1234212342 scalar_cases_len: usize,
1234312343 multi_cases_len: usize,
......@@ -12369,10 +12369,10 @@ fn analyzeSwitchRuntimeBlock(
1236912369
1237012370 const estimated_cases_extra = (scalar_cases_len + multi_cases_len) *
1237112371 @typeInfo(Air.SwitchBr.Case).@"struct".fields.len + 2;
12372 var cases_extra = try std.ArrayListUnmanaged(u32).initCapacity(gpa, estimated_cases_extra);
12372 var cases_extra = try std.ArrayList(u32).initCapacity(gpa, estimated_cases_extra);
1237312373 defer cases_extra.deinit(gpa);
1237412374
12375 var branch_hints = try std.ArrayListUnmanaged(std.builtin.BranchHint).initCapacity(gpa, scalar_cases_len);
12375 var branch_hints = try std.ArrayList(std.builtin.BranchHint).initCapacity(gpa, scalar_cases_len);
1237612376 defer branch_hints.deinit(gpa);
1237712377
1237812378 var case_block = child_block.makeSubBlock();
......@@ -13022,7 +13022,7 @@ fn resolveSwitchComptimeLoop(
1302213022 special_members_only: ?SpecialProng,
1302313023 special_generic: SpecialProng,
1302413024 special_generic_is_under: bool,
13025 case_vals: std.ArrayListUnmanaged(Air.Inst.Ref),
13025 case_vals: std.ArrayList(Air.Inst.Ref),
1302613026 scalar_cases_len: u32,
1302713027 multi_cases_len: u32,
1302813028 err_set: bool,
......@@ -13094,7 +13094,7 @@ fn resolveSwitchComptime(
1309413094 special_members_only: ?SpecialProng,
1309513095 special_generic: SpecialProng,
1309613096 special_generic_is_under: bool,
13097 case_vals: std.ArrayListUnmanaged(Air.Inst.Ref),
13097 case_vals: std.ArrayList(Air.Inst.Ref),
1309813098 scalar_cases_len: u32,
1309913099 multi_cases_len: u32,
1310013100 err_set: bool,
......@@ -13350,7 +13350,7 @@ fn validateErrSetSwitch(
1335013350 sema: *Sema,
1335113351 block: *Block,
1335213352 seen_errors: *SwitchErrorSet,
13353 case_vals: *std.ArrayListUnmanaged(Air.Inst.Ref),
13353 case_vals: *std.ArrayList(Air.Inst.Ref),
1335413354 operand_ty: Type,
1335513355 inst_data: @FieldType(Zir.Inst.Data, "pl_node"),
1335613356 scalar_cases_len: u32,
......@@ -35678,8 +35678,8 @@ fn unionFields(
3567835678 enum_field_names = try sema.arena.alloc(InternPool.NullTerminatedString, fields_len);
3567935679 }
3568035680
35681 var field_types: std.ArrayListUnmanaged(InternPool.Index) = .empty;
35682 var field_aligns: std.ArrayListUnmanaged(InternPool.Alignment) = .empty;
35681 var field_types: std.ArrayList(InternPool.Index) = .empty;
35682 var field_aligns: std.ArrayList(InternPool.Alignment) = .empty;
3568335683
3568435684 try field_types.ensureTotalCapacityPrecise(sema.arena, fields_len);
3568535685 if (small.any_aligned_fields)
......@@ -37056,7 +37056,7 @@ fn notePathToComptimeAllocPtr(
3705637056 const zcu = pt.zcu;
3705737057 const ip = &zcu.intern_pool;
3705837058
37059 var first_path: std.ArrayListUnmanaged(u8) = .empty;
37059 var first_path: std.ArrayList(u8) = .empty;
3706037060 if (intermediate_value_count == 0) {
3706137061 try first_path.print(arena, "{f}", .{start_value_name.fmt(ip)});
3706237062 } else {
......@@ -37127,7 +37127,7 @@ fn notePathToComptimeAllocPtr(
3712737127 }
3712837128}
3712937129
37130fn notePathToComptimeAllocPtrInner(sema: *Sema, val: Value, path: *std.ArrayListUnmanaged(u8)) Allocator.Error!Value {
37130fn notePathToComptimeAllocPtrInner(sema: *Sema, val: Value, path: *std.ArrayList(u8)) Allocator.Error!Value {
3713137131 const pt = sema.pt;
3713237132 const zcu = pt.zcu;
3713337133 const ip = &zcu.intern_pool;
src/Zcu.zig+20-20
......@@ -87,10 +87,10 @@ local_zir_cache: Cache.Directory,
8787
8888/// This is where all `Export` values are stored. Not all values here are necessarily valid exports;
8989/// to enumerate all exports, `single_exports` and `multi_exports` must be consulted.
90all_exports: std.ArrayListUnmanaged(Export) = .empty,
90all_exports: std.ArrayList(Export) = .empty,
9191/// This is a list of free indices in `all_exports`. These indices may be reused by exports from
9292/// future semantic analysis.
93free_exports: std.ArrayListUnmanaged(Export.Index) = .empty,
93free_exports: std.ArrayList(Export.Index) = .empty,
9494/// Maps from an `AnalUnit` which performs a single export, to the index into `all_exports` of
9595/// the export it performs. Note that the key is not the `Decl` being exported, but the `AnalUnit`
9696/// whose analysis triggered the export.
......@@ -201,8 +201,8 @@ compile_logs: std.AutoArrayHashMapUnmanaged(AnalUnit, extern struct {
201201 };
202202 }
203203}) = .empty,
204compile_log_lines: std.ArrayListUnmanaged(CompileLogLine) = .empty,
205free_compile_log_lines: std.ArrayListUnmanaged(CompileLogLine.Index) = .empty,
204compile_log_lines: std.ArrayList(CompileLogLine) = .empty,
205free_compile_log_lines: std.ArrayList(CompileLogLine.Index) = .empty,
206206/// This tracks files which triggered errors when generating AST/ZIR/ZOIR.
207207/// If not `null`, the value is a retryable error (the file status is guaranteed
208208/// to be `.retryable_failure`). Otherwise, the file status is `.astgen_failure`
......@@ -232,7 +232,7 @@ failed_files: std.AutoArrayHashMapUnmanaged(File.Index, ?[]u8) = .empty,
232232/// semantic analysis this update.
233233///
234234/// Allocated into gpa.
235failed_imports: std.ArrayListUnmanaged(struct {
235failed_imports: std.ArrayList(struct {
236236 file_index: File.Index,
237237 import_string: Zir.NullTerminatedString,
238238 import_token: Ast.TokenIndex,
......@@ -261,7 +261,7 @@ outdated_ready: std.AutoArrayHashMapUnmanaged(AnalUnit, void) = .empty,
261261/// failure was something like running out of disk space, and trying again may
262262/// succeed. On the next update, we will flush this list, marking all members of
263263/// it as outdated.
264retryable_failures: std.ArrayListUnmanaged(AnalUnit) = .empty,
264retryable_failures: std.ArrayList(AnalUnit) = .empty,
265265
266266func_body_analysis_queued: std.AutoArrayHashMapUnmanaged(InternPool.Index, void) = .empty,
267267nav_val_analysis_queued: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty,
......@@ -290,12 +290,12 @@ global_assembly: std.AutoArrayHashMapUnmanaged(AnalUnit, []u8) = .empty,
290290/// The `next` field on the `Reference` forms a linked list of all references
291291/// triggered by the key `AnalUnit`.
292292reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,
293all_references: std.ArrayListUnmanaged(Reference) = .empty,
293all_references: std.ArrayList(Reference) = .empty,
294294/// Freelist of indices in `all_references`.
295free_references: std.ArrayListUnmanaged(u32) = .empty,
295free_references: std.ArrayList(u32) = .empty,
296296
297inline_reference_frames: std.ArrayListUnmanaged(InlineReferenceFrame) = .empty,
298free_inline_reference_frames: std.ArrayListUnmanaged(InlineReferenceFrame.Index) = .empty,
297inline_reference_frames: std.ArrayList(InlineReferenceFrame) = .empty,
298free_inline_reference_frames: std.ArrayList(InlineReferenceFrame.Index) = .empty,
299299
300300/// Key is the `AnalUnit` *performing* the reference. This representation allows
301301/// incremental updates to quickly delete references caused by a specific `AnalUnit`.
......@@ -303,9 +303,9 @@ free_inline_reference_frames: std.ArrayListUnmanaged(InlineReferenceFrame.Index)
303303/// The `next` field on the `TypeReference` forms a linked list of all type references
304304/// triggered by the key `AnalUnit`.
305305type_reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,
306all_type_references: std.ArrayListUnmanaged(TypeReference) = .empty,
306all_type_references: std.ArrayList(TypeReference) = .empty,
307307/// Freelist of indices in `all_type_references`.
308free_type_references: std.ArrayListUnmanaged(u32) = .empty,
308free_type_references: std.ArrayList(u32) = .empty,
309309
310310/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element.
311311builtin_decl_values: BuiltinDecl.Memoized = .initFill(.none),
......@@ -346,7 +346,7 @@ pub const IncrementalDebugState = struct {
346346 pub const UnitInfo = struct {
347347 last_update_gen: u32,
348348 /// This information isn't easily recoverable from `InternPool`'s dependency storage format.
349 deps: std.ArrayListUnmanaged(InternPool.Dependee),
349 deps: std.ArrayList(InternPool.Dependee),
350350 };
351351 pub fn getUnitInfo(ids: *IncrementalDebugState, gpa: Allocator, unit: AnalUnit) Allocator.Error!*UnitInfo {
352352 const gop = try ids.units.getOrPut(gpa, unit);
......@@ -812,10 +812,10 @@ pub const Namespace = struct {
812812 priv_decls: std.ArrayHashMapUnmanaged(InternPool.Nav.Index, void, NavNameContext, true) = .empty,
813813 /// All `comptime` declarations in this namespace. We store these purely so that incremental
814814 /// compilation can re-use the existing `ComptimeUnit`s when a namespace changes.
815 comptime_decls: std.ArrayListUnmanaged(InternPool.ComptimeUnit.Id) = .empty,
815 comptime_decls: std.ArrayList(InternPool.ComptimeUnit.Id) = .empty,
816816 /// All `test` declarations in this namespace. We store these purely so that incremental
817817 /// compilation can re-use the existing `Nav`s when a namespace changes.
818 test_decls: std.ArrayListUnmanaged(InternPool.Nav.Index) = .empty,
818 test_decls: std.ArrayList(InternPool.Nav.Index) = .empty,
819819
820820 pub const Index = InternPool.NamespaceIndex;
821821 pub const OptionalIndex = InternPool.OptionalNamespaceIndex;
......@@ -3292,7 +3292,7 @@ pub fn mapOldZirToNew(
32923292 old_inst: Zir.Inst.Index,
32933293 new_inst: Zir.Inst.Index,
32943294 };
3295 var match_stack: std.ArrayListUnmanaged(MatchedZirDecl) = .empty;
3295 var match_stack: std.ArrayList(MatchedZirDecl) = .empty;
32963296 defer match_stack.deinit(gpa);
32973297
32983298 // Used as temporary buffers for namespace declaration instructions
......@@ -3358,10 +3358,10 @@ pub fn mapOldZirToNew(
33583358 var named_decltests: std.StringHashMapUnmanaged(Zir.Inst.Index) = .empty;
33593359 defer named_decltests.deinit(gpa);
33603360 // All unnamed tests, in order, for a best-effort match.
3361 var unnamed_tests: std.ArrayListUnmanaged(Zir.Inst.Index) = .empty;
3361 var unnamed_tests: std.ArrayList(Zir.Inst.Index) = .empty;
33623362 defer unnamed_tests.deinit(gpa);
33633363 // All comptime declarations, in order, for a best-effort match.
3364 var comptime_decls: std.ArrayListUnmanaged(Zir.Inst.Index) = .empty;
3364 var comptime_decls: std.ArrayList(Zir.Inst.Index) = .empty;
33653365 defer comptime_decls.deinit(gpa);
33663366
33673367 {
......@@ -4636,7 +4636,7 @@ pub fn addFileInMultipleModulesError(
46364636 info.modules[1].fully_qualified_name,
46374637 });
46384638
4639 var notes: std.ArrayListUnmanaged(std.zig.ErrorBundle.MessageIndex) = .empty;
4639 var notes: std.ArrayList(std.zig.ErrorBundle.MessageIndex) = .empty;
46404640 defer notes.deinit(gpa);
46414641
46424642 try notes.append(gpa, try eb.addErrorMessage(.{
......@@ -4660,7 +4660,7 @@ pub fn addFileInMultipleModulesError(
46604660fn explainWhyFileIsInModule(
46614661 zcu: *Zcu,
46624662 eb: *std.zig.ErrorBundle.Wip,
4663 notes_out: *std.ArrayListUnmanaged(std.zig.ErrorBundle.MessageIndex),
4663 notes_out: *std.ArrayList(std.zig.ErrorBundle.MessageIndex),
46644664 file: File.Index,
46654665 in_module: *Package.Module,
46664666 ref: File.Reference,
src/Zcu/PerThread.zig+2-2
......@@ -3091,8 +3091,8 @@ pub fn processExports(pt: Zcu.PerThread) !void {
30913091 }
30923092
30933093 // First, construct a mapping of every exported value and Nav to the indices of all its different exports.
3094 var nav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, std.ArrayListUnmanaged(Zcu.Export.Index)) = .empty;
3095 var uav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Index, std.ArrayListUnmanaged(Zcu.Export.Index)) = .empty;
3094 var nav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, std.ArrayList(Zcu.Export.Index)) = .empty;
3095 var uav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Index, std.ArrayList(Zcu.Export.Index)) = .empty;
30963096 defer {
30973097 for (nav_exports.values()) |*exports| {
30983098 exports.deinit(gpa);
src/codegen/aarch64/Select.zig+12-12
......@@ -7,24 +7,24 @@ nav_index: InternPool.Nav.Index,
77def_order: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, void),
88blocks: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Block),
99loops: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Loop),
10active_loops: std.ArrayListUnmanaged(Loop.Index),
10active_loops: std.ArrayList(Loop.Index),
1111loop_live: struct {
1212 set: std.AutoArrayHashMapUnmanaged(struct { Loop.Index, Air.Inst.Index }, void),
13 list: std.ArrayListUnmanaged(Air.Inst.Index),
13 list: std.ArrayList(Air.Inst.Index),
1414},
1515dom_start: u32,
1616dom_len: u32,
17dom: std.ArrayListUnmanaged(DomInt),
17dom: std.ArrayList(DomInt),
1818
1919// Wip Mir
2020saved_registers: std.enums.EnumSet(Register.Alias),
21instructions: std.ArrayListUnmanaged(codegen.aarch64.encoding.Instruction),
22literals: std.ArrayListUnmanaged(u32),
23nav_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Nav),
24uav_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Uav),
25lazy_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Lazy),
26global_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Global),
27literal_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Literal),
21instructions: std.ArrayList(codegen.aarch64.encoding.Instruction),
22literals: std.ArrayList(u32),
23nav_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Nav),
24uav_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Uav),
25lazy_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Lazy),
26global_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Global),
27literal_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Literal),
2828
2929// Stack Frame
3030returns: bool,
......@@ -44,7 +44,7 @@ stack_align: InternPool.Alignment,
4444// Value Tracking
4545live_registers: LiveRegisters,
4646live_values: std.AutoHashMapUnmanaged(Air.Inst.Index, Value.Index),
47values: std.ArrayListUnmanaged(Value),
47values: std.ArrayList(Value),
4848
4949pub const LiveRegisters = std.enums.EnumArray(Register.Alias, Value.Index);
5050
......@@ -11274,7 +11274,7 @@ pub fn dumpValues(isel: *Select, which: enum { only_referenced, all }) void {
1127411274 const ip = &zcu.intern_pool;
1127511275 const nav = ip.getNav(isel.nav_index);
1127611276
11277 var reverse_live_values: std.AutoArrayHashMapUnmanaged(Value.Index, std.ArrayListUnmanaged(Air.Inst.Index)) = .empty;
11277 var reverse_live_values: std.AutoArrayHashMapUnmanaged(Value.Index, std.ArrayList(Air.Inst.Index)) = .empty;
1127811278 defer {
1127911279 for (reverse_live_values.values()) |*list| list.deinit(gpa);
1128011280 reverse_live_values.deinit(gpa);
src/codegen/c.zig+2-2
......@@ -431,7 +431,7 @@ pub const Function = struct {
431431 lazy_fns: LazyFnMap,
432432 func_index: InternPool.Index,
433433 /// All the locals, to be emitted at the top of the function.
434 locals: std.ArrayListUnmanaged(Local) = .empty,
434 locals: std.ArrayList(Local) = .empty,
435435 /// Which locals are available for reuse, based on Type.
436436 free_locals_map: LocalsMap = .{},
437437 /// Locals which will not be freed by Liveness. This is used after a
......@@ -752,7 +752,7 @@ pub const DeclGen = struct {
752752 fwd_decl: Writer.Allocating,
753753 error_msg: ?*Zcu.ErrorMsg,
754754 ctype_pool: CType.Pool,
755 scratch: std.ArrayListUnmanaged(u32),
755 scratch: std.ArrayList(u32),
756756 /// This map contains all the UAVs we saw generating this function.
757757 /// `link.C` will merge them into its `uavs`/`aligned_uavs` fields.
758758 /// Key is the value of the UAV; value is the UAV's alignment, or
src/codegen/c/Type.zig+6-6
......@@ -971,11 +971,11 @@ pub const Info = union(enum) {
971971pub const Pool = struct {
972972 map: Map,
973973 items: std.MultiArrayList(Item),
974 extra: std.ArrayListUnmanaged(u32),
974 extra: std.ArrayList(u32),
975975
976976 string_map: Map,
977 string_indices: std.ArrayListUnmanaged(u32),
978 string_bytes: std.ArrayListUnmanaged(u8),
977 string_indices: std.ArrayList(u32),
978 string_bytes: std.ArrayList(u8),
979979
980980 const Map = std.AutoArrayHashMapUnmanaged(void, void);
981981
......@@ -1396,7 +1396,7 @@ pub const Pool = struct {
13961396 pub fn fromType(
13971397 pool: *Pool,
13981398 allocator: std.mem.Allocator,
1399 scratch: *std.ArrayListUnmanaged(u32),
1399 scratch: *std.ArrayList(u32),
14001400 ty: Type,
14011401 pt: Zcu.PerThread,
14021402 mod: *Module,
......@@ -3271,7 +3271,7 @@ pub const Pool = struct {
32713271 addExtraAssumeCapacityTo(&pool.extra, Extra, extra);
32723272 }
32733273 fn addExtraAssumeCapacityTo(
3274 array: *std.ArrayListUnmanaged(u32),
3274 array: *std.ArrayList(u32),
32753275 comptime Extra: type,
32763276 extra: Extra,
32773277 ) void {
......@@ -3309,7 +3309,7 @@ pub const Pool = struct {
33093309 }
33103310 fn addHashedExtraAssumeCapacityTo(
33113311 pool: *Pool,
3312 array: *std.ArrayListUnmanaged(u32),
3312 array: *std.ArrayList(u32),
33133313 hasher: *Hasher,
33143314 comptime Extra: type,
33153315 extra: Extra,
src/codegen/llvm.zig+13-13
......@@ -523,8 +523,8 @@ pub const Object = struct {
523523 debug_enums_fwd_ref: Builder.Metadata.Optional,
524524 debug_globals_fwd_ref: Builder.Metadata.Optional,
525525
526 debug_enums: std.ArrayListUnmanaged(Builder.Metadata),
527 debug_globals: std.ArrayListUnmanaged(Builder.Metadata),
526 debug_enums: std.ArrayList(Builder.Metadata),
527 debug_globals: std.ArrayList(Builder.Metadata),
528528
529529 debug_file_map: std.AutoHashMapUnmanaged(Zcu.File.Index, Builder.Metadata),
530530 debug_type_map: std.AutoHashMapUnmanaged(InternPool.Index, Builder.Metadata),
......@@ -571,7 +571,7 @@ pub const Object = struct {
571571 struct_field_map: std.AutoHashMapUnmanaged(ZigStructField, c_uint),
572572
573573 /// Values for `@llvm.used`.
574 used: std.ArrayListUnmanaged(Builder.Constant),
574 used: std.ArrayList(Builder.Constant),
575575
576576 const ZigStructField = struct {
577577 struct_ty: InternPool.Index,
......@@ -1298,7 +1298,7 @@ pub const Object = struct {
12981298 // instructions. Depending on the calling convention, this list is not necessarily
12991299 // a bijection with the actual LLVM parameters of the function.
13001300 const gpa = o.gpa;
1301 var args: std.ArrayListUnmanaged(Builder.Value) = .empty;
1301 var args: std.ArrayList(Builder.Value) = .empty;
13021302 defer args.deinit(gpa);
13031303
13041304 {
......@@ -2318,7 +2318,7 @@ pub const Object = struct {
23182318
23192319 switch (ip.indexToKey(ty.toIntern())) {
23202320 .tuple_type => |tuple| {
2321 var fields: std.ArrayListUnmanaged(Builder.Metadata) = .empty;
2321 var fields: std.ArrayList(Builder.Metadata) = .empty;
23222322 defer fields.deinit(gpa);
23232323
23242324 try fields.ensureUnusedCapacity(gpa, tuple.types.len);
......@@ -2392,7 +2392,7 @@ pub const Object = struct {
23922392
23932393 const struct_type = zcu.typeToStruct(ty).?;
23942394
2395 var fields: std.ArrayListUnmanaged(Builder.Metadata) = .empty;
2395 var fields: std.ArrayList(Builder.Metadata) = .empty;
23962396 defer fields.deinit(gpa);
23972397
23982398 try fields.ensureUnusedCapacity(gpa, struct_type.field_types.len);
......@@ -2484,7 +2484,7 @@ pub const Object = struct {
24842484 return debug_union_type;
24852485 }
24862486
2487 var fields: std.ArrayListUnmanaged(Builder.Metadata) = .empty;
2487 var fields: std.ArrayList(Builder.Metadata) = .empty;
24882488 defer fields.deinit(gpa);
24892489
24902490 try fields.ensureUnusedCapacity(gpa, union_type.loadTagType(ip).names.len);
......@@ -3273,7 +3273,7 @@ pub const Object = struct {
32733273 return int_ty;
32743274 }
32753275
3276 var llvm_field_types: std.ArrayListUnmanaged(Builder.Type) = .empty;
3276 var llvm_field_types: std.ArrayList(Builder.Type) = .empty;
32773277 defer llvm_field_types.deinit(o.gpa);
32783278 // Although we can estimate how much capacity to add, these cannot be
32793279 // relied upon because of the recursive calls to lowerType below.
......@@ -3342,7 +3342,7 @@ pub const Object = struct {
33423342 return ty;
33433343 },
33443344 .tuple_type => |tuple_type| {
3345 var llvm_field_types: std.ArrayListUnmanaged(Builder.Type) = .empty;
3345 var llvm_field_types: std.ArrayList(Builder.Type) = .empty;
33463346 defer llvm_field_types.deinit(o.gpa);
33473347 // Although we can estimate how much capacity to add, these cannot be
33483348 // relied upon because of the recursive calls to lowerType below.
......@@ -3531,7 +3531,7 @@ pub const Object = struct {
35313531 const target = zcu.getTarget();
35323532 const ret_ty = try lowerFnRetTy(o, pt, fn_info);
35333533
3534 var llvm_params: std.ArrayListUnmanaged(Builder.Type) = .empty;
3534 var llvm_params: std.ArrayList(Builder.Type) = .empty;
35353535 defer llvm_params.deinit(o.gpa);
35363536
35373537 if (firstParamSRet(fn_info, zcu, target)) {
......@@ -4741,7 +4741,7 @@ pub const FuncGen = struct {
47414741
47424742 const Fuzz = struct {
47434743 counters_variable: Builder.Variable.Index,
4744 pcs: std.ArrayListUnmanaged(Builder.Constant),
4744 pcs: std.ArrayList(Builder.Constant),
47454745
47464746 fn deinit(f: *Fuzz, gpa: Allocator) void {
47474747 f.pcs.deinit(gpa);
......@@ -7251,7 +7251,7 @@ pub const FuncGen = struct {
72517251 const inputs: []const Air.Inst.Ref = @ptrCast(self.air.extra.items[extra_i..][0..extra.data.inputs_len]);
72527252 extra_i += inputs.len;
72537253
7254 var llvm_constraints: std.ArrayListUnmanaged(u8) = .empty;
7254 var llvm_constraints: std.ArrayList(u8) = .empty;
72557255 defer llvm_constraints.deinit(gpa);
72567256
72577257 var arena_allocator = std.heap.ArenaAllocator.init(gpa);
......@@ -13133,7 +13133,7 @@ fn maxIntConst(b: *Builder, max_ty: Type, as_ty: Builder.Type, zcu: *const Zcu)
1313313133/// Appends zero or more LLVM constraints to `llvm_constraints`, returning how many were added.
1313413134fn appendConstraints(
1313513135 gpa: Allocator,
13136 llvm_constraints: *std.ArrayListUnmanaged(u8),
13136 llvm_constraints: *std.ArrayList(u8),
1313713137 zig_name: []const u8,
1313813138 target: *const std.Target,
1313913139) error{OutOfMemory}!usize {
src/codegen/riscv64/CodeGen.zig+3-3
......@@ -90,7 +90,7 @@ scope_generation: u32,
9090/// The value is an offset into the `Function` `code` from the beginning.
9191/// To perform the reloc, write 32-bit signed little-endian integer
9292/// which is a relative jump, based on the address following the reloc.
93exitlude_jump_relocs: std.ArrayListUnmanaged(usize) = .empty,
93exitlude_jump_relocs: std.ArrayList(usize) = .empty,
9494
9595reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined,
9696
......@@ -609,7 +609,7 @@ const FrameAlloc = struct {
609609};
610610
611611const BlockData = struct {
612 relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty,
612 relocs: std.ArrayList(Mir.Inst.Index) = .empty,
613613 state: State,
614614
615615 fn deinit(bd: *BlockData, gpa: Allocator) void {
......@@ -6200,7 +6200,7 @@ fn airAsm(func: *Func, inst: Air.Inst.Index) !void {
62006200
62016201 const Label = struct {
62026202 target: Mir.Inst.Index = undefined,
6203 pending_relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty,
6203 pending_relocs: std.ArrayList(Mir.Inst.Index) = .empty,
62046204
62056205 const Kind = enum { definition, reference };
62066206
src/codegen/riscv64/Emit.zig+1-1
......@@ -11,7 +11,7 @@ prev_di_column: u32,
1111prev_di_pc: usize,
1212
1313code_offset_mapping: std.AutoHashMapUnmanaged(Mir.Inst.Index, usize) = .empty,
14relocs: std.ArrayListUnmanaged(Reloc) = .empty,
14relocs: std.ArrayList(Reloc) = .empty,
1515
1616pub const Error = Lower.Error || std.Io.Writer.Error || error{
1717 EmitFail,
src/codegen/sparc64/CodeGen.zig+3-3
......@@ -68,7 +68,7 @@ stack_align: Alignment,
6868/// MIR Instructions
6969mir_instructions: std.MultiArrayList(Mir.Inst) = .{},
7070/// MIR extra data
71mir_extra: std.ArrayListUnmanaged(u32) = .empty,
71mir_extra: std.ArrayList(u32) = .empty,
7272
7373/// Byte offset within the source file of the ending curly.
7474end_di_line: u32,
......@@ -77,7 +77,7 @@ end_di_column: u32,
7777/// The value is an offset into the `Function` `code` from the beginning.
7878/// To perform the reloc, write 32-bit signed little-endian integer
7979/// which is a relative jump, based on the address following the reloc.
80exitlude_jump_relocs: std.ArrayListUnmanaged(usize) = .empty,
80exitlude_jump_relocs: std.ArrayList(usize) = .empty,
8181
8282reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined,
8383
......@@ -218,7 +218,7 @@ const StackAllocation = struct {
218218};
219219
220220const BlockData = struct {
221 relocs: std.ArrayListUnmanaged(Mir.Inst.Index),
221 relocs: std.ArrayList(Mir.Inst.Index),
222222 /// The first break instruction encounters `null` here and chooses a
223223 /// machine code value for the block result, populating this field.
224224 /// Following break instructions encounter that value and use it for
src/codegen/sparc64/Emit.zig+2-2
......@@ -32,7 +32,7 @@ prev_di_pc: usize,
3232branch_types: std.AutoHashMapUnmanaged(Mir.Inst.Index, BranchType) = .empty,
3333/// For every forward branch, maps the target instruction to a list of
3434/// branches which branch to this target instruction
35branch_forward_origins: std.AutoHashMapUnmanaged(Mir.Inst.Index, std.ArrayListUnmanaged(Mir.Inst.Index)) = .empty,
35branch_forward_origins: std.AutoHashMapUnmanaged(Mir.Inst.Index, std.ArrayList(Mir.Inst.Index)) = .empty,
3636/// For backward branches: stores the code offset of the target
3737/// instruction
3838///
......@@ -568,7 +568,7 @@ fn lowerBranches(emit: *Emit) !void {
568568 if (emit.branch_forward_origins.getPtr(target_inst)) |origin_list| {
569569 try origin_list.append(gpa, inst);
570570 } else {
571 var origin_list: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty;
571 var origin_list: std.ArrayList(Mir.Inst.Index) = .empty;
572572 try origin_list.append(gpa, inst);
573573 try emit.branch_forward_origins.put(gpa, target_inst, origin_list);
574574 }
src/codegen/spirv/Assembler.zig+4-4
......@@ -14,16 +14,16 @@ const StorageClass = spec.StorageClass;
1414const Assembler = @This();
1515
1616cg: *CodeGen,
17errors: std.ArrayListUnmanaged(ErrorMsg) = .empty,
17errors: std.ArrayList(ErrorMsg) = .empty,
1818src: []const u8 = undefined,
1919/// `ass.src` tokenized.
20tokens: std.ArrayListUnmanaged(Token) = .empty,
20tokens: std.ArrayList(Token) = .empty,
2121current_token: u32 = 0,
2222/// The instruction that is currently being parsed or has just been parsed.
2323inst: struct {
2424 opcode: Opcode = undefined,
25 operands: std.ArrayListUnmanaged(Operand) = .empty,
26 string_bytes: std.ArrayListUnmanaged(u8) = .empty,
25 operands: std.ArrayList(Operand) = .empty,
26 string_bytes: std.ArrayList(u8) = .empty,
2727
2828 fn result(ass: @This()) ?AsmValue.Ref {
2929 for (ass.operands.items[0..@min(ass.operands.items.len, 2)]) |op| {
src/codegen/spirv/CodeGen.zig+7-7
......@@ -83,7 +83,7 @@ const ControlFlow = union(enum) {
8383 selection: struct {
8484 /// In order to know which merges we still need to do, we need to keep
8585 /// a stack of those.
86 merge_stack: std.ArrayListUnmanaged(SelectionMerge) = .empty,
86 merge_stack: std.ArrayList(SelectionMerge) = .empty,
8787 },
8888 /// For a `loop` type block, we can early-exit the block by
8989 /// jumping to the loop exit node, and we don't need to generate
......@@ -91,7 +91,7 @@ const ControlFlow = union(enum) {
9191 loop: struct {
9292 /// The next block to jump to can be determined from any number
9393 /// of conditions that jump to the loop exit.
94 merges: std.ArrayListUnmanaged(Incoming) = .empty,
94 merges: std.ArrayList(Incoming) = .empty,
9595 /// The label id of the loop's merge block.
9696 merge_block: Id,
9797 },
......@@ -105,7 +105,7 @@ const ControlFlow = union(enum) {
105105 }
106106 };
107107 /// This determines how exits from the current block must be handled.
108 block_stack: std.ArrayListUnmanaged(*Structured.Block) = .empty,
108 block_stack: std.ArrayList(*Structured.Block) = .empty,
109109 block_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty,
110110 };
111111
......@@ -117,7 +117,7 @@ const ControlFlow = union(enum) {
117117
118118 const Block = struct {
119119 label: ?Id = null,
120 incoming_blocks: std.ArrayListUnmanaged(Incoming) = .empty,
120 incoming_blocks: std.ArrayList(Incoming) = .empty,
121121 };
122122
123123 /// We need to keep track of result ids for block labels, as well as the 'incoming'
......@@ -151,9 +151,9 @@ control_flow: ControlFlow,
151151base_line: u32,
152152block_label: Id = .none,
153153next_arg_index: u32 = 0,
154args: std.ArrayListUnmanaged(Id) = .empty,
154args: std.ArrayList(Id) = .empty,
155155inst_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty,
156id_scratch: std.ArrayListUnmanaged(Id) = .empty,
156id_scratch: std.ArrayList(Id) = .empty,
157157prologue: Section = .{},
158158body: Section = .{},
159159error_msg: ?*Zcu.ErrorMsg = null,
......@@ -5783,7 +5783,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index) !void {
57835783 }
57845784 }
57855785
5786 var incoming_structured_blocks: std.ArrayListUnmanaged(ControlFlow.Structured.Block.Incoming) = .empty;
5786 var incoming_structured_blocks: std.ArrayList(ControlFlow.Structured.Block.Incoming) = .empty;
57875787 defer incoming_structured_blocks.deinit(gpa);
57885788
57895789 if (cg.control_flow == .structured) {
src/codegen/spirv/Module.zig+2-2
......@@ -26,8 +26,8 @@ zcu: *Zcu,
2626nav_link: std.AutoHashMapUnmanaged(InternPool.Nav.Index, Decl.Index) = .empty,
2727uav_link: std.AutoHashMapUnmanaged(struct { InternPool.Index, spec.StorageClass }, Decl.Index) = .empty,
2828intern_map: std.AutoHashMapUnmanaged(struct { InternPool.Index, Repr }, Id) = .empty,
29decls: std.ArrayListUnmanaged(Decl) = .empty,
30decl_deps: std.ArrayListUnmanaged(Decl.Index) = .empty,
29decls: std.ArrayList(Decl) = .empty,
30decl_deps: std.ArrayList(Decl.Index) = .empty,
3131entry_points: std.AutoArrayHashMapUnmanaged(Id, EntryPoint) = .empty,
3232/// This map serves a dual purpose:
3333/// - It keeps track of pointers that are currently being emitted, so that we can tell
src/codegen/spirv/Section.zig+1-1
......@@ -13,7 +13,7 @@ const Log2Word = std.math.Log2Int(Word);
1313
1414const Opcode = spec.Opcode;
1515
16instructions: std.ArrayListUnmanaged(Word) = .empty,
16instructions: std.ArrayList(Word) = .empty,
1717
1818pub fn deinit(section: *Section, allocator: Allocator) void {
1919 section.instructions.deinit(allocator);
src/codegen/wasm/CodeGen.zig+9-9
......@@ -53,7 +53,7 @@ func_index: InternPool.Index,
5353/// When we return from a branch, the branch will be popped from this list,
5454/// which means branches can only contain references from within its own branch,
5555/// or a branch higher (lower index) in the tree.
56branches: std.ArrayListUnmanaged(Branch) = .empty,
56branches: std.ArrayList(Branch) = .empty,
5757/// Table to save `WValue`'s generated by an `Air.Inst`
5858// values: ValueTable,
5959/// Mapping from Air.Inst.Index to block ids
......@@ -73,7 +73,7 @@ arg_index: u32 = 0,
7373/// List of simd128 immediates. Each value is stored as an array of bytes.
7474/// This list will only be populated for 128bit-simd values when the target features
7575/// are enabled also.
76simd_immediates: std.ArrayListUnmanaged([16]u8) = .empty,
76simd_immediates: std.ArrayList([16]u8) = .empty,
7777/// The Target we're emitting (used to call intInfo)
7878target: *const std.Target,
7979ptr_size: enum { wasm32, wasm64 },
......@@ -81,10 +81,10 @@ pt: Zcu.PerThread,
8181/// List of MIR Instructions
8282mir_instructions: std.MultiArrayList(Mir.Inst),
8383/// Contains extra data for MIR
84mir_extra: std.ArrayListUnmanaged(u32),
84mir_extra: std.ArrayList(u32),
8585/// List of all locals' types generated throughout this declaration
8686/// used to emit locals count at start of 'code' section.
87mir_locals: std.ArrayListUnmanaged(std.wasm.Valtype),
87mir_locals: std.ArrayList(std.wasm.Valtype),
8888/// Set of all UAVs referenced by this function. Key is the UAV value, value is the alignment.
8989/// `.none` means naturally aligned. An explicit alignment is never less than the natural alignment.
9090mir_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),
......@@ -121,19 +121,19 @@ stack_alignment: Alignment = .@"16",
121121// allows us to re-use locals that are no longer used. e.g. a temporary local.
122122/// A list of indexes which represents a local of valtype `i32`.
123123/// It is illegal to store a non-i32 valtype in this list.
124free_locals_i32: std.ArrayListUnmanaged(u32) = .empty,
124free_locals_i32: std.ArrayList(u32) = .empty,
125125/// A list of indexes which represents a local of valtype `i64`.
126126/// It is illegal to store a non-i64 valtype in this list.
127free_locals_i64: std.ArrayListUnmanaged(u32) = .empty,
127free_locals_i64: std.ArrayList(u32) = .empty,
128128/// A list of indexes which represents a local of valtype `f32`.
129129/// It is illegal to store a non-f32 valtype in this list.
130free_locals_f32: std.ArrayListUnmanaged(u32) = .empty,
130free_locals_f32: std.ArrayList(u32) = .empty,
131131/// A list of indexes which represents a local of valtype `f64`.
132132/// It is illegal to store a non-f64 valtype in this list.
133free_locals_f64: std.ArrayListUnmanaged(u32) = .empty,
133free_locals_f64: std.ArrayList(u32) = .empty,
134134/// A list of indexes which represents a local of valtype `v127`.
135135/// It is illegal to store a non-v128 valtype in this list.
136free_locals_v128: std.ArrayListUnmanaged(u32) = .empty,
136free_locals_v128: std.ArrayList(u32) = .empty,
137137
138138/// When in debug mode, this tracks if no `finishAir` was missed.
139139/// Forgetting to call `finishAir` will cause the result to not be
src/codegen/wasm/Mir.zig+1-1
......@@ -669,7 +669,7 @@ pub fn deinit(mir: *Mir, gpa: std.mem.Allocator) void {
669669 mir.* = undefined;
670670}
671671
672pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayListUnmanaged(u8)) std.mem.Allocator.Error!void {
672pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayList(u8)) std.mem.Allocator.Error!void {
673673 const gpa = wasm.base.comp.gpa;
674674
675675 // Write the locals in the prologue of the function body.
src/codegen/x86_64/CodeGen.zig+8-8
......@@ -113,21 +113,21 @@ eflags_inst: ?Air.Inst.Index = null,
113113/// MIR Instructions
114114mir_instructions: std.MultiArrayList(Mir.Inst) = .empty,
115115/// MIR extra data
116mir_extra: std.ArrayListUnmanaged(u32) = .empty,
117mir_string_bytes: std.ArrayListUnmanaged(u8) = .empty,
116mir_extra: std.ArrayList(u32) = .empty,
117mir_string_bytes: std.ArrayList(u8) = .empty,
118118mir_strings: std.HashMapUnmanaged(
119119 u32,
120120 void,
121121 std.hash_map.StringIndexContext,
122122 std.hash_map.default_max_load_percentage,
123123) = .empty,
124mir_locals: std.ArrayListUnmanaged(Mir.Local) = .empty,
125mir_table: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty,
124mir_locals: std.ArrayList(Mir.Local) = .empty,
125mir_table: std.ArrayList(Mir.Inst.Index) = .empty,
126126
127127/// The value is an offset into the `Function` `code` from the beginning.
128128/// To perform the reloc, write 32-bit signed little-endian integer
129129/// which is a relative jump, based on the address following the reloc.
130epilogue_relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty,
130epilogue_relocs: std.ArrayList(Mir.Inst.Index) = .empty,
131131
132132reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined,
133133inst_tracking: InstTrackingMap = .empty,
......@@ -156,7 +156,7 @@ loop_switches: std.AutoHashMapUnmanaged(Air.Inst.Index, struct {
156156 min: Value,
157157 else_relocs: union(enum) {
158158 @"unreachable",
159 forward: std.ArrayListUnmanaged(Mir.Inst.Index),
159 forward: std.ArrayList(Mir.Inst.Index),
160160 backward: Mir.Inst.Index,
161161 },
162162}) = .empty,
......@@ -855,7 +855,7 @@ const FrameAlloc = struct {
855855};
856856
857857const BlockData = struct {
858 relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty,
858 relocs: std.ArrayList(Mir.Inst.Index) = .empty,
859859 state: State,
860860
861861 fn deinit(self: *BlockData, gpa: Allocator) void {
......@@ -177329,7 +177329,7 @@ fn airAsm(self: *CodeGen, inst: Air.Inst.Index) !void {
177329177329
177330177330 const Label = struct {
177331177331 target: Mir.Inst.Index = undefined,
177332 pending_relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty,
177332 pending_relocs: std.ArrayList(Mir.Inst.Index) = .empty,
177333177333
177334177334 const Kind = enum { definition, reference };
177335177335
src/codegen/x86_64/Emit.zig+3-3
......@@ -12,9 +12,9 @@ prev_di_loc: Loc,
1212/// Relative to the beginning of `code`.
1313prev_di_pc: usize,
1414
15code_offset_mapping: std.ArrayListUnmanaged(u32),
16relocs: std.ArrayListUnmanaged(Reloc),
17table_relocs: std.ArrayListUnmanaged(TableReloc),
15code_offset_mapping: std.ArrayList(u32),
16relocs: std.ArrayList(Reloc),
17table_relocs: std.ArrayList(TableReloc),
1818
1919pub const Error = Lower.Error || error{
2020 EmitFail,
src/link.zig+18-18
......@@ -35,9 +35,9 @@ pub const Diags = struct {
3535 /// needing an allocator for things besides error reporting.
3636 gpa: Allocator,
3737 mutex: std.Thread.Mutex,
38 msgs: std.ArrayListUnmanaged(Msg),
38 msgs: std.ArrayList(Msg),
3939 flags: Flags,
40 lld: std.ArrayListUnmanaged(Lld),
40 lld: std.ArrayList(Lld),
4141
4242 pub const SourceLocation = union(enum) {
4343 none,
......@@ -1775,19 +1775,19 @@ pub fn resolveInputs(
17751775 target: *const std.Target,
17761776 /// This function mutates this array but does not take ownership.
17771777 /// Allocated with `gpa`.
1778 unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput),
1778 unresolved_inputs: *std.ArrayList(UnresolvedInput),
17791779 /// Allocated with `gpa`.
1780 resolved_inputs: *std.ArrayListUnmanaged(Input),
1780 resolved_inputs: *std.ArrayList(Input),
17811781 lib_directories: []const Cache.Directory,
17821782 color: std.zig.Color,
17831783) Allocator.Error!void {
1784 var checked_paths: std.ArrayListUnmanaged(u8) = .empty;
1784 var checked_paths: std.ArrayList(u8) = .empty;
17851785 defer checked_paths.deinit(gpa);
17861786
1787 var ld_script_bytes: std.ArrayListUnmanaged(u8) = .empty;
1787 var ld_script_bytes: std.ArrayList(u8) = .empty;
17881788 defer ld_script_bytes.deinit(gpa);
17891789
1790 var failed_libs: std.ArrayListUnmanaged(struct {
1790 var failed_libs: std.ArrayList(struct {
17911791 name: []const u8,
17921792 strategy: UnresolvedInput.SearchStrategy,
17931793 checked_paths: []const u8,
......@@ -2007,13 +2007,13 @@ fn resolveLibInput(
20072007 gpa: Allocator,
20082008 arena: Allocator,
20092009 /// Allocated via `gpa`.
2010 unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput),
2010 unresolved_inputs: *std.ArrayList(UnresolvedInput),
20112011 /// Allocated via `gpa`.
2012 resolved_inputs: *std.ArrayListUnmanaged(Input),
2012 resolved_inputs: *std.ArrayList(Input),
20132013 /// Allocated via `gpa`.
2014 checked_paths: *std.ArrayListUnmanaged(u8),
2014 checked_paths: *std.ArrayList(u8),
20152015 /// Allocated via `gpa`.
2016 ld_script_bytes: *std.ArrayListUnmanaged(u8),
2016 ld_script_bytes: *std.ArrayList(u8),
20172017 lib_directory: Directory,
20182018 name_query: UnresolvedInput.NameQuery,
20192019 target: *const std.Target,
......@@ -2097,7 +2097,7 @@ fn resolveLibInput(
20972097}
20982098
20992099fn finishResolveLibInput(
2100 resolved_inputs: *std.ArrayListUnmanaged(Input),
2100 resolved_inputs: *std.ArrayList(Input),
21012101 path: Path,
21022102 file: std.fs.File,
21032103 link_mode: std.builtin.LinkMode,
......@@ -2125,11 +2125,11 @@ fn resolvePathInput(
21252125 gpa: Allocator,
21262126 arena: Allocator,
21272127 /// Allocated with `gpa`.
2128 unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput),
2128 unresolved_inputs: *std.ArrayList(UnresolvedInput),
21292129 /// Allocated with `gpa`.
2130 resolved_inputs: *std.ArrayListUnmanaged(Input),
2130 resolved_inputs: *std.ArrayList(Input),
21312131 /// Allocated via `gpa`.
2132 ld_script_bytes: *std.ArrayListUnmanaged(u8),
2132 ld_script_bytes: *std.ArrayList(u8),
21332133 target: *const std.Target,
21342134 pq: UnresolvedInput.PathQuery,
21352135 color: std.zig.Color,
......@@ -2167,11 +2167,11 @@ fn resolvePathInputLib(
21672167 gpa: Allocator,
21682168 arena: Allocator,
21692169 /// Allocated with `gpa`.
2170 unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput),
2170 unresolved_inputs: *std.ArrayList(UnresolvedInput),
21712171 /// Allocated with `gpa`.
2172 resolved_inputs: *std.ArrayListUnmanaged(Input),
2172 resolved_inputs: *std.ArrayList(Input),
21732173 /// Allocated via `gpa`.
2174 ld_script_bytes: *std.ArrayListUnmanaged(u8),
2174 ld_script_bytes: *std.ArrayList(u8),
21752175 target: *const std.Target,
21762176 pq: UnresolvedInput.PathQuery,
21772177 link_mode: std.builtin.LinkMode,
src/link/C.zig+6-6
......@@ -29,7 +29,7 @@ navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvBlock),
2929/// All the string bytes of rendered C code, all squished into one array.
3030/// While in progress, a separate buffer is used, and then when finished, the
3131/// buffer is copied into this one.
32string_bytes: std.ArrayListUnmanaged(u8),
32string_bytes: std.ArrayList(u8),
3333/// Tracks all the anonymous decls that are used by all the decls so they can
3434/// be rendered during flush().
3535uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, AvBlock),
......@@ -519,16 +519,16 @@ pub fn flush(self: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.P
519519
520520const Flush = struct {
521521 ctype_pool: codegen.CType.Pool,
522 ctype_global_from_decl_map: std.ArrayListUnmanaged(codegen.CType),
523 ctypes: std.ArrayListUnmanaged(u8),
522 ctype_global_from_decl_map: std.ArrayList(codegen.CType),
523 ctypes: std.ArrayList(u8),
524524
525525 lazy_ctype_pool: codegen.CType.Pool,
526526 lazy_fns: LazyFns,
527 lazy_fwd_decl: std.ArrayListUnmanaged(u8),
528 lazy_code: std.ArrayListUnmanaged(u8),
527 lazy_fwd_decl: std.ArrayList(u8),
528 lazy_code: std.ArrayList(u8),
529529
530530 /// We collect a list of buffers to write, and write them all at once with pwritev 😎
531 all_buffers: std.ArrayListUnmanaged([]const u8),
531 all_buffers: std.ArrayList([]const u8),
532532 /// Keeps track of the total bytes of `all_buffers`.
533533 file_size: u64,
534534
src/link/Dwarf.zig+12-12
......@@ -211,7 +211,7 @@ const DebugRngLists = struct {
211211};
212212
213213const StringSection = struct {
214 contents: std.ArrayListUnmanaged(u8),
214 contents: std.ArrayList(u8),
215215 map: std.AutoArrayHashMapUnmanaged(void, void),
216216 section: Section,
217217
......@@ -275,7 +275,7 @@ pub const Section = struct {
275275 first: Unit.Index.Optional,
276276 last: Unit.Index.Optional,
277277 len: u64,
278 units: std.ArrayListUnmanaged(Unit),
278 units: std.ArrayList(Unit),
279279
280280 pub const Index = enum {
281281 debug_abbrev,
......@@ -511,9 +511,9 @@ const Unit = struct {
511511 trailer_len: u32,
512512 /// data length in bytes
513513 len: u32,
514 entries: std.ArrayListUnmanaged(Entry),
515 cross_unit_relocs: std.ArrayListUnmanaged(CrossUnitReloc),
516 cross_section_relocs: std.ArrayListUnmanaged(CrossSectionReloc),
514 entries: std.ArrayList(Entry),
515 cross_unit_relocs: std.ArrayList(CrossUnitReloc),
516 cross_section_relocs: std.ArrayList(CrossSectionReloc),
517517
518518 const Index = enum(u32) {
519519 main,
......@@ -790,10 +790,10 @@ const Entry = struct {
790790 off: u32,
791791 /// data length in bytes
792792 len: u32,
793 cross_entry_relocs: std.ArrayListUnmanaged(CrossEntryReloc),
794 cross_unit_relocs: std.ArrayListUnmanaged(CrossUnitReloc),
795 cross_section_relocs: std.ArrayListUnmanaged(CrossSectionReloc),
796 external_relocs: std.ArrayListUnmanaged(ExternalReloc),
793 cross_entry_relocs: std.ArrayList(CrossEntryReloc),
794 cross_unit_relocs: std.ArrayList(CrossUnitReloc),
795 cross_section_relocs: std.ArrayList(CrossSectionReloc),
796 external_relocs: std.ArrayList(ExternalReloc),
797797
798798 fn clear(entry: *Entry) void {
799799 entry.cross_entry_relocs.clearRetainingCapacity();
......@@ -1474,7 +1474,7 @@ pub const WipNav = struct {
14741474 func: InternPool.Index,
14751475 func_sym_index: u32,
14761476 func_high_pc: u32,
1477 blocks: std.ArrayListUnmanaged(struct {
1477 blocks: std.ArrayList(struct {
14781478 abbrev_code: u32,
14791479 low_pc_off: u64,
14801480 high_pc: u32,
......@@ -2300,8 +2300,8 @@ pub const WipNav = struct {
23002300 }
23012301
23022302 const PendingLazy = struct {
2303 types: std.ArrayListUnmanaged(InternPool.Index),
2304 values: std.ArrayListUnmanaged(InternPool.Index),
2303 types: std.ArrayList(InternPool.Index),
2304 values: std.ArrayList(InternPool.Index),
23052305
23062306 const empty: PendingLazy = .{ .types = .empty, .values = .empty };
23072307 };
src/link/Elf.zig+22-22
......@@ -26,10 +26,10 @@ files: std.MultiArrayList(File.Entry) = .{},
2626/// Long-lived list of all file descriptors.
2727/// We store them globally rather than per actual File so that we can re-use
2828/// one file handle per every object file within an archive.
29file_handles: std.ArrayListUnmanaged(File.Handle) = .empty,
29file_handles: std.ArrayList(File.Handle) = .empty,
3030zig_object_index: ?File.Index = null,
3131linker_defined_index: ?File.Index = null,
32objects: std.ArrayListUnmanaged(File.Index) = .empty,
32objects: std.ArrayList(File.Index) = .empty,
3333shared_objects: std.StringArrayHashMapUnmanaged(File.Index) = .empty,
3434
3535/// List of all output sections and their associated metadata.
......@@ -49,23 +49,23 @@ page_size: u32,
4949default_sym_version: elf.Versym,
5050
5151/// .shstrtab buffer
52shstrtab: std.ArrayListUnmanaged(u8) = .empty,
52shstrtab: std.ArrayList(u8) = .empty,
5353/// .symtab buffer
54symtab: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty,
54symtab: std.ArrayList(elf.Elf64_Sym) = .empty,
5555/// .strtab buffer
56strtab: std.ArrayListUnmanaged(u8) = .empty,
56strtab: std.ArrayList(u8) = .empty,
5757/// Dynamic symbol table. Only populated and emitted when linking dynamically.
5858dynsym: DynsymSection = .{},
5959/// .dynstrtab buffer
60dynstrtab: std.ArrayListUnmanaged(u8) = .empty,
60dynstrtab: std.ArrayList(u8) = .empty,
6161/// Version symbol table. Only populated and emitted when linking dynamically.
62versym: std.ArrayListUnmanaged(elf.Versym) = .empty,
62versym: std.ArrayList(elf.Versym) = .empty,
6363/// .verneed section
6464verneed: VerneedSection = .{},
6565/// .got section
6666got: GotSection = .{},
6767/// .rela.dyn section
68rela_dyn: std.ArrayListUnmanaged(elf.Elf64_Rela) = .empty,
68rela_dyn: std.ArrayList(elf.Elf64_Rela) = .empty,
6969/// .dynamic section
7070dynamic: DynamicSection = .{},
7171/// .hash section
......@@ -81,10 +81,10 @@ plt_got: PltGotSection = .{},
8181/// .copyrel section
8282copy_rel: CopyRelSection = .{},
8383/// .rela.plt section
84rela_plt: std.ArrayListUnmanaged(elf.Elf64_Rela) = .empty,
84rela_plt: std.ArrayList(elf.Elf64_Rela) = .empty,
8585/// SHT_GROUP sections
8686/// Applies only to a relocatable.
87group_sections: std.ArrayListUnmanaged(GroupSection) = .empty,
87group_sections: std.ArrayList(GroupSection) = .empty,
8888
8989resolver: SymbolResolver = .{},
9090
......@@ -92,15 +92,15 @@ has_text_reloc: bool = false,
9292num_ifunc_dynrelocs: usize = 0,
9393
9494/// List of range extension thunks.
95thunks: std.ArrayListUnmanaged(Thunk) = .empty,
95thunks: std.ArrayList(Thunk) = .empty,
9696
9797/// List of output merge sections with deduped contents.
98merge_sections: std.ArrayListUnmanaged(Merge.Section) = .empty,
98merge_sections: std.ArrayList(Merge.Section) = .empty,
9999comment_merge_section_index: ?Merge.Section.Index = null,
100100
101101/// `--verbose-link` output.
102102/// Initialized on creation, appended to as inputs are added, printed during `flush`.
103dump_argv_list: std.ArrayListUnmanaged([]const u8),
103dump_argv_list: std.ArrayList([]const u8),
104104
105105const SectionIndexes = struct {
106106 copy_rel: ?u32 = null,
......@@ -127,7 +127,7 @@ const SectionIndexes = struct {
127127 symtab: ?u32 = null,
128128};
129129
130const ProgramHeaderList = std.ArrayListUnmanaged(elf.Elf64_Phdr);
130const ProgramHeaderList = std.ArrayList(elf.Elf64_Phdr);
131131
132132const OptionalProgramHeaderIndex = enum(u16) {
133133 none = std.math.maxInt(u16),
......@@ -1098,12 +1098,12 @@ fn parseObject(self: *Elf, obj: link.Input.Object) !void {
10981098fn parseArchive(
10991099 gpa: Allocator,
11001100 diags: *Diags,
1101 file_handles: *std.ArrayListUnmanaged(File.Handle),
1101 file_handles: *std.ArrayList(File.Handle),
11021102 files: *std.MultiArrayList(File.Entry),
11031103 target: *const std.Target,
11041104 debug_fmt_strip: bool,
11051105 default_sym_version: elf.Versym,
1106 objects: *std.ArrayListUnmanaged(File.Index),
1106 objects: *std.ArrayList(File.Index),
11071107 obj: link.Input.Object,
11081108 is_static_lib: bool,
11091109) !void {
......@@ -1748,7 +1748,7 @@ pub fn deleteExport(
17481748fn checkDuplicates(self: *Elf) !void {
17491749 const gpa = self.base.comp.gpa;
17501750
1751 var dupes = std.AutoArrayHashMap(SymbolResolver.Index, std.ArrayListUnmanaged(File.Index)).init(gpa);
1751 var dupes = std.AutoArrayHashMap(SymbolResolver.Index, std.ArrayList(File.Index)).init(gpa);
17521752 defer {
17531753 for (dupes.values()) |*list| {
17541754 list.deinit(gpa);
......@@ -3647,7 +3647,7 @@ fn fileLookup(files: std.MultiArrayList(File.Entry), index: File.Index, zig_obje
36473647
36483648pub fn addFileHandle(
36493649 gpa: Allocator,
3650 file_handles: *std.ArrayListUnmanaged(File.Handle),
3650 file_handles: *std.ArrayList(File.Handle),
36513651 handle: fs.File,
36523652) Allocator.Error!File.HandleIndex {
36533653 try file_handles.append(gpa, handle);
......@@ -4204,8 +4204,8 @@ pub const Ref = struct {
42044204};
42054205
42064206pub const SymbolResolver = struct {
4207 keys: std.ArrayListUnmanaged(Key) = .empty,
4208 values: std.ArrayListUnmanaged(Ref) = .empty,
4207 keys: std.ArrayList(Key) = .empty,
4208 values: std.ArrayList(Ref) = .empty,
42094209 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
42104210
42114211 const Result = struct {
......@@ -4303,7 +4303,7 @@ const Section = struct {
43034303 /// List of atoms contributing to this section.
43044304 /// TODO currently this is only used for relocations tracking in relocatable mode
43054305 /// but will be merged with atom_list_2.
4306 atom_list: std.ArrayListUnmanaged(Ref) = .empty,
4306 atom_list: std.ArrayList(Ref) = .empty,
43074307
43084308 /// List of atoms contributing to this section.
43094309 /// This can be used by sections that require special handling such as init/fini array, etc.
......@@ -4327,7 +4327,7 @@ const Section = struct {
43274327 /// overcapacity can be negative. A simple way to have negative overcapacity is to
43284328 /// allocate a fresh text block, which will have ideal capacity, and then grow it
43294329 /// by 1 byte. It will then have -1 overcapacity.
4330 free_list: std.ArrayListUnmanaged(Ref) = .empty,
4330 free_list: std.ArrayList(Ref) = .empty,
43314331};
43324332
43334333pub fn sectionSize(self: *Elf, shndx: u32) u64 {
src/link/Elf/Archive.zig+5-5
......@@ -11,7 +11,7 @@ pub fn deinit(a: *Archive, gpa: Allocator) void {
1111pub fn parse(
1212 gpa: Allocator,
1313 diags: *Diags,
14 file_handles: *const std.ArrayListUnmanaged(File.Handle),
14 file_handles: *const std.ArrayList(File.Handle),
1515 path: Path,
1616 handle_index: File.HandleIndex,
1717) !Archive {
......@@ -27,10 +27,10 @@ pub fn parse(
2727
2828 const size = (try handle.stat()).size;
2929
30 var objects: std.ArrayListUnmanaged(Object) = .empty;
30 var objects: std.ArrayList(Object) = .empty;
3131 defer objects.deinit(gpa);
3232
33 var strtab: std.ArrayListUnmanaged(u8) = .empty;
33 var strtab: std.ArrayList(u8) = .empty;
3434 defer strtab.deinit(gpa);
3535
3636 while (pos < size) {
......@@ -145,7 +145,7 @@ const strtab_delimiter = '\n';
145145pub const max_member_name_len = 15;
146146
147147pub const ArSymtab = struct {
148 symtab: std.ArrayListUnmanaged(Entry) = .empty,
148 symtab: std.ArrayList(Entry) = .empty,
149149 strtab: StringTable = .{},
150150
151151 pub fn deinit(ar: *ArSymtab, allocator: Allocator) void {
......@@ -239,7 +239,7 @@ pub const ArSymtab = struct {
239239};
240240
241241pub const ArStrtab = struct {
242 buffer: std.ArrayListUnmanaged(u8) = .empty,
242 buffer: std.ArrayList(u8) = .empty,
243243
244244 pub fn deinit(ar: *ArStrtab, allocator: Allocator) void {
245245 ar.buffer.deinit(allocator);
src/link/Elf/AtomList.zig+1-1
......@@ -2,7 +2,7 @@ value: i64 = 0,
22size: u64 = 0,
33alignment: Atom.Alignment = .@"1",
44output_section_index: u32 = 0,
5// atoms: std.ArrayListUnmanaged(Elf.Ref) = .empty,
5// atoms: std.ArrayList(Elf.Ref) = .empty,
66atoms: std.AutoArrayHashMapUnmanaged(Elf.Ref, void) = .empty,
77
88dirty: bool = true,
src/link/Elf/LinkerDefined.zig+6-6
......@@ -1,11 +1,11 @@
11index: File.Index,
22
3symtab: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty,
4strtab: std.ArrayListUnmanaged(u8) = .empty,
3symtab: std.ArrayList(elf.Elf64_Sym) = .empty,
4strtab: std.ArrayList(u8) = .empty,
55
6symbols: std.ArrayListUnmanaged(Symbol) = .empty,
7symbols_extra: std.ArrayListUnmanaged(u32) = .empty,
8symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index) = .empty,
6symbols: std.ArrayList(Symbol) = .empty,
7symbols_extra: std.ArrayList(u32) = .empty,
8symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index) = .empty,
99
1010entry_index: ?Symbol.Index = null,
1111dynamic_index: ?Symbol.Index = null,
......@@ -24,7 +24,7 @@ dso_handle_index: ?Symbol.Index = null,
2424rela_iplt_start_index: ?Symbol.Index = null,
2525rela_iplt_end_index: ?Symbol.Index = null,
2626global_pointer_index: ?Symbol.Index = null,
27start_stop_indexes: std.ArrayListUnmanaged(u32) = .empty,
27start_stop_indexes: std.ArrayList(u32) = .empty,
2828
2929output_symtab_ctx: Elf.SymtabCtx = .{},
3030
src/link/Elf/Merge.zig+7-7
......@@ -7,15 +7,15 @@ pub const Section = struct {
77 type: u32 = 0,
88 flags: u64 = 0,
99 output_section_index: u32 = 0,
10 bytes: std.ArrayListUnmanaged(u8) = .empty,
10 bytes: std.ArrayList(u8) = .empty,
1111 table: std.HashMapUnmanaged(
1212 String,
1313 Subsection.Index,
1414 IndexContext,
1515 std.hash_map.default_max_load_percentage,
1616 ) = .{},
17 subsections: std.ArrayListUnmanaged(Subsection) = .empty,
18 finalized_subsections: std.ArrayListUnmanaged(Subsection.Index) = .empty,
17 subsections: std.ArrayList(Subsection) = .empty,
18 finalized_subsections: std.ArrayList(Subsection.Index) = .empty,
1919
2020 pub fn deinit(msec: *Section, allocator: Allocator) void {
2121 msec.bytes.deinit(allocator);
......@@ -240,10 +240,10 @@ pub const Subsection = struct {
240240pub const InputSection = struct {
241241 merge_section_index: Section.Index = 0,
242242 atom_index: Atom.Index = 0,
243 offsets: std.ArrayListUnmanaged(u32) = .empty,
244 subsections: std.ArrayListUnmanaged(Subsection.Index) = .empty,
245 bytes: std.ArrayListUnmanaged(u8) = .empty,
246 strings: std.ArrayListUnmanaged(String) = .empty,
243 offsets: std.ArrayList(u32) = .empty,
244 subsections: std.ArrayList(Subsection.Index) = .empty,
245 bytes: std.ArrayList(u8) = .empty,
246 strings: std.ArrayList(String) = .empty,
247247
248248 pub fn deinit(imsec: *InputSection, allocator: Allocator) void {
249249 imsec.offsets.deinit(allocator);
src/link/Elf/Object.zig+17-17
......@@ -6,29 +6,29 @@ file_handle: File.HandleIndex,
66index: File.Index,
77
88header: ?elf.Elf64_Ehdr = null,
9shdrs: std.ArrayListUnmanaged(elf.Elf64_Shdr) = .empty,
9shdrs: std.ArrayList(elf.Elf64_Shdr) = .empty,
1010
11symtab: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty,
12strtab: std.ArrayListUnmanaged(u8) = .empty,
11symtab: std.ArrayList(elf.Elf64_Sym) = .empty,
12strtab: std.ArrayList(u8) = .empty,
1313first_global: ?Symbol.Index = null,
14symbols: std.ArrayListUnmanaged(Symbol) = .empty,
15symbols_extra: std.ArrayListUnmanaged(u32) = .empty,
16symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index) = .empty,
17relocs: std.ArrayListUnmanaged(elf.Elf64_Rela) = .empty,
14symbols: std.ArrayList(Symbol) = .empty,
15symbols_extra: std.ArrayList(u32) = .empty,
16symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index) = .empty,
17relocs: std.ArrayList(elf.Elf64_Rela) = .empty,
1818
19atoms: std.ArrayListUnmanaged(Atom) = .empty,
20atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty,
21atoms_extra: std.ArrayListUnmanaged(u32) = .empty,
19atoms: std.ArrayList(Atom) = .empty,
20atoms_indexes: std.ArrayList(Atom.Index) = .empty,
21atoms_extra: std.ArrayList(u32) = .empty,
2222
23groups: std.ArrayListUnmanaged(Elf.Group) = .empty,
24group_data: std.ArrayListUnmanaged(u32) = .empty,
23groups: std.ArrayList(Elf.Group) = .empty,
24group_data: std.ArrayList(u32) = .empty,
2525
26input_merge_sections: std.ArrayListUnmanaged(Merge.InputSection) = .empty,
27input_merge_sections_indexes: std.ArrayListUnmanaged(Merge.InputSection.Index) = .empty,
26input_merge_sections: std.ArrayList(Merge.InputSection) = .empty,
27input_merge_sections_indexes: std.ArrayList(Merge.InputSection.Index) = .empty,
2828
29fdes: std.ArrayListUnmanaged(Fde) = .empty,
30cies: std.ArrayListUnmanaged(Cie) = .empty,
31eh_frame_data: std.ArrayListUnmanaged(u8) = .empty,
29fdes: std.ArrayList(Fde) = .empty,
30cies: std.ArrayList(Cie) = .empty,
31eh_frame_data: std.ArrayList(u8) = .empty,
3232
3333alive: bool = true,
3434dirty: bool = true,
src/link/Elf/SharedObject.zig+10-10
......@@ -3,11 +3,11 @@ index: File.Index,
33
44parsed: Parsed,
55
6symbols: std.ArrayListUnmanaged(Symbol),
7symbols_extra: std.ArrayListUnmanaged(u32),
8symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index),
6symbols: std.ArrayList(Symbol),
7symbols_extra: std.ArrayList(u32),
8symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index),
99
10aliases: ?std.ArrayListUnmanaged(u32),
10aliases: ?std.ArrayList(u32),
1111
1212needed: bool,
1313alive: bool,
......@@ -35,7 +35,7 @@ pub const Header = struct {
3535 verdef_sect_index: ?u32,
3636
3737 stat: Stat,
38 strtab: std.ArrayListUnmanaged(u8),
38 strtab: std.ArrayList(u8),
3939
4040 pub fn deinit(header: *Header, gpa: Allocator) void {
4141 gpa.free(header.sections);
......@@ -149,7 +149,7 @@ pub fn parseHeader(
149149 } else &.{};
150150 errdefer gpa.free(dynamic_table);
151151
152 var strtab: std.ArrayListUnmanaged(u8) = .empty;
152 var strtab: std.ArrayList(u8) = .empty;
153153 errdefer strtab.deinit(gpa);
154154
155155 if (dynsym_sect_index) |index| {
......@@ -206,7 +206,7 @@ pub fn parse(
206206 } else &.{};
207207 defer gpa.free(symtab);
208208
209 var verstrings: std.ArrayListUnmanaged(u32) = .empty;
209 var verstrings: std.ArrayList(u32) = .empty;
210210 defer verstrings.deinit(gpa);
211211
212212 if (header.verdef_sect_index) |shndx| {
......@@ -243,13 +243,13 @@ pub fn parse(
243243 } else &.{};
244244 defer gpa.free(versyms);
245245
246 var nonlocal_esyms: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty;
246 var nonlocal_esyms: std.ArrayList(elf.Elf64_Sym) = .empty;
247247 defer nonlocal_esyms.deinit(gpa);
248248
249 var nonlocal_versyms: std.ArrayListUnmanaged(elf.Versym) = .empty;
249 var nonlocal_versyms: std.ArrayList(elf.Versym) = .empty;
250250 defer nonlocal_versyms.deinit(gpa);
251251
252 var nonlocal_symbols: std.ArrayListUnmanaged(Parsed.Symbol) = .empty;
252 var nonlocal_symbols: std.ArrayList(Parsed.Symbol) = .empty;
253253 defer nonlocal_symbols.deinit(gpa);
254254
255255 var strtab = header.strtab;
src/link/Elf/ZigObject.zig+12-12
......@@ -3,24 +3,24 @@
33//! and any relocations that may have been emitted.
44//! Think about this as fake in-memory Object file for the Zig module.
55
6data: std.ArrayListUnmanaged(u8) = .empty,
6data: std.ArrayList(u8) = .empty,
77/// Externally owned memory.
88basename: []const u8,
99index: File.Index,
1010
1111symtab: std.MultiArrayList(ElfSym) = .{},
1212strtab: StringTable = .{},
13symbols: std.ArrayListUnmanaged(Symbol) = .empty,
14symbols_extra: std.ArrayListUnmanaged(u32) = .empty,
15symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index) = .empty,
16local_symbols: std.ArrayListUnmanaged(Symbol.Index) = .empty,
17global_symbols: std.ArrayListUnmanaged(Symbol.Index) = .empty,
13symbols: std.ArrayList(Symbol) = .empty,
14symbols_extra: std.ArrayList(u32) = .empty,
15symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index) = .empty,
16local_symbols: std.ArrayList(Symbol.Index) = .empty,
17global_symbols: std.ArrayList(Symbol.Index) = .empty,
1818globals_lookup: std.AutoHashMapUnmanaged(u32, Symbol.Index) = .empty,
1919
20atoms: std.ArrayListUnmanaged(Atom) = .empty,
21atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty,
22atoms_extra: std.ArrayListUnmanaged(u32) = .empty,
23relocs: std.ArrayListUnmanaged(std.ArrayListUnmanaged(elf.Elf64_Rela)) = .empty,
20atoms: std.ArrayList(Atom) = .empty,
21atoms_indexes: std.ArrayList(Atom.Index) = .empty,
22atoms_extra: std.ArrayList(u32) = .empty,
23relocs: std.ArrayList(std.ArrayList(elf.Elf64_Rela)) = .empty,
2424
2525num_dynrelocs: u32 = 0,
2626
......@@ -2369,7 +2369,7 @@ const LazySymbolMetadata = struct {
23692369const AvMetadata = struct {
23702370 symbol_index: Symbol.Index,
23712371 /// A list of all exports aliases of this Av.
2372 exports: std.ArrayListUnmanaged(Symbol.Index) = .empty,
2372 exports: std.ArrayList(Symbol.Index) = .empty,
23732373 /// Set to true if the AV has been initialized and allocated.
23742374 allocated: bool = false,
23752375
......@@ -2417,7 +2417,7 @@ const TlsVariable = struct {
24172417 }
24182418};
24192419
2420const AtomList = std.ArrayListUnmanaged(Atom.Index);
2420const AtomList = std.ArrayList(Atom.Index);
24212421const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata);
24222422const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata);
24232423const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata);
src/link/Elf/synthetic_sections.zig+9-9
......@@ -1,6 +1,6 @@
11pub const DynamicSection = struct {
22 soname: ?u32 = null,
3 needed: std.ArrayListUnmanaged(u32) = .empty,
3 needed: std.ArrayList(u32) = .empty,
44 rpath: u32 = 0,
55
66 pub fn deinit(dt: *DynamicSection, allocator: Allocator) void {
......@@ -226,7 +226,7 @@ pub const DynamicSection = struct {
226226};
227227
228228pub const GotSection = struct {
229 entries: std.ArrayListUnmanaged(Entry) = .empty,
229 entries: std.ArrayList(Entry) = .empty,
230230 output_symtab_ctx: Elf.SymtabCtx = .{},
231231 tlsld_index: ?u32 = null,
232232 flags: Flags = .{},
......@@ -628,7 +628,7 @@ pub const GotSection = struct {
628628};
629629
630630pub const PltSection = struct {
631 symbols: std.ArrayListUnmanaged(Elf.Ref) = .empty,
631 symbols: std.ArrayList(Elf.Ref) = .empty,
632632 output_symtab_ctx: Elf.SymtabCtx = .{},
633633
634634 pub fn deinit(plt: *PltSection, allocator: Allocator) void {
......@@ -875,7 +875,7 @@ pub const GotPltSection = struct {
875875};
876876
877877pub const PltGotSection = struct {
878 symbols: std.ArrayListUnmanaged(Elf.Ref) = .empty,
878 symbols: std.ArrayList(Elf.Ref) = .empty,
879879 output_symtab_ctx: Elf.SymtabCtx = .{},
880880
881881 pub fn deinit(plt_got: *PltGotSection, allocator: Allocator) void {
......@@ -981,7 +981,7 @@ pub const PltGotSection = struct {
981981};
982982
983983pub const CopyRelSection = struct {
984 symbols: std.ArrayListUnmanaged(Elf.Ref) = .empty,
984 symbols: std.ArrayList(Elf.Ref) = .empty,
985985
986986 pub fn deinit(copy_rel: *CopyRelSection, allocator: Allocator) void {
987987 copy_rel.symbols.deinit(allocator);
......@@ -1062,7 +1062,7 @@ pub const CopyRelSection = struct {
10621062};
10631063
10641064pub const DynsymSection = struct {
1065 entries: std.ArrayListUnmanaged(Entry) = .empty,
1065 entries: std.ArrayList(Entry) = .empty,
10661066
10671067 pub const Entry = struct {
10681068 /// Ref of the symbol which gets privilege of getting a dynamic treatment
......@@ -1146,7 +1146,7 @@ pub const DynsymSection = struct {
11461146};
11471147
11481148pub const HashSection = struct {
1149 buffer: std.ArrayListUnmanaged(u8) = .empty,
1149 buffer: std.ArrayList(u8) = .empty,
11501150
11511151 pub fn deinit(hs: *HashSection, allocator: Allocator) void {
11521152 hs.buffer.deinit(allocator);
......@@ -1307,8 +1307,8 @@ pub const GnuHashSection = struct {
13071307};
13081308
13091309pub const VerneedSection = struct {
1310 verneed: std.ArrayListUnmanaged(elf.Elf64_Verneed) = .empty,
1311 vernaux: std.ArrayListUnmanaged(elf.Vernaux) = .empty,
1310 verneed: std.ArrayList(elf.Elf64_Verneed) = .empty,
1311 vernaux: std.ArrayList(elf.Vernaux) = .empty,
13121312 index: elf.Versym = .{ .VERSION = elf.Versym.GLOBAL.VERSION + 1, .HIDDEN = false },
13131313
13141314 pub fn deinit(vern: *VerneedSection, allocator: Allocator) void {
src/link/LdScript.zig+3-3
......@@ -26,9 +26,9 @@ pub fn parse(
2626 data: []const u8,
2727) Error!LdScript {
2828 var tokenizer = Tokenizer{ .source = data };
29 var tokens: std.ArrayListUnmanaged(Token) = .empty;
29 var tokens: std.ArrayList(Token) = .empty;
3030 defer tokens.deinit(gpa);
31 var line_col: std.ArrayListUnmanaged(LineColumn) = .empty;
31 var line_col: std.ArrayList(LineColumn) = .empty;
3232 defer line_col.deinit(gpa);
3333
3434 var line: usize = 0;
......@@ -117,7 +117,7 @@ const Parser = struct {
117117 it: *TokenIterator,
118118
119119 cpu_arch: ?std.Target.Cpu.Arch,
120 args: std.ArrayListUnmanaged(Arg),
120 args: std.ArrayList(Arg),
121121
122122 fn start(parser: *Parser) !void {
123123 while (true) {
src/link/Lld.zig+1-1
......@@ -312,7 +312,7 @@ fn linkAsArchive(lld: *Lld, arena: Allocator) !void {
312312
313313 const link_inputs = comp.link_inputs;
314314
315 var object_files: std.ArrayListUnmanaged([*:0]const u8) = .empty;
315 var object_files: std.ArrayList([*:0]const u8) = .empty;
316316
317317 try object_files.ensureUnusedCapacity(arena, link_inputs.len);
318318 for (link_inputs) |input| {
src/link/MachO.zig+19-19
......@@ -16,13 +16,13 @@ files: std.MultiArrayList(File.Entry) = .{},
1616/// Long-lived list of all file descriptors.
1717/// We store them globally rather than per actual File so that we can re-use
1818/// one file handle per every object file within an archive.
19file_handles: std.ArrayListUnmanaged(File.Handle) = .empty,
19file_handles: std.ArrayList(File.Handle) = .empty,
2020zig_object: ?File.Index = null,
2121internal_object: ?File.Index = null,
22objects: std.ArrayListUnmanaged(File.Index) = .empty,
23dylibs: std.ArrayListUnmanaged(File.Index) = .empty,
22objects: std.ArrayList(File.Index) = .empty,
23dylibs: std.ArrayList(File.Index) = .empty,
2424
25segments: std.ArrayListUnmanaged(macho.segment_command_64) = .empty,
25segments: std.ArrayList(macho.segment_command_64) = .empty,
2626sections: std.MultiArrayList(Section) = .{},
2727
2828resolver: SymbolResolver = .{},
......@@ -30,7 +30,7 @@ resolver: SymbolResolver = .{},
3030/// Key is symbol index.
3131undefs: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, UndefRefs) = .empty,
3232undefs_mutex: std.Thread.Mutex = .{},
33dupes: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, std.ArrayListUnmanaged(File.Index)) = .empty,
33dupes: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, std.ArrayList(File.Index)) = .empty,
3434dupes_mutex: std.Thread.Mutex = .{},
3535
3636dyld_info_cmd: macho.dyld_info_command = .{},
......@@ -55,11 +55,11 @@ eh_frame_sect_index: ?u8 = null,
5555unwind_info_sect_index: ?u8 = null,
5656objc_stubs_sect_index: ?u8 = null,
5757
58thunks: std.ArrayListUnmanaged(Thunk) = .empty,
58thunks: std.ArrayList(Thunk) = .empty,
5959
6060/// Output synthetic sections
61symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty,
62strtab: std.ArrayListUnmanaged(u8) = .empty,
61symtab: std.ArrayList(macho.nlist_64) = .empty,
62strtab: std.ArrayList(u8) = .empty,
6363indsymtab: Indsymtab = .{},
6464got: GotSection = .{},
6565stubs: StubsSection = .{},
......@@ -4041,19 +4041,19 @@ const default_entry_symbol_name = "_main";
40414041const Section = struct {
40424042 header: macho.section_64,
40434043 segment_id: u8,
4044 atoms: std.ArrayListUnmanaged(Ref) = .empty,
4045 free_list: std.ArrayListUnmanaged(Atom.Index) = .empty,
4044 atoms: std.ArrayList(Ref) = .empty,
4045 free_list: std.ArrayList(Atom.Index) = .empty,
40464046 last_atom_index: Atom.Index = 0,
4047 thunks: std.ArrayListUnmanaged(Thunk.Index) = .empty,
4048 out: std.ArrayListUnmanaged(u8) = .empty,
4049 relocs: std.ArrayListUnmanaged(macho.relocation_info) = .empty,
4047 thunks: std.ArrayList(Thunk.Index) = .empty,
4048 out: std.ArrayList(u8) = .empty,
4049 relocs: std.ArrayList(macho.relocation_info) = .empty,
40504050};
40514051
40524052pub const LiteralPool = struct {
40534053 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
4054 keys: std.ArrayListUnmanaged(Key) = .empty,
4055 values: std.ArrayListUnmanaged(MachO.Ref) = .empty,
4056 data: std.ArrayListUnmanaged(u8) = .empty,
4054 keys: std.ArrayList(Key) = .empty,
4055 values: std.ArrayList(MachO.Ref) = .empty,
4056 data: std.ArrayList(u8) = .empty,
40574057
40584058 pub fn deinit(lp: *LiteralPool, allocator: Allocator) void {
40594059 lp.table.deinit(allocator);
......@@ -4485,8 +4485,8 @@ pub const Ref = struct {
44854485};
44864486
44874487pub const SymbolResolver = struct {
4488 keys: std.ArrayListUnmanaged(Key) = .empty,
4489 values: std.ArrayListUnmanaged(Ref) = .empty,
4488 keys: std.ArrayList(Key) = .empty,
4489 values: std.ArrayList(Ref) = .empty,
44904490 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
44914491
44924492 const Result = struct {
......@@ -4586,7 +4586,7 @@ pub const UndefRefs = union(enum) {
45864586 entry,
45874587 dyld_stub_binder,
45884588 objc_msgsend,
4589 refs: std.ArrayListUnmanaged(Ref),
4589 refs: std.ArrayList(Ref),
45904590
45914591 pub fn deinit(self: *UndefRefs, allocator: Allocator) void {
45924592 switch (self.*) {
src/link/MachO/Archive.zig+2-2
......@@ -1,4 +1,4 @@
1objects: std.ArrayListUnmanaged(Object) = .empty,
1objects: std.ArrayList(Object) = .empty,
22
33pub fn deinit(self: *Archive, allocator: Allocator) void {
44 self.objects.deinit(allocator);
......@@ -172,7 +172,7 @@ pub const ar_hdr = extern struct {
172172};
173173
174174pub const ArSymtab = struct {
175 entries: std.ArrayListUnmanaged(Entry) = .empty,
175 entries: std.ArrayList(Entry) = .empty,
176176 strtab: StringTable = .{},
177177
178178 pub fn deinit(ar: *ArSymtab, allocator: Allocator) void {
src/link/MachO/CodeSignature.zig+1-1
......@@ -53,7 +53,7 @@ const CodeDirectory = struct {
5353 inner: macho.CodeDirectory,
5454 ident: []const u8,
5555 special_slots: [n_special_slots][hash_size]u8,
56 code_slots: std.ArrayListUnmanaged([hash_size]u8) = .empty,
56 code_slots: std.ArrayList([hash_size]u8) = .empty,
5757
5858 const n_special_slots: usize = 7;
5959
src/link/MachO/DebugSymbols.zig+5-5
......@@ -4,8 +4,8 @@ file: ?fs.File,
44symtab_cmd: macho.symtab_command = .{},
55uuid_cmd: macho.uuid_command = .{ .uuid = [_]u8{0} ** 16 },
66
7segments: std.ArrayListUnmanaged(macho.segment_command_64) = .empty,
8sections: std.ArrayListUnmanaged(macho.section_64) = .empty,
7segments: std.ArrayList(macho.segment_command_64) = .empty,
8sections: std.ArrayList(macho.section_64) = .empty,
99
1010dwarf_segment_cmd_index: ?u8 = null,
1111linkedit_segment_cmd_index: ?u8 = null,
......@@ -19,11 +19,11 @@ debug_line_str_section_index: ?u8 = null,
1919debug_loclists_section_index: ?u8 = null,
2020debug_rnglists_section_index: ?u8 = null,
2121
22relocs: std.ArrayListUnmanaged(Reloc) = .empty,
22relocs: std.ArrayList(Reloc) = .empty,
2323
2424/// Output synthetic sections
25symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty,
26strtab: std.ArrayListUnmanaged(u8) = .empty,
25symtab: std.ArrayList(macho.nlist_64) = .empty,
26strtab: std.ArrayList(u8) = .empty,
2727
2828pub const Reloc = struct {
2929 type: enum {
src/link/MachO/Dylib.zig+6-6
......@@ -6,14 +6,14 @@ file_handle: File.HandleIndex,
66tag: enum { dylib, tbd },
77
88exports: std.MultiArrayList(Export) = .{},
9strtab: std.ArrayListUnmanaged(u8) = .empty,
9strtab: std.ArrayList(u8) = .empty,
1010id: ?Id = null,
1111ordinal: u16 = 0,
1212
13symbols: std.ArrayListUnmanaged(Symbol) = .empty,
14symbols_extra: std.ArrayListUnmanaged(u32) = .empty,
15globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty,
16dependents: std.ArrayListUnmanaged(Id) = .empty,
13symbols: std.ArrayList(Symbol) = .empty,
14symbols_extra: std.ArrayList(u32) = .empty,
15globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty,
16dependents: std.ArrayList(Id) = .empty,
1717rpaths: std.StringArrayHashMapUnmanaged(void) = .empty,
1818umbrella: File.Index,
1919platform: ?MachO.Platform = null,
......@@ -695,7 +695,7 @@ pub const TargetMatcher = struct {
695695 allocator: Allocator,
696696 cpu_arch: std.Target.Cpu.Arch,
697697 platform: macho.PLATFORM,
698 target_strings: std.ArrayListUnmanaged([]const u8) = .empty,
698 target_strings: std.ArrayList([]const u8) = .empty,
699699
700700 pub fn init(allocator: Allocator, cpu_arch: std.Target.Cpu.Arch, platform: macho.PLATFORM) !TargetMatcher {
701701 var self = TargetMatcher{
src/link/MachO/InternalObject.zig+13-13
......@@ -1,19 +1,19 @@
11index: File.Index,
22
33sections: std.MultiArrayList(Section) = .{},
4atoms: std.ArrayListUnmanaged(Atom) = .empty,
5atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty,
6atoms_extra: std.ArrayListUnmanaged(u32) = .empty,
7symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty,
8strtab: std.ArrayListUnmanaged(u8) = .empty,
9symbols: std.ArrayListUnmanaged(Symbol) = .empty,
10symbols_extra: std.ArrayListUnmanaged(u32) = .empty,
11globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty,
12
13objc_methnames: std.ArrayListUnmanaged(u8) = .empty,
4atoms: std.ArrayList(Atom) = .empty,
5atoms_indexes: std.ArrayList(Atom.Index) = .empty,
6atoms_extra: std.ArrayList(u32) = .empty,
7symtab: std.ArrayList(macho.nlist_64) = .empty,
8strtab: std.ArrayList(u8) = .empty,
9symbols: std.ArrayList(Symbol) = .empty,
10symbols_extra: std.ArrayList(u32) = .empty,
11globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty,
12
13objc_methnames: std.ArrayList(u8) = .empty,
1414objc_selrefs: [@sizeOf(u64)]u8 = [_]u8{0} ** @sizeOf(u64),
1515
16force_undefined: std.ArrayListUnmanaged(Symbol.Index) = .empty,
16force_undefined: std.ArrayList(Symbol.Index) = .empty,
1717entry_index: ?Symbol.Index = null,
1818dyld_stub_binder_index: ?Symbol.Index = null,
1919dyld_private_index: ?Symbol.Index = null,
......@@ -21,7 +21,7 @@ objc_msg_send_index: ?Symbol.Index = null,
2121mh_execute_header_index: ?Symbol.Index = null,
2222mh_dylib_header_index: ?Symbol.Index = null,
2323dso_handle_index: ?Symbol.Index = null,
24boundary_symbols: std.ArrayListUnmanaged(Symbol.Index) = .empty,
24boundary_symbols: std.ArrayList(Symbol.Index) = .empty,
2525
2626output_symtab_ctx: MachO.SymtabCtx = .{},
2727
......@@ -880,7 +880,7 @@ pub fn fmtSymtab(self: *InternalObject, macho_file: *MachO) std.fmt.Alt(Format,
880880
881881const Section = struct {
882882 header: macho.section_64,
883 relocs: std.ArrayListUnmanaged(Relocation) = .empty,
883 relocs: std.ArrayList(Relocation) = .empty,
884884 extra: Extra = .{},
885885
886886 const Extra = packed struct {
src/link/MachO/Object.zig+19-19
......@@ -12,27 +12,27 @@ in_archive: ?InArchive = null,
1212header: ?macho.mach_header_64 = null,
1313sections: std.MultiArrayList(Section) = .{},
1414symtab: std.MultiArrayList(Nlist) = .{},
15strtab: std.ArrayListUnmanaged(u8) = .empty,
15strtab: std.ArrayList(u8) = .empty,
1616
17symbols: std.ArrayListUnmanaged(Symbol) = .empty,
18symbols_extra: std.ArrayListUnmanaged(u32) = .empty,
19globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty,
20atoms: std.ArrayListUnmanaged(Atom) = .empty,
21atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty,
22atoms_extra: std.ArrayListUnmanaged(u32) = .empty,
17symbols: std.ArrayList(Symbol) = .empty,
18symbols_extra: std.ArrayList(u32) = .empty,
19globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty,
20atoms: std.ArrayList(Atom) = .empty,
21atoms_indexes: std.ArrayList(Atom.Index) = .empty,
22atoms_extra: std.ArrayList(u32) = .empty,
2323
2424platform: ?MachO.Platform = null,
2525compile_unit: ?CompileUnit = null,
26stab_files: std.ArrayListUnmanaged(StabFile) = .empty,
26stab_files: std.ArrayList(StabFile) = .empty,
2727
2828eh_frame_sect_index: ?u8 = null,
2929compact_unwind_sect_index: ?u8 = null,
30cies: std.ArrayListUnmanaged(Cie) = .empty,
31fdes: std.ArrayListUnmanaged(Fde) = .empty,
32eh_frame_data: std.ArrayListUnmanaged(u8) = .empty,
33unwind_records: std.ArrayListUnmanaged(UnwindInfo.Record) = .empty,
34unwind_records_indexes: std.ArrayListUnmanaged(UnwindInfo.Record.Index) = .empty,
35data_in_code: std.ArrayListUnmanaged(macho.data_in_code_entry) = .empty,
30cies: std.ArrayList(Cie) = .empty,
31fdes: std.ArrayList(Fde) = .empty,
32eh_frame_data: std.ArrayList(u8) = .empty,
33unwind_records: std.ArrayList(UnwindInfo.Record) = .empty,
34unwind_records_indexes: std.ArrayList(UnwindInfo.Record.Index) = .empty,
35data_in_code: std.ArrayList(macho.data_in_code_entry) = .empty,
3636
3737alive: bool = true,
3838hidden: bool = false,
......@@ -2603,8 +2603,8 @@ fn formatPath(object: Object, w: *Writer) Writer.Error!void {
26032603
26042604const Section = struct {
26052605 header: macho.section_64,
2606 subsections: std.ArrayListUnmanaged(Subsection) = .empty,
2607 relocs: std.ArrayListUnmanaged(Relocation) = .empty,
2606 subsections: std.ArrayList(Subsection) = .empty,
2607 relocs: std.ArrayList(Relocation) = .empty,
26082608};
26092609
26102610const Subsection = struct {
......@@ -2620,7 +2620,7 @@ pub const Nlist = struct {
26202620
26212621const StabFile = struct {
26222622 comp_dir: u32,
2623 stabs: std.ArrayListUnmanaged(Stab) = .empty,
2623 stabs: std.ArrayList(Stab) = .empty,
26242624
26252625 fn getCompDir(sf: StabFile, object: Object) [:0]const u8 {
26262626 const nlist = object.symtab.items(.nlist)[sf.comp_dir];
......@@ -2706,7 +2706,7 @@ const x86_64 = struct {
27062706 self: *Object,
27072707 n_sect: u8,
27082708 sect: macho.section_64,
2709 out: *std.ArrayListUnmanaged(Relocation),
2709 out: *std.ArrayList(Relocation),
27102710 handle: File.Handle,
27112711 macho_file: *MachO,
27122712 ) !void {
......@@ -2873,7 +2873,7 @@ const aarch64 = struct {
28732873 self: *Object,
28742874 n_sect: u8,
28752875 sect: macho.section_64,
2876 out: *std.ArrayListUnmanaged(Relocation),
2876 out: *std.ArrayList(Relocation),
28772877 handle: File.Handle,
28782878 macho_file: *MachO,
28792879 ) !void {
src/link/MachO/UnwindInfo.zig+4-4
......@@ -1,6 +1,6 @@
11/// List of all unwind records gathered from all objects and sorted
22/// by allocated relative function address within the section.
3records: std.ArrayListUnmanaged(Record.Ref) = .empty,
3records: std.ArrayList(Record.Ref) = .empty,
44
55/// List of all personalities referenced by either unwind info entries
66/// or __eh_frame entries.
......@@ -12,11 +12,11 @@ common_encodings: [max_common_encodings]Encoding = undefined,
1212common_encodings_count: u7 = 0,
1313
1414/// List of record indexes containing an LSDA pointer.
15lsdas: std.ArrayListUnmanaged(u32) = .empty,
16lsdas_lookup: std.ArrayListUnmanaged(u32) = .empty,
15lsdas: std.ArrayList(u32) = .empty,
16lsdas_lookup: std.ArrayList(u32) = .empty,
1717
1818/// List of second level pages.
19pages: std.ArrayListUnmanaged(Page) = .empty,
19pages: std.ArrayList(Page) = .empty,
2020
2121pub fn deinit(info: *UnwindInfo, allocator: Allocator) void {
2222 info.records.deinit(allocator);
src/link/MachO/ZigObject.zig+9-9
......@@ -1,4 +1,4 @@
1data: std.ArrayListUnmanaged(u8) = .empty,
1data: std.ArrayList(u8) = .empty,
22/// Externally owned memory.
33basename: []const u8,
44index: File.Index,
......@@ -6,15 +6,15 @@ index: File.Index,
66symtab: std.MultiArrayList(Nlist) = .{},
77strtab: StringTable = .{},
88
9symbols: std.ArrayListUnmanaged(Symbol) = .empty,
10symbols_extra: std.ArrayListUnmanaged(u32) = .empty,
11globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty,
9symbols: std.ArrayList(Symbol) = .empty,
10symbols_extra: std.ArrayList(u32) = .empty,
11globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty,
1212/// Maps string index (so name) into nlist index for the global symbol defined within this
1313/// module.
1414globals_lookup: std.AutoHashMapUnmanaged(u32, u32) = .empty,
15atoms: std.ArrayListUnmanaged(Atom) = .empty,
16atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty,
17atoms_extra: std.ArrayListUnmanaged(u32) = .empty,
15atoms: std.ArrayList(Atom) = .empty,
16atoms_indexes: std.ArrayList(Atom.Index) = .empty,
17atoms_extra: std.ArrayList(u32) = .empty,
1818
1919/// Table of tracked LazySymbols.
2020lazy_syms: LazySymbolTable = .{},
......@@ -1737,7 +1737,7 @@ pub fn fmtAtoms(self: *ZigObject, macho_file: *MachO) std.fmt.Alt(Format, Format
17371737const AvMetadata = struct {
17381738 symbol_index: Symbol.Index,
17391739 /// A list of all exports aliases of this Av.
1740 exports: std.ArrayListUnmanaged(Symbol.Index) = .empty,
1740 exports: std.ArrayList(Symbol.Index) = .empty,
17411741
17421742 fn @"export"(m: AvMetadata, zig_object: *ZigObject, name: []const u8) ?*u32 {
17431743 for (m.exports.items) |*exp| {
......@@ -1769,7 +1769,7 @@ const TlvInitializer = struct {
17691769const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata);
17701770const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata);
17711771const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata);
1772const RelocationTable = std.ArrayListUnmanaged(std.ArrayListUnmanaged(Relocation));
1772const RelocationTable = std.ArrayList(std.ArrayList(Relocation));
17731773const TlvInitializerTable = std.AutoArrayHashMapUnmanaged(Atom.Index, TlvInitializer);
17741774
17751775const x86_64 = struct {
src/link/MachO/dyld_info/Rebase.zig+2-2
......@@ -1,5 +1,5 @@
1entries: std.ArrayListUnmanaged(Entry) = .empty,
2buffer: std.ArrayListUnmanaged(u8) = .empty,
1entries: std.ArrayList(Entry) = .empty,
2buffer: std.ArrayList(u8) = .empty,
33
44pub const Entry = struct {
55 offset: u64,
src/link/MachO/dyld_info/Trie.zig+4-4
......@@ -31,9 +31,9 @@
3131
3232/// The root node of the trie.
3333root: ?Node.Index = null,
34buffer: std.ArrayListUnmanaged(u8) = .empty,
34buffer: std.ArrayList(u8) = .empty,
3535nodes: std.MultiArrayList(Node) = .{},
36edges: std.ArrayListUnmanaged(Edge) = .empty,
36edges: std.ArrayList(Edge) = .empty,
3737
3838/// Insert a symbol into the trie, updating the prefixes in the process.
3939/// This operation may change the layout of the trie by splicing edges in
......@@ -139,7 +139,7 @@ fn finalize(self: *Trie, allocator: Allocator) !void {
139139 try ordered_nodes.ensureTotalCapacityPrecise(self.nodes.items(.is_terminal).len);
140140
141141 {
142 var fifo: std.ArrayListUnmanaged(Node.Index) = .empty;
142 var fifo: std.ArrayList(Node.Index) = .empty;
143143 defer fifo.deinit(allocator);
144144
145145 try fifo.append(allocator, self.root.?);
......@@ -328,7 +328,7 @@ const Node = struct {
328328 trie_offset: u32 = 0,
329329
330330 /// List of all edges originating from this node.
331 edges: std.ArrayListUnmanaged(Edge.Index) = .empty,
331 edges: std.ArrayList(Edge.Index) = .empty,
332332
333333 const Index = u32;
334334};
src/link/MachO/dyld_info/bind.zig+7-7
......@@ -17,8 +17,8 @@ pub const Entry = struct {
1717};
1818
1919pub const Bind = struct {
20 entries: std.ArrayListUnmanaged(Entry) = .empty,
21 buffer: std.ArrayListUnmanaged(u8) = .empty,
20 entries: std.ArrayList(Entry) = .empty,
21 buffer: std.ArrayList(u8) = .empty,
2222
2323 const Self = @This();
2424
......@@ -271,8 +271,8 @@ pub const Bind = struct {
271271};
272272
273273pub const WeakBind = struct {
274 entries: std.ArrayListUnmanaged(Entry) = .empty,
275 buffer: std.ArrayListUnmanaged(u8) = .empty,
274 entries: std.ArrayList(Entry) = .empty,
275 buffer: std.ArrayList(u8) = .empty,
276276
277277 const Self = @This();
278278
......@@ -515,9 +515,9 @@ pub const WeakBind = struct {
515515};
516516
517517pub const LazyBind = struct {
518 entries: std.ArrayListUnmanaged(Entry) = .empty,
519 buffer: std.ArrayListUnmanaged(u8) = .empty,
520 offsets: std.ArrayListUnmanaged(u32) = .empty,
518 entries: std.ArrayList(Entry) = .empty,
519 buffer: std.ArrayList(u8) = .empty,
520 offsets: std.ArrayList(u32) = .empty,
521521
522522 const Self = @This();
523523
src/link/MachO/synthetic.zig+5-5
......@@ -1,5 +1,5 @@
11pub const GotSection = struct {
2 symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty,
2 symbols: std.ArrayList(MachO.Ref) = .empty,
33
44 pub const Index = u32;
55
......@@ -61,7 +61,7 @@ pub const GotSection = struct {
6161};
6262
6363pub const StubsSection = struct {
64 symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty,
64 symbols: std.ArrayList(MachO.Ref) = .empty,
6565
6666 pub const Index = u32;
6767
......@@ -296,7 +296,7 @@ pub const LaSymbolPtrSection = struct {
296296};
297297
298298pub const TlvPtrSection = struct {
299 symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty,
299 symbols: std.ArrayList(MachO.Ref) = .empty,
300300
301301 pub const Index = u32;
302302
......@@ -361,7 +361,7 @@ pub const TlvPtrSection = struct {
361361};
362362
363363pub const ObjcStubsSection = struct {
364 symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty,
364 symbols: std.ArrayList(MachO.Ref) = .empty,
365365
366366 pub fn deinit(objc: *ObjcStubsSection, allocator: Allocator) void {
367367 objc.symbols.deinit(allocator);
......@@ -517,7 +517,7 @@ pub const Indsymtab = struct {
517517};
518518
519519pub const DataInCode = struct {
520 entries: std.ArrayListUnmanaged(Entry) = .empty,
520 entries: std.ArrayList(Entry) = .empty,
521521
522522 pub fn deinit(dice: *DataInCode, allocator: Allocator) void {
523523 dice.entries.deinit(allocator);
src/link/StringTable.zig+1-1
......@@ -1,4 +1,4 @@
1buffer: std.ArrayListUnmanaged(u8) = .empty,
1buffer: std.ArrayList(u8) = .empty,
22table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage) = .empty,
33
44pub fn deinit(self: *Self, gpa: Allocator) void {
src/link/Wasm.zig+25-25
......@@ -53,7 +53,7 @@ base: link.File,
5353/// with a null byte so that deserialization does not attempt to create
5454/// string_table entries for them. Alternately those sites could be moved to
5555/// use a different byte array for this purpose.
56string_bytes: std.ArrayListUnmanaged(u8),
56string_bytes: std.ArrayList(u8),
5757/// Sometimes we have logic that wants to borrow string bytes to store
5858/// arbitrary things in there. In this case it is not allowed to intern new
5959/// strings during this time. This safety lock is used to detect misuses.
......@@ -77,7 +77,7 @@ export_table: bool,
7777/// Output name of the file
7878name: []const u8,
7979/// List of relocatable files to be linked into the final binary.
80objects: std.ArrayListUnmanaged(Object) = .{},
80objects: std.ArrayList(Object) = .{},
8181
8282func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty,
8383/// Provides a mapping of both imports and provided functions to symbol name.
......@@ -85,23 +85,23 @@ func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty,
8585/// Key is symbol name, however the `FunctionImport` may have an name override for the import name.
8686object_function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImport) = .empty,
8787/// All functions for all objects.
88object_functions: std.ArrayListUnmanaged(ObjectFunction) = .empty,
88object_functions: std.ArrayList(ObjectFunction) = .empty,
8989
9090/// Provides a mapping of both imports and provided globals to symbol name.
9191/// Local globals may be unnamed.
9292object_global_imports: std.AutoArrayHashMapUnmanaged(String, GlobalImport) = .empty,
9393/// All globals for all objects.
94object_globals: std.ArrayListUnmanaged(ObjectGlobal) = .empty,
94object_globals: std.ArrayList(ObjectGlobal) = .empty,
9595
9696/// All table imports for all objects.
9797object_table_imports: std.AutoArrayHashMapUnmanaged(String, TableImport) = .empty,
9898/// All parsed table sections for all objects.
99object_tables: std.ArrayListUnmanaged(Table) = .empty,
99object_tables: std.ArrayList(Table) = .empty,
100100
101101/// All memory imports for all objects.
102102object_memory_imports: std.AutoArrayHashMapUnmanaged(String, MemoryImport) = .empty,
103103/// All parsed memory sections for all objects.
104object_memories: std.ArrayListUnmanaged(ObjectMemory) = .empty,
104object_memories: std.ArrayList(ObjectMemory) = .empty,
105105
106106/// All relocations from all objects concatenated. `relocs_start` marks the end
107107/// point of object relocations and start point of Zcu relocations.
......@@ -109,21 +109,21 @@ object_relocations: std.MultiArrayList(ObjectRelocation) = .empty,
109109
110110/// List of initialization functions. These must be called in order of priority
111111/// by the (synthetic) `__wasm_call_ctors` function.
112object_init_funcs: std.ArrayListUnmanaged(InitFunc) = .empty,
112object_init_funcs: std.ArrayList(InitFunc) = .empty,
113113
114114/// The data section of an object has many segments. Each segment corresponds
115115/// logically to an object file's .data section, or .rodata section. In
116116/// the case of `-fdata-sections` there will be one segment per data symbol.
117object_data_segments: std.ArrayListUnmanaged(ObjectDataSegment) = .empty,
117object_data_segments: std.ArrayList(ObjectDataSegment) = .empty,
118118/// Each segment has many data symbols, which correspond logically to global
119119/// constants.
120object_datas: std.ArrayListUnmanaged(ObjectData) = .empty,
120object_datas: std.ArrayList(ObjectData) = .empty,
121121object_data_imports: std.AutoArrayHashMapUnmanaged(String, ObjectDataImport) = .empty,
122122/// Non-synthetic section that can essentially be mem-cpy'd into place after performing relocations.
123123object_custom_segments: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, CustomSegment) = .empty,
124124
125125/// All comdat information for all objects.
126object_comdats: std.ArrayListUnmanaged(Comdat) = .empty,
126object_comdats: std.ArrayList(Comdat) = .empty,
127127/// A table that maps the relocations to be performed where the key represents
128128/// the section (across all objects) that the slice of relocations applies to.
129129object_relocations_table: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, ObjectRelocation.Slice) = .empty,
......@@ -138,15 +138,15 @@ out_relocs: std.MultiArrayList(OutReloc) = .empty,
138138/// List of locations within `string_bytes` that must be patched with the virtual
139139/// memory address of a Uav during `flush`.
140140/// When emitting an object file, `out_relocs` is used instead.
141uav_fixups: std.ArrayListUnmanaged(UavFixup) = .empty,
141uav_fixups: std.ArrayList(UavFixup) = .empty,
142142/// List of locations within `string_bytes` that must be patched with the virtual
143143/// memory address of a Nav during `flush`.
144144/// When emitting an object file, `out_relocs` is used instead.
145145/// No functions here only global variables.
146nav_fixups: std.ArrayListUnmanaged(NavFixup) = .empty,
146nav_fixups: std.ArrayList(NavFixup) = .empty,
147147/// When a nav reference is a function pointer, this tracks the required function
148148/// table entry index that needs to overwrite the code in the final output.
149func_table_fixups: std.ArrayListUnmanaged(FuncTableFixup) = .empty,
149func_table_fixups: std.ArrayList(FuncTableFixup) = .empty,
150150/// Symbols to be emitted into an object file. Remains empty when not emitting
151151/// an object file.
152152symbol_table: std.AutoArrayHashMapUnmanaged(String, void) = .empty,
......@@ -167,7 +167,7 @@ memories: std.wasm.Memory = .{ .limits = .{
167167/// `--verbose-link` output.
168168/// Initialized on creation, appended to as inputs are added, printed during `flush`.
169169/// String data is allocated into Compilation arena.
170dump_argv_list: std.ArrayListUnmanaged([]const u8),
170dump_argv_list: std.ArrayList([]const u8),
171171
172172preloaded_strings: PreloadedStrings,
173173
......@@ -205,7 +205,7 @@ entry_resolution: FunctionImport.Resolution = .unresolved,
205205/// Empty when outputting an object.
206206function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty,
207207hidden_function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty,
208global_exports: std.ArrayListUnmanaged(GlobalExport) = .empty,
208global_exports: std.ArrayList(GlobalExport) = .empty,
209209/// Tracks the value at the end of prelink.
210210global_exports_len: u32 = 0,
211211
......@@ -279,22 +279,22 @@ any_passive_inits: bool = false,
279279/// All MIR instructions for all Zcu functions.
280280mir_instructions: std.MultiArrayList(Mir.Inst) = .{},
281281/// Corresponds to `mir_instructions`.
282mir_extra: std.ArrayListUnmanaged(u32) = .empty,
282mir_extra: std.ArrayList(u32) = .empty,
283283/// All local types for all Zcu functions.
284mir_locals: std.ArrayListUnmanaged(std.wasm.Valtype) = .empty,
284mir_locals: std.ArrayList(std.wasm.Valtype) = .empty,
285285
286params_scratch: std.ArrayListUnmanaged(std.wasm.Valtype) = .empty,
287returns_scratch: std.ArrayListUnmanaged(std.wasm.Valtype) = .empty,
286params_scratch: std.ArrayList(std.wasm.Valtype) = .empty,
287returns_scratch: std.ArrayList(std.wasm.Valtype) = .empty,
288288
289289/// All Zcu error names in order, null-terminated, concatenated. No need to
290290/// serialize; trivially reconstructed.
291error_name_bytes: std.ArrayListUnmanaged(u8) = .empty,
291error_name_bytes: std.ArrayList(u8) = .empty,
292292/// For each Zcu error, in order, offset into `error_name_bytes` where the name
293293/// is stored. No need to serialize; trivially reconstructed.
294error_name_offs: std.ArrayListUnmanaged(u32) = .empty,
294error_name_offs: std.ArrayList(u32) = .empty,
295295
296tag_name_bytes: std.ArrayListUnmanaged(u8) = .empty,
297tag_name_offs: std.ArrayListUnmanaged(u32) = .empty,
296tag_name_bytes: std.ArrayList(u8) = .empty,
297tag_name_offs: std.ArrayList(u32) = .empty,
298298
299299pub const TagNameOff = extern struct {
300300 off: u32,
......@@ -4196,8 +4196,8 @@ fn convertZcuFnType(
41964196 params: []const InternPool.Index,
41974197 return_type: Zcu.Type,
41984198 target: *const std.Target,
4199 params_buffer: *std.ArrayListUnmanaged(std.wasm.Valtype),
4200 returns_buffer: *std.ArrayListUnmanaged(std.wasm.Valtype),
4199 params_buffer: *std.ArrayList(std.wasm.Valtype),
4200 returns_buffer: *std.ArrayList(std.wasm.Valtype),
42014201) Allocator.Error!void {
42024202 params_buffer.clearRetainingCapacity();
42034203 returns_buffer.clearRetainingCapacity();
src/link/Wasm/Archive.zig+1-1
......@@ -12,7 +12,7 @@ toc: Toc,
1212
1313/// Key points into `LazyArchive` `file_contents`.
1414/// Value is allocated with gpa.
15const Toc = std.StringArrayHashMapUnmanaged(std.ArrayListUnmanaged(u32));
15const Toc = std.StringArrayHashMapUnmanaged(std.ArrayList(u32));
1616
1717const ARMAG = std.elf.ARMAG;
1818const ARFMAG = std.elf.ARFMAG;
src/link/Wasm/Object.zig+8-8
......@@ -169,14 +169,14 @@ pub const Symbol = struct {
169169};
170170
171171pub const ScratchSpace = struct {
172 func_types: std.ArrayListUnmanaged(Wasm.FunctionType.Index) = .empty,
173 func_type_indexes: std.ArrayListUnmanaged(FuncTypeIndex) = .empty,
174 func_imports: std.ArrayListUnmanaged(FunctionImport) = .empty,
175 global_imports: std.ArrayListUnmanaged(GlobalImport) = .empty,
176 table_imports: std.ArrayListUnmanaged(TableImport) = .empty,
177 symbol_table: std.ArrayListUnmanaged(Symbol) = .empty,
178 segment_info: std.ArrayListUnmanaged(SegmentInfo) = .empty,
179 exports: std.ArrayListUnmanaged(Export) = .empty,
172 func_types: std.ArrayList(Wasm.FunctionType.Index) = .empty,
173 func_type_indexes: std.ArrayList(FuncTypeIndex) = .empty,
174 func_imports: std.ArrayList(FunctionImport) = .empty,
175 global_imports: std.ArrayList(GlobalImport) = .empty,
176 table_imports: std.ArrayList(TableImport) = .empty,
177 symbol_table: std.ArrayList(Symbol) = .empty,
178 segment_info: std.ArrayList(SegmentInfo) = .empty,
179 exports: std.ArrayList(Export) = .empty,
180180
181181 const Export = struct {
182182 name: Wasm.String,
src/link/table_section.zig+2-2
......@@ -1,7 +1,7 @@
11pub fn TableSection(comptime Entry: type) type {
22 return struct {
3 entries: std.ArrayListUnmanaged(Entry) = .empty,
4 free_list: std.ArrayListUnmanaged(Index) = .empty,
3 entries: std.ArrayList(Entry) = .empty,
4 free_list: std.ArrayList(Index) = .empty,
55 lookup: std.AutoHashMapUnmanaged(Entry, Index) = .empty,
66
77 pub fn deinit(self: *Self, allocator: Allocator) void {
src/link/tapi/parse.zig+4-4
......@@ -103,7 +103,7 @@ pub const Node = struct {
103103 .start = undefined,
104104 .end = undefined,
105105 },
106 values: std.ArrayListUnmanaged(Entry) = .empty,
106 values: std.ArrayList(Entry) = .empty,
107107
108108 pub const base_tag: Node.Tag = .map;
109109
......@@ -142,7 +142,7 @@ pub const Node = struct {
142142 .start = undefined,
143143 .end = undefined,
144144 },
145 values: std.ArrayListUnmanaged(*Node) = .empty,
145 values: std.ArrayList(*Node) = .empty,
146146
147147 pub const base_tag: Node.Tag = .list;
148148
......@@ -169,7 +169,7 @@ pub const Node = struct {
169169 .start = undefined,
170170 .end = undefined,
171171 },
172 string_value: std.ArrayListUnmanaged(u8) = .empty,
172 string_value: std.ArrayList(u8) = .empty,
173173
174174 pub const base_tag: Node.Tag = .value;
175175
......@@ -194,7 +194,7 @@ pub const Tree = struct {
194194 source: []const u8,
195195 tokens: []Token,
196196 line_cols: std.AutoHashMap(TokenIndex, LineCol),
197 docs: std.ArrayListUnmanaged(*Node) = .empty,
197 docs: std.ArrayList(*Node) = .empty,
198198
199199 pub fn init(allocator: Allocator) Tree {
200200 return .{
src/main.zig+29-29
......@@ -132,7 +132,7 @@ const debug_usage = normal_usage ++
132132
133133const usage = if (build_options.enable_debug_extensions) debug_usage else normal_usage;
134134
135var log_scopes: std.ArrayListUnmanaged([]const u8) = .empty;
135var log_scopes: std.ArrayList([]const u8) = .empty;
136136
137137pub fn log(
138138 comptime level: std.log.Level,
......@@ -884,7 +884,7 @@ fn buildOutputType(
884884 var link_emit_relocs = false;
885885 var build_id: ?std.zig.BuildId = null;
886886 var runtime_args_start: ?usize = null;
887 var test_filters: std.ArrayListUnmanaged([]const u8) = .empty;
887 var test_filters: std.ArrayList([]const u8) = .empty;
888888 var test_runner_path: ?[]const u8 = null;
889889 var override_local_cache_dir: ?[]const u8 = try EnvVar.ZIG_LOCAL_CACHE_DIR.get(arena);
890890 var override_global_cache_dir: ?[]const u8 = try EnvVar.ZIG_GLOBAL_CACHE_DIR.get(arena);
......@@ -912,12 +912,12 @@ fn buildOutputType(
912912 var pdb_out_path: ?[]const u8 = null;
913913 var error_limit: ?Zcu.ErrorInt = null;
914914 // These are before resolving sysroot.
915 var extra_cflags: std.ArrayListUnmanaged([]const u8) = .empty;
916 var extra_rcflags: std.ArrayListUnmanaged([]const u8) = .empty;
915 var extra_cflags: std.ArrayList([]const u8) = .empty;
916 var extra_rcflags: std.ArrayList([]const u8) = .empty;
917917 var symbol_wrap_set: std.StringArrayHashMapUnmanaged(void) = .empty;
918918 var rc_includes: std.zig.RcIncludes = .any;
919919 var manifest_file: ?[]const u8 = null;
920 var linker_export_symbol_names: std.ArrayListUnmanaged([]const u8) = .empty;
920 var linker_export_symbol_names: std.ArrayList([]const u8) = .empty;
921921
922922 // Tracks the position in c_source_files which have already their owner populated.
923923 var c_source_files_owner_index: usize = 0;
......@@ -925,7 +925,7 @@ fn buildOutputType(
925925 var rc_source_files_owner_index: usize = 0;
926926
927927 // null means replace with the test executable binary
928 var test_exec_args: std.ArrayListUnmanaged(?[]const u8) = .empty;
928 var test_exec_args: std.ArrayList(?[]const u8) = .empty;
929929
930930 // These get set by CLI flags and then snapshotted when a `-M` flag is
931931 // encountered.
......@@ -934,8 +934,8 @@ fn buildOutputType(
934934 // These get appended to by CLI flags and then slurped when a `-M` flag
935935 // is encountered.
936936 var cssan: ClangSearchSanitizer = .{};
937 var cc_argv: std.ArrayListUnmanaged([]const u8) = .empty;
938 var deps: std.ArrayListUnmanaged(CliModule.Dep) = .empty;
937 var cc_argv: std.ArrayList([]const u8) = .empty;
938 var deps: std.ArrayList(CliModule.Dep) = .empty;
939939
940940 // Contains every module specified via -M. The dependencies are added
941941 // after argument parsing is completed. We use a StringArrayHashMap to make
......@@ -3374,7 +3374,7 @@ fn buildOutputType(
33743374
33753375 process.raiseFileDescriptorLimit();
33763376
3377 var file_system_inputs: std.ArrayListUnmanaged(u8) = .empty;
3377 var file_system_inputs: std.ArrayList(u8) = .empty;
33783378 defer file_system_inputs.deinit(gpa);
33793379
33803380 // Deduplicate rpath entries
......@@ -3698,29 +3698,29 @@ const CreateModule = struct {
36983698 /// directly after computing the target and used to compute link_libc,
36993699 /// link_libcpp, and then the libraries are filtered into
37003700 /// `unresolved_link_inputs` and `windows_libs`.
3701 cli_link_inputs: std.ArrayListUnmanaged(link.UnresolvedInput),
3701 cli_link_inputs: std.ArrayList(link.UnresolvedInput),
37023702 windows_libs: std.StringArrayHashMapUnmanaged(void),
37033703 /// The local variable `unresolved_link_inputs` is fed into library
37043704 /// resolution, mutating the input array, and producing this data as
37053705 /// output. Allocated with gpa.
3706 link_inputs: std.ArrayListUnmanaged(link.Input),
3706 link_inputs: std.ArrayList(link.Input),
37073707
3708 c_source_files: std.ArrayListUnmanaged(Compilation.CSourceFile),
3709 rc_source_files: std.ArrayListUnmanaged(Compilation.RcSourceFile),
3708 c_source_files: std.ArrayList(Compilation.CSourceFile),
3709 rc_source_files: std.ArrayList(Compilation.RcSourceFile),
37103710
37113711 /// e.g. -m3dnow or -mno-outline-atomics. They correspond to std.Target llvm cpu feature names.
37123712 /// This array is populated by zig cc frontend and then has to be converted to zig-style
37133713 /// CPU features.
3714 llvm_m_args: std.ArrayListUnmanaged([]const u8),
3714 llvm_m_args: std.ArrayList([]const u8),
37153715 sysroot: ?[]const u8,
3716 lib_directories: std.ArrayListUnmanaged(Directory),
3717 lib_dir_args: std.ArrayListUnmanaged([]const u8),
3716 lib_directories: std.ArrayList(Directory),
3717 lib_dir_args: std.ArrayList([]const u8),
37183718 libc_installation: ?LibCInstallation,
37193719 want_native_include_dirs: bool,
37203720 frameworks: std.StringArrayHashMapUnmanaged(Framework),
37213721 native_system_include_paths: []const []const u8,
3722 framework_dirs: std.ArrayListUnmanaged([]const u8),
3723 rpath_list: std.ArrayListUnmanaged([]const u8),
3722 framework_dirs: std.ArrayList([]const u8),
3723 rpath_list: std.ArrayList([]const u8),
37243724 each_lib_rpath: ?bool,
37253725 libc_paths_file: ?[]const u8,
37263726};
......@@ -3826,7 +3826,7 @@ fn createModule(
38263826 // We need to know whether the set of system libraries contains anything besides these
38273827 // to decide whether to trigger native path detection logic.
38283828 // Preserves linker input order.
3829 var unresolved_link_inputs: std.ArrayListUnmanaged(link.UnresolvedInput) = .empty;
3829 var unresolved_link_inputs: std.ArrayList(link.UnresolvedInput) = .empty;
38303830 defer unresolved_link_inputs.deinit(gpa);
38313831 try unresolved_link_inputs.ensureUnusedCapacity(gpa, create_module.cli_link_inputs.items.len);
38323832 var any_name_queries_remaining = false;
......@@ -4215,11 +4215,11 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {
42154215 if (comp.time_report) |*tr| {
42164216 var decls_len: u32 = 0;
42174217
4218 var file_name_bytes: std.ArrayListUnmanaged(u8) = .empty;
4218 var file_name_bytes: std.ArrayList(u8) = .empty;
42194219 defer file_name_bytes.deinit(gpa);
42204220 var files: std.AutoArrayHashMapUnmanaged(Zcu.File.Index, void) = .empty;
42214221 defer files.deinit(gpa);
4222 var decl_data: std.ArrayListUnmanaged(u8) = .empty;
4222 var decl_data: std.ArrayList(u8) = .empty;
42234223 defer decl_data.deinit(gpa);
42244224
42254225 // Each decl needs at least 34 bytes:
......@@ -4546,7 +4546,7 @@ fn cmdTranslateC(
45464546 comp: *Compilation,
45474547 arena: Allocator,
45484548 fancy_output: ?*Compilation.CImportResult,
4549 file_system_inputs: ?*std.ArrayListUnmanaged(u8),
4549 file_system_inputs: ?*std.ArrayList(u8),
45504550 prog_node: std.Progress.Node,
45514551) !void {
45524552 dev.check(.translate_c_command);
......@@ -4754,7 +4754,7 @@ fn cmdInit(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
47544754}
47554755
47564756fn sanitizeExampleName(arena: Allocator, bytes: []const u8) error{OutOfMemory}![]const u8 {
4757 var result: std.ArrayListUnmanaged(u8) = .empty;
4757 var result: std.ArrayList(u8) = .empty;
47584758 for (bytes, 0..) |byte, i| switch (byte) {
47594759 '0'...'9' => {
47604760 if (i == 0) try result.append(arena, '_');
......@@ -5486,7 +5486,7 @@ fn jitCmd(
54865486 });
54875487 defer thread_pool.deinit();
54885488
5489 var child_argv: std.ArrayListUnmanaged([]const u8) = .empty;
5489 var child_argv: std.ArrayList([]const u8) = .empty;
54905490 try child_argv.ensureUnusedCapacity(arena, args.len + 4);
54915491
54925492 // We want to release all the locks before executing the child process, so we make a nice
......@@ -6687,7 +6687,7 @@ const ClangSearchSanitizer = struct {
66876687 fn addIncludePath(
66886688 self: *@This(),
66896689 ally: Allocator,
6690 argv: *std.ArrayListUnmanaged([]const u8),
6690 argv: *std.ArrayList([]const u8),
66916691 group: Group,
66926692 arg: []const u8,
66936693 dir: []const u8,
......@@ -7436,10 +7436,10 @@ fn handleModArg(
74367436 opt_root_src_orig: ?[]const u8,
74377437 create_module: *CreateModule,
74387438 mod_opts: *Package.Module.CreateOptions.Inherited,
7439 cc_argv: *std.ArrayListUnmanaged([]const u8),
7439 cc_argv: *std.ArrayList([]const u8),
74407440 target_arch_os_abi: *?[]const u8,
74417441 target_mcpu: *?[]const u8,
7442 deps: *std.ArrayListUnmanaged(CliModule.Dep),
7442 deps: *std.ArrayList(CliModule.Dep),
74437443 c_source_files_owner_index: *usize,
74447444 rc_source_files_owner_index: *usize,
74457445 cssan: *ClangSearchSanitizer,
......@@ -7513,12 +7513,12 @@ fn anyObjectLinkInputs(link_inputs: []const link.UnresolvedInput) bool {
75137513 return false;
75147514}
75157515
7516fn addLibDirectoryWarn(lib_directories: *std.ArrayListUnmanaged(Directory), path: []const u8) void {
7516fn addLibDirectoryWarn(lib_directories: *std.ArrayList(Directory), path: []const u8) void {
75177517 return addLibDirectoryWarn2(lib_directories, path, false);
75187518}
75197519
75207520fn addLibDirectoryWarn2(
7521 lib_directories: *std.ArrayListUnmanaged(Directory),
7521 lib_directories: *std.ArrayList(Directory),
75227522 path: []const u8,
75237523 ignore_not_found: bool,
75247524) void {
src/register_manager.zig+1-1
......@@ -483,7 +483,7 @@ fn MockFunction(comptime Register: type) type {
483483 return struct {
484484 allocator: Allocator,
485485 register_manager: Register.RM = .{},
486 spilled: std.ArrayListUnmanaged(Register) = .empty,
486 spilled: std.ArrayList(Register) = .empty,
487487
488488 const Self = @This();
489489
test/behavior/fn.zig+2-2
......@@ -407,8 +407,8 @@ test "import passed byref to function in return type" {
407407 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
408408
409409 const S = struct {
410 fn get() @import("std").ArrayListUnmanaged(i32) {
411 const x: @import("std").ArrayListUnmanaged(i32) = .empty;
410 fn get() @import("std").ArrayList(i32) {
411 const x: @import("std").ArrayList(i32) = .empty;
412412 return x;
413413 }
414414 };
tools/doctest.zig+2-2
......@@ -924,8 +924,8 @@ fn parseManifest(arena: Allocator, source_bytes: []const u8) !Code {
924924
925925 var mode: std.builtin.OptimizeMode = .Debug;
926926 var link_mode: ?std.builtin.LinkMode = null;
927 var link_objects: std.ArrayListUnmanaged([]const u8) = .empty;
928 var additional_options: std.ArrayListUnmanaged([]const u8) = .empty;
927 var link_objects: std.ArrayList([]const u8) = .empty;
928 var additional_options: std.ArrayList([]const u8) = .empty;
929929 var target_str: ?[]const u8 = null;
930930 var link_libc = false;
931931 var disable_cache = false;
tools/incr-check.zig+11-11
......@@ -108,7 +108,7 @@ pub fn main() !void {
108108 if (debug_log_verbose) {
109109 std.log.scoped(.status).info("target: '{s}-{t}'", .{ target.query, target.backend });
110110 }
111 var child_args: std.ArrayListUnmanaged([]const u8) = .empty;
111 var child_args: std.ArrayList([]const u8) = .empty;
112112 try child_args.appendSlice(arena, &.{
113113 resolved_zig_exe,
114114 "build-exe",
......@@ -161,7 +161,7 @@ pub fn main() !void {
161161 child.cwd_dir = tmp_dir;
162162 child.cwd = tmp_dir_path;
163163
164 var cc_child_args: std.ArrayListUnmanaged([]const u8) = .empty;
164 var cc_child_args: std.ArrayList([]const u8) = .empty;
165165 if (target.backend == .cbe) {
166166 const resolved_cc_zig_exe = if (opt_cc_zig) |cc_zig_exe|
167167 try std.fs.path.relative(arena, tmp_dir_path, cc_zig_exe)
......@@ -238,7 +238,7 @@ const Eval = struct {
238238 preserve_tmp_on_fatal: bool,
239239 /// When `target.backend == .cbe`, this contains the first few arguments to `zig cc` to build the generated binary.
240240 /// The arguments `out.c in.c` must be appended before spawning the subprocess.
241 cc_child_args: *std.ArrayListUnmanaged([]const u8),
241 cc_child_args: *std.ArrayList([]const u8),
242242
243243 const StreamEnum = enum { stdout, stderr };
244244 const Poller = Io.Poller(StreamEnum);
......@@ -664,11 +664,11 @@ const Case = struct {
664664 fn parse(arena: Allocator, io: Io, bytes: []const u8) !Case {
665665 const fatal = std.process.fatal;
666666
667 var targets: std.ArrayListUnmanaged(Target) = .empty;
668 var modules: std.ArrayListUnmanaged(Module) = .empty;
669 var updates: std.ArrayListUnmanaged(Update) = .empty;
670 var changes: std.ArrayListUnmanaged(FullContents) = .empty;
671 var deletes: std.ArrayListUnmanaged([]const u8) = .empty;
667 var targets: std.ArrayList(Target) = .empty;
668 var modules: std.ArrayList(Module) = .empty;
669 var updates: std.ArrayList(Update) = .empty;
670 var changes: std.ArrayList(FullContents) = .empty;
671 var deletes: std.ArrayList([]const u8) = .empty;
672672 var it = std.mem.splitScalar(u8, bytes, '\n');
673673 var line_n: usize = 1;
674674 var root_source_file: ?[]const u8 = null;
......@@ -731,7 +731,7 @@ const Case = struct {
731731
732732 // Because Windows is so excellent, we need to convert CRLF to LF, so
733733 // can't just slice into the input here. How delightful!
734 var src: std.ArrayListUnmanaged(u8) = .empty;
734 var src: std.ArrayList(u8) = .empty;
735735
736736 while (true) {
737737 const next_line_raw = it.peek() orelse fatal("line {d}: unexpected EOF", .{line_n});
......@@ -767,7 +767,7 @@ const Case = struct {
767767 const last_update = &updates.items[updates.items.len - 1];
768768 if (last_update.outcome != .unknown) fatal("line {d}: conflicting expect directive", .{line_n});
769769
770 var errors: std.ArrayListUnmanaged(ExpectedError) = .empty;
770 var errors: std.ArrayList(ExpectedError) = .empty;
771771 try errors.append(arena, parseExpectedError(val, line_n));
772772 while (true) {
773773 const next_line = it.peek() orelse break;
......@@ -783,7 +783,7 @@ const Case = struct {
783783 try errors.append(arena, parseExpectedError(new_val, line_n));
784784 }
785785
786 var compile_log_output: std.ArrayListUnmanaged(u8) = .empty;
786 var compile_log_output: std.ArrayList(u8) = .empty;
787787 while (true) {
788788 const next_line = it.peek() orelse break;
789789 if (!std.mem.startsWith(u8, next_line, "#")) break;