• Adam Klein's avatar
    Hole check elimination: compare closure scopes instead of declaration scopes · afdf27fc
    Adam Klein authored
    Varblock scopes can be treated as the "same scope" as their surrounding
    function scope for the purposes of hole check elimination, as
    source position comparison is sufficient to determine statically that
    uses in the varblock scope are after initialization in the function scope.
    
    This allows the elimination of hole checks of lexically-bound parameter
    variables in functions with complex parameters, including rest parameters.
    
    The pre-existing code compared DeclarationScopes for legacy reasons:
    varblock scopes (and Scope::GetClosureScope()) did not exist at the
    time this code was originally written.
    
    R=neis@chromium.org
    
    Bug: v8:6344, v8:6414
    Change-Id: Ie787d58d1ea172e893788a9c716d3b6868980ab8
    Reviewed-on: https://chromium-review.googlesource.com/508242
    Commit-Queue: Adam Klein <adamk@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#45405}
    afdf27fc
Name
Last commit
Last update
..
OWNERS Loading commit data...
ast-expression-rewriter.cc Loading commit data...
ast-expression-rewriter.h Loading commit data...
ast-function-literal-id-reindexer.cc Loading commit data...
ast-function-literal-id-reindexer.h Loading commit data...
ast-numbering.cc Loading commit data...
ast-numbering.h Loading commit data...
ast-traversal-visitor.h Loading commit data...
ast-type-bounds.h Loading commit data...
ast-types.cc Loading commit data...
ast-types.h Loading commit data...
ast-value-factory.cc Loading commit data...
ast-value-factory.h Loading commit data...
ast.cc Loading commit data...
ast.h Loading commit data...
compile-time-value.cc Loading commit data...
compile-time-value.h Loading commit data...
context-slot-cache.cc Loading commit data...
context-slot-cache.h Loading commit data...
modules.cc Loading commit data...
modules.h Loading commit data...
prettyprinter.cc Loading commit data...
prettyprinter.h Loading commit data...
scopes.cc Loading commit data...
scopes.h Loading commit data...
variables.cc Loading commit data...
variables.h Loading commit data...