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); | |
857 classMembers = new Map<Name, Member>(); | 856 classMembers = new Map<Name, Member>(); |
858 | 857 |
859 if (interfaceMembersAreClassMembers) { | 858 if (interfaceMembersAreClassMembers) { |
860 ClassMemberMixin superclass = this.superclass; | 859 ClassMemberMixin superclass = this.superclass; |
861 if ((superclass != null && | 860 if ((superclass != null && |
862 (!superclass.interfaceMembersAreClassMembers || | 861 (!superclass.interfaceMembersAreClassMembers || |
863 superclass.isMixinApplication)) || | 862 superclass.isMixinApplication)) || |
864 !interfaces.isEmpty) { | 863 !interfaces.isEmpty) { |
865 interfaceMembersAreClassMembers = false; | 864 interfaceMembersAreClassMembers = false; |
866 } | 865 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 message: "Members have not been fully computed for $this.")); | 952 message: "Members have not been fully computed for $this.")); |
954 if (interfaceMembersAreClassMembers) { | 953 if (interfaceMembersAreClassMembers) { |
955 classMembers.forEach((_, member) { | 954 classMembers.forEach((_, member) { |
956 if (!member.isStatic) f(member); | 955 if (!member.isStatic) f(member); |
957 }); | 956 }); |
958 } else { | 957 } else { |
959 interfaceMembers.forEach((_, member) => f(member)); | 958 interfaceMembers.forEach((_, member) => f(member)); |
960 } | 959 } |
961 } | 960 } |
962 } | 961 } |
OLD | NEW |