| 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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 } | 964 } |
| 965 | 965 |
| 966 /** | 966 /** |
| 967 * Unlinked summary information about a class declaration. | 967 * Unlinked summary information about a class declaration. |
| 968 */ | 968 */ |
| 969 abstract class UnlinkedClass extends base.SummaryClass { | 969 abstract class UnlinkedClass extends base.SummaryClass { |
| 970 /** | 970 /** |
| 971 * Annotations for this class. | 971 * Annotations for this class. |
| 972 */ | 972 */ |
| 973 @Id(5) | 973 @Id(5) |
| 974 List<UnlinkedConst> get annotations; | 974 List<UnlinkedExpr> get annotations; |
| 975 | 975 |
| 976 /** | 976 /** |
| 977 * Code range of the class. | 977 * Code range of the class. |
| 978 */ | 978 */ |
| 979 @informative | 979 @informative |
| 980 @Id(13) | 980 @Id(13) |
| 981 CodeRange get codeRange; | 981 CodeRange get codeRange; |
| 982 | 982 |
| 983 /** | 983 /** |
| 984 * Documentation comment for the class, or `null` if there is no | 984 * Documentation comment for the class, or `null` if there is no |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 | 1112 |
| 1113 /** | 1113 /** |
| 1114 * The value to which the value of the declared variable will be compared, | 1114 * The value to which the value of the declared variable will be compared, |
| 1115 * or `true` if the condition does not include an equality test. | 1115 * or `true` if the condition does not include an equality test. |
| 1116 */ | 1116 */ |
| 1117 @Id(1) | 1117 @Id(1) |
| 1118 String get value; | 1118 String get value; |
| 1119 } | 1119 } |
| 1120 | 1120 |
| 1121 /** | 1121 /** |
| 1122 * Unlinked summary information about a compile-time constant expression, or a | 1122 * Unlinked summary information about a constructor initializer. |
| 1123 * potentially constant expression. | 1123 */ |
| 1124 abstract class UnlinkedConstructorInitializer extends base.SummaryClass { |
| 1125 /** |
| 1126 * If there are `m` [arguments] and `n` [argumentNames], then each argument |
| 1127 * from [arguments] with index `i` such that `n + i - m >= 0`, should be used |
| 1128 * with the name at `n + i - m`. |
| 1129 */ |
| 1130 @Id(4) |
| 1131 List<String> get argumentNames; |
| 1132 |
| 1133 /** |
| 1134 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the |
| 1135 * invocation. Otherwise empty. |
| 1136 */ |
| 1137 @Id(3) |
| 1138 List<UnlinkedExpr> get arguments; |
| 1139 |
| 1140 /** |
| 1141 * If [kind] is `field`, the expression of the field initializer. |
| 1142 * Otherwise `null`. |
| 1143 */ |
| 1144 @Id(1) |
| 1145 UnlinkedExpr get expression; |
| 1146 |
| 1147 /** |
| 1148 * The kind of the constructor initializer (field, redirect, super). |
| 1149 */ |
| 1150 @Id(2) |
| 1151 UnlinkedConstructorInitializerKind get kind; |
| 1152 |
| 1153 /** |
| 1154 * If [kind] is `field`, the name of the field declared in the class. If |
| 1155 * [kind] is `thisInvocation`, the name of the constructor, declared in this |
| 1156 * class, to redirect to. If [kind] is `superInvocation`, the name of the |
| 1157 * constructor, declared in the superclass, to invoke. |
| 1158 */ |
| 1159 @Id(0) |
| 1160 String get name; |
| 1161 } |
| 1162 |
| 1163 /** |
| 1164 * Enum used to indicate the kind of an constructor initializer. |
| 1165 */ |
| 1166 enum UnlinkedConstructorInitializerKind { |
| 1167 /** |
| 1168 * Initialization of a field. |
| 1169 */ |
| 1170 field, |
| 1171 |
| 1172 /** |
| 1173 * Invocation of a constructor in the same class. |
| 1174 */ |
| 1175 thisInvocation, |
| 1176 |
| 1177 /** |
| 1178 * Invocation of a superclass' constructor. |
| 1179 */ |
| 1180 superInvocation |
| 1181 } |
| 1182 |
| 1183 /** |
| 1184 * Unlinked summary information about a documentation comment. |
| 1185 */ |
| 1186 abstract class UnlinkedDocumentationComment extends base.SummaryClass { |
| 1187 /** |
| 1188 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). |
| 1189 */ |
| 1190 @Id(0) |
| 1191 @deprecated |
| 1192 int get length; |
| 1193 |
| 1194 /** |
| 1195 * Offset of the beginning of the documentation comment relative to the |
| 1196 * beginning of the file. |
| 1197 */ |
| 1198 @Id(2) |
| 1199 @deprecated |
| 1200 int get offset; |
| 1201 |
| 1202 /** |
| 1203 * Text of the documentation comment, with '\r\n' replaced by '\n'. |
| 1204 * |
| 1205 * References appearing within the doc comment in square brackets are not |
| 1206 * specially encoded. |
| 1207 */ |
| 1208 @Id(1) |
| 1209 String get text; |
| 1210 } |
| 1211 |
| 1212 /** |
| 1213 * Unlinked summary information about an enum declaration. |
| 1214 */ |
| 1215 abstract class UnlinkedEnum extends base.SummaryClass { |
| 1216 /** |
| 1217 * Annotations for this enum. |
| 1218 */ |
| 1219 @Id(4) |
| 1220 List<UnlinkedExpr> get annotations; |
| 1221 |
| 1222 /** |
| 1223 * Code range of the enum. |
| 1224 */ |
| 1225 @informative |
| 1226 @Id(5) |
| 1227 CodeRange get codeRange; |
| 1228 |
| 1229 /** |
| 1230 * Documentation comment for the enum, or `null` if there is no documentation |
| 1231 * comment. |
| 1232 */ |
| 1233 @informative |
| 1234 @Id(3) |
| 1235 UnlinkedDocumentationComment get documentationComment; |
| 1236 |
| 1237 /** |
| 1238 * Name of the enum type. |
| 1239 */ |
| 1240 @Id(0) |
| 1241 String get name; |
| 1242 |
| 1243 /** |
| 1244 * Offset of the enum name relative to the beginning of the file. |
| 1245 */ |
| 1246 @informative |
| 1247 @Id(1) |
| 1248 int get nameOffset; |
| 1249 |
| 1250 /** |
| 1251 * Values listed in the enum declaration, in declaration order. |
| 1252 */ |
| 1253 @Id(2) |
| 1254 List<UnlinkedEnumValue> get values; |
| 1255 } |
| 1256 |
| 1257 /** |
| 1258 * Unlinked summary information about a single enumerated value in an enum |
| 1259 * declaration. |
| 1260 */ |
| 1261 abstract class UnlinkedEnumValue extends base.SummaryClass { |
| 1262 /** |
| 1263 * Documentation comment for the enum value, or `null` if there is no |
| 1264 * documentation comment. |
| 1265 */ |
| 1266 @informative |
| 1267 @Id(2) |
| 1268 UnlinkedDocumentationComment get documentationComment; |
| 1269 |
| 1270 /** |
| 1271 * Name of the enumerated value. |
| 1272 */ |
| 1273 @Id(0) |
| 1274 String get name; |
| 1275 |
| 1276 /** |
| 1277 * Offset of the enum value name relative to the beginning of the file. |
| 1278 */ |
| 1279 @informative |
| 1280 @Id(1) |
| 1281 int get nameOffset; |
| 1282 } |
| 1283 |
| 1284 /** |
| 1285 * Unlinked summary information about a function, method, getter, or setter |
| 1286 * declaration. |
| 1287 */ |
| 1288 abstract class UnlinkedExecutable extends base.SummaryClass { |
| 1289 /** |
| 1290 * Annotations for this executable. |
| 1291 */ |
| 1292 @Id(6) |
| 1293 List<UnlinkedExpr> get annotations; |
| 1294 |
| 1295 /** |
| 1296 * If this executable's function body is declared using `=>`, the expression |
| 1297 * to the right of the `=>`. May be omitted if neither type inference nor |
| 1298 * constant evaluation depends on the function body. |
| 1299 */ |
| 1300 @Id(29) |
| 1301 UnlinkedExpr get bodyExpr; |
| 1302 |
| 1303 /** |
| 1304 * Code range of the executable. |
| 1305 */ |
| 1306 @informative |
| 1307 @Id(26) |
| 1308 CodeRange get codeRange; |
| 1309 |
| 1310 /** |
| 1311 * If a constant [UnlinkedExecutableKind.constructor], the constructor |
| 1312 * initializers. Otherwise empty. |
| 1313 */ |
| 1314 @Id(14) |
| 1315 List<UnlinkedConstructorInitializer> get constantInitializers; |
| 1316 |
| 1317 /** |
| 1318 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, |
| 1319 * a nonzero slot id which is unique within this compilation unit. If this id |
| 1320 * is found in [LinkedUnit.constCycles], then this constructor is part of a |
| 1321 * cycle. |
| 1322 * |
| 1323 * Otherwise, zero. |
| 1324 */ |
| 1325 @Id(25) |
| 1326 int get constCycleSlot; |
| 1327 |
| 1328 /** |
| 1329 * Documentation comment for the executable, or `null` if there is no |
| 1330 * documentation comment. |
| 1331 */ |
| 1332 @informative |
| 1333 @Id(7) |
| 1334 UnlinkedDocumentationComment get documentationComment; |
| 1335 |
| 1336 /** |
| 1337 * If this executable's return type is inferable, nonzero slot id |
| 1338 * identifying which entry in [LinkedUnit.types] contains the inferred |
| 1339 * return type. If there is no matching entry in [LinkedUnit.types], then |
| 1340 * no return type was inferred for this variable, so its static type is |
| 1341 * `dynamic`. |
| 1342 */ |
| 1343 @Id(5) |
| 1344 int get inferredReturnTypeSlot; |
| 1345 |
| 1346 /** |
| 1347 * Indicates whether the executable is declared using the `abstract` keyword. |
| 1348 */ |
| 1349 @Id(10) |
| 1350 bool get isAbstract; |
| 1351 |
| 1352 /** |
| 1353 * Indicates whether the executable has body marked as being asynchronous. |
| 1354 */ |
| 1355 @informative |
| 1356 @Id(27) |
| 1357 bool get isAsynchronous; |
| 1358 |
| 1359 /** |
| 1360 * Indicates whether the executable is declared using the `const` keyword. |
| 1361 */ |
| 1362 @Id(12) |
| 1363 bool get isConst; |
| 1364 |
| 1365 /** |
| 1366 * Indicates whether the executable is declared using the `external` keyword. |
| 1367 */ |
| 1368 @Id(11) |
| 1369 bool get isExternal; |
| 1370 |
| 1371 /** |
| 1372 * Indicates whether the executable is declared using the `factory` keyword. |
| 1373 */ |
| 1374 @Id(8) |
| 1375 bool get isFactory; |
| 1376 |
| 1377 /** |
| 1378 * Indicates whether the executable has body marked as being a generator. |
| 1379 */ |
| 1380 @informative |
| 1381 @Id(28) |
| 1382 bool get isGenerator; |
| 1383 |
| 1384 /** |
| 1385 * Indicates whether the executable is a redirected constructor. |
| 1386 */ |
| 1387 @Id(13) |
| 1388 bool get isRedirectedConstructor; |
| 1389 |
| 1390 /** |
| 1391 * Indicates whether the executable is declared using the `static` keyword. |
| 1392 * |
| 1393 * Note that for top level executables, this flag is false, since they are |
| 1394 * not declared using the `static` keyword (even though they are considered |
| 1395 * static for semantic purposes). |
| 1396 */ |
| 1397 @Id(9) |
| 1398 bool get isStatic; |
| 1399 |
| 1400 /** |
| 1401 * The kind of the executable (function/method, getter, setter, or |
| 1402 * constructor). |
| 1403 */ |
| 1404 @Id(4) |
| 1405 UnlinkedExecutableKind get kind; |
| 1406 |
| 1407 /** |
| 1408 * The list of local functions. |
| 1409 */ |
| 1410 @Id(18) |
| 1411 List<UnlinkedExecutable> get localFunctions; |
| 1412 |
| 1413 /** |
| 1414 * The list of local labels. |
| 1415 */ |
| 1416 @informative |
| 1417 @Id(22) |
| 1418 List<UnlinkedLabel> get localLabels; |
| 1419 |
| 1420 /** |
| 1421 * The list of local variables. |
| 1422 */ |
| 1423 @informative |
| 1424 @Id(19) |
| 1425 List<UnlinkedVariable> get localVariables; |
| 1426 |
| 1427 /** |
| 1428 * Name of the executable. For setters, this includes the trailing "=". For |
| 1429 * named constructors, this excludes the class name and excludes the ".". |
| 1430 * For unnamed constructors, this is the empty string. |
| 1431 */ |
| 1432 @Id(1) |
| 1433 String get name; |
| 1434 |
| 1435 /** |
| 1436 * If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty, |
| 1437 * the offset of the end of the constructor name. Otherwise zero. |
| 1438 */ |
| 1439 @informative |
| 1440 @Id(23) |
| 1441 int get nameEnd; |
| 1442 |
| 1443 /** |
| 1444 * Offset of the executable name relative to the beginning of the file. For |
| 1445 * named constructors, this excludes the class name and excludes the ".". |
| 1446 * For unnamed constructors, this is the offset of the class name (i.e. the |
| 1447 * offset of the second "C" in "class C { C(); }"). |
| 1448 */ |
| 1449 @informative |
| 1450 @Id(0) |
| 1451 int get nameOffset; |
| 1452 |
| 1453 /** |
| 1454 * Parameters of the executable, if any. Note that getters have no |
| 1455 * parameters (hence this will be the empty list), and setters have a single |
| 1456 * parameter. |
| 1457 */ |
| 1458 @Id(2) |
| 1459 List<UnlinkedParam> get parameters; |
| 1460 |
| 1461 /** |
| 1462 * If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty, |
| 1463 * the offset of the period before the constructor name. Otherwise zero. |
| 1464 */ |
| 1465 @informative |
| 1466 @Id(24) |
| 1467 int get periodOffset; |
| 1468 |
| 1469 /** |
| 1470 * If [isRedirectedConstructor] and [isFactory] are both `true`, the |
| 1471 * constructor to which this constructor redirects; otherwise empty. |
| 1472 */ |
| 1473 @Id(15) |
| 1474 EntityRef get redirectedConstructor; |
| 1475 |
| 1476 /** |
| 1477 * If [isRedirectedConstructor] is `true` and [isFactory] is `false`, the |
| 1478 * name of the constructor that this constructor redirects to; otherwise |
| 1479 * empty. |
| 1480 */ |
| 1481 @Id(17) |
| 1482 String get redirectedConstructorName; |
| 1483 |
| 1484 /** |
| 1485 * Declared return type of the executable. Absent if the executable is a |
| 1486 * constructor or the return type is implicit. Absent for executables |
| 1487 * associated with variable initializers and closures, since these |
| 1488 * executables may have return types that are not accessible via direct |
| 1489 * imports. |
| 1490 */ |
| 1491 @Id(3) |
| 1492 EntityRef get returnType; |
| 1493 |
| 1494 /** |
| 1495 * Type parameters of the executable, if any. Empty if support for generic |
| 1496 * method syntax is disabled. |
| 1497 */ |
| 1498 @Id(16) |
| 1499 List<UnlinkedTypeParam> get typeParameters; |
| 1500 |
| 1501 /** |
| 1502 * If a local function, the length of the visible range; zero otherwise. |
| 1503 */ |
| 1504 @informative |
| 1505 @Id(20) |
| 1506 int get visibleLength; |
| 1507 |
| 1508 /** |
| 1509 * If a local function, the beginning of the visible range; zero otherwise. |
| 1510 */ |
| 1511 @informative |
| 1512 @Id(21) |
| 1513 int get visibleOffset; |
| 1514 } |
| 1515 |
| 1516 /** |
| 1517 * Enum used to indicate the kind of an executable. |
| 1518 */ |
| 1519 enum UnlinkedExecutableKind { |
| 1520 /** |
| 1521 * Executable is a function or method. |
| 1522 */ |
| 1523 functionOrMethod, |
| 1524 |
| 1525 /** |
| 1526 * Executable is a getter. |
| 1527 */ |
| 1528 getter, |
| 1529 |
| 1530 /** |
| 1531 * Executable is a setter. |
| 1532 */ |
| 1533 setter, |
| 1534 |
| 1535 /** |
| 1536 * Executable is a constructor. |
| 1537 */ |
| 1538 constructor |
| 1539 } |
| 1540 |
| 1541 /** |
| 1542 * Unlinked summary information about an export declaration (stored outside |
| 1543 * [UnlinkedPublicNamespace]). |
| 1544 */ |
| 1545 abstract class UnlinkedExportNonPublic extends base.SummaryClass { |
| 1546 /** |
| 1547 * Annotations for this export directive. |
| 1548 */ |
| 1549 @Id(3) |
| 1550 List<UnlinkedExpr> get annotations; |
| 1551 |
| 1552 /** |
| 1553 * Offset of the "export" keyword. |
| 1554 */ |
| 1555 @informative |
| 1556 @Id(0) |
| 1557 int get offset; |
| 1558 |
| 1559 /** |
| 1560 * End of the URI string (including quotes) relative to the beginning of the |
| 1561 * file. |
| 1562 */ |
| 1563 @informative |
| 1564 @Id(1) |
| 1565 int get uriEnd; |
| 1566 |
| 1567 /** |
| 1568 * Offset of the URI string (including quotes) relative to the beginning of |
| 1569 * the file. |
| 1570 */ |
| 1571 @informative |
| 1572 @Id(2) |
| 1573 int get uriOffset; |
| 1574 } |
| 1575 |
| 1576 /** |
| 1577 * Unlinked summary information about an export declaration (stored inside |
| 1578 * [UnlinkedPublicNamespace]). |
| 1579 */ |
| 1580 abstract class UnlinkedExportPublic extends base.SummaryClass { |
| 1581 /** |
| 1582 * Combinators contained in this export declaration. |
| 1583 */ |
| 1584 @Id(1) |
| 1585 List<UnlinkedCombinator> get combinators; |
| 1586 |
| 1587 /** |
| 1588 * Configurations used to control which library will actually be loaded at |
| 1589 * run-time. |
| 1590 */ |
| 1591 @Id(2) |
| 1592 List<UnlinkedConfiguration> get configurations; |
| 1593 |
| 1594 /** |
| 1595 * URI used in the source code to reference the exported library. |
| 1596 */ |
| 1597 @Id(0) |
| 1598 String get uri; |
| 1599 } |
| 1600 |
| 1601 /** |
| 1602 * Unlinked summary information about an expression. |
| 1124 * | 1603 * |
| 1125 * Constant expressions are represented using a simple stack-based language | 1604 * Expressions are represented using a simple stack-based language |
| 1126 * where [operations] is a sequence of operations to execute starting with an | 1605 * where [operations] is a sequence of operations to execute starting with an |
| 1127 * empty stack. Once all operations have been executed, the stack should | 1606 * empty stack. Once all operations have been executed, the stack should |
| 1128 * contain a single value which is the value of the constant. Note that some | 1607 * contain a single value which is the value of the constant. Note that some |
| 1129 * operations consume additional data from the other fields of this class. | 1608 * operations consume additional data from the other fields of this class. |
| 1130 */ | 1609 */ |
| 1131 abstract class UnlinkedConst extends base.SummaryClass { | 1610 abstract class UnlinkedExpr extends base.SummaryClass { |
| 1132 /** | 1611 /** |
| 1133 * Sequence of operators used by assignment operations. | 1612 * Sequence of operators used by assignment operations. |
| 1134 */ | 1613 */ |
| 1135 @Id(6) | 1614 @Id(6) |
| 1136 List<UnlinkedExprAssignOperator> get assignmentOperators; | 1615 List<UnlinkedExprAssignOperator> get assignmentOperators; |
| 1137 | 1616 |
| 1138 /** | 1617 /** |
| 1139 * Sequence of 64-bit doubles consumed by the operation `pushDouble`. | 1618 * Sequence of 64-bit doubles consumed by the operation `pushDouble`. |
| 1140 */ | 1619 */ |
| 1141 @Id(4) | 1620 @Id(4) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1154 * expression. | 1633 * expression. |
| 1155 */ | 1634 */ |
| 1156 @Id(5) | 1635 @Id(5) |
| 1157 bool get isValidConst; | 1636 bool get isValidConst; |
| 1158 | 1637 |
| 1159 /** | 1638 /** |
| 1160 * Sequence of operations to execute (starting with an empty stack) to form | 1639 * Sequence of operations to execute (starting with an empty stack) to form |
| 1161 * the constant value. | 1640 * the constant value. |
| 1162 */ | 1641 */ |
| 1163 @Id(0) | 1642 @Id(0) |
| 1164 List<UnlinkedConstOperation> get operations; | 1643 List<UnlinkedExprOperation> get operations; |
| 1165 | 1644 |
| 1166 /** | 1645 /** |
| 1167 * Sequence of language constructs consumed by the operations | 1646 * Sequence of language constructs consumed by the operations |
| 1168 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note | 1647 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note |
| 1169 * that in the case of `pushReference` (and sometimes `invokeConstructor` the | 1648 * that in the case of `pushReference` (and sometimes `invokeConstructor` the |
| 1170 * actual entity being referred to may be something other than a type. | 1649 * actual entity being referred to may be something other than a type. |
| 1171 */ | 1650 */ |
| 1172 @Id(2) | 1651 @Id(2) |
| 1173 List<EntityRef> get references; | 1652 List<EntityRef> get references; |
| 1174 | 1653 |
| 1175 /** | 1654 /** |
| 1176 * Sequence of strings consumed by the operations `pushString` and | 1655 * Sequence of strings consumed by the operations `pushString` and |
| 1177 * `invokeConstructor`. | 1656 * `invokeConstructor`. |
| 1178 */ | 1657 */ |
| 1179 @Id(3) | 1658 @Id(3) |
| 1180 List<String> get strings; | 1659 List<String> get strings; |
| 1181 } | 1660 } |
| 1182 | 1661 |
| 1183 /** | 1662 /** |
| 1663 * Enum representing the various kinds of assignment operations combined |
| 1664 * with: |
| 1665 * [UnlinkedExprOperation.assignToRef], |
| 1666 * [UnlinkedExprOperation.assignToProperty], |
| 1667 * [UnlinkedExprOperation.assignToIndex]. |
| 1668 */ |
| 1669 enum UnlinkedExprAssignOperator { |
| 1670 /** |
| 1671 * Perform simple assignment `target = operand`. |
| 1672 */ |
| 1673 assign, |
| 1674 |
| 1675 /** |
| 1676 * Perform `target ??= operand`. |
| 1677 */ |
| 1678 ifNull, |
| 1679 |
| 1680 /** |
| 1681 * Perform `target *= operand`. |
| 1682 */ |
| 1683 multiply, |
| 1684 |
| 1685 /** |
| 1686 * Perform `target /= operand`. |
| 1687 */ |
| 1688 divide, |
| 1689 |
| 1690 /** |
| 1691 * Perform `target ~/= operand`. |
| 1692 */ |
| 1693 floorDivide, |
| 1694 |
| 1695 /** |
| 1696 * Perform `target %= operand`. |
| 1697 */ |
| 1698 modulo, |
| 1699 |
| 1700 /** |
| 1701 * Perform `target += operand`. |
| 1702 */ |
| 1703 plus, |
| 1704 |
| 1705 /** |
| 1706 * Perform `target -= operand`. |
| 1707 */ |
| 1708 minus, |
| 1709 |
| 1710 /** |
| 1711 * Perform `target <<= operand`. |
| 1712 */ |
| 1713 shiftLeft, |
| 1714 |
| 1715 /** |
| 1716 * Perform `target >>= operand`. |
| 1717 */ |
| 1718 shiftRight, |
| 1719 |
| 1720 /** |
| 1721 * Perform `target &= operand`. |
| 1722 */ |
| 1723 bitAnd, |
| 1724 |
| 1725 /** |
| 1726 * Perform `target ^= operand`. |
| 1727 */ |
| 1728 bitXor, |
| 1729 |
| 1730 /** |
| 1731 * Perform `target |= operand`. |
| 1732 */ |
| 1733 bitOr, |
| 1734 |
| 1735 /** |
| 1736 * Perform `++target`. |
| 1737 */ |
| 1738 prefixIncrement, |
| 1739 |
| 1740 /** |
| 1741 * Perform `--target`. |
| 1742 */ |
| 1743 prefixDecrement, |
| 1744 |
| 1745 /** |
| 1746 * Perform `target++`. |
| 1747 */ |
| 1748 postfixIncrement, |
| 1749 |
| 1750 /** |
| 1751 * Perform `target++`. |
| 1752 */ |
| 1753 postfixDecrement, |
| 1754 } |
| 1755 |
| 1756 /** |
| 1184 * Enum representing the various kinds of operations which may be performed to | 1757 * Enum representing the various kinds of operations which may be performed to |
| 1185 * produce a constant value. These options are assumed to execute in the | 1758 * in an expression. These options are assumed to execute in the |
| 1186 * context of a stack which is initially empty. | 1759 * context of a stack which is initially empty. |
| 1187 */ | 1760 */ |
| 1188 enum UnlinkedConstOperation { | 1761 enum UnlinkedExprOperation { |
| 1189 /** | 1762 /** |
| 1190 * Push the next value from [UnlinkedConst.ints] (a 32-bit unsigned integer) | 1763 * Push the next value from [UnlinkedExpr.ints] (a 32-bit unsigned integer) |
| 1191 * onto the stack. | 1764 * onto the stack. |
| 1192 * | 1765 * |
| 1193 * Note that Dart supports integers larger than 32 bits; these are | 1766 * Note that Dart supports integers larger than 32 bits; these are |
| 1194 * represented by composing 32-bit values using the [pushLongInt] operation. | 1767 * represented by composing 32-bit values using the [pushLongInt] operation. |
| 1195 */ | 1768 */ |
| 1196 pushInt, | 1769 pushInt, |
| 1197 | 1770 |
| 1198 /** | 1771 /** |
| 1199 * Get the number of components from [UnlinkedConst.ints], then do this number | 1772 * Get the number of components from [UnlinkedExpr.ints], then do this number |
| 1200 * of times the following operations: multiple the current value by 2^32, "or" | 1773 * of times the following operations: multiple the current value by 2^32, "or" |
| 1201 * it with the next value in [UnlinkedConst.ints]. The initial value is zero. | 1774 * it with the next value in [UnlinkedExpr.ints]. The initial value is zero. |
| 1202 * Push the result into the stack. | 1775 * Push the result into the stack. |
| 1203 */ | 1776 */ |
| 1204 pushLongInt, | 1777 pushLongInt, |
| 1205 | 1778 |
| 1206 /** | 1779 /** |
| 1207 * Push the next value from [UnlinkedConst.doubles] (a double precision | 1780 * Push the next value from [UnlinkedExpr.doubles] (a double precision |
| 1208 * floating point value) onto the stack. | 1781 * floating point value) onto the stack. |
| 1209 */ | 1782 */ |
| 1210 pushDouble, | 1783 pushDouble, |
| 1211 | 1784 |
| 1212 /** | 1785 /** |
| 1213 * Push the constant `true` onto the stack. | 1786 * Push the constant `true` onto the stack. |
| 1214 */ | 1787 */ |
| 1215 pushTrue, | 1788 pushTrue, |
| 1216 | 1789 |
| 1217 /** | 1790 /** |
| 1218 * Push the constant `false` onto the stack. | 1791 * Push the constant `false` onto the stack. |
| 1219 */ | 1792 */ |
| 1220 pushFalse, | 1793 pushFalse, |
| 1221 | 1794 |
| 1222 /** | 1795 /** |
| 1223 * Push the next value from [UnlinkedConst.strings] onto the stack. | 1796 * Push the next value from [UnlinkedExpr.strings] onto the stack. |
| 1224 */ | 1797 */ |
| 1225 pushString, | 1798 pushString, |
| 1226 | 1799 |
| 1227 /** | 1800 /** |
| 1228 * Pop the top n values from the stack (where n is obtained from | 1801 * Pop the top n values from the stack (where n is obtained from |
| 1229 * [UnlinkedConst.ints]), convert them to strings (if they aren't already), | 1802 * [UnlinkedExpr.ints]), convert them to strings (if they aren't already), |
| 1230 * concatenate them into a single string, and push it back onto the stack. | 1803 * concatenate them into a single string, and push it back onto the stack. |
| 1231 * | 1804 * |
| 1232 * This operation is used to represent constants whose value is a literal | 1805 * This operation is used to represent constants whose value is a literal |
| 1233 * string containing string interpolations. | 1806 * string containing string interpolations. |
| 1234 */ | 1807 */ |
| 1235 concatenate, | 1808 concatenate, |
| 1236 | 1809 |
| 1237 /** | 1810 /** |
| 1238 * Get the next value from [UnlinkedConst.strings], convert it to a symbol, | 1811 * Get the next value from [UnlinkedExpr.strings], convert it to a symbol, |
| 1239 * and push it onto the stack. | 1812 * and push it onto the stack. |
| 1240 */ | 1813 */ |
| 1241 makeSymbol, | 1814 makeSymbol, |
| 1242 | 1815 |
| 1243 /** | 1816 /** |
| 1244 * Push the constant `null` onto the stack. | 1817 * Push the constant `null` onto the stack. |
| 1245 */ | 1818 */ |
| 1246 pushNull, | 1819 pushNull, |
| 1247 | 1820 |
| 1248 /** | 1821 /** |
| 1249 * Push the value of the function parameter with the name obtained from | 1822 * Push the value of the function parameter with the name obtained from |
| 1250 * [UnlinkedConst.strings]. | 1823 * [UnlinkedExpr.strings]. |
| 1251 */ | 1824 */ |
| 1252 pushParameter, | 1825 pushParameter, |
| 1253 | 1826 |
| 1254 /** | 1827 /** |
| 1255 * Evaluate a (potentially qualified) identifier expression and push the | 1828 * Evaluate a (potentially qualified) identifier expression and push the |
| 1256 * resulting value onto the stack. The identifier to be evaluated is | 1829 * resulting value onto the stack. The identifier to be evaluated is |
| 1257 * obtained from [UnlinkedConst.references]. | 1830 * obtained from [UnlinkedExpr.references]. |
| 1258 * | 1831 * |
| 1259 * This operation is used to represent the following kinds of constants | 1832 * This operation is used to represent the following kinds of constants |
| 1260 * (which are indistinguishable from an unresolved AST alone): | 1833 * (which are indistinguishable from an unresolved AST alone): |
| 1261 * | 1834 * |
| 1262 * - A qualified reference to a static constant variable (e.g. `C.v`, where | 1835 * - A qualified reference to a static constant variable (e.g. `C.v`, where |
| 1263 * C is a class and `v` is a constant static variable in `C`). | 1836 * C is a class and `v` is a constant static variable in `C`). |
| 1264 * - An identifier expression referring to a constant variable. | 1837 * - An identifier expression referring to a constant variable. |
| 1265 * - A simple or qualified identifier denoting a class or type alias. | 1838 * - A simple or qualified identifier denoting a class or type alias. |
| 1266 * - A simple or qualified identifier denoting a top-level function or a | 1839 * - A simple or qualified identifier denoting a top-level function or a |
| 1267 * static method. | 1840 * static method. |
| 1268 */ | 1841 */ |
| 1269 pushReference, | 1842 pushReference, |
| 1270 | 1843 |
| 1271 /** | 1844 /** |
| 1272 * Pop the top value from the stack, extract the value of the property with | 1845 * Pop the top value from the stack, extract the value of the property with |
| 1273 * the name obtained from [UnlinkedConst.strings], and push the result back | 1846 * the name obtained from [UnlinkedExpr.strings], and push the result back |
| 1274 * onto the stack. | 1847 * onto the stack. |
| 1275 */ | 1848 */ |
| 1276 extractProperty, | 1849 extractProperty, |
| 1277 | 1850 |
| 1278 /** | 1851 /** |
| 1279 * Pop the top `n` values from the stack (where `n` is obtained from | 1852 * Pop the top `n` values from the stack (where `n` is obtained from |
| 1280 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next | 1853 * [UnlinkedExpr.ints]) into a list (filled from the end) and take the next |
| 1281 * `n` values from [UnlinkedConst.strings] and use the lists of names and | 1854 * `n` values from [UnlinkedExpr.strings] and use the lists of names and |
| 1282 * values to create named arguments. Then pop the top `m` values from the | 1855 * values to create named arguments. Then pop the top `m` values from the |
| 1283 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled | 1856 * stack (where `m` is obtained from [UnlinkedExpr.ints]) into a list (filled |
| 1284 * from the end) and use them as positional arguments. Use the lists of | 1857 * from the end) and use them as positional arguments. Use the lists of |
| 1285 * positional and names arguments to invoke a constant constructor obtained | 1858 * positional and names arguments to invoke a constant constructor obtained |
| 1286 * from [UnlinkedConst.references], and push the resulting value back onto the | 1859 * from [UnlinkedExpr.references], and push the resulting value back onto the |
| 1287 * stack. | 1860 * stack. |
| 1288 * | 1861 * |
| 1289 * Note that for an invocation of the form `const a.b(...)` (where no type | 1862 * Note that for an invocation of the form `const a.b(...)` (where no type |
| 1290 * arguments are specified), it is impossible to tell from the unresolved AST | 1863 * arguments are specified), it is impossible to tell from the unresolved AST |
| 1291 * alone whether `a` is a class name and `b` is a constructor name, or `a` is | 1864 * alone whether `a` is a class name and `b` is a constructor name, or `a` is |
| 1292 * a prefix name and `b` is a class name. For consistency between AST based | 1865 * a prefix name and `b` is a class name. For consistency between AST based |
| 1293 * and elements based summaries, references to default constructors are always | 1866 * and elements based summaries, references to default constructors are always |
| 1294 * recorded as references to corresponding classes. | 1867 * recorded as references to corresponding classes. |
| 1295 */ | 1868 */ |
| 1296 invokeConstructor, | 1869 invokeConstructor, |
| 1297 | 1870 |
| 1298 /** | 1871 /** |
| 1299 * Pop the top n values from the stack (where n is obtained from | 1872 * Pop the top n values from the stack (where n is obtained from |
| 1300 * [UnlinkedConst.ints]), place them in a [List], and push the result back | 1873 * [UnlinkedExpr.ints]), place them in a [List], and push the result back |
| 1301 * onto the stack. The type parameter for the [List] is implicitly `dynamic`. | 1874 * onto the stack. The type parameter for the [List] is implicitly `dynamic`. |
| 1302 */ | 1875 */ |
| 1303 makeUntypedList, | 1876 makeUntypedList, |
| 1304 | 1877 |
| 1305 /** | 1878 /** |
| 1306 * Pop the top 2*n values from the stack (where n is obtained from | 1879 * Pop the top 2*n values from the stack (where n is obtained from |
| 1307 * [UnlinkedConst.ints]), interpret them as key/value pairs, place them in a | 1880 * [UnlinkedExpr.ints]), interpret them as key/value pairs, place them in a |
| 1308 * [Map], and push the result back onto the stack. The two type parameters | 1881 * [Map], and push the result back onto the stack. The two type parameters |
| 1309 * for the [Map] are implicitly `dynamic`. | 1882 * for the [Map] are implicitly `dynamic`. |
| 1310 */ | 1883 */ |
| 1311 makeUntypedMap, | 1884 makeUntypedMap, |
| 1312 | 1885 |
| 1313 /** | 1886 /** |
| 1314 * Pop the top n values from the stack (where n is obtained from | 1887 * Pop the top n values from the stack (where n is obtained from |
| 1315 * [UnlinkedConst.ints]), place them in a [List], and push the result back | 1888 * [UnlinkedExpr.ints]), place them in a [List], and push the result back |
| 1316 * onto the stack. The type parameter for the [List] is obtained from | 1889 * onto the stack. The type parameter for the [List] is obtained from |
| 1317 * [UnlinkedConst.references]. | 1890 * [UnlinkedExpr.references]. |
| 1318 */ | 1891 */ |
| 1319 makeTypedList, | 1892 makeTypedList, |
| 1320 | 1893 |
| 1321 /** | 1894 /** |
| 1322 * Pop the top 2*n values from the stack (where n is obtained from | 1895 * Pop the top 2*n values from the stack (where n is obtained from |
| 1323 * [UnlinkedConst.ints]), interpret them as key/value pairs, place them in a | 1896 * [UnlinkedExpr.ints]), interpret them as key/value pairs, place them in a |
| 1324 * [Map], and push the result back onto the stack. The two type parameters fo
r | 1897 * [Map], and push the result back onto the stack. The two type parameters fo
r |
| 1325 * the [Map] are obtained from [UnlinkedConst.references]. | 1898 * the [Map] are obtained from [UnlinkedExpr.references]. |
| 1326 */ | 1899 */ |
| 1327 makeTypedMap, | 1900 makeTypedMap, |
| 1328 | 1901 |
| 1329 /** | 1902 /** |
| 1330 * Pop the top 2 values from the stack, evaluate `v1 == v2`, and push the | 1903 * Pop the top 2 values from the stack, evaluate `v1 == v2`, and push the |
| 1331 * result back onto the stack. | 1904 * result back onto the stack. |
| 1332 */ | 1905 */ |
| 1333 equal, | 1906 equal, |
| 1334 | 1907 |
| 1335 /** | 1908 /** |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 modulo, | 2032 modulo, |
| 1460 | 2033 |
| 1461 /** | 2034 /** |
| 1462 * Pop the top 3 values from the stack, compute `v1 ? v2 : v3`, and push the | 2035 * Pop the top 3 values from the stack, compute `v1 ? v2 : v3`, and push the |
| 1463 * result back onto the stack. | 2036 * result back onto the stack. |
| 1464 */ | 2037 */ |
| 1465 conditional, | 2038 conditional, |
| 1466 | 2039 |
| 1467 /** | 2040 /** |
| 1468 * Pop from the stack `value` and get the next `target` reference from | 2041 * Pop from the stack `value` and get the next `target` reference from |
| 1469 * [UnlinkedConst.references] - a top-level variable (prefixed or not), an | 2042 * [UnlinkedExpr.references] - a top-level variable (prefixed or not), an |
| 1470 * assignable field of a class (prefixed or not), or a sequence of getters | 2043 * assignable field of a class (prefixed or not), or a sequence of getters |
| 1471 * ending with an assignable property `a.b.b.c.d.e`. In general `a.b` cannot | 2044 * ending with an assignable property `a.b.b.c.d.e`. In general `a.b` cannot |
| 1472 * not be distinguished between: `a` is a prefix and `b` is a top-level | 2045 * not be distinguished between: `a` is a prefix and `b` is a top-level |
| 1473 * variable; or `a` is an object and `b` is the name of a property. Perform | 2046 * variable; or `a` is an object and `b` is the name of a property. Perform |
| 1474 * `reference op= value` where `op` is the next assignment operator from | 2047 * `reference op= value` where `op` is the next assignment operator from |
| 1475 * [UnlinkedConst.assignmentOperators]. Push `value` back into the stack. | 2048 * [UnlinkedExpr.assignmentOperators]. Push `value` back into the stack. |
| 1476 * | 2049 * |
| 1477 * If the assignment operator is a prefix/postfix increment/decrement, then | 2050 * If the assignment operator is a prefix/postfix increment/decrement, then |
| 1478 * `value` is not present in the stack, so it should not be popped and the | 2051 * `value` is not present in the stack, so it should not be popped and the |
| 1479 * corresponding value of the `target` after/before update is pushed into the | 2052 * corresponding value of the `target` after/before update is pushed into the |
| 1480 * stack instead. | 2053 * stack instead. |
| 1481 */ | 2054 */ |
| 1482 assignToRef, | 2055 assignToRef, |
| 1483 | 2056 |
| 1484 /** | 2057 /** |
| 1485 * Pop from the stack `target` and `value`. Get the name of the property from | 2058 * Pop from the stack `target` and `value`. Get the name of the property from |
| 1486 * `UnlinkedConst.strings` and assign the `value` to the named property of the | 2059 * `UnlinkedConst.strings` and assign the `value` to the named property of the |
| 1487 * `target`. This operation is used when we know that the `target` is an | 2060 * `target`. This operation is used when we know that the `target` is an |
| 1488 * object reference expression, e.g. `new Foo().a.b.c` or `a.b[0].c.d`. | 2061 * object reference expression, e.g. `new Foo().a.b.c` or `a.b[0].c.d`. |
| 1489 * Perform `target.property op= value` where `op` is the next assignment | 2062 * Perform `target.property op= value` where `op` is the next assignment |
| 1490 * operator from [UnlinkedConst.assignmentOperators]. Push `value` back into | 2063 * operator from [UnlinkedExpr.assignmentOperators]. Push `value` back into |
| 1491 * the stack. | 2064 * the stack. |
| 1492 * | 2065 * |
| 1493 * If the assignment operator is a prefix/postfix increment/decrement, then | 2066 * If the assignment operator is a prefix/postfix increment/decrement, then |
| 1494 * `value` is not present in the stack, so it should not be popped and the | 2067 * `value` is not present in the stack, so it should not be popped and the |
| 1495 * corresponding value of the `target` after/before update is pushed into the | 2068 * corresponding value of the `target` after/before update is pushed into the |
| 1496 * stack instead. | 2069 * stack instead. |
| 1497 */ | 2070 */ |
| 1498 assignToProperty, | 2071 assignToProperty, |
| 1499 | 2072 |
| 1500 /** | 2073 /** |
| 1501 * Pop from the stack `index`, `target` and `value`. Perform | 2074 * Pop from the stack `index`, `target` and `value`. Perform |
| 1502 * `target[index] op= value` where `op` is the next assignment operator from | 2075 * `target[index] op= value` where `op` is the next assignment operator from |
| 1503 * [UnlinkedConst.assignmentOperators]. Push `value` back into the stack. | 2076 * [UnlinkedExpr.assignmentOperators]. Push `value` back into the stack. |
| 1504 * | 2077 * |
| 1505 * If the assignment operator is a prefix/postfix increment/decrement, then | 2078 * If the assignment operator is a prefix/postfix increment/decrement, then |
| 1506 * `value` is not present in the stack, so it should not be popped and the | 2079 * `value` is not present in the stack, so it should not be popped and the |
| 1507 * corresponding value of the `target` after/before update is pushed into the | 2080 * corresponding value of the `target` after/before update is pushed into the |
| 1508 * stack instead. | 2081 * stack instead. |
| 1509 */ | 2082 */ |
| 1510 assignToIndex, | 2083 assignToIndex, |
| 1511 | 2084 |
| 1512 /** | 2085 /** |
| 1513 * Pop from the stack `index` and `target`. Push into the stack the result | 2086 * Pop from the stack `index` and `target`. Push into the stack the result |
| 1514 * of evaluation of `target[index]`. | 2087 * of evaluation of `target[index]`. |
| 1515 */ | 2088 */ |
| 1516 extractIndex, | 2089 extractIndex, |
| 1517 | 2090 |
| 1518 /** | 2091 /** |
| 1519 * Pop the top `n` values from the stack (where `n` is obtained from | 2092 * Pop the top `n` values from the stack (where `n` is obtained from |
| 1520 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next | 2093 * [UnlinkedExpr.ints]) into a list (filled from the end) and take the next |
| 1521 * `n` values from [UnlinkedConst.strings] and use the lists of names and | 2094 * `n` values from [UnlinkedExpr.strings] and use the lists of names and |
| 1522 * values to create named arguments. Then pop the top `m` values from the | 2095 * values to create named arguments. Then pop the top `m` values from the |
| 1523 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled | 2096 * stack (where `m` is obtained from [UnlinkedExpr.ints]) into a list (filled |
| 1524 * from the end) and use them as positional arguments. Use the lists of | 2097 * from the end) and use them as positional arguments. Use the lists of |
| 1525 * positional and names arguments to invoke a method (or a function) with | 2098 * positional and names arguments to invoke a method (or a function) with |
| 1526 * the reference from [UnlinkedConst.references]. If `k` is nonzero (where | 2099 * the reference from [UnlinkedExpr.references]. If `k` is nonzero (where |
| 1527 * `k` is obtained from [UnlinkedConst.ints]), obtain `k` type arguments from | 2100 * `k` is obtained from [UnlinkedExpr.ints]), obtain `k` type arguments from |
| 1528 * [UnlinkedConst.references] and use them as generic type arguments for the | 2101 * [UnlinkedExpr.references] and use them as generic type arguments for the |
| 1529 * aforementioned method or function. Push the result of the invocation onto | 2102 * aforementioned method or function. Push the result of the invocation onto |
| 1530 * the stack. | 2103 * the stack. |
| 1531 * | 2104 * |
| 1532 * In general `a.b` cannot not be distinguished between: `a` is a prefix and | 2105 * In general `a.b` cannot not be distinguished between: `a` is a prefix and |
| 1533 * `b` is a top-level function; or `a` is an object and `b` is the name of a | 2106 * `b` is a top-level function; or `a` is an object and `b` is the name of a |
| 1534 * method. This operation should be used for a sequence of identifiers | 2107 * method. This operation should be used for a sequence of identifiers |
| 1535 * `a.b.b.c.d.e` ending with an invokable result. | 2108 * `a.b.b.c.d.e` ending with an invokable result. |
| 1536 */ | 2109 */ |
| 1537 invokeMethodRef, | 2110 invokeMethodRef, |
| 1538 | 2111 |
| 1539 /** | 2112 /** |
| 1540 * Pop the top `n` values from the stack (where `n` is obtained from | 2113 * Pop the top `n` values from the stack (where `n` is obtained from |
| 1541 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next | 2114 * [UnlinkedExpr.ints]) into a list (filled from the end) and take the next |
| 1542 * `n` values from [UnlinkedConst.strings] and use the lists of names and | 2115 * `n` values from [UnlinkedExpr.strings] and use the lists of names and |
| 1543 * values to create named arguments. Then pop the top `m` values from the | 2116 * values to create named arguments. Then pop the top `m` values from the |
| 1544 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled | 2117 * stack (where `m` is obtained from [UnlinkedExpr.ints]) into a list (filled |
| 1545 * from the end) and use them as positional arguments. Use the lists of | 2118 * from the end) and use them as positional arguments. Use the lists of |
| 1546 * positional and names arguments to invoke the method with the name from | 2119 * positional and names arguments to invoke the method with the name from |
| 1547 * [UnlinkedConst.strings] of the target popped from the stack. If `k` is | 2120 * [UnlinkedExpr.strings] of the target popped from the stack. If `k` is |
| 1548 * nonzero (where `k` is obtained from [UnlinkedConst.ints]), obtain `k` type | 2121 * nonzero (where `k` is obtained from [UnlinkedExpr.ints]), obtain `k` type |
| 1549 * arguments from [UnlinkedConst.references] and use them as generic type | 2122 * arguments from [UnlinkedExpr.references] and use them as generic type |
| 1550 * arguments for the aforementioned method. Push the result of the | 2123 * arguments for the aforementioned method. Push the result of the |
| 1551 * invocation onto the stack. | 2124 * invocation onto the stack. |
| 1552 * | 2125 * |
| 1553 * This operation should be used for invocation of a method invocation | 2126 * This operation should be used for invocation of a method invocation |
| 1554 * where `target` is known to be an object instance. | 2127 * where `target` is known to be an object instance. |
| 1555 */ | 2128 */ |
| 1556 invokeMethod, | 2129 invokeMethod, |
| 1557 | 2130 |
| 1558 /** | 2131 /** |
| 1559 * Begin a new cascade section. Duplicate the top value of the stack. | 2132 * Begin a new cascade section. Duplicate the top value of the stack. |
| 1560 */ | 2133 */ |
| 1561 cascadeSectionBegin, | 2134 cascadeSectionBegin, |
| 1562 | 2135 |
| 1563 /** | 2136 /** |
| 1564 * End a new cascade section. Pop the top value from the stack and throw it | 2137 * End a new cascade section. Pop the top value from the stack and throw it |
| 1565 * away. | 2138 * away. |
| 1566 */ | 2139 */ |
| 1567 cascadeSectionEnd, | 2140 cascadeSectionEnd, |
| 1568 | 2141 |
| 1569 /** | 2142 /** |
| 1570 * Pop the top value from the stack and cast it to the type with reference | 2143 * Pop the top value from the stack and cast it to the type with reference |
| 1571 * from [UnlinkedConst.references], push the result into the stack. | 2144 * from [UnlinkedExpr.references], push the result into the stack. |
| 1572 */ | 2145 */ |
| 1573 typeCast, | 2146 typeCast, |
| 1574 | 2147 |
| 1575 /** | 2148 /** |
| 1576 * Pop the top value from the stack and check whether it is a subclass of the | 2149 * Pop the top value from the stack and check whether it is a subclass of the |
| 1577 * type with reference from [UnlinkedConst.references], push the result into | 2150 * type with reference from [UnlinkedExpr.references], push the result into |
| 1578 * the stack. | 2151 * the stack. |
| 1579 */ | 2152 */ |
| 1580 typeCheck, | 2153 typeCheck, |
| 1581 | 2154 |
| 1582 /** | 2155 /** |
| 1583 * Pop the top value from the stack and raise an exception with this value. | 2156 * Pop the top value from the stack and raise an exception with this value. |
| 1584 */ | 2157 */ |
| 1585 throwException, | 2158 throwException, |
| 1586 | 2159 |
| 1587 /** | 2160 /** |
| 1588 * Obtain two values `n` and `m` from [UnlinkedConst.ints]. Then, starting at | 2161 * Obtain two values `n` and `m` from [UnlinkedExpr.ints]. Then, starting at |
| 1589 * the executable element for the expression being evaluated, if n > 0, pop to | 2162 * the executable element for the expression being evaluated, if n > 0, pop to |
| 1590 * the nth enclosing function element. Then, push the mth local function of | 2163 * the nth enclosing function element. Then, push the mth local function of |
| 1591 * that element onto the stack. | 2164 * that element onto the stack. |
| 1592 */ | 2165 */ |
| 1593 pushLocalFunctionReference, | 2166 pushLocalFunctionReference, |
| 1594 } | 2167 } |
| 1595 | 2168 |
| 1596 /** | 2169 /** |
| 1597 * Unlinked summary information about a constructor initializer. | |
| 1598 */ | |
| 1599 abstract class UnlinkedConstructorInitializer extends base.SummaryClass { | |
| 1600 /** | |
| 1601 * If there are `m` [arguments] and `n` [argumentNames], then each argument | |
| 1602 * from [arguments] with index `i` such that `n + i - m >= 0`, should be used | |
| 1603 * with the name at `n + i - m`. | |
| 1604 */ | |
| 1605 @Id(4) | |
| 1606 List<String> get argumentNames; | |
| 1607 | |
| 1608 /** | |
| 1609 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the | |
| 1610 * invocation. Otherwise empty. | |
| 1611 */ | |
| 1612 @Id(3) | |
| 1613 List<UnlinkedConst> get arguments; | |
| 1614 | |
| 1615 /** | |
| 1616 * If [kind] is `field`, the expression of the field initializer. | |
| 1617 * Otherwise `null`. | |
| 1618 */ | |
| 1619 @Id(1) | |
| 1620 UnlinkedConst get expression; | |
| 1621 | |
| 1622 /** | |
| 1623 * The kind of the constructor initializer (field, redirect, super). | |
| 1624 */ | |
| 1625 @Id(2) | |
| 1626 UnlinkedConstructorInitializerKind get kind; | |
| 1627 | |
| 1628 /** | |
| 1629 * If [kind] is `field`, the name of the field declared in the class. If | |
| 1630 * [kind] is `thisInvocation`, the name of the constructor, declared in this | |
| 1631 * class, to redirect to. If [kind] is `superInvocation`, the name of the | |
| 1632 * constructor, declared in the superclass, to invoke. | |
| 1633 */ | |
| 1634 @Id(0) | |
| 1635 String get name; | |
| 1636 } | |
| 1637 | |
| 1638 /** | |
| 1639 * Enum used to indicate the kind of an constructor initializer. | |
| 1640 */ | |
| 1641 enum UnlinkedConstructorInitializerKind { | |
| 1642 /** | |
| 1643 * Initialization of a field. | |
| 1644 */ | |
| 1645 field, | |
| 1646 | |
| 1647 /** | |
| 1648 * Invocation of a constructor in the same class. | |
| 1649 */ | |
| 1650 thisInvocation, | |
| 1651 | |
| 1652 /** | |
| 1653 * Invocation of a superclass' constructor. | |
| 1654 */ | |
| 1655 superInvocation | |
| 1656 } | |
| 1657 | |
| 1658 /** | |
| 1659 * Unlinked summary information about a documentation comment. | |
| 1660 */ | |
| 1661 abstract class UnlinkedDocumentationComment extends base.SummaryClass { | |
| 1662 /** | |
| 1663 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). | |
| 1664 */ | |
| 1665 @Id(0) | |
| 1666 @deprecated | |
| 1667 int get length; | |
| 1668 | |
| 1669 /** | |
| 1670 * Offset of the beginning of the documentation comment relative to the | |
| 1671 * beginning of the file. | |
| 1672 */ | |
| 1673 @Id(2) | |
| 1674 @deprecated | |
| 1675 int get offset; | |
| 1676 | |
| 1677 /** | |
| 1678 * Text of the documentation comment, with '\r\n' replaced by '\n'. | |
| 1679 * | |
| 1680 * References appearing within the doc comment in square brackets are not | |
| 1681 * specially encoded. | |
| 1682 */ | |
| 1683 @Id(1) | |
| 1684 String get text; | |
| 1685 } | |
| 1686 | |
| 1687 /** | |
| 1688 * Unlinked summary information about an enum declaration. | |
| 1689 */ | |
| 1690 abstract class UnlinkedEnum extends base.SummaryClass { | |
| 1691 /** | |
| 1692 * Annotations for this enum. | |
| 1693 */ | |
| 1694 @Id(4) | |
| 1695 List<UnlinkedConst> get annotations; | |
| 1696 | |
| 1697 /** | |
| 1698 * Code range of the enum. | |
| 1699 */ | |
| 1700 @informative | |
| 1701 @Id(5) | |
| 1702 CodeRange get codeRange; | |
| 1703 | |
| 1704 /** | |
| 1705 * Documentation comment for the enum, or `null` if there is no documentation | |
| 1706 * comment. | |
| 1707 */ | |
| 1708 @informative | |
| 1709 @Id(3) | |
| 1710 UnlinkedDocumentationComment get documentationComment; | |
| 1711 | |
| 1712 /** | |
| 1713 * Name of the enum type. | |
| 1714 */ | |
| 1715 @Id(0) | |
| 1716 String get name; | |
| 1717 | |
| 1718 /** | |
| 1719 * Offset of the enum name relative to the beginning of the file. | |
| 1720 */ | |
| 1721 @informative | |
| 1722 @Id(1) | |
| 1723 int get nameOffset; | |
| 1724 | |
| 1725 /** | |
| 1726 * Values listed in the enum declaration, in declaration order. | |
| 1727 */ | |
| 1728 @Id(2) | |
| 1729 List<UnlinkedEnumValue> get values; | |
| 1730 } | |
| 1731 | |
| 1732 /** | |
| 1733 * Unlinked summary information about a single enumerated value in an enum | |
| 1734 * declaration. | |
| 1735 */ | |
| 1736 abstract class UnlinkedEnumValue extends base.SummaryClass { | |
| 1737 /** | |
| 1738 * Documentation comment for the enum value, or `null` if there is no | |
| 1739 * documentation comment. | |
| 1740 */ | |
| 1741 @informative | |
| 1742 @Id(2) | |
| 1743 UnlinkedDocumentationComment get documentationComment; | |
| 1744 | |
| 1745 /** | |
| 1746 * Name of the enumerated value. | |
| 1747 */ | |
| 1748 @Id(0) | |
| 1749 String get name; | |
| 1750 | |
| 1751 /** | |
| 1752 * Offset of the enum value name relative to the beginning of the file. | |
| 1753 */ | |
| 1754 @informative | |
| 1755 @Id(1) | |
| 1756 int get nameOffset; | |
| 1757 } | |
| 1758 | |
| 1759 /** | |
| 1760 * Unlinked summary information about a function, method, getter, or setter | |
| 1761 * declaration. | |
| 1762 */ | |
| 1763 abstract class UnlinkedExecutable extends base.SummaryClass { | |
| 1764 /** | |
| 1765 * Annotations for this executable. | |
| 1766 */ | |
| 1767 @Id(6) | |
| 1768 List<UnlinkedConst> get annotations; | |
| 1769 | |
| 1770 /** | |
| 1771 * If this executable's function body is declared using `=>`, the expression | |
| 1772 * to the right of the `=>`. May be omitted if neither type inference nor | |
| 1773 * constant evaluation depends on the function body. | |
| 1774 */ | |
| 1775 @Id(29) | |
| 1776 UnlinkedConst get bodyExpr; | |
| 1777 | |
| 1778 /** | |
| 1779 * Code range of the executable. | |
| 1780 */ | |
| 1781 @informative | |
| 1782 @Id(26) | |
| 1783 CodeRange get codeRange; | |
| 1784 | |
| 1785 /** | |
| 1786 * If a constant [UnlinkedExecutableKind.constructor], the constructor | |
| 1787 * initializers. Otherwise empty. | |
| 1788 */ | |
| 1789 @Id(14) | |
| 1790 List<UnlinkedConstructorInitializer> get constantInitializers; | |
| 1791 | |
| 1792 /** | |
| 1793 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, | |
| 1794 * a nonzero slot id which is unique within this compilation unit. If this id | |
| 1795 * is found in [LinkedUnit.constCycles], then this constructor is part of a | |
| 1796 * cycle. | |
| 1797 * | |
| 1798 * Otherwise, zero. | |
| 1799 */ | |
| 1800 @Id(25) | |
| 1801 int get constCycleSlot; | |
| 1802 | |
| 1803 /** | |
| 1804 * Documentation comment for the executable, or `null` if there is no | |
| 1805 * documentation comment. | |
| 1806 */ | |
| 1807 @informative | |
| 1808 @Id(7) | |
| 1809 UnlinkedDocumentationComment get documentationComment; | |
| 1810 | |
| 1811 /** | |
| 1812 * If this executable's return type is inferable, nonzero slot id | |
| 1813 * identifying which entry in [LinkedUnit.types] contains the inferred | |
| 1814 * return type. If there is no matching entry in [LinkedUnit.types], then | |
| 1815 * no return type was inferred for this variable, so its static type is | |
| 1816 * `dynamic`. | |
| 1817 */ | |
| 1818 @Id(5) | |
| 1819 int get inferredReturnTypeSlot; | |
| 1820 | |
| 1821 /** | |
| 1822 * Indicates whether the executable is declared using the `abstract` keyword. | |
| 1823 */ | |
| 1824 @Id(10) | |
| 1825 bool get isAbstract; | |
| 1826 | |
| 1827 /** | |
| 1828 * Indicates whether the executable has body marked as being asynchronous. | |
| 1829 */ | |
| 1830 @informative | |
| 1831 @Id(27) | |
| 1832 bool get isAsynchronous; | |
| 1833 | |
| 1834 /** | |
| 1835 * Indicates whether the executable is declared using the `const` keyword. | |
| 1836 */ | |
| 1837 @Id(12) | |
| 1838 bool get isConst; | |
| 1839 | |
| 1840 /** | |
| 1841 * Indicates whether the executable is declared using the `external` keyword. | |
| 1842 */ | |
| 1843 @Id(11) | |
| 1844 bool get isExternal; | |
| 1845 | |
| 1846 /** | |
| 1847 * Indicates whether the executable is declared using the `factory` keyword. | |
| 1848 */ | |
| 1849 @Id(8) | |
| 1850 bool get isFactory; | |
| 1851 | |
| 1852 /** | |
| 1853 * Indicates whether the executable has body marked as being a generator. | |
| 1854 */ | |
| 1855 @informative | |
| 1856 @Id(28) | |
| 1857 bool get isGenerator; | |
| 1858 | |
| 1859 /** | |
| 1860 * Indicates whether the executable is a redirected constructor. | |
| 1861 */ | |
| 1862 @Id(13) | |
| 1863 bool get isRedirectedConstructor; | |
| 1864 | |
| 1865 /** | |
| 1866 * Indicates whether the executable is declared using the `static` keyword. | |
| 1867 * | |
| 1868 * Note that for top level executables, this flag is false, since they are | |
| 1869 * not declared using the `static` keyword (even though they are considered | |
| 1870 * static for semantic purposes). | |
| 1871 */ | |
| 1872 @Id(9) | |
| 1873 bool get isStatic; | |
| 1874 | |
| 1875 /** | |
| 1876 * The kind of the executable (function/method, getter, setter, or | |
| 1877 * constructor). | |
| 1878 */ | |
| 1879 @Id(4) | |
| 1880 UnlinkedExecutableKind get kind; | |
| 1881 | |
| 1882 /** | |
| 1883 * The list of local functions. | |
| 1884 */ | |
| 1885 @Id(18) | |
| 1886 List<UnlinkedExecutable> get localFunctions; | |
| 1887 | |
| 1888 /** | |
| 1889 * The list of local labels. | |
| 1890 */ | |
| 1891 @informative | |
| 1892 @Id(22) | |
| 1893 List<UnlinkedLabel> get localLabels; | |
| 1894 | |
| 1895 /** | |
| 1896 * The list of local variables. | |
| 1897 */ | |
| 1898 @informative | |
| 1899 @Id(19) | |
| 1900 List<UnlinkedVariable> get localVariables; | |
| 1901 | |
| 1902 /** | |
| 1903 * Name of the executable. For setters, this includes the trailing "=". For | |
| 1904 * named constructors, this excludes the class name and excludes the ".". | |
| 1905 * For unnamed constructors, this is the empty string. | |
| 1906 */ | |
| 1907 @Id(1) | |
| 1908 String get name; | |
| 1909 | |
| 1910 /** | |
| 1911 * If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty, | |
| 1912 * the offset of the end of the constructor name. Otherwise zero. | |
| 1913 */ | |
| 1914 @informative | |
| 1915 @Id(23) | |
| 1916 int get nameEnd; | |
| 1917 | |
| 1918 /** | |
| 1919 * Offset of the executable name relative to the beginning of the file. For | |
| 1920 * named constructors, this excludes the class name and excludes the ".". | |
| 1921 * For unnamed constructors, this is the offset of the class name (i.e. the | |
| 1922 * offset of the second "C" in "class C { C(); }"). | |
| 1923 */ | |
| 1924 @informative | |
| 1925 @Id(0) | |
| 1926 int get nameOffset; | |
| 1927 | |
| 1928 /** | |
| 1929 * Parameters of the executable, if any. Note that getters have no | |
| 1930 * parameters (hence this will be the empty list), and setters have a single | |
| 1931 * parameter. | |
| 1932 */ | |
| 1933 @Id(2) | |
| 1934 List<UnlinkedParam> get parameters; | |
| 1935 | |
| 1936 /** | |
| 1937 * If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty, | |
| 1938 * the offset of the period before the constructor name. Otherwise zero. | |
| 1939 */ | |
| 1940 @informative | |
| 1941 @Id(24) | |
| 1942 int get periodOffset; | |
| 1943 | |
| 1944 /** | |
| 1945 * If [isRedirectedConstructor] and [isFactory] are both `true`, the | |
| 1946 * constructor to which this constructor redirects; otherwise empty. | |
| 1947 */ | |
| 1948 @Id(15) | |
| 1949 EntityRef get redirectedConstructor; | |
| 1950 | |
| 1951 /** | |
| 1952 * If [isRedirectedConstructor] is `true` and [isFactory] is `false`, the | |
| 1953 * name of the constructor that this constructor redirects to; otherwise | |
| 1954 * empty. | |
| 1955 */ | |
| 1956 @Id(17) | |
| 1957 String get redirectedConstructorName; | |
| 1958 | |
| 1959 /** | |
| 1960 * Declared return type of the executable. Absent if the executable is a | |
| 1961 * constructor or the return type is implicit. Absent for executables | |
| 1962 * associated with variable initializers and closures, since these | |
| 1963 * executables may have return types that are not accessible via direct | |
| 1964 * imports. | |
| 1965 */ | |
| 1966 @Id(3) | |
| 1967 EntityRef get returnType; | |
| 1968 | |
| 1969 /** | |
| 1970 * Type parameters of the executable, if any. Empty if support for generic | |
| 1971 * method syntax is disabled. | |
| 1972 */ | |
| 1973 @Id(16) | |
| 1974 List<UnlinkedTypeParam> get typeParameters; | |
| 1975 | |
| 1976 /** | |
| 1977 * If a local function, the length of the visible range; zero otherwise. | |
| 1978 */ | |
| 1979 @informative | |
| 1980 @Id(20) | |
| 1981 int get visibleLength; | |
| 1982 | |
| 1983 /** | |
| 1984 * If a local function, the beginning of the visible range; zero otherwise. | |
| 1985 */ | |
| 1986 @informative | |
| 1987 @Id(21) | |
| 1988 int get visibleOffset; | |
| 1989 } | |
| 1990 | |
| 1991 /** | |
| 1992 * Enum used to indicate the kind of an executable. | |
| 1993 */ | |
| 1994 enum UnlinkedExecutableKind { | |
| 1995 /** | |
| 1996 * Executable is a function or method. | |
| 1997 */ | |
| 1998 functionOrMethod, | |
| 1999 | |
| 2000 /** | |
| 2001 * Executable is a getter. | |
| 2002 */ | |
| 2003 getter, | |
| 2004 | |
| 2005 /** | |
| 2006 * Executable is a setter. | |
| 2007 */ | |
| 2008 setter, | |
| 2009 | |
| 2010 /** | |
| 2011 * Executable is a constructor. | |
| 2012 */ | |
| 2013 constructor | |
| 2014 } | |
| 2015 | |
| 2016 /** | |
| 2017 * Unlinked summary information about an export declaration (stored outside | |
| 2018 * [UnlinkedPublicNamespace]). | |
| 2019 */ | |
| 2020 abstract class UnlinkedExportNonPublic extends base.SummaryClass { | |
| 2021 /** | |
| 2022 * Annotations for this export directive. | |
| 2023 */ | |
| 2024 @Id(3) | |
| 2025 List<UnlinkedConst> get annotations; | |
| 2026 | |
| 2027 /** | |
| 2028 * Offset of the "export" keyword. | |
| 2029 */ | |
| 2030 @informative | |
| 2031 @Id(0) | |
| 2032 int get offset; | |
| 2033 | |
| 2034 /** | |
| 2035 * End of the URI string (including quotes) relative to the beginning of the | |
| 2036 * file. | |
| 2037 */ | |
| 2038 @informative | |
| 2039 @Id(1) | |
| 2040 int get uriEnd; | |
| 2041 | |
| 2042 /** | |
| 2043 * Offset of the URI string (including quotes) relative to the beginning of | |
| 2044 * the file. | |
| 2045 */ | |
| 2046 @informative | |
| 2047 @Id(2) | |
| 2048 int get uriOffset; | |
| 2049 } | |
| 2050 | |
| 2051 /** | |
| 2052 * Unlinked summary information about an export declaration (stored inside | |
| 2053 * [UnlinkedPublicNamespace]). | |
| 2054 */ | |
| 2055 abstract class UnlinkedExportPublic extends base.SummaryClass { | |
| 2056 /** | |
| 2057 * Combinators contained in this export declaration. | |
| 2058 */ | |
| 2059 @Id(1) | |
| 2060 List<UnlinkedCombinator> get combinators; | |
| 2061 | |
| 2062 /** | |
| 2063 * Configurations used to control which library will actually be loaded at | |
| 2064 * run-time. | |
| 2065 */ | |
| 2066 @Id(2) | |
| 2067 List<UnlinkedConfiguration> get configurations; | |
| 2068 | |
| 2069 /** | |
| 2070 * URI used in the source code to reference the exported library. | |
| 2071 */ | |
| 2072 @Id(0) | |
| 2073 String get uri; | |
| 2074 } | |
| 2075 | |
| 2076 /** | |
| 2077 * Enum representing the various kinds of assignment operations combined | |
| 2078 * with: | |
| 2079 * [UnlinkedConstOperation.assignToRef], | |
| 2080 * [UnlinkedConstOperation.assignToProperty], | |
| 2081 * [UnlinkedConstOperation.assignToIndex]. | |
| 2082 */ | |
| 2083 enum UnlinkedExprAssignOperator { | |
| 2084 /** | |
| 2085 * Perform simple assignment `target = operand`. | |
| 2086 */ | |
| 2087 assign, | |
| 2088 | |
| 2089 /** | |
| 2090 * Perform `target ??= operand`. | |
| 2091 */ | |
| 2092 ifNull, | |
| 2093 | |
| 2094 /** | |
| 2095 * Perform `target *= operand`. | |
| 2096 */ | |
| 2097 multiply, | |
| 2098 | |
| 2099 /** | |
| 2100 * Perform `target /= operand`. | |
| 2101 */ | |
| 2102 divide, | |
| 2103 | |
| 2104 /** | |
| 2105 * Perform `target ~/= operand`. | |
| 2106 */ | |
| 2107 floorDivide, | |
| 2108 | |
| 2109 /** | |
| 2110 * Perform `target %= operand`. | |
| 2111 */ | |
| 2112 modulo, | |
| 2113 | |
| 2114 /** | |
| 2115 * Perform `target += operand`. | |
| 2116 */ | |
| 2117 plus, | |
| 2118 | |
| 2119 /** | |
| 2120 * Perform `target -= operand`. | |
| 2121 */ | |
| 2122 minus, | |
| 2123 | |
| 2124 /** | |
| 2125 * Perform `target <<= operand`. | |
| 2126 */ | |
| 2127 shiftLeft, | |
| 2128 | |
| 2129 /** | |
| 2130 * Perform `target >>= operand`. | |
| 2131 */ | |
| 2132 shiftRight, | |
| 2133 | |
| 2134 /** | |
| 2135 * Perform `target &= operand`. | |
| 2136 */ | |
| 2137 bitAnd, | |
| 2138 | |
| 2139 /** | |
| 2140 * Perform `target ^= operand`. | |
| 2141 */ | |
| 2142 bitXor, | |
| 2143 | |
| 2144 /** | |
| 2145 * Perform `target |= operand`. | |
| 2146 */ | |
| 2147 bitOr, | |
| 2148 | |
| 2149 /** | |
| 2150 * Perform `++target`. | |
| 2151 */ | |
| 2152 prefixIncrement, | |
| 2153 | |
| 2154 /** | |
| 2155 * Perform `--target`. | |
| 2156 */ | |
| 2157 prefixDecrement, | |
| 2158 | |
| 2159 /** | |
| 2160 * Perform `target++`. | |
| 2161 */ | |
| 2162 postfixIncrement, | |
| 2163 | |
| 2164 /** | |
| 2165 * Perform `target++`. | |
| 2166 */ | |
| 2167 postfixDecrement, | |
| 2168 } | |
| 2169 | |
| 2170 /** | |
| 2171 * Unlinked summary information about an import declaration. | 2170 * Unlinked summary information about an import declaration. |
| 2172 */ | 2171 */ |
| 2173 abstract class UnlinkedImport extends base.SummaryClass { | 2172 abstract class UnlinkedImport extends base.SummaryClass { |
| 2174 /** | 2173 /** |
| 2175 * Annotations for this import declaration. | 2174 * Annotations for this import declaration. |
| 2176 */ | 2175 */ |
| 2177 @Id(8) | 2176 @Id(8) |
| 2178 List<UnlinkedConst> get annotations; | 2177 List<UnlinkedExpr> get annotations; |
| 2179 | 2178 |
| 2180 /** | 2179 /** |
| 2181 * Combinators contained in this import declaration. | 2180 * Combinators contained in this import declaration. |
| 2182 */ | 2181 */ |
| 2183 @Id(4) | 2182 @Id(4) |
| 2184 List<UnlinkedCombinator> get combinators; | 2183 List<UnlinkedCombinator> get combinators; |
| 2185 | 2184 |
| 2186 /** | 2185 /** |
| 2187 * Configurations used to control which library will actually be loaded at | 2186 * Configurations used to control which library will actually be loaded at |
| 2188 * run-time. | 2187 * run-time. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2282 } | 2281 } |
| 2283 | 2282 |
| 2284 /** | 2283 /** |
| 2285 * Unlinked summary information about a function parameter. | 2284 * Unlinked summary information about a function parameter. |
| 2286 */ | 2285 */ |
| 2287 abstract class UnlinkedParam extends base.SummaryClass { | 2286 abstract class UnlinkedParam extends base.SummaryClass { |
| 2288 /** | 2287 /** |
| 2289 * Annotations for this parameter. | 2288 * Annotations for this parameter. |
| 2290 */ | 2289 */ |
| 2291 @Id(9) | 2290 @Id(9) |
| 2292 List<UnlinkedConst> get annotations; | 2291 List<UnlinkedExpr> get annotations; |
| 2293 | 2292 |
| 2294 /** | 2293 /** |
| 2295 * Code range of the parameter. | 2294 * Code range of the parameter. |
| 2296 */ | 2295 */ |
| 2297 @informative | 2296 @informative |
| 2298 @Id(7) | 2297 @Id(7) |
| 2299 CodeRange get codeRange; | 2298 CodeRange get codeRange; |
| 2300 | 2299 |
| 2301 /** | 2300 /** |
| 2302 * If the parameter has a default value, the source text of the constant | 2301 * If the parameter has a default value, the source text of the constant |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2420 } | 2419 } |
| 2421 | 2420 |
| 2422 /** | 2421 /** |
| 2423 * Unlinked summary information about a part declaration. | 2422 * Unlinked summary information about a part declaration. |
| 2424 */ | 2423 */ |
| 2425 abstract class UnlinkedPart extends base.SummaryClass { | 2424 abstract class UnlinkedPart extends base.SummaryClass { |
| 2426 /** | 2425 /** |
| 2427 * Annotations for this part declaration. | 2426 * Annotations for this part declaration. |
| 2428 */ | 2427 */ |
| 2429 @Id(2) | 2428 @Id(2) |
| 2430 List<UnlinkedConst> get annotations; | 2429 List<UnlinkedExpr> get annotations; |
| 2431 | 2430 |
| 2432 /** | 2431 /** |
| 2433 * End of the URI string (including quotes) relative to the beginning of the | 2432 * End of the URI string (including quotes) relative to the beginning of the |
| 2434 * file. | 2433 * file. |
| 2435 */ | 2434 */ |
| 2436 @informative | 2435 @informative |
| 2437 @Id(0) | 2436 @Id(0) |
| 2438 int get uriEnd; | 2437 int get uriEnd; |
| 2439 | 2438 |
| 2440 /** | 2439 /** |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 } | 2543 } |
| 2545 | 2544 |
| 2546 /** | 2545 /** |
| 2547 * Unlinked summary information about a typedef declaration. | 2546 * Unlinked summary information about a typedef declaration. |
| 2548 */ | 2547 */ |
| 2549 abstract class UnlinkedTypedef extends base.SummaryClass { | 2548 abstract class UnlinkedTypedef extends base.SummaryClass { |
| 2550 /** | 2549 /** |
| 2551 * Annotations for this typedef. | 2550 * Annotations for this typedef. |
| 2552 */ | 2551 */ |
| 2553 @Id(4) | 2552 @Id(4) |
| 2554 List<UnlinkedConst> get annotations; | 2553 List<UnlinkedExpr> get annotations; |
| 2555 | 2554 |
| 2556 /** | 2555 /** |
| 2557 * Code range of the typedef. | 2556 * Code range of the typedef. |
| 2558 */ | 2557 */ |
| 2559 @informative | 2558 @informative |
| 2560 @Id(7) | 2559 @Id(7) |
| 2561 CodeRange get codeRange; | 2560 CodeRange get codeRange; |
| 2562 | 2561 |
| 2563 /** | 2562 /** |
| 2564 * Documentation comment for the typedef, or `null` if there is no | 2563 * Documentation comment for the typedef, or `null` if there is no |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2601 } | 2600 } |
| 2602 | 2601 |
| 2603 /** | 2602 /** |
| 2604 * Unlinked summary information about a type parameter declaration. | 2603 * Unlinked summary information about a type parameter declaration. |
| 2605 */ | 2604 */ |
| 2606 abstract class UnlinkedTypeParam extends base.SummaryClass { | 2605 abstract class UnlinkedTypeParam extends base.SummaryClass { |
| 2607 /** | 2606 /** |
| 2608 * Annotations for this type parameter. | 2607 * Annotations for this type parameter. |
| 2609 */ | 2608 */ |
| 2610 @Id(3) | 2609 @Id(3) |
| 2611 List<UnlinkedConst> get annotations; | 2610 List<UnlinkedExpr> get annotations; |
| 2612 | 2611 |
| 2613 /** | 2612 /** |
| 2614 * Bound of the type parameter, if a bound is explicitly declared. Otherwise | 2613 * Bound of the type parameter, if a bound is explicitly declared. Otherwise |
| 2615 * null. | 2614 * null. |
| 2616 */ | 2615 */ |
| 2617 @Id(2) | 2616 @Id(2) |
| 2618 EntityRef get bound; | 2617 EntityRef get bound; |
| 2619 | 2618 |
| 2620 /** | 2619 /** |
| 2621 * Code range of the type parameter. | 2620 * Code range of the type parameter. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2706 * Indicates whether the unit contains a "part of" declaration. | 2705 * Indicates whether the unit contains a "part of" declaration. |
| 2707 */ | 2706 */ |
| 2708 @Id(18) | 2707 @Id(18) |
| 2709 bool get isPartOf; | 2708 bool get isPartOf; |
| 2710 | 2709 |
| 2711 /** | 2710 /** |
| 2712 * Annotations for the library declaration, or the empty list if there is no | 2711 * Annotations for the library declaration, or the empty list if there is no |
| 2713 * library declaration. | 2712 * library declaration. |
| 2714 */ | 2713 */ |
| 2715 @Id(14) | 2714 @Id(14) |
| 2716 List<UnlinkedConst> get libraryAnnotations; | 2715 List<UnlinkedExpr> get libraryAnnotations; |
| 2717 | 2716 |
| 2718 /** | 2717 /** |
| 2719 * Documentation comment for the library, or `null` if there is no | 2718 * Documentation comment for the library, or `null` if there is no |
| 2720 * documentation comment. | 2719 * documentation comment. |
| 2721 */ | 2720 */ |
| 2722 @informative | 2721 @informative |
| 2723 @Id(9) | 2722 @Id(9) |
| 2724 UnlinkedDocumentationComment get libraryDocumentationComment; | 2723 UnlinkedDocumentationComment get libraryDocumentationComment; |
| 2725 | 2724 |
| 2726 /** | 2725 /** |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2789 | 2788 |
| 2790 /** | 2789 /** |
| 2791 * Unlinked summary information about a top level variable, local variable, or | 2790 * Unlinked summary information about a top level variable, local variable, or |
| 2792 * a field. | 2791 * a field. |
| 2793 */ | 2792 */ |
| 2794 abstract class UnlinkedVariable extends base.SummaryClass { | 2793 abstract class UnlinkedVariable extends base.SummaryClass { |
| 2795 /** | 2794 /** |
| 2796 * Annotations for this variable. | 2795 * Annotations for this variable. |
| 2797 */ | 2796 */ |
| 2798 @Id(8) | 2797 @Id(8) |
| 2799 List<UnlinkedConst> get annotations; | 2798 List<UnlinkedExpr> get annotations; |
| 2800 | 2799 |
| 2801 /** | 2800 /** |
| 2802 * Code range of the variable. | 2801 * Code range of the variable. |
| 2803 */ | 2802 */ |
| 2804 @informative | 2803 @informative |
| 2805 @Id(5) | 2804 @Id(5) |
| 2806 CodeRange get codeRange; | 2805 CodeRange get codeRange; |
| 2807 | 2806 |
| 2808 /** | 2807 /** |
| 2809 * Documentation comment for the variable, or `null` if there is no | 2808 * Documentation comment for the variable, or `null` if there is no |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2888 @Id(11) | 2887 @Id(11) |
| 2889 int get visibleLength; | 2888 int get visibleLength; |
| 2890 | 2889 |
| 2891 /** | 2890 /** |
| 2892 * If a local variable, the beginning of the visible range; zero otherwise. | 2891 * If a local variable, the beginning of the visible range; zero otherwise. |
| 2893 */ | 2892 */ |
| 2894 @informative | 2893 @informative |
| 2895 @Id(12) | 2894 @Id(12) |
| 2896 int get visibleOffset; | 2895 int get visibleOffset; |
| 2897 } | 2896 } |
| OLD | NEW |