| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.kernel_target; | 5 library fasta.kernel_target; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Future; | 8 Future; |
| 9 | 9 |
| 10 import 'dart:io' show | 10 import 'dart:io' show |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 loader.builders.forEach((Uri uri, LibraryBuilder library) { | 187 loader.builders.forEach((Uri uri, LibraryBuilder library) { |
| 188 library.members.forEach((String name, Builder member) { | 188 library.members.forEach((String name, Builder member) { |
| 189 if (member is SourceClassBuilder) { | 189 if (member is SourceClassBuilder) { |
| 190 result.add(member); | 190 result.add(member); |
| 191 } | 191 } |
| 192 }); | 192 }); |
| 193 }); | 193 }); |
| 194 return result; | 194 return result; |
| 195 } | 195 } |
| 196 | 196 |
| 197 List<Class> collectAllMixinApplications() { | |
| 198 List<Class> result = <Class>[]; | |
| 199 loader.builders.forEach((Uri uri, LibraryBuilder library) { | |
| 200 if (library is KernelLibraryBuilder) { | |
| 201 result.addAll(library.mixinApplicationClasses); | |
| 202 } | |
| 203 }); | |
| 204 return result; | |
| 205 } | |
| 206 | |
| 207 void breakCycle(ClassBuilder builder) { | 197 void breakCycle(ClassBuilder builder) { |
| 208 Class cls = builder.target; | 198 Class cls = builder.target; |
| 209 cls.implementedTypes.clear(); | 199 cls.implementedTypes.clear(); |
| 210 cls.supertype = null; | 200 cls.supertype = null; |
| 211 cls.mixedInType = null; | 201 cls.mixedInType = null; |
| 212 builder.supertype = | 202 builder.supertype = |
| 213 new KernelNamedTypeBuilder( | 203 new KernelNamedTypeBuilder( |
| 214 "Object", null, builder.charOffset, | 204 "Object", null, builder.charOffset, |
| 215 builder.fileUri ?? Uri.parse(cls.fileUri)) | 205 builder.fileUri ?? Uri.parse(cls.fileUri)) |
| 216 ..builder = objectClassBuilder; | 206 ..builder = objectClassBuilder; |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 superclass = superclass.superclass; | 591 superclass = superclass.superclass; |
| 602 } | 592 } |
| 603 for (Constructor constructor in superclass.constructors) { | 593 for (Constructor constructor in superclass.constructors) { |
| 604 if (constructor.name.name.isEmpty) { | 594 if (constructor.name.name.isEmpty) { |
| 605 return constructor.function.requiredParameterCount == 0 ? | 595 return constructor.function.requiredParameterCount == 0 ? |
| 606 constructor : null; | 596 constructor : null; |
| 607 } | 597 } |
| 608 } | 598 } |
| 609 return null; | 599 return null; |
| 610 } | 600 } |
| OLD | NEW |