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