|
[es7] Implement async functions parsing
Adds an implementation of "async functions" parsing according to proposal
( https://tc39.github.io/ecmascript-asyncawait/). AsyncFunctionDeclaration and
AsyncFunctionExpression are the only syntax supported by this patch, behind the
new flag --harmony-async-await.
New "async" token have been added and is parsed as a keyword only before the
"function" token, otherwise "async" is valid identifier in both strict and
non-strict modes.
Runtime %FunctionIsAsync(fn) function have been added.
Function.prototype.toString() returns "async" prefix for any async function.
BUG= v8:4483
LOG=N
R=adamk@chromium.org, rossberg@chromium.org
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+379 lines, -33 lines) |
Patch |
|
M |
src/ast.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/bootstrapper.cc
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/flag-definitions.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/globals.h
|
View
|
|
3 chunks |
+15 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/js/v8natives.js
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
|
4 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
|
5 chunks |
+21 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/preparser.h
|
View
|
|
21 chunks |
+52 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/preparser.cc
|
View
|
|
4 chunks |
+30 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime-function.cc
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/scanner.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/token.h
|
View
|
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/async-await-functions.js
|
View
|
|
1 chunk |
+81 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/async-keyword.js
|
View
|
|
1 chunk |
+149 lines, -0 lines |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|