Skip to content

Commit 90050fd

Browse files
committed
buglet
1 parent ca7e1b9 commit 90050fd

13 files changed

+5
-12
lines changed

src/QRegex/Cursor.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ class NQPMatch is NQPCapture {
653653
method Num() is parrot_vtable('get_number') { +self.Str() }
654654
#?endif
655655
#?if !parrot
656-
method Str() { nqp::substr($!orig, $!from, $!to-$!from) }
656+
method Str() { $!to > $!from ?? nqp::substr($!orig, $!from, $!to-$!from) !! '' }
657657
method Int() { +self.Str() }
658658
method Num() { +self.Str() }
659659
#?endif

src/vm/moar/QAST/QASTOperationsMAST.nqp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ QAST::MASTOperations.add_core_op('call', sub ($qastcomp, $op) {
962962
return $qastcomp.as_mast(QAST::Op.new( :op($realname), |$op.list ));
963963
}
964964

965+
say(42);
965966
# Work out what callee is.
966967
my $callee;
967968
my @args := $op.list;

src/vm/moar/QAST/QASTRegexCompilerMAST.nqp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -432,17 +432,8 @@ class QAST::MASTRegexCompiler {
432432

433433
method enumcharlist($node) {
434434
my @ins;
435-
if $node.negate {
436-
my $ok := label(self.unique($*RXPREFIX ~ '_enumcharlist'));
437-
nqp::push(@ins,
438-
op('indexat_scb', %*REG<tgt>, %*REG<pos>, sval($node[0]), $ok));
439-
nqp::push(@ins, op('goto', %*REG<fail>));
440-
nqp::push(@ins, $ok);
441-
}
442-
else {
443-
nqp::push(@ins,
444-
op('indexat_scb', %*REG<tgt>, %*REG<pos>, sval($node[0]), %*REG<fail>));
445-
}
435+
my $op := $node.negate ?? 'indexnat' !! 'indexat';
436+
nqp::push(@ins, op($op, %*REG<tgt>, %*REG<pos>, sval($node[0]), %*REG<fail>));
446437
nqp::push(@ins, op('inc_i', %*REG<pos>))
447438
unless $node.subtype eq 'zerowidth';
448439
@ins
0 Bytes
Binary file not shown.
168 Bytes
Binary file not shown.

src/vm/moar/stage0/NQPHLLMoar.moarvm

1.04 KB
Binary file not shown.
824 Bytes
Binary file not shown.

src/vm/moar/stage0/QASTMoar.moarvm

232 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src/vm/moar/stage0/QRegexMoar.moarvm

484 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)