Replace JS version of Array.of with a CSA version
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: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#50680}
Showing
Please
register
or
sign in
to comment