Skip to content
Permalink
Browse files

Fix a bug in the optimer where to optimalization where improperly com…

…bining

This was causing problems on the js and jvm backend.
When optimizing $var += ... into nqp::assign_i($var, $var + ...) $var was
being used twice.
When optimizing $var + ... and turning $var from lexicalref to lexical $var use
in nqp::assign_i($var, ...) was also affected.
  • Loading branch information...
pmurias committed Sep 6, 2018
1 parent 5d1d792 commit e436f4e53a6c8eb3702e27b30f3fc1065bda8f68
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Perl6/Optimizer.nqp
@@ -2005,7 +2005,9 @@ class Perl6::Optimizer {
else {
return NQPMu;
}
$assignee := $assignee_var := $op[1];
$assignee := $op[1];
# other optimizations might want to change this independently
$assignee_var := nqp::clone($op[1]);
}
else {
$assignop := 'p6store';

0 comments on commit e436f4e

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