Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement case labels #29352

Closed
jmesserly opened this issue Apr 14, 2017 · 8 comments
Closed

implement case labels #29352

jmesserly opened this issue Apr 14, 2017 · 8 comments
Assignees
Labels
customer-flutter P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dev-compiler
Milestone

Comments

@jmesserly
Copy link

From @jmesserly on July 22, 2015 21:20

https://github.com/dart-lang/dev_compiler/blob/1c029d0902387059b16866c0c41489e7739ea89a/lib/src/codegen/js_codegen.dart#L2512

rarely used outside tests, but async tests trip on this, so hit while looking at #221. I doubt we need a readable solution, rather just a legal translation or some sort.

Copied from original issue: dart-archive/dev_compiler#263

@jmesserly
Copy link
Author

for now I just commented out those tests.
maybe an intermediate fix would be to not generate invalid code :) ... right now we skip the case label, but we generate continue label; which makes JS parser unhappy.

@vsmenon vsmenon added P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels May 9, 2017
@vsmenon
Copy link
Member

vsmenon commented May 9, 2017

We're seeing this internally now.

@jmesserly jmesserly self-assigned this May 9, 2017
@jmesserly
Copy link
Author

Hmmm. Mostly pretty straightfoward except for continue; with an outer loop. That (apparently) goes to the outer loop in Dart (even though switch is otherwise a target for break/continue labels). So if we introduce a loop to use for switch-continue, we'll have to introduce a label for the outer loop & adjust plain continue.

@davidmorgan
Copy link
Contributor

Any ETA on this please -- so we can decide to work around or wait. Thanks!

@vsmenon
Copy link
Member

vsmenon commented May 12, 2017

It's probably a few weeks out (Jenny is out). Can we work around? It's usually pretty easy to do in source.

@jmesserly jmesserly added P2 A bug or feature request we're likely to work on and removed P1 A high priority bug; for example, a single project is unusable or has many test failures labels Sep 25, 2017
@jmesserly jmesserly removed their assignment Sep 25, 2017
@jmesserly
Copy link
Author

I suspect we'll get this fix when we move to the new front end/kernel (perhaps by using an optional lowering pass). If not, well, we can address it. I think thus far we've been able to work around it.

dart-bot pushed a commit that referenced this issue Feb 19, 2019
Flutter uses continue labels (see
#29352), but only to the next
switch case - i.e., the fall through case.

The kernel backend already elides the continue here.  This does the
same for the analyzer backend.  This gets one co19 test passing on ddc
(was already passing on ddk).

Change-Id: Ifc085415e3d1735c1a534c0683a4c89289820ba0
Reviewed-on: https://dart-review.googlesource.com/c/93462
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
@vsmenon vsmenon added this to the D24 Release milestone Apr 24, 2019
@Markzipan Markzipan self-assigned this May 2, 2019
dart-bot pushed a commit that referenced this issue May 6, 2019
Issue: #29352
Issue: #36345
Change-Id: Ic811d0b54784483c1ff642909acf0df1609cf407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100570
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
@vsmenon
Copy link
Member

vsmenon commented May 21, 2019

@Markzipan - is this still open? The test here appears to work now: #36345

@Markzipan
Copy link
Contributor

This was fixed for DDK but not DDC. We can close this for now since labels are such a rarely used feature (and we're switching to DDK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-flutter P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dev-compiler
Projects
None yet
Development

No branches or pull requests

4 participants