| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.world.class_set; | 5 library dart2js.world.class_set; |
| 6 | 6 |
| 7 import 'dart:collection' show IterableBase; | 7 import 'dart:collection' show IterableBase; |
| 8 | 8 |
| 9 import '../elements/elements.dart' show ClassElement; | 9 import '../elements/elements.dart' show ClassElement; |
| 10 import '../elements/entities.dart' show ClassEntity; | 10 import '../elements/entities.dart' show ClassEntity; |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 if (isIndirectlyInstantiated) { | 359 if (isIndirectlyInstantiated) { |
| 360 sb.write(' indirectly'); | 360 sb.write(' indirectly'); |
| 361 } | 361 } |
| 362 if (isAbstractlyInstantiated) { | 362 if (isAbstractlyInstantiated) { |
| 363 sb.write(' abstractly'); | 363 sb.write(' abstractly'); |
| 364 } | 364 } |
| 365 sb.write(' ['); | 365 sb.write(' ['); |
| 366 if (_directSubclasses.isEmpty) { | 366 if (_directSubclasses.isEmpty) { |
| 367 sb.write(']'); | 367 sb.write(']'); |
| 368 } else { | 368 } else { |
| 369 var subclasses = _directSubclasses; | 369 dynamic subclasses = _directSubclasses; |
| 370 if (sorted) { | 370 if (sorted) { |
| 371 subclasses = _directSubclasses.toList() | 371 subclasses = _directSubclasses.toList() |
| 372 ..sort((a, b) { | 372 ..sort((a, b) { |
| 373 return a.cls.name.compareTo(b.cls.name); | 373 return a.cls.name.compareTo(b.cls.name); |
| 374 }); | 374 }); |
| 375 } | 375 } |
| 376 bool needsComma = false; | 376 bool needsComma = false; |
| 377 for (ClassHierarchyNode child in subclasses) { | 377 for (ClassHierarchyNode child in subclasses) { |
| 378 if (instantiatedOnly && !child.isInstantiated) { | 378 if (instantiatedOnly && !child.isInstantiated) { |
| 379 continue; | 379 continue; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 STOP, | 918 STOP, |
| 919 | 919 |
| 920 /// Iteration skips the subclasses of the current class. | 920 /// Iteration skips the subclasses of the current class. |
| 921 SKIP_SUBCLASSES, | 921 SKIP_SUBCLASSES, |
| 922 } | 922 } |
| 923 | 923 |
| 924 /// Visiting function used for the `forEachX` functions of [ClassHierarchyNode] | 924 /// Visiting function used for the `forEachX` functions of [ClassHierarchyNode] |
| 925 /// and [ClassSet]. The return value controls the continued iteration. If `null` | 925 /// and [ClassSet]. The return value controls the continued iteration. If `null` |
| 926 /// is returned, iteration continues to the end. | 926 /// is returned, iteration continues to the end. |
| 927 typedef IterationStep ForEachFunction(ClassEntity cls); | 927 typedef IterationStep ForEachFunction(ClassEntity cls); |
| OLD | NEW |