OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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; | 5 library elements; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/resolution.dart' show Resolution; | 8 import '../common/resolution.dart' show Resolution; |
9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
10 import '../constants/constructors.dart'; | 10 import '../constants/constructors.dart'; |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 | 934 |
935 /// The implicit scope defined by a import declaration with a prefix clause. | 935 /// The implicit scope defined by a import declaration with a prefix clause. |
936 abstract class PrefixElement extends Element { | 936 abstract class PrefixElement extends Element { |
937 Element lookupLocalMember(String memberName); | 937 Element lookupLocalMember(String memberName); |
938 | 938 |
939 /// Is true if this prefix belongs to a deferred import. | 939 /// Is true if this prefix belongs to a deferred import. |
940 bool get isDeferred; | 940 bool get isDeferred; |
941 | 941 |
942 /// Import that declared this deferred prefix. | 942 /// Import that declared this deferred prefix. |
943 ImportElement get deferredImport; | 943 ImportElement get deferredImport; |
| 944 |
| 945 /// The `loadLibrary` getter implicitly defined on deferred prefixes. |
| 946 GetterElement get loadLibrary; |
944 } | 947 } |
945 | 948 |
946 /// A type alias definition. | 949 /// A type alias definition. |
947 abstract class TypedefElement extends Element | 950 abstract class TypedefElement extends Element |
948 implements AstElement, TypeDeclarationElement, FunctionTypedElement { | 951 implements AstElement, TypeDeclarationElement, FunctionTypedElement { |
949 /// The type defined by this typedef with the type variables as its type | 952 /// The type defined by this typedef with the type variables as its type |
950 /// arguments. | 953 /// arguments. |
951 /// | 954 /// |
952 /// For instance `F<T>` for `typedef void F<T>(T t)`. | 955 /// For instance `F<T>` for `typedef void F<T>(T t)`. |
953 TypedefType get thisType; | 956 TypedefType get thisType; |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1684 /// data mapped in [TreeElements]. | 1687 /// data mapped in [TreeElements]. |
1685 PARSED, | 1688 PARSED, |
1686 | 1689 |
1687 /// The element is an implicit default constructor. No AST or [TreeElements] | 1690 /// The element is an implicit default constructor. No AST or [TreeElements] |
1688 /// are provided. | 1691 /// are provided. |
1689 DEFAULT_CONSTRUCTOR, | 1692 DEFAULT_CONSTRUCTOR, |
1690 | 1693 |
1691 /// The element is an implicit forwarding constructor on a mixin application. | 1694 /// The element is an implicit forwarding constructor on a mixin application. |
1692 /// No AST or [TreeElements] are provided. | 1695 /// No AST or [TreeElements] are provided. |
1693 FORWARDING_CONSTRUCTOR, | 1696 FORWARDING_CONSTRUCTOR, |
| 1697 |
| 1698 /// The element is the `loadLibrary` getter implicitly defined on a deferred |
| 1699 /// prefix. |
| 1700 DEFERRED_LOAD_LIBRARY, |
1694 } | 1701 } |
1695 | 1702 |
1696 /// [ResolvedAst] contains info that define the semantics of an element. | 1703 /// [ResolvedAst] contains info that define the semantics of an element. |
1697 abstract class ResolvedAst { | 1704 abstract class ResolvedAst { |
1698 /// The element whose semantics is defined. | 1705 /// The element whose semantics is defined. |
1699 Element get element; | 1706 Element get element; |
1700 | 1707 |
1701 /// The kind of semantics definition used for this object. | 1708 /// The kind of semantics definition used for this object. |
1702 ResolvedAstKind get kind; | 1709 ResolvedAstKind get kind; |
1703 | 1710 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1843 /// by a field. | 1850 /// by a field. |
1844 bool get isDeclaredByField; | 1851 bool get isDeclaredByField; |
1845 | 1852 |
1846 /// Returns `true` if this member is abstract. | 1853 /// Returns `true` if this member is abstract. |
1847 bool get isAbstract; | 1854 bool get isAbstract; |
1848 | 1855 |
1849 /// If abstract, [implementation] points to the overridden concrete member, | 1856 /// If abstract, [implementation] points to the overridden concrete member, |
1850 /// if any. Otherwise [implementation] points to the member itself. | 1857 /// if any. Otherwise [implementation] points to the member itself. |
1851 Member get implementation; | 1858 Member get implementation; |
1852 } | 1859 } |
OLD | NEW |