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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart

Issue 24952003: Change TypeMask.base to be a ClassElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moar declaration. Created 7 years, 3 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/inferrer/type_graph_inferrer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
index fc8e21156a332f7f5d5a5fea948eec80007a4f53..c9037d3eda02960d9c5013a85afb02a73a66b673 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
@@ -203,7 +203,7 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> {
return type;
} else {
assert(annotation.kind == TypeKind.INTERFACE);
- otherType = new TypeMask.nonNullSubtype(annotation);
+ otherType = new TypeMask.nonNullSubtype(annotation.element);
}
if (isNullable) otherType = otherType.nullable();
if (type.type.isExact) {
@@ -228,16 +228,16 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> {
});
}
- TypeInformation nonNullSubtype(DartType type) {
- return getConcreteTypeFor(new TypeMask.nonNullSubtype(type));
+ TypeInformation nonNullSubtype(ClassElement type) {
+ return getConcreteTypeFor(new TypeMask.nonNullSubtype(type.declaration));
}
- TypeInformation nonNullSubclass(DartType type) {
- return getConcreteTypeFor(new TypeMask.nonNullSubclass(type));
+ TypeInformation nonNullSubclass(ClassElement type) {
+ return getConcreteTypeFor(new TypeMask.nonNullSubclass(type.declaration));
}
- TypeInformation nonNullExact(DartType type) {
- return getConcreteTypeFor(new TypeMask.nonNullExact(type));
+ TypeInformation nonNullExact(ClassElement type) {
+ return getConcreteTypeFor(new TypeMask.nonNullExact(type.declaration));
}
TypeInformation nonNullEmpty() {
@@ -388,7 +388,7 @@ class TypeGraphInferrerEngine
compiler.log('Added $addedInGraph elements in inferencing graph.');
compiler.progress.reset();
}
- // Force the creation of the [ElementTypeInformation] to ensure it is
+ // Force the creation of the [ElementTypeInformation] to ensure it is
// in the graph.
types.getInferredTypeOf(element);

Powered by Google App Engine
This is Rietveld 408576698