• tebbi's avatar
    [turbofan] escape analysis supports arguments object and rest elements · 7467f16d
    tebbi authored
    The new NewUnmappedArgumentsElements node now takes two inputs:
    - the frame holding the arguments (current frame or arguments adaptor frame)
    - the length of the suffix of passed arguments to be copied into the backing store
    
    These inputs are computed with two new node types:
    ArgumentsFrame()
    ArgumentsLength[formal_parameter_count,is_rest_length](Node* arguments_frame)
    The node type NewRestParameterElements can now be expressed with NewUnmappedArgumentsElements and an appropriate length and is thus not needed anymore.
    
    In escape analysis, we lower loads from the length field of NewUnmappedArgumentsElements with its length input and if we find out that no write access to the arguments elements exists, we replace element loads with direct stack access and replace the NewUnmappedArgumentsElements node with a node of the new node type ArgumentsElementsState. This corresponds to an ObjectState node and gets translated into a deoptimizer instruction to allocate the backing store. Together with the already existing deoptimizer support for the actual arguments object/rest parameters, this allows to remove all allocations for arguments objects/rest parameters in this case.
    In the deoptimizer, we read the actual parameters from the stack while transforming the static deopt info into TranslatedValue objects.
    
    If escape analysis cannot remove the backing store allocation, NewUnmappedArgumentsElements gets lo
    
    BUG=v8:5726
    
    Review-Url: https://codereview.chromium.org/2692753004
    Cr-Commit-Position: refs/heads/master@{#43475}
    7467f16d
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...
.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...