[parser] Enforce module-specific identifier restriction

Restrict the use of the `await` token as an identifier when parsing
source text as module code.

From
http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words:

> 11.6.2.2 Future Reserved Words
>
> The following tokens are reserved for used as keywords in future
> language extensions.
>
> Syntax
>
>     FutureReservedWord ::
>         enum
>         await
>
> await is only treated as a FutureReservedWord when Module is the goal
> symbol of the syntactic grammar.

BUG=v8:4767
LOG=N
R=adamk@chromium.org

Review-Url: https://codereview.chromium.org/1723313002
Cr-Commit-Position: refs/heads/master@{#35914}
8 files changed
tree: fbb6769b6980908286b2adfa7fd95fdfa6293e6c
  1. .clang-format
  2. .gitignore
  3. .ycm_extra_conf.py
  4. AUTHORS
  5. BUILD.gn
  6. CODE_OF_CONDUCT.md
  7. ChangeLog
  8. DEPS
  9. LICENSE
  10. LICENSE.strongtalk
  11. LICENSE.v8
  12. LICENSE.valgrind
  13. Makefile
  14. Makefile.android
  15. Makefile.nacl
  16. OWNERS
  17. PRESUBMIT.py
  18. README.md
  19. WATCHLISTS
  20. benchmarks/
  21. codereview.settings
  22. docs/
  23. gypfiles/
  24. include/
  25. infra/
  26. samples/
  27. snapshot_toolchain.gni
  28. src/
  29. test/
  30. testing/
  31. third_party/
  32. tools/
README.md

V8 JavaScript Engine

V8 is Google's open source JavaScript engine.

V8 implements ECMAScript as specified in ECMA-262.

V8 is written in C++ and is used in Google Chrome, the open source browser from Google.

V8 can run standalone, or can be embedded into any C++ application.

V8 Project page: https://github.com/v8/v8/wiki

Getting the Code

Checkout depot tools, and run

    fetch v8

This will checkout V8 into the directory v8 and fetch all of its dependencies. To stay up to date, run

    git pull origin
    gclient sync

For fetching all branches, add the following into your remote configuration in .git/config:

    fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
    fetch = +refs/tags/*:refs/tags/*

Contributing

Please follow the instructions mentioned on the V8 wiki.