| 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/resolution.dart' show | 7 import '../common/resolution.dart' show |
| 8 Resolution, | 8 Resolution, |
| 9 Parsing; | 9 Parsing; |
| 10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
| (...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2586 } | 2586 } |
| 2587 return null; | 2587 return null; |
| 2588 } | 2588 } |
| 2589 | 2589 |
| 2590 /** | 2590 /** |
| 2591 * Returns the super class, if any. | 2591 * Returns the super class, if any. |
| 2592 * | 2592 * |
| 2593 * The returned element may not be resolved yet. | 2593 * The returned element may not be resolved yet. |
| 2594 */ | 2594 */ |
| 2595 ClassElement get superclass { | 2595 ClassElement get superclass { |
| 2596 assert(supertypeLoadState == STATE_DONE); | 2596 assert(invariant(this, supertypeLoadState == STATE_DONE, |
| 2597 message: "Superclass has not been computed for $this.")); |
| 2597 return supertype == null ? null : supertype.element; | 2598 return supertype == null ? null : supertype.element; |
| 2598 } | 2599 } |
| 2599 | 2600 |
| 2600 void forEachBackendMember(void f(Element member)) { | 2601 void forEachBackendMember(void f(Element member)) { |
| 2601 backendMembers.forEach(f); | 2602 backendMembers.forEach(f); |
| 2602 } | 2603 } |
| 2603 | 2604 |
| 2604 bool implementsFunction(Compiler compiler) { | 2605 bool implementsFunction(Compiler compiler) { |
| 2605 return asInstanceOf(compiler.functionClass) != null || callType != null; | 2606 return asInstanceOf(compiler.functionClass) != null || callType != null; |
| 2606 } | 2607 } |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3103 AstElement get definingElement; | 3104 AstElement get definingElement; |
| 3104 | 3105 |
| 3105 bool get hasResolvedAst => definingElement.hasTreeElements; | 3106 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 3106 | 3107 |
| 3107 ResolvedAst get resolvedAst { | 3108 ResolvedAst get resolvedAst { |
| 3108 return new ResolvedAst(declaration, | 3109 return new ResolvedAst(declaration, |
| 3109 definingElement.node, definingElement.treeElements); | 3110 definingElement.node, definingElement.treeElements); |
| 3110 } | 3111 } |
| 3111 | 3112 |
| 3112 } | 3113 } |
| OLD | NEW |