• 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
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...