| 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 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". | 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". |
| 7 | 7 |
| 8 library analyzer.src.summary.format; | 8 library analyzer.src.summary.format; |
| 9 | 9 |
| 10 import 'base.dart' as base; | 10 import 'base.dart' as base; |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 @override | 410 @override |
| 411 int get size => 4; | 411 int get size => 4; |
| 412 | 412 |
| 413 @override | 413 @override |
| 414 UnlinkedParamKind read(fb.BufferPointer bp) { | 414 UnlinkedParamKind read(fb.BufferPointer bp) { |
| 415 int index = const fb.Uint32Reader().read(bp); | 415 int index = const fb.Uint32Reader().read(bp); |
| 416 return UnlinkedParamKind.values[index]; | 416 return UnlinkedParamKind.values[index]; |
| 417 } | 417 } |
| 418 } | 418 } |
| 419 | 419 |
| 420 class EntityRefBuilder extends Object with _EntityRefMixin implements EntityRef
{ |
| 421 bool _finished = false; |
| 422 |
| 423 int _slot; |
| 424 int _reference; |
| 425 int _paramReference; |
| 426 List<EntityRefBuilder> _typeArguments; |
| 427 |
| 428 @override |
| 429 int get slot => _slot ??= 0; |
| 430 |
| 431 /** |
| 432 * If this [EntityRef] is contained within [LinkedUnit.types], slot id (which |
| 433 * is unique within the compilation unit) identifying the target of type |
| 434 * propagation or type inference with which this [EntityRef] is associated. |
| 435 * |
| 436 * Otherwise zero. |
| 437 */ |
| 438 void set slot(int _value) { |
| 439 assert(!_finished); |
| 440 assert(_value == null || _value >= 0); |
| 441 _slot = _value; |
| 442 } |
| 443 |
| 444 @override |
| 445 int get reference => _reference ??= 0; |
| 446 |
| 447 /** |
| 448 * Index into [UnlinkedUnit.references] for the entity being referred to, or |
| 449 * zero if this is a reference to a type parameter. |
| 450 * |
| 451 * Note that since zero is also a valid index into |
| 452 * [UnlinkedUnit.references], we cannot distinguish between references to |
| 453 * type parameters and references to other entities by checking [reference] |
| 454 * against zero. To distinguish between references to type parameters and |
| 455 * references to other entities, check whether [paramReference] is zero. |
| 456 */ |
| 457 void set reference(int _value) { |
| 458 assert(!_finished); |
| 459 assert(_value == null || _value >= 0); |
| 460 _reference = _value; |
| 461 } |
| 462 |
| 463 @override |
| 464 int get paramReference => _paramReference ??= 0; |
| 465 |
| 466 /** |
| 467 * If this is a reference to a type parameter, one-based index into the list |
| 468 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De |
| 469 * Bruijn index conventions; that is, innermost parameters come first, and |
| 470 * if a class or method has multiple parameters, they are indexed from right |
| 471 * to left. So for instance, if the enclosing declaration is |
| 472 * |
| 473 * class C<T,U> { |
| 474 * m<V,W> { |
| 475 * ... |
| 476 * } |
| 477 * } |
| 478 * |
| 479 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T, |
| 480 * respectively. |
| 481 * |
| 482 * If the type being referred to is not a type parameter, [paramReference] is |
| 483 * zero. |
| 484 */ |
| 485 void set paramReference(int _value) { |
| 486 assert(!_finished); |
| 487 assert(_value == null || _value >= 0); |
| 488 _paramReference = _value; |
| 489 } |
| 490 |
| 491 @override |
| 492 List<EntityRefBuilder> get typeArguments => _typeArguments ??= <EntityRefBuild
er>[]; |
| 493 |
| 494 /** |
| 495 * If this is an instantiation of a generic type or generic executable, the |
| 496 * type arguments used to instantiate it. Trailing type arguments of type |
| 497 * `dynamic` are omitted. |
| 498 */ |
| 499 void set typeArguments(List<EntityRefBuilder> _value) { |
| 500 assert(!_finished); |
| 501 _typeArguments = _value; |
| 502 } |
| 503 |
| 504 EntityRefBuilder({int slot, int reference, int paramReference, List<EntityRefB
uilder> typeArguments}) |
| 505 : _slot = slot, |
| 506 _reference = reference, |
| 507 _paramReference = paramReference, |
| 508 _typeArguments = typeArguments; |
| 509 |
| 510 fb.Offset finish(fb.Builder fbBuilder) { |
| 511 assert(!_finished); |
| 512 _finished = true; |
| 513 fb.Offset offset_typeArguments; |
| 514 if (!(_typeArguments == null || _typeArguments.isEmpty)) { |
| 515 offset_typeArguments = fbBuilder.writeList(_typeArguments.map((b) => b.fin
ish(fbBuilder)).toList()); |
| 516 } |
| 517 fbBuilder.startTable(); |
| 518 if (_slot != null && _slot != 0) { |
| 519 fbBuilder.addUint32(0, _slot); |
| 520 } |
| 521 if (_reference != null && _reference != 0) { |
| 522 fbBuilder.addUint32(1, _reference); |
| 523 } |
| 524 if (_paramReference != null && _paramReference != 0) { |
| 525 fbBuilder.addUint32(2, _paramReference); |
| 526 } |
| 527 if (offset_typeArguments != null) { |
| 528 fbBuilder.addOffset(3, offset_typeArguments); |
| 529 } |
| 530 return fbBuilder.endTable(); |
| 531 } |
| 532 } |
| 533 |
| 534 /** |
| 535 * Summary information about a reference to a an entity such as a type, top |
| 536 * level executable, or executable within a class. |
| 537 */ |
| 538 abstract class EntityRef extends base.SummaryClass { |
| 539 |
| 540 /** |
| 541 * If this [EntityRef] is contained within [LinkedUnit.types], slot id (which |
| 542 * is unique within the compilation unit) identifying the target of type |
| 543 * propagation or type inference with which this [EntityRef] is associated. |
| 544 * |
| 545 * Otherwise zero. |
| 546 */ |
| 547 int get slot; |
| 548 |
| 549 /** |
| 550 * Index into [UnlinkedUnit.references] for the entity being referred to, or |
| 551 * zero if this is a reference to a type parameter. |
| 552 * |
| 553 * Note that since zero is also a valid index into |
| 554 * [UnlinkedUnit.references], we cannot distinguish between references to |
| 555 * type parameters and references to other entities by checking [reference] |
| 556 * against zero. To distinguish between references to type parameters and |
| 557 * references to other entities, check whether [paramReference] is zero. |
| 558 */ |
| 559 int get reference; |
| 560 |
| 561 /** |
| 562 * If this is a reference to a type parameter, one-based index into the list |
| 563 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De |
| 564 * Bruijn index conventions; that is, innermost parameters come first, and |
| 565 * if a class or method has multiple parameters, they are indexed from right |
| 566 * to left. So for instance, if the enclosing declaration is |
| 567 * |
| 568 * class C<T,U> { |
| 569 * m<V,W> { |
| 570 * ... |
| 571 * } |
| 572 * } |
| 573 * |
| 574 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T, |
| 575 * respectively. |
| 576 * |
| 577 * If the type being referred to is not a type parameter, [paramReference] is |
| 578 * zero. |
| 579 */ |
| 580 int get paramReference; |
| 581 |
| 582 /** |
| 583 * If this is an instantiation of a generic type or generic executable, the |
| 584 * type arguments used to instantiate it. Trailing type arguments of type |
| 585 * `dynamic` are omitted. |
| 586 */ |
| 587 List<EntityRef> get typeArguments; |
| 588 } |
| 589 |
| 590 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> { |
| 591 const _EntityRefReader(); |
| 592 |
| 593 @override |
| 594 _EntityRefImpl createObject(fb.BufferPointer bp) => new _EntityRefImpl(bp); |
| 595 } |
| 596 |
| 597 class _EntityRefImpl extends Object with _EntityRefMixin implements EntityRef { |
| 598 final fb.BufferPointer _bp; |
| 599 |
| 600 _EntityRefImpl(this._bp); |
| 601 |
| 602 int _slot; |
| 603 int _reference; |
| 604 int _paramReference; |
| 605 List<EntityRef> _typeArguments; |
| 606 |
| 607 @override |
| 608 int get slot { |
| 609 _slot ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); |
| 610 return _slot; |
| 611 } |
| 612 |
| 613 @override |
| 614 int get reference { |
| 615 _reference ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 616 return _reference; |
| 617 } |
| 618 |
| 619 @override |
| 620 int get paramReference { |
| 621 _paramReference ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
| 622 return _paramReference; |
| 623 } |
| 624 |
| 625 @override |
| 626 List<EntityRef> get typeArguments { |
| 627 _typeArguments ??= const fb.ListReader<EntityRef>(const _EntityRefReader()).
vTableGet(_bp, 3, const <EntityRef>[]); |
| 628 return _typeArguments; |
| 629 } |
| 630 } |
| 631 |
| 632 abstract class _EntityRefMixin implements EntityRef { |
| 633 @override |
| 634 Map<String, Object> toMap() => { |
| 635 "slot": slot, |
| 636 "reference": reference, |
| 637 "paramReference": paramReference, |
| 638 "typeArguments": typeArguments, |
| 639 }; |
| 640 } |
| 641 |
| 420 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme
nts LinkedDependency { | 642 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme
nts LinkedDependency { |
| 421 bool _finished = false; | 643 bool _finished = false; |
| 422 | 644 |
| 423 String _uri; | 645 String _uri; |
| 424 List<String> _parts; | 646 List<String> _parts; |
| 425 | 647 |
| 426 @override | 648 @override |
| 427 String get uri => _uri ??= ''; | 649 String get uri => _uri ??= ''; |
| 428 | 650 |
| 429 /** | 651 /** |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 "unit": unit, | 1390 "unit": unit, |
| 1169 "numTypeParameters": numTypeParameters, | 1391 "numTypeParameters": numTypeParameters, |
| 1170 "name": name, | 1392 "name": name, |
| 1171 }; | 1393 }; |
| 1172 } | 1394 } |
| 1173 | 1395 |
| 1174 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements LinkedUn
it { | 1396 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements LinkedUn
it { |
| 1175 bool _finished = false; | 1397 bool _finished = false; |
| 1176 | 1398 |
| 1177 List<LinkedReferenceBuilder> _references; | 1399 List<LinkedReferenceBuilder> _references; |
| 1178 List<TypeRefBuilder> _types; | 1400 List<EntityRefBuilder> _types; |
| 1179 | 1401 |
| 1180 @override | 1402 @override |
| 1181 List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenc
eBuilder>[]; | 1403 List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenc
eBuilder>[]; |
| 1182 | 1404 |
| 1183 /** | 1405 /** |
| 1184 * Information about the resolution of references within the compilation | 1406 * Information about the resolution of references within the compilation |
| 1185 * unit. Each element of [UnlinkedUnit.references] has a corresponding | 1407 * unit. Each element of [UnlinkedUnit.references] has a corresponding |
| 1186 * element in this list (at the same index). If this list has additional | 1408 * element in this list (at the same index). If this list has additional |
| 1187 * elements beyond the number of elements in [UnlinkedUnit.references], those | 1409 * elements beyond the number of elements in [UnlinkedUnit.references], those |
| 1188 * additional elements are references that are only referred to implicitly | 1410 * additional elements are references that are only referred to implicitly |
| 1189 * (e.g. elements involved in inferred or propagated types). | 1411 * (e.g. elements involved in inferred or propagated types). |
| 1190 */ | 1412 */ |
| 1191 void set references(List<LinkedReferenceBuilder> _value) { | 1413 void set references(List<LinkedReferenceBuilder> _value) { |
| 1192 assert(!_finished); | 1414 assert(!_finished); |
| 1193 _references = _value; | 1415 _references = _value; |
| 1194 } | 1416 } |
| 1195 | 1417 |
| 1196 @override | 1418 @override |
| 1197 List<TypeRefBuilder> get types => _types ??= <TypeRefBuilder>[]; | 1419 List<EntityRefBuilder> get types => _types ??= <EntityRefBuilder>[]; |
| 1198 | 1420 |
| 1199 /** | 1421 /** |
| 1200 * List associating slot ids found inside the unlinked summary for the | 1422 * List associating slot ids found inside the unlinked summary for the |
| 1201 * compilation unit with propagated and inferred types. | 1423 * compilation unit with propagated and inferred types. |
| 1202 */ | 1424 */ |
| 1203 void set types(List<TypeRefBuilder> _value) { | 1425 void set types(List<EntityRefBuilder> _value) { |
| 1204 assert(!_finished); | 1426 assert(!_finished); |
| 1205 _types = _value; | 1427 _types = _value; |
| 1206 } | 1428 } |
| 1207 | 1429 |
| 1208 LinkedUnitBuilder({List<LinkedReferenceBuilder> references, List<TypeRefBuilde
r> types}) | 1430 LinkedUnitBuilder({List<LinkedReferenceBuilder> references, List<EntityRefBuil
der> types}) |
| 1209 : _references = references, | 1431 : _references = references, |
| 1210 _types = types; | 1432 _types = types; |
| 1211 | 1433 |
| 1212 fb.Offset finish(fb.Builder fbBuilder) { | 1434 fb.Offset finish(fb.Builder fbBuilder) { |
| 1213 assert(!_finished); | 1435 assert(!_finished); |
| 1214 _finished = true; | 1436 _finished = true; |
| 1215 fb.Offset offset_references; | 1437 fb.Offset offset_references; |
| 1216 fb.Offset offset_types; | 1438 fb.Offset offset_types; |
| 1217 if (!(_references == null || _references.isEmpty)) { | 1439 if (!(_references == null || _references.isEmpty)) { |
| 1218 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 1440 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1243 * elements beyond the number of elements in [UnlinkedUnit.references], those | 1465 * elements beyond the number of elements in [UnlinkedUnit.references], those |
| 1244 * additional elements are references that are only referred to implicitly | 1466 * additional elements are references that are only referred to implicitly |
| 1245 * (e.g. elements involved in inferred or propagated types). | 1467 * (e.g. elements involved in inferred or propagated types). |
| 1246 */ | 1468 */ |
| 1247 List<LinkedReference> get references; | 1469 List<LinkedReference> get references; |
| 1248 | 1470 |
| 1249 /** | 1471 /** |
| 1250 * List associating slot ids found inside the unlinked summary for the | 1472 * List associating slot ids found inside the unlinked summary for the |
| 1251 * compilation unit with propagated and inferred types. | 1473 * compilation unit with propagated and inferred types. |
| 1252 */ | 1474 */ |
| 1253 List<TypeRef> get types; | 1475 List<EntityRef> get types; |
| 1254 } | 1476 } |
| 1255 | 1477 |
| 1256 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { | 1478 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { |
| 1257 const _LinkedUnitReader(); | 1479 const _LinkedUnitReader(); |
| 1258 | 1480 |
| 1259 @override | 1481 @override |
| 1260 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); | 1482 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); |
| 1261 } | 1483 } |
| 1262 | 1484 |
| 1263 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements LinkedUnit
{ | 1485 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements LinkedUnit
{ |
| 1264 final fb.BufferPointer _bp; | 1486 final fb.BufferPointer _bp; |
| 1265 | 1487 |
| 1266 _LinkedUnitImpl(this._bp); | 1488 _LinkedUnitImpl(this._bp); |
| 1267 | 1489 |
| 1268 List<LinkedReference> _references; | 1490 List<LinkedReference> _references; |
| 1269 List<TypeRef> _types; | 1491 List<EntityRef> _types; |
| 1270 | 1492 |
| 1271 @override | 1493 @override |
| 1272 List<LinkedReference> get references { | 1494 List<LinkedReference> get references { |
| 1273 _references ??= const fb.ListReader<LinkedReference>(const _LinkedReferenceR
eader()).vTableGet(_bp, 0, const <LinkedReference>[]); | 1495 _references ??= const fb.ListReader<LinkedReference>(const _LinkedReferenceR
eader()).vTableGet(_bp, 0, const <LinkedReference>[]); |
| 1274 return _references; | 1496 return _references; |
| 1275 } | 1497 } |
| 1276 | 1498 |
| 1277 @override | 1499 @override |
| 1278 List<TypeRef> get types { | 1500 List<EntityRef> get types { |
| 1279 _types ??= const fb.ListReader<TypeRef>(const _TypeRefReader()).vTableGet(_b
p, 1, const <TypeRef>[]); | 1501 _types ??= const fb.ListReader<EntityRef>(const _EntityRefReader()).vTableGe
t(_bp, 1, const <EntityRef>[]); |
| 1280 return _types; | 1502 return _types; |
| 1281 } | 1503 } |
| 1282 } | 1504 } |
| 1283 | 1505 |
| 1284 abstract class _LinkedUnitMixin implements LinkedUnit { | 1506 abstract class _LinkedUnitMixin implements LinkedUnit { |
| 1285 @override | 1507 @override |
| 1286 Map<String, Object> toMap() => { | 1508 Map<String, Object> toMap() => { |
| 1287 "references": references, | 1509 "references": references, |
| 1288 "types": types, | 1510 "types": types, |
| 1289 }; | 1511 }; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 abstract class _SdkBundleMixin implements SdkBundle { | 1685 abstract class _SdkBundleMixin implements SdkBundle { |
| 1464 @override | 1686 @override |
| 1465 Map<String, Object> toMap() => { | 1687 Map<String, Object> toMap() => { |
| 1466 "linkedLibraryUris": linkedLibraryUris, | 1688 "linkedLibraryUris": linkedLibraryUris, |
| 1467 "linkedLibraries": linkedLibraries, | 1689 "linkedLibraries": linkedLibraries, |
| 1468 "unlinkedUnitUris": unlinkedUnitUris, | 1690 "unlinkedUnitUris": unlinkedUnitUris, |
| 1469 "unlinkedUnits": unlinkedUnits, | 1691 "unlinkedUnits": unlinkedUnits, |
| 1470 }; | 1692 }; |
| 1471 } | 1693 } |
| 1472 | 1694 |
| 1473 class TypeRefBuilder extends Object with _TypeRefMixin implements TypeRef { | |
| 1474 bool _finished = false; | |
| 1475 | |
| 1476 int _slot; | |
| 1477 int _reference; | |
| 1478 int _paramReference; | |
| 1479 List<TypeRefBuilder> _typeArguments; | |
| 1480 | |
| 1481 @override | |
| 1482 int get slot => _slot ??= 0; | |
| 1483 | |
| 1484 /** | |
| 1485 * If this [TypeRef] is contained within [LinkedUnit.types], slot id (which | |
| 1486 * is unique within the compilation unit) identifying the target of type | |
| 1487 * propagation or type inference with which this [TypeRef] is associated. | |
| 1488 * | |
| 1489 * Otherwise zero. | |
| 1490 */ | |
| 1491 void set slot(int _value) { | |
| 1492 assert(!_finished); | |
| 1493 assert(_value == null || _value >= 0); | |
| 1494 _slot = _value; | |
| 1495 } | |
| 1496 | |
| 1497 @override | |
| 1498 int get reference => _reference ??= 0; | |
| 1499 | |
| 1500 /** | |
| 1501 * Index into [UnlinkedUnit.references] for the type being referred to, or | |
| 1502 * zero if this is a reference to a type parameter. | |
| 1503 * | |
| 1504 * Note that since zero is also a valid index into | |
| 1505 * [UnlinkedUnit.references], we cannot distinguish between references to | |
| 1506 * type parameters and references to types by checking [reference] against | |
| 1507 * zero. To distinguish between references to type parameters and references | |
| 1508 * to types, check whether [paramReference] is zero. | |
| 1509 */ | |
| 1510 void set reference(int _value) { | |
| 1511 assert(!_finished); | |
| 1512 assert(_value == null || _value >= 0); | |
| 1513 _reference = _value; | |
| 1514 } | |
| 1515 | |
| 1516 @override | |
| 1517 int get paramReference => _paramReference ??= 0; | |
| 1518 | |
| 1519 /** | |
| 1520 * If this is a reference to a type parameter, one-based index into the list | |
| 1521 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De | |
| 1522 * Bruijn index conventions; that is, innermost parameters come first, and | |
| 1523 * if a class or method has multiple parameters, they are indexed from right | |
| 1524 * to left. So for instance, if the enclosing declaration is | |
| 1525 * | |
| 1526 * class C<T,U> { | |
| 1527 * m<V,W> { | |
| 1528 * ... | |
| 1529 * } | |
| 1530 * } | |
| 1531 * | |
| 1532 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T, | |
| 1533 * respectively. | |
| 1534 * | |
| 1535 * If the type being referred to is not a type parameter, [paramReference] is | |
| 1536 * zero. | |
| 1537 */ | |
| 1538 void set paramReference(int _value) { | |
| 1539 assert(!_finished); | |
| 1540 assert(_value == null || _value >= 0); | |
| 1541 _paramReference = _value; | |
| 1542 } | |
| 1543 | |
| 1544 @override | |
| 1545 List<TypeRefBuilder> get typeArguments => _typeArguments ??= <TypeRefBuilder>[
]; | |
| 1546 | |
| 1547 /** | |
| 1548 * If this is an instantiation of a generic type, the type arguments used to | |
| 1549 * instantiate it. Trailing type arguments of type `dynamic` are omitted. | |
| 1550 */ | |
| 1551 void set typeArguments(List<TypeRefBuilder> _value) { | |
| 1552 assert(!_finished); | |
| 1553 _typeArguments = _value; | |
| 1554 } | |
| 1555 | |
| 1556 TypeRefBuilder({int slot, int reference, int paramReference, List<TypeRefBuild
er> typeArguments}) | |
| 1557 : _slot = slot, | |
| 1558 _reference = reference, | |
| 1559 _paramReference = paramReference, | |
| 1560 _typeArguments = typeArguments; | |
| 1561 | |
| 1562 fb.Offset finish(fb.Builder fbBuilder) { | |
| 1563 assert(!_finished); | |
| 1564 _finished = true; | |
| 1565 fb.Offset offset_typeArguments; | |
| 1566 if (!(_typeArguments == null || _typeArguments.isEmpty)) { | |
| 1567 offset_typeArguments = fbBuilder.writeList(_typeArguments.map((b) => b.fin
ish(fbBuilder)).toList()); | |
| 1568 } | |
| 1569 fbBuilder.startTable(); | |
| 1570 if (_slot != null && _slot != 0) { | |
| 1571 fbBuilder.addUint32(0, _slot); | |
| 1572 } | |
| 1573 if (_reference != null && _reference != 0) { | |
| 1574 fbBuilder.addUint32(1, _reference); | |
| 1575 } | |
| 1576 if (_paramReference != null && _paramReference != 0) { | |
| 1577 fbBuilder.addUint32(2, _paramReference); | |
| 1578 } | |
| 1579 if (offset_typeArguments != null) { | |
| 1580 fbBuilder.addOffset(3, offset_typeArguments); | |
| 1581 } | |
| 1582 return fbBuilder.endTable(); | |
| 1583 } | |
| 1584 } | |
| 1585 | |
| 1586 /** | |
| 1587 * Summary information about a reference to a type. | |
| 1588 */ | |
| 1589 abstract class TypeRef extends base.SummaryClass { | |
| 1590 | |
| 1591 /** | |
| 1592 * If this [TypeRef] is contained within [LinkedUnit.types], slot id (which | |
| 1593 * is unique within the compilation unit) identifying the target of type | |
| 1594 * propagation or type inference with which this [TypeRef] is associated. | |
| 1595 * | |
| 1596 * Otherwise zero. | |
| 1597 */ | |
| 1598 int get slot; | |
| 1599 | |
| 1600 /** | |
| 1601 * Index into [UnlinkedUnit.references] for the type being referred to, or | |
| 1602 * zero if this is a reference to a type parameter. | |
| 1603 * | |
| 1604 * Note that since zero is also a valid index into | |
| 1605 * [UnlinkedUnit.references], we cannot distinguish between references to | |
| 1606 * type parameters and references to types by checking [reference] against | |
| 1607 * zero. To distinguish between references to type parameters and references | |
| 1608 * to types, check whether [paramReference] is zero. | |
| 1609 */ | |
| 1610 int get reference; | |
| 1611 | |
| 1612 /** | |
| 1613 * If this is a reference to a type parameter, one-based index into the list | |
| 1614 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De | |
| 1615 * Bruijn index conventions; that is, innermost parameters come first, and | |
| 1616 * if a class or method has multiple parameters, they are indexed from right | |
| 1617 * to left. So for instance, if the enclosing declaration is | |
| 1618 * | |
| 1619 * class C<T,U> { | |
| 1620 * m<V,W> { | |
| 1621 * ... | |
| 1622 * } | |
| 1623 * } | |
| 1624 * | |
| 1625 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T, | |
| 1626 * respectively. | |
| 1627 * | |
| 1628 * If the type being referred to is not a type parameter, [paramReference] is | |
| 1629 * zero. | |
| 1630 */ | |
| 1631 int get paramReference; | |
| 1632 | |
| 1633 /** | |
| 1634 * If this is an instantiation of a generic type, the type arguments used to | |
| 1635 * instantiate it. Trailing type arguments of type `dynamic` are omitted. | |
| 1636 */ | |
| 1637 List<TypeRef> get typeArguments; | |
| 1638 } | |
| 1639 | |
| 1640 class _TypeRefReader extends fb.TableReader<_TypeRefImpl> { | |
| 1641 const _TypeRefReader(); | |
| 1642 | |
| 1643 @override | |
| 1644 _TypeRefImpl createObject(fb.BufferPointer bp) => new _TypeRefImpl(bp); | |
| 1645 } | |
| 1646 | |
| 1647 class _TypeRefImpl extends Object with _TypeRefMixin implements TypeRef { | |
| 1648 final fb.BufferPointer _bp; | |
| 1649 | |
| 1650 _TypeRefImpl(this._bp); | |
| 1651 | |
| 1652 int _slot; | |
| 1653 int _reference; | |
| 1654 int _paramReference; | |
| 1655 List<TypeRef> _typeArguments; | |
| 1656 | |
| 1657 @override | |
| 1658 int get slot { | |
| 1659 _slot ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); | |
| 1660 return _slot; | |
| 1661 } | |
| 1662 | |
| 1663 @override | |
| 1664 int get reference { | |
| 1665 _reference ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | |
| 1666 return _reference; | |
| 1667 } | |
| 1668 | |
| 1669 @override | |
| 1670 int get paramReference { | |
| 1671 _paramReference ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | |
| 1672 return _paramReference; | |
| 1673 } | |
| 1674 | |
| 1675 @override | |
| 1676 List<TypeRef> get typeArguments { | |
| 1677 _typeArguments ??= const fb.ListReader<TypeRef>(const _TypeRefReader()).vTab
leGet(_bp, 3, const <TypeRef>[]); | |
| 1678 return _typeArguments; | |
| 1679 } | |
| 1680 } | |
| 1681 | |
| 1682 abstract class _TypeRefMixin implements TypeRef { | |
| 1683 @override | |
| 1684 Map<String, Object> toMap() => { | |
| 1685 "slot": slot, | |
| 1686 "reference": reference, | |
| 1687 "paramReference": paramReference, | |
| 1688 "typeArguments": typeArguments, | |
| 1689 }; | |
| 1690 } | |
| 1691 | |
| 1692 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements Un
linkedClass { | 1695 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements Un
linkedClass { |
| 1693 bool _finished = false; | 1696 bool _finished = false; |
| 1694 | 1697 |
| 1695 String _name; | 1698 String _name; |
| 1696 int _nameOffset; | 1699 int _nameOffset; |
| 1697 UnlinkedDocumentationCommentBuilder _documentationComment; | 1700 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 1698 List<UnlinkedTypeParamBuilder> _typeParameters; | 1701 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 1699 TypeRefBuilder _supertype; | 1702 EntityRefBuilder _supertype; |
| 1700 List<TypeRefBuilder> _mixins; | 1703 List<EntityRefBuilder> _mixins; |
| 1701 List<TypeRefBuilder> _interfaces; | 1704 List<EntityRefBuilder> _interfaces; |
| 1702 List<UnlinkedVariableBuilder> _fields; | 1705 List<UnlinkedVariableBuilder> _fields; |
| 1703 List<UnlinkedExecutableBuilder> _executables; | 1706 List<UnlinkedExecutableBuilder> _executables; |
| 1704 bool _isAbstract; | 1707 bool _isAbstract; |
| 1705 bool _isMixinApplication; | 1708 bool _isMixinApplication; |
| 1706 bool _hasNoSupertype; | 1709 bool _hasNoSupertype; |
| 1707 | 1710 |
| 1708 @override | 1711 @override |
| 1709 String get name => _name ??= ''; | 1712 String get name => _name ??= ''; |
| 1710 | 1713 |
| 1711 /** | 1714 /** |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 | 1748 |
| 1746 /** | 1749 /** |
| 1747 * Type parameters of the class, if any. | 1750 * Type parameters of the class, if any. |
| 1748 */ | 1751 */ |
| 1749 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 1752 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 1750 assert(!_finished); | 1753 assert(!_finished); |
| 1751 _typeParameters = _value; | 1754 _typeParameters = _value; |
| 1752 } | 1755 } |
| 1753 | 1756 |
| 1754 @override | 1757 @override |
| 1755 TypeRefBuilder get supertype => _supertype; | 1758 EntityRefBuilder get supertype => _supertype; |
| 1756 | 1759 |
| 1757 /** | 1760 /** |
| 1758 * Supertype of the class, or `null` if either (a) the class doesn't | 1761 * Supertype of the class, or `null` if either (a) the class doesn't |
| 1759 * explicitly declare a supertype (and hence has supertype `Object`), or (b) | 1762 * explicitly declare a supertype (and hence has supertype `Object`), or (b) |
| 1760 * the class *is* `Object` (and hence has no supertype). | 1763 * the class *is* `Object` (and hence has no supertype). |
| 1761 */ | 1764 */ |
| 1762 void set supertype(TypeRefBuilder _value) { | 1765 void set supertype(EntityRefBuilder _value) { |
| 1763 assert(!_finished); | 1766 assert(!_finished); |
| 1764 _supertype = _value; | 1767 _supertype = _value; |
| 1765 } | 1768 } |
| 1766 | 1769 |
| 1767 @override | 1770 @override |
| 1768 List<TypeRefBuilder> get mixins => _mixins ??= <TypeRefBuilder>[]; | 1771 List<EntityRefBuilder> get mixins => _mixins ??= <EntityRefBuilder>[]; |
| 1769 | 1772 |
| 1770 /** | 1773 /** |
| 1771 * Mixins appearing in a `with` clause, if any. | 1774 * Mixins appearing in a `with` clause, if any. |
| 1772 */ | 1775 */ |
| 1773 void set mixins(List<TypeRefBuilder> _value) { | 1776 void set mixins(List<EntityRefBuilder> _value) { |
| 1774 assert(!_finished); | 1777 assert(!_finished); |
| 1775 _mixins = _value; | 1778 _mixins = _value; |
| 1776 } | 1779 } |
| 1777 | 1780 |
| 1778 @override | 1781 @override |
| 1779 List<TypeRefBuilder> get interfaces => _interfaces ??= <TypeRefBuilder>[]; | 1782 List<EntityRefBuilder> get interfaces => _interfaces ??= <EntityRefBuilder>[]; |
| 1780 | 1783 |
| 1781 /** | 1784 /** |
| 1782 * Interfaces appearing in an `implements` clause, if any. | 1785 * Interfaces appearing in an `implements` clause, if any. |
| 1783 */ | 1786 */ |
| 1784 void set interfaces(List<TypeRefBuilder> _value) { | 1787 void set interfaces(List<EntityRefBuilder> _value) { |
| 1785 assert(!_finished); | 1788 assert(!_finished); |
| 1786 _interfaces = _value; | 1789 _interfaces = _value; |
| 1787 } | 1790 } |
| 1788 | 1791 |
| 1789 @override | 1792 @override |
| 1790 List<UnlinkedVariableBuilder> get fields => _fields ??= <UnlinkedVariableBuild
er>[]; | 1793 List<UnlinkedVariableBuilder> get fields => _fields ??= <UnlinkedVariableBuild
er>[]; |
| 1791 | 1794 |
| 1792 /** | 1795 /** |
| 1793 * Field declarations contained in the class. | 1796 * Field declarations contained in the class. |
| 1794 */ | 1797 */ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 | 1838 |
| 1836 /** | 1839 /** |
| 1837 * Indicates whether this class is the core "Object" class (and hence has no | 1840 * Indicates whether this class is the core "Object" class (and hence has no |
| 1838 * supertype) | 1841 * supertype) |
| 1839 */ | 1842 */ |
| 1840 void set hasNoSupertype(bool _value) { | 1843 void set hasNoSupertype(bool _value) { |
| 1841 assert(!_finished); | 1844 assert(!_finished); |
| 1842 _hasNoSupertype = _value; | 1845 _hasNoSupertype = _value; |
| 1843 } | 1846 } |
| 1844 | 1847 |
| 1845 UnlinkedClassBuilder({String name, int nameOffset, UnlinkedDocumentationCommen
tBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameters, Ty
peRefBuilder supertype, List<TypeRefBuilder> mixins, List<TypeRefBuilder> interf
aces, List<UnlinkedVariableBuilder> fields, List<UnlinkedExecutableBuilder> exec
utables, bool isAbstract, bool isMixinApplication, bool hasNoSupertype}) | 1848 UnlinkedClassBuilder({String name, int nameOffset, UnlinkedDocumentationCommen
tBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameters, En
tityRefBuilder supertype, List<EntityRefBuilder> mixins, List<EntityRefBuilder>
interfaces, List<UnlinkedVariableBuilder> fields, List<UnlinkedExecutableBuilder
> executables, bool isAbstract, bool isMixinApplication, bool hasNoSupertype}) |
| 1846 : _name = name, | 1849 : _name = name, |
| 1847 _nameOffset = nameOffset, | 1850 _nameOffset = nameOffset, |
| 1848 _documentationComment = documentationComment, | 1851 _documentationComment = documentationComment, |
| 1849 _typeParameters = typeParameters, | 1852 _typeParameters = typeParameters, |
| 1850 _supertype = supertype, | 1853 _supertype = supertype, |
| 1851 _mixins = mixins, | 1854 _mixins = mixins, |
| 1852 _interfaces = interfaces, | 1855 _interfaces = interfaces, |
| 1853 _fields = fields, | 1856 _fields = fields, |
| 1854 _executables = executables, | 1857 _executables = executables, |
| 1855 _isAbstract = isAbstract, | 1858 _isAbstract = isAbstract, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1956 /** | 1959 /** |
| 1957 * Type parameters of the class, if any. | 1960 * Type parameters of the class, if any. |
| 1958 */ | 1961 */ |
| 1959 List<UnlinkedTypeParam> get typeParameters; | 1962 List<UnlinkedTypeParam> get typeParameters; |
| 1960 | 1963 |
| 1961 /** | 1964 /** |
| 1962 * Supertype of the class, or `null` if either (a) the class doesn't | 1965 * Supertype of the class, or `null` if either (a) the class doesn't |
| 1963 * explicitly declare a supertype (and hence has supertype `Object`), or (b) | 1966 * explicitly declare a supertype (and hence has supertype `Object`), or (b) |
| 1964 * the class *is* `Object` (and hence has no supertype). | 1967 * the class *is* `Object` (and hence has no supertype). |
| 1965 */ | 1968 */ |
| 1966 TypeRef get supertype; | 1969 EntityRef get supertype; |
| 1967 | 1970 |
| 1968 /** | 1971 /** |
| 1969 * Mixins appearing in a `with` clause, if any. | 1972 * Mixins appearing in a `with` clause, if any. |
| 1970 */ | 1973 */ |
| 1971 List<TypeRef> get mixins; | 1974 List<EntityRef> get mixins; |
| 1972 | 1975 |
| 1973 /** | 1976 /** |
| 1974 * Interfaces appearing in an `implements` clause, if any. | 1977 * Interfaces appearing in an `implements` clause, if any. |
| 1975 */ | 1978 */ |
| 1976 List<TypeRef> get interfaces; | 1979 List<EntityRef> get interfaces; |
| 1977 | 1980 |
| 1978 /** | 1981 /** |
| 1979 * Field declarations contained in the class. | 1982 * Field declarations contained in the class. |
| 1980 */ | 1983 */ |
| 1981 List<UnlinkedVariable> get fields; | 1984 List<UnlinkedVariable> get fields; |
| 1982 | 1985 |
| 1983 /** | 1986 /** |
| 1984 * Executable objects (methods, getters, and setters) contained in the class. | 1987 * Executable objects (methods, getters, and setters) contained in the class. |
| 1985 */ | 1988 */ |
| 1986 List<UnlinkedExecutable> get executables; | 1989 List<UnlinkedExecutable> get executables; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2011 | 2014 |
| 2012 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements Unli
nkedClass { | 2015 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements Unli
nkedClass { |
| 2013 final fb.BufferPointer _bp; | 2016 final fb.BufferPointer _bp; |
| 2014 | 2017 |
| 2015 _UnlinkedClassImpl(this._bp); | 2018 _UnlinkedClassImpl(this._bp); |
| 2016 | 2019 |
| 2017 String _name; | 2020 String _name; |
| 2018 int _nameOffset; | 2021 int _nameOffset; |
| 2019 UnlinkedDocumentationComment _documentationComment; | 2022 UnlinkedDocumentationComment _documentationComment; |
| 2020 List<UnlinkedTypeParam> _typeParameters; | 2023 List<UnlinkedTypeParam> _typeParameters; |
| 2021 TypeRef _supertype; | 2024 EntityRef _supertype; |
| 2022 List<TypeRef> _mixins; | 2025 List<EntityRef> _mixins; |
| 2023 List<TypeRef> _interfaces; | 2026 List<EntityRef> _interfaces; |
| 2024 List<UnlinkedVariable> _fields; | 2027 List<UnlinkedVariable> _fields; |
| 2025 List<UnlinkedExecutable> _executables; | 2028 List<UnlinkedExecutable> _executables; |
| 2026 bool _isAbstract; | 2029 bool _isAbstract; |
| 2027 bool _isMixinApplication; | 2030 bool _isMixinApplication; |
| 2028 bool _hasNoSupertype; | 2031 bool _hasNoSupertype; |
| 2029 | 2032 |
| 2030 @override | 2033 @override |
| 2031 String get name { | 2034 String get name { |
| 2032 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 2035 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
| 2033 return _name; | 2036 return _name; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2045 return _documentationComment; | 2048 return _documentationComment; |
| 2046 } | 2049 } |
| 2047 | 2050 |
| 2048 @override | 2051 @override |
| 2049 List<UnlinkedTypeParam> get typeParameters { | 2052 List<UnlinkedTypeParam> get typeParameters { |
| 2050 _typeParameters ??= const fb.ListReader<UnlinkedTypeParam>(const _UnlinkedTy
peParamReader()).vTableGet(_bp, 3, const <UnlinkedTypeParam>[]); | 2053 _typeParameters ??= const fb.ListReader<UnlinkedTypeParam>(const _UnlinkedTy
peParamReader()).vTableGet(_bp, 3, const <UnlinkedTypeParam>[]); |
| 2051 return _typeParameters; | 2054 return _typeParameters; |
| 2052 } | 2055 } |
| 2053 | 2056 |
| 2054 @override | 2057 @override |
| 2055 TypeRef get supertype { | 2058 EntityRef get supertype { |
| 2056 _supertype ??= const _TypeRefReader().vTableGet(_bp, 4, null); | 2059 _supertype ??= const _EntityRefReader().vTableGet(_bp, 4, null); |
| 2057 return _supertype; | 2060 return _supertype; |
| 2058 } | 2061 } |
| 2059 | 2062 |
| 2060 @override | 2063 @override |
| 2061 List<TypeRef> get mixins { | 2064 List<EntityRef> get mixins { |
| 2062 _mixins ??= const fb.ListReader<TypeRef>(const _TypeRefReader()).vTableGet(_
bp, 5, const <TypeRef>[]); | 2065 _mixins ??= const fb.ListReader<EntityRef>(const _EntityRefReader()).vTableG
et(_bp, 5, const <EntityRef>[]); |
| 2063 return _mixins; | 2066 return _mixins; |
| 2064 } | 2067 } |
| 2065 | 2068 |
| 2066 @override | 2069 @override |
| 2067 List<TypeRef> get interfaces { | 2070 List<EntityRef> get interfaces { |
| 2068 _interfaces ??= const fb.ListReader<TypeRef>(const _TypeRefReader()).vTableG
et(_bp, 6, const <TypeRef>[]); | 2071 _interfaces ??= const fb.ListReader<EntityRef>(const _EntityRefReader()).vTa
bleGet(_bp, 6, const <EntityRef>[]); |
| 2069 return _interfaces; | 2072 return _interfaces; |
| 2070 } | 2073 } |
| 2071 | 2074 |
| 2072 @override | 2075 @override |
| 2073 List<UnlinkedVariable> get fields { | 2076 List<UnlinkedVariable> get fields { |
| 2074 _fields ??= const fb.ListReader<UnlinkedVariable>(const _UnlinkedVariableRea
der()).vTableGet(_bp, 7, const <UnlinkedVariable>[]); | 2077 _fields ??= const fb.ListReader<UnlinkedVariable>(const _UnlinkedVariableRea
der()).vTableGet(_bp, 7, const <UnlinkedVariable>[]); |
| 2075 return _fields; | 2078 return _fields; |
| 2076 } | 2079 } |
| 2077 | 2080 |
| 2078 @override | 2081 @override |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 }; | 2228 }; |
| 2226 } | 2229 } |
| 2227 | 2230 |
| 2228 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements Un
linkedConst { | 2231 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements Un
linkedConst { |
| 2229 bool _finished = false; | 2232 bool _finished = false; |
| 2230 | 2233 |
| 2231 List<UnlinkedConstOperation> _operations; | 2234 List<UnlinkedConstOperation> _operations; |
| 2232 List<int> _ints; | 2235 List<int> _ints; |
| 2233 List<double> _doubles; | 2236 List<double> _doubles; |
| 2234 List<String> _strings; | 2237 List<String> _strings; |
| 2235 List<TypeRefBuilder> _references; | 2238 List<EntityRefBuilder> _references; |
| 2236 | 2239 |
| 2237 @override | 2240 @override |
| 2238 List<UnlinkedConstOperation> get operations => _operations ??= <UnlinkedConstO
peration>[]; | 2241 List<UnlinkedConstOperation> get operations => _operations ??= <UnlinkedConstO
peration>[]; |
| 2239 | 2242 |
| 2240 /** | 2243 /** |
| 2241 * Sequence of operations to execute (starting with an empty stack) to form | 2244 * Sequence of operations to execute (starting with an empty stack) to form |
| 2242 * the constant value. | 2245 * the constant value. |
| 2243 */ | 2246 */ |
| 2244 void set operations(List<UnlinkedConstOperation> _value) { | 2247 void set operations(List<UnlinkedConstOperation> _value) { |
| 2245 assert(!_finished); | 2248 assert(!_finished); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2277 /** | 2280 /** |
| 2278 * Sequence of strings consumed by the operations `pushString` and | 2281 * Sequence of strings consumed by the operations `pushString` and |
| 2279 * `invokeConstructor`. | 2282 * `invokeConstructor`. |
| 2280 */ | 2283 */ |
| 2281 void set strings(List<String> _value) { | 2284 void set strings(List<String> _value) { |
| 2282 assert(!_finished); | 2285 assert(!_finished); |
| 2283 _strings = _value; | 2286 _strings = _value; |
| 2284 } | 2287 } |
| 2285 | 2288 |
| 2286 @override | 2289 @override |
| 2287 List<TypeRefBuilder> get references => _references ??= <TypeRefBuilder>[]; | 2290 List<EntityRefBuilder> get references => _references ??= <EntityRefBuilder>[]; |
| 2288 | 2291 |
| 2289 /** | 2292 /** |
| 2290 * Sequence of language constructs consumed by the operations | 2293 * Sequence of language constructs consumed by the operations |
| 2291 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note | 2294 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note |
| 2292 * that in the case of `pushReference` (and sometimes `invokeConstructor` the | 2295 * that in the case of `pushReference` (and sometimes `invokeConstructor` the |
| 2293 * actual entity being referred to may be something other than a type. | 2296 * actual entity being referred to may be something other than a type. |
| 2294 */ | 2297 */ |
| 2295 void set references(List<TypeRefBuilder> _value) { | 2298 void set references(List<EntityRefBuilder> _value) { |
| 2296 assert(!_finished); | 2299 assert(!_finished); |
| 2297 _references = _value; | 2300 _references = _value; |
| 2298 } | 2301 } |
| 2299 | 2302 |
| 2300 UnlinkedConstBuilder({List<UnlinkedConstOperation> operations, List<int> ints,
List<double> doubles, List<String> strings, List<TypeRefBuilder> references}) | 2303 UnlinkedConstBuilder({List<UnlinkedConstOperation> operations, List<int> ints,
List<double> doubles, List<String> strings, List<EntityRefBuilder> references}) |
| 2301 : _operations = operations, | 2304 : _operations = operations, |
| 2302 _ints = ints, | 2305 _ints = ints, |
| 2303 _doubles = doubles, | 2306 _doubles = doubles, |
| 2304 _strings = strings, | 2307 _strings = strings, |
| 2305 _references = references; | 2308 _references = references; |
| 2306 | 2309 |
| 2307 fb.Offset finish(fb.Builder fbBuilder) { | 2310 fb.Offset finish(fb.Builder fbBuilder) { |
| 2308 assert(!_finished); | 2311 assert(!_finished); |
| 2309 _finished = true; | 2312 _finished = true; |
| 2310 fb.Offset offset_operations; | 2313 fb.Offset offset_operations; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2382 * `invokeConstructor`. | 2385 * `invokeConstructor`. |
| 2383 */ | 2386 */ |
| 2384 List<String> get strings; | 2387 List<String> get strings; |
| 2385 | 2388 |
| 2386 /** | 2389 /** |
| 2387 * Sequence of language constructs consumed by the operations | 2390 * Sequence of language constructs consumed by the operations |
| 2388 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note | 2391 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note |
| 2389 * that in the case of `pushReference` (and sometimes `invokeConstructor` the | 2392 * that in the case of `pushReference` (and sometimes `invokeConstructor` the |
| 2390 * actual entity being referred to may be something other than a type. | 2393 * actual entity being referred to may be something other than a type. |
| 2391 */ | 2394 */ |
| 2392 List<TypeRef> get references; | 2395 List<EntityRef> get references; |
| 2393 } | 2396 } |
| 2394 | 2397 |
| 2395 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> { | 2398 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> { |
| 2396 const _UnlinkedConstReader(); | 2399 const _UnlinkedConstReader(); |
| 2397 | 2400 |
| 2398 @override | 2401 @override |
| 2399 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl
(bp); | 2402 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl
(bp); |
| 2400 } | 2403 } |
| 2401 | 2404 |
| 2402 class _UnlinkedConstImpl extends Object with _UnlinkedConstMixin implements Unli
nkedConst { | 2405 class _UnlinkedConstImpl extends Object with _UnlinkedConstMixin implements Unli
nkedConst { |
| 2403 final fb.BufferPointer _bp; | 2406 final fb.BufferPointer _bp; |
| 2404 | 2407 |
| 2405 _UnlinkedConstImpl(this._bp); | 2408 _UnlinkedConstImpl(this._bp); |
| 2406 | 2409 |
| 2407 List<UnlinkedConstOperation> _operations; | 2410 List<UnlinkedConstOperation> _operations; |
| 2408 List<int> _ints; | 2411 List<int> _ints; |
| 2409 List<double> _doubles; | 2412 List<double> _doubles; |
| 2410 List<String> _strings; | 2413 List<String> _strings; |
| 2411 List<TypeRef> _references; | 2414 List<EntityRef> _references; |
| 2412 | 2415 |
| 2413 @override | 2416 @override |
| 2414 List<UnlinkedConstOperation> get operations { | 2417 List<UnlinkedConstOperation> get operations { |
| 2415 _operations ??= const fb.ListReader<UnlinkedConstOperation>(const _UnlinkedC
onstOperationReader()).vTableGet(_bp, 0, const <UnlinkedConstOperation>[]); | 2418 _operations ??= const fb.ListReader<UnlinkedConstOperation>(const _UnlinkedC
onstOperationReader()).vTableGet(_bp, 0, const <UnlinkedConstOperation>[]); |
| 2416 return _operations; | 2419 return _operations; |
| 2417 } | 2420 } |
| 2418 | 2421 |
| 2419 @override | 2422 @override |
| 2420 List<int> get ints { | 2423 List<int> get ints { |
| 2421 _ints ??= const fb.ListReader<int>(const fb.Uint32Reader()).vTableGet(_bp, 1
, const <int>[]); | 2424 _ints ??= const fb.ListReader<int>(const fb.Uint32Reader()).vTableGet(_bp, 1
, const <int>[]); |
| 2422 return _ints; | 2425 return _ints; |
| 2423 } | 2426 } |
| 2424 | 2427 |
| 2425 @override | 2428 @override |
| 2426 List<double> get doubles { | 2429 List<double> get doubles { |
| 2427 _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 2, const <double>[]
); | 2430 _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 2, const <double>[]
); |
| 2428 return _doubles; | 2431 return _doubles; |
| 2429 } | 2432 } |
| 2430 | 2433 |
| 2431 @override | 2434 @override |
| 2432 List<String> get strings { | 2435 List<String> get strings { |
| 2433 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bp, 3, const <String>[]); | 2436 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bp, 3, const <String>[]); |
| 2434 return _strings; | 2437 return _strings; |
| 2435 } | 2438 } |
| 2436 | 2439 |
| 2437 @override | 2440 @override |
| 2438 List<TypeRef> get references { | 2441 List<EntityRef> get references { |
| 2439 _references ??= const fb.ListReader<TypeRef>(const _TypeRefReader()).vTableG
et(_bp, 4, const <TypeRef>[]); | 2442 _references ??= const fb.ListReader<EntityRef>(const _EntityRefReader()).vTa
bleGet(_bp, 4, const <EntityRef>[]); |
| 2440 return _references; | 2443 return _references; |
| 2441 } | 2444 } |
| 2442 } | 2445 } |
| 2443 | 2446 |
| 2444 abstract class _UnlinkedConstMixin implements UnlinkedConst { | 2447 abstract class _UnlinkedConstMixin implements UnlinkedConst { |
| 2445 @override | 2448 @override |
| 2446 Map<String, Object> toMap() => { | 2449 Map<String, Object> toMap() => { |
| 2447 "operations": operations, | 2450 "operations": operations, |
| 2448 "ints": ints, | 2451 "ints": ints, |
| 2449 "doubles": doubles, | 2452 "doubles": doubles, |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2903 }; | 2906 }; |
| 2904 } | 2907 } |
| 2905 | 2908 |
| 2906 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements UnlinkedExecutable { | 2909 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements UnlinkedExecutable { |
| 2907 bool _finished = false; | 2910 bool _finished = false; |
| 2908 | 2911 |
| 2909 String _name; | 2912 String _name; |
| 2910 int _nameOffset; | 2913 int _nameOffset; |
| 2911 UnlinkedDocumentationCommentBuilder _documentationComment; | 2914 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 2912 List<UnlinkedTypeParamBuilder> _typeParameters; | 2915 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 2913 TypeRefBuilder _returnType; | 2916 EntityRefBuilder _returnType; |
| 2914 List<UnlinkedParamBuilder> _parameters; | 2917 List<UnlinkedParamBuilder> _parameters; |
| 2915 UnlinkedExecutableKind _kind; | 2918 UnlinkedExecutableKind _kind; |
| 2916 bool _isAbstract; | 2919 bool _isAbstract; |
| 2917 bool _isStatic; | 2920 bool _isStatic; |
| 2918 bool _isConst; | 2921 bool _isConst; |
| 2919 bool _isFactory; | 2922 bool _isFactory; |
| 2920 bool _hasImplicitReturnType; | 2923 bool _hasImplicitReturnType; |
| 2921 bool _isExternal; | 2924 bool _isExternal; |
| 2922 | 2925 |
| 2923 @override | 2926 @override |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2966 /** | 2969 /** |
| 2967 * Type parameters of the executable, if any. Empty if support for generic | 2970 * Type parameters of the executable, if any. Empty if support for generic |
| 2968 * method syntax is disabled. | 2971 * method syntax is disabled. |
| 2969 */ | 2972 */ |
| 2970 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 2973 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 2971 assert(!_finished); | 2974 assert(!_finished); |
| 2972 _typeParameters = _value; | 2975 _typeParameters = _value; |
| 2973 } | 2976 } |
| 2974 | 2977 |
| 2975 @override | 2978 @override |
| 2976 TypeRefBuilder get returnType => _returnType; | 2979 EntityRefBuilder get returnType => _returnType; |
| 2977 | 2980 |
| 2978 /** | 2981 /** |
| 2979 * Declared return type of the executable. Absent if the return type is | 2982 * Declared return type of the executable. Absent if the return type is |
| 2980 * `void` or the executable is a constructor. Note that when strong mode is | 2983 * `void` or the executable is a constructor. Note that when strong mode is |
| 2981 * enabled, the actual return type may be different due to type inference. | 2984 * enabled, the actual return type may be different due to type inference. |
| 2982 */ | 2985 */ |
| 2983 void set returnType(TypeRefBuilder _value) { | 2986 void set returnType(EntityRefBuilder _value) { |
| 2984 assert(!_finished); | 2987 assert(!_finished); |
| 2985 _returnType = _value; | 2988 _returnType = _value; |
| 2986 } | 2989 } |
| 2987 | 2990 |
| 2988 @override | 2991 @override |
| 2989 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 2992 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; |
| 2990 | 2993 |
| 2991 /** | 2994 /** |
| 2992 * Parameters of the executable, if any. Note that getters have no | 2995 * Parameters of the executable, if any. Note that getters have no |
| 2993 * parameters (hence this will be the empty list), and setters have a single | 2996 * parameters (hence this will be the empty list), and setters have a single |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3074 bool get isExternal => _isExternal ??= false; | 3077 bool get isExternal => _isExternal ??= false; |
| 3075 | 3078 |
| 3076 /** | 3079 /** |
| 3077 * Indicates whether the executable is declared using the `external` keyword. | 3080 * Indicates whether the executable is declared using the `external` keyword. |
| 3078 */ | 3081 */ |
| 3079 void set isExternal(bool _value) { | 3082 void set isExternal(bool _value) { |
| 3080 assert(!_finished); | 3083 assert(!_finished); |
| 3081 _isExternal = _value; | 3084 _isExternal = _value; |
| 3082 } | 3085 } |
| 3083 | 3086 |
| 3084 UnlinkedExecutableBuilder({String name, int nameOffset, UnlinkedDocumentationC
ommentBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameter
s, TypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters, UnlinkedExe
cutableKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFactory,
bool hasImplicitReturnType, bool isExternal}) | 3087 UnlinkedExecutableBuilder({String name, int nameOffset, UnlinkedDocumentationC
ommentBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameter
s, EntityRefBuilder returnType, List<UnlinkedParamBuilder> parameters, UnlinkedE
xecutableKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFactory
, bool hasImplicitReturnType, bool isExternal}) |
| 3085 : _name = name, | 3088 : _name = name, |
| 3086 _nameOffset = nameOffset, | 3089 _nameOffset = nameOffset, |
| 3087 _documentationComment = documentationComment, | 3090 _documentationComment = documentationComment, |
| 3088 _typeParameters = typeParameters, | 3091 _typeParameters = typeParameters, |
| 3089 _returnType = returnType, | 3092 _returnType = returnType, |
| 3090 _parameters = parameters, | 3093 _parameters = parameters, |
| 3091 _kind = kind, | 3094 _kind = kind, |
| 3092 _isAbstract = isAbstract, | 3095 _isAbstract = isAbstract, |
| 3093 _isStatic = isStatic, | 3096 _isStatic = isStatic, |
| 3094 _isConst = isConst, | 3097 _isConst = isConst, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3194 * Type parameters of the executable, if any. Empty if support for generic | 3197 * Type parameters of the executable, if any. Empty if support for generic |
| 3195 * method syntax is disabled. | 3198 * method syntax is disabled. |
| 3196 */ | 3199 */ |
| 3197 List<UnlinkedTypeParam> get typeParameters; | 3200 List<UnlinkedTypeParam> get typeParameters; |
| 3198 | 3201 |
| 3199 /** | 3202 /** |
| 3200 * Declared return type of the executable. Absent if the return type is | 3203 * Declared return type of the executable. Absent if the return type is |
| 3201 * `void` or the executable is a constructor. Note that when strong mode is | 3204 * `void` or the executable is a constructor. Note that when strong mode is |
| 3202 * enabled, the actual return type may be different due to type inference. | 3205 * enabled, the actual return type may be different due to type inference. |
| 3203 */ | 3206 */ |
| 3204 TypeRef get returnType; | 3207 EntityRef get returnType; |
| 3205 | 3208 |
| 3206 /** | 3209 /** |
| 3207 * Parameters of the executable, if any. Note that getters have no | 3210 * Parameters of the executable, if any. Note that getters have no |
| 3208 * parameters (hence this will be the empty list), and setters have a single | 3211 * parameters (hence this will be the empty list), and setters have a single |
| 3209 * parameter. | 3212 * parameter. |
| 3210 */ | 3213 */ |
| 3211 List<UnlinkedParam> get parameters; | 3214 List<UnlinkedParam> get parameters; |
| 3212 | 3215 |
| 3213 /** | 3216 /** |
| 3214 * The kind of the executable (function/method, getter, setter, or | 3217 * The kind of the executable (function/method, getter, setter, or |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3261 | 3264 |
| 3262 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments UnlinkedExecutable { | 3265 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments UnlinkedExecutable { |
| 3263 final fb.BufferPointer _bp; | 3266 final fb.BufferPointer _bp; |
| 3264 | 3267 |
| 3265 _UnlinkedExecutableImpl(this._bp); | 3268 _UnlinkedExecutableImpl(this._bp); |
| 3266 | 3269 |
| 3267 String _name; | 3270 String _name; |
| 3268 int _nameOffset; | 3271 int _nameOffset; |
| 3269 UnlinkedDocumentationComment _documentationComment; | 3272 UnlinkedDocumentationComment _documentationComment; |
| 3270 List<UnlinkedTypeParam> _typeParameters; | 3273 List<UnlinkedTypeParam> _typeParameters; |
| 3271 TypeRef _returnType; | 3274 EntityRef _returnType; |
| 3272 List<UnlinkedParam> _parameters; | 3275 List<UnlinkedParam> _parameters; |
| 3273 UnlinkedExecutableKind _kind; | 3276 UnlinkedExecutableKind _kind; |
| 3274 bool _isAbstract; | 3277 bool _isAbstract; |
| 3275 bool _isStatic; | 3278 bool _isStatic; |
| 3276 bool _isConst; | 3279 bool _isConst; |
| 3277 bool _isFactory; | 3280 bool _isFactory; |
| 3278 bool _hasImplicitReturnType; | 3281 bool _hasImplicitReturnType; |
| 3279 bool _isExternal; | 3282 bool _isExternal; |
| 3280 | 3283 |
| 3281 @override | 3284 @override |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3296 return _documentationComment; | 3299 return _documentationComment; |
| 3297 } | 3300 } |
| 3298 | 3301 |
| 3299 @override | 3302 @override |
| 3300 List<UnlinkedTypeParam> get typeParameters { | 3303 List<UnlinkedTypeParam> get typeParameters { |
| 3301 _typeParameters ??= const fb.ListReader<UnlinkedTypeParam>(const _UnlinkedTy
peParamReader()).vTableGet(_bp, 3, const <UnlinkedTypeParam>[]); | 3304 _typeParameters ??= const fb.ListReader<UnlinkedTypeParam>(const _UnlinkedTy
peParamReader()).vTableGet(_bp, 3, const <UnlinkedTypeParam>[]); |
| 3302 return _typeParameters; | 3305 return _typeParameters; |
| 3303 } | 3306 } |
| 3304 | 3307 |
| 3305 @override | 3308 @override |
| 3306 TypeRef get returnType { | 3309 EntityRef get returnType { |
| 3307 _returnType ??= const _TypeRefReader().vTableGet(_bp, 4, null); | 3310 _returnType ??= const _EntityRefReader().vTableGet(_bp, 4, null); |
| 3308 return _returnType; | 3311 return _returnType; |
| 3309 } | 3312 } |
| 3310 | 3313 |
| 3311 @override | 3314 @override |
| 3312 List<UnlinkedParam> get parameters { | 3315 List<UnlinkedParam> get parameters { |
| 3313 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade
r()).vTableGet(_bp, 5, const <UnlinkedParam>[]); | 3316 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade
r()).vTableGet(_bp, 5, const <UnlinkedParam>[]); |
| 3314 return _parameters; | 3317 return _parameters; |
| 3315 } | 3318 } |
| 3316 | 3319 |
| 3317 @override | 3320 @override |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3944 "uriEnd": uriEnd, | 3947 "uriEnd": uriEnd, |
| 3945 "prefixOffset": prefixOffset, | 3948 "prefixOffset": prefixOffset, |
| 3946 }; | 3949 }; |
| 3947 } | 3950 } |
| 3948 | 3951 |
| 3949 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements Un
linkedParam { | 3952 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements Un
linkedParam { |
| 3950 bool _finished = false; | 3953 bool _finished = false; |
| 3951 | 3954 |
| 3952 String _name; | 3955 String _name; |
| 3953 int _nameOffset; | 3956 int _nameOffset; |
| 3954 TypeRefBuilder _type; | 3957 EntityRefBuilder _type; |
| 3955 List<UnlinkedParamBuilder> _parameters; | 3958 List<UnlinkedParamBuilder> _parameters; |
| 3956 UnlinkedParamKind _kind; | 3959 UnlinkedParamKind _kind; |
| 3957 bool _isFunctionTyped; | 3960 bool _isFunctionTyped; |
| 3958 bool _isInitializingFormal; | 3961 bool _isInitializingFormal; |
| 3959 bool _hasImplicitType; | 3962 bool _hasImplicitType; |
| 3960 | 3963 |
| 3961 @override | 3964 @override |
| 3962 String get name => _name ??= ''; | 3965 String get name => _name ??= ''; |
| 3963 | 3966 |
| 3964 /** | 3967 /** |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3975 /** | 3978 /** |
| 3976 * Offset of the parameter name relative to the beginning of the file. | 3979 * Offset of the parameter name relative to the beginning of the file. |
| 3977 */ | 3980 */ |
| 3978 void set nameOffset(int _value) { | 3981 void set nameOffset(int _value) { |
| 3979 assert(!_finished); | 3982 assert(!_finished); |
| 3980 assert(_value == null || _value >= 0); | 3983 assert(_value == null || _value >= 0); |
| 3981 _nameOffset = _value; | 3984 _nameOffset = _value; |
| 3982 } | 3985 } |
| 3983 | 3986 |
| 3984 @override | 3987 @override |
| 3985 TypeRefBuilder get type => _type; | 3988 EntityRefBuilder get type => _type; |
| 3986 | 3989 |
| 3987 /** | 3990 /** |
| 3988 * If [isFunctionTyped] is `true`, the declared return type. If | 3991 * If [isFunctionTyped] is `true`, the declared return type. If |
| 3989 * [isFunctionTyped] is `false`, the declared type. Absent if | 3992 * [isFunctionTyped] is `false`, the declared type. Absent if |
| 3990 * [isFunctionTyped] is `true` and the declared return type is `void`. Note | 3993 * [isFunctionTyped] is `true` and the declared return type is `void`. Note |
| 3991 * that when strong mode is enabled, the actual type may be different due to | 3994 * that when strong mode is enabled, the actual type may be different due to |
| 3992 * type inference. | 3995 * type inference. |
| 3993 */ | 3996 */ |
| 3994 void set type(TypeRefBuilder _value) { | 3997 void set type(EntityRefBuilder _value) { |
| 3995 assert(!_finished); | 3998 assert(!_finished); |
| 3996 _type = _value; | 3999 _type = _value; |
| 3997 } | 4000 } |
| 3998 | 4001 |
| 3999 @override | 4002 @override |
| 4000 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 4003 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; |
| 4001 | 4004 |
| 4002 /** | 4005 /** |
| 4003 * If [isFunctionTyped] is `true`, the parameters of the function type. | 4006 * If [isFunctionTyped] is `true`, the parameters of the function type. |
| 4004 */ | 4007 */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4046 | 4049 |
| 4047 /** | 4050 /** |
| 4048 * Indicates whether this parameter lacks an explicit type declaration. | 4051 * Indicates whether this parameter lacks an explicit type declaration. |
| 4049 * Always false for a function-typed parameter. | 4052 * Always false for a function-typed parameter. |
| 4050 */ | 4053 */ |
| 4051 void set hasImplicitType(bool _value) { | 4054 void set hasImplicitType(bool _value) { |
| 4052 assert(!_finished); | 4055 assert(!_finished); |
| 4053 _hasImplicitType = _value; | 4056 _hasImplicitType = _value; |
| 4054 } | 4057 } |
| 4055 | 4058 |
| 4056 UnlinkedParamBuilder({String name, int nameOffset, TypeRefBuilder type, List<U
nlinkedParamBuilder> parameters, UnlinkedParamKind kind, bool isFunctionTyped, b
ool isInitializingFormal, bool hasImplicitType}) | 4059 UnlinkedParamBuilder({String name, int nameOffset, EntityRefBuilder type, List
<UnlinkedParamBuilder> parameters, UnlinkedParamKind kind, bool isFunctionTyped,
bool isInitializingFormal, bool hasImplicitType}) |
| 4057 : _name = name, | 4060 : _name = name, |
| 4058 _nameOffset = nameOffset, | 4061 _nameOffset = nameOffset, |
| 4059 _type = type, | 4062 _type = type, |
| 4060 _parameters = parameters, | 4063 _parameters = parameters, |
| 4061 _kind = kind, | 4064 _kind = kind, |
| 4062 _isFunctionTyped = isFunctionTyped, | 4065 _isFunctionTyped = isFunctionTyped, |
| 4063 _isInitializingFormal = isInitializingFormal, | 4066 _isInitializingFormal = isInitializingFormal, |
| 4064 _hasImplicitType = hasImplicitType; | 4067 _hasImplicitType = hasImplicitType; |
| 4065 | 4068 |
| 4066 fb.Offset finish(fb.Builder fbBuilder) { | 4069 fb.Offset finish(fb.Builder fbBuilder) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4122 */ | 4125 */ |
| 4123 int get nameOffset; | 4126 int get nameOffset; |
| 4124 | 4127 |
| 4125 /** | 4128 /** |
| 4126 * If [isFunctionTyped] is `true`, the declared return type. If | 4129 * If [isFunctionTyped] is `true`, the declared return type. If |
| 4127 * [isFunctionTyped] is `false`, the declared type. Absent if | 4130 * [isFunctionTyped] is `false`, the declared type. Absent if |
| 4128 * [isFunctionTyped] is `true` and the declared return type is `void`. Note | 4131 * [isFunctionTyped] is `true` and the declared return type is `void`. Note |
| 4129 * that when strong mode is enabled, the actual type may be different due to | 4132 * that when strong mode is enabled, the actual type may be different due to |
| 4130 * type inference. | 4133 * type inference. |
| 4131 */ | 4134 */ |
| 4132 TypeRef get type; | 4135 EntityRef get type; |
| 4133 | 4136 |
| 4134 /** | 4137 /** |
| 4135 * If [isFunctionTyped] is `true`, the parameters of the function type. | 4138 * If [isFunctionTyped] is `true`, the parameters of the function type. |
| 4136 */ | 4139 */ |
| 4137 List<UnlinkedParam> get parameters; | 4140 List<UnlinkedParam> get parameters; |
| 4138 | 4141 |
| 4139 /** | 4142 /** |
| 4140 * Kind of the parameter. | 4143 * Kind of the parameter. |
| 4141 */ | 4144 */ |
| 4142 UnlinkedParamKind get kind; | 4145 UnlinkedParamKind get kind; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4166 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); | 4169 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); |
| 4167 } | 4170 } |
| 4168 | 4171 |
| 4169 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements Unli
nkedParam { | 4172 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements Unli
nkedParam { |
| 4170 final fb.BufferPointer _bp; | 4173 final fb.BufferPointer _bp; |
| 4171 | 4174 |
| 4172 _UnlinkedParamImpl(this._bp); | 4175 _UnlinkedParamImpl(this._bp); |
| 4173 | 4176 |
| 4174 String _name; | 4177 String _name; |
| 4175 int _nameOffset; | 4178 int _nameOffset; |
| 4176 TypeRef _type; | 4179 EntityRef _type; |
| 4177 List<UnlinkedParam> _parameters; | 4180 List<UnlinkedParam> _parameters; |
| 4178 UnlinkedParamKind _kind; | 4181 UnlinkedParamKind _kind; |
| 4179 bool _isFunctionTyped; | 4182 bool _isFunctionTyped; |
| 4180 bool _isInitializingFormal; | 4183 bool _isInitializingFormal; |
| 4181 bool _hasImplicitType; | 4184 bool _hasImplicitType; |
| 4182 | 4185 |
| 4183 @override | 4186 @override |
| 4184 String get name { | 4187 String get name { |
| 4185 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 4188 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
| 4186 return _name; | 4189 return _name; |
| 4187 } | 4190 } |
| 4188 | 4191 |
| 4189 @override | 4192 @override |
| 4190 int get nameOffset { | 4193 int get nameOffset { |
| 4191 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 4194 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 4192 return _nameOffset; | 4195 return _nameOffset; |
| 4193 } | 4196 } |
| 4194 | 4197 |
| 4195 @override | 4198 @override |
| 4196 TypeRef get type { | 4199 EntityRef get type { |
| 4197 _type ??= const _TypeRefReader().vTableGet(_bp, 2, null); | 4200 _type ??= const _EntityRefReader().vTableGet(_bp, 2, null); |
| 4198 return _type; | 4201 return _type; |
| 4199 } | 4202 } |
| 4200 | 4203 |
| 4201 @override | 4204 @override |
| 4202 List<UnlinkedParam> get parameters { | 4205 List<UnlinkedParam> get parameters { |
| 4203 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade
r()).vTableGet(_bp, 3, const <UnlinkedParam>[]); | 4206 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade
r()).vTableGet(_bp, 3, const <UnlinkedParam>[]); |
| 4204 return _parameters; | 4207 return _parameters; |
| 4205 } | 4208 } |
| 4206 | 4209 |
| 4207 @override | 4210 @override |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4764 }; | 4767 }; |
| 4765 } | 4768 } |
| 4766 | 4769 |
| 4767 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s UnlinkedTypedef { | 4770 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s UnlinkedTypedef { |
| 4768 bool _finished = false; | 4771 bool _finished = false; |
| 4769 | 4772 |
| 4770 String _name; | 4773 String _name; |
| 4771 int _nameOffset; | 4774 int _nameOffset; |
| 4772 UnlinkedDocumentationCommentBuilder _documentationComment; | 4775 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 4773 List<UnlinkedTypeParamBuilder> _typeParameters; | 4776 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 4774 TypeRefBuilder _returnType; | 4777 EntityRefBuilder _returnType; |
| 4775 List<UnlinkedParamBuilder> _parameters; | 4778 List<UnlinkedParamBuilder> _parameters; |
| 4776 | 4779 |
| 4777 @override | 4780 @override |
| 4778 String get name => _name ??= ''; | 4781 String get name => _name ??= ''; |
| 4779 | 4782 |
| 4780 /** | 4783 /** |
| 4781 * Name of the typedef. | 4784 * Name of the typedef. |
| 4782 */ | 4785 */ |
| 4783 void set name(String _value) { | 4786 void set name(String _value) { |
| 4784 assert(!_finished); | 4787 assert(!_finished); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4814 | 4817 |
| 4815 /** | 4818 /** |
| 4816 * Type parameters of the typedef, if any. | 4819 * Type parameters of the typedef, if any. |
| 4817 */ | 4820 */ |
| 4818 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 4821 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 4819 assert(!_finished); | 4822 assert(!_finished); |
| 4820 _typeParameters = _value; | 4823 _typeParameters = _value; |
| 4821 } | 4824 } |
| 4822 | 4825 |
| 4823 @override | 4826 @override |
| 4824 TypeRefBuilder get returnType => _returnType; | 4827 EntityRefBuilder get returnType => _returnType; |
| 4825 | 4828 |
| 4826 /** | 4829 /** |
| 4827 * Return type of the typedef. Absent if the return type is `void`. | 4830 * Return type of the typedef. Absent if the return type is `void`. |
| 4828 */ | 4831 */ |
| 4829 void set returnType(TypeRefBuilder _value) { | 4832 void set returnType(EntityRefBuilder _value) { |
| 4830 assert(!_finished); | 4833 assert(!_finished); |
| 4831 _returnType = _value; | 4834 _returnType = _value; |
| 4832 } | 4835 } |
| 4833 | 4836 |
| 4834 @override | 4837 @override |
| 4835 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 4838 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; |
| 4836 | 4839 |
| 4837 /** | 4840 /** |
| 4838 * Parameters of the executable, if any. | 4841 * Parameters of the executable, if any. |
| 4839 */ | 4842 */ |
| 4840 void set parameters(List<UnlinkedParamBuilder> _value) { | 4843 void set parameters(List<UnlinkedParamBuilder> _value) { |
| 4841 assert(!_finished); | 4844 assert(!_finished); |
| 4842 _parameters = _value; | 4845 _parameters = _value; |
| 4843 } | 4846 } |
| 4844 | 4847 |
| 4845 UnlinkedTypedefBuilder({String name, int nameOffset, UnlinkedDocumentationComm
entBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameters,
TypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters}) | 4848 UnlinkedTypedefBuilder({String name, int nameOffset, UnlinkedDocumentationComm
entBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameters,
EntityRefBuilder returnType, List<UnlinkedParamBuilder> parameters}) |
| 4846 : _name = name, | 4849 : _name = name, |
| 4847 _nameOffset = nameOffset, | 4850 _nameOffset = nameOffset, |
| 4848 _documentationComment = documentationComment, | 4851 _documentationComment = documentationComment, |
| 4849 _typeParameters = typeParameters, | 4852 _typeParameters = typeParameters, |
| 4850 _returnType = returnType, | 4853 _returnType = returnType, |
| 4851 _parameters = parameters; | 4854 _parameters = parameters; |
| 4852 | 4855 |
| 4853 fb.Offset finish(fb.Builder fbBuilder) { | 4856 fb.Offset finish(fb.Builder fbBuilder) { |
| 4854 assert(!_finished); | 4857 assert(!_finished); |
| 4855 _finished = true; | 4858 _finished = true; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4918 UnlinkedDocumentationComment get documentationComment; | 4921 UnlinkedDocumentationComment get documentationComment; |
| 4919 | 4922 |
| 4920 /** | 4923 /** |
| 4921 * Type parameters of the typedef, if any. | 4924 * Type parameters of the typedef, if any. |
| 4922 */ | 4925 */ |
| 4923 List<UnlinkedTypeParam> get typeParameters; | 4926 List<UnlinkedTypeParam> get typeParameters; |
| 4924 | 4927 |
| 4925 /** | 4928 /** |
| 4926 * Return type of the typedef. Absent if the return type is `void`. | 4929 * Return type of the typedef. Absent if the return type is `void`. |
| 4927 */ | 4930 */ |
| 4928 TypeRef get returnType; | 4931 EntityRef get returnType; |
| 4929 | 4932 |
| 4930 /** | 4933 /** |
| 4931 * Parameters of the executable, if any. | 4934 * Parameters of the executable, if any. |
| 4932 */ | 4935 */ |
| 4933 List<UnlinkedParam> get parameters; | 4936 List<UnlinkedParam> get parameters; |
| 4934 } | 4937 } |
| 4935 | 4938 |
| 4936 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { | 4939 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { |
| 4937 const _UnlinkedTypedefReader(); | 4940 const _UnlinkedTypedefReader(); |
| 4938 | 4941 |
| 4939 @override | 4942 @override |
| 4940 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); | 4943 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); |
| 4941 } | 4944 } |
| 4942 | 4945 |
| 4943 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
UnlinkedTypedef { | 4946 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
UnlinkedTypedef { |
| 4944 final fb.BufferPointer _bp; | 4947 final fb.BufferPointer _bp; |
| 4945 | 4948 |
| 4946 _UnlinkedTypedefImpl(this._bp); | 4949 _UnlinkedTypedefImpl(this._bp); |
| 4947 | 4950 |
| 4948 String _name; | 4951 String _name; |
| 4949 int _nameOffset; | 4952 int _nameOffset; |
| 4950 UnlinkedDocumentationComment _documentationComment; | 4953 UnlinkedDocumentationComment _documentationComment; |
| 4951 List<UnlinkedTypeParam> _typeParameters; | 4954 List<UnlinkedTypeParam> _typeParameters; |
| 4952 TypeRef _returnType; | 4955 EntityRef _returnType; |
| 4953 List<UnlinkedParam> _parameters; | 4956 List<UnlinkedParam> _parameters; |
| 4954 | 4957 |
| 4955 @override | 4958 @override |
| 4956 String get name { | 4959 String get name { |
| 4957 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 4960 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
| 4958 return _name; | 4961 return _name; |
| 4959 } | 4962 } |
| 4960 | 4963 |
| 4961 @override | 4964 @override |
| 4962 int get nameOffset { | 4965 int get nameOffset { |
| 4963 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 4966 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 4964 return _nameOffset; | 4967 return _nameOffset; |
| 4965 } | 4968 } |
| 4966 | 4969 |
| 4967 @override | 4970 @override |
| 4968 UnlinkedDocumentationComment get documentationComment { | 4971 UnlinkedDocumentationComment get documentationComment { |
| 4969 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | 4972 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); |
| 4970 return _documentationComment; | 4973 return _documentationComment; |
| 4971 } | 4974 } |
| 4972 | 4975 |
| 4973 @override | 4976 @override |
| 4974 List<UnlinkedTypeParam> get typeParameters { | 4977 List<UnlinkedTypeParam> get typeParameters { |
| 4975 _typeParameters ??= const fb.ListReader<UnlinkedTypeParam>(const _UnlinkedTy
peParamReader()).vTableGet(_bp, 3, const <UnlinkedTypeParam>[]); | 4978 _typeParameters ??= const fb.ListReader<UnlinkedTypeParam>(const _UnlinkedTy
peParamReader()).vTableGet(_bp, 3, const <UnlinkedTypeParam>[]); |
| 4976 return _typeParameters; | 4979 return _typeParameters; |
| 4977 } | 4980 } |
| 4978 | 4981 |
| 4979 @override | 4982 @override |
| 4980 TypeRef get returnType { | 4983 EntityRef get returnType { |
| 4981 _returnType ??= const _TypeRefReader().vTableGet(_bp, 4, null); | 4984 _returnType ??= const _EntityRefReader().vTableGet(_bp, 4, null); |
| 4982 return _returnType; | 4985 return _returnType; |
| 4983 } | 4986 } |
| 4984 | 4987 |
| 4985 @override | 4988 @override |
| 4986 List<UnlinkedParam> get parameters { | 4989 List<UnlinkedParam> get parameters { |
| 4987 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade
r()).vTableGet(_bp, 5, const <UnlinkedParam>[]); | 4990 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade
r()).vTableGet(_bp, 5, const <UnlinkedParam>[]); |
| 4988 return _parameters; | 4991 return _parameters; |
| 4989 } | 4992 } |
| 4990 } | 4993 } |
| 4991 | 4994 |
| 4992 abstract class _UnlinkedTypedefMixin implements UnlinkedTypedef { | 4995 abstract class _UnlinkedTypedefMixin implements UnlinkedTypedef { |
| 4993 @override | 4996 @override |
| 4994 Map<String, Object> toMap() => { | 4997 Map<String, Object> toMap() => { |
| 4995 "name": name, | 4998 "name": name, |
| 4996 "nameOffset": nameOffset, | 4999 "nameOffset": nameOffset, |
| 4997 "documentationComment": documentationComment, | 5000 "documentationComment": documentationComment, |
| 4998 "typeParameters": typeParameters, | 5001 "typeParameters": typeParameters, |
| 4999 "returnType": returnType, | 5002 "returnType": returnType, |
| 5000 "parameters": parameters, | 5003 "parameters": parameters, |
| 5001 }; | 5004 }; |
| 5002 } | 5005 } |
| 5003 | 5006 |
| 5004 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments UnlinkedTypeParam { | 5007 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments UnlinkedTypeParam { |
| 5005 bool _finished = false; | 5008 bool _finished = false; |
| 5006 | 5009 |
| 5007 String _name; | 5010 String _name; |
| 5008 int _nameOffset; | 5011 int _nameOffset; |
| 5009 TypeRefBuilder _bound; | 5012 EntityRefBuilder _bound; |
| 5010 | 5013 |
| 5011 @override | 5014 @override |
| 5012 String get name => _name ??= ''; | 5015 String get name => _name ??= ''; |
| 5013 | 5016 |
| 5014 /** | 5017 /** |
| 5015 * Name of the type parameter. | 5018 * Name of the type parameter. |
| 5016 */ | 5019 */ |
| 5017 void set name(String _value) { | 5020 void set name(String _value) { |
| 5018 assert(!_finished); | 5021 assert(!_finished); |
| 5019 _name = _value; | 5022 _name = _value; |
| 5020 } | 5023 } |
| 5021 | 5024 |
| 5022 @override | 5025 @override |
| 5023 int get nameOffset => _nameOffset ??= 0; | 5026 int get nameOffset => _nameOffset ??= 0; |
| 5024 | 5027 |
| 5025 /** | 5028 /** |
| 5026 * Offset of the type parameter name relative to the beginning of the file. | 5029 * Offset of the type parameter name relative to the beginning of the file. |
| 5027 */ | 5030 */ |
| 5028 void set nameOffset(int _value) { | 5031 void set nameOffset(int _value) { |
| 5029 assert(!_finished); | 5032 assert(!_finished); |
| 5030 assert(_value == null || _value >= 0); | 5033 assert(_value == null || _value >= 0); |
| 5031 _nameOffset = _value; | 5034 _nameOffset = _value; |
| 5032 } | 5035 } |
| 5033 | 5036 |
| 5034 @override | 5037 @override |
| 5035 TypeRefBuilder get bound => _bound; | 5038 EntityRefBuilder get bound => _bound; |
| 5036 | 5039 |
| 5037 /** | 5040 /** |
| 5038 * Bound of the type parameter, if a bound is explicitly declared. Otherwise | 5041 * Bound of the type parameter, if a bound is explicitly declared. Otherwise |
| 5039 * null. | 5042 * null. |
| 5040 */ | 5043 */ |
| 5041 void set bound(TypeRefBuilder _value) { | 5044 void set bound(EntityRefBuilder _value) { |
| 5042 assert(!_finished); | 5045 assert(!_finished); |
| 5043 _bound = _value; | 5046 _bound = _value; |
| 5044 } | 5047 } |
| 5045 | 5048 |
| 5046 UnlinkedTypeParamBuilder({String name, int nameOffset, TypeRefBuilder bound}) | 5049 UnlinkedTypeParamBuilder({String name, int nameOffset, EntityRefBuilder bound}
) |
| 5047 : _name = name, | 5050 : _name = name, |
| 5048 _nameOffset = nameOffset, | 5051 _nameOffset = nameOffset, |
| 5049 _bound = bound; | 5052 _bound = bound; |
| 5050 | 5053 |
| 5051 fb.Offset finish(fb.Builder fbBuilder) { | 5054 fb.Offset finish(fb.Builder fbBuilder) { |
| 5052 assert(!_finished); | 5055 assert(!_finished); |
| 5053 _finished = true; | 5056 _finished = true; |
| 5054 fb.Offset offset_name; | 5057 fb.Offset offset_name; |
| 5055 fb.Offset offset_bound; | 5058 fb.Offset offset_bound; |
| 5056 if (_name != null) { | 5059 if (_name != null) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 5085 | 5088 |
| 5086 /** | 5089 /** |
| 5087 * Offset of the type parameter name relative to the beginning of the file. | 5090 * Offset of the type parameter name relative to the beginning of the file. |
| 5088 */ | 5091 */ |
| 5089 int get nameOffset; | 5092 int get nameOffset; |
| 5090 | 5093 |
| 5091 /** | 5094 /** |
| 5092 * Bound of the type parameter, if a bound is explicitly declared. Otherwise | 5095 * Bound of the type parameter, if a bound is explicitly declared. Otherwise |
| 5093 * null. | 5096 * null. |
| 5094 */ | 5097 */ |
| 5095 TypeRef get bound; | 5098 EntityRef get bound; |
| 5096 } | 5099 } |
| 5097 | 5100 |
| 5098 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { | 5101 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { |
| 5099 const _UnlinkedTypeParamReader(); | 5102 const _UnlinkedTypeParamReader(); |
| 5100 | 5103 |
| 5101 @override | 5104 @override |
| 5102 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); | 5105 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); |
| 5103 } | 5106 } |
| 5104 | 5107 |
| 5105 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts UnlinkedTypeParam { | 5108 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts UnlinkedTypeParam { |
| 5106 final fb.BufferPointer _bp; | 5109 final fb.BufferPointer _bp; |
| 5107 | 5110 |
| 5108 _UnlinkedTypeParamImpl(this._bp); | 5111 _UnlinkedTypeParamImpl(this._bp); |
| 5109 | 5112 |
| 5110 String _name; | 5113 String _name; |
| 5111 int _nameOffset; | 5114 int _nameOffset; |
| 5112 TypeRef _bound; | 5115 EntityRef _bound; |
| 5113 | 5116 |
| 5114 @override | 5117 @override |
| 5115 String get name { | 5118 String get name { |
| 5116 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 5119 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
| 5117 return _name; | 5120 return _name; |
| 5118 } | 5121 } |
| 5119 | 5122 |
| 5120 @override | 5123 @override |
| 5121 int get nameOffset { | 5124 int get nameOffset { |
| 5122 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 5125 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 5123 return _nameOffset; | 5126 return _nameOffset; |
| 5124 } | 5127 } |
| 5125 | 5128 |
| 5126 @override | 5129 @override |
| 5127 TypeRef get bound { | 5130 EntityRef get bound { |
| 5128 _bound ??= const _TypeRefReader().vTableGet(_bp, 2, null); | 5131 _bound ??= const _EntityRefReader().vTableGet(_bp, 2, null); |
| 5129 return _bound; | 5132 return _bound; |
| 5130 } | 5133 } |
| 5131 } | 5134 } |
| 5132 | 5135 |
| 5133 abstract class _UnlinkedTypeParamMixin implements UnlinkedTypeParam { | 5136 abstract class _UnlinkedTypeParamMixin implements UnlinkedTypeParam { |
| 5134 @override | 5137 @override |
| 5135 Map<String, Object> toMap() => { | 5138 Map<String, Object> toMap() => { |
| 5136 "name": name, | 5139 "name": name, |
| 5137 "nameOffset": nameOffset, | 5140 "nameOffset": nameOffset, |
| 5138 "bound": bound, | 5141 "bound": bound, |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5655 "variables": variables, | 5658 "variables": variables, |
| 5656 }; | 5659 }; |
| 5657 } | 5660 } |
| 5658 | 5661 |
| 5659 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts UnlinkedVariable { | 5662 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts UnlinkedVariable { |
| 5660 bool _finished = false; | 5663 bool _finished = false; |
| 5661 | 5664 |
| 5662 String _name; | 5665 String _name; |
| 5663 int _nameOffset; | 5666 int _nameOffset; |
| 5664 UnlinkedDocumentationCommentBuilder _documentationComment; | 5667 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 5665 TypeRefBuilder _type; | 5668 EntityRefBuilder _type; |
| 5666 UnlinkedConstBuilder _constExpr; | 5669 UnlinkedConstBuilder _constExpr; |
| 5667 bool _isStatic; | 5670 bool _isStatic; |
| 5668 bool _isFinal; | 5671 bool _isFinal; |
| 5669 bool _isConst; | 5672 bool _isConst; |
| 5670 bool _hasImplicitType; | 5673 bool _hasImplicitType; |
| 5671 int _propagatedTypeSlot; | 5674 int _propagatedTypeSlot; |
| 5672 | 5675 |
| 5673 @override | 5676 @override |
| 5674 String get name => _name ??= ''; | 5677 String get name => _name ??= ''; |
| 5675 | 5678 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 5699 /** | 5702 /** |
| 5700 * Documentation comment for the variable, or `null` if there is no | 5703 * Documentation comment for the variable, or `null` if there is no |
| 5701 * documentation comment. | 5704 * documentation comment. |
| 5702 */ | 5705 */ |
| 5703 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 5706 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 5704 assert(!_finished); | 5707 assert(!_finished); |
| 5705 _documentationComment = _value; | 5708 _documentationComment = _value; |
| 5706 } | 5709 } |
| 5707 | 5710 |
| 5708 @override | 5711 @override |
| 5709 TypeRefBuilder get type => _type; | 5712 EntityRefBuilder get type => _type; |
| 5710 | 5713 |
| 5711 /** | 5714 /** |
| 5712 * Declared type of the variable. Note that when strong mode is enabled, the | 5715 * Declared type of the variable. Note that when strong mode is enabled, the |
| 5713 * actual type of the variable may be different due to type inference. | 5716 * actual type of the variable may be different due to type inference. |
| 5714 */ | 5717 */ |
| 5715 void set type(TypeRefBuilder _value) { | 5718 void set type(EntityRefBuilder _value) { |
| 5716 assert(!_finished); | 5719 assert(!_finished); |
| 5717 _type = _value; | 5720 _type = _value; |
| 5718 } | 5721 } |
| 5719 | 5722 |
| 5720 @override | 5723 @override |
| 5721 UnlinkedConstBuilder get constExpr => _constExpr; | 5724 UnlinkedConstBuilder get constExpr => _constExpr; |
| 5722 | 5725 |
| 5723 /** | 5726 /** |
| 5724 * If [isConst] is true, and the variable has an initializer, the constant | 5727 * If [isConst] is true, and the variable has an initializer, the constant |
| 5725 * expression in the initializer. | 5728 * expression in the initializer. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5787 * propagated type is the same as its declared type. | 5790 * propagated type is the same as its declared type. |
| 5788 * | 5791 * |
| 5789 * Non-propagable variables have a [propagatedTypeSlot] of zero. | 5792 * Non-propagable variables have a [propagatedTypeSlot] of zero. |
| 5790 */ | 5793 */ |
| 5791 void set propagatedTypeSlot(int _value) { | 5794 void set propagatedTypeSlot(int _value) { |
| 5792 assert(!_finished); | 5795 assert(!_finished); |
| 5793 assert(_value == null || _value >= 0); | 5796 assert(_value == null || _value >= 0); |
| 5794 _propagatedTypeSlot = _value; | 5797 _propagatedTypeSlot = _value; |
| 5795 } | 5798 } |
| 5796 | 5799 |
| 5797 UnlinkedVariableBuilder({String name, int nameOffset, UnlinkedDocumentationCom
mentBuilder documentationComment, TypeRefBuilder type, UnlinkedConstBuilder cons
tExpr, bool isStatic, bool isFinal, bool isConst, bool hasImplicitType, int prop
agatedTypeSlot}) | 5800 UnlinkedVariableBuilder({String name, int nameOffset, UnlinkedDocumentationCom
mentBuilder documentationComment, EntityRefBuilder type, UnlinkedConstBuilder co
nstExpr, bool isStatic, bool isFinal, bool isConst, bool hasImplicitType, int pr
opagatedTypeSlot}) |
| 5798 : _name = name, | 5801 : _name = name, |
| 5799 _nameOffset = nameOffset, | 5802 _nameOffset = nameOffset, |
| 5800 _documentationComment = documentationComment, | 5803 _documentationComment = documentationComment, |
| 5801 _type = type, | 5804 _type = type, |
| 5802 _constExpr = constExpr, | 5805 _constExpr = constExpr, |
| 5803 _isStatic = isStatic, | 5806 _isStatic = isStatic, |
| 5804 _isFinal = isFinal, | 5807 _isFinal = isFinal, |
| 5805 _isConst = isConst, | 5808 _isConst = isConst, |
| 5806 _hasImplicitType = hasImplicitType, | 5809 _hasImplicitType = hasImplicitType, |
| 5807 _propagatedTypeSlot = propagatedTypeSlot; | 5810 _propagatedTypeSlot = propagatedTypeSlot; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5879 /** | 5882 /** |
| 5880 * Documentation comment for the variable, or `null` if there is no | 5883 * Documentation comment for the variable, or `null` if there is no |
| 5881 * documentation comment. | 5884 * documentation comment. |
| 5882 */ | 5885 */ |
| 5883 UnlinkedDocumentationComment get documentationComment; | 5886 UnlinkedDocumentationComment get documentationComment; |
| 5884 | 5887 |
| 5885 /** | 5888 /** |
| 5886 * Declared type of the variable. Note that when strong mode is enabled, the | 5889 * Declared type of the variable. Note that when strong mode is enabled, the |
| 5887 * actual type of the variable may be different due to type inference. | 5890 * actual type of the variable may be different due to type inference. |
| 5888 */ | 5891 */ |
| 5889 TypeRef get type; | 5892 EntityRef get type; |
| 5890 | 5893 |
| 5891 /** | 5894 /** |
| 5892 * If [isConst] is true, and the variable has an initializer, the constant | 5895 * If [isConst] is true, and the variable has an initializer, the constant |
| 5893 * expression in the initializer. | 5896 * expression in the initializer. |
| 5894 */ | 5897 */ |
| 5895 UnlinkedConst get constExpr; | 5898 UnlinkedConst get constExpr; |
| 5896 | 5899 |
| 5897 /** | 5900 /** |
| 5898 * Indicates whether the variable is declared using the `static` keyword. | 5901 * Indicates whether the variable is declared using the `static` keyword. |
| 5899 * | 5902 * |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5937 } | 5940 } |
| 5938 | 5941 |
| 5939 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s UnlinkedVariable { | 5942 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s UnlinkedVariable { |
| 5940 final fb.BufferPointer _bp; | 5943 final fb.BufferPointer _bp; |
| 5941 | 5944 |
| 5942 _UnlinkedVariableImpl(this._bp); | 5945 _UnlinkedVariableImpl(this._bp); |
| 5943 | 5946 |
| 5944 String _name; | 5947 String _name; |
| 5945 int _nameOffset; | 5948 int _nameOffset; |
| 5946 UnlinkedDocumentationComment _documentationComment; | 5949 UnlinkedDocumentationComment _documentationComment; |
| 5947 TypeRef _type; | 5950 EntityRef _type; |
| 5948 UnlinkedConst _constExpr; | 5951 UnlinkedConst _constExpr; |
| 5949 bool _isStatic; | 5952 bool _isStatic; |
| 5950 bool _isFinal; | 5953 bool _isFinal; |
| 5951 bool _isConst; | 5954 bool _isConst; |
| 5952 bool _hasImplicitType; | 5955 bool _hasImplicitType; |
| 5953 int _propagatedTypeSlot; | 5956 int _propagatedTypeSlot; |
| 5954 | 5957 |
| 5955 @override | 5958 @override |
| 5956 String get name { | 5959 String get name { |
| 5957 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 5960 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
| 5958 return _name; | 5961 return _name; |
| 5959 } | 5962 } |
| 5960 | 5963 |
| 5961 @override | 5964 @override |
| 5962 int get nameOffset { | 5965 int get nameOffset { |
| 5963 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 5966 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 5964 return _nameOffset; | 5967 return _nameOffset; |
| 5965 } | 5968 } |
| 5966 | 5969 |
| 5967 @override | 5970 @override |
| 5968 UnlinkedDocumentationComment get documentationComment { | 5971 UnlinkedDocumentationComment get documentationComment { |
| 5969 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | 5972 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); |
| 5970 return _documentationComment; | 5973 return _documentationComment; |
| 5971 } | 5974 } |
| 5972 | 5975 |
| 5973 @override | 5976 @override |
| 5974 TypeRef get type { | 5977 EntityRef get type { |
| 5975 _type ??= const _TypeRefReader().vTableGet(_bp, 3, null); | 5978 _type ??= const _EntityRefReader().vTableGet(_bp, 3, null); |
| 5976 return _type; | 5979 return _type; |
| 5977 } | 5980 } |
| 5978 | 5981 |
| 5979 @override | 5982 @override |
| 5980 UnlinkedConst get constExpr { | 5983 UnlinkedConst get constExpr { |
| 5981 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 4, null); | 5984 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 4, null); |
| 5982 return _constExpr; | 5985 return _constExpr; |
| 5983 } | 5986 } |
| 5984 | 5987 |
| 5985 @override | 5988 @override |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6022 "type": type, | 6025 "type": type, |
| 6023 "constExpr": constExpr, | 6026 "constExpr": constExpr, |
| 6024 "isStatic": isStatic, | 6027 "isStatic": isStatic, |
| 6025 "isFinal": isFinal, | 6028 "isFinal": isFinal, |
| 6026 "isConst": isConst, | 6029 "isConst": isConst, |
| 6027 "hasImplicitType": hasImplicitType, | 6030 "hasImplicitType": hasImplicitType, |
| 6028 "propagatedTypeSlot": propagatedTypeSlot, | 6031 "propagatedTypeSlot": propagatedTypeSlot, |
| 6029 }; | 6032 }; |
| 6030 } | 6033 } |
| 6031 | 6034 |
| OLD | NEW |