• Dan Elphick's avatar
    Replace JS version of Array.of with a CSA version · 0d4ed06c
    Dan Elphick authored
    This removes the Javascript version of Array.of in js/array.js and adds
    a CodeStubAssembler version in src/builtins/builtins-array-gen.cc.
    
    Mostly this change is for code-health reasons but it also gives
    performance improvements for nearly all cases with the exception of
    "transplanted" arrays. E.g.
    function ArrayLike {}
    ArrayLike.of = Array.of
    ArrayLike.of(...) is now slower in the perf tests. Most of this change
    can be attributed to using CallRuntime(kSetProperty,...) to set the
    length. The JS version can do better due to inline caches trained on
    the same datatype for 1000s of iterations, but this kind of workload is
    unlikely.
    
    Change-Id: I18e5b19b185257e9e0d553e1183b40ba4a5d3289
    Reviewed-on: https://chromium-review.googlesource.com/863625
    Commit-Queue: Dan Elphick <delphick@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#50680}
    0d4ed06c
Name
Last commit
Last update
..
OWNERS Loading commit data...
array.js Loading commit data...
intl.js Loading commit data...
macros.py Loading commit data...
messages.js Loading commit data...
prologue.js Loading commit data...
spread.js Loading commit data...
typedarray.js Loading commit data...