Project: v8 Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 4483 Feature Request: Support async/await functions
Starred by 157 users Reported by atcrabt...@gmail.com, Oct 9 2015 Back to list
Status: Fixed
Owner:
Closed: Oct 19
Cc:
Components:
HW: ----
OS: ----
Priority: Medium
Type: FeatureRequest


Sign in to add a comment
With `async` functions in the "Stage 3: Candidate" phase[1] (expected to enter "Stage 4: Finished" next month, November 2015), and with all prerequisite features implemented in V8 (Promise, generators/yield, strict-mode), it would be nice to see async/await support added to V8 since it is already supported in Microsoft Edge[2], traceur[3], babel[4] and nearly completed (and actively progressing) in Firefox[5].

This would of course be a massive boon to node.js, the de facto JavaScript tooling runtime, given the limitations associated with debugging transpiled code (using traceur/babel).


[1] https://tc39.github.io/ecmascript-asyncawait/
[2] http://blogs.msdn.com/b/eternalcoding/archive/2015/09/30/javascript-goes-to-asynchronous-city.aspx
[3] https://github.com/google/traceur-compiler/wiki/LanguageFeatures#async-functions-experimental
[4] https://babeljs.io/docs/advanced/transformers/other/async-to-generator/
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1185106
 
Comment 1 by i...@bnoordhuis.nl, Oct 10 2015
Amusing aside: someone added async/await/yield support to node.js v0.10 / V8 3.14 two years ago.

The patch has some issues (besides being completely stale) but it's interesting in how straightforward it is.

https://github.com/koush/node/commit/4ba9d5bf4b48d1d74214aa445fabd67c28a302bd
Comment 2 by adamk@chromium.org, Oct 12 2015
Cc: rossberg@chromium.org adamk@chromium.org
Labels: Type-FeatureRequest Priority-Medium Harmony Area-Language
Status: Available
Comment 3 by shay...@gmail.com, Oct 27 2015
Added basic async function parsing, I'd appreciate someone taking a look
https://codereview.chromium.org/1423663006/
Microsoft Edge's JS engine, ChakraCore, was just opened source and is now node.js compatible, allowing async/await support in node.js.

https://blogs.windows.com/buildingapps/2015/05/12/bringing-node-js-to-windows-10-iot-core/
Owner: littledan@chromium.org
Status: Assigned
Comment 6 by ing...@gmail.com, Feb 16 2016
Hey, at https://github.com/nodejs/promises/issues/4 we'd love to have your input when you plan to land this and discuss how we can make this work in Node. 
Comment 7 by ebra...@gnu.org, Mar 23 2016
Cc: ishell@chromium.org paulir...@chromium.org
Comment 8 Deleted
Cc: caitpott...@gmail.com
Comment 10 by loyso@chromium.org, May 12 2016
Cc: loyso@chromium.org
Project Member Comment 11 by bugdroid1@chromium.org, May 16 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/0d43421a228b53ecf0e3a176e65618a35b047da6

commit 0d43421a228b53ecf0e3a176e65618a35b047da6
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Mon May 16 23:17:13 2016

[esnext] implement frontend changes for async/await proposal

