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

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

Issue 1585973004: Use constructor args in favor of summary "encode" functions. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/prelink.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 'base.dart' as base; 10 import 'base.dart' as base;
(...skipping 30 matching lines...) Expand all
41 positional, 41 positional,
42 named, 42 named,
43 } 43 }
44 44
45 class PrelinkedDependencyBuilder extends Object with _PrelinkedDependencyMixin i mplements PrelinkedDependency { 45 class PrelinkedDependencyBuilder extends Object with _PrelinkedDependencyMixin i mplements PrelinkedDependency {
46 bool _finished = false; 46 bool _finished = false;
47 47
48 String _uri; 48 String _uri;
49 List<String> _parts; 49 List<String> _parts;
50 50
51 PrelinkedDependencyBuilder();
52
53 @override 51 @override
54 String get uri => _uri ?? ''; 52 String get uri => _uri ?? '';
55 53
56 /** 54 /**
57 * The relative URI of the dependent library. This URI is relative to the 55 * The relative URI of the dependent library. This URI is relative to the
58 * importing library, even if there are intervening `export` declarations. 56 * importing library, even if there are intervening `export` declarations.
59 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports 57 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports
60 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be 58 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be
61 * `b/d/e.dart`. 59 * `b/d/e.dart`.
62 */ 60 */
63 void set uri(String _value) { 61 void set uri(String _value) {
64 assert(!_finished); 62 assert(!_finished);
65 _uri = _value; 63 _uri = _value;
66 } 64 }
67 65
68 @override 66 @override
69 List<String> get parts => _parts ?? const <String>[]; 67 List<String> get parts => _parts ?? const <String>[];
70 68
71 /** 69 /**
72 * URI for the compilation units listed in the library's `part` declarations. 70 * URI for the compilation units listed in the library's `part` declarations.
73 * These URIs are relative to the importing library. 71 * These URIs are relative to the importing library.
74 */ 72 */
75 void set parts(List<String> _value) { 73 void set parts(List<String> _value) {
76 assert(!_finished); 74 assert(!_finished);
77 _parts = _value; 75 _parts = _value;
78 } 76 }
79 77
78 PrelinkedDependencyBuilder({String uri, List<String> parts})
79 : _uri = uri,
80 _parts = parts;
81
80 fb.Offset finish(fb.Builder fbBuilder) { 82 fb.Offset finish(fb.Builder fbBuilder) {
81 assert(!_finished); 83 assert(!_finished);
82 _finished = true; 84 _finished = true;
83 fb.Offset offset_uri; 85 fb.Offset offset_uri;
84 fb.Offset offset_parts; 86 fb.Offset offset_parts;
85 if (_uri != null) { 87 if (_uri != null) {
86 offset_uri = fbBuilder.writeString(_uri); 88 offset_uri = fbBuilder.writeString(_uri);
87 } 89 }
88 if (!(_parts == null || _parts.isEmpty)) { 90 if (!(_parts == null || _parts.isEmpty)) {
89 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList()); 91 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList());
90 } 92 }
91 fbBuilder.startTable(); 93 fbBuilder.startTable();
92 if (offset_uri != null) { 94 if (offset_uri != null) {
93 fbBuilder.addOffset(0, offset_uri); 95 fbBuilder.addOffset(0, offset_uri);
94 } 96 }
95 if (offset_parts != null) { 97 if (offset_parts != null) {
96 fbBuilder.addOffset(1, offset_parts); 98 fbBuilder.addOffset(1, offset_parts);
97 } 99 }
98 return fbBuilder.endTable(); 100 return fbBuilder.endTable();
99 } 101 }
100 } 102 }
101 103
102 PrelinkedDependencyBuilder encodePrelinkedDependency({String uri, List<String> p arts}) {
103 PrelinkedDependencyBuilder builder = new PrelinkedDependencyBuilder();
104 builder.uri = uri;
105 builder.parts = parts;
106 return builder;
107 }
108
109 /** 104 /**
110 * Information about a dependency that exists between one library and another 105 * Information about a dependency that exists between one library and another
111 * due to an "import" declaration. 106 * due to an "import" declaration.
112 */ 107 */
113 abstract class PrelinkedDependency extends base.SummaryClass { 108 abstract class PrelinkedDependency extends base.SummaryClass {
114 109
115 /** 110 /**
116 * The relative URI of the dependent library. This URI is relative to the 111 * The relative URI of the dependent library. This URI is relative to the
117 * importing library, even if there are intervening `export` declarations. 112 * importing library, even if there are intervening `export` declarations.
118 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports 113 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 160 }
166 161
167 class PrelinkedExportNameBuilder extends Object with _PrelinkedExportNameMixin i mplements PrelinkedExportName { 162 class PrelinkedExportNameBuilder extends Object with _PrelinkedExportNameMixin i mplements PrelinkedExportName {
168 bool _finished = false; 163 bool _finished = false;
169 164
170 String _name; 165 String _name;
171 int _dependency; 166 int _dependency;
172 int _unit; 167 int _unit;
173 PrelinkedReferenceKind _kind; 168 PrelinkedReferenceKind _kind;
174 169
175 PrelinkedExportNameBuilder();
176
177 @override 170 @override
178 String get name => _name ?? ''; 171 String get name => _name ?? '';
179 172
180 /** 173 /**
181 * Name of the exported entity. TODO(paulberry): do we include the trailing 174 * Name of the exported entity. TODO(paulberry): do we include the trailing
182 * '=' for a setter? 175 * '=' for a setter?
183 */ 176 */
184 void set name(String _value) { 177 void set name(String _value) {
185 assert(!_finished); 178 assert(!_finished);
186 _name = _value; 179 _name = _value;
(...skipping 29 matching lines...) Expand all
216 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ; 209 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ;
217 210
218 /** 211 /**
219 * The kind of the entity being referred to. 212 * The kind of the entity being referred to.
220 */ 213 */
221 void set kind(PrelinkedReferenceKind _value) { 214 void set kind(PrelinkedReferenceKind _value) {
222 assert(!_finished); 215 assert(!_finished);
223 _kind = _value; 216 _kind = _value;
224 } 217 }
225 218
219 PrelinkedExportNameBuilder({String name, int dependency, int unit, PrelinkedRe ferenceKind kind})
220 : _name = name,
221 _dependency = dependency,
222 _unit = unit,
223 _kind = kind;
224
226 fb.Offset finish(fb.Builder fbBuilder) { 225 fb.Offset finish(fb.Builder fbBuilder) {
227 assert(!_finished); 226 assert(!_finished);
228 _finished = true; 227 _finished = true;
229 fb.Offset offset_name; 228 fb.Offset offset_name;
230 if (_name != null) { 229 if (_name != null) {
231 offset_name = fbBuilder.writeString(_name); 230 offset_name = fbBuilder.writeString(_name);
232 } 231 }
233 fbBuilder.startTable(); 232 fbBuilder.startTable();
234 if (offset_name != null) { 233 if (offset_name != null) {
235 fbBuilder.addOffset(0, offset_name); 234 fbBuilder.addOffset(0, offset_name);
236 } 235 }
237 if (_dependency != null && _dependency != 0) { 236 if (_dependency != null && _dependency != 0) {
238 fbBuilder.addInt32(1, _dependency); 237 fbBuilder.addInt32(1, _dependency);
239 } 238 }
240 if (_unit != null && _unit != 0) { 239 if (_unit != null && _unit != 0) {
241 fbBuilder.addInt32(2, _unit); 240 fbBuilder.addInt32(2, _unit);
242 } 241 }
243 if (_kind != null && _kind != PrelinkedReferenceKind.classOrEnum) { 242 if (_kind != null && _kind != PrelinkedReferenceKind.classOrEnum) {
244 fbBuilder.addInt32(3, _kind.index); 243 fbBuilder.addInt32(3, _kind.index);
245 } 244 }
246 return fbBuilder.endTable(); 245 return fbBuilder.endTable();
247 } 246 }
248 } 247 }
249 248
250 PrelinkedExportNameBuilder encodePrelinkedExportName({String name, int dependenc y, int unit, PrelinkedReferenceKind kind}) {
251 PrelinkedExportNameBuilder builder = new PrelinkedExportNameBuilder();
252 builder.name = name;
253 builder.dependency = dependency;
254 builder.unit = unit;
255 builder.kind = kind;
256 return builder;
257 }
258
259 /** 249 /**
260 * Information about a single name in the export namespace of the library that 250 * Information about a single name in the export namespace of the library that
261 * is not in the public namespace. 251 * is not in the public namespace.
262 */ 252 */
263 abstract class PrelinkedExportName extends base.SummaryClass { 253 abstract class PrelinkedExportName extends base.SummaryClass {
264 254
265 /** 255 /**
266 * Name of the exported entity. TODO(paulberry): do we include the trailing 256 * Name of the exported entity. TODO(paulberry): do we include the trailing
267 * '=' for a setter? 257 * '=' for a setter?
268 */ 258 */
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 331 }
342 332
343 class PrelinkedLibraryBuilder extends Object with _PrelinkedLibraryMixin impleme nts PrelinkedLibrary { 333 class PrelinkedLibraryBuilder extends Object with _PrelinkedLibraryMixin impleme nts PrelinkedLibrary {
344 bool _finished = false; 334 bool _finished = false;
345 335
346 List<PrelinkedUnitBuilder> _units; 336 List<PrelinkedUnitBuilder> _units;
347 List<PrelinkedDependencyBuilder> _dependencies; 337 List<PrelinkedDependencyBuilder> _dependencies;
348 List<int> _importDependencies; 338 List<int> _importDependencies;
349 List<PrelinkedExportNameBuilder> _exportNames; 339 List<PrelinkedExportNameBuilder> _exportNames;
350 340
351 PrelinkedLibraryBuilder();
352
353 @override 341 @override
354 List<PrelinkedUnit> get units => _units ?? const <PrelinkedUnit>[]; 342 List<PrelinkedUnit> get units => _units ?? const <PrelinkedUnit>[];
355 343
356 /** 344 /**
357 * The pre-linked summary of all the compilation units constituting the 345 * The pre-linked summary of all the compilation units constituting the
358 * library. The summary of the defining compilation unit is listed first, 346 * library. The summary of the defining compilation unit is listed first,
359 * followed by the summary of each part, in the order of the `part` 347 * followed by the summary of each part, in the order of the `part`
360 * declarations in the defining compilation unit. 348 * declarations in the defining compilation unit.
361 */ 349 */
362 void set units(List<PrelinkedUnitBuilder> _value) { 350 void set units(List<PrelinkedUnitBuilder> _value) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 * not in the public namespace of the library (that is, entities that are 392 * not in the public namespace of the library (that is, entities that are
405 * brought into the namespace via `export` directives). 393 * brought into the namespace via `export` directives).
406 * 394 *
407 * Sorted by name. 395 * Sorted by name.
408 */ 396 */
409 void set exportNames(List<PrelinkedExportNameBuilder> _value) { 397 void set exportNames(List<PrelinkedExportNameBuilder> _value) {
410 assert(!_finished); 398 assert(!_finished);
411 _exportNames = _value; 399 _exportNames = _value;
412 } 400 }
413 401
402 PrelinkedLibraryBuilder({List<PrelinkedUnitBuilder> units, List<PrelinkedDepen dencyBuilder> dependencies, List<int> importDependencies, List<PrelinkedExportNa meBuilder> exportNames})
403 : _units = units,
404 _dependencies = dependencies,
405 _importDependencies = importDependencies,
406 _exportNames = exportNames;
407
414 List<int> toBuffer() { 408 List<int> toBuffer() {
415 fb.Builder fbBuilder = new fb.Builder(); 409 fb.Builder fbBuilder = new fb.Builder();
416 return fbBuilder.finish(finish(fbBuilder)); 410 return fbBuilder.finish(finish(fbBuilder));
417 } 411 }
418 412
419 fb.Offset finish(fb.Builder fbBuilder) { 413 fb.Offset finish(fb.Builder fbBuilder) {
420 assert(!_finished); 414 assert(!_finished);
421 _finished = true; 415 _finished = true;
422 fb.Offset offset_units; 416 fb.Offset offset_units;
423 fb.Offset offset_dependencies; 417 fb.Offset offset_dependencies;
(...skipping 21 matching lines...) Expand all
445 if (offset_importDependencies != null) { 439 if (offset_importDependencies != null) {
446 fbBuilder.addOffset(2, offset_importDependencies); 440 fbBuilder.addOffset(2, offset_importDependencies);
447 } 441 }
448 if (offset_exportNames != null) { 442 if (offset_exportNames != null) {
449 fbBuilder.addOffset(3, offset_exportNames); 443 fbBuilder.addOffset(3, offset_exportNames);
450 } 444 }
451 return fbBuilder.endTable(); 445 return fbBuilder.endTable();
452 } 446 }
453 } 447 }
454 448
455 PrelinkedLibraryBuilder encodePrelinkedLibrary({List<PrelinkedUnitBuilder> units , List<PrelinkedDependencyBuilder> dependencies, List<int> importDependencies, L ist<PrelinkedExportNameBuilder> exportNames}) {
456 PrelinkedLibraryBuilder builder = new PrelinkedLibraryBuilder();
457 builder.units = units;
458 builder.dependencies = dependencies;
459 builder.importDependencies = importDependencies;
460 builder.exportNames = exportNames;
461 return builder;
462 }
463
464 /** 449 /**
465 * Pre-linked summary of a library. 450 * Pre-linked summary of a library.
466 */ 451 */
467 abstract class PrelinkedLibrary extends base.SummaryClass { 452 abstract class PrelinkedLibrary extends base.SummaryClass {
468 factory PrelinkedLibrary.fromBuffer(List<int> buffer) { 453 factory PrelinkedLibrary.fromBuffer(List<int> buffer) {
469 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 454 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
470 return const _PrelinkedLibraryReader().read(rootRef); 455 return const _PrelinkedLibraryReader().read(rootRef);
471 } 456 }
472 457
473 /** 458 /**
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 } 546 }
562 547
563 class PrelinkedReferenceBuilder extends Object with _PrelinkedReferenceMixin imp lements PrelinkedReference { 548 class PrelinkedReferenceBuilder extends Object with _PrelinkedReferenceMixin imp lements PrelinkedReference {
564 bool _finished = false; 549 bool _finished = false;
565 550
566 int _dependency; 551 int _dependency;
567 PrelinkedReferenceKind _kind; 552 PrelinkedReferenceKind _kind;
568 int _unit; 553 int _unit;
569 int _numTypeParameters; 554 int _numTypeParameters;
570 555
571 PrelinkedReferenceBuilder();
572
573 @override 556 @override
574 int get dependency => _dependency ?? 0; 557 int get dependency => _dependency ?? 0;
575 558
576 /** 559 /**
577 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y 560 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y
578 * declares the entity being referred to. 561 * declares the entity being referred to.
579 */ 562 */
580 void set dependency(int _value) { 563 void set dependency(int _value) {
581 assert(!_finished); 564 assert(!_finished);
582 _dependency = _value; 565 _dependency = _value;
(...skipping 30 matching lines...) Expand all
613 596
614 /** 597 /**
615 * If the entity being referred to is generic, the number of type parameters 598 * If the entity being referred to is generic, the number of type parameters
616 * it accepts. Otherwise zero. 599 * it accepts. Otherwise zero.
617 */ 600 */
618 void set numTypeParameters(int _value) { 601 void set numTypeParameters(int _value) {
619 assert(!_finished); 602 assert(!_finished);
620 _numTypeParameters = _value; 603 _numTypeParameters = _value;
621 } 604 }
622 605
606 PrelinkedReferenceBuilder({int dependency, PrelinkedReferenceKind kind, int un it, int numTypeParameters})
607 : _dependency = dependency,
608 _kind = kind,
609 _unit = unit,
610 _numTypeParameters = numTypeParameters;
611
623 fb.Offset finish(fb.Builder fbBuilder) { 612 fb.Offset finish(fb.Builder fbBuilder) {
624 assert(!_finished); 613 assert(!_finished);
625 _finished = true; 614 _finished = true;
626 fbBuilder.startTable(); 615 fbBuilder.startTable();
627 if (_dependency != null && _dependency != 0) { 616 if (_dependency != null && _dependency != 0) {
628 fbBuilder.addInt32(0, _dependency); 617 fbBuilder.addInt32(0, _dependency);
629 } 618 }
630 if (_kind != null && _kind != PrelinkedReferenceKind.classOrEnum) { 619 if (_kind != null && _kind != PrelinkedReferenceKind.classOrEnum) {
631 fbBuilder.addInt32(1, _kind.index); 620 fbBuilder.addInt32(1, _kind.index);
632 } 621 }
633 if (_unit != null && _unit != 0) { 622 if (_unit != null && _unit != 0) {
634 fbBuilder.addInt32(2, _unit); 623 fbBuilder.addInt32(2, _unit);
635 } 624 }
636 if (_numTypeParameters != null && _numTypeParameters != 0) { 625 if (_numTypeParameters != null && _numTypeParameters != 0) {
637 fbBuilder.addInt32(3, _numTypeParameters); 626 fbBuilder.addInt32(3, _numTypeParameters);
638 } 627 }
639 return fbBuilder.endTable(); 628 return fbBuilder.endTable();
640 } 629 }
641 } 630 }
642 631
643 PrelinkedReferenceBuilder encodePrelinkedReference({int dependency, PrelinkedRef erenceKind kind, int unit, int numTypeParameters}) {
644 PrelinkedReferenceBuilder builder = new PrelinkedReferenceBuilder();
645 builder.dependency = dependency;
646 builder.kind = kind;
647 builder.unit = unit;
648 builder.numTypeParameters = numTypeParameters;
649 return builder;
650 }
651
652 /** 632 /**
653 * Information about the resolution of an [UnlinkedReference]. 633 * Information about the resolution of an [UnlinkedReference].
654 */ 634 */
655 abstract class PrelinkedReference extends base.SummaryClass { 635 abstract class PrelinkedReference extends base.SummaryClass {
656 636
657 /** 637 /**
658 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y 638 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y
659 * declares the entity being referred to. 639 * declares the entity being referred to.
660 */ 640 */
661 int get dependency; 641 int get dependency;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 "unit": unit, 711 "unit": unit,
732 "numTypeParameters": numTypeParameters, 712 "numTypeParameters": numTypeParameters,
733 }; 713 };
734 } 714 }
735 715
736 class PrelinkedUnitBuilder extends Object with _PrelinkedUnitMixin implements Pr elinkedUnit { 716 class PrelinkedUnitBuilder extends Object with _PrelinkedUnitMixin implements Pr elinkedUnit {
737 bool _finished = false; 717 bool _finished = false;
738 718
739 List<PrelinkedReferenceBuilder> _references; 719 List<PrelinkedReferenceBuilder> _references;
740 720
741 PrelinkedUnitBuilder();
742
743 @override 721 @override
744 List<PrelinkedReference> get references => _references ?? const <PrelinkedRefe rence>[]; 722 List<PrelinkedReference> get references => _references ?? const <PrelinkedRefe rence>[];
745 723
746 /** 724 /**
747 * For each reference in [UnlinkedUnit.references], information about how 725 * For each reference in [UnlinkedUnit.references], information about how
748 * that reference is resolved. 726 * that reference is resolved.
749 */ 727 */
750 void set references(List<PrelinkedReferenceBuilder> _value) { 728 void set references(List<PrelinkedReferenceBuilder> _value) {
751 assert(!_finished); 729 assert(!_finished);
752 _references = _value; 730 _references = _value;
753 } 731 }
754 732
733 PrelinkedUnitBuilder({List<PrelinkedReferenceBuilder> references})
734 : _references = references;
735
755 fb.Offset finish(fb.Builder fbBuilder) { 736 fb.Offset finish(fb.Builder fbBuilder) {
756 assert(!_finished); 737 assert(!_finished);
757 _finished = true; 738 _finished = true;
758 fb.Offset offset_references; 739 fb.Offset offset_references;
759 if (!(_references == null || _references.isEmpty)) { 740 if (!(_references == null || _references.isEmpty)) {
760 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList()); 741 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList());
761 } 742 }
762 fbBuilder.startTable(); 743 fbBuilder.startTable();
763 if (offset_references != null) { 744 if (offset_references != null) {
764 fbBuilder.addOffset(0, offset_references); 745 fbBuilder.addOffset(0, offset_references);
765 } 746 }
766 return fbBuilder.endTable(); 747 return fbBuilder.endTable();
767 } 748 }
768 } 749 }
769 750
770 PrelinkedUnitBuilder encodePrelinkedUnit({List<PrelinkedReferenceBuilder> refere nces}) {
771 PrelinkedUnitBuilder builder = new PrelinkedUnitBuilder();
772 builder.references = references;
773 return builder;
774 }
775
776 /** 751 /**
777 * Pre-linked summary of a compilation unit. 752 * Pre-linked summary of a compilation unit.
778 */ 753 */
779 abstract class PrelinkedUnit extends base.SummaryClass { 754 abstract class PrelinkedUnit extends base.SummaryClass {
780 755
781 /** 756 /**
782 * For each reference in [UnlinkedUnit.references], information about how 757 * For each reference in [UnlinkedUnit.references], information about how
783 * that reference is resolved. 758 * that reference is resolved.
784 */ 759 */
785 List<PrelinkedReference> get references; 760 List<PrelinkedReference> get references;
(...skipping 28 matching lines...) Expand all
814 } 789 }
815 790
816 class SdkBundleBuilder extends Object with _SdkBundleMixin implements SdkBundle { 791 class SdkBundleBuilder extends Object with _SdkBundleMixin implements SdkBundle {
817 bool _finished = false; 792 bool _finished = false;
818 793
819 List<String> _prelinkedLibraryUris; 794 List<String> _prelinkedLibraryUris;
820 List<PrelinkedLibraryBuilder> _prelinkedLibraries; 795 List<PrelinkedLibraryBuilder> _prelinkedLibraries;
821 List<String> _unlinkedUnitUris; 796 List<String> _unlinkedUnitUris;
822 List<UnlinkedUnitBuilder> _unlinkedUnits; 797 List<UnlinkedUnitBuilder> _unlinkedUnits;
823 798
824 SdkBundleBuilder();
825
826 @override 799 @override
827 List<String> get prelinkedLibraryUris => _prelinkedLibraryUris ?? const <Strin g>[]; 800 List<String> get prelinkedLibraryUris => _prelinkedLibraryUris ?? const <Strin g>[];
828 801
829 /** 802 /**
830 * The list of URIs of items in [prelinkedLibraries], e.g. `dart:core`. 803 * The list of URIs of items in [prelinkedLibraries], e.g. `dart:core`.
831 */ 804 */
832 void set prelinkedLibraryUris(List<String> _value) { 805 void set prelinkedLibraryUris(List<String> _value) {
833 assert(!_finished); 806 assert(!_finished);
834 _prelinkedLibraryUris = _value; 807 _prelinkedLibraryUris = _value;
835 } 808 }
(...skipping 24 matching lines...) Expand all
860 List<UnlinkedUnit> get unlinkedUnits => _unlinkedUnits ?? const <UnlinkedUnit> []; 833 List<UnlinkedUnit> get unlinkedUnits => _unlinkedUnits ?? const <UnlinkedUnit> [];
861 834
862 /** 835 /**
863 * Unlinked information for the compilation units constituting the SDK. 836 * Unlinked information for the compilation units constituting the SDK.
864 */ 837 */
865 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) { 838 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) {
866 assert(!_finished); 839 assert(!_finished);
867 _unlinkedUnits = _value; 840 _unlinkedUnits = _value;
868 } 841 }
869 842
843 SdkBundleBuilder({List<String> prelinkedLibraryUris, List<PrelinkedLibraryBuil der> prelinkedLibraries, List<String> unlinkedUnitUris, List<UnlinkedUnitBuilder > unlinkedUnits})
844 : _prelinkedLibraryUris = prelinkedLibraryUris,
845 _prelinkedLibraries = prelinkedLibraries,
846 _unlinkedUnitUris = unlinkedUnitUris,
847 _unlinkedUnits = unlinkedUnits;
848
870 List<int> toBuffer() { 849 List<int> toBuffer() {
871 fb.Builder fbBuilder = new fb.Builder(); 850 fb.Builder fbBuilder = new fb.Builder();
872 return fbBuilder.finish(finish(fbBuilder)); 851 return fbBuilder.finish(finish(fbBuilder));
873 } 852 }
874 853
875 fb.Offset finish(fb.Builder fbBuilder) { 854 fb.Offset finish(fb.Builder fbBuilder) {
876 assert(!_finished); 855 assert(!_finished);
877 _finished = true; 856 _finished = true;
878 fb.Offset offset_prelinkedLibraryUris; 857 fb.Offset offset_prelinkedLibraryUris;
879 fb.Offset offset_prelinkedLibraries; 858 fb.Offset offset_prelinkedLibraries;
(...skipping 21 matching lines...) Expand all
901 if (offset_unlinkedUnitUris != null) { 880 if (offset_unlinkedUnitUris != null) {
902 fbBuilder.addOffset(2, offset_unlinkedUnitUris); 881 fbBuilder.addOffset(2, offset_unlinkedUnitUris);
903 } 882 }
904 if (offset_unlinkedUnits != null) { 883 if (offset_unlinkedUnits != null) {
905 fbBuilder.addOffset(3, offset_unlinkedUnits); 884 fbBuilder.addOffset(3, offset_unlinkedUnits);
906 } 885 }
907 return fbBuilder.endTable(); 886 return fbBuilder.endTable();
908 } 887 }
909 } 888 }
910 889
911 SdkBundleBuilder encodeSdkBundle({List<String> prelinkedLibraryUris, List<Prelin kedLibraryBuilder> prelinkedLibraries, List<String> unlinkedUnitUris, List<Unlin kedUnitBuilder> unlinkedUnits}) {
912 SdkBundleBuilder builder = new SdkBundleBuilder();
913 builder.prelinkedLibraryUris = prelinkedLibraryUris;
914 builder.prelinkedLibraries = prelinkedLibraries;
915 builder.unlinkedUnitUris = unlinkedUnitUris;
916 builder.unlinkedUnits = unlinkedUnits;
917 return builder;
918 }
919
920 /** 890 /**
921 * Information about SDK. 891 * Information about SDK.
922 */ 892 */
923 abstract class SdkBundle extends base.SummaryClass { 893 abstract class SdkBundle extends base.SummaryClass {
924 factory SdkBundle.fromBuffer(List<int> buffer) { 894 factory SdkBundle.fromBuffer(List<int> buffer) {
925 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 895 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
926 return const _SdkBundleReader().read(rootRef); 896 return const _SdkBundleReader().read(rootRef);
927 } 897 }
928 898
929 /** 899 /**
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 List<UnlinkedTypeParamBuilder> _typeParameters; 978 List<UnlinkedTypeParamBuilder> _typeParameters;
1009 UnlinkedTypeRefBuilder _supertype; 979 UnlinkedTypeRefBuilder _supertype;
1010 List<UnlinkedTypeRefBuilder> _mixins; 980 List<UnlinkedTypeRefBuilder> _mixins;
1011 List<UnlinkedTypeRefBuilder> _interfaces; 981 List<UnlinkedTypeRefBuilder> _interfaces;
1012 List<UnlinkedVariableBuilder> _fields; 982 List<UnlinkedVariableBuilder> _fields;
1013 List<UnlinkedExecutableBuilder> _executables; 983 List<UnlinkedExecutableBuilder> _executables;
1014 bool _isAbstract; 984 bool _isAbstract;
1015 bool _isMixinApplication; 985 bool _isMixinApplication;
1016 bool _hasNoSupertype; 986 bool _hasNoSupertype;
1017 987
1018 UnlinkedClassBuilder();
1019
1020 @override 988 @override
1021 String get name => _name ?? ''; 989 String get name => _name ?? '';
1022 990
1023 /** 991 /**
1024 * Name of the class. 992 * Name of the class.
1025 */ 993 */
1026 void set name(String _value) { 994 void set name(String _value) {
1027 assert(!_finished); 995 assert(!_finished);
1028 _name = _value; 996 _name = _value;
1029 } 997 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 1114
1147 /** 1115 /**
1148 * Indicates whether this class is the core "Object" class (and hence has no 1116 * Indicates whether this class is the core "Object" class (and hence has no
1149 * supertype) 1117 * supertype)
1150 */ 1118 */
1151 void set hasNoSupertype(bool _value) { 1119 void set hasNoSupertype(bool _value) {
1152 assert(!_finished); 1120 assert(!_finished);
1153 _hasNoSupertype = _value; 1121 _hasNoSupertype = _value;
1154 } 1122 }
1155 1123
1124 UnlinkedClassBuilder({String name, int nameOffset, UnlinkedDocumentationCommen tBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameters, Un linkedTypeRefBuilder supertype, List<UnlinkedTypeRefBuilder> mixins, List<Unlink edTypeRefBuilder> interfaces, List<UnlinkedVariableBuilder> fields, List<Unlinke dExecutableBuilder> executables, bool isAbstract, bool isMixinApplication, bool hasNoSupertype})
1125 : _name = name,
1126 _nameOffset = nameOffset,
1127 _documentationComment = documentationComment,
1128 _typeParameters = typeParameters,
1129 _supertype = supertype,
1130 _mixins = mixins,
1131 _interfaces = interfaces,
1132 _fields = fields,
1133 _executables = executables,
1134 _isAbstract = isAbstract,
1135 _isMixinApplication = isMixinApplication,
1136 _hasNoSupertype = hasNoSupertype;
1137
1156 fb.Offset finish(fb.Builder fbBuilder) { 1138 fb.Offset finish(fb.Builder fbBuilder) {
1157 assert(!_finished); 1139 assert(!_finished);
1158 _finished = true; 1140 _finished = true;
1159 fb.Offset offset_name; 1141 fb.Offset offset_name;
1160 fb.Offset offset_documentationComment; 1142 fb.Offset offset_documentationComment;
1161 fb.Offset offset_typeParameters; 1143 fb.Offset offset_typeParameters;
1162 fb.Offset offset_supertype; 1144 fb.Offset offset_supertype;
1163 fb.Offset offset_mixins; 1145 fb.Offset offset_mixins;
1164 fb.Offset offset_interfaces; 1146 fb.Offset offset_interfaces;
1165 fb.Offset offset_fields; 1147 fb.Offset offset_fields;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 if (_isMixinApplication == true) { 1204 if (_isMixinApplication == true) {
1223 fbBuilder.addBool(10, true); 1205 fbBuilder.addBool(10, true);
1224 } 1206 }
1225 if (_hasNoSupertype == true) { 1207 if (_hasNoSupertype == true) {
1226 fbBuilder.addBool(11, true); 1208 fbBuilder.addBool(11, true);
1227 } 1209 }
1228 return fbBuilder.endTable(); 1210 return fbBuilder.endTable();
1229 } 1211 }
1230 } 1212 }
1231 1213
1232 UnlinkedClassBuilder encodeUnlinkedClass({String name, int nameOffset, UnlinkedD ocumentationCommentBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedTypeRefBuilder supertype, List<UnlinkedTypeRefBuilder> m ixins, List<UnlinkedTypeRefBuilder> interfaces, List<UnlinkedVariableBuilder> fi elds, List<UnlinkedExecutableBuilder> executables, bool isAbstract, bool isMixin Application, bool hasNoSupertype}) {
1233 UnlinkedClassBuilder builder = new UnlinkedClassBuilder();
1234 builder.name = name;
1235 builder.nameOffset = nameOffset;
1236 builder.documentationComment = documentationComment;
1237 builder.typeParameters = typeParameters;
1238 builder.supertype = supertype;
1239 builder.mixins = mixins;
1240 builder.interfaces = interfaces;
1241 builder.fields = fields;
1242 builder.executables = executables;
1243 builder.isAbstract = isAbstract;
1244 builder.isMixinApplication = isMixinApplication;
1245 builder.hasNoSupertype = hasNoSupertype;
1246 return builder;
1247 }
1248
1249 /** 1214 /**
1250 * Unlinked summary information about a class declaration. 1215 * Unlinked summary information about a class declaration.
1251 */ 1216 */
1252 abstract class UnlinkedClass extends base.SummaryClass { 1217 abstract class UnlinkedClass extends base.SummaryClass {
1253 1218
1254 /** 1219 /**
1255 * Name of the class. 1220 * Name of the class.
1256 */ 1221 */
1257 String get name; 1222 String get name;
1258 1223
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 "hasNoSupertype": hasNoSupertype, 1396 "hasNoSupertype": hasNoSupertype,
1432 }; 1397 };
1433 } 1398 }
1434 1399
1435 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp lements UnlinkedCombinator { 1400 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp lements UnlinkedCombinator {
1436 bool _finished = false; 1401 bool _finished = false;
1437 1402
1438 List<String> _shows; 1403 List<String> _shows;
1439 List<String> _hides; 1404 List<String> _hides;
1440 1405
1441 UnlinkedCombinatorBuilder();
1442
1443 @override 1406 @override
1444 List<String> get shows => _shows ?? const <String>[]; 1407 List<String> get shows => _shows ?? const <String>[];
1445 1408
1446 /** 1409 /**
1447 * List of names which are shown. Empty if this is a `hide` combinator. 1410 * List of names which are shown. Empty if this is a `hide` combinator.
1448 */ 1411 */
1449 void set shows(List<String> _value) { 1412 void set shows(List<String> _value) {
1450 assert(!_finished); 1413 assert(!_finished);
1451 _shows = _value; 1414 _shows = _value;
1452 } 1415 }
1453 1416
1454 @override 1417 @override
1455 List<String> get hides => _hides ?? const <String>[]; 1418 List<String> get hides => _hides ?? const <String>[];
1456 1419
1457 /** 1420 /**
1458 * List of names which are hidden. Empty if this is a `show` combinator. 1421 * List of names which are hidden. Empty if this is a `show` combinator.
1459 */ 1422 */
1460 void set hides(List<String> _value) { 1423 void set hides(List<String> _value) {
1461 assert(!_finished); 1424 assert(!_finished);
1462 _hides = _value; 1425 _hides = _value;
1463 } 1426 }
1464 1427
1428 UnlinkedCombinatorBuilder({List<String> shows, List<String> hides})
1429 : _shows = shows,
1430 _hides = hides;
1431
1465 fb.Offset finish(fb.Builder fbBuilder) { 1432 fb.Offset finish(fb.Builder fbBuilder) {
1466 assert(!_finished); 1433 assert(!_finished);
1467 _finished = true; 1434 _finished = true;
1468 fb.Offset offset_shows; 1435 fb.Offset offset_shows;
1469 fb.Offset offset_hides; 1436 fb.Offset offset_hides;
1470 if (!(_shows == null || _shows.isEmpty)) { 1437 if (!(_shows == null || _shows.isEmpty)) {
1471 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString (b)).toList()); 1438 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString (b)).toList());
1472 } 1439 }
1473 if (!(_hides == null || _hides.isEmpty)) { 1440 if (!(_hides == null || _hides.isEmpty)) {
1474 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString (b)).toList()); 1441 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString (b)).toList());
1475 } 1442 }
1476 fbBuilder.startTable(); 1443 fbBuilder.startTable();
1477 if (offset_shows != null) { 1444 if (offset_shows != null) {
1478 fbBuilder.addOffset(0, offset_shows); 1445 fbBuilder.addOffset(0, offset_shows);
1479 } 1446 }
1480 if (offset_hides != null) { 1447 if (offset_hides != null) {
1481 fbBuilder.addOffset(1, offset_hides); 1448 fbBuilder.addOffset(1, offset_hides);
1482 } 1449 }
1483 return fbBuilder.endTable(); 1450 return fbBuilder.endTable();
1484 } 1451 }
1485 } 1452 }
1486 1453
1487 UnlinkedCombinatorBuilder encodeUnlinkedCombinator({List<String> shows, List<Str ing> hides}) {
1488 UnlinkedCombinatorBuilder builder = new UnlinkedCombinatorBuilder();
1489 builder.shows = shows;
1490 builder.hides = hides;
1491 return builder;
1492 }
1493
1494 /** 1454 /**
1495 * Unlinked summary information about a `show` or `hide` combinator in an 1455 * Unlinked summary information about a `show` or `hide` combinator in an
1496 * import or export declaration. 1456 * import or export declaration.
1497 */ 1457 */
1498 abstract class UnlinkedCombinator extends base.SummaryClass { 1458 abstract class UnlinkedCombinator extends base.SummaryClass {
1499 1459
1500 /** 1460 /**
1501 * List of names which are shown. Empty if this is a `hide` combinator. 1461 * List of names which are shown. Empty if this is a `hide` combinator.
1502 */ 1462 */
1503 List<String> get shows; 1463 List<String> get shows;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 }; 1504 };
1545 } 1505 }
1546 1506
1547 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements UnlinkedDocumentationComment { 1507 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements UnlinkedDocumentationComment {
1548 bool _finished = false; 1508 bool _finished = false;
1549 1509
1550 String _text; 1510 String _text;
1551 int _offset; 1511 int _offset;
1552 int _length; 1512 int _length;
1553 1513
1554 UnlinkedDocumentationCommentBuilder();
1555
1556 @override 1514 @override
1557 String get text => _text ?? ''; 1515 String get text => _text ?? '';
1558 1516
1559 /** 1517 /**
1560 * Text of the documentation comment, with '\r\n' replaced by '\n'. 1518 * Text of the documentation comment, with '\r\n' replaced by '\n'.
1561 * 1519 *
1562 * References appearing within the doc comment in square brackets are not 1520 * References appearing within the doc comment in square brackets are not
1563 * specially encoded. 1521 * specially encoded.
1564 */ 1522 */
1565 void set text(String _value) { 1523 void set text(String _value) {
(...skipping 17 matching lines...) Expand all
1583 int get length => _length ?? 0; 1541 int get length => _length ?? 0;
1584 1542
1585 /** 1543 /**
1586 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). 1544 * Length of the documentation comment (prior to replacing '\r\n' with '\n').
1587 */ 1545 */
1588 void set length(int _value) { 1546 void set length(int _value) {
1589 assert(!_finished); 1547 assert(!_finished);
1590 _length = _value; 1548 _length = _value;
1591 } 1549 }
1592 1550
1551 UnlinkedDocumentationCommentBuilder({String text, int offset, int length})
1552 : _text = text,
1553 _offset = offset,
1554 _length = length;
1555
1593 fb.Offset finish(fb.Builder fbBuilder) { 1556 fb.Offset finish(fb.Builder fbBuilder) {
1594 assert(!_finished); 1557 assert(!_finished);
1595 _finished = true; 1558 _finished = true;
1596 fb.Offset offset_text; 1559 fb.Offset offset_text;
1597 if (_text != null) { 1560 if (_text != null) {
1598 offset_text = fbBuilder.writeString(_text); 1561 offset_text = fbBuilder.writeString(_text);
1599 } 1562 }
1600 fbBuilder.startTable(); 1563 fbBuilder.startTable();
1601 if (offset_text != null) { 1564 if (offset_text != null) {
1602 fbBuilder.addOffset(0, offset_text); 1565 fbBuilder.addOffset(0, offset_text);
1603 } 1566 }
1604 if (_offset != null && _offset != 0) { 1567 if (_offset != null && _offset != 0) {
1605 fbBuilder.addInt32(1, _offset); 1568 fbBuilder.addInt32(1, _offset);
1606 } 1569 }
1607 if (_length != null && _length != 0) { 1570 if (_length != null && _length != 0) {
1608 fbBuilder.addInt32(2, _length); 1571 fbBuilder.addInt32(2, _length);
1609 } 1572 }
1610 return fbBuilder.endTable(); 1573 return fbBuilder.endTable();
1611 } 1574 }
1612 } 1575 }
1613 1576
1614 UnlinkedDocumentationCommentBuilder encodeUnlinkedDocumentationComment({String t ext, int offset, int length}) {
1615 UnlinkedDocumentationCommentBuilder builder = new UnlinkedDocumentationComment Builder();
1616 builder.text = text;
1617 builder.offset = offset;
1618 builder.length = length;
1619 return builder;
1620 }
1621
1622 /** 1577 /**
1623 * Unlinked summary information about a documentation comment. 1578 * Unlinked summary information about a documentation comment.
1624 */ 1579 */
1625 abstract class UnlinkedDocumentationComment extends base.SummaryClass { 1580 abstract class UnlinkedDocumentationComment extends base.SummaryClass {
1626 1581
1627 /** 1582 /**
1628 * Text of the documentation comment, with '\r\n' replaced by '\n'. 1583 * Text of the documentation comment, with '\r\n' replaced by '\n'.
1629 * 1584 *
1630 * References appearing within the doc comment in square brackets are not 1585 * References appearing within the doc comment in square brackets are not
1631 * specially encoded. 1586 * specially encoded.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 } 1644 }
1690 1645
1691 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements Unli nkedEnum { 1646 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements Unli nkedEnum {
1692 bool _finished = false; 1647 bool _finished = false;
1693 1648
1694 String _name; 1649 String _name;
1695 int _nameOffset; 1650 int _nameOffset;
1696 UnlinkedDocumentationCommentBuilder _documentationComment; 1651 UnlinkedDocumentationCommentBuilder _documentationComment;
1697 List<UnlinkedEnumValueBuilder> _values; 1652 List<UnlinkedEnumValueBuilder> _values;
1698 1653
1699 UnlinkedEnumBuilder();
1700
1701 @override 1654 @override
1702 String get name => _name ?? ''; 1655 String get name => _name ?? '';
1703 1656
1704 /** 1657 /**
1705 * Name of the enum type. 1658 * Name of the enum type.
1706 */ 1659 */
1707 void set name(String _value) { 1660 void set name(String _value) {
1708 assert(!_finished); 1661 assert(!_finished);
1709 _name = _value; 1662 _name = _value;
1710 } 1663 }
(...skipping 25 matching lines...) Expand all
1736 List<UnlinkedEnumValue> get values => _values ?? const <UnlinkedEnumValue>[]; 1689 List<UnlinkedEnumValue> get values => _values ?? const <UnlinkedEnumValue>[];
1737 1690
1738 /** 1691 /**
1739 * Values listed in the enum declaration, in declaration order. 1692 * Values listed in the enum declaration, in declaration order.
1740 */ 1693 */
1741 void set values(List<UnlinkedEnumValueBuilder> _value) { 1694 void set values(List<UnlinkedEnumValueBuilder> _value) {
1742 assert(!_finished); 1695 assert(!_finished);
1743 _values = _value; 1696 _values = _value;
1744 } 1697 }
1745 1698
1699 UnlinkedEnumBuilder({String name, int nameOffset, UnlinkedDocumentationComment Builder documentationComment, List<UnlinkedEnumValueBuilder> values})
1700 : _name = name,
1701 _nameOffset = nameOffset,
1702 _documentationComment = documentationComment,
1703 _values = values;
1704
1746 fb.Offset finish(fb.Builder fbBuilder) { 1705 fb.Offset finish(fb.Builder fbBuilder) {
1747 assert(!_finished); 1706 assert(!_finished);
1748 _finished = true; 1707 _finished = true;
1749 fb.Offset offset_name; 1708 fb.Offset offset_name;
1750 fb.Offset offset_documentationComment; 1709 fb.Offset offset_documentationComment;
1751 fb.Offset offset_values; 1710 fb.Offset offset_values;
1752 if (_name != null) { 1711 if (_name != null) {
1753 offset_name = fbBuilder.writeString(_name); 1712 offset_name = fbBuilder.writeString(_name);
1754 } 1713 }
1755 if (_documentationComment != null) { 1714 if (_documentationComment != null) {
(...skipping 12 matching lines...) Expand all
1768 if (offset_documentationComment != null) { 1727 if (offset_documentationComment != null) {
1769 fbBuilder.addOffset(2, offset_documentationComment); 1728 fbBuilder.addOffset(2, offset_documentationComment);
1770 } 1729 }
1771 if (offset_values != null) { 1730 if (offset_values != null) {
1772 fbBuilder.addOffset(3, offset_values); 1731 fbBuilder.addOffset(3, offset_values);
1773 } 1732 }
1774 return fbBuilder.endTable(); 1733 return fbBuilder.endTable();
1775 } 1734 }
1776 } 1735 }
1777 1736
1778 UnlinkedEnumBuilder encodeUnlinkedEnum({String name, int nameOffset, UnlinkedDoc umentationCommentBuilder documentationComment, List<UnlinkedEnumValueBuilder> va lues}) {
1779 UnlinkedEnumBuilder builder = new UnlinkedEnumBuilder();
1780 builder.name = name;
1781 builder.nameOffset = nameOffset;
1782 builder.documentationComment = documentationComment;
1783 builder.values = values;
1784 return builder;
1785 }
1786
1787 /** 1737 /**
1788 * Unlinked summary information about an enum declaration. 1738 * Unlinked summary information about an enum declaration.
1789 */ 1739 */
1790 abstract class UnlinkedEnum extends base.SummaryClass { 1740 abstract class UnlinkedEnum extends base.SummaryClass {
1791 1741
1792 /** 1742 /**
1793 * Name of the enum type. 1743 * Name of the enum type.
1794 */ 1744 */
1795 String get name; 1745 String get name;
1796 1746
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 }; 1813 };
1864 } 1814 }
1865 1815
1866 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple ments UnlinkedEnumValue { 1816 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple ments UnlinkedEnumValue {
1867 bool _finished = false; 1817 bool _finished = false;
1868 1818
1869 String _name; 1819 String _name;
1870 int _nameOffset; 1820 int _nameOffset;
1871 UnlinkedDocumentationCommentBuilder _documentationComment; 1821 UnlinkedDocumentationCommentBuilder _documentationComment;
1872 1822
1873 UnlinkedEnumValueBuilder();
1874
1875 @override 1823 @override
1876 String get name => _name ?? ''; 1824 String get name => _name ?? '';
1877 1825
1878 /** 1826 /**
1879 * Name of the enumerated value. 1827 * Name of the enumerated value.
1880 */ 1828 */
1881 void set name(String _value) { 1829 void set name(String _value) {
1882 assert(!_finished); 1830 assert(!_finished);
1883 _name = _value; 1831 _name = _value;
1884 } 1832 }
(...skipping 14 matching lines...) Expand all
1899 1847
1900 /** 1848 /**
1901 * Documentation comment for the enum value, or `null` if there is no 1849 * Documentation comment for the enum value, or `null` if there is no
1902 * documentation comment. 1850 * documentation comment.
1903 */ 1851 */
1904 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 1852 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
1905 assert(!_finished); 1853 assert(!_finished);
1906 _documentationComment = _value; 1854 _documentationComment = _value;
1907 } 1855 }
1908 1856
1857 UnlinkedEnumValueBuilder({String name, int nameOffset, UnlinkedDocumentationCo mmentBuilder documentationComment})
1858 : _name = name,
1859 _nameOffset = nameOffset,
1860 _documentationComment = documentationComment;
1861
1909 fb.Offset finish(fb.Builder fbBuilder) { 1862 fb.Offset finish(fb.Builder fbBuilder) {
1910 assert(!_finished); 1863 assert(!_finished);
1911 _finished = true; 1864 _finished = true;
1912 fb.Offset offset_name; 1865 fb.Offset offset_name;
1913 fb.Offset offset_documentationComment; 1866 fb.Offset offset_documentationComment;
1914 if (_name != null) { 1867 if (_name != null) {
1915 offset_name = fbBuilder.writeString(_name); 1868 offset_name = fbBuilder.writeString(_name);
1916 } 1869 }
1917 if (_documentationComment != null) { 1870 if (_documentationComment != null) {
1918 offset_documentationComment = _documentationComment.finish(fbBuilder); 1871 offset_documentationComment = _documentationComment.finish(fbBuilder);
1919 } 1872 }
1920 fbBuilder.startTable(); 1873 fbBuilder.startTable();
1921 if (offset_name != null) { 1874 if (offset_name != null) {
1922 fbBuilder.addOffset(0, offset_name); 1875 fbBuilder.addOffset(0, offset_name);
1923 } 1876 }
1924 if (_nameOffset != null && _nameOffset != 0) { 1877 if (_nameOffset != null && _nameOffset != 0) {
1925 fbBuilder.addInt32(1, _nameOffset); 1878 fbBuilder.addInt32(1, _nameOffset);
1926 } 1879 }
1927 if (offset_documentationComment != null) { 1880 if (offset_documentationComment != null) {
1928 fbBuilder.addOffset(2, offset_documentationComment); 1881 fbBuilder.addOffset(2, offset_documentationComment);
1929 } 1882 }
1930 return fbBuilder.endTable(); 1883 return fbBuilder.endTable();
1931 } 1884 }
1932 } 1885 }
1933 1886
1934 UnlinkedEnumValueBuilder encodeUnlinkedEnumValue({String name, int nameOffset, U nlinkedDocumentationCommentBuilder documentationComment}) {
1935 UnlinkedEnumValueBuilder builder = new UnlinkedEnumValueBuilder();
1936 builder.name = name;
1937 builder.nameOffset = nameOffset;
1938 builder.documentationComment = documentationComment;
1939 return builder;
1940 }
1941
1942 /** 1887 /**
1943 * Unlinked summary information about a single enumerated value in an enum 1888 * Unlinked summary information about a single enumerated value in an enum
1944 * declaration. 1889 * declaration.
1945 */ 1890 */
1946 abstract class UnlinkedEnumValue extends base.SummaryClass { 1891 abstract class UnlinkedEnumValue extends base.SummaryClass {
1947 1892
1948 /** 1893 /**
1949 * Name of the enumerated value. 1894 * Name of the enumerated value.
1950 */ 1895 */
1951 String get name; 1896 String get name;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 UnlinkedTypeRefBuilder _returnType; 1961 UnlinkedTypeRefBuilder _returnType;
2017 List<UnlinkedParamBuilder> _parameters; 1962 List<UnlinkedParamBuilder> _parameters;
2018 UnlinkedExecutableKind _kind; 1963 UnlinkedExecutableKind _kind;
2019 bool _isAbstract; 1964 bool _isAbstract;
2020 bool _isStatic; 1965 bool _isStatic;
2021 bool _isConst; 1966 bool _isConst;
2022 bool _isFactory; 1967 bool _isFactory;
2023 bool _hasImplicitReturnType; 1968 bool _hasImplicitReturnType;
2024 bool _isExternal; 1969 bool _isExternal;
2025 1970
2026 UnlinkedExecutableBuilder();
2027
2028 @override 1971 @override
2029 String get name => _name ?? ''; 1972 String get name => _name ?? '';
2030 1973
2031 /** 1974 /**
2032 * Name of the executable. For setters, this includes the trailing "=". For 1975 * Name of the executable. For setters, this includes the trailing "=". For
2033 * named constructors, this excludes the class name and excludes the ".". 1976 * named constructors, this excludes the class name and excludes the ".".
2034 * For unnamed constructors, this is the empty string. 1977 * For unnamed constructors, this is the empty string.
2035 */ 1978 */
2036 void set name(String _value) { 1979 void set name(String _value) {
2037 assert(!_finished); 1980 assert(!_finished);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 bool get isExternal => _isExternal ?? false; 2121 bool get isExternal => _isExternal ?? false;
2179 2122
2180 /** 2123 /**
2181 * Indicates whether the executable is declared using the `external` keyword. 2124 * Indicates whether the executable is declared using the `external` keyword.
2182 */ 2125 */
2183 void set isExternal(bool _value) { 2126 void set isExternal(bool _value) {
2184 assert(!_finished); 2127 assert(!_finished);
2185 _isExternal = _value; 2128 _isExternal = _value;
2186 } 2129 }
2187 2130
2131 UnlinkedExecutableBuilder({String name, int nameOffset, UnlinkedDocumentationC ommentBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameter s, UnlinkedTypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters, Unl inkedExecutableKind kind, bool isAbstract, bool isStatic, bool isConst, bool isF actory, bool hasImplicitReturnType, bool isExternal})
2132 : _name = name,
2133 _nameOffset = nameOffset,
2134 _documentationComment = documentationComment,
2135 _typeParameters = typeParameters,
2136 _returnType = returnType,
2137 _parameters = parameters,
2138 _kind = kind,
2139 _isAbstract = isAbstract,
2140 _isStatic = isStatic,
2141 _isConst = isConst,
2142 _isFactory = isFactory,
2143 _hasImplicitReturnType = hasImplicitReturnType,
2144 _isExternal = isExternal;
2145
2188 fb.Offset finish(fb.Builder fbBuilder) { 2146 fb.Offset finish(fb.Builder fbBuilder) {
2189 assert(!_finished); 2147 assert(!_finished);
2190 _finished = true; 2148 _finished = true;
2191 fb.Offset offset_name; 2149 fb.Offset offset_name;
2192 fb.Offset offset_documentationComment; 2150 fb.Offset offset_documentationComment;
2193 fb.Offset offset_typeParameters; 2151 fb.Offset offset_typeParameters;
2194 fb.Offset offset_returnType; 2152 fb.Offset offset_returnType;
2195 fb.Offset offset_parameters; 2153 fb.Offset offset_parameters;
2196 if (_name != null) { 2154 if (_name != null) {
2197 offset_name = fbBuilder.writeString(_name); 2155 offset_name = fbBuilder.writeString(_name);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 if (_hasImplicitReturnType == true) { 2203 if (_hasImplicitReturnType == true) {
2246 fbBuilder.addBool(11, true); 2204 fbBuilder.addBool(11, true);
2247 } 2205 }
2248 if (_isExternal == true) { 2206 if (_isExternal == true) {
2249 fbBuilder.addBool(12, true); 2207 fbBuilder.addBool(12, true);
2250 } 2208 }
2251 return fbBuilder.endTable(); 2209 return fbBuilder.endTable();
2252 } 2210 }
2253 } 2211 }
2254 2212
2255 UnlinkedExecutableBuilder encodeUnlinkedExecutable({String name, int nameOffset, UnlinkedDocumentationCommentBuilder documentationComment, List<UnlinkedTypePara mBuilder> typeParameters, UnlinkedTypeRefBuilder returnType, List<UnlinkedParamB uilder> parameters, UnlinkedExecutableKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFactory, bool hasImplicitReturnType, bool isExternal}) {
2256 UnlinkedExecutableBuilder builder = new UnlinkedExecutableBuilder();
2257 builder.name = name;
2258 builder.nameOffset = nameOffset;
2259 builder.documentationComment = documentationComment;
2260 builder.typeParameters = typeParameters;
2261 builder.returnType = returnType;
2262 builder.parameters = parameters;
2263 builder.kind = kind;
2264 builder.isAbstract = isAbstract;
2265 builder.isStatic = isStatic;
2266 builder.isConst = isConst;
2267 builder.isFactory = isFactory;
2268 builder.hasImplicitReturnType = hasImplicitReturnType;
2269 builder.isExternal = isExternal;
2270 return builder;
2271 }
2272
2273 /** 2213 /**
2274 * Unlinked summary information about a function, method, getter, or setter 2214 * Unlinked summary information about a function, method, getter, or setter
2275 * declaration. 2215 * declaration.
2276 */ 2216 */
2277 abstract class UnlinkedExecutable extends base.SummaryClass { 2217 abstract class UnlinkedExecutable extends base.SummaryClass {
2278 2218
2279 /** 2219 /**
2280 * Name of the executable. For setters, this includes the trailing "=". For 2220 * Name of the executable. For setters, this includes the trailing "=". For
2281 * named constructors, this excludes the class name and excludes the ".". 2221 * named constructors, this excludes the class name and excludes the ".".
2282 * For unnamed constructors, this is the empty string. 2222 * For unnamed constructors, this is the empty string.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 }; 2423 };
2484 } 2424 }
2485 2425
2486 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli cMixin implements UnlinkedExportNonPublic { 2426 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli cMixin implements UnlinkedExportNonPublic {
2487 bool _finished = false; 2427 bool _finished = false;
2488 2428
2489 int _offset; 2429 int _offset;
2490 int _uriOffset; 2430 int _uriOffset;
2491 int _uriEnd; 2431 int _uriEnd;
2492 2432
2493 UnlinkedExportNonPublicBuilder();
2494
2495 @override 2433 @override
2496 int get offset => _offset ?? 0; 2434 int get offset => _offset ?? 0;
2497 2435
2498 /** 2436 /**
2499 * Offset of the "export" keyword. 2437 * Offset of the "export" keyword.
2500 */ 2438 */
2501 void set offset(int _value) { 2439 void set offset(int _value) {
2502 assert(!_finished); 2440 assert(!_finished);
2503 _offset = _value; 2441 _offset = _value;
2504 } 2442 }
(...skipping 15 matching lines...) Expand all
2520 2458
2521 /** 2459 /**
2522 * End of the URI string (including quotes) relative to the beginning of the 2460 * End of the URI string (including quotes) relative to the beginning of the
2523 * file. 2461 * file.
2524 */ 2462 */
2525 void set uriEnd(int _value) { 2463 void set uriEnd(int _value) {
2526 assert(!_finished); 2464 assert(!_finished);
2527 _uriEnd = _value; 2465 _uriEnd = _value;
2528 } 2466 }
2529 2467
2468 UnlinkedExportNonPublicBuilder({int offset, int uriOffset, int uriEnd})
2469 : _offset = offset,
2470 _uriOffset = uriOffset,
2471 _uriEnd = uriEnd;
2472
2530 fb.Offset finish(fb.Builder fbBuilder) { 2473 fb.Offset finish(fb.Builder fbBuilder) {
2531 assert(!_finished); 2474 assert(!_finished);
2532 _finished = true; 2475 _finished = true;
2533 fbBuilder.startTable(); 2476 fbBuilder.startTable();
2534 if (_offset != null && _offset != 0) { 2477 if (_offset != null && _offset != 0) {
2535 fbBuilder.addInt32(0, _offset); 2478 fbBuilder.addInt32(0, _offset);
2536 } 2479 }
2537 if (_uriOffset != null && _uriOffset != 0) { 2480 if (_uriOffset != null && _uriOffset != 0) {
2538 fbBuilder.addInt32(1, _uriOffset); 2481 fbBuilder.addInt32(1, _uriOffset);
2539 } 2482 }
2540 if (_uriEnd != null && _uriEnd != 0) { 2483 if (_uriEnd != null && _uriEnd != 0) {
2541 fbBuilder.addInt32(2, _uriEnd); 2484 fbBuilder.addInt32(2, _uriEnd);
2542 } 2485 }
2543 return fbBuilder.endTable(); 2486 return fbBuilder.endTable();
2544 } 2487 }
2545 } 2488 }
2546 2489
2547 UnlinkedExportNonPublicBuilder encodeUnlinkedExportNonPublic({int offset, int ur iOffset, int uriEnd}) {
2548 UnlinkedExportNonPublicBuilder builder = new UnlinkedExportNonPublicBuilder();
2549 builder.offset = offset;
2550 builder.uriOffset = uriOffset;
2551 builder.uriEnd = uriEnd;
2552 return builder;
2553 }
2554
2555 /** 2490 /**
2556 * Unlinked summary information about an export declaration (stored outside 2491 * Unlinked summary information about an export declaration (stored outside
2557 * [UnlinkedPublicNamespace]). 2492 * [UnlinkedPublicNamespace]).
2558 */ 2493 */
2559 abstract class UnlinkedExportNonPublic extends base.SummaryClass { 2494 abstract class UnlinkedExportNonPublic extends base.SummaryClass {
2560 2495
2561 /** 2496 /**
2562 * Offset of the "export" keyword. 2497 * Offset of the "export" keyword.
2563 */ 2498 */
2564 int get offset; 2499 int get offset;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 "uriEnd": uriEnd, 2554 "uriEnd": uriEnd,
2620 }; 2555 };
2621 } 2556 }
2622 2557
2623 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin implements UnlinkedExportPublic { 2558 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin implements UnlinkedExportPublic {
2624 bool _finished = false; 2559 bool _finished = false;
2625 2560
2626 String _uri; 2561 String _uri;
2627 List<UnlinkedCombinatorBuilder> _combinators; 2562 List<UnlinkedCombinatorBuilder> _combinators;
2628 2563
2629 UnlinkedExportPublicBuilder();
2630
2631 @override 2564 @override
2632 String get uri => _uri ?? ''; 2565 String get uri => _uri ?? '';
2633 2566
2634 /** 2567 /**
2635 * URI used in the source code to reference the exported library. 2568 * URI used in the source code to reference the exported library.
2636 */ 2569 */
2637 void set uri(String _value) { 2570 void set uri(String _value) {
2638 assert(!_finished); 2571 assert(!_finished);
2639 _uri = _value; 2572 _uri = _value;
2640 } 2573 }
2641 2574
2642 @override 2575 @override
2643 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom binator>[]; 2576 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom binator>[];
2644 2577
2645 /** 2578 /**
2646 * Combinators contained in this import declaration. 2579 * Combinators contained in this import declaration.
2647 */ 2580 */
2648 void set combinators(List<UnlinkedCombinatorBuilder> _value) { 2581 void set combinators(List<UnlinkedCombinatorBuilder> _value) {
2649 assert(!_finished); 2582 assert(!_finished);
2650 _combinators = _value; 2583 _combinators = _value;
2651 } 2584 }
2652 2585
2586 UnlinkedExportPublicBuilder({String uri, List<UnlinkedCombinatorBuilder> combi nators})
2587 : _uri = uri,
2588 _combinators = combinators;
2589
2653 fb.Offset finish(fb.Builder fbBuilder) { 2590 fb.Offset finish(fb.Builder fbBuilder) {
2654 assert(!_finished); 2591 assert(!_finished);
2655 _finished = true; 2592 _finished = true;
2656 fb.Offset offset_uri; 2593 fb.Offset offset_uri;
2657 fb.Offset offset_combinators; 2594 fb.Offset offset_combinators;
2658 if (_uri != null) { 2595 if (_uri != null) {
2659 offset_uri = fbBuilder.writeString(_uri); 2596 offset_uri = fbBuilder.writeString(_uri);
2660 } 2597 }
2661 if (!(_combinators == null || _combinators.isEmpty)) { 2598 if (!(_combinators == null || _combinators.isEmpty)) {
2662 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList()); 2599 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList());
2663 } 2600 }
2664 fbBuilder.startTable(); 2601 fbBuilder.startTable();
2665 if (offset_uri != null) { 2602 if (offset_uri != null) {
2666 fbBuilder.addOffset(0, offset_uri); 2603 fbBuilder.addOffset(0, offset_uri);
2667 } 2604 }
2668 if (offset_combinators != null) { 2605 if (offset_combinators != null) {
2669 fbBuilder.addOffset(1, offset_combinators); 2606 fbBuilder.addOffset(1, offset_combinators);
2670 } 2607 }
2671 return fbBuilder.endTable(); 2608 return fbBuilder.endTable();
2672 } 2609 }
2673 } 2610 }
2674 2611
2675 UnlinkedExportPublicBuilder encodeUnlinkedExportPublic({String uri, List<Unlinke dCombinatorBuilder> combinators}) {
2676 UnlinkedExportPublicBuilder builder = new UnlinkedExportPublicBuilder();
2677 builder.uri = uri;
2678 builder.combinators = combinators;
2679 return builder;
2680 }
2681
2682 /** 2612 /**
2683 * Unlinked summary information about an export declaration (stored inside 2613 * Unlinked summary information about an export declaration (stored inside
2684 * [UnlinkedPublicNamespace]). 2614 * [UnlinkedPublicNamespace]).
2685 */ 2615 */
2686 abstract class UnlinkedExportPublic extends base.SummaryClass { 2616 abstract class UnlinkedExportPublic extends base.SummaryClass {
2687 2617
2688 /** 2618 /**
2689 * URI used in the source code to reference the exported library. 2619 * URI used in the source code to reference the exported library.
2690 */ 2620 */
2691 String get uri; 2621 String get uri;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 String _uri; 2668 String _uri;
2739 int _offset; 2669 int _offset;
2740 int _prefixReference; 2670 int _prefixReference;
2741 List<UnlinkedCombinatorBuilder> _combinators; 2671 List<UnlinkedCombinatorBuilder> _combinators;
2742 bool _isDeferred; 2672 bool _isDeferred;
2743 bool _isImplicit; 2673 bool _isImplicit;
2744 int _uriOffset; 2674 int _uriOffset;
2745 int _uriEnd; 2675 int _uriEnd;
2746 int _prefixOffset; 2676 int _prefixOffset;
2747 2677
2748 UnlinkedImportBuilder();
2749
2750 @override 2678 @override
2751 String get uri => _uri ?? ''; 2679 String get uri => _uri ?? '';
2752 2680
2753 /** 2681 /**
2754 * URI used in the source code to reference the imported library. 2682 * URI used in the source code to reference the imported library.
2755 */ 2683 */
2756 void set uri(String _value) { 2684 void set uri(String _value) {
2757 assert(!_finished); 2685 assert(!_finished);
2758 _uri = _value; 2686 _uri = _value;
2759 } 2687 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
2846 2774
2847 /** 2775 /**
2848 * Offset of the prefix name relative to the beginning of the file, or zero 2776 * Offset of the prefix name relative to the beginning of the file, or zero
2849 * if there is no prefix. 2777 * if there is no prefix.
2850 */ 2778 */
2851 void set prefixOffset(int _value) { 2779 void set prefixOffset(int _value) {
2852 assert(!_finished); 2780 assert(!_finished);
2853 _prefixOffset = _value; 2781 _prefixOffset = _value;
2854 } 2782 }
2855 2783
2784 UnlinkedImportBuilder({String uri, int offset, int prefixReference, List<Unlin kedCombinatorBuilder> combinators, bool isDeferred, bool isImplicit, int uriOffs et, int uriEnd, int prefixOffset})
2785 : _uri = uri,
2786 _offset = offset,
2787 _prefixReference = prefixReference,
2788 _combinators = combinators,
2789 _isDeferred = isDeferred,
2790 _isImplicit = isImplicit,
2791 _uriOffset = uriOffset,
2792 _uriEnd = uriEnd,
2793 _prefixOffset = prefixOffset;
2794
2856 fb.Offset finish(fb.Builder fbBuilder) { 2795 fb.Offset finish(fb.Builder fbBuilder) {
2857 assert(!_finished); 2796 assert(!_finished);
2858 _finished = true; 2797 _finished = true;
2859 fb.Offset offset_uri; 2798 fb.Offset offset_uri;
2860 fb.Offset offset_combinators; 2799 fb.Offset offset_combinators;
2861 if (_uri != null) { 2800 if (_uri != null) {
2862 offset_uri = fbBuilder.writeString(_uri); 2801 offset_uri = fbBuilder.writeString(_uri);
2863 } 2802 }
2864 if (!(_combinators == null || _combinators.isEmpty)) { 2803 if (!(_combinators == null || _combinators.isEmpty)) {
2865 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList()); 2804 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList());
(...skipping 23 matching lines...) Expand all
2889 if (_uriEnd != null && _uriEnd != 0) { 2828 if (_uriEnd != null && _uriEnd != 0) {
2890 fbBuilder.addInt32(7, _uriEnd); 2829 fbBuilder.addInt32(7, _uriEnd);
2891 } 2830 }
2892 if (_prefixOffset != null && _prefixOffset != 0) { 2831 if (_prefixOffset != null && _prefixOffset != 0) {
2893 fbBuilder.addInt32(8, _prefixOffset); 2832 fbBuilder.addInt32(8, _prefixOffset);
2894 } 2833 }
2895 return fbBuilder.endTable(); 2834 return fbBuilder.endTable();
2896 } 2835 }
2897 } 2836 }
2898 2837
2899 UnlinkedImportBuilder encodeUnlinkedImport({String uri, int offset, int prefixRe ference, List<UnlinkedCombinatorBuilder> combinators, bool isDeferred, bool isIm plicit, int uriOffset, int uriEnd, int prefixOffset}) {
2900 UnlinkedImportBuilder builder = new UnlinkedImportBuilder();
2901 builder.uri = uri;
2902 builder.offset = offset;
2903 builder.prefixReference = prefixReference;
2904 builder.combinators = combinators;
2905 builder.isDeferred = isDeferred;
2906 builder.isImplicit = isImplicit;
2907 builder.uriOffset = uriOffset;
2908 builder.uriEnd = uriEnd;
2909 builder.prefixOffset = prefixOffset;
2910 return builder;
2911 }
2912
2913 /** 2838 /**
2914 * Unlinked summary information about an import declaration. 2839 * Unlinked summary information about an import declaration.
2915 */ 2840 */
2916 abstract class UnlinkedImport extends base.SummaryClass { 2841 abstract class UnlinkedImport extends base.SummaryClass {
2917 2842
2918 /** 2843 /**
2919 * URI used in the source code to reference the imported library. 2844 * URI used in the source code to reference the imported library.
2920 */ 2845 */
2921 String get uri; 2846 String get uri;
2922 2847
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
3065 2990
3066 String _name; 2991 String _name;
3067 int _nameOffset; 2992 int _nameOffset;
3068 UnlinkedTypeRefBuilder _type; 2993 UnlinkedTypeRefBuilder _type;
3069 List<UnlinkedParamBuilder> _parameters; 2994 List<UnlinkedParamBuilder> _parameters;
3070 UnlinkedParamKind _kind; 2995 UnlinkedParamKind _kind;
3071 bool _isFunctionTyped; 2996 bool _isFunctionTyped;
3072 bool _isInitializingFormal; 2997 bool _isInitializingFormal;
3073 bool _hasImplicitType; 2998 bool _hasImplicitType;
3074 2999
3075 UnlinkedParamBuilder();
3076
3077 @override 3000 @override
3078 String get name => _name ?? ''; 3001 String get name => _name ?? '';
3079 3002
3080 /** 3003 /**
3081 * Name of the parameter. 3004 * Name of the parameter.
3082 */ 3005 */
3083 void set name(String _value) { 3006 void set name(String _value) {
3084 assert(!_finished); 3007 assert(!_finished);
3085 _name = _value; 3008 _name = _value;
3086 } 3009 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
3161 3084
3162 /** 3085 /**
3163 * Indicates whether this parameter lacks an explicit type declaration. 3086 * Indicates whether this parameter lacks an explicit type declaration.
3164 * Always false for a function-typed parameter. 3087 * Always false for a function-typed parameter.
3165 */ 3088 */
3166 void set hasImplicitType(bool _value) { 3089 void set hasImplicitType(bool _value) {
3167 assert(!_finished); 3090 assert(!_finished);
3168 _hasImplicitType = _value; 3091 _hasImplicitType = _value;
3169 } 3092 }
3170 3093
3094 UnlinkedParamBuilder({String name, int nameOffset, UnlinkedTypeRefBuilder type , List<UnlinkedParamBuilder> parameters, UnlinkedParamKind kind, bool isFunction Typed, bool isInitializingFormal, bool hasImplicitType})
3095 : _name = name,
3096 _nameOffset = nameOffset,
3097 _type = type,
3098 _parameters = parameters,
3099 _kind = kind,
3100 _isFunctionTyped = isFunctionTyped,
3101 _isInitializingFormal = isInitializingFormal,
3102 _hasImplicitType = hasImplicitType;
3103
3171 fb.Offset finish(fb.Builder fbBuilder) { 3104 fb.Offset finish(fb.Builder fbBuilder) {
3172 assert(!_finished); 3105 assert(!_finished);
3173 _finished = true; 3106 _finished = true;
3174 fb.Offset offset_name; 3107 fb.Offset offset_name;
3175 fb.Offset offset_type; 3108 fb.Offset offset_type;
3176 fb.Offset offset_parameters; 3109 fb.Offset offset_parameters;
3177 if (_name != null) { 3110 if (_name != null) {
3178 offset_name = fbBuilder.writeString(_name); 3111 offset_name = fbBuilder.writeString(_name);
3179 } 3112 }
3180 if (_type != null) { 3113 if (_type != null) {
(...skipping 24 matching lines...) Expand all
3205 if (_isInitializingFormal == true) { 3138 if (_isInitializingFormal == true) {
3206 fbBuilder.addBool(6, true); 3139 fbBuilder.addBool(6, true);
3207 } 3140 }
3208 if (_hasImplicitType == true) { 3141 if (_hasImplicitType == true) {
3209 fbBuilder.addBool(7, true); 3142 fbBuilder.addBool(7, true);
3210 } 3143 }
3211 return fbBuilder.endTable(); 3144 return fbBuilder.endTable();
3212 } 3145 }
3213 } 3146 }
3214 3147
3215 UnlinkedParamBuilder encodeUnlinkedParam({String name, int nameOffset, UnlinkedT ypeRefBuilder type, List<UnlinkedParamBuilder> parameters, UnlinkedParamKind kin d, bool isFunctionTyped, bool isInitializingFormal, bool hasImplicitType}) {
3216 UnlinkedParamBuilder builder = new UnlinkedParamBuilder();
3217 builder.name = name;
3218 builder.nameOffset = nameOffset;
3219 builder.type = type;
3220 builder.parameters = parameters;
3221 builder.kind = kind;
3222 builder.isFunctionTyped = isFunctionTyped;
3223 builder.isInitializingFormal = isInitializingFormal;
3224 builder.hasImplicitType = hasImplicitType;
3225 return builder;
3226 }
3227
3228 /** 3148 /**
3229 * Unlinked summary information about a function parameter. 3149 * Unlinked summary information about a function parameter.
3230 */ 3150 */
3231 abstract class UnlinkedParam extends base.SummaryClass { 3151 abstract class UnlinkedParam extends base.SummaryClass {
3232 3152
3233 /** 3153 /**
3234 * Name of the parameter. 3154 * Name of the parameter.
3235 */ 3155 */
3236 String get name; 3156 String get name;
3237 3157
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
3360 "hasImplicitType": hasImplicitType, 3280 "hasImplicitType": hasImplicitType,
3361 }; 3281 };
3362 } 3282 }
3363 3283
3364 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements Unli nkedPart { 3284 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements Unli nkedPart {
3365 bool _finished = false; 3285 bool _finished = false;
3366 3286
3367 int _uriOffset; 3287 int _uriOffset;
3368 int _uriEnd; 3288 int _uriEnd;
3369 3289
3370 UnlinkedPartBuilder();
3371
3372 @override 3290 @override
3373 int get uriOffset => _uriOffset ?? 0; 3291 int get uriOffset => _uriOffset ?? 0;
3374 3292
3375 /** 3293 /**
3376 * Offset of the URI string (including quotes) relative to the beginning of 3294 * Offset of the URI string (including quotes) relative to the beginning of
3377 * the file. 3295 * the file.
3378 */ 3296 */
3379 void set uriOffset(int _value) { 3297 void set uriOffset(int _value) {
3380 assert(!_finished); 3298 assert(!_finished);
3381 _uriOffset = _value; 3299 _uriOffset = _value;
3382 } 3300 }
3383 3301
3384 @override 3302 @override
3385 int get uriEnd => _uriEnd ?? 0; 3303 int get uriEnd => _uriEnd ?? 0;
3386 3304
3387 /** 3305 /**
3388 * End of the URI string (including quotes) relative to the beginning of the 3306 * End of the URI string (including quotes) relative to the beginning of the
3389 * file. 3307 * file.
3390 */ 3308 */
3391 void set uriEnd(int _value) { 3309 void set uriEnd(int _value) {
3392 assert(!_finished); 3310 assert(!_finished);
3393 _uriEnd = _value; 3311 _uriEnd = _value;
3394 } 3312 }
3395 3313
3314 UnlinkedPartBuilder({int uriOffset, int uriEnd})
3315 : _uriOffset = uriOffset,
3316 _uriEnd = uriEnd;
3317
3396 fb.Offset finish(fb.Builder fbBuilder) { 3318 fb.Offset finish(fb.Builder fbBuilder) {
3397 assert(!_finished); 3319 assert(!_finished);
3398 _finished = true; 3320 _finished = true;
3399 fbBuilder.startTable(); 3321 fbBuilder.startTable();
3400 if (_uriOffset != null && _uriOffset != 0) { 3322 if (_uriOffset != null && _uriOffset != 0) {
3401 fbBuilder.addInt32(0, _uriOffset); 3323 fbBuilder.addInt32(0, _uriOffset);
3402 } 3324 }
3403 if (_uriEnd != null && _uriEnd != 0) { 3325 if (_uriEnd != null && _uriEnd != 0) {
3404 fbBuilder.addInt32(1, _uriEnd); 3326 fbBuilder.addInt32(1, _uriEnd);
3405 } 3327 }
3406 return fbBuilder.endTable(); 3328 return fbBuilder.endTable();
3407 } 3329 }
3408 } 3330 }
3409 3331
3410 UnlinkedPartBuilder encodeUnlinkedPart({int uriOffset, int uriEnd}) {
3411 UnlinkedPartBuilder builder = new UnlinkedPartBuilder();
3412 builder.uriOffset = uriOffset;
3413 builder.uriEnd = uriEnd;
3414 return builder;
3415 }
3416
3417 /** 3332 /**
3418 * Unlinked summary information about a part declaration. 3333 * Unlinked summary information about a part declaration.
3419 */ 3334 */
3420 abstract class UnlinkedPart extends base.SummaryClass { 3335 abstract class UnlinkedPart extends base.SummaryClass {
3421 3336
3422 /** 3337 /**
3423 * Offset of the URI string (including quotes) relative to the beginning of 3338 * Offset of the URI string (including quotes) relative to the beginning of
3424 * the file. 3339 * the file.
3425 */ 3340 */
3426 int get uriOffset; 3341 int get uriOffset;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
3468 }; 3383 };
3469 } 3384 }
3470 3385
3471 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp lements UnlinkedPublicName { 3386 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp lements UnlinkedPublicName {
3472 bool _finished = false; 3387 bool _finished = false;
3473 3388
3474 String _name; 3389 String _name;
3475 PrelinkedReferenceKind _kind; 3390 PrelinkedReferenceKind _kind;
3476 int _numTypeParameters; 3391 int _numTypeParameters;
3477 3392
3478 UnlinkedPublicNameBuilder();
3479
3480 @override 3393 @override
3481 String get name => _name ?? ''; 3394 String get name => _name ?? '';
3482 3395
3483 /** 3396 /**
3484 * The name itself. 3397 * The name itself.
3485 */ 3398 */
3486 void set name(String _value) { 3399 void set name(String _value) {
3487 assert(!_finished); 3400 assert(!_finished);
3488 _name = _value; 3401 _name = _value;
3489 } 3402 }
(...skipping 14 matching lines...) Expand all
3504 3417
3505 /** 3418 /**
3506 * If the entity being referred to is generic, the number of type parameters 3419 * If the entity being referred to is generic, the number of type parameters
3507 * it accepts. Otherwise zero. 3420 * it accepts. Otherwise zero.
3508 */ 3421 */
3509 void set numTypeParameters(int _value) { 3422 void set numTypeParameters(int _value) {
3510 assert(!_finished); 3423 assert(!_finished);
3511 _numTypeParameters = _value; 3424 _numTypeParameters = _value;
3512 } 3425 }
3513 3426
3427 UnlinkedPublicNameBuilder({String name, PrelinkedReferenceKind kind, int numTy peParameters})
3428 : _name = name,
3429 _kind = kind,
3430 _numTypeParameters = numTypeParameters;
3431
3514 fb.Offset finish(fb.Builder fbBuilder) { 3432 fb.Offset finish(fb.Builder fbBuilder) {
3515 assert(!_finished); 3433 assert(!_finished);
3516 _finished = true; 3434 _finished = true;
3517 fb.Offset offset_name; 3435 fb.Offset offset_name;
3518 if (_name != null) { 3436 if (_name != null) {
3519 offset_name = fbBuilder.writeString(_name); 3437 offset_name = fbBuilder.writeString(_name);
3520 } 3438 }
3521 fbBuilder.startTable(); 3439 fbBuilder.startTable();
3522 if (offset_name != null) { 3440 if (offset_name != null) {
3523 fbBuilder.addOffset(0, offset_name); 3441 fbBuilder.addOffset(0, offset_name);
3524 } 3442 }
3525 if (_kind != null && _kind != PrelinkedReferenceKind.classOrEnum) { 3443 if (_kind != null && _kind != PrelinkedReferenceKind.classOrEnum) {
3526 fbBuilder.addInt32(1, _kind.index); 3444 fbBuilder.addInt32(1, _kind.index);
3527 } 3445 }
3528 if (_numTypeParameters != null && _numTypeParameters != 0) { 3446 if (_numTypeParameters != null && _numTypeParameters != 0) {
3529 fbBuilder.addInt32(2, _numTypeParameters); 3447 fbBuilder.addInt32(2, _numTypeParameters);
3530 } 3448 }
3531 return fbBuilder.endTable(); 3449 return fbBuilder.endTable();
3532 } 3450 }
3533 } 3451 }
3534 3452
3535 UnlinkedPublicNameBuilder encodeUnlinkedPublicName({String name, PrelinkedRefere nceKind kind, int numTypeParameters}) {
3536 UnlinkedPublicNameBuilder builder = new UnlinkedPublicNameBuilder();
3537 builder.name = name;
3538 builder.kind = kind;
3539 builder.numTypeParameters = numTypeParameters;
3540 return builder;
3541 }
3542
3543 /** 3453 /**
3544 * Unlinked summary information about a specific name contributed by a 3454 * Unlinked summary information about a specific name contributed by a
3545 * compilation unit to a library's public namespace. 3455 * compilation unit to a library's public namespace.
3546 * 3456 *
3547 * TODO(paulberry): add a count of generic parameters, so that resynthesis 3457 * TODO(paulberry): add a count of generic parameters, so that resynthesis
3548 * doesn't have to peek into the library to obtain this info. 3458 * doesn't have to peek into the library to obtain this info.
3549 * 3459 *
3550 * TODO(paulberry): for classes, add info about static members and 3460 * TODO(paulberry): for classes, add info about static members and
3551 * constructors, since this will be needed to prelink info about constants. 3461 * constructors, since this will be needed to prelink info about constants.
3552 * 3462 *
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
3617 }; 3527 };
3618 } 3528 }
3619 3529
3620 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac eMixin implements UnlinkedPublicNamespace { 3530 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac eMixin implements UnlinkedPublicNamespace {
3621 bool _finished = false; 3531 bool _finished = false;
3622 3532
3623 List<UnlinkedPublicNameBuilder> _names; 3533 List<UnlinkedPublicNameBuilder> _names;
3624 List<UnlinkedExportPublicBuilder> _exports; 3534 List<UnlinkedExportPublicBuilder> _exports;
3625 List<String> _parts; 3535 List<String> _parts;
3626 3536
3627 UnlinkedPublicNamespaceBuilder();
3628
3629 @override 3537 @override
3630 List<UnlinkedPublicName> get names => _names ?? const <UnlinkedPublicName>[]; 3538 List<UnlinkedPublicName> get names => _names ?? const <UnlinkedPublicName>[];
3631 3539
3632 /** 3540 /**
3633 * Public names defined in the compilation unit. 3541 * Public names defined in the compilation unit.
3634 * 3542 *
3635 * TODO(paulberry): consider sorting these names to reduce unnecessary 3543 * TODO(paulberry): consider sorting these names to reduce unnecessary
3636 * relinking. 3544 * relinking.
3637 */ 3545 */
3638 void set names(List<UnlinkedPublicNameBuilder> _value) { 3546 void set names(List<UnlinkedPublicNameBuilder> _value) {
(...skipping 16 matching lines...) Expand all
3655 List<String> get parts => _parts ?? const <String>[]; 3563 List<String> get parts => _parts ?? const <String>[];
3656 3564
3657 /** 3565 /**
3658 * URIs referenced by part declarations in the compilation unit. 3566 * URIs referenced by part declarations in the compilation unit.
3659 */ 3567 */
3660 void set parts(List<String> _value) { 3568 void set parts(List<String> _value) {
3661 assert(!_finished); 3569 assert(!_finished);
3662 _parts = _value; 3570 _parts = _value;
3663 } 3571 }
3664 3572
3573 UnlinkedPublicNamespaceBuilder({List<UnlinkedPublicNameBuilder> names, List<Un linkedExportPublicBuilder> exports, List<String> parts})
3574 : _names = names,
3575 _exports = exports,
3576 _parts = parts;
3577
3665 List<int> toBuffer() { 3578 List<int> toBuffer() {
3666 fb.Builder fbBuilder = new fb.Builder(); 3579 fb.Builder fbBuilder = new fb.Builder();
3667 return fbBuilder.finish(finish(fbBuilder)); 3580 return fbBuilder.finish(finish(fbBuilder));
3668 } 3581 }
3669 3582
3670 fb.Offset finish(fb.Builder fbBuilder) { 3583 fb.Offset finish(fb.Builder fbBuilder) {
3671 assert(!_finished); 3584 assert(!_finished);
3672 _finished = true; 3585 _finished = true;
3673 fb.Offset offset_names; 3586 fb.Offset offset_names;
3674 fb.Offset offset_exports; 3587 fb.Offset offset_exports;
(...skipping 14 matching lines...) Expand all
3689 if (offset_exports != null) { 3602 if (offset_exports != null) {
3690 fbBuilder.addOffset(1, offset_exports); 3603 fbBuilder.addOffset(1, offset_exports);
3691 } 3604 }
3692 if (offset_parts != null) { 3605 if (offset_parts != null) {
3693 fbBuilder.addOffset(2, offset_parts); 3606 fbBuilder.addOffset(2, offset_parts);
3694 } 3607 }
3695 return fbBuilder.endTable(); 3608 return fbBuilder.endTable();
3696 } 3609 }
3697 } 3610 }
3698 3611
3699 UnlinkedPublicNamespaceBuilder encodeUnlinkedPublicNamespace({List<UnlinkedPubli cNameBuilder> names, List<UnlinkedExportPublicBuilder> exports, List<String> par ts}) {
3700 UnlinkedPublicNamespaceBuilder builder = new UnlinkedPublicNamespaceBuilder();
3701 builder.names = names;
3702 builder.exports = exports;
3703 builder.parts = parts;
3704 return builder;
3705 }
3706
3707 /** 3612 /**
3708 * Unlinked summary information about what a compilation unit contributes to a 3613 * Unlinked summary information about what a compilation unit contributes to a
3709 * library's public namespace. This is the subset of [UnlinkedUnit] that is 3614 * library's public namespace. This is the subset of [UnlinkedUnit] that is
3710 * required from dependent libraries in order to perform prelinking. 3615 * required from dependent libraries in order to perform prelinking.
3711 */ 3616 */
3712 abstract class UnlinkedPublicNamespace extends base.SummaryClass { 3617 abstract class UnlinkedPublicNamespace extends base.SummaryClass {
3713 factory UnlinkedPublicNamespace.fromBuffer(List<int> buffer) { 3618 factory UnlinkedPublicNamespace.fromBuffer(List<int> buffer) {
3714 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 3619 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
3715 return const _UnlinkedPublicNamespaceReader().read(rootRef); 3620 return const _UnlinkedPublicNamespaceReader().read(rootRef);
3716 } 3621 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3777 "parts": parts, 3682 "parts": parts,
3778 }; 3683 };
3779 } 3684 }
3780 3685
3781 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple ments UnlinkedReference { 3686 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple ments UnlinkedReference {
3782 bool _finished = false; 3687 bool _finished = false;
3783 3688
3784 String _name; 3689 String _name;
3785 int _prefixReference; 3690 int _prefixReference;
3786 3691
3787 UnlinkedReferenceBuilder();
3788
3789 @override 3692 @override
3790 String get name => _name ?? ''; 3693 String get name => _name ?? '';
3791 3694
3792 /** 3695 /**
3793 * Name of the entity being referred to. The empty string refers to the 3696 * Name of the entity being referred to. The empty string refers to the
3794 * pseudo-type `dynamic`. 3697 * pseudo-type `dynamic`.
3795 */ 3698 */
3796 void set name(String _value) { 3699 void set name(String _value) {
3797 assert(!_finished); 3700 assert(!_finished);
3798 _name = _value; 3701 _name = _value;
3799 } 3702 }
3800 3703
3801 @override 3704 @override
3802 int get prefixReference => _prefixReference ?? 0; 3705 int get prefixReference => _prefixReference ?? 0;
3803 3706
3804 /** 3707 /**
3805 * Prefix used to refer to the entity, or zero if no prefix is used. This is 3708 * Prefix used to refer to the entity, or zero if no prefix is used. This is
3806 * an index into [UnlinkedUnit.references]. 3709 * an index into [UnlinkedUnit.references].
3807 * 3710 *
3808 * Prefix references must always point backward; that is, for all i, if 3711 * Prefix references must always point backward; that is, for all i, if
3809 * UnlinkedUnit.references[i].prefixReference != 0, then 3712 * UnlinkedUnit.references[i].prefixReference != 0, then
3810 * UnlinkedUnit.references[i].prefixReference < i. 3713 * UnlinkedUnit.references[i].prefixReference < i.
3811 */ 3714 */
3812 void set prefixReference(int _value) { 3715 void set prefixReference(int _value) {
3813 assert(!_finished); 3716 assert(!_finished);
3814 _prefixReference = _value; 3717 _prefixReference = _value;
3815 } 3718 }
3816 3719
3720 UnlinkedReferenceBuilder({String name, int prefixReference})
3721 : _name = name,
3722 _prefixReference = prefixReference;
3723
3817 fb.Offset finish(fb.Builder fbBuilder) { 3724 fb.Offset finish(fb.Builder fbBuilder) {
3818 assert(!_finished); 3725 assert(!_finished);
3819 _finished = true; 3726 _finished = true;
3820 fb.Offset offset_name; 3727 fb.Offset offset_name;
3821 if (_name != null) { 3728 if (_name != null) {
3822 offset_name = fbBuilder.writeString(_name); 3729 offset_name = fbBuilder.writeString(_name);
3823 } 3730 }
3824 fbBuilder.startTable(); 3731 fbBuilder.startTable();
3825 if (offset_name != null) { 3732 if (offset_name != null) {
3826 fbBuilder.addOffset(0, offset_name); 3733 fbBuilder.addOffset(0, offset_name);
3827 } 3734 }
3828 if (_prefixReference != null && _prefixReference != 0) { 3735 if (_prefixReference != null && _prefixReference != 0) {
3829 fbBuilder.addInt32(1, _prefixReference); 3736 fbBuilder.addInt32(1, _prefixReference);
3830 } 3737 }
3831 return fbBuilder.endTable(); 3738 return fbBuilder.endTable();
3832 } 3739 }
3833 } 3740 }
3834 3741
3835 UnlinkedReferenceBuilder encodeUnlinkedReference({String name, int prefixReferen ce}) {
3836 UnlinkedReferenceBuilder builder = new UnlinkedReferenceBuilder();
3837 builder.name = name;
3838 builder.prefixReference = prefixReference;
3839 return builder;
3840 }
3841
3842 /** 3742 /**
3843 * Unlinked summary information about a name referred to in one library that 3743 * Unlinked summary information about a name referred to in one library that
3844 * might be defined in another. 3744 * might be defined in another.
3845 */ 3745 */
3846 abstract class UnlinkedReference extends base.SummaryClass { 3746 abstract class UnlinkedReference extends base.SummaryClass {
3847 3747
3848 /** 3748 /**
3849 * Name of the entity being referred to. The empty string refers to the 3749 * Name of the entity being referred to. The empty string refers to the
3850 * pseudo-type `dynamic`. 3750 * pseudo-type `dynamic`.
3851 */ 3751 */
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3901 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement s UnlinkedTypedef { 3801 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement s UnlinkedTypedef {
3902 bool _finished = false; 3802 bool _finished = false;
3903 3803
3904 String _name; 3804 String _name;
3905 int _nameOffset; 3805 int _nameOffset;
3906 UnlinkedDocumentationCommentBuilder _documentationComment; 3806 UnlinkedDocumentationCommentBuilder _documentationComment;
3907 List<UnlinkedTypeParamBuilder> _typeParameters; 3807 List<UnlinkedTypeParamBuilder> _typeParameters;
3908 UnlinkedTypeRefBuilder _returnType; 3808 UnlinkedTypeRefBuilder _returnType;
3909 List<UnlinkedParamBuilder> _parameters; 3809 List<UnlinkedParamBuilder> _parameters;
3910 3810
3911 UnlinkedTypedefBuilder();
3912
3913 @override 3811 @override
3914 String get name => _name ?? ''; 3812 String get name => _name ?? '';
3915 3813
3916 /** 3814 /**
3917 * Name of the typedef. 3815 * Name of the typedef.
3918 */ 3816 */
3919 void set name(String _value) { 3817 void set name(String _value) {
3920 assert(!_finished); 3818 assert(!_finished);
3921 _name = _value; 3819 _name = _value;
3922 } 3820 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[]; 3868 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[];
3971 3869
3972 /** 3870 /**
3973 * Parameters of the executable, if any. 3871 * Parameters of the executable, if any.
3974 */ 3872 */
3975 void set parameters(List<UnlinkedParamBuilder> _value) { 3873 void set parameters(List<UnlinkedParamBuilder> _value) {
3976 assert(!_finished); 3874 assert(!_finished);
3977 _parameters = _value; 3875 _parameters = _value;
3978 } 3876 }
3979 3877
3878 UnlinkedTypedefBuilder({String name, int nameOffset, UnlinkedDocumentationComm entBuilder documentationComment, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedTypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters})
3879 : _name = name,
3880 _nameOffset = nameOffset,
3881 _documentationComment = documentationComment,
3882 _typeParameters = typeParameters,
3883 _returnType = returnType,
3884 _parameters = parameters;
3885
3980 fb.Offset finish(fb.Builder fbBuilder) { 3886 fb.Offset finish(fb.Builder fbBuilder) {
3981 assert(!_finished); 3887 assert(!_finished);
3982 _finished = true; 3888 _finished = true;
3983 fb.Offset offset_name; 3889 fb.Offset offset_name;
3984 fb.Offset offset_documentationComment; 3890 fb.Offset offset_documentationComment;
3985 fb.Offset offset_typeParameters; 3891 fb.Offset offset_typeParameters;
3986 fb.Offset offset_returnType; 3892 fb.Offset offset_returnType;
3987 fb.Offset offset_parameters; 3893 fb.Offset offset_parameters;
3988 if (_name != null) { 3894 if (_name != null) {
3989 offset_name = fbBuilder.writeString(_name); 3895 offset_name = fbBuilder.writeString(_name);
(...skipping 26 matching lines...) Expand all
4016 if (offset_returnType != null) { 3922 if (offset_returnType != null) {
4017 fbBuilder.addOffset(4, offset_returnType); 3923 fbBuilder.addOffset(4, offset_returnType);
4018 } 3924 }
4019 if (offset_parameters != null) { 3925 if (offset_parameters != null) {
4020 fbBuilder.addOffset(5, offset_parameters); 3926 fbBuilder.addOffset(5, offset_parameters);
4021 } 3927 }
4022 return fbBuilder.endTable(); 3928 return fbBuilder.endTable();
4023 } 3929 }
4024 } 3930 }
4025 3931
4026 UnlinkedTypedefBuilder encodeUnlinkedTypedef({String name, int nameOffset, Unlin kedDocumentationCommentBuilder documentationComment, List<UnlinkedTypeParamBuild er> typeParameters, UnlinkedTypeRefBuilder returnType, List<UnlinkedParamBuilder > parameters}) {
4027 UnlinkedTypedefBuilder builder = new UnlinkedTypedefBuilder();
4028 builder.name = name;
4029 builder.nameOffset = nameOffset;
4030 builder.documentationComment = documentationComment;
4031 builder.typeParameters = typeParameters;
4032 builder.returnType = returnType;
4033 builder.parameters = parameters;
4034 return builder;
4035 }
4036
4037 /** 3932 /**
4038 * Unlinked summary information about a typedef declaration. 3933 * Unlinked summary information about a typedef declaration.
4039 */ 3934 */
4040 abstract class UnlinkedTypedef extends base.SummaryClass { 3935 abstract class UnlinkedTypedef extends base.SummaryClass {
4041 3936
4042 /** 3937 /**
4043 * Name of the typedef. 3938 * Name of the typedef.
4044 */ 3939 */
4045 String get name; 3940 String get name;
4046 3941
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
4139 }; 4034 };
4140 } 4035 }
4141 4036
4142 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple ments UnlinkedTypeParam { 4037 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple ments UnlinkedTypeParam {
4143 bool _finished = false; 4038 bool _finished = false;
4144 4039
4145 String _name; 4040 String _name;
4146 int _nameOffset; 4041 int _nameOffset;
4147 UnlinkedTypeRefBuilder _bound; 4042 UnlinkedTypeRefBuilder _bound;
4148 4043
4149 UnlinkedTypeParamBuilder();
4150
4151 @override 4044 @override
4152 String get name => _name ?? ''; 4045 String get name => _name ?? '';
4153 4046
4154 /** 4047 /**
4155 * Name of the type parameter. 4048 * Name of the type parameter.
4156 */ 4049 */
4157 void set name(String _value) { 4050 void set name(String _value) {
4158 assert(!_finished); 4051 assert(!_finished);
4159 _name = _value; 4052 _name = _value;
4160 } 4053 }
(...skipping 14 matching lines...) Expand all
4175 4068
4176 /** 4069 /**
4177 * Bound of the type parameter, if a bound is explicitly declared. Otherwise 4070 * Bound of the type parameter, if a bound is explicitly declared. Otherwise
4178 * null. 4071 * null.
4179 */ 4072 */
4180 void set bound(UnlinkedTypeRefBuilder _value) { 4073 void set bound(UnlinkedTypeRefBuilder _value) {
4181 assert(!_finished); 4074 assert(!_finished);
4182 _bound = _value; 4075 _bound = _value;
4183 } 4076 }
4184 4077
4078 UnlinkedTypeParamBuilder({String name, int nameOffset, UnlinkedTypeRefBuilder bound})
4079 : _name = name,
4080 _nameOffset = nameOffset,
4081 _bound = bound;
4082
4185 fb.Offset finish(fb.Builder fbBuilder) { 4083 fb.Offset finish(fb.Builder fbBuilder) {
4186 assert(!_finished); 4084 assert(!_finished);
4187 _finished = true; 4085 _finished = true;
4188 fb.Offset offset_name; 4086 fb.Offset offset_name;
4189 fb.Offset offset_bound; 4087 fb.Offset offset_bound;
4190 if (_name != null) { 4088 if (_name != null) {
4191 offset_name = fbBuilder.writeString(_name); 4089 offset_name = fbBuilder.writeString(_name);
4192 } 4090 }
4193 if (_bound != null) { 4091 if (_bound != null) {
4194 offset_bound = _bound.finish(fbBuilder); 4092 offset_bound = _bound.finish(fbBuilder);
4195 } 4093 }
4196 fbBuilder.startTable(); 4094 fbBuilder.startTable();
4197 if (offset_name != null) { 4095 if (offset_name != null) {
4198 fbBuilder.addOffset(0, offset_name); 4096 fbBuilder.addOffset(0, offset_name);
4199 } 4097 }
4200 if (_nameOffset != null && _nameOffset != 0) { 4098 if (_nameOffset != null && _nameOffset != 0) {
4201 fbBuilder.addInt32(1, _nameOffset); 4099 fbBuilder.addInt32(1, _nameOffset);
4202 } 4100 }
4203 if (offset_bound != null) { 4101 if (offset_bound != null) {
4204 fbBuilder.addOffset(2, offset_bound); 4102 fbBuilder.addOffset(2, offset_bound);
4205 } 4103 }
4206 return fbBuilder.endTable(); 4104 return fbBuilder.endTable();
4207 } 4105 }
4208 } 4106 }
4209 4107
4210 UnlinkedTypeParamBuilder encodeUnlinkedTypeParam({String name, int nameOffset, U nlinkedTypeRefBuilder bound}) {
4211 UnlinkedTypeParamBuilder builder = new UnlinkedTypeParamBuilder();
4212 builder.name = name;
4213 builder.nameOffset = nameOffset;
4214 builder.bound = bound;
4215 return builder;
4216 }
4217
4218 /** 4108 /**
4219 * Unlinked summary information about a type parameter declaration. 4109 * Unlinked summary information about a type parameter declaration.
4220 */ 4110 */
4221 abstract class UnlinkedTypeParam extends base.SummaryClass { 4111 abstract class UnlinkedTypeParam extends base.SummaryClass {
4222 4112
4223 /** 4113 /**
4224 * Name of the type parameter. 4114 * Name of the type parameter.
4225 */ 4115 */
4226 String get name; 4116 String get name;
4227 4117
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
4281 }; 4171 };
4282 } 4172 }
4283 4173
4284 class UnlinkedTypeRefBuilder extends Object with _UnlinkedTypeRefMixin implement s UnlinkedTypeRef { 4174 class UnlinkedTypeRefBuilder extends Object with _UnlinkedTypeRefMixin implement s UnlinkedTypeRef {
4285 bool _finished = false; 4175 bool _finished = false;
4286 4176
4287 int _reference; 4177 int _reference;
4288 int _paramReference; 4178 int _paramReference;
4289 List<UnlinkedTypeRefBuilder> _typeArguments; 4179 List<UnlinkedTypeRefBuilder> _typeArguments;
4290 4180
4291 UnlinkedTypeRefBuilder();
4292
4293 @override 4181 @override
4294 int get reference => _reference ?? 0; 4182 int get reference => _reference ?? 0;
4295 4183
4296 /** 4184 /**
4297 * Index into [UnlinkedUnit.references] for the type being referred to, or 4185 * Index into [UnlinkedUnit.references] for the type being referred to, or
4298 * zero if this is a reference to a type parameter. 4186 * zero if this is a reference to a type parameter.
4299 * 4187 *
4300 * Note that since zero is also a valid index into 4188 * Note that since zero is also a valid index into
4301 * [UnlinkedUnit.references], we cannot distinguish between references to 4189 * [UnlinkedUnit.references], we cannot distinguish between references to
4302 * type parameters and references to types by checking [reference] against 4190 * type parameters and references to types by checking [reference] against
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
4340 4228
4341 /** 4229 /**
4342 * If this is an instantiation of a generic type, the type arguments used to 4230 * If this is an instantiation of a generic type, the type arguments used to
4343 * instantiate it. Trailing type arguments of type `dynamic` are omitted. 4231 * instantiate it. Trailing type arguments of type `dynamic` are omitted.
4344 */ 4232 */
4345 void set typeArguments(List<UnlinkedTypeRefBuilder> _value) { 4233 void set typeArguments(List<UnlinkedTypeRefBuilder> _value) {
4346 assert(!_finished); 4234 assert(!_finished);
4347 _typeArguments = _value; 4235 _typeArguments = _value;
4348 } 4236 }
4349 4237
4238 UnlinkedTypeRefBuilder({int reference, int paramReference, List<UnlinkedTypeRe fBuilder> typeArguments})
4239 : _reference = reference,
4240 _paramReference = paramReference,
4241 _typeArguments = typeArguments;
4242
4350 fb.Offset finish(fb.Builder fbBuilder) { 4243 fb.Offset finish(fb.Builder fbBuilder) {
4351 assert(!_finished); 4244 assert(!_finished);
4352 _finished = true; 4245 _finished = true;
4353 fb.Offset offset_typeArguments; 4246 fb.Offset offset_typeArguments;
4354 if (!(_typeArguments == null || _typeArguments.isEmpty)) { 4247 if (!(_typeArguments == null || _typeArguments.isEmpty)) {
4355 offset_typeArguments = fbBuilder.writeList(_typeArguments.map((b) => b.fin ish(fbBuilder)).toList()); 4248 offset_typeArguments = fbBuilder.writeList(_typeArguments.map((b) => b.fin ish(fbBuilder)).toList());
4356 } 4249 }
4357 fbBuilder.startTable(); 4250 fbBuilder.startTable();
4358 if (_reference != null && _reference != 0) { 4251 if (_reference != null && _reference != 0) {
4359 fbBuilder.addInt32(0, _reference); 4252 fbBuilder.addInt32(0, _reference);
4360 } 4253 }
4361 if (_paramReference != null && _paramReference != 0) { 4254 if (_paramReference != null && _paramReference != 0) {
4362 fbBuilder.addInt32(1, _paramReference); 4255 fbBuilder.addInt32(1, _paramReference);
4363 } 4256 }
4364 if (offset_typeArguments != null) { 4257 if (offset_typeArguments != null) {
4365 fbBuilder.addOffset(2, offset_typeArguments); 4258 fbBuilder.addOffset(2, offset_typeArguments);
4366 } 4259 }
4367 return fbBuilder.endTable(); 4260 return fbBuilder.endTable();
4368 } 4261 }
4369 } 4262 }
4370 4263
4371 UnlinkedTypeRefBuilder encodeUnlinkedTypeRef({int reference, int paramReference, List<UnlinkedTypeRefBuilder> typeArguments}) {
4372 UnlinkedTypeRefBuilder builder = new UnlinkedTypeRefBuilder();
4373 builder.reference = reference;
4374 builder.paramReference = paramReference;
4375 builder.typeArguments = typeArguments;
4376 return builder;
4377 }
4378
4379 /** 4264 /**
4380 * Unlinked summary information about a reference to a type. 4265 * Unlinked summary information about a reference to a type.
4381 */ 4266 */
4382 abstract class UnlinkedTypeRef extends base.SummaryClass { 4267 abstract class UnlinkedTypeRef extends base.SummaryClass {
4383 4268
4384 /** 4269 /**
4385 * Index into [UnlinkedUnit.references] for the type being referred to, or 4270 * Index into [UnlinkedUnit.references] for the type being referred to, or
4386 * zero if this is a reference to a type parameter. 4271 * zero if this is a reference to a type parameter.
4387 * 4272 *
4388 * Note that since zero is also a valid index into 4273 * Note that since zero is also a valid index into
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
4476 List<UnlinkedReferenceBuilder> _references; 4361 List<UnlinkedReferenceBuilder> _references;
4477 List<UnlinkedClassBuilder> _classes; 4362 List<UnlinkedClassBuilder> _classes;
4478 List<UnlinkedEnumBuilder> _enums; 4363 List<UnlinkedEnumBuilder> _enums;
4479 List<UnlinkedExecutableBuilder> _executables; 4364 List<UnlinkedExecutableBuilder> _executables;
4480 List<UnlinkedExportNonPublicBuilder> _exports; 4365 List<UnlinkedExportNonPublicBuilder> _exports;
4481 List<UnlinkedImportBuilder> _imports; 4366 List<UnlinkedImportBuilder> _imports;
4482 List<UnlinkedPartBuilder> _parts; 4367 List<UnlinkedPartBuilder> _parts;
4483 List<UnlinkedTypedefBuilder> _typedefs; 4368 List<UnlinkedTypedefBuilder> _typedefs;
4484 List<UnlinkedVariableBuilder> _variables; 4369 List<UnlinkedVariableBuilder> _variables;
4485 4370
4486 UnlinkedUnitBuilder();
4487
4488 @override 4371 @override
4489 String get libraryName => _libraryName ?? ''; 4372 String get libraryName => _libraryName ?? '';
4490 4373
4491 /** 4374 /**
4492 * Name of the library (from a "library" declaration, if present). 4375 * Name of the library (from a "library" declaration, if present).
4493 */ 4376 */
4494 void set libraryName(String _value) { 4377 void set libraryName(String _value) {
4495 assert(!_finished); 4378 assert(!_finished);
4496 _libraryName = _value; 4379 _libraryName = _value;
4497 } 4380 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4638 List<UnlinkedVariable> get variables => _variables ?? const <UnlinkedVariable> []; 4521 List<UnlinkedVariable> get variables => _variables ?? const <UnlinkedVariable> [];
4639 4522
4640 /** 4523 /**
4641 * Top level variables declared in the compilation unit. 4524 * Top level variables declared in the compilation unit.
4642 */ 4525 */
4643 void set variables(List<UnlinkedVariableBuilder> _value) { 4526 void set variables(List<UnlinkedVariableBuilder> _value) {
4644 assert(!_finished); 4527 assert(!_finished);
4645 _variables = _value; 4528 _variables = _value;
4646 } 4529 }
4647 4530
4531 UnlinkedUnitBuilder({String libraryName, int libraryNameOffset, int libraryNam eLength, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, Unlink edPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder> referen ces, List<UnlinkedClassBuilder> classes, List<UnlinkedEnumBuilder> enums, List<U nlinkedExecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> expo rts, List<UnlinkedImportBuilder> imports, List<UnlinkedPartBuilder> parts, List< UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables})
4532 : _libraryName = libraryName,
4533 _libraryNameOffset = libraryNameOffset,
4534 _libraryNameLength = libraryNameLength,
4535 _libraryDocumentationComment = libraryDocumentationComment,
4536 _publicNamespace = publicNamespace,
4537 _references = references,
4538 _classes = classes,
4539 _enums = enums,
4540 _executables = executables,
4541 _exports = exports,
4542 _imports = imports,
4543 _parts = parts,
4544 _typedefs = typedefs,
4545 _variables = variables;
4546
4648 List<int> toBuffer() { 4547 List<int> toBuffer() {
4649 fb.Builder fbBuilder = new fb.Builder(); 4548 fb.Builder fbBuilder = new fb.Builder();
4650 return fbBuilder.finish(finish(fbBuilder)); 4549 return fbBuilder.finish(finish(fbBuilder));
4651 } 4550 }
4652 4551
4653 fb.Offset finish(fb.Builder fbBuilder) { 4552 fb.Offset finish(fb.Builder fbBuilder) {
4654 assert(!_finished); 4553 assert(!_finished);
4655 _finished = true; 4554 _finished = true;
4656 fb.Offset offset_libraryName; 4555 fb.Offset offset_libraryName;
4657 fb.Offset offset_libraryDocumentationComment; 4556 fb.Offset offset_libraryDocumentationComment;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
4741 if (offset_typedefs != null) { 4640 if (offset_typedefs != null) {
4742 fbBuilder.addOffset(12, offset_typedefs); 4641 fbBuilder.addOffset(12, offset_typedefs);
4743 } 4642 }
4744 if (offset_variables != null) { 4643 if (offset_variables != null) {
4745 fbBuilder.addOffset(13, offset_variables); 4644 fbBuilder.addOffset(13, offset_variables);
4746 } 4645 }
4747 return fbBuilder.endTable(); 4646 return fbBuilder.endTable();
4748 } 4647 }
4749 } 4648 }
4750 4649
4751 UnlinkedUnitBuilder encodeUnlinkedUnit({String libraryName, int libraryNameOffse t, int libraryNameLength, UnlinkedDocumentationCommentBuilder libraryDocumentati onComment, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenc eBuilder> references, List<UnlinkedClassBuilder> classes, List<UnlinkedEnumBuild er> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonPu blicBuilder> exports, List<UnlinkedImportBuilder> imports, List<UnlinkedPartBuil der> parts, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables}) {
4752 UnlinkedUnitBuilder builder = new UnlinkedUnitBuilder();
4753 builder.libraryName = libraryName;
4754 builder.libraryNameOffset = libraryNameOffset;
4755 builder.libraryNameLength = libraryNameLength;
4756 builder.libraryDocumentationComment = libraryDocumentationComment;
4757 builder.publicNamespace = publicNamespace;
4758 builder.references = references;
4759 builder.classes = classes;
4760 builder.enums = enums;
4761 builder.executables = executables;
4762 builder.exports = exports;
4763 builder.imports = imports;
4764 builder.parts = parts;
4765 builder.typedefs = typedefs;
4766 builder.variables = variables;
4767 return builder;
4768 }
4769
4770 /** 4650 /**
4771 * Unlinked summary information about a compilation unit ("part file"). 4651 * Unlinked summary information about a compilation unit ("part file").
4772 */ 4652 */
4773 abstract class UnlinkedUnit extends base.SummaryClass { 4653 abstract class UnlinkedUnit extends base.SummaryClass {
4774 factory UnlinkedUnit.fromBuffer(List<int> buffer) { 4654 factory UnlinkedUnit.fromBuffer(List<int> buffer) {
4775 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 4655 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
4776 return const _UnlinkedUnitReader().read(rootRef); 4656 return const _UnlinkedUnitReader().read(rootRef);
4777 } 4657 }
4778 4658
4779 /** 4659 /**
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
4990 4870
4991 String _name; 4871 String _name;
4992 int _nameOffset; 4872 int _nameOffset;
4993 UnlinkedDocumentationCommentBuilder _documentationComment; 4873 UnlinkedDocumentationCommentBuilder _documentationComment;
4994 UnlinkedTypeRefBuilder _type; 4874 UnlinkedTypeRefBuilder _type;
4995 bool _isStatic; 4875 bool _isStatic;
4996 bool _isFinal; 4876 bool _isFinal;
4997 bool _isConst; 4877 bool _isConst;
4998 bool _hasImplicitType; 4878 bool _hasImplicitType;
4999 4879
5000 UnlinkedVariableBuilder();
5001
5002 @override 4880 @override
5003 String get name => _name ?? ''; 4881 String get name => _name ?? '';
5004 4882
5005 /** 4883 /**
5006 * Name of the variable. 4884 * Name of the variable.
5007 */ 4885 */
5008 void set name(String _value) { 4886 void set name(String _value) {
5009 assert(!_finished); 4887 assert(!_finished);
5010 _name = _value; 4888 _name = _value;
5011 } 4889 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
5086 bool get hasImplicitType => _hasImplicitType ?? false; 4964 bool get hasImplicitType => _hasImplicitType ?? false;
5087 4965
5088 /** 4966 /**
5089 * Indicates whether this variable lacks an explicit type declaration. 4967 * Indicates whether this variable lacks an explicit type declaration.
5090 */ 4968 */
5091 void set hasImplicitType(bool _value) { 4969 void set hasImplicitType(bool _value) {
5092 assert(!_finished); 4970 assert(!_finished);
5093 _hasImplicitType = _value; 4971 _hasImplicitType = _value;
5094 } 4972 }
5095 4973
4974 UnlinkedVariableBuilder({String name, int nameOffset, UnlinkedDocumentationCom mentBuilder documentationComment, UnlinkedTypeRefBuilder type, bool isStatic, bo ol isFinal, bool isConst, bool hasImplicitType})
4975 : _name = name,
4976 _nameOffset = nameOffset,
4977 _documentationComment = documentationComment,
4978 _type = type,
4979 _isStatic = isStatic,
4980 _isFinal = isFinal,
4981 _isConst = isConst,
4982 _hasImplicitType = hasImplicitType;
4983
5096 fb.Offset finish(fb.Builder fbBuilder) { 4984 fb.Offset finish(fb.Builder fbBuilder) {
5097 assert(!_finished); 4985 assert(!_finished);
5098 _finished = true; 4986 _finished = true;
5099 fb.Offset offset_name; 4987 fb.Offset offset_name;
5100 fb.Offset offset_documentationComment; 4988 fb.Offset offset_documentationComment;
5101 fb.Offset offset_type; 4989 fb.Offset offset_type;
5102 if (_name != null) { 4990 if (_name != null) {
5103 offset_name = fbBuilder.writeString(_name); 4991 offset_name = fbBuilder.writeString(_name);
5104 } 4992 }
5105 if (_documentationComment != null) { 4993 if (_documentationComment != null) {
(...skipping 24 matching lines...) Expand all
5130 if (_isConst == true) { 5018 if (_isConst == true) {
5131 fbBuilder.addBool(6, true); 5019 fbBuilder.addBool(6, true);
5132 } 5020 }
5133 if (_hasImplicitType == true) { 5021 if (_hasImplicitType == true) {
5134 fbBuilder.addBool(7, true); 5022 fbBuilder.addBool(7, true);
5135 } 5023 }
5136 return fbBuilder.endTable(); 5024 return fbBuilder.endTable();
5137 } 5025 }
5138 } 5026 }
5139 5027
5140 UnlinkedVariableBuilder encodeUnlinkedVariable({String name, int nameOffset, Unl inkedDocumentationCommentBuilder documentationComment, UnlinkedTypeRefBuilder ty pe, bool isStatic, bool isFinal, bool isConst, bool hasImplicitType}) {
5141 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder();
5142 builder.name = name;
5143 builder.nameOffset = nameOffset;
5144 builder.documentationComment = documentationComment;
5145 builder.type = type;
5146 builder.isStatic = isStatic;
5147 builder.isFinal = isFinal;
5148 builder.isConst = isConst;
5149 builder.hasImplicitType = hasImplicitType;
5150 return builder;
5151 }
5152
5153 /** 5028 /**
5154 * Unlinked summary information about a top level variable, local variable, or 5029 * Unlinked summary information about a top level variable, local variable, or
5155 * a field. 5030 * a field.
5156 */ 5031 */
5157 abstract class UnlinkedVariable extends base.SummaryClass { 5032 abstract class UnlinkedVariable extends base.SummaryClass {
5158 5033
5159 /** 5034 /**
5160 * Name of the variable. 5035 * Name of the variable.
5161 */ 5036 */
5162 String get name; 5037 String get name;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 "nameOffset": nameOffset, 5155 "nameOffset": nameOffset,
5281 "documentationComment": documentationComment, 5156 "documentationComment": documentationComment,
5282 "type": type, 5157 "type": type,
5283 "isStatic": isStatic, 5158 "isStatic": isStatic,
5284 "isFinal": isFinal, 5159 "isFinal": isFinal,
5285 "isConst": isConst, 5160 "isConst": isConst,
5286 "hasImplicitType": hasImplicitType, 5161 "hasImplicitType": hasImplicitType,
5287 }; 5162 };
5288 } 5163 }
5289 5164
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/prelink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698