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

Issue 2317383002: Async/await Promise dependency graph (Closed)

Created:
4 years, 3 months ago by Dan Ehrenberg
Modified:
4 years, 3 months ago
Reviewers:
kozy, adamk, jgruber
CC:
caitp, gsathya, neis, v8-reviews_googlegroups.com, Yang
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Async/await Promise dependency graph This patch knits together Promises returned by async/await such that when one async function awaits the result of another one, catch prediction works across the boundaries, whether the exception comes synchronously or asynchronously. Edges are added in three places: - When a locally uncaught await happens, if the value passed into await is a Promise, from the awaited value to the Promise under construction in the broader async function - From a "throwaway" Promise, which may be found on the Promise debug stack, to the Promise under construction in the async function that surrounds it - When a Promise is resolved with another Promise (e.g., when returning a Promise from an async function) BUG=v8:5167 Committed: https://crrev.com/7265fdde7c76b9f875b40b0b139515936d491d64 Cr-Commit-Position: refs/heads/master@{#39522}

Patch Set 1 #

Patch Set 2 : CLeanup #

Patch Set 3 : CLeanup #

Patch Set 4 : Only if debug is active #

Patch Set 5 : Only if debug is active #

Total comments: 8

Patch Set 6 : Rebase #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Patch Set 9 : rebase #

Patch Set 10 : Better comments #

Patch Set 11 : rebase #

Patch Set 12 : Problematic test case #

Patch Set 13 : Maintain visited set to break dependency cycles #

Total comments: 17

Patch Set 14 : Cleanups from review #

Patch Set 15 : Fix parser #

Total comments: 2

Patch Set 16 : Rebase #

Patch Set 17 : Reorder #

Patch Set 18 : Store .promise in FunctionState #

Patch Set 19 : Revert function state change, and mark throwaway promise as handled #

Patch Set 20 : Fix comment #

Patch Set 21 : Slight cleanup #

Patch Set 22 : Rebase #

Patch Set 23 : Rebase #

Patch Set 24 : format #

Total comments: 11

Patch Set 25 : Remove cycle detection #

Patch Set 26 : nopos #

Patch Set 27 : Attempt to clean up dependency graph #

Patch Set 28 : Attempt to clean up dependency graph #

Patch Set 29 : Remove irrelevant whitespace change #

Total comments: 2

