File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ class PIRT::Sub is PIRT::Node {
210
210
211
211
# Compile sub contents, collecting any nested blocks.
212
212
my @ * PIRT_BLOCKS ;
213
+ my $ * SUB_LINE := -1 ;
213
214
nqp :: push (@ parts , self . children_pir(@ ! children ));
214
215
215
216
# Sub postlude.
@@ -280,12 +281,15 @@ class PIRT::Ops is PIRT::Node {
280
281
}
281
282
282
283
method pir () {
283
- my $ pir := self . children_pir( @ ! children ) ;
284
+ my $ ann := ' ' ;
284
285
if $ ! node {
285
286
my $ line := HLL::Compiler. lineof($ ! node . orig(), $ ! node . from (), : cache(1 ));
286
- $ pir := " .annotate 'line', $ line\n $ pir" ;
287
+ if $ line != $ * SUB_LINE {
288
+ $ ann := " .annotate 'line', $ line\n " ;
289
+ $ * SUB_LINE := $ line ;
290
+ }
287
291
}
288
- $ pir
292
+ $ ann ~ self . children_pir( @ ! children );
289
293
}
290
294
}
291
295
You can’t perform that action at this time.
0 commit comments