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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart b/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart
index bc58690c10c0bf9445bac6caa71301e65fe5fb95..aeccf3447c4140efa75e1418ba480041f49760ce 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart
@@ -31,9 +31,9 @@ abstract class TypeSystem<T> {
T get stringType;
T get typeType;
- T nonNullSubtype(DartType type);
- T nonNullSubclass(DartType type);
- T nonNullExact(DartType type);
+ T nonNullSubtype(ClassElement type);
+ T nonNullSubclass(ClassElement type);
+ T nonNullExact(ClassElement type);
T nonNullEmpty();
Selector newTypedSelector(T receiver, Selector selector);
@@ -680,7 +680,7 @@ abstract class InferrerVisitor
// TODO(kasperl): We should be able to tell that the type of a literal
// symbol is always a non-null exact symbol implementation -- not just
// any non-null subtype of the symbol interface.
- return types.nonNullSubtype(compiler.symbolClass.rawType);
+ return types.nonNullSubtype(compiler.symbolClass);
}
T visitTypeReferenceSend(Send node) {
@@ -701,11 +701,11 @@ abstract class InferrerVisitor
if (_thisType != null) return _thisType;
ClassElement cls = outermostElement.getEnclosingClass();
if (compiler.world.isUsedAsMixin(cls)) {
- return _thisType = types.nonNullSubtype(cls.rawType);
+ return _thisType = types.nonNullSubtype(cls);
} else if (compiler.world.hasAnySubclass(cls)) {
- return _thisType = types.nonNullSubclass(cls.rawType);
+ return _thisType = types.nonNullSubclass(cls);
} else {
- return _thisType = types.nonNullExact(cls.rawType);
+ return _thisType = types.nonNullExact(cls);
}
}
@@ -713,7 +713,7 @@ abstract class InferrerVisitor
T get superType {
if (_superType != null) return _superType;
return _superType = types.nonNullExact(
- outermostElement.getEnclosingClass().superclass.rawType);
+ outermostElement.getEnclosingClass().superclass);
}
T visitIdentifier(Identifier node) {
@@ -979,7 +979,7 @@ abstract class InferrerVisitor
DartType type = elements.getType(node.type);
T mask = type == null || type.treatAsDynamic
? types.dynamicType
- : types.nonNullSubtype(type.asRaw());
+ : types.nonNullSubtype(type.element);
locals.update(elements[exception], mask, node);
}
Node trace = node.trace;
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698