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

Unified Diff: pkg/compiler/lib/src/world.dart

Issue 1220043005: dart2js send stats, includes: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months 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
« no previous file with comments | « pkg/compiler/lib/src/typechecker.dart ('k') | pkg/compiler/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
« no previous file with comments | « pkg/compiler/lib/src/typechecker.dart ('k') | pkg/compiler/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698