Patch Set 30 : let to var #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -47 lines) Patch
M src/heap-symbols.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -2 lines 0 comments Download
M src/js/harmony-async-await.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +29 lines, -17 lines 0 comments Download
M src/js/prologue.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -1 line 0 comments Download
M src/js/promise.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 11 chunks +58 lines, -22 lines 2 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +4 lines, -2 lines 0 comments Download
M test/mjsunit/harmony/async-debug-caught-exception-cases.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 4 chunks +60 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 102 (74 generated)
Dan Ehrenberg
4 years, 3 months ago (2016-09-08 01:35:36 UTC) #11
gsathya
https://codereview.chromium.org/2317383002/diff/80001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2317383002/diff/80001/src/js/promise.js#newcode290 src/js/promise.js:290: if (!IS_UNDEFINED(resolution) && DEBUG_IS_ACTIVE && IsPromise(resolution)) { nit: format, ...
4 years, 3 months ago (2016-09-08 21:38:59 UTC) #15
adamk
https://codereview.chromium.org/2317383002/diff/80001/src/js/harmony-async-await.js File src/js/harmony-async-await.js (left): https://codereview.chromium.org/2317383002/diff/80001/src/js/harmony-async-await.js#oldcode73 src/js/harmony-async-await.js:73: return PerformPromiseThen(promise, onFulfilled, onRejected, AsyncFunctionAwait used to return something, ...
4 years, 3 months ago (2016-09-08 22:07:31 UTC) #16
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/80001/src/js/harmony-async-await.js File src/js/harmony-async-await.js (left): https://codereview.chromium.org/2317383002/diff/80001/src/js/harmony-async-await.js#oldcode73 src/js/harmony-async-await.js:73: return PerformPromiseThen(promise, onFulfilled, onRejected, On 2016/09/08 at 22:07:31, adamk ...
4 years, 3 months ago (2016-09-08 22:34:47 UTC) #17
jgruber
lgtm with comments and modulo the layout test failures. https://codereview.chromium.org/2317383002/diff/220001/src/js/collection.js File src/js/collection.js (right): https://codereview.chromium.org/2317383002/diff/220001/src/js/collection.js#newcode488 src/js/collection.js:488: ...
4 years, 3 months ago (2016-09-12 13:22:00 UTC) #38
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/80001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2317383002/diff/80001/src/js/promise.js#newcode290 src/js/promise.js:290: if (!IS_UNDEFINED(resolution) && DEBUG_IS_ACTIVE && IsPromise(resolution)) { On 2016/09/08 ...
4 years, 3 months ago (2016-09-12 22:49:25 UTC) #41
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/220001/src/js/harmony-async-await.js File src/js/harmony-async-await.js (right): https://codereview.chromium.org/2317383002/diff/220001/src/js/harmony-async-await.js#newcode85 src/js/harmony-async-await.js:85: if (debug_is_active) { On 2016/09/12 at 13:22:00, jgruber wrote: ...
4 years, 3 months ago (2016-09-12 22:51:23 UTC) #42
jgruber
Still lgtm modulo test failures. https://codereview.chromium.org/2317383002/diff/220001/src/js/collection.js File src/js/collection.js (right): https://codereview.chromium.org/2317383002/diff/220001/src/js/collection.js#newcode488 src/js/collection.js:488: to.SetAdd = SetAdd; On ...
4 years, 3 months ago (2016-09-13 08:27:16 UTC) #45
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/260001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2317383002/diff/260001/src/parsing/parser.cc#newcode4411 src/parsing/parser.cc:4411: zone()); This parser change should address the Blink failures. ...
4 years, 3 months ago (2016-09-14 01:09:14 UTC) #48
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/260001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2317383002/diff/260001/src/parsing/parser.cc#newcode4411 src/parsing/parser.cc:4411: zone()); This parser change should address the Blink failures. ...
4 years, 3 months ago (2016-09-14 01:09:14 UTC) #49
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/260001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2317383002/diff/260001/src/parsing/parser.cc#newcode4411 src/parsing/parser.cc:4411: zone()); On 2016/09/14 01:09:14, Dan Ehrenberg wrote: > This ...
4 years, 3 months ago (2016-09-14 01:32:38 UTC) #56
Dan Ehrenberg
The newest patchset addresses previous issues; stack trace tests are marked NeedsManualRebaseline as this patch ...
4 years, 3 months ago (2016-09-15 04:25:01 UTC) #65
adamk
https://codereview.chromium.org/2317383002/diff/430001/src/js/harmony-async-await.js File src/js/harmony-async-await.js (right): https://codereview.chromium.org/2317383002/diff/430001/src/js/harmony-async-await.js#newcode85 src/js/harmony-async-await.js:85: SET_PRIVATE(onRejected, promiseAwaitHandlerSymbol, outerPromise); Most other places that use promiseAwaitHandlerSymbol ...
4 years, 3 months ago (2016-09-15 22:39:40 UTC) #74
Dan Ehrenberg
Rebased on top of a couple other fixes. This patch actually removes cycle detection, as ...
4 years, 3 months ago (2016-09-17 00:04:31 UTC) #77
Dan Ehrenberg
Rebased on top of a couple other fixes. This patch actually removes cycle detection, as ...
4 years, 3 months ago (2016-09-17 00:04:31 UTC) #78
adamk
Thanks, the simplification lgtm, but I'd ideally like to get another look from the other ...
4 years, 3 months ago (2016-09-17 00:32:41 UTC) #79
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/530001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2317383002/diff/530001/src/js/promise.js#newcode505 src/js/promise.js:505: let throwawayPromise = nextPromise.then( On 2016/09/17 at 00:32:40, adamk ...
4 years, 3 months ago (2016-09-17 00:39:32 UTC) #80
jgruber
lgtm https://codereview.chromium.org/2317383002/diff/550001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2317383002/diff/550001/src/js/promise.js#newcode511 src/js/promise.js:511: SET_PRIVATE(throwawayPromise, promiseHandledBySymbol, deferred.promise); promiseHandledBySymbol is sometimes set only ...
4 years, 3 months ago (2016-09-19 14:48:05 UTC) #85
kozy
lgtm
4 years, 3 months ago (2016-09-19 15:43:47 UTC) #86
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2317383002/550001
4 years, 3 months ago (2016-09-19 16:34:28 UTC) #89
commit-bot: I haz the power
Try jobs failed on following builders: v8_android_arm_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/builds/24762) v8_linux64_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 3 months ago (2016-09-19 16:36:17 UTC) #91
Dan Ehrenberg
https://codereview.chromium.org/2317383002/diff/550001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2317383002/diff/550001/src/js/promise.js#newcode511 src/js/promise.js:511: SET_PRIVATE(throwawayPromise, promiseHandledBySymbol, deferred.promise); On 2016/09/19 at 14:48:05, jgruber wrote: ...
4 years, 3 months ago (2016-09-19 16:37:36 UTC) #92
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2317383002/550001
4 years, 3 months ago (2016-09-19 18:46:39 UTC) #94
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2317383002/550001
4 years, 3 months ago (2016-09-19 23:55:37 UTC) #97
commit-bot: I haz the power
Committed patchset #30 (id:550001)
4 years, 3 months ago (2016-09-19 23:58:38 UTC) #98
commit-bot: I haz the power
Patchset 30 (id:??) landed as https://crrev.com/7265fdde7c76b9f875b40b0b139515936d491d64 Cr-Commit-Position: refs/heads/master@{#39522}
4 years, 3 months ago (2016-09-19 23:59:11 UTC) #100
Dan Ehrenberg
A revert of this CL (patchset #30 id:550001) has been created in https://codereview.chromium.org/2351953002/ by littledan@chromium.org. ...
4 years, 3 months ago (2016-09-20 01:09:03 UTC) #101
Dan Ehrenberg
4 years, 3 months ago (2016-09-20 18:00:03 UTC) #102
Message was sent while issue was closed.
On 2016/09/20 at 01:09:03, Dan Ehrenberg wrote:
> A revert of this CL (patchset #30 id:550001) has been created in
https://codereview.chromium.org/2351953002/ by littledan@chromium.org.
> 
> The reason for reverting is: Need to break up test into smaller tests to avoid
timeouts.

Reland in https://codereview.chromium.org/2346363004

Powered by Google App Engine
This is Rietveld 408576698