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

Unified Diff: compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java

Issue 8948001: Updates dartc to recognize 'default' keyword on interface and updated factory method syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Feedback from mmendez Created 9 years 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 | « no previous file | compiler/java/com/google/dart/compiler/ast/DartClass.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e4f541773ff8b5463842ad60bc52e1f79b1fd73..14de2a45d8b6d7489880ec87f833dcf7489a2585 100644
--- a/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
+++ b/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
@@ -10,6 +10,7 @@ import com.google.dart.compiler.ast.DartIdentifier;
import com.google.dart.compiler.ast.DartMethodDefinition;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartNodeTraverser;
+import com.google.dart.compiler.ast.DartParameterizedTypeNode;
import com.google.dart.compiler.ast.DartPropertyAccess;
import com.google.dart.compiler.ast.DartTypeNode;
import com.google.dart.compiler.ast.DartUnit;
@@ -58,13 +59,14 @@ public class LibraryDepsVisitor extends DartNodeTraverser<Void> {
// explanation).
switch (kind) {
case FIELD:
- case METHOD:
+ case METHOD: {
EnclosingElement enclosing = target.getEnclosingElement();
addHoleIfSuper(node, enclosing);
if (enclosing.getKind().equals(ElementKind.LIBRARY)) {
addElementDependency(target);
}
break;
+ }
}
// Add dependency on the computed type of identifiers.
@@ -113,6 +115,15 @@ public class LibraryDepsVisitor extends DartNodeTraverser<Void> {
}
@Override
+ public Void visitParameterizedTypeNode(DartParameterizedTypeNode node) {
+ if (TypeKind.of(node.getType()).equals(TypeKind.INTERFACE)) {
+ addElementDependency(((InterfaceType) node.getType()).getElement());
+ }
+ node.visitChildren(this);
+ return null;
+ }
+
+ @Override
public Void visitTypeNode(DartTypeNode node) {
if (TypeKind.of(node.getType()).equals(TypeKind.INTERFACE)) {
addElementDependency(((InterfaceType) node.getType()).getElement());
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/DartClass.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698