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

Unified Diff: pkg/compiler/lib/src/universe/class_set.dart

Issue 1354603002: Revert "Enqueue superclasses instead of supertypes." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/types/type_mask.dart ('k') | pkg/compiler/lib/src/universe/universe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/class_set.dart
diff --git a/pkg/compiler/lib/src/universe/class_set.dart b/pkg/compiler/lib/src/universe/class_set.dart
index 6cafa09f423bcf9ebed44c358b1217ebdafffc3e..d19b2c1ceff8cd1cc655b6d0d016c9761c89a1ac 100644
--- a/pkg/compiler/lib/src/universe/class_set.dart
+++ b/pkg/compiler/lib/src/universe/class_set.dart
@@ -101,50 +101,27 @@ class ClassHierarchyNode {
includeUninstantiated: includeUninstantiated);
}
- void printOn(StringBuffer sb, String indentation,
- {bool instantiatedOnly: false}) {
- sb.write('$indentation$cls');
- if (isDirectlyInstantiated) {
- sb.write(' directly');
- }
- if (isIndirectlyInstantiated) {
- sb.write(' indirectly');
- }
- sb.write(' [');
+ void dump(StringBuffer sb, String indentation) {
+ sb.write('$indentation$cls:[');
if (_directSubclasses.isEmpty) {
sb.write(']');
} else {
+ sb.write('\n');
bool needsComma = false;
for (Link<ClassHierarchyNode> link = _directSubclasses;
!link.isEmpty;
link = link.tail) {
- if (instantiatedOnly && !link.head.isInstantiated) {
- continue;
- }
if (needsComma) {
sb.write(',\n');
- } else {
- sb.write('\n');
}
- link.head.printOn(
- sb, '$indentation ', instantiatedOnly: instantiatedOnly);
+ link.head.dump(sb, '$indentation ');
needsComma = true;
}
- if (needsComma) {
- sb.write('\n');
- sb.write('$indentation]');
- } else {
- sb.write(']');
- }
+ sb.write('\n');
+ sb.write('$indentation]');
}
}
- String dump({String indentation: '', bool instantiatedOnly: false}) {
- StringBuffer sb = new StringBuffer();
- printOn(sb, indentation, instantiatedOnly: instantiatedOnly);
- return sb.toString();
- }
-
String toString() => cls.toString();
}
@@ -297,11 +274,11 @@ class ClassSet {
String toString() {
StringBuffer sb = new StringBuffer();
sb.write('[\n');
- node.printOn(sb, ' ');
+ node.dump(sb, ' ');
sb.write('\n');
if (_directSubtypes != null) {
for (ClassHierarchyNode node in _directSubtypes) {
- node.printOn(sb, ' ');
+ node.dump(sb, ' ');
sb.write('\n');
}
}
« no previous file with comments | « pkg/compiler/lib/src/types/type_mask.dart ('k') | pkg/compiler/lib/src/universe/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698