• Simon Zünd's avatar
    Fix flaky Array#reduce mjsunit test · 6df0af84
    Simon Zünd authored
    This CL fixes a flaky mjsunit test, that exercises Array#reduce with
    sealed arrays in TurboFan. The flake was caused by temporary objects,
    whos maps didn't live long enough. The code object of the function
    under test holds weakly onto this maps. With a low enough gc interval,
    the maps, and thus the code object, get cleaned up before the
    {assertOptimized} can execute.
    
    The fix is simply to assign these temporary objects to variables.
    
    Bug: v8:9374
    Change-Id: I43da8ba6b0194872b176e27617d9ca7fbfe43ec2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1666989
    Auto-Submit: Simon Zünd <szuend@chromium.org>
    Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62269}
    6df0af84
sealed-array-reduce.js 37.8 KB