Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/universe/function_set.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/universe/function_set.dart (revision 18306) |
| +++ sdk/lib/_internal/compiler/implementation/universe/function_set.dart (working copy) |
| @@ -37,13 +37,19 @@ |
| : false; |
| } |
| + bool shouldVisitAll(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 |
|
kasperl
2013/02/11 14:30:34
Move the TODO comment to shouldVisitAll?
ngeoffray
2013/02/11 14:53:29
Done.
|
| // filtering if the tree contains interface subtypes. |
| - return containsInterfaceSubtypes |
| + return shouldVisitAll(selector) |
| ? filterAllBySelector(selector) |
| : filterHierarchyBySelector(selector); |
| } |
| @@ -55,7 +61,7 @@ |
| bool hasAnyElementMatchingSelector(Selector selector) { |
| // TODO(kasperl): For now, we use a different implementation for |
|
kasperl
2013/02/11 14:30:34
Ditto.
ngeoffray
2013/02/11 14:53:29
Done.
|
| // filtering if the tree contains interface subtypes. |
| - return containsInterfaceSubtypes |
| + return shouldVisitAll(selector) |
| ? hasAnyInAll(selector) |
| : hasAnyInHierarchy(selector); |
| } |