Skip to content

Commit 6aba3c2

Browse files
committed
remove useless condition, BenGoldberg++
1 parent fad34d4 commit 6aba3c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vm/moar/QAST/QASTRegexCompilerMAST.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ class QAST::MASTRegexCompiler {
574574
}
575575
if $max > 1 {
576576
my $maxreg := fresh_i();
577-
nqp::push(@ins, op('const_i64', $maxreg, ival($max))) if $max > 1;
577+
nqp::push(@ins, op('const_i64', $maxreg, ival($max)));
578578
nqp::push(@ins, op('ge_i', $ireg, $rep, $maxreg));
579579
nqp::push(@ins, op('if_i', $ireg, $donelabel));
580580
release($maxreg, $MVM_reg_int64);
@@ -593,7 +593,7 @@ class QAST::MASTRegexCompiler {
593593
nqp::push(@ins, op('inc_i', $rep));
594594
if $max > 1 {
595595
my $maxreg := fresh_i();
596-
nqp::push(@ins, op('const_i64', $maxreg, ival($max))) if $max > 1;
596+
nqp::push(@ins, op('const_i64', $maxreg, ival($max)));
597597
nqp::push(@ins, op('ge_i', $ireg, $rep, $maxreg));
598598
nqp::push(@ins, op('if_i', $ireg, $donelabel));
599599
release($maxreg, $MVM_reg_int64);

0 commit comments

Comments
 (0)