• Simon Zünd's avatar
    [array] Eagerly copy elements into a FixedArray for sorting · e7d414a2
    Simon Zünd authored
    This CL changes Array#sort to work roughly like:
        1) Call [[Get]] on the receiver in [0, length) and store to FA
        2) Use the existing TimSort to sort that FA
        3) Call [[Set]] on the receiver in [0, length) using the result
    
    This has the advantage that we no longer need different fast-paths
    for the sorting algorithm itself, only for step 1 and 3. This results
    in a code size reduction of ~2650 bytes.
    
    This CL does not include optimizations that elides step 1 or 3.
    
    Change-Id: I7f2e35067a6ec356add8b0c50b160d76813c536d
    Reviewed-on: https://chromium-review.googlesource.com/c/1458237
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59653}
    e7d414a2
Name
Last commit
Last update
..
binutils Loading commit data...
colorama Loading commit data...
googletest Loading commit data...
inspector_protocol Loading commit data...
v8/builtins Loading commit data...