BUG=v8:4483
LOG=Y
R=littledan@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/1841543003
Cr-Commit-Position: refs/heads/master@{#36261}

[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/ast/ast-value-factory.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/ast/ast.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/bootstrapper.cc
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/flag-definitions.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/globals.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/messages.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/objects-inl.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/objects.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/expression-classifier.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/parser-base.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/parser.cc
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/parser.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/preparser.cc
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/preparser.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/scanner.cc
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/scanner.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/src/parsing/token.h
[modify] https://crrev.com/0d43421a228b53ecf0e3a176e65618a35b047da6/test/cctest/test-parsing.cc

Project Member Comment 12 by bugdroid1@chromium.org, May 17 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/d08c0304c5779223d6c468373af4815ec3ccdb84

commit d08c0304c5779223d6c468373af4815ec3ccdb84
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Tue May 17 00:26:53 2016

[esnext] prototype runtime implementation for async functions

BUG=v8:4483
LOG=N
R=littledan@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/1895603002
Cr-Commit-Position: refs/heads/master@{#36263}

[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/BUILD.gn
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/bootstrapper.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/builtins.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/builtins.h
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/code-stubs.h
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/compiler.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/contexts.h
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/factory.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/globals.h
[add] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/js/harmony-async-await.js
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/js/prologue.js
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/js/promise.js
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/objects.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/parsing/parser-base.h
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/parsing/parser.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/parsing/parser.h
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/parsing/preparser.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/parsing/preparser.h
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/runtime/runtime-generator.cc
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/src/v8.gyp
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden
[add] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/test/mjsunit/harmony/async-arrow-lexical-arguments.js
[add] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/test/mjsunit/harmony/async-arrow-lexical-new.target.js
[add] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/test/mjsunit/harmony/async-arrow-lexical-super.js
[add] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/test/mjsunit/harmony/async-arrow-lexical-this.js
[add] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/test/mjsunit/harmony/async-await-basic.js
[modify] https://crrev.com/d08c0304c5779223d6c468373af4815ec3ccdb84/test/mjsunit/mjsunit.status

Project Member Comment 13 by bugdroid1@chromium.org, May 17 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/690922c95966b6789053ab27c8cf21dfbd0080c6

commit 690922c95966b6789053ab27c8cf21dfbd0080c6
Author: littledan <littledan@chromium.org>
Date: Tue May 17 01:14:27 2016

[esnext] Fix super in async arrow functions

Ordinary arrow functions have 'undefined' in their frame's receiver.
Generators restore the receiver to the frame based on one passed in
when they are constructed in CreateJSGeneratorObject.

This patch makes async arrow functions pass in 'undefined' for their
receiver so that they have the same behavior as ordinary arrow
functions, which avoids the issue of encountering TDZ when calling
an async arrow function in a subclass constructor before a super
call has returned.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/1976813002
Cr-Commit-Position: refs/heads/master@{#36264}

[modify] https://crrev.com/690922c95966b6789053ab27c8cf21dfbd0080c6/src/parsing/parser.cc
[modify] https://crrev.com/690922c95966b6789053ab27c8cf21dfbd0080c6/src/parsing/parser.h
[modify] https://crrev.com/690922c95966b6789053ab27c8cf21dfbd0080c6/test/mjsunit/mjsunit.status

Project Member Comment 14 by bugdroid1@chromium.org, May 17 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/4afe89a7daba26f915f61765768b9d49295cf10e

commit 4afe89a7daba26f915f61765768b9d49295cf10e
Author: littledan <littledan@chromium.org>
Date: Tue May 17 01:27:23 2016

[esnext] Async function toString support

BUG=v8:4483

Review-Url: https://codereview.chromium.org/1973193002
Cr-Commit-Position: refs/heads/master@{#36265}

[modify] https://crrev.com/4afe89a7daba26f915f61765768b9d49295cf10e/src/objects.cc
[modify] https://crrev.com/4afe89a7daba26f915f61765768b9d49295cf10e/test/mjsunit/harmony/async-await-basic.js

(async function(){await 1;debugger})() causes a tab crash in Chrome.
Cc: yangguo@chromium.org jgruber@chromium.org
With DCHECKs enabled, it crashes during %GetFrameCount(), but not when processing the async function (it's hit in a FunctionKind::kNormal function), probably AsyncFunctionNext().
The attached test case crashes in d8. 

SharedFunctionInfo::internal_formal_parameter_count() is set to -1 during a call to JavaScriptFrame::receiver(), which expects it to be >= 0.

Backtrace:

#0  v8::base::OS::Abort () at ../../../src/base/platform/platform-posix.cc:240
#1  0x08fc4bfe in V8_Fatal (file=0x92395e8 "../../../src/frames-inl.h", line=163, format=0x92160d2 "Check failed: %s.")
    at ../../../src/base/logging.cc:116
#2  0x084d248c in v8::internal::JavaScriptFrame::GetParameterSlot (this=0xffd86918, index=-1) at ../../../src/frames-inl.h:163
#3  0x084cb38b in v8::internal::JavaScriptFrame::GetParameter (this=0xffd86918, index=-1) at ../../../src/frames-inl.h:170
#4  0x085d91ad in v8::internal::JavaScriptFrame::receiver (this=0xffd86918) at ../../../src/frames.cc:866
#5  0x085d8fdf in v8::internal::JavaScriptFrame::Summarize (this=0xffd86918, functions=0xffd86890, 
    mode=v8::internal::FrameSummary::kExactSummary) at ../../../src/frames.cc:857
#6  0x085da1c0 in v8::internal::OptimizedFrame::Summarize (this=0xffd86918, frames=0xffd86890, 
    mode=v8::internal::FrameSummary::kExactSummary) at ../../../src/frames.cc:1010
#7  0x08971dad in v8::internal::__RT_impl_Runtime_GetFrameCount (args=..., isolate=0xa4ae058) at ../../../src/runtime/runtime-debug.cc:460
#8  0x08971905 in v8::internal::Runtime_GetFrameCount (args_length=1, args_object=0xffd86b14, isolate=0xa4ae058)
    at ../../../src/runtime/runtime-debug.cc:444
[...]
debug-async-await.js
2.1 KB View Download
I have a working fix for this, will submit shortly.
Project Member Comment 20 by bugdroid1@chromium.org, May 18 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f6865cb14220df1a6cc909eceb4f674978dd141f

commit f6865cb14220df1a6cc909eceb4f674978dd141f
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Wed May 18 20:52:56 2016

[runtime] set AsyncFunctionNext/Throw to adapt arguments

Prevent crash/UB during stack frame iteration through functions, which occurs
when debugging, when building stacktraces, etc.

Also prevents these functions from appearing in stacktraces, by unsetting the "native" flag.

BUG=v8:4483, v8:5025
R=yangguo@chromium.org, littledan@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/1990803005
Cr-Commit-Position: refs/heads/master@{#36339}

[modify] https://crrev.com/f6865cb14220df1a6cc909eceb4f674978dd141f/src/bootstrapper.cc
[add] https://crrev.com/f6865cb14220df1a6cc909eceb4f674978dd141f/test/mjsunit/harmony/async-debug-basic.js

Project Member Comment 21 by bugdroid1@chromium.org, May 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/c57cadfa09fa493141bf43c1c7b898187a71da19

commit c57cadfa09fa493141bf43c1c7b898187a71da19
Author: hablich <hablich@chromium.org>
Date: Thu May 19 13:03:27 2016

[ESNext] Activate async/await for ClusterFuzz

BUG=v8:4483
R=neis@chromium.org,littledan@chromium.org,caitpotter88@gmail.com
LOG=N

Review-Url: https://codereview.chromium.org/1992173002
Cr-Commit-Position: refs/heads/master@{#36362}

[modify] https://crrev.com/c57cadfa09fa493141bf43c1c7b898187a71da19/src/flag-definitions.h

Please add more debugger test cases, for
- stack traces
- introspection into scopes
- debug-evaluate
- introspection into frames
- break points
- stepping
- debug mirrors
Some of these are in progress at https://codereview.chromium.org/1995723004 but I agree much more are needed.
Project Member Comment 24 by bugdroid1@chromium.org, May 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/02f228eccdfcfab4081c2494ade52e54702b692c

commit 02f228eccdfcfab4081c2494ade52e54702b692c
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Thu May 19 13:27:27 2016

[test] add tests for async function stacktraces

BUG=v8:4483
R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/1995723004
Cr-Commit-Position: refs/heads/master@{#36365}

[add] https://crrev.com/02f228eccdfcfab4081c2494ade52e54702b692c/test/mjsunit/harmony/async-function-stacktrace.js

Project Member Comment 25 by bugdroid1@chromium.org, May 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/ad7939e71de4a67fb77a585b4eda9298cb130064

commit ad7939e71de4a67fb77a585b4eda9298cb130064
Author: machenbach <machenbach@chromium.org>
Date: Thu May 19 14:51:07 2016

Revert of [test] add tests for async function stacktraces (patchset #1 id:1 of https://codereview.chromium.org/1995723004/ )

Reason for revert:
Breaks gc stress:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/3575

Original issue's description:
> [test] add tests for async function stacktraces
>
> BUG=v8:4483
> R=littledan@chromium.org
>
> Committed: https://crrev.com/02f228eccdfcfab4081c2494ade52e54702b692c
> Cr-Commit-Position: refs/heads/master@{#36365}

TBR=littledan@chromium.org,caitpotter88@gmail.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4483

Review-Url: https://codereview.chromium.org/1997453004
Cr-Commit-Position: refs/heads/master@{#36369}

[delete] https://crrev.com/3f6b081aa0cf3c587d576bcf3f1641ac2a902347/test/mjsunit/harmony/async-function-stacktrace.js

Comment 26 Deleted
disregard previous (deleted) comment, fix is ready at https://codereview.chromium.org/1992093003/
Project Member Comment 28 by bugdroid1@chromium.org, May 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/eb059498b2b2d05731b0dce648bdab801d3873fd

commit eb059498b2b2d05731b0dce648bdab801d3873fd
Author: hablich <hablich@chromium.org>
Date: Fri May 20 08:54:15 2016

Revert of [ESNext] Activate async/await for ClusterFuzz (patchset #1 id:1 of https://codereview.chromium.org/1992173002/ )

Reason for revert:
First CF feedback is in, reverting for now until the know bugs are fixed.

Original issue's description:
> [ESNext] Activate async/await for ClusterFuzz
>
> BUG=v8:4483
> R=neis@chromium.org,littledan@chromium.org,caitpotter88@gmail.com
> LOG=N
>
> Committed: https://crrev.com/c57cadfa09fa493141bf43c1c7b898187a71da19
> Cr-Commit-Position: refs/heads/master@{#36362}

TBR=littledan@chromium.org,caitpotter88@gmail.com,neis@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2003503002
Cr-Commit-Position: refs/heads/master@{#36397}

[modify] https://crrev.com/eb059498b2b2d05731b0dce648bdab801d3873fd/src/flag-definitions.h

Project Member Comment 29 by bugdroid1@chromium.org, May 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/239309fc8f53b46c76ab1622642f0d2039ef3ddd

commit 239309fc8f53b46c76ab1622642f0d2039ef3ddd
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Fri May 20 12:03:55 2016

[heap] don't flush async functions, they may be resumed later

BUG=v8:4483
R=littledan@chromium.org, hpayer@chromium.org, mstarzinger@chromium.org, ulan@chromium.org

Review-Url: https://codereview.chromium.org/1992093003
Cr-Commit-Position: refs/heads/master@{#36405}

[modify] https://crrev.com/239309fc8f53b46c76ab1622642f0d2039ef3ddd/src/heap/objects-visiting-inl.h
[add] https://crrev.com/239309fc8f53b46c76ab1622642f0d2039ef3ddd/test/mjsunit/harmony/async-function-stacktrace.js

Project Member Comment 30 by bugdroid1@chromium.org, May 24 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/38c6fb82f35b08a0e9d0afef644d74bc6d9d2ab1

commit 38c6fb82f35b08a0e9d0afef644d74bc6d9d2ab1
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Tue May 24 18:40:29 2016

[test] add debugger scopes testing for async functions

BUG=v8:4483
R=littledan@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2005613002
Cr-Commit-Position: refs/heads/master@{#36489}

[add] https://crrev.com/38c6fb82f35b08a0e9d0afef644d74bc6d9d2ab1/test/mjsunit/harmony/async-function-debug-scopes.js

Project Member Comment 31 by bugdroid1@chromium.org, May 31 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f30f8286fbed894bf0f80ae0efd9acca9e7e5eec

commit f30f8286fbed894bf0f80ae0efd9acca9e7e5eec
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Tue May 31 14:13:41 2016

[test] add debugger tests for debug evaluation in async functions

BUG=v8:4483
R=littledan@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2010693003
Cr-Commit-Position: refs/heads/master@{#36614}

[add] https://crrev.com/f30f8286fbed894bf0f80ae0efd9acca9e7e5eec/test/mjsunit/harmony/async-function-debug-evaluate.js

Project Member Comment 32 by bugdroid1@chromium.org, May 31 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/46253e743df20c67bd524cf6f4288f549cb72739

commit 46253e743df20c67bd524cf6f4288f549cb72739
Author: littledan <littledan@chromium.org>
Date: Tue May 31 17:13:58 2016

[esnext] Fix various callsites to use is_resumable, not is_generator

Async functions are built out of generators, but the
SharedFunctionInfo returns false for is_generator. is_resumable is
the broader query. This patch fixes many parts of V8 to refer
to is_resumable as appropriate.

One incidental change is to remove a check for generators extending
classes. This is part of a general check for constructors being the
only thing which can extend classes, so it is removed here and the
error message for the general case is made more accurate.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/1996943002
Cr-Commit-Position: refs/heads/master@{#36621}

[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/src/compiler.cc
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/src/debug/debug.cc
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/src/debug/liveedit.cc
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/src/factory.cc
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/src/messages.h
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/src/objects-printer.cc
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/src/runtime/runtime-classes.cc
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/cctest/interpreter/bytecode_expectations/ForOf.golden
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/cctest/interpreter/bytecode_expectations/Generators.golden
[add] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/mjsunit/debug-generator-break-on-stack.js
[add] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/mjsunit/debug-generator-break.js
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/mjsunit/harmony/async-await-basic.js
[add] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/mjsunit/harmony/debug-async-break-on-stack.js
[add] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/mjsunit/harmony/debug-async-break.js
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/webkit/class-syntax-extends-expected.txt
[modify] https://crrev.com/46253e743df20c67bd524cf6f4288f549cb72739/test/webkit/class-syntax-extends.js

so, how should debugging async functions work?

particularly the following:

```
async function f() {
  debugger;
  print("msg1"); // send StepNext command
  var thing = await someOperation(); // send StepNext command
  print("msg2"); // send StepNext command
}
f();
```

Currently, this will break at `debugger;`, at `print("msg1");`, at `var thing = await someOperation();`, and then at `}` (the last line of the routine).

I think you'd expect that last StepNext to pick up after the function resumes, but currently it steps to the end of the function. Same thing happens with generators (eg https://jsfiddle.net/dcsjLg92/) --- although arguably it makes more sense for generators.

WDYT?
(re: that jsfiddle, WebKit Nightly behaves more in line with how I'd expect, for generators, so maybe V8 is doing the wrong thing here)
This sounds like fairly broken behavior to be, both for generators and async functions. Do you have an idea for how it could be fixed? If generators have been broken this way for a while, maybe this shouldn't be a ship blocker, but still important to address. Yang, what do you think?
I actually think stepping for generators are fine, but for async funcions are not. Generators expose its resumable behavior via yield expression, which is similar to return. async functions are supposed to hide that, so as dev I would expect step next to work across await calls.
Project Member Comment 37 by bugdroid1@chromium.org, Jun 1 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/88ab533b32c79a2bf5d82dd3de2b48c41b0fa029

commit 88ab533b32c79a2bf5d82dd3de2b48c41b0fa029
Author: littledan <littledan@chromium.org>
Date: Wed Jun 01 10:57:56 2016

Reland of [ESNext] Activate async/await for ClusterFuzz (patchset #2 id:40001 of https://codereview.chromium.org/2003503002/ )

Reason for revert:
All known async/await issues are fixed; turn back on Clusterfuzz

Original issue's description:
> Revert of [ESNext] Activate async/await for ClusterFuzz (patchset #1 id:1 of https://codereview.chromium.org/1992173002/ )
>
> Reason for revert:
> First CF feedback is in, reverting for now until the know bugs are fixed.
>
> Original issue's description:
> > [ESNext] Activate async/await for ClusterFuzz
> >
> > BUG=v8:4483
> > R=neis@chromium.org,littledan@chromium.org,caitpotter88@gmail.com
> > LOG=N
> >
> > Committed: https://crrev.com/c57cadfa09fa493141bf43c1c7b898187a71da19
> > Cr-Commit-Position: refs/heads/master@{#36362}
>
> TBR=littledan@chromium.org,caitpotter88@gmail.com,neis@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:4483
>
> Committed: https://crrev.com/eb059498b2b2d05731b0dce648bdab801d3873fd
> Cr-Commit-Position: refs/heads/master@{#36397}

TBR=caitpotter88@gmail.com,neis@chromium.org,mstarzinger@chromium.org,hablich@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2023003002
Cr-Commit-Position: refs/heads/master@{#36639}

[modify] https://crrev.com/88ab533b32c79a2bf5d82dd3de2b48c41b0fa029/src/flag-definitions.h

There's another issue with `StepIn` on non-async values, which adds some extra steps that should be invisible (I'm guessing this is just the call to Promise.resolve()).

So for instance, `debug-step.js` when modified for async functions (and with the `let x = 1;` line changed to `let x = await 1;`, we end up stepping an unexpected number of times (so, when 1000 steps are completed, `i` is 249 rather than 333).

I guess "StepIn" for AwaitExpression with a non-Promise operand should really only step produce a single breakpoint.

This might complicate the proposed changes to StepNext even more, since sometimes StepIn behaves like StepNext?
Step-in should behave like step-next if there is no function call at the location where we perform the step. I think fixing the number of steps is not that hard. Let me implement the step-next behavior first before moving on to step-in.

Step-in at an await call is going to be a bit more challenging anyways, if we want to achieve the behavior that with step-in, we step into the await call, and when we then step-out from there, we end up back in the calling async function. I'll have to get some more insight before thinking about that.
Project Member Comment 40 by bugdroid1@chromium.org, Jun 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/8d90210a1e68b141b1b2345b7b898f6920df3a3d

commit 8d90210a1e68b141b1b2345b7b898f6920df3a3d
Author: yangguo <yangguo@chromium.org>
Date: Fri Jun 03 15:30:42 2016

[debug] implement intuitive semantics for stepping over await call.

R=*bmeurer@chromium.org, caitpotter88@gmail.com, *littledan@chromium.org, *ulan@chromium.org
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2033223003
Cr-Commit-Position: refs/heads/master@{#36718}

[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/arm/builtins-arm.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/arm64/builtins-arm64.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/assembler.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/assembler.h
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/debug/debug.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/debug/debug.h
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/external-reference-table.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/heap/heap.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/ia32/builtins-ia32.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/mips/builtins-mips.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/mips64/builtins-mips64.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/parsing/parser-base.h
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/parsing/parser.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/runtime/runtime-debug.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/runtime/runtime-generator.cc
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/runtime/runtime.h
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/src/x64/builtins-x64.cc
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-abort-at-break.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-continue-at-break.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-in-and-out.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-in-out-out.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-in.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-nested.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-next-constant.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-next.js
[add] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-debug-step-out.js
[modify] https://crrev.com/8d90210a1e68b141b1b2345b7b898f6920df3a3d/test/mjsunit/harmony/async-function-debug-scopes.js

Project Member Comment 41 by bugdroid1@chromium.org, Jun 6 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/4fb3051da23e5da895e2982ce2752d27cda119db

commit 4fb3051da23e5da895e2982ce2752d27cda119db
Author: bjaideep <bjaideep@ca.ibm.com>
Date: Mon Jun 06 14:02:00 2016

PPC: [debug] implement intuitive semantics for stepping over await call.

Port 8d90210a1e68b141b1b2345b7b898f6920df3a3d

R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:4483
LOG=N

Review-Url: https://codereview.chromium.org/2040803003
Cr-Commit-Position: refs/heads/master@{#36750}

[modify] https://crrev.com/4fb3051da23e5da895e2982ce2752d27cda119db/src/ppc/builtins-ppc.cc

Project Member Comment 42 by bugdroid1@chromium.org, Jun 7 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/701f94876c7462d774957f1b0ebb8bb1083b108e

commit 701f94876c7462d774957f1b0ebb8bb1083b108e
Author: jyan <jyan@ca.ibm.com>
Date: Tue Jun 07 20:17:14 2016

S390: [debug] implement intuitive semantics for stepping over await call.

Port 8d90210a1e68b141b1b2345b7b898f6920df3a3d

R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com

BUG=v8:4483
LOG=N

Review-Url: https://codereview.chromium.org/2047673003
Cr-Commit-Position: refs/heads/master@{#36801}

[modify] https://crrev.com/701f94876c7462d774957f1b0ebb8bb1083b108e/src/s390/builtins-s390.cc

Blockedon: 5099
Project Member Comment 44 by bugdroid1@chromium.org, Jun 10 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/5d7b9ece164f3179b960d67a93c8a779e494a8ba

commit 5d7b9ece164f3179b960d67a93c8a779e494a8ba
Author: littledan <littledan@chromium.org>
Date: Fri Jun 10 19:12:14 2016

Async/await event listener test

This patch adds a test for async/await analogous to a previous Promise test.
It also fixes a typo in promise.js and makes a previous Promise test more
correct by ensuring that all assertions run before completion, fixing the
test expectations for the real result (which seems correct).

BUG=v8:4483
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2037653002
Cr-Commit-Position: refs/heads/master@{#36903}

[modify] https://crrev.com/5d7b9ece164f3179b960d67a93c8a779e494a8ba/src/js/promise.js
[modify] https://crrev.com/5d7b9ece164f3179b960d67a93c8a779e494a8ba/test/mjsunit/es6/debug-promises/async-task-event.js
[add] https://crrev.com/5d7b9ece164f3179b960d67a93c8a779e494a8ba/test/mjsunit/harmony/debug-async-function-async-task-event.js

Project Member Comment 45 by bugdroid1@chromium.org, Jun 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/1a3086623930e5216c02a3ea2c94682f69b58d41

commit 1a3086623930e5216c02a3ea2c94682f69b58d41
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Mon Jun 13 17:19:47 2016

[interpreter] support async functions in Ignition

BUG=v8:4483, v8:4907, 618603
LOG=N
R=neis@chromium.org, yangguo@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2051423003
Cr-Commit-Position: refs/heads/master@{#36938}

[modify] https://crrev.com/1a3086623930e5216c02a3ea2c94682f69b58d41/src/globals.h
[modify] https://crrev.com/1a3086623930e5216c02a3ea2c94682f69b58d41/src/interpreter/bytecode-generator.cc
[add] https://crrev.com/1a3086623930e5216c02a3ea2c94682f69b58d41/test/mjsunit/harmony/regress/regress-618603.js

Project Member Comment 46 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/fd4d385b6d5cd710921332310204dfcd5c7ab762

commit fd4d385b6d5cd710921332310204dfcd5c7ab762
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Wed Jun 15 12:22:58 2016

[liveedit]: fail to patch if target is outside of async function on stack

If an active generator is found on the stack (FUNCTION_BLOCKED_UNDER_GENERATOR),
and the target function is not found on top of that generator, add the error.

Based on test by wingo@igalia.com and littledan@chromium.org
(https://codereview.chromium.org/2035643003/)

LOG=N
BUG=v8:4483
R=yangguo@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2058733002
Cr-Commit-Position: refs/heads/master@{#37000}

[modify] https://crrev.com/fd4d385b6d5cd710921332310204dfcd5c7ab762/src/builtins.cc
[modify] https://crrev.com/fd4d385b6d5cd710921332310204dfcd5c7ab762/src/debug/liveedit.cc
[add] https://crrev.com/fd4d385b6d5cd710921332310204dfcd5c7ab762/test/mjsunit/harmony/debug-async-liveedit.js

Project Member Comment 47 by bugdroid1@chromium.org, Jun 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3daa588ce613845e298cbd667fa6f5787f95d574

commit 3daa588ce613845e298cbd667fa6f5787f95d574
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Mon Jun 20 17:52:03 2016

[LayoutTests] add async callstack tests for V8 async functions

Based on https://codereview.chromium.org/2044223004 by littledan@chromium.org

BUG=v8:4483, 621515
R=littledan@chromium.org, yangguo@chromium.org, dgozman@chromium.org, pfeldman@chromium.org

Review-Url: https://codereview.chromium.org/2071483002
Cr-Commit-Position: refs/heads/master@{#400718}

[modify] https://crrev.com/3daa588ce613845e298cbd667fa6f5787f95d574/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/3daa588ce613845e298cbd667fa6f5787f95d574/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/3daa588ce613845e298cbd667fa6f5787f95d574/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/README.txt
[add] https://crrev.com/3daa588ce613845e298cbd667fa6f5787f95d574/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await-expected.txt
[add] https://crrev.com/3daa588ce613845e298cbd667fa6f5787f95d574/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await.html
[add] https://crrev.com/3daa588ce613845e298cbd667fa6f5787f95d574/third_party/WebKit/LayoutTests/virtual/asyncawait/README.txt
[add] https://crrev.com/3daa588ce613845e298cbd667fa6f5787f95d574/third_party/WebKit/LayoutTests/virtual/asyncawait/inspector/sources/debugger-async/async-await/README.txt

From Yang's list, I think we have tests for most cases, but do we have good tests for these?

- introspection into frames
- debug mirrors
Introspection into frames is at least partially covered. I don'tbelieve mirrors have any tests specific to async/await
I think mirrors are a missing feature. Generator mirrors are tested, for example, in test/mjsunit/es6/generators-mirror.js . Mirrors are generally implemented in src/debug/mirrors.js and sometimes take extra runtime functions to support them. Ideally, mirrors should support internal properties that match those in the spec. Caitlin, do you think you could implement this for async functions?
FWIW I would be fine if we use generator mirror and generator object mirror for async functions, for now, to stage. We need tests to make sure that works without surprises and crashes.
I'm not sure how the GeneratorMirror makes any sense for async functions, since the generator object is never exposed, and is omitted from frame locals in %GetFrameDetails (due to being a temporary variable).

There's probably stuff that would be helpful to expose to the debugger, but it could probably use a design doc to make it work.
Project Member Comment 53 by bugdroid1@chromium.org, Jun 21 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/36dd4780f0f7cf1ae8883fa5118c6c98084c49c8

commit 36dd4780f0f7cf1ae8883fa5118c6c98084c49c8
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Tue Jun 21 16:27:51 2016

[test] add FunctionMirror and PromiseMirror tests for async functions

BUG=v8:4483
R=yangguo@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2082023002
Cr-Commit-Position: refs/heads/master@{#37149}

[add] https://crrev.com/36dd4780f0f7cf1ae8883fa5118c6c98084c49c8/test/mjsunit/harmony/mirror-async-function-promise.js
[add] https://crrev.com/36dd4780f0f7cf1ae8883fa5118c6c98084c49c8/test/mjsunit/harmony/mirror-async-function.js

Project Member Comment 54 by bugdroid1@chromium.org, Jun 21 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/e45fba811fbf15751c3464c0d3973f6f8ee5c934

commit e45fba811fbf15751c3464c0d3973f6f8ee5c934
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Tue Jun 21 19:46:39 2016

[parser] only parse async arrow function when necessary

Previously, an async arrow function would be parsed if any valid
ConditionalExpression began with the identifier "async", and its following token
was on the same line.

So for example, `async.bar foo => 1` was parsed as a valid async arrow function.
This patch corrects this behaviour by asserting that the following token is a
valid arrow parameters start.

BUG=v8:4483
R=littledan@chromium.org, henrique.ferreiro@gmail.com

Review-Url: https://codereview.chromium.org/2089733002
Cr-Commit-Position: refs/heads/master@{#37154}

[modify] https://crrev.com/e45fba811fbf15751c3464c0d3973f6f8ee5c934/src/parsing/parser-base.h
[modify] https://crrev.com/e45fba811fbf15751c3464c0d3973f6f8ee5c934/test/cctest/test-parsing.cc

Project Member Comment 55 by bugdroid1@chromium.org, Jun 22 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/c444b2b7af3286dc8093fb429c3172b5510461be

commit c444b2b7af3286dc8093fb429c3172b5510461be
Author: littledan <littledan@chromium.org>
Date: Wed Jun 22 16:07:00 2016

Stage async/await

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2083653003
Cr-Commit-Position: refs/heads/master@{#37194}

[modify] https://crrev.com/c444b2b7af3286dc8093fb429c3172b5510461be/src/flag-definitions.h

Labels: SpecViolation-MissingFeature
Blockedon: 5148
Project Member Comment 58 by bugdroid1@chromium.org, Jun 25 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/4bb1f70e66ef361f42fdb6082cd4db9def77befc

commit 4bb1f70e66ef361f42fdb6082cd4db9def77befc
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Sat Jun 25 00:38:19 2016

[parser] don't report error for CoverInitializedNames in async arrow formals

BUG=v8:4483, v8:5148
R=littledan@chromium.org, adamk@chromium.org, jwolfe@igalia.com, nikolaos@chromium.org

Review-Url: https://codereview.chromium.org/2091313002
Cr-Commit-Position: refs/heads/master@{#37260}

[modify] https://crrev.com/4bb1f70e66ef361f42fdb6082cd4db9def77befc/src/parsing/parser-base.h
[modify] https://crrev.com/4bb1f70e66ef361f42fdb6082cd4db9def77befc/test/cctest/test-parsing.cc
[modify] https://crrev.com/4bb1f70e66ef361f42fdb6082cd4db9def77befc/test/mjsunit/harmony/async-await-basic.js

Project Member Comment 59 by bugdroid1@chromium.org, Jun 27 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/4efd20ab575b98ba531cbbcc55051f3d85657948

commit 4efd20ab575b98ba531cbbcc55051f3d85657948
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Mon Jun 27 21:11:33 2016

[parser] report error for shorthand property "await" in async arrow formals

In addition to recording the BindingPattern error, also record an
AsyncArrowFormalParameters error for shorthand property "await" in object
literals.

BUG=v8:4483, v8:5148
R=littledan@chromium.org, jwolfe@igalia.com, adamk@chromium.org, nikolaos@chromium.org

Review-Url: https://codereview.chromium.org/2100623002
Cr-Commit-Position: refs/heads/master@{#37302}

[modify] https://crrev.com/4efd20ab575b98ba531cbbcc55051f3d85657948/src/parsing/parser-base.h
[modify] https://crrev.com/4efd20ab575b98ba531cbbcc55051f3d85657948/test/cctest/test-parsing.cc

Blockedon: 5167
Project Member Comment 61 by bugdroid1@chromium.org, Jul 1 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/cd9e5f30ea58e8e92ed2b2ee7c608b905b91d725

commit cd9e5f30ea58e8e92ed2b2ee7c608b905b91d725
Author: caitpotter88 <caitpotter88@gmail.com>
Date: Fri Jul 01 22:50:06 2016

[builtins] make AsyncFunction constructor a subclass of Function

Corrects a small problem with the current implementation of the AsyncFunction
constructor.

See https://tc39.github.io/ecmascript-asyncawait/#async-function-constructor for
details.

BUG=v8:4483
R=littledan@chromium.org, adamk@chromium.org, jwolfe@igalia.com

Review-Url: https://codereview.chromium.org/2118653004
Cr-Commit-Position: refs/heads/master@{#37484}

[modify] https://crrev.com/cd9e5f30ea58e8e92ed2b2ee7c608b905b91d725/src/bootstrapper.cc
[modify] https://crrev.com/cd9e5f30ea58e8e92ed2b2ee7c608b905b91d725/test/mjsunit/harmony/async-await-basic.js

Project Member Comment 62 by bugdroid1@chromium.org, Jul 11 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/77cbe27689d3c8823ea492cbc33f7718a4b5e417

commit 77cbe27689d3c8823ea492cbc33f7718a4b5e417
Author: littledan <littledan@chromium.org>
Date: Mon Jul 11 19:28:56 2016

Narrowly address async function stack overflow parsing case

This patch just checks for a stack overflow and returns failure
from the cases which Clusterfuzz found. However, there may be
more locations in the parser which need similar treatment.

R=caitpotter88@gmail.com,neis
BUG=v8:4483,chromium:624300

Review-Url: https://codereview.chromium.org/2135503002
Cr-Commit-Position: refs/heads/master@{#37655}

[modify] https://crrev.com/77cbe27689d3c8823ea492cbc33f7718a4b5e417/src/parsing/parser.cc
[add] https://crrev.com/77cbe27689d3c8823ea492cbc33f7718a4b5e417/test/mjsunit/harmony/regress/regress-624300.js

Project Member Comment 63 by bugdroid1@chromium.org, Jul 12 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/117fda14016a7b3ed4a254448dcafa3cf43a0e7c

commit 117fda14016a7b3ed4a254448dcafa3cf43a0e7c
Author: littledan <littledan@chromium.org>
Date: Tue Jul 12 19:47:43 2016

[parser] report errors for invalid binding patterns in async formal parameters

BUG=v8:4483, v8:5190

R=caitp@igalia.com, nikolaos@chromium.org

Review-Url: https://codereview.chromium.org/2139063002
Cr-Commit-Position: refs/heads/master@{#37691}

[modify] https://crrev.com/117fda14016a7b3ed4a254448dcafa3cf43a0e7c/src/parsing/parser-base.h
[modify] https://crrev.com/117fda14016a7b3ed4a254448dcafa3cf43a0e7c/test/cctest/test-parsing.cc

Project Member Comment 64 by bugdroid1@chromium.org, Aug 6
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/7826bfa7893d3890122399088b927b08432e301c

commit 7826bfa7893d3890122399088b927b08432e301c
Author: littledan <littledan@chromium.org>
Date: Sat Aug 06 00:58:16 2016

[promise] Async/await edge case spec compliance fix

- Don't read .constructor when returning a Promise from an async function.
  Instead, call out to the internals of Promise.resolve directly.
  This is done by adding back in an "optimization" from an earlier form of
  the async/await code written by Caitlin Potter.
- Async functions always return a new Promise with a distinct identity,
  even if they simply return another Promise.

R=caitp@igalia.com
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2219623002
Cr-Commit-Position: refs/heads/master@{#38404}

[modify] https://crrev.com/7826bfa7893d3890122399088b927b08432e301c/src/js/harmony-async-await.js
[modify] https://crrev.com/7826bfa7893d3890122399088b927b08432e301c/src/js/prologue.js
[modify] https://crrev.com/7826bfa7893d3890122399088b927b08432e301c/src/js/promise.js
[add] https://crrev.com/7826bfa7893d3890122399088b927b08432e301c/test/mjsunit/harmony/async-await-no-constructor.js
[add] https://crrev.com/7826bfa7893d3890122399088b927b08432e301c/test/mjsunit/harmony/async-await-resolve-new.js

Blockedon: 5298
Project Member Comment 67 by bugdroid1@chromium.org, Aug 22
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/253d4e84646fdd1b9faebbd63adb30f09a5fa4dc

commit 253d4e84646fdd1b9faebbd63adb30f09a5fa4dc
Author: adamk <adamk@chromium.org>
Date: Mon Aug 22 18:03:46 2016

Disallow 'await' in object literal shorthand position

Also lots of cleanup around the checking for 'await' as an identifier
throughout the parser and preparser.

R=caitp@igalia.com, littledan@chromium.org
BUG=v8:4483,v8:5298

Review-Url: https://codereview.chromium.org/2267493002
Cr-Commit-Position: refs/heads/master@{#38798}

[modify] https://crrev.com/253d4e84646fdd1b9faebbd63adb30f09a5fa4dc/src/parsing/parser-base.h
[modify] https://crrev.com/253d4e84646fdd1b9faebbd63adb30f09a5fa4dc/src/parsing/parser.cc
[modify] https://crrev.com/253d4e84646fdd1b9faebbd63adb30f09a5fa4dc/src/parsing/parser.h
[modify] https://crrev.com/253d4e84646fdd1b9faebbd63adb30f09a5fa4dc/src/parsing/preparser.cc
[modify] https://crrev.com/253d4e84646fdd1b9faebbd63adb30f09a5fa4dc/src/parsing/token.h
[modify] https://crrev.com/253d4e84646fdd1b9faebbd63adb30f09a5fa4dc/test/cctest/test-parsing.cc

Project Member Comment 68 by bugdroid1@chromium.org, Aug 22
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/232a33602bd6fff2cd381927d94ba9e86cf9a6e5

commit 232a33602bd6fff2cd381927d94ba9e86cf9a6e5
Author: adamk <adamk@chromium.org>
Date: Mon Aug 22 19:03:13 2016

[async functions] Disallow 'await' in arrow params inside async functions

The following code was previously accepted:

  async function f() {
    let g = (await) => {};
  }

But per the spec, using 'await' is disallowed in arrow parameters
by an early error rule (just as 'yield' is disallowed in arrow
params inside generators).

There was special logic in ParseUnaryExpression which seems to have been
there only to allow that case. Having removed it, we get a SyntaxError in
the right cases anyway when ParseUnaryExpression chokes on whatever
illegal token follows 'await' in the cases this code previously handled.

Also removes the unnecessary AsyncBindingPatternProduction enum value.

R=caitp@igalia.com, littledan@chromium.org
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2258313002
Cr-Commit-Position: refs/heads/master@{#38802}

[modify] https://crrev.com/232a33602bd6fff2cd381927d94ba9e86cf9a6e5/src/parsing/expression-classifier.h
[modify] https://crrev.com/232a33602bd6fff2cd381927d94ba9e86cf9a6e5/src/parsing/parser-base.h
[modify] https://crrev.com/232a33602bd6fff2cd381927d94ba9e86cf9a6e5/test/cctest/test-parsing.cc

Project Member Comment 69 by bugdroid1@chromium.org, Aug 23
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/9a558c5f4aa11cba6953901fcab56510786a2c8c

commit 9a558c5f4aa11cba6953901fcab56510786a2c8c
Author: adamk <adamk@chromium.org>
Date: Tue Aug 23 22:17:28 2016

Disallow 'yield' in async arrow parameter lists inside generators

R=littledan@chromium.org
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2270223002
Cr-Commit-Position: refs/heads/master@{#38846}

[modify] https://crrev.com/9a558c5f4aa11cba6953901fcab56510786a2c8c/src/parsing/parser-base.h
[modify] https://crrev.com/9a558c5f4aa11cba6953901fcab56510786a2c8c/test/cctest/test-parsing.cc

Project Member Comment 70 by bugdroid1@chromium.org, Aug 25
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/51c186dd983e542d2ac17835f73df8b1e5c6461e

commit 51c186dd983e542d2ac17835f73df8b1e5c6461e
Author: adamk <adamk@chromium.org>
Date: Thu Aug 25 16:59:12 2016

Centralize and standardize logic for ExpressionClassifier accumulation

Previously the calls to ExpressionClassifier::Accumulate() each chose
slightly different sets of productions to accumulate, and it turned
out that these were in some cases broader than needed and in some
cases less broad.

The existence of some grab-bag production bitmasks like
ExpressionClassifier::ExpressionProductions made this situation more
error-prone (for example, that production was missing AsyncArrowFormalParametersProduction).

This patch removes all "grab-bags" besides AllProductions. In some of
the places where code was using those grab-bags for convenience, it
switches them to use negation of AllProductions. In other, specifically
those having to do with expressions that are disallowed anywhere in
a sub-expression of a parameter list, I've added a new method on
ExpressionClassifier to centralize the logic.

The aforementioned centralization/addition of
AsyncArrowFormalParametersProduction fixes several cases where we were
failing to report an error for 'await' in some contexts; I've added
those test cases.

The patch also narrows all cases to exactly the set or productions
necessary, with a comment on each explaining the choice.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2271063002
Cr-Commit-Position: refs/heads/master@{#38918}

[modify] https://crrev.com/51c186dd983e542d2ac17835f73df8b1e5c6461e/src/parsing/expression-classifier.h
[modify] https://crrev.com/51c186dd983e542d2ac17835f73df8b1e5c6461e/src/parsing/parser-base.h
[modify] https://crrev.com/51c186dd983e542d2ac17835f73df8b1e5c6461e/src/parsing/parser.cc
[modify] https://crrev.com/51c186dd983e542d2ac17835f73df8b1e5c6461e/src/parsing/preparser.cc
[modify] https://crrev.com/51c186dd983e542d2ac17835f73df8b1e5c6461e/test/cctest/test-parsing.cc

Blockedon: 5390
Project Member Comment 72 by bugdroid1@chromium.org, Sep 16
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/61a6b6f236079927a0e9640742fe4b0c282a9d09

commit 61a6b6f236079927a0e9640742fe4b0c282a9d09
Author: littledan <littledan@chromium.org>
Date: Fri Sep 16 20:23:03 2016

async/await: Don't trigger uncaught rejection handlers on throwaway Promises

This patch implements a bug fix to the async/await specification described
at https://github.com/tc39/ecma262/pull/692#issuecomment-247488411
Namely, the intermediate values of Promises may be rejected, and they do
not have .then called on them anymore (now that the memory leak is fixed),
but they do not correspond do unhandled rejections. This change has been
tested manually with integration with Blink; once it is checked in and
rolled, then further tests can be added on the Blink side for the uncaught
rejection handler and async/await.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2338273007
Cr-Commit-Position: refs/heads/master@{#39480}

[modify] https://crrev.com/61a6b6f236079927a0e9640742fe4b0c282a9d09/src/js/harmony-async-await.js
[modify] https://crrev.com/61a6b6f236079927a0e9640742fe4b0c282a9d09/src/js/prologue.js

Project Member Comment 73 by bugdroid1@chromium.org, Sep 23
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/713e247e7dd1bdf79b3f596c77a2fc28758de50b

commit 713e247e7dd1bdf79b3f596c77a2fc28758de50b
Author: littledan <littledan@chromium.org>
Date: Fri Sep 23 18:31:15 2016

Add method on Value::IsAsyncFunction to detect async functions

DevTools wants to be able to detect async functions in order to print
their synopsis better in stack traces and tooltips. This patch provides a
simple method to do the check.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2365833002
Cr-Commit-Position: refs/heads/master@{#39687}

[modify] https://crrev.com/713e247e7dd1bdf79b3f596c77a2fc28758de50b/include/v8.h
[modify] https://crrev.com/713e247e7dd1bdf79b3f596c77a2fc28758de50b/src/api.cc
[modify] https://crrev.com/713e247e7dd1bdf79b3f596c77a2fc28758de50b/test/cctest/test-api.cc

Project Member Comment 74 by bugdroid1@chromium.org, Sep 23
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/f296dad962e452ced1e5396b9ced7203747f7209

commit f296dad962e452ced1e5396b9ced7203747f7209
Author: littledan <littledan@chromium.org>
Date: Fri Sep 23 22:23:50 2016

Improve stack traces for async functions

This patch tracks the stack of async functions differently from other
Promise async stack tracking. With this patch, the stack trace of a
callstack of async functions should look similarly to the call stack
if all of the functions were synchronous. An example can be found in
the updated test expectations: https://codereview.chromium.org/2362923002 .

The new stack traces are implemented using existing mechanisms in the
inspector. The inspector has two ways to save async stack traces: recurring
and non-recurring stacks. An example of a non-recurring stack is setTimeout,
and a recurring one is saved for setInterval. Recurring stacks are deleted
only when a special "cancel" function is called, rather than being deleted
after being used the first time. Previous Promise async stack tracking always
used non-recurring stacks.

For async functions, this patch saves a recurring stack. The top frame of
the stack is duplicated, as the resuming function contains a similar frame;
the devtools frontend is responsible for removing or marking this frame,
which it can do based on seeing the [async function] line which follows it.
The second frame will instead be provided by the resuming execution
context. The recurring stack is saved when the async function is entered, and
it is deleted from a finally block. The id of the stack is saved in the outer
Promise being constructed by the async function. When an intermediate
throwaway Promise will be triggered as a reaction, it will be identified as
such based on its debugging metadata, and the corresponding async function's
recurring stack will be used.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2357423002
Cr-Commit-Position: refs/heads/master@{#39695}

[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/contexts.h
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/heap-symbols.h
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/inspector/v8-debugger.cc
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/inspector/v8-stack-trace-impl.cc
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/js/harmony-async-await.js
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/js/prologue.js
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/js/promise.js
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/src/parsing/parser.cc
[modify] https://crrev.com/f296dad962e452ced1e5396b9ced7203747f7209/test/mjsunit/harmony/debug-async-function-async-task-event.js

Project Member Comment 76 by bugdroid1@chromium.org, Sep 23
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/9f7540a0ec6333e7c71615609fe29274d9b7a4c5

commit 9f7540a0ec6333e7c71615609fe29274d9b7a4c5
Author: littledan <littledan@chromium.org>
Date: Fri Sep 23 23:48:35 2016

Ship async functions

Intent to ship discussion:
https://groups.google.com/forum/#!topic/v8-users/gwpcEIrgIZY

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2356943002
Cr-Commit-Position: refs/heads/master@{#39697}

[modify] https://crrev.com/9f7540a0ec6333e7c71615609fe29274d9b7a4c5/src/flag-definitions.h

Project Member Comment 77 by bugdroid1@chromium.org, Sep 24
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/a4354b6c15fd9dbde2677efdf81fbc99ff0cf3e0

commit a4354b6c15fd9dbde2677efdf81fbc99ff0cf3e0
Author: adamk <adamk@chromium.org>
Date: Sat Sep 24 00:25:38 2016

Revert of Ship async functions (patchset #2 id:20001 of https://codereview.chromium.org/2356943002/ )

Reason for revert:
Triggers TSAN errors on Linux64:

https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11901

Original issue's description:
> Ship async functions
>
> Intent to ship discussion:
> https://groups.google.com/forum/#!topic/v8-users/gwpcEIrgIZY
>
> BUG=v8:4483
>
> Committed: https://crrev.com/9f7540a0ec6333e7c71615609fe29274d9b7a4c5
> Cr-Commit-Position: refs/heads/master@{#39697}

TBR=caitp@igalia.com,littledan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2364963003
Cr-Commit-Position: refs/heads/master@{#39699}

[modify] https://crrev.com/a4354b6c15fd9dbde2677efdf81fbc99ff0cf3e0/src/flag-definitions.h

Project Member Comment 78 by bugdroid1@chromium.org, Sep 24
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/29f1475a8d4e8df2198e77f9f2bc1bb92a433435

commit 29f1475a8d4e8df2198e77f9f2bc1bb92a433435
Author: littledan <littledan@chromium.org>
Date: Sat Sep 24 02:07:03 2016

Refine duplicate arrow function parameter location handling

This patch fixes the logic of finding the location of a duplicate
parameter error in arrow functions by only looking at the error if it
exists. This should address a TSAN error. Further, an UNREACHABLE()
statement is inserted somewhere in the ExpressionClassifier code
to make future similar bugs easier to find.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2365693004
Cr-Commit-Position: refs/heads/master@{#39701}

[modify] https://crrev.com/29f1475a8d4e8df2198e77f9f2bc1bb92a433435/src/parsing/expression-classifier.h
[modify] https://crrev.com/29f1475a8d4e8df2198e77f9f2bc1bb92a433435/src/parsing/parser.cc

Project Member Comment 79 by bugdroid1@chromium.org, Sep 24
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/97cdf9f978e971df8a463fef7525bb942d305796

commit 97cdf9f978e971df8a463fef7525bb942d305796
Author: littledan <littledan@chromium.org>
Date: Sat Sep 24 02:08:41 2016

Reland of Ship async functions (patchset #1 id:1 of https://codereview.chromium.org/2364963003/ )

Reason for revert:
Fixed underlying cause of TSAN issue; trying again while watching the bots.

Original issue's description:
> Revert of Ship async functions (patchset #2 id:20001 of https://codereview.chromium.org/2356943002/ )
>
> Reason for revert:
> Triggers TSAN errors on Linux64:
>
> https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11901
>
> Original issue's description:
> > Ship async functions
> >
> > Intent to ship discussion:
> > https://groups.google.com/forum/#!topic/v8-users/gwpcEIrgIZY
> >
> > BUG=v8:4483
> >
> > Committed: https://crrev.com/9f7540a0ec6333e7c71615609fe29274d9b7a4c5
> > Cr-Commit-Position: refs/heads/master@{#39697}
>
> TBR=caitp@igalia.com,littledan@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:4483
>
> Committed: https://crrev.com/a4354b6c15fd9dbde2677efdf81fbc99ff0cf3e0
> Cr-Commit-Position: refs/heads/master@{#39699}

TBR=caitp@igalia.com,adamk@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2363093003
Cr-Commit-Position: refs/heads/master@{#39702}

[modify] https://crrev.com/97cdf9f978e971df8a463fef7525bb942d305796/src/flag-definitions.h

Project Member Comment 80 by bugdroid1@chromium.org, Sep 24
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/71713386f029c1b1694f635d676eafe8696be67d

commit 71713386f029c1b1694f635d676eafe8696be67d
Author: littledan <littledan@chromium.org>
Date: Sat Sep 24 02:50:27 2016

Revert of Ship async functions (patchset #1 id:1 of https://codereview.chromium.org/2363093003/ )

Reason for revert:
TSAN failures still happening; need to investigate more.

Original issue's description:
> Reland of Ship async functions (patchset #1 id:1 of https://codereview.chromium.org/2364963003/ )
>
> Reason for revert:
> Fixed underlying cause of TSAN issue; trying again while watching the bots.
>
> Original issue's description:
> > Revert of Ship async functions (patchset #2 id:20001 of https://codereview.chromium.org/2356943002/ )
> >
> > Reason for revert:
> > Triggers TSAN errors on Linux64:
> >
> > https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11901
> >
> > Original issue's description:
> > > Ship async functions
> > >
> > > Intent to ship discussion:
> > > https://groups.google.com/forum/#!topic/v8-users/gwpcEIrgIZY
> > >
> > > BUG=v8:4483
> > >
> > > Committed: https://crrev.com/9f7540a0ec6333e7c71615609fe29274d9b7a4c5
> > > Cr-Commit-Position: refs/heads/master@{#39697}
> >
> > TBR=caitp@igalia.com,littledan@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=v8:4483
> >
> > Committed: https://crrev.com/a4354b6c15fd9dbde2677efdf81fbc99ff0cf3e0
> > Cr-Commit-Position: refs/heads/master@{#39699}
>
> TBR=caitp@igalia.com,adamk@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:4483
>
> Committed: https://crrev.com/97cdf9f978e971df8a463fef7525bb942d305796
> Cr-Commit-Position: refs/heads/master@{#39702}

TBR=caitp@igalia.com,adamk@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2365113003
Cr-Commit-Position: refs/heads/master@{#39703}

[modify] https://crrev.com/71713386f029c1b1694f635d676eafe8696be67d/src/flag-definitions.h

Blockedon: 5427
Project Member Comment 82 by bugdroid1@chromium.org, Sep 24
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/13b8a1238b4d08d91938b3fea6bc25a34958ac78

commit 13b8a1238b4d08d91938b3fea6bc25a34958ac78
Author: littledan <littledan@chromium.org>
Date: Sat Sep 24 15:15:07 2016

Move async/await JS support code out of experimental natives

The file formerly known as src/js/harmony-async-await.js does not
expose anything directly to JavaScript code; it just makes a few
functions available on the native context for the parser desugaring
to expand into. Experimental natives have various issues with
larger amounts of code, so this patch moves the JS builtins to
support async functions out of experimental natives and into the
core snapshot. The change would be done eventually anyway, but this
patch does it before removing the flag to support shipping the
feature while avoiding the pitfalls of experimental natives.

Drive by cleanup: remove more unused functions from the whitelist for experimental natives.

BUG=v8:5427,v8:4483

Review-Url: https://codereview.chromium.org/2365123002
Cr-Commit-Position: refs/heads/master@{#39706}

[modify] https://crrev.com/13b8a1238b4d08d91938b3fea6bc25a34958ac78/BUILD.gn
[modify] https://crrev.com/13b8a1238b4d08d91938b3fea6bc25a34958ac78/src/bootstrapper.cc
[rename] https://crrev.com/13b8a1238b4d08d91938b3fea6bc25a34958ac78/src/js/async-await.js
[modify] https://crrev.com/13b8a1238b4d08d91938b3fea6bc25a34958ac78/src/js/prologue.js
[modify] https://crrev.com/13b8a1238b4d08d91938b3fea6bc25a34958ac78/src/v8.gyp

Blockedon: -5427
Project Member Comment 84 by bugdroid1@chromium.org, Sep 24
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/a52e564775ce3affda9058d806f0b9d3b0a93c7c

commit a52e564775ce3affda9058d806f0b9d3b0a93c7c
Author: littledan <littledan@chromium.org>
Date: Sat Sep 24 15:45:56 2016

Reland of Ship async functions (patchset #1 id:1 of https://codereview.chromium.org/2364963003/ )

Fixed another TSAN issue in https://codereview.chromium.org/2365123002

TBR=caitp@igalia.com,adamk@chromium.org
BUG=v8:4483

Review-Url: https://codereview.chromium.org/2367203002
Cr-Commit-Position: refs/heads/master@{#39708}

[modify] https://crrev.com/a52e564775ce3affda9058d806f0b9d3b0a93c7c/src/flag-definitions.h

1.mp4
188 KB View Download
#85 -
Please, find or file an issue for that (perhaps a Chromium issue at crbug.com instead of a V8 issue, unless you can somehow reproduce in d8).
What is version of Chrome in screen cast?
And how this function was created? Is it from eval, setTimeout or AsyncFunction constructor?
I checked out following variants, with and without experimental JS flag in ToT.
(async function(){
    debugger;
    throw 1;
})();

setTimeout(`(async function(){
    debugger;
    throw 1;
})();`,0);

eval(`(async function(){
    debugger;
    throw 1;
})();`);

Works good to me. l446240525@, could you check in latest dev and confirm that issue is still here?
Cc: kozyatin...@chromium.org
Status: Fixed
On track to ship in 55.
Comment 92 Deleted
Project Member Comment 93 by bugdroid1@chromium.org, Jan 3
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/c523474713e11e98f0b87f2d7137cf3465aab13c

commit c523474713e11e98f0b87f2d7137cf3465aab13c
Author: caitp <caitp@igalia.com>
Date: Tue Jan 03 21:38:22 2017

[cleanup] remove sloppy generator/async function maps

These maps contain exactly the same information as the strict maps, so
this frees up a few pointers of native context space, gets rid of some
branches in FastNewClosure, and adds missing poisoned properties tests
for async functions.

BUG=v8:2355, v8:4483
R=adamk@chromium.org, bmeurer@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2608333002
Cr-Commit-Position: refs/heads/master@{#42051}

[modify] https://crrev.com/c523474713e11e98f0b87f2d7137cf3465aab13c/src/bootstrapper.cc
[modify] https://crrev.com/c523474713e11e98f0b87f2d7137cf3465aab13c/src/builtins/builtins-constructor.cc
[modify] https://crrev.com/c523474713e11e98f0b87f2d7137cf3465aab13c/src/contexts.h
[modify] https://crrev.com/c523474713e11e98f0b87f2d7137cf3465aab13c/src/objects.cc
[modify] https://crrev.com/c523474713e11e98f0b87f2d7137cf3465aab13c/test/mjsunit/harmony/async-await-basic.js

Project Member Comment 94 by bugdroid1@chromium.org, Jan 18
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/4173fda417a38765d4fd72454959bc953b0062c8

commit 4173fda417a38765d4fd72454959bc953b0062c8
Author: caitp <caitp@igalia.com>
Date: Wed Jan 18 15:41:03 2017

[builtins] introduce AsyncBuiltinsAssembler for ES2016 features and beyond

First step in splitting apart https://codereview.chromium.org/2622833002/ to
land piece by piece.

Porting src/js/async-await.js to TF builtins using this boilerplate is
now very straightforward.

BUG=v8:4483, v8:5855
R=jgruber@chromium.org, gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2635353002
Cr-Commit-Position: refs/heads/master@{#42466}

[modify] https://crrev.com/4173fda417a38765d4fd72454959bc953b0062c8/BUILD.gn
[add] https://crrev.com/4173fda417a38765d4fd72454959bc953b0062c8/src/builtins/builtins-async.cc
[add] https://crrev.com/4173fda417a38765d4fd72454959bc953b0062c8/src/builtins/builtins-async.h
[modify] https://crrev.com/4173fda417a38765d4fd72454959bc953b0062c8/src/builtins/builtins-promise.h
[modify] https://crrev.com/4173fda417a38765d4fd72454959bc953b0062c8/src/v8.gyp

Comment 95 Deleted
Project Member Comment 96 by bugdroid1@chromium.org, Feb 10
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/39642fa2bef2ca151af32fa0f5bfbf357e8914aa

commit 39642fa2bef2ca151af32fa0f5bfbf357e8914aa
Author: caitp <caitp@igalia.com>
Date: Fri Feb 10 14:38:58 2017

[async-await] (simpler) fix for Return in try/finally in async functions

Alternative approach to https://codereview.chromium.org/2667983004/, which
does not depend on implicit control flow changes from
https://codereview.chromium.org/2664083002

- Remove handling for `async function` from Parser::RewriteReturn(). This functionality
is moved to BytecodeGenerator::BuildAsyncReturn(). This ensures that promise resolution
is deferred until all finally blocks are evaluated fully.

- Add a new deferred command (CMD_ASYNC_RETURN), which instructs ControlScope to
generate return code using BuildAsyncReturn rather than BuildReturn.

- Parser has a new `NewReturnStatement()` helper which determines what type of return
statement to generate based on the type of function.

BUG=v8:5896, v8:4483
R=littledan@chromium.org, neis@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2685683002
Cr-Commit-Position: refs/heads/master@{#43104}

[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/ast/ast-numbering.cc
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/ast/ast.h
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/ast/scopes.cc
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/ast/scopes.h
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/interpreter/bytecode-generator.cc
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/interpreter/bytecode-generator.h
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/parsing/parser-base.h
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/parsing/parser.cc
[modify] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/src/parsing/preparser.h
[add] https://crrev.com/39642fa2bef2ca151af32fa0f5bfbf357e8914aa/test/mjsunit/es8/async-function-try-finally.js

Project Member Comment 97 by bugdroid1@chromium.org, Feb 15
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/76ab55e3d37f31e1f343ad35c293404bfd259457

commit 76ab55e3d37f31e1f343ad35c293404bfd259457
Author: caitp <caitp@igalia.com>
Date: Wed Feb 15 19:39:06 2017

[async-iteration] add support for for-await-of loops in Async Functions

When --harmony-async-iteration is enabled, it is now possible to
use the for-await-of loop, which uses the Async Iteration protocol
rather than the ordinary ES6 Iteration protocol.

the Async-from-Sync Iterator object is not implemented in this CL,
and so for-await-of loops will abort execution if the iterated object
does not have a Symbol.asyncIterator() method. Async-from-Sync
Iterators are implemented seperately in https://codereview.chromium.org/2645313003/

BUG=v8:5855, v8:4483
R=neis@chromium.org, littledan@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/2637403008
Cr-Commit-Position: refs/heads/master@{#43224}

[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/ast/ast.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/interpreter/bytecode-array-builder.cc
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/interpreter/bytecode-array-builder.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/interpreter/bytecode-generator.cc
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/interpreter/constant-array-builder.cc
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/interpreter/constant-array-builder.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/messages.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/parsing/parser-base.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/parsing/parser.cc
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/parsing/parser.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/parsing/pattern-rewriter.cc
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/parsing/preparser.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/runtime/runtime-internal.cc
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/src/runtime/runtime.h
[modify] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/test/cctest/test-parsing.cc
[add] https://crrev.com/76ab55e3d37f31e1f343ad35c293404bfd259457/test/mjsunit/harmony/for-await-of.js

Project Member Comment 98 by bugdroid1@chromium.org, Feb 24 (3 days ago)
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/0423341034c767d91128c9fd68e3f51e60359c1c

commit 0423341034c767d91128c9fd68e3f51e60359c1c
Author: caitp <caitp@igalia.com>
Date: Fri Feb 24 17:48:49 2017

[async-iteration] implement Async-from-Sync Iterator

Introduce a new Object to allow GetIterator("async") to function when the
iterable does not have a Symbol.asyncIterator method.

This patch has been split out from https://codereview.chromium.org/2622833002/
and incorporates test cases.

BUG=v8:5855, v8:4483
R=jgruber@chromium.org, rmcilroy@chromium.org, neis@chromium.org
TBR=hpayer@chromium.org, bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2645313003
Cr-Commit-Position: refs/heads/master@{#43419}

[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/BUILD.gn
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/ast/ast-types.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/bootstrapper.cc
[add] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/builtins/builtins-async-iterator.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/builtins/builtins.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/code-stub-assembler.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/code-stub-assembler.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/compiler/code-assembler.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/compiler/code-assembler.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/compiler/types.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/contexts.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/deoptimizer.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/factory.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/factory.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/heap/objects-visiting.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/interpreter/interpreter-intrinsics.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/interpreter/interpreter-intrinsics.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/objects-body-descriptors-inl.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/objects-debug.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/objects-inl.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/objects.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/objects.h
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/runtime/runtime-internal.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/src/v8.gyp
[add] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/test/cctest/interpreter/generate-bytecode-expectations.cc
[modify] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/test/cctest/interpreter/test-bytecode-generator.cc
[add] https://crrev.com/0423341034c767d91128c9fd68e3f51e60359c1c/test/mjsunit/harmony/async-from-sync-iterator.js

Sign in to add a comment