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

Issue 447003003: Introduce await (Closed)

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

Description

Introduce await. This CL adds basic infrastructure needed for awaitable expressions. Implementation of continuations is not part of this CL. Expressions containing ``await'' are transformed into a series of operations on intermediates, effectively getting rid of the temporary expression stack. Currently only expressions evaluating to an actual value (read: non-future) are supported. Also, not all kinds of statements support awaitable expressions yet. Missing: * Capturing all (needed) variables * Continuations (connecting a preamble with await statements; re-adding the closure to the run queue) BUG= R=hausner@google.com Committed: https://code.google.com/p/dart/source/detail?r=39345

Patch Set 1 : #

Total comments: 3

Patch Set 2 : #

Total comments: 36

Patch Set 3 : adressed first round of comments #

Patch Set 4 : make linter happy #

Patch Set 5 : minor fix for parsing async closures #

Patch Set 6 : rebase + bring up to date #

Total comments: 30

Patch Set 7 : addressed comments #

Total comments: 14

Patch Set 8 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+858 lines, -5 lines) Patch
M runtime/vm/ast.h View 1 2 3 4 5 6 2 chunks +21 lines, -0 lines 0 comments Download
M runtime/vm/ast_printer.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A runtime/vm/ast_transformer.h View 1 2 3 4 5 6 7 1 chunk +84 lines, -0 lines 0 comments Download
A runtime/vm/ast_transformer.cc View 1 2 3 4 5 6 7 1 chunk +508 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 5 chunks +22 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 11 chunks +72 lines, -3 lines 0 comments Download
M runtime/vm/symbols.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A tests/language/await_test.dart View 1 2 3 4 5 6 7 1 chunk +132 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Michael Lippautz (Google)
Please take a first look. As stated above not all statements are awaitable yet. (Actually, ...
6 years, 4 months ago (2014-08-07 00:18:56 UTC) #1
hausner
First set of comments. I like how how you keep the additional complexity out of ...
6 years, 4 months ago (2014-08-07 21:48:44 UTC) #2
Michael Lippautz (Google)
Thanks a lot! https://codereview.chromium.org/447003003/diff/60001/runtime/vm/ast_printer.cc File runtime/vm/ast_printer.cc (right): https://codereview.chromium.org/447003003/diff/60001/runtime/vm/ast_printer.cc#newcode155 runtime/vm/ast_printer.cc:155: void AstPrinter::VisitAwaitNode(AwaitNode* node) { On 2014/08/07 ...
6 years, 4 months ago (2014-08-08 18:12:18 UTC) #3
Michael Lippautz (Google)
PTAL I updated the CL and got rid of stuff we will not need anymore. ...
6 years, 4 months ago (2014-08-13 18:11:07 UTC) #4
srdjan
https://codereview.chromium.org/447003003/diff/180001/runtime/vm/ast.h File runtime/vm/ast.h (right): https://codereview.chromium.org/447003003/diff/180001/runtime/vm/ast.h#newcode154 runtime/vm/ast.h:154: expr_(expr) { all in one line ? https://codereview.chromium.org/447003003/diff/180001/runtime/vm/ast_transformer.cc File ...
6 years, 4 months ago (2014-08-13 18:41:07 UTC) #5
Michael Lippautz (Google)
Thanks! PTAL I would like to use this as baseline for the final step (actual ...
6 years, 4 months ago (2014-08-13 20:32:24 UTC) #6
hausner
LGTMwC. https://codereview.chromium.org/447003003/diff/200001/runtime/vm/ast_transformer.cc File runtime/vm/ast_transformer.cc (right): https://codereview.chromium.org/447003003/diff/200001/runtime/vm/ast_transformer.cc#newcode44 runtime/vm/ast_transformer.cc:44: void AwaitTransformer::Transform(AstNode* expr) { Why not return the ...
6 years, 4 months ago (2014-08-15 18:09:31 UTC) #7
Michael Lippautz (Google)
Addressed commments and changed code to use the proposed pattern: AstNode* new_node = Transform(old_node); Also ...
6 years, 4 months ago (2014-08-18 18:39:31 UTC) #8
Michael Lippautz (Google)
6 years, 4 months ago (2014-08-18 18:41:21 UTC) #9
Message was sent while issue was closed.
Committed patchset #8 manually as 39345 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698