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 part of dart2js.resolution.compute_members; | 5 part of dart2js.resolution.compute_members; |
6 | 6 |
7 class DeclaredMember implements Member { | 7 class DeclaredMember implements Member { |
8 final Name name; | 8 final Name name; |
9 final Element element; | 9 final MemberElement element; |
10 final ResolutionInterfaceType declarer; | 10 final ResolutionInterfaceType declarer; |
11 final ResolutionDartType type; | 11 final ResolutionDartType type; |
12 final ResolutionFunctionType functionType; | 12 final ResolutionFunctionType functionType; |
13 | 13 |
14 DeclaredMember( | 14 DeclaredMember( |
15 this.name, this.element, this.declarer, this.type, this.functionType); | 15 this.name, this.element, this.declarer, this.type, this.functionType); |
16 | 16 |
17 bool get isStatic => !element.isInstanceMember; | 17 bool get isStatic => !element.isInstanceMember; |
18 | 18 |
19 bool get isGetter => element.isGetter || (!isSetter && element.isField); | 19 bool get isGetter => element.isGetter || (!isSetter && element.isField); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 class InheritedMember implements DeclaredMember { | 109 class InheritedMember implements DeclaredMember { |
110 final DeclaredMember declaration; | 110 final DeclaredMember declaration; |
111 final ResolutionInterfaceType instance; | 111 final ResolutionInterfaceType instance; |
112 | 112 |
113 InheritedMember( | 113 InheritedMember( |
114 DeclaredMember this.declaration, ResolutionInterfaceType this.instance) { | 114 DeclaredMember this.declaration, ResolutionInterfaceType this.instance) { |
115 assert(instance.isGeneric); | 115 assert(instance.isGeneric); |
116 assert(!declaration.isStatic); | 116 assert(!declaration.isStatic); |
117 } | 117 } |
118 | 118 |
119 Element get element => declaration.element; | 119 MemberElement get element => declaration.element; |
120 | 120 |
121 Name get name => declaration.name; | 121 Name get name => declaration.name; |
122 | 122 |
123 ResolutionInterfaceType get declarer => instance; | 123 ResolutionInterfaceType get declarer => instance; |
124 | 124 |
125 bool get isStatic => false; | 125 bool get isStatic => false; |
126 | 126 |
127 bool get isSetter => declaration.isSetter; | 127 bool get isSetter => declaration.isSetter; |
128 | 128 |
129 bool get isGetter => declaration.isGetter; | 129 bool get isGetter => declaration.isGetter; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 bool get isGetter => false; | 248 bool get isGetter => false; |
249 | 249 |
250 bool get isMethod => false; | 250 bool get isMethod => false; |
251 | 251 |
252 bool get isMalformed => true; | 252 bool get isMalformed => true; |
253 | 253 |
254 String toString() => "erroneous member '$name' synthesized " | 254 String toString() => "erroneous member '$name' synthesized " |
255 "from ${inheritedMembers}"; | 255 "from ${inheritedMembers}"; |
256 } | 256 } |
OLD | NEW |