authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-28 22:43:11-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-28 22:43:16-04:00
log5d77fede896ff7446e9946f91c74b7632b63253e
treeb83c3d6b74fe3f299de9a1869e4b64e614d2fa5e
parent0bd89979fdc42a7fd14fe127ac8a586d7c170444

remove debug log statements


2 files changed, 9 insertions(+), 9 deletions(-)

src-self-hosted/Module.zig+4-4
...@@ -879,7 +879,7 @@ fn analyzeRoot(self: *Module, root_scope: *Scope.ZIRModule) !void {...@@ -879,7 +879,7 @@ fn analyzeRoot(self: *Module, root_scope: *Scope.ZIRModule) !void {
879 deleted_decls.removeAssertDiscard(decl);879 deleted_decls.removeAssertDiscard(decl);
880 const new_contents_hash = Decl.hashSimpleName(src_decl.contents);880 const new_contents_hash = Decl.hashSimpleName(src_decl.contents);
881 if (!mem.eql(u8, &new_contents_hash, &decl.contents_hash)) {881 if (!mem.eql(u8, &new_contents_hash, &decl.contents_hash)) {
882 std.debug.warn("noticed '{}' source changed\n", .{src_decl.name});882 //std.debug.warn("noticed '{}' source changed\n", .{src_decl.name});
883 decl.analysis = .outdated;883 decl.analysis = .outdated;
884 decl.contents_hash = new_contents_hash;884 decl.contents_hash = new_contents_hash;
885 try self.work_queue.writeItem(.{ .re_analyze_decl = decl });885 try self.work_queue.writeItem(.{ .re_analyze_decl = decl });
...@@ -893,7 +893,7 @@ fn analyzeRoot(self: *Module, root_scope: *Scope.ZIRModule) !void {...@@ -893,7 +893,7 @@ fn analyzeRoot(self: *Module, root_scope: *Scope.ZIRModule) !void {
893 // with when we delete decls because they are no longer referenced.893 // with when we delete decls because they are no longer referenced.
894 var it = deleted_decls.iterator();894 var it = deleted_decls.iterator();
895 while (it.next()) |kv| {895 while (it.next()) |kv| {
896 std.debug.warn("noticed '{}' deleted from source\n", .{kv.key.name});896 //std.debug.warn("noticed '{}' deleted from source\n", .{kv.key.name});
897 try self.deleteDecl(kv.key);897 try self.deleteDecl(kv.key);
898 }898 }
899 }899 }
...@@ -905,7 +905,7 @@ fn analyzeRoot(self: *Module, root_scope: *Scope.ZIRModule) !void {...@@ -905,7 +905,7 @@ fn analyzeRoot(self: *Module, root_scope: *Scope.ZIRModule) !void {
905}905}
906906
907fn deleteDecl(self: *Module, decl: *Decl) !void {907fn deleteDecl(self: *Module, decl: *Decl) !void {
908 std.debug.warn("deleting decl '{}'\n", .{decl.name});908 //std.debug.warn("deleting decl '{}'\n", .{decl.name});
909 const name_hash = decl.fullyQualifiedNameHash();909 const name_hash = decl.fullyQualifiedNameHash();
910 self.decl_table.removeAssertDiscard(name_hash);910 self.decl_table.removeAssertDiscard(name_hash);
911 // Remove itself from its dependencies, because we are about to destroy the decl pointer.911 // Remove itself from its dependencies, because we are about to destroy the decl pointer.
...@@ -1004,7 +1004,7 @@ fn reAnalyzeDecl(self: *Module, decl: *Decl, old_inst: *zir.Inst) InnerError!voi...@@ -1004,7 +1004,7 @@ fn reAnalyzeDecl(self: *Module, decl: *Decl, old_inst: *zir.Inst) InnerError!voi
10041004
1005 .outdated => {}, // Decl re-analysis1005 .outdated => {}, // Decl re-analysis
1006 }1006 }
1007 std.debug.warn("re-analyzing {}\n", .{decl.name});1007 //std.debug.warn("re-analyzing {}\n", .{decl.name});
1008 decl.src = old_inst.src;1008 decl.src = old_inst.src;
10091009
1010 // The exports this Decl performs will be re-discovered, so we remove them here1010 // The exports this Decl performs will be re-discovered, so we remove them here
src-self-hosted/link.zig+5-5
...@@ -956,10 +956,10 @@ pub const ElfFile = struct {...@@ -956,10 +956,10 @@ pub const ElfFile = struct {
956 try self.offset_table_free_list.ensureCapacity(self.allocator, self.local_symbols.items.len);956 try self.offset_table_free_list.ensureCapacity(self.allocator, self.local_symbols.items.len);
957957
958 if (self.local_symbol_free_list.popOrNull()) |i| {958 if (self.local_symbol_free_list.popOrNull()) |i| {
959 std.debug.warn("reusing symbol index {} for {}\n", .{i, decl.name});959 //std.debug.warn("reusing symbol index {} for {}\n", .{i, decl.name});
960 decl.link.local_sym_index = i;960 decl.link.local_sym_index = i;
961 } else {961 } else {
962 std.debug.warn("allocating symbol index {} for {}\n", .{self.local_symbols.items.len, decl.name});962 //std.debug.warn("allocating symbol index {} for {}\n", .{self.local_symbols.items.len, decl.name});
963 decl.link.local_sym_index = @intCast(u32, self.local_symbols.items.len);963 decl.link.local_sym_index = @intCast(u32, self.local_symbols.items.len);
964 _ = self.local_symbols.addOneAssumeCapacity();964 _ = self.local_symbols.addOneAssumeCapacity();
965 }965 }
...@@ -1027,11 +1027,11 @@ pub const ElfFile = struct {...@@ -1027,11 +1027,11 @@ pub const ElfFile = struct {
1027 !mem.isAlignedGeneric(u64, local_sym.st_value, required_alignment);1027 !mem.isAlignedGeneric(u64, local_sym.st_value, required_alignment);
1028 if (need_realloc) {1028 if (need_realloc) {
1029 const vaddr = try self.growTextBlock(&decl.link, code.len, required_alignment);1029 const vaddr = try self.growTextBlock(&decl.link, code.len, required_alignment);
1030 std.debug.warn("growing {} from 0x{x} to 0x{x}\n", .{ decl.name, local_sym.st_value, vaddr });1030 //std.debug.warn("growing {} from 0x{x} to 0x{x}\n", .{ decl.name, local_sym.st_value, vaddr });
1031 if (vaddr != local_sym.st_value) {1031 if (vaddr != local_sym.st_value) {
1032 local_sym.st_value = vaddr;1032 local_sym.st_value = vaddr;
10331033
1034 std.debug.warn(" (writing new offset table entry)\n", .{});1034 //std.debug.warn(" (writing new offset table entry)\n", .{});
1035 self.offset_table.items[decl.link.offset_table_index] = vaddr;1035 self.offset_table.items[decl.link.offset_table_index] = vaddr;
1036 try self.writeOffsetTableEntry(decl.link.offset_table_index);1036 try self.writeOffsetTableEntry(decl.link.offset_table_index);
1037 }1037 }
...@@ -1049,7 +1049,7 @@ pub const ElfFile = struct {...@@ -1049,7 +1049,7 @@ pub const ElfFile = struct {
1049 const decl_name = mem.spanZ(decl.name);1049 const decl_name = mem.spanZ(decl.name);
1050 const name_str_index = try self.makeString(decl_name);1050 const name_str_index = try self.makeString(decl_name);
1051 const vaddr = try self.allocateTextBlock(&decl.link, code.len, required_alignment);1051 const vaddr = try self.allocateTextBlock(&decl.link, code.len, required_alignment);
1052 std.debug.warn("allocated text block for {} at 0x{x}\n", .{ decl_name, vaddr });1052 //std.debug.warn("allocated text block for {} at 0x{x}\n", .{ decl_name, vaddr });
1053 errdefer self.freeTextBlock(&decl.link);1053 errdefer self.freeTextBlock(&decl.link);
10541054
1055 local_sym.* = .{1055 local_sym.* = .{