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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.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/inferrer/concrete_types_inferrer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart
index 358d74eec09e73cce214b49695cb804596e2b1e6..361d2f25c665903ed0ec0909c912ea31bdec8ca6 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart
@@ -434,8 +434,6 @@ class ConcreteTypeSystem extends TypeSystem<ConcreteType> {
return new TypeMask.nonNullSubclass(compiler.backend.numImplementation);
} else if (element == compiler.backend.intImplementation) {
return new TypeMask.nonNullSubclass(compiler.backend.intImplementation);
- } else if (element == compiler.dynamicClass) {
- return new TypeMask.nonNullSubclass(compiler.objectClass);
} else {
return new TypeMask.nonNullExact(element.declaration);
}
@@ -495,14 +493,13 @@ class ConcreteTypeSystem extends TypeSystem<ConcreteType> {
if (annotation.isVoid) return nullType;
if (annotation.element == compiler.objectClass) return type;
ConcreteType otherType;
- if (annotation.kind == TypeKind.TYPEDEF
- || annotation.kind == TypeKind.FUNCTION) {
+ if (annotation.isTypedef || annotation.isFunctionType) {
otherType = functionType;
- } else if (annotation.kind == TypeKind.TYPE_VARIABLE) {
+ } else if (annotation.isTypeVariable) {
// TODO(polux): Narrow to bound.
return type;
} else {
- assert(annotation.kind == TypeKind.INTERFACE);
+ assert(annotation.isInterfaceType);
otherType = nonNullSubtype(annotation.element);
}
if (isNullable) otherType = otherType.union(nullType);
@@ -1799,7 +1796,7 @@ class ConcreteTypesInferrer
// We trust the return type of native elements
if (isNativeElement(element)) {
var elementType = element.type;
- assert(elementType.kind == TypeKind.FUNCTION);
+ assert(elementType.isFunctionType);
return typeOfNativeBehavior(
native.NativeBehavior.ofMethod(element, compiler));
}

Powered by Google App Engine
This is Rietveld 408576698