Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove premature optimization.
Need to always update %?LANG.
  • Loading branch information
jnthn committed Oct 21, 2012
1 parent 70b4b22 commit 2ad86ea
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Perl6/Grammar.pm
Expand Up @@ -2923,13 +2923,9 @@ grammar Perl6::Grammar is HLL::Grammar {
self.HOW.mixin(self, Circumfix.HOW.curry(Circumfix, $canname, @parts[0], @parts[1]));
}

# This also becomes the current MAIN. If we didn't place the current
# braid into a lexical %?LANG, also do that.
# This also becomes the current MAIN. Also place it in %?LANG.
%*LANG<MAIN> := self;
my $curpad := $*W.cur_lexpad();
unless $curpad.symbol('%?LANG') {
$*W.install_lexical_symbol($curpad, '%?LANG', $*W.p6ize_recursive(%*LANG));
}
$*W.install_lexical_symbol($*W.cur_lexpad(), '%?LANG', $*W.p6ize_recursive(%*LANG));

# May also need to add to the actions.
# XXX Should be mixed in too.
Expand Down

0 comments on commit 2ad86ea

Please sign in to comment.