Skip to content

Commit

Permalink
Produce better copy for $foo is copy
Browse files Browse the repository at this point in the history
We were doing it in a way that did not use the spesh assignment plugin
on MoarVM. That further cost other optimization opportunities, for
example scalar replacement of the Scalar container.
  • Loading branch information
jnthn committed Mar 12, 2020
1 parent be9c139 commit 5cad8fe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Perl6/Actions.nqp
Expand Up @@ -9393,11 +9393,8 @@ class Perl6::Actions is HLL::Actions does STDActions {
WANTED(QAST::Var.new( :name(%info<variable_name>), :scope('lexical') ),'lower_signature/wrap'),
nqp::existskey(%info, 'container_descriptor')
?? QAST::Op.new(
:op('assignunchecked'),
QAST::Op.new(
:op('p6scalarfromdesc'),
QAST::WVal.new( :value(%info<container_descriptor>) )
),
:op('p6scalarwithvalue'),
QAST::WVal.new( :value(%info<container_descriptor>) ),
QAST::Var.new( :name(get_decont_name() || $name), :scope('local') )
)
!! QAST::Op.new(
Expand Down

0 comments on commit 5cad8fe

Please sign in to comment.