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

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

Issue 1568213003: Add EnumSet. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 11 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/util/enumset.dart ('k') | tests/compiler/dart2js/class_set_test.dart » ('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 22adbfa033afd83fd2c540b5b9a643152b80edfd..30b2081ab0e0010a56b36976a534a37e19e58d2e 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -235,9 +235,8 @@ class World implements ClassWorld {
Iterable<ClassElement> subclassesOf(ClassElement cls) {
ClassHierarchyNode hierarchy = _classHierarchyNodes[cls.declaration];
if (hierarchy == null) return const <ClassElement>[];
- return hierarchy.subclasses(
- includeIndirectlyInstantiated: false,
- includeUninstantiated: false);
+ return hierarchy.subclassesByMask(
+ ClassHierarchyNode.DIRECTLY_INSTANTIATED);
}
/// Returns an iterable over the directly instantiated classes that extend
@@ -245,10 +244,8 @@ class World implements ClassWorld {
Iterable<ClassElement> strictSubclassesOf(ClassElement cls) {
ClassHierarchyNode subclasses = _classHierarchyNodes[cls.declaration];
if (subclasses == null) return const <ClassElement>[];
- return subclasses.subclasses(
- strict: true,
- includeIndirectlyInstantiated: false,
- includeUninstantiated: false);
+ return subclasses.subclassesByMask(
+ ClassHierarchyNode.DIRECTLY_INSTANTIATED, strict: true);
}
/// Returns an iterable over the directly instantiated that implement [cls]
@@ -258,9 +255,7 @@ class World implements ClassWorld {
if (classSet == null) {
return const <ClassElement>[];
} else {
- return classSet.subtypes(
- includeIndirectlyInstantiated: false,
- includeUninstantiated: false);
+ return classSet.subtypesByMask(ClassHierarchyNode.DIRECTLY_INSTANTIATED);
}
}
@@ -271,10 +266,9 @@ class World implements ClassWorld {
if (classSet == null) {
return const <ClassElement>[];
} else {
- return classSet.subtypes(
- strict: true,
- includeIndirectlyInstantiated: false,
- includeUninstantiated: false);
+ return classSet.subtypesByMask(
+ ClassHierarchyNode.DIRECTLY_INSTANTIATED,
+ strict: true);
}
}
« no previous file with comments | « pkg/compiler/lib/src/util/enumset.dart ('k') | tests/compiler/dart2js/class_set_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698