Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: pkg/analyzer/lib/src/summary/idl.dart

Issue 1681733002: Sort members in idl.dart. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/idl.dart
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index c7b82f3fe0a9ae26b187c05a62c3360049090100..6ec0dedb8bc4b1a0d1b6eac4a0a34f29209bc063 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -76,19 +76,28 @@ const topLevel = null;
*/
abstract class EntityRef extends base.SummaryClass {
/**
- * If this [EntityRef] is contained within [LinkedUnit.types], slot id (which
- * is unique within the compilation unit) identifying the target of type
- * propagation or type inference with which this [EntityRef] is associated.
+ * If this is a reference to a function type implicitly defined by a
+ * function-typed parameter, a list of zero-based indices indicating the path
+ * from the entity referred to by [reference] to the appropriate type
+ * parameter. Otherwise the empty list.
*
- * Otherwise zero.
- */
- int get slot;
-
- /**
- * Index into [UnlinkedUnit.references] for the entity being referred to, or
- * zero if this is a reference to a type parameter.
+ * If there are N indices in this list, then the entity being referred to is
+ * the function type implicitly defined by a function-typed parameter of a
+ * function-typed parameter, to N levels of nesting. The first index in the
+ * list refers to the outermost level of nesting; for example if [reference]
+ * refers to the entity defined by:
+ *
+ * void f(x, void g(y, z, int h(String w))) { ... }
+ *
+ * Then to refer to the function type implicitly defined by parameter `h`
+ * (which is parameter 2 of parameter 1 of `f`), then
+ * [implicitFunctionTypeIndices] should be [1, 2].
+ *
+ * Note that if the entity being referred to is a generic method inside a
+ * generic class, then the type arguments in [typeArguments] are applied
+ * first to the class and then to the method.
*/
- int get reference;
+ List<int> get implicitFunctionTypeIndices;
/**
* If this is a reference to a type parameter, one-based index into the list
@@ -112,28 +121,19 @@ abstract class EntityRef extends base.SummaryClass {
int get paramReference;
/**
- * If this is a reference to a function type implicitly defined by a
- * function-typed parameter, a list of zero-based indices indicating the path
- * from the entity referred to by [reference] to the appropriate type
- * parameter. Otherwise the empty list.
- *
- * If there are N indices in this list, then the entity being referred to is
- * the function type implicitly defined by a function-typed parameter of a
- * function-typed parameter, to N levels of nesting. The first index in the
- * list refers to the outermost level of nesting; for example if [reference]
- * refers to the entity defined by:
- *
- * void f(x, void g(y, z, int h(String w))) { ... }
- *
- * Then to refer to the function type implicitly defined by parameter `h`
- * (which is parameter 2 of parameter 1 of `f`), then
- * [implicitFunctionTypeIndices] should be [1, 2].
+ * Index into [UnlinkedUnit.references] for the entity being referred to, or
+ * zero if this is a reference to a type parameter.
+ */
+ int get reference;
+
+ /**
+ * If this [EntityRef] is contained within [LinkedUnit.types], slot id (which
+ * is unique within the compilation unit) identifying the target of type
+ * propagation or type inference with which this [EntityRef] is associated.
*
- * Note that if the entity being referred to is a generic method inside a
- * generic class, then the type arguments in [typeArguments] are applied
- * first to the class and then to the method.
+ * Otherwise zero.
*/
- List<int> get implicitFunctionTypeIndices;
+ int get slot;
/**
* If this is an instantiation of a generic type or generic executable, the
@@ -149,6 +149,12 @@ abstract class EntityRef extends base.SummaryClass {
*/
abstract class LinkedDependency extends base.SummaryClass {
/**
+ * URI for the compilation units listed in the library's `part` declarations.
+ * These URIs are relative to the importing library.
+ */
+ List<String> get parts;
+
+ /**
* The relative URI of the dependent library. This URI is relative to the
* importing library, even if there are intervening `export` declarations.
* So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports
@@ -156,12 +162,6 @@ abstract class LinkedDependency extends base.SummaryClass {
* `b/d/e.dart`.
*/
String get uri;
-
- /**
- * URI for the compilation units listed in the library's `part` declarations.
- * These URIs are relative to the importing library.
- */
- List<String> get parts;
}
/**
@@ -170,29 +170,29 @@ abstract class LinkedDependency extends base.SummaryClass {
*/
abstract class LinkedExportName extends base.SummaryClass {
/**
- * Name of the exported entity. For an exported setter, this name includes
- * the trailing '='.
- */
- String get name;
-
- /**
* Index into [LinkedLibrary.dependencies] for the library in which the
* entity is defined.
*/
int get dependency;
/**
+ * The kind of the entity being referred to.
+ */
+ ReferenceKind get kind;
+
+ /**
+ * Name of the exported entity. For an exported setter, this name includes
+ * the trailing '='.
+ */
+ String get name;
+
+ /**
* Integer index indicating which unit in the exported library contains the
* definition of the entity. As with indices into [LinkedLibrary.units],
* zero represents the defining compilation unit, and nonzero values
* represent parts in the order of the corresponding `part` declarations.
*/
int get unit;
-
- /**
- * The kind of the entity being referred to.
- */
- ReferenceKind get kind;
}
/**
@@ -204,14 +204,6 @@ abstract class LinkedLibrary extends base.SummaryClass {
generated.readLinkedLibrary(buffer);
/**
- * The linked summary of all the compilation units constituting the
- * library. The summary of the defining compilation unit is listed first,
- * followed by the summary of each part, in the order of the `part`
- * declarations in the defining compilation unit.
- */
- List<LinkedUnit> get units;
-
- /**
* The libraries that this library depends on (either via an explicit import
* statement or via the implicit dependencies on `dart:core` and
* `dart:async`). The first element of this array is a pseudo-dependency
@@ -230,12 +222,6 @@ abstract class LinkedLibrary extends base.SummaryClass {
List<LinkedDependency> get dependencies;
/**
- * For each import in [UnlinkedUnit.imports], an index into [dependencies]
- * of the library being imported.
- */
- List<int> get importDependencies;
-
- /**
* Information about entities in the export namespace of the library that are
* not in the public namespace of the library (that is, entities that are
* brought into the namespace via `export` directives).
@@ -245,11 +231,25 @@ abstract class LinkedLibrary extends base.SummaryClass {
List<LinkedExportName> get exportNames;
/**
+ * For each import in [UnlinkedUnit.imports], an index into [dependencies]
+ * of the library being imported.
+ */
+ List<int> get importDependencies;
+
+ /**
* The number of elements in [dependencies] which are not "linked"
* dependencies (that is, the number of libraries in the direct imports plus
* the transitive closure of exports, plus the library itself).
*/
int get numPrelinkedDependencies;
+
+ /**
+ * The linked summary of all the compilation units constituting the
+ * library. The summary of the defining compilation unit is listed first,
+ * followed by the summary of each part, in the order of the `part`
+ * declarations in the defining compilation unit.
+ */
+ List<LinkedUnit> get units;
}
/**
@@ -257,6 +257,19 @@ abstract class LinkedLibrary extends base.SummaryClass {
*/
abstract class LinkedReference extends base.SummaryClass {
/**
+ * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
+ * and the entity being referred to is contained within another entity, index
+ * of the containing entity. This behaves similarly to
+ * [UnlinkedReference.prefixReference], however it is only used for class
+ * members, not for prefixed imports.
+ *
+ * Containing references must always point backward; that is, for all i, if
+ * LinkedUnit.references[i].containingReference != 0, then
+ * LinkedUnit.references[i].containingReference < i.
+ */
+ int get containingReference;
+
+ /**
* Index into [LinkedLibrary.dependencies] indicating which imported library
* declares the entity being referred to.
*
@@ -272,15 +285,11 @@ abstract class LinkedReference extends base.SummaryClass {
ReferenceKind get kind;
/**
- * Integer index indicating which unit in the imported library contains the
- * definition of the entity. As with indices into [LinkedLibrary.units],
- * zero represents the defining compilation unit, and nonzero values
- * represent parts in the order of the corresponding `part` declarations.
- *
- * Zero if this entity is contained within another entity (e.g. a class
- * member).
+ * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
+ * name of the entity being referred to. For the pseudo-type `dynamic`, the
+ * string is "dynamic". For the pseudo-type `void`, the string is "void".
*/
- int get unit;
+ String get name;
/**
* If the entity being referred to is generic, the number of type parameters
@@ -289,24 +298,15 @@ abstract class LinkedReference extends base.SummaryClass {
int get numTypeParameters;
/**
- * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
- * name of the entity being referred to. For the pseudo-type `dynamic`, the
- * string is "dynamic". For the pseudo-type `void`, the string is "void".
- */
- String get name;
-
- /**
- * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
- * and the entity being referred to is contained within another entity, index
- * of the containing entity. This behaves similarly to
- * [UnlinkedReference.prefixReference], however it is only used for class
- * members, not for prefixed imports.
+ * Integer index indicating which unit in the imported library contains the
+ * definition of the entity. As with indices into [LinkedLibrary.units],
+ * zero represents the defining compilation unit, and nonzero values
+ * represent parts in the order of the corresponding `part` declarations.
*
- * Containing references must always point backward; that is, for all i, if
- * LinkedUnit.references[i].containingReference != 0, then
- * LinkedUnit.references[i].containingReference < i.
+ * Zero if this entity is contained within another entity (e.g. a class
+ * member).
*/
- int get containingReference;
+ int get unit;
}
/**
@@ -397,24 +397,24 @@ abstract class SdkBundle extends base.SummaryClass {
generated.readSdkBundle(buffer);
/**
- * The list of URIs of items in [linkedLibraries], e.g. `dart:core`.
- */
- List<String> get linkedLibraryUris;
-
- /**
* Linked libraries.
*/
List<LinkedLibrary> get linkedLibraries;
/**
- * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`.
+ * The list of URIs of items in [linkedLibraries], e.g. `dart:core`.
*/
- List<String> get unlinkedUnitUris;
+ List<String> get linkedLibraryUris;
/**
* Unlinked information for the compilation units constituting the SDK.
*/
List<UnlinkedUnit> get unlinkedUnits;
+
+ /**
+ * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`.
+ */
+ List<String> get unlinkedUnitUris;
}
/**
@@ -422,15 +422,9 @@ abstract class SdkBundle extends base.SummaryClass {
*/
abstract class UnlinkedClass extends base.SummaryClass {
/**
- * Name of the class.
- */
- String get name;
-
- /**
- * Offset of the class name relative to the beginning of the file.
+ * Annotations for this class.
*/
- @informative
- int get nameOffset;
+ List<UnlinkedConst> get annotations;
/**
* Documentation comment for the class, or `null` if there is no
@@ -440,57 +434,63 @@ abstract class UnlinkedClass extends base.SummaryClass {
UnlinkedDocumentationComment get documentationComment;
/**
- * Annotations for this class.
+ * Executable objects (methods, getters, and setters) contained in the class.
*/
- List<UnlinkedConst> get annotations;
+ List<UnlinkedExecutable> get executables;
/**
- * Type parameters of the class, if any.
+ * Field declarations contained in the class.
*/
- List<UnlinkedTypeParam> get typeParameters;
+ List<UnlinkedVariable> get fields;
/**
- * Supertype of the class, or `null` if either (a) the class doesn't
- * explicitly declare a supertype (and hence has supertype `Object`), or (b)
- * the class *is* `Object` (and hence has no supertype).
+ * Indicates whether this class is the core "Object" class (and hence has no
+ * supertype)
*/
- EntityRef get supertype;
+ bool get hasNoSupertype;
/**
- * Mixins appearing in a `with` clause, if any.
+ * Interfaces appearing in an `implements` clause, if any.
*/
- List<EntityRef> get mixins;
+ List<EntityRef> get interfaces;
/**
- * Interfaces appearing in an `implements` clause, if any.
+ * Indicates whether the class is declared with the `abstract` keyword.
*/
- List<EntityRef> get interfaces;
+ bool get isAbstract;
/**
- * Field declarations contained in the class.
+ * Indicates whether the class is declared using mixin application syntax.
*/
- List<UnlinkedVariable> get fields;
+ bool get isMixinApplication;
/**
- * Executable objects (methods, getters, and setters) contained in the class.
+ * Mixins appearing in a `with` clause, if any.
*/
- List<UnlinkedExecutable> get executables;
+ List<EntityRef> get mixins;
/**
- * Indicates whether the class is declared with the `abstract` keyword.
+ * Name of the class.
*/
- bool get isAbstract;
+ String get name;
/**
- * Indicates whether the class is declared using mixin application syntax.
+ * Offset of the class name relative to the beginning of the file.
*/
- bool get isMixinApplication;
+ @informative
+ int get nameOffset;
/**
- * Indicates whether this class is the core "Object" class (and hence has no
- * supertype)
+ * Supertype of the class, or `null` if either (a) the class doesn't
+ * explicitly declare a supertype (and hence has supertype `Object`), or (b)
+ * the class *is* `Object` (and hence has no supertype).
*/
- bool get hasNoSupertype;
+ EntityRef get supertype;
+
+ /**
+ * Type parameters of the class, if any.
+ */
+ List<UnlinkedTypeParam> get typeParameters;
}
/**
@@ -499,14 +499,14 @@ abstract class UnlinkedClass extends base.SummaryClass {
*/
abstract class UnlinkedCombinator extends base.SummaryClass {
/**
- * List of names which are shown. Empty if this is a `hide` combinator.
+ * List of names which are hidden. Empty if this is a `show` combinator.
*/
- List<String> get shows;
+ List<String> get hides;
/**
- * List of names which are hidden. Empty if this is a `show` combinator.
+ * List of names which are shown. Empty if this is a `hide` combinator.
*/
- List<String> get hides;
+ List<String> get shows;
}
/**
@@ -521,16 +521,9 @@ abstract class UnlinkedCombinator extends base.SummaryClass {
*/
abstract class UnlinkedConst extends base.SummaryClass {
/**
- * Indicates whether the expression is not a valid potentially constant
- * expression.
- */
- bool get isInvalid;
-
- /**
- * Sequence of operations to execute (starting with an empty stack) to form
- * the constant value.
+ * Sequence of 64-bit doubles consumed by the operation `pushDouble`.
*/
- List<UnlinkedConstOperation> get operations;
+ List<double> get doubles;
/**
* Sequence of unsigned 32-bit integers consumed by the operations
@@ -540,15 +533,16 @@ abstract class UnlinkedConst extends base.SummaryClass {
List<int> get ints;
/**
- * Sequence of 64-bit doubles consumed by the operation `pushDouble`.
+ * Indicates whether the expression is not a valid potentially constant
+ * expression.
*/
- List<double> get doubles;
+ bool get isInvalid;
/**
- * Sequence of strings consumed by the operations `pushString` and
- * `invokeConstructor`.
+ * Sequence of operations to execute (starting with an empty stack) to form
+ * the constant value.
*/
- List<String> get strings;
+ List<UnlinkedConstOperation> get operations;
/**
* Sequence of language constructs consumed by the operations
@@ -557,6 +551,12 @@ abstract class UnlinkedConst extends base.SummaryClass {
* actual entity being referred to may be something other than a type.
*/
List<EntityRef> get references;
+
+ /**
+ * Sequence of strings consumed by the operations `pushString` and
+ * `invokeConstructor`.
+ */
+ List<String> get strings;
}
/**
@@ -854,6 +854,18 @@ enum UnlinkedConstOperation {
*/
abstract class UnlinkedConstructorInitializer extends base.SummaryClass {
/**
+ * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the
+ * invocation. Otherwise empty.
+ */
+ List<UnlinkedConst> get arguments;
+
+ /**
+ * If [kind] is `field`, the expression of the field initializer.
+ * Otherwise `null`.
+ */
+ UnlinkedConst get expression;
+
+ /**
* The kind of the constructor initializer (field, redirect, super).
*/
UnlinkedConstructorInitializerKind get kind;
@@ -865,18 +877,6 @@ abstract class UnlinkedConstructorInitializer extends base.SummaryClass {
* constructor, declared in the superclass, to invoke.
*/
String get name;
-
- /**
- * If [kind] is `field`, the expression of the field initializer.
- * Otherwise `null`.
- */
- UnlinkedConst get expression;
-
- /**
- * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the
- * invocation. Otherwise empty.
- */
- List<UnlinkedConst> get arguments;
}
/**
@@ -904,12 +904,9 @@ enum UnlinkedConstructorInitializerKind {
*/
abstract class UnlinkedDocumentationComment extends base.SummaryClass {
/**
- * Text of the documentation comment, with '\r\n' replaced by '\n'.
- *
- * References appearing within the doc comment in square brackets are not
- * specially encoded.
+ * Length of the documentation comment (prior to replacing '\r\n' with '\n').
*/
- String get text;
+ int get length;
/**
* Offset of the beginning of the documentation comment relative to the
@@ -918,9 +915,12 @@ abstract class UnlinkedDocumentationComment extends base.SummaryClass {
int get offset;
/**
- * Length of the documentation comment (prior to replacing '\r\n' with '\n').
+ * Text of the documentation comment, with '\r\n' replaced by '\n'.
+ *
+ * References appearing within the doc comment in square brackets are not
+ * specially encoded.
*/
- int get length;
+ String get text;
}
/**
@@ -928,15 +928,9 @@ abstract class UnlinkedDocumentationComment extends base.SummaryClass {
*/
abstract class UnlinkedEnum extends base.SummaryClass {
/**
- * Name of the enum type.
- */
- String get name;
-
- /**
- * Offset of the enum name relative to the beginning of the file.
+ * Annotations for this enum.
*/
- @informative
- int get nameOffset;
+ List<UnlinkedConst> get annotations;
/**
* Documentation comment for the enum, or `null` if there is no documentation
@@ -946,9 +940,15 @@ abstract class UnlinkedEnum extends base.SummaryClass {
UnlinkedDocumentationComment get documentationComment;
/**
- * Annotations for this enum.
+ * Name of the enum type.
*/
- List<UnlinkedConst> get annotations;
+ String get name;
+
+ /**
+ * Offset of the enum name relative to the beginning of the file.
+ */
+ @informative
+ int get nameOffset;
/**
* Values listed in the enum declaration, in declaration order.
@@ -962,6 +962,13 @@ abstract class UnlinkedEnum extends base.SummaryClass {
*/
abstract class UnlinkedEnumValue extends base.SummaryClass {
/**
+ * Documentation comment for the enum value, or `null` if there is no
+ * documentation comment.
+ */
+ @informative
+ UnlinkedDocumentationComment get documentationComment;
+
+ /**
* Name of the enumerated value.
*/
String get name;
@@ -971,13 +978,6 @@ abstract class UnlinkedEnumValue extends base.SummaryClass {
*/
@informative
int get nameOffset;
-
- /**
- * Documentation comment for the enum value, or `null` if there is no
- * documentation comment.
- */
- @informative
- UnlinkedDocumentationComment get documentationComment;
}
/**
@@ -986,20 +986,15 @@ abstract class UnlinkedEnumValue extends base.SummaryClass {
*/
abstract class UnlinkedExecutable extends base.SummaryClass {
/**
- * Name of the executable. For setters, this includes the trailing "=". For
- * named constructors, this excludes the class name and excludes the ".".
- * For unnamed constructors, this is the empty string.
+ * Annotations for this executable.
*/
- String get name;
+ List<UnlinkedConst> get annotations;
/**
- * Offset of the executable name relative to the beginning of the file. For
- * named constructors, this excludes the class name and excludes the ".".
- * For unnamed constructors, this is the offset of the class name (i.e. the
- * offset of the second "C" in "class C { C(); }").
+ * If a constant [UnlinkedExecutableKind.constructor], the constructor
+ * initializers. Otherwise empty.
*/
- @informative
- int get nameOffset;
+ List<UnlinkedConstructorInitializer> get constantInitializers;
/**
* Documentation comment for the executable, or `null` if there is no
@@ -1009,39 +1004,33 @@ abstract class UnlinkedExecutable extends base.SummaryClass {
UnlinkedDocumentationComment get documentationComment;
/**
- * Annotations for this executable.
- */
- List<UnlinkedConst> get annotations;
-
- /**
- * Type parameters of the executable, if any. Empty if support for generic
- * method syntax is disabled.
+ * If this executable's return type is inferable, nonzero slot id
+ * identifying which entry in [LinkedUnit.types] contains the inferred
+ * return type. If there is no matching entry in [LinkedUnit.types], then
+ * no return type was inferred for this variable, so its static type is
+ * `dynamic`.
*/
- List<UnlinkedTypeParam> get typeParameters;
+ int get inferredReturnTypeSlot;
/**
- * Declared return type of the executable. Absent if the executable is a
- * constructor or the return type is implicit.
+ * Indicates whether the executable is declared using the `abstract` keyword.
*/
- EntityRef get returnType;
+ bool get isAbstract;
/**
- * Parameters of the executable, if any. Note that getters have no
- * parameters (hence this will be the empty list), and setters have a single
- * parameter.
+ * Indicates whether the executable is declared using the `const` keyword.
*/
- List<UnlinkedParam> get parameters;
+ bool get isConst;
/**
- * The kind of the executable (function/method, getter, setter, or
- * constructor).
+ * Indicates whether the executable is declared using the `external` keyword.
*/
- UnlinkedExecutableKind get kind;
+ bool get isExternal;
/**
- * Indicates whether the executable is declared using the `abstract` keyword.
+ * Indicates whether the executable is declared using the `factory` keyword.
*/
- bool get isAbstract;
+ bool get isFactory;
/**
* Indicates whether the executable is declared using the `static` keyword.
@@ -1053,34 +1042,45 @@ abstract class UnlinkedExecutable extends base.SummaryClass {
bool get isStatic;
/**
- * Indicates whether the executable is declared using the `const` keyword.
+ * The kind of the executable (function/method, getter, setter, or
+ * constructor).
*/
- bool get isConst;
+ UnlinkedExecutableKind get kind;
/**
- * Indicates whether the executable is declared using the `factory` keyword.
+ * Name of the executable. For setters, this includes the trailing "=". For
+ * named constructors, this excludes the class name and excludes the ".".
+ * For unnamed constructors, this is the empty string.
*/
- bool get isFactory;
+ String get name;
/**
- * Indicates whether the executable is declared using the `external` keyword.
+ * Offset of the executable name relative to the beginning of the file. For
+ * named constructors, this excludes the class name and excludes the ".".
+ * For unnamed constructors, this is the offset of the class name (i.e. the
+ * offset of the second "C" in "class C { C(); }").
*/
- bool get isExternal;
+ @informative
+ int get nameOffset;
/**
- * If this executable's return type is inferable, nonzero slot id
- * identifying which entry in [LinkedUnit.types] contains the inferred
- * return type. If there is no matching entry in [LinkedUnit.types], then
- * no return type was inferred for this variable, so its static type is
- * `dynamic`.
+ * Parameters of the executable, if any. Note that getters have no
+ * parameters (hence this will be the empty list), and setters have a single
+ * parameter.
*/
- int get inferredReturnTypeSlot;
+ List<UnlinkedParam> get parameters;
/**
- * If a constant [UnlinkedExecutableKind.constructor], the constructor
- * initializers. Otherwise empty.
+ * Declared return type of the executable. Absent if the executable is a
+ * constructor or the return type is implicit.
*/
- List<UnlinkedConstructorInitializer> get constantInitializers;
+ EntityRef get returnType;
+
+ /**
+ * Type parameters of the executable, if any. Empty if support for generic
+ * method syntax is disabled.
+ */
+ List<UnlinkedTypeParam> get typeParameters;
}
/**
@@ -1114,17 +1114,15 @@ enum UnlinkedExecutableKind {
*/
abstract class UnlinkedExportNonPublic extends base.SummaryClass {
/**
- * Offset of the "export" keyword.
+ * Annotations for this export directive.
*/
- @informative
- int get offset;
+ List<UnlinkedConst> get annotations;
/**
- * Offset of the URI string (including quotes) relative to the beginning of
- * the file.
+ * Offset of the "export" keyword.
*/
@informative
- int get uriOffset;
+ int get offset;
/**
* End of the URI string (including quotes) relative to the beginning of the
@@ -1134,9 +1132,11 @@ abstract class UnlinkedExportNonPublic extends base.SummaryClass {
int get uriEnd;
/**
- * Annotations for this export directive.
+ * Offset of the URI string (including quotes) relative to the beginning of
+ * the file.
*/
- List<UnlinkedConst> get annotations;
+ @informative
+ int get uriOffset;
}
/**
@@ -1145,14 +1145,14 @@ abstract class UnlinkedExportNonPublic extends base.SummaryClass {
*/
abstract class UnlinkedExportPublic extends base.SummaryClass {
/**
- * URI used in the source code to reference the exported library.
+ * Combinators contained in this import declaration.
*/
- String get uri;
+ List<UnlinkedCombinator> get combinators;
/**
- * Combinators contained in this import declaration.
+ * URI used in the source code to reference the exported library.
*/
- List<UnlinkedCombinator> get combinators;
+ String get uri;
}
/**
@@ -1160,9 +1160,24 @@ abstract class UnlinkedExportPublic extends base.SummaryClass {
*/
abstract class UnlinkedImport extends base.SummaryClass {
/**
- * URI used in the source code to reference the imported library.
+ * Annotations for this import declaration.
*/
- String get uri;
+ List<UnlinkedConst> get annotations;
+
+ /**
+ * Combinators contained in this import declaration.
+ */
+ List<UnlinkedCombinator> get combinators;
+
+ /**
+ * Indicates whether the import declaration uses the `deferred` keyword.
+ */
+ bool get isDeferred;
+
+ /**
+ * Indicates whether the import declaration is implicit.
+ */
+ bool get isImplicit;
/**
* If [isImplicit] is false, offset of the "import" keyword. If [isImplicit]
@@ -1172,9 +1187,11 @@ abstract class UnlinkedImport extends base.SummaryClass {
int get offset;
/**
- * Annotations for this import declaration.
+ * Offset of the prefix name relative to the beginning of the file, or zero
+ * if there is no prefix.
*/
- List<UnlinkedConst> get annotations;
+ @informative
+ int get prefixOffset;
/**
* Index into [UnlinkedUnit.references] of the prefix declared by this
@@ -1185,19 +1202,16 @@ abstract class UnlinkedImport extends base.SummaryClass {
int get prefixReference;
/**
- * Combinators contained in this import declaration.
- */
- List<UnlinkedCombinator> get combinators;
-
- /**
- * Indicates whether the import declaration uses the `deferred` keyword.
+ * URI used in the source code to reference the imported library.
*/
- bool get isDeferred;
+ String get uri;
/**
- * Indicates whether the import declaration is implicit.
+ * End of the URI string (including quotes) relative to the beginning of the
+ * file. If [isImplicit] is true, zero.
*/
- bool get isImplicit;
+ @informative
+ int get uriEnd;
/**
* Offset of the URI string (including quotes) relative to the beginning of
@@ -1205,53 +1219,47 @@ abstract class UnlinkedImport extends base.SummaryClass {
*/
@informative
int get uriOffset;
-
- /**
- * End of the URI string (including quotes) relative to the beginning of the
- * file. If [isImplicit] is true, zero.
- */
- @informative
- int get uriEnd;
-
- /**
- * Offset of the prefix name relative to the beginning of the file, or zero
- * if there is no prefix.
- */
- @informative
- int get prefixOffset;
-}
+}
/**
* Unlinked summary information about a function parameter.
*/
abstract class UnlinkedParam extends base.SummaryClass {
/**
- * Name of the parameter.
+ * Annotations for this parameter.
*/
- String get name;
+ List<UnlinkedConst> get annotations;
/**
- * Offset of the parameter name relative to the beginning of the file.
+ * If the parameter has a default value, the constant expression in the
+ * default value. Note that the presence of this expression does not mean
+ * that it is a valid, check [UnlinkedConst.isInvalid].
*/
- @informative
- int get nameOffset;
+ UnlinkedConst get defaultValue;
/**
- * Annotations for this parameter.
+ * If this parameter's type is inferable, nonzero slot id identifying which
+ * entry in [LinkedLibrary.types] contains the inferred type. If there is no
+ * matching entry in [LinkedLibrary.types], then no type was inferred for
+ * this variable, so its static type is `dynamic`.
+ *
+ * Note that although strong mode considers initializing formals to be
+ * inferable, they are not marked as such in the summary; if their type is
+ * not specified, they always inherit the static type of the corresponding
+ * field.
*/
- List<UnlinkedConst> get annotations;
+ int get inferredTypeSlot;
/**
- * If [isFunctionTyped] is `true`, the declared return type. If
- * [isFunctionTyped] is `false`, the declared type. Absent if the type is
- * implicit.
+ * Indicates whether this is a function-typed parameter.
*/
- EntityRef get type;
+ bool get isFunctionTyped;
/**
- * If [isFunctionTyped] is `true`, the parameters of the function type.
+ * Indicates whether this is an initializing formal parameter (i.e. it is
+ * declared using `this.` syntax).
*/
- List<UnlinkedParam> get parameters;
+ bool get isInitializingFormal;
/**
* Kind of the parameter.
@@ -1259,35 +1267,27 @@ abstract class UnlinkedParam extends base.SummaryClass {
UnlinkedParamKind get kind;
/**
- * Indicates whether this is a function-typed parameter.
+ * Name of the parameter.
*/
- bool get isFunctionTyped;
+ String get name;
/**
- * Indicates whether this is an initializing formal parameter (i.e. it is
- * declared using `this.` syntax).
+ * Offset of the parameter name relative to the beginning of the file.
*/
- bool get isInitializingFormal;
+ @informative
+ int get nameOffset;
/**
- * If this parameter's type is inferable, nonzero slot id identifying which
- * entry in [LinkedLibrary.types] contains the inferred type. If there is no
- * matching entry in [LinkedLibrary.types], then no type was inferred for
- * this variable, so its static type is `dynamic`.
- *
- * Note that although strong mode considers initializing formals to be
- * inferable, they are not marked as such in the summary; if their type is
- * not specified, they always inherit the static type of the corresponding
- * field.
+ * If [isFunctionTyped] is `true`, the parameters of the function type.
*/
- int get inferredTypeSlot;
+ List<UnlinkedParam> get parameters;
/**
- * If the parameter has a default value, the constant expression in the
- * default value. Note that the presence of this expression does not mean
- * that it is a valid, check [UnlinkedConst.isInvalid].
+ * If [isFunctionTyped] is `true`, the declared return type. If
+ * [isFunctionTyped] is `false`, the declared type. Absent if the type is
+ * implicit.
*/
- UnlinkedConst get defaultValue;
+ EntityRef get type;
}
/**
@@ -1315,11 +1315,9 @@ enum UnlinkedParamKind {
*/
abstract class UnlinkedPart extends base.SummaryClass {
/**
- * Offset of the URI string (including quotes) relative to the beginning of
- * the file.
+ * Annotations for this part declaration.
*/
- @informative
- int get uriOffset;
+ List<UnlinkedConst> get annotations;
/**
* End of the URI string (including quotes) relative to the beginning of the
@@ -1329,9 +1327,11 @@ abstract class UnlinkedPart extends base.SummaryClass {
int get uriEnd;
/**
- * Annotations for this part declaration.
+ * Offset of the URI string (including quotes) relative to the beginning of
+ * the file.
*/
- List<UnlinkedConst> get annotations;
+ @informative
+ int get uriOffset;
}
/**
@@ -1344,9 +1344,11 @@ abstract class UnlinkedPart extends base.SummaryClass {
*/
abstract class UnlinkedPublicName extends base.SummaryClass {
/**
- * The name itself.
+ * If this [UnlinkedPublicName] is a class, the list of members which can be
+ * referenced from constants - static constant fields, static methods, and
+ * constructors. Otherwise empty.
*/
- String get name;
+ List<UnlinkedPublicName> get constMembers;
/**
* The kind of object referred to by the name.
@@ -1354,17 +1356,15 @@ abstract class UnlinkedPublicName extends base.SummaryClass {
ReferenceKind get kind;
/**
- * If the entity being referred to is generic, the number of type parameters
- * it accepts. Otherwise zero.
+ * The name itself.
*/
- int get numTypeParameters;
+ String get name;
/**
- * If this [UnlinkedPublicName] is a class, the list of members which can be
- * referenced from constants - static constant fields, static methods, and
- * constructors. Otherwise empty.
+ * If the entity being referred to is generic, the number of type parameters
+ * it accepts. Otherwise zero.
*/
- List<UnlinkedPublicName> get constMembers;
+ int get numTypeParameters;
}
/**
@@ -1378,6 +1378,11 @@ abstract class UnlinkedPublicNamespace extends base.SummaryClass {
generated.readUnlinkedPublicNamespace(buffer);
/**
+ * Export declarations in the compilation unit.
+ */
+ List<UnlinkedExportPublic> get exports;
+
+ /**
* Public names defined in the compilation unit.
*
* TODO(paulberry): consider sorting these names to reduce unnecessary
@@ -1386,11 +1391,6 @@ abstract class UnlinkedPublicNamespace extends base.SummaryClass {
List<UnlinkedPublicName> get names;
/**
- * Export declarations in the compilation unit.
- */
- List<UnlinkedExportPublic> get exports;
-
- /**
* URIs referenced by part declarations in the compilation unit.
*/
List<String> get parts;
@@ -1423,15 +1423,9 @@ abstract class UnlinkedReference extends base.SummaryClass {
*/
abstract class UnlinkedTypedef extends base.SummaryClass {
/**
- * Name of the typedef.
- */
- String get name;
-
- /**
- * Offset of the typedef name relative to the beginning of the file.
+ * Annotations for this typedef.
*/
- @informative
- int get nameOffset;
+ List<UnlinkedConst> get annotations;
/**
* Documentation comment for the typedef, or `null` if there is no
@@ -1441,14 +1435,20 @@ abstract class UnlinkedTypedef extends base.SummaryClass {
UnlinkedDocumentationComment get documentationComment;
/**
- * Annotations for this typedef.
+ * Name of the typedef.
*/
- List<UnlinkedConst> get annotations;
+ String get name;
/**
- * Type parameters of the typedef, if any.
+ * Offset of the typedef name relative to the beginning of the file.
*/
- List<UnlinkedTypeParam> get typeParameters;
+ @informative
+ int get nameOffset;
+
+ /**
+ * Parameters of the executable, if any.
+ */
+ List<UnlinkedParam> get parameters;
/**
* Return type of the typedef.
@@ -1456,9 +1456,9 @@ abstract class UnlinkedTypedef extends base.SummaryClass {
EntityRef get returnType;
/**
- * Parameters of the executable, if any.
+ * Type parameters of the typedef, if any.
*/
- List<UnlinkedParam> get parameters;
+ List<UnlinkedTypeParam> get typeParameters;
}
/**
@@ -1466,26 +1466,26 @@ abstract class UnlinkedTypedef extends base.SummaryClass {
*/
abstract class UnlinkedTypeParam extends base.SummaryClass {
/**
- * Name of the type parameter.
+ * Annotations for this type parameter.
*/
- String get name;
+ List<UnlinkedConst> get annotations;
/**
- * Offset of the type parameter name relative to the beginning of the file.
+ * Bound of the type parameter, if a bound is explicitly declared. Otherwise
+ * null.
*/
- @informative
- int get nameOffset;
+ EntityRef get bound;
/**
- * Annotations for this type parameter.
+ * Name of the type parameter.
*/
- List<UnlinkedConst> get annotations;
+ String get name;
/**
- * Bound of the type parameter, if a bound is explicitly declared. Otherwise
- * null.
+ * Offset of the type parameter name relative to the beginning of the file.
*/
- EntityRef get bound;
+ @informative
+ int get nameOffset;
}
/**
@@ -1497,81 +1497,81 @@ abstract class UnlinkedUnit extends base.SummaryClass {
generated.readUnlinkedUnit(buffer);
/**
- * Name of the library (from a "library" declaration, if present).
+ * Classes declared in the compilation unit.
*/
- String get libraryName;
+ List<UnlinkedClass> get classes;
/**
- * Offset of the library name relative to the beginning of the file (or 0 if
- * the library has no name).
+ * Enums declared in the compilation unit.
*/
- @informative
- int get libraryNameOffset;
+ List<UnlinkedEnum> get enums;
/**
- * Length of the library name as it appears in the source code (or 0 if the
- * library has no name).
+ * Top level executable objects (functions, getters, and setters) declared in
+ * the compilation unit.
*/
- @informative
- int get libraryNameLength;
+ List<UnlinkedExecutable> get executables;
/**
- * Documentation comment for the library, or `null` if there is no
- * documentation comment.
+ * Export declarations in the compilation unit.
*/
- @informative
- UnlinkedDocumentationComment get libraryDocumentationComment;
+ List<UnlinkedExportNonPublic> get exports;
/**
- * Annotations for the library declaration, or the empty list if there is no
- * library declaration.
+ * Import declarations in the compilation unit.
*/
- List<UnlinkedConst> get libraryAnnotations;
+ List<UnlinkedImport> get imports;
/**
- * Unlinked public namespace of this compilation unit.
+ * Annotations for the library declaration, or the empty list if there is no
+ * library declaration.
*/
- UnlinkedPublicNamespace get publicNamespace;
+ List<UnlinkedConst> get libraryAnnotations;
/**
- * Top level and prefixed names referred to by this compilation unit. The
- * zeroth element of this array is always populated and is used to represent
- * the absence of a reference in places where a reference is optional (for
- * example [UnlinkedReference.prefixReference or
- * UnlinkedImport.prefixReference]).
+ * Documentation comment for the library, or `null` if there is no
+ * documentation comment.
*/
- List<UnlinkedReference> get references;
+ @informative
+ UnlinkedDocumentationComment get libraryDocumentationComment;
/**
- * Classes declared in the compilation unit.
+ * Name of the library (from a "library" declaration, if present).
*/
- List<UnlinkedClass> get classes;
+ String get libraryName;
/**
- * Enums declared in the compilation unit.
+ * Length of the library name as it appears in the source code (or 0 if the
+ * library has no name).
*/
- List<UnlinkedEnum> get enums;
+ @informative
+ int get libraryNameLength;
/**
- * Top level executable objects (functions, getters, and setters) declared in
- * the compilation unit.
+ * Offset of the library name relative to the beginning of the file (or 0 if
+ * the library has no name).
*/
- List<UnlinkedExecutable> get executables;
+ @informative
+ int get libraryNameOffset;
/**
- * Export declarations in the compilation unit.
+ * Part declarations in the compilation unit.
*/
- List<UnlinkedExportNonPublic> get exports;
+ List<UnlinkedPart> get parts;
/**
- * Import declarations in the compilation unit.
+ * Unlinked public namespace of this compilation unit.
*/
- List<UnlinkedImport> get imports;
+ UnlinkedPublicNamespace get publicNamespace;
/**
- * Part declarations in the compilation unit.
+ * Top level and prefixed names referred to by this compilation unit. The
+ * zeroth element of this array is always populated and is used to represent
+ * the absence of a reference in places where a reference is optional (for
+ * example [UnlinkedReference.prefixReference or
+ * UnlinkedImport.prefixReference]).
*/
- List<UnlinkedPart> get parts;
+ List<UnlinkedReference> get references;
/**
* Typedefs declared in the compilation unit.
@@ -1590,15 +1590,16 @@ abstract class UnlinkedUnit extends base.SummaryClass {
*/
abstract class UnlinkedVariable extends base.SummaryClass {
/**
- * Name of the variable.
+ * Annotations for this variable.
*/
- String get name;
+ List<UnlinkedConst> get annotations;
/**
- * Offset of the variable name relative to the beginning of the file.
+ * If [isConst] is true, and the variable has an initializer, the constant
+ * expression in the initializer. Note that the presence of this expression
+ * does not mean that it is a valid, check [UnlinkedConst.isInvalid].
*/
- @informative
- int get nameOffset;
+ UnlinkedConst get constExpr;
/**
* Documentation comment for the variable, or `null` if there is no
@@ -1608,21 +1609,22 @@ abstract class UnlinkedVariable extends base.SummaryClass {
UnlinkedDocumentationComment get documentationComment;
/**
- * Annotations for this variable.
+ * If this variable is inferable, nonzero slot id identifying which entry in
+ * [LinkedLibrary.types] contains the inferred type for this variable. If
+ * there is no matching entry in [LinkedLibrary.types], then no type was
+ * inferred for this variable, so its static type is `dynamic`.
*/
- List<UnlinkedConst> get annotations;
+ int get inferredTypeSlot;
/**
- * Declared type of the variable. Absent if the type is implicit.
+ * Indicates whether the variable is declared using the `const` keyword.
*/
- EntityRef get type;
+ bool get isConst;
/**
- * If [isConst] is true, and the variable has an initializer, the constant
- * expression in the initializer. Note that the presence of this expression
- * does not mean that it is a valid, check [UnlinkedConst.isInvalid].
+ * Indicates whether the variable is declared using the `final` keyword.
*/
- UnlinkedConst get constExpr;
+ bool get isFinal;
/**
* Indicates whether the variable is declared using the `static` keyword.
@@ -1634,14 +1636,15 @@ abstract class UnlinkedVariable extends base.SummaryClass {
bool get isStatic;
/**
- * Indicates whether the variable is declared using the `final` keyword.
+ * Name of the variable.
*/
- bool get isFinal;
+ String get name;
/**
- * Indicates whether the variable is declared using the `const` keyword.
+ * Offset of the variable name relative to the beginning of the file.
*/
- bool get isConst;
+ @informative
+ int get nameOffset;
/**
* If this variable is propagable, nonzero slot id identifying which entry in
@@ -1654,10 +1657,7 @@ abstract class UnlinkedVariable extends base.SummaryClass {
int get propagatedTypeSlot;
/**
- * If this variable is inferable, nonzero slot id identifying which entry in
- * [LinkedLibrary.types] contains the inferred type for this variable. If
- * there is no matching entry in [LinkedLibrary.types], then no type was
- * inferred for this variable, so its static type is `dynamic`.
+ * Declared type of the variable. Absent if the type is implicit.
*/
- int get inferredTypeSlot;
+ EntityRef get type;
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698