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

Issue 1003213002: Fix "continue to a label" in dart2js async code. (Closed)

Created:
5 years, 9 months ago by sigurdm
Modified:
5 years, 9 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Fix "continue to a label" in dart2js async code. Actually there were two independent problems 1: continue would jump to the starting point of the label, instead of the continue-point of the labelled loop. 2: A for-initializer with no awaits in the for would still get its variables hoisted, so label: for(var i = 1; i < 10; i++) {continue label}; would transform to: label: { i = 1 for(; i < 10; i++) {continue label;} } And that fails. BUG= R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=44499

Patch Set 1 #

Patch Set 2 : Add tests #

Total comments: 2

Patch Set 3 : Address review. Also update unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -51 lines) Patch
M pkg/compiler/lib/src/js/rewrite_async.dart View 1 2 6 chunks +22 lines, -17 lines 0 comments Download
M tests/compiler/dart2js/async_await_js_transform_test.dart View 1 2 4 chunks +30 lines, -34 lines 0 comments Download
A tests/language/async_continue_label_test.dart View 1 1 chunk +104 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
sigurdm
5 years, 9 months ago (2015-03-13 14:05:58 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/1003213002/diff/20001/pkg/compiler/lib/src/js/rewrite_async.dart File pkg/compiler/lib/src/js/rewrite_async.dart (right): https://codereview.chromium.org/1003213002/diff/20001/pkg/compiler/lib/src/js/rewrite_async.dart#newcode1502 pkg/compiler/lib/src/js/rewrite_async.dart:1502: return initializations.isEmpty ? js.number(0) Make this an if. ...
5 years, 9 months ago (2015-03-13 14:20:23 UTC) #3
sigurdm
https://codereview.chromium.org/1003213002/diff/20001/pkg/compiler/lib/src/js/rewrite_async.dart File pkg/compiler/lib/src/js/rewrite_async.dart (right): https://codereview.chromium.org/1003213002/diff/20001/pkg/compiler/lib/src/js/rewrite_async.dart#newcode1502 pkg/compiler/lib/src/js/rewrite_async.dart:1502: return initializations.isEmpty ? js.number(0) On 2015/03/13 14:20:22, floitsch wrote: ...
5 years, 9 months ago (2015-03-16 08:43:52 UTC) #4
sigurdm
5 years, 9 months ago (2015-03-16 08:45:55 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as 44499 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698