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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart

Issue 99303004: Remove unused API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 7 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
Index: dart/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart b/dart/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
index 5a2b13f09241141b64030a82b6a6d9e2a0d616be..5e55fb58148c42f6411635690b8242d4aeb425bc 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
@@ -6,7 +6,6 @@ library concrete_types_inferrer;
import 'dart:collection' show Queue, IterableBase;
import '../dart2jslib.dart' hide Selector, TypedSelector;
-import '../dart_types.dart';
import '../elements/elements.dart';
import '../native_handler.dart' as native;
import '../tree/tree.dart';
@@ -407,36 +406,6 @@ class ConcreteTypesEnvironment {
return result;
}
- /**
- * Returns true if and only if the environment is compatible with [signature].
- */
- bool matches(FunctionSignature signature) {
- Types types = inferrer.compiler.types;
- bool paramMatches(ConcreteType concrete, VariableElement parameter) {
- DartType parameterType = parameter.variables.type;
- if (parameterType.treatAsDynamic || parameterType.treatAsRaw) {
- return true;
- }
- for (BaseType baseType in concrete.baseTypes) {
- if (baseType.isUnknown()) return false;
- if (baseType.isNull()) continue;
- ClassBaseType classType = baseType;
- if (!types.isSubtype(classType.element.rawType,
- parameterType)) return false;
- }
- return true;
- }
- for (VariableElement param in signature.requiredParameters) {
- ConcreteType concrete = environment[param];
- if (concrete == null || !paramMatches(concrete, param)) return false;
- }
- for (VariableElement param in signature.optionalParameters) {
- ConcreteType concrete = environment[param];
- if (concrete != null && !paramMatches(concrete, param)) return false;
- }
- return true;
- }
-
String toString() => "{ this: $typeOfThis, env: $environment }";
}
@@ -513,10 +482,6 @@ class DynamicTypeMask implements TypeMask {
throw new UnsupportedError("");
}
- bool containsOnlyNull(Compiler compiler) {
- throw new UnsupportedError("");
- }
-
bool containsOnlyBool(Compiler compiler) {
throw new UnsupportedError("");
}
@@ -545,10 +510,6 @@ class DynamicTypeMask implements TypeMask {
throw new UnsupportedError("");
}
- Iterable<ClassElement> containedClasses(Compiler compiler) {
- throw new UnsupportedError("");
- }
-
TypeMask union(TypeMask other, Compiler compiler) {
throw new UnsupportedError("");
}
@@ -557,10 +518,6 @@ class DynamicTypeMask implements TypeMask {
throw new UnsupportedError("");
}
- bool understands(Selector selector, Compiler compiler) {
- throw new UnsupportedError("");
- }
-
bool canHit(Element element, Selector selector, Compiler compiler) {
throw new UnsupportedError("");
}
@@ -1075,10 +1032,6 @@ class ConcreteTypesInferrer extends TypesInferrer {
void clear() {}
- Iterable<Element> getCallersOf(Element element) {
- throw new UnsupportedError("");
- }
-
bool isCalledOnce(Element element) {
throw new UnsupportedError("");
}

Powered by Google App Engine
This is Rietveld 408576698