authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-24 10:51:14-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-27 20:56:48-07:00
log352dc2c06a470d88c33dfbfdf3fdbb093097775c
treeb858cf07c4c4a8658fa1979e947d5466c1aae567
parent70e39c1a20842a2e1579d5ff76845cd1121a907b

compiler: show decl name in progress node


1 files changed, 5 insertions(+), 4 deletions(-)

src/Module.zig+5-4
...@@ -2942,11 +2942,12 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {...@@ -2942,11 +2942,12 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {
2942 const tracy = trace(@src());2942 const tracy = trace(@src());
2943 defer tracy.end();2943 defer tracy.end();
29442944
2945 const ip = &mod.intern_pool;
2945 const decl = mod.declPtr(decl_index);2946 const decl = mod.declPtr(decl_index);
29462947
2947 log.debug("ensureDeclAnalyzed '{d}' (name '{}')", .{2948 log.debug("ensureDeclAnalyzed '{d}' (name '{}')", .{
2948 @intFromEnum(decl_index),2949 @intFromEnum(decl_index),
2949 decl.name.fmt(&mod.intern_pool),2950 decl.name.fmt(ip),
2950 });2951 });
29512952
2952 // Determine whether or not this Decl is outdated, i.e. requires re-analysis2953 // Determine whether or not this Decl is outdated, i.e. requires re-analysis
...@@ -2991,9 +2992,6 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {...@@ -2991,9 +2992,6 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {
2991 try mod.deleteDeclExports(decl_index);2992 try mod.deleteDeclExports(decl_index);
2992 }2993 }
29932994
2994 const decl_prog_node = mod.sema_prog_node.start("", 0);
2995 defer decl_prog_node.end();
2996
2997 const sema_result: SemaDeclResult = blk: {2995 const sema_result: SemaDeclResult = blk: {
2998 if (decl.zir_decl_index == .none and !mod.declIsRoot(decl_index)) {2996 if (decl.zir_decl_index == .none and !mod.declIsRoot(decl_index)) {
2999 // Anonymous decl. We don't semantically analyze these.2997 // Anonymous decl. We don't semantically analyze these.
...@@ -3011,6 +3009,9 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {...@@ -3011,6 +3009,9 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl_index: Decl.Index) SemaError!void {
3011 };3009 };
3012 }3010 }
30133011
3012 const decl_prog_node = mod.sema_prog_node.start(decl.name.toSlice(ip), 0);
3013 defer decl_prog_node.end();
3014
3014 break :blk mod.semaDecl(decl_index) catch |err| switch (err) {3015 break :blk mod.semaDecl(decl_index) catch |err| switch (err) {
3015 error.AnalysisFail => {3016 error.AnalysisFail => {
3016 if (decl.analysis == .in_progress) {3017 if (decl.analysis == .in_progress) {