authorgravatar for seda18@rolmail.netDavid Senoner <seda18@rolmail.net> 2026-05-26 16:32:31+02:00
committergravatar for seda18@rolmail.netDavid Senoner <seda18@rolmail.net> 2026-06-10 16:14:58+02:00
log37651eea8944e12df08328012dd3ff151b12c4e7
tree4c08cfc50a96c0857738858b2538f2fbf0fe3699
parentd23e22c4161ad2a005ad4ee54877cc6908424d54
signaturelock-open Commit is signed but in an unrecognized format.

Replace usages of `AutoArrayHashMapUnmanaged` with `array_hash_map.Auto`


53 files changed, 284 insertions(+), 284 deletions(-)

lib/compiler/Maker.zig+3-3
...@@ -49,7 +49,7 @@ web_server: if (!builtin.single_threaded) ?WebServer else ?noreturn,...@@ -49,7 +49,7 @@ web_server: if (!builtin.single_threaded) ?WebServer else ?noreturn,
49/// Allocated into `gpa`.49/// Allocated into `gpa`.
50memory_blocked_steps: std.ArrayList(Configuration.Step.Index),50memory_blocked_steps: std.ArrayList(Configuration.Step.Index),
51/// Allocated into `gpa`.51/// Allocated into `gpa`.
52step_stack: std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, void),52step_stack: std.array_hash_map.Auto(Configuration.Step.Index, void),
53pkg_config: PkgConfig,53pkg_config: PkgConfig,
5454
55error_style: ErrorStyle,55error_style: ErrorStyle,
...@@ -1217,7 +1217,7 @@ fn printTreeStep(...@@ -1217,7 +1217,7 @@ fn printTreeStep(
1217 step_index: Configuration.Step.Index,1217 step_index: Configuration.Step.Index,
1218 stderr: Io.Terminal,1218 stderr: Io.Terminal,
1219 parent_node: *PrintNode,1219 parent_node: *PrintNode,
1220 step_stack: *std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, void),1220 step_stack: *std.array_hash_map.Auto(Configuration.Step.Index, void),
1221) !void {1221) !void {
1222 const writer = stderr.writer;1222 const writer = stderr.writer;
1223 const first = step_stack.swapRemove(step_index);1223 const first = step_stack.swapRemove(step_index);
...@@ -1502,7 +1502,7 @@ fn printChildNodePrefix(stderr: Io.Terminal) !void {...@@ -1502,7 +1502,7 @@ fn printChildNodePrefix(stderr: Io.Terminal) !void {
1502fn constructGraphAndCheckForDependencyLoop(1502fn constructGraphAndCheckForDependencyLoop(
1503 maker: *Maker,1503 maker: *Maker,
1504 step_index: Configuration.Step.Index,1504 step_index: Configuration.Step.Index,
1505 step_stack: *std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, void),1505 step_stack: *std.array_hash_map.Auto(Configuration.Step.Index, void),
1506 rand: std.Random,1506 rand: std.Random,
1507) error{ DependencyLoopDetected, OutOfMemory }!void {1507) error{ DependencyLoopDetected, OutOfMemory }!void {
1508 const c = &maker.scanned_config.configuration;1508 const c = &maker.scanned_config.configuration;
lib/compiler/Maker/Fuzz.zig+1-1
...@@ -27,7 +27,7 @@ prog_node: std.Progress.Node,...@@ -27,7 +27,7 @@ prog_node: std.Progress.Node,
2727
28/// Protects `coverage_files`.28/// Protects `coverage_files`.
29coverage_mutex: Io.Mutex,29coverage_mutex: Io.Mutex,
30coverage_files: std.AutoArrayHashMapUnmanaged(u64, CoverageMap),30coverage_files: std.array_hash_map.Auto(u64, CoverageMap),
3131
32queue_mutex: Io.Mutex,32queue_mutex: Io.Mutex,
33queue_cond: Io.Condition,33queue_cond: Io.Condition,
lib/compiler/Maker/Step/Compile.zig+5-5
...@@ -119,7 +119,7 @@ fn updateGeneratedFile(...@@ -119,7 +119,7 @@ fn updateGeneratedFile(
119119
120/// List of importable modules in a compilation's module graph, including120/// List of importable modules in a compilation's module graph, including
121/// the root module. The root module is guaranteed to be first.121/// the root module. The root module is guaranteed to be first.
122const ModuleList = std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, Configuration.String);122const ModuleList = std.array_hash_map.Auto(Configuration.Module.Index, Configuration.String);
123/// Keyed on the first key in the module list.123/// Keyed on the first key in the module list.
124pub const ModuleGraph = std.ArrayHashMapUnmanaged(ModuleList, void, ModuleListContext, false);124pub const ModuleGraph = std.ArrayHashMapUnmanaged(ModuleList, void, ModuleListContext, false);
125125
...@@ -221,8 +221,8 @@ fn lowerZigArgs(...@@ -221,8 +221,8 @@ fn lowerZigArgs(
221 // module, along with any C compiler arguments that need to be passed221 // module, along with any C compiler arguments that need to be passed
222 // to the compiler for each module individually as reported by222 // to the compiler for each module individually as reported by
223 // pkg-config.223 // pkg-config.
224 var seen_system_libs: std.AutoArrayHashMapUnmanaged(Configuration.String, []const []const u8) = .empty;224 var seen_system_libs: std.array_hash_map.Auto(Configuration.String, []const []const u8) = .empty;
225 var frameworks: std.AutoArrayHashMapUnmanaged(Configuration.String, Configuration.Module.Framework.Flags) = .empty;225 var frameworks: std.array_hash_map.Auto(Configuration.String, Configuration.Module.Framework.Flags) = .empty;
226 var module_graph: ModuleGraph = .empty;226 var module_graph: ModuleGraph = .empty;
227227
228 var prev_has_cflags = false;228 var prev_has_cflags = false;
...@@ -1126,7 +1126,7 @@ fn moduleNeedsCliArg(mod: *const Configuration.Module, conf: *const Configuratio...@@ -1126,7 +1126,7 @@ fn moduleNeedsCliArg(mod: *const Configuration.Module, conf: *const Configuratio
1126}1126}
11271127
1128const CliNamedModules = struct {1128const CliNamedModules = struct {
1129 modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void),1129 modules: std.array_hash_map.Auto(Configuration.Module.Index, void),
1130 names: std.array_hash_map.String(void),1130 names: std.array_hash_map.String(void),
11311131
1132 /// Traverse the whole dependency graph and give every module a unique1132 /// Traverse the whole dependency graph and give every module a unique
...@@ -1177,7 +1177,7 @@ pub fn getCompileDependencies(...@@ -1177,7 +1177,7 @@ pub fn getCompileDependencies(
1177 start: Configuration.Step.Index,1177 start: Configuration.Step.Index,
1178 chase_dynamic: bool,1178 chase_dynamic: bool,
1179) ![]const Configuration.Step.Index {1179) ![]const Configuration.Step.Index {
1180 var compiles: std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, void) = .empty;1180 var compiles: std.array_hash_map.Auto(Configuration.Step.Index, void) = .empty;
1181 var compiles_i: usize = 0;1181 var compiles_i: usize = 0;
11821182
1183 try compiles.putNoClobber(arena, start, {});1183 try compiles.putNoClobber(arena, start, {});
lib/compiler/Maker/Step/TranslateC.zig+1-1
...@@ -66,7 +66,7 @@ pub fn make(...@@ -66,7 +66,7 @@ pub fn make(
6666
67 var prev_search_strategy: std.Build.Module.SystemLib.SearchStrategy = .paths_first;67 var prev_search_strategy: std.Build.Module.SystemLib.SearchStrategy = .paths_first;
68 var prev_preferred_link_mode: std.builtin.LinkMode = .dynamic;68 var prev_preferred_link_mode: std.builtin.LinkMode = .dynamic;
69 var seen_system_libs: std.AutoArrayHashMapUnmanaged(Configuration.String, []const []const u8) = .empty;69 var seen_system_libs: std.array_hash_map.Auto(Configuration.String, []const []const u8) = .empty;
7070
71 for (conf_tc.system_libs.slice) |system_lib_index| {71 for (conf_tc.system_libs.slice) |system_lib_index| {
72 const system_lib = system_lib_index.get(conf);72 const system_lib = system_lib_index.get(conf);
lib/compiler/Maker/Watch.zig+2-2
...@@ -31,7 +31,7 @@ const DirTable = std.ArrayHashMapUnmanaged(Cache.Path, void, Cache.Path.TableAda...@@ -31,7 +31,7 @@ const DirTable = std.ArrayHashMapUnmanaged(Cache.Path, void, Cache.Path.TableAda
3131
32/// Special key of "." means any changes in this directory trigger the steps.32/// Special key of "." means any changes in this directory trigger the steps.
33const ReactionSet = std.array_hash_map.String(StepSet);33const ReactionSet = std.array_hash_map.String(StepSet);
34const StepSet = std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, Generation);34const StepSet = std.array_hash_map.Auto(Configuration.Step.Index, Generation);
3535
36const Generation = u8;36const Generation = u8;
3737
...@@ -46,7 +46,7 @@ const Os = switch (builtin.os.tag) {...@@ -46,7 +46,7 @@ const Os = switch (builtin.os.tag) {
46 handle_table: HandleTable,46 handle_table: HandleTable,
47 /// fanotify file descriptors are keyed by mount id since marks47 /// fanotify file descriptors are keyed by mount id since marks
48 /// are limited to a single filesystem.48 /// are limited to a single filesystem.
49 poll_fds: std.AutoArrayHashMapUnmanaged(MountId, posix.pollfd),49 poll_fds: std.array_hash_map.Auto(MountId, posix.pollfd),
5050
51 const MountId = i32;51 const MountId = i32;
52 const HandleTable = std.ArrayHashMapUnmanaged(FileHandle, struct { mount_id: MountId, reaction_set: ReactionSet }, FileHandle.Adapter, false);52 const HandleTable = std.ArrayHashMapUnmanaged(FileHandle, struct { mount_id: MountId, reaction_set: ReactionSet }, FileHandle.Adapter, false);
lib/compiler/aro/backend/Interner.zig+1-1
...@@ -8,7 +8,7 @@ const Limb = std.math.big.Limb;...@@ -8,7 +8,7 @@ const Limb = std.math.big.Limb;
88
9const Interner = @This();9const Interner = @This();
1010
11map: std.AutoArrayHashMapUnmanaged(void, void) = .empty,11map: std.array_hash_map.Auto(void, void) = .empty,
12items: std.MultiArrayList(struct {12items: std.MultiArrayList(struct {
13 tag: Tag,13 tag: Tag,
14 data: u32,14 data: u32,
lib/compiler/aro/backend/Ir.zig+1-1
...@@ -380,7 +380,7 @@ const REF = std.Io.Terminal.Color.bright_blue;...@@ -380,7 +380,7 @@ const REF = std.Io.Terminal.Color.bright_blue;
380const LITERAL = std.Io.Terminal.Color.bright_green;380const LITERAL = std.Io.Terminal.Color.bright_green;
381const ATTRIBUTE = std.Io.Terminal.Color.bright_yellow;381const ATTRIBUTE = std.Io.Terminal.Color.bright_yellow;
382382
383const RefMap = std.AutoArrayHashMapUnmanaged(Ref, void);383const RefMap = std.array_hash_map.Auto(Ref, void);
384384
385pub const DumpError = std.Io.Terminal.SetColorError || std.mem.Allocator.Error;385pub const DumpError = std.Io.Terminal.SetColorError || std.mem.Allocator.Error;
386386
lib/compiler/configurer.zig+3-3
...@@ -160,10 +160,10 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -160,10 +160,10 @@ pub fn main(init: process.Init.Minimal) !void {
160const Serialize = struct {160const Serialize = struct {
161 arena: Allocator,161 arena: Allocator,
162 wc: *Configuration.Wip,162 wc: *Configuration.Wip,
163 module_map: std.AutoArrayHashMapUnmanaged(*std.Build.Module, Configuration.Module.Index) = .empty,163 module_map: std.array_hash_map.Auto(*std.Build.Module, Configuration.Module.Index) = .empty,
164 package_map: std.AutoArrayHashMapUnmanaged(*std.Build, Configuration.Package.Index) = .empty,164 package_map: std.array_hash_map.Auto(*std.Build, Configuration.Package.Index) = .empty,
165 /// Index corresponds to `Configuration.steps` index.165 /// Index corresponds to `Configuration.steps` index.
166 step_map: std.AutoArrayHashMapUnmanaged(*Step, void) = .empty,166 step_map: std.array_hash_map.Auto(*Step, void) = .empty,
167167
168 fn builderToPackage(s: *Serialize, b: *std.Build) !Configuration.Package.Index {168 fn builderToPackage(s: *Serialize, b: *std.Build) !Configuration.Package.Index {
169 if (b.pkg_hash.len == 0) return .root;169 if (b.pkg_hash.len == 0) return .root;
lib/compiler/resinator/compile.zig+2-2
...@@ -3049,7 +3049,7 @@ pub const StringTablesByLanguage = struct {...@@ -3049,7 +3049,7 @@ pub const StringTablesByLanguage = struct {
3049 /// when the first STRINGTABLE for the language was defined, and all blocks for a given3049 /// when the first STRINGTABLE for the language was defined, and all blocks for a given
3050 /// language are written contiguously.3050 /// language are written contiguously.
3051 /// Using an ArrayHashMap here gives us this property for free.3051 /// Using an ArrayHashMap here gives us this property for free.
3052 tables: std.AutoArrayHashMapUnmanaged(res.Language, StringTable) = .empty,3052 tables: std.array_hash_map.Auto(res.Language, StringTable) = .empty,
30533053
3054 pub fn deinit(self: *StringTablesByLanguage, allocator: Allocator) void {3054 pub fn deinit(self: *StringTablesByLanguage, allocator: Allocator) void {
3055 self.tables.deinit(allocator);3055 self.tables.deinit(allocator);
...@@ -3080,7 +3080,7 @@ pub const StringTable = struct {...@@ -3080,7 +3080,7 @@ pub const StringTable = struct {
3080 /// was added to the block (i.e. `STRINGTABLE { 16 "b" 0 "a" }` would then get written3080 /// was added to the block (i.e. `STRINGTABLE { 16 "b" 0 "a" }` would then get written
3081 /// with block ID 2 (the one with "b") first and block ID 1 (the one with "a") second).3081 /// with block ID 2 (the one with "b") first and block ID 1 (the one with "a") second).
3082 /// Using an ArrayHashMap here gives us this property for free.3082 /// Using an ArrayHashMap here gives us this property for free.
3083 blocks: std.AutoArrayHashMapUnmanaged(u16, Block) = .empty,3083 blocks: std.array_hash_map.Auto(u16, Block) = .empty,
30843084
3085 pub const Block = struct {3085 pub const Block = struct {
3086 strings: std.ArrayList(Token) = .empty,3086 strings: std.ArrayList(Token) = .empty,
lib/compiler/resinator/cvtres.zig+1-1
...@@ -451,7 +451,7 @@ const ResourceTree = struct {...@@ -451,7 +451,7 @@ const ResourceTree = struct {
451 resource: *const Resource,451 resource: *const Resource,
452 original_index: usize,452 original_index: usize,
453 };453 };
454 const LanguageToResourceMap = std.AutoArrayHashMapUnmanaged(Language, RelocatableResource);454 const LanguageToResourceMap = std.array_hash_map.Auto(Language, RelocatableResource);
455 const NameToLanguageMap = std.ArrayHashMapUnmanaged(NameOrOrdinal, LanguageToResourceMap, NameOrOrdinalHashContext, true);455 const NameToLanguageMap = std.ArrayHashMapUnmanaged(NameOrOrdinal, LanguageToResourceMap, NameOrOrdinalHashContext, true);
456456
457 const NameOrOrdinalHashContext = struct {457 const NameOrOrdinalHashContext = struct {
lib/compiler/translate-c/Translator.zig+1-1
...@@ -106,7 +106,7 @@ global_scope: *Scope.Root,...@@ -106,7 +106,7 @@ global_scope: *Scope.Root,
106mangle_count: u32 = 0,106mangle_count: u32 = 0,
107107
108/// Table of declarations for enum, struct, union and typedef types.108/// Table of declarations for enum, struct, union and typedef types.
109type_decls: std.AutoArrayHashMapUnmanaged(Node.Index, []const u8) = .empty,109type_decls: std.array_hash_map.Auto(Node.Index, []const u8) = .empty,
110/// Table of record decls that have been demoted to opaques.110/// Table of record decls that have been demoted to opaques.
111opaque_demotes: std.HashMapUnmanaged(QualType, void, QualTypeHashContext, std.hash_map.default_max_load_percentage) = .empty,111opaque_demotes: std.HashMapUnmanaged(QualType, void, QualTypeHashContext, std.hash_map.default_max_load_percentage) = .empty,
112/// Table of unnamed enums and records that are child types of typedefs.112/// Table of unnamed enums and records that are child types of typedefs.
lib/docs/wasm/Walk.zig+5-5
...@@ -42,17 +42,17 @@ pub const Category = union(enum(u8)) {...@@ -42,17 +42,17 @@ pub const Category = union(enum(u8)) {
42pub const File = struct {42pub const File = struct {
43 ast: Ast,43 ast: Ast,
44 /// Maps identifiers to the declarations they point to.44 /// Maps identifiers to the declarations they point to.
45 ident_decls: std.AutoArrayHashMapUnmanaged(Ast.TokenIndex, Ast.Node.Index) = .empty,45 ident_decls: std.array_hash_map.Auto(Ast.TokenIndex, Ast.Node.Index) = .empty,
46 /// Maps field access identifiers to the containing field access node.46 /// Maps field access identifiers to the containing field access node.
47 token_parents: std.AutoArrayHashMapUnmanaged(Ast.TokenIndex, Ast.Node.Index) = .empty,47 token_parents: std.array_hash_map.Auto(Ast.TokenIndex, Ast.Node.Index) = .empty,
48 /// Maps declarations to their global index.48 /// Maps declarations to their global index.
49 node_decls: std.AutoArrayHashMapUnmanaged(Ast.Node.Index, Decl.Index) = .empty,49 node_decls: std.array_hash_map.Auto(Ast.Node.Index, Decl.Index) = .empty,
50 /// Maps function declarations to doctests.50 /// Maps function declarations to doctests.
51 doctests: std.AutoArrayHashMapUnmanaged(Ast.Node.Index, Ast.Node.Index) = .empty,51 doctests: std.array_hash_map.Auto(Ast.Node.Index, Ast.Node.Index) = .empty,
52 /// root node => its namespace scope52 /// root node => its namespace scope
53 /// struct/union/enum/opaque decl node => its namespace scope53 /// struct/union/enum/opaque decl node => its namespace scope
54 /// local var decl node => its local variable scope54 /// local var decl node => its local variable scope
55 scopes: std.AutoArrayHashMapUnmanaged(Ast.Node.Index, *Scope) = .empty,55 scopes: std.array_hash_map.Auto(Ast.Node.Index, *Scope) = .empty,
5656
57 pub fn lookup_token(file: *File, token: Ast.TokenIndex) Decl.Index {57 pub fn lookup_token(file: *File, token: Ast.TokenIndex) Decl.Index {
58 const decl_node = file.ident_decls.get(token) orelse return .none;58 const decl_node = file.ident_decls.get(token) orelse return .none;
lib/std/Build/Module.zig+1-1
...@@ -563,7 +563,7 @@ pub fn getGraph(root: *Module) Graph {...@@ -563,7 +563,7 @@ pub fn getGraph(root: *Module) Graph {
563563
564 const arena = root.owner.graph.arena;564 const arena = root.owner.graph.arena;
565565
566 var modules: std.AutoArrayHashMapUnmanaged(*std.Build.Module, []const u8) = .empty;566 var modules: std.array_hash_map.Auto(*std.Build.Module, []const u8) = .empty;
567 var next_idx: usize = 0;567 var next_idx: usize = 0;
568568
569 modules.putNoClobber(arena, root, "root") catch @panic("OOM");569 modules.putNoClobber(arena, root, "root") catch @panic("OOM");
lib/std/Build/Step/Compile.zig+1-1
...@@ -759,7 +759,7 @@ pub fn rootModuleTarget(c: *Compile) std.Target {...@@ -759,7 +759,7 @@ pub fn rootModuleTarget(c: *Compile) std.Target {
759pub fn getCompileDependencies(start: *Compile, chase_dynamic: bool) []const *Compile {759pub fn getCompileDependencies(start: *Compile, chase_dynamic: bool) []const *Compile {
760 const arena = start.step.owner.graph.arena;760 const arena = start.step.owner.graph.arena;
761761
762 var compiles: std.AutoArrayHashMapUnmanaged(*Compile, void) = .empty;762 var compiles: std.array_hash_map.Auto(*Compile, void) = .empty;
763 var next_idx: usize = 0;763 var next_idx: usize = 0;
764764
765 compiles.putNoClobber(arena, start, {}) catch @panic("OOM");765 compiles.putNoClobber(arena, start, {}) catch @panic("OOM");
lib/std/Io/Kqueue.zig+1-1
...@@ -40,7 +40,7 @@ const Thread = struct {...@@ -40,7 +40,7 @@ const Thread = struct {
40 steal_ready_search_index: u32,40 steal_ready_search_index: u32,
41 /// For ensuring multiple fibers waiting on the same file descriptor and41 /// For ensuring multiple fibers waiting on the same file descriptor and
42 /// filter use the same kevent.42 /// filter use the same kevent.
43 wait_queues: std.AutoArrayHashMapUnmanaged(WaitQueueKey, *Fiber),43 wait_queues: std.array_hash_map.Auto(WaitQueueKey, *Fiber),
4444
45 const WaitQueueKey = struct {45 const WaitQueueKey = struct {
46 ident: usize,46 ident: usize,
lib/std/debug/Dwarf.zig+1-1
...@@ -134,7 +134,7 @@ pub const CompileUnit = struct {...@@ -134,7 +134,7 @@ pub const CompileUnit = struct {
134 files: []FileEntry,134 files: []FileEntry,
135 version: u16,135 version: u16,
136136
137 pub const LineTable = std.AutoArrayHashMapUnmanaged(u64, LineEntry);137 pub const LineTable = std.array_hash_map.Auto(u64, LineEntry);
138138
139 pub const LineEntry = struct {139 pub const LineEntry = struct {
140 line: u32,140 line: u32,
lib/std/debug/MachOFile.zig+1-1
...@@ -4,7 +4,7 @@ strings: []const u8,...@@ -4,7 +4,7 @@ strings: []const u8,
4text_vmaddr: u64,4text_vmaddr: u64,
55
6/// Key is index into `strings` of the file path.6/// Key is index into `strings` of the file path.
7ofiles: std.AutoArrayHashMapUnmanaged(u32, Error!OFile),7ofiles: std.array_hash_map.Auto(u32, Error!OFile),
88
9pub const Error = error{9pub const Error = error{
10 InvalidMachO,10 InvalidMachO,
lib/std/zig/AstGen.zig+5-5
...@@ -52,7 +52,7 @@ within_fn: bool = false,...@@ -52,7 +52,7 @@ within_fn: bool = false,
52fn_ret_ty: Zir.Inst.Ref = .none,52fn_ret_ty: Zir.Inst.Ref = .none,
53/// Maps string table indexes to the first `@import` ZIR instruction53/// Maps string table indexes to the first `@import` ZIR instruction
54/// that uses this string as the operand.54/// that uses this string as the operand.
55imports: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, Ast.TokenIndex) = .empty,55imports: std.array_hash_map.Auto(Zir.NullTerminatedString, Ast.TokenIndex) = .empty,
56/// Used for temporary storage when building payloads.56/// Used for temporary storage when building payloads.
57scratch: std.ArrayList(u32) = .empty,57scratch: std.ArrayList(u32) = .empty,
58/// Whenever a `ref` instruction is needed, it is created and saved in this58/// Whenever a `ref` instruction is needed, it is created and saved in this
...@@ -11163,7 +11163,7 @@ const Scope = struct {...@@ -11163,7 +11163,7 @@ const Scope = struct {
11163 declaring_gz: ?*GenZir,11163 declaring_gz: ?*GenZir,
1116411164
11165 /// Set of captures used by this namespace.11165 /// Set of captures used by this namespace.
11166 captures: std.AutoArrayHashMapUnmanaged(Zir.Inst.Capture, Zir.NullTerminatedString) = .empty,11166 captures: std.array_hash_map.Auto(Zir.Inst.Capture, Zir.NullTerminatedString) = .empty,
1116711167
11168 fn deinit(self: *Namespace, gpa: Allocator) void {11168 fn deinit(self: *Namespace, gpa: Allocator) void {
11169 self.decls.deinit(gpa);11169 self.decls.deinit(gpa);
...@@ -12856,9 +12856,9 @@ fn scanContainer(...@@ -12856,9 +12856,9 @@ fn scanContainer(
12856 var bfa_state: std.heap.BufferFirstAllocator = .init(&bfa_buf, astgen.gpa);12856 var bfa_state: std.heap.BufferFirstAllocator = .init(&bfa_buf, astgen.gpa);
12857 const bfa = bfa_state.allocator();12857 const bfa = bfa_state.allocator();
1285812858
12859 var names: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, NameEntry) = .empty;12859 var names: std.array_hash_map.Auto(Zir.NullTerminatedString, NameEntry) = .empty;
12860 var test_names: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, NameEntry) = .empty;12860 var test_names: std.array_hash_map.Auto(Zir.NullTerminatedString, NameEntry) = .empty;
12861 var decltest_names: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, NameEntry) = .empty;12861 var decltest_names: std.array_hash_map.Auto(Zir.NullTerminatedString, NameEntry) = .empty;
12862 defer {12862 defer {
12863 names.deinit(bfa);12863 names.deinit(bfa);
12864 test_names.deinit(bfa);12864 test_names.deinit(bfa);
lib/std/zig/llvm/Builder.zig+21-21
...@@ -21,25 +21,25 @@ data_layout: String,...@@ -21,25 +21,25 @@ data_layout: String,
21target_triple: String,21target_triple: String,
22module_asm: std.ArrayList(u8),22module_asm: std.ArrayList(u8),
2323
24string_map: std.AutoArrayHashMapUnmanaged(void, void),24string_map: std.array_hash_map.Auto(void, void),
25string_indices: std.ArrayList(u32),25string_indices: std.ArrayList(u32),
26string_bytes: std.ArrayList(u8),26string_bytes: std.ArrayList(u8),
2727
28types: std.AutoArrayHashMapUnmanaged(String, Type),28types: std.array_hash_map.Auto(String, Type),
29next_unnamed_type: String,29next_unnamed_type: String,
30next_unique_type_id: std.AutoHashMapUnmanaged(String, u32),30next_unique_type_id: std.AutoHashMapUnmanaged(String, u32),
31type_map: std.AutoArrayHashMapUnmanaged(void, void),31type_map: std.array_hash_map.Auto(void, void),
32type_items: std.ArrayList(Type.Item),32type_items: std.ArrayList(Type.Item),
33type_extra: std.ArrayList(u32),33type_extra: std.ArrayList(u32),
3434
35attributes: std.AutoArrayHashMapUnmanaged(Attribute.Storage, void),35attributes: std.array_hash_map.Auto(Attribute.Storage, void),
36attributes_map: std.AutoArrayHashMapUnmanaged(void, void),36attributes_map: std.array_hash_map.Auto(void, void),
37attributes_indices: std.ArrayList(u32),37attributes_indices: std.ArrayList(u32),
38attributes_extra: std.ArrayList(u32),38attributes_extra: std.ArrayList(u32),
3939
40function_attributes_set: std.AutoArrayHashMapUnmanaged(FunctionAttributes, void),40function_attributes_set: std.array_hash_map.Auto(FunctionAttributes, void),
4141
42globals: std.AutoArrayHashMapUnmanaged(StrtabString, Global),42globals: std.array_hash_map.Auto(StrtabString, Global),
43next_unnamed_global: StrtabString,43next_unnamed_global: StrtabString,
44next_replaced_global: StrtabString,44next_replaced_global: StrtabString,
45next_unique_global_id: std.AutoHashMapUnmanaged(StrtabString, u32),45next_unique_global_id: std.AutoHashMapUnmanaged(StrtabString, u32),
...@@ -47,28 +47,28 @@ aliases: std.ArrayList(Alias),...@@ -47,28 +47,28 @@ aliases: std.ArrayList(Alias),
47variables: std.ArrayList(Variable),47variables: std.ArrayList(Variable),
48functions: std.ArrayList(Function),48functions: std.ArrayList(Function),
4949
50strtab_string_map: std.AutoArrayHashMapUnmanaged(void, void),50strtab_string_map: std.array_hash_map.Auto(void, void),
51strtab_string_indices: std.ArrayList(u32),51strtab_string_indices: std.ArrayList(u32),
52strtab_string_bytes: std.ArrayList(u8),52strtab_string_bytes: std.ArrayList(u8),
5353
54constant_map: std.AutoArrayHashMapUnmanaged(void, void),54constant_map: std.array_hash_map.Auto(void, void),
55constant_items: std.MultiArrayList(Constant.Item),55constant_items: std.MultiArrayList(Constant.Item),
56constant_extra: std.ArrayList(u32),56constant_extra: std.ArrayList(u32),
57constant_limbs: std.ArrayList(std.math.big.Limb),57constant_limbs: std.ArrayList(std.math.big.Limb),
5858
59alignment_forward_references: std.ArrayList(Alignment),59alignment_forward_references: std.ArrayList(Alignment),
6060
61metadata_map: std.AutoArrayHashMapUnmanaged(void, void),61metadata_map: std.array_hash_map.Auto(void, void),
62metadata_items: std.MultiArrayList(Metadata.Item),62metadata_items: std.MultiArrayList(Metadata.Item),
63metadata_extra: std.ArrayList(u32),63metadata_extra: std.ArrayList(u32),
64metadata_limbs: std.ArrayList(std.math.big.Limb),64metadata_limbs: std.ArrayList(std.math.big.Limb),
65metadata_forward_references: std.ArrayList(Metadata.Optional),65metadata_forward_references: std.ArrayList(Metadata.Optional),
66metadata_named: std.AutoArrayHashMapUnmanaged(String, struct {66metadata_named: std.array_hash_map.Auto(String, struct {
67 len: u32,67 len: u32,
68 index: Metadata.Item.ExtraIndex,68 index: Metadata.Item.ExtraIndex,
69}),69}),
7070
71metadata_string_map: std.AutoArrayHashMapUnmanaged(void, void),71metadata_string_map: std.array_hash_map.Auto(void, void),
72metadata_string_indices: std.ArrayList(u32),72metadata_string_indices: std.ArrayList(u32),
73metadata_string_bytes: std.ArrayList(u8),73metadata_string_bytes: std.ArrayList(u8),
7474
...@@ -1633,7 +1633,7 @@ pub const FunctionAttributes = enum(u32) {...@@ -1633,7 +1633,7 @@ pub const FunctionAttributes = enum(u32) {
1633 pub const Wip = struct {1633 pub const Wip = struct {
1634 maps: Maps = .empty,1634 maps: Maps = .empty,
16351635
1636 const Map = std.AutoArrayHashMapUnmanaged(Attribute.Kind, Attribute.Index);1636 const Map = std.array_hash_map.Auto(Attribute.Kind, Attribute.Index);
1637 const Maps = std.ArrayList(Map);1637 const Maps = std.ArrayList(Map);
16381638
1639 pub fn deinit(self: *Wip, builder: *const Builder) void {1639 pub fn deinit(self: *Wip, builder: *const Builder) void {
...@@ -5235,8 +5235,8 @@ pub const WipFunction = struct {...@@ -5235,8 +5235,8 @@ pub const WipFunction = struct {
5235 instructions: std.MultiArrayList(Instruction),5235 instructions: std.MultiArrayList(Instruction),
5236 names: std.ArrayList(String),5236 names: std.ArrayList(String),
5237 strip: bool,5237 strip: bool,
5238 debug_locations: std.AutoArrayHashMapUnmanaged(Instruction.Index, DebugLocation),5238 debug_locations: std.array_hash_map.Auto(Instruction.Index, DebugLocation),
5239 debug_values: std.AutoArrayHashMapUnmanaged(Instruction.Index, void),5239 debug_values: std.array_hash_map.Auto(Instruction.Index, void),
5240 extra: std.ArrayList(u32),5240 extra: std.ArrayList(u32),
52415241
5242 pub const Cursor = struct { block: Block.Index, instruction: u32 = 0 };5242 pub const Cursor = struct { block: Block.Index, instruction: u32 = 0 };
...@@ -8451,7 +8451,7 @@ pub const Metadata = packed struct(u32) {...@@ -8451,7 +8451,7 @@ pub const Metadata = packed struct(u32) {
8451 const Formatter = struct {8451 const Formatter = struct {
8452 builder: *Builder,8452 builder: *Builder,
8453 need_comma: bool,8453 need_comma: bool,
8454 map: std.AutoArrayHashMapUnmanaged(union(enum) {8454 map: std.array_hash_map.Auto(union(enum) {
8455 metadata: Metadata,8455 metadata: Metadata,
8456 debug_location: DebugLocation.Location,8456 debug_location: DebugLocation.Location,
8457 }, void) = .empty,8457 }, void) = .empty,
...@@ -9791,7 +9791,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void...@@ -9791,7 +9791,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
9791 }9791 }
9792 }9792 }
97939793
9794 var attribute_groups: std.AutoArrayHashMapUnmanaged(Attributes, void) = .empty;9794 var attribute_groups: std.array_hash_map.Auto(Attributes, void) = .empty;
9795 defer attribute_groups.deinit(self.gpa);9795 defer attribute_groups.deinit(self.gpa);
97969796
9797 for (0.., self.functions.items) |function_i, function| {9797 for (0.., self.functions.items) |function_i, function| {
...@@ -13507,7 +13507,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco...@@ -13507,7 +13507,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
13507 try type_block.end();13507 try type_block.end();
13508 }13508 }
1350913509
13510 var attributes_set: std.AutoArrayHashMapUnmanaged(struct {13510 var attributes_set: std.array_hash_map.Auto(struct {
13511 attributes: Attributes,13511 attributes: Attributes,
13512 index: u32,13512 index: u32,
13513 }, void) = .{};13513 }, void) = .{};
...@@ -13743,7 +13743,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco...@@ -13743,7 +13743,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
13743 try paramattr_block.end();13743 try paramattr_block.end();
13744 }13744 }
1374513745
13746 var globals: std.AutoArrayHashMapUnmanaged(Global.Index, void) = .empty;13746 var globals: std.array_hash_map.Auto(Global.Index, void) = .empty;
13747 defer globals.deinit(self.gpa);13747 defer globals.deinit(self.gpa);
13748 try globals.ensureUnusedCapacity(13748 try globals.ensureUnusedCapacity(
13749 self.gpa,13749 self.gpa,
...@@ -13784,7 +13784,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco...@@ -13784,7 +13784,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1378413784
13785 const ConstantAdapter = struct {13785 const ConstantAdapter = struct {
13786 builder: *const Builder,13786 builder: *const Builder,
13787 globals: *const std.AutoArrayHashMapUnmanaged(Global.Index, void),13787 globals: *const std.array_hash_map.Auto(Global.Index, void),
1378813788
13789 pub fn get(adapter: @This(), param: anytype) switch (@TypeOf(param)) {13789 pub fn get(adapter: @This(), param: anytype) switch (@TypeOf(param)) {
13790 Constant => u32,13790 Constant => u32,
...@@ -13815,7 +13815,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco...@@ -13815,7 +13815,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1381513815
13816 // Globals13816 // Globals
13817 {13817 {
13818 var section_map: std.AutoArrayHashMapUnmanaged(String, void) = .empty;13818 var section_map: std.array_hash_map.Auto(String, void) = .empty;
13819 defer section_map.deinit(self.gpa);13819 defer section_map.deinit(self.gpa);
13820 try section_map.ensureUnusedCapacity(self.gpa, globals.count());13820 try section_map.ensureUnusedCapacity(self.gpa, globals.count());
1382113821
src/Compilation.zig+14-14
...@@ -103,8 +103,8 @@ native_system_include_paths: []const []const u8,...@@ -103,8 +103,8 @@ native_system_include_paths: []const []const u8,
103/// Corresponds to `-u <symbol>` for ELF/MachO and `/include:<symbol>` for COFF/PE.103/// Corresponds to `-u <symbol>` for ELF/MachO and `/include:<symbol>` for COFF/PE.
104force_undefined_symbols: std.array_hash_map.String(void),104force_undefined_symbols: std.array_hash_map.String(void),
105105
106c_object_table: std.AutoArrayHashMapUnmanaged(*CObject, void) = .empty,106c_object_table: std.array_hash_map.Auto(*CObject, void) = .empty,
107win32_resource_table: if (dev.env.supports(.win32_resource)) std.AutoArrayHashMapUnmanaged(*Win32Resource, void) else struct {107win32_resource_table: if (dev.env.supports(.win32_resource)) std.array_hash_map.Auto(*Win32Resource, void) else struct {
108 pub fn keys(_: @This()) [0]void {108 pub fn keys(_: @This()) [0]void {
109 return .{};109 return .{};
110 }110 }
...@@ -145,11 +145,11 @@ win32_resource_work_queue: if (dev.env.supports(.win32_resource)) std.Deque(*Win...@@ -145,11 +145,11 @@ win32_resource_work_queue: if (dev.env.supports(.win32_resource)) std.Deque(*Win
145145
146/// The ErrorMsg memory is owned by the `CObject`, using Compilation's general purpose allocator.146/// The ErrorMsg memory is owned by the `CObject`, using Compilation's general purpose allocator.
147/// This data is accessed by multiple threads and is protected by `mutex`.147/// This data is accessed by multiple threads and is protected by `mutex`.
148failed_c_objects: std.AutoArrayHashMapUnmanaged(*CObject, *CObject.Diag.Bundle) = .empty,148failed_c_objects: std.array_hash_map.Auto(*CObject, *CObject.Diag.Bundle) = .empty,
149149
150/// The ErrorBundle memory is owned by the `Win32Resource`, using Compilation's general purpose allocator.150/// The ErrorBundle memory is owned by the `Win32Resource`, using Compilation's general purpose allocator.
151/// This data is accessed by multiple threads and is protected by `mutex`.151/// This data is accessed by multiple threads and is protected by `mutex`.
152failed_win32_resources: if (dev.env.supports(.win32_resource)) std.AutoArrayHashMapUnmanaged(*Win32Resource, ErrorBundle) else struct {152failed_win32_resources: if (dev.env.supports(.win32_resource)) std.array_hash_map.Auto(*Win32Resource, ErrorBundle) else struct {
153 pub fn values(_: @This()) [0]void {153 pub fn values(_: @This()) [0]void {
154 return .{};154 return .{};
155 }155 }
...@@ -157,7 +157,7 @@ failed_win32_resources: if (dev.env.supports(.win32_resource)) std.AutoArrayHash...@@ -157,7 +157,7 @@ failed_win32_resources: if (dev.env.supports(.win32_resource)) std.AutoArrayHash
157} = .{},157} = .{},
158158
159/// Miscellaneous things that can fail.159/// Miscellaneous things that can fail.
160misc_failures: std.AutoArrayHashMapUnmanaged(MiscTask, MiscError) = .empty,160misc_failures: std.array_hash_map.Auto(MiscTask, MiscError) = .empty,
161161
162/// When this is `true` it means invoking clang as a sub-process is expected to inherit162/// When this is `true` it means invoking clang as a sub-process is expected to inherit
163/// stdin, stdout, stderr, and if it returns non success, to forward the exit code.163/// stdin, stdout, stderr, and if it returns non success, to forward the exit code.
...@@ -865,7 +865,7 @@ pub const TimeReport = struct {...@@ -865,7 +865,7 @@ pub const TimeReport = struct {
865 /// a function) all generic instances of this function. It also includes time spent analyzing865 /// a function) all generic instances of this function. It also includes time spent analyzing
866 /// function bodies if this is a function (generic or otherwise).866 /// function bodies if this is a function (generic or otherwise).
867 /// An entry not existing means the declaration has not been analyzed (so far).867 /// An entry not existing means the declaration has not been analyzed (so far).
868 decl_sema_info: std.AutoArrayHashMapUnmanaged(InternPool.TrackedInst.Index, struct {868 decl_sema_info: std.array_hash_map.Auto(InternPool.TrackedInst.Index, struct {
869 ns: u64,869 ns: u64,
870 count: u32,870 count: u32,
871 }),871 }),
...@@ -875,14 +875,14 @@ pub const TimeReport = struct {...@@ -875,14 +875,14 @@ pub const TimeReport = struct {
875 /// instances, both of this function itself and of its parent namespace.875 /// instances, both of this function itself and of its parent namespace.
876 /// An entry not existing means the declaration has not been codegenned (so far).876 /// An entry not existing means the declaration has not been codegenned (so far).
877 /// Every key in `decl_codegen_ns` is also in `decl_sema_ns`.877 /// Every key in `decl_codegen_ns` is also in `decl_sema_ns`.
878 decl_codegen_ns: std.AutoArrayHashMapUnmanaged(InternPool.TrackedInst.Index, u64),878 decl_codegen_ns: std.array_hash_map.Auto(InternPool.TrackedInst.Index, u64),
879879
880 /// Key is a ZIR `declaration` instruction which is anything other than a `comptime` decl; value880 /// Key is a ZIR `declaration` instruction which is anything other than a `comptime` decl; value
881 /// is the number of nanoseconds spent linking it into the binary. As above, this is the total881 /// is the number of nanoseconds spent linking it into the binary. As above, this is the total
882 /// across all generic instances.882 /// across all generic instances.
883 /// An entry not existing means the declaration has not been linked (so far).883 /// An entry not existing means the declaration has not been linked (so far).
884 /// Every key in `decl_link_ns` is also in `decl_sema_ns`.884 /// Every key in `decl_link_ns` is also in `decl_sema_ns`.
885 decl_link_ns: std.AutoArrayHashMapUnmanaged(InternPool.TrackedInst.Index, u64),885 decl_link_ns: std.array_hash_map.Auto(InternPool.TrackedInst.Index, u64),
886886
887 pub fn deinit(tr: *TimeReport, gpa: Allocator) void {887 pub fn deinit(tr: *TimeReport, gpa: Allocator) void {
888 tr.stats = undefined;888 tr.stats = undefined;
...@@ -1068,8 +1068,8 @@ pub const CObject = struct {...@@ -1068,8 +1068,8 @@ pub const CObject = struct {
1068 }1068 }
10691069
1070 pub const Bundle = struct {1070 pub const Bundle = struct {
1071 file_names: std.AutoArrayHashMapUnmanaged(u32, []const u8) = .empty,1071 file_names: std.array_hash_map.Auto(u32, []const u8) = .empty,
1072 category_names: std.AutoArrayHashMapUnmanaged(u32, []const u8) = .empty,1072 category_names: std.array_hash_map.Auto(u32, []const u8) = .empty,
1073 diags: []Diag = &.{},1073 diags: []Diag = &.{},
10741074
1075 pub fn destroy(bundle: *Bundle, gpa: Allocator) void {1075 pub fn destroy(bundle: *Bundle, gpa: Allocator) void {
...@@ -1122,13 +1122,13 @@ pub const CObject = struct {...@@ -1122,13 +1122,13 @@ pub const CObject = struct {
1122 var bc = std.zig.llvm.BitcodeReader.init(gpa, .{ .reader = &file_reader.interface });1122 var bc = std.zig.llvm.BitcodeReader.init(gpa, .{ .reader = &file_reader.interface });
1123 defer bc.deinit();1123 defer bc.deinit();
11241124
1125 var file_names: std.AutoArrayHashMapUnmanaged(u32, []const u8) = .empty;1125 var file_names: std.array_hash_map.Auto(u32, []const u8) = .empty;
1126 errdefer {1126 errdefer {
1127 for (file_names.values()) |file_name| gpa.free(file_name);1127 for (file_names.values()) |file_name| gpa.free(file_name);
1128 file_names.deinit(gpa);1128 file_names.deinit(gpa);
1129 }1129 }
11301130
1131 var category_names: std.AutoArrayHashMapUnmanaged(u32, []const u8) = .empty;1131 var category_names: std.array_hash_map.Auto(u32, []const u8) = .empty;
1132 errdefer {1132 errdefer {
1133 for (category_names.values()) |category_name| gpa.free(category_name);1133 for (category_names.values()) |category_name| gpa.free(category_name);
1134 category_names.deinit(gpa);1134 category_names.deinit(gpa);
...@@ -4064,7 +4064,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle {...@@ -4064,7 +4064,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle {
4064 }4064 }
4065 }4065 }
4066 if (zcu.skip_analysis_this_update) break :zcu_errors;4066 if (zcu.skip_analysis_this_update) break :zcu_errors;
4067 var sorted_failed_analysis: std.AutoArrayHashMapUnmanaged(InternPool.AnalUnit, *Zcu.ErrorMsg).DataList.Slice = s: {4067 var sorted_failed_analysis: std.array_hash_map.Auto(InternPool.AnalUnit, *Zcu.ErrorMsg).DataList.Slice = s: {
4068 const SortOrder = struct {4068 const SortOrder = struct {
4069 zcu: *Zcu,4069 zcu: *Zcu,
4070 errors: []const *Zcu.ErrorMsg,4070 errors: []const *Zcu.ErrorMsg,
...@@ -4831,7 +4831,7 @@ fn docsCopyFallible(comp: *Compilation) anyerror!void {...@@ -4831,7 +4831,7 @@ fn docsCopyFallible(comp: *Compilation) anyerror!void {
4831 var buffer: [1024]u8 = undefined;4831 var buffer: [1024]u8 = undefined;
4832 var tar_file_writer = tar_file.writer(io, &buffer);4832 var tar_file_writer = tar_file.writer(io, &buffer);
48334833
4834 var seen_table: std.AutoArrayHashMapUnmanaged(*Package.Module, []const u8) = .empty;4834 var seen_table: std.array_hash_map.Auto(*Package.Module, []const u8) = .empty;
4835 defer seen_table.deinit(comp.gpa);4835 defer seen_table.deinit(comp.gpa);
48364836
4837 try seen_table.put(comp.gpa, zcu.main_mod, comp.root_name);4837 try seen_table.put(comp.gpa, zcu.main_mod, comp.root_name);
src/InternPool.zig+12-12
...@@ -41,22 +41,22 @@ tid_shift_32: if (single_threaded) u0 else std.math.Log2Int(u32),...@@ -41,22 +41,22 @@ tid_shift_32: if (single_threaded) u0 else std.math.Log2Int(u32),
41/// * For a `func`, this is the source of the full function signature.41/// * For a `func`, this is the source of the full function signature.
42/// These are also invalidated if tracking fails for this instruction.42/// These are also invalidated if tracking fails for this instruction.
43/// Value is index into `dep_entries` of the first dependency on this hash.43/// Value is index into `dep_entries` of the first dependency on this hash.
44src_hash_deps: std.AutoArrayHashMapUnmanaged(TrackedInst.Index, DepEntry.Index),44src_hash_deps: std.array_hash_map.Auto(TrackedInst.Index, DepEntry.Index),
45/// Dependencies on the value of a Nav.45/// Dependencies on the value of a Nav.
46/// Value is index into `dep_entries` of the first dependency on this Nav value.46/// Value is index into `dep_entries` of the first dependency on this Nav value.
47nav_val_deps: std.AutoArrayHashMapUnmanaged(Nav.Index, DepEntry.Index),47nav_val_deps: std.array_hash_map.Auto(Nav.Index, DepEntry.Index),
48/// Dependencies on the type of a Nav.48/// Dependencies on the type of a Nav.
49/// Value is index into `dep_entries` of the first dependency on this Nav value.49/// Value is index into `dep_entries` of the first dependency on this Nav value.
50nav_ty_deps: std.AutoArrayHashMapUnmanaged(Nav.Index, DepEntry.Index),50nav_ty_deps: std.array_hash_map.Auto(Nav.Index, DepEntry.Index),
51/// Dependencies on a function's inferred error set. Key is the function body, not the IES.51/// Dependencies on a function's inferred error set. Key is the function body, not the IES.
52/// Value is index into `dep_entries` of the first dependency on this function's IES.52/// Value is index into `dep_entries` of the first dependency on this function's IES.
53func_ies_deps: std.AutoArrayHashMapUnmanaged(Index, DepEntry.Index),53func_ies_deps: std.array_hash_map.Auto(Index, DepEntry.Index),
54/// Dependencies on the resolved layout of a `struct`, `union`, or `enum` type.54/// Dependencies on the resolved layout of a `struct`, `union`, or `enum` type.
55/// Value is index into `dep_entries` of the first dependency on this type's layout.55/// Value is index into `dep_entries` of the first dependency on this type's layout.
56type_layout_deps: std.AutoArrayHashMapUnmanaged(Index, DepEntry.Index),56type_layout_deps: std.array_hash_map.Auto(Index, DepEntry.Index),
57/// Dependencies on the resolved default field values of a `struct` type.57/// Dependencies on the resolved default field values of a `struct` type.
58/// Value is index into `dep_entries` of the first dependency on this type's inits.58/// Value is index into `dep_entries` of the first dependency on this type's inits.
59struct_defaults_deps: std.AutoArrayHashMapUnmanaged(Index, DepEntry.Index),59struct_defaults_deps: std.array_hash_map.Auto(Index, DepEntry.Index),
60/// Dependencies on a Zig or ZON source file. Triggered by `@import`.60/// Dependencies on a Zig or ZON source file. Triggered by `@import`.
61/// * For ZON source files, the dependency is invalidated if the file changes at all. The `@import`61/// * For ZON source files, the dependency is invalidated if the file changes at all. The `@import`
62/// must be re-analyzed to return the new data structure.62/// must be re-analyzed to return the new data structure.
...@@ -64,18 +64,18 @@ struct_defaults_deps: std.AutoArrayHashMapUnmanaged(Index, DepEntry.Index),...@@ -64,18 +64,18 @@ struct_defaults_deps: std.AutoArrayHashMapUnmanaged(Index, DepEntry.Index),
64/// (which can only happen because the `.main_struct_inst` got lost). The `@import` must be64/// (which can only happen because the `.main_struct_inst` got lost). The `@import` must be
65/// re-analyzed to return the new type.65/// re-analyzed to return the new type.
66/// Value is index into `dep_entries` of the first dependency on this Zig/ZON file.66/// Value is index into `dep_entries` of the first dependency on this Zig/ZON file.
67source_file_deps: std.AutoArrayHashMapUnmanaged(FileIndex, DepEntry.Index),67source_file_deps: std.array_hash_map.Auto(FileIndex, DepEntry.Index),
68/// Dependencies on an embedded file.68/// Dependencies on an embedded file.
69/// Introduced by `@embedFile`; invalidated when the file changes.69/// Introduced by `@embedFile`; invalidated when the file changes.
70/// Value is index into `dep_entries` of the first dependency on this `Zcu.EmbedFile`.70/// Value is index into `dep_entries` of the first dependency on this `Zcu.EmbedFile`.
71embed_file_deps: std.AutoArrayHashMapUnmanaged(Zcu.EmbedFile.Index, DepEntry.Index),71embed_file_deps: std.array_hash_map.Auto(Zcu.EmbedFile.Index, DepEntry.Index),
72/// Dependencies on the full set of names in a ZIR namespace.72/// Dependencies on the full set of names in a ZIR namespace.
73/// Key refers to a `struct_decl`, `union_decl`, etc.73/// Key refers to a `struct_decl`, `union_decl`, etc.
74/// Value is index into `dep_entries` of the first dependency on this namespace.74/// Value is index into `dep_entries` of the first dependency on this namespace.
75namespace_deps: std.AutoArrayHashMapUnmanaged(TrackedInst.Index, DepEntry.Index),75namespace_deps: std.array_hash_map.Auto(TrackedInst.Index, DepEntry.Index),
76/// Dependencies on the (non-)existence of some name in a namespace.76/// Dependencies on the (non-)existence of some name in a namespace.
77/// Value is index into `dep_entries` of the first dependency on this name.77/// Value is index into `dep_entries` of the first dependency on this name.
78namespace_name_deps: std.AutoArrayHashMapUnmanaged(NamespaceNameKey, DepEntry.Index),78namespace_name_deps: std.array_hash_map.Auto(NamespaceNameKey, DepEntry.Index),
79// Dependencies on the value of fields memoized on `Zcu` (`panic_messages` etc).79// Dependencies on the value of fields memoized on `Zcu` (`panic_messages` etc).
80// If set, these are indices into `dep_entries` of the first dependency on this state.80// If set, these are indices into `dep_entries` of the first dependency on this state.
81memoized_state_main_deps: DepEntry.Index.Optional,81memoized_state_main_deps: DepEntry.Index.Optional,
...@@ -86,7 +86,7 @@ memoized_state_assembly_deps: DepEntry.Index.Optional,...@@ -86,7 +86,7 @@ memoized_state_assembly_deps: DepEntry.Index.Optional,
86/// Given a `Depender`, points to an entry in `dep_entries` whose `depender`86/// Given a `Depender`, points to an entry in `dep_entries` whose `depender`
87/// matches. The `next_dependee` field can be used to iterate all such entries87/// matches. The `next_dependee` field can be used to iterate all such entries
88/// and remove them from the corresponding lists.88/// and remove them from the corresponding lists.
89first_dependency: std.AutoArrayHashMapUnmanaged(AnalUnit, DepEntry.Index),89first_dependency: std.array_hash_map.Auto(AnalUnit, DepEntry.Index),
9090
91/// Stores dependency information. The hashmaps declared above are used to look91/// Stores dependency information. The hashmaps declared above are used to look
92/// up entries in this list as required. This is not stored in `extra` so that92/// up entries in this list as required. This is not stored in `extra` so that
...@@ -11039,7 +11039,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator,...@@ -11039,7 +11039,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator,
11039 defer arena_allocator.deinit();11039 defer arena_allocator.deinit();
11040 const arena = arena_allocator.allocator();11040 const arena = arena_allocator.allocator();
1104111041
11042 var instances: std.AutoArrayHashMapUnmanaged(Index, std.ArrayList(Index)) = .empty;11042 var instances: std.array_hash_map.Auto(Index, std.ArrayList(Index)) = .empty;
11043 for (ip.locals, 0..) |*local, tid| {11043 for (ip.locals, 0..) |*local, tid| {
11044 const items = local.shared.items.view().slice();11044 const items = local.shared.items.view().slice();
11045 const extra_list = local.shared.extra;11045 const extra_list = local.shared.extra;
src/Package/Fetch.zig+2-2
...@@ -162,8 +162,8 @@ pub const JobQueue = struct {...@@ -162,8 +162,8 @@ pub const JobQueue = struct {
162 /// Both non-lazy and lazy dependencies are always fetched.162 /// Both non-lazy and lazy dependencies are always fetched.
163 all,163 all,
164 };164 };
165 pub const Table = std.AutoArrayHashMapUnmanaged(Package.Hash, *Fetch);165 pub const Table = std.array_hash_map.Auto(Package.Hash, *Fetch);
166 pub const UnlazySet = std.AutoArrayHashMapUnmanaged(Package.Hash, void);166 pub const UnlazySet = std.array_hash_map.Auto(Package.Hash, void);
167 pub const ForkSet = std.ArrayHashMapUnmanaged(Fork, void, Fork.Context, false);167 pub const ForkSet = std.ArrayHashMapUnmanaged(Fork, void, Fork.Context, false);
168168
169 pub const Fork = struct {169 pub const Fork = struct {
src/Package/Module.zig+1-1
...@@ -39,7 +39,7 @@ pub const Deps = std.array_hash_map.String(*Module);...@@ -39,7 +39,7 @@ pub const Deps = std.array_hash_map.String(*Module);
3939
40pub const Tree = struct {40pub const Tree = struct {
41 /// Each `Package` exposes a `Module` with build.zig as its root source file.41 /// Each `Package` exposes a `Module` with build.zig as its root source file.
42 build_module_table: std.AutoArrayHashMapUnmanaged(MultiHashHexDigest, *Module),42 build_module_table: std.array_hash_map.Auto(MultiHashHexDigest, *Module),
43};43};
4444
45pub const CreateOptions = struct {45pub const CreateOptions = struct {
src/Sema.zig+6-6
...@@ -88,7 +88,7 @@ err: ?*Zcu.ErrorMsg = null,...@@ -88,7 +88,7 @@ err: ?*Zcu.ErrorMsg = null,
8888
89/// The temporary arena is used for the memory of the `InferredAlloc` values89/// The temporary arena is used for the memory of the `InferredAlloc` values
90/// here so the values can be dropped without any cleanup.90/// here so the values can be dropped without any cleanup.
91unresolved_inferred_allocs: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, InferredAlloc) = .empty,91unresolved_inferred_allocs: std.array_hash_map.Auto(Air.Inst.Index, InferredAlloc) = .empty,
9292
93/// Links every pointer derived from a base `alloc` back to that `alloc`. Used93/// Links every pointer derived from a base `alloc` back to that `alloc`. Used
94/// to detect comptime-known `const`s.94/// to detect comptime-known `const`s.
...@@ -119,13 +119,13 @@ exports: std.ArrayList(Zcu.Export) = .empty,...@@ -119,13 +119,13 @@ exports: std.ArrayList(Zcu.Export) = .empty,
119/// All references registered so far by this `Sema`. This is a temporary duplicate119/// All references registered so far by this `Sema`. This is a temporary duplicate
120/// of data stored in `Zcu.all_references`. It exists to avoid adding references to120/// of data stored in `Zcu.all_references`. It exists to avoid adding references to
121/// a given `AnalUnit` multiple times.121/// a given `AnalUnit` multiple times.
122references: std.AutoArrayHashMapUnmanaged(AnalUnit, void) = .empty,122references: std.array_hash_map.Auto(AnalUnit, void) = .empty,
123type_references: std.AutoArrayHashMapUnmanaged(InternPool.Index, void) = .empty,123type_references: std.array_hash_map.Auto(InternPool.Index, void) = .empty,
124124
125/// All dependencies registered so far by this `Sema`. This is a temporary duplicate125/// All dependencies registered so far by this `Sema`. This is a temporary duplicate
126/// of the main dependency data. It exists to avoid adding dependencies to a given126/// of the main dependency data. It exists to avoid adding dependencies to a given
127/// `AnalUnit` multiple times.127/// `AnalUnit` multiple times.
128dependencies: std.AutoArrayHashMapUnmanaged(InternPool.Dependee, void) = .empty,128dependencies: std.array_hash_map.Auto(InternPool.Dependee, void) = .empty,
129129
130/// Whether memoization of this call is permitted. Operations with side effects global130/// Whether memoization of this call is permitted. Operations with side effects global
131/// to the `Sema`, such as `@setEvalBranchQuota`, set this to `false`. It is observed131/// to the `Sema`, such as `@setEvalBranchQuota`, set this to `false`. It is observed
...@@ -212,11 +212,11 @@ pub const InferredErrorSet = struct {...@@ -212,11 +212,11 @@ pub const InferredErrorSet = struct {
212 /// are returned from any dependent functions.212 /// are returned from any dependent functions.
213 errors: NameMap = .{},213 errors: NameMap = .{},
214 /// Other inferred error sets which this inferred error set should include.214 /// Other inferred error sets which this inferred error set should include.
215 inferred_error_sets: std.AutoArrayHashMapUnmanaged(InternPool.Index, void) = .empty,215 inferred_error_sets: std.array_hash_map.Auto(InternPool.Index, void) = .empty,
216 /// The regular error set created by resolving this inferred error set.216 /// The regular error set created by resolving this inferred error set.
217 resolved: InternPool.Index = .none,217 resolved: InternPool.Index = .none,
218218
219 pub const NameMap = std.AutoArrayHashMapUnmanaged(InternPool.NullTerminatedString, void);219 pub const NameMap = std.array_hash_map.Auto(InternPool.NullTerminatedString, void);
220220
221 pub fn addErrorSet(221 pub fn addErrorSet(
222 self: *InferredErrorSet,222 self: *InferredErrorSet,
src/Type.zig+3-3
...@@ -3340,7 +3340,7 @@ pub fn assertHasLayout(ty: Type, zcu: *const Zcu) void {...@@ -3340,7 +3340,7 @@ pub fn assertHasLayout(ty: Type, zcu: *const Zcu) void {
3340}3340}
33413341
3342/// Recursively walks the type and marks for each subtype how many times it has been seen3342/// Recursively walks the type and marks for each subtype how many times it has been seen
3343fn collectSubtypes(ty: Type, pt: Zcu.PerThread, visited: *std.AutoArrayHashMapUnmanaged(Type, u16)) error{OutOfMemory}!void {3343fn collectSubtypes(ty: Type, pt: Zcu.PerThread, visited: *std.array_hash_map.Auto(Type, u16)) error{OutOfMemory}!void {
3344 const zcu = pt.zcu;3344 const zcu = pt.zcu;
3345 const ip = &zcu.intern_pool;3345 const ip = &zcu.intern_pool;
33463346
...@@ -3455,8 +3455,8 @@ fn shouldDedupeType(ty: Type, ctx: *Comparison, pt: Zcu.PerThread) error{OutOfMe...@@ -3455,8 +3455,8 @@ fn shouldDedupeType(ty: Type, ctx: *Comparison, pt: Zcu.PerThread) error{OutOfMe
3455/// the subtype length and number of occurences. Placeholders are then found by3455/// the subtype length and number of occurences. Placeholders are then found by
3456/// iterating `type_dedupe_cache` which caches the inline/placeholder decisions.3456/// iterating `type_dedupe_cache` which caches the inline/placeholder decisions.
3457pub const Comparison = struct {3457pub const Comparison = struct {
3458 type_occurrences: std.AutoArrayHashMapUnmanaged(Type, u16),3458 type_occurrences: std.array_hash_map.Auto(Type, u16),
3459 type_dedupe_cache: std.AutoArrayHashMapUnmanaged(Type, DedupeEntry),3459 type_dedupe_cache: std.array_hash_map.Auto(Type, DedupeEntry),
3460 placeholder_index: u8,3460 placeholder_index: u8,
34613461
3462 pub const Placeholder = struct {3462 pub const Placeholder = struct {
src/Zcu.zig+33-33
...@@ -97,20 +97,20 @@ free_exports: std.ArrayList(Export.Index) = .empty,...@@ -97,20 +97,20 @@ free_exports: std.ArrayList(Export.Index) = .empty,
97/// Maps from an `AnalUnit` which performs a single export, to the index into `all_exports` of97/// Maps from an `AnalUnit` which performs a single export, to the index into `all_exports` of
98/// the export it performs. Note that the key is not the `Decl` being exported, but the `AnalUnit`98/// the export it performs. Note that the key is not the `Decl` being exported, but the `AnalUnit`
99/// whose analysis triggered the export.99/// whose analysis triggered the export.
100single_exports: std.AutoArrayHashMapUnmanaged(AnalUnit, Export.Index) = .empty,100single_exports: std.array_hash_map.Auto(AnalUnit, Export.Index) = .empty,
101/// Like `single_exports`, but for `AnalUnit`s which perform multiple exports.101/// Like `single_exports`, but for `AnalUnit`s which perform multiple exports.
102/// The exports are `all_exports.items[index..][0..len]`.102/// The exports are `all_exports.items[index..][0..len]`.
103multi_exports: std.AutoArrayHashMapUnmanaged(AnalUnit, extern struct {103multi_exports: std.array_hash_map.Auto(AnalUnit, extern struct {
104 index: u32,104 index: u32,
105 len: u32,105 len: u32,
106}) = .{},106}) = .{},
107107
108/// Key is the digest returned by `Builtin.hash`; value is the corresponding module.108/// Key is the digest returned by `Builtin.hash`; value is the corresponding module.
109builtin_modules: std.AutoArrayHashMapUnmanaged(Cache.BinDigest, *Package.Module) = .empty,109builtin_modules: std.array_hash_map.Auto(Cache.BinDigest, *Package.Module) = .empty,
110110
111/// Populated as soon as the `Compilation` is created. Guaranteed to contain all modules, even builtin ones.111/// Populated as soon as the `Compilation` is created. Guaranteed to contain all modules, even builtin ones.
112/// Modules whose root file is not a Zig or ZON file have the value `.none`.112/// Modules whose root file is not a Zig or ZON file have the value `.none`.
113module_roots: std.AutoArrayHashMapUnmanaged(*Package.Module, File.Index.Optional) = .empty,113module_roots: std.array_hash_map.Auto(*Package.Module, File.Index.Optional) = .empty,
114114
115/// The set of all the Zig source files in the Zig Compilation Unit. Tracked in115/// The set of all the Zig source files in the Zig Compilation Unit. Tracked in
116/// order to iterate over it and check which source files have been modified on116/// order to iterate over it and check which source files have been modified on
...@@ -141,7 +141,7 @@ import_table: std.ArrayHashMapUnmanaged(...@@ -141,7 +141,7 @@ import_table: std.ArrayHashMapUnmanaged(
141/// update removes an import, or if a module specified on the CLI is never imported.141/// update removes an import, or if a module specified on the CLI is never imported.
142/// Reconstructed on every update, after AstGen and before Sema.142/// Reconstructed on every update, after AstGen and before Sema.
143/// Value is why the file is alive.143/// Value is why the file is alive.
144alive_files: std.AutoArrayHashMapUnmanaged(File.Index, File.Reference) = .empty,144alive_files: std.array_hash_map.Auto(File.Index, File.Reference) = .empty,
145145
146/// If this is populated, a "file exists in multiple modules" error should be emitted.146/// If this is populated, a "file exists in multiple modules" error should be emitted.
147/// This causes file errors to not be shown, because we don't really know which files147/// This causes file errors to not be shown, because we don't really know which files
...@@ -179,27 +179,27 @@ intern_pool: InternPool = .empty,...@@ -179,27 +179,27 @@ intern_pool: InternPool = .empty,
179179
180/// Value explains why this `AnalUnit` is being analyzed. It is `null` for the topmost analysis180/// Value explains why this `AnalUnit` is being analyzed. It is `null` for the topmost analysis
181/// (index 0), and non-`null` for all others.181/// (index 0), and non-`null` for all others.
182analysis_in_progress: std.AutoArrayHashMapUnmanaged(AnalUnit, ?*const DependencyReason) = .empty,182analysis_in_progress: std.array_hash_map.Auto(AnalUnit, ?*const DependencyReason) = .empty,
183/// The ErrorMsg memory is owned by the `AnalUnit`, using Module's general purpose allocator.183/// The ErrorMsg memory is owned by the `AnalUnit`, using Module's general purpose allocator.
184failed_analysis: std.AutoArrayHashMapUnmanaged(AnalUnit, *ErrorMsg) = .empty,184failed_analysis: std.array_hash_map.Auto(AnalUnit, *ErrorMsg) = .empty,
185/// This `AnalUnit` failed semantic analysis because it required analysis of another `AnalUnit` which itself failed.185/// This `AnalUnit` failed semantic analysis because it required analysis of another `AnalUnit` which itself failed.
186transitive_failed_analysis: std.AutoArrayHashMapUnmanaged(AnalUnit, void) = .empty,186transitive_failed_analysis: std.array_hash_map.Auto(AnalUnit, void) = .empty,
187/// This `Nav` succeeded analysis, but failed codegen.187/// This `Nav` succeeded analysis, but failed codegen.
188/// This may be a simple "value" `Nav`, or it may be a function.188/// This may be a simple "value" `Nav`, or it may be a function.
189/// The ErrorMsg memory is owned by the `AnalUnit`, using Module's general purpose allocator.189/// The ErrorMsg memory is owned by the `AnalUnit`, using Module's general purpose allocator.
190/// While multiple threads are active (most of the time!), this is guarded by `zcu.comp.mutex`, as190/// While multiple threads are active (most of the time!), this is guarded by `zcu.comp.mutex`, as
191/// codegen and linking run on a separate thread.191/// codegen and linking run on a separate thread.
192failed_codegen: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, *ErrorMsg) = .empty,192failed_codegen: std.array_hash_map.Auto(InternPool.Nav.Index, *ErrorMsg) = .empty,
193failed_types: std.AutoArrayHashMapUnmanaged(InternPool.Index, *ErrorMsg) = .empty,193failed_types: std.array_hash_map.Auto(InternPool.Index, *ErrorMsg) = .empty,
194194
195/// Key is an `AnalUnit` which is in `dependency_loop_nodes`. For each dependency loop, exactly one195/// Key is an `AnalUnit` which is in `dependency_loop_nodes`. For each dependency loop, exactly one
196/// unit in the loop is in this map, though the choice is arbitrary and not necessarily reproducible196/// unit in the loop is in this map, though the choice is arbitrary and not necessarily reproducible
197/// between compilations. So, instead of (for instance) defining where the dependency loop "starts",197/// between compilations. So, instead of (for instance) defining where the dependency loop "starts",
198/// this map simply exists to allow easily iterating all dependency loops exactly once.198/// this map simply exists to allow easily iterating all dependency loops exactly once.
199dependency_loops: std.AutoArrayHashMapUnmanaged(AnalUnit, void) = .empty,199dependency_loops: std.array_hash_map.Auto(AnalUnit, void) = .empty,
200/// Key is an `AnalUnit`, value is the `AnalUnit` which the key references and why it does so.200/// Key is an `AnalUnit`, value is the `AnalUnit` which the key references and why it does so.
201/// All units in here form loops. To iterate loops, see `dependency_loops`.201/// All units in here form loops. To iterate loops, see `dependency_loops`.
202dependency_loop_nodes: std.AutoArrayHashMapUnmanaged(AnalUnit, struct {202dependency_loop_nodes: std.array_hash_map.Auto(AnalUnit, struct {
203 unit: AnalUnit,203 unit: AnalUnit,
204 reason: DependencyReason,204 reason: DependencyReason,
205}) = .empty,205}) = .empty,
...@@ -207,7 +207,7 @@ dependency_loop_nodes: std.AutoArrayHashMapUnmanaged(AnalUnit, struct {...@@ -207,7 +207,7 @@ dependency_loop_nodes: std.AutoArrayHashMapUnmanaged(AnalUnit, struct {
207/// Keep track of `@compileLog`s per `AnalUnit`.207/// Keep track of `@compileLog`s per `AnalUnit`.
208/// We track the source location of the first `@compileLog` call, and all logged lines as a linked list.208/// We track the source location of the first `@compileLog` call, and all logged lines as a linked list.
209/// The list is singly linked, but we do track its tail for fast appends (optimizing many logs in one unit).209/// The list is singly linked, but we do track its tail for fast appends (optimizing many logs in one unit).
210compile_logs: std.AutoArrayHashMapUnmanaged(AnalUnit, extern struct {210compile_logs: std.array_hash_map.Auto(AnalUnit, extern struct {
211 base_node_inst: InternPool.TrackedInst.Index,211 base_node_inst: InternPool.TrackedInst.Index,
212 node_offset: Ast.Node.Offset,212 node_offset: Ast.Node.Offset,
213 first_line: CompileLogLine.Index,213 first_line: CompileLogLine.Index,
...@@ -228,7 +228,7 @@ free_compile_log_lines: std.ArrayList(CompileLogLine.Index) = .empty,...@@ -228,7 +228,7 @@ free_compile_log_lines: std.ArrayList(CompileLogLine.Index) = .empty,
228/// We just store a `[]u8` instead of a full `*ErrorMsg`, because the source228/// We just store a `[]u8` instead of a full `*ErrorMsg`, because the source
229/// location is always the entire file. The `[]u8` memory is owned by the map229/// location is always the entire file. The `[]u8` memory is owned by the map
230/// and allocated into `gpa`.230/// and allocated into `gpa`.
231failed_files: std.AutoArrayHashMapUnmanaged(File.Index, ?[]u8) = .empty,231failed_files: std.array_hash_map.Auto(File.Index, ?[]u8) = .empty,
232/// AstGen is not aware of modules, and so cannot determine whether an import232/// AstGen is not aware of modules, and so cannot determine whether an import
233/// string makes sense. That is the job of a traversal after AstGen.233/// string makes sense. That is the job of a traversal after AstGen.
234///234///
...@@ -256,10 +256,10 @@ failed_imports: std.ArrayList(struct {...@@ -256,10 +256,10 @@ failed_imports: std.ArrayList(struct {
256 import_token: Ast.TokenIndex,256 import_token: Ast.TokenIndex,
257 kind: enum { file_outside_module_root, illegal_zig_import },257 kind: enum { file_outside_module_root, illegal_zig_import },
258}) = .empty,258}) = .empty,
259failed_exports: std.AutoArrayHashMapUnmanaged(Export.Index, *ErrorMsg) = .empty,259failed_exports: std.array_hash_map.Auto(Export.Index, *ErrorMsg) = .empty,
260/// If analysis failed due to a cimport error, the corresponding Clang errors260/// If analysis failed due to a cimport error, the corresponding Clang errors
261/// are stored here.261/// are stored here.
262cimport_errors: std.AutoArrayHashMapUnmanaged(AnalUnit, std.zig.ErrorBundle) = .empty,262cimport_errors: std.array_hash_map.Auto(AnalUnit, std.zig.ErrorBundle) = .empty,
263263
264/// Maximum amount of distinct error values, set by --error-limit264/// Maximum amount of distinct error values, set by --error-limit
265error_limit: ErrorInt,265error_limit: ErrorInt,
...@@ -271,19 +271,19 @@ outdated_lock: if (std.debug.runtime_safety) std.Io.RwLock else void = if (std.d...@@ -271,19 +271,19 @@ outdated_lock: if (std.debug.runtime_safety) std.Io.RwLock else void = if (std.d
271/// Value is the number of PO dependencies of this AnalUnit.271/// Value is the number of PO dependencies of this AnalUnit.
272/// This value will decrease as we perform semantic analysis to learn what is outdated.272/// This value will decrease as we perform semantic analysis to learn what is outdated.
273/// If any of these PO deps is outdated, this value will be moved to `outdated`.273/// If any of these PO deps is outdated, this value will be moved to `outdated`.
274potentially_outdated: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,274potentially_outdated: std.array_hash_map.Auto(AnalUnit, u32) = .empty,
275/// Value is the number of PO dependencies of this AnalUnit.275/// Value is the number of PO dependencies of this AnalUnit.
276/// Once this value drops to 0, the AnalUnit is a candidate for re-analysis.276/// Once this value drops to 0, the AnalUnit is a candidate for re-analysis.
277outdated: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,277outdated: std.array_hash_map.Auto(AnalUnit, u32) = .empty,
278/// This is the set of all `AnalUnit`s in `outdated` whose PO dependency count is 0.278/// This is the set of all `AnalUnit`s in `outdated` whose PO dependency count is 0.
279/// Such `AnalUnit`s are ready for immediate re-analysis.279/// Such `AnalUnit`s are ready for immediate re-analysis.
280/// See `findOutdatedToAnalyze` for details.280/// See `findOutdatedToAnalyze` for details.
281outdated_ready: struct {281outdated_ready: struct {
282 /// These are separate from other units because it allows `findOutdatedToAnalyze` to prioritize282 /// These are separate from other units because it allows `findOutdatedToAnalyze` to prioritize
283 /// functions, which is useful because it means they will be sent to codegen more quickly.283 /// functions, which is useful because it means they will be sent to codegen more quickly.
284 funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),284 funcs: std.array_hash_map.Auto(InternPool.Index, void),
285 /// Does not contain `.func` units.285 /// Does not contain `.func` units.
286 other: std.AutoArrayHashMapUnmanaged(AnalUnit, void),286 other: std.array_hash_map.Auto(AnalUnit, void),
287} = .{ .funcs = .empty, .other = .empty },287} = .{ .funcs = .empty, .other = .empty },
288/// This contains a list of AnalUnit whose analysis or codegen failed, but the288/// This contains a list of AnalUnit whose analysis or codegen failed, but the
289/// failure was something like running out of disk space, and trying again may289/// failure was something like running out of disk space, and trying again may
...@@ -298,23 +298,23 @@ analysis_roots_len: usize = 0,...@@ -298,23 +298,23 @@ analysis_roots_len: usize = 0,
298/// This is the cached result of `Zcu.resolveReferences`. It is computed on-demand, and298/// This is the cached result of `Zcu.resolveReferences`. It is computed on-demand, and
299/// reset to `null` when any semantic analysis occurs (since this invalidates the data).299/// reset to `null` when any semantic analysis occurs (since this invalidates the data).
300/// Allocated into `gpa`.300/// Allocated into `gpa`.
301resolved_references: ?std.AutoArrayHashMapUnmanaged(AnalUnit, ?ResolvedReference) = null,301resolved_references: ?std.array_hash_map.Auto(AnalUnit, ?ResolvedReference) = null,
302302
303/// If `true`, then semantic analysis must not occur on this update due to AstGen errors.303/// If `true`, then semantic analysis must not occur on this update due to AstGen errors.
304/// Essentially the entire pipeline after AstGen, including Sema, codegen, and link, is skipped.304/// Essentially the entire pipeline after AstGen, including Sema, codegen, and link, is skipped.
305/// Reset to `false` at the start of each update in `Compilation.update`.305/// Reset to `false` at the start of each update in `Compilation.update`.
306skip_analysis_this_update: bool = false,306skip_analysis_this_update: bool = false,
307307
308test_functions: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty,308test_functions: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty,
309309
310global_assembly: std.AutoArrayHashMapUnmanaged(AnalUnit, []u8) = .empty,310global_assembly: std.array_hash_map.Auto(AnalUnit, []u8) = .empty,
311311
312/// Key is the `AnalUnit` *performing* the reference. This representation allows312/// Key is the `AnalUnit` *performing* the reference. This representation allows
313/// incremental updates to quickly delete references caused by a specific `AnalUnit`.313/// incremental updates to quickly delete references caused by a specific `AnalUnit`.
314/// Value is index into `all_references` of the first reference triggered by the unit.314/// Value is index into `all_references` of the first reference triggered by the unit.
315/// The `next` field on the `Reference` forms a linked list of all references315/// The `next` field on the `Reference` forms a linked list of all references
316/// triggered by the key `AnalUnit`.316/// triggered by the key `AnalUnit`.
317reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,317reference_table: std.array_hash_map.Auto(AnalUnit, u32) = .empty,
318all_references: std.ArrayList(Reference) = .empty,318all_references: std.ArrayList(Reference) = .empty,
319/// Freelist of indices in `all_references`.319/// Freelist of indices in `all_references`.
320free_references: std.ArrayList(u32) = .empty,320free_references: std.ArrayList(u32) = .empty,
...@@ -327,7 +327,7 @@ free_inline_reference_frames: std.ArrayList(InlineReferenceFrame.Index) = .empty...@@ -327,7 +327,7 @@ free_inline_reference_frames: std.ArrayList(InlineReferenceFrame.Index) = .empty
327/// Value is index into `all_type_reference` of the first reference triggered by the unit.327/// Value is index into `all_type_reference` of the first reference triggered by the unit.
328/// The `next` field on the `TypeReference` forms a linked list of all type references328/// The `next` field on the `TypeReference` forms a linked list of all type references
329/// triggered by the key `AnalUnit`.329/// triggered by the key `AnalUnit`.
330type_reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,330type_reference_table: std.array_hash_map.Auto(AnalUnit, u32) = .empty,
331all_type_references: std.ArrayList(TypeReference) = .empty,331all_type_references: std.ArrayList(TypeReference) = .empty,
332/// Freelist of indices in `all_type_references`.332/// Freelist of indices in `all_type_references`.
333free_type_references: std.ArrayList(u32) = .empty,333free_type_references: std.ArrayList(u32) = .empty,
...@@ -355,12 +355,12 @@ pub const DependencyReason = struct {...@@ -355,12 +355,12 @@ pub const DependencyReason = struct {
355pub const IncrementalDebugState = struct {355pub const IncrementalDebugState = struct {
356 /// All container types in the ZCU, even dead ones.356 /// All container types in the ZCU, even dead ones.
357 /// Value is the generation the type was created on.357 /// Value is the generation the type was created on.
358 types: std.AutoArrayHashMapUnmanaged(InternPool.Index, u32),358 types: std.array_hash_map.Auto(InternPool.Index, u32),
359 /// All `Nav`s in the ZCU, even dead ones.359 /// All `Nav`s in the ZCU, even dead ones.
360 /// Value is the generation the `Nav` was created on.360 /// Value is the generation the `Nav` was created on.
361 navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, u32),361 navs: std.array_hash_map.Auto(InternPool.Nav.Index, u32),
362 /// All `AnalUnit`s in the ZCU, even dead ones.362 /// All `AnalUnit`s in the ZCU, even dead ones.
363 units: std.AutoArrayHashMapUnmanaged(AnalUnit, UnitInfo),363 units: std.array_hash_map.Auto(AnalUnit, UnitInfo),
364364
365 pub const init: IncrementalDebugState = .{365 pub const init: IncrementalDebugState = .{
366 .types = .empty,366 .types = .empty,
...@@ -681,7 +681,7 @@ pub const SimplePanicId = enum {...@@ -681,7 +681,7 @@ pub const SimplePanicId = enum {
681 }681 }
682};682};
683683
684pub const GlobalErrorSet = std.AutoArrayHashMapUnmanaged(InternPool.NullTerminatedString, void);684pub const GlobalErrorSet = std.array_hash_map.Auto(InternPool.NullTerminatedString, void);
685685
686pub const CImportError = struct {686pub const CImportError = struct {
687 offset: u32,687 offset: u32,
...@@ -4188,13 +4188,13 @@ pub const ResolvedReference = struct {...@@ -4188,13 +4188,13 @@ pub const ResolvedReference = struct {
4188/// If an `AnalUnit` is not in the returned map, it is unreferenced.4188/// If an `AnalUnit` is not in the returned map, it is unreferenced.
4189/// The returned hashmap is owned by the `Zcu`, so should not be freed by the caller.4189/// The returned hashmap is owned by the `Zcu`, so should not be freed by the caller.
4190/// This hashmap is cached, so repeated calls to this function are cheap.4190/// This hashmap is cached, so repeated calls to this function are cheap.
4191pub fn resolveReferences(zcu: *Zcu) Allocator.Error!*const std.AutoArrayHashMapUnmanaged(AnalUnit, ?ResolvedReference) {4191pub fn resolveReferences(zcu: *Zcu) Allocator.Error!*const std.array_hash_map.Auto(AnalUnit, ?ResolvedReference) {
4192 if (zcu.resolved_references == null) {4192 if (zcu.resolved_references == null) {
4193 zcu.resolved_references = try zcu.resolveReferencesInner();4193 zcu.resolved_references = try zcu.resolveReferencesInner();
4194 }4194 }
4195 return &zcu.resolved_references.?;4195 return &zcu.resolved_references.?;
4196}4196}
4197fn resolveReferencesInner(zcu: *Zcu) Allocator.Error!std.AutoArrayHashMapUnmanaged(AnalUnit, ?ResolvedReference) {4197fn resolveReferencesInner(zcu: *Zcu) Allocator.Error!std.array_hash_map.Auto(AnalUnit, ?ResolvedReference) {
4198 const trace = tracy.trace(@src());4198 const trace = tracy.trace(@src());
4199 defer trace.end();4199 defer trace.end();
42004200
...@@ -4202,8 +4202,8 @@ fn resolveReferencesInner(zcu: *Zcu) Allocator.Error!std.AutoArrayHashMapUnmanag...@@ -4202,8 +4202,8 @@ fn resolveReferencesInner(zcu: *Zcu) Allocator.Error!std.AutoArrayHashMapUnmanag
4202 const comp = zcu.comp;4202 const comp = zcu.comp;
4203 const ip = &zcu.intern_pool;4203 const ip = &zcu.intern_pool;
42044204
4205 var units: std.AutoArrayHashMapUnmanaged(AnalUnit, ?ResolvedReference) = .empty;4205 var units: std.array_hash_map.Auto(AnalUnit, ?ResolvedReference) = .empty;
4206 var types: std.AutoArrayHashMapUnmanaged(InternPool.Index, ?ResolvedReference) = .empty;4206 var types: std.array_hash_map.Auto(InternPool.Index, ?ResolvedReference) = .empty;
4207 defer {4207 defer {
4208 units.deinit(gpa);4208 units.deinit(gpa);
4209 types.deinit(gpa);4209 types.deinit(gpa);
src/Zcu/PerThread.zig+6-6
...@@ -787,7 +787,7 @@ const UpdatedFile = struct {...@@ -787,7 +787,7 @@ const UpdatedFile = struct {
787 inst_map: std.AutoHashMapUnmanaged(Zir.Inst.Index, Zir.Inst.Index),787 inst_map: std.AutoHashMapUnmanaged(Zir.Inst.Index, Zir.Inst.Index),
788};788};
789789
790fn cleanupUpdatedFiles(gpa: Allocator, updated_files: *std.AutoArrayHashMapUnmanaged(Zcu.File.Index, UpdatedFile)) void {790fn cleanupUpdatedFiles(gpa: Allocator, updated_files: *std.array_hash_map.Auto(Zcu.File.Index, UpdatedFile)) void {
791 for (updated_files.values()) |*elem| elem.inst_map.deinit(gpa);791 for (updated_files.values()) |*elem| elem.inst_map.deinit(gpa);
792 updated_files.deinit(gpa);792 updated_files.deinit(gpa);
793}793}
...@@ -805,7 +805,7 @@ fn updateZirRefs(pt: Zcu.PerThread) (Io.Cancelable || Allocator.Error)!void {...@@ -805,7 +805,7 @@ fn updateZirRefs(pt: Zcu.PerThread) (Io.Cancelable || Allocator.Error)!void {
805805
806 // We need to visit every updated File for every TrackedInst in InternPool.806 // We need to visit every updated File for every TrackedInst in InternPool.
807 // This only includes Zig files; ZON files are omitted.807 // This only includes Zig files; ZON files are omitted.
808 var updated_files: std.AutoArrayHashMapUnmanaged(Zcu.File.Index, UpdatedFile) = .empty;808 var updated_files: std.array_hash_map.Auto(Zcu.File.Index, UpdatedFile) = .empty;
809 defer cleanupUpdatedFiles(gpa, &updated_files);809 defer cleanupUpdatedFiles(gpa, &updated_files);
810810
811 for (zcu.import_table.keys()) |file_index| {811 for (zcu.import_table.keys()) |file_index| {
...@@ -907,7 +907,7 @@ fn updateZirRefs(pt: Zcu.PerThread) (Io.Cancelable || Allocator.Error)!void {...@@ -907,7 +907,7 @@ fn updateZirRefs(pt: Zcu.PerThread) (Io.Cancelable || Allocator.Error)!void {
907 if (!has_namespace) continue;907 if (!has_namespace) continue;
908908
909 // Value is whether the declaration is `pub`.909 // Value is whether the declaration is `pub`.
910 var old_names: std.AutoArrayHashMapUnmanaged(InternPool.NullTerminatedString, bool) = .empty;910 var old_names: std.array_hash_map.Auto(InternPool.NullTerminatedString, bool) = .empty;
911 defer old_names.deinit(zcu.gpa);911 defer old_names.deinit(zcu.gpa);
912 for (old_zir.typeDecls(old_inst)) |decl_inst| {912 for (old_zir.typeDecls(old_inst)) |decl_inst| {
913 const old_decl = old_zir.getDeclaration(decl_inst);913 const old_decl = old_zir.getDeclaration(decl_inst);
...@@ -3568,8 +3568,8 @@ pub fn processExports(pt: Zcu.PerThread) !void {...@@ -3568,8 +3568,8 @@ pub fn processExports(pt: Zcu.PerThread) !void {
3568 }3568 }
35693569
3570 // First, construct a mapping of every exported value and Nav to the indices of all its different exports.3570 // First, construct a mapping of every exported value and Nav to the indices of all its different exports.
3571 var nav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, std.ArrayList(Zcu.Export.Index)) = .empty;3571 var nav_exports: std.array_hash_map.Auto(InternPool.Nav.Index, std.ArrayList(Zcu.Export.Index)) = .empty;
3572 var uav_exports: std.AutoArrayHashMapUnmanaged(InternPool.Index, std.ArrayList(Zcu.Export.Index)) = .empty;3572 var uav_exports: std.array_hash_map.Auto(InternPool.Index, std.ArrayList(Zcu.Export.Index)) = .empty;
3573 defer {3573 defer {
3574 for (nav_exports.values()) |*exports| {3574 for (nav_exports.values()) |*exports| {
3575 exports.deinit(gpa);3575 exports.deinit(gpa);
...@@ -3665,7 +3665,7 @@ pub fn processExports(pt: Zcu.PerThread) !void {...@@ -3665,7 +3665,7 @@ pub fn processExports(pt: Zcu.PerThread) !void {
3665 }3665 }
3666}3666}
36673667
3668const SymbolExports = std.AutoArrayHashMapUnmanaged(InternPool.NullTerminatedString, Zcu.Export.Index);3668const SymbolExports = std.array_hash_map.Auto(InternPool.NullTerminatedString, Zcu.Export.Index);
36693669
3670fn processExportsInner(3670fn processExportsInner(
3671 pt: Zcu.PerThread,3671 pt: Zcu.PerThread,
src/codegen/aarch64/Select.zig+6-6
...@@ -4,12 +4,12 @@ air: Air,...@@ -4,12 +4,12 @@ air: Air,
4nav_index: InternPool.Nav.Index,4nav_index: InternPool.Nav.Index,
55
6// Blocks6// Blocks
7def_order: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, void),7def_order: std.array_hash_map.Auto(Air.Inst.Index, void),
8blocks: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Block),8blocks: std.array_hash_map.Auto(Air.Inst.Index, Block),
9loops: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Loop),9loops: std.array_hash_map.Auto(Air.Inst.Index, Loop),
10active_loops: std.ArrayList(Loop.Index),10active_loops: std.ArrayList(Loop.Index),
11loop_live: struct {11loop_live: struct {
12 set: std.AutoArrayHashMapUnmanaged(struct { Loop.Index, Air.Inst.Index }, void),12 set: std.array_hash_map.Auto(struct { Loop.Index, Air.Inst.Index }, void),
13 list: std.ArrayList(Air.Inst.Index),13 list: std.ArrayList(Air.Inst.Index),
14},14},
15dom_start: u32,15dom_start: u32,
...@@ -11225,7 +11225,7 @@ fn dumpValuesInner(isel: *Select, which: WhichValues) !void {...@@ -11225,7 +11225,7 @@ fn dumpValuesInner(isel: *Select, which: WhichValues) !void {
11225 defer std.debug.unlockStderr();11225 defer std.debug.unlockStderr();
11226 const stderr = &locked_stderr.file_writer.interface;11226 const stderr = &locked_stderr.file_writer.interface;
1122711227
11228 var reverse_live_values: std.AutoArrayHashMapUnmanaged(Value.Index, std.ArrayList(Air.Inst.Index)) = .empty;11228 var reverse_live_values: std.array_hash_map.Auto(Value.Index, std.ArrayList(Air.Inst.Index)) = .empty;
11229 defer {11229 defer {
11230 for (reverse_live_values.values()) |*list| list.deinit(gpa);11230 for (reverse_live_values.values()) |*list| list.deinit(gpa);
11231 reverse_live_values.deinit(gpa);11231 reverse_live_values.deinit(gpa);
...@@ -11254,7 +11254,7 @@ fn dumpValuesInner(isel: *Select, which: WhichValues) !void {...@@ -11254,7 +11254,7 @@ fn dumpValuesInner(isel: *Select, which: WhichValues) !void {
11254 };11254 };
11255 }11255 }
1125611256
11257 var roots: std.AutoArrayHashMapUnmanaged(Value.Index, u32) = .empty;11257 var roots: std.array_hash_map.Auto(Value.Index, u32) = .empty;
11258 defer roots.deinit(gpa);11258 defer roots.deinit(gpa);
11259 {11259 {
11260 try roots.ensureTotalCapacity(gpa, isel.values.items.len);11260 try roots.ensureTotalCapacity(gpa, isel.values.items.len);
src/codegen/c.zig+11-11
...@@ -59,14 +59,14 @@ pub const Mir = struct {...@@ -59,14 +59,14 @@ pub const Mir = struct {
59 /// Key is the value of the UAV; value is the UAV's alignment, or59 /// Key is the value of the UAV; value is the UAV's alignment, or
60 /// `.none` for natural alignment. The specified alignment is never60 /// `.none` for natural alignment. The specified alignment is never
61 /// less than the natural alignment.61 /// less than the natural alignment.
62 need_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),62 need_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
63 ctype_deps: CType.Dependencies,63 ctype_deps: CType.Dependencies,
64 /// Key is an enum type for which we need a generated `@tagName` function.64 /// Key is an enum type for which we need a generated `@tagName` function.
65 need_tag_name_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),65 need_tag_name_funcs: std.array_hash_map.Auto(InternPool.Index, void),
66 /// Key is a function Nav for which we need a generated `zig_never_tail` wrapper.66 /// Key is a function Nav for which we need a generated `zig_never_tail` wrapper.
67 need_never_tail_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),67 need_never_tail_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
68 /// Key is a function Nav for which we need a generated `zig_never_inline` wrapper.68 /// Key is a function Nav for which we need a generated `zig_never_inline` wrapper.
69 need_never_inline_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),69 need_never_inline_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
7070
71 pub fn deinit(mir: *Mir, gpa: Allocator) void {71 pub fn deinit(mir: *Mir, gpa: Allocator) void {
72 gpa.free(mir.fwd_decl);72 gpa.free(mir.fwd_decl);
...@@ -164,8 +164,8 @@ const LocalType = struct {...@@ -164,8 +164,8 @@ const LocalType = struct {
164};164};
165165
166const LocalIndex = u16;166const LocalIndex = u16;
167const LocalsList = std.AutoArrayHashMapUnmanaged(LocalIndex, void);167const LocalsList = std.array_hash_map.Auto(LocalIndex, void);
168const LocalsMap = std.AutoArrayHashMapUnmanaged(LocalType, LocalsList);168const LocalsMap = std.array_hash_map.Auto(LocalType, LocalsList);
169169
170const ValueRenderLocation = enum {170const ValueRenderLocation = enum {
171 initializer,171 initializer,
...@@ -391,11 +391,11 @@ pub const Function = struct {...@@ -391,11 +391,11 @@ pub const Function = struct {
391 code: Writer.Allocating,391 code: Writer.Allocating,
392 indent_counter: usize,392 indent_counter: usize,
393 /// Key is an enum type for which we need a generated `@tagName` function.393 /// Key is an enum type for which we need a generated `@tagName` function.
394 need_tag_name_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),394 need_tag_name_funcs: std.array_hash_map.Auto(InternPool.Index, void),
395 /// Key is a function Nav for which we need a generated `zig_never_tail` wrapper.395 /// Key is a function Nav for which we need a generated `zig_never_tail` wrapper.
396 need_never_tail_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),396 need_never_tail_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
397 /// Key is a function Nav for which we need a generated `zig_never_inline` wrapper.397 /// Key is a function Nav for which we need a generated `zig_never_inline` wrapper.
398 need_never_inline_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),398 need_never_inline_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
399 func_index: InternPool.Index,399 func_index: InternPool.Index,
400 /// All the locals, to be emitted at the top of the function.400 /// All the locals, to be emitted at the top of the function.
401 locals: std.ArrayList(LocalType) = .empty,401 locals: std.ArrayList(LocalType) = .empty,
...@@ -407,7 +407,7 @@ pub const Function = struct {...@@ -407,7 +407,7 @@ pub const Function = struct {
407 /// of variable declarations at the top of a function, sorted descending407 /// of variable declarations at the top of a function, sorted descending
408 /// by type alignment.408 /// by type alignment.
409 /// The value is whether the alloc needs to be emitted in the header.409 /// The value is whether the alloc needs to be emitted in the header.
410 allocs: std.AutoArrayHashMapUnmanaged(LocalIndex, bool) = .empty,410 allocs: std.array_hash_map.Auto(LocalIndex, bool) = .empty,
411 /// Maps from `loop_switch_br` instructions to the allocated local used411 /// Maps from `loop_switch_br` instructions to the allocated local used
412 /// for the switch cond. Dispatches should set this local to the new cond.412 /// for the switch cond. Dispatches should set this local to the new cond.
413 loop_switch_conds: std.AutoHashMapUnmanaged(Air.Inst.Index, LocalIndex) = .empty,413 loop_switch_conds: std.AutoHashMapUnmanaged(Air.Inst.Index, LocalIndex) = .empty,
...@@ -643,7 +643,7 @@ pub const DeclGen = struct {...@@ -643,7 +643,7 @@ pub const DeclGen = struct {
643 /// Key is the value of the UAV; value is the UAV's alignment, or643 /// Key is the value of the UAV; value is the UAV's alignment, or
644 /// `.none` for natural alignment. The specified alignment is never644 /// `.none` for natural alignment. The specified alignment is never
645 /// less than the natural alignment.645 /// less than the natural alignment.
646 uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),646 uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
647647
648 fn fail(dg: *DeclGen, comptime format: []const u8, args: anytype) Error {648 fn fail(dg: *DeclGen, comptime format: []const u8, args: anytype) Error {
649 @branchHint(.cold);649 @branchHint(.cold);
src/codegen/c/type.zig+6-6
...@@ -572,30 +572,30 @@ pub const CType = union(enum) {...@@ -572,30 +572,30 @@ pub const CType = union(enum) {
572 pub const Dependencies = struct {572 pub const Dependencies = struct {
573 /// Key is any Zig type which corresponds to a C `struct`, `union`, or `typedef`. That C573 /// Key is any Zig type which corresponds to a C `struct`, `union`, or `typedef`. That C
574 /// type must be declared and complete.574 /// type must be declared and complete.
575 type: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),575 type: std.array_hash_map.Auto(InternPool.Index, void),
576576
577 /// Key is a Zig type which is the *payload* of an error union. The C `struct` type577 /// Key is a Zig type which is the *payload* of an error union. The C `struct` type
578 /// corresponding to such an error union must be declared and complete.578 /// corresponding to such an error union must be declared and complete.
579 ///579 ///
580 /// These are separate from `type` to avoid redundant types for every different error set580 /// These are separate from `type` to avoid redundant types for every different error set
581 /// used with the same payload type---for instance a different C type for every `E!void`.581 /// used with the same payload type---for instance a different C type for every `E!void`.
582 errunion_type: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),582 errunion_type: std.array_hash_map.Auto(InternPool.Index, void),
583583
584 /// Like `type`, but the type does not necessarily need to be completed yet: a forward584 /// Like `type`, but the type does not necessarily need to be completed yet: a forward
585 /// declaration is sufficient.585 /// declaration is sufficient.
586 type_fwd: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),586 type_fwd: std.array_hash_map.Auto(InternPool.Index, void),
587587
588 /// Like `errunion_type`, but the type does not necessarily need to be completed yet: a588 /// Like `errunion_type`, but the type does not necessarily need to be completed yet: a
589 /// forward declaration is sufficient.589 /// forward declaration is sufficient.
590 errunion_type_fwd: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),590 errunion_type_fwd: std.array_hash_map.Auto(InternPool.Index, void),
591591
592 /// Key is a Zig type; value is a bitmask of alignments. For every bit which is set, an592 /// Key is a Zig type; value is a bitmask of alignments. For every bit which is set, an
593 /// aligned typedef is required. For instance, if bit 3 is set, the C type 'aligned__8_foo'593 /// aligned typedef is required. For instance, if bit 3 is set, the C type 'aligned__8_foo'
594 /// must be declared through `typedef` (but not necessarily completed yet).594 /// must be declared through `typedef` (but not necessarily completed yet).
595 aligned_type_fwd: std.AutoArrayHashMapUnmanaged(InternPool.Index, u64),595 aligned_type_fwd: std.array_hash_map.Auto(InternPool.Index, u64),
596596
597 /// Key specifies a big-int type whose C `struct` must be declared and complete.597 /// Key specifies a big-int type whose C `struct` must be declared and complete.
598 bigint: std.AutoArrayHashMapUnmanaged(BigInt, void),598 bigint: std.array_hash_map.Auto(BigInt, void),
599599
600 pub const empty: Dependencies = .{600 pub const empty: Dependencies = .{
601 .type = .empty,601 .type = .empty,
src/codegen/riscv64/CodeGen.zig+4-4
...@@ -112,7 +112,7 @@ const_tracking: ConstTrackingMap = .{},...@@ -112,7 +112,7 @@ const_tracking: ConstTrackingMap = .{},
112inst_tracking: InstTrackingMap = .{},112inst_tracking: InstTrackingMap = .{},
113113
114frame_allocs: std.MultiArrayList(FrameAlloc) = .{},114frame_allocs: std.MultiArrayList(FrameAlloc) = .{},
115free_frame_indices: std.AutoArrayHashMapUnmanaged(FrameIndex, void) = .empty,115free_frame_indices: std.array_hash_map.Auto(FrameIndex, void) = .empty,
116frame_locs: std.MultiArrayList(Mir.FrameLoc) = .{},116frame_locs: std.MultiArrayList(Mir.FrameLoc) = .{},
117117
118loops: std.AutoHashMapUnmanaged(Air.Inst.Index, struct {118loops: std.AutoHashMapUnmanaged(Air.Inst.Index, struct {
...@@ -338,7 +338,7 @@ const MCValue = union(enum) {...@@ -338,7 +338,7 @@ const MCValue = union(enum) {
338};338};
339339
340const Branch = struct {340const Branch = struct {
341 inst_table: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, MCValue) = .empty,341 inst_table: std.array_hash_map.Auto(Air.Inst.Index, MCValue) = .empty,
342342
343 fn deinit(func: *Branch, gpa: Allocator) void {343 fn deinit(func: *Branch, gpa: Allocator) void {
344 func.inst_table.deinit(gpa);344 func.inst_table.deinit(gpa);
...@@ -346,8 +346,8 @@ const Branch = struct {...@@ -346,8 +346,8 @@ const Branch = struct {
346 }346 }
347};347};
348348
349const InstTrackingMap = std.AutoArrayHashMapUnmanaged(Air.Inst.Index, InstTracking);349const InstTrackingMap = std.array_hash_map.Auto(Air.Inst.Index, InstTracking);
350const ConstTrackingMap = std.AutoArrayHashMapUnmanaged(InternPool.Index, InstTracking);350const ConstTrackingMap = std.array_hash_map.Auto(InternPool.Index, InstTracking);
351351
352const InstTracking = struct {352const InstTracking = struct {
353 long: MCValue,353 long: MCValue,
src/codegen/sparc64/CodeGen.zig+1-1
...@@ -200,7 +200,7 @@ const MCValue = union(enum) {...@@ -200,7 +200,7 @@ const MCValue = union(enum) {
200};200};
201201
202const Branch = struct {202const Branch = struct {
203 inst_table: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, MCValue) = .empty,203 inst_table: std.array_hash_map.Auto(Air.Inst.Index, MCValue) = .empty,
204204
205 fn deinit(self: *Branch, gpa: Allocator) void {205 fn deinit(self: *Branch, gpa: Allocator) void {
206 self.inst_table.deinit(gpa);206 self.inst_table.deinit(gpa);
src/codegen/spirv/Module.zig+1-1
...@@ -28,7 +28,7 @@ uav_link: std.AutoHashMapUnmanaged(struct { InternPool.Index, spec.StorageClass...@@ -28,7 +28,7 @@ uav_link: std.AutoHashMapUnmanaged(struct { InternPool.Index, spec.StorageClass
28intern_map: std.AutoHashMapUnmanaged(struct { InternPool.Index, Repr }, Id) = .empty,28intern_map: std.AutoHashMapUnmanaged(struct { InternPool.Index, Repr }, Id) = .empty,
29decls: std.ArrayList(Decl) = .empty,29decls: std.ArrayList(Decl) = .empty,
30decl_deps: std.ArrayList(Decl.Index) = .empty,30decl_deps: std.ArrayList(Decl.Index) = .empty,
31entry_points: std.AutoArrayHashMapUnmanaged(Id, EntryPoint) = .empty,31entry_points: std.array_hash_map.Auto(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 tell33/// - It keeps track of pointers that are currently being emitted, so that we can tell
34/// if they are recursive and need an OpTypeForwardPointer.34/// if they are recursive and need an OpTypeForwardPointer.
src/codegen/wasm/CodeGen.zig+5-5
...@@ -141,7 +141,7 @@ branches: std.ArrayList(Branch) = .empty,...@@ -141,7 +141,7 @@ branches: std.ArrayList(Branch) = .empty,
141/// Table to save `WValue`'s generated by an `Air.Inst`141/// Table to save `WValue`'s generated by an `Air.Inst`
142// values: ValueTable,142// values: ValueTable,
143/// Mapping from Air.Inst.Index to block ids143/// Mapping from Air.Inst.Index to block ids
144blocks: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, struct {144blocks: std.array_hash_map.Auto(Air.Inst.Index, struct {
145 label: u32,145 label: u32,
146 value: WValue,146 value: WValue,
147}) = .{},147}) = .{},
...@@ -171,12 +171,12 @@ mir_extra: std.ArrayList(u32),...@@ -171,12 +171,12 @@ mir_extra: std.ArrayList(u32),
171mir_locals: std.ArrayList(std.wasm.Valtype),171mir_locals: std.ArrayList(std.wasm.Valtype),
172/// Set of all UAVs referenced by this function. Key is the UAV value, value is the alignment.172/// Set of all UAVs referenced by this function. Key is the UAV value, value is the alignment.
173/// `.none` means naturally aligned. An explicit alignment is never less than the natural alignment.173/// `.none` means naturally aligned. An explicit alignment is never less than the natural alignment.
174mir_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),174mir_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
175/// Set of all functions whose address this function has taken and which therefore might be called175/// Set of all functions whose address this function has taken and which therefore might be called
176/// via a `call_indirect` function.176/// via a `call_indirect` function.
177mir_indirect_function_set: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),177mir_indirect_function_set: std.array_hash_map.Auto(InternPool.Nav.Index, void),
178/// Set of all function types used by this function. These must be interned by the linker.178/// Set of all function types used by this function. These must be interned by the linker.
179mir_func_tys: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),179mir_func_tys: std.array_hash_map.Auto(InternPool.Index, void),
180/// The number of `error_name_table_ref` instructions emitted.180/// The number of `error_name_table_ref` instructions emitted.
181error_name_table_ref_count: u32,181error_name_table_ref_count: u32,
182/// When a function is executing, we store the the current stack pointer's value within this local.182/// When a function is executing, we store the the current stack pointer's value within this local.
...@@ -322,7 +322,7 @@ const WValue = union(enum) {...@@ -322,7 +322,7 @@ const WValue = union(enum) {
322};322};
323323
324/// Hashmap to store generated `WValue` for each `Air.Inst.Ref`324/// Hashmap to store generated `WValue` for each `Air.Inst.Ref`
325const ValueTable = std.AutoArrayHashMapUnmanaged(Air.Inst.Ref, WValue);325const ValueTable = std.array_hash_map.Auto(Air.Inst.Ref, WValue);
326326
327const bookkeeping_init = if (std.debug.runtime_safety) @as(usize, 0) else {};327const bookkeeping_init = if (std.debug.runtime_safety) @as(usize, 0) else {};
328328
src/codegen/wasm/Mir.zig+3-3
...@@ -26,11 +26,11 @@ prologue: Prologue,...@@ -26,11 +26,11 @@ prologue: Prologue,
2626
27/// Not directly used by `Emit`, but the linker needs this to merge it with a global set.27/// Not directly used by `Emit`, but the linker needs this to merge it with a global set.
28/// Value is the explicit alignment if greater than natural alignment, `.none` otherwise.28/// Value is the explicit alignment if greater than natural alignment, `.none` otherwise.
29uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),29uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
30/// Not directly used by `Emit`, but the linker needs this to merge it with a global set.30/// Not directly used by `Emit`, but the linker needs this to merge it with a global set.
31indirect_function_set: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),31indirect_function_set: std.array_hash_map.Auto(InternPool.Nav.Index, void),
32/// Not directly used by `Emit`, but the linker needs this to ensure these types are interned.32/// Not directly used by `Emit`, but the linker needs this to ensure these types are interned.
33func_tys: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),33func_tys: std.array_hash_map.Auto(InternPool.Index, void),
34/// Not directly used by `Emit`, but the linker needs this to add it to its own refcount.34/// Not directly used by `Emit`, but the linker needs this to add it to its own refcount.
35error_name_table_ref_count: u32,35error_name_table_ref_count: u32,
3636
src/codegen/x86_64/CodeGen.zig+3-3
...@@ -140,7 +140,7 @@ register_manager: RegisterManager = .{},...@@ -140,7 +140,7 @@ register_manager: RegisterManager = .{},
140scope_generation: u32 = 0,140scope_generation: u32 = 0,
141141
142frame_allocs: std.MultiArrayList(FrameAlloc) = .empty,142frame_allocs: std.MultiArrayList(FrameAlloc) = .empty,
143free_frame_indices: std.AutoArrayHashMapUnmanaged(FrameIndex, void) = .empty,143free_frame_indices: std.array_hash_map.Auto(FrameIndex, void) = .empty,
144frame_locs: std.MultiArrayList(Mir.FrameLoc) = .empty,144frame_locs: std.MultiArrayList(Mir.FrameLoc) = .empty,
145145
146loops: std.AutoHashMapUnmanaged(Air.Inst.Index, struct {146loops: std.AutoHashMapUnmanaged(Air.Inst.Index, struct {
...@@ -569,8 +569,8 @@ pub const MCValue = union(enum) {...@@ -569,8 +569,8 @@ pub const MCValue = union(enum) {
569 }569 }
570};570};
571571
572const InstTrackingMap = std.AutoArrayHashMapUnmanaged(Air.Inst.Index, InstTracking);572const InstTrackingMap = std.array_hash_map.Auto(Air.Inst.Index, InstTracking);
573const ConstTrackingMap = std.AutoArrayHashMapUnmanaged(InternPool.Index, InstTracking);573const ConstTrackingMap = std.array_hash_map.Auto(InternPool.Index, InstTracking);
574const InstTracking = struct {574const InstTracking = struct {
575 long: MCValue,575 long: MCValue,
576 short: MCValue,576 short: MCValue,
src/link/C.zig+26-26
...@@ -44,10 +44,10 @@ type_dependencies: std.ArrayList(link.ConstPool.Index),...@@ -44,10 +44,10 @@ type_dependencies: std.ArrayList(link.ConstPool.Index),
44align_dependency_masks: std.ArrayList(u64),44align_dependency_masks: std.ArrayList(u64),
4545
46/// All NAVs, regardless of whether they are functions or simple constants, are put in this map.46/// All NAVs, regardless of whether they are functions or simple constants, are put in this map.
47navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, RenderedDecl),47navs: std.array_hash_map.Auto(InternPool.Nav.Index, RenderedDecl),
48/// All UAVs which may be referenced are in this map. The UAV alignment is not included in the48/// All UAVs which may be referenced are in this map. The UAV alignment is not included in the
49/// rendered C code stored here, because we don't know the alignment a UAV needs until `flush`.49/// rendered C code stored here, because we don't know the alignment a UAV needs until `flush`.
50uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, RenderedDecl),50uavs: std.array_hash_map.Auto(InternPool.Index, RenderedDecl),
51/// Contains all types which are needed by some other rendered code. Does not contain any constants51/// Contains all types which are needed by some other rendered code. Does not contain any constants
52/// other than types.52/// other than types.
53type_pool: link.ConstPool,53type_pool: link.ConstPool,
...@@ -59,10 +59,10 @@ types: std.ArrayList(RenderedType),...@@ -59,10 +59,10 @@ types: std.ArrayList(RenderedType),
59/// The set of big int types required by *any* generated code so far. These are always safe to emit,59/// The set of big int types required by *any* generated code so far. These are always safe to emit,
60/// so they do not participate in the dependency graph traversal in `flush`. Therefore, redundant60/// so they do not participate in the dependency graph traversal in `flush`. Therefore, redundant
61/// big-int types may be emitted under incremental compilation.61/// big-int types may be emitted under incremental compilation.
62bigint_types: std.AutoArrayHashMapUnmanaged(codegen.CType.BigInt, void),62bigint_types: std.array_hash_map.Auto(codegen.CType.BigInt, void),
6363
64exported_navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, String),64exported_navs: std.array_hash_map.Auto(InternPool.Nav.Index, String),
65exported_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, String),65exported_uavs: std.array_hash_map.Auto(InternPool.Index, String),
6666
67/// A reference into `string_bytes`.67/// A reference into `string_bytes`.
68const String = extern struct {68const String = extern struct {
...@@ -133,10 +133,10 @@ const RenderedDecl = struct {...@@ -133,10 +133,10 @@ const RenderedDecl = struct {
133 fwd_decl: String,133 fwd_decl: String,
134 code: String,134 code: String,
135 ctype_deps: CTypeDependencies,135 ctype_deps: CTypeDependencies,
136 need_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),136 need_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
137 need_tag_name_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),137 need_tag_name_funcs: std.array_hash_map.Auto(InternPool.Index, void),
138 need_never_tail_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),138 need_never_tail_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
139 need_never_inline_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),139 need_never_inline_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
140140
141 const init: RenderedDecl = .{141 const init: RenderedDecl = .{
142 .fwd_decl = .empty,142 .fwd_decl = .empty,
...@@ -746,7 +746,7 @@ pub fn flush(c: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Prog...@@ -746,7 +746,7 @@ pub fn flush(c: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Prog
746 // incremental updates which is invalid C (due to e.g. types changing). Machine code backends746 // incremental updates which is invalid C (due to e.g. types changing). Machine code backends
747 // don't have this problem because there are, of course, no type checking performed when you747 // don't have this problem because there are, of course, no type checking performed when you
748 // *execute* a binary!748 // *execute* a binary!
749 var need_navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty;749 var need_navs: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty;
750 defer need_navs.deinit(gpa);750 defer need_navs.deinit(gpa);
751 {751 {
752 const unit_references = try zcu.resolveReferences();752 const unit_references = try zcu.resolveReferences();
...@@ -774,23 +774,23 @@ pub fn flush(c: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Prog...@@ -774,23 +774,23 @@ pub fn flush(c: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Prog
774 //774 //
775 // At the same time, we will discover the set of lazy functions which are referenced.775 // At the same time, we will discover the set of lazy functions which are referenced.
776776
777 var need_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment) = .empty;777 var need_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment) = .empty;
778 defer need_uavs.deinit(gpa);778 defer need_uavs.deinit(gpa);
779779
780 var need_types: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void) = .empty;780 var need_types: std.array_hash_map.Auto(link.ConstPool.Index, void) = .empty;
781 defer need_types.deinit(gpa);781 defer need_types.deinit(gpa);
782 var need_errunion_types: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void) = .empty;782 var need_errunion_types: std.array_hash_map.Auto(link.ConstPool.Index, void) = .empty;
783 defer need_errunion_types.deinit(gpa);783 defer need_errunion_types.deinit(gpa);
784 var need_aligned_types: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, u64) = .empty;784 var need_aligned_types: std.array_hash_map.Auto(link.ConstPool.Index, u64) = .empty;
785 defer need_aligned_types.deinit(gpa);785 defer need_aligned_types.deinit(gpa);
786786
787 var need_tag_name_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, void) = .empty;787 var need_tag_name_funcs: std.array_hash_map.Auto(InternPool.Index, void) = .empty;
788 defer need_tag_name_funcs.deinit(gpa);788 defer need_tag_name_funcs.deinit(gpa);
789789
790 var need_never_tail_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty;790 var need_never_tail_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty;
791 defer need_never_tail_funcs.deinit(gpa);791 defer need_never_tail_funcs.deinit(gpa);
792792
793 var need_never_inline_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty;793 var need_never_inline_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty;
794 defer need_never_inline_funcs.deinit(gpa);794 defer need_never_inline_funcs.deinit(gpa);
795795
796 // As mentioned above, we need this type for error names.796 // As mentioned above, we need this type for error names.
...@@ -1284,9 +1284,9 @@ pub fn deleteExport(...@@ -1284,9 +1284,9 @@ pub fn deleteExport(
12841284
1285fn mergeNeededCTypes(1285fn mergeNeededCTypes(
1286 c: *C,1286 c: *C,
1287 need_types: *std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void),1287 need_types: *std.array_hash_map.Auto(link.ConstPool.Index, void),
1288 need_errunion_types: *std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void),1288 need_errunion_types: *std.array_hash_map.Auto(link.ConstPool.Index, void),
1289 need_aligned_types: *std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, u64),1289 need_aligned_types: *std.array_hash_map.Auto(link.ConstPool.Index, u64),
1290 deps: *const CTypeDependencies,1290 deps: *const CTypeDependencies,
1291) Allocator.Error!void {1291) Allocator.Error!void {
1292 const gpa = c.base.comp.gpa;1292 const gpa = c.base.comp.gpa;
...@@ -1312,8 +1312,8 @@ fn mergeNeededCTypes(...@@ -1312,8 +1312,8 @@ fn mergeNeededCTypes(
13121312
1313fn mergeNeededUavs(1313fn mergeNeededUavs(
1314 zcu: *const Zcu,1314 zcu: *const Zcu,
1315 global: *std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),1315 global: *std.array_hash_map.Auto(InternPool.Index, Alignment),
1316 new: *const std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),1316 new: *const std.array_hash_map.Auto(InternPool.Index, Alignment),
1317) Allocator.Error!void {1317) Allocator.Error!void {
1318 const gpa = zcu.comp.gpa;1318 const gpa = zcu.comp.gpa;
13191319
...@@ -1422,12 +1422,12 @@ const FlushTypes = struct {...@@ -1422,12 +1422,12 @@ const FlushTypes = struct {
1422 c: *C,1422 c: *C,
1423 f: *Flush,1423 f: *Flush,
14241424
1425 aligned_types: *const std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, u64),1425 aligned_types: *const std.array_hash_map.Auto(link.ConstPool.Index, u64),
1426 aligned_type_strings: []const []const u8,1426 aligned_type_strings: []const []const u8,
14271427
1428 status: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, bool),1428 status: std.array_hash_map.Auto(link.ConstPool.Index, bool),
1429 errunion_status: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, bool),1429 errunion_status: std.array_hash_map.Auto(link.ConstPool.Index, bool),
1430 aligned_status: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void),1430 aligned_status: std.array_hash_map.Auto(link.ConstPool.Index, void),
14311431
1432 fn processDeps(ft: *FlushTypes, deps: *const CTypeDependencies) void {1432 fn processDeps(ft: *FlushTypes, deps: *const CTypeDependencies) void {
1433 const resolved = deps.get(ft.c);1433 const resolved = deps.get(ft.c);
src/link/Coff.zig+8-8
...@@ -30,18 +30,18 @@ strings: std.HashMapUnmanaged(...@@ -30,18 +30,18 @@ strings: std.HashMapUnmanaged(
30),30),
31string_bytes: std.ArrayList(u8),31string_bytes: std.ArrayList(u8),
32image_section_table: std.ArrayList(Symbol.Index),32image_section_table: std.ArrayList(Symbol.Index),
33pseudo_section_table: std.AutoArrayHashMapUnmanaged(String, Symbol.Index),33pseudo_section_table: std.array_hash_map.Auto(String, Symbol.Index),
34object_section_table: std.AutoArrayHashMapUnmanaged(String, Symbol.Index),34object_section_table: std.array_hash_map.Auto(String, Symbol.Index),
35symbol_table: std.ArrayList(Symbol),35symbol_table: std.ArrayList(Symbol),
36globals: std.AutoArrayHashMapUnmanaged(GlobalName, Symbol.Index),36globals: std.array_hash_map.Auto(GlobalName, Symbol.Index),
37global_pending_index: u32,37global_pending_index: u32,
38navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, Symbol.Index),38navs: std.array_hash_map.Auto(InternPool.Nav.Index, Symbol.Index),
39uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Symbol.Index),39uavs: std.array_hash_map.Auto(InternPool.Index, Symbol.Index),
40lazy: std.EnumArray(link.File.LazySymbol.Kind, struct {40lazy: std.EnumArray(link.File.LazySymbol.Kind, struct {
41 map: std.AutoArrayHashMapUnmanaged(InternPool.Index, Symbol.Index),41 map: std.array_hash_map.Auto(InternPool.Index, Symbol.Index),
42 pending_index: u32,42 pending_index: u32,
43}),43}),
44pending_uavs: std.AutoArrayHashMapUnmanaged(Node.UavMapIndex, struct {44pending_uavs: std.array_hash_map.Auto(Node.UavMapIndex, struct {
45 alignment: InternPool.Alignment,45 alignment: InternPool.Alignment,
46}),46}),
47relocs: std.ArrayList(Reloc),47relocs: std.ArrayList(Reloc),
...@@ -272,7 +272,7 @@ pub const Node = union(enum) {...@@ -272,7 +272,7 @@ pub const Node = union(enum) {
272272
273pub const ImportTable = struct {273pub const ImportTable = struct {
274 ni: MappedFile.Node.Index,274 ni: MappedFile.Node.Index,
275 entries: std.AutoArrayHashMapUnmanaged(void, Entry),275 entries: std.array_hash_map.Auto(void, Entry),
276276
277 pub const Entry = struct {277 pub const Entry = struct {
278 import_lookup_table_ni: MappedFile.Node.Index,278 import_lookup_table_ni: MappedFile.Node.Index,
src/link/ConstPool.zig+3-3
...@@ -15,10 +15,10 @@...@@ -15,10 +15,10 @@
15/// * ensure that any `get` call is eventually followed by a `flushPending` call15/// * ensure that any `get` call is eventually followed by a `flushPending` call
16const ConstPool = @This();16const ConstPool = @This();
1717
18values: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),18values: std.array_hash_map.Auto(InternPool.Index, void),
19pending: std.ArrayList(Index),19pending: std.ArrayList(Index),
20complete_containers: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),20complete_containers: std.array_hash_map.Auto(InternPool.Index, void),
21container_deps: std.AutoArrayHashMapUnmanaged(InternPool.Index, ContainerDepEntry.Index),21container_deps: std.array_hash_map.Auto(InternPool.Index, ContainerDepEntry.Index),
22container_dep_entries: std.ArrayList(ContainerDepEntry),22container_dep_entries: std.ArrayList(ContainerDepEntry),
2323
24pub const empty: ConstPool = .{24pub const empty: ConstPool = .{
src/link/Dwarf.zig+6-6
...@@ -27,11 +27,11 @@ address_size: AddressSize,...@@ -27,11 +27,11 @@ address_size: AddressSize,
2727
28const_pool: link.ConstPool,28const_pool: link.ConstPool,
2929
30mods: std.AutoArrayHashMapUnmanaged(*Module, ModInfo),30mods: std.array_hash_map.Auto(*Module, ModInfo),
31/// Indices are `link.ConstPool.Index`.31/// Indices are `link.ConstPool.Index`.
32values: std.ArrayList(struct { Unit.Index, Entry.Index }),32values: std.ArrayList(struct { Unit.Index, Entry.Index }),
33navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, Entry.Index),33navs: std.array_hash_map.Auto(InternPool.Nav.Index, Entry.Index),
34decls: std.AutoArrayHashMapUnmanaged(InternPool.TrackedInst.Index, Entry.Index),34decls: std.array_hash_map.Auto(InternPool.TrackedInst.Index, Entry.Index),
3535
36debug_abbrev: DebugAbbrev,36debug_abbrev: DebugAbbrev,
37debug_aranges: DebugAranges,37debug_aranges: DebugAranges,
...@@ -69,8 +69,8 @@ pub const AddressSize = enum(u8) {...@@ -69,8 +69,8 @@ pub const AddressSize = enum(u8) {
6969
70const ModInfo = struct {70const ModInfo = struct {
71 root_dir_path: Entry.Index,71 root_dir_path: Entry.Index,
72 dirs: std.AutoArrayHashMapUnmanaged(Unit.Index, void),72 dirs: std.array_hash_map.Auto(Unit.Index, void),
73 files: std.AutoArrayHashMapUnmanaged(Zcu.File.Index, void),73 files: std.array_hash_map.Auto(Zcu.File.Index, void),
7474
75 fn deinit(mod_info: *ModInfo, gpa: Allocator) void {75 fn deinit(mod_info: *ModInfo, gpa: Allocator) void {
76 mod_info.dirs.deinit(gpa);76 mod_info.dirs.deinit(gpa);
...@@ -236,7 +236,7 @@ const DebugRngLists = struct {...@@ -236,7 +236,7 @@ const DebugRngLists = struct {
236236
237const StringSection = struct {237const StringSection = struct {
238 contents: std.ArrayList(u8),238 contents: std.ArrayList(u8),
239 map: std.AutoArrayHashMapUnmanaged(void, void),239 map: std.array_hash_map.Auto(void, void),
240 section: Section,240 section: Section,
241241
242 const unit: Unit.Index = @enumFromInt(0);242 const unit: Unit.Index = @enumFromInt(0);
src/link/Elf.zig+1-1
...@@ -4153,7 +4153,7 @@ pub const Ref = struct {...@@ -4153,7 +4153,7 @@ pub const Ref = struct {
4153pub const SymbolResolver = struct {4153pub const SymbolResolver = struct {
4154 keys: std.ArrayList(Key) = .empty,4154 keys: std.ArrayList(Key) = .empty,
4155 values: std.ArrayList(Ref) = .empty,4155 values: std.ArrayList(Ref) = .empty,
4156 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,4156 table: std.array_hash_map.Auto(void, void) = .empty,
41574157
4158 const Result = struct {4158 const Result = struct {
4159 found_existing: bool,4159 found_existing: bool,
src/link/Elf/AtomList.zig+1-1
...@@ -3,7 +3,7 @@ size: u64 = 0,...@@ -3,7 +3,7 @@ size: u64 = 0,
3alignment: Atom.Alignment = .@"1",3alignment: Atom.Alignment = .@"1",
4output_section_index: u32 = 0,4output_section_index: u32 = 0,
5// atoms: std.ArrayList(Elf.Ref) = .empty,5// atoms: std.ArrayList(Elf.Ref) = .empty,
6atoms: std.AutoArrayHashMapUnmanaged(Elf.Ref, void) = .empty,6atoms: std.array_hash_map.Auto(Elf.Ref, void) = .empty,
77
8dirty: bool = true,8dirty: bool = true,
99
src/link/Elf/Thunk.zig+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1value: i64 = 0,1value: i64 = 0,
2output_section_index: u32 = 0,2output_section_index: u32 = 0,
3symbols: std.AutoArrayHashMapUnmanaged(Elf.Ref, void) = .empty,3symbols: std.array_hash_map.Auto(Elf.Ref, void) = .empty,
4output_symtab_ctx: Elf.SymtabCtx = .{},4output_symtab_ctx: Elf.SymtabCtx = .{},
55
6pub fn deinit(thunk: *Thunk, allocator: Allocator) void {6pub fn deinit(thunk: *Thunk, allocator: Allocator) void {
src/link/Elf/ZigObject.zig+4-4
...@@ -2408,10 +2408,10 @@ const TlsVariable = struct {...@@ -2408,10 +2408,10 @@ const TlsVariable = struct {
2408};2408};
24092409
2410const AtomList = std.ArrayList(Atom.Index);2410const AtomList = std.ArrayList(Atom.Index);
2411const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata);2411const NavTable = std.array_hash_map.Auto(InternPool.Nav.Index, AvMetadata);
2412const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata);2412const UavTable = std.array_hash_map.Auto(InternPool.Index, AvMetadata);
2413const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata);2413const LazySymbolTable = std.array_hash_map.Auto(InternPool.Index, LazySymbolMetadata);
2414const TlsTable = std.AutoArrayHashMapUnmanaged(Atom.Index, void);2414const TlsTable = std.array_hash_map.Auto(Atom.Index, void);
24152415
2416const x86_64 = struct {2416const x86_64 = struct {
2417 fn writeTrampolineCode(source_addr: i64, target_addr: i64, buf: *[max_trampoline_len]u8) ![]u8 {2417 fn writeTrampolineCode(source_addr: i64, target_addr: i64, buf: *[max_trampoline_len]u8) ![]u8 {
src/link/Elf2.zig+4-4
...@@ -112,7 +112,7 @@ plt_first_symbol_reloc: SymbolReloc.Index,...@@ -112,7 +112,7 @@ plt_first_symbol_reloc: SymbolReloc.Index,
112/// The `.dynamic` section contains zero or more symbol relocations starting at this index.112/// The `.dynamic` section contains zero or more symbol relocations starting at this index.
113dynamic_first_symbol_reloc: SymbolReloc.Index,113dynamic_first_symbol_reloc: SymbolReloc.Index,
114114
115needed: std.AutoArrayHashMapUnmanaged(String(.dynstr), void),115needed: std.array_hash_map.Auto(String(.dynstr), void),
116inputs: std.ArrayList(struct {116inputs: std.ArrayList(struct {
117 path: std.Build.Cache.Path,117 path: std.Build.Cache.Path,
118 member: ?[]const u8,118 member: ?[]const u8,
...@@ -120,21 +120,21 @@ inputs: std.ArrayList(struct {...@@ -120,21 +120,21 @@ inputs: std.ArrayList(struct {
120}),120}),
121input_sections: std.ArrayList(InputSection),121input_sections: std.ArrayList(InputSection),
122input_section_pending_index: u32,122input_section_pending_index: u32,
123navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, struct {123navs: std.array_hash_map.Auto(InternPool.Nav.Index, struct {
124 lsi: Symbol.LocalIndex,124 lsi: Symbol.LocalIndex,
125 /// The start index of the contiguous sequence of symbol relocations in this NAV.125 /// The start index of the contiguous sequence of symbol relocations in this NAV.
126 first_symbol_reloc: SymbolReloc.Index,126 first_symbol_reloc: SymbolReloc.Index,
127 /// The start index of the contiguous sequence of GOT relocations in this NAV.127 /// The start index of the contiguous sequence of GOT relocations in this NAV.
128 first_got_reloc: GotReloc.Index,128 first_got_reloc: GotReloc.Index,
129}),129}),
130uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, struct {130uavs: std.array_hash_map.Auto(InternPool.Index, struct {
131 lsi: Symbol.LocalIndex,131 lsi: Symbol.LocalIndex,
132 /// The start index of the contiguous sequence of symbol relocations in this UAV.132 /// The start index of the contiguous sequence of symbol relocations in this UAV.
133 first_symbol_reloc: SymbolReloc.Index,133 first_symbol_reloc: SymbolReloc.Index,
134 // No `first_got_reloc` field because a UAV never contains GOT relocations.134 // No `first_got_reloc` field because a UAV never contains GOT relocations.
135}),135}),
136lazy: std.EnumArray(link.File.LazySymbol.Kind, struct {136lazy: std.EnumArray(link.File.LazySymbol.Kind, struct {
137 map: std.AutoArrayHashMapUnmanaged(InternPool.Index, struct {137 map: std.array_hash_map.Auto(InternPool.Index, struct {
138 lsi: Symbol.LocalIndex,138 lsi: Symbol.LocalIndex,
139 /// The start index of the contiguous sequence of symbol relocations in this lazy code/data.139 /// The start index of the contiguous sequence of symbol relocations in this lazy code/data.
140 first_symbol_reloc: SymbolReloc.Index,140 first_symbol_reloc: SymbolReloc.Index,
src/link/MachO.zig+4-4
...@@ -28,9 +28,9 @@ sections: std.MultiArrayList(Section) = .{},...@@ -28,9 +28,9 @@ sections: std.MultiArrayList(Section) = .{},
28resolver: SymbolResolver = .{},28resolver: SymbolResolver = .{},
29/// This table will be populated after `scanRelocs` has run.29/// This table will be populated after `scanRelocs` has run.
30/// Key is symbol index.30/// Key is symbol index.
31undefs: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, UndefRefs) = .empty,31undefs: std.array_hash_map.Auto(SymbolResolver.Index, UndefRefs) = .empty,
32undefs_mutex: std.Io.Mutex = .init,32undefs_mutex: std.Io.Mutex = .init,
33dupes: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, std.ArrayList(File.Index)) = .empty,33dupes: std.array_hash_map.Auto(SymbolResolver.Index, std.ArrayList(File.Index)) = .empty,
34dupes_mutex: std.Io.Mutex = .init,34dupes_mutex: std.Io.Mutex = .init,
3535
36dyld_info_cmd: macho.dyld_info_command = .{},36dyld_info_cmd: macho.dyld_info_command = .{},
...@@ -4102,7 +4102,7 @@ const Section = struct {...@@ -4102,7 +4102,7 @@ const Section = struct {
4102};4102};
41034103
4104pub const LiteralPool = struct {4104pub const LiteralPool = struct {
4105 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,4105 table: std.array_hash_map.Auto(void, void) = .empty,
4106 keys: std.ArrayList(Key) = .empty,4106 keys: std.ArrayList(Key) = .empty,
4107 values: std.ArrayList(MachO.Ref) = .empty,4107 values: std.ArrayList(MachO.Ref) = .empty,
4108 data: std.ArrayList(u8) = .empty,4108 data: std.ArrayList(u8) = .empty,
...@@ -4541,7 +4541,7 @@ pub const Ref = struct {...@@ -4541,7 +4541,7 @@ pub const Ref = struct {
4541pub const SymbolResolver = struct {4541pub const SymbolResolver = struct {
4542 keys: std.ArrayList(Key) = .empty,4542 keys: std.ArrayList(Key) = .empty,
4543 values: std.ArrayList(Ref) = .empty,4543 values: std.ArrayList(Ref) = .empty,
4544 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,4544 table: std.array_hash_map.Auto(void, void) = .empty,
45454545
4546 const Result = struct {4546 const Result = struct {
4547 found_existing: bool,4547 found_existing: bool,
src/link/MachO/Thunk.zig+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1value: u64 = 0,1value: u64 = 0,
2out_n_sect: u8 = 0,2out_n_sect: u8 = 0,
3symbols: std.AutoArrayHashMapUnmanaged(MachO.Ref, void) = .empty,3symbols: std.array_hash_map.Auto(MachO.Ref, void) = .empty,
4output_symtab_ctx: MachO.SymtabCtx = .{},4output_symtab_ctx: MachO.SymtabCtx = .{},
55
6pub fn deinit(thunk: *Thunk, allocator: Allocator) void {6pub fn deinit(thunk: *Thunk, allocator: Allocator) void {
src/link/MachO/ZigObject.zig+4-4
...@@ -1750,11 +1750,11 @@ const TlvInitializer = struct {...@@ -1750,11 +1750,11 @@ const TlvInitializer = struct {
1750 }1750 }
1751};1751};
17521752
1753const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata);1753const NavTable = std.array_hash_map.Auto(InternPool.Nav.Index, AvMetadata);
1754const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata);1754const UavTable = std.array_hash_map.Auto(InternPool.Index, AvMetadata);
1755const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata);1755const LazySymbolTable = std.array_hash_map.Auto(InternPool.Index, LazySymbolMetadata);
1756const RelocationTable = std.ArrayList(std.ArrayList(Relocation));1756const RelocationTable = std.ArrayList(std.ArrayList(Relocation));
1757const TlvInitializerTable = std.AutoArrayHashMapUnmanaged(Atom.Index, TlvInitializer);1757const TlvInitializerTable = std.array_hash_map.Auto(Atom.Index, TlvInitializer);
17581758
1759const x86_64 = struct {1759const x86_64 = struct {
1760 fn writeTrampolineCode(source_addr: u64, target_addr: u64, buf: *[max_trampoline_len]u8) ![]u8 {1760 fn writeTrampolineCode(source_addr: u64, target_addr: u64, buf: *[max_trampoline_len]u8) ![]u8 {
src/link/SpirV/lower_invocation_globals.zig+6-6
...@@ -23,14 +23,14 @@ const ModuleInfo = struct {...@@ -23,14 +23,14 @@ const ModuleInfo = struct {
23 /// The set of (result-id's of) invocation globals that are accessed23 /// The set of (result-id's of) invocation globals that are accessed
24 /// in this function, or after resolution, that are accessed in this24 /// in this function, or after resolution, that are accessed in this
25 /// function or any of it's callees.25 /// function or any of it's callees.
26 invocation_globals: std.AutoArrayHashMapUnmanaged(ResultId, void),26 invocation_globals: std.array_hash_map.Auto(ResultId, void),
27 };27 };
2828
29 /// Information about a particular invocation global29 /// Information about a particular invocation global
30 const InvocationGlobal = struct {30 const InvocationGlobal = struct {
31 /// The list of invocation globals that this invocation global31 /// The list of invocation globals that this invocation global
32 /// depends on.32 /// depends on.
33 dependencies: std.AutoArrayHashMapUnmanaged(ResultId, void),33 dependencies: std.array_hash_map.Auto(ResultId, void),
34 /// The invocation global's type34 /// The invocation global's type
35 ty: ResultId,35 ty: ResultId,
36 /// Initializer function. May be `none`.36 /// Initializer function. May be `none`.
...@@ -39,13 +39,13 @@ const ModuleInfo = struct {...@@ -39,13 +39,13 @@ const ModuleInfo = struct {
39 };39 };
4040
41 /// Maps function result-id -> Fn information structure.41 /// Maps function result-id -> Fn information structure.
42 functions: std.AutoArrayHashMapUnmanaged(ResultId, Fn),42 functions: std.array_hash_map.Auto(ResultId, Fn),
43 /// Set of OpFunction result-ids in this module.43 /// Set of OpFunction result-ids in this module.
44 entry_points: std.AutoArrayHashMapUnmanaged(ResultId, void),44 entry_points: std.array_hash_map.Auto(ResultId, void),
45 /// For each function, a list of function result-ids that it calls.45 /// For each function, a list of function result-ids that it calls.
46 callee_store: []const ResultId,46 callee_store: []const ResultId,
47 /// Maps each invocation global result-id to a type-id.47 /// Maps each invocation global result-id to a type-id.
48 invocation_globals: std.AutoArrayHashMapUnmanaged(ResultId, InvocationGlobal),48 invocation_globals: std.array_hash_map.Auto(ResultId, InvocationGlobal),
4949
50 /// Fetch the list of callees per function. Guaranteed to contain only unique IDs.50 /// Fetch the list of callees per function. Guaranteed to contain only unique IDs.
51 fn callees(self: ModuleInfo, fn_id: ResultId) []const ResultId {51 fn callees(self: ModuleInfo, fn_id: ResultId) []const ResultId {
...@@ -344,7 +344,7 @@ const ModuleBuilder = struct {...@@ -344,7 +344,7 @@ const ModuleBuilder = struct {
344 /// and until a general type deduplication pass is programmed, we just handle it here via this.344 /// and until a general type deduplication pass is programmed, we just handle it here via this.
345 function_types: std.ArrayHashMapUnmanaged(FunctionType, ResultId, FunctionType.Context, true) = .empty,345 function_types: std.ArrayHashMapUnmanaged(FunctionType, ResultId, FunctionType.Context, true) = .empty,
346 /// Maps functions to new information required for creating the module346 /// Maps functions to new information required for creating the module
347 function_new_info: std.AutoArrayHashMapUnmanaged(ResultId, FunctionNewInfo) = .empty,347 function_new_info: std.array_hash_map.Auto(ResultId, FunctionNewInfo) = .empty,
348 /// Offset of the functions section in the new binary.348 /// Offset of the functions section in the new binary.
349 new_functions_section: ?usize,349 new_functions_section: ?usize,
350350
src/link/Wasm.zig+32-32
...@@ -80,27 +80,27 @@ name: []const u8,...@@ -80,27 +80,27 @@ name: []const u8,
80/// List of relocatable files to be linked into the final binary.80/// List of relocatable files to be linked into the final binary.
81objects: std.ArrayList(Object) = .empty,81objects: std.ArrayList(Object) = .empty,
8282
83func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty,83func_types: std.array_hash_map.Auto(FunctionType, void) = .empty,
84/// Provides a mapping of both imports and provided functions to symbol name.84/// Provides a mapping of both imports and provided functions to symbol name.
85/// Local functions may be unnamed.85/// Local functions may be unnamed.
86/// Key is symbol name, however the `FunctionImport` may have an name override for the import name.86/// Key is symbol name, however the `FunctionImport` may have an name override for the import name.
87object_function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImport) = .empty,87object_function_imports: std.array_hash_map.Auto(String, FunctionImport) = .empty,
88/// All functions for all objects.88/// All functions for all objects.
89object_functions: std.ArrayList(ObjectFunction) = .empty,89object_functions: std.ArrayList(ObjectFunction) = .empty,
9090
91/// Provides a mapping of both imports and provided globals to symbol name.91/// Provides a mapping of both imports and provided globals to symbol name.
92/// Local globals may be unnamed.92/// Local globals may be unnamed.
93object_global_imports: std.AutoArrayHashMapUnmanaged(String, GlobalImport) = .empty,93object_global_imports: std.array_hash_map.Auto(String, GlobalImport) = .empty,
94/// All globals for all objects.94/// All globals for all objects.
95object_globals: std.ArrayList(ObjectGlobal) = .empty,95object_globals: std.ArrayList(ObjectGlobal) = .empty,
9696
97/// All table imports for all objects.97/// All table imports for all objects.
98object_table_imports: std.AutoArrayHashMapUnmanaged(String, TableImport) = .empty,98object_table_imports: std.array_hash_map.Auto(String, TableImport) = .empty,
99/// All parsed table sections for all objects.99/// All parsed table sections for all objects.
100object_tables: std.ArrayList(Table) = .empty,100object_tables: std.ArrayList(Table) = .empty,
101101
102/// All memory imports for all objects.102/// All memory imports for all objects.
103object_memory_imports: std.AutoArrayHashMapUnmanaged(String, MemoryImport) = .empty,103object_memory_imports: std.array_hash_map.Auto(String, MemoryImport) = .empty,
104/// All parsed memory sections for all objects.104/// All parsed memory sections for all objects.
105object_memories: std.ArrayList(ObjectMemory) = .empty,105object_memories: std.ArrayList(ObjectMemory) = .empty,
106106
...@@ -119,15 +119,15 @@ object_data_segments: std.ArrayList(ObjectDataSegment) = .empty,...@@ -119,15 +119,15 @@ object_data_segments: std.ArrayList(ObjectDataSegment) = .empty,
119/// Each segment has many data symbols, which correspond logically to global119/// Each segment has many data symbols, which correspond logically to global
120/// constants.120/// constants.
121object_datas: std.ArrayList(ObjectData) = .empty,121object_datas: std.ArrayList(ObjectData) = .empty,
122object_data_imports: std.AutoArrayHashMapUnmanaged(String, ObjectDataImport) = .empty,122object_data_imports: std.array_hash_map.Auto(String, ObjectDataImport) = .empty,
123/// Non-synthetic section that can essentially be mem-cpy'd into place after performing relocations.123/// Non-synthetic section that can essentially be mem-cpy'd into place after performing relocations.
124object_custom_segments: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, CustomSegment) = .empty,124object_custom_segments: std.array_hash_map.Auto(ObjectSectionIndex, CustomSegment) = .empty,
125125
126/// All comdat information for all objects.126/// All comdat information for all objects.
127object_comdats: std.ArrayList(Comdat) = .empty,127object_comdats: std.ArrayList(Comdat) = .empty,
128/// A table that maps the relocations to be performed where the key represents128/// A table that maps the relocations to be performed where the key represents
129/// the section (across all objects) that the slice of relocations applies to.129/// the section (across all objects) that the slice of relocations applies to.
130object_relocations_table: std.AutoArrayHashMapUnmanaged(ObjectSectionIndex, ObjectRelocation.Slice) = .empty,130object_relocations_table: std.array_hash_map.Auto(ObjectSectionIndex, ObjectRelocation.Slice) = .empty,
131/// Incremented across all objects in order to enable calculation of `ObjectSectionIndex` values.131/// Incremented across all objects in order to enable calculation of `ObjectSectionIndex` values.
132object_total_sections: u32 = 0,132object_total_sections: u32 = 0,
133/// All comdat symbols from all objects concatenated.133/// All comdat symbols from all objects concatenated.
...@@ -150,7 +150,7 @@ nav_fixups: std.ArrayList(NavFixup) = .empty,...@@ -150,7 +150,7 @@ nav_fixups: std.ArrayList(NavFixup) = .empty,
150func_table_fixups: std.ArrayList(FuncTableFixup) = .empty,150func_table_fixups: std.ArrayList(FuncTableFixup) = .empty,
151/// Symbols to be emitted into an object file. Remains empty when not emitting151/// Symbols to be emitted into an object file. Remains empty when not emitting
152/// an object file.152/// an object file.
153symbol_table: std.AutoArrayHashMapUnmanaged(String, void) = .empty,153symbol_table: std.array_hash_map.Auto(String, void) = .empty,
154154
155/// When importing objects from the host environment, a name must be supplied.155/// When importing objects from the host environment, a name must be supplied.
156/// LLVM uses "env" by default when none is given.156/// LLVM uses "env" by default when none is given.
...@@ -174,24 +174,24 @@ preloaded_strings: PreloadedStrings,...@@ -174,24 +174,24 @@ preloaded_strings: PreloadedStrings,
174174
175/// This field is used when emitting an object; `navs_exe` used otherwise.175/// This field is used when emitting an object; `navs_exe` used otherwise.
176/// Does not include externs since that data lives elsewhere.176/// Does not include externs since that data lives elsewhere.
177navs_obj: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, ZcuDataObj) = .empty,177navs_obj: std.array_hash_map.Auto(InternPool.Nav.Index, ZcuDataObj) = .empty,
178/// This field is unused when emitting an object; `navs_obj` used otherwise.178/// This field is unused when emitting an object; `navs_obj` used otherwise.
179/// Does not include externs since that data lives elsewhere.179/// Does not include externs since that data lives elsewhere.
180navs_exe: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, ZcuDataExe) = .empty,180navs_exe: std.array_hash_map.Auto(InternPool.Nav.Index, ZcuDataExe) = .empty,
181/// Tracks all InternPool values referenced by codegen. Needed for outputting181/// Tracks all InternPool values referenced by codegen. Needed for outputting
182/// the data segment. This one does not track ref count because object files182/// the data segment. This one does not track ref count because object files
183/// require using max LEB encoding for these references anyway.183/// require using max LEB encoding for these references anyway.
184uavs_obj: std.AutoArrayHashMapUnmanaged(InternPool.Index, ZcuDataObj) = .empty,184uavs_obj: std.array_hash_map.Auto(InternPool.Index, ZcuDataObj) = .empty,
185/// Tracks ref count to optimize LEB encodings for UAV references.185/// Tracks ref count to optimize LEB encodings for UAV references.
186uavs_exe: std.AutoArrayHashMapUnmanaged(InternPool.Index, ZcuDataExe) = .empty,186uavs_exe: std.array_hash_map.Auto(InternPool.Index, ZcuDataExe) = .empty,
187/// Sparse table of uavs that need to be emitted with greater alignment than187/// Sparse table of uavs that need to be emitted with greater alignment than
188/// the default for the type.188/// the default for the type.
189overaligned_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment) = .empty,189overaligned_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment) = .empty,
190/// When the key is an enum type, this represents a `@tagName` function.190/// When the key is an enum type, this represents a `@tagName` function.
191zcu_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, ZcuFunc) = .empty,191zcu_funcs: std.array_hash_map.Auto(InternPool.Index, ZcuFunc) = .empty,
192nav_exports: std.AutoArrayHashMapUnmanaged(NavExport, Zcu.Export.Index) = .empty,192nav_exports: std.array_hash_map.Auto(NavExport, Zcu.Export.Index) = .empty,
193uav_exports: std.AutoArrayHashMapUnmanaged(UavExport, Zcu.Export.Index) = .empty,193uav_exports: std.array_hash_map.Auto(UavExport, Zcu.Export.Index) = .empty,
194imports: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty,194imports: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty,
195195
196dwarf: ?Dwarf = null,196dwarf: ?Dwarf = null,
197197
...@@ -200,19 +200,19 @@ flush_buffer: Flush = .{},...@@ -200,19 +200,19 @@ flush_buffer: Flush = .{},
200/// Empty until `prelink`. There it is populated based on object files.200/// Empty until `prelink`. There it is populated based on object files.
201/// Next, it is copied into `Flush.missing_exports` just before `flush`201/// Next, it is copied into `Flush.missing_exports` just before `flush`
202/// and that data is used during `flush`.202/// and that data is used during `flush`.
203missing_exports: std.AutoArrayHashMapUnmanaged(String, void) = .empty,203missing_exports: std.array_hash_map.Auto(String, void) = .empty,
204entry_resolution: FunctionImport.Resolution = .unresolved,204entry_resolution: FunctionImport.Resolution = .unresolved,
205205
206/// Empty when outputting an object.206/// Empty when outputting an object.
207function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty,207function_exports: std.array_hash_map.Auto(String, FunctionIndex) = .empty,
208hidden_function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty,208hidden_function_exports: std.array_hash_map.Auto(String, FunctionIndex) = .empty,
209global_exports: std.ArrayList(GlobalExport) = .empty,209global_exports: std.ArrayList(GlobalExport) = .empty,
210/// Tracks the value at the end of prelink.210/// Tracks the value at the end of prelink.
211global_exports_len: u32 = 0,211global_exports_len: u32 = 0,
212212
213/// Ordered list of non-import functions that will appear in the final binary.213/// Ordered list of non-import functions that will appear in the final binary.
214/// Empty until prelink.214/// Empty until prelink.
215functions: std.AutoArrayHashMapUnmanaged(FunctionImport.Resolution, void) = .empty,215functions: std.array_hash_map.Auto(FunctionImport.Resolution, void) = .empty,
216/// Tracks the value at the end of prelink, at which point `functions`216/// Tracks the value at the end of prelink, at which point `functions`
217/// contains only object file functions, and nothing from the Zcu yet.217/// contains only object file functions, and nothing from the Zcu yet.
218functions_end_prelink: u32 = 0,218functions_end_prelink: u32 = 0,
...@@ -230,7 +230,7 @@ data_imports_len_prelink: u32 = 0,...@@ -230,7 +230,7 @@ data_imports_len_prelink: u32 = 0,
230/// `flush` gets a copy of this table, and then Zcu exports are applied to230/// `flush` gets a copy of this table, and then Zcu exports are applied to
231/// remove elements from the table, and the remainder are either undefined231/// remove elements from the table, and the remainder are either undefined
232/// symbol errors, or import section entries depending on the output mode.232/// symbol errors, or import section entries depending on the output mode.
233function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImportId) = .empty,233function_imports: std.array_hash_map.Auto(String, FunctionImportId) = .empty,
234234
235/// At the end of prelink, this is populated with data symbols needed by235/// At the end of prelink, this is populated with data symbols needed by
236/// objects.236/// objects.
...@@ -243,29 +243,29 @@ function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImportId) = .emp...@@ -243,29 +243,29 @@ function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImportId) = .emp
243/// `flush` gets a copy of this table, and then Zcu exports are applied to243/// `flush` gets a copy of this table, and then Zcu exports are applied to
244/// remove elements from the table, and the remainder are either undefined244/// remove elements from the table, and the remainder are either undefined
245/// symbol errors, or symbol table entries depending on the output mode.245/// symbol errors, or symbol table entries depending on the output mode.
246data_imports: std.AutoArrayHashMapUnmanaged(String, DataImportId) = .empty,246data_imports: std.array_hash_map.Auto(String, DataImportId) = .empty,
247/// Set of data symbols that will appear in the final binary. Used to populate247/// Set of data symbols that will appear in the final binary. Used to populate
248/// `Flush.data_segments` before sorting.248/// `Flush.data_segments` before sorting.
249data_segments: std.AutoArrayHashMapUnmanaged(DataSegmentId, void) = .empty,249data_segments: std.array_hash_map.Auto(DataSegmentId, void) = .empty,
250250
251/// Ordered list of non-import globals that will appear in the final binary.251/// Ordered list of non-import globals that will appear in the final binary.
252/// Empty until prelink.252/// Empty until prelink.
253globals: std.AutoArrayHashMapUnmanaged(GlobalImport.Resolution, void) = .empty,253globals: std.array_hash_map.Auto(GlobalImport.Resolution, void) = .empty,
254/// Tracks the value at the end of prelink, at which point `globals`254/// Tracks the value at the end of prelink, at which point `globals`
255/// contains only object file globals, and nothing from the Zcu yet.255/// contains only object file globals, and nothing from the Zcu yet.
256globals_end_prelink: u32 = 0,256globals_end_prelink: u32 = 0,
257global_imports: std.AutoArrayHashMapUnmanaged(String, GlobalImportId) = .empty,257global_imports: std.array_hash_map.Auto(String, GlobalImportId) = .empty,
258258
259/// Ordered list of non-import tables that will appear in the final binary.259/// Ordered list of non-import tables that will appear in the final binary.
260/// Empty until prelink.260/// Empty until prelink.
261tables: std.AutoArrayHashMapUnmanaged(TableImport.Resolution, void) = .empty,261tables: std.array_hash_map.Auto(TableImport.Resolution, void) = .empty,
262table_imports: std.AutoArrayHashMapUnmanaged(String, TableImport.Index) = .empty,262table_imports: std.array_hash_map.Auto(String, TableImport.Index) = .empty,
263263
264/// All functions that have had their address taken and therefore might be264/// All functions that have had their address taken and therefore might be
265/// called via a `call_indirect` function.265/// called via a `call_indirect` function.
266zcu_indirect_function_set: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty,266zcu_indirect_function_set: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty,
267object_indirect_function_import_set: std.AutoArrayHashMapUnmanaged(String, void) = .empty,267object_indirect_function_import_set: std.array_hash_map.Auto(String, void) = .empty,
268object_indirect_function_set: std.AutoArrayHashMapUnmanaged(ObjectFunctionIndex, void) = .empty,268object_indirect_function_set: std.array_hash_map.Auto(ObjectFunctionIndex, void) = .empty,
269269
270error_name_table_ref_count: u32 = 0,270error_name_table_ref_count: u32 = 0,
271tag_name_table_ref_count: u32 = 0,271tag_name_table_ref_count: u32 = 0,
src/link/Wasm/Flush.zig+7-7
...@@ -24,22 +24,22 @@ const ArrayList = std.ArrayList;...@@ -24,22 +24,22 @@ const ArrayList = std.ArrayList;
24/// Ordered list of data segments that will appear in the final binary.24/// Ordered list of data segments that will appear in the final binary.
25/// When sorted, to-be-merged segments will be made adjacent.25/// When sorted, to-be-merged segments will be made adjacent.
26/// Values are virtual address.26/// Values are virtual address.
27data_segments: std.AutoArrayHashMapUnmanaged(Wasm.DataSegmentId, u32) = .empty,27data_segments: std.array_hash_map.Auto(Wasm.DataSegmentId, u32) = .empty,
28/// Each time a `data_segment` offset equals zero it indicates a new group, and28/// Each time a `data_segment` offset equals zero it indicates a new group, and
29/// the next element in this array will contain the total merged segment size.29/// the next element in this array will contain the total merged segment size.
30/// Value is the virtual memory address of the end of the segment.30/// Value is the virtual memory address of the end of the segment.
31data_segment_groups: ArrayList(DataSegmentGroup) = .empty,31data_segment_groups: ArrayList(DataSegmentGroup) = .empty,
3232
33binary_bytes: ArrayList(u8) = .empty,33binary_bytes: ArrayList(u8) = .empty,
34missing_exports: std.AutoArrayHashMapUnmanaged(String, void) = .empty,34missing_exports: std.array_hash_map.Auto(String, void) = .empty,
35function_imports: std.AutoArrayHashMapUnmanaged(String, Wasm.FunctionImportId) = .empty,35function_imports: std.array_hash_map.Auto(String, Wasm.FunctionImportId) = .empty,
36global_imports: std.AutoArrayHashMapUnmanaged(String, Wasm.GlobalImportId) = .empty,36global_imports: std.array_hash_map.Auto(String, Wasm.GlobalImportId) = .empty,
37data_imports: std.AutoArrayHashMapUnmanaged(String, Wasm.DataImportId) = .empty,37data_imports: std.array_hash_map.Auto(String, Wasm.DataImportId) = .empty,
3838
39indirect_function_table: std.AutoArrayHashMapUnmanaged(Wasm.OutputFunctionIndex, void) = .empty,39indirect_function_table: std.array_hash_map.Auto(Wasm.OutputFunctionIndex, void) = .empty,
4040
41/// A subset of the full interned function type list created only during flush.41/// A subset of the full interned function type list created only during flush.
42func_types: std.AutoArrayHashMapUnmanaged(Wasm.FunctionType.Index, void) = .empty,42func_types: std.array_hash_map.Auto(Wasm.FunctionType.Index, void) = .empty,
4343
44/// For debug purposes only.44/// For debug purposes only.
45memory_layout_finished: bool = false,45memory_layout_finished: bool = false,
src/main.zig+1-1
...@@ -4419,7 +4419,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {...@@ -4419,7 +4419,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {
44194419
4420 var file_name_bytes: std.ArrayList(u8) = .empty;4420 var file_name_bytes: std.ArrayList(u8) = .empty;
4421 defer file_name_bytes.deinit(gpa);4421 defer file_name_bytes.deinit(gpa);
4422 var files: std.AutoArrayHashMapUnmanaged(Zcu.File.Index, void) = .empty;4422 var files: std.array_hash_map.Auto(Zcu.File.Index, void) = .empty;
4423 defer files.deinit(gpa);4423 defer files.deinit(gpa);
4424 var decl_data: std.ArrayList(u8) = .empty;4424 var decl_data: std.ArrayList(u8) = .empty;
4425 defer decl_data.deinit(gpa);4425 defer decl_data.deinit(gpa);
tools/dump-cov.zig+1-1
...@@ -67,7 +67,7 @@ pub fn main(init: std.process.Init) !void {...@@ -67,7 +67,7 @@ pub fn main(init: std.process.Init) !void {
67 try stdout.print("{any}\n", .{header.*});67 try stdout.print("{any}\n", .{header.*});
68 const pcs = header.pcAddrs();68 const pcs = header.pcAddrs();
6969
70 var indexed_pcs: std.AutoArrayHashMapUnmanaged(usize, void) = .empty;70 var indexed_pcs: std.array_hash_map.Auto(usize, void) = .empty;
71 try indexed_pcs.entries.resize(arena, pcs.len);71 try indexed_pcs.entries.resize(arena, pcs.len);
72 @memcpy(indexed_pcs.entries.items(.key), pcs);72 @memcpy(indexed_pcs.entries.items(.key), pcs);
73 try indexed_pcs.reIndex(arena);73 try indexed_pcs.reIndex(arena);