| Index: pkg/compiler/lib/src/world.dart
|
| diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
|
| index 502ea8e9073d6de6b26250f58e5654a9e52679a0..7d63fb6268c835a52755633028bc1c76ae146742 100644
|
| --- a/pkg/compiler/lib/src/world.dart
|
| +++ b/pkg/compiler/lib/src/world.dart
|
| @@ -87,6 +87,10 @@ abstract class ClassWorld {
|
| /// including [cls] itself.
|
| Iterable<ClassElement> strictSubclassesOf(ClassElement cls);
|
|
|
| + /// Returns an iterable over the directly instantiated that implement [cls]
|
| + /// possibly including [cls] itself, if it is live.
|
| + Iterable<ClassElement> subtypesOf(ClassElement cls);
|
| +
|
| /// Returns an iterable over the live classes that implement [cls] _not_
|
| /// including [cls] if it is live.
|
| Iterable<ClassElement> strictSubtypesOf(ClassElement cls);
|
| @@ -218,6 +222,19 @@ class World implements ClassWorld {
|
| }
|
|
|
| /// Returns an iterable over the directly instantiated that implement [cls]
|
| + /// possibly including [cls] itself, if it is live.
|
| + Iterable<ClassElement> subtypesOf(ClassElement cls) {
|
| + ClassSet classSet = _classSets[cls.declaration];
|
| + if (classSet == null) {
|
| + return const <ClassElement>[];
|
| + } else {
|
| + return classSet.subtypes(
|
| + includeIndirectlyInstantiated: false,
|
| + includeUninstantiated: false);
|
| + }
|
| + }
|
| +
|
| + /// Returns an iterable over the directly instantiated that implement [cls]
|
| /// _not_ including [cls].
|
| Iterable<ClassElement> strictSubtypesOf(ClassElement cls) {
|
| ClassSet classSet = _classSets[cls.declaration];
|
|
|