Skip to content
Permalink
Browse files

Optimize more ops on native attributes

By re-writing into native ops.
  • Loading branch information...
MasterDuke17 committed Oct 19, 2018
1 parent b84b090 commit b107cda574aeca38fdc0f6e96609fb6e4b60e002
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Perl6/Optimizer.nqp
@@ -1913,7 +1913,7 @@ class Perl6::Optimizer {
$op.op: 'callstatic'; # by now we know 'tis a core op

# if we got a native int/num, we can rewrite into nqp ops
if nqp::istype($var,QAST::Var) && $var.scope eq 'lexicalref'
if nqp::istype($var,QAST::Var) && ($var.scope eq 'lexicalref' || $var.scope eq 'attributeref')
&& ((my $primspec := nqp::objprimspec($var.returns)) == 1 # native int
|| $primspec == 2 || $primspec == 4 || $primspec == 5) # native num or "emulated" 64bit int
{

0 comments on commit b107cda

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