| author | |
| committer | |
| log | d23e22c4161ad2a005ad4ee54877cc6908424d54 |
| tree | 6b7fed476cef8aac02889df1305c3a0f67da2eb3 |
| parent | 09bb2315e22c50a4aa9900102fcbde0302717110 |
| signature |
36 files changed, 74 insertions(+), 74 deletions(-)
lib/compiler/Maker.zig+1-1| ... | ... | @@ -481,7 +481,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 481 | 481 | // maker process fails or crashes and it's helpful to be able to repeat |
| 482 | 482 | // execution of the command line or otherwise inspect the configuration file. |
| 483 | 483 | const c = &configuration; |
| 484 | var top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index) = .empty; | |
| 484 | var top_level_steps: std.array_hash_map.String(Configuration.Step.Index) = .empty; | |
| 485 | 485 | for (configuration.steps, 0..) |*conf_step, step_index_usize| { |
| 486 | 486 | if (conf_step.owner != .root) continue; |
| 487 | 487 | const step_index: Configuration.Step.Index = @enumFromInt(step_index_usize); |
lib/compiler/Maker/ScannedConfig.zig+1-1| ... | ... | @@ -8,7 +8,7 @@ const Serializer = std.zon.Serializer; |
| 8 | 8 | const Graph = @import("Graph.zig"); |
| 9 | 9 | |
| 10 | 10 | configuration: Configuration, |
| 11 | top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index), | |
| 11 | top_level_steps: std.array_hash_map.String(Configuration.Step.Index), | |
| 12 | 12 | path: []const u8, |
| 13 | 13 | |
| 14 | 14 | pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void { |
lib/compiler/Maker/Step/Compile.zig+1-1| ... | ... | @@ -1127,7 +1127,7 @@ fn moduleNeedsCliArg(mod: *const Configuration.Module, conf: *const Configuratio |
| 1127 | 1127 | |
| 1128 | 1128 | const CliNamedModules = struct { |
| 1129 | 1129 | modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void), |
| 1130 | names: std.StringArrayHashMapUnmanaged(void), | |
| 1130 | names: std.array_hash_map.String(void), | |
| 1131 | 1131 | |
| 1132 | 1132 | /// Traverse the whole dependency graph and give every module a unique |
| 1133 | 1133 | /// name, ideally one named after what it's called somewhere in the graph. |
lib/compiler/Maker/Watch.zig+1-1| ... | ... | @@ -30,7 +30,7 @@ pub const have_impl = Os != void; |
| 30 | 30 | const DirTable = std.ArrayHashMapUnmanaged(Cache.Path, void, Cache.Path.TableAdapter, false); |
| 31 | 31 | |
| 32 | 32 | /// Special key of "." means any changes in this directory trigger the steps. |
| 33 | const ReactionSet = std.StringArrayHashMapUnmanaged(StepSet); | |
| 33 | const ReactionSet = std.array_hash_map.String(StepSet); | |
| 34 | 34 | const StepSet = std.AutoArrayHashMapUnmanaged(Configuration.Step.Index, Generation); |
| 35 | 35 | |
| 36 | 36 | const Generation = u8; |
lib/compiler/aro/aro/Compilation.zig+2-2| ... | ... | @@ -140,7 +140,7 @@ io: Io, |
| 140 | 140 | cwd: std.Io.Dir, |
| 141 | 141 | diagnostics: *Diagnostics, |
| 142 | 142 | |
| 143 | sources: std.StringArrayHashMapUnmanaged(Source) = .empty, | |
| 143 | sources: std.array_hash_map.String(Source) = .empty, | |
| 144 | 144 | source_aliases: std.ArrayList(Source) = .empty, |
| 145 | 145 | /// Allocated into `gpa`, but keys are externally managed. |
| 146 | 146 | search_path: std.ArrayList(Include) = .empty, |
| ... | ... | @@ -159,7 +159,7 @@ builtins: Builtins = .{}, |
| 159 | 159 | string_interner: StringInterner = .{}, |
| 160 | 160 | interner: Interner = .{}, |
| 161 | 161 | type_store: TypeStore = .{}, |
| 162 | pragma_handlers: std.StringArrayHashMapUnmanaged(*Pragma) = .empty, | |
| 162 | pragma_handlers: std.array_hash_map.String(*Pragma) = .empty, | |
| 163 | 163 | /// If this is not null, the directory containing the specified Source will be searched for includes |
| 164 | 164 | /// Used by MS extensions which allow searching for includes relative to the directory of the main source file. |
| 165 | 165 | ms_cwd_source_id: ?Source.Id = null, |
lib/compiler/aro/aro/DepFile.zig+1-1| ... | ... | @@ -6,7 +6,7 @@ pub const Format = enum { make, nmake }; |
| 6 | 6 | const DepFile = @This(); |
| 7 | 7 | |
| 8 | 8 | target: []const u8, |
| 9 | deps: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 9 | deps: std.array_hash_map.String(void) = .empty, | |
| 10 | 10 | format: Format, |
| 11 | 11 | |
| 12 | 12 | pub fn deinit(d: *DepFile, gpa: Allocator) void { |
lib/compiler/aro/aro/Preprocessor.zig+1-1| ... | ... | @@ -23,7 +23,7 @@ const Tree = @import("Tree.zig"); |
| 23 | 23 | const Token = Tree.Token; |
| 24 | 24 | const TokenWithExpansionLocs = Tree.TokenWithExpansionLocs; |
| 25 | 25 | |
| 26 | const DefineMap = std.StringArrayHashMapUnmanaged(Macro); | |
| 26 | const DefineMap = std.array_hash_map.String(Macro); | |
| 27 | 27 | const RawTokenList = std.ArrayList(RawToken); |
| 28 | 28 | const max_include_depth = 200; |
| 29 | 29 |
lib/compiler/aro/aro/StringInterner.zig+1-1| ... | ... | @@ -19,7 +19,7 @@ pub const StringId = enum(u32) { |
| 19 | 19 | } |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | table: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 22 | table: std.array_hash_map.String(void) = .empty, | |
| 23 | 23 | |
| 24 | 24 | pub fn deinit(si: *StringInterner, allocator: mem.Allocator) void { |
| 25 | 25 | si.table.deinit(allocator); |
lib/compiler/aro/backend/Ir.zig+3-3| ... | ... | @@ -7,7 +7,7 @@ const Object = @import("Object.zig"); |
| 7 | 7 | const Ir = @This(); |
| 8 | 8 | |
| 9 | 9 | interner: *Interner, |
| 10 | decls: std.StringArrayHashMapUnmanaged(Decl), | |
| 10 | decls: std.array_hash_map.String(Decl), | |
| 11 | 11 | |
| 12 | 12 | pub const Decl = struct { |
| 13 | 13 | instructions: std.MultiArrayList(Inst), |
| ... | ... | @@ -26,7 +26,7 @@ pub const Builder = struct { |
| 26 | 26 | arena: std.heap.ArenaAllocator, |
| 27 | 27 | interner: *Interner, |
| 28 | 28 | |
| 29 | decls: std.StringArrayHashMapUnmanaged(Decl) = .empty, | |
| 29 | decls: std.array_hash_map.String(Decl) = .empty, | |
| 30 | 30 | instructions: std.MultiArrayList(Ir.Inst) = .empty, |
| 31 | 31 | body: std.ArrayList(Ref) = .empty, |
| 32 | 32 | alloc_count: u32 = 0, |
| ... | ... | @@ -181,7 +181,7 @@ pub const Renderer = struct { |
| 181 | 181 | ir: *const Ir, |
| 182 | 182 | errors: ErrorList = .{}, |
| 183 | 183 | |
| 184 | pub const ErrorList = std.StringArrayHashMapUnmanaged([]const u8); | |
| 184 | pub const ErrorList = std.array_hash_map.String([]const u8); | |
| 185 | 185 | |
| 186 | 186 | pub const Error = Allocator.Error || error{LowerFail}; |
| 187 | 187 |
lib/compiler/reduce/Walk.zig+2-2| ... | ... | @@ -44,7 +44,7 @@ pub const Transformation = union(enum) { |
| 44 | 44 | imported_string: []const u8, |
| 45 | 45 | /// Identifier names that must be renamed in the inlined code or else |
| 46 | 46 | /// will cause ambiguous reference errors. |
| 47 | in_scope_names: std.StringArrayHashMapUnmanaged(void), | |
| 47 | in_scope_names: std.array_hash_map.String(void), | |
| 48 | 48 | }; |
| 49 | 49 | }; |
| 50 | 50 | |
| ... | ... | @@ -723,7 +723,7 @@ fn walkBuiltinCall( |
| 723 | 723 | try w.transformations.append(.{ .inline_imported_file = .{ |
| 724 | 724 | .builtin_call_node = call_node, |
| 725 | 725 | .imported_string = imported_string, |
| 726 | .in_scope_names = try std.StringArrayHashMapUnmanaged(void).init( | |
| 726 | .in_scope_names = try std.array_hash_map.String(void).init( | |
| 727 | 727 | w.arena, |
| 728 | 728 | w.in_scope_names.keys(), |
| 729 | 729 | &.{}, |
lib/compiler/resinator/cli.zig+1-1| ... | ... | @@ -159,7 +159,7 @@ pub const Options = struct { |
| 159 | 159 | default_language_id: ?u16 = null, |
| 160 | 160 | default_code_page: ?SupportedCodePage = null, |
| 161 | 161 | verbose: bool = false, |
| 162 | symbols: std.StringArrayHashMapUnmanaged(SymbolValue) = .empty, | |
| 162 | symbols: std.array_hash_map.String(SymbolValue) = .empty, | |
| 163 | 163 | null_terminate_string_table_strings: bool = false, |
| 164 | 164 | max_string_literal_codepoints: u15 = lex.default_max_string_literal_codepoints, |
| 165 | 165 | silent_duplicate_control_ids: bool = false, |
lib/compiler/resinator/cvtres.zig+1-1| ... | ... | @@ -441,7 +441,7 @@ pub const ResourceDataEntry = extern struct { |
| 441 | 441 | const ResourceTree = struct { |
| 442 | 442 | type_to_name_map: std.ArrayHashMapUnmanaged(NameOrOrdinal, NameToLanguageMap, NameOrOrdinalHashContext, true), |
| 443 | 443 | rsrc_string_table: std.ArrayHashMapUnmanaged(NameOrOrdinal, void, NameOrOrdinalHashContext, true), |
| 444 | deduplicated_data: std.StringArrayHashMapUnmanaged(u32), | |
| 444 | deduplicated_data: std.array_hash_map.String(u32), | |
| 445 | 445 | data_offsets: std.ArrayList(u32), |
| 446 | 446 | rsrc02_len: u32, |
| 447 | 447 | coff_options: CoffOptions, |
lib/compiler/translate-c/Scope.zig+4-4| ... | ... | @@ -7,7 +7,7 @@ const Translator = @import("Translator.zig"); |
| 7 | 7 | |
| 8 | 8 | const Scope = @This(); |
| 9 | 9 | |
| 10 | pub const SymbolTable = std.StringArrayHashMapUnmanaged(ast.Node); | |
| 10 | pub const SymbolTable = std.array_hash_map.String(ast.Node); | |
| 11 | 11 | pub const AliasList = std.ArrayList(struct { |
| 12 | 12 | alias: []const u8, |
| 13 | 13 | name: []const u8, |
| ... | ... | @@ -79,7 +79,7 @@ pub const Block = struct { |
| 79 | 79 | /// will be used. This maps the variable's name to the Discard payload, so that if |
| 80 | 80 | /// the variable is subsequently referenced we can indicate that the discard should |
| 81 | 81 | /// be skipped during the intermediate AST -> Zig AST render step. |
| 82 | variable_discards: std.StringArrayHashMapUnmanaged(*ast.Payload.Discard), | |
| 82 | variable_discards: std.array_hash_map.String(*ast.Payload.Discard), | |
| 83 | 83 | |
| 84 | 84 | /// When the block corresponds to a function, keep track of the return type |
| 85 | 85 | /// so that the return expression can be cast, if necessary |
| ... | ... | @@ -209,7 +209,7 @@ pub const Root = struct { |
| 209 | 209 | base: Scope, |
| 210 | 210 | translator: *Translator, |
| 211 | 211 | sym_table: SymbolTable, |
| 212 | blank_macros: std.StringArrayHashMapUnmanaged(void), | |
| 212 | blank_macros: std.array_hash_map.String(void), | |
| 213 | 213 | nodes: std.ArrayList(ast.Node), |
| 214 | 214 | container_member_fns_map: ContainerMemberFnsHashMap, |
| 215 | 215 | |
| ... | ... | @@ -267,7 +267,7 @@ pub const Root = struct { |
| 267 | 267 | const gpa = root.translator.gpa; |
| 268 | 268 | const arena = root.translator.arena; |
| 269 | 269 | |
| 270 | var member_names: std.StringArrayHashMapUnmanaged(void) = .empty; | |
| 270 | var member_names: std.array_hash_map.String(void) = .empty; | |
| 271 | 271 | defer member_names.deinit(gpa); |
| 272 | 272 | for (root.container_member_fns_map.keys(), root.container_member_fns_map.values()) |container_qt, members| { |
| 273 | 273 | // Get the container name |
lib/compiler/translate-c/Translator.zig+3-3| ... | ... | @@ -123,7 +123,7 @@ anonymous_record_field_names: std.HashMapUnmanaged( |
| 123 | 123 | /// a list of names that we found by visiting all the top level decls without |
| 124 | 124 | /// translating them. The other maps are updated as we translate; this one is updated |
| 125 | 125 | /// up front in a pre-processing step. |
| 126 | global_names: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 126 | global_names: std.array_hash_map.String(void) = .empty, | |
| 127 | 127 | |
| 128 | 128 | /// This is similar to `global_names`, but contains names which we would |
| 129 | 129 | /// *like* to use, but do not strictly *have* to if they are unavailable. |
| ... | ... | @@ -132,11 +132,11 @@ global_names: std.StringArrayHashMapUnmanaged(void) = .empty, |
| 132 | 132 | /// may be mangled. |
| 133 | 133 | /// This is distinct from `global_names` so we can detect at a type |
| 134 | 134 | /// declaration whether or not the name is available. |
| 135 | weak_global_names: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 135 | weak_global_names: std.array_hash_map.String(void) = .empty, | |
| 136 | 136 | |
| 137 | 137 | /// Set of identifiers known to refer to typedef declarations. |
| 138 | 138 | /// Used when parsing macros. |
| 139 | typedefs: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 139 | typedefs: std.array_hash_map.String(void) = .empty, | |
| 140 | 140 | |
| 141 | 141 | /// The lhs lval of a compound assignment expression. |
| 142 | 142 | compound_assign_dummy: ?ZigNode = null, |
lib/docs/wasm/Walk.zig+4-4| ... | ... | @@ -10,9 +10,9 @@ const Oom = error{OutOfMemory}; |
| 10 | 10 | |
| 11 | 11 | pub const Decl = @import("Decl.zig"); |
| 12 | 12 | |
| 13 | pub var files: std.StringArrayHashMapUnmanaged(File) = .empty; | |
| 13 | pub var files: std.array_hash_map.String(File) = .empty; | |
| 14 | 14 | pub var decls: std.ArrayList(Decl) = .empty; |
| 15 | pub var modules: std.StringArrayHashMapUnmanaged(File.Index) = .empty; | |
| 15 | pub var modules: std.array_hash_map.String(File.Index) = .empty; | |
| 16 | 16 | |
| 17 | 17 | file: File.Index, |
| 18 | 18 | |
| ... | ... | @@ -465,8 +465,8 @@ pub const Scope = struct { |
| 465 | 465 | const Namespace = struct { |
| 466 | 466 | base: Scope = .{ .tag = .namespace }, |
| 467 | 467 | parent: *Scope, |
| 468 | names: std.StringArrayHashMapUnmanaged(Ast.Node.Index) = .empty, | |
| 469 | doctests: std.StringArrayHashMapUnmanaged(Ast.Node.Index) = .empty, | |
| 468 | names: std.array_hash_map.String(Ast.Node.Index) = .empty, | |
| 469 | doctests: std.array_hash_map.String(Ast.Node.Index) = .empty, | |
| 470 | 470 | decl_index: Decl.Index, |
| 471 | 471 | }; |
| 472 | 472 |
lib/docs/wasm/main.zig+4-4| ... | ... | @@ -264,7 +264,7 @@ const ErrorIdentifier = packed struct(u64) { |
| 264 | 264 | }; |
| 265 | 265 | |
| 266 | 266 | var string_result: ArrayList(u8) = .empty; |
| 267 | var error_set_result: std.StringArrayHashMapUnmanaged(ErrorIdentifier) = .empty; | |
| 267 | var error_set_result: std.array_hash_map.String(ErrorIdentifier) = .empty; | |
| 268 | 268 | |
| 269 | 269 | export fn decl_error_set(decl_index: Decl.Index) Slice(ErrorIdentifier) { |
| 270 | 270 | return Slice(ErrorIdentifier).init(decl_error_set_fallible(decl_index) catch @panic("OOM")); |
| ... | ... | @@ -305,7 +305,7 @@ fn sort_error_set_result() void { |
| 305 | 305 | |
| 306 | 306 | fn addErrorsFromDecl( |
| 307 | 307 | decl_index: Decl.Index, |
| 308 | out: *std.StringArrayHashMapUnmanaged(ErrorIdentifier), | |
| 308 | out: *std.array_hash_map.String(ErrorIdentifier), | |
| 309 | 309 | ) Oom!void { |
| 310 | 310 | switch (decl_index.get().categorize()) { |
| 311 | 311 | .error_set => |node| try addErrorsFromExpr(decl_index, out, node), |
| ... | ... | @@ -316,7 +316,7 @@ fn addErrorsFromDecl( |
| 316 | 316 | |
| 317 | 317 | fn addErrorsFromExpr( |
| 318 | 318 | decl_index: Decl.Index, |
| 319 | out: *std.StringArrayHashMapUnmanaged(ErrorIdentifier), | |
| 319 | out: *std.array_hash_map.String(ErrorIdentifier), | |
| 320 | 320 | node: Ast.Node.Index, |
| 321 | 321 | ) Oom!void { |
| 322 | 322 | const decl = decl_index.get(); |
| ... | ... | @@ -343,7 +343,7 @@ fn addErrorsFromExpr( |
| 343 | 343 | |
| 344 | 344 | fn addErrorsFromNode( |
| 345 | 345 | decl_index: Decl.Index, |
| 346 | out: *std.StringArrayHashMapUnmanaged(ErrorIdentifier), | |
| 346 | out: *std.array_hash_map.String(ErrorIdentifier), | |
| 347 | 347 | node: Ast.Node.Index, |
| 348 | 348 | ) Oom!void { |
| 349 | 349 | const decl = decl_index.get(); |
lib/std/Build.zig+3-3| ... | ... | @@ -33,7 +33,7 @@ user_input_options: UserInputOptionsMap, |
| 33 | 33 | available_options_map: std.array_hash_map.String(AvailableOption) = .empty, |
| 34 | 34 | invalid_user_input: bool, |
| 35 | 35 | default_step: *Step, |
| 36 | top_level_steps: std.StringArrayHashMapUnmanaged(*Step.TopLevel), | |
| 36 | top_level_steps: std.array_hash_map.String(*Step.TopLevel), | |
| 37 | 37 | /// Path to the directory containing build.zig. |
| 38 | 38 | root: Cache.Path, |
| 39 | 39 | debug_log_scopes: []const []const u8 = &.{}, |
| ... | ... | @@ -78,11 +78,11 @@ pub const Graph = struct { |
| 78 | 78 | io: Io, |
| 79 | 79 | /// Process lifetime. |
| 80 | 80 | arena: Allocator, |
| 81 | system_integration_options: std.StringArrayHashMapUnmanaged(SystemLibraryMode) = .empty, | |
| 81 | system_integration_options: std.array_hash_map.String(SystemLibraryMode) = .empty, | |
| 82 | 82 | system_package_mode: bool = false, |
| 83 | 83 | zig_exe: []const u8, |
| 84 | 84 | environ_map: process.Environ.Map, |
| 85 | needed_lazy_dependencies: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 85 | needed_lazy_dependencies: std.array_hash_map.String(void) = .empty, | |
| 86 | 86 | /// Information about the native target. Computed before build() is invoked. |
| 87 | 87 | host: ResolvedTarget, |
| 88 | 88 | dependency_cache: InitializedDepMap = .empty, |
lib/std/Build/Module.zig+2-2| ... | ... | @@ -12,7 +12,7 @@ root_source_file: ?LazyPath, |
| 12 | 12 | /// The modules that are mapped into this module's import table. |
| 13 | 13 | /// Use `addImport` rather than modifying this field directly in order to |
| 14 | 14 | /// maintain step dependency edges. |
| 15 | import_table: std.StringArrayHashMapUnmanaged(*Module), | |
| 15 | import_table: std.array_hash_map.String(*Module), | |
| 16 | 16 | |
| 17 | 17 | resolved_target: ?std.Build.ResolvedTarget = null, |
| 18 | 18 | optimize: ?std.builtin.OptimizeMode = null, |
| ... | ... | @@ -22,7 +22,7 @@ c_macros: ArrayList([]const u8), |
| 22 | 22 | include_dirs: ArrayList(IncludeDir), |
| 23 | 23 | lib_paths: ArrayList(LazyPath), |
| 24 | 24 | rpaths: ArrayList(RPath), |
| 25 | frameworks: std.StringArrayHashMapUnmanaged(LinkFrameworkOptions), | |
| 25 | frameworks: std.array_hash_map.String(LinkFrameworkOptions), | |
| 26 | 26 | link_objects: ArrayList(LinkObject), |
| 27 | 27 | |
| 28 | 28 | strip: ?bool, |
lib/std/Build/Step/Compile.zig+1-1| ... | ... | @@ -187,7 +187,7 @@ entry: Entry = .default, |
| 187 | 187 | /// List of symbols forced as undefined in the symbol table |
| 188 | 188 | /// thus forcing their resolution by the linker. |
| 189 | 189 | /// Corresponds to `-u <symbol>` for ELF/MachO and `/include:<symbol>` for COFF/PE. |
| 190 | force_undefined_symbols: std.StringArrayHashMapUnmanaged(void), | |
| 190 | force_undefined_symbols: std.array_hash_map.String(void), | |
| 191 | 191 | |
| 192 | 192 | /// Overrides the default stack size |
| 193 | 193 | stack_size: ?u64 = null, |
lib/std/debug/MachOFile.zig+2-2| ... | ... | @@ -115,7 +115,7 @@ pub fn load(gpa: Allocator, io: Io, path: []const u8, arch: std.Target.Cpu.Arch) |
| 115 | 115 | // necessary because we prefer to use STAB ("symbolic debugging table") symbols, |
| 116 | 116 | // but they might not be present, so we track normal symbols too. |
| 117 | 117 | // Indices match 1-1 with those of `symbols`. |
| 118 | var symbol_names: std.StringArrayHashMapUnmanaged(void) = .empty; | |
| 118 | var symbol_names: std.array_hash_map.String(void) = .empty; | |
| 119 | 119 | defer symbol_names.deinit(gpa); |
| 120 | 120 | try symbol_names.ensureUnusedCapacity(gpa, symtab.nsyms); |
| 121 | 121 | |
| ... | ... | @@ -380,7 +380,7 @@ test { |
| 380 | 380 | |
| 381 | 381 | fn appendStabSymbol( |
| 382 | 382 | symbols: *std.ArrayList(Symbol), |
| 383 | symbol_names: *std.StringArrayHashMapUnmanaged(void), | |
| 383 | symbol_names: *std.array_hash_map.String(void), | |
| 384 | 384 | strings: []const u8, |
| 385 | 385 | last_sym: Symbol, |
| 386 | 386 | ) void { |
lib/std/json/hashmap.zig+4-4| ... | ... | @@ -6,20 +6,20 @@ const innerParse = @import("static.zig").innerParse; |
| 6 | 6 | const innerParseFromValue = @import("static.zig").innerParseFromValue; |
| 7 | 7 | const Value = @import("dynamic.zig").Value; |
| 8 | 8 | |
| 9 | /// A thin wrapper around `std.StringArrayHashMapUnmanaged` that implements | |
| 9 | /// A thin wrapper around `std.array_hash_map.String` that implements | |
| 10 | 10 | /// `jsonParse`, `jsonParseFromValue`, and `jsonStringify`. |
| 11 | 11 | /// This is useful when your JSON schema has an object with arbitrary data keys |
| 12 | 12 | /// instead of comptime-known struct field names. |
| 13 | 13 | pub fn ArrayHashMap(comptime T: type) type { |
| 14 | 14 | return struct { |
| 15 | map: std.StringArrayHashMapUnmanaged(T) = .empty, | |
| 15 | map: std.array_hash_map.String(T) = .empty, | |
| 16 | 16 | |
| 17 | 17 | pub fn deinit(self: *@This(), allocator: Allocator) void { |
| 18 | 18 | self.map.deinit(allocator); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | pub fn jsonParse(allocator: Allocator, source: anytype, options: ParseOptions) !@This() { |
| 22 | var map: std.StringArrayHashMapUnmanaged(T) = .empty; | |
| 22 | var map: std.array_hash_map.String(T) = .empty; | |
| 23 | 23 | errdefer map.deinit(allocator); |
| 24 | 24 | |
| 25 | 25 | if (.object_begin != try source.next()) return error.UnexpectedToken; |
| ... | ... | @@ -52,7 +52,7 @@ pub fn ArrayHashMap(comptime T: type) type { |
| 52 | 52 | pub fn jsonParseFromValue(allocator: Allocator, source: Value, options: ParseOptions) !@This() { |
| 53 | 53 | if (source != .object) return error.UnexpectedToken; |
| 54 | 54 | |
| 55 | var map: std.StringArrayHashMapUnmanaged(T) = .empty; | |
| 55 | var map: std.array_hash_map.String(T) = .empty; | |
| 56 | 56 | errdefer map.deinit(allocator); |
| 57 | 57 | |
| 58 | 58 | var it = source.object.iterator(); |
lib/std/process/Preopens.zig+1-1| ... | ... | @@ -16,7 +16,7 @@ pub const empty: Preopens = switch (native_os) { |
| 16 | 16 | |
| 17 | 17 | pub const Map = switch (native_os) { |
| 18 | 18 | // Indexed by file descriptor number. |
| 19 | .wasi => std.StringArrayHashMapUnmanaged(void), | |
| 19 | .wasi => std.array_hash_map.String(void), | |
| 20 | 20 | else => void, |
| 21 | 21 | }; |
| 22 | 22 |
lib/std/zig/Ast/Render.zig+1-1| ... | ... | @@ -42,7 +42,7 @@ pub const Fixups = struct { |
| 42 | 42 | /// These nodes will be replaced with a different node. |
| 43 | 43 | replace_nodes_with_node: std.AutoHashMapUnmanaged(Ast.Node.Index, Ast.Node.Index) = .empty, |
| 44 | 44 | /// Change all identifier names matching the key to be value instead. |
| 45 | rename_identifiers: std.StringArrayHashMapUnmanaged([]const u8) = .empty, | |
| 45 | rename_identifiers: std.array_hash_map.String([]const u8) = .empty, | |
| 46 | 46 | |
| 47 | 47 | /// All `@import` builtin calls which refer to a file path will be prefixed |
| 48 | 48 | /// with this path. |
src/Compilation.zig+4-4| ... | ... | @@ -87,7 +87,7 @@ link_inputs: []const link.Input, |
| 87 | 87 | framework_dirs: []const []const u8, |
| 88 | 88 | /// These are only for DLLs dependencies fulfilled by the `.def` files shipped |
| 89 | 89 | /// with Zig. Static libraries are provided as `link.Input` values. |
| 90 | windows_libs: std.StringArrayHashMapUnmanaged(void), | |
| 90 | windows_libs: std.array_hash_map.String(void), | |
| 91 | 91 | /// The number of items in `windows_libs` which we have already built. All items at or after this |
| 92 | 92 | /// index will be built in `performAllTheWork`. |
| 93 | 93 | windows_libs_num_done: u32, |
| ... | ... | @@ -101,7 +101,7 @@ native_system_include_paths: []const []const u8, |
| 101 | 101 | /// List of symbols forced as undefined in the symbol table |
| 102 | 102 | /// thus forcing their resolution by the linker. |
| 103 | 103 | /// Corresponds to `-u <symbol>` for ELF/MachO and `/include:<symbol>` for COFF/PE. |
| 104 | force_undefined_symbols: std.StringArrayHashMapUnmanaged(void), | |
| 104 | force_undefined_symbols: std.array_hash_map.String(void), | |
| 105 | 105 | |
| 106 | 106 | c_object_table: std.AutoArrayHashMapUnmanaged(*CObject, void) = .empty, |
| 107 | 107 | win32_resource_table: if (dev.env.supports(.win32_resource)) std.AutoArrayHashMapUnmanaged(*Win32Resource, void) else struct { |
| ... | ... | @@ -1604,7 +1604,7 @@ pub const CreateOptions = struct { |
| 1604 | 1604 | /// implementations still do. |
| 1605 | 1605 | lib_directories: []const Cache.Directory = &.{}, |
| 1606 | 1606 | rpath_list: []const []const u8 = &[0][]const u8{}, |
| 1607 | symbol_wrap_set: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 1607 | symbol_wrap_set: std.array_hash_map.String(void) = .empty, | |
| 1608 | 1608 | c_source_files: []const CSourceFile = &.{}, |
| 1609 | 1609 | rc_source_files: []const RcSourceFile = &.{}, |
| 1610 | 1610 | manifest_file: ?[]const u8 = null, |
| ... | ... | @@ -1683,7 +1683,7 @@ pub const CreateOptions = struct { |
| 1683 | 1683 | skip_linker_dependencies: bool = false, |
| 1684 | 1684 | hash_style: link.File.Lld.Elf.HashStyle = .both, |
| 1685 | 1685 | entry: Entry = .default, |
| 1686 | force_undefined_symbols: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 1686 | force_undefined_symbols: std.array_hash_map.String(void) = .empty, | |
| 1687 | 1687 | stack_size: ?u64 = null, |
| 1688 | 1688 | image_base: ?u64 = null, |
| 1689 | 1689 | version: ?std.SemanticVersion = null, |
src/Package/Fetch.zig+2-2| ... | ... | @@ -1725,7 +1725,7 @@ fn computeHash(f: *Fetch, pkg_path: Cache.Path, filter: Filter) RunError!Compute |
| 1725 | 1725 | |
| 1726 | 1726 | // Track directories which had any files deleted from them so that empty directories |
| 1727 | 1727 | // can be deleted. |
| 1728 | var sus_dirs: std.StringArrayHashMapUnmanaged(void) = .empty; | |
| 1728 | var sus_dirs: std.array_hash_map.String(void) = .empty; | |
| 1729 | 1729 | defer sus_dirs.deinit(gpa); |
| 1730 | 1730 | |
| 1731 | 1731 | var walker = try root_dir.walk(gpa); |
| ... | ... | @@ -2002,7 +2002,7 @@ fn normalizePath(bytes: []u8) void { |
| 2002 | 2002 | } |
| 2003 | 2003 | |
| 2004 | 2004 | const Filter = struct { |
| 2005 | include_paths: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 2005 | include_paths: std.array_hash_map.String(void) = .empty, | |
| 2006 | 2006 | |
| 2007 | 2007 | /// sub_path is relative to the package root. |
| 2008 | 2008 | pub fn includePath(self: *const Filter, sub_path: []const u8) bool { |
src/Package/Manifest.zig+4-4| ... | ... | @@ -42,9 +42,9 @@ name: []const u8, |
| 42 | 42 | id: u32, |
| 43 | 43 | version: std.SemanticVersion, |
| 44 | 44 | version_node: Ast.Node.Index, |
| 45 | dependencies: std.StringArrayHashMapUnmanaged(Dependency), | |
| 45 | dependencies: std.array_hash_map.String(Dependency), | |
| 46 | 46 | dependencies_node: Ast.Node.OptionalIndex, |
| 47 | paths: std.StringArrayHashMapUnmanaged(void), | |
| 47 | paths: std.array_hash_map.String(void), | |
| 48 | 48 | minimum_zig_version: ?std.SemanticVersion, |
| 49 | 49 | |
| 50 | 50 | errors: []ErrorMessage, |
| ... | ... | @@ -144,9 +144,9 @@ const Parse = struct { |
| 144 | 144 | id: u32, |
| 145 | 145 | version: std.SemanticVersion, |
| 146 | 146 | version_node: Ast.Node.Index, |
| 147 | dependencies: std.StringArrayHashMapUnmanaged(Dependency), | |
| 147 | dependencies: std.array_hash_map.String(Dependency), | |
| 148 | 148 | dependencies_node: Ast.Node.OptionalIndex, |
| 149 | paths: std.StringArrayHashMapUnmanaged(void), | |
| 149 | paths: std.array_hash_map.String(void), | |
| 150 | 150 | allow_missing_paths_field: bool, |
| 151 | 151 | minimum_zig_version: ?std.SemanticVersion, |
| 152 | 152 |
src/Package/Module.zig+1-1| ... | ... | @@ -35,7 +35,7 @@ cc_argv: []const []const u8, |
| 35 | 35 | structured_cfg: bool, |
| 36 | 36 | no_builtin: bool, |
| 37 | 37 | |
| 38 | pub const Deps = std.StringArrayHashMapUnmanaged(*Module); | |
| 38 | 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. |
src/codegen/llvm/FuncGen.zig+1-1| ... | ... | @@ -2513,7 +2513,7 @@ fn airAssembly(self: *FuncGen, inst: Air.Inst.Index) TodoError!Builder.Value { |
| 2513 | 2513 | var llvm_param_i: usize = 0; |
| 2514 | 2514 | var total_i: usize = 0; |
| 2515 | 2515 | |
| 2516 | var name_map: std.StringArrayHashMapUnmanaged(u16) = .empty; | |
| 2516 | var name_map: std.array_hash_map.String(u16) = .empty; | |
| 2517 | 2517 | try name_map.ensureUnusedCapacity(arena, max_param_count); |
| 2518 | 2518 | |
| 2519 | 2519 | var it = unwrapped_asm.iterateOutputs(); |
src/codegen/spirv/Assembler.zig+2-2| ... | ... | @@ -35,8 +35,8 @@ inst: struct { |
| 35 | 35 | return null; |
| 36 | 36 | } |
| 37 | 37 | } = .{}, |
| 38 | value_map: std.StringArrayHashMapUnmanaged(AsmValue) = .{}, | |
| 39 | inst_map: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 38 | value_map: std.array_hash_map.String(AsmValue) = .{}, | |
| 39 | inst_map: std.array_hash_map.String(void) = .empty, | |
| 40 | 40 | |
| 41 | 41 | const Operand = union(enum) { |
| 42 | 42 | /// Any 'simple' 32-bit value. This could be a mask or |
src/codegen/spirv/Module.zig+1-1| ... | ... | @@ -66,7 +66,7 @@ cache: struct { |
| 66 | 66 | extended_instruction_set: std.AutoHashMapUnmanaged(spec.InstructionSet, Id) = .empty, |
| 67 | 67 | decorations: std.AutoHashMapUnmanaged(struct { Id, spec.Decoration }, void) = .empty, |
| 68 | 68 | builtins: std.AutoHashMapUnmanaged(struct { spec.BuiltIn, spec.StorageClass }, Decl.Index) = .empty, |
| 69 | strings: std.StringArrayHashMapUnmanaged(Id) = .empty, | |
| 69 | strings: std.array_hash_map.String(Id) = .empty, | |
| 70 | 70 | |
| 71 | 71 | bool_const: [2]?Id = .{ null, null }, |
| 72 | 72 | constants: std.ArrayHashMapUnmanaged(Constant, Id, Constant.HashContext, true) = .empty, |
src/libs/mingw/implib.zig+1-1| ... | ... | @@ -245,7 +245,7 @@ pub fn getMembers( |
| 245 | 245 | }; |
| 246 | 246 | var renames: std.ArrayList(DeferredExport) = .empty; |
| 247 | 247 | defer renames.deinit(allocator); |
| 248 | var regular_imports: std.StringArrayHashMapUnmanaged([]const u8) = .empty; | |
| 248 | var regular_imports: std.array_hash_map.String([]const u8) = .empty; | |
| 249 | 249 | defer regular_imports.deinit(allocator); |
| 250 | 250 | |
| 251 | 251 | for (module_def.exports.items) |*e| { |
src/link.zig+1-1| ... | ... | @@ -471,7 +471,7 @@ pub const File = struct { |
| 471 | 471 | /// wrapper for a system function. The wrapper function should be called |
| 472 | 472 | /// __wrap_symbol. If it wishes to call the system function, it should call |
| 473 | 473 | /// __real_symbol. |
| 474 | symbol_wrap_set: std.StringArrayHashMapUnmanaged(void), | |
| 474 | symbol_wrap_set: std.array_hash_map.String(void), | |
| 475 | 475 | |
| 476 | 476 | compatibility_version: ?std.SemanticVersion, |
| 477 | 477 |
src/link/Elf.zig+4-4| ... | ... | @@ -2,7 +2,7 @@ pub const Atom = @import("Elf/Atom.zig"); |
| 2 | 2 | |
| 3 | 3 | base: link.File, |
| 4 | 4 | zig_object: ?*ZigObject, |
| 5 | rpath_table: std.StringArrayHashMapUnmanaged(void), | |
| 5 | rpath_table: std.array_hash_map.String(void), | |
| 6 | 6 | image_base: u64, |
| 7 | 7 | z_nodelete: bool, |
| 8 | 8 | z_notext: bool, |
| ... | ... | @@ -30,7 +30,7 @@ file_handles: std.ArrayList(File.Handle) = .empty, |
| 30 | 30 | zig_object_index: ?File.Index = null, |
| 31 | 31 | linker_defined_index: ?File.Index = null, |
| 32 | 32 | objects: std.ArrayList(File.Index) = .empty, |
| 33 | shared_objects: std.StringArrayHashMapUnmanaged(File.Index) = .empty, | |
| 33 | shared_objects: std.array_hash_map.String(File.Index) = .empty, | |
| 34 | 34 | |
| 35 | 35 | /// List of all output sections and their associated metadata. |
| 36 | 36 | sections: std.MultiArrayList(Section) = .{}, |
| ... | ... | @@ -249,7 +249,7 @@ pub fn createEmpty( |
| 249 | 249 | const is_dyn_lib = output_mode == .Lib and link_mode == .dynamic; |
| 250 | 250 | const default_sym_version: elf.Versym = if (is_dyn_lib or comp.config.rdynamic) .GLOBAL else .LOCAL; |
| 251 | 251 | |
| 252 | var rpath_table: std.StringArrayHashMapUnmanaged(void) = .empty; | |
| 252 | var rpath_table: std.array_hash_map.String(void) = .empty; | |
| 253 | 253 | try rpath_table.entries.resize(arena, options.rpath_list.len); |
| 254 | 254 | @memcpy(rpath_table.entries.items(.key), options.rpath_list); |
| 255 | 255 | try rpath_table.reIndex(arena); |
| ... | ... | @@ -1112,7 +1112,7 @@ fn parseDso( |
| 1112 | 1112 | io: Io, |
| 1113 | 1113 | diags: *Diags, |
| 1114 | 1114 | dso: link.Input.Dso, |
| 1115 | shared_objects: *std.StringArrayHashMapUnmanaged(File.Index), | |
| 1115 | shared_objects: *std.array_hash_map.String(File.Index), | |
| 1116 | 1116 | files: *std.MultiArrayList(File.Entry), |
| 1117 | 1117 | target: *const std.Target, |
| 1118 | 1118 | ) !void { |
src/link/MachO/Dylib.zig+1-1| ... | ... | @@ -14,7 +14,7 @@ symbols: std.ArrayList(Symbol) = .empty, |
| 14 | 14 | symbols_extra: std.ArrayList(u32) = .empty, |
| 15 | 15 | globals: std.ArrayList(MachO.SymbolResolver.Index) = .empty, |
| 16 | 16 | dependents: std.ArrayList(Id) = .empty, |
| 17 | rpaths: std.StringArrayHashMapUnmanaged(void) = .empty, | |
| 17 | rpaths: std.array_hash_map.String(void) = .empty, | |
| 18 | 18 | umbrella: File.Index, |
| 19 | 19 | platform: ?MachO.Platform = null, |
| 20 | 20 |
src/link/Wasm/Archive.zig+1-1| ... | ... | @@ -12,7 +12,7 @@ toc: Toc, |
| 12 | 12 | |
| 13 | 13 | /// Key points into `LazyArchive` `file_contents`. |
| 14 | 14 | /// Value is allocated with gpa. |
| 15 | const Toc = std.StringArrayHashMapUnmanaged(std.ArrayList(u32)); | |
| 15 | const Toc = std.array_hash_map.String(std.ArrayList(u32)); | |
| 16 | 16 | |
| 17 | 17 | const ARMAG = std.elf.ARMAG; |
| 18 | 18 | const ARFMAG = std.elf.ARFMAG; |
src/main.zig+6-6| ... | ... | @@ -987,7 +987,7 @@ fn buildOutputType( |
| 987 | 987 | var test_no_exec = false; |
| 988 | 988 | var test_execve = false; |
| 989 | 989 | var entry: Compilation.CreateOptions.Entry = .default; |
| 990 | var force_undefined_symbols: std.StringArrayHashMapUnmanaged(void) = .empty; | |
| 990 | var force_undefined_symbols: std.array_hash_map.String(void) = .empty; | |
| 991 | 991 | var stack_size: ?u64 = null; |
| 992 | 992 | var image_base: ?u64 = null; |
| 993 | 993 | var link_eh_frame_hdr = false; |
| ... | ... | @@ -1024,7 +1024,7 @@ fn buildOutputType( |
| 1024 | 1024 | // These are before resolving sysroot. |
| 1025 | 1025 | var extra_cflags: std.ArrayList([]const u8) = .empty; |
| 1026 | 1026 | var extra_rcflags: std.ArrayList([]const u8) = .empty; |
| 1027 | var symbol_wrap_set: std.StringArrayHashMapUnmanaged(void) = .empty; | |
| 1027 | var symbol_wrap_set: std.array_hash_map.String(void) = .empty; | |
| 1028 | 1028 | var rc_includes: std.zig.RcIncludes = .any; |
| 1029 | 1029 | var manifest_file: ?[]const u8 = null; |
| 1030 | 1030 | var linker_export_symbol_names: std.ArrayList([]const u8) = .empty; |
| ... | ... | @@ -3592,7 +3592,7 @@ fn buildOutputType( |
| 3592 | 3592 | defer file_system_inputs.deinit(gpa); |
| 3593 | 3593 | |
| 3594 | 3594 | // Deduplicate rpath entries |
| 3595 | var rpath_dedup = std.StringArrayHashMapUnmanaged(void){}; | |
| 3595 | var rpath_dedup = std.array_hash_map.String(void){}; | |
| 3596 | 3596 | for (create_module.rpath_list.items) |rpath| { |
| 3597 | 3597 | try rpath_dedup.put(arena, rpath, {}); |
| 3598 | 3598 | } |
| ... | ... | @@ -3896,7 +3896,7 @@ fn buildOutputType( |
| 3896 | 3896 | |
| 3897 | 3897 | const CreateModule = struct { |
| 3898 | 3898 | dirs: Compilation.Directories, |
| 3899 | modules: std.StringArrayHashMapUnmanaged(CliModule), | |
| 3899 | modules: std.array_hash_map.String(CliModule), | |
| 3900 | 3900 | opts: Compilation.Config.Options, |
| 3901 | 3901 | dynamic_linker: ?[]const u8, |
| 3902 | 3902 | object_format: ?[]const u8, |
| ... | ... | @@ -3908,7 +3908,7 @@ const CreateModule = struct { |
| 3908 | 3908 | /// link_libcpp, and then the libraries are filtered into |
| 3909 | 3909 | /// `unresolved_link_inputs` and `windows_libs`. |
| 3910 | 3910 | cli_link_inputs: std.ArrayList(link.UnresolvedInput), |
| 3911 | windows_libs: std.StringArrayHashMapUnmanaged(void), | |
| 3911 | windows_libs: std.array_hash_map.String(void), | |
| 3912 | 3912 | /// The local variable `unresolved_link_inputs` is fed into library |
| 3913 | 3913 | /// resolution, mutating the input array, and producing this data as |
| 3914 | 3914 | /// output. Allocated with gpa. |
| ... | ... | @@ -3926,7 +3926,7 @@ const CreateModule = struct { |
| 3926 | 3926 | lib_dir_args: std.ArrayList([]const u8), |
| 3927 | 3927 | libc_installation: ?LibCInstallation, |
| 3928 | 3928 | want_native_include_dirs: bool, |
| 3929 | frameworks: std.StringArrayHashMapUnmanaged(Framework), | |
| 3929 | frameworks: std.array_hash_map.String(Framework), | |
| 3930 | 3930 | native_system_include_paths: []const []const u8, |
| 3931 | 3931 | framework_dirs: std.ArrayList([]const u8), |
| 3932 | 3932 | rpath_list: std.ArrayList([]const u8), |