• caitp's avatar
    Reland [typedarrays] move %TypedArray%.prototype.copyWithin to C++ · dc302c74
    caitp authored
    - Removes shared InnerArrayCopyWithin JS builtin from src/js/array.js
    - Implements %TypedArray%.prototype.copyWithin as a C++ builtin, which
    relies on std::memmove rather than accessing individual eleements.
    - Fixes the case where copyWithin is invoked on a TypedArray with a
    detached buffer.
    - Add tests to ensure that +/-Infinity (for all 3 parameters) is handled
      correctly by the
    algorithm
    
    The C++ version gets through the benchmark more than 25000 times as
    quickly as the JS implementation.
    
    BUG=v8:5925, v8:5929, v8:4648
    R=cbruni@chromium.org, adamk@chromium.org, littledan@chromium.org
    
    Review-Url: https://codereview.chromium.org/2697593002
    Cr-Commit-Position: refs/heads/master@{#43213}
    dc302c74
typedarray-copywithin.js 8 KB