| ... | @@ -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(); |
| 2944 | | 2944 | |
| | 2945 | const ip = &mod.intern_pool; |
| 2945 | const decl = mod.declPtr(decl_index); | 2946 | const decl = mod.declPtr(decl_index); |
| 2946 | | 2947 | |
| 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 | }); |
| 2951 | | 2952 | |
| 2952 | // Determine whether or not this Decl is outdated, i.e. requires re-analysis | 2953 | // 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 | } |
| 2993 | | 2994 | |
| 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 | } |
| 3013 | | 3011 | |
| | 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) { |