Skip to content

Commit

Permalink
When we're (int|num)ifying a list or hash...
Browse files Browse the repository at this point in the history
re-write into an nqp::elems(). Spesh can do this too, but if we can do
it earlier, why not do so.
  • Loading branch information
MasterDuke17 committed Mar 19, 2020
1 parent 9266fb5 commit 019e162
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/NQP/Optimizer.nqp
Expand Up @@ -293,6 +293,7 @@ class NQP::Optimizer {
if nqp::istype($op[0], QAST::Var) {
my $sigil := nqp::substr($op[0].name, 0, 1);
if $sigil eq '@' || $sigil eq '%' {
$op.op('elems');
$op.returns(int)
}
}
Expand Down

0 comments on commit 019e162

Please sign in to comment.