Skip to content

Commit f014bdc

Browse files
committed
Handle an optimization escape hatch for the way $_, $!, $/ and %_ are handled.
1 parent 8dfe9bb commit f014bdc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/QAST/Compiler.nqp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ class QAST::Compiler is HLL::Compiler {
506506
elsif $scope eq 'lexical' {
507507
# If the lexical is directly declared in this block, we use the
508508
# register directly.
509-
if $*BLOCK.lexical_type($name) -> $type {
509+
my %sym := $*BLOCK.qast.symbol($name);
510+
if (!%sym || !%sym<lazyinit>) && $*BLOCK.lexical_type($name) -> $type {
510511
my $reg := $*BLOCK.lex_reg($name);
511512
if $*BINDVAL {
512513
my $valpost := self.coerce(self.as_post_clear_bindval($*BINDVAL), nqp::lc($type));

0 commit comments

Comments
 (0)