| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'elements.dart'; | 7 import 'elements.dart'; |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../helpers/helpers.dart'; // Included for debug helpers. | 9 import '../helpers/helpers.dart'; // Included for debug helpers. |
| 10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
| (...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2278 } | 2278 } |
| 2279 } | 2279 } |
| 2280 | 2280 |
| 2281 forEachMember(fieldFilter); | 2281 forEachMember(fieldFilter); |
| 2282 } | 2282 } |
| 2283 | 2283 |
| 2284 void forEachBackendMember(void f(Element member)) { | 2284 void forEachBackendMember(void f(Element member)) { |
| 2285 backendMembers.forEach(f); | 2285 backendMembers.forEach(f); |
| 2286 } | 2286 } |
| 2287 | 2287 |
| 2288 bool implementsFunction(Compiler compiler) { |
| 2289 return asInstanceOf(compiler.functionClass) != null || callType != null; |
| 2290 } |
| 2291 |
| 2288 bool implementsInterface(ClassElement intrface) { | 2292 bool implementsInterface(ClassElement intrface) { |
| 2289 for (DartType implementedInterfaceType in allSupertypes) { | 2293 for (DartType implementedInterfaceType in allSupertypes) { |
| 2290 ClassElement implementedInterface = implementedInterfaceType.element; | 2294 ClassElement implementedInterface = implementedInterfaceType.element; |
| 2291 if (identical(implementedInterface, intrface)) { | 2295 if (identical(implementedInterface, intrface)) { |
| 2292 return true; | 2296 return true; |
| 2293 } | 2297 } |
| 2294 } | 2298 } |
| 2295 return false; | 2299 return false; |
| 2296 } | 2300 } |
| 2297 | 2301 |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 AstElement get definingElement; | 2716 AstElement get definingElement; |
| 2713 | 2717 |
| 2714 bool get hasResolvedAst => definingElement.hasTreeElements; | 2718 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 2715 | 2719 |
| 2716 ResolvedAst get resolvedAst { | 2720 ResolvedAst get resolvedAst { |
| 2717 return new ResolvedAst(declaration, | 2721 return new ResolvedAst(declaration, |
| 2718 definingElement.node, definingElement.treeElements); | 2722 definingElement.node, definingElement.treeElements); |
| 2719 } | 2723 } |
| 2720 | 2724 |
| 2721 } | 2725 } |
| OLD | NEW |