| ... | @@ -36,7 +36,7 @@ bin_file_path: []const u8, | ... | @@ -36,7 +36,7 @@ bin_file_path: []const u8, |
| 36 | decl_exports: std.AutoHashMapUnmanaged(*Decl, []*Export) = .{}, | 36 | decl_exports: std.AutoHashMapUnmanaged(*Decl, []*Export) = .{}, |
| 37 | /// We track which export is associated with the given symbol name for quick | 37 | /// We track which export is associated with the given symbol name for quick |
| 38 | /// detection of symbol collisions. | 38 | /// detection of symbol collisions. |
| 39 | symbol_exports: std.StringHashMap(*Export), | 39 | symbol_exports: std.StringHashMapUnmanaged(*Export) = .{}, |
| 40 | /// This models the Decls that perform exports, so that `decl_exports` can be updated when a Decl | 40 | /// This models the Decls that perform exports, so that `decl_exports` can be updated when a Decl |
| 41 | /// is modified. Note that the key of this table is not the Decl being exported, but the Decl that | 41 | /// is modified. Note that the key of this table is not the Decl being exported, but the Decl that |
| 42 | /// is performing the export of another Decl. | 42 | /// is performing the export of another Decl. |
| ... | @@ -769,7 +769,6 @@ pub fn init(gpa: *Allocator, options: InitOptions) !Module { | ... | @@ -769,7 +769,6 @@ pub fn init(gpa: *Allocator, options: InitOptions) !Module { |
| 769 | .bin_file_path = options.bin_file_path, | 769 | .bin_file_path = options.bin_file_path, |
| 770 | .bin_file = bin_file, | 770 | .bin_file = bin_file, |
| 771 | .optimize_mode = options.optimize_mode, | 771 | .optimize_mode = options.optimize_mode, |
| 772 | .symbol_exports = std.StringHashMap(*Export).init(gpa), | | |
| 773 | .work_queue = std.fifo.LinearFifo(WorkItem, .Dynamic).init(gpa), | 772 | .work_queue = std.fifo.LinearFifo(WorkItem, .Dynamic).init(gpa), |
| 774 | .keep_source_files_loaded = options.keep_source_files_loaded, | 773 | .keep_source_files_loaded = options.keep_source_files_loaded, |
| 775 | }; | 774 | }; |
| ... | @@ -812,7 +811,7 @@ pub fn deinit(self: *Module) void { | ... | @@ -812,7 +811,7 @@ pub fn deinit(self: *Module) void { |
| 812 | } | 811 | } |
| 813 | self.export_owners.deinit(gpa); | 812 | self.export_owners.deinit(gpa); |
| 814 | | 813 | |
| 815 | self.symbol_exports.deinit(); | 814 | self.symbol_exports.deinit(gpa); |
| 816 | self.root_scope.destroy(gpa); | 815 | self.root_scope.destroy(gpa); |
| 817 | self.* = undefined; | 816 | self.* = undefined; |
| 818 | } | 817 | } |
| ... | @@ -2305,7 +2304,7 @@ fn analyzeExport(self: *Module, scope: *Scope, src: usize, symbol_name: []const | ... | @@ -2305,7 +2304,7 @@ fn analyzeExport(self: *Module, scope: *Scope, src: usize, symbol_name: []const |
| 2305 | return; | 2304 | return; |
| 2306 | } | 2305 | } |
| 2307 | | 2306 | |
| 2308 | try self.symbol_exports.putNoClobber(symbol_name, new_export); | 2307 | try self.symbol_exports.putNoClobber(self.gpa, symbol_name, new_export); |
| 2309 | self.bin_file.updateDeclExports(self, exported_decl, de_gop.entry.value) catch |err| switch (err) { | 2308 | self.bin_file.updateDeclExports(self, exported_decl, de_gop.entry.value) catch |err| switch (err) { |
| 2310 | error.OutOfMemory => return error.OutOfMemory, | 2309 | error.OutOfMemory => return error.OutOfMemory, |
| 2311 | else => { | 2310 | else => { |