Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Partially revert "tiny performance tweaks in the parrot regex compiler"
This reverts parts of commit bdbb63a.

Apparently $I12 is required to not change its value in here.
  • Loading branch information
timo committed Nov 21, 2013
1 parent c293015 commit 4aea5a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/vm/parrot/QAST/Compiler.nqp
Expand Up @@ -1467,13 +1467,13 @@ class QAST::Compiler is HLL::Compiler {
$ops.push_pirop('downcase', '$S10', '$S10');
$ops.push_pirop($cmpop, '$S10', $litpost, %*REG<fail>);
} elsif $litlen == 1 {
$ops.push_pirop('ord', '$I12', %*REG<tgt>, %*REG<pos>);
$ops.push_pirop($cmpop, '$I12', nqp::ord($litconst), %*REG<fail>);
$ops.push_pirop('ord', '$I11', %*REG<tgt>, %*REG<pos>);
$ops.push_pirop($cmpop, '$I11', nqp::ord($litconst), %*REG<fail>);
} else {
$ops.push_pirop('nqp_string_equal_at', '$I12', %*REG<tgt>, $litpost, %*REG<pos>);
$ops.push_pirop($cmpop, '$I12', 1, %*REG<fail>);
$ops.push_pirop('nqp_string_equal_at', '$I11', %*REG<tgt>, $litpost, %*REG<pos>);
$ops.push_pirop($cmpop, '$I11', 1, %*REG<fail>);
}
$ops.push_pirop('set', %*REG<pos>, '$I11');
$ops.push_pirop('add', %*REG<pos>, $litlen);
$ops;
}

Expand Down

0 comments on commit 4aea5a1

Please sign in to comment.