OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.resolution_strategy; | 5 library dart2js.resolution_strategy; |
6 | 6 |
7 import 'package:front_end/src/fasta/scanner.dart' show Token; | 7 import 'package:front_end/src/fasta/scanner.dart' show Token; |
8 | 8 |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../common_elements.dart'; | 10 import '../common_elements.dart'; |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 covariant ClassElement cls, void f(ConstructorEntity constructor)) { | 508 covariant ClassElement cls, void f(ConstructorEntity constructor)) { |
509 cls.ensureResolved(_resolution); | 509 cls.ensureResolved(_resolution); |
510 for (ConstructorElement constructor in cls.implementation.constructors) { | 510 for (ConstructorElement constructor in cls.implementation.constructors) { |
511 _resolution.ensureResolved(constructor.declaration); | 511 _resolution.ensureResolved(constructor.declaration); |
512 if (constructor.isRedirectingFactory) continue; | 512 if (constructor.isRedirectingFactory) continue; |
513 f(constructor); | 513 f(constructor); |
514 } | 514 } |
515 } | 515 } |
516 | 516 |
517 @override | 517 @override |
| 518 void forEachConstructorBody( |
| 519 covariant ClassElement cls, void f(ConstructorBodyEntity constructor)) { |
| 520 cls.forEachConstructorBody(f); |
| 521 } |
| 522 |
| 523 @override |
518 ClassEntity getSuperClass(covariant ClassElement cls, | 524 ClassEntity getSuperClass(covariant ClassElement cls, |
519 {bool skipUnnamedMixinApplications: false}) { | 525 {bool skipUnnamedMixinApplications: false}) { |
520 cls.ensureResolved(_resolution); | 526 cls.ensureResolved(_resolution); |
521 ClassElement superclass = cls.superclass; | 527 ClassElement superclass = cls.superclass; |
522 if (skipUnnamedMixinApplications) { | 528 if (skipUnnamedMixinApplications) { |
523 while (superclass != null && superclass.isUnnamedMixinApplication) { | 529 while (superclass != null && superclass.isUnnamedMixinApplication) { |
524 superclass = superclass.superclass; | 530 superclass = superclass.superclass; |
525 } | 531 } |
526 } | 532 } |
527 return superclass; | 533 return superclass; |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 @override | 874 @override |
869 WorkItem createWorkItem(MemberElement element) { | 875 WorkItem createWorkItem(MemberElement element) { |
870 assert(element.isDeclaration, failedAt(element)); | 876 assert(element.isDeclaration, failedAt(element)); |
871 if (element.isMalformed) return null; | 877 if (element.isMalformed) return null; |
872 | 878 |
873 assert(element is AnalyzableElement, | 879 assert(element is AnalyzableElement, |
874 failedAt(element, 'Element $element is not analyzable.')); | 880 failedAt(element, 'Element $element is not analyzable.')); |
875 return _resolution.createWorkItem(element); | 881 return _resolution.createWorkItem(element); |
876 } | 882 } |
877 } | 883 } |
OLD | NEW |