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 '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/resolution.dart' show | 8 import '../common/resolution.dart' show |
9 Resolution, | 9 Resolution, |
10 Parsing; | 10 Parsing; |
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2606 assert(invariant(this, supertypeLoadState == STATE_DONE, | 2606 assert(invariant(this, supertypeLoadState == STATE_DONE, |
2607 message: "Superclass has not been computed for $this.")); | 2607 message: "Superclass has not been computed for $this.")); |
2608 return supertype == null ? null : supertype.element; | 2608 return supertype == null ? null : supertype.element; |
2609 } | 2609 } |
2610 | 2610 |
2611 void forEachBackendMember(void f(Element member)) { | 2611 void forEachBackendMember(void f(Element member)) { |
2612 backendMembers.forEach(f); | 2612 backendMembers.forEach(f); |
2613 } | 2613 } |
2614 | 2614 |
2615 bool implementsFunction(Compiler compiler) { | 2615 bool implementsFunction(Compiler compiler) { |
2616 return asInstanceOf(compiler.functionClass) != null || callType != null; | 2616 return asInstanceOf(compiler.coreClasses.functionClass) != null || |
| 2617 callType != null; |
2617 } | 2618 } |
2618 | 2619 |
2619 // TODO(johnniwinther): Remove these when issue 18630 is fixed. | 2620 // TODO(johnniwinther): Remove these when issue 18630 is fixed. |
2620 ClassElement get patch => super.patch; | 2621 ClassElement get patch => super.patch; |
2621 ClassElement get origin => super.origin; | 2622 ClassElement get origin => super.origin; |
2622 | 2623 |
2623 // A class declaration is defined by the declaration element. | 2624 // A class declaration is defined by the declaration element. |
2624 AstElement get definingElement => declaration; | 2625 AstElement get definingElement => declaration; |
2625 } | 2626 } |
2626 | 2627 |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3101 AstElement get definingElement; | 3102 AstElement get definingElement; |
3102 | 3103 |
3103 bool get hasResolvedAst => definingElement.hasTreeElements; | 3104 bool get hasResolvedAst => definingElement.hasTreeElements; |
3104 | 3105 |
3105 ResolvedAst get resolvedAst { | 3106 ResolvedAst get resolvedAst { |
3106 return new ResolvedAst(declaration, | 3107 return new ResolvedAst(declaration, |
3107 definingElement.node, definingElement.treeElements); | 3108 definingElement.node, definingElement.treeElements); |
3108 } | 3109 } |
3109 | 3110 |
3110 } | 3111 } |
OLD | NEW |