Open chrisseaton opened 2 years ago
Example code to repro:
def foo(a)
a + 1 + 1
end
loop do
foo(rand(256))
end
Same issue on CE and EE.
Hi, Thank you for reporting this, we will take a look into it and get back to you
The issue is tracked internally on GR--35795
Ruby code that uses exact integer arithmetic such as
a + 1 + 1
will not be combined toa + 2
. I guess it's because it thinks the two deoptimisations that you get on the two overflows are different so need different deoptimisation points? Both sides of theIntegerAddExactSplit
actually eventually lead to the sameDynamicDeoptimize
node though!@eregon