Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Issue 1423663006: [es7] Implement async functions parsing

Created:
5 years, 1 month ago by iefserge
Modified:
4 years, 11 months ago
Reviewers:
adamk, rossberg
CC:
v8-reviews_googlegroups.com, Michael Hablich
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[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

Patch Set 1 #

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

Messages

Total messages: 3 (0 generated)
iefserge
5 years, 1 month ago (2015-10-25 18:28:00 UTC) #1
rossberg
Thanks for working on this patch. However, please be aware that we have a process ...
5 years, 1 month ago (2015-10-27 15:13:59 UTC) #2
iefserge
5 years, 1 month ago (2015-11-11 15:43:54 UTC) #3
On 2015/10/27 15:13:59, rossberg wrote:
> Thanks for working on this patch. However, please be aware that we have a
> process for adding new user-facing features to V8:
> 
> https://developers.google.com/v8/launchprocess
> 
> In particular, for substantial changes, this requires starting with design
docs
> that the V8 team needs to sign off on before we are going to accept patches.
> 
> I should also note that async is a particularly tricky feature that will
require
> deep knowledge of V8's innards. We expect this to be a multi-quarter project.
In
> particular, it ties in closely with generators, around which there currently
are
> various open questions in the V8 implementation. We have some plans for
tackling
> that next year, but not before we have finished ES6. To be honest, we would
> prefer not to open that can right now, since ES6 already is producing a lot of
> churn.

Makes sense. In case this is useful I'd be happy to rebase and make necessary
improvements to it whenever. Thank you!

Powered by Google App Engine
This is Rietveld 408576698