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

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

Issue 2930293002: Parameterize and move JumpTarget/LabelDefition to elements/jumps.dart (Closed)
Patch Set: Fix 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
« no previous file with comments | « pkg/compiler/lib/src/elements/jumps.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index b193876080eaceaeecf540740849ca3ea8284f98..0b54b46741e02f67f4f6ef0cc625a0d03bb6fc78 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -27,6 +27,7 @@ import '../util/util.dart';
import 'common.dart';
import 'elements.dart';
import 'entities.dart';
+import 'jumps.dart';
import 'names.dart';
import 'resolution_types.dart';
import 'visitor.dart' show ElementVisitor;
@@ -3276,10 +3277,10 @@ class UnnamedMixinApplicationElementX extends MixinApplicationElementX {
bool get isAbstract => true;
}
-class LabelDefinitionX implements LabelDefinition {
+class LabelDefinitionX implements LabelDefinition<Node> {
final Label label;
final String labelName;
- final JumpTarget target;
+ final JumpTarget<Node> target;
bool isBreakTarget = false;
bool isContinueTarget = false;
@@ -3306,11 +3307,11 @@ class LabelDefinitionX implements LabelDefinition {
String toString() => 'Label:${name}';
}
-class JumpTargetX implements JumpTarget {
+class JumpTargetX implements JumpTarget<Node> {
final ExecutableElement executableContext;
final Node statement;
final int nestingLevel;
- List<LabelDefinition> labels = <LabelDefinition>[];
+ List<LabelDefinition<Node>> labels = <LabelDefinition<Node>>[];
bool isBreakTarget = false;
bool isContinueTarget = false;
@@ -3325,8 +3326,8 @@ class JumpTargetX implements JumpTarget {
bool get isTarget => isBreakTarget || isContinueTarget;
- LabelDefinition addLabel(Label label, String labelName) {
- LabelDefinition result = new LabelDefinitionX(label, labelName, this);
+ LabelDefinition<Node> addLabel(Label label, String labelName) {
+ LabelDefinition<Node> result = new LabelDefinitionX(label, labelName, this);
labels.add(result);
return result;
}
« no previous file with comments | « pkg/compiler/lib/src/elements/jumps.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698