| ... | ... | @@ -76,7 +76,7 @@ global_error_set: std.StringHashMapUnmanaged(u16) = .{}, |
| 76 | 76 | generation: u32 = 0, |
| 77 | 77 | |
| 78 | 78 | /// Keys are fully qualified paths |
| 79 | | import_table: std.StringHashMapUnmanaged(*Scope.File) = .{}, |
| 79 | import_table: std.StringArrayHashMapUnmanaged(*Scope.File) = .{}, |
| 80 | 80 | |
| 81 | 81 | stage1_flags: packed struct { |
| 82 | 82 | have_winmain: bool = false, |
| ... | ... | @@ -541,6 +541,7 @@ pub const Scope = struct { |
| 541 | 541 | self.decls.deinit(gpa); |
| 542 | 542 | // TODO either Container of File should have an arena for sub_file_path and ty |
| 543 | 543 | gpa.destroy(self.ty.cast(Type.Payload.EmptyStruct).?); |
| 544 | gpa.free(self.file_scope.sub_file_path); |
| 544 | 545 | self.* = undefined; |
| 545 | 546 | } |
| 546 | 547 | |
| ... | ... | @@ -857,6 +858,11 @@ pub fn deinit(self: *Module) void { |
| 857 | 858 | gpa.free(entry.key); |
| 858 | 859 | } |
| 859 | 860 | self.global_error_set.deinit(gpa); |
| 861 | |
| 862 | for (self.import_table.items()) |entry| { |
| 863 | entry.value.base.destroy(gpa); |
| 864 | } |
| 865 | self.import_table.deinit(gpa); |
| 860 | 866 | } |
| 861 | 867 | |
| 862 | 868 | fn freeExportList(gpa: *Allocator, export_list: []*Export) void { |