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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void computeMembersByName(String name, Setlet<Name> names) { | 62 void computeMembersByName(String name, Setlet<Name> names) { |
63 computeMembers(name, names); | 63 computeMembers(name, names); |
64 } | 64 } |
65 | 65 |
66 /// Compute all members of [cls] and checked that [cls] implements its | 66 /// Compute all members of [cls] and checked that [cls] implements its |
67 /// interface unless it is abstract or declares a `noSuchMethod` method. | 67 /// interface unless it is abstract or declares a `noSuchMethod` method. |
68 void computeAllMembers() { | 68 void computeAllMembers() { |
69 computeMembers(null, null); | 69 computeMembers(null, null); |
70 if (!cls.isAbstract) { | 70 if (!cls.isAbstract) { |
71 Member member = classMembers[Names.noSuchMethod_]; | 71 Member member = classMembers[Names.noSuchMethod_]; |
72 if (member != null && !member.declarer.isObject) { | 72 if (member != null && |
| 73 !resolution.target.isDefaultNoSuchMethod(member.element)) { |
73 return; | 74 return; |
74 } | 75 } |
75 // Check for unimplemented members on concrete classes that neither have | 76 // Check for unimplemented members on concrete classes that neither have |
76 // a `@proxy` annotation nor declare a `noSuchMethod` method. | 77 // a `@proxy` annotation nor declare a `noSuchMethod` method. |
77 checkInterfaceImplementation(); | 78 checkInterfaceImplementation(); |
78 } | 79 } |
79 } | 80 } |
80 | 81 |
81 /// Compute declared and inherited members of [cls] and return a map of the | 82 /// Compute declared and inherited members of [cls] and return a map of the |
82 /// declared members. | 83 /// declared members. |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 message: "Members have not been fully computed for $this.")); | 956 message: "Members have not been fully computed for $this.")); |
956 if (interfaceMembersAreClassMembers) { | 957 if (interfaceMembersAreClassMembers) { |
957 classMembers.forEach((_, member) { | 958 classMembers.forEach((_, member) { |
958 if (!member.isStatic) f(member); | 959 if (!member.isStatic) f(member); |
959 }); | 960 }); |
960 } else { | 961 } else { |
961 interfaceMembers.forEach((_, member) => f(member)); | 962 interfaceMembers.forEach((_, member) => f(member)); |
962 } | 963 } |
963 } | 964 } |
964 } | 965 } |
OLD | NEW |