| author | |
| committer | |
| log | d2f6fa1608f31cbd7137f81b5dd6df2977766eae |
| tree | fc4636cb8846a60995c353bbace342fc08544862 |
| parent | 1ca2deca33e5ee489e12bd71a34ec3e4a2e1255f |
5 files changed, 14 insertions(+), 13 deletions(-)
src/Module.zig+7-7| ... | ... | @@ -918,7 +918,7 @@ pub fn ensureDeclAnalyzed(self: *Module, decl: *Decl) InnerError!void { |
| 918 | 918 | .complete => return, |
| 919 | 919 | |
| 920 | 920 | .outdated => blk: { |
| 921 | log.debug("re-analyzing {}\n", .{decl.name}); | |
| 921 | log.debug("re-analyzing {s}\n", .{decl.name}); | |
| 922 | 922 | |
| 923 | 923 | // The exports this Decl performs will be re-discovered, so we remove them here |
| 924 | 924 | // prior to re-analysis. |
| ... | ... | @@ -1663,7 +1663,7 @@ pub fn analyzeContainer(self: *Module, container_scope: *Scope.Container) !void |
| 1663 | 1663 | // Handle explicitly deleted decls from the source code. Not to be confused |
| 1664 | 1664 | // with when we delete decls because they are no longer referenced. |
| 1665 | 1665 | for (deleted_decls.items()) |entry| { |
| 1666 | log.debug("noticed '{}' deleted from source\n", .{entry.key.name}); | |
| 1666 | log.debug("noticed '{s}' deleted from source\n", .{entry.key.name}); | |
| 1667 | 1667 | try self.deleteDecl(entry.key); |
| 1668 | 1668 | } |
| 1669 | 1669 | } |
| ... | ... | @@ -1716,7 +1716,7 @@ pub fn analyzeRootZIRModule(self: *Module, root_scope: *Scope.ZIRModule) !void { |
| 1716 | 1716 | // Handle explicitly deleted decls from the source code. Not to be confused |
| 1717 | 1717 | // with when we delete decls because they are no longer referenced. |
| 1718 | 1718 | for (deleted_decls.items()) |entry| { |
| 1719 | log.debug("noticed '{}' deleted from source\n", .{entry.key.name}); | |
| 1719 | log.debug("noticed '{s}' deleted from source\n", .{entry.key.name}); | |
| 1720 | 1720 | try self.deleteDecl(entry.key); |
| 1721 | 1721 | } |
| 1722 | 1722 | } |
| ... | ... | @@ -1728,7 +1728,7 @@ pub fn deleteDecl(self: *Module, decl: *Decl) !void { |
| 1728 | 1728 | // not be present in the set, and this does nothing. |
| 1729 | 1729 | decl.scope.removeDecl(decl); |
| 1730 | 1730 | |
| 1731 | log.debug("deleting decl '{}'\n", .{decl.name}); | |
| 1731 | log.debug("deleting decl '{s}'\n", .{decl.name}); | |
| 1732 | 1732 | const name_hash = decl.fullyQualifiedNameHash(); |
| 1733 | 1733 | self.decl_table.removeAssertDiscard(name_hash); |
| 1734 | 1734 | // Remove itself from its dependencies, because we are about to destroy the decl pointer. |
| ... | ... | @@ -1819,17 +1819,17 @@ pub fn analyzeFnBody(self: *Module, decl: *Decl, func: *Fn) !void { |
| 1819 | 1819 | const fn_zir = func.analysis.queued; |
| 1820 | 1820 | defer fn_zir.arena.promote(self.gpa).deinit(); |
| 1821 | 1821 | func.analysis = .{ .in_progress = {} }; |
| 1822 | log.debug("set {} to in_progress\n", .{decl.name}); | |
| 1822 | log.debug("set {s} to in_progress\n", .{decl.name}); | |
| 1823 | 1823 | |
| 1824 | 1824 | try zir_sema.analyzeBody(self, &inner_block.base, fn_zir.body); |
| 1825 | 1825 | |
| 1826 | 1826 | const instructions = try arena.allocator.dupe(*Inst, inner_block.instructions.items); |
| 1827 | 1827 | func.analysis = .{ .success = .{ .instructions = instructions } }; |
| 1828 | log.debug("set {} to success\n", .{decl.name}); | |
| 1828 | log.debug("set {s} to success\n", .{decl.name}); | |
| 1829 | 1829 | } |
| 1830 | 1830 | |
| 1831 | 1831 | fn markOutdatedDecl(self: *Module, decl: *Decl) !void { |
| 1832 | log.debug("mark {} outdated\n", .{decl.name}); | |
| 1832 | log.debug("mark {s} outdated\n", .{decl.name}); | |
| 1833 | 1833 | try self.comp.work_queue.writeItem(.{ .analyze_decl = decl }); |
| 1834 | 1834 | if (self.failed_decls.remove(decl)) |entry| { |
| 1835 | 1835 | entry.value.destroy(self.gpa); |
src/link/Elf.zig+2-2| ... | ... | @@ -2300,7 +2300,7 @@ pub fn updateDecl(self: *Elf, module: *Module, decl: *Module.Decl) !void { |
| 2300 | 2300 | !mem.isAlignedGeneric(u64, local_sym.st_value, required_alignment); |
| 2301 | 2301 | if (need_realloc) { |
| 2302 | 2302 | const vaddr = try self.growTextBlock(&decl.link.elf, code.len, required_alignment); |
| 2303 | log.debug("growing {} from 0x{x} to 0x{x}\n", .{ decl.name, local_sym.st_value, vaddr }); | |
| 2303 | log.debug("growing {s} from 0x{x} to 0x{x}\n", .{ decl.name, local_sym.st_value, vaddr }); | |
| 2304 | 2304 | if (vaddr != local_sym.st_value) { |
| 2305 | 2305 | local_sym.st_value = vaddr; |
| 2306 | 2306 | |
| ... | ... | @@ -2322,7 +2322,7 @@ pub fn updateDecl(self: *Elf, module: *Module, decl: *Module.Decl) !void { |
| 2322 | 2322 | const decl_name = mem.spanZ(decl.name); |
| 2323 | 2323 | const name_str_index = try self.makeString(decl_name); |
| 2324 | 2324 | const vaddr = try self.allocateTextBlock(&decl.link.elf, code.len, required_alignment); |
| 2325 | log.debug("allocated text block for {} at 0x{x}\n", .{ decl_name, vaddr }); | |
| 2325 | log.debug("allocated text block for {s} at 0x{x}\n", .{ decl_name, vaddr }); | |
| 2326 | 2326 | errdefer self.freeTextBlock(&decl.link.elf); |
| 2327 | 2327 | |
| 2328 | 2328 | local_sym.* = .{ |
src/test.zig+1-1| ... | ... | @@ -660,7 +660,7 @@ pub const TestContext = struct { |
| 660 | 660 | } |
| 661 | 661 | } |
| 662 | 662 | if (comp.bin_file.cast(link.File.C)) |c_file| { |
| 663 | std.debug.print("Generated C: \n===============\n{}\n\n===========\n\n", .{ | |
| 663 | std.debug.print("Generated C: \n===============\n{s}\n\n===========\n\n", .{ | |
| 664 | 664 | c_file.main.items, |
| 665 | 665 | }); |
| 666 | 666 | } |
test/compare_output.zig+2-2| ... | ... | @@ -453,7 +453,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 453 | 453 | \\ _ = args_it.skip(); |
| 454 | 454 | \\ while (args_it.next(allocator)) |arg_or_err| : (index += 1) { |
| 455 | 455 | \\ const arg = try arg_or_err; |
| 456 | \\ try stdout.print("{}: {}\n", .{index, arg}); | |
| 456 | \\ try stdout.print("{}: {s}\n", .{index, arg}); | |
| 457 | 457 | \\ } |
| 458 | 458 | \\} |
| 459 | 459 | , |
| ... | ... | @@ -492,7 +492,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 492 | 492 | \\ _ = args_it.skip(); |
| 493 | 493 | \\ while (args_it.next(allocator)) |arg_or_err| : (index += 1) { |
| 494 | 494 | \\ const arg = try arg_or_err; |
| 495 | \\ try stdout.print("{}: {}\n", .{index, arg}); | |
| 495 | \\ try stdout.print("{}: {s}\n", .{index, arg}); | |
| 496 | 496 | \\ } |
| 497 | 497 | \\} |
| 498 | 498 | , |
test/stage1/behavior/async_fn.zig+2-1| ... | ... | @@ -2,6 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | 3 | const expect = std.testing.expect; |
| 4 | 4 | const expectEqual = std.testing.expectEqual; |
| 5 | const expectEqualStrings = std.testing.expectEqualStrings; | |
| 5 | 6 | const expectError = std.testing.expectError; |
| 6 | 7 | |
| 7 | 8 | var global_x: i32 = 1; |
| ... | ... | @@ -541,7 +542,7 @@ test "pass string literal to async function" { |
| 541 | 542 | fn hello(msg: []const u8) void { |
| 542 | 543 | frame = @frame(); |
| 543 | 544 | suspend; |
| 544 | expectEqual(@as([]const u8, "hello"), msg); | |
| 545 | expectEqualStrings("hello", msg); | |
| 545 | 546 | ok = true; |
| 546 | 547 | } |
| 547 | 548 | }; |