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

Unified Diff: pkg/compiler/lib/src/elements/jumps.dart

Issue 2950303002: Handle for-loop with simple break in compile_from_dill_test (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/elements/jumps.dart
diff --git a/pkg/compiler/lib/src/elements/jumps.dart b/pkg/compiler/lib/src/elements/jumps.dart
index 4fc92358176900b6806cea1ed6e15e71b6d32170..fb5c48cc83565e94f1280110bbcd26eadd674fe6 100644
--- a/pkg/compiler/lib/src/elements/jumps.dart
+++ b/pkg/compiler/lib/src/elements/jumps.dart
@@ -12,7 +12,8 @@ abstract class LabelDefinition<T> extends Entity {
String get labelName;
JumpTarget<T> get target;
- bool get isTarget;
+ bool get isTarget => isBreakTarget || isContinueTarget;
+
bool get isBreakTarget;
bool get isContinueTarget;
}
@@ -20,11 +21,14 @@ abstract class LabelDefinition<T> extends Entity {
/// A jump target is the reference point of a statement or switch-case,
/// either by label or as the default target of a break or continue.
abstract class JumpTarget<T> extends Local {
+ String get name => 'target';
+
+ bool get isTarget => isBreakTarget || isContinueTarget;
+
T get statement;
int get nestingLevel;
List<LabelDefinition<T>> get labels;
- bool get isTarget;
bool get isBreakTarget;
bool get isContinueTarget;
bool get isSwitch;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/modelx.dart » ('j') | pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698