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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartGotoStatement.java

Issue 9633009: Use Element instead of Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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: compiler/java/com/google/dart/compiler/ast/DartGotoStatement.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartGotoStatement.java b/compiler/java/com/google/dart/compiler/ast/DartGotoStatement.java
index b63e68c7c33ac96c2af8cc2ac6043e5a5e536945..3ff93e25baa424c2199505e70aed6ff05be279a7 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartGotoStatement.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartGotoStatement.java
@@ -4,7 +4,8 @@
package com.google.dart.compiler.ast;
-import com.google.dart.compiler.common.Symbol;
+import com.google.dart.compiler.resolver.Element;
+import com.google.dart.compiler.resolver.LabelElement;
/**
* Base class of {@link DartBreakStatement} and {@link DartContinueStatement}.
@@ -12,7 +13,7 @@ import com.google.dart.compiler.common.Symbol;
public abstract class DartGotoStatement extends DartStatement {
private DartIdentifier label;
- private Symbol targetSymbol;
+ private LabelElement element;
public DartGotoStatement(DartIdentifier label) {
this.label = becomeParentOf(label);
@@ -26,11 +27,7 @@ public abstract class DartGotoStatement extends DartStatement {
if (label == null) {
return null;
}
- return label.getTargetName();
- }
-
- public Symbol getTargetSymbol() {
- return targetSymbol;
+ return label.getName();
}
public void setLabel(DartIdentifier newLabel) {
@@ -38,8 +35,13 @@ public abstract class DartGotoStatement extends DartStatement {
}
@Override
- public void setSymbol(Symbol symbol) {
- this.targetSymbol = symbol;
+ public LabelElement getElement() {
+ return element;
+ }
+
+ @Override
+ public void setElement(Element element) {
+ this.element = (LabelElement) element;
}
@Override

Powered by Google App Engine
This is Rietveld 408576698