Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace some Q:PIR with the various new ops.
  • Loading branch information
jnthn committed Oct 25, 2012
1 parent f80be32 commit a01efec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
6 changes: 1 addition & 5 deletions src/HLL/Compiler.pm
Expand Up @@ -174,11 +174,7 @@ class HLL::Compiler {
}

method ctxsave() {
$*MAIN_CTX :=
Q:PIR {
$P0 = getinterp
%r = $P0['context';1]
};
$*MAIN_CTX := nqp::ctxcaller(nqp::ctx());
$*CTXSAVE := 0;
}

Expand Down
5 changes: 1 addition & 4 deletions src/HLL/Grammar.pm
Expand Up @@ -323,10 +323,7 @@ of the match.

method FAILGOAL($goal, $dba?) {
unless $dba {
$dba := ~Q:PIR{
%r = getinterp
%r = %r['sub';1]
};
$dba := ~nqp::callercode();
}
self.panic("Unable to parse expression in $dba; couldn't find final $goal");
}
Expand Down
6 changes: 1 addition & 5 deletions src/ModuleLoader.pm
Expand Up @@ -32,11 +32,7 @@ knowhow ModuleLoader {
}

method ctxsave() {
$*MAIN_CTX :=
Q:PIR {
$P0 = getinterp
%r = $P0['context';1]
};
$*MAIN_CTX := nqp::ctxcaller(nqp::ctx());
$*CTXSAVE := 0;
}

Expand Down
10 changes: 2 additions & 8 deletions src/QRegex/Cursor.nqp
Expand Up @@ -82,10 +82,7 @@ role NQPCursorRole is export {

method !cursor_start() {
my $new := nqp::create(self);
my $sub := Q:PIR {
$P0 = getinterp
%r = $P0['sub';1]
};
my $sub := nqp::callercode();
nqp::bindattr($new, $?CLASS, '$!orig', $!orig);
nqp::bindattr($new, $?CLASS, '$!regexsub', nqp::ifnull(nqp::getcodeobj($sub), $sub));
if nqp::defined($!restart) {
Expand Down Expand Up @@ -465,10 +462,7 @@ role NQPCursorRole is export {

method FAILGOAL($goal, $dba?) {
unless $dba {
$dba := ~Q:PIR{
%r = getinterp
%r = %r['sub';1]
};
$dba := ~nqp::callercode();
}
nqp::die("Unable to parse expression in $dba; couldn't find final $goal");
}
Expand Down

0 comments on commit a01efec

Please sign in to comment.