| author | |
| committer | |
| log | 4b5351bc0ddc248d6935d7d160a57cb4dfe4dedd |
| tree | 8ce84d4e44a8ee1abaf0ef71d8287cec4b0f8c0a |
| parent | db622f14c445b4f55981636543c546e22346abd5 |
| signature |
112 files changed, 630 insertions(+), 631 deletions(-)
doc/langref/test_switch_dispatch_loop.zig+1-1| ... | @@ -9,7 +9,7 @@ const Instruction = enum { | ... | @@ -9,7 +9,7 @@ const Instruction = enum { |
| 9 | 9 | ||
| 10 | fn evaluate(initial_stack: []const i32, code: []const Instruction) !i32 { | 10 | fn evaluate(initial_stack: []const i32, code: []const Instruction) !i32 { |
| 11 | var buffer: [8]i32 = undefined; | 11 | var buffer: [8]i32 = undefined; |
| 12 | var stack = std.ArrayListUnmanaged(i32).initBuffer(&buffer); | 12 | var stack = std.ArrayList(i32).initBuffer(&buffer); |
| 13 | try stack.appendSliceBounded(initial_stack); | 13 | try stack.appendSliceBounded(initial_stack); |
| 14 | var ip: usize = 0; | 14 | var ip: usize = 0; |
| 15 | 15 |
lib/build-web/fuzz.zig+9-9| ... | @@ -42,7 +42,7 @@ pub fn sourceIndexMessage(msg_bytes: []u8) error{OutOfMemory}!void { | ... | @@ -42,7 +42,7 @@ pub fn sourceIndexMessage(msg_bytes: []u8) error{OutOfMemory}!void { |
| 42 | 42 | ||
| 43 | var coverage = Coverage.init; | 43 | var coverage = Coverage.init; |
| 44 | /// Index of type `SourceLocationIndex`. | 44 | /// Index of type `SourceLocationIndex`. |
| 45 | var coverage_source_locations: std.ArrayListUnmanaged(Coverage.SourceLocation) = .empty; | 45 | var coverage_source_locations: std.ArrayList(Coverage.SourceLocation) = .empty; |
| 46 | /// Contains the most recent coverage update message, unmodified. | 46 | /// Contains the most recent coverage update message, unmodified. |
| 47 | var recent_coverage_update: std.ArrayListAlignedUnmanaged(u8, .of(u64)) = .empty; | 47 | var recent_coverage_update: std.ArrayListAlignedUnmanaged(u8, .of(u64)) = .empty; |
| 48 | 48 | ||
| ... | @@ -76,7 +76,7 @@ pub fn coverageUpdateMessage(msg_bytes: []u8) error{OutOfMemory}!void { | ... | @@ -76,7 +76,7 @@ pub fn coverageUpdateMessage(msg_bytes: []u8) error{OutOfMemory}!void { |
| 76 | try updateCoverage(); | 76 | try updateCoverage(); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | var entry_points: std.ArrayListUnmanaged(SourceLocationIndex) = .empty; | 79 | var entry_points: std.ArrayList(SourceLocationIndex) = .empty; |
| 80 | 80 | ||
| 81 | pub fn entryPointsMessage(msg_bytes: []u8) error{OutOfMemory}!void { | 81 | pub fn entryPointsMessage(msg_bytes: []u8) error{OutOfMemory}!void { |
| 82 | const header: abi.fuzz.EntryPointHeader = @bitCast(msg_bytes[0..@sizeOf(abi.fuzz.EntryPointHeader)].*); | 82 | const header: abi.fuzz.EntryPointHeader = @bitCast(msg_bytes[0..@sizeOf(abi.fuzz.EntryPointHeader)].*); |
| ... | @@ -127,7 +127,7 @@ const SourceLocationIndex = enum(u32) { | ... | @@ -127,7 +127,7 @@ const SourceLocationIndex = enum(u32) { |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | fn toWalkFile(sli: SourceLocationIndex) ?Walk.File.Index { | 129 | fn toWalkFile(sli: SourceLocationIndex) ?Walk.File.Index { |
| 130 | var buf: std.ArrayListUnmanaged(u8) = .empty; | 130 | var buf: std.ArrayList(u8) = .empty; |
| 131 | defer buf.deinit(gpa); | 131 | defer buf.deinit(gpa); |
| 132 | sli.appendPath(&buf) catch @panic("OOM"); | 132 | sli.appendPath(&buf) catch @panic("OOM"); |
| 133 | return @enumFromInt(Walk.files.getIndex(buf.items) orelse return null); | 133 | return @enumFromInt(Walk.files.getIndex(buf.items) orelse return null); |
| ... | @@ -135,11 +135,11 @@ const SourceLocationIndex = enum(u32) { | ... | @@ -135,11 +135,11 @@ const SourceLocationIndex = enum(u32) { |
| 135 | 135 | ||
| 136 | fn fileHtml( | 136 | fn fileHtml( |
| 137 | sli: SourceLocationIndex, | 137 | sli: SourceLocationIndex, |
| 138 | out: *std.ArrayListUnmanaged(u8), | 138 | out: *std.ArrayList(u8), |
| 139 | ) error{ OutOfMemory, SourceUnavailable }!void { | 139 | ) error{ OutOfMemory, SourceUnavailable }!void { |
| 140 | const walk_file_index = sli.toWalkFile() orelse return error.SourceUnavailable; | 140 | const walk_file_index = sli.toWalkFile() orelse return error.SourceUnavailable; |
| 141 | const root_node = walk_file_index.findRootDecl().get().ast_node; | 141 | 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; |
| 143 | defer annotations.deinit(gpa); | 143 | defer annotations.deinit(gpa); |
| 144 | try computeSourceAnnotations(sli.ptr().file, walk_file_index, &annotations, coverage_source_locations.items); | 144 | try computeSourceAnnotations(sli.ptr().file, walk_file_index, &annotations, coverage_source_locations.items); |
| 145 | html_render.fileSourceHtml(walk_file_index, out, root_node, .{ | 145 | html_render.fileSourceHtml(walk_file_index, out, root_node, .{ |
| ... | @@ -153,13 +153,13 @@ const SourceLocationIndex = enum(u32) { | ... | @@ -153,13 +153,13 @@ const SourceLocationIndex = enum(u32) { |
| 153 | fn computeSourceAnnotations( | 153 | fn computeSourceAnnotations( |
| 154 | cov_file_index: Coverage.File.Index, | 154 | cov_file_index: Coverage.File.Index, |
| 155 | walk_file_index: Walk.File.Index, | 155 | walk_file_index: Walk.File.Index, |
| 156 | annotations: *std.ArrayListUnmanaged(html_render.Annotation), | 156 | annotations: *std.ArrayList(html_render.Annotation), |
| 157 | source_locations: []const Coverage.SourceLocation, | 157 | source_locations: []const Coverage.SourceLocation, |
| 158 | ) !void { | 158 | ) !void { |
| 159 | // Collect all the source locations from only this file into this array | 159 | // Collect all the source locations from only this file into this array |
| 160 | // first, then sort by line, col, so that we can collect annotations with | 160 | // first, then sort by line, col, so that we can collect annotations with |
| 161 | // O(N) time complexity. | 161 | // O(N) time complexity. |
| 162 | var locs: std.ArrayListUnmanaged(SourceLocationIndex) = .empty; | 162 | var locs: std.ArrayList(SourceLocationIndex) = .empty; |
| 163 | defer locs.deinit(gpa); | 163 | defer locs.deinit(gpa); |
| 164 | 164 | ||
| 165 | for (source_locations, 0..) |sl, sli_usize| { | 165 | for (source_locations, 0..) |sl, sli_usize| { |
| ... | @@ -309,7 +309,7 @@ fn updateCoverage() error{OutOfMemory}!void { | ... | @@ -309,7 +309,7 @@ fn updateCoverage() error{OutOfMemory}!void { |
| 309 | if (recent_coverage_update.items.len == 0) return; | 309 | if (recent_coverage_update.items.len == 0) return; |
| 310 | const want_file = (selected_source_location orelse return).ptr().file; | 310 | const want_file = (selected_source_location orelse return).ptr().file; |
| 311 | 311 | ||
| 312 | var covered: std.ArrayListUnmanaged(SourceLocationIndex) = .empty; | 312 | var covered: std.ArrayList(SourceLocationIndex) = .empty; |
| 313 | defer covered.deinit(gpa); | 313 | defer covered.deinit(gpa); |
| 314 | 314 | ||
| 315 | // This code assumes 64-bit elements, which is incorrect if the executable | 315 | // This code assumes 64-bit elements, which is incorrect if the executable |
| ... | @@ -340,7 +340,7 @@ fn updateCoverage() error{OutOfMemory}!void { | ... | @@ -340,7 +340,7 @@ fn updateCoverage() error{OutOfMemory}!void { |
| 340 | fn updateSource() error{OutOfMemory}!void { | 340 | fn updateSource() error{OutOfMemory}!void { |
| 341 | if (recent_coverage_update.items.len == 0) return; | 341 | if (recent_coverage_update.items.len == 0) return; |
| 342 | const file_sli = selected_source_location.?; | 342 | const file_sli = selected_source_location.?; |
| 343 | var html: std.ArrayListUnmanaged(u8) = .empty; | 343 | var html: std.ArrayList(u8) = .empty; |
| 344 | defer html.deinit(gpa); | 344 | defer html.deinit(gpa); |
| 345 | file_sli.fileHtml(&html) catch |err| switch (err) { | 345 | file_sli.fileHtml(&html) catch |err| switch (err) { |
| 346 | error.OutOfMemory => |e| return e, | 346 | 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 { | ... | @@ -254,7 +254,7 @@ pub fn runTestResultMessage(msg_bytes: []u8) error{OutOfMemory}!void { |
| 254 | const durations: []align(1) const u64 = @ptrCast(trailing[0 .. hdr.tests_len * 8]); | 254 | const durations: []align(1) const u64 = @ptrCast(trailing[0 .. hdr.tests_len * 8]); |
| 255 | var offset: usize = hdr.tests_len * 8; | 255 | var offset: usize = hdr.tests_len * 8; |
| 256 | 256 | ||
| 257 | var table_html: std.ArrayListUnmanaged(u8) = .empty; | 257 | var table_html: std.ArrayList(u8) = .empty; |
| 258 | defer table_html.deinit(gpa); | 258 | defer table_html.deinit(gpa); |
| 259 | 259 | ||
| 260 | for (durations) |test_ns| { | 260 | for (durations) |test_ns| { |
lib/compiler/build_runner.zig+3-3| ... | @@ -459,7 +459,7 @@ pub fn main() !void { | ... | @@ -459,7 +459,7 @@ pub fn main() !void { |
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | if (graph.needed_lazy_dependencies.entries.len != 0) { | 461 | if (graph.needed_lazy_dependencies.entries.len != 0) { |
| 462 | var buffer: std.ArrayListUnmanaged(u8) = .empty; | 462 | var buffer: std.ArrayList(u8) = .empty; |
| 463 | for (graph.needed_lazy_dependencies.keys()) |k| { | 463 | for (graph.needed_lazy_dependencies.keys()) |k| { |
| 464 | try buffer.appendSlice(arena, k); | 464 | try buffer.appendSlice(arena, k); |
| 465 | try buffer.append(arena, '\n'); | 465 | try buffer.append(arena, '\n'); |
| ... | @@ -672,7 +672,7 @@ const Run = struct { | ... | @@ -672,7 +672,7 @@ const Run = struct { |
| 672 | watch: bool, | 672 | watch: bool, |
| 673 | web_server: if (!builtin.single_threaded) ?WebServer else ?noreturn, | 673 | web_server: if (!builtin.single_threaded) ?WebServer else ?noreturn, |
| 674 | /// Allocated into `gpa`. | 674 | /// Allocated into `gpa`. |
| 675 | memory_blocked_steps: std.ArrayListUnmanaged(*Step), | 675 | memory_blocked_steps: std.ArrayList(*Step), |
| 676 | /// Allocated into `gpa`. | 676 | /// Allocated into `gpa`. |
| 677 | step_stack: std.AutoArrayHashMapUnmanaged(*Step, void), | 677 | step_stack: std.AutoArrayHashMapUnmanaged(*Step, void), |
| 678 | thread_pool: std.Thread.Pool, | 678 | thread_pool: std.Thread.Pool, |
| ... | @@ -1468,7 +1468,7 @@ pub fn printErrorMessages( | ... | @@ -1468,7 +1468,7 @@ pub fn printErrorMessages( |
| 1468 | if (error_style.verboseContext()) { | 1468 | if (error_style.verboseContext()) { |
| 1469 | // Provide context for where these error messages are coming from by | 1469 | // Provide context for where these error messages are coming from by |
| 1470 | // printing the corresponding Step subtree. | 1470 | // printing the corresponding Step subtree. |
| 1471 | var step_stack: std.ArrayListUnmanaged(*Step) = .empty; | 1471 | var step_stack: std.ArrayList(*Step) = .empty; |
| 1472 | defer step_stack.deinit(gpa); | 1472 | defer step_stack.deinit(gpa); |
| 1473 | try step_stack.append(gpa, failing_step); | 1473 | try step_stack.append(gpa, failing_step); |
| 1474 | while (step_stack.items[step_stack.items.len - 1].dependants.items.len != 0) { | 1474 | 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 { | ... | @@ -381,8 +381,8 @@ const BinaryElfSegment = struct { |
| 381 | }; | 381 | }; |
| 382 | 382 | ||
| 383 | const BinaryElfOutput = struct { | 383 | const BinaryElfOutput = struct { |
| 384 | segments: std.ArrayListUnmanaged(*BinaryElfSegment), | 384 | segments: std.ArrayList(*BinaryElfSegment), |
| 385 | sections: std.ArrayListUnmanaged(*BinaryElfSection), | 385 | sections: std.ArrayList(*BinaryElfSection), |
| 386 | allocator: Allocator, | 386 | allocator: Allocator, |
| 387 | shstrtab: ?[]const u8, | 387 | shstrtab: ?[]const u8, |
| 388 | 388 |
lib/compiler/reduce.zig+1-1| ... | @@ -109,7 +109,7 @@ pub fn main() !void { | ... | @@ -109,7 +109,7 @@ pub fn main() !void { |
| 109 | const root_source_file_path = opt_root_source_file_path orelse | 109 | const root_source_file_path = opt_root_source_file_path orelse |
| 110 | fatal("missing root source file path argument; see -h for usage", .{}); | 110 | fatal("missing root source file path argument; see -h for usage", .{}); |
| 111 | 111 | ||
| 112 | var interestingness_argv: std.ArrayListUnmanaged([]const u8) = .empty; | 112 | var interestingness_argv: std.ArrayList([]const u8) = .empty; |
| 113 | try interestingness_argv.ensureUnusedCapacity(arena, argv.len + 1); | 113 | try interestingness_argv.ensureUnusedCapacity(arena, argv.len + 1); |
| 114 | interestingness_argv.appendAssumeCapacity(checker_path); | 114 | interestingness_argv.appendAssumeCapacity(checker_path); |
| 115 | interestingness_argv.appendSliceAssumeCapacity(argv); | 115 | interestingness_argv.appendSliceAssumeCapacity(argv); |
lib/compiler/reduce/Walk.zig+1-1| ... | @@ -23,7 +23,7 @@ pub const Transformation = union(enum) { | ... | @@ -23,7 +23,7 @@ pub const Transformation = union(enum) { |
| 23 | delete_var_decl: struct { | 23 | delete_var_decl: struct { |
| 24 | var_decl_node: Ast.Node.Index, | 24 | var_decl_node: Ast.Node.Index, |
| 25 | /// Identifier nodes that reference the variable. | 25 | /// Identifier nodes that reference the variable. |
| 26 | references: std.ArrayListUnmanaged(Ast.Node.Index), | 26 | references: std.ArrayList(Ast.Node.Index), |
| 27 | }, | 27 | }, |
| 28 | /// Replace an expression with `undefined`. | 28 | /// Replace an expression with `undefined`. |
| 29 | replace_with_undef: Ast.Node.Index, | 29 | replace_with_undef: Ast.Node.Index, |
lib/compiler/std-docs.zig+1-1| ... | @@ -284,7 +284,7 @@ fn buildWasmBinary( | ... | @@ -284,7 +284,7 @@ fn buildWasmBinary( |
| 284 | ) !Cache.Path { | 284 | ) !Cache.Path { |
| 285 | const gpa = context.gpa; | 285 | const gpa = context.gpa; |
| 286 | 286 | ||
| 287 | var argv: std.ArrayListUnmanaged([]const u8) = .empty; | 287 | var argv: std.ArrayList([]const u8) = .empty; |
| 288 | 288 | ||
| 289 | try argv.appendSlice(arena, &.{ | 289 | try argv.appendSlice(arena, &.{ |
| 290 | context.zig_exe_path, // | 290 | context.zig_exe_path, // |
lib/compiler/test_runner.zig+1-1| ... | @@ -104,7 +104,7 @@ fn mainServer() !void { | ... | @@ -104,7 +104,7 @@ fn mainServer() !void { |
| 104 | @panic("internal test runner memory leak"); | 104 | @panic("internal test runner memory leak"); |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | var string_bytes: std.ArrayListUnmanaged(u8) = .empty; | 107 | var string_bytes: std.ArrayList(u8) = .empty; |
| 108 | defer string_bytes.deinit(testing.allocator); | 108 | defer string_bytes.deinit(testing.allocator); |
| 109 | try string_bytes.append(testing.allocator, 0); // Reserve 0 for null. | 109 | try string_bytes.append(testing.allocator, 0); // Reserve 0 for null. |
| 110 | 110 |
lib/docs/wasm/Walk.zig+1-1| ... | @@ -11,7 +11,7 @@ const Oom = error{OutOfMemory}; | ... | @@ -11,7 +11,7 @@ const Oom = error{OutOfMemory}; |
| 11 | pub const Decl = @import("Decl.zig"); | 11 | pub const Decl = @import("Decl.zig"); |
| 12 | 12 | ||
| 13 | pub var files: std.StringArrayHashMapUnmanaged(File) = .empty; | 13 | pub var files: std.StringArrayHashMapUnmanaged(File) = .empty; |
| 14 | pub var decls: std.ArrayListUnmanaged(Decl) = .empty; | 14 | pub var decls: std.ArrayList(Decl) = .empty; |
| 15 | pub var modules: std.StringArrayHashMapUnmanaged(File.Index) = .empty; | 15 | pub var modules: std.StringArrayHashMapUnmanaged(File.Index) = .empty; |
| 16 | 16 | ||
| 17 | file: File.Index, | 17 | file: File.Index, |
lib/docs/wasm/markdown/Parser.zig+1-1| ... | @@ -29,7 +29,7 @@ const Node = Document.Node; | ... | @@ -29,7 +29,7 @@ const Node = Document.Node; |
| 29 | const ExtraIndex = Document.ExtraIndex; | 29 | const ExtraIndex = Document.ExtraIndex; |
| 30 | const ExtraData = Document.ExtraData; | 30 | const ExtraData = Document.ExtraData; |
| 31 | const StringIndex = Document.StringIndex; | 31 | const StringIndex = Document.StringIndex; |
| 32 | const ArrayList = std.ArrayListUnmanaged; | 32 | const ArrayList = std.ArrayList; |
| 33 | 33 | ||
| 34 | nodes: Node.List = .{}, | 34 | nodes: Node.List = .{}, |
| 35 | extra: ArrayList(u32) = .empty, | 35 | extra: ArrayList(u32) = .empty, |
lib/fuzzer.zig+7-7| ... | @@ -280,10 +280,10 @@ const Instrumentation = struct { | ... | @@ -280,10 +280,10 @@ const Instrumentation = struct { |
| 280 | /// Values that have been constant operands in comparisons and switch cases. | 280 | /// Values that have been constant operands in comparisons and switch cases. |
| 281 | /// There may be duplicates in this array if they came from different addresses, which is | 281 | /// There may be duplicates in this array if they came from different addresses, which is |
| 282 | /// fine as they are likely more important and hence more likely to be selected. | 282 | /// fine as they are likely more important and hence more likely to be selected. |
| 283 | const_vals2: std.ArrayListUnmanaged(u16) = .empty, | 283 | const_vals2: std.ArrayList(u16) = .empty, |
| 284 | const_vals4: std.ArrayListUnmanaged(u32) = .empty, | 284 | const_vals4: std.ArrayList(u32) = .empty, |
| 285 | const_vals8: std.ArrayListUnmanaged(u64) = .empty, | 285 | const_vals8: std.ArrayList(u64) = .empty, |
| 286 | const_vals16: std.ArrayListUnmanaged(u128) = .empty, | 286 | const_vals16: std.ArrayList(u128) = .empty, |
| 287 | 287 | ||
| 288 | /// A minimal state for this struct which instrumentation can function on. | 288 | /// A minimal state for this struct which instrumentation can function on. |
| 289 | /// Used before this structure is initialized to avoid illegal behavior | 289 | /// Used before this structure is initialized to avoid illegal behavior |
| ... | @@ -384,11 +384,11 @@ const Fuzzer = struct { | ... | @@ -384,11 +384,11 @@ const Fuzzer = struct { |
| 384 | /// Minimized past inputs leading to new pc hits. | 384 | /// Minimized past inputs leading to new pc hits. |
| 385 | /// These are randomly mutated in round-robin fashion | 385 | /// These are randomly mutated in round-robin fashion |
| 386 | /// Element zero is always an empty input. It is gauraunteed no other elements are empty. | 386 | /// 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), |
| 388 | corpus_pos: usize, | 388 | corpus_pos: usize, |
| 389 | /// List of past mutations that have led to new inputs. This way, the mutations that are the | 389 | /// List of past mutations that have led to new inputs. This way, the mutations that are the |
| 390 | /// most effective are the most likely to be selected again. Starts with one of each mutation. | 390 | /// 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, |
| 392 | 392 | ||
| 393 | /// Filesystem directory containing found inputs for future runs | 393 | /// Filesystem directory containing found inputs for future runs |
| 394 | corpus_dir: std.fs.Dir, | 394 | corpus_dir: std.fs.Dir, |
| ... | @@ -1308,7 +1308,7 @@ const Mutation = enum { | ... | @@ -1308,7 +1308,7 @@ const Mutation = enum { |
| 1308 | } | 1308 | } |
| 1309 | }; | 1309 | }; |
| 1310 | 1310 | ||
| 1311 | /// Like `std.ArrayListUnmanaged(u8)` but backed by memory mapping. | 1311 | /// Like `std.ArrayList(u8)` but backed by memory mapping. |
| 1312 | pub const MemoryMappedList = struct { | 1312 | pub const MemoryMappedList = struct { |
| 1313 | /// Contents of the list. | 1313 | /// Contents of the list. |
| 1314 | /// | 1314 | /// |
lib/std/Build/Cache.zig+3-3| ... | @@ -1063,10 +1063,10 @@ pub const Manifest = struct { | ... | @@ -1063,10 +1063,10 @@ pub const Manifest = struct { |
| 1063 | const dep_file_contents = try dir.readFileAlloc(dep_file_sub_path, gpa, .limited(manifest_file_size_max)); | 1063 | const dep_file_contents = try dir.readFileAlloc(dep_file_sub_path, gpa, .limited(manifest_file_size_max)); |
| 1064 | defer gpa.free(dep_file_contents); | 1064 | defer gpa.free(dep_file_contents); |
| 1065 | 1065 | ||
| 1066 | var error_buf: std.ArrayListUnmanaged(u8) = .empty; | 1066 | var error_buf: std.ArrayList(u8) = .empty; |
| 1067 | defer error_buf.deinit(gpa); | 1067 | defer error_buf.deinit(gpa); |
| 1068 | 1068 | ||
| 1069 | var resolve_buf: std.ArrayListUnmanaged(u8) = .empty; | 1069 | var resolve_buf: std.ArrayList(u8) = .empty; |
| 1070 | defer resolve_buf.deinit(gpa); | 1070 | defer resolve_buf.deinit(gpa); |
| 1071 | 1071 | ||
| 1072 | var it: DepTokenizer = .{ .bytes = dep_file_contents }; | 1072 | var it: DepTokenizer = .{ .bytes = dep_file_contents }; |
| ... | @@ -1217,7 +1217,7 @@ pub const Manifest = struct { | ... | @@ -1217,7 +1217,7 @@ pub const Manifest = struct { |
| 1217 | self.files.deinit(self.cache.gpa); | 1217 | self.files.deinit(self.cache.gpa); |
| 1218 | } | 1218 | } |
| 1219 | 1219 | ||
| 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 { |
| 1221 | assert(@typeInfo(std.zig.Server.Message.PathPrefix).@"enum".fields.len == man.cache.prefixes_len); | 1221 | assert(@typeInfo(std.zig.Server.Message.PathPrefix).@"enum".fields.len == man.cache.prefixes_len); |
| 1222 | buf.clearRetainingCapacity(); | 1222 | buf.clearRetainingCapacity(); |
| 1223 | const gpa = man.cache.gpa; | 1223 | const gpa = man.cache.gpa; |
lib/std/Build/Cache/DepTokenizer.zig+6-6| ... | @@ -363,7 +363,7 @@ pub const Token = union(enum) { | ... | @@ -363,7 +363,7 @@ pub const Token = union(enum) { |
| 363 | }; | 363 | }; |
| 364 | 364 | ||
| 365 | /// Resolve escapes in target or prereq. Only valid with .target_must_resolve or .prereq_must_resolve. | 365 | /// 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 { |
| 367 | switch (self) { | 367 | switch (self) { |
| 368 | .target_must_resolve => |bytes| { | 368 | .target_must_resolve => |bytes| { |
| 369 | var state: enum { start, escape, dollar } = .start; | 369 | var state: enum { start, escape, dollar } = .start; |
| ... | @@ -429,7 +429,7 @@ pub const Token = union(enum) { | ... | @@ -429,7 +429,7 @@ pub const Token = union(enum) { |
| 429 | } | 429 | } |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 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 { |
| 433 | switch (self) { | 433 | switch (self) { |
| 434 | .target, .target_must_resolve, .prereq, .prereq_must_resolve => unreachable, // not an error | 434 | .target, .target_must_resolve, .prereq, .prereq_must_resolve => unreachable, // not an error |
| 435 | .incomplete_quoted_prerequisite, | 435 | .incomplete_quoted_prerequisite, |
| ... | @@ -1027,8 +1027,8 @@ fn depTokenizer(input: []const u8, expect: []const u8) !void { | ... | @@ -1027,8 +1027,8 @@ fn depTokenizer(input: []const u8, expect: []const u8) !void { |
| 1027 | defer arena_allocator.deinit(); | 1027 | defer arena_allocator.deinit(); |
| 1028 | 1028 | ||
| 1029 | var it: Tokenizer = .{ .bytes = input }; | 1029 | var it: Tokenizer = .{ .bytes = input }; |
| 1030 | var buffer: std.ArrayListUnmanaged(u8) = .empty; | 1030 | var buffer: std.ArrayList(u8) = .empty; |
| 1031 | var resolve_buf: std.ArrayListUnmanaged(u8) = .empty; | 1031 | var resolve_buf: std.ArrayList(u8) = .empty; |
| 1032 | var i: usize = 0; | 1032 | var i: usize = 0; |
| 1033 | while (it.next()) |token| { | 1033 | while (it.next()) |token| { |
| 1034 | if (i != 0) try buffer.appendSlice(arena, "\n"); | 1034 | if (i != 0) try buffer.appendSlice(arena, "\n"); |
| ... | @@ -1076,11 +1076,11 @@ fn depTokenizer(input: []const u8, expect: []const u8) !void { | ... | @@ -1076,11 +1076,11 @@ fn depTokenizer(input: []const u8, expect: []const u8) !void { |
| 1076 | try testing.expectEqualStrings(expect, buffer.items); | 1076 | try testing.expectEqualStrings(expect, buffer.items); |
| 1077 | } | 1077 | } |
| 1078 | 1078 | ||
| 1079 | fn printCharValues(gpa: Allocator, list: *std.ArrayListUnmanaged(u8), bytes: []const u8) !void { | 1079 | fn printCharValues(gpa: Allocator, list: *std.ArrayList(u8), bytes: []const u8) !void { |
| 1080 | for (bytes) |b| try list.append(gpa, printable_char_tab[b]); | 1080 | for (bytes) |b| try list.append(gpa, printable_char_tab[b]); |
| 1081 | } | 1081 | } |
| 1082 | 1082 | ||
| 1083 | fn printUnderstandableChar(gpa: Allocator, list: *std.ArrayListUnmanaged(u8), char: u8) !void { | 1083 | fn printUnderstandableChar(gpa: Allocator, list: *std.ArrayList(u8), char: u8) !void { |
| 1084 | if (std.ascii.isPrint(char)) { | 1084 | if (std.ascii.isPrint(char)) { |
| 1085 | try list.print(gpa, "'{c}'", .{char}); | 1085 | try list.print(gpa, "'{c}'", .{char}); |
| 1086 | } else { | 1086 | } else { |
lib/std/Build/Fuzz.zig+3-3| ... | @@ -33,7 +33,7 @@ coverage_files: std.AutoArrayHashMapUnmanaged(u64, CoverageMap), | ... | @@ -33,7 +33,7 @@ coverage_files: std.AutoArrayHashMapUnmanaged(u64, CoverageMap), |
| 33 | 33 | ||
| 34 | queue_mutex: std.Thread.Mutex, | 34 | queue_mutex: std.Thread.Mutex, |
| 35 | queue_cond: std.Thread.Condition, | 35 | queue_cond: std.Thread.Condition, |
| 36 | msg_queue: std.ArrayListUnmanaged(Msg), | 36 | msg_queue: std.ArrayList(Msg), |
| 37 | 37 | ||
| 38 | pub const Mode = union(enum) { | 38 | pub const Mode = union(enum) { |
| 39 | forever: struct { ws: *Build.WebServer }, | 39 | forever: struct { ws: *Build.WebServer }, |
| ... | @@ -65,7 +65,7 @@ const CoverageMap = struct { | ... | @@ -65,7 +65,7 @@ const CoverageMap = struct { |
| 65 | coverage: Coverage, | 65 | coverage: Coverage, |
| 66 | source_locations: []Coverage.SourceLocation, | 66 | source_locations: []Coverage.SourceLocation, |
| 67 | /// Elements are indexes into `source_locations` pointing to the unit tests that are being fuzz tested. | 67 | /// 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), |
| 69 | start_timestamp: i64, | 69 | start_timestamp: i64, |
| 70 | 70 | ||
| 71 | fn deinit(cm: *CoverageMap, gpa: Allocator) void { | 71 | fn deinit(cm: *CoverageMap, gpa: Allocator) void { |
| ... | @@ -85,7 +85,7 @@ pub fn init( | ... | @@ -85,7 +85,7 @@ pub fn init( |
| 85 | mode: Mode, | 85 | mode: Mode, |
| 86 | ) Allocator.Error!Fuzz { | 86 | ) Allocator.Error!Fuzz { |
| 87 | const run_steps: []const *Step.Run = steps: { | 87 | const run_steps: []const *Step.Run = steps: { |
| 88 | var steps: std.ArrayListUnmanaged(*Step.Run) = .empty; | 88 | var steps: std.ArrayList(*Step.Run) = .empty; |
| 89 | defer steps.deinit(gpa); | 89 | defer steps.deinit(gpa); |
| 90 | const rebuild_node = root_prog_node.start("Rebuilding Unit Tests", 0); | 90 | const rebuild_node = root_prog_node.start("Rebuilding Unit Tests", 0); |
| 91 | defer rebuild_node.end(); | 91 | defer rebuild_node.end(); |
lib/std/Build/Step/CheckObject.zig+8-8| ... | @@ -721,12 +721,12 @@ const MachODumper = struct { | ... | @@ -721,12 +721,12 @@ const MachODumper = struct { |
| 721 | gpa: Allocator, | 721 | gpa: Allocator, |
| 722 | data: []const u8, | 722 | data: []const u8, |
| 723 | header: macho.mach_header_64, | 723 | header: macho.mach_header_64, |
| 724 | segments: std.ArrayListUnmanaged(macho.segment_command_64) = .empty, | 724 | segments: std.ArrayList(macho.segment_command_64) = .empty, |
| 725 | sections: std.ArrayListUnmanaged(macho.section_64) = .empty, | 725 | sections: std.ArrayList(macho.section_64) = .empty, |
| 726 | symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty, | 726 | symtab: std.ArrayList(macho.nlist_64) = .empty, |
| 727 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 727 | strtab: std.ArrayList(u8) = .empty, |
| 728 | indsymtab: std.ArrayListUnmanaged(u32) = .empty, | 728 | indsymtab: std.ArrayList(u32) = .empty, |
| 729 | imports: std.ArrayListUnmanaged([]const u8) = .empty, | 729 | imports: std.ArrayList([]const u8) = .empty, |
| 730 | 730 | ||
| 731 | fn parse(ctx: *ObjectContext) !void { | 731 | fn parse(ctx: *ObjectContext) !void { |
| 732 | var it = try ctx.getLoadCommandIterator(); | 732 | var it = try ctx.getLoadCommandIterator(); |
| ... | @@ -1767,9 +1767,9 @@ const ElfDumper = struct { | ... | @@ -1767,9 +1767,9 @@ const ElfDumper = struct { |
| 1767 | const ArchiveContext = struct { | 1767 | const ArchiveContext = struct { |
| 1768 | gpa: Allocator, | 1768 | gpa: Allocator, |
| 1769 | data: []const u8, | 1769 | data: []const u8, |
| 1770 | symtab: std.ArrayListUnmanaged(ArSymtabEntry) = .empty, | 1770 | symtab: std.ArrayList(ArSymtabEntry) = .empty, |
| 1771 | strtab: []const u8, | 1771 | 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, |
| 1773 | 1773 | ||
| 1774 | fn parseSymtab(ctx: *ArchiveContext, raw: []const u8, ptr_width: enum { p32, p64 }) !void { | 1774 | fn parseSymtab(ctx: *ArchiveContext, raw: []const u8, ptr_width: enum { p32, p64 }) !void { |
| 1775 | var reader: std.Io.Reader = .fixed(raw); | 1775 | 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 { | ... | @@ -1801,7 +1801,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 { |
| 1801 | for (arg, 0..) |c, arg_idx| { | 1801 | for (arg, 0..) |c, arg_idx| { |
| 1802 | if (c == '\\' or c == '"') { | 1802 | if (c == '\\' or c == '"') { |
| 1803 | // Slow path for arguments that need to be escaped. We'll need to allocate and copy | 1803 | // 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; |
| 1805 | try escaped.ensureTotalCapacityPrecise(arena, arg.len + 1); | 1805 | try escaped.ensureTotalCapacityPrecise(arena, arg.len + 1); |
| 1806 | try escaped.appendSlice(arena, arg[0..arg_idx]); | 1806 | try escaped.appendSlice(arena, arg[0..arg_idx]); |
| 1807 | for (arg[arg_idx..]) |to_escape| { | 1807 | for (arg[arg_idx..]) |to_escape| { |
| ... | @@ -2035,7 +2035,7 @@ fn checkCompileErrors(compile: *Compile) !void { | ... | @@ -2035,7 +2035,7 @@ fn checkCompileErrors(compile: *Compile) !void { |
| 2035 | }; | 2035 | }; |
| 2036 | 2036 | ||
| 2037 | // Render the expected lines into a string that we can compare verbatim. | 2037 | // 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; |
| 2039 | const expect_errors = compile.expect_errors.?; | 2039 | const expect_errors = compile.expect_errors.?; |
| 2040 | 2040 | ||
| 2041 | var actual_line_it = mem.splitScalar(u8, actual_errors, '\n'); | 2041 | 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 { | ... | @@ -48,7 +48,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { |
| 48 | const arena = b.allocator; | 48 | const arena = b.allocator; |
| 49 | const fmt: *Fmt = @fieldParentPtr("step", step); | 49 | const fmt: *Fmt = @fieldParentPtr("step", step); |
| 50 | 50 | ||
| 51 | var argv: std.ArrayListUnmanaged([]const u8) = .empty; | 51 | var argv: std.ArrayList([]const u8) = .empty; |
| 52 | try argv.ensureUnusedCapacity(arena, 2 + 1 + fmt.paths.len + 2 * fmt.exclude_paths.len); | 52 | try argv.ensureUnusedCapacity(arena, 2 + 1 + fmt.paths.len + 2 * fmt.exclude_paths.len); |
| 53 | 53 | ||
| 54 | argv.appendAssumeCapacity(b.graph.zig_exe); | 54 | argv.appendAssumeCapacity(b.graph.zig_exe); |
lib/std/Build/Step/ObjCopy.zig-1| ... | @@ -3,7 +3,6 @@ const ObjCopy = @This(); | ... | @@ -3,7 +3,6 @@ const ObjCopy = @This(); |
| 3 | 3 | ||
| 4 | const Allocator = std.mem.Allocator; | 4 | const Allocator = std.mem.Allocator; |
| 5 | const ArenaAllocator = std.heap.ArenaAllocator; | 5 | const ArenaAllocator = std.heap.ArenaAllocator; |
| 6 | const ArrayListUnmanaged = std.ArrayListUnmanaged; | ||
| 7 | const File = std.fs.File; | 6 | const File = std.fs.File; |
| 8 | const InstallDir = std.Build.InstallDir; | 7 | const InstallDir = std.Build.InstallDir; |
| 9 | const Step = std.Build.Step; | 8 | const Step = std.Build.Step; |
lib/std/Build/Step/Options.zig+7-7| ... | @@ -12,8 +12,8 @@ pub const base_id: Step.Id = .options; | ... | @@ -12,8 +12,8 @@ pub const base_id: Step.Id = .options; |
| 12 | step: Step, | 12 | step: Step, |
| 13 | generated_file: GeneratedFile, | 13 | generated_file: GeneratedFile, |
| 14 | 14 | ||
| 15 | contents: std.ArrayListUnmanaged(u8), | 15 | contents: std.ArrayList(u8), |
| 16 | args: std.ArrayListUnmanaged(Arg), | 16 | args: std.ArrayList(Arg), |
| 17 | encountered_types: std.StringHashMapUnmanaged(void), | 17 | encountered_types: std.StringHashMapUnmanaged(void), |
| 18 | 18 | ||
| 19 | pub fn create(owner: *std.Build) *Options { | 19 | pub fn create(owner: *std.Build) *Options { |
| ... | @@ -45,7 +45,7 @@ fn addOptionFallible(options: *Options, comptime T: type, name: []const u8, valu | ... | @@ -45,7 +45,7 @@ fn addOptionFallible(options: *Options, comptime T: type, name: []const u8, valu |
| 45 | 45 | ||
| 46 | fn printType( | 46 | fn printType( |
| 47 | options: *Options, | 47 | options: *Options, |
| 48 | out: *std.ArrayListUnmanaged(u8), | 48 | out: *std.ArrayList(u8), |
| 49 | comptime T: type, | 49 | comptime T: type, |
| 50 | value: T, | 50 | value: T, |
| 51 | indent: u8, | 51 | indent: u8, |
| ... | @@ -267,7 +267,7 @@ fn printType( | ... | @@ -267,7 +267,7 @@ fn printType( |
| 267 | } | 267 | } |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | fn printUserDefinedType(options: *Options, out: *std.ArrayListUnmanaged(u8), comptime T: type, indent: u8) !void { | 270 | fn printUserDefinedType(options: *Options, out: *std.ArrayList(u8), comptime T: type, indent: u8) !void { |
| 271 | switch (@typeInfo(T)) { | 271 | switch (@typeInfo(T)) { |
| 272 | .@"enum" => |info| { | 272 | .@"enum" => |info| { |
| 273 | return try printEnum(options, out, T, info, indent); | 273 | return try printEnum(options, out, T, info, indent); |
| ... | @@ -281,7 +281,7 @@ fn printUserDefinedType(options: *Options, out: *std.ArrayListUnmanaged(u8), com | ... | @@ -281,7 +281,7 @@ fn printUserDefinedType(options: *Options, out: *std.ArrayListUnmanaged(u8), com |
| 281 | 281 | ||
| 282 | fn printEnum( | 282 | fn printEnum( |
| 283 | options: *Options, | 283 | options: *Options, |
| 284 | out: *std.ArrayListUnmanaged(u8), | 284 | out: *std.ArrayList(u8), |
| 285 | comptime T: type, | 285 | comptime T: type, |
| 286 | comptime val: std.builtin.Type.Enum, | 286 | comptime val: std.builtin.Type.Enum, |
| 287 | indent: u8, | 287 | indent: u8, |
| ... | @@ -309,7 +309,7 @@ fn printEnum( | ... | @@ -309,7 +309,7 @@ fn printEnum( |
| 309 | try out.appendSlice(gpa, "};\n"); | 309 | try out.appendSlice(gpa, "};\n"); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | fn printStruct(options: *Options, out: *std.ArrayListUnmanaged(u8), comptime T: type, comptime val: std.builtin.Type.Struct, indent: u8) !void { | 312 | fn printStruct(options: *Options, out: *std.ArrayList(u8), comptime T: type, comptime val: std.builtin.Type.Struct, indent: u8) !void { |
| 313 | const gpa = options.step.owner.allocator; | 313 | const gpa = options.step.owner.allocator; |
| 314 | const gop = try options.encountered_types.getOrPut(gpa, @typeName(T)); | 314 | const gop = try options.encountered_types.getOrPut(gpa, @typeName(T)); |
| 315 | if (gop.found_existing) return; | 315 | if (gop.found_existing) return; |
| ... | @@ -369,7 +369,7 @@ fn printStruct(options: *Options, out: *std.ArrayListUnmanaged(u8), comptime T: | ... | @@ -369,7 +369,7 @@ fn printStruct(options: *Options, out: *std.ArrayListUnmanaged(u8), comptime T: |
| 369 | 369 | ||
| 370 | fn printStructValue( | 370 | fn printStructValue( |
| 371 | options: *Options, | 371 | options: *Options, |
| 372 | out: *std.ArrayListUnmanaged(u8), | 372 | out: *std.ArrayList(u8), |
| 373 | comptime struct_val: std.builtin.Type.Struct, | 373 | comptime struct_val: std.builtin.Type.Struct, |
| 374 | val: anytype, | 374 | val: anytype, |
| 375 | indent: u8, | 375 | indent: u8, |
lib/std/Build/Step/Run.zig+4-4| ... | @@ -16,7 +16,7 @@ pub const base_id: Step.Id = .run; | ... | @@ -16,7 +16,7 @@ pub const base_id: Step.Id = .run; |
| 16 | step: Step, | 16 | step: Step, |
| 17 | 17 | ||
| 18 | /// See also addArg and addArgs to modifying this directly | 18 | /// See also addArg and addArgs to modifying this directly |
| 19 | argv: std.ArrayListUnmanaged(Arg), | 19 | argv: std.ArrayList(Arg), |
| 20 | 20 | ||
| 21 | /// Use `setCwd` to set the initial current working directory | 21 | /// Use `setCwd` to set the initial current working directory |
| 22 | cwd: ?Build.LazyPath, | 22 | cwd: ?Build.LazyPath, |
| ... | @@ -63,7 +63,7 @@ stdin: StdIn, | ... | @@ -63,7 +63,7 @@ stdin: StdIn, |
| 63 | /// If the Run step is determined to have side-effects, the Run step is always | 63 | /// If the Run step is determined to have side-effects, the Run step is always |
| 64 | /// executed when it appears in the build graph, regardless of whether these | 64 | /// executed when it appears in the build graph, regardless of whether these |
| 65 | /// files have been modified. | 65 | /// files have been modified. |
| 66 | file_inputs: std.ArrayListUnmanaged(std.Build.LazyPath), | 66 | file_inputs: std.ArrayList(std.Build.LazyPath), |
| 67 | 67 | ||
| 68 | /// After adding an output argument, this step will by default rename itself | 68 | /// After adding an output argument, this step will by default rename itself |
| 69 | /// for a better display name in the build summary. | 69 | /// for a better display name in the build summary. |
| ... | @@ -104,7 +104,7 @@ has_side_effects: bool, | ... | @@ -104,7 +104,7 @@ has_side_effects: bool, |
| 104 | 104 | ||
| 105 | /// If this is a Zig unit test binary, this tracks the indexes of the unit | 105 | /// If this is a Zig unit test binary, this tracks the indexes of the unit |
| 106 | /// tests that are also fuzz tests. | 106 | /// tests that are also fuzz tests. |
| 107 | fuzz_tests: std.ArrayListUnmanaged(u32), | 107 | fuzz_tests: std.ArrayList(u32), |
| 108 | cached_test_metadata: ?CachedTestMetadata = null, | 108 | cached_test_metadata: ?CachedTestMetadata = null, |
| 109 | 109 | ||
| 110 | /// Populated during the fuzz phase if this run step corresponds to a unit test | 110 | /// Populated during the fuzz phase if this run step corresponds to a unit test |
| ... | @@ -139,7 +139,7 @@ pub const StdIo = union(enum) { | ... | @@ -139,7 +139,7 @@ pub const StdIo = union(enum) { |
| 139 | /// conditions. | 139 | /// conditions. |
| 140 | /// Note that an explicit check for exit code 0 needs to be added to this | 140 | /// Note that an explicit check for exit code 0 needs to be added to this |
| 141 | /// list if such a check is desirable. | 141 | /// list if such a check is desirable. |
| 142 | check: std.ArrayListUnmanaged(Check), | 142 | check: std.ArrayList(Check), |
| 143 | /// This Run step is running a zig unit test binary and will communicate | 143 | /// This Run step is running a zig unit test binary and will communicate |
| 144 | /// extra metadata over the IPC protocol. | 144 | /// extra metadata over the IPC protocol. |
| 145 | zig_test, | 145 | zig_test, |
lib/std/Build/Step/UpdateSourceFiles.zig+1-1| ... | @@ -12,7 +12,7 @@ const fs = std.fs; | ... | @@ -12,7 +12,7 @@ const fs = std.fs; |
| 12 | const ArrayList = std.ArrayList; | 12 | const ArrayList = std.ArrayList; |
| 13 | 13 | ||
| 14 | step: Step, | 14 | step: Step, |
| 15 | output_source_files: std.ArrayListUnmanaged(OutputSourceFile), | 15 | output_source_files: std.ArrayList(OutputSourceFile), |
| 16 | 16 | ||
| 17 | pub const base_id: Step.Id = .update_source_files; | 17 | pub const base_id: Step.Id = .update_source_files; |
| 18 | 18 |
lib/std/Build/Step/WriteFile.zig+2-2| ... | @@ -11,8 +11,8 @@ const WriteFile = @This(); | ... | @@ -11,8 +11,8 @@ const WriteFile = @This(); |
| 11 | step: Step, | 11 | step: Step, |
| 12 | 12 | ||
| 13 | // The elements here are pointers because we need stable pointers for the GeneratedFile field. | 13 | // The elements here are pointers because we need stable pointers for the GeneratedFile field. |
| 14 | files: std.ArrayListUnmanaged(File), | 14 | files: std.ArrayList(File), |
| 15 | directories: std.ArrayListUnmanaged(Directory), | 15 | directories: std.ArrayList(Directory), |
| 16 | generated_directory: std.Build.GeneratedFile, | 16 | generated_directory: std.Build.GeneratedFile, |
| 17 | 17 | ||
| 18 | pub const base_id: Step.Id = .write_file; | 18 | pub 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 | ... | @@ -549,7 +549,7 @@ fn buildClientWasm(ws: *WebServer, arena: Allocator, optimize: std.builtin.Optim |
| 549 | .sub_path = "docs/wasm/html_render.zig", | 549 | .sub_path = "docs/wasm/html_render.zig", |
| 550 | }; | 550 | }; |
| 551 | 551 | ||
| 552 | var argv: std.ArrayListUnmanaged([]const u8) = .empty; | 552 | var argv: std.ArrayList([]const u8) = .empty; |
| 553 | 553 | ||
| 554 | try argv.appendSlice(arena, &.{ | 554 | try argv.appendSlice(arena, &.{ |
| 555 | graph.zig_exe, "build-exe", // | 555 | graph.zig_exe, "build-exe", // |
lib/std/Io.zig+1-1| ... | @@ -361,7 +361,7 @@ pub fn Poller(comptime StreamEnum: type) type { | ... | @@ -361,7 +361,7 @@ pub fn Poller(comptime StreamEnum: type) type { |
| 361 | r.end = data.len; | 361 | r.end = data.len; |
| 362 | } | 362 | } |
| 363 | { | 363 | { |
| 364 | var list: std.ArrayListUnmanaged(u8) = .{ | 364 | var list: std.ArrayList(u8) = .{ |
| 365 | .items = r.buffer[0..r.end], | 365 | .items = r.buffer[0..r.end], |
| 366 | .capacity = r.buffer.len, | 366 | .capacity = r.buffer.len, |
| 367 | }; | 367 | }; |
lib/std/Io/Threaded.zig+1-1| ... | @@ -22,7 +22,7 @@ mutex: std.Thread.Mutex = .{}, | ... | @@ -22,7 +22,7 @@ mutex: std.Thread.Mutex = .{}, |
| 22 | cond: std.Thread.Condition = .{}, | 22 | cond: std.Thread.Condition = .{}, |
| 23 | run_queue: std.SinglyLinkedList = .{}, | 23 | run_queue: std.SinglyLinkedList = .{}, |
| 24 | join_requested: bool = false, | 24 | join_requested: bool = false, |
| 25 | threads: std.ArrayListUnmanaged(std.Thread), | 25 | threads: std.ArrayList(std.Thread), |
| 26 | stack_size: usize, | 26 | stack_size: usize, |
| 27 | cpu_count: std.Thread.CpuCountError!usize, | 27 | cpu_count: std.Thread.CpuCountError!usize, |
| 28 | concurrent_count: usize, | 28 | concurrent_count: usize, |
lib/std/array_hash_map.zig+1-1| ... | @@ -505,7 +505,7 @@ pub fn ArrayHashMapWithAllocator( | ... | @@ -505,7 +505,7 @@ pub fn ArrayHashMapWithAllocator( |
| 505 | /// A hash table of keys and values, each stored sequentially. | 505 | /// A hash table of keys and values, each stored sequentially. |
| 506 | /// | 506 | /// |
| 507 | /// Insertion order is preserved. In general, this data structure supports the same | 507 | /// Insertion order is preserved. In general, this data structure supports the same |
| 508 | /// operations as `std.ArrayListUnmanaged`. | 508 | /// operations as `std.ArrayList`. |
| 509 | /// | 509 | /// |
| 510 | /// Deletion operations: | 510 | /// Deletion operations: |
| 511 | /// * `swapRemove` - O(1) | 511 | /// * `swapRemove` - O(1) |
lib/std/crypto/Certificate/Bundle.zig+1-1| ... | @@ -21,7 +21,7 @@ const base64 = std.base64.standard.decoderWithIgnore(" \t\r\n"); | ... | @@ -21,7 +21,7 @@ const base64 = std.base64.standard.decoderWithIgnore(" \t\r\n"); |
| 21 | 21 | ||
| 22 | /// The key is the contents slice of the subject. | 22 | /// The key is the contents slice of the subject. |
| 23 | map: std.HashMapUnmanaged(der.Element.Slice, u32, MapContext, std.hash_map.default_max_load_percentage) = .empty, | 23 | map: std.HashMapUnmanaged(der.Element.Slice, u32, MapContext, std.hash_map.default_max_load_percentage) = .empty, |
| 24 | bytes: std.ArrayListUnmanaged(u8) = .empty, | 24 | bytes: std.ArrayList(u8) = .empty, |
| 25 | 25 | ||
| 26 | pub const VerifyError = Certificate.Parsed.VerifyError || error{ | 26 | pub const VerifyError = Certificate.Parsed.VerifyError || error{ |
| 27 | CertificateIssuerNotFound, | 27 | CertificateIssuerNotFound, |
lib/std/debug/Coverage.zig+1-1| ... | @@ -21,7 +21,7 @@ directories: std.ArrayHashMapUnmanaged(String, void, String.MapContext, false), | ... | @@ -21,7 +21,7 @@ directories: std.ArrayHashMapUnmanaged(String, void, String.MapContext, false), |
| 21 | /// | 21 | /// |
| 22 | /// Protected by `mutex`. | 22 | /// Protected by `mutex`. |
| 23 | files: std.ArrayHashMapUnmanaged(File, void, File.MapContext, false), | 23 | files: std.ArrayHashMapUnmanaged(File, void, File.MapContext, false), |
| 24 | string_bytes: std.ArrayListUnmanaged(u8), | 24 | string_bytes: std.ArrayList(u8), |
| 25 | /// Protects the other fields. | 25 | /// Protects the other fields. |
| 26 | mutex: std.Thread.Mutex, | 26 | mutex: std.Thread.Mutex, |
| 27 | 27 |
lib/std/debug/Dwarf/expression.zig+1-1| ... | @@ -158,7 +158,7 @@ pub fn StackMachine(comptime options: Options) type { | ... | @@ -158,7 +158,7 @@ pub fn StackMachine(comptime options: Options) type { |
| 158 | } | 158 | } |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
| 161 | stack: std.ArrayListUnmanaged(Value) = .empty, | 161 | stack: std.ArrayList(Value) = .empty, |
| 162 | 162 | ||
| 163 | pub fn reset(self: *Self) void { | 163 | pub fn reset(self: *Self) void { |
| 164 | self.stack.clearRetainingCapacity(); | 164 | self.stack.clearRetainingCapacity(); |
lib/std/debug/SelfInfo/Windows.zig+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | mutex: std.Thread.Mutex, | 1 | mutex: std.Thread.Mutex, |
| 2 | modules: std.ArrayListUnmanaged(Module), | 2 | modules: std.ArrayList(Module), |
| 3 | module_name_arena: std.heap.ArenaAllocator.State, | 3 | module_name_arena: std.heap.ArenaAllocator.State, |
| 4 | 4 | ||
| 5 | pub const init: SelfInfo = .{ | 5 | pub const init: SelfInfo = .{ |
lib/std/fs/Dir.zig+4-4| ... | @@ -667,8 +667,8 @@ fn iterateImpl(self: Dir, first_iter_start_value: bool) Iterator { | ... | @@ -667,8 +667,8 @@ fn iterateImpl(self: Dir, first_iter_start_value: bool) Iterator { |
| 667 | } | 667 | } |
| 668 | 668 | ||
| 669 | pub const SelectiveWalker = struct { | 669 | pub const SelectiveWalker = struct { |
| 670 | stack: std.ArrayListUnmanaged(Walker.StackItem), | 670 | stack: std.ArrayList(Walker.StackItem), |
| 671 | name_buffer: std.ArrayListUnmanaged(u8), | 671 | name_buffer: std.ArrayList(u8), |
| 672 | allocator: Allocator, | 672 | allocator: Allocator, |
| 673 | 673 | ||
| 674 | pub const Error = IteratorError || Allocator.Error; | 674 | pub const Error = IteratorError || Allocator.Error; |
| ... | @@ -767,7 +767,7 @@ pub const SelectiveWalker = struct { | ... | @@ -767,7 +767,7 @@ pub const SelectiveWalker = struct { |
| 767 | /// | 767 | /// |
| 768 | /// See also `walk`. | 768 | /// See also `walk`. |
| 769 | pub fn walkSelectively(self: Dir, allocator: Allocator) !SelectiveWalker { | 769 | pub fn walkSelectively(self: Dir, allocator: Allocator) !SelectiveWalker { |
| 770 | var stack: std.ArrayListUnmanaged(Walker.StackItem) = .empty; | 770 | var stack: std.ArrayList(Walker.StackItem) = .empty; |
| 771 | 771 | ||
| 772 | try stack.append(allocator, .{ | 772 | try stack.append(allocator, .{ |
| 773 | .iter = self.iterate(), | 773 | .iter = self.iterate(), |
| ... | @@ -1521,7 +1521,7 @@ pub fn deleteTree(self: Dir, sub_path: []const u8) DeleteTreeError!void { | ... | @@ -1521,7 +1521,7 @@ pub fn deleteTree(self: Dir, sub_path: []const u8) DeleteTreeError!void { |
| 1521 | }; | 1521 | }; |
| 1522 | 1522 | ||
| 1523 | var stack_buffer: [16]StackItem = undefined; | 1523 | var stack_buffer: [16]StackItem = undefined; |
| 1524 | var stack = std.ArrayListUnmanaged(StackItem).initBuffer(&stack_buffer); | 1524 | var stack = std.ArrayList(StackItem).initBuffer(&stack_buffer); |
| 1525 | defer StackItem.closeAll(stack.items); | 1525 | defer StackItem.closeAll(stack.items); |
| 1526 | 1526 | ||
| 1527 | stack.appendAssumeCapacity(.{ | 1527 | stack.appendAssumeCapacity(.{ |
lib/std/fs/wasi.zig+1-1| ... | @@ -24,7 +24,7 @@ pub const Preopens = struct { | ... | @@ -24,7 +24,7 @@ pub const Preopens = struct { |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | pub fn preopensAlloc(gpa: Allocator) Allocator.Error!Preopens { | 26 | pub fn preopensAlloc(gpa: Allocator) Allocator.Error!Preopens { |
| 27 | var names: std.ArrayListUnmanaged([]const u8) = .empty; | 27 | var names: std.ArrayList([]const u8) = .empty; |
| 28 | defer names.deinit(gpa); | 28 | defer names.deinit(gpa); |
| 29 | 29 | ||
| 30 | try names.ensureUnusedCapacity(gpa, 3); | 30 | try names.ensureUnusedCapacity(gpa, 3); |
lib/std/hash_map.zig+2-2| ... | @@ -91,7 +91,7 @@ pub fn hashString(s: []const u8) u64 { | ... | @@ -91,7 +91,7 @@ pub fn hashString(s: []const u8) u64 { |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | pub const StringIndexContext = struct { | 93 | pub const StringIndexContext = struct { |
| 94 | bytes: *const std.ArrayListUnmanaged(u8), | 94 | bytes: *const std.ArrayList(u8), |
| 95 | 95 | ||
| 96 | pub fn eql(_: @This(), a: u32, b: u32) bool { | 96 | pub fn eql(_: @This(), a: u32, b: u32) bool { |
| 97 | return a == b; | 97 | return a == b; |
| ... | @@ -103,7 +103,7 @@ pub const StringIndexContext = struct { | ... | @@ -103,7 +103,7 @@ pub const StringIndexContext = struct { |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | pub const StringIndexAdapter = struct { | 105 | pub const StringIndexAdapter = struct { |
| 106 | bytes: *const std.ArrayListUnmanaged(u8), | 106 | bytes: *const std.ArrayList(u8), |
| 107 | 107 | ||
| 108 | pub fn eql(ctx: @This(), a: []const u8, b: u32) bool { | 108 | pub fn eql(ctx: @This(), a: []const u8, b: u32) bool { |
| 109 | return mem.eql(u8, a, mem.sliceTo(ctx.bytes.items[b..], 0)); | 109 | 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"); | ... | @@ -27,7 +27,7 @@ pub const Writer = @import("tar/Writer.zig"); |
| 27 | /// the errors in diagnostics to know whether the operation succeeded or failed. | 27 | /// the errors in diagnostics to know whether the operation succeeded or failed. |
| 28 | pub const Diagnostics = struct { | 28 | pub const Diagnostics = struct { |
| 29 | allocator: std.mem.Allocator, | 29 | allocator: std.mem.Allocator, |
| 30 | errors: std.ArrayListUnmanaged(Error) = .empty, | 30 | errors: std.ArrayList(Error) = .empty, |
| 31 | 31 | ||
| 32 | entries: usize = 0, | 32 | entries: usize = 0, |
| 33 | root_dir: []const u8 = "", | 33 | root_dir: []const u8 = "", |
lib/std/zig/AstGen.zig+22-22| ... | @@ -6,7 +6,7 @@ const Ast = std.zig.Ast; | ... | @@ -6,7 +6,7 @@ const Ast = std.zig.Ast; |
| 6 | const mem = std.mem; | 6 | const mem = std.mem; |
| 7 | const Allocator = std.mem.Allocator; | 7 | const Allocator = std.mem.Allocator; |
| 8 | const assert = std.debug.assert; | 8 | const assert = std.debug.assert; |
| 9 | const ArrayListUnmanaged = std.ArrayListUnmanaged; | 9 | const ArrayList = std.ArrayList; |
| 10 | const StringIndexAdapter = std.hash_map.StringIndexAdapter; | 10 | const StringIndexAdapter = std.hash_map.StringIndexAdapter; |
| 11 | const StringIndexContext = std.hash_map.StringIndexContext; | 11 | const StringIndexContext = std.hash_map.StringIndexContext; |
| 12 | 12 | ||
| ... | @@ -22,8 +22,8 @@ tree: *const Ast, | ... | @@ -22,8 +22,8 @@ tree: *const Ast, |
| 22 | /// sub-expressions. See `AstRlAnnotate` for details. | 22 | /// sub-expressions. See `AstRlAnnotate` for details. |
| 23 | nodes_need_rl: *const AstRlAnnotate.RlNeededSet, | 23 | nodes_need_rl: *const AstRlAnnotate.RlNeededSet, |
| 24 | instructions: std.MultiArrayList(Zir.Inst) = .{}, | 24 | instructions: std.MultiArrayList(Zir.Inst) = .{}, |
| 25 | extra: ArrayListUnmanaged(u32) = .empty, | 25 | extra: ArrayList(u32) = .empty, |
| 26 | string_bytes: ArrayListUnmanaged(u8) = .empty, | 26 | string_bytes: ArrayList(u8) = .empty, |
| 27 | /// Tracks the current byte offset within the source file. | 27 | /// Tracks the current byte offset within the source file. |
| 28 | /// Used to populate line deltas in the ZIR. AstGen maintains | 28 | /// Used to populate line deltas in the ZIR. AstGen maintains |
| 29 | /// this "cursor" throughout the entire AST lowering process in order | 29 | /// this "cursor" throughout the entire AST lowering process in order |
| ... | @@ -40,7 +40,7 @@ source_column: u32 = 0, | ... | @@ -40,7 +40,7 @@ source_column: u32 = 0, |
| 40 | /// The resulting ZIR code has no references to anything in this arena. | 40 | /// The resulting ZIR code has no references to anything in this arena. |
| 41 | arena: Allocator, | 41 | arena: Allocator, |
| 42 | string_table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage) = .empty, | 42 | string_table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage) = .empty, |
| 43 | compile_errors: ArrayListUnmanaged(Zir.Inst.CompileErrors.Item) = .empty, | 43 | compile_errors: ArrayList(Zir.Inst.CompileErrors.Item) = .empty, |
| 44 | /// The topmost block of the current function. | 44 | /// The topmost block of the current function. |
| 45 | fn_block: ?*GenZir = null, | 45 | fn_block: ?*GenZir = null, |
| 46 | fn_var_args: bool = false, | 46 | fn_var_args: bool = false, |
| ... | @@ -54,7 +54,7 @@ fn_ret_ty: Zir.Inst.Ref = .none, | ... | @@ -54,7 +54,7 @@ fn_ret_ty: Zir.Inst.Ref = .none, |
| 54 | /// that uses this string as the operand. | 54 | /// that uses this string as the operand. |
| 55 | imports: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, Ast.TokenIndex) = .empty, | 55 | imports: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, Ast.TokenIndex) = .empty, |
| 56 | /// Used for temporary storage when building payloads. | 56 | /// Used for temporary storage when building payloads. |
| 57 | scratch: std.ArrayListUnmanaged(u32) = .empty, | 57 | scratch: std.ArrayList(u32) = .empty, |
| 58 | /// Whenever a `ref` instruction is needed, it is created and saved in this | 58 | /// Whenever a `ref` instruction is needed, it is created and saved in this |
| 59 | /// table instead of being immediately appended to the current block body. | 59 | /// table instead of being immediately appended to the current block body. |
| 60 | /// Then, when the instruction is being added to the parent block (typically from | 60 | /// 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 { | ... | @@ -173,7 +173,7 @@ pub fn generate(gpa: Allocator, tree: Ast) Allocator.Error!Zir { |
| 173 | 173 | ||
| 174 | var top_scope: Scope.Top = .{}; | 174 | var top_scope: Scope.Top = .{}; |
| 175 | 175 | ||
| 176 | var gz_instructions: std.ArrayListUnmanaged(Zir.Inst.Index) = .empty; | 176 | var gz_instructions: std.ArrayList(Zir.Inst.Index) = .empty; |
| 177 | var gen_scope: GenZir = .{ | 177 | var gen_scope: GenZir = .{ |
| 178 | .is_comptime = true, | 178 | .is_comptime = true, |
| 179 | .parent = &top_scope.base, | 179 | .parent = &top_scope.base, |
| ... | @@ -1766,7 +1766,7 @@ fn structInitExpr( | ... | @@ -1766,7 +1766,7 @@ fn structInitExpr( |
| 1766 | var sfba = std.heap.stackFallback(256, astgen.arena); | 1766 | var sfba = std.heap.stackFallback(256, astgen.arena); |
| 1767 | const sfba_allocator = sfba.get(); | 1767 | const sfba_allocator = sfba.get(); |
| 1768 | 1768 | ||
| 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); |
| 1770 | try duplicate_names.ensureTotalCapacity(@intCast(struct_init.ast.fields.len)); | 1770 | try duplicate_names.ensureTotalCapacity(@intCast(struct_init.ast.fields.len)); |
| 1771 | 1771 | ||
| 1772 | // When there aren't errors, use this to avoid a second iteration. | 1772 | // 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. | ... | @@ -3996,7 +3996,7 @@ fn arrayTypeSentinel(gz: *GenZir, scope: *Scope, ri: ResultInfo, node: Ast.Node. |
| 3996 | } | 3996 | } |
| 3997 | 3997 | ||
| 3998 | const WipMembers = struct { | 3998 | const WipMembers = struct { |
| 3999 | payload: *ArrayListUnmanaged(u32), | 3999 | payload: *ArrayList(u32), |
| 4000 | payload_top: usize, | 4000 | payload_top: usize, |
| 4001 | field_bits_start: u32, | 4001 | field_bits_start: u32, |
| 4002 | fields_start: u32, | 4002 | fields_start: u32, |
| ... | @@ -4006,7 +4006,7 @@ const WipMembers = struct { | ... | @@ -4006,7 +4006,7 @@ const WipMembers = struct { |
| 4006 | 4006 | ||
| 4007 | const Self = @This(); | 4007 | const Self = @This(); |
| 4008 | 4008 | ||
| 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 { |
| 4010 | const payload_top: u32 = @intCast(payload.items.len); | 4010 | const payload_top: u32 = @intCast(payload.items.len); |
| 4011 | const field_bits_start = payload_top + decl_count; | 4011 | const field_bits_start = payload_top + decl_count; |
| 4012 | const fields_start = field_bits_start + if (bits_per_field > 0) blk: { | 4012 | const fields_start = field_bits_start + if (bits_per_field > 0) blk: { |
| ... | @@ -4260,7 +4260,7 @@ fn fnDeclInner( | ... | @@ -4260,7 +4260,7 @@ fn fnDeclInner( |
| 4260 | const is_inferred_error = tree.tokenTag(maybe_bang) == .bang; | 4260 | const is_inferred_error = tree.tokenTag(maybe_bang) == .bang; |
| 4261 | 4261 | ||
| 4262 | // Note that the capacity here may not be sufficient, as this does not include `anytype` parameters. | 4262 | // 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); |
| 4264 | 4264 | ||
| 4265 | // We use this as `is_used_or_discarded` to figure out if parameters / return types are generic. | 4265 | // We use this as `is_used_or_discarded` to figure out if parameters / return types are generic. |
| 4266 | var any_param_used = false; | 4266 | var any_param_used = false; |
| ... | @@ -11311,7 +11311,7 @@ fn identifierTokenString(astgen: *AstGen, token: Ast.TokenIndex) InnerError![]co | ... | @@ -11311,7 +11311,7 @@ fn identifierTokenString(astgen: *AstGen, token: Ast.TokenIndex) InnerError![]co |
| 11311 | if (!mem.startsWith(u8, ident_name, "@")) { | 11311 | if (!mem.startsWith(u8, ident_name, "@")) { |
| 11312 | return ident_name; | 11312 | return ident_name; |
| 11313 | } | 11313 | } |
| 11314 | var buf: ArrayListUnmanaged(u8) = .empty; | 11314 | var buf: ArrayList(u8) = .empty; |
| 11315 | defer buf.deinit(astgen.gpa); | 11315 | defer buf.deinit(astgen.gpa); |
| 11316 | try astgen.parseStrLit(token, &buf, ident_name, 1); | 11316 | try astgen.parseStrLit(token, &buf, ident_name, 1); |
| 11317 | if (mem.indexOfScalar(u8, buf.items, 0) != null) { | 11317 | if (mem.indexOfScalar(u8, buf.items, 0) != null) { |
| ... | @@ -11329,7 +11329,7 @@ fn identifierTokenString(astgen: *AstGen, token: Ast.TokenIndex) InnerError![]co | ... | @@ -11329,7 +11329,7 @@ fn identifierTokenString(astgen: *AstGen, token: Ast.TokenIndex) InnerError![]co |
| 11329 | fn appendIdentStr( | 11329 | fn appendIdentStr( |
| 11330 | astgen: *AstGen, | 11330 | astgen: *AstGen, |
| 11331 | token: Ast.TokenIndex, | 11331 | token: Ast.TokenIndex, |
| 11332 | buf: *ArrayListUnmanaged(u8), | 11332 | buf: *ArrayList(u8), |
| 11333 | ) InnerError!void { | 11333 | ) InnerError!void { |
| 11334 | const tree = astgen.tree; | 11334 | const tree = astgen.tree; |
| 11335 | assert(tree.tokenTag(token) == .identifier); | 11335 | assert(tree.tokenTag(token) == .identifier); |
| ... | @@ -11352,7 +11352,7 @@ fn appendIdentStr( | ... | @@ -11352,7 +11352,7 @@ fn appendIdentStr( |
| 11352 | fn parseStrLit( | 11352 | fn parseStrLit( |
| 11353 | astgen: *AstGen, | 11353 | astgen: *AstGen, |
| 11354 | token: Ast.TokenIndex, | 11354 | token: Ast.TokenIndex, |
| 11355 | buf: *ArrayListUnmanaged(u8), | 11355 | buf: *ArrayList(u8), |
| 11356 | bytes: []const u8, | 11356 | bytes: []const u8, |
| 11357 | offset: u32, | 11357 | offset: u32, |
| 11358 | ) InnerError!void { | 11358 | ) InnerError!void { |
| ... | @@ -11833,7 +11833,7 @@ const GenZir = struct { | ... | @@ -11833,7 +11833,7 @@ const GenZir = struct { |
| 11833 | astgen: *AstGen, | 11833 | astgen: *AstGen, |
| 11834 | /// Keeps track of the list of instructions in this scope. Possibly shared. | 11834 | /// Keeps track of the list of instructions in this scope. Possibly shared. |
| 11835 | /// Indexes to instructions in `astgen`. | 11835 | /// Indexes to instructions in `astgen`. |
| 11836 | instructions: *ArrayListUnmanaged(Zir.Inst.Index), | 11836 | instructions: *ArrayList(Zir.Inst.Index), |
| 11837 | /// A sub-block may share its instructions ArrayList with containing GenZir, | 11837 | /// A sub-block may share its instructions ArrayList with containing GenZir, |
| 11838 | /// if use is strictly nested. This saves prior size of list for unstacking. | 11838 | /// if use is strictly nested. This saves prior size of list for unstacking. |
| 11839 | instructions_top: usize, | 11839 | instructions_top: usize, |
| ... | @@ -13641,7 +13641,7 @@ fn scanContainer( | ... | @@ -13641,7 +13641,7 @@ fn scanContainer( |
| 13641 | 13641 | ||
| 13642 | for (names.keys(), names.values()) |name, first| { | 13642 | for (names.keys(), names.values()) |name, first| { |
| 13643 | if (first.next == null) continue; | 13643 | if (first.next == null) continue; |
| 13644 | var notes: std.ArrayListUnmanaged(u32) = .empty; | 13644 | var notes: std.ArrayList(u32) = .empty; |
| 13645 | var prev: NameEntry = first; | 13645 | var prev: NameEntry = first; |
| 13646 | while (prev.next) |cur| : (prev = cur.*) { | 13646 | while (prev.next) |cur| : (prev = cur.*) { |
| 13647 | try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate name here", .{})); | 13647 | try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate name here", .{})); |
| ... | @@ -13654,7 +13654,7 @@ fn scanContainer( | ... | @@ -13654,7 +13654,7 @@ fn scanContainer( |
| 13654 | 13654 | ||
| 13655 | for (test_names.keys(), test_names.values()) |name, first| { | 13655 | for (test_names.keys(), test_names.values()) |name, first| { |
| 13656 | if (first.next == null) continue; | 13656 | if (first.next == null) continue; |
| 13657 | var notes: std.ArrayListUnmanaged(u32) = .empty; | 13657 | var notes: std.ArrayList(u32) = .empty; |
| 13658 | var prev: NameEntry = first; | 13658 | var prev: NameEntry = first; |
| 13659 | while (prev.next) |cur| : (prev = cur.*) { | 13659 | while (prev.next) |cur| : (prev = cur.*) { |
| 13660 | try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate test here", .{})); | 13660 | try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate test here", .{})); |
| ... | @@ -13667,7 +13667,7 @@ fn scanContainer( | ... | @@ -13667,7 +13667,7 @@ fn scanContainer( |
| 13667 | 13667 | ||
| 13668 | for (decltest_names.keys(), decltest_names.values()) |name, first| { | 13668 | for (decltest_names.keys(), decltest_names.values()) |name, first| { |
| 13669 | if (first.next == null) continue; | 13669 | if (first.next == null) continue; |
| 13670 | var notes: std.ArrayListUnmanaged(u32) = .empty; | 13670 | var notes: std.ArrayList(u32) = .empty; |
| 13671 | var prev: NameEntry = first; | 13671 | var prev: NameEntry = first; |
| 13672 | while (prev.next) |cur| : (prev = cur.*) { | 13672 | while (prev.next) |cur| : (prev = cur.*) { |
| 13673 | try notes.append(astgen.arena, try astgen.errNoteTok(cur.tok, "duplicate decltest here", .{})); | 13673 | 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 { | ... | @@ -13690,7 +13690,7 @@ fn appendBodyWithFixups(astgen: *AstGen, body: []const Zir.Inst.Index) void { |
| 13690 | 13690 | ||
| 13691 | fn appendBodyWithFixupsArrayList( | 13691 | fn appendBodyWithFixupsArrayList( |
| 13692 | astgen: *AstGen, | 13692 | astgen: *AstGen, |
| 13693 | list: *std.ArrayListUnmanaged(u32), | 13693 | list: *std.ArrayList(u32), |
| 13694 | body: []const Zir.Inst.Index, | 13694 | body: []const Zir.Inst.Index, |
| 13695 | ) void { | 13695 | ) void { |
| 13696 | astgen.appendBodyWithFixupsExtraRefsArrayList(list, body, &.{}); | 13696 | astgen.appendBodyWithFixupsExtraRefsArrayList(list, body, &.{}); |
| ... | @@ -13698,7 +13698,7 @@ fn appendBodyWithFixupsArrayList( | ... | @@ -13698,7 +13698,7 @@ fn appendBodyWithFixupsArrayList( |
| 13698 | 13698 | ||
| 13699 | fn appendBodyWithFixupsExtraRefsArrayList( | 13699 | fn appendBodyWithFixupsExtraRefsArrayList( |
| 13700 | astgen: *AstGen, | 13700 | astgen: *AstGen, |
| 13701 | list: *std.ArrayListUnmanaged(u32), | 13701 | list: *std.ArrayList(u32), |
| 13702 | body: []const Zir.Inst.Index, | 13702 | body: []const Zir.Inst.Index, |
| 13703 | extra_refs: []const Zir.Inst.Index, | 13703 | extra_refs: []const Zir.Inst.Index, |
| 13704 | ) void { | 13704 | ) void { |
| ... | @@ -13714,7 +13714,7 @@ fn appendBodyWithFixupsExtraRefsArrayList( | ... | @@ -13714,7 +13714,7 @@ fn appendBodyWithFixupsExtraRefsArrayList( |
| 13714 | 13714 | ||
| 13715 | fn appendPossiblyRefdBodyInst( | 13715 | fn appendPossiblyRefdBodyInst( |
| 13716 | astgen: *AstGen, | 13716 | astgen: *AstGen, |
| 13717 | list: *std.ArrayListUnmanaged(u32), | 13717 | list: *std.ArrayList(u32), |
| 13718 | body_inst: Zir.Inst.Index, | 13718 | body_inst: Zir.Inst.Index, |
| 13719 | ) void { | 13719 | ) void { |
| 13720 | list.appendAssumeCapacity(@intFromEnum(body_inst)); | 13720 | list.appendAssumeCapacity(@intFromEnum(body_inst)); |
| ... | @@ -13808,7 +13808,7 @@ fn lowerAstErrors(astgen: *AstGen) error{OutOfMemory}!void { | ... | @@ -13808,7 +13808,7 @@ fn lowerAstErrors(astgen: *AstGen) error{OutOfMemory}!void { |
| 13808 | defer msg.deinit(); | 13808 | defer msg.deinit(); |
| 13809 | const msg_w = &msg.writer; | 13809 | const msg_w = &msg.writer; |
| 13810 | 13810 | ||
| 13811 | var notes: std.ArrayListUnmanaged(u32) = .empty; | 13811 | var notes: std.ArrayList(u32) = .empty; |
| 13812 | defer notes.deinit(gpa); | 13812 | defer notes.deinit(gpa); |
| 13813 | 13813 | ||
| 13814 | const token_starts = tree.tokens.items(.start); | 13814 | const token_starts = tree.tokens.items(.start); |
| ... | @@ -14104,7 +14104,7 @@ fn setDeclaration( | ... | @@ -14104,7 +14104,7 @@ fn setDeclaration( |
| 14104 | /// *all* of the bodies into a big `GenZir` stack. Therefore, we use this function to pull out these per-body `ref` | 14104 | /// *all* of the bodies into a big `GenZir` stack. Therefore, we use this function to pull out these per-body `ref` |
| 14105 | /// instructions which must be emitted. | 14105 | /// instructions which must be emitted. |
| 14106 | fn fetchRemoveRefEntries(astgen: *AstGen, param_insts: []const Zir.Inst.Index) ![]Zir.Inst.Index { | 14106 | fn 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; |
| 14108 | for (param_insts) |param_inst| { | 14108 | for (param_insts) |param_inst| { |
| 14109 | if (astgen.ref_table.fetchRemove(param_inst)) |kv| { | 14109 | if (astgen.ref_table.fetchRemove(param_inst)) |kv| { |
| 14110 | try refs.append(astgen.arena, kv.value); | 14110 | 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) ! | ... | @@ -320,10 +320,10 @@ fn writeMsg(eb: ErrorBundle, err_msg: ErrorMessage, w: *Writer, indent: usize) ! |
| 320 | 320 | ||
| 321 | pub const Wip = struct { | 321 | pub const Wip = struct { |
| 322 | gpa: Allocator, | 322 | gpa: Allocator, |
| 323 | string_bytes: std.ArrayListUnmanaged(u8), | 323 | string_bytes: std.ArrayList(u8), |
| 324 | /// The first thing in this array is a ErrorMessageList. | 324 | /// The first thing in this array is a ErrorMessageList. |
| 325 | extra: std.ArrayListUnmanaged(u32), | 325 | extra: std.ArrayList(u32), |
| 326 | root_list: std.ArrayListUnmanaged(MessageIndex), | 326 | root_list: std.ArrayList(MessageIndex), |
| 327 | 327 | ||
| 328 | pub fn init(wip: *Wip, gpa: Allocator) !void { | 328 | pub fn init(wip: *Wip, gpa: Allocator) !void { |
| 329 | wip.* = .{ | 329 | wip.* = .{ |
| ... | @@ -666,7 +666,7 @@ pub const Wip = struct { | ... | @@ -666,7 +666,7 @@ pub const Wip = struct { |
| 666 | if (index == .none) return .none; | 666 | if (index == .none) return .none; |
| 667 | const other_sl = other.getSourceLocation(index); | 667 | const other_sl = other.getSourceLocation(index); |
| 668 | 668 | ||
| 669 | var ref_traces: std.ArrayListUnmanaged(ReferenceTrace) = .empty; | 669 | var ref_traces: std.ArrayList(ReferenceTrace) = .empty; |
| 670 | defer ref_traces.deinit(wip.gpa); | 670 | defer ref_traces.deinit(wip.gpa); |
| 671 | 671 | ||
| 672 | if (other_sl.reference_trace_len > 0) { | 672 | if (other_sl.reference_trace_len > 0) { |
lib/std/zig/Parse.zig+3-3| ... | @@ -6,10 +6,10 @@ gpa: Allocator, | ... | @@ -6,10 +6,10 @@ gpa: Allocator, |
| 6 | source: []const u8, | 6 | source: []const u8, |
| 7 | tokens: Ast.TokenList.Slice, | 7 | tokens: Ast.TokenList.Slice, |
| 8 | tok_i: TokenIndex, | 8 | tok_i: TokenIndex, |
| 9 | errors: std.ArrayListUnmanaged(AstError), | 9 | errors: std.ArrayList(AstError), |
| 10 | nodes: Ast.NodeList, | 10 | nodes: Ast.NodeList, |
| 11 | extra_data: std.ArrayListUnmanaged(u32), | 11 | extra_data: std.ArrayList(u32), |
| 12 | scratch: std.ArrayListUnmanaged(Node.Index), | 12 | scratch: std.ArrayList(Node.Index), |
| 13 | 13 | ||
| 14 | fn tokenTag(p: *const Parse, token_index: TokenIndex) Token.Tag { | 14 | fn tokenTag(p: *const Parse, token_index: TokenIndex) Token.Tag { |
| 15 | return p.tokens.items(.tag)[token_index]; | 15 | return p.tokens.items(.tag)[token_index]; |
lib/std/zig/WindowsSdk.zig+1-1| ... | @@ -752,7 +752,7 @@ const MsvcLibDir = struct { | ... | @@ -752,7 +752,7 @@ const MsvcLibDir = struct { |
| 752 | defer instances_dir.close(); | 752 | defer instances_dir.close(); |
| 753 | 753 | ||
| 754 | var state_subpath_buf: [std.fs.max_name_bytes + 32]u8 = undefined; | 754 | 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; |
| 756 | errdefer latest_version_lib_dir.deinit(allocator); | 756 | errdefer latest_version_lib_dir.deinit(allocator); |
| 757 | 757 | ||
| 758 | var latest_version: u64 = 0; | 758 | var latest_version: u64 = 0; |
lib/std/zig/Zir.zig+3-3| ... | @@ -4093,8 +4093,8 @@ pub const DeclContents = struct { | ... | @@ -4093,8 +4093,8 @@ pub const DeclContents = struct { |
| 4093 | /// This is a simple optional because ZIR guarantees that a `func`/`func_inferred`/`func_fancy` instruction | 4093 | /// This is a simple optional because ZIR guarantees that a `func`/`func_inferred`/`func_fancy` instruction |
| 4094 | /// can only occur once per `declaration`. | 4094 | /// can only occur once per `declaration`. |
| 4095 | func_decl: ?Inst.Index, | 4095 | func_decl: ?Inst.Index, |
| 4096 | explicit_types: std.ArrayListUnmanaged(Inst.Index), | 4096 | explicit_types: std.ArrayList(Inst.Index), |
| 4097 | other: std.ArrayListUnmanaged(Inst.Index), | 4097 | other: std.ArrayList(Inst.Index), |
| 4098 | 4098 | ||
| 4099 | pub const init: DeclContents = .{ | 4099 | pub const init: DeclContents = .{ |
| 4100 | .func_decl = null, | 4100 | .func_decl = null, |
| ... | @@ -4118,7 +4118,7 @@ pub const DeclContents = struct { | ... | @@ -4118,7 +4118,7 @@ pub const DeclContents = struct { |
| 4118 | /// nested declarations; to find all declarations, call this function recursively on the type declarations discovered | 4118 | /// nested declarations; to find all declarations, call this function recursively on the type declarations discovered |
| 4119 | /// in `contents.explicit_types`. | 4119 | /// in `contents.explicit_types`. |
| 4120 | /// | 4120 | /// |
| 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. |
| 4122 | pub fn findTrackable(zir: Zir, gpa: Allocator, contents: *DeclContents, decl_inst: Zir.Inst.Index) !void { | 4122 | pub fn findTrackable(zir: Zir, gpa: Allocator, contents: *DeclContents, decl_inst: Zir.Inst.Index) !void { |
| 4123 | contents.clear(); | 4123 | contents.clear(); |
| 4124 | 4124 |
lib/std/zig/ZonGen.zig+6-6| ... | @@ -17,13 +17,13 @@ tree: Ast, | ... | @@ -17,13 +17,13 @@ tree: Ast, |
| 17 | options: Options, | 17 | options: Options, |
| 18 | 18 | ||
| 19 | nodes: std.MultiArrayList(Zoir.Node.Repr), | 19 | nodes: std.MultiArrayList(Zoir.Node.Repr), |
| 20 | extra: std.ArrayListUnmanaged(u32), | 20 | extra: std.ArrayList(u32), |
| 21 | limbs: std.ArrayListUnmanaged(std.math.big.Limb), | 21 | limbs: std.ArrayList(std.math.big.Limb), |
| 22 | string_bytes: std.ArrayListUnmanaged(u8), | 22 | string_bytes: std.ArrayList(u8), |
| 23 | string_table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage), | 23 | string_table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage), |
| 24 | 24 | ||
| 25 | compile_errors: std.ArrayListUnmanaged(Zoir.CompileError), | 25 | compile_errors: std.ArrayList(Zoir.CompileError), |
| 26 | error_notes: std.ArrayListUnmanaged(Zoir.CompileError.Note), | 26 | error_notes: std.ArrayList(Zoir.CompileError.Note), |
| 27 | 27 | ||
| 28 | pub const Options = struct { | 28 | pub const Options = struct { |
| 29 | /// When false, string literals are not parsed. `string_literal` nodes will contain empty | 29 | /// When false, string literals are not parsed. `string_literal` nodes will contain empty |
| ... | @@ -889,7 +889,7 @@ fn lowerAstErrors(zg: *ZonGen) Allocator.Error!void { | ... | @@ -889,7 +889,7 @@ fn lowerAstErrors(zg: *ZonGen) Allocator.Error!void { |
| 889 | defer msg.deinit(); | 889 | defer msg.deinit(); |
| 890 | const msg_bw = &msg.writer; | 890 | const msg_bw = &msg.writer; |
| 891 | 891 | ||
| 892 | var notes: std.ArrayListUnmanaged(Zoir.CompileError.Note) = .empty; | 892 | var notes: std.ArrayList(Zoir.CompileError.Note) = .empty; |
| 893 | defer notes.deinit(gpa); | 893 | defer notes.deinit(gpa); |
| 894 | 894 | ||
| 895 | var cur_err = tree.errors[0]; | 895 | var cur_err = tree.errors[0]; |
lib/std/zig/llvm/BitcodeReader.zig+2-2| ... | @@ -9,7 +9,7 @@ reader: *std.Io.Reader, | ... | @@ -9,7 +9,7 @@ reader: *std.Io.Reader, |
| 9 | keep_names: bool, | 9 | keep_names: bool, |
| 10 | bit_buffer: u32, | 10 | bit_buffer: u32, |
| 11 | bit_offset: u5, | 11 | bit_offset: u5, |
| 12 | stack: std.ArrayListUnmanaged(State), | 12 | stack: std.ArrayList(State), |
| 13 | block_info: std.AutoHashMapUnmanaged(u32, Block.Info), | 13 | block_info: std.AutoHashMapUnmanaged(u32, Block.Info), |
| 14 | 14 | ||
| 15 | pub const Item = union(enum) { | 15 | pub const Item = union(enum) { |
| ... | @@ -488,7 +488,7 @@ const Abbrev = struct { | ... | @@ -488,7 +488,7 @@ const Abbrev = struct { |
| 488 | }; | 488 | }; |
| 489 | 489 | ||
| 490 | const Store = struct { | 490 | const Store = struct { |
| 491 | abbrevs: std.ArrayListUnmanaged(Abbrev), | 491 | abbrevs: std.ArrayList(Abbrev), |
| 492 | 492 | ||
| 493 | fn deinit(store: *Store, allocator: std.mem.Allocator) void { | 493 | fn deinit(store: *Store, allocator: std.mem.Allocator) void { |
| 494 | for (store.abbrevs.items) |abbrev| allocator.free(abbrev.operands); | 494 | for (store.abbrevs.items) |abbrev| allocator.free(abbrev.operands); |
lib/std/zig/llvm/Builder.zig+25-25| ... | @@ -15,23 +15,23 @@ strip: bool, | ... | @@ -15,23 +15,23 @@ strip: bool, |
| 15 | source_filename: String, | 15 | source_filename: String, |
| 16 | data_layout: String, | 16 | data_layout: String, |
| 17 | target_triple: String, | 17 | target_triple: String, |
| 18 | module_asm: std.ArrayListUnmanaged(u8), | 18 | module_asm: std.ArrayList(u8), |
| 19 | 19 | ||
| 20 | string_map: std.AutoArrayHashMapUnmanaged(void, void), | 20 | string_map: std.AutoArrayHashMapUnmanaged(void, void), |
| 21 | string_indices: std.ArrayListUnmanaged(u32), | 21 | string_indices: std.ArrayList(u32), |
| 22 | string_bytes: std.ArrayListUnmanaged(u8), | 22 | string_bytes: std.ArrayList(u8), |
| 23 | 23 | ||
| 24 | types: std.AutoArrayHashMapUnmanaged(String, Type), | 24 | types: std.AutoArrayHashMapUnmanaged(String, Type), |
| 25 | next_unnamed_type: String, | 25 | next_unnamed_type: String, |
| 26 | next_unique_type_id: std.AutoHashMapUnmanaged(String, u32), | 26 | next_unique_type_id: std.AutoHashMapUnmanaged(String, u32), |
| 27 | type_map: std.AutoArrayHashMapUnmanaged(void, void), | 27 | type_map: std.AutoArrayHashMapUnmanaged(void, void), |
| 28 | type_items: std.ArrayListUnmanaged(Type.Item), | 28 | type_items: std.ArrayList(Type.Item), |
| 29 | type_extra: std.ArrayListUnmanaged(u32), | 29 | type_extra: std.ArrayList(u32), |
| 30 | 30 | ||
| 31 | attributes: std.AutoArrayHashMapUnmanaged(Attribute.Storage, void), | 31 | attributes: std.AutoArrayHashMapUnmanaged(Attribute.Storage, void), |
| 32 | attributes_map: std.AutoArrayHashMapUnmanaged(void, void), | 32 | attributes_map: std.AutoArrayHashMapUnmanaged(void, void), |
| 33 | attributes_indices: std.ArrayListUnmanaged(u32), | 33 | attributes_indices: std.ArrayList(u32), |
| 34 | attributes_extra: std.ArrayListUnmanaged(u32), | 34 | attributes_extra: std.ArrayList(u32), |
| 35 | 35 | ||
| 36 | function_attributes_set: std.AutoArrayHashMapUnmanaged(FunctionAttributes, void), | 36 | function_attributes_set: std.AutoArrayHashMapUnmanaged(FunctionAttributes, void), |
| 37 | 37 | ||
| ... | @@ -39,32 +39,32 @@ globals: std.AutoArrayHashMapUnmanaged(StrtabString, Global), | ... | @@ -39,32 +39,32 @@ globals: std.AutoArrayHashMapUnmanaged(StrtabString, Global), |
| 39 | next_unnamed_global: StrtabString, | 39 | next_unnamed_global: StrtabString, |
| 40 | next_replaced_global: StrtabString, | 40 | next_replaced_global: StrtabString, |
| 41 | next_unique_global_id: std.AutoHashMapUnmanaged(StrtabString, u32), | 41 | next_unique_global_id: std.AutoHashMapUnmanaged(StrtabString, u32), |
| 42 | aliases: std.ArrayListUnmanaged(Alias), | 42 | aliases: std.ArrayList(Alias), |
| 43 | variables: std.ArrayListUnmanaged(Variable), | 43 | variables: std.ArrayList(Variable), |
| 44 | functions: std.ArrayListUnmanaged(Function), | 44 | functions: std.ArrayList(Function), |
| 45 | 45 | ||
| 46 | strtab_string_map: std.AutoArrayHashMapUnmanaged(void, void), | 46 | strtab_string_map: std.AutoArrayHashMapUnmanaged(void, void), |
| 47 | strtab_string_indices: std.ArrayListUnmanaged(u32), | 47 | strtab_string_indices: std.ArrayList(u32), |
| 48 | strtab_string_bytes: std.ArrayListUnmanaged(u8), | 48 | strtab_string_bytes: std.ArrayList(u8), |
| 49 | 49 | ||
| 50 | constant_map: std.AutoArrayHashMapUnmanaged(void, void), | 50 | constant_map: std.AutoArrayHashMapUnmanaged(void, void), |
| 51 | constant_items: std.MultiArrayList(Constant.Item), | 51 | constant_items: std.MultiArrayList(Constant.Item), |
| 52 | constant_extra: std.ArrayListUnmanaged(u32), | 52 | constant_extra: std.ArrayList(u32), |
| 53 | constant_limbs: std.ArrayListUnmanaged(std.math.big.Limb), | 53 | constant_limbs: std.ArrayList(std.math.big.Limb), |
| 54 | 54 | ||
| 55 | metadata_map: std.AutoArrayHashMapUnmanaged(void, void), | 55 | metadata_map: std.AutoArrayHashMapUnmanaged(void, void), |
| 56 | metadata_items: std.MultiArrayList(Metadata.Item), | 56 | metadata_items: std.MultiArrayList(Metadata.Item), |
| 57 | metadata_extra: std.ArrayListUnmanaged(u32), | 57 | metadata_extra: std.ArrayList(u32), |
| 58 | metadata_limbs: std.ArrayListUnmanaged(std.math.big.Limb), | 58 | metadata_limbs: std.ArrayList(std.math.big.Limb), |
| 59 | metadata_forward_references: std.ArrayListUnmanaged(Metadata.Optional), | 59 | metadata_forward_references: std.ArrayList(Metadata.Optional), |
| 60 | metadata_named: std.AutoArrayHashMapUnmanaged(String, struct { | 60 | metadata_named: std.AutoArrayHashMapUnmanaged(String, struct { |
| 61 | len: u32, | 61 | len: u32, |
| 62 | index: Metadata.Item.ExtraIndex, | 62 | index: Metadata.Item.ExtraIndex, |
| 63 | }), | 63 | }), |
| 64 | 64 | ||
| 65 | metadata_string_map: std.AutoArrayHashMapUnmanaged(void, void), | 65 | metadata_string_map: std.AutoArrayHashMapUnmanaged(void, void), |
| 66 | metadata_string_indices: std.ArrayListUnmanaged(u32), | 66 | metadata_string_indices: std.ArrayList(u32), |
| 67 | metadata_string_bytes: std.ArrayListUnmanaged(u8), | 67 | metadata_string_bytes: std.ArrayList(u8), |
| 68 | 68 | ||
| 69 | pub const expected_args_len = 16; | 69 | pub const expected_args_len = 16; |
| 70 | pub const expected_attrs_len = 16; | 70 | pub const expected_attrs_len = 16; |
| ... | @@ -1627,7 +1627,7 @@ pub const FunctionAttributes = enum(u32) { | ... | @@ -1627,7 +1627,7 @@ pub const FunctionAttributes = enum(u32) { |
| 1627 | maps: Maps = .{}, | 1627 | maps: Maps = .{}, |
| 1628 | 1628 | ||
| 1629 | const Map = std.AutoArrayHashMapUnmanaged(Attribute.Kind, Attribute.Index); | 1629 | const Map = std.AutoArrayHashMapUnmanaged(Attribute.Kind, Attribute.Index); |
| 1630 | const Maps = std.ArrayListUnmanaged(Map); | 1630 | const Maps = std.ArrayList(Map); |
| 1631 | 1631 | ||
| 1632 | pub fn deinit(self: *Wip, builder: *const Builder) void { | 1632 | pub fn deinit(self: *Wip, builder: *const Builder) void { |
| 1633 | for (self.maps.items) |*map| map.deinit(builder.gpa); | 1633 | for (self.maps.items) |*map| map.deinit(builder.gpa); |
| ... | @@ -5173,13 +5173,13 @@ pub const WipFunction = struct { | ... | @@ -5173,13 +5173,13 @@ pub const WipFunction = struct { |
| 5173 | prev_debug_location: DebugLocation, | 5173 | prev_debug_location: DebugLocation, |
| 5174 | debug_location: DebugLocation, | 5174 | debug_location: DebugLocation, |
| 5175 | cursor: Cursor, | 5175 | cursor: Cursor, |
| 5176 | blocks: std.ArrayListUnmanaged(Block), | 5176 | blocks: std.ArrayList(Block), |
| 5177 | instructions: std.MultiArrayList(Instruction), | 5177 | instructions: std.MultiArrayList(Instruction), |
| 5178 | names: std.ArrayListUnmanaged(String), | 5178 | names: std.ArrayList(String), |
| 5179 | strip: bool, | 5179 | strip: bool, |
| 5180 | debug_locations: std.AutoArrayHashMapUnmanaged(Instruction.Index, DebugLocation), | 5180 | debug_locations: std.AutoArrayHashMapUnmanaged(Instruction.Index, DebugLocation), |
| 5181 | debug_values: std.AutoArrayHashMapUnmanaged(Instruction.Index, void), | 5181 | debug_values: std.AutoArrayHashMapUnmanaged(Instruction.Index, void), |
| 5182 | extra: std.ArrayListUnmanaged(u32), | 5182 | extra: std.ArrayList(u32), |
| 5183 | 5183 | ||
| 5184 | pub const Cursor = struct { block: Block.Index, instruction: u32 = 0 }; | 5184 | pub const Cursor = struct { block: Block.Index, instruction: u32 = 0 }; |
| 5185 | 5185 | ||
| ... | @@ -5187,7 +5187,7 @@ pub const WipFunction = struct { | ... | @@ -5187,7 +5187,7 @@ pub const WipFunction = struct { |
| 5187 | name: String, | 5187 | name: String, |
| 5188 | incoming: u32, | 5188 | incoming: u32, |
| 5189 | branches: u32 = 0, | 5189 | branches: u32 = 0, |
| 5190 | instructions: std.ArrayListUnmanaged(Instruction.Index), | 5190 | instructions: std.ArrayList(Instruction.Index), |
| 5191 | 5191 | ||
| 5192 | const Index = enum(u32) { | 5192 | const Index = enum(u32) { |
| 5193 | entry, | 5193 | entry, |
| ... | @@ -13193,7 +13193,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco | ... | @@ -13193,7 +13193,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco |
| 13193 | // Write LLVM IR magic | 13193 | // Write LLVM IR magic |
| 13194 | try bitcode.writeBits(ir.MAGIC, 32); | 13194 | try bitcode.writeBits(ir.MAGIC, 32); |
| 13195 | 13195 | ||
| 13196 | var record: std.ArrayListUnmanaged(u64) = .empty; | 13196 | var record: std.ArrayList(u64) = .empty; |
| 13197 | defer record.deinit(self.gpa); | 13197 | defer record.deinit(self.gpa); |
| 13198 | 13198 | ||
| 13199 | // IDENTIFICATION_BLOCK | 13199 | // IDENTIFICATION_BLOCK |
lib/std/zig/system/NativePaths.zig+5-5| ... | @@ -7,11 +7,11 @@ const mem = std.mem; | ... | @@ -7,11 +7,11 @@ const mem = std.mem; |
| 7 | const NativePaths = @This(); | 7 | const NativePaths = @This(); |
| 8 | 8 | ||
| 9 | arena: Allocator, | 9 | arena: Allocator, |
| 10 | include_dirs: std.ArrayListUnmanaged([]const u8) = .empty, | 10 | include_dirs: std.ArrayList([]const u8) = .empty, |
| 11 | lib_dirs: std.ArrayListUnmanaged([]const u8) = .empty, | 11 | lib_dirs: std.ArrayList([]const u8) = .empty, |
| 12 | framework_dirs: std.ArrayListUnmanaged([]const u8) = .empty, | 12 | framework_dirs: std.ArrayList([]const u8) = .empty, |
| 13 | rpaths: std.ArrayListUnmanaged([]const u8) = .empty, | 13 | rpaths: std.ArrayList([]const u8) = .empty, |
| 14 | warnings: std.ArrayListUnmanaged([]const u8) = .empty, | 14 | warnings: std.ArrayList([]const u8) = .empty, |
| 15 | 15 | ||
| 16 | pub fn detect(arena: Allocator, native_target: *const std.Target) !NativePaths { | 16 | pub fn detect(arena: Allocator, native_target: *const std.Target) !NativePaths { |
| 17 | var self: NativePaths = .{ .arena = arena }; | 17 | var self: NativePaths = .{ .arena = arena }; |
lib/std/zon/parse.zig+2-2| ... | @@ -19,7 +19,7 @@ const Base = std.zig.number_literal.Base; | ... | @@ -19,7 +19,7 @@ const Base = std.zig.number_literal.Base; |
| 19 | const StrLitErr = std.zig.string_literal.Error; | 19 | const StrLitErr = std.zig.string_literal.Error; |
| 20 | const NumberLiteralError = std.zig.number_literal.Error; | 20 | const NumberLiteralError = std.zig.number_literal.Error; |
| 21 | const assert = std.debug.assert; | 21 | const assert = std.debug.assert; |
| 22 | const ArrayListUnmanaged = std.ArrayListUnmanaged; | 22 | const ArrayList = std.ArrayList; |
| 23 | 23 | ||
| 24 | /// Rename when adding or removing support for a type. | 24 | /// Rename when adding or removing support for a type. |
| 25 | const valid_types = {}; | 25 | const valid_types = {}; |
| ... | @@ -1115,7 +1115,7 @@ const Parser = struct { | ... | @@ -1115,7 +1115,7 @@ const Parser = struct { |
| 1115 | }; | 1115 | }; |
| 1116 | } else b: { | 1116 | } else b: { |
| 1117 | const msg = "supported: "; | 1117 | const msg = "supported: "; |
| 1118 | var buf: std.ArrayListUnmanaged(u8) = try .initCapacity(gpa, 64); | 1118 | var buf: std.ArrayList(u8) = try .initCapacity(gpa, 64); |
| 1119 | defer buf.deinit(gpa); | 1119 | defer buf.deinit(gpa); |
| 1120 | try buf.appendSlice(gpa, msg); | 1120 | try buf.appendSlice(gpa, msg); |
| 1121 | inline for (info.fields, 0..) |field_info, i| { | 1121 | inline for (info.fields, 0..) |field_info, i| { |
src/Air.zig+1-1| ... | @@ -22,7 +22,7 @@ pub const Liveness = @import("Air/Liveness.zig"); | ... | @@ -22,7 +22,7 @@ pub const Liveness = @import("Air/Liveness.zig"); |
| 22 | instructions: std.MultiArrayList(Inst).Slice, | 22 | instructions: std.MultiArrayList(Inst).Slice, |
| 23 | /// The meaning of this data is determined by `Inst.Tag` value. | 23 | /// The meaning of this data is determined by `Inst.Tag` value. |
| 24 | /// The first few indexes are reserved. See `ExtraIndex` for the values. | 24 | /// The first few indexes are reserved. See `ExtraIndex` for the values. |
| 25 | extra: std.ArrayListUnmanaged(u32), | 25 | extra: std.ArrayList(u32), |
| 26 | 26 | ||
| 27 | pub const ExtraIndex = enum(u32) { | 27 | pub const ExtraIndex = enum(u32) { |
| 28 | /// Payload index of the main `Block` in the `extra` array. | 28 | /// Payload index of the main `Block` in the `extra` array. |
src/Air/Legalize.zig+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | pt: Zcu.PerThread, | 1 | pt: Zcu.PerThread, |
| 2 | air_instructions: std.MultiArrayList(Air.Inst), | 2 | air_instructions: std.MultiArrayList(Air.Inst), |
| 3 | air_extra: std.ArrayListUnmanaged(u32), | 3 | air_extra: std.ArrayList(u32), |
| 4 | features: if (switch (dev.env) { | 4 | features: if (switch (dev.env) { |
| 5 | .bootstrap => @import("../codegen/c.zig").legalizeFeatures(undefined), | 5 | .bootstrap => @import("../codegen/c.zig").legalizeFeatures(undefined), |
| 6 | else => null, | 6 | else => null, |
src/Air/Liveness.zig+5-5| ... | @@ -117,7 +117,7 @@ fn LivenessPassData(comptime pass: LivenessPass) type { | ... | @@ -117,7 +117,7 @@ fn LivenessPassData(comptime pass: LivenessPass) type { |
| 117 | 117 | ||
| 118 | /// The extra data initialized by the `loop_analysis` pass for this pass to consume. | 118 | /// The extra data initialized by the `loop_analysis` pass for this pass to consume. |
| 119 | /// Owned by this struct during this pass. | 119 | /// Owned by this struct during this pass. |
| 120 | old_extra: std.ArrayListUnmanaged(u32) = .empty, | 120 | old_extra: std.ArrayList(u32) = .empty, |
| 121 | 121 | ||
| 122 | const BlockScope = struct { | 122 | const BlockScope = struct { |
| 123 | /// If this is a `block`, these instructions are alive upon a `br` to this block. | 123 | /// If this is a `block`, these instructions are alive upon a `br` to this block. |
| ... | @@ -347,7 +347,7 @@ const Analysis = struct { | ... | @@ -347,7 +347,7 @@ const Analysis = struct { |
| 347 | intern_pool: *InternPool, | 347 | intern_pool: *InternPool, |
| 348 | tomb_bits: []usize, | 348 | tomb_bits: []usize, |
| 349 | special: std.AutoHashMapUnmanaged(Air.Inst.Index, u32), | 349 | special: std.AutoHashMapUnmanaged(Air.Inst.Index, u32), |
| 350 | extra: std.ArrayListUnmanaged(u32), | 350 | extra: std.ArrayList(u32), |
| 351 | 351 | ||
| 352 | fn addExtra(a: *Analysis, extra: anytype) Allocator.Error!u32 { | 352 | fn addExtra(a: *Analysis, extra: anytype) Allocator.Error!u32 { |
| 353 | const fields = std.meta.fields(@TypeOf(extra)); | 353 | const fields = std.meta.fields(@TypeOf(extra)); |
| ... | @@ -1235,10 +1235,10 @@ fn analyzeInstCondBr( | ... | @@ -1235,10 +1235,10 @@ fn analyzeInstCondBr( |
| 1235 | // Operands which are alive in one branch but not the other need to die at the start of | 1235 | // Operands which are alive in one branch but not the other need to die at the start of |
| 1236 | // the peer branch. | 1236 | // the peer branch. |
| 1237 | 1237 | ||
| 1238 | var then_mirrored_deaths: std.ArrayListUnmanaged(Air.Inst.Index) = .empty; | 1238 | var then_mirrored_deaths: std.ArrayList(Air.Inst.Index) = .empty; |
| 1239 | defer then_mirrored_deaths.deinit(gpa); | 1239 | defer then_mirrored_deaths.deinit(gpa); |
| 1240 | 1240 | ||
| 1241 | var else_mirrored_deaths: std.ArrayListUnmanaged(Air.Inst.Index) = .empty; | 1241 | var else_mirrored_deaths: std.ArrayList(Air.Inst.Index) = .empty; |
| 1242 | defer else_mirrored_deaths.deinit(gpa); | 1242 | defer else_mirrored_deaths.deinit(gpa); |
| 1243 | 1243 | ||
| 1244 | // Note: this invalidates `else_live`, but expands `then_live` to be their union | 1244 | // Note: this invalidates `else_live`, but expands `then_live` to be their union |
| ... | @@ -1351,7 +1351,7 @@ fn analyzeInstSwitchBr( | ... | @@ -1351,7 +1351,7 @@ fn analyzeInstSwitchBr( |
| 1351 | // to understand it, I encourage looking at `analyzeInstCondBr` first. | 1351 | // to understand it, I encourage looking at `analyzeInstCondBr` first. |
| 1352 | 1352 | ||
| 1353 | const DeathSet = std.AutoHashMapUnmanaged(Air.Inst.Index, void); | 1353 | const DeathSet = std.AutoHashMapUnmanaged(Air.Inst.Index, void); |
| 1354 | const DeathList = std.ArrayListUnmanaged(Air.Inst.Index); | 1354 | const DeathList = std.ArrayList(Air.Inst.Index); |
| 1355 | 1355 | ||
| 1356 | var case_live_sets = try gpa.alloc(std.AutoHashMapUnmanaged(Air.Inst.Index, void), ncases + 1); // +1 for else | 1356 | var case_live_sets = try gpa.alloc(std.AutoHashMapUnmanaged(Air.Inst.Index, void), ncases + 1); // +1 for else |
| 1357 | defer gpa.free(case_live_sets); | 1357 | defer gpa.free(case_live_sets); |
src/Compilation.zig+13-13| ... | @@ -263,7 +263,7 @@ llvm_opt_bisect_limit: c_int, | ... | @@ -263,7 +263,7 @@ llvm_opt_bisect_limit: c_int, |
| 263 | 263 | ||
| 264 | time_report: ?TimeReport, | 264 | time_report: ?TimeReport, |
| 265 | 265 | ||
| 266 | file_system_inputs: ?*std.ArrayListUnmanaged(u8), | 266 | file_system_inputs: ?*std.ArrayList(u8), |
| 267 | 267 | ||
| 268 | /// This is the digest of the cache for the current compilation. | 268 | /// This is the digest of the cache for the current compilation. |
| 269 | /// This digest will be known after update() is called. | 269 | /// This digest will be known after update() is called. |
| ... | @@ -1166,8 +1166,8 @@ pub const CObject = struct { | ... | @@ -1166,8 +1166,8 @@ pub const CObject = struct { |
| 1166 | category: u32 = 0, | 1166 | category: u32 = 0, |
| 1167 | msg: []const u8 = &.{}, | 1167 | msg: []const u8 = &.{}, |
| 1168 | src_loc: SrcLoc = .{}, | 1168 | src_loc: SrcLoc = .{}, |
| 1169 | src_ranges: std.ArrayListUnmanaged(SrcRange) = .empty, | 1169 | src_ranges: std.ArrayList(SrcRange) = .empty, |
| 1170 | sub_diags: std.ArrayListUnmanaged(Diag) = .empty, | 1170 | sub_diags: std.ArrayList(Diag) = .empty, |
| 1171 | 1171 | ||
| 1172 | fn deinit(wip_diag: *@This(), allocator: Allocator) void { | 1172 | fn deinit(wip_diag: *@This(), allocator: Allocator) void { |
| 1173 | allocator.free(wip_diag.msg); | 1173 | allocator.free(wip_diag.msg); |
| ... | @@ -1197,7 +1197,7 @@ pub const CObject = struct { | ... | @@ -1197,7 +1197,7 @@ pub const CObject = struct { |
| 1197 | category_names.deinit(gpa); | 1197 | category_names.deinit(gpa); |
| 1198 | } | 1198 | } |
| 1199 | 1199 | ||
| 1200 | var stack: std.ArrayListUnmanaged(WipDiag) = .empty; | 1200 | var stack: std.ArrayList(WipDiag) = .empty; |
| 1201 | defer { | 1201 | defer { |
| 1202 | for (stack.items) |*wip_diag| wip_diag.deinit(gpa); | 1202 | for (stack.items) |*wip_diag| wip_diag.deinit(gpa); |
| 1203 | stack.deinit(gpa); | 1203 | stack.deinit(gpa); |
| ... | @@ -1784,7 +1784,7 @@ pub const CreateOptions = struct { | ... | @@ -1784,7 +1784,7 @@ pub const CreateOptions = struct { |
| 1784 | global_cc_argv: []const []const u8 = &.{}, | 1784 | global_cc_argv: []const []const u8 = &.{}, |
| 1785 | 1785 | ||
| 1786 | /// Tracks all files that can cause the Compilation to be invalidated and need a rebuild. | 1786 | /// 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, |
| 1788 | 1788 | ||
| 1789 | parent_whole_cache: ?ParentWholeCache = null, | 1789 | parent_whole_cache: ?ParentWholeCache = null, |
| 1790 | 1790 | ||
| ... | @@ -4150,7 +4150,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle { | ... | @@ -4150,7 +4150,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle { |
| 4150 | 4150 | ||
| 4151 | const refs = try zcu.resolveReferences(); | 4151 | const refs = try zcu.resolveReferences(); |
| 4152 | 4152 | ||
| 4153 | var messages: std.ArrayListUnmanaged(Zcu.ErrorMsg) = .empty; | 4153 | var messages: std.ArrayList(Zcu.ErrorMsg) = .empty; |
| 4154 | defer messages.deinit(gpa); | 4154 | defer messages.deinit(gpa); |
| 4155 | for (zcu.compile_logs.keys(), zcu.compile_logs.values()) |logging_unit, compile_log| { | 4155 | for (zcu.compile_logs.keys(), zcu.compile_logs.values()) |logging_unit, compile_log| { |
| 4156 | if (!refs.contains(logging_unit)) continue; | 4156 | if (!refs.contains(logging_unit)) continue; |
| ... | @@ -4197,7 +4197,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle { | ... | @@ -4197,7 +4197,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle { |
| 4197 | } | 4197 | } |
| 4198 | } | 4198 | } |
| 4199 | 4199 | ||
| 4200 | var log_text: std.ArrayListUnmanaged(u8) = .empty; | 4200 | var log_text: std.ArrayList(u8) = .empty; |
| 4201 | defer log_text.deinit(gpa); | 4201 | defer log_text.deinit(gpa); |
| 4202 | 4202 | ||
| 4203 | // Index 0 will be the root message; the rest will be notes. | 4203 | // Index 0 will be the root message; the rest will be notes. |
| ... | @@ -4250,7 +4250,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle { | ... | @@ -4250,7 +4250,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle { |
| 4250 | } | 4250 | } |
| 4251 | 4251 | ||
| 4252 | /// Writes all compile log lines belonging to `logging_unit` into `log_text` using `zcu.gpa`. | 4252 | /// Writes all compile log lines belonging to `logging_unit` into `log_text` using `zcu.gpa`. |
| 4253 | fn appendCompileLogLines(log_text: *std.ArrayListUnmanaged(u8), zcu: *Zcu, logging_unit: InternPool.AnalUnit) Allocator.Error!void { | 4253 | fn appendCompileLogLines(log_text: *std.ArrayList(u8), zcu: *Zcu, logging_unit: InternPool.AnalUnit) Allocator.Error!void { |
| 4254 | const gpa = zcu.gpa; | 4254 | const gpa = zcu.gpa; |
| 4255 | const ip = &zcu.intern_pool; | 4255 | const ip = &zcu.intern_pool; |
| 4256 | var opt_line_idx = zcu.compile_logs.get(logging_unit).?.first_line.toOptional(); | 4256 | var opt_line_idx = zcu.compile_logs.get(logging_unit).?.first_line.toOptional(); |
| ... | @@ -4336,7 +4336,7 @@ pub fn addModuleErrorMsg( | ... | @@ -4336,7 +4336,7 @@ pub fn addModuleErrorMsg( |
| 4336 | }; | 4336 | }; |
| 4337 | const err_loc = std.zig.findLineColumn(err_source, err_span.main); | 4337 | const err_loc = std.zig.findLineColumn(err_source, err_span.main); |
| 4338 | 4338 | ||
| 4339 | var ref_traces: std.ArrayListUnmanaged(ErrorBundle.ReferenceTrace) = .empty; | 4339 | var ref_traces: std.ArrayList(ErrorBundle.ReferenceTrace) = .empty; |
| 4340 | defer ref_traces.deinit(gpa); | 4340 | defer ref_traces.deinit(gpa); |
| 4341 | 4341 | ||
| 4342 | rt: { | 4342 | rt: { |
| ... | @@ -4470,7 +4470,7 @@ pub fn addModuleErrorMsg( | ... | @@ -4470,7 +4470,7 @@ pub fn addModuleErrorMsg( |
| 4470 | fn addReferenceTraceFrame( | 4470 | fn addReferenceTraceFrame( |
| 4471 | zcu: *Zcu, | 4471 | zcu: *Zcu, |
| 4472 | eb: *ErrorBundle.Wip, | 4472 | eb: *ErrorBundle.Wip, |
| 4473 | ref_traces: *std.ArrayListUnmanaged(ErrorBundle.ReferenceTrace), | 4473 | ref_traces: *std.ArrayList(ErrorBundle.ReferenceTrace), |
| 4474 | name: []const u8, | 4474 | name: []const u8, |
| 4475 | lazy_src: Zcu.LazySrcLoc, | 4475 | lazy_src: Zcu.LazySrcLoc, |
| 4476 | inlined: bool, | 4476 | inlined: bool, |
| ... | @@ -5678,7 +5678,7 @@ pub fn translateC( | ... | @@ -5678,7 +5678,7 @@ pub fn translateC( |
| 5678 | try argv.appendSlice(&[_][]const u8{ "-target", try target.zigTriple(arena) }); | 5678 | try argv.appendSlice(&[_][]const u8{ "-target", try target.zigTriple(arena) }); |
| 5679 | 5679 | ||
| 5680 | const mcpu = mcpu: { | 5680 | const mcpu = mcpu: { |
| 5681 | var buf: std.ArrayListUnmanaged(u8) = .empty; | 5681 | var buf: std.ArrayList(u8) = .empty; |
| 5682 | defer buf.deinit(gpa); | 5682 | defer buf.deinit(gpa); |
| 5683 | 5683 | ||
| 5684 | try buf.print(gpa, "-mcpu={s}", .{target.cpu.model.name}); | 5684 | try buf.print(gpa, "-mcpu={s}", .{target.cpu.model.name}); |
| ... | @@ -6671,7 +6671,7 @@ fn spawnZigRc( | ... | @@ -6671,7 +6671,7 @@ fn spawnZigRc( |
| 6671 | argv: []const []const u8, | 6671 | argv: []const []const u8, |
| 6672 | child_progress_node: std.Progress.Node, | 6672 | child_progress_node: std.Progress.Node, |
| 6673 | ) !void { | 6673 | ) !void { |
| 6674 | var node_name: std.ArrayListUnmanaged(u8) = .empty; | 6674 | var node_name: std.ArrayList(u8) = .empty; |
| 6675 | defer node_name.deinit(arena); | 6675 | defer node_name.deinit(arena); |
| 6676 | 6676 | ||
| 6677 | var child = std.process.Child.init(argv, arena); | 6677 | var child = std.process.Child.init(argv, arena); |
| ... | @@ -6986,7 +6986,7 @@ fn addCommonCCArgs( | ... | @@ -6986,7 +6986,7 @@ fn addCommonCCArgs( |
| 6986 | } | 6986 | } |
| 6987 | 6987 | ||
| 6988 | if (is_clang) { | 6988 | if (is_clang) { |
| 6989 | var san_arg: std.ArrayListUnmanaged(u8) = .empty; | 6989 | var san_arg: std.ArrayList(u8) = .empty; |
| 6990 | const prefix = "-fsanitize="; | 6990 | const prefix = "-fsanitize="; |
| 6991 | if (mod.sanitize_c != .off) { | 6991 | if (mod.sanitize_c != .off) { |
| 6992 | if (san_arg.items.len == 0) try san_arg.appendSlice(arena, prefix); | 6992 | 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 { | ... | @@ -47,7 +47,7 @@ fn runThread(ids: *IncrementalDebugServer) void { |
| 47 | const io = ids.zcu.comp.io; | 47 | const io = ids.zcu.comp.io; |
| 48 | 48 | ||
| 49 | var cmd_buf: [1024]u8 = undefined; | 49 | var cmd_buf: [1024]u8 = undefined; |
| 50 | var text_out: std.ArrayListUnmanaged(u8) = .empty; | 50 | var text_out: std.ArrayList(u8) = .empty; |
| 51 | defer text_out.deinit(gpa); | 51 | defer text_out.deinit(gpa); |
| 52 | 52 | ||
| 53 | const addr: std.Io.net.IpAddress = .{ .ip6 = .loopback(port) }; | 53 | 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), | ... | @@ -79,10 +79,10 @@ first_dependency: std.AutoArrayHashMapUnmanaged(AnalUnit, DepEntry.Index), |
| 79 | /// up entries in this list as required. This is not stored in `extra` so that | 79 | /// up entries in this list as required. This is not stored in `extra` so that |
| 80 | /// we can use `free_dep_entries` to track free indices, since dependencies are | 80 | /// we can use `free_dep_entries` to track free indices, since dependencies are |
| 81 | /// removed frequently. | 81 | /// removed frequently. |
| 82 | dep_entries: std.ArrayListUnmanaged(DepEntry), | 82 | dep_entries: std.ArrayList(DepEntry), |
| 83 | /// Stores unused indices in `dep_entries` which can be reused without a full | 83 | /// Stores unused indices in `dep_entries` which can be reused without a full |
| 84 | /// garbage collection pass. | 84 | /// garbage collection pass. |
| 85 | free_dep_entries: std.ArrayListUnmanaged(DepEntry.Index), | 85 | free_dep_entries: std.ArrayList(DepEntry.Index), |
| 86 | 86 | ||
| 87 | /// Whether a multi-threaded intern pool is useful. | 87 | /// Whether a multi-threaded intern pool is useful. |
| 88 | /// Currently `false` until the intern pool is actually accessed | 88 | /// Currently `false` until the intern pool is actually accessed |
| ... | @@ -11436,7 +11436,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator) | ... | @@ -11436,7 +11436,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator) |
| 11436 | defer arena_allocator.deinit(); | 11436 | defer arena_allocator.deinit(); |
| 11437 | const arena = arena_allocator.allocator(); | 11437 | const arena = arena_allocator.allocator(); |
| 11438 | 11438 | ||
| 11439 | var instances: std.AutoArrayHashMapUnmanaged(Index, std.ArrayListUnmanaged(Index)) = .empty; | 11439 | var instances: std.AutoArrayHashMapUnmanaged(Index, std.ArrayList(Index)) = .empty; |
| 11440 | for (ip.locals, 0..) |*local, tid| { | 11440 | for (ip.locals, 0..) |*local, tid| { |
| 11441 | const items = local.shared.items.view().slice(); | 11441 | const items = local.shared.items.view().slice(); |
| 11442 | const extra_list = local.shared.extra; | 11442 | const extra_list = local.shared.extra; |
| ... | @@ -11463,7 +11463,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator) | ... | @@ -11463,7 +11463,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator) |
| 11463 | defer std.debug.unlockStderrWriter(); | 11463 | defer std.debug.unlockStderrWriter(); |
| 11464 | 11464 | ||
| 11465 | const SortContext = struct { | 11465 | const SortContext = struct { |
| 11466 | values: []std.ArrayListUnmanaged(Index), | 11466 | values: []std.ArrayList(Index), |
| 11467 | pub fn lessThan(ctx: @This(), a_index: usize, b_index: usize) bool { | 11467 | pub fn lessThan(ctx: @This(), a_index: usize, b_index: usize) bool { |
| 11468 | return ctx.values[a_index].items.len > ctx.values[b_index].items.len; | 11468 | return ctx.values[a_index].items.len > ctx.values[b_index].items.len; |
| 11469 | } | 11469 | } |
src/Package.zig+1-1| ... | @@ -105,7 +105,7 @@ pub const Hash = struct { | ... | @@ -105,7 +105,7 @@ pub const Hash = struct { |
| 105 | assert(name.len <= 32); | 105 | assert(name.len <= 32); |
| 106 | assert(ver.len <= 32); | 106 | assert(ver.len <= 32); |
| 107 | var result: Hash = undefined; | 107 | var result: Hash = undefined; |
| 108 | var buf: std.ArrayListUnmanaged(u8) = .initBuffer(&result.bytes); | 108 | var buf: std.ArrayList(u8) = .initBuffer(&result.bytes); |
| 109 | buf.appendSliceAssumeCapacity(name); | 109 | buf.appendSliceAssumeCapacity(name); |
| 110 | buf.appendAssumeCapacity('-'); | 110 | buf.appendAssumeCapacity('-'); |
| 111 | buf.appendSliceAssumeCapacity(ver); | 111 | buf.appendSliceAssumeCapacity(ver); |
src/Package/Fetch.zig+2-2| ... | @@ -112,7 +112,7 @@ pub const JobQueue = struct { | ... | @@ -112,7 +112,7 @@ pub const JobQueue = struct { |
| 112 | /// `table` may be missing some tasks such as ones that failed, so this | 112 | /// `table` may be missing some tasks such as ones that failed, so this |
| 113 | /// field contains references to all of them. | 113 | /// field contains references to all of them. |
| 114 | /// Protected by `mutex`. | 114 | /// Protected by `mutex`. |
| 115 | all_fetches: std.ArrayListUnmanaged(*Fetch) = .empty, | 115 | all_fetches: std.ArrayList(*Fetch) = .empty, |
| 116 | 116 | ||
| 117 | http_client: *std.http.Client, | 117 | http_client: *std.http.Client, |
| 118 | thread_pool: *ThreadPool, | 118 | thread_pool: *ThreadPool, |
| ... | @@ -2323,7 +2323,7 @@ const TestFetchBuilder = struct { | ... | @@ -2323,7 +2323,7 @@ const TestFetchBuilder = struct { |
| 2323 | var package_dir = try self.packageDir(); | 2323 | var package_dir = try self.packageDir(); |
| 2324 | defer package_dir.close(); | 2324 | defer package_dir.close(); |
| 2325 | 2325 | ||
| 2326 | var actual_files: std.ArrayListUnmanaged([]u8) = .empty; | 2326 | var actual_files: std.ArrayList([]u8) = .empty; |
| 2327 | defer actual_files.deinit(std.testing.allocator); | 2327 | defer actual_files.deinit(std.testing.allocator); |
| 2328 | defer for (actual_files.items) |file| std.testing.allocator.free(file); | 2328 | defer for (actual_files.items) |file| std.testing.allocator.free(file); |
| 2329 | var walker = try package_dir.walk(std.testing.allocator); | 2329 | 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) { | ... | @@ -160,7 +160,7 @@ pub const Oid = union(Format) { |
| 160 | 160 | ||
| 161 | pub const Diagnostics = struct { | 161 | pub const Diagnostics = struct { |
| 162 | allocator: Allocator, | 162 | allocator: Allocator, |
| 163 | errors: std.ArrayListUnmanaged(Error) = .empty, | 163 | errors: std.ArrayList(Error) = .empty, |
| 164 | 164 | ||
| 165 | pub const Error = union(enum) { | 165 | pub const Error = union(enum) { |
| 166 | unable_to_create_sym_link: struct { | 166 | unable_to_create_sym_link: struct { |
| ... | @@ -405,7 +405,7 @@ const Odb = struct { | ... | @@ -405,7 +405,7 @@ const Odb = struct { |
| 405 | fn readObject(odb: *Odb) !Object { | 405 | fn readObject(odb: *Odb) !Object { |
| 406 | var base_offset = odb.pack_file.logicalPos(); | 406 | var base_offset = odb.pack_file.logicalPos(); |
| 407 | var base_header: EntryHeader = undefined; | 407 | var base_header: EntryHeader = undefined; |
| 408 | var delta_offsets: std.ArrayListUnmanaged(u64) = .empty; | 408 | var delta_offsets: std.ArrayList(u64) = .empty; |
| 409 | defer delta_offsets.deinit(odb.allocator); | 409 | defer delta_offsets.deinit(odb.allocator); |
| 410 | const base_object = while (true) { | 410 | const base_object = while (true) { |
| 411 | if (odb.cache.get(base_offset)) |base_object| break base_object; | 411 | if (odb.cache.get(base_offset)) |base_object| break base_object; |
| ... | @@ -1277,7 +1277,7 @@ pub fn indexPack( | ... | @@ -1277,7 +1277,7 @@ pub fn indexPack( |
| 1277 | 1277 | ||
| 1278 | var index_entries: std.AutoHashMapUnmanaged(Oid, IndexEntry) = .empty; | 1278 | var index_entries: std.AutoHashMapUnmanaged(Oid, IndexEntry) = .empty; |
| 1279 | defer index_entries.deinit(allocator); | 1279 | defer index_entries.deinit(allocator); |
| 1280 | var pending_deltas: std.ArrayListUnmanaged(IndexEntry) = .empty; | 1280 | var pending_deltas: std.ArrayList(IndexEntry) = .empty; |
| 1281 | defer pending_deltas.deinit(allocator); | 1281 | defer pending_deltas.deinit(allocator); |
| 1282 | 1282 | ||
| 1283 | const pack_checksum = try indexPackFirstPass(allocator, format, pack, &index_entries, &pending_deltas); | 1283 | const pack_checksum = try indexPackFirstPass(allocator, format, pack, &index_entries, &pending_deltas); |
| ... | @@ -1299,7 +1299,7 @@ pub fn indexPack( | ... | @@ -1299,7 +1299,7 @@ pub fn indexPack( |
| 1299 | remaining_deltas = pending_deltas.items.len; | 1299 | remaining_deltas = pending_deltas.items.len; |
| 1300 | } | 1300 | } |
| 1301 | 1301 | ||
| 1302 | var oids: std.ArrayListUnmanaged(Oid) = .empty; | 1302 | var oids: std.ArrayList(Oid) = .empty; |
| 1303 | defer oids.deinit(allocator); | 1303 | defer oids.deinit(allocator); |
| 1304 | try oids.ensureTotalCapacityPrecise(allocator, index_entries.count()); | 1304 | try oids.ensureTotalCapacityPrecise(allocator, index_entries.count()); |
| 1305 | var index_entries_iter = index_entries.iterator(); | 1305 | var index_entries_iter = index_entries.iterator(); |
| ... | @@ -1341,7 +1341,7 @@ pub fn indexPack( | ... | @@ -1341,7 +1341,7 @@ pub fn indexPack( |
| 1341 | try writer.writeInt(u32, index_entries.get(oid).?.crc32, .big); | 1341 | try writer.writeInt(u32, index_entries.get(oid).?.crc32, .big); |
| 1342 | } | 1342 | } |
| 1343 | 1343 | ||
| 1344 | var big_offsets: std.ArrayListUnmanaged(u64) = .empty; | 1344 | var big_offsets: std.ArrayList(u64) = .empty; |
| 1345 | defer big_offsets.deinit(allocator); | 1345 | defer big_offsets.deinit(allocator); |
| 1346 | for (oids.items) |oid| { | 1346 | for (oids.items) |oid| { |
| 1347 | const offset = index_entries.get(oid).?.offset; | 1347 | const offset = index_entries.get(oid).?.offset; |
| ... | @@ -1372,7 +1372,7 @@ fn indexPackFirstPass( | ... | @@ -1372,7 +1372,7 @@ fn indexPackFirstPass( |
| 1372 | format: Oid.Format, | 1372 | format: Oid.Format, |
| 1373 | pack: *std.fs.File.Reader, | 1373 | pack: *std.fs.File.Reader, |
| 1374 | index_entries: *std.AutoHashMapUnmanaged(Oid, IndexEntry), | 1374 | index_entries: *std.AutoHashMapUnmanaged(Oid, IndexEntry), |
| 1375 | pending_deltas: *std.ArrayListUnmanaged(IndexEntry), | 1375 | pending_deltas: *std.ArrayList(IndexEntry), |
| 1376 | ) !Oid { | 1376 | ) !Oid { |
| 1377 | var flate_buffer: [std.compress.flate.max_window_len]u8 = undefined; | 1377 | var flate_buffer: [std.compress.flate.max_window_len]u8 = undefined; |
| 1378 | var pack_buffer: [2048]u8 = undefined; // Reasonably large buffer for file system. | 1378 | var pack_buffer: [2048]u8 = undefined; // Reasonably large buffer for file system. |
| ... | @@ -1431,7 +1431,7 @@ fn indexPackHashDelta( | ... | @@ -1431,7 +1431,7 @@ fn indexPackHashDelta( |
| 1431 | // Figure out the chain of deltas to resolve | 1431 | // Figure out the chain of deltas to resolve |
| 1432 | var base_offset = delta.offset; | 1432 | var base_offset = delta.offset; |
| 1433 | var base_header: EntryHeader = undefined; | 1433 | var base_header: EntryHeader = undefined; |
| 1434 | var delta_offsets: std.ArrayListUnmanaged(u64) = .empty; | 1434 | var delta_offsets: std.ArrayList(u64) = .empty; |
| 1435 | defer delta_offsets.deinit(allocator); | 1435 | defer delta_offsets.deinit(allocator); |
| 1436 | const base_object = while (true) { | 1436 | const base_object = while (true) { |
| 1437 | if (cache.get(base_offset)) |base_object| break base_object; | 1437 | 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 | ... | @@ -1641,7 +1641,7 @@ fn runRepositoryTest(io: Io, comptime format: Oid.Format, head_commit: []const u |
| 1641 | "file8", | 1641 | "file8", |
| 1642 | "file9", | 1642 | "file9", |
| 1643 | }; | 1643 | }; |
| 1644 | var actual_files: std.ArrayListUnmanaged([]u8) = .empty; | 1644 | var actual_files: std.ArrayList([]u8) = .empty; |
| 1645 | defer actual_files.deinit(testing.allocator); | 1645 | defer actual_files.deinit(testing.allocator); |
| 1646 | defer for (actual_files.items) |file| testing.allocator.free(file); | 1646 | defer for (actual_files.items) |file| testing.allocator.free(file); |
| 1647 | var walker = try worktree.dir.walk(testing.allocator); | 1647 | var walker = try worktree.dir.walk(testing.allocator); |
src/Package/Manifest.zig+3-3| ... | @@ -140,8 +140,8 @@ const Parse = struct { | ... | @@ -140,8 +140,8 @@ const Parse = struct { |
| 140 | gpa: Allocator, | 140 | gpa: Allocator, |
| 141 | ast: Ast, | 141 | ast: Ast, |
| 142 | arena: Allocator, | 142 | arena: Allocator, |
| 143 | buf: std.ArrayListUnmanaged(u8), | 143 | buf: std.ArrayList(u8), |
| 144 | errors: std.ArrayListUnmanaged(ErrorMessage), | 144 | errors: std.ArrayList(ErrorMessage), |
| 145 | 145 | ||
| 146 | name: []const u8, | 146 | name: []const u8, |
| 147 | id: u32, | 147 | id: u32, |
| ... | @@ -466,7 +466,7 @@ const Parse = struct { | ... | @@ -466,7 +466,7 @@ const Parse = struct { |
| 466 | fn parseStrLit( | 466 | fn parseStrLit( |
| 467 | p: *Parse, | 467 | p: *Parse, |
| 468 | token: Ast.TokenIndex, | 468 | token: Ast.TokenIndex, |
| 469 | buf: *std.ArrayListUnmanaged(u8), | 469 | buf: *std.ArrayList(u8), |
| 470 | bytes: []const u8, | 470 | bytes: []const u8, |
| 471 | offset: u32, | 471 | offset: u32, |
| 472 | ) InnerError!void { | 472 | ) InnerError!void { |
src/Sema.zig+26-26| ... | @@ -46,7 +46,7 @@ gpa: Allocator, | ... | @@ -46,7 +46,7 @@ gpa: Allocator, |
| 46 | arena: Allocator, | 46 | arena: Allocator, |
| 47 | code: Zir, | 47 | code: Zir, |
| 48 | air_instructions: std.MultiArrayList(Air.Inst) = .{}, | 48 | air_instructions: std.MultiArrayList(Air.Inst) = .{}, |
| 49 | air_extra: std.ArrayListUnmanaged(u32) = .empty, | 49 | air_extra: std.ArrayList(u32) = .empty, |
| 50 | /// Maps ZIR to AIR. | 50 | /// Maps ZIR to AIR. |
| 51 | inst_map: InstMap = .{}, | 51 | inst_map: InstMap = .{}, |
| 52 | /// The "owner" of a `Sema` represents the root "thing" that is being analyzed. | 52 | /// 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 | ... | @@ -111,11 +111,11 @@ maybe_comptime_allocs: std.AutoHashMapUnmanaged(Air.Inst.Index, MaybeComptimeAll |
| 111 | /// stored as elements of this array. | 111 | /// stored as elements of this array. |
| 112 | /// Pointers to such memory are represented via an index into this array. | 112 | /// Pointers to such memory are represented via an index into this array. |
| 113 | /// Backed by gpa. | 113 | /// Backed by gpa. |
| 114 | comptime_allocs: std.ArrayListUnmanaged(ComptimeAlloc) = .empty, | 114 | comptime_allocs: std.ArrayList(ComptimeAlloc) = .empty, |
| 115 | 115 | ||
| 116 | /// A list of exports performed by this analysis. After this `Sema` terminates, | 116 | /// A list of exports performed by this analysis. After this `Sema` terminates, |
| 117 | /// these are flushed to `Zcu.single_exports` or `Zcu.multi_exports`. | 117 | /// these are flushed to `Zcu.single_exports` or `Zcu.multi_exports`. |
| 118 | exports: std.ArrayListUnmanaged(Zcu.Export) = .empty, | 118 | exports: std.ArrayList(Zcu.Export) = .empty, |
| 119 | 119 | ||
| 120 | /// All references registered so far by this `Sema`. This is a temporary duplicate | 120 | /// All references registered so far by this `Sema`. This is a temporary duplicate |
| 121 | /// of data stored in `Zcu.all_references`. It exists to avoid adding references to | 121 | /// of data stored in `Zcu.all_references`. It exists to avoid adding references to |
| ... | @@ -343,7 +343,7 @@ pub const Block = struct { | ... | @@ -343,7 +343,7 @@ pub const Block = struct { |
| 343 | /// The namespace to use for lookups from this source block | 343 | /// The namespace to use for lookups from this source block |
| 344 | namespace: InternPool.NamespaceIndex, | 344 | namespace: InternPool.NamespaceIndex, |
| 345 | /// The AIR instructions generated for this block. | 345 | /// The AIR instructions generated for this block. |
| 346 | instructions: std.ArrayListUnmanaged(Air.Inst.Index), | 346 | instructions: std.ArrayList(Air.Inst.Index), |
| 347 | // `param` instructions are collected here to be used by the `func` instruction. | 347 | // `param` instructions are collected here to be used by the `func` instruction. |
| 348 | /// When doing a generic function instantiation, this array collects a type | 348 | /// When doing a generic function instantiation, this array collects a type |
| 349 | /// for each *runtime-known* parameter. This array corresponds to the instance | 349 | /// for each *runtime-known* parameter. This array corresponds to the instance |
| ... | @@ -475,23 +475,23 @@ pub const Block = struct { | ... | @@ -475,23 +475,23 @@ pub const Block = struct { |
| 475 | block_inst: Air.Inst.Index, | 475 | block_inst: Air.Inst.Index, |
| 476 | /// Separate array list from break_inst_list so that it can be passed directly | 476 | /// Separate array list from break_inst_list so that it can be passed directly |
| 477 | /// to resolvePeerTypes. | 477 | /// to resolvePeerTypes. |
| 478 | results: std.ArrayListUnmanaged(Air.Inst.Ref), | 478 | results: std.ArrayList(Air.Inst.Ref), |
| 479 | /// Keeps track of the break instructions so that the operand can be replaced | 479 | /// Keeps track of the break instructions so that the operand can be replaced |
| 480 | /// if we need to add type coercion at the end of block analysis. | 480 | /// if we need to add type coercion at the end of block analysis. |
| 481 | /// Same indexes, capacity, length as `results`. | 481 | /// Same indexes, capacity, length as `results`. |
| 482 | br_list: std.ArrayListUnmanaged(Air.Inst.Index), | 482 | br_list: std.ArrayList(Air.Inst.Index), |
| 483 | /// Keeps the source location of the rhs operand of the break instruction, | 483 | /// Keeps the source location of the rhs operand of the break instruction, |
| 484 | /// to enable more precise compile errors. | 484 | /// to enable more precise compile errors. |
| 485 | /// Same indexes, capacity, length as `results`. | 485 | /// Same indexes, capacity, length as `results`. |
| 486 | src_locs: std.ArrayListUnmanaged(?LazySrcLoc), | 486 | src_locs: std.ArrayList(?LazySrcLoc), |
| 487 | /// Most blocks do not utilize this field. When it is used, its use is | 487 | /// Most blocks do not utilize this field. When it is used, its use is |
| 488 | /// contextual. The possible uses are as follows: | 488 | /// contextual. The possible uses are as follows: |
| 489 | /// * for a `switch_block[_ref]`, this refers to dummy `br` instructions | 489 | /// * for a `switch_block[_ref]`, this refers to dummy `br` instructions |
| 490 | /// which correspond to `switch_continue` ZIR. The switch logic will | 490 | /// which correspond to `switch_continue` ZIR. The switch logic will |
| 491 | /// rewrite these to appropriate AIR switch dispatches. | 491 | /// 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, |
| 493 | /// Same indexes, capacity, length as `extra_insts`. | 493 | /// Same indexes, capacity, length as `extra_insts`. |
| 494 | extra_src_locs: std.ArrayListUnmanaged(LazySrcLoc) = .empty, | 494 | extra_src_locs: std.ArrayList(LazySrcLoc) = .empty, |
| 495 | 495 | ||
| 496 | pub fn deinit(merges: *@This(), allocator: Allocator) void { | 496 | pub fn deinit(merges: *@This(), allocator: Allocator) void { |
| 497 | merges.results.deinit(allocator); | 497 | merges.results.deinit(allocator); |
| ... | @@ -985,7 +985,7 @@ const InferredAlloc = struct { | ... | @@ -985,7 +985,7 @@ const InferredAlloc = struct { |
| 985 | /// is known. These should be rewritten to perform any required coercions | 985 | /// is known. These should be rewritten to perform any required coercions |
| 986 | /// when the type is resolved. | 986 | /// when the type is resolved. |
| 987 | /// Allocated from `sema.arena`. | 987 | /// Allocated from `sema.arena`. |
| 988 | prongs: std.ArrayListUnmanaged(Air.Inst.Index) = .empty, | 988 | prongs: std.ArrayList(Air.Inst.Index) = .empty, |
| 989 | }; | 989 | }; |
| 990 | 990 | ||
| 991 | pub fn deinit(sema: *Sema) void { | 991 | pub fn deinit(sema: *Sema) void { |
| ... | @@ -7547,8 +7547,8 @@ fn analyzeCall( | ... | @@ -7547,8 +7547,8 @@ fn analyzeCall( |
| 7547 | 7547 | ||
| 7548 | // This may be an overestimate, but it's definitely sufficient. | 7548 | // This may be an overestimate, but it's definitely sufficient. |
| 7549 | const max_runtime_args = args_info.count() - @popCount(func_ty_info.comptime_bits); | 7549 | 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); | 7550 | var runtime_args: std.ArrayList(Air.Inst.Ref) = try .initCapacity(arena, max_runtime_args); |
| 7551 | var runtime_param_tys: std.ArrayListUnmanaged(InternPool.Index) = try .initCapacity(arena, max_runtime_args); | 7551 | var runtime_param_tys: std.ArrayList(InternPool.Index) = try .initCapacity(arena, max_runtime_args); |
| 7552 | 7552 | ||
| 7553 | const comptime_args = try arena.alloc(InternPool.Index, args_info.count()); | 7553 | const comptime_args = try arena.alloc(InternPool.Index, args_info.count()); |
| 7554 | 7554 | ||
| ... | @@ -11107,7 +11107,7 @@ fn zirSwitchBlockErrUnion(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp | ... | @@ -11107,7 +11107,7 @@ fn zirSwitchBlockErrUnion(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp |
| 11107 | break :blk err_capture_inst; | 11107 | break :blk err_capture_inst; |
| 11108 | } else undefined; | 11108 | } else undefined; |
| 11109 | 11109 | ||
| 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); |
| 11111 | defer case_vals.deinit(gpa); | 11111 | defer case_vals.deinit(gpa); |
| 11112 | 11112 | ||
| 11113 | const NonError = struct { | 11113 | const NonError = struct { |
| ... | @@ -11490,7 +11490,7 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index, operand_is_r | ... | @@ -11490,7 +11490,7 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index, operand_is_r |
| 11490 | break :blk tag_capture_inst; | 11490 | break :blk tag_capture_inst; |
| 11491 | } else undefined; | 11491 | } else undefined; |
| 11492 | 11492 | ||
| 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); |
| 11494 | defer case_vals.deinit(gpa); | 11494 | defer case_vals.deinit(gpa); |
| 11495 | 11495 | ||
| 11496 | var single_absorbed_item: Zir.Inst.Ref = .none; | 11496 | 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 | ... | @@ -12144,8 +12144,8 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index, operand_is_r |
| 12144 | } | 12144 | } |
| 12145 | 12145 | ||
| 12146 | var extra_case_vals: struct { | 12146 | var extra_case_vals: struct { |
| 12147 | items: std.ArrayListUnmanaged(Air.Inst.Ref), | 12147 | items: std.ArrayList(Air.Inst.Ref), |
| 12148 | ranges: std.ArrayListUnmanaged([2]Air.Inst.Ref), | 12148 | ranges: std.ArrayList([2]Air.Inst.Ref), |
| 12149 | } = .{ .items = .empty, .ranges = .empty }; | 12149 | } = .{ .items = .empty, .ranges = .empty }; |
| 12150 | defer { | 12150 | defer { |
| 12151 | extra_case_vals.items.deinit(gpa); | 12151 | extra_case_vals.items.deinit(gpa); |
| ... | @@ -12337,7 +12337,7 @@ fn analyzeSwitchRuntimeBlock( | ... | @@ -12337,7 +12337,7 @@ fn analyzeSwitchRuntimeBlock( |
| 12337 | operand: Air.Inst.Ref, | 12337 | operand: Air.Inst.Ref, |
| 12338 | operand_ty: Type, | 12338 | operand_ty: Type, |
| 12339 | operand_src: LazySrcLoc, | 12339 | operand_src: LazySrcLoc, |
| 12340 | case_vals: std.ArrayListUnmanaged(Air.Inst.Ref), | 12340 | case_vals: std.ArrayList(Air.Inst.Ref), |
| 12341 | else_prong: SpecialProng, | 12341 | else_prong: SpecialProng, |
| 12342 | scalar_cases_len: usize, | 12342 | scalar_cases_len: usize, |
| 12343 | multi_cases_len: usize, | 12343 | multi_cases_len: usize, |
| ... | @@ -12369,10 +12369,10 @@ fn analyzeSwitchRuntimeBlock( | ... | @@ -12369,10 +12369,10 @@ fn analyzeSwitchRuntimeBlock( |
| 12369 | 12369 | ||
| 12370 | const estimated_cases_extra = (scalar_cases_len + multi_cases_len) * | 12370 | const estimated_cases_extra = (scalar_cases_len + multi_cases_len) * |
| 12371 | @typeInfo(Air.SwitchBr.Case).@"struct".fields.len + 2; | 12371 | @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); |
| 12373 | defer cases_extra.deinit(gpa); | 12373 | defer cases_extra.deinit(gpa); |
| 12374 | 12374 | ||
| 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); |
| 12376 | defer branch_hints.deinit(gpa); | 12376 | defer branch_hints.deinit(gpa); |
| 12377 | 12377 | ||
| 12378 | var case_block = child_block.makeSubBlock(); | 12378 | var case_block = child_block.makeSubBlock(); |
| ... | @@ -13022,7 +13022,7 @@ fn resolveSwitchComptimeLoop( | ... | @@ -13022,7 +13022,7 @@ fn resolveSwitchComptimeLoop( |
| 13022 | special_members_only: ?SpecialProng, | 13022 | special_members_only: ?SpecialProng, |
| 13023 | special_generic: SpecialProng, | 13023 | special_generic: SpecialProng, |
| 13024 | special_generic_is_under: bool, | 13024 | special_generic_is_under: bool, |
| 13025 | case_vals: std.ArrayListUnmanaged(Air.Inst.Ref), | 13025 | case_vals: std.ArrayList(Air.Inst.Ref), |
| 13026 | scalar_cases_len: u32, | 13026 | scalar_cases_len: u32, |
| 13027 | multi_cases_len: u32, | 13027 | multi_cases_len: u32, |
| 13028 | err_set: bool, | 13028 | err_set: bool, |
| ... | @@ -13094,7 +13094,7 @@ fn resolveSwitchComptime( | ... | @@ -13094,7 +13094,7 @@ fn resolveSwitchComptime( |
| 13094 | special_members_only: ?SpecialProng, | 13094 | special_members_only: ?SpecialProng, |
| 13095 | special_generic: SpecialProng, | 13095 | special_generic: SpecialProng, |
| 13096 | special_generic_is_under: bool, | 13096 | special_generic_is_under: bool, |
| 13097 | case_vals: std.ArrayListUnmanaged(Air.Inst.Ref), | 13097 | case_vals: std.ArrayList(Air.Inst.Ref), |
| 13098 | scalar_cases_len: u32, | 13098 | scalar_cases_len: u32, |
| 13099 | multi_cases_len: u32, | 13099 | multi_cases_len: u32, |
| 13100 | err_set: bool, | 13100 | err_set: bool, |
| ... | @@ -13350,7 +13350,7 @@ fn validateErrSetSwitch( | ... | @@ -13350,7 +13350,7 @@ fn validateErrSetSwitch( |
| 13350 | sema: *Sema, | 13350 | sema: *Sema, |
| 13351 | block: *Block, | 13351 | block: *Block, |
| 13352 | seen_errors: *SwitchErrorSet, | 13352 | seen_errors: *SwitchErrorSet, |
| 13353 | case_vals: *std.ArrayListUnmanaged(Air.Inst.Ref), | 13353 | case_vals: *std.ArrayList(Air.Inst.Ref), |
| 13354 | operand_ty: Type, | 13354 | operand_ty: Type, |
| 13355 | inst_data: @FieldType(Zir.Inst.Data, "pl_node"), | 13355 | inst_data: @FieldType(Zir.Inst.Data, "pl_node"), |
| 13356 | scalar_cases_len: u32, | 13356 | scalar_cases_len: u32, |
| ... | @@ -35678,8 +35678,8 @@ fn unionFields( | ... | @@ -35678,8 +35678,8 @@ fn unionFields( |
| 35678 | enum_field_names = try sema.arena.alloc(InternPool.NullTerminatedString, fields_len); | 35678 | enum_field_names = try sema.arena.alloc(InternPool.NullTerminatedString, fields_len); |
| 35679 | } | 35679 | } |
| 35680 | 35680 | ||
| 35681 | var field_types: std.ArrayListUnmanaged(InternPool.Index) = .empty; | 35681 | var field_types: std.ArrayList(InternPool.Index) = .empty; |
| 35682 | var field_aligns: std.ArrayListUnmanaged(InternPool.Alignment) = .empty; | 35682 | var field_aligns: std.ArrayList(InternPool.Alignment) = .empty; |
| 35683 | 35683 | ||
| 35684 | try field_types.ensureTotalCapacityPrecise(sema.arena, fields_len); | 35684 | try field_types.ensureTotalCapacityPrecise(sema.arena, fields_len); |
| 35685 | if (small.any_aligned_fields) | 35685 | if (small.any_aligned_fields) |
| ... | @@ -37056,7 +37056,7 @@ fn notePathToComptimeAllocPtr( | ... | @@ -37056,7 +37056,7 @@ fn notePathToComptimeAllocPtr( |
| 37056 | const zcu = pt.zcu; | 37056 | const zcu = pt.zcu; |
| 37057 | const ip = &zcu.intern_pool; | 37057 | const ip = &zcu.intern_pool; |
| 37058 | 37058 | ||
| 37059 | var first_path: std.ArrayListUnmanaged(u8) = .empty; | 37059 | var first_path: std.ArrayList(u8) = .empty; |
| 37060 | if (intermediate_value_count == 0) { | 37060 | if (intermediate_value_count == 0) { |
| 37061 | try first_path.print(arena, "{f}", .{start_value_name.fmt(ip)}); | 37061 | try first_path.print(arena, "{f}", .{start_value_name.fmt(ip)}); |
| 37062 | } else { | 37062 | } else { |
| ... | @@ -37127,7 +37127,7 @@ fn notePathToComptimeAllocPtr( | ... | @@ -37127,7 +37127,7 @@ fn notePathToComptimeAllocPtr( |
| 37127 | } | 37127 | } |
| 37128 | } | 37128 | } |
| 37129 | 37129 | ||
| 37130 | fn notePathToComptimeAllocPtrInner(sema: *Sema, val: Value, path: *std.ArrayListUnmanaged(u8)) Allocator.Error!Value { | 37130 | fn notePathToComptimeAllocPtrInner(sema: *Sema, val: Value, path: *std.ArrayList(u8)) Allocator.Error!Value { |
| 37131 | const pt = sema.pt; | 37131 | const pt = sema.pt; |
| 37132 | const zcu = pt.zcu; | 37132 | const zcu = pt.zcu; |
| 37133 | const ip = &zcu.intern_pool; | 37133 | const ip = &zcu.intern_pool; |
src/Zcu.zig+20-20| ... | @@ -87,10 +87,10 @@ local_zir_cache: Cache.Directory, | ... | @@ -87,10 +87,10 @@ local_zir_cache: Cache.Directory, |
| 87 | 87 | ||
| 88 | /// This is where all `Export` values are stored. Not all values here are necessarily valid exports; | 88 | /// This is where all `Export` values are stored. Not all values here are necessarily valid exports; |
| 89 | /// to enumerate all exports, `single_exports` and `multi_exports` must be consulted. | 89 | /// to enumerate all exports, `single_exports` and `multi_exports` must be consulted. |
| 90 | all_exports: std.ArrayListUnmanaged(Export) = .empty, | 90 | all_exports: std.ArrayList(Export) = .empty, |
| 91 | /// This is a list of free indices in `all_exports`. These indices may be reused by exports from | 91 | /// This is a list of free indices in `all_exports`. These indices may be reused by exports from |
| 92 | /// future semantic analysis. | 92 | /// future semantic analysis. |
| 93 | free_exports: std.ArrayListUnmanaged(Export.Index) = .empty, | 93 | free_exports: std.ArrayList(Export.Index) = .empty, |
| 94 | /// Maps from an `AnalUnit` which performs a single export, to the index into `all_exports` of | 94 | /// Maps from an `AnalUnit` which performs a single export, to the index into `all_exports` of |
| 95 | /// the export it performs. Note that the key is not the `Decl` being exported, but the `AnalUnit` | 95 | /// the export it performs. Note that the key is not the `Decl` being exported, but the `AnalUnit` |
| 96 | /// whose analysis triggered the export. | 96 | /// whose analysis triggered the export. |
| ... | @@ -201,8 +201,8 @@ compile_logs: std.AutoArrayHashMapUnmanaged(AnalUnit, extern struct { | ... | @@ -201,8 +201,8 @@ compile_logs: std.AutoArrayHashMapUnmanaged(AnalUnit, extern struct { |
| 201 | }; | 201 | }; |
| 202 | } | 202 | } |
| 203 | }) = .empty, | 203 | }) = .empty, |
| 204 | compile_log_lines: std.ArrayListUnmanaged(CompileLogLine) = .empty, | 204 | compile_log_lines: std.ArrayList(CompileLogLine) = .empty, |
| 205 | free_compile_log_lines: std.ArrayListUnmanaged(CompileLogLine.Index) = .empty, | 205 | free_compile_log_lines: std.ArrayList(CompileLogLine.Index) = .empty, |
| 206 | /// This tracks files which triggered errors when generating AST/ZIR/ZOIR. | 206 | /// This tracks files which triggered errors when generating AST/ZIR/ZOIR. |
| 207 | /// If not `null`, the value is a retryable error (the file status is guaranteed | 207 | /// If not `null`, the value is a retryable error (the file status is guaranteed |
| 208 | /// to be `.retryable_failure`). Otherwise, the file status is `.astgen_failure` | 208 | /// to be `.retryable_failure`). Otherwise, the file status is `.astgen_failure` |
| ... | @@ -232,7 +232,7 @@ failed_files: std.AutoArrayHashMapUnmanaged(File.Index, ?[]u8) = .empty, | ... | @@ -232,7 +232,7 @@ failed_files: std.AutoArrayHashMapUnmanaged(File.Index, ?[]u8) = .empty, |
| 232 | /// semantic analysis this update. | 232 | /// semantic analysis this update. |
| 233 | /// | 233 | /// |
| 234 | /// Allocated into gpa. | 234 | /// Allocated into gpa. |
| 235 | failed_imports: std.ArrayListUnmanaged(struct { | 235 | failed_imports: std.ArrayList(struct { |
| 236 | file_index: File.Index, | 236 | file_index: File.Index, |
| 237 | import_string: Zir.NullTerminatedString, | 237 | import_string: Zir.NullTerminatedString, |
| 238 | import_token: Ast.TokenIndex, | 238 | import_token: Ast.TokenIndex, |
| ... | @@ -261,7 +261,7 @@ outdated_ready: std.AutoArrayHashMapUnmanaged(AnalUnit, void) = .empty, | ... | @@ -261,7 +261,7 @@ outdated_ready: std.AutoArrayHashMapUnmanaged(AnalUnit, void) = .empty, |
| 261 | /// failure was something like running out of disk space, and trying again may | 261 | /// failure was something like running out of disk space, and trying again may |
| 262 | /// succeed. On the next update, we will flush this list, marking all members of | 262 | /// succeed. On the next update, we will flush this list, marking all members of |
| 263 | /// it as outdated. | 263 | /// it as outdated. |
| 264 | retryable_failures: std.ArrayListUnmanaged(AnalUnit) = .empty, | 264 | retryable_failures: std.ArrayList(AnalUnit) = .empty, |
| 265 | 265 | ||
| 266 | func_body_analysis_queued: std.AutoArrayHashMapUnmanaged(InternPool.Index, void) = .empty, | 266 | func_body_analysis_queued: std.AutoArrayHashMapUnmanaged(InternPool.Index, void) = .empty, |
| 267 | nav_val_analysis_queued: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty, | 267 | nav_val_analysis_queued: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty, |
| ... | @@ -290,12 +290,12 @@ global_assembly: std.AutoArrayHashMapUnmanaged(AnalUnit, []u8) = .empty, | ... | @@ -290,12 +290,12 @@ global_assembly: std.AutoArrayHashMapUnmanaged(AnalUnit, []u8) = .empty, |
| 290 | /// The `next` field on the `Reference` forms a linked list of all references | 290 | /// The `next` field on the `Reference` forms a linked list of all references |
| 291 | /// triggered by the key `AnalUnit`. | 291 | /// triggered by the key `AnalUnit`. |
| 292 | reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty, | 292 | reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty, |
| 293 | all_references: std.ArrayListUnmanaged(Reference) = .empty, | 293 | all_references: std.ArrayList(Reference) = .empty, |
| 294 | /// Freelist of indices in `all_references`. | 294 | /// Freelist of indices in `all_references`. |
| 295 | free_references: std.ArrayListUnmanaged(u32) = .empty, | 295 | free_references: std.ArrayList(u32) = .empty, |
| 296 | 296 | ||
| 297 | inline_reference_frames: std.ArrayListUnmanaged(InlineReferenceFrame) = .empty, | 297 | inline_reference_frames: std.ArrayList(InlineReferenceFrame) = .empty, |
| 298 | free_inline_reference_frames: std.ArrayListUnmanaged(InlineReferenceFrame.Index) = .empty, | 298 | free_inline_reference_frames: std.ArrayList(InlineReferenceFrame.Index) = .empty, |
| 299 | 299 | ||
| 300 | /// Key is the `AnalUnit` *performing* the reference. This representation allows | 300 | /// Key is the `AnalUnit` *performing* the reference. This representation allows |
| 301 | /// incremental updates to quickly delete references caused by a specific `AnalUnit`. | 301 | /// incremental updates to quickly delete references caused by a specific `AnalUnit`. |
| ... | @@ -303,9 +303,9 @@ free_inline_reference_frames: std.ArrayListUnmanaged(InlineReferenceFrame.Index) | ... | @@ -303,9 +303,9 @@ free_inline_reference_frames: std.ArrayListUnmanaged(InlineReferenceFrame.Index) |
| 303 | /// The `next` field on the `TypeReference` forms a linked list of all type references | 303 | /// The `next` field on the `TypeReference` forms a linked list of all type references |
| 304 | /// triggered by the key `AnalUnit`. | 304 | /// triggered by the key `AnalUnit`. |
| 305 | type_reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty, | 305 | type_reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty, |
| 306 | all_type_references: std.ArrayListUnmanaged(TypeReference) = .empty, | 306 | all_type_references: std.ArrayList(TypeReference) = .empty, |
| 307 | /// Freelist of indices in `all_type_references`. | 307 | /// Freelist of indices in `all_type_references`. |
| 308 | free_type_references: std.ArrayListUnmanaged(u32) = .empty, | 308 | free_type_references: std.ArrayList(u32) = .empty, |
| 309 | 309 | ||
| 310 | /// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element. | 310 | /// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element. |
| 311 | builtin_decl_values: BuiltinDecl.Memoized = .initFill(.none), | 311 | builtin_decl_values: BuiltinDecl.Memoized = .initFill(.none), |
| ... | @@ -346,7 +346,7 @@ pub const IncrementalDebugState = struct { | ... | @@ -346,7 +346,7 @@ pub const IncrementalDebugState = struct { |
| 346 | pub const UnitInfo = struct { | 346 | pub const UnitInfo = struct { |
| 347 | last_update_gen: u32, | 347 | last_update_gen: u32, |
| 348 | /// This information isn't easily recoverable from `InternPool`'s dependency storage format. | 348 | /// This information isn't easily recoverable from `InternPool`'s dependency storage format. |
| 349 | deps: std.ArrayListUnmanaged(InternPool.Dependee), | 349 | deps: std.ArrayList(InternPool.Dependee), |
| 350 | }; | 350 | }; |
| 351 | pub fn getUnitInfo(ids: *IncrementalDebugState, gpa: Allocator, unit: AnalUnit) Allocator.Error!*UnitInfo { | 351 | pub fn getUnitInfo(ids: *IncrementalDebugState, gpa: Allocator, unit: AnalUnit) Allocator.Error!*UnitInfo { |
| 352 | const gop = try ids.units.getOrPut(gpa, unit); | 352 | const gop = try ids.units.getOrPut(gpa, unit); |
| ... | @@ -812,10 +812,10 @@ pub const Namespace = struct { | ... | @@ -812,10 +812,10 @@ pub const Namespace = struct { |
| 812 | priv_decls: std.ArrayHashMapUnmanaged(InternPool.Nav.Index, void, NavNameContext, true) = .empty, | 812 | priv_decls: std.ArrayHashMapUnmanaged(InternPool.Nav.Index, void, NavNameContext, true) = .empty, |
| 813 | /// All `comptime` declarations in this namespace. We store these purely so that incremental | 813 | /// All `comptime` declarations in this namespace. We store these purely so that incremental |
| 814 | /// compilation can re-use the existing `ComptimeUnit`s when a namespace changes. | 814 | /// 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, |
| 816 | /// All `test` declarations in this namespace. We store these purely so that incremental | 816 | /// All `test` declarations in this namespace. We store these purely so that incremental |
| 817 | /// compilation can re-use the existing `Nav`s when a namespace changes. | 817 | /// 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, |
| 819 | 819 | ||
| 820 | pub const Index = InternPool.NamespaceIndex; | 820 | pub const Index = InternPool.NamespaceIndex; |
| 821 | pub const OptionalIndex = InternPool.OptionalNamespaceIndex; | 821 | pub const OptionalIndex = InternPool.OptionalNamespaceIndex; |
| ... | @@ -3292,7 +3292,7 @@ pub fn mapOldZirToNew( | ... | @@ -3292,7 +3292,7 @@ pub fn mapOldZirToNew( |
| 3292 | old_inst: Zir.Inst.Index, | 3292 | old_inst: Zir.Inst.Index, |
| 3293 | new_inst: Zir.Inst.Index, | 3293 | new_inst: Zir.Inst.Index, |
| 3294 | }; | 3294 | }; |
| 3295 | var match_stack: std.ArrayListUnmanaged(MatchedZirDecl) = .empty; | 3295 | var match_stack: std.ArrayList(MatchedZirDecl) = .empty; |
| 3296 | defer match_stack.deinit(gpa); | 3296 | defer match_stack.deinit(gpa); |
| 3297 | 3297 | ||
| 3298 | // Used as temporary buffers for namespace declaration instructions | 3298 | // Used as temporary buffers for namespace declaration instructions |
| ... | @@ -3358,10 +3358,10 @@ pub fn mapOldZirToNew( | ... | @@ -3358,10 +3358,10 @@ pub fn mapOldZirToNew( |
| 3358 | var named_decltests: std.StringHashMapUnmanaged(Zir.Inst.Index) = .empty; | 3358 | var named_decltests: std.StringHashMapUnmanaged(Zir.Inst.Index) = .empty; |
| 3359 | defer named_decltests.deinit(gpa); | 3359 | defer named_decltests.deinit(gpa); |
| 3360 | // All unnamed tests, in order, for a best-effort match. | 3360 | // 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; |
| 3362 | defer unnamed_tests.deinit(gpa); | 3362 | defer unnamed_tests.deinit(gpa); |
| 3363 | // All comptime declarations, in order, for a best-effort match. | 3363 | // 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; |
| 3365 | defer comptime_decls.deinit(gpa); | 3365 | defer comptime_decls.deinit(gpa); |
| 3366 | 3366 | ||
| 3367 | { | 3367 | { |
| ... | @@ -4636,7 +4636,7 @@ pub fn addFileInMultipleModulesError( | ... | @@ -4636,7 +4636,7 @@ pub fn addFileInMultipleModulesError( |
| 4636 | info.modules[1].fully_qualified_name, | 4636 | info.modules[1].fully_qualified_name, |
| 4637 | }); | 4637 | }); |
| 4638 | 4638 | ||
| 4639 | var notes: std.ArrayListUnmanaged(std.zig.ErrorBundle.MessageIndex) = .empty; | 4639 | var notes: std.ArrayList(std.zig.ErrorBundle.MessageIndex) = .empty; |
| 4640 | defer notes.deinit(gpa); | 4640 | defer notes.deinit(gpa); |
| 4641 | 4641 | ||
| 4642 | try notes.append(gpa, try eb.addErrorMessage(.{ | 4642 | try notes.append(gpa, try eb.addErrorMessage(.{ |
| ... | @@ -4660,7 +4660,7 @@ pub fn addFileInMultipleModulesError( | ... | @@ -4660,7 +4660,7 @@ pub fn addFileInMultipleModulesError( |
| 4660 | fn explainWhyFileIsInModule( | 4660 | fn explainWhyFileIsInModule( |
| 4661 | zcu: *Zcu, | 4661 | zcu: *Zcu, |
| 4662 | eb: *std.zig.ErrorBundle.Wip, | 4662 | eb: *std.zig.ErrorBundle.Wip, |
| 4663 | notes_out: *std.ArrayListUnmanaged(std.zig.ErrorBundle.MessageIndex), | 4663 | notes_out: *std.ArrayList(std.zig.ErrorBundle.MessageIndex), |
| 4664 | file: File.Index, | 4664 | file: File.Index, |
| 4665 | in_module: *Package.Module, | 4665 | in_module: *Package.Module, |
| 4666 | ref: File.Reference, | 4666 | ref: File.Reference, |
src/Zcu/PerThread.zig+2-2| ... | @@ -3091,8 +3091,8 @@ pub fn processExports(pt: Zcu.PerThread) !void { | ... | @@ -3091,8 +3091,8 @@ pub fn processExports(pt: Zcu.PerThread) !void { |
| 3091 | } | 3091 | } |
| 3092 | 3092 | ||
| 3093 | // First, construct a mapping of every exported value and Nav to the indices of all its different exports. | 3093 | // 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; | 3094 | var nav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, std.ArrayList(Zcu.Export.Index)) = .empty; |
| 3095 | var uav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Index, std.ArrayListUnmanaged(Zcu.Export.Index)) = .empty; | 3095 | var uav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Index, std.ArrayList(Zcu.Export.Index)) = .empty; |
| 3096 | defer { | 3096 | defer { |
| 3097 | for (nav_exports.values()) |*exports| { | 3097 | for (nav_exports.values()) |*exports| { |
| 3098 | exports.deinit(gpa); | 3098 | exports.deinit(gpa); |
src/codegen/aarch64/Select.zig+12-12| ... | @@ -7,24 +7,24 @@ nav_index: InternPool.Nav.Index, | ... | @@ -7,24 +7,24 @@ nav_index: InternPool.Nav.Index, |
| 7 | def_order: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, void), | 7 | def_order: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, void), |
| 8 | blocks: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Block), | 8 | blocks: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Block), |
| 9 | loops: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Loop), | 9 | loops: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Loop), |
| 10 | active_loops: std.ArrayListUnmanaged(Loop.Index), | 10 | active_loops: std.ArrayList(Loop.Index), |
| 11 | loop_live: struct { | 11 | loop_live: struct { |
| 12 | set: std.AutoArrayHashMapUnmanaged(struct { Loop.Index, Air.Inst.Index }, void), | 12 | set: std.AutoArrayHashMapUnmanaged(struct { Loop.Index, Air.Inst.Index }, void), |
| 13 | list: std.ArrayListUnmanaged(Air.Inst.Index), | 13 | list: std.ArrayList(Air.Inst.Index), |
| 14 | }, | 14 | }, |
| 15 | dom_start: u32, | 15 | dom_start: u32, |
| 16 | dom_len: u32, | 16 | dom_len: u32, |
| 17 | dom: std.ArrayListUnmanaged(DomInt), | 17 | dom: std.ArrayList(DomInt), |
| 18 | 18 | ||
| 19 | // Wip Mir | 19 | // Wip Mir |
| 20 | saved_registers: std.enums.EnumSet(Register.Alias), | 20 | saved_registers: std.enums.EnumSet(Register.Alias), |
| 21 | instructions: std.ArrayListUnmanaged(codegen.aarch64.encoding.Instruction), | 21 | instructions: std.ArrayList(codegen.aarch64.encoding.Instruction), |
| 22 | literals: std.ArrayListUnmanaged(u32), | 22 | literals: std.ArrayList(u32), |
| 23 | nav_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Nav), | 23 | nav_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Nav), |
| 24 | uav_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Uav), | 24 | uav_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Uav), |
| 25 | lazy_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Lazy), | 25 | lazy_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Lazy), |
| 26 | global_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Global), | 26 | global_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Global), |
| 27 | literal_relocs: std.ArrayListUnmanaged(codegen.aarch64.Mir.Reloc.Literal), | 27 | literal_relocs: std.ArrayList(codegen.aarch64.Mir.Reloc.Literal), |
| 28 | 28 | ||
| 29 | // Stack Frame | 29 | // Stack Frame |
| 30 | returns: bool, | 30 | returns: bool, |
| ... | @@ -44,7 +44,7 @@ stack_align: InternPool.Alignment, | ... | @@ -44,7 +44,7 @@ stack_align: InternPool.Alignment, |
| 44 | // Value Tracking | 44 | // Value Tracking |
| 45 | live_registers: LiveRegisters, | 45 | live_registers: LiveRegisters, |
| 46 | live_values: std.AutoHashMapUnmanaged(Air.Inst.Index, Value.Index), | 46 | live_values: std.AutoHashMapUnmanaged(Air.Inst.Index, Value.Index), |
| 47 | values: std.ArrayListUnmanaged(Value), | 47 | values: std.ArrayList(Value), |
| 48 | 48 | ||
| 49 | pub const LiveRegisters = std.enums.EnumArray(Register.Alias, Value.Index); | 49 | pub const LiveRegisters = std.enums.EnumArray(Register.Alias, Value.Index); |
| 50 | 50 | ||
| ... | @@ -11274,7 +11274,7 @@ pub fn dumpValues(isel: *Select, which: enum { only_referenced, all }) void { | ... | @@ -11274,7 +11274,7 @@ pub fn dumpValues(isel: *Select, which: enum { only_referenced, all }) void { |
| 11274 | const ip = &zcu.intern_pool; | 11274 | const ip = &zcu.intern_pool; |
| 11275 | const nav = ip.getNav(isel.nav_index); | 11275 | const nav = ip.getNav(isel.nav_index); |
| 11276 | 11276 | ||
| 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; |
| 11278 | defer { | 11278 | defer { |
| 11279 | for (reverse_live_values.values()) |*list| list.deinit(gpa); | 11279 | for (reverse_live_values.values()) |*list| list.deinit(gpa); |
| 11280 | reverse_live_values.deinit(gpa); | 11280 | reverse_live_values.deinit(gpa); |
src/codegen/c.zig+2-2| ... | @@ -431,7 +431,7 @@ pub const Function = struct { | ... | @@ -431,7 +431,7 @@ pub const Function = struct { |
| 431 | lazy_fns: LazyFnMap, | 431 | lazy_fns: LazyFnMap, |
| 432 | func_index: InternPool.Index, | 432 | func_index: InternPool.Index, |
| 433 | /// All the locals, to be emitted at the top of the function. | 433 | /// All the locals, to be emitted at the top of the function. |
| 434 | locals: std.ArrayListUnmanaged(Local) = .empty, | 434 | locals: std.ArrayList(Local) = .empty, |
| 435 | /// Which locals are available for reuse, based on Type. | 435 | /// Which locals are available for reuse, based on Type. |
| 436 | free_locals_map: LocalsMap = .{}, | 436 | free_locals_map: LocalsMap = .{}, |
| 437 | /// Locals which will not be freed by Liveness. This is used after a | 437 | /// Locals which will not be freed by Liveness. This is used after a |
| ... | @@ -752,7 +752,7 @@ pub const DeclGen = struct { | ... | @@ -752,7 +752,7 @@ pub const DeclGen = struct { |
| 752 | fwd_decl: Writer.Allocating, | 752 | fwd_decl: Writer.Allocating, |
| 753 | error_msg: ?*Zcu.ErrorMsg, | 753 | error_msg: ?*Zcu.ErrorMsg, |
| 754 | ctype_pool: CType.Pool, | 754 | ctype_pool: CType.Pool, |
| 755 | scratch: std.ArrayListUnmanaged(u32), | 755 | scratch: std.ArrayList(u32), |
| 756 | /// This map contains all the UAVs we saw generating this function. | 756 | /// This map contains all the UAVs we saw generating this function. |
| 757 | /// `link.C` will merge them into its `uavs`/`aligned_uavs` fields. | 757 | /// `link.C` will merge them into its `uavs`/`aligned_uavs` fields. |
| 758 | /// Key is the value of the UAV; value is the UAV's alignment, or | 758 | /// 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) { | ... | @@ -971,11 +971,11 @@ pub const Info = union(enum) { |
| 971 | pub const Pool = struct { | 971 | pub const Pool = struct { |
| 972 | map: Map, | 972 | map: Map, |
| 973 | items: std.MultiArrayList(Item), | 973 | items: std.MultiArrayList(Item), |
| 974 | extra: std.ArrayListUnmanaged(u32), | 974 | extra: std.ArrayList(u32), |
| 975 | 975 | ||
| 976 | string_map: Map, | 976 | string_map: Map, |
| 977 | string_indices: std.ArrayListUnmanaged(u32), | 977 | string_indices: std.ArrayList(u32), |
| 978 | string_bytes: std.ArrayListUnmanaged(u8), | 978 | string_bytes: std.ArrayList(u8), |
| 979 | 979 | ||
| 980 | const Map = std.AutoArrayHashMapUnmanaged(void, void); | 980 | const Map = std.AutoArrayHashMapUnmanaged(void, void); |
| 981 | 981 | ||
| ... | @@ -1396,7 +1396,7 @@ pub const Pool = struct { | ... | @@ -1396,7 +1396,7 @@ pub const Pool = struct { |
| 1396 | pub fn fromType( | 1396 | pub fn fromType( |
| 1397 | pool: *Pool, | 1397 | pool: *Pool, |
| 1398 | allocator: std.mem.Allocator, | 1398 | allocator: std.mem.Allocator, |
| 1399 | scratch: *std.ArrayListUnmanaged(u32), | 1399 | scratch: *std.ArrayList(u32), |
| 1400 | ty: Type, | 1400 | ty: Type, |
| 1401 | pt: Zcu.PerThread, | 1401 | pt: Zcu.PerThread, |
| 1402 | mod: *Module, | 1402 | mod: *Module, |
| ... | @@ -3271,7 +3271,7 @@ pub const Pool = struct { | ... | @@ -3271,7 +3271,7 @@ pub const Pool = struct { |
| 3271 | addExtraAssumeCapacityTo(&pool.extra, Extra, extra); | 3271 | addExtraAssumeCapacityTo(&pool.extra, Extra, extra); |
| 3272 | } | 3272 | } |
| 3273 | fn addExtraAssumeCapacityTo( | 3273 | fn addExtraAssumeCapacityTo( |
| 3274 | array: *std.ArrayListUnmanaged(u32), | 3274 | array: *std.ArrayList(u32), |
| 3275 | comptime Extra: type, | 3275 | comptime Extra: type, |
| 3276 | extra: Extra, | 3276 | extra: Extra, |
| 3277 | ) void { | 3277 | ) void { |
| ... | @@ -3309,7 +3309,7 @@ pub const Pool = struct { | ... | @@ -3309,7 +3309,7 @@ pub const Pool = struct { |
| 3309 | } | 3309 | } |
| 3310 | fn addHashedExtraAssumeCapacityTo( | 3310 | fn addHashedExtraAssumeCapacityTo( |
| 3311 | pool: *Pool, | 3311 | pool: *Pool, |
| 3312 | array: *std.ArrayListUnmanaged(u32), | 3312 | array: *std.ArrayList(u32), |
| 3313 | hasher: *Hasher, | 3313 | hasher: *Hasher, |
| 3314 | comptime Extra: type, | 3314 | comptime Extra: type, |
| 3315 | extra: Extra, | 3315 | extra: Extra, |
src/codegen/llvm.zig+13-13| ... | @@ -523,8 +523,8 @@ pub const Object = struct { | ... | @@ -523,8 +523,8 @@ pub const Object = struct { |
| 523 | debug_enums_fwd_ref: Builder.Metadata.Optional, | 523 | debug_enums_fwd_ref: Builder.Metadata.Optional, |
| 524 | debug_globals_fwd_ref: Builder.Metadata.Optional, | 524 | debug_globals_fwd_ref: Builder.Metadata.Optional, |
| 525 | 525 | ||
| 526 | debug_enums: std.ArrayListUnmanaged(Builder.Metadata), | 526 | debug_enums: std.ArrayList(Builder.Metadata), |
| 527 | debug_globals: std.ArrayListUnmanaged(Builder.Metadata), | 527 | debug_globals: std.ArrayList(Builder.Metadata), |
| 528 | 528 | ||
| 529 | debug_file_map: std.AutoHashMapUnmanaged(Zcu.File.Index, Builder.Metadata), | 529 | debug_file_map: std.AutoHashMapUnmanaged(Zcu.File.Index, Builder.Metadata), |
| 530 | debug_type_map: std.AutoHashMapUnmanaged(InternPool.Index, Builder.Metadata), | 530 | debug_type_map: std.AutoHashMapUnmanaged(InternPool.Index, Builder.Metadata), |
| ... | @@ -571,7 +571,7 @@ pub const Object = struct { | ... | @@ -571,7 +571,7 @@ pub const Object = struct { |
| 571 | struct_field_map: std.AutoHashMapUnmanaged(ZigStructField, c_uint), | 571 | struct_field_map: std.AutoHashMapUnmanaged(ZigStructField, c_uint), |
| 572 | 572 | ||
| 573 | /// Values for `@llvm.used`. | 573 | /// Values for `@llvm.used`. |
| 574 | used: std.ArrayListUnmanaged(Builder.Constant), | 574 | used: std.ArrayList(Builder.Constant), |
| 575 | 575 | ||
| 576 | const ZigStructField = struct { | 576 | const ZigStructField = struct { |
| 577 | struct_ty: InternPool.Index, | 577 | struct_ty: InternPool.Index, |
| ... | @@ -1298,7 +1298,7 @@ pub const Object = struct { | ... | @@ -1298,7 +1298,7 @@ pub const Object = struct { |
| 1298 | // instructions. Depending on the calling convention, this list is not necessarily | 1298 | // instructions. Depending on the calling convention, this list is not necessarily |
| 1299 | // a bijection with the actual LLVM parameters of the function. | 1299 | // a bijection with the actual LLVM parameters of the function. |
| 1300 | const gpa = o.gpa; | 1300 | const gpa = o.gpa; |
| 1301 | var args: std.ArrayListUnmanaged(Builder.Value) = .empty; | 1301 | var args: std.ArrayList(Builder.Value) = .empty; |
| 1302 | defer args.deinit(gpa); | 1302 | defer args.deinit(gpa); |
| 1303 | 1303 | ||
| 1304 | { | 1304 | { |
| ... | @@ -2318,7 +2318,7 @@ pub const Object = struct { | ... | @@ -2318,7 +2318,7 @@ pub const Object = struct { |
| 2318 | 2318 | ||
| 2319 | switch (ip.indexToKey(ty.toIntern())) { | 2319 | switch (ip.indexToKey(ty.toIntern())) { |
| 2320 | .tuple_type => |tuple| { | 2320 | .tuple_type => |tuple| { |
| 2321 | var fields: std.ArrayListUnmanaged(Builder.Metadata) = .empty; | 2321 | var fields: std.ArrayList(Builder.Metadata) = .empty; |
| 2322 | defer fields.deinit(gpa); | 2322 | defer fields.deinit(gpa); |
| 2323 | 2323 | ||
| 2324 | try fields.ensureUnusedCapacity(gpa, tuple.types.len); | 2324 | try fields.ensureUnusedCapacity(gpa, tuple.types.len); |
| ... | @@ -2392,7 +2392,7 @@ pub const Object = struct { | ... | @@ -2392,7 +2392,7 @@ pub const Object = struct { |
| 2392 | 2392 | ||
| 2393 | const struct_type = zcu.typeToStruct(ty).?; | 2393 | const struct_type = zcu.typeToStruct(ty).?; |
| 2394 | 2394 | ||
| 2395 | var fields: std.ArrayListUnmanaged(Builder.Metadata) = .empty; | 2395 | var fields: std.ArrayList(Builder.Metadata) = .empty; |
| 2396 | defer fields.deinit(gpa); | 2396 | defer fields.deinit(gpa); |
| 2397 | 2397 | ||
| 2398 | try fields.ensureUnusedCapacity(gpa, struct_type.field_types.len); | 2398 | try fields.ensureUnusedCapacity(gpa, struct_type.field_types.len); |
| ... | @@ -2484,7 +2484,7 @@ pub const Object = struct { | ... | @@ -2484,7 +2484,7 @@ pub const Object = struct { |
| 2484 | return debug_union_type; | 2484 | return debug_union_type; |
| 2485 | } | 2485 | } |
| 2486 | 2486 | ||
| 2487 | var fields: std.ArrayListUnmanaged(Builder.Metadata) = .empty; | 2487 | var fields: std.ArrayList(Builder.Metadata) = .empty; |
| 2488 | defer fields.deinit(gpa); | 2488 | defer fields.deinit(gpa); |
| 2489 | 2489 | ||
| 2490 | try fields.ensureUnusedCapacity(gpa, union_type.loadTagType(ip).names.len); | 2490 | try fields.ensureUnusedCapacity(gpa, union_type.loadTagType(ip).names.len); |
| ... | @@ -3273,7 +3273,7 @@ pub const Object = struct { | ... | @@ -3273,7 +3273,7 @@ pub const Object = struct { |
| 3273 | return int_ty; | 3273 | return int_ty; |
| 3274 | } | 3274 | } |
| 3275 | 3275 | ||
| 3276 | var llvm_field_types: std.ArrayListUnmanaged(Builder.Type) = .empty; | 3276 | var llvm_field_types: std.ArrayList(Builder.Type) = .empty; |
| 3277 | defer llvm_field_types.deinit(o.gpa); | 3277 | defer llvm_field_types.deinit(o.gpa); |
| 3278 | // Although we can estimate how much capacity to add, these cannot be | 3278 | // Although we can estimate how much capacity to add, these cannot be |
| 3279 | // relied upon because of the recursive calls to lowerType below. | 3279 | // relied upon because of the recursive calls to lowerType below. |
| ... | @@ -3342,7 +3342,7 @@ pub const Object = struct { | ... | @@ -3342,7 +3342,7 @@ pub const Object = struct { |
| 3342 | return ty; | 3342 | return ty; |
| 3343 | }, | 3343 | }, |
| 3344 | .tuple_type => |tuple_type| { | 3344 | .tuple_type => |tuple_type| { |
| 3345 | var llvm_field_types: std.ArrayListUnmanaged(Builder.Type) = .empty; | 3345 | var llvm_field_types: std.ArrayList(Builder.Type) = .empty; |
| 3346 | defer llvm_field_types.deinit(o.gpa); | 3346 | defer llvm_field_types.deinit(o.gpa); |
| 3347 | // Although we can estimate how much capacity to add, these cannot be | 3347 | // Although we can estimate how much capacity to add, these cannot be |
| 3348 | // relied upon because of the recursive calls to lowerType below. | 3348 | // relied upon because of the recursive calls to lowerType below. |
| ... | @@ -3531,7 +3531,7 @@ pub const Object = struct { | ... | @@ -3531,7 +3531,7 @@ pub const Object = struct { |
| 3531 | const target = zcu.getTarget(); | 3531 | const target = zcu.getTarget(); |
| 3532 | const ret_ty = try lowerFnRetTy(o, pt, fn_info); | 3532 | const ret_ty = try lowerFnRetTy(o, pt, fn_info); |
| 3533 | 3533 | ||
| 3534 | var llvm_params: std.ArrayListUnmanaged(Builder.Type) = .empty; | 3534 | var llvm_params: std.ArrayList(Builder.Type) = .empty; |
| 3535 | defer llvm_params.deinit(o.gpa); | 3535 | defer llvm_params.deinit(o.gpa); |
| 3536 | 3536 | ||
| 3537 | if (firstParamSRet(fn_info, zcu, target)) { | 3537 | if (firstParamSRet(fn_info, zcu, target)) { |
| ... | @@ -4741,7 +4741,7 @@ pub const FuncGen = struct { | ... | @@ -4741,7 +4741,7 @@ pub const FuncGen = struct { |
| 4741 | 4741 | ||
| 4742 | const Fuzz = struct { | 4742 | const Fuzz = struct { |
| 4743 | counters_variable: Builder.Variable.Index, | 4743 | counters_variable: Builder.Variable.Index, |
| 4744 | pcs: std.ArrayListUnmanaged(Builder.Constant), | 4744 | pcs: std.ArrayList(Builder.Constant), |
| 4745 | 4745 | ||
| 4746 | fn deinit(f: *Fuzz, gpa: Allocator) void { | 4746 | fn deinit(f: *Fuzz, gpa: Allocator) void { |
| 4747 | f.pcs.deinit(gpa); | 4747 | f.pcs.deinit(gpa); |
| ... | @@ -7251,7 +7251,7 @@ pub const FuncGen = struct { | ... | @@ -7251,7 +7251,7 @@ pub const FuncGen = struct { |
| 7251 | const inputs: []const Air.Inst.Ref = @ptrCast(self.air.extra.items[extra_i..][0..extra.data.inputs_len]); | 7251 | const inputs: []const Air.Inst.Ref = @ptrCast(self.air.extra.items[extra_i..][0..extra.data.inputs_len]); |
| 7252 | extra_i += inputs.len; | 7252 | extra_i += inputs.len; |
| 7253 | 7253 | ||
| 7254 | var llvm_constraints: std.ArrayListUnmanaged(u8) = .empty; | 7254 | var llvm_constraints: std.ArrayList(u8) = .empty; |
| 7255 | defer llvm_constraints.deinit(gpa); | 7255 | defer llvm_constraints.deinit(gpa); |
| 7256 | 7256 | ||
| 7257 | var arena_allocator = std.heap.ArenaAllocator.init(gpa); | 7257 | 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) | ... | @@ -13133,7 +13133,7 @@ fn maxIntConst(b: *Builder, max_ty: Type, as_ty: Builder.Type, zcu: *const Zcu) |
| 13133 | /// Appends zero or more LLVM constraints to `llvm_constraints`, returning how many were added. | 13133 | /// Appends zero or more LLVM constraints to `llvm_constraints`, returning how many were added. |
| 13134 | fn appendConstraints( | 13134 | fn appendConstraints( |
| 13135 | gpa: Allocator, | 13135 | gpa: Allocator, |
| 13136 | llvm_constraints: *std.ArrayListUnmanaged(u8), | 13136 | llvm_constraints: *std.ArrayList(u8), |
| 13137 | zig_name: []const u8, | 13137 | zig_name: []const u8, |
| 13138 | target: *const std.Target, | 13138 | target: *const std.Target, |
| 13139 | ) error{OutOfMemory}!usize { | 13139 | ) error{OutOfMemory}!usize { |
src/codegen/riscv64/CodeGen.zig+3-3| ... | @@ -90,7 +90,7 @@ scope_generation: u32, | ... | @@ -90,7 +90,7 @@ scope_generation: u32, |
| 90 | /// The value is an offset into the `Function` `code` from the beginning. | 90 | /// The value is an offset into the `Function` `code` from the beginning. |
| 91 | /// To perform the reloc, write 32-bit signed little-endian integer | 91 | /// To perform the reloc, write 32-bit signed little-endian integer |
| 92 | /// which is a relative jump, based on the address following the reloc. | 92 | /// which is a relative jump, based on the address following the reloc. |
| 93 | exitlude_jump_relocs: std.ArrayListUnmanaged(usize) = .empty, | 93 | exitlude_jump_relocs: std.ArrayList(usize) = .empty, |
| 94 | 94 | ||
| 95 | reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined, | 95 | reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined, |
| 96 | 96 | ||
| ... | @@ -609,7 +609,7 @@ const FrameAlloc = struct { | ... | @@ -609,7 +609,7 @@ const FrameAlloc = struct { |
| 609 | }; | 609 | }; |
| 610 | 610 | ||
| 611 | const BlockData = struct { | 611 | const BlockData = struct { |
| 612 | relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty, | 612 | relocs: std.ArrayList(Mir.Inst.Index) = .empty, |
| 613 | state: State, | 613 | state: State, |
| 614 | 614 | ||
| 615 | fn deinit(bd: *BlockData, gpa: Allocator) void { | 615 | fn deinit(bd: *BlockData, gpa: Allocator) void { |
| ... | @@ -6200,7 +6200,7 @@ fn airAsm(func: *Func, inst: Air.Inst.Index) !void { | ... | @@ -6200,7 +6200,7 @@ fn airAsm(func: *Func, inst: Air.Inst.Index) !void { |
| 6200 | 6200 | ||
| 6201 | const Label = struct { | 6201 | const Label = struct { |
| 6202 | target: Mir.Inst.Index = undefined, | 6202 | target: Mir.Inst.Index = undefined, |
| 6203 | pending_relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty, | 6203 | pending_relocs: std.ArrayList(Mir.Inst.Index) = .empty, |
| 6204 | 6204 | ||
| 6205 | const Kind = enum { definition, reference }; | 6205 | const Kind = enum { definition, reference }; |
| 6206 | 6206 |
src/codegen/riscv64/Emit.zig+1-1| ... | @@ -11,7 +11,7 @@ prev_di_column: u32, | ... | @@ -11,7 +11,7 @@ prev_di_column: u32, |
| 11 | prev_di_pc: usize, | 11 | prev_di_pc: usize, |
| 12 | 12 | ||
| 13 | code_offset_mapping: std.AutoHashMapUnmanaged(Mir.Inst.Index, usize) = .empty, | 13 | code_offset_mapping: std.AutoHashMapUnmanaged(Mir.Inst.Index, usize) = .empty, |
| 14 | relocs: std.ArrayListUnmanaged(Reloc) = .empty, | 14 | relocs: std.ArrayList(Reloc) = .empty, |
| 15 | 15 | ||
| 16 | pub const Error = Lower.Error || std.Io.Writer.Error || error{ | 16 | pub const Error = Lower.Error || std.Io.Writer.Error || error{ |
| 17 | EmitFail, | 17 | EmitFail, |
src/codegen/sparc64/CodeGen.zig+3-3| ... | @@ -68,7 +68,7 @@ stack_align: Alignment, | ... | @@ -68,7 +68,7 @@ stack_align: Alignment, |
| 68 | /// MIR Instructions | 68 | /// MIR Instructions |
| 69 | mir_instructions: std.MultiArrayList(Mir.Inst) = .{}, | 69 | mir_instructions: std.MultiArrayList(Mir.Inst) = .{}, |
| 70 | /// MIR extra data | 70 | /// MIR extra data |
| 71 | mir_extra: std.ArrayListUnmanaged(u32) = .empty, | 71 | mir_extra: std.ArrayList(u32) = .empty, |
| 72 | 72 | ||
| 73 | /// Byte offset within the source file of the ending curly. | 73 | /// Byte offset within the source file of the ending curly. |
| 74 | end_di_line: u32, | 74 | end_di_line: u32, |
| ... | @@ -77,7 +77,7 @@ end_di_column: u32, | ... | @@ -77,7 +77,7 @@ end_di_column: u32, |
| 77 | /// The value is an offset into the `Function` `code` from the beginning. | 77 | /// The value is an offset into the `Function` `code` from the beginning. |
| 78 | /// To perform the reloc, write 32-bit signed little-endian integer | 78 | /// To perform the reloc, write 32-bit signed little-endian integer |
| 79 | /// which is a relative jump, based on the address following the reloc. | 79 | /// which is a relative jump, based on the address following the reloc. |
| 80 | exitlude_jump_relocs: std.ArrayListUnmanaged(usize) = .empty, | 80 | exitlude_jump_relocs: std.ArrayList(usize) = .empty, |
| 81 | 81 | ||
| 82 | reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined, | 82 | reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined, |
| 83 | 83 | ||
| ... | @@ -218,7 +218,7 @@ const StackAllocation = struct { | ... | @@ -218,7 +218,7 @@ const StackAllocation = struct { |
| 218 | }; | 218 | }; |
| 219 | 219 | ||
| 220 | const BlockData = struct { | 220 | const BlockData = struct { |
| 221 | relocs: std.ArrayListUnmanaged(Mir.Inst.Index), | 221 | relocs: std.ArrayList(Mir.Inst.Index), |
| 222 | /// The first break instruction encounters `null` here and chooses a | 222 | /// The first break instruction encounters `null` here and chooses a |
| 223 | /// machine code value for the block result, populating this field. | 223 | /// machine code value for the block result, populating this field. |
| 224 | /// Following break instructions encounter that value and use it for | 224 | /// 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, | ... | @@ -32,7 +32,7 @@ prev_di_pc: usize, |
| 32 | branch_types: std.AutoHashMapUnmanaged(Mir.Inst.Index, BranchType) = .empty, | 32 | branch_types: std.AutoHashMapUnmanaged(Mir.Inst.Index, BranchType) = .empty, |
| 33 | /// For every forward branch, maps the target instruction to a list of | 33 | /// For every forward branch, maps the target instruction to a list of |
| 34 | /// branches which branch to this target instruction | 34 | /// branches which branch to this target instruction |
| 35 | branch_forward_origins: std.AutoHashMapUnmanaged(Mir.Inst.Index, std.ArrayListUnmanaged(Mir.Inst.Index)) = .empty, | 35 | branch_forward_origins: std.AutoHashMapUnmanaged(Mir.Inst.Index, std.ArrayList(Mir.Inst.Index)) = .empty, |
| 36 | /// For backward branches: stores the code offset of the target | 36 | /// For backward branches: stores the code offset of the target |
| 37 | /// instruction | 37 | /// instruction |
| 38 | /// | 38 | /// |
| ... | @@ -568,7 +568,7 @@ fn lowerBranches(emit: *Emit) !void { | ... | @@ -568,7 +568,7 @@ fn lowerBranches(emit: *Emit) !void { |
| 568 | if (emit.branch_forward_origins.getPtr(target_inst)) |origin_list| { | 568 | if (emit.branch_forward_origins.getPtr(target_inst)) |origin_list| { |
| 569 | try origin_list.append(gpa, inst); | 569 | try origin_list.append(gpa, inst); |
| 570 | } else { | 570 | } else { |
| 571 | var origin_list: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty; | 571 | var origin_list: std.ArrayList(Mir.Inst.Index) = .empty; |
| 572 | try origin_list.append(gpa, inst); | 572 | try origin_list.append(gpa, inst); |
| 573 | try emit.branch_forward_origins.put(gpa, target_inst, origin_list); | 573 | try emit.branch_forward_origins.put(gpa, target_inst, origin_list); |
| 574 | } | 574 | } |
src/codegen/spirv/Assembler.zig+4-4| ... | @@ -14,16 +14,16 @@ const StorageClass = spec.StorageClass; | ... | @@ -14,16 +14,16 @@ const StorageClass = spec.StorageClass; |
| 14 | const Assembler = @This(); | 14 | const Assembler = @This(); |
| 15 | 15 | ||
| 16 | cg: *CodeGen, | 16 | cg: *CodeGen, |
| 17 | errors: std.ArrayListUnmanaged(ErrorMsg) = .empty, | 17 | errors: std.ArrayList(ErrorMsg) = .empty, |
| 18 | src: []const u8 = undefined, | 18 | src: []const u8 = undefined, |
| 19 | /// `ass.src` tokenized. | 19 | /// `ass.src` tokenized. |
| 20 | tokens: std.ArrayListUnmanaged(Token) = .empty, | 20 | tokens: std.ArrayList(Token) = .empty, |
| 21 | current_token: u32 = 0, | 21 | current_token: u32 = 0, |
| 22 | /// The instruction that is currently being parsed or has just been parsed. | 22 | /// The instruction that is currently being parsed or has just been parsed. |
| 23 | inst: struct { | 23 | inst: struct { |
| 24 | opcode: Opcode = undefined, | 24 | opcode: Opcode = undefined, |
| 25 | operands: std.ArrayListUnmanaged(Operand) = .empty, | 25 | operands: std.ArrayList(Operand) = .empty, |
| 26 | string_bytes: std.ArrayListUnmanaged(u8) = .empty, | 26 | string_bytes: std.ArrayList(u8) = .empty, |
| 27 | 27 | ||
| 28 | fn result(ass: @This()) ?AsmValue.Ref { | 28 | fn result(ass: @This()) ?AsmValue.Ref { |
| 29 | for (ass.operands.items[0..@min(ass.operands.items.len, 2)]) |op| { | 29 | 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) { | ... | @@ -83,7 +83,7 @@ const ControlFlow = union(enum) { |
| 83 | selection: struct { | 83 | selection: struct { |
| 84 | /// In order to know which merges we still need to do, we need to keep | 84 | /// In order to know which merges we still need to do, we need to keep |
| 85 | /// a stack of those. | 85 | /// a stack of those. |
| 86 | merge_stack: std.ArrayListUnmanaged(SelectionMerge) = .empty, | 86 | merge_stack: std.ArrayList(SelectionMerge) = .empty, |
| 87 | }, | 87 | }, |
| 88 | /// For a `loop` type block, we can early-exit the block by | 88 | /// For a `loop` type block, we can early-exit the block by |
| 89 | /// jumping to the loop exit node, and we don't need to generate | 89 | /// jumping to the loop exit node, and we don't need to generate |
| ... | @@ -91,7 +91,7 @@ const ControlFlow = union(enum) { | ... | @@ -91,7 +91,7 @@ const ControlFlow = union(enum) { |
| 91 | loop: struct { | 91 | loop: struct { |
| 92 | /// The next block to jump to can be determined from any number | 92 | /// The next block to jump to can be determined from any number |
| 93 | /// of conditions that jump to the loop exit. | 93 | /// of conditions that jump to the loop exit. |
| 94 | merges: std.ArrayListUnmanaged(Incoming) = .empty, | 94 | merges: std.ArrayList(Incoming) = .empty, |
| 95 | /// The label id of the loop's merge block. | 95 | /// The label id of the loop's merge block. |
| 96 | merge_block: Id, | 96 | merge_block: Id, |
| 97 | }, | 97 | }, |
| ... | @@ -105,7 +105,7 @@ const ControlFlow = union(enum) { | ... | @@ -105,7 +105,7 @@ const ControlFlow = union(enum) { |
| 105 | } | 105 | } |
| 106 | }; | 106 | }; |
| 107 | /// This determines how exits from the current block must be handled. | 107 | /// 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, |
| 109 | block_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty, | 109 | block_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty, |
| 110 | }; | 110 | }; |
| 111 | 111 | ||
| ... | @@ -117,7 +117,7 @@ const ControlFlow = union(enum) { | ... | @@ -117,7 +117,7 @@ const ControlFlow = union(enum) { |
| 117 | 117 | ||
| 118 | const Block = struct { | 118 | const Block = struct { |
| 119 | label: ?Id = null, | 119 | label: ?Id = null, |
| 120 | incoming_blocks: std.ArrayListUnmanaged(Incoming) = .empty, | 120 | incoming_blocks: std.ArrayList(Incoming) = .empty, |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | /// We need to keep track of result ids for block labels, as well as the 'incoming' | 123 | /// We need to keep track of result ids for block labels, as well as the 'incoming' |
| ... | @@ -151,9 +151,9 @@ control_flow: ControlFlow, | ... | @@ -151,9 +151,9 @@ control_flow: ControlFlow, |
| 151 | base_line: u32, | 151 | base_line: u32, |
| 152 | block_label: Id = .none, | 152 | block_label: Id = .none, |
| 153 | next_arg_index: u32 = 0, | 153 | next_arg_index: u32 = 0, |
| 154 | args: std.ArrayListUnmanaged(Id) = .empty, | 154 | args: std.ArrayList(Id) = .empty, |
| 155 | inst_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty, | 155 | inst_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty, |
| 156 | id_scratch: std.ArrayListUnmanaged(Id) = .empty, | 156 | id_scratch: std.ArrayList(Id) = .empty, |
| 157 | prologue: Section = .{}, | 157 | prologue: Section = .{}, |
| 158 | body: Section = .{}, | 158 | body: Section = .{}, |
| 159 | error_msg: ?*Zcu.ErrorMsg = null, | 159 | error_msg: ?*Zcu.ErrorMsg = null, |
| ... | @@ -5783,7 +5783,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index) !void { | ... | @@ -5783,7 +5783,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index) !void { |
| 5783 | } | 5783 | } |
| 5784 | } | 5784 | } |
| 5785 | 5785 | ||
| 5786 | var incoming_structured_blocks: std.ArrayListUnmanaged(ControlFlow.Structured.Block.Incoming) = .empty; | 5786 | var incoming_structured_blocks: std.ArrayList(ControlFlow.Structured.Block.Incoming) = .empty; |
| 5787 | defer incoming_structured_blocks.deinit(gpa); | 5787 | defer incoming_structured_blocks.deinit(gpa); |
| 5788 | 5788 | ||
| 5789 | if (cg.control_flow == .structured) { | 5789 | if (cg.control_flow == .structured) { |
src/codegen/spirv/Module.zig+2-2| ... | @@ -26,8 +26,8 @@ zcu: *Zcu, | ... | @@ -26,8 +26,8 @@ zcu: *Zcu, |
| 26 | nav_link: std.AutoHashMapUnmanaged(InternPool.Nav.Index, Decl.Index) = .empty, | 26 | nav_link: std.AutoHashMapUnmanaged(InternPool.Nav.Index, Decl.Index) = .empty, |
| 27 | uav_link: std.AutoHashMapUnmanaged(struct { InternPool.Index, spec.StorageClass }, Decl.Index) = .empty, | 27 | uav_link: std.AutoHashMapUnmanaged(struct { InternPool.Index, spec.StorageClass }, Decl.Index) = .empty, |
| 28 | intern_map: std.AutoHashMapUnmanaged(struct { InternPool.Index, Repr }, Id) = .empty, | 28 | intern_map: std.AutoHashMapUnmanaged(struct { InternPool.Index, Repr }, Id) = .empty, |
| 29 | decls: std.ArrayListUnmanaged(Decl) = .empty, | 29 | decls: std.ArrayList(Decl) = .empty, |
| 30 | decl_deps: std.ArrayListUnmanaged(Decl.Index) = .empty, | 30 | decl_deps: std.ArrayList(Decl.Index) = .empty, |
| 31 | entry_points: std.AutoArrayHashMapUnmanaged(Id, EntryPoint) = .empty, | 31 | entry_points: std.AutoArrayHashMapUnmanaged(Id, EntryPoint) = .empty, |
| 32 | /// This map serves a dual purpose: | 32 | /// This map serves a dual purpose: |
| 33 | /// - It keeps track of pointers that are currently being emitted, so that we can tell | 33 | /// - 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); | ... | @@ -13,7 +13,7 @@ const Log2Word = std.math.Log2Int(Word); |
| 13 | 13 | ||
| 14 | const Opcode = spec.Opcode; | 14 | const Opcode = spec.Opcode; |
| 15 | 15 | ||
| 16 | instructions: std.ArrayListUnmanaged(Word) = .empty, | 16 | instructions: std.ArrayList(Word) = .empty, |
| 17 | 17 | ||
| 18 | pub fn deinit(section: *Section, allocator: Allocator) void { | 18 | pub fn deinit(section: *Section, allocator: Allocator) void { |
| 19 | section.instructions.deinit(allocator); | 19 | section.instructions.deinit(allocator); |
src/codegen/wasm/CodeGen.zig+9-9| ... | @@ -53,7 +53,7 @@ func_index: InternPool.Index, | ... | @@ -53,7 +53,7 @@ func_index: InternPool.Index, |
| 53 | /// When we return from a branch, the branch will be popped from this list, | 53 | /// When we return from a branch, the branch will be popped from this list, |
| 54 | /// which means branches can only contain references from within its own branch, | 54 | /// which means branches can only contain references from within its own branch, |
| 55 | /// or a branch higher (lower index) in the tree. | 55 | /// or a branch higher (lower index) in the tree. |
| 56 | branches: std.ArrayListUnmanaged(Branch) = .empty, | 56 | branches: std.ArrayList(Branch) = .empty, |
| 57 | /// Table to save `WValue`'s generated by an `Air.Inst` | 57 | /// Table to save `WValue`'s generated by an `Air.Inst` |
| 58 | // values: ValueTable, | 58 | // values: ValueTable, |
| 59 | /// Mapping from Air.Inst.Index to block ids | 59 | /// Mapping from Air.Inst.Index to block ids |
| ... | @@ -73,7 +73,7 @@ arg_index: u32 = 0, | ... | @@ -73,7 +73,7 @@ arg_index: u32 = 0, |
| 73 | /// List of simd128 immediates. Each value is stored as an array of bytes. | 73 | /// List of simd128 immediates. Each value is stored as an array of bytes. |
| 74 | /// This list will only be populated for 128bit-simd values when the target features | 74 | /// This list will only be populated for 128bit-simd values when the target features |
| 75 | /// are enabled also. | 75 | /// are enabled also. |
| 76 | simd_immediates: std.ArrayListUnmanaged([16]u8) = .empty, | 76 | simd_immediates: std.ArrayList([16]u8) = .empty, |
| 77 | /// The Target we're emitting (used to call intInfo) | 77 | /// The Target we're emitting (used to call intInfo) |
| 78 | target: *const std.Target, | 78 | target: *const std.Target, |
| 79 | ptr_size: enum { wasm32, wasm64 }, | 79 | ptr_size: enum { wasm32, wasm64 }, |
| ... | @@ -81,10 +81,10 @@ pt: Zcu.PerThread, | ... | @@ -81,10 +81,10 @@ pt: Zcu.PerThread, |
| 81 | /// List of MIR Instructions | 81 | /// List of MIR Instructions |
| 82 | mir_instructions: std.MultiArrayList(Mir.Inst), | 82 | mir_instructions: std.MultiArrayList(Mir.Inst), |
| 83 | /// Contains extra data for MIR | 83 | /// Contains extra data for MIR |
| 84 | mir_extra: std.ArrayListUnmanaged(u32), | 84 | mir_extra: std.ArrayList(u32), |
| 85 | /// List of all locals' types generated throughout this declaration | 85 | /// List of all locals' types generated throughout this declaration |
| 86 | /// used to emit locals count at start of 'code' section. | 86 | /// used to emit locals count at start of 'code' section. |
| 87 | mir_locals: std.ArrayListUnmanaged(std.wasm.Valtype), | 87 | mir_locals: std.ArrayList(std.wasm.Valtype), |
| 88 | /// Set of all UAVs referenced by this function. Key is the UAV value, value is the alignment. | 88 | /// Set of all UAVs referenced by this function. Key is the UAV value, value is the alignment. |
| 89 | /// `.none` means naturally aligned. An explicit alignment is never less than the natural alignment. | 89 | /// `.none` means naturally aligned. An explicit alignment is never less than the natural alignment. |
| 90 | mir_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment), | 90 | mir_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment), |
| ... | @@ -121,19 +121,19 @@ stack_alignment: Alignment = .@"16", | ... | @@ -121,19 +121,19 @@ stack_alignment: Alignment = .@"16", |
| 121 | // allows us to re-use locals that are no longer used. e.g. a temporary local. | 121 | // allows us to re-use locals that are no longer used. e.g. a temporary local. |
| 122 | /// A list of indexes which represents a local of valtype `i32`. | 122 | /// A list of indexes which represents a local of valtype `i32`. |
| 123 | /// It is illegal to store a non-i32 valtype in this list. | 123 | /// It is illegal to store a non-i32 valtype in this list. |
| 124 | free_locals_i32: std.ArrayListUnmanaged(u32) = .empty, | 124 | free_locals_i32: std.ArrayList(u32) = .empty, |
| 125 | /// A list of indexes which represents a local of valtype `i64`. | 125 | /// A list of indexes which represents a local of valtype `i64`. |
| 126 | /// It is illegal to store a non-i64 valtype in this list. | 126 | /// It is illegal to store a non-i64 valtype in this list. |
| 127 | free_locals_i64: std.ArrayListUnmanaged(u32) = .empty, | 127 | free_locals_i64: std.ArrayList(u32) = .empty, |
| 128 | /// A list of indexes which represents a local of valtype `f32`. | 128 | /// A list of indexes which represents a local of valtype `f32`. |
| 129 | /// It is illegal to store a non-f32 valtype in this list. | 129 | /// It is illegal to store a non-f32 valtype in this list. |
| 130 | free_locals_f32: std.ArrayListUnmanaged(u32) = .empty, | 130 | free_locals_f32: std.ArrayList(u32) = .empty, |
| 131 | /// A list of indexes which represents a local of valtype `f64`. | 131 | /// A list of indexes which represents a local of valtype `f64`. |
| 132 | /// It is illegal to store a non-f64 valtype in this list. | 132 | /// It is illegal to store a non-f64 valtype in this list. |
| 133 | free_locals_f64: std.ArrayListUnmanaged(u32) = .empty, | 133 | free_locals_f64: std.ArrayList(u32) = .empty, |
| 134 | /// A list of indexes which represents a local of valtype `v127`. | 134 | /// A list of indexes which represents a local of valtype `v127`. |
| 135 | /// It is illegal to store a non-v128 valtype in this list. | 135 | /// It is illegal to store a non-v128 valtype in this list. |
| 136 | free_locals_v128: std.ArrayListUnmanaged(u32) = .empty, | 136 | free_locals_v128: std.ArrayList(u32) = .empty, |
| 137 | 137 | ||
| 138 | /// When in debug mode, this tracks if no `finishAir` was missed. | 138 | /// When in debug mode, this tracks if no `finishAir` was missed. |
| 139 | /// Forgetting to call `finishAir` will cause the result to not be | 139 | /// 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 { | ... | @@ -669,7 +669,7 @@ pub fn deinit(mir: *Mir, gpa: std.mem.Allocator) void { |
| 669 | mir.* = undefined; | 669 | mir.* = undefined; |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayListUnmanaged(u8)) std.mem.Allocator.Error!void { | 672 | pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayList(u8)) std.mem.Allocator.Error!void { |
| 673 | const gpa = wasm.base.comp.gpa; | 673 | const gpa = wasm.base.comp.gpa; |
| 674 | 674 | ||
| 675 | // Write the locals in the prologue of the function body. | 675 | // 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, | ... | @@ -113,21 +113,21 @@ eflags_inst: ?Air.Inst.Index = null, |
| 113 | /// MIR Instructions | 113 | /// MIR Instructions |
| 114 | mir_instructions: std.MultiArrayList(Mir.Inst) = .empty, | 114 | mir_instructions: std.MultiArrayList(Mir.Inst) = .empty, |
| 115 | /// MIR extra data | 115 | /// MIR extra data |
| 116 | mir_extra: std.ArrayListUnmanaged(u32) = .empty, | 116 | mir_extra: std.ArrayList(u32) = .empty, |
| 117 | mir_string_bytes: std.ArrayListUnmanaged(u8) = .empty, | 117 | mir_string_bytes: std.ArrayList(u8) = .empty, |
| 118 | mir_strings: std.HashMapUnmanaged( | 118 | mir_strings: std.HashMapUnmanaged( |
| 119 | u32, | 119 | u32, |
| 120 | void, | 120 | void, |
| 121 | std.hash_map.StringIndexContext, | 121 | std.hash_map.StringIndexContext, |
| 122 | std.hash_map.default_max_load_percentage, | 122 | std.hash_map.default_max_load_percentage, |
| 123 | ) = .empty, | 123 | ) = .empty, |
| 124 | mir_locals: std.ArrayListUnmanaged(Mir.Local) = .empty, | 124 | mir_locals: std.ArrayList(Mir.Local) = .empty, |
| 125 | mir_table: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty, | 125 | mir_table: std.ArrayList(Mir.Inst.Index) = .empty, |
| 126 | 126 | ||
| 127 | /// The value is an offset into the `Function` `code` from the beginning. | 127 | /// The value is an offset into the `Function` `code` from the beginning. |
| 128 | /// To perform the reloc, write 32-bit signed little-endian integer | 128 | /// To perform the reloc, write 32-bit signed little-endian integer |
| 129 | /// which is a relative jump, based on the address following the reloc. | 129 | /// which is a relative jump, based on the address following the reloc. |
| 130 | epilogue_relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty, | 130 | epilogue_relocs: std.ArrayList(Mir.Inst.Index) = .empty, |
| 131 | 131 | ||
| 132 | reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined, | 132 | reused_operands: std.StaticBitSet(Air.Liveness.bpi - 1) = undefined, |
| 133 | inst_tracking: InstTrackingMap = .empty, | 133 | inst_tracking: InstTrackingMap = .empty, |
| ... | @@ -156,7 +156,7 @@ loop_switches: std.AutoHashMapUnmanaged(Air.Inst.Index, struct { | ... | @@ -156,7 +156,7 @@ loop_switches: std.AutoHashMapUnmanaged(Air.Inst.Index, struct { |
| 156 | min: Value, | 156 | min: Value, |
| 157 | else_relocs: union(enum) { | 157 | else_relocs: union(enum) { |
| 158 | @"unreachable", | 158 | @"unreachable", |
| 159 | forward: std.ArrayListUnmanaged(Mir.Inst.Index), | 159 | forward: std.ArrayList(Mir.Inst.Index), |
| 160 | backward: Mir.Inst.Index, | 160 | backward: Mir.Inst.Index, |
| 161 | }, | 161 | }, |
| 162 | }) = .empty, | 162 | }) = .empty, |
| ... | @@ -855,7 +855,7 @@ const FrameAlloc = struct { | ... | @@ -855,7 +855,7 @@ const FrameAlloc = struct { |
| 855 | }; | 855 | }; |
| 856 | 856 | ||
| 857 | const BlockData = struct { | 857 | const BlockData = struct { |
| 858 | relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty, | 858 | relocs: std.ArrayList(Mir.Inst.Index) = .empty, |
| 859 | state: State, | 859 | state: State, |
| 860 | 860 | ||
| 861 | fn deinit(self: *BlockData, gpa: Allocator) void { | 861 | fn deinit(self: *BlockData, gpa: Allocator) void { |
| ... | @@ -177329,7 +177329,7 @@ fn airAsm(self: *CodeGen, inst: Air.Inst.Index) !void { | ... | @@ -177329,7 +177329,7 @@ fn airAsm(self: *CodeGen, inst: Air.Inst.Index) !void { |
| 177329 | 177329 | ||
| 177330 | const Label = struct { | 177330 | const Label = struct { |
| 177331 | target: Mir.Inst.Index = undefined, | 177331 | target: Mir.Inst.Index = undefined, |
| 177332 | pending_relocs: std.ArrayListUnmanaged(Mir.Inst.Index) = .empty, | 177332 | pending_relocs: std.ArrayList(Mir.Inst.Index) = .empty, |
| 177333 | 177333 | ||
| 177334 | const Kind = enum { definition, reference }; | 177334 | const Kind = enum { definition, reference }; |
| 177335 | 177335 |
src/codegen/x86_64/Emit.zig+3-3| ... | @@ -12,9 +12,9 @@ prev_di_loc: Loc, | ... | @@ -12,9 +12,9 @@ prev_di_loc: Loc, |
| 12 | /// Relative to the beginning of `code`. | 12 | /// Relative to the beginning of `code`. |
| 13 | prev_di_pc: usize, | 13 | prev_di_pc: usize, |
| 14 | 14 | ||
| 15 | code_offset_mapping: std.ArrayListUnmanaged(u32), | 15 | code_offset_mapping: std.ArrayList(u32), |
| 16 | relocs: std.ArrayListUnmanaged(Reloc), | 16 | relocs: std.ArrayList(Reloc), |
| 17 | table_relocs: std.ArrayListUnmanaged(TableReloc), | 17 | table_relocs: std.ArrayList(TableReloc), |
| 18 | 18 | ||
| 19 | pub const Error = Lower.Error || error{ | 19 | pub const Error = Lower.Error || error{ |
| 20 | EmitFail, | 20 | EmitFail, |
src/link.zig+18-18| ... | @@ -35,9 +35,9 @@ pub const Diags = struct { | ... | @@ -35,9 +35,9 @@ pub const Diags = struct { |
| 35 | /// needing an allocator for things besides error reporting. | 35 | /// needing an allocator for things besides error reporting. |
| 36 | gpa: Allocator, | 36 | gpa: Allocator, |
| 37 | mutex: std.Thread.Mutex, | 37 | mutex: std.Thread.Mutex, |
| 38 | msgs: std.ArrayListUnmanaged(Msg), | 38 | msgs: std.ArrayList(Msg), |
| 39 | flags: Flags, | 39 | flags: Flags, |
| 40 | lld: std.ArrayListUnmanaged(Lld), | 40 | lld: std.ArrayList(Lld), |
| 41 | 41 | ||
| 42 | pub const SourceLocation = union(enum) { | 42 | pub const SourceLocation = union(enum) { |
| 43 | none, | 43 | none, |
| ... | @@ -1775,19 +1775,19 @@ pub fn resolveInputs( | ... | @@ -1775,19 +1775,19 @@ pub fn resolveInputs( |
| 1775 | target: *const std.Target, | 1775 | target: *const std.Target, |
| 1776 | /// This function mutates this array but does not take ownership. | 1776 | /// This function mutates this array but does not take ownership. |
| 1777 | /// Allocated with `gpa`. | 1777 | /// Allocated with `gpa`. |
| 1778 | unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput), | 1778 | unresolved_inputs: *std.ArrayList(UnresolvedInput), |
| 1779 | /// Allocated with `gpa`. | 1779 | /// Allocated with `gpa`. |
| 1780 | resolved_inputs: *std.ArrayListUnmanaged(Input), | 1780 | resolved_inputs: *std.ArrayList(Input), |
| 1781 | lib_directories: []const Cache.Directory, | 1781 | lib_directories: []const Cache.Directory, |
| 1782 | color: std.zig.Color, | 1782 | color: std.zig.Color, |
| 1783 | ) Allocator.Error!void { | 1783 | ) Allocator.Error!void { |
| 1784 | var checked_paths: std.ArrayListUnmanaged(u8) = .empty; | 1784 | var checked_paths: std.ArrayList(u8) = .empty; |
| 1785 | defer checked_paths.deinit(gpa); | 1785 | defer checked_paths.deinit(gpa); |
| 1786 | 1786 | ||
| 1787 | var ld_script_bytes: std.ArrayListUnmanaged(u8) = .empty; | 1787 | var ld_script_bytes: std.ArrayList(u8) = .empty; |
| 1788 | defer ld_script_bytes.deinit(gpa); | 1788 | defer ld_script_bytes.deinit(gpa); |
| 1789 | 1789 | ||
| 1790 | var failed_libs: std.ArrayListUnmanaged(struct { | 1790 | var failed_libs: std.ArrayList(struct { |
| 1791 | name: []const u8, | 1791 | name: []const u8, |
| 1792 | strategy: UnresolvedInput.SearchStrategy, | 1792 | strategy: UnresolvedInput.SearchStrategy, |
| 1793 | checked_paths: []const u8, | 1793 | checked_paths: []const u8, |
| ... | @@ -2007,13 +2007,13 @@ fn resolveLibInput( | ... | @@ -2007,13 +2007,13 @@ fn resolveLibInput( |
| 2007 | gpa: Allocator, | 2007 | gpa: Allocator, |
| 2008 | arena: Allocator, | 2008 | arena: Allocator, |
| 2009 | /// Allocated via `gpa`. | 2009 | /// Allocated via `gpa`. |
| 2010 | unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput), | 2010 | unresolved_inputs: *std.ArrayList(UnresolvedInput), |
| 2011 | /// Allocated via `gpa`. | 2011 | /// Allocated via `gpa`. |
| 2012 | resolved_inputs: *std.ArrayListUnmanaged(Input), | 2012 | resolved_inputs: *std.ArrayList(Input), |
| 2013 | /// Allocated via `gpa`. | 2013 | /// Allocated via `gpa`. |
| 2014 | checked_paths: *std.ArrayListUnmanaged(u8), | 2014 | checked_paths: *std.ArrayList(u8), |
| 2015 | /// Allocated via `gpa`. | 2015 | /// Allocated via `gpa`. |
| 2016 | ld_script_bytes: *std.ArrayListUnmanaged(u8), | 2016 | ld_script_bytes: *std.ArrayList(u8), |
| 2017 | lib_directory: Directory, | 2017 | lib_directory: Directory, |
| 2018 | name_query: UnresolvedInput.NameQuery, | 2018 | name_query: UnresolvedInput.NameQuery, |
| 2019 | target: *const std.Target, | 2019 | target: *const std.Target, |
| ... | @@ -2097,7 +2097,7 @@ fn resolveLibInput( | ... | @@ -2097,7 +2097,7 @@ fn resolveLibInput( |
| 2097 | } | 2097 | } |
| 2098 | 2098 | ||
| 2099 | fn finishResolveLibInput( | 2099 | fn finishResolveLibInput( |
| 2100 | resolved_inputs: *std.ArrayListUnmanaged(Input), | 2100 | resolved_inputs: *std.ArrayList(Input), |
| 2101 | path: Path, | 2101 | path: Path, |
| 2102 | file: std.fs.File, | 2102 | file: std.fs.File, |
| 2103 | link_mode: std.builtin.LinkMode, | 2103 | link_mode: std.builtin.LinkMode, |
| ... | @@ -2125,11 +2125,11 @@ fn resolvePathInput( | ... | @@ -2125,11 +2125,11 @@ fn resolvePathInput( |
| 2125 | gpa: Allocator, | 2125 | gpa: Allocator, |
| 2126 | arena: Allocator, | 2126 | arena: Allocator, |
| 2127 | /// Allocated with `gpa`. | 2127 | /// Allocated with `gpa`. |
| 2128 | unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput), | 2128 | unresolved_inputs: *std.ArrayList(UnresolvedInput), |
| 2129 | /// Allocated with `gpa`. | 2129 | /// Allocated with `gpa`. |
| 2130 | resolved_inputs: *std.ArrayListUnmanaged(Input), | 2130 | resolved_inputs: *std.ArrayList(Input), |
| 2131 | /// Allocated via `gpa`. | 2131 | /// Allocated via `gpa`. |
| 2132 | ld_script_bytes: *std.ArrayListUnmanaged(u8), | 2132 | ld_script_bytes: *std.ArrayList(u8), |
| 2133 | target: *const std.Target, | 2133 | target: *const std.Target, |
| 2134 | pq: UnresolvedInput.PathQuery, | 2134 | pq: UnresolvedInput.PathQuery, |
| 2135 | color: std.zig.Color, | 2135 | color: std.zig.Color, |
| ... | @@ -2167,11 +2167,11 @@ fn resolvePathInputLib( | ... | @@ -2167,11 +2167,11 @@ fn resolvePathInputLib( |
| 2167 | gpa: Allocator, | 2167 | gpa: Allocator, |
| 2168 | arena: Allocator, | 2168 | arena: Allocator, |
| 2169 | /// Allocated with `gpa`. | 2169 | /// Allocated with `gpa`. |
| 2170 | unresolved_inputs: *std.ArrayListUnmanaged(UnresolvedInput), | 2170 | unresolved_inputs: *std.ArrayList(UnresolvedInput), |
| 2171 | /// Allocated with `gpa`. | 2171 | /// Allocated with `gpa`. |
| 2172 | resolved_inputs: *std.ArrayListUnmanaged(Input), | 2172 | resolved_inputs: *std.ArrayList(Input), |
| 2173 | /// Allocated via `gpa`. | 2173 | /// Allocated via `gpa`. |
| 2174 | ld_script_bytes: *std.ArrayListUnmanaged(u8), | 2174 | ld_script_bytes: *std.ArrayList(u8), |
| 2175 | target: *const std.Target, | 2175 | target: *const std.Target, |
| 2176 | pq: UnresolvedInput.PathQuery, | 2176 | pq: UnresolvedInput.PathQuery, |
| 2177 | link_mode: std.builtin.LinkMode, | 2177 | link_mode: std.builtin.LinkMode, |
src/link/C.zig+6-6| ... | @@ -29,7 +29,7 @@ navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvBlock), | ... | @@ -29,7 +29,7 @@ navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvBlock), |
| 29 | /// All the string bytes of rendered C code, all squished into one array. | 29 | /// All the string bytes of rendered C code, all squished into one array. |
| 30 | /// While in progress, a separate buffer is used, and then when finished, the | 30 | /// While in progress, a separate buffer is used, and then when finished, the |
| 31 | /// buffer is copied into this one. | 31 | /// buffer is copied into this one. |
| 32 | string_bytes: std.ArrayListUnmanaged(u8), | 32 | string_bytes: std.ArrayList(u8), |
| 33 | /// Tracks all the anonymous decls that are used by all the decls so they can | 33 | /// Tracks all the anonymous decls that are used by all the decls so they can |
| 34 | /// be rendered during flush(). | 34 | /// be rendered during flush(). |
| 35 | uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, AvBlock), | 35 | uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, AvBlock), |
| ... | @@ -519,16 +519,16 @@ pub fn flush(self: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.P | ... | @@ -519,16 +519,16 @@ pub fn flush(self: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.P |
| 519 | 519 | ||
| 520 | const Flush = struct { | 520 | const Flush = struct { |
| 521 | ctype_pool: codegen.CType.Pool, | 521 | ctype_pool: codegen.CType.Pool, |
| 522 | ctype_global_from_decl_map: std.ArrayListUnmanaged(codegen.CType), | 522 | ctype_global_from_decl_map: std.ArrayList(codegen.CType), |
| 523 | ctypes: std.ArrayListUnmanaged(u8), | 523 | ctypes: std.ArrayList(u8), |
| 524 | 524 | ||
| 525 | lazy_ctype_pool: codegen.CType.Pool, | 525 | lazy_ctype_pool: codegen.CType.Pool, |
| 526 | lazy_fns: LazyFns, | 526 | lazy_fns: LazyFns, |
| 527 | lazy_fwd_decl: std.ArrayListUnmanaged(u8), | 527 | lazy_fwd_decl: std.ArrayList(u8), |
| 528 | lazy_code: std.ArrayListUnmanaged(u8), | 528 | lazy_code: std.ArrayList(u8), |
| 529 | 529 | ||
| 530 | /// We collect a list of buffers to write, and write them all at once with pwritev 😎 | 530 | /// 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), |
| 532 | /// Keeps track of the total bytes of `all_buffers`. | 532 | /// Keeps track of the total bytes of `all_buffers`. |
| 533 | file_size: u64, | 533 | file_size: u64, |
| 534 | 534 |
src/link/Dwarf.zig+12-12| ... | @@ -211,7 +211,7 @@ const DebugRngLists = struct { | ... | @@ -211,7 +211,7 @@ const DebugRngLists = struct { |
| 211 | }; | 211 | }; |
| 212 | 212 | ||
| 213 | const StringSection = struct { | 213 | const StringSection = struct { |
| 214 | contents: std.ArrayListUnmanaged(u8), | 214 | contents: std.ArrayList(u8), |
| 215 | map: std.AutoArrayHashMapUnmanaged(void, void), | 215 | map: std.AutoArrayHashMapUnmanaged(void, void), |
| 216 | section: Section, | 216 | section: Section, |
| 217 | 217 | ||
| ... | @@ -275,7 +275,7 @@ pub const Section = struct { | ... | @@ -275,7 +275,7 @@ pub const Section = struct { |
| 275 | first: Unit.Index.Optional, | 275 | first: Unit.Index.Optional, |
| 276 | last: Unit.Index.Optional, | 276 | last: Unit.Index.Optional, |
| 277 | len: u64, | 277 | len: u64, |
| 278 | units: std.ArrayListUnmanaged(Unit), | 278 | units: std.ArrayList(Unit), |
| 279 | 279 | ||
| 280 | pub const Index = enum { | 280 | pub const Index = enum { |
| 281 | debug_abbrev, | 281 | debug_abbrev, |
| ... | @@ -511,9 +511,9 @@ const Unit = struct { | ... | @@ -511,9 +511,9 @@ const Unit = struct { |
| 511 | trailer_len: u32, | 511 | trailer_len: u32, |
| 512 | /// data length in bytes | 512 | /// data length in bytes |
| 513 | len: u32, | 513 | len: u32, |
| 514 | entries: std.ArrayListUnmanaged(Entry), | 514 | entries: std.ArrayList(Entry), |
| 515 | cross_unit_relocs: std.ArrayListUnmanaged(CrossUnitReloc), | 515 | cross_unit_relocs: std.ArrayList(CrossUnitReloc), |
| 516 | cross_section_relocs: std.ArrayListUnmanaged(CrossSectionReloc), | 516 | cross_section_relocs: std.ArrayList(CrossSectionReloc), |
| 517 | 517 | ||
| 518 | const Index = enum(u32) { | 518 | const Index = enum(u32) { |
| 519 | main, | 519 | main, |
| ... | @@ -790,10 +790,10 @@ const Entry = struct { | ... | @@ -790,10 +790,10 @@ const Entry = struct { |
| 790 | off: u32, | 790 | off: u32, |
| 791 | /// data length in bytes | 791 | /// data length in bytes |
| 792 | len: u32, | 792 | len: u32, |
| 793 | cross_entry_relocs: std.ArrayListUnmanaged(CrossEntryReloc), | 793 | cross_entry_relocs: std.ArrayList(CrossEntryReloc), |
| 794 | cross_unit_relocs: std.ArrayListUnmanaged(CrossUnitReloc), | 794 | cross_unit_relocs: std.ArrayList(CrossUnitReloc), |
| 795 | cross_section_relocs: std.ArrayListUnmanaged(CrossSectionReloc), | 795 | cross_section_relocs: std.ArrayList(CrossSectionReloc), |
| 796 | external_relocs: std.ArrayListUnmanaged(ExternalReloc), | 796 | external_relocs: std.ArrayList(ExternalReloc), |
| 797 | 797 | ||
| 798 | fn clear(entry: *Entry) void { | 798 | fn clear(entry: *Entry) void { |
| 799 | entry.cross_entry_relocs.clearRetainingCapacity(); | 799 | entry.cross_entry_relocs.clearRetainingCapacity(); |
| ... | @@ -1474,7 +1474,7 @@ pub const WipNav = struct { | ... | @@ -1474,7 +1474,7 @@ pub const WipNav = struct { |
| 1474 | func: InternPool.Index, | 1474 | func: InternPool.Index, |
| 1475 | func_sym_index: u32, | 1475 | func_sym_index: u32, |
| 1476 | func_high_pc: u32, | 1476 | func_high_pc: u32, |
| 1477 | blocks: std.ArrayListUnmanaged(struct { | 1477 | blocks: std.ArrayList(struct { |
| 1478 | abbrev_code: u32, | 1478 | abbrev_code: u32, |
| 1479 | low_pc_off: u64, | 1479 | low_pc_off: u64, |
| 1480 | high_pc: u32, | 1480 | high_pc: u32, |
| ... | @@ -2300,8 +2300,8 @@ pub const WipNav = struct { | ... | @@ -2300,8 +2300,8 @@ pub const WipNav = struct { |
| 2300 | } | 2300 | } |
| 2301 | 2301 | ||
| 2302 | const PendingLazy = struct { | 2302 | const PendingLazy = struct { |
| 2303 | types: std.ArrayListUnmanaged(InternPool.Index), | 2303 | types: std.ArrayList(InternPool.Index), |
| 2304 | values: std.ArrayListUnmanaged(InternPool.Index), | 2304 | values: std.ArrayList(InternPool.Index), |
| 2305 | 2305 | ||
| 2306 | const empty: PendingLazy = .{ .types = .empty, .values = .empty }; | 2306 | const empty: PendingLazy = .{ .types = .empty, .values = .empty }; |
| 2307 | }; | 2307 | }; |
src/link/Elf.zig+22-22| ... | @@ -26,10 +26,10 @@ files: std.MultiArrayList(File.Entry) = .{}, | ... | @@ -26,10 +26,10 @@ files: std.MultiArrayList(File.Entry) = .{}, |
| 26 | /// Long-lived list of all file descriptors. | 26 | /// Long-lived list of all file descriptors. |
| 27 | /// We store them globally rather than per actual File so that we can re-use | 27 | /// We store them globally rather than per actual File so that we can re-use |
| 28 | /// one file handle per every object file within an archive. | 28 | /// one file handle per every object file within an archive. |
| 29 | file_handles: std.ArrayListUnmanaged(File.Handle) = .empty, | 29 | file_handles: std.ArrayList(File.Handle) = .empty, |
| 30 | zig_object_index: ?File.Index = null, | 30 | zig_object_index: ?File.Index = null, |
| 31 | linker_defined_index: ?File.Index = null, | 31 | linker_defined_index: ?File.Index = null, |
| 32 | objects: std.ArrayListUnmanaged(File.Index) = .empty, | 32 | objects: std.ArrayList(File.Index) = .empty, |
| 33 | shared_objects: std.StringArrayHashMapUnmanaged(File.Index) = .empty, | 33 | shared_objects: std.StringArrayHashMapUnmanaged(File.Index) = .empty, |
| 34 | 34 | ||
| 35 | /// List of all output sections and their associated metadata. | 35 | /// List of all output sections and their associated metadata. |
| ... | @@ -49,23 +49,23 @@ page_size: u32, | ... | @@ -49,23 +49,23 @@ page_size: u32, |
| 49 | default_sym_version: elf.Versym, | 49 | default_sym_version: elf.Versym, |
| 50 | 50 | ||
| 51 | /// .shstrtab buffer | 51 | /// .shstrtab buffer |
| 52 | shstrtab: std.ArrayListUnmanaged(u8) = .empty, | 52 | shstrtab: std.ArrayList(u8) = .empty, |
| 53 | /// .symtab buffer | 53 | /// .symtab buffer |
| 54 | symtab: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty, | 54 | symtab: std.ArrayList(elf.Elf64_Sym) = .empty, |
| 55 | /// .strtab buffer | 55 | /// .strtab buffer |
| 56 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 56 | strtab: std.ArrayList(u8) = .empty, |
| 57 | /// Dynamic symbol table. Only populated and emitted when linking dynamically. | 57 | /// Dynamic symbol table. Only populated and emitted when linking dynamically. |
| 58 | dynsym: DynsymSection = .{}, | 58 | dynsym: DynsymSection = .{}, |
| 59 | /// .dynstrtab buffer | 59 | /// .dynstrtab buffer |
| 60 | dynstrtab: std.ArrayListUnmanaged(u8) = .empty, | 60 | dynstrtab: std.ArrayList(u8) = .empty, |
| 61 | /// Version symbol table. Only populated and emitted when linking dynamically. | 61 | /// Version symbol table. Only populated and emitted when linking dynamically. |
| 62 | versym: std.ArrayListUnmanaged(elf.Versym) = .empty, | 62 | versym: std.ArrayList(elf.Versym) = .empty, |
| 63 | /// .verneed section | 63 | /// .verneed section |
| 64 | verneed: VerneedSection = .{}, | 64 | verneed: VerneedSection = .{}, |
| 65 | /// .got section | 65 | /// .got section |
| 66 | got: GotSection = .{}, | 66 | got: GotSection = .{}, |
| 67 | /// .rela.dyn section | 67 | /// .rela.dyn section |
| 68 | rela_dyn: std.ArrayListUnmanaged(elf.Elf64_Rela) = .empty, | 68 | rela_dyn: std.ArrayList(elf.Elf64_Rela) = .empty, |
| 69 | /// .dynamic section | 69 | /// .dynamic section |
| 70 | dynamic: DynamicSection = .{}, | 70 | dynamic: DynamicSection = .{}, |
| 71 | /// .hash section | 71 | /// .hash section |
| ... | @@ -81,10 +81,10 @@ plt_got: PltGotSection = .{}, | ... | @@ -81,10 +81,10 @@ plt_got: PltGotSection = .{}, |
| 81 | /// .copyrel section | 81 | /// .copyrel section |
| 82 | copy_rel: CopyRelSection = .{}, | 82 | copy_rel: CopyRelSection = .{}, |
| 83 | /// .rela.plt section | 83 | /// .rela.plt section |
| 84 | rela_plt: std.ArrayListUnmanaged(elf.Elf64_Rela) = .empty, | 84 | rela_plt: std.ArrayList(elf.Elf64_Rela) = .empty, |
| 85 | /// SHT_GROUP sections | 85 | /// SHT_GROUP sections |
| 86 | /// Applies only to a relocatable. | 86 | /// Applies only to a relocatable. |
| 87 | group_sections: std.ArrayListUnmanaged(GroupSection) = .empty, | 87 | group_sections: std.ArrayList(GroupSection) = .empty, |
| 88 | 88 | ||
| 89 | resolver: SymbolResolver = .{}, | 89 | resolver: SymbolResolver = .{}, |
| 90 | 90 | ||
| ... | @@ -92,15 +92,15 @@ has_text_reloc: bool = false, | ... | @@ -92,15 +92,15 @@ has_text_reloc: bool = false, |
| 92 | num_ifunc_dynrelocs: usize = 0, | 92 | num_ifunc_dynrelocs: usize = 0, |
| 93 | 93 | ||
| 94 | /// List of range extension thunks. | 94 | /// List of range extension thunks. |
| 95 | thunks: std.ArrayListUnmanaged(Thunk) = .empty, | 95 | thunks: std.ArrayList(Thunk) = .empty, |
| 96 | 96 | ||
| 97 | /// List of output merge sections with deduped contents. | 97 | /// List of output merge sections with deduped contents. |
| 98 | merge_sections: std.ArrayListUnmanaged(Merge.Section) = .empty, | 98 | merge_sections: std.ArrayList(Merge.Section) = .empty, |
| 99 | comment_merge_section_index: ?Merge.Section.Index = null, | 99 | comment_merge_section_index: ?Merge.Section.Index = null, |
| 100 | 100 | ||
| 101 | /// `--verbose-link` output. | 101 | /// `--verbose-link` output. |
| 102 | /// Initialized on creation, appended to as inputs are added, printed during `flush`. | 102 | /// Initialized on creation, appended to as inputs are added, printed during `flush`. |
| 103 | dump_argv_list: std.ArrayListUnmanaged([]const u8), | 103 | dump_argv_list: std.ArrayList([]const u8), |
| 104 | 104 | ||
| 105 | const SectionIndexes = struct { | 105 | const SectionIndexes = struct { |
| 106 | copy_rel: ?u32 = null, | 106 | copy_rel: ?u32 = null, |
| ... | @@ -127,7 +127,7 @@ const SectionIndexes = struct { | ... | @@ -127,7 +127,7 @@ const SectionIndexes = struct { |
| 127 | symtab: ?u32 = null, | 127 | symtab: ?u32 = null, |
| 128 | }; | 128 | }; |
| 129 | 129 | ||
| 130 | const ProgramHeaderList = std.ArrayListUnmanaged(elf.Elf64_Phdr); | 130 | const ProgramHeaderList = std.ArrayList(elf.Elf64_Phdr); |
| 131 | 131 | ||
| 132 | const OptionalProgramHeaderIndex = enum(u16) { | 132 | const OptionalProgramHeaderIndex = enum(u16) { |
| 133 | none = std.math.maxInt(u16), | 133 | none = std.math.maxInt(u16), |
| ... | @@ -1098,12 +1098,12 @@ fn parseObject(self: *Elf, obj: link.Input.Object) !void { | ... | @@ -1098,12 +1098,12 @@ fn parseObject(self: *Elf, obj: link.Input.Object) !void { |
| 1098 | fn parseArchive( | 1098 | fn parseArchive( |
| 1099 | gpa: Allocator, | 1099 | gpa: Allocator, |
| 1100 | diags: *Diags, | 1100 | diags: *Diags, |
| 1101 | file_handles: *std.ArrayListUnmanaged(File.Handle), | 1101 | file_handles: *std.ArrayList(File.Handle), |
| 1102 | files: *std.MultiArrayList(File.Entry), | 1102 | files: *std.MultiArrayList(File.Entry), |
| 1103 | target: *const std.Target, | 1103 | target: *const std.Target, |
| 1104 | debug_fmt_strip: bool, | 1104 | debug_fmt_strip: bool, |
| 1105 | default_sym_version: elf.Versym, | 1105 | default_sym_version: elf.Versym, |
| 1106 | objects: *std.ArrayListUnmanaged(File.Index), | 1106 | objects: *std.ArrayList(File.Index), |
| 1107 | obj: link.Input.Object, | 1107 | obj: link.Input.Object, |
| 1108 | is_static_lib: bool, | 1108 | is_static_lib: bool, |
| 1109 | ) !void { | 1109 | ) !void { |
| ... | @@ -1748,7 +1748,7 @@ pub fn deleteExport( | ... | @@ -1748,7 +1748,7 @@ pub fn deleteExport( |
| 1748 | fn checkDuplicates(self: *Elf) !void { | 1748 | fn checkDuplicates(self: *Elf) !void { |
| 1749 | const gpa = self.base.comp.gpa; | 1749 | const gpa = self.base.comp.gpa; |
| 1750 | 1750 | ||
| 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); |
| 1752 | defer { | 1752 | defer { |
| 1753 | for (dupes.values()) |*list| { | 1753 | for (dupes.values()) |*list| { |
| 1754 | list.deinit(gpa); | 1754 | list.deinit(gpa); |
| ... | @@ -3647,7 +3647,7 @@ fn fileLookup(files: std.MultiArrayList(File.Entry), index: File.Index, zig_obje | ... | @@ -3647,7 +3647,7 @@ fn fileLookup(files: std.MultiArrayList(File.Entry), index: File.Index, zig_obje |
| 3647 | 3647 | ||
| 3648 | pub fn addFileHandle( | 3648 | pub fn addFileHandle( |
| 3649 | gpa: Allocator, | 3649 | gpa: Allocator, |
| 3650 | file_handles: *std.ArrayListUnmanaged(File.Handle), | 3650 | file_handles: *std.ArrayList(File.Handle), |
| 3651 | handle: fs.File, | 3651 | handle: fs.File, |
| 3652 | ) Allocator.Error!File.HandleIndex { | 3652 | ) Allocator.Error!File.HandleIndex { |
| 3653 | try file_handles.append(gpa, handle); | 3653 | try file_handles.append(gpa, handle); |
| ... | @@ -4204,8 +4204,8 @@ pub const Ref = struct { | ... | @@ -4204,8 +4204,8 @@ pub const Ref = struct { |
| 4204 | }; | 4204 | }; |
| 4205 | 4205 | ||
| 4206 | pub const SymbolResolver = struct { | 4206 | pub const SymbolResolver = struct { |
| 4207 | keys: std.ArrayListUnmanaged(Key) = .empty, | 4207 | keys: std.ArrayList(Key) = .empty, |
| 4208 | values: std.ArrayListUnmanaged(Ref) = .empty, | 4208 | values: std.ArrayList(Ref) = .empty, |
| 4209 | table: std.AutoArrayHashMapUnmanaged(void, void) = .empty, | 4209 | table: std.AutoArrayHashMapUnmanaged(void, void) = .empty, |
| 4210 | 4210 | ||
| 4211 | const Result = struct { | 4211 | const Result = struct { |
| ... | @@ -4303,7 +4303,7 @@ const Section = struct { | ... | @@ -4303,7 +4303,7 @@ const Section = struct { |
| 4303 | /// List of atoms contributing to this section. | 4303 | /// List of atoms contributing to this section. |
| 4304 | /// TODO currently this is only used for relocations tracking in relocatable mode | 4304 | /// TODO currently this is only used for relocations tracking in relocatable mode |
| 4305 | /// but will be merged with atom_list_2. | 4305 | /// but will be merged with atom_list_2. |
| 4306 | atom_list: std.ArrayListUnmanaged(Ref) = .empty, | 4306 | atom_list: std.ArrayList(Ref) = .empty, |
| 4307 | 4307 | ||
| 4308 | /// List of atoms contributing to this section. | 4308 | /// List of atoms contributing to this section. |
| 4309 | /// This can be used by sections that require special handling such as init/fini array, etc. | 4309 | /// This can be used by sections that require special handling such as init/fini array, etc. |
| ... | @@ -4327,7 +4327,7 @@ const Section = struct { | ... | @@ -4327,7 +4327,7 @@ const Section = struct { |
| 4327 | /// overcapacity can be negative. A simple way to have negative overcapacity is to | 4327 | /// overcapacity can be negative. A simple way to have negative overcapacity is to |
| 4328 | /// allocate a fresh text block, which will have ideal capacity, and then grow it | 4328 | /// allocate a fresh text block, which will have ideal capacity, and then grow it |
| 4329 | /// by 1 byte. It will then have -1 overcapacity. | 4329 | /// by 1 byte. It will then have -1 overcapacity. |
| 4330 | free_list: std.ArrayListUnmanaged(Ref) = .empty, | 4330 | free_list: std.ArrayList(Ref) = .empty, |
| 4331 | }; | 4331 | }; |
| 4332 | 4332 | ||
| 4333 | pub fn sectionSize(self: *Elf, shndx: u32) u64 { | 4333 | pub 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 { | ... | @@ -11,7 +11,7 @@ pub fn deinit(a: *Archive, gpa: Allocator) void { |
| 11 | pub fn parse( | 11 | pub fn parse( |
| 12 | gpa: Allocator, | 12 | gpa: Allocator, |
| 13 | diags: *Diags, | 13 | diags: *Diags, |
| 14 | file_handles: *const std.ArrayListUnmanaged(File.Handle), | 14 | file_handles: *const std.ArrayList(File.Handle), |
| 15 | path: Path, | 15 | path: Path, |
| 16 | handle_index: File.HandleIndex, | 16 | handle_index: File.HandleIndex, |
| 17 | ) !Archive { | 17 | ) !Archive { |
| ... | @@ -27,10 +27,10 @@ pub fn parse( | ... | @@ -27,10 +27,10 @@ pub fn parse( |
| 27 | 27 | ||
| 28 | const size = (try handle.stat()).size; | 28 | const size = (try handle.stat()).size; |
| 29 | 29 | ||
| 30 | var objects: std.ArrayListUnmanaged(Object) = .empty; | 30 | var objects: std.ArrayList(Object) = .empty; |
| 31 | defer objects.deinit(gpa); | 31 | defer objects.deinit(gpa); |
| 32 | 32 | ||
| 33 | var strtab: std.ArrayListUnmanaged(u8) = .empty; | 33 | var strtab: std.ArrayList(u8) = .empty; |
| 34 | defer strtab.deinit(gpa); | 34 | defer strtab.deinit(gpa); |
| 35 | 35 | ||
| 36 | while (pos < size) { | 36 | while (pos < size) { |
| ... | @@ -145,7 +145,7 @@ const strtab_delimiter = '\n'; | ... | @@ -145,7 +145,7 @@ const strtab_delimiter = '\n'; |
| 145 | pub const max_member_name_len = 15; | 145 | pub const max_member_name_len = 15; |
| 146 | 146 | ||
| 147 | pub const ArSymtab = struct { | 147 | pub const ArSymtab = struct { |
| 148 | symtab: std.ArrayListUnmanaged(Entry) = .empty, | 148 | symtab: std.ArrayList(Entry) = .empty, |
| 149 | strtab: StringTable = .{}, | 149 | strtab: StringTable = .{}, |
| 150 | 150 | ||
| 151 | pub fn deinit(ar: *ArSymtab, allocator: Allocator) void { | 151 | pub fn deinit(ar: *ArSymtab, allocator: Allocator) void { |
| ... | @@ -239,7 +239,7 @@ pub const ArSymtab = struct { | ... | @@ -239,7 +239,7 @@ pub const ArSymtab = struct { |
| 239 | }; | 239 | }; |
| 240 | 240 | ||
| 241 | pub const ArStrtab = struct { | 241 | pub const ArStrtab = struct { |
| 242 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 242 | buffer: std.ArrayList(u8) = .empty, |
| 243 | 243 | ||
| 244 | pub fn deinit(ar: *ArStrtab, allocator: Allocator) void { | 244 | pub fn deinit(ar: *ArStrtab, allocator: Allocator) void { |
| 245 | ar.buffer.deinit(allocator); | 245 | ar.buffer.deinit(allocator); |
src/link/Elf/AtomList.zig+1-1| ... | @@ -2,7 +2,7 @@ value: i64 = 0, | ... | @@ -2,7 +2,7 @@ value: i64 = 0, |
| 2 | size: u64 = 0, | 2 | size: u64 = 0, |
| 3 | alignment: Atom.Alignment = .@"1", | 3 | alignment: Atom.Alignment = .@"1", |
| 4 | output_section_index: u32 = 0, | 4 | output_section_index: u32 = 0, |
| 5 | // atoms: std.ArrayListUnmanaged(Elf.Ref) = .empty, | 5 | // atoms: std.ArrayList(Elf.Ref) = .empty, |
| 6 | atoms: std.AutoArrayHashMapUnmanaged(Elf.Ref, void) = .empty, | 6 | atoms: std.AutoArrayHashMapUnmanaged(Elf.Ref, void) = .empty, |
| 7 | 7 | ||
| 8 | dirty: bool = true, | 8 | dirty: bool = true, |
src/link/Elf/LinkerDefined.zig+6-6| ... | @@ -1,11 +1,11 @@ | ... | @@ -1,11 +1,11 @@ |
| 1 | index: File.Index, | 1 | index: File.Index, |
| 2 | 2 | ||
| 3 | symtab: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty, | 3 | symtab: std.ArrayList(elf.Elf64_Sym) = .empty, |
| 4 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 4 | strtab: std.ArrayList(u8) = .empty, |
| 5 | 5 | ||
| 6 | symbols: std.ArrayListUnmanaged(Symbol) = .empty, | 6 | symbols: std.ArrayList(Symbol) = .empty, |
| 7 | symbols_extra: std.ArrayListUnmanaged(u32) = .empty, | 7 | symbols_extra: std.ArrayList(u32) = .empty, |
| 8 | symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index) = .empty, | 8 | symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index) = .empty, |
| 9 | 9 | ||
| 10 | entry_index: ?Symbol.Index = null, | 10 | entry_index: ?Symbol.Index = null, |
| 11 | dynamic_index: ?Symbol.Index = null, | 11 | dynamic_index: ?Symbol.Index = null, |
| ... | @@ -24,7 +24,7 @@ dso_handle_index: ?Symbol.Index = null, | ... | @@ -24,7 +24,7 @@ dso_handle_index: ?Symbol.Index = null, |
| 24 | rela_iplt_start_index: ?Symbol.Index = null, | 24 | rela_iplt_start_index: ?Symbol.Index = null, |
| 25 | rela_iplt_end_index: ?Symbol.Index = null, | 25 | rela_iplt_end_index: ?Symbol.Index = null, |
| 26 | global_pointer_index: ?Symbol.Index = null, | 26 | global_pointer_index: ?Symbol.Index = null, |
| 27 | start_stop_indexes: std.ArrayListUnmanaged(u32) = .empty, | 27 | start_stop_indexes: std.ArrayList(u32) = .empty, |
| 28 | 28 | ||
| 29 | output_symtab_ctx: Elf.SymtabCtx = .{}, | 29 | output_symtab_ctx: Elf.SymtabCtx = .{}, |
| 30 | 30 |
src/link/Elf/Merge.zig+7-7| ... | @@ -7,15 +7,15 @@ pub const Section = struct { | ... | @@ -7,15 +7,15 @@ pub const Section = struct { |
| 7 | type: u32 = 0, | 7 | type: u32 = 0, |
| 8 | flags: u64 = 0, | 8 | flags: u64 = 0, |
| 9 | output_section_index: u32 = 0, | 9 | output_section_index: u32 = 0, |
| 10 | bytes: std.ArrayListUnmanaged(u8) = .empty, | 10 | bytes: std.ArrayList(u8) = .empty, |
| 11 | table: std.HashMapUnmanaged( | 11 | table: std.HashMapUnmanaged( |
| 12 | String, | 12 | String, |
| 13 | Subsection.Index, | 13 | Subsection.Index, |
| 14 | IndexContext, | 14 | IndexContext, |
| 15 | std.hash_map.default_max_load_percentage, | 15 | std.hash_map.default_max_load_percentage, |
| 16 | ) = .{}, | 16 | ) = .{}, |
| 17 | subsections: std.ArrayListUnmanaged(Subsection) = .empty, | 17 | subsections: std.ArrayList(Subsection) = .empty, |
| 18 | finalized_subsections: std.ArrayListUnmanaged(Subsection.Index) = .empty, | 18 | finalized_subsections: std.ArrayList(Subsection.Index) = .empty, |
| 19 | 19 | ||
| 20 | pub fn deinit(msec: *Section, allocator: Allocator) void { | 20 | pub fn deinit(msec: *Section, allocator: Allocator) void { |
| 21 | msec.bytes.deinit(allocator); | 21 | msec.bytes.deinit(allocator); |
| ... | @@ -240,10 +240,10 @@ pub const Subsection = struct { | ... | @@ -240,10 +240,10 @@ pub const Subsection = struct { |
| 240 | pub const InputSection = struct { | 240 | pub const InputSection = struct { |
| 241 | merge_section_index: Section.Index = 0, | 241 | merge_section_index: Section.Index = 0, |
| 242 | atom_index: Atom.Index = 0, | 242 | atom_index: Atom.Index = 0, |
| 243 | offsets: std.ArrayListUnmanaged(u32) = .empty, | 243 | offsets: std.ArrayList(u32) = .empty, |
| 244 | subsections: std.ArrayListUnmanaged(Subsection.Index) = .empty, | 244 | subsections: std.ArrayList(Subsection.Index) = .empty, |
| 245 | bytes: std.ArrayListUnmanaged(u8) = .empty, | 245 | bytes: std.ArrayList(u8) = .empty, |
| 246 | strings: std.ArrayListUnmanaged(String) = .empty, | 246 | strings: std.ArrayList(String) = .empty, |
| 247 | 247 | ||
| 248 | pub fn deinit(imsec: *InputSection, allocator: Allocator) void { | 248 | pub fn deinit(imsec: *InputSection, allocator: Allocator) void { |
| 249 | imsec.offsets.deinit(allocator); | 249 | imsec.offsets.deinit(allocator); |
src/link/Elf/Object.zig+17-17| ... | @@ -6,29 +6,29 @@ file_handle: File.HandleIndex, | ... | @@ -6,29 +6,29 @@ file_handle: File.HandleIndex, |
| 6 | index: File.Index, | 6 | index: File.Index, |
| 7 | 7 | ||
| 8 | header: ?elf.Elf64_Ehdr = null, | 8 | header: ?elf.Elf64_Ehdr = null, |
| 9 | shdrs: std.ArrayListUnmanaged(elf.Elf64_Shdr) = .empty, | 9 | shdrs: std.ArrayList(elf.Elf64_Shdr) = .empty, |
| 10 | 10 | ||
| 11 | symtab: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty, | 11 | symtab: std.ArrayList(elf.Elf64_Sym) = .empty, |
| 12 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 12 | strtab: std.ArrayList(u8) = .empty, |
| 13 | first_global: ?Symbol.Index = null, | 13 | first_global: ?Symbol.Index = null, |
| 14 | symbols: std.ArrayListUnmanaged(Symbol) = .empty, | 14 | symbols: std.ArrayList(Symbol) = .empty, |
| 15 | symbols_extra: std.ArrayListUnmanaged(u32) = .empty, | 15 | symbols_extra: std.ArrayList(u32) = .empty, |
| 16 | symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index) = .empty, | 16 | symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index) = .empty, |
| 17 | relocs: std.ArrayListUnmanaged(elf.Elf64_Rela) = .empty, | 17 | relocs: std.ArrayList(elf.Elf64_Rela) = .empty, |
| 18 | 18 | ||
| 19 | atoms: std.ArrayListUnmanaged(Atom) = .empty, | 19 | atoms: std.ArrayList(Atom) = .empty, |
| 20 | atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty, | 20 | atoms_indexes: std.ArrayList(Atom.Index) = .empty, |
| 21 | atoms_extra: std.ArrayListUnmanaged(u32) = .empty, | 21 | atoms_extra: std.ArrayList(u32) = .empty, |
| 22 | 22 | ||
| 23 | groups: std.ArrayListUnmanaged(Elf.Group) = .empty, | 23 | groups: std.ArrayList(Elf.Group) = .empty, |
| 24 | group_data: std.ArrayListUnmanaged(u32) = .empty, | 24 | group_data: std.ArrayList(u32) = .empty, |
| 25 | 25 | ||
| 26 | input_merge_sections: std.ArrayListUnmanaged(Merge.InputSection) = .empty, | 26 | input_merge_sections: std.ArrayList(Merge.InputSection) = .empty, |
| 27 | input_merge_sections_indexes: std.ArrayListUnmanaged(Merge.InputSection.Index) = .empty, | 27 | input_merge_sections_indexes: std.ArrayList(Merge.InputSection.Index) = .empty, |
| 28 | 28 | ||
| 29 | fdes: std.ArrayListUnmanaged(Fde) = .empty, | 29 | fdes: std.ArrayList(Fde) = .empty, |
| 30 | cies: std.ArrayListUnmanaged(Cie) = .empty, | 30 | cies: std.ArrayList(Cie) = .empty, |
| 31 | eh_frame_data: std.ArrayListUnmanaged(u8) = .empty, | 31 | eh_frame_data: std.ArrayList(u8) = .empty, |
| 32 | 32 | ||
| 33 | alive: bool = true, | 33 | alive: bool = true, |
| 34 | dirty: bool = true, | 34 | dirty: bool = true, |
src/link/Elf/SharedObject.zig+10-10| ... | @@ -3,11 +3,11 @@ index: File.Index, | ... | @@ -3,11 +3,11 @@ index: File.Index, |
| 3 | 3 | ||
| 4 | parsed: Parsed, | 4 | parsed: Parsed, |
| 5 | 5 | ||
| 6 | symbols: std.ArrayListUnmanaged(Symbol), | 6 | symbols: std.ArrayList(Symbol), |
| 7 | symbols_extra: std.ArrayListUnmanaged(u32), | 7 | symbols_extra: std.ArrayList(u32), |
| 8 | symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index), | 8 | symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index), |
| 9 | 9 | ||
| 10 | aliases: ?std.ArrayListUnmanaged(u32), | 10 | aliases: ?std.ArrayList(u32), |
| 11 | 11 | ||
| 12 | needed: bool, | 12 | needed: bool, |
| 13 | alive: bool, | 13 | alive: bool, |
| ... | @@ -35,7 +35,7 @@ pub const Header = struct { | ... | @@ -35,7 +35,7 @@ pub const Header = struct { |
| 35 | verdef_sect_index: ?u32, | 35 | verdef_sect_index: ?u32, |
| 36 | 36 | ||
| 37 | stat: Stat, | 37 | stat: Stat, |
| 38 | strtab: std.ArrayListUnmanaged(u8), | 38 | strtab: std.ArrayList(u8), |
| 39 | 39 | ||
| 40 | pub fn deinit(header: *Header, gpa: Allocator) void { | 40 | pub fn deinit(header: *Header, gpa: Allocator) void { |
| 41 | gpa.free(header.sections); | 41 | gpa.free(header.sections); |
| ... | @@ -149,7 +149,7 @@ pub fn parseHeader( | ... | @@ -149,7 +149,7 @@ pub fn parseHeader( |
| 149 | } else &.{}; | 149 | } else &.{}; |
| 150 | errdefer gpa.free(dynamic_table); | 150 | errdefer gpa.free(dynamic_table); |
| 151 | 151 | ||
| 152 | var strtab: std.ArrayListUnmanaged(u8) = .empty; | 152 | var strtab: std.ArrayList(u8) = .empty; |
| 153 | errdefer strtab.deinit(gpa); | 153 | errdefer strtab.deinit(gpa); |
| 154 | 154 | ||
| 155 | if (dynsym_sect_index) |index| { | 155 | if (dynsym_sect_index) |index| { |
| ... | @@ -206,7 +206,7 @@ pub fn parse( | ... | @@ -206,7 +206,7 @@ pub fn parse( |
| 206 | } else &.{}; | 206 | } else &.{}; |
| 207 | defer gpa.free(symtab); | 207 | defer gpa.free(symtab); |
| 208 | 208 | ||
| 209 | var verstrings: std.ArrayListUnmanaged(u32) = .empty; | 209 | var verstrings: std.ArrayList(u32) = .empty; |
| 210 | defer verstrings.deinit(gpa); | 210 | defer verstrings.deinit(gpa); |
| 211 | 211 | ||
| 212 | if (header.verdef_sect_index) |shndx| { | 212 | if (header.verdef_sect_index) |shndx| { |
| ... | @@ -243,13 +243,13 @@ pub fn parse( | ... | @@ -243,13 +243,13 @@ pub fn parse( |
| 243 | } else &.{}; | 243 | } else &.{}; |
| 244 | defer gpa.free(versyms); | 244 | defer gpa.free(versyms); |
| 245 | 245 | ||
| 246 | var nonlocal_esyms: std.ArrayListUnmanaged(elf.Elf64_Sym) = .empty; | 246 | var nonlocal_esyms: std.ArrayList(elf.Elf64_Sym) = .empty; |
| 247 | defer nonlocal_esyms.deinit(gpa); | 247 | defer nonlocal_esyms.deinit(gpa); |
| 248 | 248 | ||
| 249 | var nonlocal_versyms: std.ArrayListUnmanaged(elf.Versym) = .empty; | 249 | var nonlocal_versyms: std.ArrayList(elf.Versym) = .empty; |
| 250 | defer nonlocal_versyms.deinit(gpa); | 250 | defer nonlocal_versyms.deinit(gpa); |
| 251 | 251 | ||
| 252 | var nonlocal_symbols: std.ArrayListUnmanaged(Parsed.Symbol) = .empty; | 252 | var nonlocal_symbols: std.ArrayList(Parsed.Symbol) = .empty; |
| 253 | defer nonlocal_symbols.deinit(gpa); | 253 | defer nonlocal_symbols.deinit(gpa); |
| 254 | 254 | ||
| 255 | var strtab = header.strtab; | 255 | var strtab = header.strtab; |
src/link/Elf/ZigObject.zig+12-12| ... | @@ -3,24 +3,24 @@ | ... | @@ -3,24 +3,24 @@ |
| 3 | //! and any relocations that may have been emitted. | 3 | //! and any relocations that may have been emitted. |
| 4 | //! Think about this as fake in-memory Object file for the Zig module. | 4 | //! Think about this as fake in-memory Object file for the Zig module. |
| 5 | 5 | ||
| 6 | data: std.ArrayListUnmanaged(u8) = .empty, | 6 | data: std.ArrayList(u8) = .empty, |
| 7 | /// Externally owned memory. | 7 | /// Externally owned memory. |
| 8 | basename: []const u8, | 8 | basename: []const u8, |
| 9 | index: File.Index, | 9 | index: File.Index, |
| 10 | 10 | ||
| 11 | symtab: std.MultiArrayList(ElfSym) = .{}, | 11 | symtab: std.MultiArrayList(ElfSym) = .{}, |
| 12 | strtab: StringTable = .{}, | 12 | strtab: StringTable = .{}, |
| 13 | symbols: std.ArrayListUnmanaged(Symbol) = .empty, | 13 | symbols: std.ArrayList(Symbol) = .empty, |
| 14 | symbols_extra: std.ArrayListUnmanaged(u32) = .empty, | 14 | symbols_extra: std.ArrayList(u32) = .empty, |
| 15 | symbols_resolver: std.ArrayListUnmanaged(Elf.SymbolResolver.Index) = .empty, | 15 | symbols_resolver: std.ArrayList(Elf.SymbolResolver.Index) = .empty, |
| 16 | local_symbols: std.ArrayListUnmanaged(Symbol.Index) = .empty, | 16 | local_symbols: std.ArrayList(Symbol.Index) = .empty, |
| 17 | global_symbols: std.ArrayListUnmanaged(Symbol.Index) = .empty, | 17 | global_symbols: std.ArrayList(Symbol.Index) = .empty, |
| 18 | globals_lookup: std.AutoHashMapUnmanaged(u32, Symbol.Index) = .empty, | 18 | globals_lookup: std.AutoHashMapUnmanaged(u32, Symbol.Index) = .empty, |
| 19 | 19 | ||
| 20 | atoms: std.ArrayListUnmanaged(Atom) = .empty, | 20 | atoms: std.ArrayList(Atom) = .empty, |
| 21 | atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty, | 21 | atoms_indexes: std.ArrayList(Atom.Index) = .empty, |
| 22 | atoms_extra: std.ArrayListUnmanaged(u32) = .empty, | 22 | atoms_extra: std.ArrayList(u32) = .empty, |
| 23 | relocs: std.ArrayListUnmanaged(std.ArrayListUnmanaged(elf.Elf64_Rela)) = .empty, | 23 | relocs: std.ArrayList(std.ArrayList(elf.Elf64_Rela)) = .empty, |
| 24 | 24 | ||
| 25 | num_dynrelocs: u32 = 0, | 25 | num_dynrelocs: u32 = 0, |
| 26 | 26 | ||
| ... | @@ -2369,7 +2369,7 @@ const LazySymbolMetadata = struct { | ... | @@ -2369,7 +2369,7 @@ const LazySymbolMetadata = struct { |
| 2369 | const AvMetadata = struct { | 2369 | const AvMetadata = struct { |
| 2370 | symbol_index: Symbol.Index, | 2370 | symbol_index: Symbol.Index, |
| 2371 | /// A list of all exports aliases of this Av. | 2371 | /// A list of all exports aliases of this Av. |
| 2372 | exports: std.ArrayListUnmanaged(Symbol.Index) = .empty, | 2372 | exports: std.ArrayList(Symbol.Index) = .empty, |
| 2373 | /// Set to true if the AV has been initialized and allocated. | 2373 | /// Set to true if the AV has been initialized and allocated. |
| 2374 | allocated: bool = false, | 2374 | allocated: bool = false, |
| 2375 | 2375 | ||
| ... | @@ -2417,7 +2417,7 @@ const TlsVariable = struct { | ... | @@ -2417,7 +2417,7 @@ const TlsVariable = struct { |
| 2417 | } | 2417 | } |
| 2418 | }; | 2418 | }; |
| 2419 | 2419 | ||
| 2420 | const AtomList = std.ArrayListUnmanaged(Atom.Index); | 2420 | const AtomList = std.ArrayList(Atom.Index); |
| 2421 | const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata); | 2421 | const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata); |
| 2422 | const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata); | 2422 | const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata); |
| 2423 | const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata); | 2423 | const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata); |
src/link/Elf/synthetic_sections.zig+9-9| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | pub const DynamicSection = struct { | 1 | pub const DynamicSection = struct { |
| 2 | soname: ?u32 = null, | 2 | soname: ?u32 = null, |
| 3 | needed: std.ArrayListUnmanaged(u32) = .empty, | 3 | needed: std.ArrayList(u32) = .empty, |
| 4 | rpath: u32 = 0, | 4 | rpath: u32 = 0, |
| 5 | 5 | ||
| 6 | pub fn deinit(dt: *DynamicSection, allocator: Allocator) void { | 6 | pub fn deinit(dt: *DynamicSection, allocator: Allocator) void { |
| ... | @@ -226,7 +226,7 @@ pub const DynamicSection = struct { | ... | @@ -226,7 +226,7 @@ pub const DynamicSection = struct { |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | pub const GotSection = struct { | 228 | pub const GotSection = struct { |
| 229 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 229 | entries: std.ArrayList(Entry) = .empty, |
| 230 | output_symtab_ctx: Elf.SymtabCtx = .{}, | 230 | output_symtab_ctx: Elf.SymtabCtx = .{}, |
| 231 | tlsld_index: ?u32 = null, | 231 | tlsld_index: ?u32 = null, |
| 232 | flags: Flags = .{}, | 232 | flags: Flags = .{}, |
| ... | @@ -628,7 +628,7 @@ pub const GotSection = struct { | ... | @@ -628,7 +628,7 @@ pub const GotSection = struct { |
| 628 | }; | 628 | }; |
| 629 | 629 | ||
| 630 | pub const PltSection = struct { | 630 | pub const PltSection = struct { |
| 631 | symbols: std.ArrayListUnmanaged(Elf.Ref) = .empty, | 631 | symbols: std.ArrayList(Elf.Ref) = .empty, |
| 632 | output_symtab_ctx: Elf.SymtabCtx = .{}, | 632 | output_symtab_ctx: Elf.SymtabCtx = .{}, |
| 633 | 633 | ||
| 634 | pub fn deinit(plt: *PltSection, allocator: Allocator) void { | 634 | pub fn deinit(plt: *PltSection, allocator: Allocator) void { |
| ... | @@ -875,7 +875,7 @@ pub const GotPltSection = struct { | ... | @@ -875,7 +875,7 @@ pub const GotPltSection = struct { |
| 875 | }; | 875 | }; |
| 876 | 876 | ||
| 877 | pub const PltGotSection = struct { | 877 | pub const PltGotSection = struct { |
| 878 | symbols: std.ArrayListUnmanaged(Elf.Ref) = .empty, | 878 | symbols: std.ArrayList(Elf.Ref) = .empty, |
| 879 | output_symtab_ctx: Elf.SymtabCtx = .{}, | 879 | output_symtab_ctx: Elf.SymtabCtx = .{}, |
| 880 | 880 | ||
| 881 | pub fn deinit(plt_got: *PltGotSection, allocator: Allocator) void { | 881 | pub fn deinit(plt_got: *PltGotSection, allocator: Allocator) void { |
| ... | @@ -981,7 +981,7 @@ pub const PltGotSection = struct { | ... | @@ -981,7 +981,7 @@ pub const PltGotSection = struct { |
| 981 | }; | 981 | }; |
| 982 | 982 | ||
| 983 | pub const CopyRelSection = struct { | 983 | pub const CopyRelSection = struct { |
| 984 | symbols: std.ArrayListUnmanaged(Elf.Ref) = .empty, | 984 | symbols: std.ArrayList(Elf.Ref) = .empty, |
| 985 | 985 | ||
| 986 | pub fn deinit(copy_rel: *CopyRelSection, allocator: Allocator) void { | 986 | pub fn deinit(copy_rel: *CopyRelSection, allocator: Allocator) void { |
| 987 | copy_rel.symbols.deinit(allocator); | 987 | copy_rel.symbols.deinit(allocator); |
| ... | @@ -1062,7 +1062,7 @@ pub const CopyRelSection = struct { | ... | @@ -1062,7 +1062,7 @@ pub const CopyRelSection = struct { |
| 1062 | }; | 1062 | }; |
| 1063 | 1063 | ||
| 1064 | pub const DynsymSection = struct { | 1064 | pub const DynsymSection = struct { |
| 1065 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 1065 | entries: std.ArrayList(Entry) = .empty, |
| 1066 | 1066 | ||
| 1067 | pub const Entry = struct { | 1067 | pub const Entry = struct { |
| 1068 | /// Ref of the symbol which gets privilege of getting a dynamic treatment | 1068 | /// Ref of the symbol which gets privilege of getting a dynamic treatment |
| ... | @@ -1146,7 +1146,7 @@ pub const DynsymSection = struct { | ... | @@ -1146,7 +1146,7 @@ pub const DynsymSection = struct { |
| 1146 | }; | 1146 | }; |
| 1147 | 1147 | ||
| 1148 | pub const HashSection = struct { | 1148 | pub const HashSection = struct { |
| 1149 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 1149 | buffer: std.ArrayList(u8) = .empty, |
| 1150 | 1150 | ||
| 1151 | pub fn deinit(hs: *HashSection, allocator: Allocator) void { | 1151 | pub fn deinit(hs: *HashSection, allocator: Allocator) void { |
| 1152 | hs.buffer.deinit(allocator); | 1152 | hs.buffer.deinit(allocator); |
| ... | @@ -1307,8 +1307,8 @@ pub const GnuHashSection = struct { | ... | @@ -1307,8 +1307,8 @@ pub const GnuHashSection = struct { |
| 1307 | }; | 1307 | }; |
| 1308 | 1308 | ||
| 1309 | pub const VerneedSection = struct { | 1309 | pub const VerneedSection = struct { |
| 1310 | verneed: std.ArrayListUnmanaged(elf.Elf64_Verneed) = .empty, | 1310 | verneed: std.ArrayList(elf.Elf64_Verneed) = .empty, |
| 1311 | vernaux: std.ArrayListUnmanaged(elf.Vernaux) = .empty, | 1311 | vernaux: std.ArrayList(elf.Vernaux) = .empty, |
| 1312 | index: elf.Versym = .{ .VERSION = elf.Versym.GLOBAL.VERSION + 1, .HIDDEN = false }, | 1312 | index: elf.Versym = .{ .VERSION = elf.Versym.GLOBAL.VERSION + 1, .HIDDEN = false }, |
| 1313 | 1313 | ||
| 1314 | pub fn deinit(vern: *VerneedSection, allocator: Allocator) void { | 1314 | pub fn deinit(vern: *VerneedSection, allocator: Allocator) void { |
src/link/LdScript.zig+3-3| ... | @@ -26,9 +26,9 @@ pub fn parse( | ... | @@ -26,9 +26,9 @@ pub fn parse( |
| 26 | data: []const u8, | 26 | data: []const u8, |
| 27 | ) Error!LdScript { | 27 | ) Error!LdScript { |
| 28 | var tokenizer = Tokenizer{ .source = data }; | 28 | var tokenizer = Tokenizer{ .source = data }; |
| 29 | var tokens: std.ArrayListUnmanaged(Token) = .empty; | 29 | var tokens: std.ArrayList(Token) = .empty; |
| 30 | defer tokens.deinit(gpa); | 30 | defer tokens.deinit(gpa); |
| 31 | var line_col: std.ArrayListUnmanaged(LineColumn) = .empty; | 31 | var line_col: std.ArrayList(LineColumn) = .empty; |
| 32 | defer line_col.deinit(gpa); | 32 | defer line_col.deinit(gpa); |
| 33 | 33 | ||
| 34 | var line: usize = 0; | 34 | var line: usize = 0; |
| ... | @@ -117,7 +117,7 @@ const Parser = struct { | ... | @@ -117,7 +117,7 @@ const Parser = struct { |
| 117 | it: *TokenIterator, | 117 | it: *TokenIterator, |
| 118 | 118 | ||
| 119 | cpu_arch: ?std.Target.Cpu.Arch, | 119 | cpu_arch: ?std.Target.Cpu.Arch, |
| 120 | args: std.ArrayListUnmanaged(Arg), | 120 | args: std.ArrayList(Arg), |
| 121 | 121 | ||
| 122 | fn start(parser: *Parser) !void { | 122 | fn start(parser: *Parser) !void { |
| 123 | while (true) { | 123 | while (true) { |
src/link/Lld.zig+1-1| ... | @@ -312,7 +312,7 @@ fn linkAsArchive(lld: *Lld, arena: Allocator) !void { | ... | @@ -312,7 +312,7 @@ fn linkAsArchive(lld: *Lld, arena: Allocator) !void { |
| 312 | 312 | ||
| 313 | const link_inputs = comp.link_inputs; | 313 | const link_inputs = comp.link_inputs; |
| 314 | 314 | ||
| 315 | var object_files: std.ArrayListUnmanaged([*:0]const u8) = .empty; | 315 | var object_files: std.ArrayList([*:0]const u8) = .empty; |
| 316 | 316 | ||
| 317 | try object_files.ensureUnusedCapacity(arena, link_inputs.len); | 317 | try object_files.ensureUnusedCapacity(arena, link_inputs.len); |
| 318 | for (link_inputs) |input| { | 318 | for (link_inputs) |input| { |
src/link/MachO.zig+19-19| ... | @@ -16,13 +16,13 @@ files: std.MultiArrayList(File.Entry) = .{}, | ... | @@ -16,13 +16,13 @@ files: std.MultiArrayList(File.Entry) = .{}, |
| 16 | /// Long-lived list of all file descriptors. | 16 | /// Long-lived list of all file descriptors. |
| 17 | /// We store them globally rather than per actual File so that we can re-use | 17 | /// We store them globally rather than per actual File so that we can re-use |
| 18 | /// one file handle per every object file within an archive. | 18 | /// one file handle per every object file within an archive. |
| 19 | file_handles: std.ArrayListUnmanaged(File.Handle) = .empty, | 19 | file_handles: std.ArrayList(File.Handle) = .empty, |
| 20 | zig_object: ?File.Index = null, | 20 | zig_object: ?File.Index = null, |
| 21 | internal_object: ?File.Index = null, | 21 | internal_object: ?File.Index = null, |
| 22 | objects: std.ArrayListUnmanaged(File.Index) = .empty, | 22 | objects: std.ArrayList(File.Index) = .empty, |
| 23 | dylibs: std.ArrayListUnmanaged(File.Index) = .empty, | 23 | dylibs: std.ArrayList(File.Index) = .empty, |
| 24 | 24 | ||
| 25 | segments: std.ArrayListUnmanaged(macho.segment_command_64) = .empty, | 25 | segments: std.ArrayList(macho.segment_command_64) = .empty, |
| 26 | sections: std.MultiArrayList(Section) = .{}, | 26 | sections: std.MultiArrayList(Section) = .{}, |
| 27 | 27 | ||
| 28 | resolver: SymbolResolver = .{}, | 28 | resolver: SymbolResolver = .{}, |
| ... | @@ -30,7 +30,7 @@ resolver: SymbolResolver = .{}, | ... | @@ -30,7 +30,7 @@ resolver: SymbolResolver = .{}, |
| 30 | /// Key is symbol index. | 30 | /// Key is symbol index. |
| 31 | undefs: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, UndefRefs) = .empty, | 31 | undefs: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, UndefRefs) = .empty, |
| 32 | undefs_mutex: std.Thread.Mutex = .{}, | 32 | undefs_mutex: std.Thread.Mutex = .{}, |
| 33 | dupes: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, std.ArrayListUnmanaged(File.Index)) = .empty, | 33 | dupes: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, std.ArrayList(File.Index)) = .empty, |
| 34 | dupes_mutex: std.Thread.Mutex = .{}, | 34 | dupes_mutex: std.Thread.Mutex = .{}, |
| 35 | 35 | ||
| 36 | dyld_info_cmd: macho.dyld_info_command = .{}, | 36 | dyld_info_cmd: macho.dyld_info_command = .{}, |
| ... | @@ -55,11 +55,11 @@ eh_frame_sect_index: ?u8 = null, | ... | @@ -55,11 +55,11 @@ eh_frame_sect_index: ?u8 = null, |
| 55 | unwind_info_sect_index: ?u8 = null, | 55 | unwind_info_sect_index: ?u8 = null, |
| 56 | objc_stubs_sect_index: ?u8 = null, | 56 | objc_stubs_sect_index: ?u8 = null, |
| 57 | 57 | ||
| 58 | thunks: std.ArrayListUnmanaged(Thunk) = .empty, | 58 | thunks: std.ArrayList(Thunk) = .empty, |
| 59 | 59 | ||
| 60 | /// Output synthetic sections | 60 | /// Output synthetic sections |
| 61 | symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty, | 61 | symtab: std.ArrayList(macho.nlist_64) = .empty, |
| 62 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 62 | strtab: std.ArrayList(u8) = .empty, |
| 63 | indsymtab: Indsymtab = .{}, | 63 | indsymtab: Indsymtab = .{}, |
| 64 | got: GotSection = .{}, | 64 | got: GotSection = .{}, |
| 65 | stubs: StubsSection = .{}, | 65 | stubs: StubsSection = .{}, |
| ... | @@ -4041,19 +4041,19 @@ const default_entry_symbol_name = "_main"; | ... | @@ -4041,19 +4041,19 @@ const default_entry_symbol_name = "_main"; |
| 4041 | const Section = struct { | 4041 | const Section = struct { |
| 4042 | header: macho.section_64, | 4042 | header: macho.section_64, |
| 4043 | segment_id: u8, | 4043 | segment_id: u8, |
| 4044 | atoms: std.ArrayListUnmanaged(Ref) = .empty, | 4044 | atoms: std.ArrayList(Ref) = .empty, |
| 4045 | free_list: std.ArrayListUnmanaged(Atom.Index) = .empty, | 4045 | free_list: std.ArrayList(Atom.Index) = .empty, |
| 4046 | last_atom_index: Atom.Index = 0, | 4046 | last_atom_index: Atom.Index = 0, |
| 4047 | thunks: std.ArrayListUnmanaged(Thunk.Index) = .empty, | 4047 | thunks: std.ArrayList(Thunk.Index) = .empty, |
| 4048 | out: std.ArrayListUnmanaged(u8) = .empty, | 4048 | out: std.ArrayList(u8) = .empty, |
| 4049 | relocs: std.ArrayListUnmanaged(macho.relocation_info) = .empty, | 4049 | relocs: std.ArrayList(macho.relocation_info) = .empty, |
| 4050 | }; | 4050 | }; |
| 4051 | 4051 | ||
| 4052 | pub const LiteralPool = struct { | 4052 | pub const LiteralPool = struct { |
| 4053 | table: std.AutoArrayHashMapUnmanaged(void, void) = .empty, | 4053 | table: std.AutoArrayHashMapUnmanaged(void, void) = .empty, |
| 4054 | keys: std.ArrayListUnmanaged(Key) = .empty, | 4054 | keys: std.ArrayList(Key) = .empty, |
| 4055 | values: std.ArrayListUnmanaged(MachO.Ref) = .empty, | 4055 | values: std.ArrayList(MachO.Ref) = .empty, |
| 4056 | data: std.ArrayListUnmanaged(u8) = .empty, | 4056 | data: std.ArrayList(u8) = .empty, |
| 4057 | 4057 | ||
| 4058 | pub fn deinit(lp: *LiteralPool, allocator: Allocator) void { | 4058 | pub fn deinit(lp: *LiteralPool, allocator: Allocator) void { |
| 4059 | lp.table.deinit(allocator); | 4059 | lp.table.deinit(allocator); |
| ... | @@ -4485,8 +4485,8 @@ pub const Ref = struct { | ... | @@ -4485,8 +4485,8 @@ pub const Ref = struct { |
| 4485 | }; | 4485 | }; |
| 4486 | 4486 | ||
| 4487 | pub const SymbolResolver = struct { | 4487 | pub const SymbolResolver = struct { |
| 4488 | keys: std.ArrayListUnmanaged(Key) = .empty, | 4488 | keys: std.ArrayList(Key) = .empty, |
| 4489 | values: std.ArrayListUnmanaged(Ref) = .empty, | 4489 | values: std.ArrayList(Ref) = .empty, |
| 4490 | table: std.AutoArrayHashMapUnmanaged(void, void) = .empty, | 4490 | table: std.AutoArrayHashMapUnmanaged(void, void) = .empty, |
| 4491 | 4491 | ||
| 4492 | const Result = struct { | 4492 | const Result = struct { |
| ... | @@ -4586,7 +4586,7 @@ pub const UndefRefs = union(enum) { | ... | @@ -4586,7 +4586,7 @@ pub const UndefRefs = union(enum) { |
| 4586 | entry, | 4586 | entry, |
| 4587 | dyld_stub_binder, | 4587 | dyld_stub_binder, |
| 4588 | objc_msgsend, | 4588 | objc_msgsend, |
| 4589 | refs: std.ArrayListUnmanaged(Ref), | 4589 | refs: std.ArrayList(Ref), |
| 4590 | 4590 | ||
| 4591 | pub fn deinit(self: *UndefRefs, allocator: Allocator) void { | 4591 | pub fn deinit(self: *UndefRefs, allocator: Allocator) void { |
| 4592 | switch (self.*) { | 4592 | switch (self.*) { |
src/link/MachO/Archive.zig+2-2| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | objects: std.ArrayListUnmanaged(Object) = .empty, | 1 | objects: std.ArrayList(Object) = .empty, |
| 2 | 2 | ||
| 3 | pub fn deinit(self: *Archive, allocator: Allocator) void { | 3 | pub fn deinit(self: *Archive, allocator: Allocator) void { |
| 4 | self.objects.deinit(allocator); | 4 | self.objects.deinit(allocator); |
| ... | @@ -172,7 +172,7 @@ pub const ar_hdr = extern struct { | ... | @@ -172,7 +172,7 @@ pub const ar_hdr = extern struct { |
| 172 | }; | 172 | }; |
| 173 | 173 | ||
| 174 | pub const ArSymtab = struct { | 174 | pub const ArSymtab = struct { |
| 175 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 175 | entries: std.ArrayList(Entry) = .empty, |
| 176 | strtab: StringTable = .{}, | 176 | strtab: StringTable = .{}, |
| 177 | 177 | ||
| 178 | pub fn deinit(ar: *ArSymtab, allocator: Allocator) void { | 178 | pub fn deinit(ar: *ArSymtab, allocator: Allocator) void { |
src/link/MachO/CodeSignature.zig+1-1| ... | @@ -53,7 +53,7 @@ const CodeDirectory = struct { | ... | @@ -53,7 +53,7 @@ const CodeDirectory = struct { |
| 53 | inner: macho.CodeDirectory, | 53 | inner: macho.CodeDirectory, |
| 54 | ident: []const u8, | 54 | ident: []const u8, |
| 55 | special_slots: [n_special_slots][hash_size]u8, | 55 | 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, |
| 57 | 57 | ||
| 58 | const n_special_slots: usize = 7; | 58 | const n_special_slots: usize = 7; |
| 59 | 59 |
src/link/MachO/DebugSymbols.zig+5-5| ... | @@ -4,8 +4,8 @@ file: ?fs.File, | ... | @@ -4,8 +4,8 @@ file: ?fs.File, |
| 4 | symtab_cmd: macho.symtab_command = .{}, | 4 | symtab_cmd: macho.symtab_command = .{}, |
| 5 | uuid_cmd: macho.uuid_command = .{ .uuid = [_]u8{0} ** 16 }, | 5 | uuid_cmd: macho.uuid_command = .{ .uuid = [_]u8{0} ** 16 }, |
| 6 | 6 | ||
| 7 | segments: std.ArrayListUnmanaged(macho.segment_command_64) = .empty, | 7 | segments: std.ArrayList(macho.segment_command_64) = .empty, |
| 8 | sections: std.ArrayListUnmanaged(macho.section_64) = .empty, | 8 | sections: std.ArrayList(macho.section_64) = .empty, |
| 9 | 9 | ||
| 10 | dwarf_segment_cmd_index: ?u8 = null, | 10 | dwarf_segment_cmd_index: ?u8 = null, |
| 11 | linkedit_segment_cmd_index: ?u8 = null, | 11 | linkedit_segment_cmd_index: ?u8 = null, |
| ... | @@ -19,11 +19,11 @@ debug_line_str_section_index: ?u8 = null, | ... | @@ -19,11 +19,11 @@ debug_line_str_section_index: ?u8 = null, |
| 19 | debug_loclists_section_index: ?u8 = null, | 19 | debug_loclists_section_index: ?u8 = null, |
| 20 | debug_rnglists_section_index: ?u8 = null, | 20 | debug_rnglists_section_index: ?u8 = null, |
| 21 | 21 | ||
| 22 | relocs: std.ArrayListUnmanaged(Reloc) = .empty, | 22 | relocs: std.ArrayList(Reloc) = .empty, |
| 23 | 23 | ||
| 24 | /// Output synthetic sections | 24 | /// Output synthetic sections |
| 25 | symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty, | 25 | symtab: std.ArrayList(macho.nlist_64) = .empty, |
| 26 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 26 | strtab: std.ArrayList(u8) = .empty, |
| 27 | 27 | ||
| 28 | pub const Reloc = struct { | 28 | pub const Reloc = struct { |
| 29 | type: enum { | 29 | type: enum { |
src/link/MachO/Dylib.zig+6-6| ... | @@ -6,14 +6,14 @@ file_handle: File.HandleIndex, | ... | @@ -6,14 +6,14 @@ file_handle: File.HandleIndex, |
| 6 | tag: enum { dylib, tbd }, | 6 | tag: enum { dylib, tbd }, |
| 7 | 7 | ||
| 8 | exports: std.MultiArrayList(Export) = .{}, | 8 | exports: std.MultiArrayList(Export) = .{}, |
| 9 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 9 | strtab: std.ArrayList(u8) = .empty, |
| 10 | id: ?Id = null, | 10 | id: ?Id = null, |
| 11 | ordinal: u16 = 0, | 11 | ordinal: u16 = 0, |
| 12 | 12 | ||
| 13 | symbols: std.ArrayListUnmanaged(Symbol) = .empty, | 13 | symbols: std.ArrayList(Symbol) = .empty, |
| 14 | symbols_extra: std.ArrayListUnmanaged(u32) = .empty, | 14 | symbols_extra: std.ArrayList(u32) = .empty, |
| 15 | globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty, | 15 | globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty, |
| 16 | dependents: std.ArrayListUnmanaged(Id) = .empty, | 16 | dependents: std.ArrayList(Id) = .empty, |
| 17 | rpaths: std.StringArrayHashMapUnmanaged(void) = .empty, | 17 | rpaths: std.StringArrayHashMapUnmanaged(void) = .empty, |
| 18 | umbrella: File.Index, | 18 | umbrella: File.Index, |
| 19 | platform: ?MachO.Platform = null, | 19 | platform: ?MachO.Platform = null, |
| ... | @@ -695,7 +695,7 @@ pub const TargetMatcher = struct { | ... | @@ -695,7 +695,7 @@ pub const TargetMatcher = struct { |
| 695 | allocator: Allocator, | 695 | allocator: Allocator, |
| 696 | cpu_arch: std.Target.Cpu.Arch, | 696 | cpu_arch: std.Target.Cpu.Arch, |
| 697 | platform: macho.PLATFORM, | 697 | platform: macho.PLATFORM, |
| 698 | target_strings: std.ArrayListUnmanaged([]const u8) = .empty, | 698 | target_strings: std.ArrayList([]const u8) = .empty, |
| 699 | 699 | ||
| 700 | pub fn init(allocator: Allocator, cpu_arch: std.Target.Cpu.Arch, platform: macho.PLATFORM) !TargetMatcher { | 700 | pub fn init(allocator: Allocator, cpu_arch: std.Target.Cpu.Arch, platform: macho.PLATFORM) !TargetMatcher { |
| 701 | var self = TargetMatcher{ | 701 | var self = TargetMatcher{ |
src/link/MachO/InternalObject.zig+13-13| ... | @@ -1,19 +1,19 @@ | ... | @@ -1,19 +1,19 @@ |
| 1 | index: File.Index, | 1 | index: File.Index, |
| 2 | 2 | ||
| 3 | sections: std.MultiArrayList(Section) = .{}, | 3 | sections: std.MultiArrayList(Section) = .{}, |
| 4 | atoms: std.ArrayListUnmanaged(Atom) = .empty, | 4 | atoms: std.ArrayList(Atom) = .empty, |
| 5 | atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty, | 5 | atoms_indexes: std.ArrayList(Atom.Index) = .empty, |
| 6 | atoms_extra: std.ArrayListUnmanaged(u32) = .empty, | 6 | atoms_extra: std.ArrayList(u32) = .empty, |
| 7 | symtab: std.ArrayListUnmanaged(macho.nlist_64) = .empty, | 7 | symtab: std.ArrayList(macho.nlist_64) = .empty, |
| 8 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 8 | strtab: std.ArrayList(u8) = .empty, |
| 9 | symbols: std.ArrayListUnmanaged(Symbol) = .empty, | 9 | symbols: std.ArrayList(Symbol) = .empty, |
| 10 | symbols_extra: std.ArrayListUnmanaged(u32) = .empty, | 10 | symbols_extra: std.ArrayList(u32) = .empty, |
| 11 | globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty, | 11 | globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty, |
| 12 | 12 | ||
| 13 | objc_methnames: std.ArrayListUnmanaged(u8) = .empty, | 13 | objc_methnames: std.ArrayList(u8) = .empty, |
| 14 | objc_selrefs: [@sizeOf(u64)]u8 = [_]u8{0} ** @sizeOf(u64), | 14 | objc_selrefs: [@sizeOf(u64)]u8 = [_]u8{0} ** @sizeOf(u64), |
| 15 | 15 | ||
| 16 | force_undefined: std.ArrayListUnmanaged(Symbol.Index) = .empty, | 16 | force_undefined: std.ArrayList(Symbol.Index) = .empty, |
| 17 | entry_index: ?Symbol.Index = null, | 17 | entry_index: ?Symbol.Index = null, |
| 18 | dyld_stub_binder_index: ?Symbol.Index = null, | 18 | dyld_stub_binder_index: ?Symbol.Index = null, |
| 19 | dyld_private_index: ?Symbol.Index = null, | 19 | dyld_private_index: ?Symbol.Index = null, |
| ... | @@ -21,7 +21,7 @@ objc_msg_send_index: ?Symbol.Index = null, | ... | @@ -21,7 +21,7 @@ objc_msg_send_index: ?Symbol.Index = null, |
| 21 | mh_execute_header_index: ?Symbol.Index = null, | 21 | mh_execute_header_index: ?Symbol.Index = null, |
| 22 | mh_dylib_header_index: ?Symbol.Index = null, | 22 | mh_dylib_header_index: ?Symbol.Index = null, |
| 23 | dso_handle_index: ?Symbol.Index = null, | 23 | dso_handle_index: ?Symbol.Index = null, |
| 24 | boundary_symbols: std.ArrayListUnmanaged(Symbol.Index) = .empty, | 24 | boundary_symbols: std.ArrayList(Symbol.Index) = .empty, |
| 25 | 25 | ||
| 26 | output_symtab_ctx: MachO.SymtabCtx = .{}, | 26 | output_symtab_ctx: MachO.SymtabCtx = .{}, |
| 27 | 27 | ||
| ... | @@ -880,7 +880,7 @@ pub fn fmtSymtab(self: *InternalObject, macho_file: *MachO) std.fmt.Alt(Format, | ... | @@ -880,7 +880,7 @@ pub fn fmtSymtab(self: *InternalObject, macho_file: *MachO) std.fmt.Alt(Format, |
| 880 | 880 | ||
| 881 | const Section = struct { | 881 | const Section = struct { |
| 882 | header: macho.section_64, | 882 | header: macho.section_64, |
| 883 | relocs: std.ArrayListUnmanaged(Relocation) = .empty, | 883 | relocs: std.ArrayList(Relocation) = .empty, |
| 884 | extra: Extra = .{}, | 884 | extra: Extra = .{}, |
| 885 | 885 | ||
| 886 | const Extra = packed struct { | 886 | const Extra = packed struct { |
src/link/MachO/Object.zig+19-19| ... | @@ -12,27 +12,27 @@ in_archive: ?InArchive = null, | ... | @@ -12,27 +12,27 @@ in_archive: ?InArchive = null, |
| 12 | header: ?macho.mach_header_64 = null, | 12 | header: ?macho.mach_header_64 = null, |
| 13 | sections: std.MultiArrayList(Section) = .{}, | 13 | sections: std.MultiArrayList(Section) = .{}, |
| 14 | symtab: std.MultiArrayList(Nlist) = .{}, | 14 | symtab: std.MultiArrayList(Nlist) = .{}, |
| 15 | strtab: std.ArrayListUnmanaged(u8) = .empty, | 15 | strtab: std.ArrayList(u8) = .empty, |
| 16 | 16 | ||
| 17 | symbols: std.ArrayListUnmanaged(Symbol) = .empty, | 17 | symbols: std.ArrayList(Symbol) = .empty, |
| 18 | symbols_extra: std.ArrayListUnmanaged(u32) = .empty, | 18 | symbols_extra: std.ArrayList(u32) = .empty, |
| 19 | globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty, | 19 | globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty, |
| 20 | atoms: std.ArrayListUnmanaged(Atom) = .empty, | 20 | atoms: std.ArrayList(Atom) = .empty, |
| 21 | atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty, | 21 | atoms_indexes: std.ArrayList(Atom.Index) = .empty, |
| 22 | atoms_extra: std.ArrayListUnmanaged(u32) = .empty, | 22 | atoms_extra: std.ArrayList(u32) = .empty, |
| 23 | 23 | ||
| 24 | platform: ?MachO.Platform = null, | 24 | platform: ?MachO.Platform = null, |
| 25 | compile_unit: ?CompileUnit = null, | 25 | compile_unit: ?CompileUnit = null, |
| 26 | stab_files: std.ArrayListUnmanaged(StabFile) = .empty, | 26 | stab_files: std.ArrayList(StabFile) = .empty, |
| 27 | 27 | ||
| 28 | eh_frame_sect_index: ?u8 = null, | 28 | eh_frame_sect_index: ?u8 = null, |
| 29 | compact_unwind_sect_index: ?u8 = null, | 29 | compact_unwind_sect_index: ?u8 = null, |
| 30 | cies: std.ArrayListUnmanaged(Cie) = .empty, | 30 | cies: std.ArrayList(Cie) = .empty, |
| 31 | fdes: std.ArrayListUnmanaged(Fde) = .empty, | 31 | fdes: std.ArrayList(Fde) = .empty, |
| 32 | eh_frame_data: std.ArrayListUnmanaged(u8) = .empty, | 32 | eh_frame_data: std.ArrayList(u8) = .empty, |
| 33 | unwind_records: std.ArrayListUnmanaged(UnwindInfo.Record) = .empty, | 33 | unwind_records: std.ArrayList(UnwindInfo.Record) = .empty, |
| 34 | unwind_records_indexes: std.ArrayListUnmanaged(UnwindInfo.Record.Index) = .empty, | 34 | unwind_records_indexes: std.ArrayList(UnwindInfo.Record.Index) = .empty, |
| 35 | data_in_code: std.ArrayListUnmanaged(macho.data_in_code_entry) = .empty, | 35 | data_in_code: std.ArrayList(macho.data_in_code_entry) = .empty, |
| 36 | 36 | ||
| 37 | alive: bool = true, | 37 | alive: bool = true, |
| 38 | hidden: bool = false, | 38 | hidden: bool = false, |
| ... | @@ -2603,8 +2603,8 @@ fn formatPath(object: Object, w: *Writer) Writer.Error!void { | ... | @@ -2603,8 +2603,8 @@ fn formatPath(object: Object, w: *Writer) Writer.Error!void { |
| 2603 | 2603 | ||
| 2604 | const Section = struct { | 2604 | const Section = struct { |
| 2605 | header: macho.section_64, | 2605 | header: macho.section_64, |
| 2606 | subsections: std.ArrayListUnmanaged(Subsection) = .empty, | 2606 | subsections: std.ArrayList(Subsection) = .empty, |
| 2607 | relocs: std.ArrayListUnmanaged(Relocation) = .empty, | 2607 | relocs: std.ArrayList(Relocation) = .empty, |
| 2608 | }; | 2608 | }; |
| 2609 | 2609 | ||
| 2610 | const Subsection = struct { | 2610 | const Subsection = struct { |
| ... | @@ -2620,7 +2620,7 @@ pub const Nlist = struct { | ... | @@ -2620,7 +2620,7 @@ pub const Nlist = struct { |
| 2620 | 2620 | ||
| 2621 | const StabFile = struct { | 2621 | const StabFile = struct { |
| 2622 | comp_dir: u32, | 2622 | comp_dir: u32, |
| 2623 | stabs: std.ArrayListUnmanaged(Stab) = .empty, | 2623 | stabs: std.ArrayList(Stab) = .empty, |
| 2624 | 2624 | ||
| 2625 | fn getCompDir(sf: StabFile, object: Object) [:0]const u8 { | 2625 | fn getCompDir(sf: StabFile, object: Object) [:0]const u8 { |
| 2626 | const nlist = object.symtab.items(.nlist)[sf.comp_dir]; | 2626 | const nlist = object.symtab.items(.nlist)[sf.comp_dir]; |
| ... | @@ -2706,7 +2706,7 @@ const x86_64 = struct { | ... | @@ -2706,7 +2706,7 @@ const x86_64 = struct { |
| 2706 | self: *Object, | 2706 | self: *Object, |
| 2707 | n_sect: u8, | 2707 | n_sect: u8, |
| 2708 | sect: macho.section_64, | 2708 | sect: macho.section_64, |
| 2709 | out: *std.ArrayListUnmanaged(Relocation), | 2709 | out: *std.ArrayList(Relocation), |
| 2710 | handle: File.Handle, | 2710 | handle: File.Handle, |
| 2711 | macho_file: *MachO, | 2711 | macho_file: *MachO, |
| 2712 | ) !void { | 2712 | ) !void { |
| ... | @@ -2873,7 +2873,7 @@ const aarch64 = struct { | ... | @@ -2873,7 +2873,7 @@ const aarch64 = struct { |
| 2873 | self: *Object, | 2873 | self: *Object, |
| 2874 | n_sect: u8, | 2874 | n_sect: u8, |
| 2875 | sect: macho.section_64, | 2875 | sect: macho.section_64, |
| 2876 | out: *std.ArrayListUnmanaged(Relocation), | 2876 | out: *std.ArrayList(Relocation), |
| 2877 | handle: File.Handle, | 2877 | handle: File.Handle, |
| 2878 | macho_file: *MachO, | 2878 | macho_file: *MachO, |
| 2879 | ) !void { | 2879 | ) !void { |
src/link/MachO/UnwindInfo.zig+4-4| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | /// List of all unwind records gathered from all objects and sorted | 1 | /// List of all unwind records gathered from all objects and sorted |
| 2 | /// by allocated relative function address within the section. | 2 | /// by allocated relative function address within the section. |
| 3 | records: std.ArrayListUnmanaged(Record.Ref) = .empty, | 3 | records: std.ArrayList(Record.Ref) = .empty, |
| 4 | 4 | ||
| 5 | /// List of all personalities referenced by either unwind info entries | 5 | /// List of all personalities referenced by either unwind info entries |
| 6 | /// or __eh_frame entries. | 6 | /// or __eh_frame entries. |
| ... | @@ -12,11 +12,11 @@ common_encodings: [max_common_encodings]Encoding = undefined, | ... | @@ -12,11 +12,11 @@ common_encodings: [max_common_encodings]Encoding = undefined, |
| 12 | common_encodings_count: u7 = 0, | 12 | common_encodings_count: u7 = 0, |
| 13 | 13 | ||
| 14 | /// List of record indexes containing an LSDA pointer. | 14 | /// List of record indexes containing an LSDA pointer. |
| 15 | lsdas: std.ArrayListUnmanaged(u32) = .empty, | 15 | lsdas: std.ArrayList(u32) = .empty, |
| 16 | lsdas_lookup: std.ArrayListUnmanaged(u32) = .empty, | 16 | lsdas_lookup: std.ArrayList(u32) = .empty, |
| 17 | 17 | ||
| 18 | /// List of second level pages. | 18 | /// List of second level pages. |
| 19 | pages: std.ArrayListUnmanaged(Page) = .empty, | 19 | pages: std.ArrayList(Page) = .empty, |
| 20 | 20 | ||
| 21 | pub fn deinit(info: *UnwindInfo, allocator: Allocator) void { | 21 | pub fn deinit(info: *UnwindInfo, allocator: Allocator) void { |
| 22 | info.records.deinit(allocator); | 22 | info.records.deinit(allocator); |
src/link/MachO/ZigObject.zig+9-9| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | data: std.ArrayListUnmanaged(u8) = .empty, | 1 | data: std.ArrayList(u8) = .empty, |
| 2 | /// Externally owned memory. | 2 | /// Externally owned memory. |
| 3 | basename: []const u8, | 3 | basename: []const u8, |
| 4 | index: File.Index, | 4 | index: File.Index, |
| ... | @@ -6,15 +6,15 @@ index: File.Index, | ... | @@ -6,15 +6,15 @@ index: File.Index, |
| 6 | symtab: std.MultiArrayList(Nlist) = .{}, | 6 | symtab: std.MultiArrayList(Nlist) = .{}, |
| 7 | strtab: StringTable = .{}, | 7 | strtab: StringTable = .{}, |
| 8 | 8 | ||
| 9 | symbols: std.ArrayListUnmanaged(Symbol) = .empty, | 9 | symbols: std.ArrayList(Symbol) = .empty, |
| 10 | symbols_extra: std.ArrayListUnmanaged(u32) = .empty, | 10 | symbols_extra: std.ArrayList(u32) = .empty, |
| 11 | globals: std.ArrayListUnmanaged(MachO.SymbolResolver.Index) = .empty, | 11 | globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty, |
| 12 | /// Maps string index (so name) into nlist index for the global symbol defined within this | 12 | /// Maps string index (so name) into nlist index for the global symbol defined within this |
| 13 | /// module. | 13 | /// module. |
| 14 | globals_lookup: std.AutoHashMapUnmanaged(u32, u32) = .empty, | 14 | globals_lookup: std.AutoHashMapUnmanaged(u32, u32) = .empty, |
| 15 | atoms: std.ArrayListUnmanaged(Atom) = .empty, | 15 | atoms: std.ArrayList(Atom) = .empty, |
| 16 | atoms_indexes: std.ArrayListUnmanaged(Atom.Index) = .empty, | 16 | atoms_indexes: std.ArrayList(Atom.Index) = .empty, |
| 17 | atoms_extra: std.ArrayListUnmanaged(u32) = .empty, | 17 | atoms_extra: std.ArrayList(u32) = .empty, |
| 18 | 18 | ||
| 19 | /// Table of tracked LazySymbols. | 19 | /// Table of tracked LazySymbols. |
| 20 | lazy_syms: LazySymbolTable = .{}, | 20 | lazy_syms: LazySymbolTable = .{}, |
| ... | @@ -1737,7 +1737,7 @@ pub fn fmtAtoms(self: *ZigObject, macho_file: *MachO) std.fmt.Alt(Format, Format | ... | @@ -1737,7 +1737,7 @@ pub fn fmtAtoms(self: *ZigObject, macho_file: *MachO) std.fmt.Alt(Format, Format |
| 1737 | const AvMetadata = struct { | 1737 | const AvMetadata = struct { |
| 1738 | symbol_index: Symbol.Index, | 1738 | symbol_index: Symbol.Index, |
| 1739 | /// A list of all exports aliases of this Av. | 1739 | /// A list of all exports aliases of this Av. |
| 1740 | exports: std.ArrayListUnmanaged(Symbol.Index) = .empty, | 1740 | exports: std.ArrayList(Symbol.Index) = .empty, |
| 1741 | 1741 | ||
| 1742 | fn @"export"(m: AvMetadata, zig_object: *ZigObject, name: []const u8) ?*u32 { | 1742 | fn @"export"(m: AvMetadata, zig_object: *ZigObject, name: []const u8) ?*u32 { |
| 1743 | for (m.exports.items) |*exp| { | 1743 | for (m.exports.items) |*exp| { |
| ... | @@ -1769,7 +1769,7 @@ const TlvInitializer = struct { | ... | @@ -1769,7 +1769,7 @@ const TlvInitializer = struct { |
| 1769 | const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata); | 1769 | const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata); |
| 1770 | const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata); | 1770 | const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata); |
| 1771 | const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata); | 1771 | const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata); |
| 1772 | const RelocationTable = std.ArrayListUnmanaged(std.ArrayListUnmanaged(Relocation)); | 1772 | const RelocationTable = std.ArrayList(std.ArrayList(Relocation)); |
| 1773 | const TlvInitializerTable = std.AutoArrayHashMapUnmanaged(Atom.Index, TlvInitializer); | 1773 | const TlvInitializerTable = std.AutoArrayHashMapUnmanaged(Atom.Index, TlvInitializer); |
| 1774 | 1774 | ||
| 1775 | const x86_64 = struct { | 1775 | const x86_64 = struct { |
src/link/MachO/dyld_info/Rebase.zig+2-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 1 | entries: std.ArrayList(Entry) = .empty, |
| 2 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 2 | buffer: std.ArrayList(u8) = .empty, |
| 3 | 3 | ||
| 4 | pub const Entry = struct { | 4 | pub const Entry = struct { |
| 5 | offset: u64, | 5 | offset: u64, |
src/link/MachO/dyld_info/Trie.zig+4-4| ... | @@ -31,9 +31,9 @@ | ... | @@ -31,9 +31,9 @@ |
| 31 | 31 | ||
| 32 | /// The root node of the trie. | 32 | /// The root node of the trie. |
| 33 | root: ?Node.Index = null, | 33 | root: ?Node.Index = null, |
| 34 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 34 | buffer: std.ArrayList(u8) = .empty, |
| 35 | nodes: std.MultiArrayList(Node) = .{}, | 35 | nodes: std.MultiArrayList(Node) = .{}, |
| 36 | edges: std.ArrayListUnmanaged(Edge) = .empty, | 36 | edges: std.ArrayList(Edge) = .empty, |
| 37 | 37 | ||
| 38 | /// Insert a symbol into the trie, updating the prefixes in the process. | 38 | /// Insert a symbol into the trie, updating the prefixes in the process. |
| 39 | /// This operation may change the layout of the trie by splicing edges in | 39 | /// This operation may change the layout of the trie by splicing edges in |
| ... | @@ -139,7 +139,7 @@ fn finalize(self: *Trie, allocator: Allocator) !void { | ... | @@ -139,7 +139,7 @@ fn finalize(self: *Trie, allocator: Allocator) !void { |
| 139 | try ordered_nodes.ensureTotalCapacityPrecise(self.nodes.items(.is_terminal).len); | 139 | try ordered_nodes.ensureTotalCapacityPrecise(self.nodes.items(.is_terminal).len); |
| 140 | 140 | ||
| 141 | { | 141 | { |
| 142 | var fifo: std.ArrayListUnmanaged(Node.Index) = .empty; | 142 | var fifo: std.ArrayList(Node.Index) = .empty; |
| 143 | defer fifo.deinit(allocator); | 143 | defer fifo.deinit(allocator); |
| 144 | 144 | ||
| 145 | try fifo.append(allocator, self.root.?); | 145 | try fifo.append(allocator, self.root.?); |
| ... | @@ -328,7 +328,7 @@ const Node = struct { | ... | @@ -328,7 +328,7 @@ const Node = struct { |
| 328 | trie_offset: u32 = 0, | 328 | trie_offset: u32 = 0, |
| 329 | 329 | ||
| 330 | /// List of all edges originating from this node. | 330 | /// List of all edges originating from this node. |
| 331 | edges: std.ArrayListUnmanaged(Edge.Index) = .empty, | 331 | edges: std.ArrayList(Edge.Index) = .empty, |
| 332 | 332 | ||
| 333 | const Index = u32; | 333 | const Index = u32; |
| 334 | }; | 334 | }; |
src/link/MachO/dyld_info/bind.zig+7-7| ... | @@ -17,8 +17,8 @@ pub const Entry = struct { | ... | @@ -17,8 +17,8 @@ pub const Entry = struct { |
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | pub const Bind = struct { | 19 | pub const Bind = struct { |
| 20 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 20 | entries: std.ArrayList(Entry) = .empty, |
| 21 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 21 | buffer: std.ArrayList(u8) = .empty, |
| 22 | 22 | ||
| 23 | const Self = @This(); | 23 | const Self = @This(); |
| 24 | 24 | ||
| ... | @@ -271,8 +271,8 @@ pub const Bind = struct { | ... | @@ -271,8 +271,8 @@ pub const Bind = struct { |
| 271 | }; | 271 | }; |
| 272 | 272 | ||
| 273 | pub const WeakBind = struct { | 273 | pub const WeakBind = struct { |
| 274 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 274 | entries: std.ArrayList(Entry) = .empty, |
| 275 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 275 | buffer: std.ArrayList(u8) = .empty, |
| 276 | 276 | ||
| 277 | const Self = @This(); | 277 | const Self = @This(); |
| 278 | 278 | ||
| ... | @@ -515,9 +515,9 @@ pub const WeakBind = struct { | ... | @@ -515,9 +515,9 @@ pub const WeakBind = struct { |
| 515 | }; | 515 | }; |
| 516 | 516 | ||
| 517 | pub const LazyBind = struct { | 517 | pub const LazyBind = struct { |
| 518 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 518 | entries: std.ArrayList(Entry) = .empty, |
| 519 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 519 | buffer: std.ArrayList(u8) = .empty, |
| 520 | offsets: std.ArrayListUnmanaged(u32) = .empty, | 520 | offsets: std.ArrayList(u32) = .empty, |
| 521 | 521 | ||
| 522 | const Self = @This(); | 522 | const Self = @This(); |
| 523 | 523 |
src/link/MachO/synthetic.zig+5-5| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | pub const GotSection = struct { | 1 | pub const GotSection = struct { |
| 2 | symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty, | 2 | symbols: std.ArrayList(MachO.Ref) = .empty, |
| 3 | 3 | ||
| 4 | pub const Index = u32; | 4 | pub const Index = u32; |
| 5 | 5 | ||
| ... | @@ -61,7 +61,7 @@ pub const GotSection = struct { | ... | @@ -61,7 +61,7 @@ pub const GotSection = struct { |
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | pub const StubsSection = struct { | 63 | pub const StubsSection = struct { |
| 64 | symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty, | 64 | symbols: std.ArrayList(MachO.Ref) = .empty, |
| 65 | 65 | ||
| 66 | pub const Index = u32; | 66 | pub const Index = u32; |
| 67 | 67 | ||
| ... | @@ -296,7 +296,7 @@ pub const LaSymbolPtrSection = struct { | ... | @@ -296,7 +296,7 @@ pub const LaSymbolPtrSection = struct { |
| 296 | }; | 296 | }; |
| 297 | 297 | ||
| 298 | pub const TlvPtrSection = struct { | 298 | pub const TlvPtrSection = struct { |
| 299 | symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty, | 299 | symbols: std.ArrayList(MachO.Ref) = .empty, |
| 300 | 300 | ||
| 301 | pub const Index = u32; | 301 | pub const Index = u32; |
| 302 | 302 | ||
| ... | @@ -361,7 +361,7 @@ pub const TlvPtrSection = struct { | ... | @@ -361,7 +361,7 @@ pub const TlvPtrSection = struct { |
| 361 | }; | 361 | }; |
| 362 | 362 | ||
| 363 | pub const ObjcStubsSection = struct { | 363 | pub const ObjcStubsSection = struct { |
| 364 | symbols: std.ArrayListUnmanaged(MachO.Ref) = .empty, | 364 | symbols: std.ArrayList(MachO.Ref) = .empty, |
| 365 | 365 | ||
| 366 | pub fn deinit(objc: *ObjcStubsSection, allocator: Allocator) void { | 366 | pub fn deinit(objc: *ObjcStubsSection, allocator: Allocator) void { |
| 367 | objc.symbols.deinit(allocator); | 367 | objc.symbols.deinit(allocator); |
| ... | @@ -517,7 +517,7 @@ pub const Indsymtab = struct { | ... | @@ -517,7 +517,7 @@ pub const Indsymtab = struct { |
| 517 | }; | 517 | }; |
| 518 | 518 | ||
| 519 | pub const DataInCode = struct { | 519 | pub const DataInCode = struct { |
| 520 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 520 | entries: std.ArrayList(Entry) = .empty, |
| 521 | 521 | ||
| 522 | pub fn deinit(dice: *DataInCode, allocator: Allocator) void { | 522 | pub fn deinit(dice: *DataInCode, allocator: Allocator) void { |
| 523 | dice.entries.deinit(allocator); | 523 | dice.entries.deinit(allocator); |
src/link/StringTable.zig+1-1| ... | @@ -1,4 +1,4 @@ | ... | @@ -1,4 +1,4 @@ |
| 1 | buffer: std.ArrayListUnmanaged(u8) = .empty, | 1 | buffer: std.ArrayList(u8) = .empty, |
| 2 | table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage) = .empty, | 2 | table: std.HashMapUnmanaged(u32, void, StringIndexContext, std.hash_map.default_max_load_percentage) = .empty, |
| 3 | 3 | ||
| 4 | pub fn deinit(self: *Self, gpa: Allocator) void { | 4 | pub fn deinit(self: *Self, gpa: Allocator) void { |
src/link/Wasm.zig+25-25| ... | @@ -53,7 +53,7 @@ base: link.File, | ... | @@ -53,7 +53,7 @@ base: link.File, |
| 53 | /// with a null byte so that deserialization does not attempt to create | 53 | /// with a null byte so that deserialization does not attempt to create |
| 54 | /// string_table entries for them. Alternately those sites could be moved to | 54 | /// string_table entries for them. Alternately those sites could be moved to |
| 55 | /// use a different byte array for this purpose. | 55 | /// use a different byte array for this purpose. |
| 56 | string_bytes: std.ArrayListUnmanaged(u8), | 56 | string_bytes: std.ArrayList(u8), |
| 57 | /// Sometimes we have logic that wants to borrow string bytes to store | 57 | /// Sometimes we have logic that wants to borrow string bytes to store |
| 58 | /// arbitrary things in there. In this case it is not allowed to intern new | 58 | /// arbitrary things in there. In this case it is not allowed to intern new |
| 59 | /// strings during this time. This safety lock is used to detect misuses. | 59 | /// strings during this time. This safety lock is used to detect misuses. |
| ... | @@ -77,7 +77,7 @@ export_table: bool, | ... | @@ -77,7 +77,7 @@ export_table: bool, |
| 77 | /// Output name of the file | 77 | /// Output name of the file |
| 78 | name: []const u8, | 78 | name: []const u8, |
| 79 | /// List of relocatable files to be linked into the final binary. | 79 | /// List of relocatable files to be linked into the final binary. |
| 80 | objects: std.ArrayListUnmanaged(Object) = .{}, | 80 | objects: std.ArrayList(Object) = .{}, |
| 81 | 81 | ||
| 82 | func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty, | 82 | func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty, |
| 83 | /// Provides a mapping of both imports and provided functions to symbol name. | 83 | /// Provides a mapping of both imports and provided functions to symbol name. |
| ... | @@ -85,23 +85,23 @@ func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty, | ... | @@ -85,23 +85,23 @@ func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty, |
| 85 | /// Key is symbol name, however the `FunctionImport` may have an name override for the import name. | 85 | /// Key is symbol name, however the `FunctionImport` may have an name override for the import name. |
| 86 | object_function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImport) = .empty, | 86 | object_function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImport) = .empty, |
| 87 | /// All functions for all objects. | 87 | /// All functions for all objects. |
| 88 | object_functions: std.ArrayListUnmanaged(ObjectFunction) = .empty, | 88 | object_functions: std.ArrayList(ObjectFunction) = .empty, |
| 89 | 89 | ||
| 90 | /// Provides a mapping of both imports and provided globals to symbol name. | 90 | /// Provides a mapping of both imports and provided globals to symbol name. |
| 91 | /// Local globals may be unnamed. | 91 | /// Local globals may be unnamed. |
| 92 | object_global_imports: std.AutoArrayHashMapUnmanaged(String, GlobalImport) = .empty, | 92 | object_global_imports: std.AutoArrayHashMapUnmanaged(String, GlobalImport) = .empty, |
| 93 | /// All globals for all objects. | 93 | /// All globals for all objects. |
| 94 | object_globals: std.ArrayListUnmanaged(ObjectGlobal) = .empty, | 94 | object_globals: std.ArrayList(ObjectGlobal) = .empty, |
| 95 | 95 | ||
| 96 | /// All table imports for all objects. | 96 | /// All table imports for all objects. |
| 97 | object_table_imports: std.AutoArrayHashMapUnmanaged(String, TableImport) = .empty, | 97 | object_table_imports: std.AutoArrayHashMapUnmanaged(String, TableImport) = .empty, |
| 98 | /// All parsed table sections for all objects. | 98 | /// All parsed table sections for all objects. |
| 99 | object_tables: std.ArrayListUnmanaged(Table) = .empty, | 99 | object_tables: std.ArrayList(Table) = .empty, |
| 100 | 100 | ||
| 101 | /// All memory imports for all objects. | 101 | /// All memory imports for all objects. |
| 102 | object_memory_imports: std.AutoArrayHashMapUnmanaged(String, MemoryImport) = .empty, | 102 | object_memory_imports: std.AutoArrayHashMapUnmanaged(String, MemoryImport) = .empty, |
| 103 | /// All parsed memory sections for all objects. | 103 | /// All parsed memory sections for all objects. |
| 104 | object_memories: std.ArrayListUnmanaged(ObjectMemory) = .empty, | 104 | object_memories: std.ArrayList(ObjectMemory) = .empty, |
| 105 | 105 | ||
| 106 | /// All relocations from all objects concatenated. `relocs_start` marks the end | 106 | /// All relocations from all objects concatenated. `relocs_start` marks the end |
| 107 | /// point of object relocations and start point of Zcu relocations. | 107 | /// point of object relocations and start point of Zcu relocations. |
| ... | @@ -109,21 +109,21 @@ object_relocations: std.MultiArrayList(ObjectRelocation) = .empty, | ... | @@ -109,21 +109,21 @@ object_relocations: std.MultiArrayList(ObjectRelocation) = .empty, |
| 109 | 109 | ||
| 110 | /// List of initialization functions. These must be called in order of priority | 110 | /// List of initialization functions. These must be called in order of priority |
| 111 | /// by the (synthetic) `__wasm_call_ctors` function. | 111 | /// by the (synthetic) `__wasm_call_ctors` function. |
| 112 | object_init_funcs: std.ArrayListUnmanaged(InitFunc) = .empty, | 112 | object_init_funcs: std.ArrayList(InitFunc) = .empty, |
| 113 | 113 | ||
| 114 | /// The data section of an object has many segments. Each segment corresponds | 114 | /// The data section of an object has many segments. Each segment corresponds |
| 115 | /// logically to an object file's .data section, or .rodata section. In | 115 | /// logically to an object file's .data section, or .rodata section. In |
| 116 | /// the case of `-fdata-sections` there will be one segment per data symbol. | 116 | /// the case of `-fdata-sections` there will be one segment per data symbol. |
| 117 | object_data_segments: std.ArrayListUnmanaged(ObjectDataSegment) = .empty, | 117 | object_data_segments: std.ArrayList(ObjectDataSegment) = .empty, |
| 118 | /// Each segment has many data symbols, which correspond logically to global | 118 | /// Each segment has many data symbols, which correspond logically to global |
| 119 | /// constants. | 119 | /// constants. |
| 120 | object_datas: std.ArrayListUnmanaged(ObjectData) = .empty, | 120 | object_datas: std.ArrayList(ObjectData) = .empty, |
| 121 | object_data_imports: std.AutoArrayHashMapUnmanaged(String, ObjectDataImport) = .empty, | 121 | object_data_imports: std.AutoArrayHashMapUnmanaged(String, ObjectDataImport) = .empty, |
| 122 | /// Non-synthetic section that can essentially be mem-cpy'd into place after performing relocations. | 122 | /// Non-synthetic section that can essentially be mem-cpy'd into place after performing relocations. |
| 123 | object_custom_segments: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, CustomSegment) = .empty, | 123 | object_custom_segments: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, CustomSegment) = .empty, |
| 124 | 124 | ||
| 125 | /// All comdat information for all objects. | 125 | /// All comdat information for all objects. |
| 126 | object_comdats: std.ArrayListUnmanaged(Comdat) = .empty, | 126 | object_comdats: std.ArrayList(Comdat) = .empty, |
| 127 | /// A table that maps the relocations to be performed where the key represents | 127 | /// A table that maps the relocations to be performed where the key represents |
| 128 | /// the section (across all objects) that the slice of relocations applies to. | 128 | /// the section (across all objects) that the slice of relocations applies to. |
| 129 | object_relocations_table: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, ObjectRelocation.Slice) = .empty, | 129 | object_relocations_table: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, ObjectRelocation.Slice) = .empty, |
| ... | @@ -138,15 +138,15 @@ out_relocs: std.MultiArrayList(OutReloc) = .empty, | ... | @@ -138,15 +138,15 @@ out_relocs: std.MultiArrayList(OutReloc) = .empty, |
| 138 | /// List of locations within `string_bytes` that must be patched with the virtual | 138 | /// List of locations within `string_bytes` that must be patched with the virtual |
| 139 | /// memory address of a Uav during `flush`. | 139 | /// memory address of a Uav during `flush`. |
| 140 | /// When emitting an object file, `out_relocs` is used instead. | 140 | /// When emitting an object file, `out_relocs` is used instead. |
| 141 | uav_fixups: std.ArrayListUnmanaged(UavFixup) = .empty, | 141 | uav_fixups: std.ArrayList(UavFixup) = .empty, |
| 142 | /// List of locations within `string_bytes` that must be patched with the virtual | 142 | /// List of locations within `string_bytes` that must be patched with the virtual |
| 143 | /// memory address of a Nav during `flush`. | 143 | /// memory address of a Nav during `flush`. |
| 144 | /// When emitting an object file, `out_relocs` is used instead. | 144 | /// When emitting an object file, `out_relocs` is used instead. |
| 145 | /// No functions here only global variables. | 145 | /// No functions here only global variables. |
| 146 | nav_fixups: std.ArrayListUnmanaged(NavFixup) = .empty, | 146 | nav_fixups: std.ArrayList(NavFixup) = .empty, |
| 147 | /// When a nav reference is a function pointer, this tracks the required function | 147 | /// When a nav reference is a function pointer, this tracks the required function |
| 148 | /// table entry index that needs to overwrite the code in the final output. | 148 | /// table entry index that needs to overwrite the code in the final output. |
| 149 | func_table_fixups: std.ArrayListUnmanaged(FuncTableFixup) = .empty, | 149 | func_table_fixups: std.ArrayList(FuncTableFixup) = .empty, |
| 150 | /// Symbols to be emitted into an object file. Remains empty when not emitting | 150 | /// Symbols to be emitted into an object file. Remains empty when not emitting |
| 151 | /// an object file. | 151 | /// an object file. |
| 152 | symbol_table: std.AutoArrayHashMapUnmanaged(String, void) = .empty, | 152 | symbol_table: std.AutoArrayHashMapUnmanaged(String, void) = .empty, |
| ... | @@ -167,7 +167,7 @@ memories: std.wasm.Memory = .{ .limits = .{ | ... | @@ -167,7 +167,7 @@ memories: std.wasm.Memory = .{ .limits = .{ |
| 167 | /// `--verbose-link` output. | 167 | /// `--verbose-link` output. |
| 168 | /// Initialized on creation, appended to as inputs are added, printed during `flush`. | 168 | /// Initialized on creation, appended to as inputs are added, printed during `flush`. |
| 169 | /// String data is allocated into Compilation arena. | 169 | /// String data is allocated into Compilation arena. |
| 170 | dump_argv_list: std.ArrayListUnmanaged([]const u8), | 170 | dump_argv_list: std.ArrayList([]const u8), |
| 171 | 171 | ||
| 172 | preloaded_strings: PreloadedStrings, | 172 | preloaded_strings: PreloadedStrings, |
| 173 | 173 | ||
| ... | @@ -205,7 +205,7 @@ entry_resolution: FunctionImport.Resolution = .unresolved, | ... | @@ -205,7 +205,7 @@ entry_resolution: FunctionImport.Resolution = .unresolved, |
| 205 | /// Empty when outputting an object. | 205 | /// Empty when outputting an object. |
| 206 | function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty, | 206 | function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty, |
| 207 | hidden_function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty, | 207 | hidden_function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty, |
| 208 | global_exports: std.ArrayListUnmanaged(GlobalExport) = .empty, | 208 | global_exports: std.ArrayList(GlobalExport) = .empty, |
| 209 | /// Tracks the value at the end of prelink. | 209 | /// Tracks the value at the end of prelink. |
| 210 | global_exports_len: u32 = 0, | 210 | global_exports_len: u32 = 0, |
| 211 | 211 | ||
| ... | @@ -279,22 +279,22 @@ any_passive_inits: bool = false, | ... | @@ -279,22 +279,22 @@ any_passive_inits: bool = false, |
| 279 | /// All MIR instructions for all Zcu functions. | 279 | /// All MIR instructions for all Zcu functions. |
| 280 | mir_instructions: std.MultiArrayList(Mir.Inst) = .{}, | 280 | mir_instructions: std.MultiArrayList(Mir.Inst) = .{}, |
| 281 | /// Corresponds to `mir_instructions`. | 281 | /// Corresponds to `mir_instructions`. |
| 282 | mir_extra: std.ArrayListUnmanaged(u32) = .empty, | 282 | mir_extra: std.ArrayList(u32) = .empty, |
| 283 | /// All local types for all Zcu functions. | 283 | /// All local types for all Zcu functions. |
| 284 | mir_locals: std.ArrayListUnmanaged(std.wasm.Valtype) = .empty, | 284 | mir_locals: std.ArrayList(std.wasm.Valtype) = .empty, |
| 285 | 285 | ||
| 286 | params_scratch: std.ArrayListUnmanaged(std.wasm.Valtype) = .empty, | 286 | params_scratch: std.ArrayList(std.wasm.Valtype) = .empty, |
| 287 | returns_scratch: std.ArrayListUnmanaged(std.wasm.Valtype) = .empty, | 287 | returns_scratch: std.ArrayList(std.wasm.Valtype) = .empty, |
| 288 | 288 | ||
| 289 | /// All Zcu error names in order, null-terminated, concatenated. No need to | 289 | /// All Zcu error names in order, null-terminated, concatenated. No need to |
| 290 | /// serialize; trivially reconstructed. | 290 | /// serialize; trivially reconstructed. |
| 291 | error_name_bytes: std.ArrayListUnmanaged(u8) = .empty, | 291 | error_name_bytes: std.ArrayList(u8) = .empty, |
| 292 | /// For each Zcu error, in order, offset into `error_name_bytes` where the name | 292 | /// For each Zcu error, in order, offset into `error_name_bytes` where the name |
| 293 | /// is stored. No need to serialize; trivially reconstructed. | 293 | /// is stored. No need to serialize; trivially reconstructed. |
| 294 | error_name_offs: std.ArrayListUnmanaged(u32) = .empty, | 294 | error_name_offs: std.ArrayList(u32) = .empty, |
| 295 | 295 | ||
| 296 | tag_name_bytes: std.ArrayListUnmanaged(u8) = .empty, | 296 | tag_name_bytes: std.ArrayList(u8) = .empty, |
| 297 | tag_name_offs: std.ArrayListUnmanaged(u32) = .empty, | 297 | tag_name_offs: std.ArrayList(u32) = .empty, |
| 298 | 298 | ||
| 299 | pub const TagNameOff = extern struct { | 299 | pub const TagNameOff = extern struct { |
| 300 | off: u32, | 300 | off: u32, |
| ... | @@ -4196,8 +4196,8 @@ fn convertZcuFnType( | ... | @@ -4196,8 +4196,8 @@ fn convertZcuFnType( |
| 4196 | params: []const InternPool.Index, | 4196 | params: []const InternPool.Index, |
| 4197 | return_type: Zcu.Type, | 4197 | return_type: Zcu.Type, |
| 4198 | target: *const std.Target, | 4198 | target: *const std.Target, |
| 4199 | params_buffer: *std.ArrayListUnmanaged(std.wasm.Valtype), | 4199 | params_buffer: *std.ArrayList(std.wasm.Valtype), |
| 4200 | returns_buffer: *std.ArrayListUnmanaged(std.wasm.Valtype), | 4200 | returns_buffer: *std.ArrayList(std.wasm.Valtype), |
| 4201 | ) Allocator.Error!void { | 4201 | ) Allocator.Error!void { |
| 4202 | params_buffer.clearRetainingCapacity(); | 4202 | params_buffer.clearRetainingCapacity(); |
| 4203 | returns_buffer.clearRetainingCapacity(); | 4203 | returns_buffer.clearRetainingCapacity(); |
src/link/Wasm/Archive.zig+1-1| ... | @@ -12,7 +12,7 @@ toc: Toc, | ... | @@ -12,7 +12,7 @@ toc: Toc, |
| 12 | 12 | ||
| 13 | /// Key points into `LazyArchive` `file_contents`. | 13 | /// Key points into `LazyArchive` `file_contents`. |
| 14 | /// Value is allocated with gpa. | 14 | /// Value is allocated with gpa. |
| 15 | const Toc = std.StringArrayHashMapUnmanaged(std.ArrayListUnmanaged(u32)); | 15 | const Toc = std.StringArrayHashMapUnmanaged(std.ArrayList(u32)); |
| 16 | 16 | ||
| 17 | const ARMAG = std.elf.ARMAG; | 17 | const ARMAG = std.elf.ARMAG; |
| 18 | const ARFMAG = std.elf.ARFMAG; | 18 | const ARFMAG = std.elf.ARFMAG; |
src/link/Wasm/Object.zig+8-8| ... | @@ -169,14 +169,14 @@ pub const Symbol = struct { | ... | @@ -169,14 +169,14 @@ pub const Symbol = struct { |
| 169 | }; | 169 | }; |
| 170 | 170 | ||
| 171 | pub const ScratchSpace = struct { | 171 | pub const ScratchSpace = struct { |
| 172 | func_types: std.ArrayListUnmanaged(Wasm.FunctionType.Index) = .empty, | 172 | func_types: std.ArrayList(Wasm.FunctionType.Index) = .empty, |
| 173 | func_type_indexes: std.ArrayListUnmanaged(FuncTypeIndex) = .empty, | 173 | func_type_indexes: std.ArrayList(FuncTypeIndex) = .empty, |
| 174 | func_imports: std.ArrayListUnmanaged(FunctionImport) = .empty, | 174 | func_imports: std.ArrayList(FunctionImport) = .empty, |
| 175 | global_imports: std.ArrayListUnmanaged(GlobalImport) = .empty, | 175 | global_imports: std.ArrayList(GlobalImport) = .empty, |
| 176 | table_imports: std.ArrayListUnmanaged(TableImport) = .empty, | 176 | table_imports: std.ArrayList(TableImport) = .empty, |
| 177 | symbol_table: std.ArrayListUnmanaged(Symbol) = .empty, | 177 | symbol_table: std.ArrayList(Symbol) = .empty, |
| 178 | segment_info: std.ArrayListUnmanaged(SegmentInfo) = .empty, | 178 | segment_info: std.ArrayList(SegmentInfo) = .empty, |
| 179 | exports: std.ArrayListUnmanaged(Export) = .empty, | 179 | exports: std.ArrayList(Export) = .empty, |
| 180 | 180 | ||
| 181 | const Export = struct { | 181 | const Export = struct { |
| 182 | name: Wasm.String, | 182 | name: Wasm.String, |
src/link/table_section.zig+2-2| ... | @@ -1,7 +1,7 @@ | ... | @@ -1,7 +1,7 @@ |
| 1 | pub fn TableSection(comptime Entry: type) type { | 1 | pub fn TableSection(comptime Entry: type) type { |
| 2 | return struct { | 2 | return struct { |
| 3 | entries: std.ArrayListUnmanaged(Entry) = .empty, | 3 | entries: std.ArrayList(Entry) = .empty, |
| 4 | free_list: std.ArrayListUnmanaged(Index) = .empty, | 4 | free_list: std.ArrayList(Index) = .empty, |
| 5 | lookup: std.AutoHashMapUnmanaged(Entry, Index) = .empty, | 5 | lookup: std.AutoHashMapUnmanaged(Entry, Index) = .empty, |
| 6 | 6 | ||
| 7 | pub fn deinit(self: *Self, allocator: Allocator) void { | 7 | pub fn deinit(self: *Self, allocator: Allocator) void { |
src/link/tapi/parse.zig+4-4| ... | @@ -103,7 +103,7 @@ pub const Node = struct { | ... | @@ -103,7 +103,7 @@ pub const Node = struct { |
| 103 | .start = undefined, | 103 | .start = undefined, |
| 104 | .end = undefined, | 104 | .end = undefined, |
| 105 | }, | 105 | }, |
| 106 | values: std.ArrayListUnmanaged(Entry) = .empty, | 106 | values: std.ArrayList(Entry) = .empty, |
| 107 | 107 | ||
| 108 | pub const base_tag: Node.Tag = .map; | 108 | pub const base_tag: Node.Tag = .map; |
| 109 | 109 | ||
| ... | @@ -142,7 +142,7 @@ pub const Node = struct { | ... | @@ -142,7 +142,7 @@ pub const Node = struct { |
| 142 | .start = undefined, | 142 | .start = undefined, |
| 143 | .end = undefined, | 143 | .end = undefined, |
| 144 | }, | 144 | }, |
| 145 | values: std.ArrayListUnmanaged(*Node) = .empty, | 145 | values: std.ArrayList(*Node) = .empty, |
| 146 | 146 | ||
| 147 | pub const base_tag: Node.Tag = .list; | 147 | pub const base_tag: Node.Tag = .list; |
| 148 | 148 | ||
| ... | @@ -169,7 +169,7 @@ pub const Node = struct { | ... | @@ -169,7 +169,7 @@ pub const Node = struct { |
| 169 | .start = undefined, | 169 | .start = undefined, |
| 170 | .end = undefined, | 170 | .end = undefined, |
| 171 | }, | 171 | }, |
| 172 | string_value: std.ArrayListUnmanaged(u8) = .empty, | 172 | string_value: std.ArrayList(u8) = .empty, |
| 173 | 173 | ||
| 174 | pub const base_tag: Node.Tag = .value; | 174 | pub const base_tag: Node.Tag = .value; |
| 175 | 175 | ||
| ... | @@ -194,7 +194,7 @@ pub const Tree = struct { | ... | @@ -194,7 +194,7 @@ pub const Tree = struct { |
| 194 | source: []const u8, | 194 | source: []const u8, |
| 195 | tokens: []Token, | 195 | tokens: []Token, |
| 196 | line_cols: std.AutoHashMap(TokenIndex, LineCol), | 196 | line_cols: std.AutoHashMap(TokenIndex, LineCol), |
| 197 | docs: std.ArrayListUnmanaged(*Node) = .empty, | 197 | docs: std.ArrayList(*Node) = .empty, |
| 198 | 198 | ||
| 199 | pub fn init(allocator: Allocator) Tree { | 199 | pub fn init(allocator: Allocator) Tree { |
| 200 | return .{ | 200 | return .{ |
src/main.zig+29-29| ... | @@ -132,7 +132,7 @@ const debug_usage = normal_usage ++ | ... | @@ -132,7 +132,7 @@ const debug_usage = normal_usage ++ |
| 132 | 132 | ||
| 133 | const usage = if (build_options.enable_debug_extensions) debug_usage else normal_usage; | 133 | const usage = if (build_options.enable_debug_extensions) debug_usage else normal_usage; |
| 134 | 134 | ||
| 135 | var log_scopes: std.ArrayListUnmanaged([]const u8) = .empty; | 135 | var log_scopes: std.ArrayList([]const u8) = .empty; |
| 136 | 136 | ||
| 137 | pub fn log( | 137 | pub fn log( |
| 138 | comptime level: std.log.Level, | 138 | comptime level: std.log.Level, |
| ... | @@ -884,7 +884,7 @@ fn buildOutputType( | ... | @@ -884,7 +884,7 @@ fn buildOutputType( |
| 884 | var link_emit_relocs = false; | 884 | var link_emit_relocs = false; |
| 885 | var build_id: ?std.zig.BuildId = null; | 885 | var build_id: ?std.zig.BuildId = null; |
| 886 | var runtime_args_start: ?usize = null; | 886 | var runtime_args_start: ?usize = null; |
| 887 | var test_filters: std.ArrayListUnmanaged([]const u8) = .empty; | 887 | var test_filters: std.ArrayList([]const u8) = .empty; |
| 888 | var test_runner_path: ?[]const u8 = null; | 888 | var test_runner_path: ?[]const u8 = null; |
| 889 | var override_local_cache_dir: ?[]const u8 = try EnvVar.ZIG_LOCAL_CACHE_DIR.get(arena); | 889 | var override_local_cache_dir: ?[]const u8 = try EnvVar.ZIG_LOCAL_CACHE_DIR.get(arena); |
| 890 | var override_global_cache_dir: ?[]const u8 = try EnvVar.ZIG_GLOBAL_CACHE_DIR.get(arena); | 890 | var override_global_cache_dir: ?[]const u8 = try EnvVar.ZIG_GLOBAL_CACHE_DIR.get(arena); |
| ... | @@ -912,12 +912,12 @@ fn buildOutputType( | ... | @@ -912,12 +912,12 @@ fn buildOutputType( |
| 912 | var pdb_out_path: ?[]const u8 = null; | 912 | var pdb_out_path: ?[]const u8 = null; |
| 913 | var error_limit: ?Zcu.ErrorInt = null; | 913 | var error_limit: ?Zcu.ErrorInt = null; |
| 914 | // These are before resolving sysroot. | 914 | // These are before resolving sysroot. |
| 915 | var extra_cflags: std.ArrayListUnmanaged([]const u8) = .empty; | 915 | var extra_cflags: std.ArrayList([]const u8) = .empty; |
| 916 | var extra_rcflags: std.ArrayListUnmanaged([]const u8) = .empty; | 916 | var extra_rcflags: std.ArrayList([]const u8) = .empty; |
| 917 | var symbol_wrap_set: std.StringArrayHashMapUnmanaged(void) = .empty; | 917 | var symbol_wrap_set: std.StringArrayHashMapUnmanaged(void) = .empty; |
| 918 | var rc_includes: std.zig.RcIncludes = .any; | 918 | var rc_includes: std.zig.RcIncludes = .any; |
| 919 | var manifest_file: ?[]const u8 = null; | 919 | 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; |
| 921 | 921 | ||
| 922 | // Tracks the position in c_source_files which have already their owner populated. | 922 | // Tracks the position in c_source_files which have already their owner populated. |
| 923 | var c_source_files_owner_index: usize = 0; | 923 | var c_source_files_owner_index: usize = 0; |
| ... | @@ -925,7 +925,7 @@ fn buildOutputType( | ... | @@ -925,7 +925,7 @@ fn buildOutputType( |
| 925 | var rc_source_files_owner_index: usize = 0; | 925 | var rc_source_files_owner_index: usize = 0; |
| 926 | 926 | ||
| 927 | // null means replace with the test executable binary | 927 | // 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; |
| 929 | 929 | ||
| 930 | // These get set by CLI flags and then snapshotted when a `-M` flag is | 930 | // These get set by CLI flags and then snapshotted when a `-M` flag is |
| 931 | // encountered. | 931 | // encountered. |
| ... | @@ -934,8 +934,8 @@ fn buildOutputType( | ... | @@ -934,8 +934,8 @@ fn buildOutputType( |
| 934 | // These get appended to by CLI flags and then slurped when a `-M` flag | 934 | // These get appended to by CLI flags and then slurped when a `-M` flag |
| 935 | // is encountered. | 935 | // is encountered. |
| 936 | var cssan: ClangSearchSanitizer = .{}; | 936 | var cssan: ClangSearchSanitizer = .{}; |
| 937 | var cc_argv: std.ArrayListUnmanaged([]const u8) = .empty; | 937 | var cc_argv: std.ArrayList([]const u8) = .empty; |
| 938 | var deps: std.ArrayListUnmanaged(CliModule.Dep) = .empty; | 938 | var deps: std.ArrayList(CliModule.Dep) = .empty; |
| 939 | 939 | ||
| 940 | // Contains every module specified via -M. The dependencies are added | 940 | // Contains every module specified via -M. The dependencies are added |
| 941 | // after argument parsing is completed. We use a StringArrayHashMap to make | 941 | // after argument parsing is completed. We use a StringArrayHashMap to make |
| ... | @@ -3374,7 +3374,7 @@ fn buildOutputType( | ... | @@ -3374,7 +3374,7 @@ fn buildOutputType( |
| 3374 | 3374 | ||
| 3375 | process.raiseFileDescriptorLimit(); | 3375 | process.raiseFileDescriptorLimit(); |
| 3376 | 3376 | ||
| 3377 | var file_system_inputs: std.ArrayListUnmanaged(u8) = .empty; | 3377 | var file_system_inputs: std.ArrayList(u8) = .empty; |
| 3378 | defer file_system_inputs.deinit(gpa); | 3378 | defer file_system_inputs.deinit(gpa); |
| 3379 | 3379 | ||
| 3380 | // Deduplicate rpath entries | 3380 | // Deduplicate rpath entries |
| ... | @@ -3698,29 +3698,29 @@ const CreateModule = struct { | ... | @@ -3698,29 +3698,29 @@ const CreateModule = struct { |
| 3698 | /// directly after computing the target and used to compute link_libc, | 3698 | /// directly after computing the target and used to compute link_libc, |
| 3699 | /// link_libcpp, and then the libraries are filtered into | 3699 | /// link_libcpp, and then the libraries are filtered into |
| 3700 | /// `unresolved_link_inputs` and `windows_libs`. | 3700 | /// `unresolved_link_inputs` and `windows_libs`. |
| 3701 | cli_link_inputs: std.ArrayListUnmanaged(link.UnresolvedInput), | 3701 | cli_link_inputs: std.ArrayList(link.UnresolvedInput), |
| 3702 | windows_libs: std.StringArrayHashMapUnmanaged(void), | 3702 | windows_libs: std.StringArrayHashMapUnmanaged(void), |
| 3703 | /// The local variable `unresolved_link_inputs` is fed into library | 3703 | /// The local variable `unresolved_link_inputs` is fed into library |
| 3704 | /// resolution, mutating the input array, and producing this data as | 3704 | /// resolution, mutating the input array, and producing this data as |
| 3705 | /// output. Allocated with gpa. | 3705 | /// output. Allocated with gpa. |
| 3706 | link_inputs: std.ArrayListUnmanaged(link.Input), | 3706 | link_inputs: std.ArrayList(link.Input), |
| 3707 | 3707 | ||
| 3708 | c_source_files: std.ArrayListUnmanaged(Compilation.CSourceFile), | 3708 | c_source_files: std.ArrayList(Compilation.CSourceFile), |
| 3709 | rc_source_files: std.ArrayListUnmanaged(Compilation.RcSourceFile), | 3709 | rc_source_files: std.ArrayList(Compilation.RcSourceFile), |
| 3710 | 3710 | ||
| 3711 | /// e.g. -m3dnow or -mno-outline-atomics. They correspond to std.Target llvm cpu feature names. | 3711 | /// e.g. -m3dnow or -mno-outline-atomics. They correspond to std.Target llvm cpu feature names. |
| 3712 | /// This array is populated by zig cc frontend and then has to be converted to zig-style | 3712 | /// This array is populated by zig cc frontend and then has to be converted to zig-style |
| 3713 | /// CPU features. | 3713 | /// CPU features. |
| 3714 | llvm_m_args: std.ArrayListUnmanaged([]const u8), | 3714 | llvm_m_args: std.ArrayList([]const u8), |
| 3715 | sysroot: ?[]const u8, | 3715 | sysroot: ?[]const u8, |
| 3716 | lib_directories: std.ArrayListUnmanaged(Directory), | 3716 | lib_directories: std.ArrayList(Directory), |
| 3717 | lib_dir_args: std.ArrayListUnmanaged([]const u8), | 3717 | lib_dir_args: std.ArrayList([]const u8), |
| 3718 | libc_installation: ?LibCInstallation, | 3718 | libc_installation: ?LibCInstallation, |
| 3719 | want_native_include_dirs: bool, | 3719 | want_native_include_dirs: bool, |
| 3720 | frameworks: std.StringArrayHashMapUnmanaged(Framework), | 3720 | frameworks: std.StringArrayHashMapUnmanaged(Framework), |
| 3721 | native_system_include_paths: []const []const u8, | 3721 | native_system_include_paths: []const []const u8, |
| 3722 | framework_dirs: std.ArrayListUnmanaged([]const u8), | 3722 | framework_dirs: std.ArrayList([]const u8), |
| 3723 | rpath_list: std.ArrayListUnmanaged([]const u8), | 3723 | rpath_list: std.ArrayList([]const u8), |
| 3724 | each_lib_rpath: ?bool, | 3724 | each_lib_rpath: ?bool, |
| 3725 | libc_paths_file: ?[]const u8, | 3725 | libc_paths_file: ?[]const u8, |
| 3726 | }; | 3726 | }; |
| ... | @@ -3826,7 +3826,7 @@ fn createModule( | ... | @@ -3826,7 +3826,7 @@ fn createModule( |
| 3826 | // We need to know whether the set of system libraries contains anything besides these | 3826 | // We need to know whether the set of system libraries contains anything besides these |
| 3827 | // to decide whether to trigger native path detection logic. | 3827 | // to decide whether to trigger native path detection logic. |
| 3828 | // Preserves linker input order. | 3828 | // Preserves linker input order. |
| 3829 | var unresolved_link_inputs: std.ArrayListUnmanaged(link.UnresolvedInput) = .empty; | 3829 | var unresolved_link_inputs: std.ArrayList(link.UnresolvedInput) = .empty; |
| 3830 | defer unresolved_link_inputs.deinit(gpa); | 3830 | defer unresolved_link_inputs.deinit(gpa); |
| 3831 | try unresolved_link_inputs.ensureUnusedCapacity(gpa, create_module.cli_link_inputs.items.len); | 3831 | try unresolved_link_inputs.ensureUnusedCapacity(gpa, create_module.cli_link_inputs.items.len); |
| 3832 | var any_name_queries_remaining = false; | 3832 | var any_name_queries_remaining = false; |
| ... | @@ -4215,11 +4215,11 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void { | ... | @@ -4215,11 +4215,11 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void { |
| 4215 | if (comp.time_report) |*tr| { | 4215 | if (comp.time_report) |*tr| { |
| 4216 | var decls_len: u32 = 0; | 4216 | var decls_len: u32 = 0; |
| 4217 | 4217 | ||
| 4218 | var file_name_bytes: std.ArrayListUnmanaged(u8) = .empty; | 4218 | var file_name_bytes: std.ArrayList(u8) = .empty; |
| 4219 | defer file_name_bytes.deinit(gpa); | 4219 | defer file_name_bytes.deinit(gpa); |
| 4220 | var files: std.AutoArrayHashMapUnmanaged(Zcu.File.Index, void) = .empty; | 4220 | var files: std.AutoArrayHashMapUnmanaged(Zcu.File.Index, void) = .empty; |
| 4221 | defer files.deinit(gpa); | 4221 | defer files.deinit(gpa); |
| 4222 | var decl_data: std.ArrayListUnmanaged(u8) = .empty; | 4222 | var decl_data: std.ArrayList(u8) = .empty; |
| 4223 | defer decl_data.deinit(gpa); | 4223 | defer decl_data.deinit(gpa); |
| 4224 | 4224 | ||
| 4225 | // Each decl needs at least 34 bytes: | 4225 | // Each decl needs at least 34 bytes: |
| ... | @@ -4546,7 +4546,7 @@ fn cmdTranslateC( | ... | @@ -4546,7 +4546,7 @@ fn cmdTranslateC( |
| 4546 | comp: *Compilation, | 4546 | comp: *Compilation, |
| 4547 | arena: Allocator, | 4547 | arena: Allocator, |
| 4548 | fancy_output: ?*Compilation.CImportResult, | 4548 | fancy_output: ?*Compilation.CImportResult, |
| 4549 | file_system_inputs: ?*std.ArrayListUnmanaged(u8), | 4549 | file_system_inputs: ?*std.ArrayList(u8), |
| 4550 | prog_node: std.Progress.Node, | 4550 | prog_node: std.Progress.Node, |
| 4551 | ) !void { | 4551 | ) !void { |
| 4552 | dev.check(.translate_c_command); | 4552 | dev.check(.translate_c_command); |
| ... | @@ -4754,7 +4754,7 @@ fn cmdInit(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { | ... | @@ -4754,7 +4754,7 @@ fn cmdInit(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { |
| 4754 | } | 4754 | } |
| 4755 | 4755 | ||
| 4756 | fn sanitizeExampleName(arena: Allocator, bytes: []const u8) error{OutOfMemory}![]const u8 { | 4756 | fn sanitizeExampleName(arena: Allocator, bytes: []const u8) error{OutOfMemory}![]const u8 { |
| 4757 | var result: std.ArrayListUnmanaged(u8) = .empty; | 4757 | var result: std.ArrayList(u8) = .empty; |
| 4758 | for (bytes, 0..) |byte, i| switch (byte) { | 4758 | for (bytes, 0..) |byte, i| switch (byte) { |
| 4759 | '0'...'9' => { | 4759 | '0'...'9' => { |
| 4760 | if (i == 0) try result.append(arena, '_'); | 4760 | if (i == 0) try result.append(arena, '_'); |
| ... | @@ -5486,7 +5486,7 @@ fn jitCmd( | ... | @@ -5486,7 +5486,7 @@ fn jitCmd( |
| 5486 | }); | 5486 | }); |
| 5487 | defer thread_pool.deinit(); | 5487 | defer thread_pool.deinit(); |
| 5488 | 5488 | ||
| 5489 | var child_argv: std.ArrayListUnmanaged([]const u8) = .empty; | 5489 | var child_argv: std.ArrayList([]const u8) = .empty; |
| 5490 | try child_argv.ensureUnusedCapacity(arena, args.len + 4); | 5490 | try child_argv.ensureUnusedCapacity(arena, args.len + 4); |
| 5491 | 5491 | ||
| 5492 | // We want to release all the locks before executing the child process, so we make a nice | 5492 | // We want to release all the locks before executing the child process, so we make a nice |
| ... | @@ -6687,7 +6687,7 @@ const ClangSearchSanitizer = struct { | ... | @@ -6687,7 +6687,7 @@ const ClangSearchSanitizer = struct { |
| 6687 | fn addIncludePath( | 6687 | fn addIncludePath( |
| 6688 | self: *@This(), | 6688 | self: *@This(), |
| 6689 | ally: Allocator, | 6689 | ally: Allocator, |
| 6690 | argv: *std.ArrayListUnmanaged([]const u8), | 6690 | argv: *std.ArrayList([]const u8), |
| 6691 | group: Group, | 6691 | group: Group, |
| 6692 | arg: []const u8, | 6692 | arg: []const u8, |
| 6693 | dir: []const u8, | 6693 | dir: []const u8, |
| ... | @@ -7436,10 +7436,10 @@ fn handleModArg( | ... | @@ -7436,10 +7436,10 @@ fn handleModArg( |
| 7436 | opt_root_src_orig: ?[]const u8, | 7436 | opt_root_src_orig: ?[]const u8, |
| 7437 | create_module: *CreateModule, | 7437 | create_module: *CreateModule, |
| 7438 | mod_opts: *Package.Module.CreateOptions.Inherited, | 7438 | mod_opts: *Package.Module.CreateOptions.Inherited, |
| 7439 | cc_argv: *std.ArrayListUnmanaged([]const u8), | 7439 | cc_argv: *std.ArrayList([]const u8), |
| 7440 | target_arch_os_abi: *?[]const u8, | 7440 | target_arch_os_abi: *?[]const u8, |
| 7441 | target_mcpu: *?[]const u8, | 7441 | target_mcpu: *?[]const u8, |
| 7442 | deps: *std.ArrayListUnmanaged(CliModule.Dep), | 7442 | deps: *std.ArrayList(CliModule.Dep), |
| 7443 | c_source_files_owner_index: *usize, | 7443 | c_source_files_owner_index: *usize, |
| 7444 | rc_source_files_owner_index: *usize, | 7444 | rc_source_files_owner_index: *usize, |
| 7445 | cssan: *ClangSearchSanitizer, | 7445 | cssan: *ClangSearchSanitizer, |
| ... | @@ -7513,12 +7513,12 @@ fn anyObjectLinkInputs(link_inputs: []const link.UnresolvedInput) bool { | ... | @@ -7513,12 +7513,12 @@ fn anyObjectLinkInputs(link_inputs: []const link.UnresolvedInput) bool { |
| 7513 | return false; | 7513 | return false; |
| 7514 | } | 7514 | } |
| 7515 | 7515 | ||
| 7516 | fn addLibDirectoryWarn(lib_directories: *std.ArrayListUnmanaged(Directory), path: []const u8) void { | 7516 | fn addLibDirectoryWarn(lib_directories: *std.ArrayList(Directory), path: []const u8) void { |
| 7517 | return addLibDirectoryWarn2(lib_directories, path, false); | 7517 | return addLibDirectoryWarn2(lib_directories, path, false); |
| 7518 | } | 7518 | } |
| 7519 | 7519 | ||
| 7520 | fn addLibDirectoryWarn2( | 7520 | fn addLibDirectoryWarn2( |
| 7521 | lib_directories: *std.ArrayListUnmanaged(Directory), | 7521 | lib_directories: *std.ArrayList(Directory), |
| 7522 | path: []const u8, | 7522 | path: []const u8, |
| 7523 | ignore_not_found: bool, | 7523 | ignore_not_found: bool, |
| 7524 | ) void { | 7524 | ) void { |
src/register_manager.zig+1-1| ... | @@ -483,7 +483,7 @@ fn MockFunction(comptime Register: type) type { | ... | @@ -483,7 +483,7 @@ fn MockFunction(comptime Register: type) type { |
| 483 | return struct { | 483 | return struct { |
| 484 | allocator: Allocator, | 484 | allocator: Allocator, |
| 485 | register_manager: Register.RM = .{}, | 485 | register_manager: Register.RM = .{}, |
| 486 | spilled: std.ArrayListUnmanaged(Register) = .empty, | 486 | spilled: std.ArrayList(Register) = .empty, |
| 487 | 487 | ||
| 488 | const Self = @This(); | 488 | const Self = @This(); |
| 489 | 489 |
test/behavior/fn.zig+2-2| ... | @@ -407,8 +407,8 @@ test "import passed byref to function in return type" { | ... | @@ -407,8 +407,8 @@ test "import passed byref to function in return type" { |
| 407 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 407 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 408 | 408 | ||
| 409 | const S = struct { | 409 | const S = struct { |
| 410 | fn get() @import("std").ArrayListUnmanaged(i32) { | 410 | fn get() @import("std").ArrayList(i32) { |
| 411 | const x: @import("std").ArrayListUnmanaged(i32) = .empty; | 411 | const x: @import("std").ArrayList(i32) = .empty; |
| 412 | return x; | 412 | return x; |
| 413 | } | 413 | } |
| 414 | }; | 414 | }; |
tools/doctest.zig+2-2| ... | @@ -924,8 +924,8 @@ fn parseManifest(arena: Allocator, source_bytes: []const u8) !Code { | ... | @@ -924,8 +924,8 @@ fn parseManifest(arena: Allocator, source_bytes: []const u8) !Code { |
| 924 | 924 | ||
| 925 | var mode: std.builtin.OptimizeMode = .Debug; | 925 | var mode: std.builtin.OptimizeMode = .Debug; |
| 926 | var link_mode: ?std.builtin.LinkMode = null; | 926 | var link_mode: ?std.builtin.LinkMode = null; |
| 927 | var link_objects: std.ArrayListUnmanaged([]const u8) = .empty; | 927 | var link_objects: std.ArrayList([]const u8) = .empty; |
| 928 | var additional_options: std.ArrayListUnmanaged([]const u8) = .empty; | 928 | var additional_options: std.ArrayList([]const u8) = .empty; |
| 929 | var target_str: ?[]const u8 = null; | 929 | var target_str: ?[]const u8 = null; |
| 930 | var link_libc = false; | 930 | var link_libc = false; |
| 931 | var disable_cache = false; | 931 | var disable_cache = false; |
tools/incr-check.zig+11-11| ... | @@ -108,7 +108,7 @@ pub fn main() !void { | ... | @@ -108,7 +108,7 @@ pub fn main() !void { |
| 108 | if (debug_log_verbose) { | 108 | if (debug_log_verbose) { |
| 109 | std.log.scoped(.status).info("target: '{s}-{t}'", .{ target.query, target.backend }); | 109 | std.log.scoped(.status).info("target: '{s}-{t}'", .{ target.query, target.backend }); |
| 110 | } | 110 | } |
| 111 | var child_args: std.ArrayListUnmanaged([]const u8) = .empty; | 111 | var child_args: std.ArrayList([]const u8) = .empty; |
| 112 | try child_args.appendSlice(arena, &.{ | 112 | try child_args.appendSlice(arena, &.{ |
| 113 | resolved_zig_exe, | 113 | resolved_zig_exe, |
| 114 | "build-exe", | 114 | "build-exe", |
| ... | @@ -161,7 +161,7 @@ pub fn main() !void { | ... | @@ -161,7 +161,7 @@ pub fn main() !void { |
| 161 | child.cwd_dir = tmp_dir; | 161 | child.cwd_dir = tmp_dir; |
| 162 | child.cwd = tmp_dir_path; | 162 | child.cwd = tmp_dir_path; |
| 163 | 163 | ||
| 164 | var cc_child_args: std.ArrayListUnmanaged([]const u8) = .empty; | 164 | var cc_child_args: std.ArrayList([]const u8) = .empty; |
| 165 | if (target.backend == .cbe) { | 165 | if (target.backend == .cbe) { |
| 166 | const resolved_cc_zig_exe = if (opt_cc_zig) |cc_zig_exe| | 166 | const resolved_cc_zig_exe = if (opt_cc_zig) |cc_zig_exe| |
| 167 | try std.fs.path.relative(arena, tmp_dir_path, cc_zig_exe) | 167 | try std.fs.path.relative(arena, tmp_dir_path, cc_zig_exe) |
| ... | @@ -238,7 +238,7 @@ const Eval = struct { | ... | @@ -238,7 +238,7 @@ const Eval = struct { |
| 238 | preserve_tmp_on_fatal: bool, | 238 | preserve_tmp_on_fatal: bool, |
| 239 | /// When `target.backend == .cbe`, this contains the first few arguments to `zig cc` to build the generated binary. | 239 | /// When `target.backend == .cbe`, this contains the first few arguments to `zig cc` to build the generated binary. |
| 240 | /// The arguments `out.c in.c` must be appended before spawning the subprocess. | 240 | /// 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), |
| 242 | 242 | ||
| 243 | const StreamEnum = enum { stdout, stderr }; | 243 | const StreamEnum = enum { stdout, stderr }; |
| 244 | const Poller = Io.Poller(StreamEnum); | 244 | const Poller = Io.Poller(StreamEnum); |
| ... | @@ -664,11 +664,11 @@ const Case = struct { | ... | @@ -664,11 +664,11 @@ const Case = struct { |
| 664 | fn parse(arena: Allocator, io: Io, bytes: []const u8) !Case { | 664 | fn parse(arena: Allocator, io: Io, bytes: []const u8) !Case { |
| 665 | const fatal = std.process.fatal; | 665 | const fatal = std.process.fatal; |
| 666 | 666 | ||
| 667 | var targets: std.ArrayListUnmanaged(Target) = .empty; | 667 | var targets: std.ArrayList(Target) = .empty; |
| 668 | var modules: std.ArrayListUnmanaged(Module) = .empty; | 668 | var modules: std.ArrayList(Module) = .empty; |
| 669 | var updates: std.ArrayListUnmanaged(Update) = .empty; | 669 | var updates: std.ArrayList(Update) = .empty; |
| 670 | var changes: std.ArrayListUnmanaged(FullContents) = .empty; | 670 | var changes: std.ArrayList(FullContents) = .empty; |
| 671 | var deletes: std.ArrayListUnmanaged([]const u8) = .empty; | 671 | var deletes: std.ArrayList([]const u8) = .empty; |
| 672 | var it = std.mem.splitScalar(u8, bytes, '\n'); | 672 | var it = std.mem.splitScalar(u8, bytes, '\n'); |
| 673 | var line_n: usize = 1; | 673 | var line_n: usize = 1; |
| 674 | var root_source_file: ?[]const u8 = null; | 674 | var root_source_file: ?[]const u8 = null; |
| ... | @@ -731,7 +731,7 @@ const Case = struct { | ... | @@ -731,7 +731,7 @@ const Case = struct { |
| 731 | 731 | ||
| 732 | // Because Windows is so excellent, we need to convert CRLF to LF, so | 732 | // Because Windows is so excellent, we need to convert CRLF to LF, so |
| 733 | // can't just slice into the input here. How delightful! | 733 | // can't just slice into the input here. How delightful! |
| 734 | var src: std.ArrayListUnmanaged(u8) = .empty; | 734 | var src: std.ArrayList(u8) = .empty; |
| 735 | 735 | ||
| 736 | while (true) { | 736 | while (true) { |
| 737 | const next_line_raw = it.peek() orelse fatal("line {d}: unexpected EOF", .{line_n}); | 737 | const next_line_raw = it.peek() orelse fatal("line {d}: unexpected EOF", .{line_n}); |
| ... | @@ -767,7 +767,7 @@ const Case = struct { | ... | @@ -767,7 +767,7 @@ const Case = struct { |
| 767 | const last_update = &updates.items[updates.items.len - 1]; | 767 | const last_update = &updates.items[updates.items.len - 1]; |
| 768 | if (last_update.outcome != .unknown) fatal("line {d}: conflicting expect directive", .{line_n}); | 768 | if (last_update.outcome != .unknown) fatal("line {d}: conflicting expect directive", .{line_n}); |
| 769 | 769 | ||
| 770 | var errors: std.ArrayListUnmanaged(ExpectedError) = .empty; | 770 | var errors: std.ArrayList(ExpectedError) = .empty; |
| 771 | try errors.append(arena, parseExpectedError(val, line_n)); | 771 | try errors.append(arena, parseExpectedError(val, line_n)); |
| 772 | while (true) { | 772 | while (true) { |
| 773 | const next_line = it.peek() orelse break; | 773 | const next_line = it.peek() orelse break; |
| ... | @@ -783,7 +783,7 @@ const Case = struct { | ... | @@ -783,7 +783,7 @@ const Case = struct { |
| 783 | try errors.append(arena, parseExpectedError(new_val, line_n)); | 783 | try errors.append(arena, parseExpectedError(new_val, line_n)); |
| 784 | } | 784 | } |
| 785 | 785 | ||
| 786 | var compile_log_output: std.ArrayListUnmanaged(u8) = .empty; | 786 | var compile_log_output: std.ArrayList(u8) = .empty; |
| 787 | while (true) { | 787 | while (true) { |
| 788 | const next_line = it.peek() orelse break; | 788 | const next_line = it.peek() orelse break; |
| 789 | if (!std.mem.startsWith(u8, next_line, "#")) break; | 789 | if (!std.mem.startsWith(u8, next_line, "#")) break; |