| 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; |
| 11 import '../compiler.dart' show | 11 import '../compiler.dart' show |
| 12 Compiler; | 12 Compiler; |
| 13 import '../constants/constant_constructors.dart'; | 13 import '../constants/constant_constructors.dart'; |
| 14 import '../constants/constructors.dart'; | 14 import '../constants/constructors.dart'; |
| 15 import '../constants/expressions.dart'; | 15 import '../constants/expressions.dart'; |
| 16 import '../core_types.dart' show | |
| 17 CoreClasses; | |
| 18 import '../dart_types.dart'; | 16 import '../dart_types.dart'; |
| 19 import '../diagnostics/messages.dart' show | 17 import '../diagnostics/messages.dart' show |
| 20 MessageTemplate; | 18 MessageTemplate; |
| 21 import '../ordered_typeset.dart' show | 19 import '../ordered_typeset.dart' show |
| 22 OrderedTypeSet; | 20 OrderedTypeSet; |
| 23 import '../resolution/class_members.dart' show | 21 import '../resolution/class_members.dart' show |
| 24 ClassMemberMixin; | 22 ClassMemberMixin; |
| 25 import '../resolution/scope.dart' show | 23 import '../resolution/scope.dart' show |
| 26 ClassScope, | 24 ClassScope, |
| 27 LibraryScope, | 25 LibraryScope, |
| (...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2694 ClassElement get superclass { | 2692 ClassElement get superclass { |
| 2695 assert(invariant(this, supertypeLoadState == STATE_DONE, | 2693 assert(invariant(this, supertypeLoadState == STATE_DONE, |
| 2696 message: "Superclass has not been computed for $this.")); | 2694 message: "Superclass has not been computed for $this.")); |
| 2697 return supertype == null ? null : supertype.element; | 2695 return supertype == null ? null : supertype.element; |
| 2698 } | 2696 } |
| 2699 | 2697 |
| 2700 void forEachBackendMember(void f(Element member)) { | 2698 void forEachBackendMember(void f(Element member)) { |
| 2701 backendMembers.forEach(f); | 2699 backendMembers.forEach(f); |
| 2702 } | 2700 } |
| 2703 | 2701 |
| 2704 bool implementsFunction(CoreClasses coreClasses) { | |
| 2705 return asInstanceOf(coreClasses.functionClass) != null || | |
| 2706 callType != null; | |
| 2707 } | |
| 2708 | |
| 2709 // TODO(johnniwinther): Remove these when issue 18630 is fixed. | 2702 // TODO(johnniwinther): Remove these when issue 18630 is fixed. |
| 2710 ClassElement get patch => super.patch; | 2703 ClassElement get patch => super.patch; |
| 2711 ClassElement get origin => super.origin; | 2704 ClassElement get origin => super.origin; |
| 2712 | 2705 |
| 2713 // A class declaration is defined by the declaration element. | 2706 // A class declaration is defined by the declaration element. |
| 2714 AstElement get definingElement => declaration; | 2707 AstElement get definingElement => declaration; |
| 2715 } | 2708 } |
| 2716 | 2709 |
| 2717 abstract class ClassElementX extends BaseClassElementX { | 2710 abstract class ClassElementX extends BaseClassElementX { |
| 2718 Link<Element> localMembersReversed = const Link<Element>(); | 2711 Link<Element> localMembersReversed = const Link<Element>(); |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3196 AstElement get definingElement; | 3189 AstElement get definingElement; |
| 3197 | 3190 |
| 3198 bool get hasResolvedAst => definingElement.hasTreeElements; | 3191 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 3199 | 3192 |
| 3200 ResolvedAst get resolvedAst { | 3193 ResolvedAst get resolvedAst { |
| 3201 return new ResolvedAst(declaration, | 3194 return new ResolvedAst(declaration, |
| 3202 definingElement.node, definingElement.treeElements); | 3195 definingElement.node, definingElement.treeElements); |
| 3203 } | 3196 } |
| 3204 | 3197 |
| 3205 } | 3198 } |
| OLD | NEW |