| 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 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2701 ClassElement get superclass { | 2699 ClassElement get superclass { |
| 2702 assert(invariant(this, supertypeLoadState == STATE_DONE, | 2700 assert(invariant(this, supertypeLoadState == STATE_DONE, |
| 2703 message: "Superclass has not been computed for $this.")); | 2701 message: "Superclass has not been computed for $this.")); |
| 2704 return supertype == null ? null : supertype.element; | 2702 return supertype == null ? null : supertype.element; |
| 2705 } | 2703 } |
| 2706 | 2704 |
| 2707 void forEachBackendMember(void f(Element member)) { | 2705 void forEachBackendMember(void f(Element member)) { |
| 2708 backendMembers.forEach(f); | 2706 backendMembers.forEach(f); |
| 2709 } | 2707 } |
| 2710 | 2708 |
| 2711 bool implementsFunction(CoreClasses coreClasses) { | 2709 bool implementsFunction(Compiler compiler) { |
| 2712 return asInstanceOf(coreClasses.functionClass) != null || | 2710 return asInstanceOf(compiler.coreClasses.functionClass) != null || |
| 2713 callType != null; | 2711 callType != null; |
| 2714 } | 2712 } |
| 2715 | 2713 |
| 2716 // TODO(johnniwinther): Remove these when issue 18630 is fixed. | 2714 // TODO(johnniwinther): Remove these when issue 18630 is fixed. |
| 2717 ClassElement get patch => super.patch; | 2715 ClassElement get patch => super.patch; |
| 2718 ClassElement get origin => super.origin; | 2716 ClassElement get origin => super.origin; |
| 2719 | 2717 |
| 2720 // A class declaration is defined by the declaration element. | 2718 // A class declaration is defined by the declaration element. |
| 2721 AstElement get definingElement => declaration; | 2719 AstElement get definingElement => declaration; |
| 2722 } | 2720 } |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3228 AstElement get definingElement; | 3226 AstElement get definingElement; |
| 3229 | 3227 |
| 3230 bool get hasResolvedAst => definingElement.hasTreeElements; | 3228 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 3231 | 3229 |
| 3232 ResolvedAst get resolvedAst { | 3230 ResolvedAst get resolvedAst { |
| 3233 return new ResolvedAst(declaration, | 3231 return new ResolvedAst(declaration, |
| 3234 definingElement.node, definingElement.treeElements); | 3232 definingElement.node, definingElement.treeElements); |
| 3235 } | 3233 } |
| 3236 | 3234 |
| 3237 } | 3235 } |
| OLD | NEW |