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,
4949/// Allocated into `gpa`.
5050memory_blocked_steps: std.ArrayList(Configuration.Step.Index),
5151/// Allocated into `gpa`.
52step_stack: std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, void),
52step_stack: std.array_hash_map.Auto(Configuration.Step.Index, void),
5353pkg_config: PkgConfig,
5454
5555error_style: ErrorStyle,
......@@ -1217,7 +1217,7 @@ fn printTreeStep(
12171217 step_index: Configuration.Step.Index,
12181218 stderr: Io.Terminal,
12191219 parent_node: *PrintNode,
1220 step_stack: *std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, void),
1220 step_stack: *std.array_hash_map.Auto(Configuration.Step.Index, void),
12211221) !void {
12221222 const writer = stderr.writer;
12231223 const first = step_stack.swapRemove(step_index);
......@@ -1502,7 +1502,7 @@ fn printChildNodePrefix(stderr: Io.Terminal) !void {
15021502fn constructGraphAndCheckForDependencyLoop(
15031503 maker: *Maker,
15041504 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),
15061506 rand: std.Random,
15071507) error{ DependencyLoopDetected, OutOfMemory }!void {
15081508 const c = &maker.scanned_config.configuration;
lib/compiler/Maker/Fuzz.zig+1-1
......@@ -27,7 +27,7 @@ prog_node: std.Progress.Node,
2727
2828/// Protects `coverage_files`.
2929coverage_mutex: Io.Mutex,
30coverage_files: std.AutoArrayHashMapUnmanaged(u64, CoverageMap),
30coverage_files: std.array_hash_map.Auto(u64, CoverageMap),
3131
3232queue_mutex: Io.Mutex,
3333queue_cond: Io.Condition,
lib/compiler/Maker/Step/Compile.zig+5-5
......@@ -119,7 +119,7 @@ fn updateGeneratedFile(
119119
120120/// List of importable modules in a compilation's module graph, including
121121/// 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);
123123/// Keyed on the first key in the module list.
124124pub const ModuleGraph = std.ArrayHashMapUnmanaged(ModuleList, void, ModuleListContext, false);
125125
......@@ -221,8 +221,8 @@ fn lowerZigArgs(
221221 // module, along with any C compiler arguments that need to be passed
222222 // to the compiler for each module individually as reported by
223223 // pkg-config.
224 var seen_system_libs: std.AutoArrayHashMapUnmanaged(Configuration.String, []const []const u8) = .empty;
225 var frameworks: std.AutoArrayHashMapUnmanaged(Configuration.String, Configuration.Module.Framework.Flags) = .empty;
224 var seen_system_libs: std.array_hash_map.Auto(Configuration.String, []const []const u8) = .empty;
225 var frameworks: std.array_hash_map.Auto(Configuration.String, Configuration.Module.Framework.Flags) = .empty;
226226 var module_graph: ModuleGraph = .empty;
227227
228228 var prev_has_cflags = false;
......@@ -1126,7 +1126,7 @@ fn moduleNeedsCliArg(mod: *const Configuration.Module, conf: *const Configuratio
11261126}
11271127
11281128const CliNamedModules = struct {
1129 modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void),
1129 modules: std.array_hash_map.Auto(Configuration.Module.Index, void),
11301130 names: std.array_hash_map.String(void),
11311131
11321132 /// Traverse the whole dependency graph and give every module a unique
......@@ -1177,7 +1177,7 @@ pub fn getCompileDependencies(
11771177 start: Configuration.Step.Index,
11781178 chase_dynamic: bool,
11791179) ![]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;
11811181 var compiles_i: usize = 0;
11821182
11831183 try compiles.putNoClobber(arena, start, {});
lib/compiler/Maker/Step/TranslateC.zig+1-1
......@@ -66,7 +66,7 @@ pub fn make(
6666
6767 var prev_search_strategy: std.Build.Module.SystemLib.SearchStrategy = .paths_first;
6868 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
7171 for (conf_tc.system_libs.slice) |system_lib_index| {
7272 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
3131
3232/// Special key of "." means any changes in this directory trigger the steps.
3333const 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
3636const Generation = u8;
3737
......@@ -46,7 +46,7 @@ const Os = switch (builtin.os.tag) {
4646 handle_table: HandleTable,
4747 /// fanotify file descriptors are keyed by mount id since marks
4848 /// 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
5151 const MountId = i32;
5252 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;
88
99const Interner = @This();
1010
11map: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
11map: std.array_hash_map.Auto(void, void) = .empty,
1212items: std.MultiArrayList(struct {
1313 tag: Tag,
1414 data: u32,
lib/compiler/aro/backend/Ir.zig+1-1
......@@ -380,7 +380,7 @@ const REF = std.Io.Terminal.Color.bright_blue;
380380const LITERAL = std.Io.Terminal.Color.bright_green;
381381const ATTRIBUTE = std.Io.Terminal.Color.bright_yellow;
382382
383const RefMap = std.AutoArrayHashMapUnmanaged(Ref, void);
383const RefMap = std.array_hash_map.Auto(Ref, void);
384384
385385pub 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 {
160160const Serialize = struct {
161161 arena: Allocator,
162162 wc: *Configuration.Wip,
163 module_map: std.AutoArrayHashMapUnmanaged(*std.Build.Module, Configuration.Module.Index) = .empty,
164 package_map: std.AutoArrayHashMapUnmanaged(*std.Build, Configuration.Package.Index) = .empty,
163 module_map: std.array_hash_map.Auto(*std.Build.Module, Configuration.Module.Index) = .empty,
164 package_map: std.array_hash_map.Auto(*std.Build, Configuration.Package.Index) = .empty,
165165 /// 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
168168 fn builderToPackage(s: *Serialize, b: *std.Build) !Configuration.Package.Index {
169169 if (b.pkg_hash.len == 0) return .root;
lib/compiler/resinator/compile.zig+2-2
......@@ -3049,7 +3049,7 @@ pub const StringTablesByLanguage = struct {
30493049 /// when the first STRINGTABLE for the language was defined, and all blocks for a given
30503050 /// language are written contiguously.
30513051 /// 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
30543054 pub fn deinit(self: *StringTablesByLanguage, allocator: Allocator) void {
30553055 self.tables.deinit(allocator);
......@@ -3080,7 +3080,7 @@ pub const StringTable = struct {
30803080 /// was added to the block (i.e. `STRINGTABLE { 16 "b" 0 "a" }` would then get written
30813081 /// with block ID 2 (the one with "b") first and block ID 1 (the one with "a") second).
30823082 /// 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
30853085 pub const Block = struct {
30863086 strings: std.ArrayList(Token) = .empty,
lib/compiler/resinator/cvtres.zig+1-1
......@@ -451,7 +451,7 @@ const ResourceTree = struct {
451451 resource: *const Resource,
452452 original_index: usize,
453453 };
454 const LanguageToResourceMap = std.AutoArrayHashMapUnmanaged(Language, RelocatableResource);
454 const LanguageToResourceMap = std.array_hash_map.Auto(Language, RelocatableResource);
455455 const NameToLanguageMap = std.ArrayHashMapUnmanaged(NameOrOrdinal, LanguageToResourceMap, NameOrOrdinalHashContext, true);
456456
457457 const NameOrOrdinalHashContext = struct {
lib/compiler/translate-c/Translator.zig+1-1
......@@ -106,7 +106,7 @@ global_scope: *Scope.Root,
106106mangle_count: u32 = 0,
107107
108108/// 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,
110110/// Table of record decls that have been demoted to opaques.
111111opaque_demotes: std.HashMapUnmanaged(QualType, void, QualTypeHashContext, std.hash_map.default_max_load_percentage) = .empty,
112112/// 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)) {
4242pub const File = struct {
4343 ast: Ast,
4444 /// 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,
4646 /// 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,
4848 /// 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,
5050 /// 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,
5252 /// root node => its namespace scope
5353 /// struct/union/enum/opaque decl node => its namespace scope
5454 /// 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
5757 pub fn lookup_token(file: *File, token: Ast.TokenIndex) Decl.Index {
5858 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 {
563563
564564 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;
567567 var next_idx: usize = 0;
568568
569569 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 {
759759pub fn getCompileDependencies(start: *Compile, chase_dynamic: bool) []const *Compile {
760760 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;
763763 var next_idx: usize = 0;
764764
765765 compiles.putNoClobber(arena, start, {}) catch @panic("OOM");
lib/std/Io/Kqueue.zig+1-1
......@@ -40,7 +40,7 @@ const Thread = struct {
4040 steal_ready_search_index: u32,
4141 /// For ensuring multiple fibers waiting on the same file descriptor and
4242 /// filter use the same kevent.
43 wait_queues: std.AutoArrayHashMapUnmanaged(WaitQueueKey, *Fiber),
43 wait_queues: std.array_hash_map.Auto(WaitQueueKey, *Fiber),
4444
4545 const WaitQueueKey = struct {
4646 ident: usize,
lib/std/debug/Dwarf.zig+1-1
......@@ -134,7 +134,7 @@ pub const CompileUnit = struct {
134134 files: []FileEntry,
135135 version: u16,
136136
137 pub const LineTable = std.AutoArrayHashMapUnmanaged(u64, LineEntry);
137 pub const LineTable = std.array_hash_map.Auto(u64, LineEntry);
138138
139139 pub const LineEntry = struct {
140140 line: u32,
lib/std/debug/MachOFile.zig+1-1
......@@ -4,7 +4,7 @@ strings: []const u8,
44text_vmaddr: u64,
55
66/// 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
99pub const Error = error{
1010 InvalidMachO,
lib/std/zig/AstGen.zig+5-5
......@@ -52,7 +52,7 @@ within_fn: bool = false,
5252fn_ret_ty: Zir.Inst.Ref = .none,
5353/// Maps string table indexes to the first `@import` ZIR instruction
5454/// 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,
5656/// Used for temporary storage when building payloads.
5757scratch: std.ArrayList(u32) = .empty,
5858/// Whenever a `ref` instruction is needed, it is created and saved in this
......@@ -11163,7 +11163,7 @@ const Scope = struct {
1116311163 declaring_gz: ?*GenZir,
1116411164
1116511165 /// 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
1116811168 fn deinit(self: *Namespace, gpa: Allocator) void {
1116911169 self.decls.deinit(gpa);
......@@ -12856,9 +12856,9 @@ fn scanContainer(
1285612856 var bfa_state: std.heap.BufferFirstAllocator = .init(&bfa_buf, astgen.gpa);
1285712857 const bfa = bfa_state.allocator();
1285812858
12859 var names: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, NameEntry) = .empty;
12860 var test_names: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, NameEntry) = .empty;
12861 var decltest_names: std.AutoArrayHashMapUnmanaged(Zir.NullTerminatedString, NameEntry) = .empty;
12859 var names: std.array_hash_map.Auto(Zir.NullTerminatedString, NameEntry) = .empty;
12860 var test_names: std.array_hash_map.Auto(Zir.NullTerminatedString, NameEntry) = .empty;
12861 var decltest_names: std.array_hash_map.Auto(Zir.NullTerminatedString, NameEntry) = .empty;
1286212862 defer {
1286312863 names.deinit(bfa);
1286412864 test_names.deinit(bfa);
lib/std/zig/llvm/Builder.zig+21-21
......@@ -21,25 +21,25 @@ data_layout: String,
2121target_triple: String,
2222module_asm: std.ArrayList(u8),
2323
24string_map: std.AutoArrayHashMapUnmanaged(void, void),
24string_map: std.array_hash_map.Auto(void, void),
2525string_indices: std.ArrayList(u32),
2626string_bytes: std.ArrayList(u8),
2727
28types: std.AutoArrayHashMapUnmanaged(String, Type),
28types: std.array_hash_map.Auto(String, Type),
2929next_unnamed_type: String,
3030next_unique_type_id: std.AutoHashMapUnmanaged(String, u32),
31type_map: std.AutoArrayHashMapUnmanaged(void, void),
31type_map: std.array_hash_map.Auto(void, void),
3232type_items: std.ArrayList(Type.Item),
3333type_extra: std.ArrayList(u32),
3434
35attributes: std.AutoArrayHashMapUnmanaged(Attribute.Storage, void),
36attributes_map: std.AutoArrayHashMapUnmanaged(void, void),
35attributes: std.array_hash_map.Auto(Attribute.Storage, void),
36attributes_map: std.array_hash_map.Auto(void, void),
3737attributes_indices: std.ArrayList(u32),
3838attributes_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),
4343next_unnamed_global: StrtabString,
4444next_replaced_global: StrtabString,
4545next_unique_global_id: std.AutoHashMapUnmanaged(StrtabString, u32),
......@@ -47,28 +47,28 @@ aliases: std.ArrayList(Alias),
4747variables: std.ArrayList(Variable),
4848functions: std.ArrayList(Function),
4949
50strtab_string_map: std.AutoArrayHashMapUnmanaged(void, void),
50strtab_string_map: std.array_hash_map.Auto(void, void),
5151strtab_string_indices: std.ArrayList(u32),
5252strtab_string_bytes: std.ArrayList(u8),
5353
54constant_map: std.AutoArrayHashMapUnmanaged(void, void),
54constant_map: std.array_hash_map.Auto(void, void),
5555constant_items: std.MultiArrayList(Constant.Item),
5656constant_extra: std.ArrayList(u32),
5757constant_limbs: std.ArrayList(std.math.big.Limb),
5858
5959alignment_forward_references: std.ArrayList(Alignment),
6060
61metadata_map: std.AutoArrayHashMapUnmanaged(void, void),
61metadata_map: std.array_hash_map.Auto(void, void),
6262metadata_items: std.MultiArrayList(Metadata.Item),
6363metadata_extra: std.ArrayList(u32),
6464metadata_limbs: std.ArrayList(std.math.big.Limb),
6565metadata_forward_references: std.ArrayList(Metadata.Optional),
66metadata_named: std.AutoArrayHashMapUnmanaged(String, struct {
66metadata_named: std.array_hash_map.Auto(String, struct {
6767 len: u32,
6868 index: Metadata.Item.ExtraIndex,
6969}),
7070
71metadata_string_map: std.AutoArrayHashMapUnmanaged(void, void),
71metadata_string_map: std.array_hash_map.Auto(void, void),
7272metadata_string_indices: std.ArrayList(u32),
7373metadata_string_bytes: std.ArrayList(u8),
7474
......@@ -1633,7 +1633,7 @@ pub const FunctionAttributes = enum(u32) {
16331633 pub const Wip = struct {
16341634 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);
16371637 const Maps = std.ArrayList(Map);
16381638
16391639 pub fn deinit(self: *Wip, builder: *const Builder) void {
......@@ -5235,8 +5235,8 @@ pub const WipFunction = struct {
52355235 instructions: std.MultiArrayList(Instruction),
52365236 names: std.ArrayList(String),
52375237 strip: bool,
5238 debug_locations: std.AutoArrayHashMapUnmanaged(Instruction.Index, DebugLocation),
5239 debug_values: std.AutoArrayHashMapUnmanaged(Instruction.Index, void),
5238 debug_locations: std.array_hash_map.Auto(Instruction.Index, DebugLocation),
5239 debug_values: std.array_hash_map.Auto(Instruction.Index, void),
52405240 extra: std.ArrayList(u32),
52415241
52425242 pub const Cursor = struct { block: Block.Index, instruction: u32 = 0 };
......@@ -8451,7 +8451,7 @@ pub const Metadata = packed struct(u32) {
84518451 const Formatter = struct {
84528452 builder: *Builder,
84538453 need_comma: bool,
8454 map: std.AutoArrayHashMapUnmanaged(union(enum) {
8454 map: std.array_hash_map.Auto(union(enum) {
84558455 metadata: Metadata,
84568456 debug_location: DebugLocation.Location,
84578457 }, void) = .empty,
......@@ -9791,7 +9791,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
97919791 }
97929792 }
97939793
9794 var attribute_groups: std.AutoArrayHashMapUnmanaged(Attributes, void) = .empty;
9794 var attribute_groups: std.array_hash_map.Auto(Attributes, void) = .empty;
97959795 defer attribute_groups.deinit(self.gpa);
97969796
97979797 for (0.., self.functions.items) |function_i, function| {
......@@ -13507,7 +13507,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1350713507 try type_block.end();
1350813508 }
1350913509
13510 var attributes_set: std.AutoArrayHashMapUnmanaged(struct {
13510 var attributes_set: std.array_hash_map.Auto(struct {
1351113511 attributes: Attributes,
1351213512 index: u32,
1351313513 }, void) = .{};
......@@ -13743,7 +13743,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1374313743 try paramattr_block.end();
1374413744 }
1374513745
13746 var globals: std.AutoArrayHashMapUnmanaged(Global.Index, void) = .empty;
13746 var globals: std.array_hash_map.Auto(Global.Index, void) = .empty;
1374713747 defer globals.deinit(self.gpa);
1374813748 try globals.ensureUnusedCapacity(
1374913749 self.gpa,
......@@ -13784,7 +13784,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1378413784
1378513785 const ConstantAdapter = struct {
1378613786 builder: *const Builder,
13787 globals: *const std.AutoArrayHashMapUnmanaged(Global.Index, void),
13787 globals: *const std.array_hash_map.Auto(Global.Index, void),
1378813788
1378913789 pub fn get(adapter: @This(), param: anytype) switch (@TypeOf(param)) {
1379013790 Constant => u32,
......@@ -13815,7 +13815,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1381513815
1381613816 // Globals
1381713817 {
13818 var section_map: std.AutoArrayHashMapUnmanaged(String, void) = .empty;
13818 var section_map: std.array_hash_map.Auto(String, void) = .empty;
1381913819 defer section_map.deinit(self.gpa);
1382013820 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,
103103/// Corresponds to `-u <symbol>` for ELF/MachO and `/include:<symbol>` for COFF/PE.
104104force_undefined_symbols: std.array_hash_map.String(void),
105105
106c_object_table: std.AutoArrayHashMapUnmanaged(*CObject, void) = .empty,
107win32_resource_table: if (dev.env.supports(.win32_resource)) std.AutoArrayHashMapUnmanaged(*Win32Resource, void) else struct {
106c_object_table: std.array_hash_map.Auto(*CObject, void) = .empty,
107win32_resource_table: if (dev.env.supports(.win32_resource)) std.array_hash_map.Auto(*Win32Resource, void) else struct {
108108 pub fn keys(_: @This()) [0]void {
109109 return .{};
110110 }
......@@ -145,11 +145,11 @@ win32_resource_work_queue: if (dev.env.supports(.win32_resource)) std.Deque(*Win
145145
146146/// The ErrorMsg memory is owned by the `CObject`, using Compilation's general purpose allocator.
147147/// 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
150150/// The ErrorBundle memory is owned by the `Win32Resource`, using Compilation's general purpose allocator.
151151/// 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 {
153153 pub fn values(_: @This()) [0]void {
154154 return .{};
155155 }
......@@ -157,7 +157,7 @@ failed_win32_resources: if (dev.env.supports(.win32_resource)) std.AutoArrayHash
157157} = .{},
158158
159159/// Miscellaneous things that can fail.
160misc_failures: std.AutoArrayHashMapUnmanaged(MiscTask, MiscError) = .empty,
160misc_failures: std.array_hash_map.Auto(MiscTask, MiscError) = .empty,
161161
162162/// When this is `true` it means invoking clang as a sub-process is expected to inherit
163163/// stdin, stdout, stderr, and if it returns non success, to forward the exit code.
......@@ -865,7 +865,7 @@ pub const TimeReport = struct {
865865 /// a function) all generic instances of this function. It also includes time spent analyzing
866866 /// function bodies if this is a function (generic or otherwise).
867867 /// 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 {
869869 ns: u64,
870870 count: u32,
871871 }),
......@@ -875,14 +875,14 @@ pub const TimeReport = struct {
875875 /// instances, both of this function itself and of its parent namespace.
876876 /// An entry not existing means the declaration has not been codegenned (so far).
877877 /// 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
880880 /// Key is a ZIR `declaration` instruction which is anything other than a `comptime` decl; value
881881 /// is the number of nanoseconds spent linking it into the binary. As above, this is the total
882882 /// across all generic instances.
883883 /// An entry not existing means the declaration has not been linked (so far).
884884 /// 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
887887 pub fn deinit(tr: *TimeReport, gpa: Allocator) void {
888888 tr.stats = undefined;
......@@ -1068,8 +1068,8 @@ pub const CObject = struct {
10681068 }
10691069
10701070 pub const Bundle = struct {
1071 file_names: std.AutoArrayHashMapUnmanaged(u32, []const u8) = .empty,
1072 category_names: std.AutoArrayHashMapUnmanaged(u32, []const u8) = .empty,
1071 file_names: std.array_hash_map.Auto(u32, []const u8) = .empty,
1072 category_names: std.array_hash_map.Auto(u32, []const u8) = .empty,
10731073 diags: []Diag = &.{},
10741074
10751075 pub fn destroy(bundle: *Bundle, gpa: Allocator) void {
......@@ -1122,13 +1122,13 @@ pub const CObject = struct {
11221122 var bc = std.zig.llvm.BitcodeReader.init(gpa, .{ .reader = &file_reader.interface });
11231123 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;
11261126 errdefer {
11271127 for (file_names.values()) |file_name| gpa.free(file_name);
11281128 file_names.deinit(gpa);
11291129 }
11301130
1131 var category_names: std.AutoArrayHashMapUnmanaged(u32, []const u8) = .empty;
1131 var category_names: std.array_hash_map.Auto(u32, []const u8) = .empty;
11321132 errdefer {
11331133 for (category_names.values()) |category_name| gpa.free(category_name);
11341134 category_names.deinit(gpa);
......@@ -4064,7 +4064,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) error{OutOfMemory}!ErrorBundle {
40644064 }
40654065 }
40664066 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: {
40684068 const SortOrder = struct {
40694069 zcu: *Zcu,
40704070 errors: []const *Zcu.ErrorMsg,
......@@ -4831,7 +4831,7 @@ fn docsCopyFallible(comp: *Compilation) anyerror!void {
48314831 var buffer: [1024]u8 = undefined;
48324832 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;
48354835 defer seen_table.deinit(comp.gpa);
48364836
48374837 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),
4141/// * For a `func`, this is the source of the full function signature.
4242/// These are also invalidated if tracking fails for this instruction.
4343/// 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),
4545/// Dependencies on the value of a Nav.
4646/// 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),
4848/// Dependencies on the type of a Nav.
4949/// 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),
5151/// Dependencies on a function's inferred error set. Key is the function body, not the IES.
5252/// 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),
5454/// Dependencies on the resolved layout of a `struct`, `union`, or `enum` type.
5555/// 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),
5757/// Dependencies on the resolved default field values of a `struct` type.
5858/// 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),
6060/// Dependencies on a Zig or ZON source file. Triggered by `@import`.
6161/// * For ZON source files, the dependency is invalidated if the file changes at all. The `@import`
6262/// must be re-analyzed to return the new data structure.
......@@ -64,18 +64,18 @@ struct_defaults_deps: std.AutoArrayHashMapUnmanaged(Index, DepEntry.Index),
6464/// (which can only happen because the `.main_struct_inst` got lost). The `@import` must be
6565/// re-analyzed to return the new type.
6666/// 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),
6868/// Dependencies on an embedded file.
6969/// Introduced by `@embedFile`; invalidated when the file changes.
7070/// 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),
7272/// Dependencies on the full set of names in a ZIR namespace.
7373/// Key refers to a `struct_decl`, `union_decl`, etc.
7474/// 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),
7676/// Dependencies on the (non-)existence of some name in a namespace.
7777/// 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),
7979// Dependencies on the value of fields memoized on `Zcu` (`panic_messages` etc).
8080// If set, these are indices into `dep_entries` of the first dependency on this state.
8181memoized_state_main_deps: DepEntry.Index.Optional,
......@@ -86,7 +86,7 @@ memoized_state_assembly_deps: DepEntry.Index.Optional,
8686/// Given a `Depender`, points to an entry in `dep_entries` whose `depender`
8787/// matches. The `next_dependee` field can be used to iterate all such entries
8888/// 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
9191/// Stores dependency information. The hashmaps declared above are used to look
9292/// 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,
1103911039 defer arena_allocator.deinit();
1104011040 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;
1104311043 for (ip.locals, 0..) |*local, tid| {
1104411044 const items = local.shared.items.view().slice();
1104511045 const extra_list = local.shared.extra;
src/Package/Fetch.zig+2-2
......@@ -162,8 +162,8 @@ pub const JobQueue = struct {
162162 /// Both non-lazy and lazy dependencies are always fetched.
163163 all,
164164 };
165 pub const Table = std.AutoArrayHashMapUnmanaged(Package.Hash, *Fetch);
166 pub const UnlazySet = std.AutoArrayHashMapUnmanaged(Package.Hash, void);
165 pub const Table = std.array_hash_map.Auto(Package.Hash, *Fetch);
166 pub const UnlazySet = std.array_hash_map.Auto(Package.Hash, void);
167167 pub const ForkSet = std.ArrayHashMapUnmanaged(Fork, void, Fork.Context, false);
168168
169169 pub const Fork = struct {
src/Package/Module.zig+1-1
......@@ -39,7 +39,7 @@ pub const Deps = std.array_hash_map.String(*Module);
3939
4040pub const Tree = struct {
4141 /// 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),
4343};
4444
4545pub const CreateOptions = struct {
src/Sema.zig+6-6
......@@ -88,7 +88,7 @@ err: ?*Zcu.ErrorMsg = null,
8888
8989/// The temporary arena is used for the memory of the `InferredAlloc` values
9090/// 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
9393/// Links every pointer derived from a base `alloc` back to that `alloc`. Used
9494/// to detect comptime-known `const`s.
......@@ -119,13 +119,13 @@ exports: std.ArrayList(Zcu.Export) = .empty,
119119/// All references registered so far by this `Sema`. This is a temporary duplicate
120120/// of data stored in `Zcu.all_references`. It exists to avoid adding references to
121121/// a given `AnalUnit` multiple times.
122references: std.AutoArrayHashMapUnmanaged(AnalUnit, void) = .empty,
123type_references: std.AutoArrayHashMapUnmanaged(InternPool.Index, void) = .empty,
122references: std.array_hash_map.Auto(AnalUnit, void) = .empty,
123type_references: std.array_hash_map.Auto(InternPool.Index, void) = .empty,
124124
125125/// All dependencies registered so far by this `Sema`. This is a temporary duplicate
126126/// of the main dependency data. It exists to avoid adding dependencies to a given
127127/// `AnalUnit` multiple times.
128dependencies: std.AutoArrayHashMapUnmanaged(InternPool.Dependee, void) = .empty,
128dependencies: std.array_hash_map.Auto(InternPool.Dependee, void) = .empty,
129129
130130/// Whether memoization of this call is permitted. Operations with side effects global
131131/// to the `Sema`, such as `@setEvalBranchQuota`, set this to `false`. It is observed
......@@ -212,11 +212,11 @@ pub const InferredErrorSet = struct {
212212 /// are returned from any dependent functions.
213213 errors: NameMap = .{},
214214 /// 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,
216216 /// The regular error set created by resolving this inferred error set.
217217 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
221221 pub fn addErrorSet(
222222 self: *InferredErrorSet,
src/Type.zig+3-3
......@@ -3340,7 +3340,7 @@ pub fn assertHasLayout(ty: Type, zcu: *const Zcu) void {
33403340}
33413341
33423342/// 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 {
33443344 const zcu = pt.zcu;
33453345 const ip = &zcu.intern_pool;
33463346
......@@ -3455,8 +3455,8 @@ fn shouldDedupeType(ty: Type, ctx: *Comparison, pt: Zcu.PerThread) error{OutOfMe
34553455/// the subtype length and number of occurences. Placeholders are then found by
34563456/// iterating `type_dedupe_cache` which caches the inline/placeholder decisions.
34573457pub const Comparison = struct {
3458 type_occurrences: std.AutoArrayHashMapUnmanaged(Type, u16),
3459 type_dedupe_cache: std.AutoArrayHashMapUnmanaged(Type, DedupeEntry),
3458 type_occurrences: std.array_hash_map.Auto(Type, u16),
3459 type_dedupe_cache: std.array_hash_map.Auto(Type, DedupeEntry),
34603460 placeholder_index: u8,
34613461
34623462 pub const Placeholder = struct {
src/Zcu.zig+33-33
......@@ -97,20 +97,20 @@ free_exports: std.ArrayList(Export.Index) = .empty,
9797/// Maps from an `AnalUnit` which performs a single export, to the index into `all_exports` of
9898/// the export it performs. Note that the key is not the `Decl` being exported, but the `AnalUnit`
9999/// whose analysis triggered the export.
100single_exports: std.AutoArrayHashMapUnmanaged(AnalUnit, Export.Index) = .empty,
100single_exports: std.array_hash_map.Auto(AnalUnit, Export.Index) = .empty,
101101/// Like `single_exports`, but for `AnalUnit`s which perform multiple exports.
102102/// 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 {
104104 index: u32,
105105 len: u32,
106106}) = .{},
107107
108108/// 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
111111/// Populated as soon as the `Compilation` is created. Guaranteed to contain all modules, even builtin ones.
112112/// 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
115115/// The set of all the Zig source files in the Zig Compilation Unit. Tracked in
116116/// order to iterate over it and check which source files have been modified on
......@@ -141,7 +141,7 @@ import_table: std.ArrayHashMapUnmanaged(
141141/// update removes an import, or if a module specified on the CLI is never imported.
142142/// Reconstructed on every update, after AstGen and before Sema.
143143/// 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
146146/// If this is populated, a "file exists in multiple modules" error should be emitted.
147147/// This causes file errors to not be shown, because we don't really know which files
......@@ -179,27 +179,27 @@ intern_pool: InternPool = .empty,
179179
180180/// Value explains why this `AnalUnit` is being analyzed. It is `null` for the topmost analysis
181181/// (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,
183183/// 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,
185185/// 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,
187187/// This `Nav` succeeded analysis, but failed codegen.
188188/// This may be a simple "value" `Nav`, or it may be a function.
189189/// The ErrorMsg memory is owned by the `AnalUnit`, using Module's general purpose allocator.
190190/// While multiple threads are active (most of the time!), this is guarded by `zcu.comp.mutex`, as
191191/// codegen and linking run on a separate thread.
192failed_codegen: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, *ErrorMsg) = .empty,
193failed_types: std.AutoArrayHashMapUnmanaged(InternPool.Index, *ErrorMsg) = .empty,
192failed_codegen: std.array_hash_map.Auto(InternPool.Nav.Index, *ErrorMsg) = .empty,
193failed_types: std.array_hash_map.Auto(InternPool.Index, *ErrorMsg) = .empty,
194194
195195/// Key is an `AnalUnit` which is in `dependency_loop_nodes`. For each dependency loop, exactly one
196196/// unit in the loop is in this map, though the choice is arbitrary and not necessarily reproducible
197197/// between compilations. So, instead of (for instance) defining where the dependency loop "starts",
198198/// 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,
200200/// Key is an `AnalUnit`, value is the `AnalUnit` which the key references and why it does so.
201201/// 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 {
203203 unit: AnalUnit,
204204 reason: DependencyReason,
205205}) = .empty,
......@@ -207,7 +207,7 @@ dependency_loop_nodes: std.AutoArrayHashMapUnmanaged(AnalUnit, struct {
207207/// Keep track of `@compileLog`s per `AnalUnit`.
208208/// We track the source location of the first `@compileLog` call, and all logged lines as a linked list.
209209/// 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 {
211211 base_node_inst: InternPool.TrackedInst.Index,
212212 node_offset: Ast.Node.Offset,
213213 first_line: CompileLogLine.Index,
......@@ -228,7 +228,7 @@ free_compile_log_lines: std.ArrayList(CompileLogLine.Index) = .empty,
228228/// We just store a `[]u8` instead of a full `*ErrorMsg`, because the source
229229/// location is always the entire file. The `[]u8` memory is owned by the map
230230/// and allocated into `gpa`.
231failed_files: std.AutoArrayHashMapUnmanaged(File.Index, ?[]u8) = .empty,
231failed_files: std.array_hash_map.Auto(File.Index, ?[]u8) = .empty,
232232/// AstGen is not aware of modules, and so cannot determine whether an import
233233/// string makes sense. That is the job of a traversal after AstGen.
234234///
......@@ -256,10 +256,10 @@ failed_imports: std.ArrayList(struct {
256256 import_token: Ast.TokenIndex,
257257 kind: enum { file_outside_module_root, illegal_zig_import },
258258}) = .empty,
259failed_exports: std.AutoArrayHashMapUnmanaged(Export.Index, *ErrorMsg) = .empty,
259failed_exports: std.array_hash_map.Auto(Export.Index, *ErrorMsg) = .empty,
260260/// If analysis failed due to a cimport error, the corresponding Clang errors
261261/// 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
264264/// Maximum amount of distinct error values, set by --error-limit
265265error_limit: ErrorInt,
......@@ -271,19 +271,19 @@ outdated_lock: if (std.debug.runtime_safety) std.Io.RwLock else void = if (std.d
271271/// Value is the number of PO dependencies of this AnalUnit.
272272/// This value will decrease as we perform semantic analysis to learn what is outdated.
273273/// 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,
275275/// Value is the number of PO dependencies of this AnalUnit.
276276/// 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,
278278/// This is the set of all `AnalUnit`s in `outdated` whose PO dependency count is 0.
279279/// Such `AnalUnit`s are ready for immediate re-analysis.
280280/// See `findOutdatedToAnalyze` for details.
281281outdated_ready: struct {
282282 /// These are separate from other units because it allows `findOutdatedToAnalyze` to prioritize
283283 /// 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),
285285 /// Does not contain `.func` units.
286 other: std.AutoArrayHashMapUnmanaged(AnalUnit, void),
286 other: std.array_hash_map.Auto(AnalUnit, void),
287287} = .{ .funcs = .empty, .other = .empty },
288288/// This contains a list of AnalUnit whose analysis or codegen failed, but the
289289/// failure was something like running out of disk space, and trying again may
......@@ -298,23 +298,23 @@ analysis_roots_len: usize = 0,
298298/// This is the cached result of `Zcu.resolveReferences`. It is computed on-demand, and
299299/// reset to `null` when any semantic analysis occurs (since this invalidates the data).
300300/// Allocated into `gpa`.
301resolved_references: ?std.AutoArrayHashMapUnmanaged(AnalUnit, ?ResolvedReference) = null,
301resolved_references: ?std.array_hash_map.Auto(AnalUnit, ?ResolvedReference) = null,
302302
303303/// If `true`, then semantic analysis must not occur on this update due to AstGen errors.
304304/// Essentially the entire pipeline after AstGen, including Sema, codegen, and link, is skipped.
305305/// Reset to `false` at the start of each update in `Compilation.update`.
306306skip_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
312312/// Key is the `AnalUnit` *performing* the reference. This representation allows
313313/// incremental updates to quickly delete references caused by a specific `AnalUnit`.
314314/// Value is index into `all_references` of the first reference triggered by the unit.
315315/// The `next` field on the `Reference` forms a linked list of all references
316316/// triggered by the key `AnalUnit`.
317reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,
317reference_table: std.array_hash_map.Auto(AnalUnit, u32) = .empty,
318318all_references: std.ArrayList(Reference) = .empty,
319319/// Freelist of indices in `all_references`.
320320free_references: std.ArrayList(u32) = .empty,
......@@ -327,7 +327,7 @@ free_inline_reference_frames: std.ArrayList(InlineReferenceFrame.Index) = .empty
327327/// Value is index into `all_type_reference` of the first reference triggered by the unit.
328328/// The `next` field on the `TypeReference` forms a linked list of all type references
329329/// triggered by the key `AnalUnit`.
330type_reference_table: std.AutoArrayHashMapUnmanaged(AnalUnit, u32) = .empty,
330type_reference_table: std.array_hash_map.Auto(AnalUnit, u32) = .empty,
331331all_type_references: std.ArrayList(TypeReference) = .empty,
332332/// Freelist of indices in `all_type_references`.
333333free_type_references: std.ArrayList(u32) = .empty,
......@@ -355,12 +355,12 @@ pub const DependencyReason = struct {
355355pub const IncrementalDebugState = struct {
356356 /// All container types in the ZCU, even dead ones.
357357 /// 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),
359359 /// All `Nav`s in the ZCU, even dead ones.
360360 /// 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),
362362 /// 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
365365 pub const init: IncrementalDebugState = .{
366366 .types = .empty,
......@@ -681,7 +681,7 @@ pub const SimplePanicId = enum {
681681 }
682682};
683683
684pub const GlobalErrorSet = std.AutoArrayHashMapUnmanaged(InternPool.NullTerminatedString, void);
684pub const GlobalErrorSet = std.array_hash_map.Auto(InternPool.NullTerminatedString, void);
685685
686686pub const CImportError = struct {
687687 offset: u32,
......@@ -4188,13 +4188,13 @@ pub const ResolvedReference = struct {
41884188/// If an `AnalUnit` is not in the returned map, it is unreferenced.
41894189/// The returned hashmap is owned by the `Zcu`, so should not be freed by the caller.
41904190/// 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) {
41924192 if (zcu.resolved_references == null) {
41934193 zcu.resolved_references = try zcu.resolveReferencesInner();
41944194 }
41954195 return &zcu.resolved_references.?;
41964196}
4197fn resolveReferencesInner(zcu: *Zcu) Allocator.Error!std.AutoArrayHashMapUnmanaged(AnalUnit, ?ResolvedReference) {
4197fn resolveReferencesInner(zcu: *Zcu) Allocator.Error!std.array_hash_map.Auto(AnalUnit, ?ResolvedReference) {
41984198 const trace = tracy.trace(@src());
41994199 defer trace.end();
42004200
......@@ -4202,8 +4202,8 @@ fn resolveReferencesInner(zcu: *Zcu) Allocator.Error!std.AutoArrayHashMapUnmanag
42024202 const comp = zcu.comp;
42034203 const ip = &zcu.intern_pool;
42044204
4205 var units: std.AutoArrayHashMapUnmanaged(AnalUnit, ?ResolvedReference) = .empty;
4206 var types: std.AutoArrayHashMapUnmanaged(InternPool.Index, ?ResolvedReference) = .empty;
4205 var units: std.array_hash_map.Auto(AnalUnit, ?ResolvedReference) = .empty;
4206 var types: std.array_hash_map.Auto(InternPool.Index, ?ResolvedReference) = .empty;
42074207 defer {
42084208 units.deinit(gpa);
42094209 types.deinit(gpa);
src/Zcu/PerThread.zig+6-6
......@@ -787,7 +787,7 @@ const UpdatedFile = struct {
787787 inst_map: std.AutoHashMapUnmanaged(Zir.Inst.Index, Zir.Inst.Index),
788788};
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 {
791791 for (updated_files.values()) |*elem| elem.inst_map.deinit(gpa);
792792 updated_files.deinit(gpa);
793793}
......@@ -805,7 +805,7 @@ fn updateZirRefs(pt: Zcu.PerThread) (Io.Cancelable || Allocator.Error)!void {
805805
806806 // We need to visit every updated File for every TrackedInst in InternPool.
807807 // 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;
809809 defer cleanupUpdatedFiles(gpa, &updated_files);
810810
811811 for (zcu.import_table.keys()) |file_index| {
......@@ -907,7 +907,7 @@ fn updateZirRefs(pt: Zcu.PerThread) (Io.Cancelable || Allocator.Error)!void {
907907 if (!has_namespace) continue;
908908
909909 // 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;
911911 defer old_names.deinit(zcu.gpa);
912912 for (old_zir.typeDecls(old_inst)) |decl_inst| {
913913 const old_decl = old_zir.getDeclaration(decl_inst);
......@@ -3568,8 +3568,8 @@ pub fn processExports(pt: Zcu.PerThread) !void {
35683568 }
35693569
35703570 // 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;
3572 var uav_exports: std.AutoArrayHashMapUnmanaged(InternPool.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.array_hash_map.Auto(InternPool.Index, std.ArrayList(Zcu.Export.Index)) = .empty;
35733573 defer {
35743574 for (nav_exports.values()) |*exports| {
35753575 exports.deinit(gpa);
......@@ -3665,7 +3665,7 @@ pub fn processExports(pt: Zcu.PerThread) !void {
36653665 }
36663666}
36673667
3668const SymbolExports = std.AutoArrayHashMapUnmanaged(InternPool.NullTerminatedString, Zcu.Export.Index);
3668const SymbolExports = std.array_hash_map.Auto(InternPool.NullTerminatedString, Zcu.Export.Index);
36693669
36703670fn processExportsInner(
36713671 pt: Zcu.PerThread,
src/codegen/aarch64/Select.zig+6-6
......@@ -4,12 +4,12 @@ air: Air,
44nav_index: InternPool.Nav.Index,
55
66// Blocks
7def_order: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, void),
8blocks: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Block),
9loops: std.AutoArrayHashMapUnmanaged(Air.Inst.Index, Loop),
7def_order: std.array_hash_map.Auto(Air.Inst.Index, void),
8blocks: std.array_hash_map.Auto(Air.Inst.Index, Block),
9loops: std.array_hash_map.Auto(Air.Inst.Index, Loop),
1010active_loops: std.ArrayList(Loop.Index),
1111loop_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),
1313 list: std.ArrayList(Air.Inst.Index),
1414},
1515dom_start: u32,
......@@ -11225,7 +11225,7 @@ fn dumpValuesInner(isel: *Select, which: WhichValues) !void {
1122511225 defer std.debug.unlockStderr();
1122611226 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;
1122911229 defer {
1123011230 for (reverse_live_values.values()) |*list| list.deinit(gpa);
1123111231 reverse_live_values.deinit(gpa);
......@@ -11254,7 +11254,7 @@ fn dumpValuesInner(isel: *Select, which: WhichValues) !void {
1125411254 };
1125511255 }
1125611256
11257 var roots: std.AutoArrayHashMapUnmanaged(Value.Index, u32) = .empty;
11257 var roots: std.array_hash_map.Auto(Value.Index, u32) = .empty;
1125811258 defer roots.deinit(gpa);
1125911259 {
1126011260 try roots.ensureTotalCapacity(gpa, isel.values.items.len);
src/codegen/c.zig+11-11
......@@ -59,14 +59,14 @@ pub const Mir = struct {
5959 /// Key is the value of the UAV; value is the UAV's alignment, or
6060 /// `.none` for natural alignment. The specified alignment is never
6161 /// less than the natural alignment.
62 need_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),
62 need_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
6363 ctype_deps: CType.Dependencies,
6464 /// 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),
6666 /// 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),
6868 /// 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
7171 pub fn deinit(mir: *Mir, gpa: Allocator) void {
7272 gpa.free(mir.fwd_decl);
......@@ -164,8 +164,8 @@ const LocalType = struct {
164164};
165165
166166const LocalIndex = u16;
167const LocalsList = std.AutoArrayHashMapUnmanaged(LocalIndex, void);
168const LocalsMap = std.AutoArrayHashMapUnmanaged(LocalType, LocalsList);
167const LocalsList = std.array_hash_map.Auto(LocalIndex, void);
168const LocalsMap = std.array_hash_map.Auto(LocalType, LocalsList);
169169
170170const ValueRenderLocation = enum {
171171 initializer,
......@@ -391,11 +391,11 @@ pub const Function = struct {
391391 code: Writer.Allocating,
392392 indent_counter: usize,
393393 /// 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),
395395 /// 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),
397397 /// 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),
399399 func_index: InternPool.Index,
400400 /// All the locals, to be emitted at the top of the function.
401401 locals: std.ArrayList(LocalType) = .empty,
......@@ -407,7 +407,7 @@ pub const Function = struct {
407407 /// of variable declarations at the top of a function, sorted descending
408408 /// by type alignment.
409409 /// 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,
411411 /// Maps from `loop_switch_br` instructions to the allocated local used
412412 /// for the switch cond. Dispatches should set this local to the new cond.
413413 loop_switch_conds: std.AutoHashMapUnmanaged(Air.Inst.Index, LocalIndex) = .empty,
......@@ -643,7 +643,7 @@ pub const DeclGen = struct {
643643 /// Key is the value of the UAV; value is the UAV's alignment, or
644644 /// `.none` for natural alignment. The specified alignment is never
645645 /// less than the natural alignment.
646 uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),
646 uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
647647
648648 fn fail(dg: *DeclGen, comptime format: []const u8, args: anytype) Error {
649649 @branchHint(.cold);
src/codegen/c/type.zig+6-6
......@@ -572,30 +572,30 @@ pub const CType = union(enum) {
572572 pub const Dependencies = struct {
573573 /// Key is any Zig type which corresponds to a C `struct`, `union`, or `typedef`. That C
574574 /// type must be declared and complete.
575 type: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),
575 type: std.array_hash_map.Auto(InternPool.Index, void),
576576
577577 /// Key is a Zig type which is the *payload* of an error union. The C `struct` type
578578 /// corresponding to such an error union must be declared and complete.
579579 ///
580580 /// These are separate from `type` to avoid redundant types for every different error set
581581 /// 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
584584 /// Like `type`, but the type does not necessarily need to be completed yet: a forward
585585 /// declaration is sufficient.
586 type_fwd: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),
586 type_fwd: std.array_hash_map.Auto(InternPool.Index, void),
587587
588588 /// Like `errunion_type`, but the type does not necessarily need to be completed yet: a
589589 /// 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
592592 /// Key is a Zig type; value is a bitmask of alignments. For every bit which is set, an
593593 /// aligned typedef is required. For instance, if bit 3 is set, the C type 'aligned__8_foo'
594594 /// 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
597597 /// 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
600600 pub const empty: Dependencies = .{
601601 .type = .empty,
src/codegen/riscv64/CodeGen.zig+4-4
......@@ -112,7 +112,7 @@ const_tracking: ConstTrackingMap = .{},
112112inst_tracking: InstTrackingMap = .{},
113113
114114frame_allocs: std.MultiArrayList(FrameAlloc) = .{},
115free_frame_indices: std.AutoArrayHashMapUnmanaged(FrameIndex, void) = .empty,
115free_frame_indices: std.array_hash_map.Auto(FrameIndex, void) = .empty,
116116frame_locs: std.MultiArrayList(Mir.FrameLoc) = .{},
117117
118118loops: std.AutoHashMapUnmanaged(Air.Inst.Index, struct {
......@@ -338,7 +338,7 @@ const MCValue = union(enum) {
338338};
339339
340340const 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
343343 fn deinit(func: *Branch, gpa: Allocator) void {
344344 func.inst_table.deinit(gpa);
......@@ -346,8 +346,8 @@ const Branch = struct {
346346 }
347347};
348348
349const InstTrackingMap = std.AutoArrayHashMapUnmanaged(Air.Inst.Index, InstTracking);
350const ConstTrackingMap = std.AutoArrayHashMapUnmanaged(InternPool.Index, InstTracking);
349const InstTrackingMap = std.array_hash_map.Auto(Air.Inst.Index, InstTracking);
350const ConstTrackingMap = std.array_hash_map.Auto(InternPool.Index, InstTracking);
351351
352352const InstTracking = struct {
353353 long: MCValue,
src/codegen/sparc64/CodeGen.zig+1-1
......@@ -200,7 +200,7 @@ const MCValue = union(enum) {
200200};
201201
202202const 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
205205 fn deinit(self: *Branch, gpa: Allocator) void {
206206 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
2828intern_map: std.AutoHashMapUnmanaged(struct { InternPool.Index, Repr }, Id) = .empty,
2929decls: std.ArrayList(Decl) = .empty,
3030decl_deps: std.ArrayList(Decl.Index) = .empty,
31entry_points: std.AutoArrayHashMapUnmanaged(Id, EntryPoint) = .empty,
31entry_points: std.array_hash_map.Auto(Id, EntryPoint) = .empty,
3232/// This map serves a dual purpose:
3333/// - It keeps track of pointers that are currently being emitted, so that we can tell
3434/// if they are recursive and need an OpTypeForwardPointer.
src/codegen/wasm/CodeGen.zig+5-5
......@@ -141,7 +141,7 @@ branches: std.ArrayList(Branch) = .empty,
141141/// Table to save `WValue`'s generated by an `Air.Inst`
142142// values: ValueTable,
143143/// 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 {
145145 label: u32,
146146 value: WValue,
147147}) = .{},
......@@ -171,12 +171,12 @@ mir_extra: std.ArrayList(u32),
171171mir_locals: std.ArrayList(std.wasm.Valtype),
172172/// Set of all UAVs referenced by this function. Key is the UAV value, value is the alignment.
173173/// `.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),
175175/// Set of all functions whose address this function has taken and which therefore might be called
176176/// 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),
178178/// 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),
180180/// The number of `error_name_table_ref` instructions emitted.
181181error_name_table_ref_count: u32,
182182/// 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) {
322322};
323323
324324/// 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
327327const 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,
2626
2727/// Not directly used by `Emit`, but the linker needs this to merge it with a global set.
2828/// 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),
3030/// 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),
3232/// 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),
3434/// Not directly used by `Emit`, but the linker needs this to add it to its own refcount.
3535error_name_table_ref_count: u32,
3636
src/codegen/x86_64/CodeGen.zig+3-3
......@@ -140,7 +140,7 @@ register_manager: RegisterManager = .{},
140140scope_generation: u32 = 0,
141141
142142frame_allocs: std.MultiArrayList(FrameAlloc) = .empty,
143free_frame_indices: std.AutoArrayHashMapUnmanaged(FrameIndex, void) = .empty,
143free_frame_indices: std.array_hash_map.Auto(FrameIndex, void) = .empty,
144144frame_locs: std.MultiArrayList(Mir.FrameLoc) = .empty,
145145
146146loops: std.AutoHashMapUnmanaged(Air.Inst.Index, struct {
......@@ -569,8 +569,8 @@ pub const MCValue = union(enum) {
569569 }
570570};
571571
572const InstTrackingMap = std.AutoArrayHashMapUnmanaged(Air.Inst.Index, InstTracking);
573const ConstTrackingMap = std.AutoArrayHashMapUnmanaged(InternPool.Index, InstTracking);
572const InstTrackingMap = std.array_hash_map.Auto(Air.Inst.Index, InstTracking);
573const ConstTrackingMap = std.array_hash_map.Auto(InternPool.Index, InstTracking);
574574const InstTracking = struct {
575575 long: MCValue,
576576 short: MCValue,
src/link/C.zig+26-26
......@@ -44,10 +44,10 @@ type_dependencies: std.ArrayList(link.ConstPool.Index),
4444align_dependency_masks: std.ArrayList(u64),
4545
4646/// 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),
4848/// All UAVs which may be referenced are in this map. The UAV alignment is not included in the
4949/// 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),
5151/// Contains all types which are needed by some other rendered code. Does not contain any constants
5252/// other than types.
5353type_pool: link.ConstPool,
......@@ -59,10 +59,10 @@ types: std.ArrayList(RenderedType),
5959/// The set of big int types required by *any* generated code so far. These are always safe to emit,
6060/// so they do not participate in the dependency graph traversal in `flush`. Therefore, redundant
6161/// 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),
65exported_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, String),
64exported_navs: std.array_hash_map.Auto(InternPool.Nav.Index, String),
65exported_uavs: std.array_hash_map.Auto(InternPool.Index, String),
6666
6767/// A reference into `string_bytes`.
6868const String = extern struct {
......@@ -133,10 +133,10 @@ const RenderedDecl = struct {
133133 fwd_decl: String,
134134 code: String,
135135 ctype_deps: CTypeDependencies,
136 need_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),
137 need_tag_name_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),
138 need_never_tail_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),
139 need_never_inline_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void),
136 need_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment),
137 need_tag_name_funcs: std.array_hash_map.Auto(InternPool.Index, void),
138 need_never_tail_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
139 need_never_inline_funcs: std.array_hash_map.Auto(InternPool.Nav.Index, void),
140140
141141 const init: RenderedDecl = .{
142142 .fwd_decl = .empty,
......@@ -746,7 +746,7 @@ pub fn flush(c: *C, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Prog
746746 // incremental updates which is invalid C (due to e.g. types changing). Machine code backends
747747 // don't have this problem because there are, of course, no type checking performed when you
748748 // *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;
750750 defer need_navs.deinit(gpa);
751751 {
752752 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
774774 //
775775 // 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;
778778 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;
781781 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;
783783 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;
785785 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;
788788 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;
791791 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;
794794 defer need_never_inline_funcs.deinit(gpa);
795795
796796 // As mentioned above, we need this type for error names.
......@@ -1284,9 +1284,9 @@ pub fn deleteExport(
12841284
12851285fn mergeNeededCTypes(
12861286 c: *C,
1287 need_types: *std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void),
1288 need_errunion_types: *std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void),
1289 need_aligned_types: *std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, u64),
1287 need_types: *std.array_hash_map.Auto(link.ConstPool.Index, void),
1288 need_errunion_types: *std.array_hash_map.Auto(link.ConstPool.Index, void),
1289 need_aligned_types: *std.array_hash_map.Auto(link.ConstPool.Index, u64),
12901290 deps: *const CTypeDependencies,
12911291) Allocator.Error!void {
12921292 const gpa = c.base.comp.gpa;
......@@ -1312,8 +1312,8 @@ fn mergeNeededCTypes(
13121312
13131313fn mergeNeededUavs(
13141314 zcu: *const Zcu,
1315 global: *std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),
1316 new: *const std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment),
1315 global: *std.array_hash_map.Auto(InternPool.Index, Alignment),
1316 new: *const std.array_hash_map.Auto(InternPool.Index, Alignment),
13171317) Allocator.Error!void {
13181318 const gpa = zcu.comp.gpa;
13191319
......@@ -1422,12 +1422,12 @@ const FlushTypes = struct {
14221422 c: *C,
14231423 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),
14261426 aligned_type_strings: []const []const u8,
14271427
1428 status: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, bool),
1429 errunion_status: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, bool),
1430 aligned_status: std.AutoArrayHashMapUnmanaged(link.ConstPool.Index, void),
1428 status: std.array_hash_map.Auto(link.ConstPool.Index, bool),
1429 errunion_status: std.array_hash_map.Auto(link.ConstPool.Index, bool),
1430 aligned_status: std.array_hash_map.Auto(link.ConstPool.Index, void),
14311431
14321432 fn processDeps(ft: *FlushTypes, deps: *const CTypeDependencies) void {
14331433 const resolved = deps.get(ft.c);
src/link/Coff.zig+8-8
......@@ -30,18 +30,18 @@ strings: std.HashMapUnmanaged(
3030),
3131string_bytes: std.ArrayList(u8),
3232image_section_table: std.ArrayList(Symbol.Index),
33pseudo_section_table: std.AutoArrayHashMapUnmanaged(String, Symbol.Index),
34object_section_table: std.AutoArrayHashMapUnmanaged(String, Symbol.Index),
33pseudo_section_table: std.array_hash_map.Auto(String, Symbol.Index),
34object_section_table: std.array_hash_map.Auto(String, Symbol.Index),
3535symbol_table: std.ArrayList(Symbol),
36globals: std.AutoArrayHashMapUnmanaged(GlobalName, Symbol.Index),
36globals: std.array_hash_map.Auto(GlobalName, Symbol.Index),
3737global_pending_index: u32,
38navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, Symbol.Index),
39uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Symbol.Index),
38navs: std.array_hash_map.Auto(InternPool.Nav.Index, Symbol.Index),
39uavs: std.array_hash_map.Auto(InternPool.Index, Symbol.Index),
4040lazy: 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),
4242 pending_index: u32,
4343}),
44pending_uavs: std.AutoArrayHashMapUnmanaged(Node.UavMapIndex, struct {
44pending_uavs: std.array_hash_map.Auto(Node.UavMapIndex, struct {
4545 alignment: InternPool.Alignment,
4646}),
4747relocs: std.ArrayList(Reloc),
......@@ -272,7 +272,7 @@ pub const Node = union(enum) {
272272
273273pub const ImportTable = struct {
274274 ni: MappedFile.Node.Index,
275 entries: std.AutoArrayHashMapUnmanaged(void, Entry),
275 entries: std.array_hash_map.Auto(void, Entry),
276276
277277 pub const Entry = struct {
278278 import_lookup_table_ni: MappedFile.Node.Index,
src/link/ConstPool.zig+3-3
......@@ -15,10 +15,10 @@
1515/// * ensure that any `get` call is eventually followed by a `flushPending` call
1616const ConstPool = @This();
1717
18values: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),
18values: std.array_hash_map.Auto(InternPool.Index, void),
1919pending: std.ArrayList(Index),
20complete_containers: std.AutoArrayHashMapUnmanaged(InternPool.Index, void),
21container_deps: std.AutoArrayHashMapUnmanaged(InternPool.Index, ContainerDepEntry.Index),
20complete_containers: std.array_hash_map.Auto(InternPool.Index, void),
21container_deps: std.array_hash_map.Auto(InternPool.Index, ContainerDepEntry.Index),
2222container_dep_entries: std.ArrayList(ContainerDepEntry),
2323
2424pub const empty: ConstPool = .{
src/link/Dwarf.zig+6-6
......@@ -27,11 +27,11 @@ address_size: AddressSize,
2727
2828const_pool: link.ConstPool,
2929
30mods: std.AutoArrayHashMapUnmanaged(*Module, ModInfo),
30mods: std.array_hash_map.Auto(*Module, ModInfo),
3131/// Indices are `link.ConstPool.Index`.
3232values: std.ArrayList(struct { Unit.Index, Entry.Index }),
33navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, Entry.Index),
34decls: std.AutoArrayHashMapUnmanaged(InternPool.TrackedInst.Index, Entry.Index),
33navs: std.array_hash_map.Auto(InternPool.Nav.Index, Entry.Index),
34decls: std.array_hash_map.Auto(InternPool.TrackedInst.Index, Entry.Index),
3535
3636debug_abbrev: DebugAbbrev,
3737debug_aranges: DebugAranges,
......@@ -69,8 +69,8 @@ pub const AddressSize = enum(u8) {
6969
7070const ModInfo = struct {
7171 root_dir_path: Entry.Index,
72 dirs: std.AutoArrayHashMapUnmanaged(Unit.Index, void),
73 files: std.AutoArrayHashMapUnmanaged(Zcu.File.Index, void),
72 dirs: std.array_hash_map.Auto(Unit.Index, void),
73 files: std.array_hash_map.Auto(Zcu.File.Index, void),
7474
7575 fn deinit(mod_info: *ModInfo, gpa: Allocator) void {
7676 mod_info.dirs.deinit(gpa);
......@@ -236,7 +236,7 @@ const DebugRngLists = struct {
236236
237237const StringSection = struct {
238238 contents: std.ArrayList(u8),
239 map: std.AutoArrayHashMapUnmanaged(void, void),
239 map: std.array_hash_map.Auto(void, void),
240240 section: Section,
241241
242242 const unit: Unit.Index = @enumFromInt(0);
src/link/Elf.zig+1-1
......@@ -4153,7 +4153,7 @@ pub const Ref = struct {
41534153pub const SymbolResolver = struct {
41544154 keys: std.ArrayList(Key) = .empty,
41554155 values: std.ArrayList(Ref) = .empty,
4156 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
4156 table: std.array_hash_map.Auto(void, void) = .empty,
41574157
41584158 const Result = struct {
41594159 found_existing: bool,
src/link/Elf/AtomList.zig+1-1
......@@ -3,7 +3,7 @@ size: u64 = 0,
33alignment: Atom.Alignment = .@"1",
44output_section_index: u32 = 0,
55// atoms: std.ArrayList(Elf.Ref) = .empty,
6atoms: std.AutoArrayHashMapUnmanaged(Elf.Ref, void) = .empty,
6atoms: std.array_hash_map.Auto(Elf.Ref, void) = .empty,
77
88dirty: bool = true,
99
src/link/Elf/Thunk.zig+1-1
......@@ -1,6 +1,6 @@
11value: i64 = 0,
22output_section_index: u32 = 0,
3symbols: std.AutoArrayHashMapUnmanaged(Elf.Ref, void) = .empty,
3symbols: std.array_hash_map.Auto(Elf.Ref, void) = .empty,
44output_symtab_ctx: Elf.SymtabCtx = .{},
55
66pub fn deinit(thunk: *Thunk, allocator: Allocator) void {
src/link/Elf/ZigObject.zig+4-4
......@@ -2408,10 +2408,10 @@ const TlsVariable = struct {
24082408};
24092409
24102410const AtomList = std.ArrayList(Atom.Index);
2411const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata);
2412const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata);
2413const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata);
2414const TlsTable = std.AutoArrayHashMapUnmanaged(Atom.Index, void);
2411const NavTable = std.array_hash_map.Auto(InternPool.Nav.Index, AvMetadata);
2412const UavTable = std.array_hash_map.Auto(InternPool.Index, AvMetadata);
2413const LazySymbolTable = std.array_hash_map.Auto(InternPool.Index, LazySymbolMetadata);
2414const TlsTable = std.array_hash_map.Auto(Atom.Index, void);
24152415
24162416const x86_64 = struct {
24172417 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,
112112/// The `.dynamic` section contains zero or more symbol relocations starting at this index.
113113dynamic_first_symbol_reloc: SymbolReloc.Index,
114114
115needed: std.AutoArrayHashMapUnmanaged(String(.dynstr), void),
115needed: std.array_hash_map.Auto(String(.dynstr), void),
116116inputs: std.ArrayList(struct {
117117 path: std.Build.Cache.Path,
118118 member: ?[]const u8,
......@@ -120,21 +120,21 @@ inputs: std.ArrayList(struct {
120120}),
121121input_sections: std.ArrayList(InputSection),
122122input_section_pending_index: u32,
123navs: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, struct {
123navs: std.array_hash_map.Auto(InternPool.Nav.Index, struct {
124124 lsi: Symbol.LocalIndex,
125125 /// The start index of the contiguous sequence of symbol relocations in this NAV.
126126 first_symbol_reloc: SymbolReloc.Index,
127127 /// The start index of the contiguous sequence of GOT relocations in this NAV.
128128 first_got_reloc: GotReloc.Index,
129129}),
130uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, struct {
130uavs: std.array_hash_map.Auto(InternPool.Index, struct {
131131 lsi: Symbol.LocalIndex,
132132 /// The start index of the contiguous sequence of symbol relocations in this UAV.
133133 first_symbol_reloc: SymbolReloc.Index,
134134 // No `first_got_reloc` field because a UAV never contains GOT relocations.
135135}),
136136lazy: std.EnumArray(link.File.LazySymbol.Kind, struct {
137 map: std.AutoArrayHashMapUnmanaged(InternPool.Index, struct {
137 map: std.array_hash_map.Auto(InternPool.Index, struct {
138138 lsi: Symbol.LocalIndex,
139139 /// The start index of the contiguous sequence of symbol relocations in this lazy code/data.
140140 first_symbol_reloc: SymbolReloc.Index,
src/link/MachO.zig+4-4
......@@ -28,9 +28,9 @@ sections: std.MultiArrayList(Section) = .{},
2828resolver: SymbolResolver = .{},
2929/// This table will be populated after `scanRelocs` has run.
3030/// Key is symbol index.
31undefs: std.AutoArrayHashMapUnmanaged(SymbolResolver.Index, UndefRefs) = .empty,
31undefs: std.array_hash_map.Auto(SymbolResolver.Index, UndefRefs) = .empty,
3232undefs_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,
3434dupes_mutex: std.Io.Mutex = .init,
3535
3636dyld_info_cmd: macho.dyld_info_command = .{},
......@@ -4102,7 +4102,7 @@ const Section = struct {
41024102};
41034103
41044104pub const LiteralPool = struct {
4105 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
4105 table: std.array_hash_map.Auto(void, void) = .empty,
41064106 keys: std.ArrayList(Key) = .empty,
41074107 values: std.ArrayList(MachO.Ref) = .empty,
41084108 data: std.ArrayList(u8) = .empty,
......@@ -4541,7 +4541,7 @@ pub const Ref = struct {
45414541pub const SymbolResolver = struct {
45424542 keys: std.ArrayList(Key) = .empty,
45434543 values: std.ArrayList(Ref) = .empty,
4544 table: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
4544 table: std.array_hash_map.Auto(void, void) = .empty,
45454545
45464546 const Result = struct {
45474547 found_existing: bool,
src/link/MachO/Thunk.zig+1-1
......@@ -1,6 +1,6 @@
11value: u64 = 0,
22out_n_sect: u8 = 0,
3symbols: std.AutoArrayHashMapUnmanaged(MachO.Ref, void) = .empty,
3symbols: std.array_hash_map.Auto(MachO.Ref, void) = .empty,
44output_symtab_ctx: MachO.SymtabCtx = .{},
55
66pub fn deinit(thunk: *Thunk, allocator: Allocator) void {
src/link/MachO/ZigObject.zig+4-4
......@@ -1750,11 +1750,11 @@ const TlvInitializer = struct {
17501750 }
17511751};
17521752
1753const NavTable = std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, AvMetadata);
1754const UavTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, AvMetadata);
1755const LazySymbolTable = std.AutoArrayHashMapUnmanaged(InternPool.Index, LazySymbolMetadata);
1753const NavTable = std.array_hash_map.Auto(InternPool.Nav.Index, AvMetadata);
1754const UavTable = std.array_hash_map.Auto(InternPool.Index, AvMetadata);
1755const LazySymbolTable = std.array_hash_map.Auto(InternPool.Index, LazySymbolMetadata);
17561756const RelocationTable = std.ArrayList(std.ArrayList(Relocation));
1757const TlvInitializerTable = std.AutoArrayHashMapUnmanaged(Atom.Index, TlvInitializer);
1757const TlvInitializerTable = std.array_hash_map.Auto(Atom.Index, TlvInitializer);
17581758
17591759const x86_64 = struct {
17601760 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 {
2323 /// The set of (result-id's of) invocation globals that are accessed
2424 /// in this function, or after resolution, that are accessed in this
2525 /// function or any of it's callees.
26 invocation_globals: std.AutoArrayHashMapUnmanaged(ResultId, void),
26 invocation_globals: std.array_hash_map.Auto(ResultId, void),
2727 };
2828
2929 /// Information about a particular invocation global
3030 const InvocationGlobal = struct {
3131 /// The list of invocation globals that this invocation global
3232 /// depends on.
33 dependencies: std.AutoArrayHashMapUnmanaged(ResultId, void),
33 dependencies: std.array_hash_map.Auto(ResultId, void),
3434 /// The invocation global's type
3535 ty: ResultId,
3636 /// Initializer function. May be `none`.
......@@ -39,13 +39,13 @@ const ModuleInfo = struct {
3939 };
4040
4141 /// Maps function result-id -> Fn information structure.
42 functions: std.AutoArrayHashMapUnmanaged(ResultId, Fn),
42 functions: std.array_hash_map.Auto(ResultId, Fn),
4343 /// 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),
4545 /// For each function, a list of function result-ids that it calls.
4646 callee_store: []const ResultId,
4747 /// 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
5050 /// Fetch the list of callees per function. Guaranteed to contain only unique IDs.
5151 fn callees(self: ModuleInfo, fn_id: ResultId) []const ResultId {
......@@ -344,7 +344,7 @@ const ModuleBuilder = struct {
344344 /// and until a general type deduplication pass is programmed, we just handle it here via this.
345345 function_types: std.ArrayHashMapUnmanaged(FunctionType, ResultId, FunctionType.Context, true) = .empty,
346346 /// 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,
348348 /// Offset of the functions section in the new binary.
349349 new_functions_section: ?usize,
350350
src/link/Wasm.zig+32-32
......@@ -80,27 +80,27 @@ name: []const u8,
8080/// List of relocatable files to be linked into the final binary.
8181objects: std.ArrayList(Object) = .empty,
8282
83func_types: std.AutoArrayHashMapUnmanaged(FunctionType, void) = .empty,
83func_types: std.array_hash_map.Auto(FunctionType, void) = .empty,
8484/// Provides a mapping of both imports and provided functions to symbol name.
8585/// Local functions may be unnamed.
8686/// 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,
8888/// All functions for all objects.
8989object_functions: std.ArrayList(ObjectFunction) = .empty,
9090
9191/// Provides a mapping of both imports and provided globals to symbol name.
9292/// Local globals may be unnamed.
93object_global_imports: std.AutoArrayHashMapUnmanaged(String, GlobalImport) = .empty,
93object_global_imports: std.array_hash_map.Auto(String, GlobalImport) = .empty,
9494/// All globals for all objects.
9595object_globals: std.ArrayList(ObjectGlobal) = .empty,
9696
9797/// 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,
9999/// All parsed table sections for all objects.
100100object_tables: std.ArrayList(Table) = .empty,
101101
102102/// 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,
104104/// All parsed memory sections for all objects.
105105object_memories: std.ArrayList(ObjectMemory) = .empty,
106106
......@@ -119,15 +119,15 @@ object_data_segments: std.ArrayList(ObjectDataSegment) = .empty,
119119/// Each segment has many data symbols, which correspond logically to global
120120/// constants.
121121object_datas: std.ArrayList(ObjectData) = .empty,
122object_data_imports: std.AutoArrayHashMapUnmanaged(String, ObjectDataImport) = .empty,
122object_data_imports: std.array_hash_map.Auto(String, ObjectDataImport) = .empty,
123123/// 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
126126/// All comdat information for all objects.
127127object_comdats: std.ArrayList(Comdat) = .empty,
128128/// A table that maps the relocations to be performed where the key represents
129129/// 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,
131131/// Incremented across all objects in order to enable calculation of `ObjectSectionIndex` values.
132132object_total_sections: u32 = 0,
133133/// All comdat symbols from all objects concatenated.
......@@ -150,7 +150,7 @@ nav_fixups: std.ArrayList(NavFixup) = .empty,
150150func_table_fixups: std.ArrayList(FuncTableFixup) = .empty,
151151/// Symbols to be emitted into an object file. Remains empty when not emitting
152152/// an object file.
153symbol_table: std.AutoArrayHashMapUnmanaged(String, void) = .empty,
153symbol_table: std.array_hash_map.Auto(String, void) = .empty,
154154
155155/// When importing objects from the host environment, a name must be supplied.
156156/// LLVM uses "env" by default when none is given.
......@@ -174,24 +174,24 @@ preloaded_strings: PreloadedStrings,
174174
175175/// This field is used when emitting an object; `navs_exe` used otherwise.
176176/// 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,
178178/// This field is unused when emitting an object; `navs_obj` used otherwise.
179179/// 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,
181181/// Tracks all InternPool values referenced by codegen. Needed for outputting
182182/// the data segment. This one does not track ref count because object files
183183/// 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,
185185/// 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,
187187/// Sparse table of uavs that need to be emitted with greater alignment than
188188/// the default for the type.
189overaligned_uavs: std.AutoArrayHashMapUnmanaged(InternPool.Index, Alignment) = .empty,
189overaligned_uavs: std.array_hash_map.Auto(InternPool.Index, Alignment) = .empty,
190190/// When the key is an enum type, this represents a `@tagName` function.
191zcu_funcs: std.AutoArrayHashMapUnmanaged(InternPool.Index, ZcuFunc) = .empty,
192nav_exports: std.AutoArrayHashMapUnmanaged(NavExport, Zcu.Export.Index) = .empty,
193uav_exports: std.AutoArrayHashMapUnmanaged(UavExport, Zcu.Export.Index) = .empty,
194imports: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty,
191zcu_funcs: std.array_hash_map.Auto(InternPool.Index, ZcuFunc) = .empty,
192nav_exports: std.array_hash_map.Auto(NavExport, Zcu.Export.Index) = .empty,
193uav_exports: std.array_hash_map.Auto(UavExport, Zcu.Export.Index) = .empty,
194imports: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty,
195195
196196dwarf: ?Dwarf = null,
197197
......@@ -200,19 +200,19 @@ flush_buffer: Flush = .{},
200200/// Empty until `prelink`. There it is populated based on object files.
201201/// Next, it is copied into `Flush.missing_exports` just before `flush`
202202/// and that data is used during `flush`.
203missing_exports: std.AutoArrayHashMapUnmanaged(String, void) = .empty,
203missing_exports: std.array_hash_map.Auto(String, void) = .empty,
204204entry_resolution: FunctionImport.Resolution = .unresolved,
205205
206206/// Empty when outputting an object.
207function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty,
208hidden_function_exports: std.AutoArrayHashMapUnmanaged(String, FunctionIndex) = .empty,
207function_exports: std.array_hash_map.Auto(String, FunctionIndex) = .empty,
208hidden_function_exports: std.array_hash_map.Auto(String, FunctionIndex) = .empty,
209209global_exports: std.ArrayList(GlobalExport) = .empty,
210210/// Tracks the value at the end of prelink.
211211global_exports_len: u32 = 0,
212212
213213/// Ordered list of non-import functions that will appear in the final binary.
214214/// Empty until prelink.
215functions: std.AutoArrayHashMapUnmanaged(FunctionImport.Resolution, void) = .empty,
215functions: std.array_hash_map.Auto(FunctionImport.Resolution, void) = .empty,
216216/// Tracks the value at the end of prelink, at which point `functions`
217217/// contains only object file functions, and nothing from the Zcu yet.
218218functions_end_prelink: u32 = 0,
......@@ -230,7 +230,7 @@ data_imports_len_prelink: u32 = 0,
230230/// `flush` gets a copy of this table, and then Zcu exports are applied to
231231/// remove elements from the table, and the remainder are either undefined
232232/// 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
235235/// At the end of prelink, this is populated with data symbols needed by
236236/// objects.
......@@ -243,29 +243,29 @@ function_imports: std.AutoArrayHashMapUnmanaged(String, FunctionImportId) = .emp
243243/// `flush` gets a copy of this table, and then Zcu exports are applied to
244244/// remove elements from the table, and the remainder are either undefined
245245/// 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,
247247/// Set of data symbols that will appear in the final binary. Used to populate
248248/// `Flush.data_segments` before sorting.
249data_segments: std.AutoArrayHashMapUnmanaged(DataSegmentId, void) = .empty,
249data_segments: std.array_hash_map.Auto(DataSegmentId, void) = .empty,
250250
251251/// Ordered list of non-import globals that will appear in the final binary.
252252/// Empty until prelink.
253globals: std.AutoArrayHashMapUnmanaged(GlobalImport.Resolution, void) = .empty,
253globals: std.array_hash_map.Auto(GlobalImport.Resolution, void) = .empty,
254254/// Tracks the value at the end of prelink, at which point `globals`
255255/// contains only object file globals, and nothing from the Zcu yet.
256256globals_end_prelink: u32 = 0,
257global_imports: std.AutoArrayHashMapUnmanaged(String, GlobalImportId) = .empty,
257global_imports: std.array_hash_map.Auto(String, GlobalImportId) = .empty,
258258
259259/// Ordered list of non-import tables that will appear in the final binary.
260260/// Empty until prelink.
261tables: std.AutoArrayHashMapUnmanaged(TableImport.Resolution, void) = .empty,
262table_imports: std.AutoArrayHashMapUnmanaged(String, TableImport.Index) = .empty,
261tables: std.array_hash_map.Auto(TableImport.Resolution, void) = .empty,
262table_imports: std.array_hash_map.Auto(String, TableImport.Index) = .empty,
263263
264264/// All functions that have had their address taken and therefore might be
265265/// called via a `call_indirect` function.
266zcu_indirect_function_set: std.AutoArrayHashMapUnmanaged(InternPool.Nav.Index, void) = .empty,
267object_indirect_function_import_set: std.AutoArrayHashMapUnmanaged(String, void) = .empty,
268object_indirect_function_set: std.AutoArrayHashMapUnmanaged(ObjectFunctionIndex, void) = .empty,
266zcu_indirect_function_set: std.array_hash_map.Auto(InternPool.Nav.Index, void) = .empty,
267object_indirect_function_import_set: std.array_hash_map.Auto(String, void) = .empty,
268object_indirect_function_set: std.array_hash_map.Auto(ObjectFunctionIndex, void) = .empty,
269269
270270error_name_table_ref_count: u32 = 0,
271271tag_name_table_ref_count: u32 = 0,
src/link/Wasm/Flush.zig+7-7
......@@ -24,22 +24,22 @@ const ArrayList = std.ArrayList;
2424/// Ordered list of data segments that will appear in the final binary.
2525/// When sorted, to-be-merged segments will be made adjacent.
2626/// Values are virtual address.
27data_segments: std.AutoArrayHashMapUnmanaged(Wasm.DataSegmentId, u32) = .empty,
27data_segments: std.array_hash_map.Auto(Wasm.DataSegmentId, u32) = .empty,
2828/// Each time a `data_segment` offset equals zero it indicates a new group, and
2929/// the next element in this array will contain the total merged segment size.
3030/// Value is the virtual memory address of the end of the segment.
3131data_segment_groups: ArrayList(DataSegmentGroup) = .empty,
3232
3333binary_bytes: ArrayList(u8) = .empty,
34missing_exports: std.AutoArrayHashMapUnmanaged(String, void) = .empty,
35function_imports: std.AutoArrayHashMapUnmanaged(String, Wasm.FunctionImportId) = .empty,
36global_imports: std.AutoArrayHashMapUnmanaged(String, Wasm.GlobalImportId) = .empty,
37data_imports: std.AutoArrayHashMapUnmanaged(String, Wasm.DataImportId) = .empty,
34missing_exports: std.array_hash_map.Auto(String, void) = .empty,
35function_imports: std.array_hash_map.Auto(String, Wasm.FunctionImportId) = .empty,
36global_imports: std.array_hash_map.Auto(String, Wasm.GlobalImportId) = .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
4141/// 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
4444/// For debug purposes only.
4545memory_layout_finished: bool = false,
src/main.zig+1-1
......@@ -4419,7 +4419,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {
44194419
44204420 var file_name_bytes: std.ArrayList(u8) = .empty;
44214421 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;
44234423 defer files.deinit(gpa);
44244424 var decl_data: std.ArrayList(u8) = .empty;
44254425 defer decl_data.deinit(gpa);
tools/dump-cov.zig+1-1
......@@ -67,7 +67,7 @@ pub fn main(init: std.process.Init) !void {
6767 try stdout.print("{any}\n", .{header.*});
6868 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;
7171 try indexed_pcs.entries.resize(arena, pcs.len);
7272 @memcpy(indexed_pcs.entries.items(.key), pcs);
7373 try indexed_pcs.reIndex(arena);