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/names.dart' show | 7 import '../common/names.dart' show |
8 Identifiers; | 8 Identifiers; |
9 import '../common/resolution.dart' show | 9 import '../common/resolution.dart' show |
10 Resolution; | 10 Resolution; |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 /// If `true` interface members are the non-static class member. | 846 /// If `true` interface members are the non-static class member. |
847 bool interfaceMembersAreClassMembers = true; | 847 bool interfaceMembersAreClassMembers = true; |
848 | 848 |
849 Map<Name, Member> classMembers; | 849 Map<Name, Member> classMembers; |
850 Map<Name, MemberSignature> interfaceMembers; | 850 Map<Name, MemberSignature> interfaceMembers; |
851 | 851 |
852 /// Creates the necessary maps and [MembersCreator] for compute members of | 852 /// Creates the necessary maps and [MembersCreator] for compute members of |
853 /// this class. | 853 /// this class. |
854 MembersCreator _prepareCreator(Compiler compiler) { | 854 MembersCreator _prepareCreator(Compiler compiler) { |
855 if (classMembers == null) { | 855 if (classMembers == null) { |
| 856 ensureResolved(compiler.resolution); |
856 classMembers = new Map<Name, Member>(); | 857 classMembers = new Map<Name, Member>(); |
857 | 858 |
858 if (interfaceMembersAreClassMembers) { | 859 if (interfaceMembersAreClassMembers) { |
859 ClassMemberMixin superclass = this.superclass; | 860 ClassMemberMixin superclass = this.superclass; |
860 if ((superclass != null && | 861 if ((superclass != null && |
861 (!superclass.interfaceMembersAreClassMembers || | 862 (!superclass.interfaceMembersAreClassMembers || |
862 superclass.isMixinApplication)) || | 863 superclass.isMixinApplication)) || |
863 !interfaces.isEmpty) { | 864 !interfaces.isEmpty) { |
864 interfaceMembersAreClassMembers = false; | 865 interfaceMembersAreClassMembers = false; |
865 } | 866 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 message: "Members have not been fully computed for $this.")); | 953 message: "Members have not been fully computed for $this.")); |
953 if (interfaceMembersAreClassMembers) { | 954 if (interfaceMembersAreClassMembers) { |
954 classMembers.forEach((_, member) { | 955 classMembers.forEach((_, member) { |
955 if (!member.isStatic) f(member); | 956 if (!member.isStatic) f(member); |
956 }); | 957 }); |
957 } else { | 958 } else { |
958 interfaceMembers.forEach((_, member) => f(member)); | 959 interfaceMembers.forEach((_, member) => f(member)); |
959 } | 960 } |
960 } | 961 } |
961 } | 962 } |
OLD | NEW |