• peterwmwong's avatar
    [builtins] Port TypedArray TypedArrayInitializeWithBuffer to Torque · 8e13ddc6
    peterwmwong authored
    Two small changes were done as part of the port:
    - Changes TypedArrayInitializeWithBuffer from a TFS builtin to a macro.
      It was only called from ConstructByArrayBuffer and this removes the
      overhead of the TFS call.
    - Introduces a GetTypedArrayElementsInfo that retrieves both the element
      size and map. Instead of generating the elements kind switch code (
      DispatchTypedArrayByElementsKind) twice, just generate once at the
      beginning of CreateTypedArray.
    
    This reduces overall builtins size by 364 bytes (Mac x64.release)
      - Before
        1364 - TypedArrayInitializeWithBuffer
        6468 - CreateTypedArray
      - After
        7468 - CreateTypedArray
    
    This also improves performance of TypedArray JSPerf benchmarks
    (SubarrayNoSpecies, ConstructByArrayBuffer) by 5-8%.
    
    Bug: v8:7161
    Change-Id: I68eed2ea4db103f44ad9751229c29fba9bc9d24d
    Reviewed-on: https://chromium-review.googlesource.com/c/1437822
    Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59135}
    8e13ddc6
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni 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...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes 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...
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...