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

Issue 2476513003: Fix a bug with await in finally. (Closed)

Created:
4 years, 1 month ago by Kevin Millikin (Google)
Modified:
4 years, 1 month ago
Reviewers:
asgerf
CC:
dart-kernel+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Kernel: Fix a bug with await in finally. The translation for async and async* functions translates returns into two statements, where the second one is a return. The VM's compilation strategy is to inline the code for all finally blocks immediately before a return statement. This causes future completion/stream cancellation to occur before finally blocks, instead of after as intended. The solution here is to translate returns into a break from a labeled block and put a single async/async* return sequence, outside any finally blocks, after the labeled block. BUG= R=asgerf@google.com Committed: https://github.com/dart-lang/kernel/commit/290f955760a219902e4d5b716668bff29711d1ab

Patch Set 1 #

Total comments: 2

Patch Set 2 : Copy the fileOffset from the ReturnStatement. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -57 lines) Patch
M lib/transformations/continuation.dart View 1 8 chunks +57 lines, -57 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Kevin Millikin (Google)
4 years, 1 month ago (2016-11-03 09:24:49 UTC) #3
asgerf
LGTM
4 years, 1 month ago (2016-11-03 09:31:08 UTC) #4
asgerf
https://codereview.chromium.org/2476513003/diff/1/lib/transformations/continuation.dart File lib/transformations/continuation.dart (right): https://codereview.chromium.org/2476513003/diff/1/lib/transformations/continuation.dart#newcode718 lib/transformations/continuation.dart:718: statements.add(new BreakStatement(labeledBody)); Maybe copy over the breakpoint location from ...
4 years, 1 month ago (2016-11-03 09:32:39 UTC) #5
Kevin Millikin (Google)
https://codereview.chromium.org/2476513003/diff/1/lib/transformations/continuation.dart File lib/transformations/continuation.dart (right): https://codereview.chromium.org/2476513003/diff/1/lib/transformations/continuation.dart#newcode718 lib/transformations/continuation.dart:718: statements.add(new BreakStatement(labeledBody)); On 2016/11/03 09:32:39, asgerf wrote: > Maybe ...
4 years, 1 month ago (2016-11-03 09:43:53 UTC) #6
Kevin Millikin (Google)
4 years, 1 month ago (2016-11-03 09:44:29 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
290f955760a219902e4d5b716668bff29711d1ab (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698