Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Can also lower $_.
Before, this earned us a SEGV in the Rakudo setting compile, but now
that issue is fixed, we can do this optimization.
  • Loading branch information
jnthn committed May 16, 2014
1 parent 6a7aa4b commit 96ef351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NQP/Optimizer.nqp
Expand Up @@ -95,7 +95,7 @@ class NQP::Optimizer {
unless nqp::existskey(%!usages_inner, $name) {
# Lowerable if it's a normal variable.
next if nqp::chars($name) < 2;
if $name ne 'self' && $name ne '$/' {
if $name ne 'self' && $name ne '$/' && $name ne '$_' {
my str $sigil := nqp::substr($name, 0, 1);
next unless $sigil eq '$' || $sigil eq '@' || $sigil eq '%';
next unless nqp::iscclass(nqp::const::CCLASS_ALPHABETIC, $name, 1);
Expand Down

0 comments on commit 96ef351

Please sign in to comment.