| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.compute_members; | 5 library dart2js.resolution.compute_members; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show Identifiers, Names; | 8 import '../common/names.dart' show Identifiers, Names; |
| 9 import '../common/resolution.dart' show Resolution; | 9 import '../common/resolution.dart' show Resolution; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 if (!declared.isStatic) { | 682 if (!declared.isStatic) { |
| 683 interfaceMembers[name] = declared; | 683 interfaceMembers[name] = declared; |
| 684 } | 684 } |
| 685 } else if (inheritedMembers.length == 1) { | 685 } else if (inheritedMembers.length == 1) { |
| 686 interfaceMembers[name] = inheritedMembers.single; | 686 interfaceMembers[name] = inheritedMembers.single; |
| 687 } else { | 687 } else { |
| 688 bool someAreGetters = false; | 688 bool someAreGetters = false; |
| 689 bool allAreGetters = true; | 689 bool allAreGetters = true; |
| 690 Map<DartType, Setlet<Member>> subtypesOfAllInherited = | 690 Map<DartType, Setlet<Member>> subtypesOfAllInherited = |
| 691 new Map<DartType, Setlet<Member>>(); | 691 new Map<DartType, Setlet<Member>>(); |
| 692 outer: for (Member inherited in inheritedMembers) { | 692 outer: |
| 693 for (Member inherited in inheritedMembers) { |
| 693 if (inherited.isGetter) { | 694 if (inherited.isGetter) { |
| 694 someAreGetters = true; | 695 someAreGetters = true; |
| 695 if (!allAreGetters) break outer; | 696 if (!allAreGetters) break outer; |
| 696 } else { | 697 } else { |
| 697 allAreGetters = false; | 698 allAreGetters = false; |
| 698 if (someAreGetters) break outer; | 699 if (someAreGetters) break outer; |
| 699 } | 700 } |
| 700 for (MemberSignature other in inheritedMembers) { | 701 for (MemberSignature other in inheritedMembers) { |
| 701 if (!resolution.types | 702 if (!resolution.types |
| 702 .isSubtype(inherited.functionType, other.functionType)) { | 703 .isSubtype(inherited.functionType, other.functionType)) { |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 message: "Members have not been fully computed for $this.")); | 955 message: "Members have not been fully computed for $this.")); |
| 955 if (interfaceMembersAreClassMembers) { | 956 if (interfaceMembersAreClassMembers) { |
| 956 classMembers.forEach((_, member) { | 957 classMembers.forEach((_, member) { |
| 957 if (!member.isStatic) f(member); | 958 if (!member.isStatic) f(member); |
| 958 }); | 959 }); |
| 959 } else { | 960 } else { |
| 960 interfaceMembers.forEach((_, member) => f(member)); | 961 interfaceMembers.forEach((_, member) => f(member)); |
| 961 } | 962 } |
| 962 } | 963 } |
| 963 } | 964 } |
| OLD | NEW |