• Vaclav Brozek's avatar
    Fix array.indexOf for negative fromIndex · be5cfb22
    Vaclav Brozek authored
    Array.indexOf accepts an optional fromIndex argument. When non-negative,
    this argument restricts the searched indices to those starting at
    fromIndex:
    [1, 2, 1].indexOf(1,1) == 2
    When negative, it is meant to be added to the array length to provide
    such initial index for the search:
    [1, 2, 1].indexOf(1, -2) == 2
    
    This transformation has been done by the non-optimised builtin but not
    by the reducer. The CL adds this construction to the reducer.
    
    Bug: chromium:842612
    Change-Id: I0ff089997f4ebb4dc3c2923e52c382a8a96cd711
    Reviewed-on: https://chromium-review.googlesource.com/1059628Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Commit-Queue: Vaclav Brozek <vabr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53197}
    be5cfb22
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...