Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
un-hang qregex tests due to indexnat op
Test is not clean though. There seems to be three issues:a) a heisenbug
b) an issue resolving frame labels and c) a problem with "baabbbb" ~~ /a**2..4/
  • Loading branch information
FROGGS committed Oct 9, 2013
1 parent ca7e1b9 commit da02211
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/vm/moar/QAST/QASTOperationsMAST.nqp
Expand Up @@ -962,6 +962,7 @@ QAST::MASTOperations.add_core_op('call', sub ($qastcomp, $op) {
return $qastcomp.as_mast(QAST::Op.new( :op($realname), |$op.list ));
}

# heisenbug!!!
# Work out what callee is.
my $callee;
my @args := $op.list;
Expand Down
13 changes: 2 additions & 11 deletions src/vm/moar/QAST/QASTRegexCompilerMAST.nqp
Expand Up @@ -432,17 +432,8 @@ class QAST::MASTRegexCompiler {

method enumcharlist($node) {
my @ins;
if $node.negate {
my $ok := label(self.unique($*RXPREFIX ~ '_enumcharlist'));
nqp::push(@ins,
op('indexat_scb', %*REG<tgt>, %*REG<pos>, sval($node[0]), $ok));
nqp::push(@ins, op('goto', %*REG<fail>));
nqp::push(@ins, $ok);
}
else {
nqp::push(@ins,
op('indexat_scb', %*REG<tgt>, %*REG<pos>, sval($node[0]), %*REG<fail>));
}
my $op := $node.negate ?? 'indexnat' !! 'indexat';
nqp::push(@ins, op($op, %*REG<tgt>, %*REG<pos>, sval($node[0]), %*REG<fail>));
nqp::push(@ins, op('inc_i', %*REG<pos>))
unless $node.subtype eq 'zerowidth';
@ins
Expand Down
Binary file modified src/vm/moar/stage0/ModuleLoader.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/NQPCOREMoar.setting.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/NQPHLLMoar.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/NQPP6QRegexMoar.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/QASTMoar.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/QASTNodesMoar.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/QRegexMoar.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/nqp-mo.moarvm
Binary file not shown.
Binary file modified src/vm/moar/stage0/nqp.moarvm
Binary file not shown.
1 change: 1 addition & 0 deletions t/qregex/01-qregex.t
Expand Up @@ -46,6 +46,7 @@ sub test_line($line) {

my $rxcomp := nqp::getcomp('QRegex::P6Regex');
try {
# heisenbug!!!
my $rxsub := $rxcomp.compile($regex);
my $cursor := NQPCursor."!cursor_init"($target, :c(0));
my $match := $rxsub($cursor).MATCH;
Expand Down

0 comments on commit da02211

Please sign in to comment.