Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Last active December 20, 2015 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/a7aad862205d70c5d7f3 to your computer and use it in GitHub Desktop.
Save FROGGS/a7aad862205d70c5d7f3 to your computer and use it in GitHub Desktop.
diff --git a/nqp-cc/src/QASTRegexCompilerMAST.nqp b/nqp-cc/src/QASTRegexCompilerMAST.nqp
index 01f6f4a..e01695a 100644
--- a/nqp-cc/src/QASTRegexCompilerMAST.nqp
+++ b/nqp-cc/src/QASTRegexCompilerMAST.nqp
@@ -481,9 +481,11 @@ class QAST::MASTRegexCompiler {
my @flags := [$Arg::obj, $Arg::int];
my $op;
my $meth := fresh_o();
+ release($meth, $MVM_reg_obj);
+ nqp::push(@ins, op('findmeth', $meth, %*REG<cur>, sval('!cursor_pass')));
if $node.name {
my $sname := fresh_s();
- nqp::push(@ins, op('const_s', sval($node.name)));
+ nqp::push(@ins, op('const_s', $sname, sval($node.name)));
nqp::push(@args, $sname);
nqp::push(@flags, $Arg::str);
}
@@ -492,12 +494,9 @@ class QAST::MASTRegexCompiler {
nqp::push(@args, %*REG<one>);
nqp::push(@flags, $Arg::named +| $Arg::int);
}
- release($meth, $MVM_reg_obj);
- [
- op('findmeth', $meth, %*REG<cur>, sval('!cursor_pass')),
- call($meth, @flags, :result($meth), |@args),
- op('return_o', %*REG<cur>)
- ]
+ nqp::push(@ins, call($meth, @flags, :result($meth), |@args));
+ nqp::push(@ins, op('return_o', %*REG<cur>));
+ @ins
}
sub resolve_condition_op($kind, $negated) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment