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..ff46fc63388d63caf91450a204126a7419e685c4 100644 |
--- a/pkg/analyzer/lib/src/summary/idl.dart |
+++ b/pkg/analyzer/lib/src/summary/idl.dart |
@@ -429,6 +429,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 +452,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 +738,18 @@ abstract class UnlinkedClass extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Length of the class code. |
+ */ |
+ @Id(15) |
+ int get codeLength; |
Paul Berry
2016/03/04 16:36:07
Instead of adding these three getters to all these
scheglov
2016/03/04 17:15:19
Good idea.
Thank you.
|
+ |
+ /** |
+ * Offset of the class code relative to the beginning of the file. |
+ */ |
+ @Id(14) |
+ int get codeOffset; |
+ |
+ /** |
* Documentation comment for the class, or `null` if there is no |
* documentation comment. |
*/ |
@@ -758,6 +770,12 @@ abstract class UnlinkedClass extends base.SummaryClass { |
List<UnlinkedVariable> get fields; |
/** |
+ * Indicates whether the class has the code range. |
+ */ |
+ @Id(13) |
+ bool get hasCodeRange; |
+ |
+ /** |
* Indicates whether this class is the core "Object" class (and hence has no |
* supertype) |
*/ |
@@ -1288,6 +1306,18 @@ abstract class UnlinkedEnum extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Length of the enum code. |
+ */ |
+ @Id(7) |
+ int get codeLength; |
+ |
+ /** |
+ * Offset of the enum code relative to the beginning of the file. |
+ */ |
+ @Id(6) |
+ int get codeOffset; |
+ |
+ /** |
* Documentation comment for the enum, or `null` if there is no documentation |
* comment. |
*/ |
@@ -1296,6 +1326,12 @@ abstract class UnlinkedEnum extends base.SummaryClass { |
UnlinkedDocumentationComment get documentationComment; |
/** |
+ * Indicates whether the enum has the code range. |
+ */ |
+ @Id(5) |
+ bool get hasCodeRange; |
+ |
+ /** |
* Name of the enum type. |
*/ |
@Id(0) |
@@ -1354,6 +1390,18 @@ abstract class UnlinkedExecutable extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Length of the executable code. |
+ */ |
+ @Id(28) |
+ int get codeLength; |
+ |
+ /** |
+ * Offset of the executable code relative to the beginning of the file. |
+ */ |
+ @Id(27) |
+ int get codeOffset; |
+ |
+ /** |
* If a constant [UnlinkedExecutableKind.constructor], the constructor |
* initializers. Otherwise empty. |
*/ |
@@ -1361,6 +1409,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. |
*/ |
@@ -1369,6 +1428,12 @@ abstract class UnlinkedExecutable extends base.SummaryClass { |
UnlinkedDocumentationComment get documentationComment; |
/** |
+ * Indicates whether the executable has the code range. |
+ */ |
+ @Id(26) |
+ bool get hasCodeRange; |
+ |
+ /** |
* 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 |
@@ -1528,17 +1593,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 +1791,18 @@ abstract class UnlinkedParam extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Length of the parameter code. |
+ */ |
+ @Id(16) |
+ int get codeLength; |
+ |
+ /** |
+ * Offset of the parameter code relative to the beginning of the file. |
+ */ |
+ @Id(15) |
+ int get codeOffset; |
+ |
+ /** |
* 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]. |
@@ -1753,6 +1819,12 @@ abstract class UnlinkedParam extends base.SummaryClass { |
String get defaultValueCode; |
/** |
+ * Indicates whether the parameter has the code range. |
+ */ |
+ @Id(14) |
+ bool get hasCodeRange; |
+ |
+ /** |
* 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 |
@@ -1987,6 +2059,18 @@ abstract class UnlinkedTypedef extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Length of the typedef code. |
+ */ |
+ @Id(9) |
+ int get codeLength; |
+ |
+ /** |
+ * Offset of the typedef code relative to the beginning of the file. |
+ */ |
+ @Id(8) |
+ int get codeOffset; |
+ |
+ /** |
* Documentation comment for the typedef, or `null` if there is no |
* documentation comment. |
*/ |
@@ -1995,6 +2079,12 @@ abstract class UnlinkedTypedef extends base.SummaryClass { |
UnlinkedDocumentationComment get documentationComment; |
/** |
+ * Indicates whether the typedef has the code range. |
+ */ |
+ @Id(7) |
+ bool get hasCodeRange; |
+ |
+ /** |
* Name of the typedef. |
*/ |
@Id(0) |
@@ -2044,6 +2134,24 @@ abstract class UnlinkedTypeParam extends base.SummaryClass { |
EntityRef get bound; |
/** |
+ * Length of the type parameter code. |
+ */ |
+ @Id(6) |
+ int get codeLength; |
+ |
+ /** |
+ * Offset of the type parameter code relative to the beginning of the file. |
+ */ |
+ @Id(5) |
+ int get codeOffset; |
+ |
+ /** |
+ * Indicates whether the parameter has the code range. |
+ */ |
+ @Id(4) |
+ bool get hasCodeRange; |
+ |
+ /** |
* Name of the type parameter. |
*/ |
@Id(0) |
@@ -2072,6 +2180,18 @@ abstract class UnlinkedUnit extends base.SummaryClass { |
List<UnlinkedClass> get classes; |
/** |
+ * Length of the unit code. |
+ */ |
+ @Id(17) |
+ int get codeLength; |
+ |
+ /** |
+ * Offset of the unit code relative to the beginning of the file. |
+ */ |
+ @Id(16) |
+ int get codeOffset; |
+ |
+ /** |
* Enums declared in the compilation unit. |
*/ |
@Id(12) |
@@ -2091,6 +2211,12 @@ abstract class UnlinkedUnit extends base.SummaryClass { |
List<UnlinkedExportNonPublic> get exports; |
/** |
+ * Indicates whether the unit has the code range. |
+ */ |
+ @Id(15) |
+ bool get hasCodeRange; |
+ |
+ /** |
* Import declarations in the compilation unit. |
*/ |
@Id(5) |
@@ -2180,6 +2306,18 @@ abstract class UnlinkedVariable extends base.SummaryClass { |
List<UnlinkedConst> get annotations; |
/** |
+ * Length of the variable code. |
+ */ |
+ @Id(16) |
+ int get codeLength; |
+ |
+ /** |
+ * Offset of the variable code relative to the beginning of the file. |
+ */ |
+ @Id(15) |
+ int get codeOffset; |
+ |
+ /** |
* 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]. |
@@ -2196,6 +2334,12 @@ abstract class UnlinkedVariable extends base.SummaryClass { |
UnlinkedDocumentationComment get documentationComment; |
/** |
+ * Indicates whether the variable has the code range. |
+ */ |
+ @Id(14) |
+ bool get hasCodeRange; |
+ |
+ /** |
* 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 |