Skip to content
Browse files

Allow lowering of direct lexical params too

Some cases of `$_` that we'll want to lower look like this. I'm not sure
it will net anything else, but it tests clean, and will allow for easier
bissection later if it does cause problems.
  • Loading branch information...
jnthn committed Jan 2, 2019
1 parent 33f79fe commit f741374ca6c441c66c8961977e85a86426c03c5f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Perl6/Optimizer.nqp
@@ -631,7 +631,7 @@ my class BlockVarOptimizer {
next unless $scope eq 'lexical';
my str $decl := $qast.decl;
my int $is_contvar := $decl eq 'contvar';
next unless $is_contvar || $decl eq 'var';
next unless $is_contvar || $decl eq 'var' || $decl eq 'param';

# Also ensure not dynamic or with an implicit lexical usage.
next if $qast.ann('lexical_used_implicitly');

0 comments on commit f741374

Please sign in to comment.
You can’t perform that action at this time.