• adamk's avatar
    [es6] Fix scoping for default parameters in arrow functions · cf72aad3
    adamk authored
    When eagerly parsing arrow functions, expressions in default
    parameter initializers are parsed in the enclosing scope,
    rather than in the function's scope (since that scope does not
    yet exist). This leads to VariableProxies being added to the
    wrong scope, and scope chains for FunctionLiterals being incorrect.
    
    This patch addresses these problems by adding a subclass of
    AstExpressionVisitor that moves VariableProxies to the proper
    scope and fixes up scope chains of FunctionLiterals.
    
    More work likely still needs to be done to make this work completely,
    but it's very close to correct.
    
    BUG=v8:4395
    LOG=y
    
    Review URL: https://codereview.chromium.org/1405313002
    
    Cr-Commit-Position: refs/heads/master@{#31402}
    cf72aad3
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
docs 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/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE 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...
Makefile.nacl 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...