Files
sdk/pkg/dev_compiler/lib
Kevin Millikin 680ac3c500 Fix compilation of break and continue in loops
Kernel represents break and continue in Dart uniformly as break.  When
compiling to JavaScript we would like to use continue where possible and
avoid labeling statements that do not need to be labeled.

The basic idea is: at compile time maintain a list of Kernel targets
(LabeledStatements) that can be compiled to JS break without a label at a
given point in the program, and a list of Kernel targets that can be
compiled to JS continue without a label, and a map from Kernel targets to
the 'effective' target that will be labeled if necessary when compiled to
JS, and a mapping from effective targets to their label names if they must
be labeled.

Change-Id: Ie660cf3dd68399ebff128116fe38c250cb6b7f35
Reviewed-on: https://dart-review.googlesource.com/21120
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-16 10:17:42 +00:00
..