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) = .{},
7676generation: u32 = 0,
7777
7878/// Keys are fully qualified paths
79import_table: std.StringHashMapUnmanaged(*Scope.File) = .{},
79import_table: std.StringArrayHashMapUnmanaged(*Scope.File) = .{},
8080
8181stage1_flags: packed struct {
8282 have_winmain: bool = false,
......@@ -541,6 +541,7 @@ pub const Scope = struct {
541541 self.decls.deinit(gpa);
542542 // TODO either Container of File should have an arena for sub_file_path and ty
543543 gpa.destroy(self.ty.cast(Type.Payload.EmptyStruct).?);
544 gpa.free(self.file_scope.sub_file_path);
544545 self.* = undefined;
545546 }
546547
......@@ -857,6 +858,11 @@ pub fn deinit(self: *Module) void {
857858 gpa.free(entry.key);
858859 }
859860 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);
860866}
861867
862868fn freeExportList(gpa: *Allocator, export_list: []*Export) void {