• Benedikt Meurer's avatar
    [turbofan] Optimize Object constructor subclassing. · 1f3f8f3e
    Benedikt Meurer authored
    Add support to the JSCallReducer to recognize JSConstruct nodes where
    the target is the Object constructor, and reduce them to JSCreate
    nodes if either
    
     (a) no value is passed to the Object constructor, or
     (b) the target and new.target are definitely not identical, by checking
         whether both target and new.target are different HeapConstants
         (if they are not, then the JSCreateLowering will not be able to
         do a lot with the JSCreate anyways).
    
    This should cover the relevant cases for subclassing appropriately. It
    fixes the 3-4x slowdown on the micro-benchmark mentioned in the linked
    bug,
    
      baseNoExtends: 752 ms.
      baseExtendsObject: 752 ms.
      baseExtendsViaFactory: 751 ms.
    
    and thus removes the performance cliff.
    
    R=jarin@chromium.org
    
    Bug: v8:6801
    Change-Id: Id265fd1399302a67b5790a6d0156679920c58bdd
    Reviewed-on: https://chromium-review.googlesource.com/657019Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47913}
    1f3f8f3e
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...
.gitignore Loading commit data...
.gn 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...