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 a777ae22db06dccb9f486b6beec78b381d22a7c4..b8d4213504aa3ccb8836c5f76f6449bc28abbc81 100644 |
--- a/pkg/analyzer/lib/src/summary/idl.dart |
+++ b/pkg/analyzer/lib/src/summary/idl.dart |
@@ -53,6 +53,23 @@ import 'format.dart' as generated; |
const informative = null; |
/** |
+ * Information about an element code range. |
+ */ |
+abstract class CodeRange extends base.SummaryClass { |
+ /** |
+ * Length of the element code. |
+ */ |
+ @Id(1) |
+ int get length; |
+ |
+ /** |
+ * Offset of the element code relative to the beginning of the file. |
+ */ |
+ @Id(0) |
+ int get offset; |
+} |
+ |
+/** |
* Summary information about a reference to a an entity such as a type, top |
* level executable, or executable within a class. |
*/ |
@@ -429,6 +446,13 @@ abstract class LinkedReference extends base.SummaryClass { |
*/ |
abstract class LinkedUnit extends base.SummaryClass { |
/** |
+ * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) |
+ * corresponding to const constructors that are part of cycles. |
+ */ |
+ @Id(2) |
+ List<int> get constCycles; |
+ |
+ /** |
* Information about the resolution of references within the compilation |
* unit. Each element of [UnlinkedUnit.references] has a corresponding |
* element in this list (at the same index). If this list has additional |
@@ -445,13 +469,6 @@ abstract class LinkedUnit extends base.SummaryClass { |
*/ |
@Id(1) |
List<EntityRef> get types; |
- |
- /** |
- * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) |
- * corresponding to const constructors that are part of cycles. |
- */ |
- @Id(2) |
- List<int> get constCycles; |
} |
/** |
@@ -738,6 +755,12 @@ abstract class UnlinkedClass extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Code range of the class. |
+ */ |
+ @Id(13) |
+ CodeRange get codeRange; |
+ |
+ /** |
* Documentation comment for the class, or `null` if there is no |
* documentation comment. |
*/ |
@@ -1288,6 +1311,12 @@ abstract class UnlinkedEnum extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Code range of the enum. |
+ */ |
+ @Id(5) |
+ CodeRange get codeRange; |
+ |
+ /** |
* Documentation comment for the enum, or `null` if there is no documentation |
* comment. |
*/ |
@@ -1354,6 +1383,12 @@ abstract class UnlinkedExecutable extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Code range of the executable. |
+ */ |
+ @Id(26) |
+ CodeRange get codeRange; |
+ |
+ /** |
* If a constant [UnlinkedExecutableKind.constructor], the constructor |
* initializers. Otherwise empty. |
*/ |
@@ -1361,6 +1396,17 @@ abstract class UnlinkedExecutable extends base.SummaryClass { |
List<UnlinkedConstructorInitializer> get constantInitializers; |
/** |
+ * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, |
+ * a nonzero slot id which is unique within this compilation unit. If this id |
+ * is found in [LinkedUnit.constCycles], then this constructor is part of a |
+ * cycle. |
+ * |
+ * Otherwise, zero. |
+ */ |
+ @Id(25) |
+ int get constCycleSlot; |
+ |
+ /** |
* Documentation comment for the executable, or `null` if there is no |
* documentation comment. |
*/ |
@@ -1528,17 +1574,6 @@ abstract class UnlinkedExecutable extends base.SummaryClass { |
*/ |
@Id(21) |
int get visibleOffset; |
- |
- /** |
- * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, |
- * a nonzero slot id which is unique within this compilation unit. If this id |
- * is found in [LinkedUnit.constCycles], then this constructor is part of a |
- * cycle. |
- * |
- * Otherwise, zero. |
- */ |
- @Id(25) |
- int get constCycleSlot; |
} |
/** |
@@ -1737,6 +1772,12 @@ abstract class UnlinkedParam extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Code range of the parameter. |
+ */ |
+ @Id(14) |
+ CodeRange get codeRange; |
+ |
+ /** |
* 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]. |
@@ -1987,6 +2028,12 @@ abstract class UnlinkedTypedef extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Code range of the typedef. |
+ */ |
+ @Id(7) |
+ CodeRange get codeRange; |
+ |
+ /** |
* Documentation comment for the typedef, or `null` if there is no |
* documentation comment. |
*/ |
@@ -2044,6 +2091,12 @@ abstract class UnlinkedTypeParam extends base.SummaryClass { |
EntityRef get bound; |
/** |
+ * Code range of the type parameter. |
+ */ |
+ @Id(4) |
+ CodeRange get codeRange; |
+ |
+ /** |
* Name of the type parameter. |
*/ |
@Id(0) |
@@ -2072,6 +2125,12 @@ abstract class UnlinkedUnit extends base.SummaryClass { |
List<UnlinkedClass> get classes; |
/** |
+ * Code range of the unit. |
+ */ |
+ @Id(15) |
+ CodeRange get codeRange; |
+ |
+ /** |
* Enums declared in the compilation unit. |
*/ |
@Id(12) |
@@ -2180,6 +2239,12 @@ abstract class UnlinkedVariable extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Code range of the variable. |
+ */ |
+ @Id(14) |
+ CodeRange get codeRange; |
+ |
+ /** |
* 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]. |