• Daniel Ehrenberg's avatar
    [parser] Prohibit async functions and generators in invalid contexts · ee15703e
    Daniel Ehrenberg authored
    Async functions and generator declarations are only permitted as
    StatementListItems, not as ExpressionStatements, and therefore not
    as the entire body of an if statement, etc. Previously, they were
    incorrectly permitted. However, ChakraCore and SpiderMonkey seem
    to ban them in this context, and the feature was introduced relatively
    recently, so it is likely to be web-compatible to ship the prohibition.
    
    This patch also unifies the error message wording of async functions
    and generators to ordinary functions, explaining more clearly what
    the issue is.
    
    Bug: v8:4483
    Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
    Change-Id: I31ed7818d6ab3e7e325031bfabb933dbf4512143
    Reviewed-on: https://chromium-review.googlesource.com/568979
    Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
    Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46770}
    ee15703e
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...