Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/elements/elements.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart |
| index a203ec532980c5cae0584e5bea2ba4843ca506c4..4835316682a296b382c10b0c50a3f6115b4a3559 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart |
| @@ -245,6 +245,9 @@ abstract class Element implements Spannable { |
| Element getEnclosingMember(); |
| Element getOutermostEnclosingMemberOrTopLevel(); |
| + /// The enclosing class that defines the type environment for this element. |
| + ClassElement get contextClass; |
| + |
| FunctionElement asFunctionElement(); |
| bool get isPatched; |
| @@ -865,7 +868,33 @@ abstract class ConstructorBodyElement extends FunctionElement { |
| * declarations and typedefs. |
| */ |
| abstract class TypeDeclarationElement extends Element { |
| + /** |
| + * The `this type` for this type declaration. |
| + * |
| + * The type of [:this:] is the generic type based on this element in which |
| + * the type arguments are the declared type variables. For instance, |
| + * [:List<E>:] for [:List:] and [:Map<K,V>:] for [:Map:]. |
| + * |
| + * For a class declaration this is the type of [:this:]. |
| + */ |
| GenericType get thisType; |
| + |
| + /** |
| + * The raw type for this type declaration. |
| + * |
| + * The raw type is the generic type base on this element in which the type |
| + * arguments are all [dynamic]. For instance [:List<dynamic>:] for [:List:] |
| + * and [:Map<dynamic,dynamic>:] for [:Map:]. For non-generic classes [rawType] |
| + * is the same as [thisType]. |
| + * |
| + * The [rawType] field is a canonicalization of the raw type and should be |
| + * used to distinguish explicit and implicit uses of the [dynamic] |
| + * type arguments. For instance should [:List:] be the [rawType] of the |
| + * [:List:] class element whereas [:List<dynamic>:] should be its own |
| + * instantiation of [InterfaceType] with [:dynamic:] as type argument. Using |
| + * this distinction, we can print the raw type with type arguments only when |
| + * the input source has used explicit type arguments. |
| + */ |
| GenericType get rawType; |
| /** |
| @@ -887,12 +916,21 @@ abstract class ClassElement extends TypeDeclarationElement |
| InterfaceType get rawType; |
| InterfaceType get thisType; |
| - |
| ClassElement get superclass; |
| + /// The direct supertype of this class. |
| DartType get supertype; |
| + |
| + /// Ordered set of all supertypes of this class. |
| OrderedTypeSet get allSupertypesAndSelf; |
| + |
| + /// A list of all |
|
karlklose
2014/05/07 12:46:37
Comment is incomplete.
Johnni Winther
2014/05/08 07:03:59
Done.
|
| Link<DartType> get allSupertypes; |
| + |
| + /// Returns the this type of this class as an instance of [cls]: |
|
karlklose
2014/05/07 12:46:37
Is there missing something? If not, terminate with
Johnni Winther
2014/05/08 07:03:59
Done.
|
| + InterfaceType asInstanceOf(ClassElement cls); |
| + |
| + /// A list of all direct superinterfaces of this class. |
| Link<DartType> get interfaces; |
| bool get hasConstructor; |