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

Issue 484933003: Await it! (Closed)

Created:
6 years, 4 months ago by Michael Lippautz (Google)
Modified:
6 years, 3 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Await it! Add support for awaiting futures. This leaves us with a non-structural CFG. TODOs: * Forwarding exceptions through futures in async functions and rethrowing them using await. * Known bug with nested contexts (will be fixed in following CL) * await is not recognized at all expressions specified (yet) BUG= R=hausner@google.com, srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=39559

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : refactor out BuildAwaitJump() #

Patch Set 4 : fix ctx restore + continuation result passing #

Patch Set 5 : #

Total comments: 46

Patch Set 6 : addressed comments #

Total comments: 10

Patch Set 7 : addressed comments #

Patch Set 8 : #

Total comments: 1

Patch Set 9 : finally try to catch all issues in try/catch/finally #

Total comments: 24

Patch Set 10 : addressed comments #

Patch Set 11 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+555 lines, -62 lines) Patch
M runtime/vm/ast.h View 1 2 3 4 5 6 7 8 9 5 chunks +58 lines, -8 lines 0 comments Download
M runtime/vm/ast_printer.cc View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M runtime/vm/ast_transformer.h View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download
M runtime/vm/ast_transformer.cc View 1 2 3 4 5 6 7 8 9 3 chunks +37 lines, -31 lines 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 3 4 5 6 7 8 3 chunks +15 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 6 7 8 9 8 chunks +181 lines, -11 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 6 7 8 4 chunks +25 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 8 9 10 chunks +132 lines, -11 lines 0 comments Download
M runtime/vm/scopes.h View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/scopes.cc View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
M runtime/vm/symbols.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A tests/language/await_future_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +61 lines, -0 lines 0 comments Download
M tests/standalone/issue14236_test.dart View 1 2 3 4 5 6 7 8 Binary file 0 comments Download

Messages

Total messages: 15 (0 generated)
Michael Lippautz (Google)
RFC -- help needed This approach works for an example without nested contexts. The example ...
6 years, 4 months ago (2014-08-19 18:01:58 UTC) #1
Michael Lippautz (Google)
PTAL, +hausner The bug was caused by not properly dereferencing a nested context when copying ...
6 years, 4 months ago (2014-08-20 02:03:32 UTC) #2
srdjan
https://codereview.chromium.org/484933003/diff/80001/runtime/vm/ast_transformer.h File runtime/vm/ast_transformer.h (right): https://codereview.chromium.org/484933003/diff/80001/runtime/vm/ast_transformer.h#newcode51 runtime/vm/ast_transformer.h:51: // scope. Please fix comment. https://codereview.chromium.org/484933003/diff/80001/runtime/vm/ast_transformer.h#newcode53 runtime/vm/ast_transformer.h:53: // We ...
6 years, 4 months ago (2014-08-20 17:50:07 UTC) #3
hausner
More comments to chew on. I think this CL will be good after the next ...
6 years, 4 months ago (2014-08-20 19:47:49 UTC) #4
Michael Lippautz (Google)
PTAL Good catch with optimizations. I forgot to set the backwards pointer in one place. ...
6 years, 4 months ago (2014-08-20 20:56:07 UTC) #5
hausner
LGTM https://codereview.chromium.org/484933003/diff/80001/runtime/vm/scopes.cc File runtime/vm/scopes.cc (right): https://codereview.chromium.org/484933003/diff/80001/runtime/vm/scopes.cc#newcode615 runtime/vm/scopes.cc:615: VariableAt(i)->set_is_captured(); Maybe a one-liner comment might help a ...
6 years, 4 months ago (2014-08-20 21:42:53 UTC) #6
srdjan
https://codereview.chromium.org/484933003/diff/100001/runtime/vm/ast.h File runtime/vm/ast.h (right): https://codereview.chromium.org/484933003/diff/100001/runtime/vm/ast.h#newcode586 runtime/vm/ast.h:586: enum Type { I would rename the enum since ...
6 years, 4 months ago (2014-08-20 23:08:42 UTC) #7
Florian Schneider
dbc: https://codereview.chromium.org/484933003/diff/80001/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://codereview.chromium.org/484933003/diff/80001/runtime/vm/flow_graph_builder.cc#newcode2194 runtime/vm/flow_graph_builder.cc:2194: StoreLocalNode* store_jump_cnt = new(I) StoreLocalNode( Why do you ...
6 years, 4 months ago (2014-08-21 11:09:29 UTC) #8
Michael Lippautz (Google)
Addressed all comments. https://codereview.chromium.org/484933003/diff/80001/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://codereview.chromium.org/484933003/diff/80001/runtime/vm/flow_graph_builder.cc#newcode2194 runtime/vm/flow_graph_builder.cc:2194: StoreLocalNode* store_jump_cnt = new(I) StoreLocalNode( On ...
6 years, 4 months ago (2014-08-21 16:39:14 UTC) #9
Michael Lippautz (Google)
PTAL; update contains fixes for try/catch/finally As discussed offline for try/catch/finally we don't capture the ...
6 years, 3 months ago (2014-08-25 16:46:13 UTC) #10
hausner
Front-end LGTMwC. Would be nice if one of the back-enders could take a final look, ...
6 years, 3 months ago (2014-08-25 20:26:14 UTC) #11
srdjan
https://codereview.chromium.org/484933003/diff/140001/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://codereview.chromium.org/484933003/diff/140001/runtime/vm/flow_graph_builder.cc#newcode3764 runtime/vm/flow_graph_builder.cc:3764: ASSERT(ctx_var != NULL && ctx_var->is_captured()); Add parantheses above https://codereview.chromium.org/484933003/diff/160001/runtime/vm/ast_transformer.cc ...
6 years, 3 months ago (2014-08-26 15:54:34 UTC) #12
Michael Lippautz (Google)
https://codereview.chromium.org/484933003/diff/160001/runtime/vm/ast_transformer.cc File runtime/vm/ast_transformer.cc (right): https://codereview.chromium.org/484933003/diff/160001/runtime/vm/ast_transformer.cc#newcode97 runtime/vm/ast_transformer.cc:97: // return; // (is_regular_return() == false) On 2014/08/26 15:54:33, ...
6 years, 3 months ago (2014-08-26 16:45:49 UTC) #13
srdjan
lgtm
6 years, 3 months ago (2014-08-26 17:10:33 UTC) #14
Michael Lippautz (Google)
6 years, 3 months ago (2014-08-26 17:36:06 UTC) #15
Message was sent while issue was closed.
Committed patchset #11 manually as 39559 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698