• Marja Hölttä's avatar
    [parser] Skipping inner funcs: Fix hoisting. · f6f5bafe
    Marja Hölttä authored
    The catch variable is a special VAR-mode variable which is not in a declaration
    scope. Normally creating such a variable is not possible with DeclareVariable,
    but Parser bypasses it by calling DeclareLocal directly (which doesn't have the
    hoisting check).
    
    PreParser used to cut corners and declare the catch variable as a LET-mode
    variable to prevent hoisting.
    
    But since LET and VAR variables behave differently when deciding whether they
    block sloppy block function hoisting, that approach doesn't fly.
    
    BUG=v8:5516,chromium:771474
    
    Change-Id: Ic6f5f4996416c9fa59132725c8b0b6b570c72f48
    Reviewed-on: https://chromium-review.googlesource.com/700634
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48308}
    f6f5bafe
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...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
wasm-spec-tests 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...