Skip to content

Commit

Permalink
Emit file annotation so backtraces have file names.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed May 30, 2010
1 parent 6e39fe1 commit 34542f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Perl6/Actions.pm
Expand Up @@ -101,6 +101,12 @@ method comp_unit($/, $key?) {
)
);

# Add file annotation.
my $file := pir::find_caller_lex__ps('$?FILES');
unless pir::isnull($file) {
$unit.unshift(PAST::Op.new(:inline(".annotate 'file', '" ~ $file ~ "'")));
}

# Remove the outer module package.
@PACKAGE.shift;

Expand Down

0 comments on commit 34542f7

Please sign in to comment.