From 32756b20cf19f80f311ca0405bfaf6e9e138874f Mon Sep 17 00:00:00 2001 From: pmurias Date: Tue, 16 May 2017 09:17:32 +0200 Subject: [PATCH] [js] Disable constant folding in the optimizer as it's causing trouble 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. --- src/Perl6/Optimizer.nqp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Perl6/Optimizer.nqp b/src/Perl6/Optimizer.nqp index 810824a9e31..183ce2d40b2 100644 --- a/src/Perl6/Optimizer.nqp +++ b/src/Perl6/Optimizer.nqp @@ -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:' && $!symbols.is_from_core('&infix:') {