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 resolution.compute_members; | 5 library resolution.compute_members; |
6 | 6 |
7 import '../elements/elements.dart' | 7 import '../elements/elements.dart' |
8 show Element, | 8 show Element, |
9 Name, | 9 Name, |
10 PublicName, | 10 PublicName, |
11 Member, | 11 Member, |
| 12 MemberElement, |
12 MemberSignature, | 13 MemberSignature, |
13 LibraryElement, | 14 LibraryElement, |
14 ClassElement, | 15 ClassElement, |
15 MixinApplicationElement; | 16 MixinApplicationElement; |
16 import '../dart_types.dart'; | 17 import '../dart_types.dart'; |
17 import '../dart2jslib.dart' | 18 import '../dart2jslib.dart' |
18 show Compiler, | 19 show Compiler, |
19 MessageKind, | 20 MessageKind, |
20 invariant, | 21 invariant, |
21 isPrivateName; | 22 isPrivateName; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 157 } |
157 } else { | 158 } else { |
158 computeAllClassMembers(compiler, mixinApplication.mixin); | 159 computeAllClassMembers(compiler, mixinApplication.mixin); |
159 mixinApplication.mixin.forEachClassMember(inheritMixinMember); | 160 mixinApplication.mixin.forEachClassMember(inheritMixinMember); |
160 } | 161 } |
161 } | 162 } |
162 } else { | 163 } else { |
163 LibraryElement library = cls.library; | 164 LibraryElement library = cls.library; |
164 InterfaceType thisType = cls.thisType; | 165 InterfaceType thisType = cls.thisType; |
165 | 166 |
166 void createMember(Element element) { | 167 void createMember(MemberElement element) { |
167 if (element.isConstructor) return; | 168 if (element.isConstructor) return; |
168 String elementName = element.name; | 169 String elementName = element.name; |
169 if (shouldSkipName(elementName)) return; | 170 if (shouldSkipName(elementName)) return; |
170 if (nameText != null && elementName != nameText) return; | 171 if (nameText != null && elementName != nameText) return; |
171 | 172 |
172 void addDeclaredMember(Name name, | 173 void addDeclaredMember(Name name, |
173 DartType type, FunctionType functionType) { | 174 DartType type, FunctionType functionType) { |
174 DeclaredMember inherited = classMembers[name]; | 175 DeclaredMember inherited = classMembers[name]; |
175 DeclaredMember declared; | 176 DeclaredMember declared; |
176 if (element.isAbstract) { | 177 if (element.isAbstract) { |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 message: "Members have not been fully computed for $this.")); | 905 message: "Members have not been fully computed for $this.")); |
905 if (interfaceMembersAreClassMembers) { | 906 if (interfaceMembersAreClassMembers) { |
906 classMembers.forEach((_, member) { | 907 classMembers.forEach((_, member) { |
907 if (!member.isStatic) f(member); | 908 if (!member.isStatic) f(member); |
908 }); | 909 }); |
909 } else { | 910 } else { |
910 interfaceMembers.forEach((_, member) => f(member)); | 911 interfaceMembers.forEach((_, member) => f(member)); |
911 } | 912 } |
912 } | 913 } |
913 } | 914 } |
OLD | NEW |