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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart

Issue 304153014: Remove element from DynamicType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix infinite loop. Created 6 years, 7 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: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
index 1d8b3e4eb532f579ff74d6465f32f751c2441ebc..cd15e94e77830c8d75c46064bbbba1f7e1f550c0 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
@@ -474,11 +474,11 @@ class DartBackend extends Backend {
return new Future.value();
}
- void registerTypeLiteral(Element element,
+ void registerTypeLiteral(DartType type,
Enqueuer enqueuer,
Registry registry) {
- if (element.isClass) {
- usedTypeLiterals.add(element);
+ if (type.isInterfaceType) {
+ usedTypeLiterals.add(type.element);
}
}
@@ -560,8 +560,8 @@ class ReferencedElementCollector extends Visitor {
final DartType type = treeElements.getType(typeAnnotation);
assert(invariant(typeAnnotation, type != null,
message: "Missing type for type annotation: $treeElements."));
- if (type.kind == TypeKind.TYPEDEF) newTypedefElementCallback(type.element);
- if (type.kind == TypeKind.INTERFACE) newClassElementCallback(type.element);
+ if (type.isTypedef) newTypedefElementCallback(type.element);
+ if (type.isInterfaceType) newClassElementCallback(type.element);
typeAnnotation.visitChildren(this);
}

Powered by Google App Engine
This is Rietveld 408576698