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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/world.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/world.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/world.dart b/dart/sdk/lib/_internal/compiler/implementation/world.dart
index aa485101eed704785d0b33bb27c8c9705f7cf05f..8a044ec44f65be5161d1cc464677fb962beccb93 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/world.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/world.dart
@@ -20,8 +20,6 @@ class World {
// distinct sets to make class hierarchy analysis faster.
final Map<ClassElement, Set<ClassElement>> _subclasses =
new Map<ClassElement, Set<ClassElement>>();
- final Map<ClassElement, Set<ClassElement>> _superclasses =
- new Map<ClassElement, Set<ClassElement>>();
final Map<ClassElement, Set<ClassElement>> _subtypes =
new Map<ClassElement, Set<ClassElement>>();
final Map<ClassElement, Set<ClassElement>> _supertypes =
@@ -39,10 +37,6 @@ class World {
return _subtypes[cls.declaration];
}
- Set<ClassElement> superclassesOf(ClassElement cls) {
- return _superclasses[cls.declaration];
- }
-
Set<ClassElement> supertypesOf(ClassElement cls) {
return _supertypes[cls.declaration];
}
@@ -81,11 +75,8 @@ class World {
// implemented by that type on the superclasses.
DartType type = cls.supertype;
while (type != null) {
- Set<Element> superclassesOfClass =
- _superclasses.putIfAbsent(cls, () => new Set<ClassElement>());
Set<Element> subclassesOfSuperclass =
_subclasses.putIfAbsent(type.element, () => new Set<ClassElement>());
- superclassesOfClass.add(type.element);
subclassesOfSuperclass.add(cls);
Set<Element> typesImplementedBySubclassesOfCls =
@@ -151,10 +142,6 @@ class World {
return allFunctions.filter(selector).any((each) => each.isGetter());
}
- bool hasAnyUserDefinedSetter(Selector selector) {
- return allFunctions.filter(selector).any((each) => each.isSetter());
- }
-
// Returns whether a subclass of [superclass] implements [type].
bool hasAnySubclassThatImplements(ClassElement superclass,
ClassElement type) {
@@ -208,24 +195,6 @@ class World {
return mask.locateSingleElement(selector, compiler);
}
- bool hasSingleMatch(Selector selector) {
- Iterable<Element> targets = allFunctions.filter(selector);
- return targets.length == 1;
- }
-
- Iterable<ClassElement> locateNoSuchMethodHolders(Selector selector) {
- Selector noSuchMethodSelector = compiler.noSuchMethodSelector;
- ti.TypeMask mask = selector.mask;
- if (mask != null) {
- noSuchMethodSelector = new TypedSelector(mask, noSuchMethodSelector);
- }
- ClassElement objectClass = compiler.objectClass;
- return allFunctions
- .filter(noSuchMethodSelector)
- .map((Element member) => member.getEnclosingClass())
- .where((ClassElement holder) => !identical(holder, objectClass));
- }
-
void addFunctionCalledInLoop(Element element) {
functionsCalledInLoop.add(element.declaration);
}

Powered by Google App Engine
This is Rietveld 408576698