• 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
..
local-tests/test Loading commit data...
BUILD.gn Loading commit data...
README Loading commit data...
archive.py Loading commit data...
detachArrayBuffer.js Loading commit data...
harness-adapt.js Loading commit data...
harness-agent.js Loading commit data...
list.py Loading commit data...
prune-local-tests.sh Loading commit data...
test262.gyp Loading commit data...
test262.isolate Loading commit data...
test262.status Loading commit data...
testcfg.py Loading commit data...
upstream-local-tests.sh Loading commit data...