authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-09-09 18:21:50+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-09-30 17:00:55+03:00
loge246fe0f5bdf1168171f79570af16cd3e79665a6
tree936ee81a83b92ab6488170479d61f9b0d711594b
parente2cf2e015bf2afe816593458a3cad9e5baaab095
signature Commit is signed but in an unrecognized format.

stage2: detect changes in imported files


1 files changed, 7 insertions(+), 1 deletions(-)

src/Module.zig+7-1
...@@ -76,7 +76,7 @@ global_error_set: std.StringHashMapUnmanaged(u16) = .{},...@@ -76,7 +76,7 @@ global_error_set: std.StringHashMapUnmanaged(u16) = .{},
76generation: u32 = 0,76generation: u32 = 0,
7777
78/// Keys are fully qualified paths78/// Keys are fully qualified paths
79import_table: std.StringHashMapUnmanaged(*Scope.File) = .{},79import_table: std.StringArrayHashMapUnmanaged(*Scope.File) = .{},
8080
81stage1_flags: packed struct {81stage1_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 ty542 // 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 }
546547
...@@ -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}
861867
862fn freeExportList(gpa: *Allocator, export_list: []*Export) void {868fn freeExportList(gpa: *Allocator, export_list: []*Export) void {