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 'flat_buffers.dart' as fb; | 10 import 'flat_buffers.dart' as fb; |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 "length": length, | 412 "length": length, |
413 "message": message, | 413 "message": message, |
414 "offset": offset, | 414 "offset": offset, |
415 "uniqueName": uniqueName, | 415 "uniqueName": uniqueName, |
416 }; | 416 }; |
417 | 417 |
418 @override | 418 @override |
419 String toString() => convert.JSON.encode(toJson()); | 419 String toString() => convert.JSON.encode(toJson()); |
420 } | 420 } |
421 | 421 |
| 422 class AnalysisDriverUnitIndexBuilder extends Object with _AnalysisDriverUnitInde
xMixin implements idl.AnalysisDriverUnitIndex { |
| 423 List<idl.IndexSyntheticElementKind> _elementKinds; |
| 424 List<int> _elementNameClassMemberIds; |
| 425 List<int> _elementNameParameterIds; |
| 426 List<int> _elementNameUnitMemberIds; |
| 427 List<int> _elementUnits; |
| 428 int _nullStringId; |
| 429 List<String> _strings; |
| 430 List<int> _unitLibraryUris; |
| 431 List<int> _unitUnitUris; |
| 432 List<bool> _usedElementIsQualifiedFlags; |
| 433 List<idl.IndexRelationKind> _usedElementKinds; |
| 434 List<int> _usedElementLengths; |
| 435 List<int> _usedElementOffsets; |
| 436 List<int> _usedElements; |
| 437 List<bool> _usedNameIsQualifiedFlags; |
| 438 List<idl.IndexRelationKind> _usedNameKinds; |
| 439 List<int> _usedNameOffsets; |
| 440 List<int> _usedNames; |
| 441 |
| 442 @override |
| 443 List<idl.IndexSyntheticElementKind> get elementKinds => _elementKinds ??= <idl
.IndexSyntheticElementKind>[]; |
| 444 |
| 445 /** |
| 446 * Each item of this list corresponds to a unique referenced element. It is |
| 447 * the kind of the synthetic element. |
| 448 */ |
| 449 void set elementKinds(List<idl.IndexSyntheticElementKind> value) { |
| 450 this._elementKinds = value; |
| 451 } |
| 452 |
| 453 @override |
| 454 List<int> get elementNameClassMemberIds => _elementNameClassMemberIds ??= <int
>[]; |
| 455 |
| 456 /** |
| 457 * Each item of this list corresponds to a unique referenced element. It is |
| 458 * the identifier of the class member element name, or `null` if the element |
| 459 * is a top-level element. The list is sorted in ascending order, so that the |
| 460 * client can quickly check whether an element is referenced in this index. |
| 461 */ |
| 462 void set elementNameClassMemberIds(List<int> value) { |
| 463 assert(value == null || value.every((e) => e >= 0)); |
| 464 this._elementNameClassMemberIds = value; |
| 465 } |
| 466 |
| 467 @override |
| 468 List<int> get elementNameParameterIds => _elementNameParameterIds ??= <int>[]; |
| 469 |
| 470 /** |
| 471 * Each item of this list corresponds to a unique referenced element. It is |
| 472 * the identifier of the named parameter name, or `null` if the element is not |
| 473 * a named parameter. The list is sorted in ascending order, so that the |
| 474 * client can quickly check whether an element is referenced in this index. |
| 475 */ |
| 476 void set elementNameParameterIds(List<int> value) { |
| 477 assert(value == null || value.every((e) => e >= 0)); |
| 478 this._elementNameParameterIds = value; |
| 479 } |
| 480 |
| 481 @override |
| 482 List<int> get elementNameUnitMemberIds => _elementNameUnitMemberIds ??= <int>[
]; |
| 483 |
| 484 /** |
| 485 * Each item of this list corresponds to a unique referenced element. It is |
| 486 * the identifier of the top-level element name, or `null` if the element is |
| 487 * the unit. The list is sorted in ascending order, so that the client can |
| 488 * quickly check whether an element is referenced in this index. |
| 489 */ |
| 490 void set elementNameUnitMemberIds(List<int> value) { |
| 491 assert(value == null || value.every((e) => e >= 0)); |
| 492 this._elementNameUnitMemberIds = value; |
| 493 } |
| 494 |
| 495 @override |
| 496 List<int> get elementUnits => _elementUnits ??= <int>[]; |
| 497 |
| 498 /** |
| 499 * Each item of this list corresponds to a unique referenced element. It is |
| 500 * the index into [unitLibraryUris] and [unitUnitUris] for the library |
| 501 * specific unit where the element is declared. |
| 502 */ |
| 503 void set elementUnits(List<int> value) { |
| 504 assert(value == null || value.every((e) => e >= 0)); |
| 505 this._elementUnits = value; |
| 506 } |
| 507 |
| 508 @override |
| 509 int get nullStringId => _nullStringId ??= 0; |
| 510 |
| 511 /** |
| 512 * Identifier of the null string in [strings]. |
| 513 */ |
| 514 void set nullStringId(int value) { |
| 515 assert(value == null || value >= 0); |
| 516 this._nullStringId = value; |
| 517 } |
| 518 |
| 519 @override |
| 520 List<String> get strings => _strings ??= <String>[]; |
| 521 |
| 522 /** |
| 523 * List of unique element strings used in this index. The list is sorted in |
| 524 * ascending order, so that the client can quickly check the presence of a |
| 525 * string in this index. |
| 526 */ |
| 527 void set strings(List<String> value) { |
| 528 this._strings = value; |
| 529 } |
| 530 |
| 531 @override |
| 532 List<int> get unitLibraryUris => _unitLibraryUris ??= <int>[]; |
| 533 |
| 534 /** |
| 535 * Each item of this list corresponds to the library URI of a unique library |
| 536 * specific unit referenced in the index. It is an index into [strings] list. |
| 537 */ |
| 538 void set unitLibraryUris(List<int> value) { |
| 539 assert(value == null || value.every((e) => e >= 0)); |
| 540 this._unitLibraryUris = value; |
| 541 } |
| 542 |
| 543 @override |
| 544 List<int> get unitUnitUris => _unitUnitUris ??= <int>[]; |
| 545 |
| 546 /** |
| 547 * Each item of this list corresponds to the unit URI of a unique library |
| 548 * specific unit referenced in the index. It is an index into [strings] list. |
| 549 */ |
| 550 void set unitUnitUris(List<int> value) { |
| 551 assert(value == null || value.every((e) => e >= 0)); |
| 552 this._unitUnitUris = value; |
| 553 } |
| 554 |
| 555 @override |
| 556 List<bool> get usedElementIsQualifiedFlags => _usedElementIsQualifiedFlags ??=
<bool>[]; |
| 557 |
| 558 /** |
| 559 * Each item of this list is the `true` if the corresponding element usage |
| 560 * is qualified with some prefix. |
| 561 */ |
| 562 void set usedElementIsQualifiedFlags(List<bool> value) { |
| 563 this._usedElementIsQualifiedFlags = value; |
| 564 } |
| 565 |
| 566 @override |
| 567 List<idl.IndexRelationKind> get usedElementKinds => _usedElementKinds ??= <idl
.IndexRelationKind>[]; |
| 568 |
| 569 /** |
| 570 * Each item of this list is the kind of the element usage. |
| 571 */ |
| 572 void set usedElementKinds(List<idl.IndexRelationKind> value) { |
| 573 this._usedElementKinds = value; |
| 574 } |
| 575 |
| 576 @override |
| 577 List<int> get usedElementLengths => _usedElementLengths ??= <int>[]; |
| 578 |
| 579 /** |
| 580 * Each item of this list is the length of the element usage. |
| 581 */ |
| 582 void set usedElementLengths(List<int> value) { |
| 583 assert(value == null || value.every((e) => e >= 0)); |
| 584 this._usedElementLengths = value; |
| 585 } |
| 586 |
| 587 @override |
| 588 List<int> get usedElementOffsets => _usedElementOffsets ??= <int>[]; |
| 589 |
| 590 /** |
| 591 * Each item of this list is the offset of the element usage relative to the |
| 592 * beginning of the file. |
| 593 */ |
| 594 void set usedElementOffsets(List<int> value) { |
| 595 assert(value == null || value.every((e) => e >= 0)); |
| 596 this._usedElementOffsets = value; |
| 597 } |
| 598 |
| 599 @override |
| 600 List<int> get usedElements => _usedElements ??= <int>[]; |
| 601 |
| 602 /** |
| 603 * Each item of this list is the index into [elementUnits], |
| 604 * [elementNameUnitMemberIds], [elementNameClassMemberIds] and |
| 605 * [elementNameParameterIds]. The list is sorted in ascending order, so |
| 606 * that the client can quickly find element references in this index. |
| 607 */ |
| 608 void set usedElements(List<int> value) { |
| 609 assert(value == null || value.every((e) => e >= 0)); |
| 610 this._usedElements = value; |
| 611 } |
| 612 |
| 613 @override |
| 614 List<bool> get usedNameIsQualifiedFlags => _usedNameIsQualifiedFlags ??= <bool
>[]; |
| 615 |
| 616 /** |
| 617 * Each item of this list is the `true` if the corresponding name usage |
| 618 * is qualified with some prefix. |
| 619 */ |
| 620 void set usedNameIsQualifiedFlags(List<bool> value) { |
| 621 this._usedNameIsQualifiedFlags = value; |
| 622 } |
| 623 |
| 624 @override |
| 625 List<idl.IndexRelationKind> get usedNameKinds => _usedNameKinds ??= <idl.Index
RelationKind>[]; |
| 626 |
| 627 /** |
| 628 * Each item of this list is the kind of the name usage. |
| 629 */ |
| 630 void set usedNameKinds(List<idl.IndexRelationKind> value) { |
| 631 this._usedNameKinds = value; |
| 632 } |
| 633 |
| 634 @override |
| 635 List<int> get usedNameOffsets => _usedNameOffsets ??= <int>[]; |
| 636 |
| 637 /** |
| 638 * Each item of this list is the offset of the name usage relative to the |
| 639 * beginning of the file. |
| 640 */ |
| 641 void set usedNameOffsets(List<int> value) { |
| 642 assert(value == null || value.every((e) => e >= 0)); |
| 643 this._usedNameOffsets = value; |
| 644 } |
| 645 |
| 646 @override |
| 647 List<int> get usedNames => _usedNames ??= <int>[]; |
| 648 |
| 649 /** |
| 650 * Each item of this list is the index into [strings] for a used name. The |
| 651 * list is sorted in ascending order, so that the client can quickly find |
| 652 * whether a name is used in this index. |
| 653 */ |
| 654 void set usedNames(List<int> value) { |
| 655 assert(value == null || value.every((e) => e >= 0)); |
| 656 this._usedNames = value; |
| 657 } |
| 658 |
| 659 AnalysisDriverUnitIndexBuilder({List<idl.IndexSyntheticElementKind> elementKin
ds, List<int> elementNameClassMemberIds, List<int> elementNameParameterIds, List
<int> elementNameUnitMemberIds, List<int> elementUnits, int nullStringId, List<S
tring> strings, List<int> unitLibraryUris, List<int> unitUnitUris, List<bool> us
edElementIsQualifiedFlags, List<idl.IndexRelationKind> usedElementKinds, List<in
t> usedElementLengths, List<int> usedElementOffsets, List<int> usedElements, Lis
t<bool> usedNameIsQualifiedFlags, List<idl.IndexRelationKind> usedNameKinds, Lis
t<int> usedNameOffsets, List<int> usedNames}) |
| 660 : _elementKinds = elementKinds, |
| 661 _elementNameClassMemberIds = elementNameClassMemberIds, |
| 662 _elementNameParameterIds = elementNameParameterIds, |
| 663 _elementNameUnitMemberIds = elementNameUnitMemberIds, |
| 664 _elementUnits = elementUnits, |
| 665 _nullStringId = nullStringId, |
| 666 _strings = strings, |
| 667 _unitLibraryUris = unitLibraryUris, |
| 668 _unitUnitUris = unitUnitUris, |
| 669 _usedElementIsQualifiedFlags = usedElementIsQualifiedFlags, |
| 670 _usedElementKinds = usedElementKinds, |
| 671 _usedElementLengths = usedElementLengths, |
| 672 _usedElementOffsets = usedElementOffsets, |
| 673 _usedElements = usedElements, |
| 674 _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags, |
| 675 _usedNameKinds = usedNameKinds, |
| 676 _usedNameOffsets = usedNameOffsets, |
| 677 _usedNames = usedNames; |
| 678 |
| 679 /** |
| 680 * Flush [informative] data recursively. |
| 681 */ |
| 682 void flushInformative() { |
| 683 } |
| 684 |
| 685 /** |
| 686 * Accumulate non-[informative] data into [signature]. |
| 687 */ |
| 688 void collectApiSignature(api_sig.ApiSignature signature) { |
| 689 if (this._strings == null) { |
| 690 signature.addInt(0); |
| 691 } else { |
| 692 signature.addInt(this._strings.length); |
| 693 for (var x in this._strings) { |
| 694 signature.addString(x); |
| 695 } |
| 696 } |
| 697 signature.addInt(this._nullStringId ?? 0); |
| 698 if (this._unitLibraryUris == null) { |
| 699 signature.addInt(0); |
| 700 } else { |
| 701 signature.addInt(this._unitLibraryUris.length); |
| 702 for (var x in this._unitLibraryUris) { |
| 703 signature.addInt(x); |
| 704 } |
| 705 } |
| 706 if (this._unitUnitUris == null) { |
| 707 signature.addInt(0); |
| 708 } else { |
| 709 signature.addInt(this._unitUnitUris.length); |
| 710 for (var x in this._unitUnitUris) { |
| 711 signature.addInt(x); |
| 712 } |
| 713 } |
| 714 if (this._elementKinds == null) { |
| 715 signature.addInt(0); |
| 716 } else { |
| 717 signature.addInt(this._elementKinds.length); |
| 718 for (var x in this._elementKinds) { |
| 719 signature.addInt(x.index); |
| 720 } |
| 721 } |
| 722 if (this._elementUnits == null) { |
| 723 signature.addInt(0); |
| 724 } else { |
| 725 signature.addInt(this._elementUnits.length); |
| 726 for (var x in this._elementUnits) { |
| 727 signature.addInt(x); |
| 728 } |
| 729 } |
| 730 if (this._elementNameUnitMemberIds == null) { |
| 731 signature.addInt(0); |
| 732 } else { |
| 733 signature.addInt(this._elementNameUnitMemberIds.length); |
| 734 for (var x in this._elementNameUnitMemberIds) { |
| 735 signature.addInt(x); |
| 736 } |
| 737 } |
| 738 if (this._elementNameClassMemberIds == null) { |
| 739 signature.addInt(0); |
| 740 } else { |
| 741 signature.addInt(this._elementNameClassMemberIds.length); |
| 742 for (var x in this._elementNameClassMemberIds) { |
| 743 signature.addInt(x); |
| 744 } |
| 745 } |
| 746 if (this._elementNameParameterIds == null) { |
| 747 signature.addInt(0); |
| 748 } else { |
| 749 signature.addInt(this._elementNameParameterIds.length); |
| 750 for (var x in this._elementNameParameterIds) { |
| 751 signature.addInt(x); |
| 752 } |
| 753 } |
| 754 if (this._usedElements == null) { |
| 755 signature.addInt(0); |
| 756 } else { |
| 757 signature.addInt(this._usedElements.length); |
| 758 for (var x in this._usedElements) { |
| 759 signature.addInt(x); |
| 760 } |
| 761 } |
| 762 if (this._usedElementKinds == null) { |
| 763 signature.addInt(0); |
| 764 } else { |
| 765 signature.addInt(this._usedElementKinds.length); |
| 766 for (var x in this._usedElementKinds) { |
| 767 signature.addInt(x.index); |
| 768 } |
| 769 } |
| 770 if (this._usedElementOffsets == null) { |
| 771 signature.addInt(0); |
| 772 } else { |
| 773 signature.addInt(this._usedElementOffsets.length); |
| 774 for (var x in this._usedElementOffsets) { |
| 775 signature.addInt(x); |
| 776 } |
| 777 } |
| 778 if (this._usedElementLengths == null) { |
| 779 signature.addInt(0); |
| 780 } else { |
| 781 signature.addInt(this._usedElementLengths.length); |
| 782 for (var x in this._usedElementLengths) { |
| 783 signature.addInt(x); |
| 784 } |
| 785 } |
| 786 if (this._usedElementIsQualifiedFlags == null) { |
| 787 signature.addInt(0); |
| 788 } else { |
| 789 signature.addInt(this._usedElementIsQualifiedFlags.length); |
| 790 for (var x in this._usedElementIsQualifiedFlags) { |
| 791 signature.addBool(x); |
| 792 } |
| 793 } |
| 794 if (this._usedNames == null) { |
| 795 signature.addInt(0); |
| 796 } else { |
| 797 signature.addInt(this._usedNames.length); |
| 798 for (var x in this._usedNames) { |
| 799 signature.addInt(x); |
| 800 } |
| 801 } |
| 802 if (this._usedNameKinds == null) { |
| 803 signature.addInt(0); |
| 804 } else { |
| 805 signature.addInt(this._usedNameKinds.length); |
| 806 for (var x in this._usedNameKinds) { |
| 807 signature.addInt(x.index); |
| 808 } |
| 809 } |
| 810 if (this._usedNameOffsets == null) { |
| 811 signature.addInt(0); |
| 812 } else { |
| 813 signature.addInt(this._usedNameOffsets.length); |
| 814 for (var x in this._usedNameOffsets) { |
| 815 signature.addInt(x); |
| 816 } |
| 817 } |
| 818 if (this._usedNameIsQualifiedFlags == null) { |
| 819 signature.addInt(0); |
| 820 } else { |
| 821 signature.addInt(this._usedNameIsQualifiedFlags.length); |
| 822 for (var x in this._usedNameIsQualifiedFlags) { |
| 823 signature.addBool(x); |
| 824 } |
| 825 } |
| 826 } |
| 827 |
| 828 List<int> toBuffer() { |
| 829 fb.Builder fbBuilder = new fb.Builder(); |
| 830 return fbBuilder.finish(finish(fbBuilder), "ADUI"); |
| 831 } |
| 832 |
| 833 fb.Offset finish(fb.Builder fbBuilder) { |
| 834 fb.Offset offset_elementKinds; |
| 835 fb.Offset offset_elementNameClassMemberIds; |
| 836 fb.Offset offset_elementNameParameterIds; |
| 837 fb.Offset offset_elementNameUnitMemberIds; |
| 838 fb.Offset offset_elementUnits; |
| 839 fb.Offset offset_strings; |
| 840 fb.Offset offset_unitLibraryUris; |
| 841 fb.Offset offset_unitUnitUris; |
| 842 fb.Offset offset_usedElementIsQualifiedFlags; |
| 843 fb.Offset offset_usedElementKinds; |
| 844 fb.Offset offset_usedElementLengths; |
| 845 fb.Offset offset_usedElementOffsets; |
| 846 fb.Offset offset_usedElements; |
| 847 fb.Offset offset_usedNameIsQualifiedFlags; |
| 848 fb.Offset offset_usedNameKinds; |
| 849 fb.Offset offset_usedNameOffsets; |
| 850 fb.Offset offset_usedNames; |
| 851 if (!(_elementKinds == null || _elementKinds.isEmpty)) { |
| 852 offset_elementKinds = fbBuilder.writeListUint8(_elementKinds.map((b) => b.
index).toList()); |
| 853 } |
| 854 if (!(_elementNameClassMemberIds == null || _elementNameClassMemberIds.isEmp
ty)) { |
| 855 offset_elementNameClassMemberIds = fbBuilder.writeListUint32(_elementNameC
lassMemberIds); |
| 856 } |
| 857 if (!(_elementNameParameterIds == null || _elementNameParameterIds.isEmpty))
{ |
| 858 offset_elementNameParameterIds = fbBuilder.writeListUint32(_elementNamePar
ameterIds); |
| 859 } |
| 860 if (!(_elementNameUnitMemberIds == null || _elementNameUnitMemberIds.isEmpty
)) { |
| 861 offset_elementNameUnitMemberIds = fbBuilder.writeListUint32(_elementNameUn
itMemberIds); |
| 862 } |
| 863 if (!(_elementUnits == null || _elementUnits.isEmpty)) { |
| 864 offset_elementUnits = fbBuilder.writeListUint32(_elementUnits); |
| 865 } |
| 866 if (!(_strings == null || _strings.isEmpty)) { |
| 867 offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeSt
ring(b)).toList()); |
| 868 } |
| 869 if (!(_unitLibraryUris == null || _unitLibraryUris.isEmpty)) { |
| 870 offset_unitLibraryUris = fbBuilder.writeListUint32(_unitLibraryUris); |
| 871 } |
| 872 if (!(_unitUnitUris == null || _unitUnitUris.isEmpty)) { |
| 873 offset_unitUnitUris = fbBuilder.writeListUint32(_unitUnitUris); |
| 874 } |
| 875 if (!(_usedElementIsQualifiedFlags == null || _usedElementIsQualifiedFlags.i
sEmpty)) { |
| 876 offset_usedElementIsQualifiedFlags = fbBuilder.writeListBool(_usedElementI
sQualifiedFlags); |
| 877 } |
| 878 if (!(_usedElementKinds == null || _usedElementKinds.isEmpty)) { |
| 879 offset_usedElementKinds = fbBuilder.writeListUint8(_usedElementKinds.map((
b) => b.index).toList()); |
| 880 } |
| 881 if (!(_usedElementLengths == null || _usedElementLengths.isEmpty)) { |
| 882 offset_usedElementLengths = fbBuilder.writeListUint32(_usedElementLengths)
; |
| 883 } |
| 884 if (!(_usedElementOffsets == null || _usedElementOffsets.isEmpty)) { |
| 885 offset_usedElementOffsets = fbBuilder.writeListUint32(_usedElementOffsets)
; |
| 886 } |
| 887 if (!(_usedElements == null || _usedElements.isEmpty)) { |
| 888 offset_usedElements = fbBuilder.writeListUint32(_usedElements); |
| 889 } |
| 890 if (!(_usedNameIsQualifiedFlags == null || _usedNameIsQualifiedFlags.isEmpty
)) { |
| 891 offset_usedNameIsQualifiedFlags = fbBuilder.writeListBool(_usedNameIsQuali
fiedFlags); |
| 892 } |
| 893 if (!(_usedNameKinds == null || _usedNameKinds.isEmpty)) { |
| 894 offset_usedNameKinds = fbBuilder.writeListUint8(_usedNameKinds.map((b) =>
b.index).toList()); |
| 895 } |
| 896 if (!(_usedNameOffsets == null || _usedNameOffsets.isEmpty)) { |
| 897 offset_usedNameOffsets = fbBuilder.writeListUint32(_usedNameOffsets); |
| 898 } |
| 899 if (!(_usedNames == null || _usedNames.isEmpty)) { |
| 900 offset_usedNames = fbBuilder.writeListUint32(_usedNames); |
| 901 } |
| 902 fbBuilder.startTable(); |
| 903 if (offset_elementKinds != null) { |
| 904 fbBuilder.addOffset(4, offset_elementKinds); |
| 905 } |
| 906 if (offset_elementNameClassMemberIds != null) { |
| 907 fbBuilder.addOffset(7, offset_elementNameClassMemberIds); |
| 908 } |
| 909 if (offset_elementNameParameterIds != null) { |
| 910 fbBuilder.addOffset(8, offset_elementNameParameterIds); |
| 911 } |
| 912 if (offset_elementNameUnitMemberIds != null) { |
| 913 fbBuilder.addOffset(6, offset_elementNameUnitMemberIds); |
| 914 } |
| 915 if (offset_elementUnits != null) { |
| 916 fbBuilder.addOffset(5, offset_elementUnits); |
| 917 } |
| 918 if (_nullStringId != null && _nullStringId != 0) { |
| 919 fbBuilder.addUint32(1, _nullStringId); |
| 920 } |
| 921 if (offset_strings != null) { |
| 922 fbBuilder.addOffset(0, offset_strings); |
| 923 } |
| 924 if (offset_unitLibraryUris != null) { |
| 925 fbBuilder.addOffset(2, offset_unitLibraryUris); |
| 926 } |
| 927 if (offset_unitUnitUris != null) { |
| 928 fbBuilder.addOffset(3, offset_unitUnitUris); |
| 929 } |
| 930 if (offset_usedElementIsQualifiedFlags != null) { |
| 931 fbBuilder.addOffset(13, offset_usedElementIsQualifiedFlags); |
| 932 } |
| 933 if (offset_usedElementKinds != null) { |
| 934 fbBuilder.addOffset(10, offset_usedElementKinds); |
| 935 } |
| 936 if (offset_usedElementLengths != null) { |
| 937 fbBuilder.addOffset(12, offset_usedElementLengths); |
| 938 } |
| 939 if (offset_usedElementOffsets != null) { |
| 940 fbBuilder.addOffset(11, offset_usedElementOffsets); |
| 941 } |
| 942 if (offset_usedElements != null) { |
| 943 fbBuilder.addOffset(9, offset_usedElements); |
| 944 } |
| 945 if (offset_usedNameIsQualifiedFlags != null) { |
| 946 fbBuilder.addOffset(17, offset_usedNameIsQualifiedFlags); |
| 947 } |
| 948 if (offset_usedNameKinds != null) { |
| 949 fbBuilder.addOffset(15, offset_usedNameKinds); |
| 950 } |
| 951 if (offset_usedNameOffsets != null) { |
| 952 fbBuilder.addOffset(16, offset_usedNameOffsets); |
| 953 } |
| 954 if (offset_usedNames != null) { |
| 955 fbBuilder.addOffset(14, offset_usedNames); |
| 956 } |
| 957 return fbBuilder.endTable(); |
| 958 } |
| 959 } |
| 960 |
| 961 idl.AnalysisDriverUnitIndex readAnalysisDriverUnitIndex(List<int> buffer) { |
| 962 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
| 963 return const _AnalysisDriverUnitIndexReader().read(rootRef, 0); |
| 964 } |
| 965 |
| 966 class _AnalysisDriverUnitIndexReader extends fb.TableReader<_AnalysisDriverUnitI
ndexImpl> { |
| 967 const _AnalysisDriverUnitIndexReader(); |
| 968 |
| 969 @override |
| 970 _AnalysisDriverUnitIndexImpl createObject(fb.BufferContext bc, int offset) =>
new _AnalysisDriverUnitIndexImpl(bc, offset); |
| 971 } |
| 972 |
| 973 class _AnalysisDriverUnitIndexImpl extends Object with _AnalysisDriverUnitIndexM
ixin implements idl.AnalysisDriverUnitIndex { |
| 974 final fb.BufferContext _bc; |
| 975 final int _bcOffset; |
| 976 |
| 977 _AnalysisDriverUnitIndexImpl(this._bc, this._bcOffset); |
| 978 |
| 979 List<idl.IndexSyntheticElementKind> _elementKinds; |
| 980 List<int> _elementNameClassMemberIds; |
| 981 List<int> _elementNameParameterIds; |
| 982 List<int> _elementNameUnitMemberIds; |
| 983 List<int> _elementUnits; |
| 984 int _nullStringId; |
| 985 List<String> _strings; |
| 986 List<int> _unitLibraryUris; |
| 987 List<int> _unitUnitUris; |
| 988 List<bool> _usedElementIsQualifiedFlags; |
| 989 List<idl.IndexRelationKind> _usedElementKinds; |
| 990 List<int> _usedElementLengths; |
| 991 List<int> _usedElementOffsets; |
| 992 List<int> _usedElements; |
| 993 List<bool> _usedNameIsQualifiedFlags; |
| 994 List<idl.IndexRelationKind> _usedNameKinds; |
| 995 List<int> _usedNameOffsets; |
| 996 List<int> _usedNames; |
| 997 |
| 998 @override |
| 999 List<idl.IndexSyntheticElementKind> get elementKinds { |
| 1000 _elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>(const _
IndexSyntheticElementKindReader()).vTableGet(_bc, _bcOffset, 4, const <idl.Index
SyntheticElementKind>[]); |
| 1001 return _elementKinds; |
| 1002 } |
| 1003 |
| 1004 @override |
| 1005 List<int> get elementNameClassMemberIds { |
| 1006 _elementNameClassMemberIds ??= const fb.Uint32ListReader().vTableGet(_bc, _b
cOffset, 7, const <int>[]); |
| 1007 return _elementNameClassMemberIds; |
| 1008 } |
| 1009 |
| 1010 @override |
| 1011 List<int> get elementNameParameterIds { |
| 1012 _elementNameParameterIds ??= const fb.Uint32ListReader().vTableGet(_bc, _bcO
ffset, 8, const <int>[]); |
| 1013 return _elementNameParameterIds; |
| 1014 } |
| 1015 |
| 1016 @override |
| 1017 List<int> get elementNameUnitMemberIds { |
| 1018 _elementNameUnitMemberIds ??= const fb.Uint32ListReader().vTableGet(_bc, _bc
Offset, 6, const <int>[]); |
| 1019 return _elementNameUnitMemberIds; |
| 1020 } |
| 1021 |
| 1022 @override |
| 1023 List<int> get elementUnits { |
| 1024 _elementUnits ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, c
onst <int>[]); |
| 1025 return _elementUnits; |
| 1026 } |
| 1027 |
| 1028 @override |
| 1029 int get nullStringId { |
| 1030 _nullStringId ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
| 1031 return _nullStringId; |
| 1032 } |
| 1033 |
| 1034 @override |
| 1035 List<String> get strings { |
| 1036 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bc, _bcOffset, 0, const <String>[]); |
| 1037 return _strings; |
| 1038 } |
| 1039 |
| 1040 @override |
| 1041 List<int> get unitLibraryUris { |
| 1042 _unitLibraryUris ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2
, const <int>[]); |
| 1043 return _unitLibraryUris; |
| 1044 } |
| 1045 |
| 1046 @override |
| 1047 List<int> get unitUnitUris { |
| 1048 _unitUnitUris ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, c
onst <int>[]); |
| 1049 return _unitUnitUris; |
| 1050 } |
| 1051 |
| 1052 @override |
| 1053 List<bool> get usedElementIsQualifiedFlags { |
| 1054 _usedElementIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bc, _b
cOffset, 13, const <bool>[]); |
| 1055 return _usedElementIsQualifiedFlags; |
| 1056 } |
| 1057 |
| 1058 @override |
| 1059 List<idl.IndexRelationKind> get usedElementKinds { |
| 1060 _usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _Inde
xRelationKindReader()).vTableGet(_bc, _bcOffset, 10, const <idl.IndexRelationKin
d>[]); |
| 1061 return _usedElementKinds; |
| 1062 } |
| 1063 |
| 1064 @override |
| 1065 List<int> get usedElementLengths { |
| 1066 _usedElementLengths ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 12, const <int>[]); |
| 1067 return _usedElementLengths; |
| 1068 } |
| 1069 |
| 1070 @override |
| 1071 List<int> get usedElementOffsets { |
| 1072 _usedElementOffsets ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 11, const <int>[]); |
| 1073 return _usedElementOffsets; |
| 1074 } |
| 1075 |
| 1076 @override |
| 1077 List<int> get usedElements { |
| 1078 _usedElements ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 9, c
onst <int>[]); |
| 1079 return _usedElements; |
| 1080 } |
| 1081 |
| 1082 @override |
| 1083 List<bool> get usedNameIsQualifiedFlags { |
| 1084 _usedNameIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bc, _bcOf
fset, 17, const <bool>[]); |
| 1085 return _usedNameIsQualifiedFlags; |
| 1086 } |
| 1087 |
| 1088 @override |
| 1089 List<idl.IndexRelationKind> get usedNameKinds { |
| 1090 _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _IndexRe
lationKindReader()).vTableGet(_bc, _bcOffset, 15, const <idl.IndexRelationKind>[
]); |
| 1091 return _usedNameKinds; |
| 1092 } |
| 1093 |
| 1094 @override |
| 1095 List<int> get usedNameOffsets { |
| 1096 _usedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1
6, const <int>[]); |
| 1097 return _usedNameOffsets; |
| 1098 } |
| 1099 |
| 1100 @override |
| 1101 List<int> get usedNames { |
| 1102 _usedNames ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 14, con
st <int>[]); |
| 1103 return _usedNames; |
| 1104 } |
| 1105 } |
| 1106 |
| 1107 abstract class _AnalysisDriverUnitIndexMixin implements idl.AnalysisDriverUnitIn
dex { |
| 1108 @override |
| 1109 Map<String, Object> toJson() { |
| 1110 Map<String, Object> _result = <String, Object>{}; |
| 1111 if (elementKinds.isNotEmpty) _result["elementKinds"] = elementKinds.map((_va
lue) => _value.toString().split('.')[1]).toList(); |
| 1112 if (elementNameClassMemberIds.isNotEmpty) _result["elementNameClassMemberIds
"] = elementNameClassMemberIds; |
| 1113 if (elementNameParameterIds.isNotEmpty) _result["elementNameParameterIds"] =
elementNameParameterIds; |
| 1114 if (elementNameUnitMemberIds.isNotEmpty) _result["elementNameUnitMemberIds"]
= elementNameUnitMemberIds; |
| 1115 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits; |
| 1116 if (nullStringId != 0) _result["nullStringId"] = nullStringId; |
| 1117 if (strings.isNotEmpty) _result["strings"] = strings; |
| 1118 if (unitLibraryUris.isNotEmpty) _result["unitLibraryUris"] = unitLibraryUris
; |
| 1119 if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris; |
| 1120 if (usedElementIsQualifiedFlags.isNotEmpty) _result["usedElementIsQualifiedF
lags"] = usedElementIsQualifiedFlags; |
| 1121 if (usedElementKinds.isNotEmpty) _result["usedElementKinds"] = usedElementKi
nds.map((_value) => _value.toString().split('.')[1]).toList(); |
| 1122 if (usedElementLengths.isNotEmpty) _result["usedElementLengths"] = usedEleme
ntLengths; |
| 1123 if (usedElementOffsets.isNotEmpty) _result["usedElementOffsets"] = usedEleme
ntOffsets; |
| 1124 if (usedElements.isNotEmpty) _result["usedElements"] = usedElements; |
| 1125 if (usedNameIsQualifiedFlags.isNotEmpty) _result["usedNameIsQualifiedFlags"]
= usedNameIsQualifiedFlags; |
| 1126 if (usedNameKinds.isNotEmpty) _result["usedNameKinds"] = usedNameKinds.map((
_value) => _value.toString().split('.')[1]).toList(); |
| 1127 if (usedNameOffsets.isNotEmpty) _result["usedNameOffsets"] = usedNameOffsets
; |
| 1128 if (usedNames.isNotEmpty) _result["usedNames"] = usedNames; |
| 1129 return _result; |
| 1130 } |
| 1131 |
| 1132 @override |
| 1133 Map<String, Object> toMap() => { |
| 1134 "elementKinds": elementKinds, |
| 1135 "elementNameClassMemberIds": elementNameClassMemberIds, |
| 1136 "elementNameParameterIds": elementNameParameterIds, |
| 1137 "elementNameUnitMemberIds": elementNameUnitMemberIds, |
| 1138 "elementUnits": elementUnits, |
| 1139 "nullStringId": nullStringId, |
| 1140 "strings": strings, |
| 1141 "unitLibraryUris": unitLibraryUris, |
| 1142 "unitUnitUris": unitUnitUris, |
| 1143 "usedElementIsQualifiedFlags": usedElementIsQualifiedFlags, |
| 1144 "usedElementKinds": usedElementKinds, |
| 1145 "usedElementLengths": usedElementLengths, |
| 1146 "usedElementOffsets": usedElementOffsets, |
| 1147 "usedElements": usedElements, |
| 1148 "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags, |
| 1149 "usedNameKinds": usedNameKinds, |
| 1150 "usedNameOffsets": usedNameOffsets, |
| 1151 "usedNames": usedNames, |
| 1152 }; |
| 1153 |
| 1154 @override |
| 1155 String toString() => convert.JSON.encode(toJson()); |
| 1156 } |
| 1157 |
422 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa
nge { | 1158 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa
nge { |
423 int _length; | 1159 int _length; |
424 int _offset; | 1160 int _offset; |
425 | 1161 |
426 @override | 1162 @override |
427 int get length => _length ??= 0; | 1163 int get length => _length ??= 0; |
428 | 1164 |
429 /** | 1165 /** |
430 * Length of the element code. | 1166 * Length of the element code. |
431 */ | 1167 */ |
(...skipping 9416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9848 "propagatedTypeSlot": propagatedTypeSlot, | 10584 "propagatedTypeSlot": propagatedTypeSlot, |
9849 "type": type, | 10585 "type": type, |
9850 "visibleLength": visibleLength, | 10586 "visibleLength": visibleLength, |
9851 "visibleOffset": visibleOffset, | 10587 "visibleOffset": visibleOffset, |
9852 }; | 10588 }; |
9853 | 10589 |
9854 @override | 10590 @override |
9855 String toString() => convert.JSON.encode(toJson()); | 10591 String toString() => convert.JSON.encode(toJson()); |
9856 } | 10592 } |
9857 | 10593 |
OLD | NEW |