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

Issue 2233923003: Desugar async/await to create the resulting Promise upfront (Closed)

Created:
4 years, 4 months ago by Dan Ehrenberg
Modified:
4 years, 3 months ago
CC:
gsathya, jgruber, v8-reviews_googlegroups.com, Yang
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Desugar async/await to create the resulting Promise upfront As part of the work to implement catch prediction for async functions, the resulting Promise that is the output of the function needs to be available earlier for a couple reasons: - To be able to do %DebugPushPromise/%DebugPopPromise over the body of the async function - To be able to pass the resulting promise into AsyncFunctionAwait in order to set up the dependency chains This patch creates the Promise earlier and pushes it onto the debug stack; a later patch will set up the dependency chain. Although the debug stack is set up, it's not anticipated that this will change the catch prediction helpfully yet, as everything will still likely be predicted as 'caught' for now, as before. R=caitp@igalia.com,yangguo@chromium.org CC=neis@chromium.org,gsathya@chromium.org BUG=v8:5167 Committed: https://crrev.com/5386c0062d8ae6ab6975a6f5071fae628377e7b8 Cr-Commit-Position: refs/heads/master@{#38957}

Patch Set 1 #

Patch Set 2 : git cl format #

Patch Set 3 : Declare correctly for rebase #

Patch Set 4 : Check for stack overflow on function length getter #

Total comments: 2

Patch Set 5 : Better approach for bailing out on stack overflow in the appropriate place in fullcodegen #

Total comments: 2

Patch Set 6 : Rebase on top of exception events patch #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Patch Set 9 : Fix polarity of async function rejections #

Total comments: 25

Patch Set 10 : Changes from review #

Total comments: 2

Patch Set 11 : Rebase #

Patch Set 12 : format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -92 lines) Patch
M src/ast/ast-value-factory.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/contexts.h View 1 2 3 4 5 6 7 8 9 1 chunk +38 lines, -38 lines 0 comments Download
M src/full-codegen/full-codegen.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M src/js/harmony-async-await.js View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -1 line 0 comments Download
M src/js/prologue.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M src/js/promise.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +1 line, -18 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -4 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +129 lines, -31 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 82 (63 generated)
Dan Ehrenberg
4 years, 4 months ago (2016-08-11 22:23:01 UTC) #21
caitp
https://codereview.chromium.org/2233923003/diff/60001/src/accessors.cc File src/accessors.cc (right): https://codereview.chromium.org/2233923003/diff/60001/src/accessors.cc#newcode744 src/accessors.cc:744: result = handle(Smi::FromInt(0), isolate); thinking about this, we only ...
4 years, 4 months ago (2016-08-12 01:57:10 UTC) #24
Dan Ehrenberg
https://codereview.chromium.org/2233923003/diff/60001/src/accessors.cc File src/accessors.cc (right): https://codereview.chromium.org/2233923003/diff/60001/src/accessors.cc#newcode744 src/accessors.cc:744: result = handle(Smi::FromInt(0), isolate); On 2016/08/12 at 01:57:10, caitp ...
4 years, 4 months ago (2016-08-12 02:20:47 UTC) #25
Dan Ehrenberg
PTAL
4 years, 4 months ago (2016-08-22 00:22:04 UTC) #28
adamk
I'd like someone more familiar with the async/await implementation to review the desugaring (neis + ...
4 years, 4 months ago (2016-08-22 18:47:40 UTC) #30
Dan Ehrenberg
https://codereview.chromium.org/2233923003/diff/80001/src/full-codegen/full-codegen.cc File src/full-codegen/full-codegen.cc (right): https://codereview.chromium.org/2233923003/diff/80001/src/full-codegen/full-codegen.cc#newcode899 src/full-codegen/full-codegen.cc:899: if (HasStackOverflow()) return; On 2016/08/22 at 18:47:39, adamk wrote: ...
4 years, 4 months ago (2016-08-22 19:01:10 UTC) #31
jgruber
A couple of minor comments from my side: https://codereview.chromium.org/2233923003/diff/160001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2233923003/diff/160001/src/parsing/parser.cc#newcode4577 src/parsing/parser.cc:4577: Block* ...
4 years, 3 months ago (2016-08-24 09:16:36 UTC) #52
neis
https://codereview.chromium.org/2233923003/diff/160001/src/js/harmony-async-await.js File src/js/harmony-async-await.js (right): https://codereview.chromium.org/2233923003/diff/160001/src/js/harmony-async-await.js#newcode59 src/js/harmony-async-await.js:59: "promise_reject_no_debug_event", RejectPromiseNoDebugEvent, reject_promise_... https://codereview.chromium.org/2233923003/diff/160001/src/parsing/parser.cc File src/parsing/parser.cc (left): https://codereview.chromium.org/2233923003/diff/160001/src/parsing/parser.cc#oldcode3969 src/parsing/parser.cc:3969: ...
4 years, 3 months ago (2016-08-24 09:48:51 UTC) #53
Dan Ehrenberg
Thanks for the review comments; made the appropriate cleanups. PTAL. https://codereview.chromium.org/2233923003/diff/160001/src/js/harmony-async-await.js File src/js/harmony-async-await.js (right): https://codereview.chromium.org/2233923003/diff/160001/src/js/harmony-async-await.js#newcode59 ...
4 years, 3 months ago (2016-08-24 18:03:23 UTC) #54
neis
lgtm modulo one comment. https://codereview.chromium.org/2233923003/diff/180001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2233923003/diff/180001/src/parsing/parser.cc#newcode4462 src/parsing/parser.cc:4462: DeclareVariable(ast_value_factory()->dot_promise_string(), VAR, Please declare this ...
4 years, 3 months ago (2016-08-25 08:15:22 UTC) #59
jgruber
lgtm
4 years, 3 months ago (2016-08-25 08:29:10 UTC) #60
Dan Ehrenberg
https://codereview.chromium.org/2233923003/diff/180001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2233923003/diff/180001/src/parsing/parser.cc#newcode4462 src/parsing/parser.cc:4462: DeclareVariable(ast_value_factory()->dot_promise_string(), VAR, On 2016/08/25 at 08:15:22, neis wrote: > ...
4 years, 3 months ago (2016-08-25 14:23:34 UTC) #61
neis
On 2016/08/25 14:23:34, Dan Ehrenberg wrote: > https://codereview.chromium.org/2233923003/diff/180001/src/parsing/parser.cc > File src/parsing/parser.cc (right): > > https://codereview.chromium.org/2233923003/diff/180001/src/parsing/parser.cc#newcode4462 ...
4 years, 3 months ago (2016-08-26 07:23:04 UTC) #70
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/2233923003/220001
4 years, 3 months ago (2016-08-26 07:23:51 UTC) #73
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/22649)
4 years, 3 months ago (2016-08-26 07:27:02 UTC) #75
Benedikt Meurer
LGTM on fullcodegen.
4 years, 3 months ago (2016-08-26 16:36:45 UTC) #76
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/2233923003/220001
4 years, 3 months ago (2016-08-26 22:16:18 UTC) #78
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 3 months ago (2016-08-26 22:18:06 UTC) #80
commit-bot: I haz the power
4 years, 3 months ago (2016-08-26 22:18:36 UTC) #82
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/5386c0062d8ae6ab6975a6f5071fae628377e7b8
Cr-Commit-Position: refs/heads/master@{#38957}

Powered by Google App Engine
This is Rietveld 408576698