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

Unified Diff: compiler/java/com/google/dart/compiler/LibraryDepsVisitor.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/LibraryDepsVisitor.java
diff --git a/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java b/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
index 1b890f49f3e665e6bb0441b708202250eaf7bf54..ccf39455e564395954b875df058608852000eea6 100644
--- a/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
+++ b/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
@@ -41,7 +41,7 @@ public class LibraryDepsVisitor extends ASTVisitor<Void> {
@Override
public Void visitIdentifier(DartIdentifier node) {
- Element target = node.getTargetSymbol();
+ Element target = node.getElement();
ElementKind kind = ElementKind.of(target);
// Add dependency on the field or method.
switch (kind) {
@@ -78,7 +78,7 @@ public class LibraryDepsVisitor extends ASTVisitor<Void> {
public Void visitPropertyAccess(DartPropertyAccess node) {
if (node.getQualifier() instanceof DartIdentifier) {
DartIdentifier qualifier = (DartIdentifier) node.getQualifier();
- Element target = qualifier.getTargetSymbol();
+ Element target = qualifier.getElement();
if (target != null && target.getKind() == ElementKind.LIBRARY) {
// Handle library prefixes normally (the prefix part of the qualifier
// doesn't contain any resolvable library source info)
@@ -125,8 +125,8 @@ public class LibraryDepsVisitor extends ASTVisitor<Void> {
* superclass members.
*/
private void addHoleIfSuper(DartIdentifier node, Element holder) {
- if (ElementKind.of(holder).equals(ElementKind.CLASS) && holder != currentClass.getSymbol()) {
- source.addHole(node.getTargetName());
+ if (ElementKind.of(holder).equals(ElementKind.CLASS) && holder != currentClass.getElement()) {
+ source.addHole(node.getName());
}
}

Powered by Google App Engine
This is Rietveld 408576698