Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Side by Side Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 2216873003: Add an "api signature" to summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 _length = length, 209 _length = length,
210 _message = message, 210 _message = message,
211 _offset = offset; 211 _offset = offset;
212 212
213 /** 213 /**
214 * Flush [informative] data recursively. 214 * Flush [informative] data recursively.
215 */ 215 */
216 void flushInformative() { 216 void flushInformative() {
217 } 217 }
218 218
219 /**
220 * Accumulate non-[informative] data into [signature].
221 */
222 void collectApiSignature(fb.ApiSignature signature) {
223 signature.addString(this._errorCodeUniqueName ?? '');
224 signature.addInt(this._offset ?? 0);
225 signature.addInt(this._length ?? 0);
226 signature.addString(this._message ?? '');
227 signature.addString(this._correction ?? '');
228 }
229
219 fb.Offset finish(fb.Builder fbBuilder) { 230 fb.Offset finish(fb.Builder fbBuilder) {
220 fb.Offset offset_correction; 231 fb.Offset offset_correction;
221 fb.Offset offset_errorCodeUniqueName; 232 fb.Offset offset_errorCodeUniqueName;
222 fb.Offset offset_message; 233 fb.Offset offset_message;
223 if (_correction != null) { 234 if (_correction != null) {
224 offset_correction = fbBuilder.writeString(_correction); 235 offset_correction = fbBuilder.writeString(_correction);
225 } 236 }
226 if (_errorCodeUniqueName != null) { 237 if (_errorCodeUniqueName != null) {
227 offset_errorCodeUniqueName = fbBuilder.writeString(_errorCodeUniqueName); 238 offset_errorCodeUniqueName = fbBuilder.writeString(_errorCodeUniqueName);
228 } 239 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 _importedUris = importedUris, 389 _importedUris = importedUris,
379 _kind = kind, 390 _kind = kind,
380 _partUris = partUris; 391 _partUris = partUris;
381 392
382 /** 393 /**
383 * Flush [informative] data recursively. 394 * Flush [informative] data recursively.
384 */ 395 */
385 void flushInformative() { 396 void flushInformative() {
386 } 397 }
387 398
399 /**
400 * Accumulate non-[informative] data into [signature].
401 */
402 void collectApiSignature(fb.ApiSignature signature) {
403 signature.addInt(this._kind == null ? 0 : this._kind.index);
404 if (this._importedUris == null) {
405 signature.addInt(0);
406 } else {
407 signature.addInt(this._importedUris.length);
408 for (var x in this._importedUris) {
409 signature.addString(x);
410 }
411 }
412 if (this._exportedUris == null) {
413 signature.addInt(0);
414 } else {
415 signature.addInt(this._exportedUris.length);
416 for (var x in this._exportedUris) {
417 signature.addString(x);
418 }
419 }
420 if (this._partUris == null) {
421 signature.addInt(0);
422 } else {
423 signature.addInt(this._partUris.length);
424 for (var x in this._partUris) {
425 signature.addString(x);
426 }
427 }
428 }
429
388 List<int> toBuffer() { 430 List<int> toBuffer() {
389 fb.Builder fbBuilder = new fb.Builder(); 431 fb.Builder fbBuilder = new fb.Builder();
390 return fbBuilder.finish(finish(fbBuilder), "CaSS"); 432 return fbBuilder.finish(finish(fbBuilder), "CaSS");
391 } 433 }
392 434
393 fb.Offset finish(fb.Builder fbBuilder) { 435 fb.Offset finish(fb.Builder fbBuilder) {
394 fb.Offset offset_exportedUris; 436 fb.Offset offset_exportedUris;
395 fb.Offset offset_importedUris; 437 fb.Offset offset_importedUris;
396 fb.Offset offset_partUris; 438 fb.Offset offset_partUris;
397 if (!(_exportedUris == null || _exportedUris.isEmpty)) { 439 if (!(_exportedUris == null || _exportedUris.isEmpty)) {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 CacheSourceErrorsInLibraryBuilder({List<CacheAnalysisErrorBuilder> errors}) 549 CacheSourceErrorsInLibraryBuilder({List<CacheAnalysisErrorBuilder> errors})
508 : _errors = errors; 550 : _errors = errors;
509 551
510 /** 552 /**
511 * Flush [informative] data recursively. 553 * Flush [informative] data recursively.
512 */ 554 */
513 void flushInformative() { 555 void flushInformative() {
514 _errors?.forEach((b) => b.flushInformative()); 556 _errors?.forEach((b) => b.flushInformative());
515 } 557 }
516 558
559 /**
560 * Accumulate non-[informative] data into [signature].
561 */
562 void collectApiSignature(fb.ApiSignature signature) {
563 if (this._errors == null) {
564 signature.addInt(0);
565 } else {
566 signature.addInt(this._errors.length);
567 for (var x in this._errors) {
568 x?.collectApiSignature(signature);
569 }
570 }
571 }
572
517 List<int> toBuffer() { 573 List<int> toBuffer() {
518 fb.Builder fbBuilder = new fb.Builder(); 574 fb.Builder fbBuilder = new fb.Builder();
519 return fbBuilder.finish(finish(fbBuilder), "CSEL"); 575 return fbBuilder.finish(finish(fbBuilder), "CSEL");
520 } 576 }
521 577
522 fb.Offset finish(fb.Builder fbBuilder) { 578 fb.Offset finish(fb.Builder fbBuilder) {
523 fb.Offset offset_errors; 579 fb.Offset offset_errors;
524 if (!(_errors == null || _errors.isEmpty)) { 580 if (!(_errors == null || _errors.isEmpty)) {
525 offset_errors = fbBuilder.writeList(_errors.map((b) => b.finish(fbBuilder) ).toList()); 581 offset_errors = fbBuilder.writeList(_errors.map((b) => b.finish(fbBuilder) ).toList());
526 } 582 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 CodeRangeBuilder({int length, int offset}) 661 CodeRangeBuilder({int length, int offset})
606 : _length = length, 662 : _length = length,
607 _offset = offset; 663 _offset = offset;
608 664
609 /** 665 /**
610 * Flush [informative] data recursively. 666 * Flush [informative] data recursively.
611 */ 667 */
612 void flushInformative() { 668 void flushInformative() {
613 } 669 }
614 670
671 /**
672 * Accumulate non-[informative] data into [signature].
673 */
674 void collectApiSignature(fb.ApiSignature signature) {
675 signature.addInt(this._offset ?? 0);
676 signature.addInt(this._length ?? 0);
677 }
678
615 fb.Offset finish(fb.Builder fbBuilder) { 679 fb.Offset finish(fb.Builder fbBuilder) {
616 fbBuilder.startTable(); 680 fbBuilder.startTable();
617 if (_length != null && _length != 0) { 681 if (_length != null && _length != 0) {
618 fbBuilder.addUint32(1, _length); 682 fbBuilder.addUint32(1, _length);
619 } 683 }
620 if (_offset != null && _offset != 0) { 684 if (_offset != null && _offset != 0) {
621 fbBuilder.addUint32(0, _offset); 685 fbBuilder.addUint32(0, _offset);
622 } 686 }
623 return fbBuilder.endTable(); 687 return fbBuilder.endTable();
624 } 688 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 877
814 /** 878 /**
815 * Flush [informative] data recursively. 879 * Flush [informative] data recursively.
816 */ 880 */
817 void flushInformative() { 881 void flushInformative() {
818 _syntheticParams?.forEach((b) => b.flushInformative()); 882 _syntheticParams?.forEach((b) => b.flushInformative());
819 _syntheticReturnType?.flushInformative(); 883 _syntheticReturnType?.flushInformative();
820 _typeArguments?.forEach((b) => b.flushInformative()); 884 _typeArguments?.forEach((b) => b.flushInformative());
821 } 885 }
822 886
887 /**
888 * Accumulate non-[informative] data into [signature].
889 */
890 void collectApiSignature(fb.ApiSignature signature) {
891 signature.addInt(this._reference ?? 0);
892 if (this._typeArguments == null) {
893 signature.addInt(0);
894 } else {
895 signature.addInt(this._typeArguments.length);
896 for (var x in this._typeArguments) {
897 x?.collectApiSignature(signature);
898 }
899 }
900 signature.addInt(this._slot ?? 0);
901 signature.addInt(this._paramReference ?? 0);
902 if (this._implicitFunctionTypeIndices == null) {
903 signature.addInt(0);
904 } else {
905 signature.addInt(this._implicitFunctionTypeIndices.length);
906 for (var x in this._implicitFunctionTypeIndices) {
907 signature.addInt(x);
908 }
909 }
910 signature.addBool(this._syntheticReturnType != null);
911 this._syntheticReturnType?.collectApiSignature(signature);
912 if (this._syntheticParams == null) {
913 signature.addInt(0);
914 } else {
915 signature.addInt(this._syntheticParams.length);
916 for (var x in this._syntheticParams) {
917 x?.collectApiSignature(signature);
918 }
919 }
920 }
921
823 fb.Offset finish(fb.Builder fbBuilder) { 922 fb.Offset finish(fb.Builder fbBuilder) {
824 fb.Offset offset_implicitFunctionTypeIndices; 923 fb.Offset offset_implicitFunctionTypeIndices;
825 fb.Offset offset_syntheticParams; 924 fb.Offset offset_syntheticParams;
826 fb.Offset offset_syntheticReturnType; 925 fb.Offset offset_syntheticReturnType;
827 fb.Offset offset_typeArguments; 926 fb.Offset offset_typeArguments;
828 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i sEmpty)) { 927 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i sEmpty)) {
829 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu nctionTypeIndices); 928 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu nctionTypeIndices);
830 } 929 }
831 if (!(_syntheticParams == null || _syntheticParams.isEmpty)) { 930 if (!(_syntheticParams == null || _syntheticParams.isEmpty)) {
832 offset_syntheticParams = fbBuilder.writeList(_syntheticParams.map((b) => b .finish(fbBuilder)).toList()); 931 offset_syntheticParams = fbBuilder.writeList(_syntheticParams.map((b) => b .finish(fbBuilder)).toList());
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 LinkedDependencyBuilder({List<String> parts, String uri}) 1087 LinkedDependencyBuilder({List<String> parts, String uri})
989 : _parts = parts, 1088 : _parts = parts,
990 _uri = uri; 1089 _uri = uri;
991 1090
992 /** 1091 /**
993 * Flush [informative] data recursively. 1092 * Flush [informative] data recursively.
994 */ 1093 */
995 void flushInformative() { 1094 void flushInformative() {
996 } 1095 }
997 1096
1097 /**
1098 * Accumulate non-[informative] data into [signature].
1099 */
1100 void collectApiSignature(fb.ApiSignature signature) {
1101 signature.addString(this._uri ?? '');
1102 if (this._parts == null) {
1103 signature.addInt(0);
1104 } else {
1105 signature.addInt(this._parts.length);
1106 for (var x in this._parts) {
1107 signature.addString(x);
1108 }
1109 }
1110 }
1111
998 fb.Offset finish(fb.Builder fbBuilder) { 1112 fb.Offset finish(fb.Builder fbBuilder) {
999 fb.Offset offset_parts; 1113 fb.Offset offset_parts;
1000 fb.Offset offset_uri; 1114 fb.Offset offset_uri;
1001 if (!(_parts == null || _parts.isEmpty)) { 1115 if (!(_parts == null || _parts.isEmpty)) {
1002 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList()); 1116 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList());
1003 } 1117 }
1004 if (_uri != null) { 1118 if (_uri != null) {
1005 offset_uri = fbBuilder.writeString(_uri); 1119 offset_uri = fbBuilder.writeString(_uri);
1006 } 1120 }
1007 fbBuilder.startTable(); 1121 fbBuilder.startTable();
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 _kind = kind, 1235 _kind = kind,
1122 _name = name, 1236 _name = name,
1123 _unit = unit; 1237 _unit = unit;
1124 1238
1125 /** 1239 /**
1126 * Flush [informative] data recursively. 1240 * Flush [informative] data recursively.
1127 */ 1241 */
1128 void flushInformative() { 1242 void flushInformative() {
1129 } 1243 }
1130 1244
1245 /**
1246 * Accumulate non-[informative] data into [signature].
1247 */
1248 void collectApiSignature(fb.ApiSignature signature) {
1249 signature.addInt(this._dependency ?? 0);
1250 signature.addString(this._name ?? '');
1251 signature.addInt(this._unit ?? 0);
1252 signature.addInt(this._kind == null ? 0 : this._kind.index);
1253 }
1254
1131 fb.Offset finish(fb.Builder fbBuilder) { 1255 fb.Offset finish(fb.Builder fbBuilder) {
1132 fb.Offset offset_name; 1256 fb.Offset offset_name;
1133 if (_name != null) { 1257 if (_name != null) {
1134 offset_name = fbBuilder.writeString(_name); 1258 offset_name = fbBuilder.writeString(_name);
1135 } 1259 }
1136 fbBuilder.startTable(); 1260 fbBuilder.startTable();
1137 if (_dependency != null && _dependency != 0) { 1261 if (_dependency != null && _dependency != 0) {
1138 fbBuilder.addUint32(0, _dependency); 1262 fbBuilder.addUint32(0, _dependency);
1139 } 1263 }
1140 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { 1264 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 1458
1335 /** 1459 /**
1336 * Flush [informative] data recursively. 1460 * Flush [informative] data recursively.
1337 */ 1461 */
1338 void flushInformative() { 1462 void flushInformative() {
1339 _dependencies?.forEach((b) => b.flushInformative()); 1463 _dependencies?.forEach((b) => b.flushInformative());
1340 _exportNames?.forEach((b) => b.flushInformative()); 1464 _exportNames?.forEach((b) => b.flushInformative());
1341 _units?.forEach((b) => b.flushInformative()); 1465 _units?.forEach((b) => b.flushInformative());
1342 } 1466 }
1343 1467
1468 /**
1469 * Accumulate non-[informative] data into [signature].
1470 */
1471 void collectApiSignature(fb.ApiSignature signature) {
1472 if (this._dependencies == null) {
1473 signature.addInt(0);
1474 } else {
1475 signature.addInt(this._dependencies.length);
1476 for (var x in this._dependencies) {
1477 x?.collectApiSignature(signature);
1478 }
1479 }
1480 if (this._importDependencies == null) {
1481 signature.addInt(0);
1482 } else {
1483 signature.addInt(this._importDependencies.length);
1484 for (var x in this._importDependencies) {
1485 signature.addInt(x);
1486 }
1487 }
1488 signature.addInt(this._numPrelinkedDependencies ?? 0);
1489 if (this._units == null) {
1490 signature.addInt(0);
1491 } else {
1492 signature.addInt(this._units.length);
1493 for (var x in this._units) {
1494 x?.collectApiSignature(signature);
1495 }
1496 }
1497 if (this._exportNames == null) {
1498 signature.addInt(0);
1499 } else {
1500 signature.addInt(this._exportNames.length);
1501 for (var x in this._exportNames) {
1502 x?.collectApiSignature(signature);
1503 }
1504 }
1505 signature.addBool(this._fallbackMode == true);
1506 if (this._exportDependencies == null) {
1507 signature.addInt(0);
1508 } else {
1509 signature.addInt(this._exportDependencies.length);
1510 for (var x in this._exportDependencies) {
1511 signature.addInt(x);
1512 }
1513 }
1514 }
1515
1344 List<int> toBuffer() { 1516 List<int> toBuffer() {
1345 fb.Builder fbBuilder = new fb.Builder(); 1517 fb.Builder fbBuilder = new fb.Builder();
1346 return fbBuilder.finish(finish(fbBuilder), "LLib"); 1518 return fbBuilder.finish(finish(fbBuilder), "LLib");
1347 } 1519 }
1348 1520
1349 fb.Offset finish(fb.Builder fbBuilder) { 1521 fb.Offset finish(fb.Builder fbBuilder) {
1350 fb.Offset offset_dependencies; 1522 fb.Offset offset_dependencies;
1351 fb.Offset offset_exportDependencies; 1523 fb.Offset offset_exportDependencies;
1352 fb.Offset offset_exportNames; 1524 fb.Offset offset_exportNames;
1353 fb.Offset offset_importDependencies; 1525 fb.Offset offset_importDependencies;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 _name = name, 1782 _name = name,
1611 _numTypeParameters = numTypeParameters, 1783 _numTypeParameters = numTypeParameters,
1612 _unit = unit; 1784 _unit = unit;
1613 1785
1614 /** 1786 /**
1615 * Flush [informative] data recursively. 1787 * Flush [informative] data recursively.
1616 */ 1788 */
1617 void flushInformative() { 1789 void flushInformative() {
1618 } 1790 }
1619 1791
1792 /**
1793 * Accumulate non-[informative] data into [signature].
1794 */
1795 void collectApiSignature(fb.ApiSignature signature) {
1796 signature.addInt(this._unit ?? 0);
1797 signature.addInt(this._dependency ?? 0);
1798 signature.addInt(this._kind == null ? 0 : this._kind.index);
1799 signature.addString(this._name ?? '');
1800 signature.addInt(this._numTypeParameters ?? 0);
1801 signature.addInt(this._containingReference ?? 0);
1802 signature.addInt(this._localIndex ?? 0);
1803 }
1804
1620 fb.Offset finish(fb.Builder fbBuilder) { 1805 fb.Offset finish(fb.Builder fbBuilder) {
1621 fb.Offset offset_name; 1806 fb.Offset offset_name;
1622 if (_name != null) { 1807 if (_name != null) {
1623 offset_name = fbBuilder.writeString(_name); 1808 offset_name = fbBuilder.writeString(_name);
1624 } 1809 }
1625 fbBuilder.startTable(); 1810 fbBuilder.startTable();
1626 if (_containingReference != null && _containingReference != 0) { 1811 if (_containingReference != null && _containingReference != 0) {
1627 fbBuilder.addUint32(5, _containingReference); 1812 fbBuilder.addUint32(5, _containingReference);
1628 } 1813 }
1629 if (_dependency != null && _dependency != 0) { 1814 if (_dependency != null && _dependency != 0) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 _types = types; 1975 _types = types;
1791 1976
1792 /** 1977 /**
1793 * Flush [informative] data recursively. 1978 * Flush [informative] data recursively.
1794 */ 1979 */
1795 void flushInformative() { 1980 void flushInformative() {
1796 _references?.forEach((b) => b.flushInformative()); 1981 _references?.forEach((b) => b.flushInformative());
1797 _types?.forEach((b) => b.flushInformative()); 1982 _types?.forEach((b) => b.flushInformative());
1798 } 1983 }
1799 1984
1985 /**
1986 * Accumulate non-[informative] data into [signature].
1987 */
1988 void collectApiSignature(fb.ApiSignature signature) {
1989 if (this._references == null) {
1990 signature.addInt(0);
1991 } else {
1992 signature.addInt(this._references.length);
1993 for (var x in this._references) {
1994 x?.collectApiSignature(signature);
1995 }
1996 }
1997 if (this._types == null) {
1998 signature.addInt(0);
1999 } else {
2000 signature.addInt(this._types.length);
2001 for (var x in this._types) {
2002 x?.collectApiSignature(signature);
2003 }
2004 }
2005 if (this._constCycles == null) {
2006 signature.addInt(0);
2007 } else {
2008 signature.addInt(this._constCycles.length);
2009 for (var x in this._constCycles) {
2010 signature.addInt(x);
2011 }
2012 }
2013 }
2014
1800 fb.Offset finish(fb.Builder fbBuilder) { 2015 fb.Offset finish(fb.Builder fbBuilder) {
1801 fb.Offset offset_constCycles; 2016 fb.Offset offset_constCycles;
1802 fb.Offset offset_references; 2017 fb.Offset offset_references;
1803 fb.Offset offset_types; 2018 fb.Offset offset_types;
1804 if (!(_constCycles == null || _constCycles.isEmpty)) { 2019 if (!(_constCycles == null || _constCycles.isEmpty)) {
1805 offset_constCycles = fbBuilder.writeListUint32(_constCycles); 2020 offset_constCycles = fbBuilder.writeListUint32(_constCycles);
1806 } 2021 }
1807 if (!(_references == null || _references.isEmpty)) { 2022 if (!(_references == null || _references.isEmpty)) {
1808 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList()); 2023 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList());
1809 } 2024 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 "constCycles": constCycles, 2090 "constCycles": constCycles,
1876 "references": references, 2091 "references": references,
1877 "types": types, 2092 "types": types,
1878 }; 2093 };
1879 2094
1880 @override 2095 @override
1881 String toString() => convert.JSON.encode(toJson()); 2096 String toString() => convert.JSON.encode(toJson());
1882 } 2097 }
1883 2098
1884 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id l.PackageBundle { 2099 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id l.PackageBundle {
2100 String _apiSignature;
1885 List<LinkedLibraryBuilder> _linkedLibraries; 2101 List<LinkedLibraryBuilder> _linkedLibraries;
1886 List<String> _linkedLibraryUris; 2102 List<String> _linkedLibraryUris;
1887 int _majorVersion; 2103 int _majorVersion;
1888 int _minorVersion; 2104 int _minorVersion;
1889 List<String> _unlinkedUnitHashes; 2105 List<String> _unlinkedUnitHashes;
1890 List<UnlinkedUnitBuilder> _unlinkedUnits; 2106 List<UnlinkedUnitBuilder> _unlinkedUnits;
1891 List<String> _unlinkedUnitUris; 2107 List<String> _unlinkedUnitUris;
1892 2108
1893 @override 2109 @override
2110 String get apiSignature => _apiSignature ??= '';
2111
2112 /**
2113 * MD5 hash of the non-informative fields of the [PackageBundle] (not
2114 * including this one). This can be used to identify when the API of a
2115 * package may have changed.
2116 */
2117 void set apiSignature(String _value) {
2118 _apiSignature = _value;
2119 }
2120
2121 @override
1894 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked LibraryBuilder>[]; 2122 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked LibraryBuilder>[];
1895 2123
1896 /** 2124 /**
1897 * Linked libraries. 2125 * Linked libraries.
1898 */ 2126 */
1899 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { 2127 void set linkedLibraries(List<LinkedLibraryBuilder> _value) {
1900 _linkedLibraries = _value; 2128 _linkedLibraries = _value;
1901 } 2129 }
1902 2130
1903 @override 2131 @override
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 @override 2187 @override
1960 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; 2188 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[];
1961 2189
1962 /** 2190 /**
1963 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. 2191 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`.
1964 */ 2192 */
1965 void set unlinkedUnitUris(List<String> _value) { 2193 void set unlinkedUnitUris(List<String> _value) {
1966 _unlinkedUnitUris = _value; 2194 _unlinkedUnitUris = _value;
1967 } 2195 }
1968 2196
1969 PackageBundleBuilder({List<LinkedLibraryBuilder> linkedLibraries, List<String> linkedLibraryUris, int majorVersion, int minorVersion, List<String> unlinkedUni tHashes, List<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUnitUris} ) 2197 PackageBundleBuilder({String apiSignature, List<LinkedLibraryBuilder> linkedLi braries, List<String> linkedLibraryUris, int majorVersion, int minorVersion, Lis t<String> unlinkedUnitHashes, List<UnlinkedUnitBuilder> unlinkedUnits, List<Stri ng> unlinkedUnitUris})
1970 : _linkedLibraries = linkedLibraries, 2198 : _apiSignature = apiSignature,
2199 _linkedLibraries = linkedLibraries,
1971 _linkedLibraryUris = linkedLibraryUris, 2200 _linkedLibraryUris = linkedLibraryUris,
1972 _majorVersion = majorVersion, 2201 _majorVersion = majorVersion,
1973 _minorVersion = minorVersion, 2202 _minorVersion = minorVersion,
1974 _unlinkedUnitHashes = unlinkedUnitHashes, 2203 _unlinkedUnitHashes = unlinkedUnitHashes,
1975 _unlinkedUnits = unlinkedUnits, 2204 _unlinkedUnits = unlinkedUnits,
1976 _unlinkedUnitUris = unlinkedUnitUris; 2205 _unlinkedUnitUris = unlinkedUnitUris;
1977 2206
1978 /** 2207 /**
1979 * Flush [informative] data recursively. 2208 * Flush [informative] data recursively.
1980 */ 2209 */
1981 void flushInformative() { 2210 void flushInformative() {
1982 _linkedLibraries?.forEach((b) => b.flushInformative()); 2211 _linkedLibraries?.forEach((b) => b.flushInformative());
1983 _unlinkedUnitHashes = null; 2212 _unlinkedUnitHashes = null;
1984 _unlinkedUnits?.forEach((b) => b.flushInformative()); 2213 _unlinkedUnits?.forEach((b) => b.flushInformative());
1985 } 2214 }
1986 2215
2216 /**
2217 * Accumulate non-[informative] data into [signature].
2218 */
2219 void collectApiSignature(fb.ApiSignature signature) {
2220 if (this._linkedLibraries == null) {
2221 signature.addInt(0);
2222 } else {
2223 signature.addInt(this._linkedLibraries.length);
2224 for (var x in this._linkedLibraries) {
2225 x?.collectApiSignature(signature);
2226 }
2227 }
2228 if (this._linkedLibraryUris == null) {
2229 signature.addInt(0);
2230 } else {
2231 signature.addInt(this._linkedLibraryUris.length);
2232 for (var x in this._linkedLibraryUris) {
2233 signature.addString(x);
2234 }
2235 }
2236 if (this._unlinkedUnits == null) {
2237 signature.addInt(0);
2238 } else {
2239 signature.addInt(this._unlinkedUnits.length);
2240 for (var x in this._unlinkedUnits) {
2241 x?.collectApiSignature(signature);
2242 }
2243 }
2244 if (this._unlinkedUnitUris == null) {
2245 signature.addInt(0);
2246 } else {
2247 signature.addInt(this._unlinkedUnitUris.length);
2248 for (var x in this._unlinkedUnitUris) {
2249 signature.addString(x);
2250 }
2251 }
2252 signature.addInt(this._majorVersion ?? 0);
2253 signature.addInt(this._minorVersion ?? 0);
2254 signature.addString(this._apiSignature ?? '');
2255 }
2256
1987 List<int> toBuffer() { 2257 List<int> toBuffer() {
1988 fb.Builder fbBuilder = new fb.Builder(); 2258 fb.Builder fbBuilder = new fb.Builder();
1989 return fbBuilder.finish(finish(fbBuilder), "PBdl"); 2259 return fbBuilder.finish(finish(fbBuilder), "PBdl");
1990 } 2260 }
1991 2261
1992 fb.Offset finish(fb.Builder fbBuilder) { 2262 fb.Offset finish(fb.Builder fbBuilder) {
2263 fb.Offset offset_apiSignature;
1993 fb.Offset offset_linkedLibraries; 2264 fb.Offset offset_linkedLibraries;
1994 fb.Offset offset_linkedLibraryUris; 2265 fb.Offset offset_linkedLibraryUris;
1995 fb.Offset offset_unlinkedUnitHashes; 2266 fb.Offset offset_unlinkedUnitHashes;
1996 fb.Offset offset_unlinkedUnits; 2267 fb.Offset offset_unlinkedUnits;
1997 fb.Offset offset_unlinkedUnitUris; 2268 fb.Offset offset_unlinkedUnitUris;
2269 if (_apiSignature != null) {
2270 offset_apiSignature = fbBuilder.writeString(_apiSignature);
2271 }
1998 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { 2272 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) {
1999 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b .finish(fbBuilder)).toList()); 2273 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b .finish(fbBuilder)).toList());
2000 } 2274 }
2001 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) { 2275 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) {
2002 offset_linkedLibraryUris = fbBuilder.writeList(_linkedLibraryUris.map((b) => fbBuilder.writeString(b)).toList()); 2276 offset_linkedLibraryUris = fbBuilder.writeList(_linkedLibraryUris.map((b) => fbBuilder.writeString(b)).toList());
2003 } 2277 }
2004 if (!(_unlinkedUnitHashes == null || _unlinkedUnitHashes.isEmpty)) { 2278 if (!(_unlinkedUnitHashes == null || _unlinkedUnitHashes.isEmpty)) {
2005 offset_unlinkedUnitHashes = fbBuilder.writeList(_unlinkedUnitHashes.map((b ) => fbBuilder.writeString(b)).toList()); 2279 offset_unlinkedUnitHashes = fbBuilder.writeList(_unlinkedUnitHashes.map((b ) => fbBuilder.writeString(b)).toList());
2006 } 2280 }
2007 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) { 2281 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) {
2008 offset_unlinkedUnits = fbBuilder.writeList(_unlinkedUnits.map((b) => b.fin ish(fbBuilder)).toList()); 2282 offset_unlinkedUnits = fbBuilder.writeList(_unlinkedUnits.map((b) => b.fin ish(fbBuilder)).toList());
2009 } 2283 }
2010 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) { 2284 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) {
2011 offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) => fbBuilder.writeString(b)).toList()); 2285 offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) => fbBuilder.writeString(b)).toList());
2012 } 2286 }
2013 fbBuilder.startTable(); 2287 fbBuilder.startTable();
2288 if (offset_apiSignature != null) {
2289 fbBuilder.addOffset(7, offset_apiSignature);
2290 }
2014 if (offset_linkedLibraries != null) { 2291 if (offset_linkedLibraries != null) {
2015 fbBuilder.addOffset(0, offset_linkedLibraries); 2292 fbBuilder.addOffset(0, offset_linkedLibraries);
2016 } 2293 }
2017 if (offset_linkedLibraryUris != null) { 2294 if (offset_linkedLibraryUris != null) {
2018 fbBuilder.addOffset(1, offset_linkedLibraryUris); 2295 fbBuilder.addOffset(1, offset_linkedLibraryUris);
2019 } 2296 }
2020 if (_majorVersion != null && _majorVersion != 0) { 2297 if (_majorVersion != null && _majorVersion != 0) {
2021 fbBuilder.addUint32(5, _majorVersion); 2298 fbBuilder.addUint32(5, _majorVersion);
2022 } 2299 }
2023 if (_minorVersion != null && _minorVersion != 0) { 2300 if (_minorVersion != null && _minorVersion != 0) {
(...skipping 23 matching lines...) Expand all
2047 @override 2324 @override
2048 _PackageBundleImpl createObject(fb.BufferContext bc, int offset) => new _Packa geBundleImpl(bc, offset); 2325 _PackageBundleImpl createObject(fb.BufferContext bc, int offset) => new _Packa geBundleImpl(bc, offset);
2049 } 2326 }
2050 2327
2051 class _PackageBundleImpl extends Object with _PackageBundleMixin implements idl. PackageBundle { 2328 class _PackageBundleImpl extends Object with _PackageBundleMixin implements idl. PackageBundle {
2052 final fb.BufferContext _bc; 2329 final fb.BufferContext _bc;
2053 final int _bcOffset; 2330 final int _bcOffset;
2054 2331
2055 _PackageBundleImpl(this._bc, this._bcOffset); 2332 _PackageBundleImpl(this._bc, this._bcOffset);
2056 2333
2334 String _apiSignature;
2057 List<idl.LinkedLibrary> _linkedLibraries; 2335 List<idl.LinkedLibrary> _linkedLibraries;
2058 List<String> _linkedLibraryUris; 2336 List<String> _linkedLibraryUris;
2059 int _majorVersion; 2337 int _majorVersion;
2060 int _minorVersion; 2338 int _minorVersion;
2061 List<String> _unlinkedUnitHashes; 2339 List<String> _unlinkedUnitHashes;
2062 List<idl.UnlinkedUnit> _unlinkedUnits; 2340 List<idl.UnlinkedUnit> _unlinkedUnits;
2063 List<String> _unlinkedUnitUris; 2341 List<String> _unlinkedUnitUris;
2064 2342
2065 @override 2343 @override
2344 String get apiSignature {
2345 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 7, '');
2346 return _apiSignature;
2347 }
2348
2349 @override
2066 List<idl.LinkedLibrary> get linkedLibraries { 2350 List<idl.LinkedLibrary> get linkedLibraries {
2067 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib raryReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedLibrary>[]); 2351 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib raryReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedLibrary>[]);
2068 return _linkedLibraries; 2352 return _linkedLibraries;
2069 } 2353 }
2070 2354
2071 @override 2355 @override
2072 List<String> get linkedLibraryUris { 2356 List<String> get linkedLibraryUris {
2073 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()). vTableGet(_bc, _bcOffset, 1, const <String>[]); 2357 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()). vTableGet(_bc, _bcOffset, 1, const <String>[]);
2074 return _linkedLibraryUris; 2358 return _linkedLibraryUris;
2075 } 2359 }
(...skipping 26 matching lines...) Expand all
2102 List<String> get unlinkedUnitUris { 2386 List<String> get unlinkedUnitUris {
2103 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v TableGet(_bc, _bcOffset, 3, const <String>[]); 2387 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v TableGet(_bc, _bcOffset, 3, const <String>[]);
2104 return _unlinkedUnitUris; 2388 return _unlinkedUnitUris;
2105 } 2389 }
2106 } 2390 }
2107 2391
2108 abstract class _PackageBundleMixin implements idl.PackageBundle { 2392 abstract class _PackageBundleMixin implements idl.PackageBundle {
2109 @override 2393 @override
2110 Map<String, Object> toJson() { 2394 Map<String, Object> toJson() {
2111 Map<String, Object> _result = <String, Object>{}; 2395 Map<String, Object> _result = <String, Object>{};
2396 if (apiSignature != '') _result["apiSignature"] = apiSignature;
2112 if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries .map((_value) => _value.toJson()).toList(); 2397 if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries .map((_value) => _value.toJson()).toList();
2113 if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibra ryUris; 2398 if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibra ryUris;
2114 if (majorVersion != 0) _result["majorVersion"] = majorVersion; 2399 if (majorVersion != 0) _result["majorVersion"] = majorVersion;
2115 if (minorVersion != 0) _result["minorVersion"] = minorVersion; 2400 if (minorVersion != 0) _result["minorVersion"] = minorVersion;
2116 if (unlinkedUnitHashes.isNotEmpty) _result["unlinkedUnitHashes"] = unlinkedU nitHashes; 2401 if (unlinkedUnitHashes.isNotEmpty) _result["unlinkedUnitHashes"] = unlinkedU nitHashes;
2117 if (unlinkedUnits.isNotEmpty) _result["unlinkedUnits"] = unlinkedUnits.map(( _value) => _value.toJson()).toList(); 2402 if (unlinkedUnits.isNotEmpty) _result["unlinkedUnits"] = unlinkedUnits.map(( _value) => _value.toJson()).toList();
2118 if (unlinkedUnitUris.isNotEmpty) _result["unlinkedUnitUris"] = unlinkedUnitU ris; 2403 if (unlinkedUnitUris.isNotEmpty) _result["unlinkedUnitUris"] = unlinkedUnitU ris;
2119 return _result; 2404 return _result;
2120 } 2405 }
2121 2406
2122 @override 2407 @override
2123 Map<String, Object> toMap() => { 2408 Map<String, Object> toMap() => {
2409 "apiSignature": apiSignature,
2124 "linkedLibraries": linkedLibraries, 2410 "linkedLibraries": linkedLibraries,
2125 "linkedLibraryUris": linkedLibraryUris, 2411 "linkedLibraryUris": linkedLibraryUris,
2126 "majorVersion": majorVersion, 2412 "majorVersion": majorVersion,
2127 "minorVersion": minorVersion, 2413 "minorVersion": minorVersion,
2128 "unlinkedUnitHashes": unlinkedUnitHashes, 2414 "unlinkedUnitHashes": unlinkedUnitHashes,
2129 "unlinkedUnits": unlinkedUnits, 2415 "unlinkedUnits": unlinkedUnits,
2130 "unlinkedUnitUris": unlinkedUnitUris, 2416 "unlinkedUnitUris": unlinkedUnitUris,
2131 }; 2417 };
2132 2418
2133 @override 2419 @override
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 _units = units, 2558 _units = units,
2273 _unitUnitUris = unitUnitUris; 2559 _unitUnitUris = unitUnitUris;
2274 2560
2275 /** 2561 /**
2276 * Flush [informative] data recursively. 2562 * Flush [informative] data recursively.
2277 */ 2563 */
2278 void flushInformative() { 2564 void flushInformative() {
2279 _units?.forEach((b) => b.flushInformative()); 2565 _units?.forEach((b) => b.flushInformative());
2280 } 2566 }
2281 2567
2568 /**
2569 * Accumulate non-[informative] data into [signature].
2570 */
2571 void collectApiSignature(fb.ApiSignature signature) {
2572 if (this._elementUnits == null) {
2573 signature.addInt(0);
2574 } else {
2575 signature.addInt(this._elementUnits.length);
2576 for (var x in this._elementUnits) {
2577 signature.addInt(x);
2578 }
2579 }
2580 if (this._elementNameUnitMemberIds == null) {
2581 signature.addInt(0);
2582 } else {
2583 signature.addInt(this._elementNameUnitMemberIds.length);
2584 for (var x in this._elementNameUnitMemberIds) {
2585 signature.addInt(x);
2586 }
2587 }
2588 if (this._unitLibraryUris == null) {
2589 signature.addInt(0);
2590 } else {
2591 signature.addInt(this._unitLibraryUris.length);
2592 for (var x in this._unitLibraryUris) {
2593 signature.addInt(x);
2594 }
2595 }
2596 if (this._unitUnitUris == null) {
2597 signature.addInt(0);
2598 } else {
2599 signature.addInt(this._unitUnitUris.length);
2600 for (var x in this._unitUnitUris) {
2601 signature.addInt(x);
2602 }
2603 }
2604 if (this._units == null) {
2605 signature.addInt(0);
2606 } else {
2607 signature.addInt(this._units.length);
2608 for (var x in this._units) {
2609 x?.collectApiSignature(signature);
2610 }
2611 }
2612 if (this._elementKinds == null) {
2613 signature.addInt(0);
2614 } else {
2615 signature.addInt(this._elementKinds.length);
2616 for (var x in this._elementKinds) {
2617 signature.addInt(x.index);
2618 }
2619 }
2620 if (this._strings == null) {
2621 signature.addInt(0);
2622 } else {
2623 signature.addInt(this._strings.length);
2624 for (var x in this._strings) {
2625 signature.addString(x);
2626 }
2627 }
2628 if (this._elementNameClassMemberIds == null) {
2629 signature.addInt(0);
2630 } else {
2631 signature.addInt(this._elementNameClassMemberIds.length);
2632 for (var x in this._elementNameClassMemberIds) {
2633 signature.addInt(x);
2634 }
2635 }
2636 if (this._elementNameParameterIds == null) {
2637 signature.addInt(0);
2638 } else {
2639 signature.addInt(this._elementNameParameterIds.length);
2640 for (var x in this._elementNameParameterIds) {
2641 signature.addInt(x);
2642 }
2643 }
2644 }
2645
2282 List<int> toBuffer() { 2646 List<int> toBuffer() {
2283 fb.Builder fbBuilder = new fb.Builder(); 2647 fb.Builder fbBuilder = new fb.Builder();
2284 return fbBuilder.finish(finish(fbBuilder), "Indx"); 2648 return fbBuilder.finish(finish(fbBuilder), "Indx");
2285 } 2649 }
2286 2650
2287 fb.Offset finish(fb.Builder fbBuilder) { 2651 fb.Offset finish(fb.Builder fbBuilder) {
2288 fb.Offset offset_elementKinds; 2652 fb.Offset offset_elementKinds;
2289 fb.Offset offset_elementNameClassMemberIds; 2653 fb.Offset offset_elementNameClassMemberIds;
2290 fb.Offset offset_elementNameParameterIds; 2654 fb.Offset offset_elementNameParameterIds;
2291 fb.Offset offset_elementNameUnitMemberIds; 2655 fb.Offset offset_elementNameUnitMemberIds;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 _usedNameKinds = usedNameKinds, 3013 _usedNameKinds = usedNameKinds,
2650 _usedNameOffsets = usedNameOffsets, 3014 _usedNameOffsets = usedNameOffsets,
2651 _usedNames = usedNames; 3015 _usedNames = usedNames;
2652 3016
2653 /** 3017 /**
2654 * Flush [informative] data recursively. 3018 * Flush [informative] data recursively.
2655 */ 3019 */
2656 void flushInformative() { 3020 void flushInformative() {
2657 } 3021 }
2658 3022
3023 /**
3024 * Accumulate non-[informative] data into [signature].
3025 */
3026 void collectApiSignature(fb.ApiSignature signature) {
3027 signature.addInt(this._unit ?? 0);
3028 if (this._usedElementLengths == null) {
3029 signature.addInt(0);
3030 } else {
3031 signature.addInt(this._usedElementLengths.length);
3032 for (var x in this._usedElementLengths) {
3033 signature.addInt(x);
3034 }
3035 }
3036 if (this._usedElementOffsets == null) {
3037 signature.addInt(0);
3038 } else {
3039 signature.addInt(this._usedElementOffsets.length);
3040 for (var x in this._usedElementOffsets) {
3041 signature.addInt(x);
3042 }
3043 }
3044 if (this._usedElements == null) {
3045 signature.addInt(0);
3046 } else {
3047 signature.addInt(this._usedElements.length);
3048 for (var x in this._usedElements) {
3049 signature.addInt(x);
3050 }
3051 }
3052 if (this._usedElementKinds == null) {
3053 signature.addInt(0);
3054 } else {
3055 signature.addInt(this._usedElementKinds.length);
3056 for (var x in this._usedElementKinds) {
3057 signature.addInt(x.index);
3058 }
3059 }
3060 if (this._definedNames == null) {
3061 signature.addInt(0);
3062 } else {
3063 signature.addInt(this._definedNames.length);
3064 for (var x in this._definedNames) {
3065 signature.addInt(x);
3066 }
3067 }
3068 if (this._definedNameKinds == null) {
3069 signature.addInt(0);
3070 } else {
3071 signature.addInt(this._definedNameKinds.length);
3072 for (var x in this._definedNameKinds) {
3073 signature.addInt(x.index);
3074 }
3075 }
3076 if (this._definedNameOffsets == null) {
3077 signature.addInt(0);
3078 } else {
3079 signature.addInt(this._definedNameOffsets.length);
3080 for (var x in this._definedNameOffsets) {
3081 signature.addInt(x);
3082 }
3083 }
3084 if (this._usedNames == null) {
3085 signature.addInt(0);
3086 } else {
3087 signature.addInt(this._usedNames.length);
3088 for (var x in this._usedNames) {
3089 signature.addInt(x);
3090 }
3091 }
3092 if (this._usedNameOffsets == null) {
3093 signature.addInt(0);
3094 } else {
3095 signature.addInt(this._usedNameOffsets.length);
3096 for (var x in this._usedNameOffsets) {
3097 signature.addInt(x);
3098 }
3099 }
3100 if (this._usedNameKinds == null) {
3101 signature.addInt(0);
3102 } else {
3103 signature.addInt(this._usedNameKinds.length);
3104 for (var x in this._usedNameKinds) {
3105 signature.addInt(x.index);
3106 }
3107 }
3108 if (this._usedElementIsQualifiedFlags == null) {
3109 signature.addInt(0);
3110 } else {
3111 signature.addInt(this._usedElementIsQualifiedFlags.length);
3112 for (var x in this._usedElementIsQualifiedFlags) {
3113 signature.addBool(x);
3114 }
3115 }
3116 if (this._usedNameIsQualifiedFlags == null) {
3117 signature.addInt(0);
3118 } else {
3119 signature.addInt(this._usedNameIsQualifiedFlags.length);
3120 for (var x in this._usedNameIsQualifiedFlags) {
3121 signature.addBool(x);
3122 }
3123 }
3124 }
3125
2659 fb.Offset finish(fb.Builder fbBuilder) { 3126 fb.Offset finish(fb.Builder fbBuilder) {
2660 fb.Offset offset_definedNameKinds; 3127 fb.Offset offset_definedNameKinds;
2661 fb.Offset offset_definedNameOffsets; 3128 fb.Offset offset_definedNameOffsets;
2662 fb.Offset offset_definedNames; 3129 fb.Offset offset_definedNames;
2663 fb.Offset offset_usedElementIsQualifiedFlags; 3130 fb.Offset offset_usedElementIsQualifiedFlags;
2664 fb.Offset offset_usedElementKinds; 3131 fb.Offset offset_usedElementKinds;
2665 fb.Offset offset_usedElementLengths; 3132 fb.Offset offset_usedElementLengths;
2666 fb.Offset offset_usedElementOffsets; 3133 fb.Offset offset_usedElementOffsets;
2667 fb.Offset offset_usedElements; 3134 fb.Offset offset_usedElements;
2668 fb.Offset offset_usedNameIsQualifiedFlags; 3135 fb.Offset offset_usedNameIsQualifiedFlags;
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 _documentationComment = null; 3549 _documentationComment = null;
3083 _executables?.forEach((b) => b.flushInformative()); 3550 _executables?.forEach((b) => b.flushInformative());
3084 _fields?.forEach((b) => b.flushInformative()); 3551 _fields?.forEach((b) => b.flushInformative());
3085 _interfaces?.forEach((b) => b.flushInformative()); 3552 _interfaces?.forEach((b) => b.flushInformative());
3086 _mixins?.forEach((b) => b.flushInformative()); 3553 _mixins?.forEach((b) => b.flushInformative());
3087 _nameOffset = null; 3554 _nameOffset = null;
3088 _supertype?.flushInformative(); 3555 _supertype?.flushInformative();
3089 _typeParameters?.forEach((b) => b.flushInformative()); 3556 _typeParameters?.forEach((b) => b.flushInformative());
3090 } 3557 }
3091 3558
3559 /**
3560 * Accumulate non-[informative] data into [signature].
3561 */
3562 void collectApiSignature(fb.ApiSignature signature) {
3563 signature.addString(this._name ?? '');
3564 if (this._executables == null) {
3565 signature.addInt(0);
3566 } else {
3567 signature.addInt(this._executables.length);
3568 for (var x in this._executables) {
3569 x?.collectApiSignature(signature);
3570 }
3571 }
3572 signature.addBool(this._supertype != null);
3573 this._supertype?.collectApiSignature(signature);
3574 if (this._fields == null) {
3575 signature.addInt(0);
3576 } else {
3577 signature.addInt(this._fields.length);
3578 for (var x in this._fields) {
3579 x?.collectApiSignature(signature);
3580 }
3581 }
3582 if (this._annotations == null) {
3583 signature.addInt(0);
3584 } else {
3585 signature.addInt(this._annotations.length);
3586 for (var x in this._annotations) {
3587 x?.collectApiSignature(signature);
3588 }
3589 }
3590 if (this._interfaces == null) {
3591 signature.addInt(0);
3592 } else {
3593 signature.addInt(this._interfaces.length);
3594 for (var x in this._interfaces) {
3595 x?.collectApiSignature(signature);
3596 }
3597 }
3598 signature.addBool(this._isAbstract == true);
3599 if (this._typeParameters == null) {
3600 signature.addInt(0);
3601 } else {
3602 signature.addInt(this._typeParameters.length);
3603 for (var x in this._typeParameters) {
3604 x?.collectApiSignature(signature);
3605 }
3606 }
3607 if (this._mixins == null) {
3608 signature.addInt(0);
3609 } else {
3610 signature.addInt(this._mixins.length);
3611 for (var x in this._mixins) {
3612 x?.collectApiSignature(signature);
3613 }
3614 }
3615 signature.addBool(this._isMixinApplication == true);
3616 signature.addBool(this._hasNoSupertype == true);
3617 }
3618
3092 fb.Offset finish(fb.Builder fbBuilder) { 3619 fb.Offset finish(fb.Builder fbBuilder) {
3093 fb.Offset offset_annotations; 3620 fb.Offset offset_annotations;
3094 fb.Offset offset_codeRange; 3621 fb.Offset offset_codeRange;
3095 fb.Offset offset_documentationComment; 3622 fb.Offset offset_documentationComment;
3096 fb.Offset offset_executables; 3623 fb.Offset offset_executables;
3097 fb.Offset offset_fields; 3624 fb.Offset offset_fields;
3098 fb.Offset offset_interfaces; 3625 fb.Offset offset_interfaces;
3099 fb.Offset offset_mixins; 3626 fb.Offset offset_mixins;
3100 fb.Offset offset_name; 3627 fb.Offset offset_name;
3101 fb.Offset offset_supertype; 3628 fb.Offset offset_supertype;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
3390 _shows = shows; 3917 _shows = shows;
3391 3918
3392 /** 3919 /**
3393 * Flush [informative] data recursively. 3920 * Flush [informative] data recursively.
3394 */ 3921 */
3395 void flushInformative() { 3922 void flushInformative() {
3396 _end = null; 3923 _end = null;
3397 _offset = null; 3924 _offset = null;
3398 } 3925 }
3399 3926
3927 /**
3928 * Accumulate non-[informative] data into [signature].
3929 */
3930 void collectApiSignature(fb.ApiSignature signature) {
3931 if (this._shows == null) {
3932 signature.addInt(0);
3933 } else {
3934 signature.addInt(this._shows.length);
3935 for (var x in this._shows) {
3936 signature.addString(x);
3937 }
3938 }
3939 if (this._hides == null) {
3940 signature.addInt(0);
3941 } else {
3942 signature.addInt(this._hides.length);
3943 for (var x in this._hides) {
3944 signature.addString(x);
3945 }
3946 }
3947 }
3948
3400 fb.Offset finish(fb.Builder fbBuilder) { 3949 fb.Offset finish(fb.Builder fbBuilder) {
3401 fb.Offset offset_hides; 3950 fb.Offset offset_hides;
3402 fb.Offset offset_shows; 3951 fb.Offset offset_shows;
3403 if (!(_hides == null || _hides.isEmpty)) { 3952 if (!(_hides == null || _hides.isEmpty)) {
3404 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString (b)).toList()); 3953 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString (b)).toList());
3405 } 3954 }
3406 if (!(_shows == null || _shows.isEmpty)) { 3955 if (!(_shows == null || _shows.isEmpty)) {
3407 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString (b)).toList()); 3956 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString (b)).toList());
3408 } 3957 }
3409 fbBuilder.startTable(); 3958 fbBuilder.startTable();
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3586 _references = references, 4135 _references = references,
3587 _strings = strings; 4136 _strings = strings;
3588 4137
3589 /** 4138 /**
3590 * Flush [informative] data recursively. 4139 * Flush [informative] data recursively.
3591 */ 4140 */
3592 void flushInformative() { 4141 void flushInformative() {
3593 _references?.forEach((b) => b.flushInformative()); 4142 _references?.forEach((b) => b.flushInformative());
3594 } 4143 }
3595 4144
4145 /**
4146 * Accumulate non-[informative] data into [signature].
4147 */
4148 void collectApiSignature(fb.ApiSignature signature) {
4149 if (this._operations == null) {
4150 signature.addInt(0);
4151 } else {
4152 signature.addInt(this._operations.length);
4153 for (var x in this._operations) {
4154 signature.addInt(x.index);
4155 }
4156 }
4157 if (this._ints == null) {
4158 signature.addInt(0);
4159 } else {
4160 signature.addInt(this._ints.length);
4161 for (var x in this._ints) {
4162 signature.addInt(x);
4163 }
4164 }
4165 if (this._references == null) {
4166 signature.addInt(0);
4167 } else {
4168 signature.addInt(this._references.length);
4169 for (var x in this._references) {
4170 x?.collectApiSignature(signature);
4171 }
4172 }
4173 if (this._strings == null) {
4174 signature.addInt(0);
4175 } else {
4176 signature.addInt(this._strings.length);
4177 for (var x in this._strings) {
4178 signature.addString(x);
4179 }
4180 }
4181 if (this._doubles == null) {
4182 signature.addInt(0);
4183 } else {
4184 signature.addInt(this._doubles.length);
4185 for (var x in this._doubles) {
4186 signature.addDouble(x);
4187 }
4188 }
4189 signature.addBool(this._isValidConst == true);
4190 if (this._assignmentOperators == null) {
4191 signature.addInt(0);
4192 } else {
4193 signature.addInt(this._assignmentOperators.length);
4194 for (var x in this._assignmentOperators) {
4195 signature.addInt(x.index);
4196 }
4197 }
4198 }
4199
3596 fb.Offset finish(fb.Builder fbBuilder) { 4200 fb.Offset finish(fb.Builder fbBuilder) {
3597 fb.Offset offset_assignmentOperators; 4201 fb.Offset offset_assignmentOperators;
3598 fb.Offset offset_doubles; 4202 fb.Offset offset_doubles;
3599 fb.Offset offset_ints; 4203 fb.Offset offset_ints;
3600 fb.Offset offset_operations; 4204 fb.Offset offset_operations;
3601 fb.Offset offset_references; 4205 fb.Offset offset_references;
3602 fb.Offset offset_strings; 4206 fb.Offset offset_strings;
3603 if (!(_assignmentOperators == null || _assignmentOperators.isEmpty)) { 4207 if (!(_assignmentOperators == null || _assignmentOperators.isEmpty)) {
3604 offset_assignmentOperators = fbBuilder.writeListUint8(_assignmentOperators .map((b) => b.index).toList()); 4208 offset_assignmentOperators = fbBuilder.writeListUint8(_assignmentOperators .map((b) => b.index).toList());
3605 } 4209 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
3809 _name = name; 4413 _name = name;
3810 4414
3811 /** 4415 /**
3812 * Flush [informative] data recursively. 4416 * Flush [informative] data recursively.
3813 */ 4417 */
3814 void flushInformative() { 4418 void flushInformative() {
3815 _arguments?.forEach((b) => b.flushInformative()); 4419 _arguments?.forEach((b) => b.flushInformative());
3816 _expression?.flushInformative(); 4420 _expression?.flushInformative();
3817 } 4421 }
3818 4422
4423 /**
4424 * Accumulate non-[informative] data into [signature].
4425 */
4426 void collectApiSignature(fb.ApiSignature signature) {
4427 signature.addString(this._name ?? '');
4428 signature.addBool(this._expression != null);
4429 this._expression?.collectApiSignature(signature);
4430 signature.addInt(this._kind == null ? 0 : this._kind.index);
4431 if (this._arguments == null) {
4432 signature.addInt(0);
4433 } else {
4434 signature.addInt(this._arguments.length);
4435 for (var x in this._arguments) {
4436 x?.collectApiSignature(signature);
4437 }
4438 }
4439 if (this._argumentNames == null) {
4440 signature.addInt(0);
4441 } else {
4442 signature.addInt(this._argumentNames.length);
4443 for (var x in this._argumentNames) {
4444 signature.addString(x);
4445 }
4446 }
4447 }
4448
3819 fb.Offset finish(fb.Builder fbBuilder) { 4449 fb.Offset finish(fb.Builder fbBuilder) {
3820 fb.Offset offset_argumentNames; 4450 fb.Offset offset_argumentNames;
3821 fb.Offset offset_arguments; 4451 fb.Offset offset_arguments;
3822 fb.Offset offset_expression; 4452 fb.Offset offset_expression;
3823 fb.Offset offset_name; 4453 fb.Offset offset_name;
3824 if (!(_argumentNames == null || _argumentNames.isEmpty)) { 4454 if (!(_argumentNames == null || _argumentNames.isEmpty)) {
3825 offset_argumentNames = fbBuilder.writeList(_argumentNames.map((b) => fbBui lder.writeString(b)).toList()); 4455 offset_argumentNames = fbBuilder.writeList(_argumentNames.map((b) => fbBui lder.writeString(b)).toList());
3826 } 4456 }
3827 if (!(_arguments == null || _arguments.isEmpty)) { 4457 if (!(_arguments == null || _arguments.isEmpty)) {
3828 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu ilder)).toList()); 4458 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu ilder)).toList());
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
3973 : _length = length, 4603 : _length = length,
3974 _offset = offset, 4604 _offset = offset,
3975 _text = text; 4605 _text = text;
3976 4606
3977 /** 4607 /**
3978 * Flush [informative] data recursively. 4608 * Flush [informative] data recursively.
3979 */ 4609 */
3980 void flushInformative() { 4610 void flushInformative() {
3981 } 4611 }
3982 4612
4613 /**
4614 * Accumulate non-[informative] data into [signature].
4615 */
4616 void collectApiSignature(fb.ApiSignature signature) {
4617 signature.addInt(this._length ?? 0);
4618 signature.addString(this._text ?? '');
4619 signature.addInt(this._offset ?? 0);
4620 }
4621
3983 fb.Offset finish(fb.Builder fbBuilder) { 4622 fb.Offset finish(fb.Builder fbBuilder) {
3984 fb.Offset offset_text; 4623 fb.Offset offset_text;
3985 if (_text != null) { 4624 if (_text != null) {
3986 offset_text = fbBuilder.writeString(_text); 4625 offset_text = fbBuilder.writeString(_text);
3987 } 4626 }
3988 fbBuilder.startTable(); 4627 fbBuilder.startTable();
3989 if (_length != null && _length != 0) { 4628 if (_length != null && _length != 0) {
3990 fbBuilder.addUint32(0, _length); 4629 fbBuilder.addUint32(0, _length);
3991 } 4630 }
3992 if (_offset != null && _offset != 0) { 4631 if (_offset != null && _offset != 0) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
4138 * Flush [informative] data recursively. 4777 * Flush [informative] data recursively.
4139 */ 4778 */
4140 void flushInformative() { 4779 void flushInformative() {
4141 _annotations?.forEach((b) => b.flushInformative()); 4780 _annotations?.forEach((b) => b.flushInformative());
4142 _codeRange = null; 4781 _codeRange = null;
4143 _documentationComment = null; 4782 _documentationComment = null;
4144 _nameOffset = null; 4783 _nameOffset = null;
4145 _values?.forEach((b) => b.flushInformative()); 4784 _values?.forEach((b) => b.flushInformative());
4146 } 4785 }
4147 4786
4787 /**
4788 * Accumulate non-[informative] data into [signature].
4789 */
4790 void collectApiSignature(fb.ApiSignature signature) {
4791 signature.addString(this._name ?? '');
4792 if (this._values == null) {
4793 signature.addInt(0);
4794 } else {
4795 signature.addInt(this._values.length);
4796 for (var x in this._values) {
4797 x?.collectApiSignature(signature);
4798 }
4799 }
4800 if (this._annotations == null) {
4801 signature.addInt(0);
4802 } else {
4803 signature.addInt(this._annotations.length);
4804 for (var x in this._annotations) {
4805 x?.collectApiSignature(signature);
4806 }
4807 }
4808 }
4809
4148 fb.Offset finish(fb.Builder fbBuilder) { 4810 fb.Offset finish(fb.Builder fbBuilder) {
4149 fb.Offset offset_annotations; 4811 fb.Offset offset_annotations;
4150 fb.Offset offset_codeRange; 4812 fb.Offset offset_codeRange;
4151 fb.Offset offset_documentationComment; 4813 fb.Offset offset_documentationComment;
4152 fb.Offset offset_name; 4814 fb.Offset offset_name;
4153 fb.Offset offset_values; 4815 fb.Offset offset_values;
4154 if (!(_annotations == null || _annotations.isEmpty)) { 4816 if (!(_annotations == null || _annotations.isEmpty)) {
4155 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 4817 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
4156 } 4818 }
4157 if (_codeRange != null) { 4819 if (_codeRange != null) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4316 _nameOffset = nameOffset; 4978 _nameOffset = nameOffset;
4317 4979
4318 /** 4980 /**
4319 * Flush [informative] data recursively. 4981 * Flush [informative] data recursively.
4320 */ 4982 */
4321 void flushInformative() { 4983 void flushInformative() {
4322 _documentationComment = null; 4984 _documentationComment = null;
4323 _nameOffset = null; 4985 _nameOffset = null;
4324 } 4986 }
4325 4987
4988 /**
4989 * Accumulate non-[informative] data into [signature].
4990 */
4991 void collectApiSignature(fb.ApiSignature signature) {
4992 signature.addString(this._name ?? '');
4993 }
4994
4326 fb.Offset finish(fb.Builder fbBuilder) { 4995 fb.Offset finish(fb.Builder fbBuilder) {
4327 fb.Offset offset_documentationComment; 4996 fb.Offset offset_documentationComment;
4328 fb.Offset offset_name; 4997 fb.Offset offset_name;
4329 if (_documentationComment != null) { 4998 if (_documentationComment != null) {
4330 offset_documentationComment = _documentationComment.finish(fbBuilder); 4999 offset_documentationComment = _documentationComment.finish(fbBuilder);
4331 } 5000 }
4332 if (_name != null) { 5001 if (_name != null) {
4333 offset_name = fbBuilder.writeString(_name); 5002 offset_name = fbBuilder.writeString(_name);
4334 } 5003 }
4335 fbBuilder.startTable(); 5004 fbBuilder.startTable();
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
4825 _localVariables = null; 5494 _localVariables = null;
4826 _nameEnd = null; 5495 _nameEnd = null;
4827 _nameOffset = null; 5496 _nameOffset = null;
4828 _parameters?.forEach((b) => b.flushInformative()); 5497 _parameters?.forEach((b) => b.flushInformative());
4829 _periodOffset = null; 5498 _periodOffset = null;
4830 _redirectedConstructor?.flushInformative(); 5499 _redirectedConstructor?.flushInformative();
4831 _returnType?.flushInformative(); 5500 _returnType?.flushInformative();
4832 _typeParameters?.forEach((b) => b.flushInformative()); 5501 _typeParameters?.forEach((b) => b.flushInformative());
4833 } 5502 }
4834 5503
5504 /**
5505 * Accumulate non-[informative] data into [signature].
5506 */
5507 void collectApiSignature(fb.ApiSignature signature) {
5508 signature.addString(this._name ?? '');
5509 if (this._parameters == null) {
5510 signature.addInt(0);
5511 } else {
5512 signature.addInt(this._parameters.length);
5513 for (var x in this._parameters) {
5514 x?.collectApiSignature(signature);
5515 }
5516 }
5517 signature.addBool(this._returnType != null);
5518 this._returnType?.collectApiSignature(signature);
5519 signature.addInt(this._kind == null ? 0 : this._kind.index);
5520 signature.addInt(this._inferredReturnTypeSlot ?? 0);
5521 if (this._annotations == null) {
5522 signature.addInt(0);
5523 } else {
5524 signature.addInt(this._annotations.length);
5525 for (var x in this._annotations) {
5526 x?.collectApiSignature(signature);
5527 }
5528 }
5529 signature.addBool(this._isFactory == true);
5530 signature.addBool(this._isStatic == true);
5531 signature.addBool(this._isAbstract == true);
5532 signature.addBool(this._isExternal == true);
5533 signature.addBool(this._isConst == true);
5534 signature.addBool(this._isRedirectedConstructor == true);
5535 if (this._constantInitializers == null) {
5536 signature.addInt(0);
5537 } else {
5538 signature.addInt(this._constantInitializers.length);
5539 for (var x in this._constantInitializers) {
5540 x?.collectApiSignature(signature);
5541 }
5542 }
5543 signature.addBool(this._redirectedConstructor != null);
5544 this._redirectedConstructor?.collectApiSignature(signature);
5545 if (this._typeParameters == null) {
5546 signature.addInt(0);
5547 } else {
5548 signature.addInt(this._typeParameters.length);
5549 for (var x in this._typeParameters) {
5550 x?.collectApiSignature(signature);
5551 }
5552 }
5553 signature.addString(this._redirectedConstructorName ?? '');
5554 if (this._localFunctions == null) {
5555 signature.addInt(0);
5556 } else {
5557 signature.addInt(this._localFunctions.length);
5558 for (var x in this._localFunctions) {
5559 x?.collectApiSignature(signature);
5560 }
5561 }
5562 signature.addInt(this._visibleLength ?? 0);
5563 signature.addInt(this._visibleOffset ?? 0);
5564 signature.addInt(this._constCycleSlot ?? 0);
5565 signature.addBool(this._bodyExpr != null);
5566 this._bodyExpr?.collectApiSignature(signature);
5567 }
5568
4835 fb.Offset finish(fb.Builder fbBuilder) { 5569 fb.Offset finish(fb.Builder fbBuilder) {
4836 fb.Offset offset_annotations; 5570 fb.Offset offset_annotations;
4837 fb.Offset offset_bodyExpr; 5571 fb.Offset offset_bodyExpr;
4838 fb.Offset offset_codeRange; 5572 fb.Offset offset_codeRange;
4839 fb.Offset offset_constantInitializers; 5573 fb.Offset offset_constantInitializers;
4840 fb.Offset offset_documentationComment; 5574 fb.Offset offset_documentationComment;
4841 fb.Offset offset_localFunctions; 5575 fb.Offset offset_localFunctions;
4842 fb.Offset offset_localLabels; 5576 fb.Offset offset_localLabels;
4843 fb.Offset offset_localVariables; 5577 fb.Offset offset_localVariables;
4844 fb.Offset offset_name; 5578 fb.Offset offset_name;
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
5344 /** 6078 /**
5345 * Flush [informative] data recursively. 6079 * Flush [informative] data recursively.
5346 */ 6080 */
5347 void flushInformative() { 6081 void flushInformative() {
5348 _annotations?.forEach((b) => b.flushInformative()); 6082 _annotations?.forEach((b) => b.flushInformative());
5349 _offset = null; 6083 _offset = null;
5350 _uriEnd = null; 6084 _uriEnd = null;
5351 _uriOffset = null; 6085 _uriOffset = null;
5352 } 6086 }
5353 6087
6088 /**
6089 * Accumulate non-[informative] data into [signature].
6090 */
6091 void collectApiSignature(fb.ApiSignature signature) {
6092 if (this._annotations == null) {
6093 signature.addInt(0);
6094 } else {
6095 signature.addInt(this._annotations.length);
6096 for (var x in this._annotations) {
6097 x?.collectApiSignature(signature);
6098 }
6099 }
6100 }
6101
5354 fb.Offset finish(fb.Builder fbBuilder) { 6102 fb.Offset finish(fb.Builder fbBuilder) {
5355 fb.Offset offset_annotations; 6103 fb.Offset offset_annotations;
5356 if (!(_annotations == null || _annotations.isEmpty)) { 6104 if (!(_annotations == null || _annotations.isEmpty)) {
5357 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 6105 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
5358 } 6106 }
5359 fbBuilder.startTable(); 6107 fbBuilder.startTable();
5360 if (offset_annotations != null) { 6108 if (offset_annotations != null) {
5361 fbBuilder.addOffset(3, offset_annotations); 6109 fbBuilder.addOffset(3, offset_annotations);
5362 } 6110 }
5363 if (_offset != null && _offset != 0) { 6111 if (_offset != null && _offset != 0) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
5467 : _combinators = combinators, 6215 : _combinators = combinators,
5468 _uri = uri; 6216 _uri = uri;
5469 6217
5470 /** 6218 /**
5471 * Flush [informative] data recursively. 6219 * Flush [informative] data recursively.
5472 */ 6220 */
5473 void flushInformative() { 6221 void flushInformative() {
5474 _combinators?.forEach((b) => b.flushInformative()); 6222 _combinators?.forEach((b) => b.flushInformative());
5475 } 6223 }
5476 6224
6225 /**
6226 * Accumulate non-[informative] data into [signature].
6227 */
6228 void collectApiSignature(fb.ApiSignature signature) {
6229 signature.addString(this._uri ?? '');
6230 if (this._combinators == null) {
6231 signature.addInt(0);
6232 } else {
6233 signature.addInt(this._combinators.length);
6234 for (var x in this._combinators) {
6235 x?.collectApiSignature(signature);
6236 }
6237 }
6238 }
6239
5477 fb.Offset finish(fb.Builder fbBuilder) { 6240 fb.Offset finish(fb.Builder fbBuilder) {
5478 fb.Offset offset_combinators; 6241 fb.Offset offset_combinators;
5479 fb.Offset offset_uri; 6242 fb.Offset offset_uri;
5480 if (!(_combinators == null || _combinators.isEmpty)) { 6243 if (!(_combinators == null || _combinators.isEmpty)) {
5481 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList()); 6244 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList());
5482 } 6245 }
5483 if (_uri != null) { 6246 if (_uri != null) {
5484 offset_uri = fbBuilder.writeString(_uri); 6247 offset_uri = fbBuilder.writeString(_uri);
5485 } 6248 }
5486 fbBuilder.startTable(); 6249 fbBuilder.startTable();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
5683 */ 6446 */
5684 void flushInformative() { 6447 void flushInformative() {
5685 _annotations?.forEach((b) => b.flushInformative()); 6448 _annotations?.forEach((b) => b.flushInformative());
5686 _combinators?.forEach((b) => b.flushInformative()); 6449 _combinators?.forEach((b) => b.flushInformative());
5687 _offset = null; 6450 _offset = null;
5688 _prefixOffset = null; 6451 _prefixOffset = null;
5689 _uriEnd = null; 6452 _uriEnd = null;
5690 _uriOffset = null; 6453 _uriOffset = null;
5691 } 6454 }
5692 6455
6456 /**
6457 * Accumulate non-[informative] data into [signature].
6458 */
6459 void collectApiSignature(fb.ApiSignature signature) {
6460 signature.addString(this._uri ?? '');
6461 if (this._combinators == null) {
6462 signature.addInt(0);
6463 } else {
6464 signature.addInt(this._combinators.length);
6465 for (var x in this._combinators) {
6466 x?.collectApiSignature(signature);
6467 }
6468 }
6469 signature.addBool(this._isImplicit == true);
6470 signature.addInt(this._prefixReference ?? 0);
6471 if (this._annotations == null) {
6472 signature.addInt(0);
6473 } else {
6474 signature.addInt(this._annotations.length);
6475 for (var x in this._annotations) {
6476 x?.collectApiSignature(signature);
6477 }
6478 }
6479 signature.addBool(this._isDeferred == true);
6480 }
6481
5693 fb.Offset finish(fb.Builder fbBuilder) { 6482 fb.Offset finish(fb.Builder fbBuilder) {
5694 fb.Offset offset_annotations; 6483 fb.Offset offset_annotations;
5695 fb.Offset offset_combinators; 6484 fb.Offset offset_combinators;
5696 fb.Offset offset_uri; 6485 fb.Offset offset_uri;
5697 if (!(_annotations == null || _annotations.isEmpty)) { 6486 if (!(_annotations == null || _annotations.isEmpty)) {
5698 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 6487 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
5699 } 6488 }
5700 if (!(_combinators == null || _combinators.isEmpty)) { 6489 if (!(_combinators == null || _combinators.isEmpty)) {
5701 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList()); 6490 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList());
5702 } 6491 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
5912 _name = name, 6701 _name = name,
5913 _nameOffset = nameOffset; 6702 _nameOffset = nameOffset;
5914 6703
5915 /** 6704 /**
5916 * Flush [informative] data recursively. 6705 * Flush [informative] data recursively.
5917 */ 6706 */
5918 void flushInformative() { 6707 void flushInformative() {
5919 _nameOffset = null; 6708 _nameOffset = null;
5920 } 6709 }
5921 6710
6711 /**
6712 * Accumulate non-[informative] data into [signature].
6713 */
6714 void collectApiSignature(fb.ApiSignature signature) {
6715 signature.addString(this._name ?? '');
6716 signature.addBool(this._isOnSwitchMember == true);
6717 signature.addBool(this._isOnSwitchStatement == true);
6718 }
6719
5922 fb.Offset finish(fb.Builder fbBuilder) { 6720 fb.Offset finish(fb.Builder fbBuilder) {
5923 fb.Offset offset_name; 6721 fb.Offset offset_name;
5924 if (_name != null) { 6722 if (_name != null) {
5925 offset_name = fbBuilder.writeString(_name); 6723 offset_name = fbBuilder.writeString(_name);
5926 } 6724 }
5927 fbBuilder.startTable(); 6725 fbBuilder.startTable();
5928 if (_isOnSwitchMember == true) { 6726 if (_isOnSwitchMember == true) {
5929 fbBuilder.addBool(2, true); 6727 fbBuilder.addBool(2, true);
5930 } 6728 }
5931 if (_isOnSwitchStatement == true) { 6729 if (_isOnSwitchStatement == true) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
6202 void flushInformative() { 7000 void flushInformative() {
6203 _annotations?.forEach((b) => b.flushInformative()); 7001 _annotations?.forEach((b) => b.flushInformative());
6204 _codeRange = null; 7002 _codeRange = null;
6205 _defaultValueCode = null; 7003 _defaultValueCode = null;
6206 _initializer?.flushInformative(); 7004 _initializer?.flushInformative();
6207 _nameOffset = null; 7005 _nameOffset = null;
6208 _parameters?.forEach((b) => b.flushInformative()); 7006 _parameters?.forEach((b) => b.flushInformative());
6209 _type?.flushInformative(); 7007 _type?.flushInformative();
6210 } 7008 }
6211 7009
7010 /**
7011 * Accumulate non-[informative] data into [signature].
7012 */
7013 void collectApiSignature(fb.ApiSignature signature) {
7014 signature.addString(this._name ?? '');
7015 signature.addInt(this._inferredTypeSlot ?? 0);
7016 signature.addBool(this._type != null);
7017 this._type?.collectApiSignature(signature);
7018 signature.addInt(this._kind == null ? 0 : this._kind.index);
7019 signature.addBool(this._isFunctionTyped == true);
7020 signature.addBool(this._isInitializingFormal == true);
7021 if (this._parameters == null) {
7022 signature.addInt(0);
7023 } else {
7024 signature.addInt(this._parameters.length);
7025 for (var x in this._parameters) {
7026 x?.collectApiSignature(signature);
7027 }
7028 }
7029 if (this._annotations == null) {
7030 signature.addInt(0);
7031 } else {
7032 signature.addInt(this._annotations.length);
7033 for (var x in this._annotations) {
7034 x?.collectApiSignature(signature);
7035 }
7036 }
7037 signature.addInt(this._visibleLength ?? 0);
7038 signature.addInt(this._visibleOffset ?? 0);
7039 signature.addBool(this._initializer != null);
7040 this._initializer?.collectApiSignature(signature);
7041 }
7042
6212 fb.Offset finish(fb.Builder fbBuilder) { 7043 fb.Offset finish(fb.Builder fbBuilder) {
6213 fb.Offset offset_annotations; 7044 fb.Offset offset_annotations;
6214 fb.Offset offset_codeRange; 7045 fb.Offset offset_codeRange;
6215 fb.Offset offset_defaultValueCode; 7046 fb.Offset offset_defaultValueCode;
6216 fb.Offset offset_initializer; 7047 fb.Offset offset_initializer;
6217 fb.Offset offset_name; 7048 fb.Offset offset_name;
6218 fb.Offset offset_parameters; 7049 fb.Offset offset_parameters;
6219 fb.Offset offset_type; 7050 fb.Offset offset_type;
6220 if (!(_annotations == null || _annotations.isEmpty)) { 7051 if (!(_annotations == null || _annotations.isEmpty)) {
6221 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 7052 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
6487 7318
6488 /** 7319 /**
6489 * Flush [informative] data recursively. 7320 * Flush [informative] data recursively.
6490 */ 7321 */
6491 void flushInformative() { 7322 void flushInformative() {
6492 _annotations?.forEach((b) => b.flushInformative()); 7323 _annotations?.forEach((b) => b.flushInformative());
6493 _uriEnd = null; 7324 _uriEnd = null;
6494 _uriOffset = null; 7325 _uriOffset = null;
6495 } 7326 }
6496 7327
7328 /**
7329 * Accumulate non-[informative] data into [signature].
7330 */
7331 void collectApiSignature(fb.ApiSignature signature) {
7332 if (this._annotations == null) {
7333 signature.addInt(0);
7334 } else {
7335 signature.addInt(this._annotations.length);
7336 for (var x in this._annotations) {
7337 x?.collectApiSignature(signature);
7338 }
7339 }
7340 }
7341
6497 fb.Offset finish(fb.Builder fbBuilder) { 7342 fb.Offset finish(fb.Builder fbBuilder) {
6498 fb.Offset offset_annotations; 7343 fb.Offset offset_annotations;
6499 if (!(_annotations == null || _annotations.isEmpty)) { 7344 if (!(_annotations == null || _annotations.isEmpty)) {
6500 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 7345 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
6501 } 7346 }
6502 fbBuilder.startTable(); 7347 fbBuilder.startTable();
6503 if (offset_annotations != null) { 7348 if (offset_annotations != null) {
6504 fbBuilder.addOffset(2, offset_annotations); 7349 fbBuilder.addOffset(2, offset_annotations);
6505 } 7350 }
6506 if (_uriEnd != null && _uriEnd != 0) { 7351 if (_uriEnd != null && _uriEnd != 0) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
6629 _name = name, 7474 _name = name,
6630 _numTypeParameters = numTypeParameters; 7475 _numTypeParameters = numTypeParameters;
6631 7476
6632 /** 7477 /**
6633 * Flush [informative] data recursively. 7478 * Flush [informative] data recursively.
6634 */ 7479 */
6635 void flushInformative() { 7480 void flushInformative() {
6636 _members?.forEach((b) => b.flushInformative()); 7481 _members?.forEach((b) => b.flushInformative());
6637 } 7482 }
6638 7483
7484 /**
7485 * Accumulate non-[informative] data into [signature].
7486 */
7487 void collectApiSignature(fb.ApiSignature signature) {
7488 signature.addString(this._name ?? '');
7489 signature.addInt(this._kind == null ? 0 : this._kind.index);
7490 if (this._members == null) {
7491 signature.addInt(0);
7492 } else {
7493 signature.addInt(this._members.length);
7494 for (var x in this._members) {
7495 x?.collectApiSignature(signature);
7496 }
7497 }
7498 signature.addInt(this._numTypeParameters ?? 0);
7499 }
7500
6639 fb.Offset finish(fb.Builder fbBuilder) { 7501 fb.Offset finish(fb.Builder fbBuilder) {
6640 fb.Offset offset_members; 7502 fb.Offset offset_members;
6641 fb.Offset offset_name; 7503 fb.Offset offset_name;
6642 if (!(_members == null || _members.isEmpty)) { 7504 if (!(_members == null || _members.isEmpty)) {
6643 offset_members = fbBuilder.writeList(_members.map((b) => b.finish(fbBuilde r)).toList()); 7505 offset_members = fbBuilder.writeList(_members.map((b) => b.finish(fbBuilde r)).toList());
6644 } 7506 }
6645 if (_name != null) { 7507 if (_name != null) {
6646 offset_name = fbBuilder.writeString(_name); 7508 offset_name = fbBuilder.writeString(_name);
6647 } 7509 }
6648 fbBuilder.startTable(); 7510 fbBuilder.startTable();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
6772 _parts = parts; 7634 _parts = parts;
6773 7635
6774 /** 7636 /**
6775 * Flush [informative] data recursively. 7637 * Flush [informative] data recursively.
6776 */ 7638 */
6777 void flushInformative() { 7639 void flushInformative() {
6778 _exports?.forEach((b) => b.flushInformative()); 7640 _exports?.forEach((b) => b.flushInformative());
6779 _names?.forEach((b) => b.flushInformative()); 7641 _names?.forEach((b) => b.flushInformative());
6780 } 7642 }
6781 7643
7644 /**
7645 * Accumulate non-[informative] data into [signature].
7646 */
7647 void collectApiSignature(fb.ApiSignature signature) {
7648 if (this._names == null) {
7649 signature.addInt(0);
7650 } else {
7651 signature.addInt(this._names.length);
7652 for (var x in this._names) {
7653 x?.collectApiSignature(signature);
7654 }
7655 }
7656 if (this._parts == null) {
7657 signature.addInt(0);
7658 } else {
7659 signature.addInt(this._parts.length);
7660 for (var x in this._parts) {
7661 signature.addString(x);
7662 }
7663 }
7664 if (this._exports == null) {
7665 signature.addInt(0);
7666 } else {
7667 signature.addInt(this._exports.length);
7668 for (var x in this._exports) {
7669 x?.collectApiSignature(signature);
7670 }
7671 }
7672 }
7673
6782 List<int> toBuffer() { 7674 List<int> toBuffer() {
6783 fb.Builder fbBuilder = new fb.Builder(); 7675 fb.Builder fbBuilder = new fb.Builder();
6784 return fbBuilder.finish(finish(fbBuilder), "UPNS"); 7676 return fbBuilder.finish(finish(fbBuilder), "UPNS");
6785 } 7677 }
6786 7678
6787 fb.Offset finish(fb.Builder fbBuilder) { 7679 fb.Offset finish(fb.Builder fbBuilder) {
6788 fb.Offset offset_exports; 7680 fb.Offset offset_exports;
6789 fb.Offset offset_names; 7681 fb.Offset offset_names;
6790 fb.Offset offset_parts; 7682 fb.Offset offset_parts;
6791 if (!(_exports == null || _exports.isEmpty)) { 7683 if (!(_exports == null || _exports.isEmpty)) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
6908 UnlinkedReferenceBuilder({String name, int prefixReference}) 7800 UnlinkedReferenceBuilder({String name, int prefixReference})
6909 : _name = name, 7801 : _name = name,
6910 _prefixReference = prefixReference; 7802 _prefixReference = prefixReference;
6911 7803
6912 /** 7804 /**
6913 * Flush [informative] data recursively. 7805 * Flush [informative] data recursively.
6914 */ 7806 */
6915 void flushInformative() { 7807 void flushInformative() {
6916 } 7808 }
6917 7809
7810 /**
7811 * Accumulate non-[informative] data into [signature].
7812 */
7813 void collectApiSignature(fb.ApiSignature signature) {
7814 signature.addString(this._name ?? '');
7815 signature.addInt(this._prefixReference ?? 0);
7816 }
7817
6918 fb.Offset finish(fb.Builder fbBuilder) { 7818 fb.Offset finish(fb.Builder fbBuilder) {
6919 fb.Offset offset_name; 7819 fb.Offset offset_name;
6920 if (_name != null) { 7820 if (_name != null) {
6921 offset_name = fbBuilder.writeString(_name); 7821 offset_name = fbBuilder.writeString(_name);
6922 } 7822 }
6923 fbBuilder.startTable(); 7823 fbBuilder.startTable();
6924 if (offset_name != null) { 7824 if (offset_name != null) {
6925 fbBuilder.addOffset(0, offset_name); 7825 fbBuilder.addOffset(0, offset_name);
6926 } 7826 }
6927 if (_prefixReference != null && _prefixReference != 0) { 7827 if (_prefixReference != null && _prefixReference != 0) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
7087 void flushInformative() { 7987 void flushInformative() {
7088 _annotations?.forEach((b) => b.flushInformative()); 7988 _annotations?.forEach((b) => b.flushInformative());
7089 _codeRange = null; 7989 _codeRange = null;
7090 _documentationComment = null; 7990 _documentationComment = null;
7091 _nameOffset = null; 7991 _nameOffset = null;
7092 _parameters?.forEach((b) => b.flushInformative()); 7992 _parameters?.forEach((b) => b.flushInformative());
7093 _returnType?.flushInformative(); 7993 _returnType?.flushInformative();
7094 _typeParameters?.forEach((b) => b.flushInformative()); 7994 _typeParameters?.forEach((b) => b.flushInformative());
7095 } 7995 }
7096 7996
7997 /**
7998 * Accumulate non-[informative] data into [signature].
7999 */
8000 void collectApiSignature(fb.ApiSignature signature) {
8001 signature.addString(this._name ?? '');
8002 signature.addBool(this._returnType != null);
8003 this._returnType?.collectApiSignature(signature);
8004 if (this._parameters == null) {
8005 signature.addInt(0);
8006 } else {
8007 signature.addInt(this._parameters.length);
8008 for (var x in this._parameters) {
8009 x?.collectApiSignature(signature);
8010 }
8011 }
8012 if (this._annotations == null) {
8013 signature.addInt(0);
8014 } else {
8015 signature.addInt(this._annotations.length);
8016 for (var x in this._annotations) {
8017 x?.collectApiSignature(signature);
8018 }
8019 }
8020 if (this._typeParameters == null) {
8021 signature.addInt(0);
8022 } else {
8023 signature.addInt(this._typeParameters.length);
8024 for (var x in this._typeParameters) {
8025 x?.collectApiSignature(signature);
8026 }
8027 }
8028 }
8029
7097 fb.Offset finish(fb.Builder fbBuilder) { 8030 fb.Offset finish(fb.Builder fbBuilder) {
7098 fb.Offset offset_annotations; 8031 fb.Offset offset_annotations;
7099 fb.Offset offset_codeRange; 8032 fb.Offset offset_codeRange;
7100 fb.Offset offset_documentationComment; 8033 fb.Offset offset_documentationComment;
7101 fb.Offset offset_name; 8034 fb.Offset offset_name;
7102 fb.Offset offset_parameters; 8035 fb.Offset offset_parameters;
7103 fb.Offset offset_returnType; 8036 fb.Offset offset_returnType;
7104 fb.Offset offset_typeParameters; 8037 fb.Offset offset_typeParameters;
7105 if (!(_annotations == null || _annotations.isEmpty)) { 8038 if (!(_annotations == null || _annotations.isEmpty)) {
7106 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 8039 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
7323 /** 8256 /**
7324 * Flush [informative] data recursively. 8257 * Flush [informative] data recursively.
7325 */ 8258 */
7326 void flushInformative() { 8259 void flushInformative() {
7327 _annotations?.forEach((b) => b.flushInformative()); 8260 _annotations?.forEach((b) => b.flushInformative());
7328 _bound?.flushInformative(); 8261 _bound?.flushInformative();
7329 _codeRange = null; 8262 _codeRange = null;
7330 _nameOffset = null; 8263 _nameOffset = null;
7331 } 8264 }
7332 8265
8266 /**
8267 * Accumulate non-[informative] data into [signature].
8268 */
8269 void collectApiSignature(fb.ApiSignature signature) {
8270 signature.addString(this._name ?? '');
8271 signature.addBool(this._bound != null);
8272 this._bound?.collectApiSignature(signature);
8273 if (this._annotations == null) {
8274 signature.addInt(0);
8275 } else {
8276 signature.addInt(this._annotations.length);
8277 for (var x in this._annotations) {
8278 x?.collectApiSignature(signature);
8279 }
8280 }
8281 }
8282
7333 fb.Offset finish(fb.Builder fbBuilder) { 8283 fb.Offset finish(fb.Builder fbBuilder) {
7334 fb.Offset offset_annotations; 8284 fb.Offset offset_annotations;
7335 fb.Offset offset_bound; 8285 fb.Offset offset_bound;
7336 fb.Offset offset_codeRange; 8286 fb.Offset offset_codeRange;
7337 fb.Offset offset_name; 8287 fb.Offset offset_name;
7338 if (!(_annotations == null || _annotations.isEmpty)) { 8288 if (!(_annotations == null || _annotations.isEmpty)) {
7339 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 8289 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
7340 } 8290 }
7341 if (_bound != null) { 8291 if (_bound != null) {
7342 offset_bound = _bound.finish(fbBuilder); 8292 offset_bound = _bound.finish(fbBuilder);
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
7679 _libraryDocumentationComment = null; 8629 _libraryDocumentationComment = null;
7680 _libraryNameLength = null; 8630 _libraryNameLength = null;
7681 _libraryNameOffset = null; 8631 _libraryNameOffset = null;
7682 _parts?.forEach((b) => b.flushInformative()); 8632 _parts?.forEach((b) => b.flushInformative());
7683 _publicNamespace?.flushInformative(); 8633 _publicNamespace?.flushInformative();
7684 _references?.forEach((b) => b.flushInformative()); 8634 _references?.forEach((b) => b.flushInformative());
7685 _typedefs?.forEach((b) => b.flushInformative()); 8635 _typedefs?.forEach((b) => b.flushInformative());
7686 _variables?.forEach((b) => b.flushInformative()); 8636 _variables?.forEach((b) => b.flushInformative());
7687 } 8637 }
7688 8638
8639 /**
8640 * Accumulate non-[informative] data into [signature].
8641 */
8642 void collectApiSignature(fb.ApiSignature signature) {
8643 signature.addBool(this._publicNamespace != null);
8644 this._publicNamespace?.collectApiSignature(signature);
8645 if (this._references == null) {
8646 signature.addInt(0);
8647 } else {
8648 signature.addInt(this._references.length);
8649 for (var x in this._references) {
8650 x?.collectApiSignature(signature);
8651 }
8652 }
8653 if (this._classes == null) {
8654 signature.addInt(0);
8655 } else {
8656 signature.addInt(this._classes.length);
8657 for (var x in this._classes) {
8658 x?.collectApiSignature(signature);
8659 }
8660 }
8661 if (this._variables == null) {
8662 signature.addInt(0);
8663 } else {
8664 signature.addInt(this._variables.length);
8665 for (var x in this._variables) {
8666 x?.collectApiSignature(signature);
8667 }
8668 }
8669 if (this._executables == null) {
8670 signature.addInt(0);
8671 } else {
8672 signature.addInt(this._executables.length);
8673 for (var x in this._executables) {
8674 x?.collectApiSignature(signature);
8675 }
8676 }
8677 if (this._imports == null) {
8678 signature.addInt(0);
8679 } else {
8680 signature.addInt(this._imports.length);
8681 for (var x in this._imports) {
8682 x?.collectApiSignature(signature);
8683 }
8684 }
8685 signature.addString(this._libraryName ?? '');
8686 if (this._typedefs == null) {
8687 signature.addInt(0);
8688 } else {
8689 signature.addInt(this._typedefs.length);
8690 for (var x in this._typedefs) {
8691 x?.collectApiSignature(signature);
8692 }
8693 }
8694 if (this._parts == null) {
8695 signature.addInt(0);
8696 } else {
8697 signature.addInt(this._parts.length);
8698 for (var x in this._parts) {
8699 x?.collectApiSignature(signature);
8700 }
8701 }
8702 if (this._enums == null) {
8703 signature.addInt(0);
8704 } else {
8705 signature.addInt(this._enums.length);
8706 for (var x in this._enums) {
8707 x?.collectApiSignature(signature);
8708 }
8709 }
8710 if (this._exports == null) {
8711 signature.addInt(0);
8712 } else {
8713 signature.addInt(this._exports.length);
8714 for (var x in this._exports) {
8715 x?.collectApiSignature(signature);
8716 }
8717 }
8718 if (this._libraryAnnotations == null) {
8719 signature.addInt(0);
8720 } else {
8721 signature.addInt(this._libraryAnnotations.length);
8722 for (var x in this._libraryAnnotations) {
8723 x?.collectApiSignature(signature);
8724 }
8725 }
8726 signature.addString(this._fallbackModePath ?? '');
8727 }
8728
7689 List<int> toBuffer() { 8729 List<int> toBuffer() {
7690 fb.Builder fbBuilder = new fb.Builder(); 8730 fb.Builder fbBuilder = new fb.Builder();
7691 return fbBuilder.finish(finish(fbBuilder), "UUnt"); 8731 return fbBuilder.finish(finish(fbBuilder), "UUnt");
7692 } 8732 }
7693 8733
7694 fb.Offset finish(fb.Builder fbBuilder) { 8734 fb.Offset finish(fb.Builder fbBuilder) {
7695 fb.Offset offset_classes; 8735 fb.Offset offset_classes;
7696 fb.Offset offset_codeRange; 8736 fb.Offset offset_codeRange;
7697 fb.Offset offset_enums; 8737 fb.Offset offset_enums;
7698 fb.Offset offset_executables; 8738 fb.Offset offset_executables;
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
8192 */ 9232 */
8193 void flushInformative() { 9233 void flushInformative() {
8194 _annotations?.forEach((b) => b.flushInformative()); 9234 _annotations?.forEach((b) => b.flushInformative());
8195 _codeRange = null; 9235 _codeRange = null;
8196 _documentationComment = null; 9236 _documentationComment = null;
8197 _initializer?.flushInformative(); 9237 _initializer?.flushInformative();
8198 _nameOffset = null; 9238 _nameOffset = null;
8199 _type?.flushInformative(); 9239 _type?.flushInformative();
8200 } 9240 }
8201 9241
9242 /**
9243 * Accumulate non-[informative] data into [signature].
9244 */
9245 void collectApiSignature(fb.ApiSignature signature) {
9246 signature.addString(this._name ?? '');
9247 signature.addInt(this._propagatedTypeSlot ?? 0);
9248 signature.addBool(this._type != null);
9249 this._type?.collectApiSignature(signature);
9250 signature.addBool(this._isStatic == true);
9251 signature.addBool(this._isConst == true);
9252 signature.addBool(this._isFinal == true);
9253 if (this._annotations == null) {
9254 signature.addInt(0);
9255 } else {
9256 signature.addInt(this._annotations.length);
9257 for (var x in this._annotations) {
9258 x?.collectApiSignature(signature);
9259 }
9260 }
9261 signature.addInt(this._inferredTypeSlot ?? 0);
9262 signature.addInt(this._visibleLength ?? 0);
9263 signature.addInt(this._visibleOffset ?? 0);
9264 signature.addBool(this._initializer != null);
9265 this._initializer?.collectApiSignature(signature);
9266 }
9267
8202 fb.Offset finish(fb.Builder fbBuilder) { 9268 fb.Offset finish(fb.Builder fbBuilder) {
8203 fb.Offset offset_annotations; 9269 fb.Offset offset_annotations;
8204 fb.Offset offset_codeRange; 9270 fb.Offset offset_codeRange;
8205 fb.Offset offset_documentationComment; 9271 fb.Offset offset_documentationComment;
8206 fb.Offset offset_initializer; 9272 fb.Offset offset_initializer;
8207 fb.Offset offset_name; 9273 fb.Offset offset_name;
8208 fb.Offset offset_type; 9274 fb.Offset offset_type;
8209 if (!(_annotations == null || _annotations.isEmpty)) { 9275 if (!(_annotations == null || _annotations.isEmpty)) {
8210 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 9276 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
8211 } 9277 }
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
8420 "propagatedTypeSlot": propagatedTypeSlot, 9486 "propagatedTypeSlot": propagatedTypeSlot,
8421 "type": type, 9487 "type": type,
8422 "visibleLength": visibleLength, 9488 "visibleLength": visibleLength,
8423 "visibleOffset": visibleOffset, 9489 "visibleOffset": visibleOffset,
8424 }; 9490 };
8425 9491
8426 @override 9492 @override
8427 String toString() => convert.JSON.encode(toJson()); 9493 String toString() => convert.JSON.encode(toJson());
8428 } 9494 }
8429 9495
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698