| Index: pkg/analyzer/tool/summary/idl.dart
|
| diff --git a/pkg/analyzer/tool/summary/idl.dart b/pkg/analyzer/tool/summary/idl.dart
|
| index 6a9c6a93d38a962747f2fc03682d2743f647bf27..faa8d7c26e266a895828a3d8936f8a5624fd8bf8 100644
|
| --- a/pkg/analyzer/tool/summary/idl.dart
|
| +++ b/pkg/analyzer/tool/summary/idl.dart
|
| @@ -265,6 +265,50 @@ class SdkBundle {
|
| }
|
|
|
| /**
|
| + * Summary information about a reference to a type.
|
| + */
|
| +class TypeRef {
|
| + /**
|
| + * Index into [UnlinkedUnit.references] for the type being referred to, or
|
| + * zero if this is a reference to a type parameter.
|
| + *
|
| + * Note that since zero is also a valid index into
|
| + * [UnlinkedUnit.references], we cannot distinguish between references to
|
| + * type parameters and references to types by checking [reference] against
|
| + * zero. To distinguish between references to type parameters and references
|
| + * to types, check whether [paramReference] is zero.
|
| + */
|
| + int reference;
|
| +
|
| + /**
|
| + * If this is a reference to a type parameter, one-based index into the list
|
| + * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De
|
| + * Bruijn index conventions; that is, innermost parameters come first, and
|
| + * if a class or method has multiple parameters, they are indexed from right
|
| + * to left. So for instance, if the enclosing declaration is
|
| + *
|
| + * class C<T,U> {
|
| + * m<V,W> {
|
| + * ...
|
| + * }
|
| + * }
|
| + *
|
| + * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T,
|
| + * respectively.
|
| + *
|
| + * If the type being referred to is not a type parameter, [paramReference] is
|
| + * zero.
|
| + */
|
| + int paramReference;
|
| +
|
| + /**
|
| + * If this is an instantiation of a generic type, the type arguments used to
|
| + * instantiate it. Trailing type arguments of type `dynamic` are omitted.
|
| + */
|
| + List<TypeRef> typeArguments;
|
| +}
|
| +
|
| +/**
|
| * Unlinked summary information about a class declaration.
|
| */
|
| class UnlinkedClass {
|
| @@ -296,17 +340,17 @@ class UnlinkedClass {
|
| * explicitly declare a supertype (and hence has supertype `Object`), or (b)
|
| * the class *is* `Object` (and hence has no supertype).
|
| */
|
| - UnlinkedTypeRef supertype;
|
| + TypeRef supertype;
|
|
|
| /**
|
| * Mixins appearing in a `with` clause, if any.
|
| */
|
| - List<UnlinkedTypeRef> mixins;
|
| + List<TypeRef> mixins;
|
|
|
| /**
|
| * Interfaces appearing in an `implements` clause, if any.
|
| */
|
| - List<UnlinkedTypeRef> interfaces;
|
| + List<TypeRef> interfaces;
|
|
|
| /**
|
| * Field declarations contained in the class.
|
| @@ -392,7 +436,7 @@ class UnlinkedConst {
|
| * that in the case of `pushReference` (and sometimes `invokeConstructor` the
|
| * actual entity being referred to may be something other than a type.
|
| */
|
| - List<UnlinkedTypeRef> references;
|
| + List<TypeRef> references;
|
| }
|
|
|
| /**
|
| @@ -779,7 +823,7 @@ class UnlinkedExecutable {
|
| * `void` or the executable is a constructor. Note that when strong mode is
|
| * enabled, the actual return type may be different due to type inference.
|
| */
|
| - UnlinkedTypeRef returnType;
|
| + TypeRef returnType;
|
|
|
| /**
|
| * Parameters of the executable, if any. Note that getters have no
|
| @@ -980,7 +1024,7 @@ class UnlinkedParam {
|
| * that when strong mode is enabled, the actual type may be different due to
|
| * type inference.
|
| */
|
| - UnlinkedTypeRef type;
|
| + TypeRef type;
|
|
|
| /**
|
| * If [isFunctionTyped] is `true`, the parameters of the function type.
|
| @@ -1159,7 +1203,7 @@ class UnlinkedTypedef {
|
| /**
|
| * Return type of the typedef. Absent if the return type is `void`.
|
| */
|
| - UnlinkedTypeRef returnType;
|
| + TypeRef returnType;
|
|
|
| /**
|
| * Parameters of the executable, if any.
|
| @@ -1186,51 +1230,7 @@ class UnlinkedTypeParam {
|
| * Bound of the type parameter, if a bound is explicitly declared. Otherwise
|
| * null.
|
| */
|
| - UnlinkedTypeRef bound;
|
| -}
|
| -
|
| -/**
|
| - * Unlinked summary information about a reference to a type.
|
| - */
|
| -class UnlinkedTypeRef {
|
| - /**
|
| - * Index into [UnlinkedUnit.references] for the type being referred to, or
|
| - * zero if this is a reference to a type parameter.
|
| - *
|
| - * Note that since zero is also a valid index into
|
| - * [UnlinkedUnit.references], we cannot distinguish between references to
|
| - * type parameters and references to types by checking [reference] against
|
| - * zero. To distinguish between references to type parameters and references
|
| - * to types, check whether [paramReference] is zero.
|
| - */
|
| - int reference;
|
| -
|
| - /**
|
| - * If this is a reference to a type parameter, one-based index into the list
|
| - * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De
|
| - * Bruijn index conventions; that is, innermost parameters come first, and
|
| - * if a class or method has multiple parameters, they are indexed from right
|
| - * to left. So for instance, if the enclosing declaration is
|
| - *
|
| - * class C<T,U> {
|
| - * m<V,W> {
|
| - * ...
|
| - * }
|
| - * }
|
| - *
|
| - * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T,
|
| - * respectively.
|
| - *
|
| - * If the type being referred to is not a type parameter, [paramReference] is
|
| - * zero.
|
| - */
|
| - int paramReference;
|
| -
|
| - /**
|
| - * If this is an instantiation of a generic type, the type arguments used to
|
| - * instantiate it. Trailing type arguments of type `dynamic` are omitted.
|
| - */
|
| - List<UnlinkedTypeRef> typeArguments;
|
| + TypeRef bound;
|
| }
|
|
|
| /**
|
| @@ -1345,7 +1345,7 @@ class UnlinkedVariable {
|
| * Declared type of the variable. Note that when strong mode is enabled, the
|
| * actual type of the variable may be different due to type inference.
|
| */
|
| - UnlinkedTypeRef type;
|
| + TypeRef type;
|
|
|
| /**
|
| * If [isConst] is true, and the variable has an initializer, the constant
|
|
|