| Index: sdk/lib/_internal/compiler/implementation/universe/function_set.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/universe/function_set.dart (revision 18249)
|
| +++ sdk/lib/_internal/compiler/implementation/universe/function_set.dart (working copy)
|
| @@ -37,13 +37,19 @@
|
| : false;
|
| }
|
|
|
| + bool shouldDoVisitAll(Selector selector) {
|
| + return containsInterfaceSubtypes
|
| + && (selector.typeKind == TypedSelectorKind.INTERFACE
|
| + || selector.typeKind == TypedSelectorKind.UNKNOWN);
|
| + }
|
| +
|
| /**
|
| * Returns all elements that may be invoked with the given [selector].
|
| */
|
| Set<Element> filterBySelector(Selector selector) {
|
| // TODO(kasperl): For now, we use a different implementation for
|
| // filtering if the tree contains interface subtypes.
|
| - return containsInterfaceSubtypes
|
| + return shouldDoVisitAll(selector)
|
| ? filterAllBySelector(selector)
|
| : filterHierarchyBySelector(selector);
|
| }
|
| @@ -55,7 +61,7 @@
|
| bool hasAnyElementMatchingSelector(Selector selector) {
|
| // TODO(kasperl): For now, we use a different implementation for
|
| // filtering if the tree contains interface subtypes.
|
| - return containsInterfaceSubtypes
|
| + return shouldDoVisitAll(selector)
|
| ? hasAnyInAll(selector)
|
| : hasAnyInHierarchy(selector);
|
| }
|
|
|