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