• Jakob Kummerow's avatar
    [bigint] Fix accidental input modification in Divide · b5997de8
    Jakob Kummerow authored
    "AbsoluteDivSmall" had a shortcut path for abs(divisor) == 1 where
    it would simply return the dividend as result. However, its caller
    "Divide" was blissfully ignorant of this trick and would therefore
    simply set the value's sign as needed, modifying the input.
    This CL prevents that, while continuing to avoid the full division
    algorithm for abs(divisor) == 1.
    
    Bug: v8:6791
    Change-Id: I04cdc93f5ed2a696587c35c754e68f07012dd1a9
    Reviewed-on: https://chromium-review.googlesource.com/772332
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49433}
    b5997de8
regressions.js 474 Bytes