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