OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * This file is an "idl" style description of the summary format. It | 6 * This file is an "idl" style description of the summary format. It |
7 * contains abstract classes which declare the interface for reading data from | 7 * contains abstract classes which declare the interface for reading data from |
8 * summaries. It is parsed and transformed into code that implements the | 8 * summaries. It is parsed and transformed into code that implements the |
9 * summary format. | 9 * summary format. |
10 * | 10 * |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
422 */ | 422 */ |
423 @Id(0) | 423 @Id(0) |
424 int get unit; | 424 int get unit; |
425 } | 425 } |
426 | 426 |
427 /** | 427 /** |
428 * Linked summary of a compilation unit. | 428 * Linked summary of a compilation unit. |
429 */ | 429 */ |
430 abstract class LinkedUnit extends base.SummaryClass { | 430 abstract class LinkedUnit extends base.SummaryClass { |
431 /** | 431 /** |
432 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) | |
433 * corresponding to const constructors that are part of cycles. | |
434 */ | |
435 @Id(2) | |
436 List<int> get constCycles; | |
437 | |
438 /** | |
432 * Information about the resolution of references within the compilation | 439 * Information about the resolution of references within the compilation |
433 * unit. Each element of [UnlinkedUnit.references] has a corresponding | 440 * unit. Each element of [UnlinkedUnit.references] has a corresponding |
434 * element in this list (at the same index). If this list has additional | 441 * element in this list (at the same index). If this list has additional |
435 * elements beyond the number of elements in [UnlinkedUnit.references], those | 442 * elements beyond the number of elements in [UnlinkedUnit.references], those |
436 * additional elements are references that are only referred to implicitly | 443 * additional elements are references that are only referred to implicitly |
437 * (e.g. elements involved in inferred or propagated types). | 444 * (e.g. elements involved in inferred or propagated types). |
438 */ | 445 */ |
439 @Id(0) | 446 @Id(0) |
440 List<LinkedReference> get references; | 447 List<LinkedReference> get references; |
441 | 448 |
442 /** | 449 /** |
443 * List associating slot ids found inside the unlinked summary for the | 450 * List associating slot ids found inside the unlinked summary for the |
444 * compilation unit with propagated and inferred types. | 451 * compilation unit with propagated and inferred types. |
445 */ | 452 */ |
446 @Id(1) | 453 @Id(1) |
447 List<EntityRef> get types; | 454 List<EntityRef> get types; |
448 | |
449 /** | |
450 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) | |
451 * corresponding to const constructors that are part of cycles. | |
452 */ | |
453 @Id(2) | |
454 List<int> get constCycles; | |
455 } | 455 } |
456 | 456 |
457 /** | 457 /** |
458 * Summary information about a package. | 458 * Summary information about a package. |
459 */ | 459 */ |
460 @TopLevel('PBdl') | 460 @TopLevel('PBdl') |
461 abstract class PackageBundle extends base.SummaryClass { | 461 abstract class PackageBundle extends base.SummaryClass { |
462 factory PackageBundle.fromBuffer(List<int> buffer) => | 462 factory PackageBundle.fromBuffer(List<int> buffer) => |
463 generated.readPackageBundle(buffer); | 463 generated.readPackageBundle(buffer); |
464 | 464 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
731 * Unlinked summary information about a class declaration. | 731 * Unlinked summary information about a class declaration. |
732 */ | 732 */ |
733 abstract class UnlinkedClass extends base.SummaryClass { | 733 abstract class UnlinkedClass extends base.SummaryClass { |
734 /** | 734 /** |
735 * Annotations for this class. | 735 * Annotations for this class. |
736 */ | 736 */ |
737 @Id(5) | 737 @Id(5) |
738 List<UnlinkedConst> get annotations; | 738 List<UnlinkedConst> get annotations; |
739 | 739 |
740 /** | 740 /** |
741 * Length of the class code. | |
742 */ | |
743 @Id(15) | |
744 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.
| |
745 | |
746 /** | |
747 * Offset of the class code relative to the beginning of the file. | |
748 */ | |
749 @Id(14) | |
750 int get codeOffset; | |
751 | |
752 /** | |
741 * Documentation comment for the class, or `null` if there is no | 753 * Documentation comment for the class, or `null` if there is no |
742 * documentation comment. | 754 * documentation comment. |
743 */ | 755 */ |
744 @informative | 756 @informative |
745 @Id(6) | 757 @Id(6) |
746 UnlinkedDocumentationComment get documentationComment; | 758 UnlinkedDocumentationComment get documentationComment; |
747 | 759 |
748 /** | 760 /** |
749 * Executable objects (methods, getters, and setters) contained in the class. | 761 * Executable objects (methods, getters, and setters) contained in the class. |
750 */ | 762 */ |
751 @Id(2) | 763 @Id(2) |
752 List<UnlinkedExecutable> get executables; | 764 List<UnlinkedExecutable> get executables; |
753 | 765 |
754 /** | 766 /** |
755 * Field declarations contained in the class. | 767 * Field declarations contained in the class. |
756 */ | 768 */ |
757 @Id(4) | 769 @Id(4) |
758 List<UnlinkedVariable> get fields; | 770 List<UnlinkedVariable> get fields; |
759 | 771 |
760 /** | 772 /** |
773 * Indicates whether the class has the code range. | |
774 */ | |
775 @Id(13) | |
776 bool get hasCodeRange; | |
777 | |
778 /** | |
761 * Indicates whether this class is the core "Object" class (and hence has no | 779 * Indicates whether this class is the core "Object" class (and hence has no |
762 * supertype) | 780 * supertype) |
763 */ | 781 */ |
764 @Id(12) | 782 @Id(12) |
765 bool get hasNoSupertype; | 783 bool get hasNoSupertype; |
766 | 784 |
767 /** | 785 /** |
768 * Interfaces appearing in an `implements` clause, if any. | 786 * Interfaces appearing in an `implements` clause, if any. |
769 */ | 787 */ |
770 @Id(7) | 788 @Id(7) |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1281 * Unlinked summary information about an enum declaration. | 1299 * Unlinked summary information about an enum declaration. |
1282 */ | 1300 */ |
1283 abstract class UnlinkedEnum extends base.SummaryClass { | 1301 abstract class UnlinkedEnum extends base.SummaryClass { |
1284 /** | 1302 /** |
1285 * Annotations for this enum. | 1303 * Annotations for this enum. |
1286 */ | 1304 */ |
1287 @Id(4) | 1305 @Id(4) |
1288 List<UnlinkedConst> get annotations; | 1306 List<UnlinkedConst> get annotations; |
1289 | 1307 |
1290 /** | 1308 /** |
1309 * Length of the enum code. | |
1310 */ | |
1311 @Id(7) | |
1312 int get codeLength; | |
1313 | |
1314 /** | |
1315 * Offset of the enum code relative to the beginning of the file. | |
1316 */ | |
1317 @Id(6) | |
1318 int get codeOffset; | |
1319 | |
1320 /** | |
1291 * Documentation comment for the enum, or `null` if there is no documentation | 1321 * Documentation comment for the enum, or `null` if there is no documentation |
1292 * comment. | 1322 * comment. |
1293 */ | 1323 */ |
1294 @informative | 1324 @informative |
1295 @Id(3) | 1325 @Id(3) |
1296 UnlinkedDocumentationComment get documentationComment; | 1326 UnlinkedDocumentationComment get documentationComment; |
1297 | 1327 |
1298 /** | 1328 /** |
1329 * Indicates whether the enum has the code range. | |
1330 */ | |
1331 @Id(5) | |
1332 bool get hasCodeRange; | |
1333 | |
1334 /** | |
1299 * Name of the enum type. | 1335 * Name of the enum type. |
1300 */ | 1336 */ |
1301 @Id(0) | 1337 @Id(0) |
1302 String get name; | 1338 String get name; |
1303 | 1339 |
1304 /** | 1340 /** |
1305 * Offset of the enum name relative to the beginning of the file. | 1341 * Offset of the enum name relative to the beginning of the file. |
1306 */ | 1342 */ |
1307 @informative | 1343 @informative |
1308 @Id(1) | 1344 @Id(1) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1347 * declaration. | 1383 * declaration. |
1348 */ | 1384 */ |
1349 abstract class UnlinkedExecutable extends base.SummaryClass { | 1385 abstract class UnlinkedExecutable extends base.SummaryClass { |
1350 /** | 1386 /** |
1351 * Annotations for this executable. | 1387 * Annotations for this executable. |
1352 */ | 1388 */ |
1353 @Id(6) | 1389 @Id(6) |
1354 List<UnlinkedConst> get annotations; | 1390 List<UnlinkedConst> get annotations; |
1355 | 1391 |
1356 /** | 1392 /** |
1393 * Length of the executable code. | |
1394 */ | |
1395 @Id(28) | |
1396 int get codeLength; | |
1397 | |
1398 /** | |
1399 * Offset of the executable code relative to the beginning of the file. | |
1400 */ | |
1401 @Id(27) | |
1402 int get codeOffset; | |
1403 | |
1404 /** | |
1357 * If a constant [UnlinkedExecutableKind.constructor], the constructor | 1405 * If a constant [UnlinkedExecutableKind.constructor], the constructor |
1358 * initializers. Otherwise empty. | 1406 * initializers. Otherwise empty. |
1359 */ | 1407 */ |
1360 @Id(14) | 1408 @Id(14) |
1361 List<UnlinkedConstructorInitializer> get constantInitializers; | 1409 List<UnlinkedConstructorInitializer> get constantInitializers; |
1362 | 1410 |
1363 /** | 1411 /** |
1412 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, | |
1413 * a nonzero slot id which is unique within this compilation unit. If this id | |
1414 * is found in [LinkedUnit.constCycles], then this constructor is part of a | |
1415 * cycle. | |
1416 * | |
1417 * Otherwise, zero. | |
1418 */ | |
1419 @Id(25) | |
1420 int get constCycleSlot; | |
1421 | |
1422 /** | |
1364 * Documentation comment for the executable, or `null` if there is no | 1423 * Documentation comment for the executable, or `null` if there is no |
1365 * documentation comment. | 1424 * documentation comment. |
1366 */ | 1425 */ |
1367 @informative | 1426 @informative |
1368 @Id(7) | 1427 @Id(7) |
1369 UnlinkedDocumentationComment get documentationComment; | 1428 UnlinkedDocumentationComment get documentationComment; |
1370 | 1429 |
1371 /** | 1430 /** |
1431 * Indicates whether the executable has the code range. | |
1432 */ | |
1433 @Id(26) | |
1434 bool get hasCodeRange; | |
1435 | |
1436 /** | |
1372 * If this executable's return type is inferable, nonzero slot id | 1437 * If this executable's return type is inferable, nonzero slot id |
1373 * identifying which entry in [LinkedUnit.types] contains the inferred | 1438 * identifying which entry in [LinkedUnit.types] contains the inferred |
1374 * return type. If there is no matching entry in [LinkedUnit.types], then | 1439 * return type. If there is no matching entry in [LinkedUnit.types], then |
1375 * no return type was inferred for this variable, so its static type is | 1440 * no return type was inferred for this variable, so its static type is |
1376 * `dynamic`. | 1441 * `dynamic`. |
1377 */ | 1442 */ |
1378 @Id(5) | 1443 @Id(5) |
1379 int get inferredReturnTypeSlot; | 1444 int get inferredReturnTypeSlot; |
1380 | 1445 |
1381 /** | 1446 /** |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1521 * If a local function, the length of the visible range; zero otherwise. | 1586 * If a local function, the length of the visible range; zero otherwise. |
1522 */ | 1587 */ |
1523 @Id(20) | 1588 @Id(20) |
1524 int get visibleLength; | 1589 int get visibleLength; |
1525 | 1590 |
1526 /** | 1591 /** |
1527 * If a local function, the beginning of the visible range; zero otherwise. | 1592 * If a local function, the beginning of the visible range; zero otherwise. |
1528 */ | 1593 */ |
1529 @Id(21) | 1594 @Id(21) |
1530 int get visibleOffset; | 1595 int get visibleOffset; |
1531 | |
1532 /** | |
1533 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, | |
1534 * a nonzero slot id which is unique within this compilation unit. If this id | |
1535 * is found in [LinkedUnit.constCycles], then this constructor is part of a | |
1536 * cycle. | |
1537 * | |
1538 * Otherwise, zero. | |
1539 */ | |
1540 @Id(25) | |
1541 int get constCycleSlot; | |
1542 } | 1596 } |
1543 | 1597 |
1544 /** | 1598 /** |
1545 * Enum used to indicate the kind of an executable. | 1599 * Enum used to indicate the kind of an executable. |
1546 */ | 1600 */ |
1547 enum UnlinkedExecutableKind { | 1601 enum UnlinkedExecutableKind { |
1548 /** | 1602 /** |
1549 * Executable is a function or method. | 1603 * Executable is a function or method. |
1550 */ | 1604 */ |
1551 functionOrMethod, | 1605 functionOrMethod, |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1730 * Unlinked summary information about a function parameter. | 1784 * Unlinked summary information about a function parameter. |
1731 */ | 1785 */ |
1732 abstract class UnlinkedParam extends base.SummaryClass { | 1786 abstract class UnlinkedParam extends base.SummaryClass { |
1733 /** | 1787 /** |
1734 * Annotations for this parameter. | 1788 * Annotations for this parameter. |
1735 */ | 1789 */ |
1736 @Id(9) | 1790 @Id(9) |
1737 List<UnlinkedConst> get annotations; | 1791 List<UnlinkedConst> get annotations; |
1738 | 1792 |
1739 /** | 1793 /** |
1794 * Length of the parameter code. | |
1795 */ | |
1796 @Id(16) | |
1797 int get codeLength; | |
1798 | |
1799 /** | |
1800 * Offset of the parameter code relative to the beginning of the file. | |
1801 */ | |
1802 @Id(15) | |
1803 int get codeOffset; | |
1804 | |
1805 /** | |
1740 * If the parameter has a default value, the constant expression in the | 1806 * If the parameter has a default value, the constant expression in the |
1741 * default value. Note that the presence of this expression does not mean | 1807 * default value. Note that the presence of this expression does not mean |
1742 * that it is a valid, check [UnlinkedConst.isInvalid]. | 1808 * that it is a valid, check [UnlinkedConst.isInvalid]. |
1743 */ | 1809 */ |
1744 @Id(7) | 1810 @Id(7) |
1745 UnlinkedConst get defaultValue; | 1811 UnlinkedConst get defaultValue; |
1746 | 1812 |
1747 /** | 1813 /** |
1748 * If the parameter has a default value, the source text of the constant | 1814 * If the parameter has a default value, the source text of the constant |
1749 * expression in the default value. Otherwise the empty string. | 1815 * expression in the default value. Otherwise the empty string. |
1750 */ | 1816 */ |
1751 @informative | 1817 @informative |
1752 @Id(13) | 1818 @Id(13) |
1753 String get defaultValueCode; | 1819 String get defaultValueCode; |
1754 | 1820 |
1755 /** | 1821 /** |
1822 * Indicates whether the parameter has the code range. | |
1823 */ | |
1824 @Id(14) | |
1825 bool get hasCodeRange; | |
1826 | |
1827 /** | |
1756 * If this parameter's type is inferable, nonzero slot id identifying which | 1828 * If this parameter's type is inferable, nonzero slot id identifying which |
1757 * entry in [LinkedLibrary.types] contains the inferred type. If there is no | 1829 * entry in [LinkedLibrary.types] contains the inferred type. If there is no |
1758 * matching entry in [LinkedLibrary.types], then no type was inferred for | 1830 * matching entry in [LinkedLibrary.types], then no type was inferred for |
1759 * this variable, so its static type is `dynamic`. | 1831 * this variable, so its static type is `dynamic`. |
1760 * | 1832 * |
1761 * Note that although strong mode considers initializing formals to be | 1833 * Note that although strong mode considers initializing formals to be |
1762 * inferable, they are not marked as such in the summary; if their type is | 1834 * inferable, they are not marked as such in the summary; if their type is |
1763 * not specified, they always inherit the static type of the corresponding | 1835 * not specified, they always inherit the static type of the corresponding |
1764 * field. | 1836 * field. |
1765 */ | 1837 */ |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1980 * Unlinked summary information about a typedef declaration. | 2052 * Unlinked summary information about a typedef declaration. |
1981 */ | 2053 */ |
1982 abstract class UnlinkedTypedef extends base.SummaryClass { | 2054 abstract class UnlinkedTypedef extends base.SummaryClass { |
1983 /** | 2055 /** |
1984 * Annotations for this typedef. | 2056 * Annotations for this typedef. |
1985 */ | 2057 */ |
1986 @Id(4) | 2058 @Id(4) |
1987 List<UnlinkedConst> get annotations; | 2059 List<UnlinkedConst> get annotations; |
1988 | 2060 |
1989 /** | 2061 /** |
2062 * Length of the typedef code. | |
2063 */ | |
2064 @Id(9) | |
2065 int get codeLength; | |
2066 | |
2067 /** | |
2068 * Offset of the typedef code relative to the beginning of the file. | |
2069 */ | |
2070 @Id(8) | |
2071 int get codeOffset; | |
2072 | |
2073 /** | |
1990 * Documentation comment for the typedef, or `null` if there is no | 2074 * Documentation comment for the typedef, or `null` if there is no |
1991 * documentation comment. | 2075 * documentation comment. |
1992 */ | 2076 */ |
1993 @informative | 2077 @informative |
1994 @Id(6) | 2078 @Id(6) |
1995 UnlinkedDocumentationComment get documentationComment; | 2079 UnlinkedDocumentationComment get documentationComment; |
1996 | 2080 |
1997 /** | 2081 /** |
2082 * Indicates whether the typedef has the code range. | |
2083 */ | |
2084 @Id(7) | |
2085 bool get hasCodeRange; | |
2086 | |
2087 /** | |
1998 * Name of the typedef. | 2088 * Name of the typedef. |
1999 */ | 2089 */ |
2000 @Id(0) | 2090 @Id(0) |
2001 String get name; | 2091 String get name; |
2002 | 2092 |
2003 /** | 2093 /** |
2004 * Offset of the typedef name relative to the beginning of the file. | 2094 * Offset of the typedef name relative to the beginning of the file. |
2005 */ | 2095 */ |
2006 @informative | 2096 @informative |
2007 @Id(1) | 2097 @Id(1) |
(...skipping 29 matching lines...) Expand all Loading... | |
2037 List<UnlinkedConst> get annotations; | 2127 List<UnlinkedConst> get annotations; |
2038 | 2128 |
2039 /** | 2129 /** |
2040 * Bound of the type parameter, if a bound is explicitly declared. Otherwise | 2130 * Bound of the type parameter, if a bound is explicitly declared. Otherwise |
2041 * null. | 2131 * null. |
2042 */ | 2132 */ |
2043 @Id(2) | 2133 @Id(2) |
2044 EntityRef get bound; | 2134 EntityRef get bound; |
2045 | 2135 |
2046 /** | 2136 /** |
2137 * Length of the type parameter code. | |
2138 */ | |
2139 @Id(6) | |
2140 int get codeLength; | |
2141 | |
2142 /** | |
2143 * Offset of the type parameter code relative to the beginning of the file. | |
2144 */ | |
2145 @Id(5) | |
2146 int get codeOffset; | |
2147 | |
2148 /** | |
2149 * Indicates whether the parameter has the code range. | |
2150 */ | |
2151 @Id(4) | |
2152 bool get hasCodeRange; | |
2153 | |
2154 /** | |
2047 * Name of the type parameter. | 2155 * Name of the type parameter. |
2048 */ | 2156 */ |
2049 @Id(0) | 2157 @Id(0) |
2050 String get name; | 2158 String get name; |
2051 | 2159 |
2052 /** | 2160 /** |
2053 * Offset of the type parameter name relative to the beginning of the file. | 2161 * Offset of the type parameter name relative to the beginning of the file. |
2054 */ | 2162 */ |
2055 @informative | 2163 @informative |
2056 @Id(1) | 2164 @Id(1) |
2057 int get nameOffset; | 2165 int get nameOffset; |
2058 } | 2166 } |
2059 | 2167 |
2060 /** | 2168 /** |
2061 * Unlinked summary information about a compilation unit ("part file"). | 2169 * Unlinked summary information about a compilation unit ("part file"). |
2062 */ | 2170 */ |
2063 @TopLevel('UUnt') | 2171 @TopLevel('UUnt') |
2064 abstract class UnlinkedUnit extends base.SummaryClass { | 2172 abstract class UnlinkedUnit extends base.SummaryClass { |
2065 factory UnlinkedUnit.fromBuffer(List<int> buffer) => | 2173 factory UnlinkedUnit.fromBuffer(List<int> buffer) => |
2066 generated.readUnlinkedUnit(buffer); | 2174 generated.readUnlinkedUnit(buffer); |
2067 | 2175 |
2068 /** | 2176 /** |
2069 * Classes declared in the compilation unit. | 2177 * Classes declared in the compilation unit. |
2070 */ | 2178 */ |
2071 @Id(2) | 2179 @Id(2) |
2072 List<UnlinkedClass> get classes; | 2180 List<UnlinkedClass> get classes; |
2073 | 2181 |
2074 /** | 2182 /** |
2183 * Length of the unit code. | |
2184 */ | |
2185 @Id(17) | |
2186 int get codeLength; | |
2187 | |
2188 /** | |
2189 * Offset of the unit code relative to the beginning of the file. | |
2190 */ | |
2191 @Id(16) | |
2192 int get codeOffset; | |
2193 | |
2194 /** | |
2075 * Enums declared in the compilation unit. | 2195 * Enums declared in the compilation unit. |
2076 */ | 2196 */ |
2077 @Id(12) | 2197 @Id(12) |
2078 List<UnlinkedEnum> get enums; | 2198 List<UnlinkedEnum> get enums; |
2079 | 2199 |
2080 /** | 2200 /** |
2081 * Top level executable objects (functions, getters, and setters) declared in | 2201 * Top level executable objects (functions, getters, and setters) declared in |
2082 * the compilation unit. | 2202 * the compilation unit. |
2083 */ | 2203 */ |
2084 @Id(4) | 2204 @Id(4) |
2085 List<UnlinkedExecutable> get executables; | 2205 List<UnlinkedExecutable> get executables; |
2086 | 2206 |
2087 /** | 2207 /** |
2088 * Export declarations in the compilation unit. | 2208 * Export declarations in the compilation unit. |
2089 */ | 2209 */ |
2090 @Id(13) | 2210 @Id(13) |
2091 List<UnlinkedExportNonPublic> get exports; | 2211 List<UnlinkedExportNonPublic> get exports; |
2092 | 2212 |
2093 /** | 2213 /** |
2214 * Indicates whether the unit has the code range. | |
2215 */ | |
2216 @Id(15) | |
2217 bool get hasCodeRange; | |
2218 | |
2219 /** | |
2094 * Import declarations in the compilation unit. | 2220 * Import declarations in the compilation unit. |
2095 */ | 2221 */ |
2096 @Id(5) | 2222 @Id(5) |
2097 List<UnlinkedImport> get imports; | 2223 List<UnlinkedImport> get imports; |
2098 | 2224 |
2099 /** | 2225 /** |
2100 * Annotations for the library declaration, or the empty list if there is no | 2226 * Annotations for the library declaration, or the empty list if there is no |
2101 * library declaration. | 2227 * library declaration. |
2102 */ | 2228 */ |
2103 @Id(14) | 2229 @Id(14) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2173 * a field. | 2299 * a field. |
2174 */ | 2300 */ |
2175 abstract class UnlinkedVariable extends base.SummaryClass { | 2301 abstract class UnlinkedVariable extends base.SummaryClass { |
2176 /** | 2302 /** |
2177 * Annotations for this variable. | 2303 * Annotations for this variable. |
2178 */ | 2304 */ |
2179 @Id(8) | 2305 @Id(8) |
2180 List<UnlinkedConst> get annotations; | 2306 List<UnlinkedConst> get annotations; |
2181 | 2307 |
2182 /** | 2308 /** |
2309 * Length of the variable code. | |
2310 */ | |
2311 @Id(16) | |
2312 int get codeLength; | |
2313 | |
2314 /** | |
2315 * Offset of the variable code relative to the beginning of the file. | |
2316 */ | |
2317 @Id(15) | |
2318 int get codeOffset; | |
2319 | |
2320 /** | |
2183 * If [isConst] is true, and the variable has an initializer, the constant | 2321 * If [isConst] is true, and the variable has an initializer, the constant |
2184 * expression in the initializer. Note that the presence of this expression | 2322 * expression in the initializer. Note that the presence of this expression |
2185 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. | 2323 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. |
2186 */ | 2324 */ |
2187 @Id(5) | 2325 @Id(5) |
2188 UnlinkedConst get constExpr; | 2326 UnlinkedConst get constExpr; |
2189 | 2327 |
2190 /** | 2328 /** |
2191 * Documentation comment for the variable, or `null` if there is no | 2329 * Documentation comment for the variable, or `null` if there is no |
2192 * documentation comment. | 2330 * documentation comment. |
2193 */ | 2331 */ |
2194 @informative | 2332 @informative |
2195 @Id(10) | 2333 @Id(10) |
2196 UnlinkedDocumentationComment get documentationComment; | 2334 UnlinkedDocumentationComment get documentationComment; |
2197 | 2335 |
2198 /** | 2336 /** |
2337 * Indicates whether the variable has the code range. | |
2338 */ | |
2339 @Id(14) | |
2340 bool get hasCodeRange; | |
2341 | |
2342 /** | |
2199 * If this variable is inferable, nonzero slot id identifying which entry in | 2343 * If this variable is inferable, nonzero slot id identifying which entry in |
2200 * [LinkedLibrary.types] contains the inferred type for this variable. If | 2344 * [LinkedLibrary.types] contains the inferred type for this variable. If |
2201 * there is no matching entry in [LinkedLibrary.types], then no type was | 2345 * there is no matching entry in [LinkedLibrary.types], then no type was |
2202 * inferred for this variable, so its static type is `dynamic`. | 2346 * inferred for this variable, so its static type is `dynamic`. |
2203 */ | 2347 */ |
2204 @Id(9) | 2348 @Id(9) |
2205 int get inferredTypeSlot; | 2349 int get inferredTypeSlot; |
2206 | 2350 |
2207 /** | 2351 /** |
2208 * The synthetic initializer function of the variable. Absent if the variable | 2352 * The synthetic initializer function of the variable. Absent if the variable |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2268 */ | 2412 */ |
2269 @Id(11) | 2413 @Id(11) |
2270 int get visibleLength; | 2414 int get visibleLength; |
2271 | 2415 |
2272 /** | 2416 /** |
2273 * If a local variable, the beginning of the visible range; zero otherwise. | 2417 * If a local variable, the beginning of the visible range; zero otherwise. |
2274 */ | 2418 */ |
2275 @Id(12) | 2419 @Id(12) |
2276 int get visibleOffset; | 2420 int get visibleOffset; |
2277 } | 2421 } |
OLD | NEW |