Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure we callstatic the NQPCORE.setting subs.
  • Loading branch information
jnthn committed May 16, 2014
1 parent 25d9faa commit 6a7aa4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NQP/Optimizer.nqp
Expand Up @@ -205,7 +205,7 @@ class NQP::Optimizer {
elsif $opname eq 'call' && $op.name {
my @sym := self.find_lex_scope_level($op.name);
if @sym {
if @sym[0]<declared> && @sym[1] <= 1 {
if (@sym[0]<declared> || nqp::existskey(@sym[0], 'value')) && @sym[1] <= 1 {
# It's known at compile time and not closure-ish, so we can
# use a more optimal call op.
$op.op('callstatic');
Expand Down

0 comments on commit 6a7aa4b

Please sign in to comment.