Created
July 7, 2014 22:37
-
-
Save jnthn/eedc2eff5cbaeab83c06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Optimizer.nqp b/src/Perl6/Optimizer.nqp | |
index 7c099bd..fc25f78 100644 | |
--- a/src/Perl6/Optimizer.nqp | |
+++ b/src/Perl6/Optimizer.nqp | |
@@ -474,8 +474,8 @@ my class BlockVarOptimizer { | |
method is_poisoned() { $!poisoned } | |
method is_flattenable() { | |
+ return 0 if $!poisoned || $!uses_bindsig; | |
for %!decls { | |
- return 0 if $_.value.scope eq 'lexical'; | |
return 0 if $_.value.decl eq 'param'; | |
} | |
1 | |
@@ -871,7 +871,7 @@ class Perl6::Optimizer { | |
# If the block is immediate, we may be able to inline it. | |
my int $flattened := 0; | |
my $result := $block; | |
- if $block.blocktype eq 'immediate' && !$*DYNAMICALLY_COMPILED && !$vars_info.is_poisoned { | |
+ if $block.blocktype eq 'immediate' && !$*DYNAMICALLY_COMPILED && $vars_info.is_flattenable { | |
# Scan symbols for any non-interesting ones. | |
my @sigsyms; | |
for $block.symtable() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment