Skip to content

Commit

Permalink
[js] Disable constant folding in the optimizer as it's causing trouble
Browse files Browse the repository at this point in the history
A .Slip seems to be called when doing folding in the setting.
Due to to a bug with BEGIN time multimethods (also shared on the moarvm) backend it's causing looping.
  • Loading branch information
pmurias committed May 16, 2017
1 parent f000dff commit 32756b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Perl6/Optimizer.nqp
Expand Up @@ -1418,6 +1418,11 @@ class Perl6::Optimizer {
}
}


#?if js
return $op; # Avoid looping on Slip while constant folding
#?endif

# Don't constant fold the 'x' operator if the resulting string would be too big.
# 1024 is just a heuristic, measuring might show a bigger value would be fine.
if $all_args_known && $op.name eq '&infix:<x>' && $!symbols.is_from_core('&infix:<x>') {
Expand Down

0 comments on commit 32756b2

Please sign in to comment.