• 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...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...