Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some pir:: -> nqp:: in prep for JVM support.
  • Loading branch information
jnthn committed Oct 3, 2013
1 parent af2f675 commit c901e44
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions bin/perl6-debug.nqp
Expand Up @@ -49,7 +49,7 @@ grammar Perl6::HookRegexGrammar is Perl6::RegexGrammar {
class Perl6::HookRegexActions is Perl6::RegexActions {
method nibbler($/) {
if $*RX_TOP_LEVEL_NIBBLER && $*DEBUG_HOOKS.has_hook('regex_region') {
my $file := pir::find_caller_lex__Ps('$?FILES') // '<unknown>';
my $file := nqp::getlexcaller('$?FILES') // '<unknown>';
$*DEBUG_HOOKS.get_hook('regex_region')($file, $/.from, $/.to);
}
Perl6::RegexActions.nibbler($/);
Expand Down Expand Up @@ -77,7 +77,7 @@ class Perl6::HookRegexActions is Perl6::RegexActions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('regex_atom')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_numeric_constant($/, 'Int', $/.from),
$*W.add_numeric_constant($/, 'Int', $/.to)
Expand All @@ -104,7 +104,7 @@ grammar QRegex::P5Regex::HookGrammar is Perl6::P5RegexGrammar {
class QRegex::P5Regex::HookActions is Perl6::P5RegexActions {
method nibbler($/) {
if $*RX_TOP_LEVEL_NIBBLER && $*DEBUG_HOOKS.has_hook('regex_region') {
my $file := pir::find_caller_lex__Ps('$?FILES') // '<unknown>';
my $file := nqp::getlexcaller('$?FILES') // '<unknown>';
$*DEBUG_HOOKS.get_hook('regex_region')($file, $/.from, $/.to);
}
QRegex::P5Regex::Actions.nibbler($/);
Expand All @@ -122,7 +122,7 @@ class QRegex::P5Regex::HookActions is Perl6::P5RegexActions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('regex_atom')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_numeric_constant($/, 'Int', $/.from),
$*W.add_numeric_constant($/, 'Int', $/.to)
Expand Down Expand Up @@ -183,7 +183,7 @@ class Perl6::HookActions is Perl6::Actions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('statement_simple')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_numeric_constant($/, 'Int', $/.from),
$*W.add_numeric_constant($/, 'Int', $/.to)
Expand All @@ -203,7 +203,7 @@ class Perl6::HookActions is Perl6::Actions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('statement_cond')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_string_constant('if'),
$*W.add_numeric_constant($/, 'Int', $from),
Expand All @@ -224,7 +224,7 @@ class Perl6::HookActions is Perl6::Actions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('statement_cond')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_string_constant(~$<sym>),
$*W.add_numeric_constant($/, 'Int', $<sym>.from),
Expand Down Expand Up @@ -253,7 +253,7 @@ class Perl6::HookActions is Perl6::Actions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('statement_cond')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_string_constant(~$<wu>),
$*W.add_numeric_constant($/, 'Int', $<wu>.from),
Expand All @@ -274,7 +274,7 @@ class Perl6::HookActions is Perl6::Actions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('statement_cond')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_string_constant('loop'),
$*W.add_numeric_constant($/, 'Int', widen_expr_from($m[0])),
Expand Down Expand Up @@ -330,7 +330,7 @@ class Perl6::HookActions is Perl6::Actions {
QAST::Op.new(
:op('call'),
QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('statement_simple')) ),
$*W.add_string_constant(pir::find_caller_lex__Ps('$?FILES') // '<unknown>'),
$*W.add_string_constant(nqp::getlexcaller('$?FILES') // '<unknown>'),
ps_qast(),
$*W.add_numeric_constant($/, 'Int', $/.from),
$*W.add_numeric_constant($/, 'Int', $/.to)
Expand All @@ -342,7 +342,7 @@ class Perl6::HookActions is Perl6::Actions {

sub routine_hook($/, $body, $type, $name) {
if $*DEBUG_HOOKS.has_hook('routine_region') {
my $file := pir::find_caller_lex__Ps('$?FILES') // '<unknown>';
my $file := nqp::getlexcaller('$?FILES') // '<unknown>';
$*DEBUG_HOOKS.get_hook('routine_region')($file, $/.from, $/.to, $type, $name);
}
}
Expand Down Expand Up @@ -373,7 +373,7 @@ class Perl6::HookGrammar is Perl6::Grammar {
my %seen_files;

method statementlist() {
my $file := pir::find_caller_lex__Ps('$?FILES') // '<unknown>';
my $file := nqp::getlexcaller('$?FILES') // '<unknown>';
unless nqp::existskey(%*SEEN_FILES, $file) {
if $*DEBUG_HOOKS.has_hook('new_file') {
# First time we've seen this file; register it.
Expand Down Expand Up @@ -421,7 +421,7 @@ class Perl6::HookGrammar is Perl6::Grammar {
my $comment := $c.MATCH.Str;
if $comment ~~ /'#?BREAK'/ {
if $*DEBUG_HOOKS.has_hook('new_breakpoint') {
my $file := pir::find_caller_lex__Ps('$?FILES') // '<unknown>';
my $file := nqp::getlexcaller('$?FILES') // '<unknown>';
$*DEBUG_HOOKS.get_hook('new_breakpoint')($file, $c.MATCH().from());
}
}
Expand Down

0 comments on commit c901e44

Please sign in to comment.