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

Issue 675113002: Support async/await in the dart2js frontend. (Closed)

Created:
6 years, 2 months ago by Johnni Winther
Modified:
6 years, 1 month ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support async/await in the dart2js frontend. BUG= R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=41485

Patch Set 1 #

Patch Set 2 : Update unittests #

Total comments: 14

Patch Set 3 : Updated cf. comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+956 lines, -45 lines) Patch
M sdk/lib/_internal/compiler/implementation/apiimpl.dart View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 6 chunks +12 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart2js.dart View 1 2 4 chunks +11 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/backend_ast_to_frontend_ast.dart View 1 5 chunks +9 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/elements/elements.dart View 1 chunk +33 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/elements/modelx.dart View 1 2 chunks +3 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/mirrors/analyze.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 9 chunks +77 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/resolution.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/keyword.dart View 1 chunk +5 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/listener.dart View 14 chunks +54 lines, -11 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/parser.dart View 1 2 18 chunks +139 lines, -16 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/partial_parser.dart View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/token.dart View 1 chunk +9 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 chunk +11 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/tree/nodes.dart View 1 12 chunks +88 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart View 4 chunks +19 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/tree/unparser.dart View 5 chunks +27 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/typechecker.dart View 3 chunks +36 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/use_unused_api.dart View 1 2 chunks +4 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/warnings.dart View 1 2 chunks +106 lines, -1 line 0 comments Download
A tests/compiler/dart2js/async_await_syntax.dart View 1 1 chunk +182 lines, -0 lines 0 comments Download
A tests/compiler/dart2js/async_await_syntax_test.dart View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/backend_dart/dart_printer_test.dart View 2 chunks +4 lines, -2 lines 0 comments Download
A tests/compiler/dart2js/frontend_checker.dart View 1 2 1 chunk +71 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/message_kind_helper.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/message_kind_test.dart View 2 chunks +2 lines, -1 line 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/mock_libraries.dart View 1 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Johnni Winther
6 years, 1 month ago (2014-11-03 14:32:21 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compiler/implementation/apiimpl.dart File sdk/lib/_internal/compiler/implementation/apiimpl.dart (right): https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compiler/implementation/apiimpl.dart#newcode94 sdk/lib/_internal/compiler/implementation/apiimpl.dart:94: "--enable-async currently only supported with --analyze-only"); --enable-async is ...
6 years, 1 month ago (2014-11-03 17:55:54 UTC) #3
Johnni Winther
Committed patchset #3 (id:40001) manually as 41485 (presubmit successful).
6 years, 1 month ago (2014-11-04 12:22:55 UTC) #4
Johnni Winther
6 years, 1 month ago (2014-11-04 12:24:33 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
File sdk/lib/_internal/compiler/implementation/apiimpl.dart (right):

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
sdk/lib/_internal/compiler/implementation/apiimpl.dart:94: "--enable-async
currently only supported with --analyze-only");
On 2014/11/03 17:55:54, floitsch wrote:
> --enable-async is currently ...

Done.

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
File sdk/lib/_internal/compiler/implementation/dart2js.dart (right):

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
sdk/lib/_internal/compiler/implementation/dart2js.dart:388: helpAndFail("Option
'--enable-async' currently only supported together "
On 2014/11/03 17:55:54, floitsch wrote:
> ... is currently ...
> 
> ... in combination with ... ?

Done.

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
File sdk/lib/_internal/compiler/implementation/elements/modelx.dart (right):

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
sdk/lib/_internal/compiler/implementation/elements/modelx.dart:1544: AsyncMarker
asyncMarker = AsyncMarker.SYNC;
On 2014/11/03 17:55:54, floitsch wrote:
> final

Can't do :( These are set when the function body is resolved.

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
File sdk/lib/_internal/compiler/implementation/scanner/parser.dart (right):

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
sdk/lib/_internal/compiler/implementation/scanner/parser.dart:1411: void
checkStarredModifier(Token token, Token star, String name) {
On 2014/11/03 17:55:54, floitsch wrote:
> Add comment what exactly this checks.

Done.

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
File sdk/lib/_internal/compiler/implementation/scanner/partial_parser.dart
(right):

https://codereview.chromium.org/675113002/diff/20001/sdk/lib/_internal/compil...
sdk/lib/_internal/compiler/implementation/scanner/partial_parser.dart:140: if
(identical(value, '=>')) {
On 2014/11/03 17:55:54, floitsch wrote:
> I prefer the 'else if' indentation.
> 
> Why this change?
> It seems like => is more frequent than redirecting '='.

Done.

https://codereview.chromium.org/675113002/diff/20001/tests/compiler/dart2js/a...
File tests/compiler/dart2js/async_await_syntax_test.dart (right):

https://codereview.chromium.org/675113002/diff/20001/tests/compiler/dart2js/a...
tests/compiler/dart2js/async_await_syntax_test.dart:1: // Copyright (c) 2013,
the Dart project authors.  Please see the AUTHORS file
On 2014/11/03 17:55:54, floitsch wrote:
> 2014

Done.

https://codereview.chromium.org/675113002/diff/20001/tests/compiler/dart2js/f...
File tests/compiler/dart2js/frontend_checker.dart (right):

https://codereview.chromium.org/675113002/diff/20001/tests/compiler/dart2js/f...
tests/compiler/dart2js/frontend_checker.dart:1: // Copyright (c) 2013, the Dart
project authors.  Please see the AUTHORS file
On 2014/11/03 17:55:54, floitsch wrote:
> 2014

Done.

Powered by Google App Engine
This is Rietveld 408576698