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

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

Issue 1843473002: Sort analyzer sources (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove generated file and fix misplaced comments Created 4 years, 8 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 | « pkg/analyzer/lib/src/summary/base.dart ('k') | pkg/analyzer/lib/src/summary/idl.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 'dart:convert' as convert;
11
10 import 'flat_buffers.dart' as fb; 12 import 'flat_buffers.dart' as fb;
11 import 'idl.dart' as idl; 13 import 'idl.dart' as idl;
12 import 'dart:convert' as convert;
13 14
14 class _CacheSourceKindReader extends fb.Reader<idl.CacheSourceKind> { 15 idl.CacheSourceContent readCacheSourceContent(List<int> buffer) {
15 const _CacheSourceKindReader() : super(); 16 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
16 17 return const _CacheSourceContentReader().read(rootRef);
17 @override
18 int get size => 1;
19
20 @override
21 idl.CacheSourceKind read(fb.BufferPointer bp) {
22 int index = const fb.Uint8Reader().read(bp);
23 return index < idl.CacheSourceKind.values.length ? idl.CacheSourceKind.value s[index] : idl.CacheSourceKind.library;
24 }
25 } 18 }
26 19
27 class _IndexNameKindReader extends fb.Reader<idl.IndexNameKind> { 20 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) {
28 const _IndexNameKindReader() : super(); 21 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
29 22 return const _LinkedLibraryReader().read(rootRef);
30 @override
31 int get size => 1;
32
33 @override
34 idl.IndexNameKind read(fb.BufferPointer bp) {
35 int index = const fb.Uint8Reader().read(bp);
36 return index < idl.IndexNameKind.values.length ? idl.IndexNameKind.values[in dex] : idl.IndexNameKind.topLevel;
37 }
38 } 23 }
39 24
40 class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> { 25 idl.PackageBundle readPackageBundle(List<int> buffer) {
41 const _IndexRelationKindReader() : super(); 26 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
42 27 return const _PackageBundleReader().read(rootRef);
43 @override
44 int get size => 1;
45
46 @override
47 idl.IndexRelationKind read(fb.BufferPointer bp) {
48 int index = const fb.Uint8Reader().read(bp);
49 return index < idl.IndexRelationKind.values.length ? idl.IndexRelationKind.v alues[index] : idl.IndexRelationKind.IS_ANCESTOR_OF;
50 }
51 } 28 }
52 29
53 class _IndexSyntheticElementKindReader extends fb.Reader<idl.IndexSyntheticEleme ntKind> { 30 idl.PackageIndex readPackageIndex(List<int> buffer) {
54 const _IndexSyntheticElementKindReader() : super(); 31 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
55 32 return const _PackageIndexReader().read(rootRef);
56 @override
57 int get size => 1;
58
59 @override
60 idl.IndexSyntheticElementKind read(fb.BufferPointer bp) {
61 int index = const fb.Uint8Reader().read(bp);
62 return index < idl.IndexSyntheticElementKind.values.length ? idl.IndexSynthe ticElementKind.values[index] : idl.IndexSyntheticElementKind.notSynthetic;
63 }
64 } 33 }
65 34
66 class _ReferenceKindReader extends fb.Reader<idl.ReferenceKind> { 35 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) {
67 const _ReferenceKindReader() : super(); 36 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
68 37 return const _UnlinkedPublicNamespaceReader().read(rootRef);
69 @override
70 int get size => 1;
71
72 @override
73 idl.ReferenceKind read(fb.BufferPointer bp) {
74 int index = const fb.Uint8Reader().read(bp);
75 return index < idl.ReferenceKind.values.length ? idl.ReferenceKind.values[in dex] : idl.ReferenceKind.classOrEnum;
76 }
77 } 38 }
78 39
79 class _UnlinkedConstOperationReader extends fb.Reader<idl.UnlinkedConstOperation > { 40 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) {
80 const _UnlinkedConstOperationReader() : super(); 41 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer);
81 42 return const _UnlinkedUnitReader().read(rootRef);
82 @override
83 int get size => 1;
84
85 @override
86 idl.UnlinkedConstOperation read(fb.BufferPointer bp) {
87 int index = const fb.Uint8Reader().read(bp);
88 return index < idl.UnlinkedConstOperation.values.length ? idl.UnlinkedConstO peration.values[index] : idl.UnlinkedConstOperation.pushInt;
89 }
90 }
91
92 class _UnlinkedConstructorInitializerKindReader extends fb.Reader<idl.UnlinkedCo nstructorInitializerKind> {
93 const _UnlinkedConstructorInitializerKindReader() : super();
94
95 @override
96 int get size => 1;
97
98 @override
99 idl.UnlinkedConstructorInitializerKind read(fb.BufferPointer bp) {
100 int index = const fb.Uint8Reader().read(bp);
101 return index < idl.UnlinkedConstructorInitializerKind.values.length ? idl.Un linkedConstructorInitializerKind.values[index] : idl.UnlinkedConstructorInitiali zerKind.field;
102 }
103 }
104
105 class _UnlinkedExecutableKindReader extends fb.Reader<idl.UnlinkedExecutableKind > {
106 const _UnlinkedExecutableKindReader() : super();
107
108 @override
109 int get size => 1;
110
111 @override
112 idl.UnlinkedExecutableKind read(fb.BufferPointer bp) {
113 int index = const fb.Uint8Reader().read(bp);
114 return index < idl.UnlinkedExecutableKind.values.length ? idl.UnlinkedExecut ableKind.values[index] : idl.UnlinkedExecutableKind.functionOrMethod;
115 }
116 }
117
118 class _UnlinkedParamKindReader extends fb.Reader<idl.UnlinkedParamKind> {
119 const _UnlinkedParamKindReader() : super();
120
121 @override
122 int get size => 1;
123
124 @override
125 idl.UnlinkedParamKind read(fb.BufferPointer bp) {
126 int index = const fb.Uint8Reader().read(bp);
127 return index < idl.UnlinkedParamKind.values.length ? idl.UnlinkedParamKind.v alues[index] : idl.UnlinkedParamKind.required;
128 }
129 } 43 }
130 44
131 class CacheSourceContentBuilder extends Object with _CacheSourceContentMixin imp lements idl.CacheSourceContent { 45 class CacheSourceContentBuilder extends Object with _CacheSourceContentMixin imp lements idl.CacheSourceContent {
132 bool _finished = false; 46 bool _finished = false;
133 47
134 List<String> _exportedUris; 48 List<String> _exportedUris;
135 List<String> _importedUris; 49 List<String> _importedUris;
136 idl.CacheSourceKind _kind; 50 idl.CacheSourceKind _kind;
137 List<String> _partUris; 51 List<String> _partUris;
138 52
53 CacheSourceContentBuilder({List<String> exportedUris, List<String> importedUri s, idl.CacheSourceKind kind, List<String> partUris})
54 : _exportedUris = exportedUris,
55 _importedUris = importedUris,
56 _kind = kind,
57 _partUris = partUris;
58
139 @override 59 @override
140 List<String> get exportedUris => _exportedUris ??= <String>[]; 60 List<String> get exportedUris => _exportedUris ??= <String>[];
141 61
142 /** 62 /**
143 * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`, 63 * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`,
144 * or `package:foo/bar.dart`. Empty if [kind] is [CacheSourceKind.part]. 64 * or `package:foo/bar.dart`. Empty if [kind] is [CacheSourceKind.part].
145 */ 65 */
146 void set exportedUris(List<String> _value) { 66 void set exportedUris(List<String> _value) {
147 assert(!_finished); 67 assert(!_finished);
148 _exportedUris = _value; 68 _exportedUris = _value;
(...skipping 27 matching lines...) Expand all
176 96
177 /** 97 /**
178 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is 98 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is
179 * [CacheSourceKind.part]. 99 * [CacheSourceKind.part].
180 */ 100 */
181 void set partUris(List<String> _value) { 101 void set partUris(List<String> _value) {
182 assert(!_finished); 102 assert(!_finished);
183 _partUris = _value; 103 _partUris = _value;
184 } 104 }
185 105
186 CacheSourceContentBuilder({List<String> exportedUris, List<String> importedUri s, idl.CacheSourceKind kind, List<String> partUris})
187 : _exportedUris = exportedUris,
188 _importedUris = importedUris,
189 _kind = kind,
190 _partUris = partUris;
191
192 /**
193 * Flush [informative] data recursively.
194 */
195 void flushInformative() {
196 }
197
198 List<int> toBuffer() {
199 fb.Builder fbBuilder = new fb.Builder();
200 return fbBuilder.finish(finish(fbBuilder), "CaSS");
201 }
202
203 fb.Offset finish(fb.Builder fbBuilder) { 106 fb.Offset finish(fb.Builder fbBuilder) {
204 assert(!_finished); 107 assert(!_finished);
205 _finished = true; 108 _finished = true;
206 fb.Offset offset_exportedUris; 109 fb.Offset offset_exportedUris;
207 fb.Offset offset_importedUris; 110 fb.Offset offset_importedUris;
208 fb.Offset offset_partUris; 111 fb.Offset offset_partUris;
209 if (!(_exportedUris == null || _exportedUris.isEmpty)) { 112 if (!(_exportedUris == null || _exportedUris.isEmpty)) {
210 offset_exportedUris = fbBuilder.writeList(_exportedUris.map((b) => fbBuild er.writeString(b)).toList()); 113 offset_exportedUris = fbBuilder.writeList(_exportedUris.map((b) => fbBuild er.writeString(b)).toList());
211 } 114 }
212 if (!(_importedUris == null || _importedUris.isEmpty)) { 115 if (!(_importedUris == null || _importedUris.isEmpty)) {
(...skipping 10 matching lines...) Expand all
223 fbBuilder.addOffset(1, offset_importedUris); 126 fbBuilder.addOffset(1, offset_importedUris);
224 } 127 }
225 if (_kind != null && _kind != idl.CacheSourceKind.library) { 128 if (_kind != null && _kind != idl.CacheSourceKind.library) {
226 fbBuilder.addUint8(0, _kind.index); 129 fbBuilder.addUint8(0, _kind.index);
227 } 130 }
228 if (offset_partUris != null) { 131 if (offset_partUris != null) {
229 fbBuilder.addOffset(3, offset_partUris); 132 fbBuilder.addOffset(3, offset_partUris);
230 } 133 }
231 return fbBuilder.endTable(); 134 return fbBuilder.endTable();
232 } 135 }
233 }
234 136
235 idl.CacheSourceContent readCacheSourceContent(List<int> buffer) { 137 /**
236 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 138 * Flush [informative] data recursively.
237 return const _CacheSourceContentReader().read(rootRef); 139 */
238 } 140 void flushInformative() {
239
240 class _CacheSourceContentReader extends fb.TableReader<_CacheSourceContentImpl> {
241 const _CacheSourceContentReader();
242
243 @override
244 _CacheSourceContentImpl createObject(fb.BufferPointer bp) => new _CacheSourceC ontentImpl(bp);
245 }
246
247 class _CacheSourceContentImpl extends Object with _CacheSourceContentMixin imple ments idl.CacheSourceContent {
248 final fb.BufferPointer _bp;
249
250 _CacheSourceContentImpl(this._bp);
251
252 List<String> _exportedUris;
253 List<String> _importedUris;
254 idl.CacheSourceKind _kind;
255 List<String> _partUris;
256
257 @override
258 List<String> get exportedUris {
259 _exportedUris ??= const fb.ListReader<String>(const fb.StringReader()).vTabl eGet(_bp, 2, const <String>[]);
260 return _exportedUris;
261 } 141 }
262 142
263 @override 143 List<int> toBuffer() {
264 List<String> get importedUris { 144 fb.Builder fbBuilder = new fb.Builder();
265 _importedUris ??= const fb.ListReader<String>(const fb.StringReader()).vTabl eGet(_bp, 1, const <String>[]); 145 return fbBuilder.finish(finish(fbBuilder), "CaSS");
266 return _importedUris;
267 }
268
269 @override
270 idl.CacheSourceKind get kind {
271 _kind ??= const _CacheSourceKindReader().vTableGet(_bp, 0, idl.CacheSourceKi nd.library);
272 return _kind;
273 }
274
275 @override
276 List<String> get partUris {
277 _partUris ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet (_bp, 3, const <String>[]);
278 return _partUris;
279 } 146 }
280 } 147 }
281 148
282 abstract class _CacheSourceContentMixin implements idl.CacheSourceContent {
283 @override
284 Map<String, Object> toJson() {
285 Map<String, Object> _result = <String, Object>{};
286 if (exportedUris.isNotEmpty) _result["exportedUris"] = exportedUris;
287 if (importedUris.isNotEmpty) _result["importedUris"] = importedUris;
288 if (kind != idl.CacheSourceKind.library) _result["kind"] = kind.toString().s plit('.')[1];
289 if (partUris.isNotEmpty) _result["partUris"] = partUris;
290 return _result;
291 }
292
293 @override
294 Map<String, Object> toMap() => {
295 "exportedUris": exportedUris,
296 "importedUris": importedUris,
297 "kind": kind,
298 "partUris": partUris,
299 };
300
301 @override
302 String toString() => convert.JSON.encode(toJson());
303 }
304
305 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa nge { 149 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa nge {
306 bool _finished = false; 150 bool _finished = false;
307 151
308 int _length; 152 int _length;
309 int _offset; 153 int _offset;
310 154
155 CodeRangeBuilder({int length, int offset})
156 : _length = length,
157 _offset = offset;
158
311 @override 159 @override
312 int get length => _length ??= 0; 160 int get length => _length ??= 0;
313 161
314 /** 162 /**
315 * Length of the element code. 163 * Length of the element code.
316 */ 164 */
317 void set length(int _value) { 165 void set length(int _value) {
318 assert(!_finished); 166 assert(!_finished);
319 assert(_value == null || _value >= 0); 167 assert(_value == null || _value >= 0);
320 _length = _value; 168 _length = _value;
321 } 169 }
322 170
323 @override 171 @override
324 int get offset => _offset ??= 0; 172 int get offset => _offset ??= 0;
325 173
326 /** 174 /**
327 * Offset of the element code relative to the beginning of the file. 175 * Offset of the element code relative to the beginning of the file.
328 */ 176 */
329 void set offset(int _value) { 177 void set offset(int _value) {
330 assert(!_finished); 178 assert(!_finished);
331 assert(_value == null || _value >= 0); 179 assert(_value == null || _value >= 0);
332 _offset = _value; 180 _offset = _value;
333 } 181 }
334 182
335 CodeRangeBuilder({int length, int offset})
336 : _length = length,
337 _offset = offset;
338
339 /**
340 * Flush [informative] data recursively.
341 */
342 void flushInformative() {
343 }
344
345 fb.Offset finish(fb.Builder fbBuilder) { 183 fb.Offset finish(fb.Builder fbBuilder) {
346 assert(!_finished); 184 assert(!_finished);
347 _finished = true; 185 _finished = true;
348 fbBuilder.startTable(); 186 fbBuilder.startTable();
349 if (_length != null && _length != 0) { 187 if (_length != null && _length != 0) {
350 fbBuilder.addUint32(1, _length); 188 fbBuilder.addUint32(1, _length);
351 } 189 }
352 if (_offset != null && _offset != 0) { 190 if (_offset != null && _offset != 0) {
353 fbBuilder.addUint32(0, _offset); 191 fbBuilder.addUint32(0, _offset);
354 } 192 }
355 return fbBuilder.endTable(); 193 return fbBuilder.endTable();
356 } 194 }
357 }
358 195
359 class _CodeRangeReader extends fb.TableReader<_CodeRangeImpl> { 196 /**
360 const _CodeRangeReader(); 197 * Flush [informative] data recursively.
361 198 */
362 @override 199 void flushInformative() {
363 _CodeRangeImpl createObject(fb.BufferPointer bp) => new _CodeRangeImpl(bp);
364 }
365
366 class _CodeRangeImpl extends Object with _CodeRangeMixin implements idl.CodeRang e {
367 final fb.BufferPointer _bp;
368
369 _CodeRangeImpl(this._bp);
370
371 int _length;
372 int _offset;
373
374 @override
375 int get length {
376 _length ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
377 return _length;
378 } 200 }
379
380 @override
381 int get offset {
382 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
383 return _offset;
384 }
385 }
386
387 abstract class _CodeRangeMixin implements idl.CodeRange {
388 @override
389 Map<String, Object> toJson() {
390 Map<String, Object> _result = <String, Object>{};
391 if (length != 0) _result["length"] = length;
392 if (offset != 0) _result["offset"] = offset;
393 return _result;
394 }
395
396 @override
397 Map<String, Object> toMap() => {
398 "length": length,
399 "offset": offset,
400 };
401
402 @override
403 String toString() => convert.JSON.encode(toJson());
404 } 201 }
405 202
406 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity Ref { 203 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity Ref {
407 bool _finished = false; 204 bool _finished = false;
408 205
409 List<int> _implicitFunctionTypeIndices; 206 List<int> _implicitFunctionTypeIndices;
410 int _paramReference; 207 int _paramReference;
411 int _reference; 208 int _reference;
412 int _slot; 209 int _slot;
413 List<UnlinkedParamBuilder> _syntheticParams; 210 List<UnlinkedParamBuilder> _syntheticParams;
414 EntityRefBuilder _syntheticReturnType; 211 EntityRefBuilder _syntheticReturnType;
415 List<EntityRefBuilder> _typeArguments; 212 List<EntityRefBuilder> _typeArguments;
416 213
214 EntityRefBuilder({List<int> implicitFunctionTypeIndices, int paramReference, i nt reference, int slot, List<UnlinkedParamBuilder> syntheticParams, EntityRefBui lder syntheticReturnType, List<EntityRefBuilder> typeArguments})
215 : _implicitFunctionTypeIndices = implicitFunctionTypeIndices,
216 _paramReference = paramReference,
217 _reference = reference,
218 _slot = slot,
219 _syntheticParams = syntheticParams,
220 _syntheticReturnType = syntheticReturnType,
221 _typeArguments = typeArguments;
222
417 @override 223 @override
418 List<int> get implicitFunctionTypeIndices => _implicitFunctionTypeIndices ??= <int>[]; 224 List<int> get implicitFunctionTypeIndices => _implicitFunctionTypeIndices ??= <int>[];
419 225
420 /** 226 /**
421 * If this is a reference to a function type implicitly defined by a 227 * If this is a reference to a function type implicitly defined by a
422 * function-typed parameter, a list of zero-based indices indicating the path 228 * function-typed parameter, a list of zero-based indices indicating the path
423 * from the entity referred to by [reference] to the appropriate type 229 * from the entity referred to by [reference] to the appropriate type
424 * parameter. Otherwise the empty list. 230 * parameter. Otherwise the empty list.
425 * 231 *
426 * If there are N indices in this list, then the entity being referred to is 232 * If there are N indices in this list, then the entity being referred to is
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 /** 342 /**
537 * If this is an instantiation of a generic type or generic executable, the 343 * If this is an instantiation of a generic type or generic executable, the
538 * type arguments used to instantiate it. Trailing type arguments of type 344 * type arguments used to instantiate it. Trailing type arguments of type
539 * `dynamic` are omitted. 345 * `dynamic` are omitted.
540 */ 346 */
541 void set typeArguments(List<EntityRefBuilder> _value) { 347 void set typeArguments(List<EntityRefBuilder> _value) {
542 assert(!_finished); 348 assert(!_finished);
543 _typeArguments = _value; 349 _typeArguments = _value;
544 } 350 }
545 351
546 EntityRefBuilder({List<int> implicitFunctionTypeIndices, int paramReference, i nt reference, int slot, List<UnlinkedParamBuilder> syntheticParams, EntityRefBui lder syntheticReturnType, List<EntityRefBuilder> typeArguments})
547 : _implicitFunctionTypeIndices = implicitFunctionTypeIndices,
548 _paramReference = paramReference,
549 _reference = reference,
550 _slot = slot,
551 _syntheticParams = syntheticParams,
552 _syntheticReturnType = syntheticReturnType,
553 _typeArguments = typeArguments;
554
555 /**
556 * Flush [informative] data recursively.
557 */
558 void flushInformative() {
559 _syntheticParams?.forEach((b) => b.flushInformative());
560 _syntheticReturnType?.flushInformative();
561 _typeArguments?.forEach((b) => b.flushInformative());
562 }
563
564 fb.Offset finish(fb.Builder fbBuilder) { 352 fb.Offset finish(fb.Builder fbBuilder) {
565 assert(!_finished); 353 assert(!_finished);
566 _finished = true; 354 _finished = true;
567 fb.Offset offset_implicitFunctionTypeIndices; 355 fb.Offset offset_implicitFunctionTypeIndices;
568 fb.Offset offset_syntheticParams; 356 fb.Offset offset_syntheticParams;
569 fb.Offset offset_syntheticReturnType; 357 fb.Offset offset_syntheticReturnType;
570 fb.Offset offset_typeArguments; 358 fb.Offset offset_typeArguments;
571 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i sEmpty)) { 359 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i sEmpty)) {
572 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu nctionTypeIndices); 360 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu nctionTypeIndices);
573 } 361 }
(...skipping 23 matching lines...) Expand all
597 fbBuilder.addOffset(6, offset_syntheticParams); 385 fbBuilder.addOffset(6, offset_syntheticParams);
598 } 386 }
599 if (offset_syntheticReturnType != null) { 387 if (offset_syntheticReturnType != null) {
600 fbBuilder.addOffset(5, offset_syntheticReturnType); 388 fbBuilder.addOffset(5, offset_syntheticReturnType);
601 } 389 }
602 if (offset_typeArguments != null) { 390 if (offset_typeArguments != null) {
603 fbBuilder.addOffset(1, offset_typeArguments); 391 fbBuilder.addOffset(1, offset_typeArguments);
604 } 392 }
605 return fbBuilder.endTable(); 393 return fbBuilder.endTable();
606 } 394 }
607 }
608 395
609 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> { 396 /**
610 const _EntityRefReader(); 397 * Flush [informative] data recursively.
611 398 */
612 @override 399 void flushInformative() {
613 _EntityRefImpl createObject(fb.BufferPointer bp) => new _EntityRefImpl(bp); 400 _syntheticParams?.forEach((b) => b.flushInformative());
614 } 401 _syntheticReturnType?.flushInformative();
615 402 _typeArguments?.forEach((b) => b.flushInformative());
616 class _EntityRefImpl extends Object with _EntityRefMixin implements idl.EntityRe f {
617 final fb.BufferPointer _bp;
618
619 _EntityRefImpl(this._bp);
620
621 List<int> _implicitFunctionTypeIndices;
622 int _paramReference;
623 int _reference;
624 int _slot;
625 List<idl.UnlinkedParam> _syntheticParams;
626 idl.EntityRef _syntheticReturnType;
627 List<idl.EntityRef> _typeArguments;
628
629 @override
630 List<int> get implicitFunctionTypeIndices {
631 _implicitFunctionTypeIndices ??= const fb.Uint32ListReader().vTableGet(_bp, 4, const <int>[]);
632 return _implicitFunctionTypeIndices;
633 }
634
635 @override
636 int get paramReference {
637 _paramReference ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
638 return _paramReference;
639 }
640
641 @override
642 int get reference {
643 _reference ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
644 return _reference;
645 }
646
647 @override
648 int get slot {
649 _slot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
650 return _slot;
651 }
652
653 @override
654 List<idl.UnlinkedParam> get syntheticParams {
655 _syntheticParams ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedP aramReader()).vTableGet(_bp, 6, const <idl.UnlinkedParam>[]);
656 return _syntheticParams;
657 }
658
659 @override
660 idl.EntityRef get syntheticReturnType {
661 _syntheticReturnType ??= const _EntityRefReader().vTableGet(_bp, 5, null);
662 return _syntheticReturnType;
663 }
664
665 @override
666 List<idl.EntityRef> get typeArguments {
667 _typeArguments ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader ()).vTableGet(_bp, 1, const <idl.EntityRef>[]);
668 return _typeArguments;
669 } 403 }
670 } 404 }
671 405
672 abstract class _EntityRefMixin implements idl.EntityRef {
673 @override
674 Map<String, Object> toJson() {
675 Map<String, Object> _result = <String, Object>{};
676 if (implicitFunctionTypeIndices.isNotEmpty) _result["implicitFunctionTypeInd ices"] = implicitFunctionTypeIndices;
677 if (paramReference != 0) _result["paramReference"] = paramReference;
678 if (reference != 0) _result["reference"] = reference;
679 if (slot != 0) _result["slot"] = slot;
680 if (syntheticParams.isNotEmpty) _result["syntheticParams"] = syntheticParams .map((_value) => _value.toJson()).toList();
681 if (syntheticReturnType != null) _result["syntheticReturnType"] = syntheticR eturnType.toJson();
682 if (typeArguments.isNotEmpty) _result["typeArguments"] = typeArguments.map(( _value) => _value.toJson()).toList();
683 return _result;
684 }
685
686 @override
687 Map<String, Object> toMap() => {
688 "implicitFunctionTypeIndices": implicitFunctionTypeIndices,
689 "paramReference": paramReference,
690 "reference": reference,
691 "slot": slot,
692 "syntheticParams": syntheticParams,
693 "syntheticReturnType": syntheticReturnType,
694 "typeArguments": typeArguments,
695 };
696
697 @override
698 String toString() => convert.JSON.encode(toJson());
699 }
700
701 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme nts idl.LinkedDependency { 406 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme nts idl.LinkedDependency {
702 bool _finished = false; 407 bool _finished = false;
703 408
704 List<String> _parts; 409 List<String> _parts;
705 String _uri; 410 String _uri;
706 411
412 LinkedDependencyBuilder({List<String> parts, String uri})
413 : _parts = parts,
414 _uri = uri;
415
707 @override 416 @override
708 List<String> get parts => _parts ??= <String>[]; 417 List<String> get parts => _parts ??= <String>[];
709 418
710 /** 419 /**
711 * URI for the compilation units listed in the library's `part` declarations. 420 * URI for the compilation units listed in the library's `part` declarations.
712 * These URIs are relative to the importing library. 421 * These URIs are relative to the importing library.
713 */ 422 */
714 void set parts(List<String> _value) { 423 void set parts(List<String> _value) {
715 assert(!_finished); 424 assert(!_finished);
716 _parts = _value; 425 _parts = _value;
717 } 426 }
718 427
719 @override 428 @override
720 String get uri => _uri ??= ''; 429 String get uri => _uri ??= '';
721 430
722 /** 431 /**
723 * The relative URI of the dependent library. This URI is relative to the 432 * The relative URI of the dependent library. This URI is relative to the
724 * importing library, even if there are intervening `export` declarations. 433 * importing library, even if there are intervening `export` declarations.
725 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports 434 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports
726 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be 435 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be
727 * `b/d/e.dart`. 436 * `b/d/e.dart`.
728 */ 437 */
729 void set uri(String _value) { 438 void set uri(String _value) {
730 assert(!_finished); 439 assert(!_finished);
731 _uri = _value; 440 _uri = _value;
732 } 441 }
733 442
734 LinkedDependencyBuilder({List<String> parts, String uri})
735 : _parts = parts,
736 _uri = uri;
737
738 /**
739 * Flush [informative] data recursively.
740 */
741 void flushInformative() {
742 }
743
744 fb.Offset finish(fb.Builder fbBuilder) { 443 fb.Offset finish(fb.Builder fbBuilder) {
745 assert(!_finished); 444 assert(!_finished);
746 _finished = true; 445 _finished = true;
747 fb.Offset offset_parts; 446 fb.Offset offset_parts;
748 fb.Offset offset_uri; 447 fb.Offset offset_uri;
749 if (!(_parts == null || _parts.isEmpty)) { 448 if (!(_parts == null || _parts.isEmpty)) {
750 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList()); 449 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList());
751 } 450 }
752 if (_uri != null) { 451 if (_uri != null) {
753 offset_uri = fbBuilder.writeString(_uri); 452 offset_uri = fbBuilder.writeString(_uri);
754 } 453 }
755 fbBuilder.startTable(); 454 fbBuilder.startTable();
756 if (offset_parts != null) { 455 if (offset_parts != null) {
757 fbBuilder.addOffset(1, offset_parts); 456 fbBuilder.addOffset(1, offset_parts);
758 } 457 }
759 if (offset_uri != null) { 458 if (offset_uri != null) {
760 fbBuilder.addOffset(0, offset_uri); 459 fbBuilder.addOffset(0, offset_uri);
761 } 460 }
762 return fbBuilder.endTable(); 461 return fbBuilder.endTable();
763 } 462 }
764 }
765 463
766 class _LinkedDependencyReader extends fb.TableReader<_LinkedDependencyImpl> { 464 /**
767 const _LinkedDependencyReader(); 465 * Flush [informative] data recursively.
768 466 */
769 @override 467 void flushInformative() {
770 _LinkedDependencyImpl createObject(fb.BufferPointer bp) => new _LinkedDependen cyImpl(bp);
771 }
772
773 class _LinkedDependencyImpl extends Object with _LinkedDependencyMixin implement s idl.LinkedDependency {
774 final fb.BufferPointer _bp;
775
776 _LinkedDependencyImpl(this._bp);
777
778 List<String> _parts;
779 String _uri;
780
781 @override
782 List<String> get parts {
783 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
784 return _parts;
785 }
786
787 @override
788 String get uri {
789 _uri ??= const fb.StringReader().vTableGet(_bp, 0, '');
790 return _uri;
791 } 468 }
792 } 469 }
793 470
794 abstract class _LinkedDependencyMixin implements idl.LinkedDependency {
795 @override
796 Map<String, Object> toJson() {
797 Map<String, Object> _result = <String, Object>{};
798 if (parts.isNotEmpty) _result["parts"] = parts;
799 if (uri != '') _result["uri"] = uri;
800 return _result;
801 }
802
803 @override
804 Map<String, Object> toMap() => {
805 "parts": parts,
806 "uri": uri,
807 };
808
809 @override
810 String toString() => convert.JSON.encode(toJson());
811 }
812
813 class LinkedExportNameBuilder extends Object with _LinkedExportNameMixin impleme nts idl.LinkedExportName { 471 class LinkedExportNameBuilder extends Object with _LinkedExportNameMixin impleme nts idl.LinkedExportName {
814 bool _finished = false; 472 bool _finished = false;
815 473
816 int _dependency; 474 int _dependency;
817 idl.ReferenceKind _kind; 475 idl.ReferenceKind _kind;
818 String _name; 476 String _name;
819 int _unit; 477 int _unit;
820 478
479 LinkedExportNameBuilder({int dependency, idl.ReferenceKind kind, String name, int unit})
480 : _dependency = dependency,
481 _kind = kind,
482 _name = name,
483 _unit = unit;
484
821 @override 485 @override
822 int get dependency => _dependency ??= 0; 486 int get dependency => _dependency ??= 0;
823 487
824 /** 488 /**
825 * Index into [LinkedLibrary.dependencies] for the library in which the 489 * Index into [LinkedLibrary.dependencies] for the library in which the
826 * entity is defined. 490 * entity is defined.
827 */ 491 */
828 void set dependency(int _value) { 492 void set dependency(int _value) {
829 assert(!_finished); 493 assert(!_finished);
830 assert(_value == null || _value >= 0); 494 assert(_value == null || _value >= 0);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 * definition of the entity. As with indices into [LinkedLibrary.units], 526 * definition of the entity. As with indices into [LinkedLibrary.units],
863 * zero represents the defining compilation unit, and nonzero values 527 * zero represents the defining compilation unit, and nonzero values
864 * represent parts in the order of the corresponding `part` declarations. 528 * represent parts in the order of the corresponding `part` declarations.
865 */ 529 */
866 void set unit(int _value) { 530 void set unit(int _value) {
867 assert(!_finished); 531 assert(!_finished);
868 assert(_value == null || _value >= 0); 532 assert(_value == null || _value >= 0);
869 _unit = _value; 533 _unit = _value;
870 } 534 }
871 535
872 LinkedExportNameBuilder({int dependency, idl.ReferenceKind kind, String name, int unit})
873 : _dependency = dependency,
874 _kind = kind,
875 _name = name,
876 _unit = unit;
877
878 /**
879 * Flush [informative] data recursively.
880 */
881 void flushInformative() {
882 }
883
884 fb.Offset finish(fb.Builder fbBuilder) { 536 fb.Offset finish(fb.Builder fbBuilder) {
885 assert(!_finished); 537 assert(!_finished);
886 _finished = true; 538 _finished = true;
887 fb.Offset offset_name; 539 fb.Offset offset_name;
888 if (_name != null) { 540 if (_name != null) {
889 offset_name = fbBuilder.writeString(_name); 541 offset_name = fbBuilder.writeString(_name);
890 } 542 }
891 fbBuilder.startTable(); 543 fbBuilder.startTable();
892 if (_dependency != null && _dependency != 0) { 544 if (_dependency != null && _dependency != 0) {
893 fbBuilder.addUint32(0, _dependency); 545 fbBuilder.addUint32(0, _dependency);
894 } 546 }
895 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { 547 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) {
896 fbBuilder.addUint8(3, _kind.index); 548 fbBuilder.addUint8(3, _kind.index);
897 } 549 }
898 if (offset_name != null) { 550 if (offset_name != null) {
899 fbBuilder.addOffset(1, offset_name); 551 fbBuilder.addOffset(1, offset_name);
900 } 552 }
901 if (_unit != null && _unit != 0) { 553 if (_unit != null && _unit != 0) {
902 fbBuilder.addUint32(2, _unit); 554 fbBuilder.addUint32(2, _unit);
903 } 555 }
904 return fbBuilder.endTable(); 556 return fbBuilder.endTable();
905 } 557 }
906 }
907 558
908 class _LinkedExportNameReader extends fb.TableReader<_LinkedExportNameImpl> { 559 /**
909 const _LinkedExportNameReader(); 560 * Flush [informative] data recursively.
910 561 */
911 @override 562 void flushInformative() {
912 _LinkedExportNameImpl createObject(fb.BufferPointer bp) => new _LinkedExportNa meImpl(bp);
913 }
914
915 class _LinkedExportNameImpl extends Object with _LinkedExportNameMixin implement s idl.LinkedExportName {
916 final fb.BufferPointer _bp;
917
918 _LinkedExportNameImpl(this._bp);
919
920 int _dependency;
921 idl.ReferenceKind _kind;
922 String _name;
923 int _unit;
924
925 @override
926 int get dependency {
927 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
928 return _dependency;
929 } 563 }
930
931 @override
932 idl.ReferenceKind get kind {
933 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 3, idl.ReferenceKind.c lassOrEnum);
934 return _kind;
935 }
936
937 @override
938 String get name {
939 _name ??= const fb.StringReader().vTableGet(_bp, 1, '');
940 return _name;
941 }
942
943 @override
944 int get unit {
945 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
946 return _unit;
947 }
948 }
949
950 abstract class _LinkedExportNameMixin implements idl.LinkedExportName {
951 @override
952 Map<String, Object> toJson() {
953 Map<String, Object> _result = <String, Object>{};
954 if (dependency != 0) _result["dependency"] = dependency;
955 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString() .split('.')[1];
956 if (name != '') _result["name"] = name;
957 if (unit != 0) _result["unit"] = unit;
958 return _result;
959 }
960
961 @override
962 Map<String, Object> toMap() => {
963 "dependency": dependency,
964 "kind": kind,
965 "name": name,
966 "unit": unit,
967 };
968
969 @override
970 String toString() => convert.JSON.encode(toJson());
971 } 564 }
972 565
973 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id l.LinkedLibrary { 566 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id l.LinkedLibrary {
974 bool _finished = false; 567 bool _finished = false;
975 568
976 List<LinkedDependencyBuilder> _dependencies; 569 List<LinkedDependencyBuilder> _dependencies;
977 List<LinkedExportNameBuilder> _exportNames; 570 List<LinkedExportNameBuilder> _exportNames;
978 bool _fallbackMode; 571 bool _fallbackMode;
979 List<int> _importDependencies; 572 List<int> _importDependencies;
980 int _numPrelinkedDependencies; 573 int _numPrelinkedDependencies;
981 List<LinkedUnitBuilder> _units; 574 List<LinkedUnitBuilder> _units;
982 575
576 LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<LinkedE xportNameBuilder> exportNames, bool fallbackMode, List<int> importDependencies, int numPrelinkedDependencies, List<LinkedUnitBuilder> units})
577 : _dependencies = dependencies,
578 _exportNames = exportNames,
579 _fallbackMode = fallbackMode,
580 _importDependencies = importDependencies,
581 _numPrelinkedDependencies = numPrelinkedDependencies,
582 _units = units;
583
983 @override 584 @override
984 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep endencyBuilder>[]; 585 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep endencyBuilder>[];
985 586
986 /** 587 /**
987 * The libraries that this library depends on (either via an explicit import 588 * The libraries that this library depends on (either via an explicit import
988 * statement or via the implicit dependencies on `dart:core` and 589 * statement or via the implicit dependencies on `dart:core` and
989 * `dart:async`). The first element of this array is a pseudo-dependency 590 * `dart:async`). The first element of this array is a pseudo-dependency
990 * representing the library itself (it is also used for `dynamic` and 591 * representing the library itself (it is also used for `dynamic` and
991 * `void`). This is followed by elements representing "prelinked" 592 * `void`). This is followed by elements representing "prelinked"
992 * dependencies (direct imports and the transitive closure of exports). 593 * dependencies (direct imports and the transitive closure of exports).
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 * The linked summary of all the compilation units constituting the 666 * The linked summary of all the compilation units constituting the
1066 * library. The summary of the defining compilation unit is listed first, 667 * library. The summary of the defining compilation unit is listed first,
1067 * followed by the summary of each part, in the order of the `part` 668 * followed by the summary of each part, in the order of the `part`
1068 * declarations in the defining compilation unit. 669 * declarations in the defining compilation unit.
1069 */ 670 */
1070 void set units(List<LinkedUnitBuilder> _value) { 671 void set units(List<LinkedUnitBuilder> _value) {
1071 assert(!_finished); 672 assert(!_finished);
1072 _units = _value; 673 _units = _value;
1073 } 674 }
1074 675
1075 LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<LinkedE xportNameBuilder> exportNames, bool fallbackMode, List<int> importDependencies, int numPrelinkedDependencies, List<LinkedUnitBuilder> units})
1076 : _dependencies = dependencies,
1077 _exportNames = exportNames,
1078 _fallbackMode = fallbackMode,
1079 _importDependencies = importDependencies,
1080 _numPrelinkedDependencies = numPrelinkedDependencies,
1081 _units = units;
1082
1083 /**
1084 * Flush [informative] data recursively.
1085 */
1086 void flushInformative() {
1087 _dependencies?.forEach((b) => b.flushInformative());
1088 _exportNames?.forEach((b) => b.flushInformative());
1089 _units?.forEach((b) => b.flushInformative());
1090 }
1091
1092 List<int> toBuffer() {
1093 fb.Builder fbBuilder = new fb.Builder();
1094 return fbBuilder.finish(finish(fbBuilder), "LLib");
1095 }
1096
1097 fb.Offset finish(fb.Builder fbBuilder) { 676 fb.Offset finish(fb.Builder fbBuilder) {
1098 assert(!_finished); 677 assert(!_finished);
1099 _finished = true; 678 _finished = true;
1100 fb.Offset offset_dependencies; 679 fb.Offset offset_dependencies;
1101 fb.Offset offset_exportNames; 680 fb.Offset offset_exportNames;
1102 fb.Offset offset_importDependencies; 681 fb.Offset offset_importDependencies;
1103 fb.Offset offset_units; 682 fb.Offset offset_units;
1104 if (!(_dependencies == null || _dependencies.isEmpty)) { 683 if (!(_dependencies == null || _dependencies.isEmpty)) {
1105 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis h(fbBuilder)).toList()); 684 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis h(fbBuilder)).toList());
1106 } 685 }
(...skipping 20 matching lines...) Expand all
1127 fbBuilder.addOffset(1, offset_importDependencies); 706 fbBuilder.addOffset(1, offset_importDependencies);
1128 } 707 }
1129 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) { 708 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) {
1130 fbBuilder.addUint32(2, _numPrelinkedDependencies); 709 fbBuilder.addUint32(2, _numPrelinkedDependencies);
1131 } 710 }
1132 if (offset_units != null) { 711 if (offset_units != null) {
1133 fbBuilder.addOffset(3, offset_units); 712 fbBuilder.addOffset(3, offset_units);
1134 } 713 }
1135 return fbBuilder.endTable(); 714 return fbBuilder.endTable();
1136 } 715 }
1137 }
1138 716
1139 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) { 717 /**
1140 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 718 * Flush [informative] data recursively.
1141 return const _LinkedLibraryReader().read(rootRef); 719 */
1142 } 720 void flushInformative() {
1143 721 _dependencies?.forEach((b) => b.flushInformative());
1144 class _LinkedLibraryReader extends fb.TableReader<_LinkedLibraryImpl> { 722 _exportNames?.forEach((b) => b.flushInformative());
1145 const _LinkedLibraryReader(); 723 _units?.forEach((b) => b.flushInformative());
1146
1147 @override
1148 _LinkedLibraryImpl createObject(fb.BufferPointer bp) => new _LinkedLibraryImpl (bp);
1149 }
1150
1151 class _LinkedLibraryImpl extends Object with _LinkedLibraryMixin implements idl. LinkedLibrary {
1152 final fb.BufferPointer _bp;
1153
1154 _LinkedLibraryImpl(this._bp);
1155
1156 List<idl.LinkedDependency> _dependencies;
1157 List<idl.LinkedExportName> _exportNames;
1158 bool _fallbackMode;
1159 List<int> _importDependencies;
1160 int _numPrelinkedDependencies;
1161 List<idl.LinkedUnit> _units;
1162
1163 @override
1164 List<idl.LinkedDependency> get dependencies {
1165 _dependencies ??= const fb.ListReader<idl.LinkedDependency>(const _LinkedDep endencyReader()).vTableGet(_bp, 0, const <idl.LinkedDependency>[]);
1166 return _dependencies;
1167 } 724 }
1168 725
1169 @override 726 List<int> toBuffer() {
1170 List<idl.LinkedExportName> get exportNames { 727 fb.Builder fbBuilder = new fb.Builder();
1171 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo rtNameReader()).vTableGet(_bp, 4, const <idl.LinkedExportName>[]); 728 return fbBuilder.finish(finish(fbBuilder), "LLib");
1172 return _exportNames;
1173 }
1174
1175 @override
1176 bool get fallbackMode {
1177 _fallbackMode ??= const fb.BoolReader().vTableGet(_bp, 5, false);
1178 return _fallbackMode;
1179 }
1180
1181 @override
1182 List<int> get importDependencies {
1183 _importDependencies ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
1184 return _importDependencies;
1185 }
1186
1187 @override
1188 int get numPrelinkedDependencies {
1189 _numPrelinkedDependencies ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
1190 return _numPrelinkedDependencies;
1191 }
1192
1193 @override
1194 List<idl.LinkedUnit> get units {
1195 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()).vT ableGet(_bp, 3, const <idl.LinkedUnit>[]);
1196 return _units;
1197 } 729 }
1198 } 730 }
1199 731
1200 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary {
1201 @override
1202 Map<String, Object> toJson() {
1203 Map<String, Object> _result = <String, Object>{};
1204 if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_va lue) => _value.toJson()).toList();
1205 if (exportNames.isNotEmpty) _result["exportNames"] = exportNames.map((_value ) => _value.toJson()).toList();
1206 if (fallbackMode != false) _result["fallbackMode"] = fallbackMode;
1207 if (importDependencies.isNotEmpty) _result["importDependencies"] = importDep endencies;
1208 if (numPrelinkedDependencies != 0) _result["numPrelinkedDependencies"] = num PrelinkedDependencies;
1209 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson ()).toList();
1210 return _result;
1211 }
1212
1213 @override
1214 Map<String, Object> toMap() => {
1215 "dependencies": dependencies,
1216 "exportNames": exportNames,
1217 "fallbackMode": fallbackMode,
1218 "importDependencies": importDependencies,
1219 "numPrelinkedDependencies": numPrelinkedDependencies,
1220 "units": units,
1221 };
1222
1223 @override
1224 String toString() => convert.JSON.encode(toJson());
1225 }
1226
1227 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement s idl.LinkedReference { 732 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement s idl.LinkedReference {
1228 bool _finished = false; 733 bool _finished = false;
1229 734
1230 int _containingReference; 735 int _containingReference;
1231 int _dependency; 736 int _dependency;
1232 idl.ReferenceKind _kind; 737 idl.ReferenceKind _kind;
1233 int _localIndex; 738 int _localIndex;
1234 String _name; 739 String _name;
1235 int _numTypeParameters; 740 int _numTypeParameters;
1236 int _unit; 741 int _unit;
1237 742
743 LinkedReferenceBuilder({int containingReference, int dependency, idl.Reference Kind kind, int localIndex, String name, int numTypeParameters, int unit})
744 : _containingReference = containingReference,
745 _dependency = dependency,
746 _kind = kind,
747 _localIndex = localIndex,
748 _name = name,
749 _numTypeParameters = numTypeParameters,
750 _unit = unit;
751
1238 @override 752 @override
1239 int get containingReference => _containingReference ??= 0; 753 int get containingReference => _containingReference ??= 0;
1240 754
1241 /** 755 /**
1242 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], 756 * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
1243 * and the entity being referred to is contained within another entity, index 757 * and the entity being referred to is contained within another entity, index
1244 * of the containing entity. This behaves similarly to 758 * of the containing entity. This behaves similarly to
1245 * [UnlinkedReference.prefixReference], however it is only used for class 759 * [UnlinkedReference.prefixReference], however it is only used for class
1246 * members, not for prefixed imports. 760 * members, not for prefixed imports.
1247 * 761 *
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 * 851 *
1338 * Zero if this entity is contained within another entity (e.g. a class 852 * Zero if this entity is contained within another entity (e.g. a class
1339 * member). 853 * member).
1340 */ 854 */
1341 void set unit(int _value) { 855 void set unit(int _value) {
1342 assert(!_finished); 856 assert(!_finished);
1343 assert(_value == null || _value >= 0); 857 assert(_value == null || _value >= 0);
1344 _unit = _value; 858 _unit = _value;
1345 } 859 }
1346 860
1347 LinkedReferenceBuilder({int containingReference, int dependency, idl.Reference Kind kind, int localIndex, String name, int numTypeParameters, int unit})
1348 : _containingReference = containingReference,
1349 _dependency = dependency,
1350 _kind = kind,
1351 _localIndex = localIndex,
1352 _name = name,
1353 _numTypeParameters = numTypeParameters,
1354 _unit = unit;
1355
1356 /**
1357 * Flush [informative] data recursively.
1358 */
1359 void flushInformative() {
1360 }
1361
1362 fb.Offset finish(fb.Builder fbBuilder) { 861 fb.Offset finish(fb.Builder fbBuilder) {
1363 assert(!_finished); 862 assert(!_finished);
1364 _finished = true; 863 _finished = true;
1365 fb.Offset offset_name; 864 fb.Offset offset_name;
1366 if (_name != null) { 865 if (_name != null) {
1367 offset_name = fbBuilder.writeString(_name); 866 offset_name = fbBuilder.writeString(_name);
1368 } 867 }
1369 fbBuilder.startTable(); 868 fbBuilder.startTable();
1370 if (_containingReference != null && _containingReference != 0) { 869 if (_containingReference != null && _containingReference != 0) {
1371 fbBuilder.addUint32(5, _containingReference); 870 fbBuilder.addUint32(5, _containingReference);
(...skipping 11 matching lines...) Expand all
1383 fbBuilder.addOffset(3, offset_name); 882 fbBuilder.addOffset(3, offset_name);
1384 } 883 }
1385 if (_numTypeParameters != null && _numTypeParameters != 0) { 884 if (_numTypeParameters != null && _numTypeParameters != 0) {
1386 fbBuilder.addUint32(4, _numTypeParameters); 885 fbBuilder.addUint32(4, _numTypeParameters);
1387 } 886 }
1388 if (_unit != null && _unit != 0) { 887 if (_unit != null && _unit != 0) {
1389 fbBuilder.addUint32(0, _unit); 888 fbBuilder.addUint32(0, _unit);
1390 } 889 }
1391 return fbBuilder.endTable(); 890 return fbBuilder.endTable();
1392 } 891 }
1393 }
1394 892
1395 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { 893 /**
1396 const _LinkedReferenceReader(); 894 * Flush [informative] data recursively.
1397 895 */
1398 @override 896 void flushInformative() {
1399 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference Impl(bp);
1400 }
1401
1402 class _LinkedReferenceImpl extends Object with _LinkedReferenceMixin implements idl.LinkedReference {
1403 final fb.BufferPointer _bp;
1404
1405 _LinkedReferenceImpl(this._bp);
1406
1407 int _containingReference;
1408 int _dependency;
1409 idl.ReferenceKind _kind;
1410 int _localIndex;
1411 String _name;
1412 int _numTypeParameters;
1413 int _unit;
1414
1415 @override
1416 int get containingReference {
1417 _containingReference ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
1418 return _containingReference;
1419 } 897 }
1420
1421 @override
1422 int get dependency {
1423 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
1424 return _dependency;
1425 }
1426
1427 @override
1428 idl.ReferenceKind get kind {
1429 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 2, idl.ReferenceKind.c lassOrEnum);
1430 return _kind;
1431 }
1432
1433 @override
1434 int get localIndex {
1435 _localIndex ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
1436 return _localIndex;
1437 }
1438
1439 @override
1440 String get name {
1441 _name ??= const fb.StringReader().vTableGet(_bp, 3, '');
1442 return _name;
1443 }
1444
1445 @override
1446 int get numTypeParameters {
1447 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 4, 0);
1448 return _numTypeParameters;
1449 }
1450
1451 @override
1452 int get unit {
1453 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
1454 return _unit;
1455 }
1456 }
1457
1458 abstract class _LinkedReferenceMixin implements idl.LinkedReference {
1459 @override
1460 Map<String, Object> toJson() {
1461 Map<String, Object> _result = <String, Object>{};
1462 if (containingReference != 0) _result["containingReference"] = containingRef erence;
1463 if (dependency != 0) _result["dependency"] = dependency;
1464 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString() .split('.')[1];
1465 if (localIndex != 0) _result["localIndex"] = localIndex;
1466 if (name != '') _result["name"] = name;
1467 if (numTypeParameters != 0) _result["numTypeParameters"] = numTypeParameters ;
1468 if (unit != 0) _result["unit"] = unit;
1469 return _result;
1470 }
1471
1472 @override
1473 Map<String, Object> toMap() => {
1474 "containingReference": containingReference,
1475 "dependency": dependency,
1476 "kind": kind,
1477 "localIndex": localIndex,
1478 "name": name,
1479 "numTypeParameters": numTypeParameters,
1480 "unit": unit,
1481 };
1482
1483 @override
1484 String toString() => convert.JSON.encode(toJson());
1485 } 898 }
1486 899
1487 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link edUnit { 900 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link edUnit {
1488 bool _finished = false; 901 bool _finished = false;
1489 902
1490 List<int> _constCycles; 903 List<int> _constCycles;
1491 List<LinkedReferenceBuilder> _references; 904 List<LinkedReferenceBuilder> _references;
1492 List<EntityRefBuilder> _types; 905 List<EntityRefBuilder> _types;
1493 906
907 LinkedUnitBuilder({List<int> constCycles, List<LinkedReferenceBuilder> referen ces, List<EntityRefBuilder> types})
908 : _constCycles = constCycles,
909 _references = references,
910 _types = types;
911
1494 @override 912 @override
1495 List<int> get constCycles => _constCycles ??= <int>[]; 913 List<int> get constCycles => _constCycles ??= <int>[];
1496 914
1497 /** 915 /**
1498 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) 916 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot])
1499 * corresponding to const constructors that are part of cycles. 917 * corresponding to const constructors that are part of cycles.
1500 */ 918 */
1501 void set constCycles(List<int> _value) { 919 void set constCycles(List<int> _value) {
1502 assert(!_finished); 920 assert(!_finished);
1503 assert(_value == null || _value.every((e) => e >= 0)); 921 assert(_value == null || _value.every((e) => e >= 0));
(...skipping 21 matching lines...) Expand all
1525 943
1526 /** 944 /**
1527 * List associating slot ids found inside the unlinked summary for the 945 * List associating slot ids found inside the unlinked summary for the
1528 * compilation unit with propagated and inferred types. 946 * compilation unit with propagated and inferred types.
1529 */ 947 */
1530 void set types(List<EntityRefBuilder> _value) { 948 void set types(List<EntityRefBuilder> _value) {
1531 assert(!_finished); 949 assert(!_finished);
1532 _types = _value; 950 _types = _value;
1533 } 951 }
1534 952
1535 LinkedUnitBuilder({List<int> constCycles, List<LinkedReferenceBuilder> referen ces, List<EntityRefBuilder> types})
1536 : _constCycles = constCycles,
1537 _references = references,
1538 _types = types;
1539
1540 /**
1541 * Flush [informative] data recursively.
1542 */
1543 void flushInformative() {
1544 _references?.forEach((b) => b.flushInformative());
1545 _types?.forEach((b) => b.flushInformative());
1546 }
1547
1548 fb.Offset finish(fb.Builder fbBuilder) { 953 fb.Offset finish(fb.Builder fbBuilder) {
1549 assert(!_finished); 954 assert(!_finished);
1550 _finished = true; 955 _finished = true;
1551 fb.Offset offset_constCycles; 956 fb.Offset offset_constCycles;
1552 fb.Offset offset_references; 957 fb.Offset offset_references;
1553 fb.Offset offset_types; 958 fb.Offset offset_types;
1554 if (!(_constCycles == null || _constCycles.isEmpty)) { 959 if (!(_constCycles == null || _constCycles.isEmpty)) {
1555 offset_constCycles = fbBuilder.writeListUint32(_constCycles); 960 offset_constCycles = fbBuilder.writeListUint32(_constCycles);
1556 } 961 }
1557 if (!(_references == null || _references.isEmpty)) { 962 if (!(_references == null || _references.isEmpty)) {
1558 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList()); 963 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList());
1559 } 964 }
1560 if (!(_types == null || _types.isEmpty)) { 965 if (!(_types == null || _types.isEmpty)) {
1561 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)). toList()); 966 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)). toList());
1562 } 967 }
1563 fbBuilder.startTable(); 968 fbBuilder.startTable();
1564 if (offset_constCycles != null) { 969 if (offset_constCycles != null) {
1565 fbBuilder.addOffset(2, offset_constCycles); 970 fbBuilder.addOffset(2, offset_constCycles);
1566 } 971 }
1567 if (offset_references != null) { 972 if (offset_references != null) {
1568 fbBuilder.addOffset(0, offset_references); 973 fbBuilder.addOffset(0, offset_references);
1569 } 974 }
1570 if (offset_types != null) { 975 if (offset_types != null) {
1571 fbBuilder.addOffset(1, offset_types); 976 fbBuilder.addOffset(1, offset_types);
1572 } 977 }
1573 return fbBuilder.endTable(); 978 return fbBuilder.endTable();
1574 } 979 }
1575 }
1576 980
1577 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { 981 /**
1578 const _LinkedUnitReader(); 982 * Flush [informative] data recursively.
1579 983 */
1580 @override 984 void flushInformative() {
1581 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); 985 _references?.forEach((b) => b.flushInformative());
1582 } 986 _types?.forEach((b) => b.flushInformative());
1583
1584 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked Unit {
1585 final fb.BufferPointer _bp;
1586
1587 _LinkedUnitImpl(this._bp);
1588
1589 List<int> _constCycles;
1590 List<idl.LinkedReference> _references;
1591 List<idl.EntityRef> _types;
1592
1593 @override
1594 List<int> get constCycles {
1595 _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[] );
1596 return _constCycles;
1597 }
1598
1599 @override
1600 List<idl.LinkedReference> get references {
1601 _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedRefere nceReader()).vTableGet(_bp, 0, const <idl.LinkedReference>[]);
1602 return _references;
1603 }
1604
1605 @override
1606 List<idl.EntityRef> get types {
1607 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTab leGet(_bp, 1, const <idl.EntityRef>[]);
1608 return _types;
1609 } 987 }
1610 } 988 }
1611 989
1612 abstract class _LinkedUnitMixin implements idl.LinkedUnit {
1613 @override
1614 Map<String, Object> toJson() {
1615 Map<String, Object> _result = <String, Object>{};
1616 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles;
1617 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList();
1618 if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson ()).toList();
1619 return _result;
1620 }
1621
1622 @override
1623 Map<String, Object> toMap() => {
1624 "constCycles": constCycles,
1625 "references": references,
1626 "types": types,
1627 };
1628
1629 @override
1630 String toString() => convert.JSON.encode(toJson());
1631 }
1632
1633 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id l.PackageBundle { 990 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id l.PackageBundle {
1634 bool _finished = false; 991 bool _finished = false;
1635 992
1636 List<LinkedLibraryBuilder> _linkedLibraries; 993 List<LinkedLibraryBuilder> _linkedLibraries;
1637 List<String> _linkedLibraryUris; 994 List<String> _linkedLibraryUris;
1638 int _majorVersion; 995 int _majorVersion;
1639 int _minorVersion; 996 int _minorVersion;
1640 List<String> _unlinkedUnitHashes; 997 List<String> _unlinkedUnitHashes;
1641 List<UnlinkedUnitBuilder> _unlinkedUnits; 998 List<UnlinkedUnitBuilder> _unlinkedUnits;
1642 List<String> _unlinkedUnitUris; 999 List<String> _unlinkedUnitUris;
1643 1000
1001 PackageBundleBuilder({List<LinkedLibraryBuilder> linkedLibraries, List<String> linkedLibraryUris, int majorVersion, int minorVersion, List<String> unlinkedUni tHashes, List<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUnitUris} )
1002 : _linkedLibraries = linkedLibraries,
1003 _linkedLibraryUris = linkedLibraryUris,
1004 _majorVersion = majorVersion,
1005 _minorVersion = minorVersion,
1006 _unlinkedUnitHashes = unlinkedUnitHashes,
1007 _unlinkedUnits = unlinkedUnits,
1008 _unlinkedUnitUris = unlinkedUnitUris;
1009
1644 @override 1010 @override
1645 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked LibraryBuilder>[]; 1011 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked LibraryBuilder>[];
1646 1012
1647 /** 1013 /**
1648 * Linked libraries. 1014 * Linked libraries.
1649 */ 1015 */
1650 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { 1016 void set linkedLibraries(List<LinkedLibraryBuilder> _value) {
1651 assert(!_finished); 1017 assert(!_finished);
1652 _linkedLibraries = _value; 1018 _linkedLibraries = _value;
1653 } 1019 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; 1083 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[];
1718 1084
1719 /** 1085 /**
1720 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. 1086 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`.
1721 */ 1087 */
1722 void set unlinkedUnitUris(List<String> _value) { 1088 void set unlinkedUnitUris(List<String> _value) {
1723 assert(!_finished); 1089 assert(!_finished);
1724 _unlinkedUnitUris = _value; 1090 _unlinkedUnitUris = _value;
1725 } 1091 }
1726 1092
1727 PackageBundleBuilder({List<LinkedLibraryBuilder> linkedLibraries, List<String> linkedLibraryUris, int majorVersion, int minorVersion, List<String> unlinkedUni tHashes, List<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUnitUris} )
1728 : _linkedLibraries = linkedLibraries,
1729 _linkedLibraryUris = linkedLibraryUris,
1730 _majorVersion = majorVersion,
1731 _minorVersion = minorVersion,
1732 _unlinkedUnitHashes = unlinkedUnitHashes,
1733 _unlinkedUnits = unlinkedUnits,
1734 _unlinkedUnitUris = unlinkedUnitUris;
1735
1736 /**
1737 * Flush [informative] data recursively.
1738 */
1739 void flushInformative() {
1740 _linkedLibraries?.forEach((b) => b.flushInformative());
1741 _unlinkedUnits?.forEach((b) => b.flushInformative());
1742 }
1743
1744 List<int> toBuffer() {
1745 fb.Builder fbBuilder = new fb.Builder();
1746 return fbBuilder.finish(finish(fbBuilder), "PBdl");
1747 }
1748
1749 fb.Offset finish(fb.Builder fbBuilder) { 1093 fb.Offset finish(fb.Builder fbBuilder) {
1750 assert(!_finished); 1094 assert(!_finished);
1751 _finished = true; 1095 _finished = true;
1752 fb.Offset offset_linkedLibraries; 1096 fb.Offset offset_linkedLibraries;
1753 fb.Offset offset_linkedLibraryUris; 1097 fb.Offset offset_linkedLibraryUris;
1754 fb.Offset offset_unlinkedUnitHashes; 1098 fb.Offset offset_unlinkedUnitHashes;
1755 fb.Offset offset_unlinkedUnits; 1099 fb.Offset offset_unlinkedUnits;
1756 fb.Offset offset_unlinkedUnitUris; 1100 fb.Offset offset_unlinkedUnitUris;
1757 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { 1101 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) {
1758 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b .finish(fbBuilder)).toList()); 1102 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b .finish(fbBuilder)).toList());
(...skipping 27 matching lines...) Expand all
1786 fbBuilder.addOffset(4, offset_unlinkedUnitHashes); 1130 fbBuilder.addOffset(4, offset_unlinkedUnitHashes);
1787 } 1131 }
1788 if (offset_unlinkedUnits != null) { 1132 if (offset_unlinkedUnits != null) {
1789 fbBuilder.addOffset(2, offset_unlinkedUnits); 1133 fbBuilder.addOffset(2, offset_unlinkedUnits);
1790 } 1134 }
1791 if (offset_unlinkedUnitUris != null) { 1135 if (offset_unlinkedUnitUris != null) {
1792 fbBuilder.addOffset(3, offset_unlinkedUnitUris); 1136 fbBuilder.addOffset(3, offset_unlinkedUnitUris);
1793 } 1137 }
1794 return fbBuilder.endTable(); 1138 return fbBuilder.endTable();
1795 } 1139 }
1796 }
1797 1140
1798 idl.PackageBundle readPackageBundle(List<int> buffer) { 1141 /**
1799 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 1142 * Flush [informative] data recursively.
1800 return const _PackageBundleReader().read(rootRef); 1143 */
1801 } 1144 void flushInformative() {
1802 1145 _linkedLibraries?.forEach((b) => b.flushInformative());
1803 class _PackageBundleReader extends fb.TableReader<_PackageBundleImpl> { 1146 _unlinkedUnits?.forEach((b) => b.flushInformative());
1804 const _PackageBundleReader();
1805
1806 @override
1807 _PackageBundleImpl createObject(fb.BufferPointer bp) => new _PackageBundleImpl (bp);
1808 }
1809
1810 class _PackageBundleImpl extends Object with _PackageBundleMixin implements idl. PackageBundle {
1811 final fb.BufferPointer _bp;
1812
1813 _PackageBundleImpl(this._bp);
1814
1815 List<idl.LinkedLibrary> _linkedLibraries;
1816 List<String> _linkedLibraryUris;
1817 int _majorVersion;
1818 int _minorVersion;
1819 List<String> _unlinkedUnitHashes;
1820 List<idl.UnlinkedUnit> _unlinkedUnits;
1821 List<String> _unlinkedUnitUris;
1822
1823 @override
1824 List<idl.LinkedLibrary> get linkedLibraries {
1825 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib raryReader()).vTableGet(_bp, 0, const <idl.LinkedLibrary>[]);
1826 return _linkedLibraries;
1827 } 1147 }
1828 1148
1829 @override 1149 List<int> toBuffer() {
1830 List<String> get linkedLibraryUris { 1150 fb.Builder fbBuilder = new fb.Builder();
1831 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()). vTableGet(_bp, 1, const <String>[]); 1151 return fbBuilder.finish(finish(fbBuilder), "PBdl");
1832 return _linkedLibraryUris;
1833 } 1152 }
1834
1835 @override
1836 int get majorVersion {
1837 _majorVersion ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
1838 return _majorVersion;
1839 }
1840
1841 @override
1842 int get minorVersion {
1843 _minorVersion ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
1844 return _minorVersion;
1845 }
1846
1847 @override
1848 List<String> get unlinkedUnitHashes {
1849 _unlinkedUnitHashes ??= const fb.ListReader<String>(const fb.StringReader()) .vTableGet(_bp, 4, const <String>[]);
1850 return _unlinkedUnitHashes;
1851 }
1852
1853 @override
1854 List<idl.UnlinkedUnit> get unlinkedUnits {
1855 _unlinkedUnits ??= const fb.ListReader<idl.UnlinkedUnit>(const _UnlinkedUnit Reader()).vTableGet(_bp, 2, const <idl.UnlinkedUnit>[]);
1856 return _unlinkedUnits;
1857 }
1858
1859 @override
1860 List<String> get unlinkedUnitUris {
1861 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v TableGet(_bp, 3, const <String>[]);
1862 return _unlinkedUnitUris;
1863 }
1864 }
1865
1866 abstract class _PackageBundleMixin implements idl.PackageBundle {
1867 @override
1868 Map<String, Object> toJson() {
1869 Map<String, Object> _result = <String, Object>{};
1870 if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries .map((_value) => _value.toJson()).toList();
1871 if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibra ryUris;
1872 if (majorVersion != 0) _result["majorVersion"] = majorVersion;
1873 if (minorVersion != 0) _result["minorVersion"] = minorVersion;
1874 if (unlinkedUnitHashes.isNotEmpty) _result["unlinkedUnitHashes"] = unlinkedU nitHashes;
1875 if (unlinkedUnits.isNotEmpty) _result["unlinkedUnits"] = unlinkedUnits.map(( _value) => _value.toJson()).toList();
1876 if (unlinkedUnitUris.isNotEmpty) _result["unlinkedUnitUris"] = unlinkedUnitU ris;
1877 return _result;
1878 }
1879
1880 @override
1881 Map<String, Object> toMap() => {
1882 "linkedLibraries": linkedLibraries,
1883 "linkedLibraryUris": linkedLibraryUris,
1884 "majorVersion": majorVersion,
1885 "minorVersion": minorVersion,
1886 "unlinkedUnitHashes": unlinkedUnitHashes,
1887 "unlinkedUnits": unlinkedUnits,
1888 "unlinkedUnitUris": unlinkedUnitUris,
1889 };
1890
1891 @override
1892 String toString() => convert.JSON.encode(toJson());
1893 } 1153 }
1894 1154
1895 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl. PackageIndex { 1155 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl. PackageIndex {
1896 bool _finished = false; 1156 bool _finished = false;
1897 1157
1898 List<idl.IndexSyntheticElementKind> _elementKinds; 1158 List<idl.IndexSyntheticElementKind> _elementKinds;
1899 List<int> _elementOffsets; 1159 List<int> _elementOffsets;
1900 List<int> _elementUnits; 1160 List<int> _elementUnits;
1901 List<String> _strings; 1161 List<String> _strings;
1902 List<int> _unitLibraryUris; 1162 List<int> _unitLibraryUris;
1903 List<UnitIndexBuilder> _units; 1163 List<UnitIndexBuilder> _units;
1904 List<int> _unitUnitUris; 1164 List<int> _unitUnitUris;
1905 1165
1166 PackageIndexBuilder({List<idl.IndexSyntheticElementKind> elementKinds, List<in t> elementOffsets, List<int> elementUnits, List<String> strings, List<int> unitL ibraryUris, List<UnitIndexBuilder> units, List<int> unitUnitUris})
1167 : _elementKinds = elementKinds,
1168 _elementOffsets = elementOffsets,
1169 _elementUnits = elementUnits,
1170 _strings = strings,
1171 _unitLibraryUris = unitLibraryUris,
1172 _units = units,
1173 _unitUnitUris = unitUnitUris;
1174
1906 @override 1175 @override
1907 List<idl.IndexSyntheticElementKind> get elementKinds => _elementKinds ??= <idl .IndexSyntheticElementKind>[]; 1176 List<idl.IndexSyntheticElementKind> get elementKinds => _elementKinds ??= <idl .IndexSyntheticElementKind>[];
1908 1177
1909 /** 1178 /**
1910 * Each item of this list corresponds to a unique referenced element. It is 1179 * Each item of this list corresponds to a unique referenced element. It is
1911 * the kind of the synthetic element. 1180 * the kind of the synthetic element.
1912 */ 1181 */
1913 void set elementKinds(List<idl.IndexSyntheticElementKind> _value) { 1182 void set elementKinds(List<idl.IndexSyntheticElementKind> _value) {
1914 assert(!_finished); 1183 assert(!_finished);
1915 _elementKinds = _value; 1184 _elementKinds = _value;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 * Each item of this list corresponds to the unit URI of a unique library 1258 * Each item of this list corresponds to the unit URI of a unique library
1990 * specific unit referenced in the [PackageIndex]. It is an index into 1259 * specific unit referenced in the [PackageIndex]. It is an index into
1991 * [strings] list. 1260 * [strings] list.
1992 */ 1261 */
1993 void set unitUnitUris(List<int> _value) { 1262 void set unitUnitUris(List<int> _value) {
1994 assert(!_finished); 1263 assert(!_finished);
1995 assert(_value == null || _value.every((e) => e >= 0)); 1264 assert(_value == null || _value.every((e) => e >= 0));
1996 _unitUnitUris = _value; 1265 _unitUnitUris = _value;
1997 } 1266 }
1998 1267
1999 PackageIndexBuilder({List<idl.IndexSyntheticElementKind> elementKinds, List<in t> elementOffsets, List<int> elementUnits, List<String> strings, List<int> unitL ibraryUris, List<UnitIndexBuilder> units, List<int> unitUnitUris})
2000 : _elementKinds = elementKinds,
2001 _elementOffsets = elementOffsets,
2002 _elementUnits = elementUnits,
2003 _strings = strings,
2004 _unitLibraryUris = unitLibraryUris,
2005 _units = units,
2006 _unitUnitUris = unitUnitUris;
2007
2008 /**
2009 * Flush [informative] data recursively.
2010 */
2011 void flushInformative() {
2012 _units?.forEach((b) => b.flushInformative());
2013 }
2014
2015 List<int> toBuffer() {
2016 fb.Builder fbBuilder = new fb.Builder();
2017 return fbBuilder.finish(finish(fbBuilder), "Indx");
2018 }
2019
2020 fb.Offset finish(fb.Builder fbBuilder) { 1268 fb.Offset finish(fb.Builder fbBuilder) {
2021 assert(!_finished); 1269 assert(!_finished);
2022 _finished = true; 1270 _finished = true;
2023 fb.Offset offset_elementKinds; 1271 fb.Offset offset_elementKinds;
2024 fb.Offset offset_elementOffsets; 1272 fb.Offset offset_elementOffsets;
2025 fb.Offset offset_elementUnits; 1273 fb.Offset offset_elementUnits;
2026 fb.Offset offset_strings; 1274 fb.Offset offset_strings;
2027 fb.Offset offset_unitLibraryUris; 1275 fb.Offset offset_unitLibraryUris;
2028 fb.Offset offset_units; 1276 fb.Offset offset_units;
2029 fb.Offset offset_unitUnitUris; 1277 fb.Offset offset_unitUnitUris;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 fbBuilder.addOffset(2, offset_unitLibraryUris); 1313 fbBuilder.addOffset(2, offset_unitLibraryUris);
2066 } 1314 }
2067 if (offset_units != null) { 1315 if (offset_units != null) {
2068 fbBuilder.addOffset(4, offset_units); 1316 fbBuilder.addOffset(4, offset_units);
2069 } 1317 }
2070 if (offset_unitUnitUris != null) { 1318 if (offset_unitUnitUris != null) {
2071 fbBuilder.addOffset(3, offset_unitUnitUris); 1319 fbBuilder.addOffset(3, offset_unitUnitUris);
2072 } 1320 }
2073 return fbBuilder.endTable(); 1321 return fbBuilder.endTable();
2074 } 1322 }
2075 }
2076 1323
2077 idl.PackageIndex readPackageIndex(List<int> buffer) { 1324 /**
2078 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 1325 * Flush [informative] data recursively.
2079 return const _PackageIndexReader().read(rootRef); 1326 */
2080 } 1327 void flushInformative() {
2081 1328 _units?.forEach((b) => b.flushInformative());
2082 class _PackageIndexReader extends fb.TableReader<_PackageIndexImpl> {
2083 const _PackageIndexReader();
2084
2085 @override
2086 _PackageIndexImpl createObject(fb.BufferPointer bp) => new _PackageIndexImpl(b p);
2087 }
2088
2089 class _PackageIndexImpl extends Object with _PackageIndexMixin implements idl.Pa ckageIndex {
2090 final fb.BufferPointer _bp;
2091
2092 _PackageIndexImpl(this._bp);
2093
2094 List<idl.IndexSyntheticElementKind> _elementKinds;
2095 List<int> _elementOffsets;
2096 List<int> _elementUnits;
2097 List<String> _strings;
2098 List<int> _unitLibraryUris;
2099 List<idl.UnitIndex> _units;
2100 List<int> _unitUnitUris;
2101
2102 @override
2103 List<idl.IndexSyntheticElementKind> get elementKinds {
2104 _elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>(const _ IndexSyntheticElementKindReader()).vTableGet(_bp, 5, const <idl.IndexSyntheticEl ementKind>[]);
2105 return _elementKinds;
2106 } 1329 }
2107 1330
2108 @override 1331 List<int> toBuffer() {
2109 List<int> get elementOffsets { 1332 fb.Builder fbBuilder = new fb.Builder();
2110 _elementOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int >[]); 1333 return fbBuilder.finish(finish(fbBuilder), "Indx");
2111 return _elementOffsets;
2112 }
2113
2114 @override
2115 List<int> get elementUnits {
2116 _elementUnits ??= const fb.Uint32ListReader().vTableGet(_bp, 0, const <int>[ ]);
2117 return _elementUnits;
2118 }
2119
2120 @override
2121 List<String> get strings {
2122 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet( _bp, 6, const <String>[]);
2123 return _strings;
2124 }
2125
2126 @override
2127 List<int> get unitLibraryUris {
2128 _unitLibraryUris ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <in t>[]);
2129 return _unitLibraryUris;
2130 }
2131
2132 @override
2133 List<idl.UnitIndex> get units {
2134 _units ??= const fb.ListReader<idl.UnitIndex>(const _UnitIndexReader()).vTab leGet(_bp, 4, const <idl.UnitIndex>[]);
2135 return _units;
2136 }
2137
2138 @override
2139 List<int> get unitUnitUris {
2140 _unitUnitUris ??= const fb.Uint32ListReader().vTableGet(_bp, 3, const <int>[ ]);
2141 return _unitUnitUris;
2142 } 1334 }
2143 } 1335 }
2144 1336
2145 abstract class _PackageIndexMixin implements idl.PackageIndex {
2146 @override
2147 Map<String, Object> toJson() {
2148 Map<String, Object> _result = <String, Object>{};
2149 if (elementKinds.isNotEmpty) _result["elementKinds"] = elementKinds.map((_va lue) => _value.toString().split('.')[1]).toList();
2150 if (elementOffsets.isNotEmpty) _result["elementOffsets"] = elementOffsets;
2151 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits;
2152 if (strings.isNotEmpty) _result["strings"] = strings;
2153 if (unitLibraryUris.isNotEmpty) _result["unitLibraryUris"] = unitLibraryUris ;
2154 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson ()).toList();
2155 if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris;
2156 return _result;
2157 }
2158
2159 @override
2160 Map<String, Object> toMap() => {
2161 "elementKinds": elementKinds,
2162 "elementOffsets": elementOffsets,
2163 "elementUnits": elementUnits,
2164 "strings": strings,
2165 "unitLibraryUris": unitLibraryUris,
2166 "units": units,
2167 "unitUnitUris": unitUnitUris,
2168 };
2169
2170 @override
2171 String toString() => convert.JSON.encode(toJson());
2172 }
2173
2174 class UnitIndexBuilder extends Object with _UnitIndexMixin implements idl.UnitIn dex { 1337 class UnitIndexBuilder extends Object with _UnitIndexMixin implements idl.UnitIn dex {
2175 bool _finished = false; 1338 bool _finished = false;
2176 1339
2177 List<idl.IndexNameKind> _definedNameKinds; 1340 List<idl.IndexNameKind> _definedNameKinds;
2178 List<int> _definedNameOffsets; 1341 List<int> _definedNameOffsets;
2179 List<int> _definedNames; 1342 List<int> _definedNames;
2180 int _unit; 1343 int _unit;
2181 List<bool> _usedElementIsQualifiedFlags; 1344 List<bool> _usedElementIsQualifiedFlags;
2182 List<idl.IndexRelationKind> _usedElementKinds; 1345 List<idl.IndexRelationKind> _usedElementKinds;
2183 List<int> _usedElementLengths; 1346 List<int> _usedElementLengths;
2184 List<int> _usedElementOffsets; 1347 List<int> _usedElementOffsets;
2185 List<int> _usedElements; 1348 List<int> _usedElements;
2186 List<bool> _usedNameIsQualifiedFlags; 1349 List<bool> _usedNameIsQualifiedFlags;
2187 List<idl.IndexRelationKind> _usedNameKinds; 1350 List<idl.IndexRelationKind> _usedNameKinds;
2188 List<int> _usedNameOffsets; 1351 List<int> _usedNameOffsets;
2189 List<int> _usedNames; 1352 List<int> _usedNames;
2190 1353
1354 UnitIndexBuilder({List<idl.IndexNameKind> definedNameKinds, List<int> definedN ameOffsets, List<int> definedNames, int unit, List<bool> usedElementIsQualifiedF lags, List<idl.IndexRelationKind> usedElementKinds, List<int> usedElementLengths , List<int> usedElementOffsets, List<int> usedElements, List<bool> usedNameIsQua lifiedFlags, List<idl.IndexRelationKind> usedNameKinds, List<int> usedNameOffset s, List<int> usedNames})
1355 : _definedNameKinds = definedNameKinds,
1356 _definedNameOffsets = definedNameOffsets,
1357 _definedNames = definedNames,
1358 _unit = unit,
1359 _usedElementIsQualifiedFlags = usedElementIsQualifiedFlags,
1360 _usedElementKinds = usedElementKinds,
1361 _usedElementLengths = usedElementLengths,
1362 _usedElementOffsets = usedElementOffsets,
1363 _usedElements = usedElements,
1364 _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags,
1365 _usedNameKinds = usedNameKinds,
1366 _usedNameOffsets = usedNameOffsets,
1367 _usedNames = usedNames;
1368
2191 @override 1369 @override
2192 List<idl.IndexNameKind> get definedNameKinds => _definedNameKinds ??= <idl.Ind exNameKind>[]; 1370 List<idl.IndexNameKind> get definedNameKinds => _definedNameKinds ??= <idl.Ind exNameKind>[];
2193 1371
2194 /** 1372 /**
2195 * Each item of this list is the kind of an element defined in this unit. 1373 * Each item of this list is the kind of an element defined in this unit.
2196 */ 1374 */
2197 void set definedNameKinds(List<idl.IndexNameKind> _value) { 1375 void set definedNameKinds(List<idl.IndexNameKind> _value) {
2198 assert(!_finished); 1376 assert(!_finished);
2199 _definedNameKinds = _value; 1377 _definedNameKinds = _value;
2200 } 1378 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 * Each item of this list is the index into [PackageIndex.strings] for a 1523 * Each item of this list is the index into [PackageIndex.strings] for a
2346 * used name. The list is sorted in ascending order, so that the client can 1524 * used name. The list is sorted in ascending order, so that the client can
2347 * quickly find name uses in this [UnitIndex]. 1525 * quickly find name uses in this [UnitIndex].
2348 */ 1526 */
2349 void set usedNames(List<int> _value) { 1527 void set usedNames(List<int> _value) {
2350 assert(!_finished); 1528 assert(!_finished);
2351 assert(_value == null || _value.every((e) => e >= 0)); 1529 assert(_value == null || _value.every((e) => e >= 0));
2352 _usedNames = _value; 1530 _usedNames = _value;
2353 } 1531 }
2354 1532
2355 UnitIndexBuilder({List<idl.IndexNameKind> definedNameKinds, List<int> definedN ameOffsets, List<int> definedNames, int unit, List<bool> usedElementIsQualifiedF lags, List<idl.IndexRelationKind> usedElementKinds, List<int> usedElementLengths , List<int> usedElementOffsets, List<int> usedElements, List<bool> usedNameIsQua lifiedFlags, List<idl.IndexRelationKind> usedNameKinds, List<int> usedNameOffset s, List<int> usedNames})
2356 : _definedNameKinds = definedNameKinds,
2357 _definedNameOffsets = definedNameOffsets,
2358 _definedNames = definedNames,
2359 _unit = unit,
2360 _usedElementIsQualifiedFlags = usedElementIsQualifiedFlags,
2361 _usedElementKinds = usedElementKinds,
2362 _usedElementLengths = usedElementLengths,
2363 _usedElementOffsets = usedElementOffsets,
2364 _usedElements = usedElements,
2365 _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags,
2366 _usedNameKinds = usedNameKinds,
2367 _usedNameOffsets = usedNameOffsets,
2368 _usedNames = usedNames;
2369
2370 /**
2371 * Flush [informative] data recursively.
2372 */
2373 void flushInformative() {
2374 }
2375
2376 fb.Offset finish(fb.Builder fbBuilder) { 1533 fb.Offset finish(fb.Builder fbBuilder) {
2377 assert(!_finished); 1534 assert(!_finished);
2378 _finished = true; 1535 _finished = true;
2379 fb.Offset offset_definedNameKinds; 1536 fb.Offset offset_definedNameKinds;
2380 fb.Offset offset_definedNameOffsets; 1537 fb.Offset offset_definedNameOffsets;
2381 fb.Offset offset_definedNames; 1538 fb.Offset offset_definedNames;
2382 fb.Offset offset_usedElementIsQualifiedFlags; 1539 fb.Offset offset_usedElementIsQualifiedFlags;
2383 fb.Offset offset_usedElementKinds; 1540 fb.Offset offset_usedElementKinds;
2384 fb.Offset offset_usedElementLengths; 1541 fb.Offset offset_usedElementLengths;
2385 fb.Offset offset_usedElementOffsets; 1542 fb.Offset offset_usedElementOffsets;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 fbBuilder.addOffset(10, offset_usedNameKinds); 1616 fbBuilder.addOffset(10, offset_usedNameKinds);
2460 } 1617 }
2461 if (offset_usedNameOffsets != null) { 1618 if (offset_usedNameOffsets != null) {
2462 fbBuilder.addOffset(9, offset_usedNameOffsets); 1619 fbBuilder.addOffset(9, offset_usedNameOffsets);
2463 } 1620 }
2464 if (offset_usedNames != null) { 1621 if (offset_usedNames != null) {
2465 fbBuilder.addOffset(8, offset_usedNames); 1622 fbBuilder.addOffset(8, offset_usedNames);
2466 } 1623 }
2467 return fbBuilder.endTable(); 1624 return fbBuilder.endTable();
2468 } 1625 }
2469 }
2470 1626
2471 class _UnitIndexReader extends fb.TableReader<_UnitIndexImpl> { 1627 /**
2472 const _UnitIndexReader(); 1628 * Flush [informative] data recursively.
2473 1629 */
2474 @override 1630 void flushInformative() {
2475 _UnitIndexImpl createObject(fb.BufferPointer bp) => new _UnitIndexImpl(bp);
2476 }
2477
2478 class _UnitIndexImpl extends Object with _UnitIndexMixin implements idl.UnitInde x {
2479 final fb.BufferPointer _bp;
2480
2481 _UnitIndexImpl(this._bp);
2482
2483 List<idl.IndexNameKind> _definedNameKinds;
2484 List<int> _definedNameOffsets;
2485 List<int> _definedNames;
2486 int _unit;
2487 List<bool> _usedElementIsQualifiedFlags;
2488 List<idl.IndexRelationKind> _usedElementKinds;
2489 List<int> _usedElementLengths;
2490 List<int> _usedElementOffsets;
2491 List<int> _usedElements;
2492 List<bool> _usedNameIsQualifiedFlags;
2493 List<idl.IndexRelationKind> _usedNameKinds;
2494 List<int> _usedNameOffsets;
2495 List<int> _usedNames;
2496
2497 @override
2498 List<idl.IndexNameKind> get definedNameKinds {
2499 _definedNameKinds ??= const fb.ListReader<idl.IndexNameKind>(const _IndexNam eKindReader()).vTableGet(_bp, 6, const <idl.IndexNameKind>[]);
2500 return _definedNameKinds;
2501 } 1631 }
2502
2503 @override
2504 List<int> get definedNameOffsets {
2505 _definedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 7, const <int>[]);
2506 return _definedNameOffsets;
2507 }
2508
2509 @override
2510 List<int> get definedNames {
2511 _definedNames ??= const fb.Uint32ListReader().vTableGet(_bp, 5, const <int>[ ]);
2512 return _definedNames;
2513 }
2514
2515 @override
2516 int get unit {
2517 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
2518 return _unit;
2519 }
2520
2521 @override
2522 List<bool> get usedElementIsQualifiedFlags {
2523 _usedElementIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bp, 11 , const <bool>[]);
2524 return _usedElementIsQualifiedFlags;
2525 }
2526
2527 @override
2528 List<idl.IndexRelationKind> get usedElementKinds {
2529 _usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _Inde xRelationKindReader()).vTableGet(_bp, 4, const <idl.IndexRelationKind>[]);
2530 return _usedElementKinds;
2531 }
2532
2533 @override
2534 List<int> get usedElementLengths {
2535 _usedElementLengths ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
2536 return _usedElementLengths;
2537 }
2538
2539 @override
2540 List<int> get usedElementOffsets {
2541 _usedElementOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]);
2542 return _usedElementOffsets;
2543 }
2544
2545 @override
2546 List<int> get usedElements {
2547 _usedElements ??= const fb.Uint32ListReader().vTableGet(_bp, 3, const <int>[ ]);
2548 return _usedElements;
2549 }
2550
2551 @override
2552 List<bool> get usedNameIsQualifiedFlags {
2553 _usedNameIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bp, 12, c onst <bool>[]);
2554 return _usedNameIsQualifiedFlags;
2555 }
2556
2557 @override
2558 List<idl.IndexRelationKind> get usedNameKinds {
2559 _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _IndexRe lationKindReader()).vTableGet(_bp, 10, const <idl.IndexRelationKind>[]);
2560 return _usedNameKinds;
2561 }
2562
2563 @override
2564 List<int> get usedNameOffsets {
2565 _usedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 9, const <in t>[]);
2566 return _usedNameOffsets;
2567 }
2568
2569 @override
2570 List<int> get usedNames {
2571 _usedNames ??= const fb.Uint32ListReader().vTableGet(_bp, 8, const <int>[]);
2572 return _usedNames;
2573 }
2574 }
2575
2576 abstract class _UnitIndexMixin implements idl.UnitIndex {
2577 @override
2578 Map<String, Object> toJson() {
2579 Map<String, Object> _result = <String, Object>{};
2580 if (definedNameKinds.isNotEmpty) _result["definedNameKinds"] = definedNameKi nds.map((_value) => _value.toString().split('.')[1]).toList();
2581 if (definedNameOffsets.isNotEmpty) _result["definedNameOffsets"] = definedNa meOffsets;
2582 if (definedNames.isNotEmpty) _result["definedNames"] = definedNames;
2583 if (unit != 0) _result["unit"] = unit;
2584 if (usedElementIsQualifiedFlags.isNotEmpty) _result["usedElementIsQualifiedF lags"] = usedElementIsQualifiedFlags;
2585 if (usedElementKinds.isNotEmpty) _result["usedElementKinds"] = usedElementKi nds.map((_value) => _value.toString().split('.')[1]).toList();
2586 if (usedElementLengths.isNotEmpty) _result["usedElementLengths"] = usedEleme ntLengths;
2587 if (usedElementOffsets.isNotEmpty) _result["usedElementOffsets"] = usedEleme ntOffsets;
2588 if (usedElements.isNotEmpty) _result["usedElements"] = usedElements;
2589 if (usedNameIsQualifiedFlags.isNotEmpty) _result["usedNameIsQualifiedFlags"] = usedNameIsQualifiedFlags;
2590 if (usedNameKinds.isNotEmpty) _result["usedNameKinds"] = usedNameKinds.map(( _value) => _value.toString().split('.')[1]).toList();
2591 if (usedNameOffsets.isNotEmpty) _result["usedNameOffsets"] = usedNameOffsets ;
2592 if (usedNames.isNotEmpty) _result["usedNames"] = usedNames;
2593 return _result;
2594 }
2595
2596 @override
2597 Map<String, Object> toMap() => {
2598 "definedNameKinds": definedNameKinds,
2599 "definedNameOffsets": definedNameOffsets,
2600 "definedNames": definedNames,
2601 "unit": unit,
2602 "usedElementIsQualifiedFlags": usedElementIsQualifiedFlags,
2603 "usedElementKinds": usedElementKinds,
2604 "usedElementLengths": usedElementLengths,
2605 "usedElementOffsets": usedElementOffsets,
2606 "usedElements": usedElements,
2607 "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags,
2608 "usedNameKinds": usedNameKinds,
2609 "usedNameOffsets": usedNameOffsets,
2610 "usedNames": usedNames,
2611 };
2612
2613 @override
2614 String toString() => convert.JSON.encode(toJson());
2615 } 1632 }
2616 1633
2617 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id l.UnlinkedClass { 1634 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id l.UnlinkedClass {
2618 bool _finished = false; 1635 bool _finished = false;
2619 1636
2620 List<UnlinkedConstBuilder> _annotations; 1637 List<UnlinkedConstBuilder> _annotations;
2621 CodeRangeBuilder _codeRange; 1638 CodeRangeBuilder _codeRange;
2622 UnlinkedDocumentationCommentBuilder _documentationComment; 1639 UnlinkedDocumentationCommentBuilder _documentationComment;
2623 List<UnlinkedExecutableBuilder> _executables; 1640 List<UnlinkedExecutableBuilder> _executables;
2624 List<UnlinkedVariableBuilder> _fields; 1641 List<UnlinkedVariableBuilder> _fields;
2625 bool _hasNoSupertype; 1642 bool _hasNoSupertype;
2626 List<EntityRefBuilder> _interfaces; 1643 List<EntityRefBuilder> _interfaces;
2627 bool _isAbstract; 1644 bool _isAbstract;
2628 bool _isMixinApplication; 1645 bool _isMixinApplication;
2629 List<EntityRefBuilder> _mixins; 1646 List<EntityRefBuilder> _mixins;
2630 String _name; 1647 String _name;
2631 int _nameOffset; 1648 int _nameOffset;
2632 EntityRefBuilder _supertype; 1649 EntityRefBuilder _supertype;
2633 List<UnlinkedTypeParamBuilder> _typeParameters; 1650 List<UnlinkedTypeParamBuilder> _typeParameters;
2634 1651
1652 UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, List<Unlin kedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool ha sNoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinAp plication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRef Builder supertype, List<UnlinkedTypeParamBuilder> typeParameters})
1653 : _annotations = annotations,
1654 _codeRange = codeRange,
1655 _documentationComment = documentationComment,
1656 _executables = executables,
1657 _fields = fields,
1658 _hasNoSupertype = hasNoSupertype,
1659 _interfaces = interfaces,
1660 _isAbstract = isAbstract,
1661 _isMixinApplication = isMixinApplication,
1662 _mixins = mixins,
1663 _name = name,
1664 _nameOffset = nameOffset,
1665 _supertype = supertype,
1666 _typeParameters = typeParameters;
1667
2635 @override 1668 @override
2636 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 1669 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
2637 1670
2638 /** 1671 /**
2639 * Annotations for this class. 1672 * Annotations for this class.
2640 */ 1673 */
2641 void set annotations(List<UnlinkedConstBuilder> _value) { 1674 void set annotations(List<UnlinkedConstBuilder> _value) {
2642 assert(!_finished); 1675 assert(!_finished);
2643 _annotations = _value; 1676 _annotations = _value;
2644 } 1677 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli nkedTypeParamBuilder>[]; 1817 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli nkedTypeParamBuilder>[];
2785 1818
2786 /** 1819 /**
2787 * Type parameters of the class, if any. 1820 * Type parameters of the class, if any.
2788 */ 1821 */
2789 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 1822 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
2790 assert(!_finished); 1823 assert(!_finished);
2791 _typeParameters = _value; 1824 _typeParameters = _value;
2792 } 1825 }
2793 1826
2794 UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, List<Unlin kedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool ha sNoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinAp plication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRef Builder supertype, List<UnlinkedTypeParamBuilder> typeParameters})
2795 : _annotations = annotations,
2796 _codeRange = codeRange,
2797 _documentationComment = documentationComment,
2798 _executables = executables,
2799 _fields = fields,
2800 _hasNoSupertype = hasNoSupertype,
2801 _interfaces = interfaces,
2802 _isAbstract = isAbstract,
2803 _isMixinApplication = isMixinApplication,
2804 _mixins = mixins,
2805 _name = name,
2806 _nameOffset = nameOffset,
2807 _supertype = supertype,
2808 _typeParameters = typeParameters;
2809
2810 /**
2811 * Flush [informative] data recursively.
2812 */
2813 void flushInformative() {
2814 _annotations?.forEach((b) => b.flushInformative());
2815 _codeRange = null;
2816 _documentationComment = null;
2817 _executables?.forEach((b) => b.flushInformative());
2818 _fields?.forEach((b) => b.flushInformative());
2819 _interfaces?.forEach((b) => b.flushInformative());
2820 _mixins?.forEach((b) => b.flushInformative());
2821 _nameOffset = null;
2822 _supertype?.flushInformative();
2823 _typeParameters?.forEach((b) => b.flushInformative());
2824 }
2825
2826 fb.Offset finish(fb.Builder fbBuilder) { 1827 fb.Offset finish(fb.Builder fbBuilder) {
2827 assert(!_finished); 1828 assert(!_finished);
2828 _finished = true; 1829 _finished = true;
2829 fb.Offset offset_annotations; 1830 fb.Offset offset_annotations;
2830 fb.Offset offset_codeRange; 1831 fb.Offset offset_codeRange;
2831 fb.Offset offset_documentationComment; 1832 fb.Offset offset_documentationComment;
2832 fb.Offset offset_executables; 1833 fb.Offset offset_executables;
2833 fb.Offset offset_fields; 1834 fb.Offset offset_fields;
2834 fb.Offset offset_interfaces; 1835 fb.Offset offset_interfaces;
2835 fb.Offset offset_mixins; 1836 fb.Offset offset_mixins;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2904 fbBuilder.addUint32(1, _nameOffset); 1905 fbBuilder.addUint32(1, _nameOffset);
2905 } 1906 }
2906 if (offset_supertype != null) { 1907 if (offset_supertype != null) {
2907 fbBuilder.addOffset(3, offset_supertype); 1908 fbBuilder.addOffset(3, offset_supertype);
2908 } 1909 }
2909 if (offset_typeParameters != null) { 1910 if (offset_typeParameters != null) {
2910 fbBuilder.addOffset(9, offset_typeParameters); 1911 fbBuilder.addOffset(9, offset_typeParameters);
2911 } 1912 }
2912 return fbBuilder.endTable(); 1913 return fbBuilder.endTable();
2913 } 1914 }
2914 }
2915 1915
2916 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> { 1916 /**
2917 const _UnlinkedClassReader(); 1917 * Flush [informative] data recursively.
2918 1918 */
2919 @override 1919 void flushInformative() {
2920 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl (bp); 1920 _annotations?.forEach((b) => b.flushInformative());
2921 } 1921 _codeRange = null;
2922 1922 _documentationComment = null;
2923 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl. UnlinkedClass { 1923 _executables?.forEach((b) => b.flushInformative());
2924 final fb.BufferPointer _bp; 1924 _fields?.forEach((b) => b.flushInformative());
2925 1925 _interfaces?.forEach((b) => b.flushInformative());
2926 _UnlinkedClassImpl(this._bp); 1926 _mixins?.forEach((b) => b.flushInformative());
2927 1927 _nameOffset = null;
2928 List<idl.UnlinkedConst> _annotations; 1928 _supertype?.flushInformative();
2929 idl.CodeRange _codeRange; 1929 _typeParameters?.forEach((b) => b.flushInformative());
2930 idl.UnlinkedDocumentationComment _documentationComment;
2931 List<idl.UnlinkedExecutable> _executables;
2932 List<idl.UnlinkedVariable> _fields;
2933 bool _hasNoSupertype;
2934 List<idl.EntityRef> _interfaces;
2935 bool _isAbstract;
2936 bool _isMixinApplication;
2937 List<idl.EntityRef> _mixins;
2938 String _name;
2939 int _nameOffset;
2940 idl.EntityRef _supertype;
2941 List<idl.UnlinkedTypeParam> _typeParameters;
2942
2943 @override
2944 List<idl.UnlinkedConst> get annotations {
2945 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 5, const <idl.UnlinkedConst>[]);
2946 return _annotations;
2947 } 1930 }
2948
2949 @override
2950 idl.CodeRange get codeRange {
2951 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 13, null);
2952 return _codeRange;
2953 }
2954
2955 @override
2956 idl.UnlinkedDocumentationComment get documentationComment {
2957 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 6, null);
2958 return _documentationComment;
2959 }
2960
2961 @override
2962 List<idl.UnlinkedExecutable> get executables {
2963 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]);
2964 return _executables;
2965 }
2966
2967 @override
2968 List<idl.UnlinkedVariable> get fields {
2969 _fields ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVariabl eReader()).vTableGet(_bp, 4, const <idl.UnlinkedVariable>[]);
2970 return _fields;
2971 }
2972
2973 @override
2974 bool get hasNoSupertype {
2975 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 12, false);
2976 return _hasNoSupertype;
2977 }
2978
2979 @override
2980 List<idl.EntityRef> get interfaces {
2981 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) .vTableGet(_bp, 7, const <idl.EntityRef>[]);
2982 return _interfaces;
2983 }
2984
2985 @override
2986 bool get isAbstract {
2987 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 8, false);
2988 return _isAbstract;
2989 }
2990
2991 @override
2992 bool get isMixinApplication {
2993 _isMixinApplication ??= const fb.BoolReader().vTableGet(_bp, 11, false);
2994 return _isMixinApplication;
2995 }
2996
2997 @override
2998 List<idl.EntityRef> get mixins {
2999 _mixins ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTa bleGet(_bp, 10, const <idl.EntityRef>[]);
3000 return _mixins;
3001 }
3002
3003 @override
3004 String get name {
3005 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
3006 return _name;
3007 }
3008
3009 @override
3010 int get nameOffset {
3011 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
3012 return _nameOffset;
3013 }
3014
3015 @override
3016 idl.EntityRef get supertype {
3017 _supertype ??= const _EntityRefReader().vTableGet(_bp, 3, null);
3018 return _supertype;
3019 }
3020
3021 @override
3022 List<idl.UnlinkedTypeParam> get typeParameters {
3023 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink edTypeParamReader()).vTableGet(_bp, 9, const <idl.UnlinkedTypeParam>[]);
3024 return _typeParameters;
3025 }
3026 }
3027
3028 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass {
3029 @override
3030 Map<String, Object> toJson() {
3031 Map<String, Object> _result = <String, Object>{};
3032 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
3033 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
3034 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
3035 if (executables.isNotEmpty) _result["executables"] = executables.map((_value ) => _value.toJson()).toList();
3036 if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJ son()).toList();
3037 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype;
3038 if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) = > _value.toJson()).toList();
3039 if (isAbstract != false) _result["isAbstract"] = isAbstract;
3040 if (isMixinApplication != false) _result["isMixinApplication"] = isMixinAppl ication;
3041 if (mixins.isNotEmpty) _result["mixins"] = mixins.map((_value) => _value.toJ son()).toList();
3042 if (name != '') _result["name"] = name;
3043 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
3044 if (supertype != null) _result["supertype"] = supertype.toJson();
3045 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList();
3046 return _result;
3047 }
3048
3049 @override
3050 Map<String, Object> toMap() => {
3051 "annotations": annotations,
3052 "codeRange": codeRange,
3053 "documentationComment": documentationComment,
3054 "executables": executables,
3055 "fields": fields,
3056 "hasNoSupertype": hasNoSupertype,
3057 "interfaces": interfaces,
3058 "isAbstract": isAbstract,
3059 "isMixinApplication": isMixinApplication,
3060 "mixins": mixins,
3061 "name": name,
3062 "nameOffset": nameOffset,
3063 "supertype": supertype,
3064 "typeParameters": typeParameters,
3065 };
3066
3067 @override
3068 String toString() => convert.JSON.encode(toJson());
3069 } 1931 }
3070 1932
3071 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp lements idl.UnlinkedCombinator { 1933 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp lements idl.UnlinkedCombinator {
3072 bool _finished = false; 1934 bool _finished = false;
3073 1935
3074 int _end; 1936 int _end;
3075 List<String> _hides; 1937 List<String> _hides;
3076 int _offset; 1938 int _offset;
3077 List<String> _shows; 1939 List<String> _shows;
3078 1940
1941 UnlinkedCombinatorBuilder({int end, List<String> hides, int offset, List<Strin g> shows})
1942 : _end = end,
1943 _hides = hides,
1944 _offset = offset,
1945 _shows = shows;
1946
3079 @override 1947 @override
3080 int get end => _end ??= 0; 1948 int get end => _end ??= 0;
3081 1949
3082 /** 1950 /**
3083 * If this is a `show` combinator, offset of the end of the list of shown 1951 * If this is a `show` combinator, offset of the end of the list of shown
3084 * names. Otherwise zero. 1952 * names. Otherwise zero.
3085 */ 1953 */
3086 void set end(int _value) { 1954 void set end(int _value) {
3087 assert(!_finished); 1955 assert(!_finished);
3088 assert(_value == null || _value >= 0); 1956 assert(_value == null || _value >= 0);
(...skipping 28 matching lines...) Expand all
3117 List<String> get shows => _shows ??= <String>[]; 1985 List<String> get shows => _shows ??= <String>[];
3118 1986
3119 /** 1987 /**
3120 * List of names which are shown. Empty if this is a `hide` combinator. 1988 * List of names which are shown. Empty if this is a `hide` combinator.
3121 */ 1989 */
3122 void set shows(List<String> _value) { 1990 void set shows(List<String> _value) {
3123 assert(!_finished); 1991 assert(!_finished);
3124 _shows = _value; 1992 _shows = _value;
3125 } 1993 }
3126 1994
3127 UnlinkedCombinatorBuilder({int end, List<String> hides, int offset, List<Strin g> shows})
3128 : _end = end,
3129 _hides = hides,
3130 _offset = offset,
3131 _shows = shows;
3132
3133 /**
3134 * Flush [informative] data recursively.
3135 */
3136 void flushInformative() {
3137 _end = null;
3138 _offset = null;
3139 }
3140
3141 fb.Offset finish(fb.Builder fbBuilder) { 1995 fb.Offset finish(fb.Builder fbBuilder) {
3142 assert(!_finished); 1996 assert(!_finished);
3143 _finished = true; 1997 _finished = true;
3144 fb.Offset offset_hides; 1998 fb.Offset offset_hides;
3145 fb.Offset offset_shows; 1999 fb.Offset offset_shows;
3146 if (!(_hides == null || _hides.isEmpty)) { 2000 if (!(_hides == null || _hides.isEmpty)) {
3147 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString (b)).toList()); 2001 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString (b)).toList());
3148 } 2002 }
3149 if (!(_shows == null || _shows.isEmpty)) { 2003 if (!(_shows == null || _shows.isEmpty)) {
3150 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString (b)).toList()); 2004 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString (b)).toList());
3151 } 2005 }
3152 fbBuilder.startTable(); 2006 fbBuilder.startTable();
3153 if (_end != null && _end != 0) { 2007 if (_end != null && _end != 0) {
3154 fbBuilder.addUint32(3, _end); 2008 fbBuilder.addUint32(3, _end);
3155 } 2009 }
3156 if (offset_hides != null) { 2010 if (offset_hides != null) {
3157 fbBuilder.addOffset(1, offset_hides); 2011 fbBuilder.addOffset(1, offset_hides);
3158 } 2012 }
3159 if (_offset != null && _offset != 0) { 2013 if (_offset != null && _offset != 0) {
3160 fbBuilder.addUint32(2, _offset); 2014 fbBuilder.addUint32(2, _offset);
3161 } 2015 }
3162 if (offset_shows != null) { 2016 if (offset_shows != null) {
3163 fbBuilder.addOffset(0, offset_shows); 2017 fbBuilder.addOffset(0, offset_shows);
3164 } 2018 }
3165 return fbBuilder.endTable(); 2019 return fbBuilder.endTable();
3166 } 2020 }
3167 }
3168 2021
3169 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl> { 2022 /**
3170 const _UnlinkedCombinatorReader(); 2023 * Flush [informative] data recursively.
3171 2024 */
3172 @override 2025 void flushInformative() {
3173 _UnlinkedCombinatorImpl createObject(fb.BufferPointer bp) => new _UnlinkedComb inatorImpl(bp); 2026 _end = null;
3174 } 2027 _offset = null;
3175
3176 class _UnlinkedCombinatorImpl extends Object with _UnlinkedCombinatorMixin imple ments idl.UnlinkedCombinator {
3177 final fb.BufferPointer _bp;
3178
3179 _UnlinkedCombinatorImpl(this._bp);
3180
3181 int _end;
3182 List<String> _hides;
3183 int _offset;
3184 List<String> _shows;
3185
3186 @override
3187 int get end {
3188 _end ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
3189 return _end;
3190 }
3191
3192 @override
3193 List<String> get hides {
3194 _hides ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
3195 return _hides;
3196 }
3197
3198 @override
3199 int get offset {
3200 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
3201 return _offset;
3202 }
3203
3204 @override
3205 List<String> get shows {
3206 _shows ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 0, const <String>[]);
3207 return _shows;
3208 } 2028 }
3209 } 2029 }
3210 2030
3211 abstract class _UnlinkedCombinatorMixin implements idl.UnlinkedCombinator {
3212 @override
3213 Map<String, Object> toJson() {
3214 Map<String, Object> _result = <String, Object>{};
3215 if (end != 0) _result["end"] = end;
3216 if (hides.isNotEmpty) _result["hides"] = hides;
3217 if (offset != 0) _result["offset"] = offset;
3218 if (shows.isNotEmpty) _result["shows"] = shows;
3219 return _result;
3220 }
3221
3222 @override
3223 Map<String, Object> toMap() => {
3224 "end": end,
3225 "hides": hides,
3226 "offset": offset,
3227 "shows": shows,
3228 };
3229
3230 @override
3231 String toString() => convert.JSON.encode(toJson());
3232 }
3233
3234 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements id l.UnlinkedConst { 2031 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements id l.UnlinkedConst {
3235 bool _finished = false; 2032 bool _finished = false;
3236 2033
3237 List<double> _doubles; 2034 List<double> _doubles;
3238 List<int> _ints; 2035 List<int> _ints;
3239 bool _isInvalid; 2036 bool _isInvalid;
3240 List<idl.UnlinkedConstOperation> _operations; 2037 List<idl.UnlinkedConstOperation> _operations;
3241 List<EntityRefBuilder> _references; 2038 List<EntityRefBuilder> _references;
3242 List<String> _strings; 2039 List<String> _strings;
3243 2040
2041 UnlinkedConstBuilder({List<double> doubles, List<int> ints, bool isInvalid, Li st<idl.UnlinkedConstOperation> operations, List<EntityRefBuilder> references, Li st<String> strings})
2042 : _doubles = doubles,
2043 _ints = ints,
2044 _isInvalid = isInvalid,
2045 _operations = operations,
2046 _references = references,
2047 _strings = strings;
2048
3244 @override 2049 @override
3245 List<double> get doubles => _doubles ??= <double>[]; 2050 List<double> get doubles => _doubles ??= <double>[];
3246 2051
3247 /** 2052 /**
3248 * Sequence of 64-bit doubles consumed by the operation `pushDouble`. 2053 * Sequence of 64-bit doubles consumed by the operation `pushDouble`.
3249 */ 2054 */
3250 void set doubles(List<double> _value) { 2055 void set doubles(List<double> _value) {
3251 assert(!_finished); 2056 assert(!_finished);
3252 _doubles = _value; 2057 _doubles = _value;
3253 } 2058 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
3309 2114
3310 /** 2115 /**
3311 * Sequence of strings consumed by the operations `pushString` and 2116 * Sequence of strings consumed by the operations `pushString` and
3312 * `invokeConstructor`. 2117 * `invokeConstructor`.
3313 */ 2118 */
3314 void set strings(List<String> _value) { 2119 void set strings(List<String> _value) {
3315 assert(!_finished); 2120 assert(!_finished);
3316 _strings = _value; 2121 _strings = _value;
3317 } 2122 }
3318 2123
3319 UnlinkedConstBuilder({List<double> doubles, List<int> ints, bool isInvalid, Li st<idl.UnlinkedConstOperation> operations, List<EntityRefBuilder> references, Li st<String> strings})
3320 : _doubles = doubles,
3321 _ints = ints,
3322 _isInvalid = isInvalid,
3323 _operations = operations,
3324 _references = references,
3325 _strings = strings;
3326
3327 /**
3328 * Flush [informative] data recursively.
3329 */
3330 void flushInformative() {
3331 _references?.forEach((b) => b.flushInformative());
3332 }
3333
3334 fb.Offset finish(fb.Builder fbBuilder) { 2124 fb.Offset finish(fb.Builder fbBuilder) {
3335 assert(!_finished); 2125 assert(!_finished);
3336 _finished = true; 2126 _finished = true;
3337 fb.Offset offset_doubles; 2127 fb.Offset offset_doubles;
3338 fb.Offset offset_ints; 2128 fb.Offset offset_ints;
3339 fb.Offset offset_operations; 2129 fb.Offset offset_operations;
3340 fb.Offset offset_references; 2130 fb.Offset offset_references;
3341 fb.Offset offset_strings; 2131 fb.Offset offset_strings;
3342 if (!(_doubles == null || _doubles.isEmpty)) { 2132 if (!(_doubles == null || _doubles.isEmpty)) {
3343 offset_doubles = fbBuilder.writeListFloat64(_doubles); 2133 offset_doubles = fbBuilder.writeListFloat64(_doubles);
(...skipping 24 matching lines...) Expand all
3368 fbBuilder.addOffset(0, offset_operations); 2158 fbBuilder.addOffset(0, offset_operations);
3369 } 2159 }
3370 if (offset_references != null) { 2160 if (offset_references != null) {
3371 fbBuilder.addOffset(2, offset_references); 2161 fbBuilder.addOffset(2, offset_references);
3372 } 2162 }
3373 if (offset_strings != null) { 2163 if (offset_strings != null) {
3374 fbBuilder.addOffset(3, offset_strings); 2164 fbBuilder.addOffset(3, offset_strings);
3375 } 2165 }
3376 return fbBuilder.endTable(); 2166 return fbBuilder.endTable();
3377 } 2167 }
3378 }
3379 2168
3380 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> { 2169 /**
3381 const _UnlinkedConstReader(); 2170 * Flush [informative] data recursively.
3382 2171 */
3383 @override 2172 void flushInformative() {
3384 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl (bp); 2173 _references?.forEach((b) => b.flushInformative());
3385 }
3386
3387 class _UnlinkedConstImpl extends Object with _UnlinkedConstMixin implements idl. UnlinkedConst {
3388 final fb.BufferPointer _bp;
3389
3390 _UnlinkedConstImpl(this._bp);
3391
3392 List<double> _doubles;
3393 List<int> _ints;
3394 bool _isInvalid;
3395 List<idl.UnlinkedConstOperation> _operations;
3396 List<idl.EntityRef> _references;
3397 List<String> _strings;
3398
3399 @override
3400 List<double> get doubles {
3401 _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 4, const <double>[] );
3402 return _doubles;
3403 } 2174 }
3404
3405 @override
3406 List<int> get ints {
3407 _ints ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
3408 return _ints;
3409 }
3410
3411 @override
3412 bool get isInvalid {
3413 _isInvalid ??= const fb.BoolReader().vTableGet(_bp, 5, false);
3414 return _isInvalid;
3415 }
3416
3417 @override
3418 List<idl.UnlinkedConstOperation> get operations {
3419 _operations ??= const fb.ListReader<idl.UnlinkedConstOperation>(const _Unlin kedConstOperationReader()).vTableGet(_bp, 0, const <idl.UnlinkedConstOperation>[ ]);
3420 return _operations;
3421 }
3422
3423 @override
3424 List<idl.EntityRef> get references {
3425 _references ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) .vTableGet(_bp, 2, const <idl.EntityRef>[]);
3426 return _references;
3427 }
3428
3429 @override
3430 List<String> get strings {
3431 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet( _bp, 3, const <String>[]);
3432 return _strings;
3433 }
3434 }
3435
3436 abstract class _UnlinkedConstMixin implements idl.UnlinkedConst {
3437 @override
3438 Map<String, Object> toJson() {
3439 Map<String, Object> _result = <String, Object>{};
3440 if (doubles.isNotEmpty) _result["doubles"] = doubles.map((_value) => _value. isFinite ? _value : _value.toString()).toList();
3441 if (ints.isNotEmpty) _result["ints"] = ints;
3442 if (isInvalid != false) _result["isInvalid"] = isInvalid;
3443 if (operations.isNotEmpty) _result["operations"] = operations.map((_value) = > _value.toString().split('.')[1]).toList();
3444 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList();
3445 if (strings.isNotEmpty) _result["strings"] = strings;
3446 return _result;
3447 }
3448
3449 @override
3450 Map<String, Object> toMap() => {
3451 "doubles": doubles,
3452 "ints": ints,
3453 "isInvalid": isInvalid,
3454 "operations": operations,
3455 "references": references,
3456 "strings": strings,
3457 };
3458
3459 @override
3460 String toString() => convert.JSON.encode(toJson());
3461 } 2175 }
3462 2176
3463 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru ctorInitializerMixin implements idl.UnlinkedConstructorInitializer { 2177 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru ctorInitializerMixin implements idl.UnlinkedConstructorInitializer {
3464 bool _finished = false; 2178 bool _finished = false;
3465 2179
3466 List<UnlinkedConstBuilder> _arguments; 2180 List<UnlinkedConstBuilder> _arguments;
3467 UnlinkedConstBuilder _expression; 2181 UnlinkedConstBuilder _expression;
3468 idl.UnlinkedConstructorInitializerKind _kind; 2182 idl.UnlinkedConstructorInitializerKind _kind;
3469 String _name; 2183 String _name;
3470 2184
2185 UnlinkedConstructorInitializerBuilder({List<UnlinkedConstBuilder> arguments, U nlinkedConstBuilder expression, idl.UnlinkedConstructorInitializerKind kind, Str ing name})
2186 : _arguments = arguments,
2187 _expression = expression,
2188 _kind = kind,
2189 _name = name;
2190
3471 @override 2191 @override
3472 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild er>[]; 2192 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild er>[];
3473 2193
3474 /** 2194 /**
3475 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the 2195 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the
3476 * invocation. Otherwise empty. 2196 * invocation. Otherwise empty.
3477 */ 2197 */
3478 void set arguments(List<UnlinkedConstBuilder> _value) { 2198 void set arguments(List<UnlinkedConstBuilder> _value) {
3479 assert(!_finished); 2199 assert(!_finished);
3480 _arguments = _value; 2200 _arguments = _value;
(...skipping 29 matching lines...) Expand all
3510 * If [kind] is `field`, the name of the field declared in the class. If 2230 * If [kind] is `field`, the name of the field declared in the class. If
3511 * [kind] is `thisInvocation`, the name of the constructor, declared in this 2231 * [kind] is `thisInvocation`, the name of the constructor, declared in this
3512 * class, to redirect to. If [kind] is `superInvocation`, the name of the 2232 * class, to redirect to. If [kind] is `superInvocation`, the name of the
3513 * constructor, declared in the superclass, to invoke. 2233 * constructor, declared in the superclass, to invoke.
3514 */ 2234 */
3515 void set name(String _value) { 2235 void set name(String _value) {
3516 assert(!_finished); 2236 assert(!_finished);
3517 _name = _value; 2237 _name = _value;
3518 } 2238 }
3519 2239
3520 UnlinkedConstructorInitializerBuilder({List<UnlinkedConstBuilder> arguments, U nlinkedConstBuilder expression, idl.UnlinkedConstructorInitializerKind kind, Str ing name})
3521 : _arguments = arguments,
3522 _expression = expression,
3523 _kind = kind,
3524 _name = name;
3525
3526 /**
3527 * Flush [informative] data recursively.
3528 */
3529 void flushInformative() {
3530 _arguments?.forEach((b) => b.flushInformative());
3531 _expression?.flushInformative();
3532 }
3533
3534 fb.Offset finish(fb.Builder fbBuilder) { 2240 fb.Offset finish(fb.Builder fbBuilder) {
3535 assert(!_finished); 2241 assert(!_finished);
3536 _finished = true; 2242 _finished = true;
3537 fb.Offset offset_arguments; 2243 fb.Offset offset_arguments;
3538 fb.Offset offset_expression; 2244 fb.Offset offset_expression;
3539 fb.Offset offset_name; 2245 fb.Offset offset_name;
3540 if (!(_arguments == null || _arguments.isEmpty)) { 2246 if (!(_arguments == null || _arguments.isEmpty)) {
3541 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu ilder)).toList()); 2247 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu ilder)).toList());
3542 } 2248 }
3543 if (_expression != null) { 2249 if (_expression != null) {
(...skipping 10 matching lines...) Expand all
3554 fbBuilder.addOffset(1, offset_expression); 2260 fbBuilder.addOffset(1, offset_expression);
3555 } 2261 }
3556 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field) { 2262 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field) {
3557 fbBuilder.addUint8(2, _kind.index); 2263 fbBuilder.addUint8(2, _kind.index);
3558 } 2264 }
3559 if (offset_name != null) { 2265 if (offset_name != null) {
3560 fbBuilder.addOffset(0, offset_name); 2266 fbBuilder.addOffset(0, offset_name);
3561 } 2267 }
3562 return fbBuilder.endTable(); 2268 return fbBuilder.endTable();
3563 } 2269 }
3564 }
3565 2270
3566 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons tructorInitializerImpl> { 2271 /**
3567 const _UnlinkedConstructorInitializerReader(); 2272 * Flush [informative] data recursively.
3568 2273 */
3569 @override 2274 void flushInformative() {
3570 _UnlinkedConstructorInitializerImpl createObject(fb.BufferPointer bp) => new _ UnlinkedConstructorInitializerImpl(bp); 2275 _arguments?.forEach((b) => b.flushInformative());
3571 } 2276 _expression?.flushInformative();
3572
3573 class _UnlinkedConstructorInitializerImpl extends Object with _UnlinkedConstruct orInitializerMixin implements idl.UnlinkedConstructorInitializer {
3574 final fb.BufferPointer _bp;
3575
3576 _UnlinkedConstructorInitializerImpl(this._bp);
3577
3578 List<idl.UnlinkedConst> _arguments;
3579 idl.UnlinkedConst _expression;
3580 idl.UnlinkedConstructorInitializerKind _kind;
3581 String _name;
3582
3583 @override
3584 List<idl.UnlinkedConst> get arguments {
3585 _arguments ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstRe ader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]);
3586 return _arguments;
3587 }
3588
3589 @override
3590 idl.UnlinkedConst get expression {
3591 _expression ??= const _UnlinkedConstReader().vTableGet(_bp, 1, null);
3592 return _expression;
3593 }
3594
3595 @override
3596 idl.UnlinkedConstructorInitializerKind get kind {
3597 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet(_bp, 2 , idl.UnlinkedConstructorInitializerKind.field);
3598 return _kind;
3599 }
3600
3601 @override
3602 String get name {
3603 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
3604 return _name;
3605 } 2277 }
3606 } 2278 }
3607 2279
3608 abstract class _UnlinkedConstructorInitializerMixin implements idl.UnlinkedConst ructorInitializer {
3609 @override
3610 Map<String, Object> toJson() {
3611 Map<String, Object> _result = <String, Object>{};
3612 if (arguments.isNotEmpty) _result["arguments"] = arguments.map((_value) => _ value.toJson()).toList();
3613 if (expression != null) _result["expression"] = expression.toJson();
3614 if (kind != idl.UnlinkedConstructorInitializerKind.field) _result["kind"] = kind.toString().split('.')[1];
3615 if (name != '') _result["name"] = name;
3616 return _result;
3617 }
3618
3619 @override
3620 Map<String, Object> toMap() => {
3621 "arguments": arguments,
3622 "expression": expression,
3623 "kind": kind,
3624 "name": name,
3625 };
3626
3627 @override
3628 String toString() => convert.JSON.encode(toJson());
3629 }
3630
3631 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements idl.UnlinkedDocumentationComment { 2280 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements idl.UnlinkedDocumentationComment {
3632 bool _finished = false; 2281 bool _finished = false;
3633 2282
3634 int _length; 2283 int _length;
3635 int _offset; 2284 int _offset;
3636 String _text; 2285 String _text;
3637 2286
2287 UnlinkedDocumentationCommentBuilder({int length, int offset, String text})
2288 : _length = length,
2289 _offset = offset,
2290 _text = text;
2291
3638 @override 2292 @override
3639 int get length => _length ??= 0; 2293 int get length => _length ??= 0;
3640 2294
3641 /** 2295 /**
3642 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). 2296 * Length of the documentation comment (prior to replacing '\r\n' with '\n').
3643 */ 2297 */
3644 void set length(int _value) { 2298 void set length(int _value) {
3645 assert(!_finished); 2299 assert(!_finished);
3646 assert(_value == null || _value >= 0); 2300 assert(_value == null || _value >= 0);
3647 _length = _value; 2301 _length = _value;
(...skipping 19 matching lines...) Expand all
3667 * Text of the documentation comment, with '\r\n' replaced by '\n'. 2321 * Text of the documentation comment, with '\r\n' replaced by '\n'.
3668 * 2322 *
3669 * References appearing within the doc comment in square brackets are not 2323 * References appearing within the doc comment in square brackets are not
3670 * specially encoded. 2324 * specially encoded.
3671 */ 2325 */
3672 void set text(String _value) { 2326 void set text(String _value) {
3673 assert(!_finished); 2327 assert(!_finished);
3674 _text = _value; 2328 _text = _value;
3675 } 2329 }
3676 2330
3677 UnlinkedDocumentationCommentBuilder({int length, int offset, String text})
3678 : _length = length,
3679 _offset = offset,
3680 _text = text;
3681
3682 /**
3683 * Flush [informative] data recursively.
3684 */
3685 void flushInformative() {
3686 }
3687
3688 fb.Offset finish(fb.Builder fbBuilder) { 2331 fb.Offset finish(fb.Builder fbBuilder) {
3689 assert(!_finished); 2332 assert(!_finished);
3690 _finished = true; 2333 _finished = true;
3691 fb.Offset offset_text; 2334 fb.Offset offset_text;
3692 if (_text != null) { 2335 if (_text != null) {
3693 offset_text = fbBuilder.writeString(_text); 2336 offset_text = fbBuilder.writeString(_text);
3694 } 2337 }
3695 fbBuilder.startTable(); 2338 fbBuilder.startTable();
3696 if (_length != null && _length != 0) { 2339 if (_length != null && _length != 0) {
3697 fbBuilder.addUint32(0, _length); 2340 fbBuilder.addUint32(0, _length);
3698 } 2341 }
3699 if (_offset != null && _offset != 0) { 2342 if (_offset != null && _offset != 0) {
3700 fbBuilder.addUint32(2, _offset); 2343 fbBuilder.addUint32(2, _offset);
3701 } 2344 }
3702 if (offset_text != null) { 2345 if (offset_text != null) {
3703 fbBuilder.addOffset(1, offset_text); 2346 fbBuilder.addOffset(1, offset_text);
3704 } 2347 }
3705 return fbBuilder.endTable(); 2348 return fbBuilder.endTable();
3706 } 2349 }
3707 }
3708 2350
3709 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume ntationCommentImpl> { 2351 /**
3710 const _UnlinkedDocumentationCommentReader(); 2352 * Flush [informative] data recursively.
3711 2353 */
3712 @override 2354 void flushInformative() {
3713 _UnlinkedDocumentationCommentImpl createObject(fb.BufferPointer bp) => new _Un linkedDocumentationCommentImpl(bp);
3714 }
3715
3716 class _UnlinkedDocumentationCommentImpl extends Object with _UnlinkedDocumentati onCommentMixin implements idl.UnlinkedDocumentationComment {
3717 final fb.BufferPointer _bp;
3718
3719 _UnlinkedDocumentationCommentImpl(this._bp);
3720
3721 int _length;
3722 int _offset;
3723 String _text;
3724
3725 @override
3726 int get length {
3727 _length ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
3728 return _length;
3729 }
3730
3731 @override
3732 int get offset {
3733 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
3734 return _offset;
3735 }
3736
3737 @override
3738 String get text {
3739 _text ??= const fb.StringReader().vTableGet(_bp, 1, '');
3740 return _text;
3741 } 2355 }
3742 } 2356 }
3743 2357
3744 abstract class _UnlinkedDocumentationCommentMixin implements idl.UnlinkedDocumen tationComment {
3745 @override
3746 Map<String, Object> toJson() {
3747 Map<String, Object> _result = <String, Object>{};
3748 if (length != 0) _result["length"] = length;
3749 if (offset != 0) _result["offset"] = offset;
3750 if (text != '') _result["text"] = text;
3751 return _result;
3752 }
3753
3754 @override
3755 Map<String, Object> toMap() => {
3756 "length": length,
3757 "offset": offset,
3758 "text": text,
3759 };
3760
3761 @override
3762 String toString() => convert.JSON.encode(toJson());
3763 }
3764
3765 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl. UnlinkedEnum { 2358 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl. UnlinkedEnum {
3766 bool _finished = false; 2359 bool _finished = false;
3767 2360
3768 List<UnlinkedConstBuilder> _annotations; 2361 List<UnlinkedConstBuilder> _annotations;
3769 CodeRangeBuilder _codeRange; 2362 CodeRangeBuilder _codeRange;
3770 UnlinkedDocumentationCommentBuilder _documentationComment; 2363 UnlinkedDocumentationCommentBuilder _documentationComment;
3771 String _name; 2364 String _name;
3772 int _nameOffset; 2365 int _nameOffset;
3773 List<UnlinkedEnumValueBuilder> _values; 2366 List<UnlinkedEnumValueBuilder> _values;
3774 2367
2368 UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String name , int nameOffset, List<UnlinkedEnumValueBuilder> values})
2369 : _annotations = annotations,
2370 _codeRange = codeRange,
2371 _documentationComment = documentationComment,
2372 _name = name,
2373 _nameOffset = nameOffset,
2374 _values = values;
2375
3775 @override 2376 @override
3776 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 2377 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
3777 2378
3778 /** 2379 /**
3779 * Annotations for this enum. 2380 * Annotations for this enum.
3780 */ 2381 */
3781 void set annotations(List<UnlinkedConstBuilder> _value) { 2382 void set annotations(List<UnlinkedConstBuilder> _value) {
3782 assert(!_finished); 2383 assert(!_finished);
3783 _annotations = _value; 2384 _annotations = _value;
3784 } 2385 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3833 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui lder>[]; 2434 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui lder>[];
3834 2435
3835 /** 2436 /**
3836 * Values listed in the enum declaration, in declaration order. 2437 * Values listed in the enum declaration, in declaration order.
3837 */ 2438 */
3838 void set values(List<UnlinkedEnumValueBuilder> _value) { 2439 void set values(List<UnlinkedEnumValueBuilder> _value) {
3839 assert(!_finished); 2440 assert(!_finished);
3840 _values = _value; 2441 _values = _value;
3841 } 2442 }
3842 2443
3843 UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String name , int nameOffset, List<UnlinkedEnumValueBuilder> values})
3844 : _annotations = annotations,
3845 _codeRange = codeRange,
3846 _documentationComment = documentationComment,
3847 _name = name,
3848 _nameOffset = nameOffset,
3849 _values = values;
3850
3851 /**
3852 * Flush [informative] data recursively.
3853 */
3854 void flushInformative() {
3855 _annotations?.forEach((b) => b.flushInformative());
3856 _codeRange = null;
3857 _documentationComment = null;
3858 _nameOffset = null;
3859 _values?.forEach((b) => b.flushInformative());
3860 }
3861
3862 fb.Offset finish(fb.Builder fbBuilder) { 2444 fb.Offset finish(fb.Builder fbBuilder) {
3863 assert(!_finished); 2445 assert(!_finished);
3864 _finished = true; 2446 _finished = true;
3865 fb.Offset offset_annotations; 2447 fb.Offset offset_annotations;
3866 fb.Offset offset_codeRange; 2448 fb.Offset offset_codeRange;
3867 fb.Offset offset_documentationComment; 2449 fb.Offset offset_documentationComment;
3868 fb.Offset offset_name; 2450 fb.Offset offset_name;
3869 fb.Offset offset_values; 2451 fb.Offset offset_values;
3870 if (!(_annotations == null || _annotations.isEmpty)) { 2452 if (!(_annotations == null || _annotations.isEmpty)) {
3871 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 2453 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
(...skipping 24 matching lines...) Expand all
3896 fbBuilder.addOffset(0, offset_name); 2478 fbBuilder.addOffset(0, offset_name);
3897 } 2479 }
3898 if (_nameOffset != null && _nameOffset != 0) { 2480 if (_nameOffset != null && _nameOffset != 0) {
3899 fbBuilder.addUint32(1, _nameOffset); 2481 fbBuilder.addUint32(1, _nameOffset);
3900 } 2482 }
3901 if (offset_values != null) { 2483 if (offset_values != null) {
3902 fbBuilder.addOffset(2, offset_values); 2484 fbBuilder.addOffset(2, offset_values);
3903 } 2485 }
3904 return fbBuilder.endTable(); 2486 return fbBuilder.endTable();
3905 } 2487 }
3906 }
3907 2488
3908 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { 2489 /**
3909 const _UnlinkedEnumReader(); 2490 * Flush [informative] data recursively.
3910 2491 */
3911 @override 2492 void flushInformative() {
3912 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b p); 2493 _annotations?.forEach((b) => b.flushInformative());
3913 } 2494 _codeRange = null;
3914 2495 _documentationComment = null;
3915 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un linkedEnum { 2496 _nameOffset = null;
3916 final fb.BufferPointer _bp; 2497 _values?.forEach((b) => b.flushInformative());
3917
3918 _UnlinkedEnumImpl(this._bp);
3919
3920 List<idl.UnlinkedConst> _annotations;
3921 idl.CodeRange _codeRange;
3922 idl.UnlinkedDocumentationComment _documentationComment;
3923 String _name;
3924 int _nameOffset;
3925 List<idl.UnlinkedEnumValue> _values;
3926
3927 @override
3928 List<idl.UnlinkedConst> get annotations {
3929 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]);
3930 return _annotations;
3931 } 2498 }
3932
3933 @override
3934 idl.CodeRange get codeRange {
3935 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 5, null);
3936 return _codeRange;
3937 }
3938
3939 @override
3940 idl.UnlinkedDocumentationComment get documentationComment {
3941 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 3, null);
3942 return _documentationComment;
3943 }
3944
3945 @override
3946 String get name {
3947 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
3948 return _name;
3949 }
3950
3951 @override
3952 int get nameOffset {
3953 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
3954 return _nameOffset;
3955 }
3956
3957 @override
3958 List<idl.UnlinkedEnumValue> get values {
3959 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa lueReader()).vTableGet(_bp, 2, const <idl.UnlinkedEnumValue>[]);
3960 return _values;
3961 }
3962 }
3963
3964 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum {
3965 @override
3966 Map<String, Object> toJson() {
3967 Map<String, Object> _result = <String, Object>{};
3968 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
3969 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
3970 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
3971 if (name != '') _result["name"] = name;
3972 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
3973 if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJ son()).toList();
3974 return _result;
3975 }
3976
3977 @override
3978 Map<String, Object> toMap() => {
3979 "annotations": annotations,
3980 "codeRange": codeRange,
3981 "documentationComment": documentationComment,
3982 "name": name,
3983 "nameOffset": nameOffset,
3984 "values": values,
3985 };
3986
3987 @override
3988 String toString() => convert.JSON.encode(toJson());
3989 } 2499 }
3990 2500
3991 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple ments idl.UnlinkedEnumValue { 2501 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple ments idl.UnlinkedEnumValue {
3992 bool _finished = false; 2502 bool _finished = false;
3993 2503
3994 UnlinkedDocumentationCommentBuilder _documentationComment; 2504 UnlinkedDocumentationCommentBuilder _documentationComment;
3995 String _name; 2505 String _name;
3996 int _nameOffset; 2506 int _nameOffset;
3997 2507
2508 UnlinkedEnumValueBuilder({UnlinkedDocumentationCommentBuilder documentationCom ment, String name, int nameOffset})
2509 : _documentationComment = documentationComment,
2510 _name = name,
2511 _nameOffset = nameOffset;
2512
3998 @override 2513 @override
3999 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation Comment; 2514 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation Comment;
4000 2515
4001 /** 2516 /**
4002 * Documentation comment for the enum value, or `null` if there is no 2517 * Documentation comment for the enum value, or `null` if there is no
4003 * documentation comment. 2518 * documentation comment.
4004 */ 2519 */
4005 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 2520 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
4006 assert(!_finished); 2521 assert(!_finished);
4007 _documentationComment = _value; 2522 _documentationComment = _value;
(...skipping 15 matching lines...) Expand all
4023 2538
4024 /** 2539 /**
4025 * Offset of the enum value name relative to the beginning of the file. 2540 * Offset of the enum value name relative to the beginning of the file.
4026 */ 2541 */
4027 void set nameOffset(int _value) { 2542 void set nameOffset(int _value) {
4028 assert(!_finished); 2543 assert(!_finished);
4029 assert(_value == null || _value >= 0); 2544 assert(_value == null || _value >= 0);
4030 _nameOffset = _value; 2545 _nameOffset = _value;
4031 } 2546 }
4032 2547
4033 UnlinkedEnumValueBuilder({UnlinkedDocumentationCommentBuilder documentationCom ment, String name, int nameOffset})
4034 : _documentationComment = documentationComment,
4035 _name = name,
4036 _nameOffset = nameOffset;
4037
4038 /**
4039 * Flush [informative] data recursively.
4040 */
4041 void flushInformative() {
4042 _documentationComment = null;
4043 _nameOffset = null;
4044 }
4045
4046 fb.Offset finish(fb.Builder fbBuilder) { 2548 fb.Offset finish(fb.Builder fbBuilder) {
4047 assert(!_finished); 2549 assert(!_finished);
4048 _finished = true; 2550 _finished = true;
4049 fb.Offset offset_documentationComment; 2551 fb.Offset offset_documentationComment;
4050 fb.Offset offset_name; 2552 fb.Offset offset_name;
4051 if (_documentationComment != null) { 2553 if (_documentationComment != null) {
4052 offset_documentationComment = _documentationComment.finish(fbBuilder); 2554 offset_documentationComment = _documentationComment.finish(fbBuilder);
4053 } 2555 }
4054 if (_name != null) { 2556 if (_name != null) {
4055 offset_name = fbBuilder.writeString(_name); 2557 offset_name = fbBuilder.writeString(_name);
4056 } 2558 }
4057 fbBuilder.startTable(); 2559 fbBuilder.startTable();
4058 if (offset_documentationComment != null) { 2560 if (offset_documentationComment != null) {
4059 fbBuilder.addOffset(2, offset_documentationComment); 2561 fbBuilder.addOffset(2, offset_documentationComment);
4060 } 2562 }
4061 if (offset_name != null) { 2563 if (offset_name != null) {
4062 fbBuilder.addOffset(0, offset_name); 2564 fbBuilder.addOffset(0, offset_name);
4063 } 2565 }
4064 if (_nameOffset != null && _nameOffset != 0) { 2566 if (_nameOffset != null && _nameOffset != 0) {
4065 fbBuilder.addUint32(1, _nameOffset); 2567 fbBuilder.addUint32(1, _nameOffset);
4066 } 2568 }
4067 return fbBuilder.endTable(); 2569 return fbBuilder.endTable();
4068 } 2570 }
4069 }
4070 2571
4071 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> { 2572 /**
4072 const _UnlinkedEnumValueReader(); 2573 * Flush [informative] data recursively.
4073 2574 */
4074 @override 2575 void flushInformative() {
4075 _UnlinkedEnumValueImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumV alueImpl(bp); 2576 _documentationComment = null;
4076 } 2577 _nameOffset = null;
4077
4078 class _UnlinkedEnumValueImpl extends Object with _UnlinkedEnumValueMixin impleme nts idl.UnlinkedEnumValue {
4079 final fb.BufferPointer _bp;
4080
4081 _UnlinkedEnumValueImpl(this._bp);
4082
4083 idl.UnlinkedDocumentationComment _documentationComment;
4084 String _name;
4085 int _nameOffset;
4086
4087 @override
4088 idl.UnlinkedDocumentationComment get documentationComment {
4089 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 2, null);
4090 return _documentationComment;
4091 }
4092
4093 @override
4094 String get name {
4095 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
4096 return _name;
4097 }
4098
4099 @override
4100 int get nameOffset {
4101 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
4102 return _nameOffset;
4103 } 2578 }
4104 } 2579 }
4105 2580
4106 abstract class _UnlinkedEnumValueMixin implements idl.UnlinkedEnumValue {
4107 @override
4108 Map<String, Object> toJson() {
4109 Map<String, Object> _result = <String, Object>{};
4110 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
4111 if (name != '') _result["name"] = name;
4112 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
4113 return _result;
4114 }
4115
4116 @override
4117 Map<String, Object> toMap() => {
4118 "documentationComment": documentationComment,
4119 "name": name,
4120 "nameOffset": nameOffset,
4121 };
4122
4123 @override
4124 String toString() => convert.JSON.encode(toJson());
4125 }
4126
4127 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp lements idl.UnlinkedExecutable { 2581 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp lements idl.UnlinkedExecutable {
4128 bool _finished = false; 2582 bool _finished = false;
4129 2583
4130 List<UnlinkedConstBuilder> _annotations; 2584 List<UnlinkedConstBuilder> _annotations;
4131 CodeRangeBuilder _codeRange; 2585 CodeRangeBuilder _codeRange;
4132 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; 2586 List<UnlinkedConstructorInitializerBuilder> _constantInitializers;
4133 int _constCycleSlot; 2587 int _constCycleSlot;
4134 UnlinkedDocumentationCommentBuilder _documentationComment; 2588 UnlinkedDocumentationCommentBuilder _documentationComment;
4135 int _inferredReturnTypeSlot; 2589 int _inferredReturnTypeSlot;
4136 bool _isAbstract; 2590 bool _isAbstract;
(...skipping 11 matching lines...) Expand all
4148 int _nameOffset; 2602 int _nameOffset;
4149 List<UnlinkedParamBuilder> _parameters; 2603 List<UnlinkedParamBuilder> _parameters;
4150 int _periodOffset; 2604 int _periodOffset;
4151 EntityRefBuilder _redirectedConstructor; 2605 EntityRefBuilder _redirectedConstructor;
4152 String _redirectedConstructorName; 2606 String _redirectedConstructorName;
4153 EntityRefBuilder _returnType; 2607 EntityRefBuilder _returnType;
4154 List<UnlinkedTypeParamBuilder> _typeParameters; 2608 List<UnlinkedTypeParamBuilder> _typeParameters;
4155 int _visibleLength; 2609 int _visibleLength;
4156 int _visibleOffset; 2610 int _visibleOffset;
4157 2611
2612 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBu ilder codeRange, List<UnlinkedConstructorInitializerBuilder> constantInitializer s, int constCycleSlot, UnlinkedDocumentationCommentBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bool isConst, bool isExternal, boo l isFactory, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutable Kind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBui lder> localLabels, List<UnlinkedVariableBuilder> localVariables, String name, in t nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffs et, EntityRefBuilder redirectedConstructor, String redirectedConstructorName, En tityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int vi sibleLength, int visibleOffset})
2613 : _annotations = annotations,
2614 _codeRange = codeRange,
2615 _constantInitializers = constantInitializers,
2616 _constCycleSlot = constCycleSlot,
2617 _documentationComment = documentationComment,
2618 _inferredReturnTypeSlot = inferredReturnTypeSlot,
2619 _isAbstract = isAbstract,
2620 _isConst = isConst,
2621 _isExternal = isExternal,
2622 _isFactory = isFactory,
2623 _isRedirectedConstructor = isRedirectedConstructor,
2624 _isStatic = isStatic,
2625 _kind = kind,
2626 _localFunctions = localFunctions,
2627 _localLabels = localLabels,
2628 _localVariables = localVariables,
2629 _name = name,
2630 _nameEnd = nameEnd,
2631 _nameOffset = nameOffset,
2632 _parameters = parameters,
2633 _periodOffset = periodOffset,
2634 _redirectedConstructor = redirectedConstructor,
2635 _redirectedConstructorName = redirectedConstructorName,
2636 _returnType = returnType,
2637 _typeParameters = typeParameters,
2638 _visibleLength = visibleLength,
2639 _visibleOffset = visibleOffset;
2640
4158 @override 2641 @override
4159 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 2642 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
4160 2643
4161 /** 2644 /**
4162 * Annotations for this executable. 2645 * Annotations for this executable.
4163 */ 2646 */
4164 void set annotations(List<UnlinkedConstBuilder> _value) { 2647 void set annotations(List<UnlinkedConstBuilder> _value) {
4165 assert(!_finished); 2648 assert(!_finished);
4166 _annotations = _value; 2649 _annotations = _value;
4167 } 2650 }
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
4485 2968
4486 /** 2969 /**
4487 * If a local function, the beginning of the visible range; zero otherwise. 2970 * If a local function, the beginning of the visible range; zero otherwise.
4488 */ 2971 */
4489 void set visibleOffset(int _value) { 2972 void set visibleOffset(int _value) {
4490 assert(!_finished); 2973 assert(!_finished);
4491 assert(_value == null || _value >= 0); 2974 assert(_value == null || _value >= 0);
4492 _visibleOffset = _value; 2975 _visibleOffset = _value;
4493 } 2976 }
4494 2977
4495 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBu ilder codeRange, List<UnlinkedConstructorInitializerBuilder> constantInitializer s, int constCycleSlot, UnlinkedDocumentationCommentBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bool isConst, bool isExternal, boo l isFactory, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutable Kind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBui lder> localLabels, List<UnlinkedVariableBuilder> localVariables, String name, in t nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffs et, EntityRefBuilder redirectedConstructor, String redirectedConstructorName, En tityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int vi sibleLength, int visibleOffset})
4496 : _annotations = annotations,
4497 _codeRange = codeRange,
4498 _constantInitializers = constantInitializers,
4499 _constCycleSlot = constCycleSlot,
4500 _documentationComment = documentationComment,
4501 _inferredReturnTypeSlot = inferredReturnTypeSlot,
4502 _isAbstract = isAbstract,
4503 _isConst = isConst,
4504 _isExternal = isExternal,
4505 _isFactory = isFactory,
4506 _isRedirectedConstructor = isRedirectedConstructor,
4507 _isStatic = isStatic,
4508 _kind = kind,
4509 _localFunctions = localFunctions,
4510 _localLabels = localLabels,
4511 _localVariables = localVariables,
4512 _name = name,
4513 _nameEnd = nameEnd,
4514 _nameOffset = nameOffset,
4515 _parameters = parameters,
4516 _periodOffset = periodOffset,
4517 _redirectedConstructor = redirectedConstructor,
4518 _redirectedConstructorName = redirectedConstructorName,
4519 _returnType = returnType,
4520 _typeParameters = typeParameters,
4521 _visibleLength = visibleLength,
4522 _visibleOffset = visibleOffset;
4523
4524 /**
4525 * Flush [informative] data recursively.
4526 */
4527 void flushInformative() {
4528 _annotations?.forEach((b) => b.flushInformative());
4529 _codeRange = null;
4530 _constantInitializers?.forEach((b) => b.flushInformative());
4531 _documentationComment = null;
4532 _localFunctions?.forEach((b) => b.flushInformative());
4533 _localLabels?.forEach((b) => b.flushInformative());
4534 _localVariables?.forEach((b) => b.flushInformative());
4535 _nameEnd = null;
4536 _nameOffset = null;
4537 _parameters?.forEach((b) => b.flushInformative());
4538 _periodOffset = null;
4539 _redirectedConstructor?.flushInformative();
4540 _returnType?.flushInformative();
4541 _typeParameters?.forEach((b) => b.flushInformative());
4542 }
4543
4544 fb.Offset finish(fb.Builder fbBuilder) { 2978 fb.Offset finish(fb.Builder fbBuilder) {
4545 assert(!_finished); 2979 assert(!_finished);
4546 _finished = true; 2980 _finished = true;
4547 fb.Offset offset_annotations; 2981 fb.Offset offset_annotations;
4548 fb.Offset offset_codeRange; 2982 fb.Offset offset_codeRange;
4549 fb.Offset offset_constantInitializers; 2983 fb.Offset offset_constantInitializers;
4550 fb.Offset offset_documentationComment; 2984 fb.Offset offset_documentationComment;
4551 fb.Offset offset_localFunctions; 2985 fb.Offset offset_localFunctions;
4552 fb.Offset offset_localLabels; 2986 fb.Offset offset_localLabels;
4553 fb.Offset offset_localVariables; 2987 fb.Offset offset_localVariables;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
4673 fbBuilder.addOffset(16, offset_typeParameters); 3107 fbBuilder.addOffset(16, offset_typeParameters);
4674 } 3108 }
4675 if (_visibleLength != null && _visibleLength != 0) { 3109 if (_visibleLength != null && _visibleLength != 0) {
4676 fbBuilder.addUint32(20, _visibleLength); 3110 fbBuilder.addUint32(20, _visibleLength);
4677 } 3111 }
4678 if (_visibleOffset != null && _visibleOffset != 0) { 3112 if (_visibleOffset != null && _visibleOffset != 0) {
4679 fbBuilder.addUint32(21, _visibleOffset); 3113 fbBuilder.addUint32(21, _visibleOffset);
4680 } 3114 }
4681 return fbBuilder.endTable(); 3115 return fbBuilder.endTable();
4682 } 3116 }
4683 }
4684 3117
4685 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl> { 3118 /**
4686 const _UnlinkedExecutableReader(); 3119 * Flush [informative] data recursively.
4687 3120 */
4688 @override 3121 void flushInformative() {
4689 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec utableImpl(bp); 3122 _annotations?.forEach((b) => b.flushInformative());
4690 } 3123 _codeRange = null;
4691 3124 _constantInitializers?.forEach((b) => b.flushInformative());
4692 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple ments idl.UnlinkedExecutable { 3125 _documentationComment = null;
4693 final fb.BufferPointer _bp; 3126 _localFunctions?.forEach((b) => b.flushInformative());
4694 3127 _localLabels?.forEach((b) => b.flushInformative());
4695 _UnlinkedExecutableImpl(this._bp); 3128 _localVariables?.forEach((b) => b.flushInformative());
4696 3129 _nameEnd = null;
4697 List<idl.UnlinkedConst> _annotations; 3130 _nameOffset = null;
4698 idl.CodeRange _codeRange; 3131 _parameters?.forEach((b) => b.flushInformative());
4699 List<idl.UnlinkedConstructorInitializer> _constantInitializers; 3132 _periodOffset = null;
4700 int _constCycleSlot; 3133 _redirectedConstructor?.flushInformative();
4701 idl.UnlinkedDocumentationComment _documentationComment; 3134 _returnType?.flushInformative();
4702 int _inferredReturnTypeSlot; 3135 _typeParameters?.forEach((b) => b.flushInformative());
4703 bool _isAbstract;
4704 bool _isConst;
4705 bool _isExternal;
4706 bool _isFactory;
4707 bool _isRedirectedConstructor;
4708 bool _isStatic;
4709 idl.UnlinkedExecutableKind _kind;
4710 List<idl.UnlinkedExecutable> _localFunctions;
4711 List<idl.UnlinkedLabel> _localLabels;
4712 List<idl.UnlinkedVariable> _localVariables;
4713 String _name;
4714 int _nameEnd;
4715 int _nameOffset;
4716 List<idl.UnlinkedParam> _parameters;
4717 int _periodOffset;
4718 idl.EntityRef _redirectedConstructor;
4719 String _redirectedConstructorName;
4720 idl.EntityRef _returnType;
4721 List<idl.UnlinkedTypeParam> _typeParameters;
4722 int _visibleLength;
4723 int _visibleOffset;
4724
4725 @override
4726 List<idl.UnlinkedConst> get annotations {
4727 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 6, const <idl.UnlinkedConst>[]);
4728 return _annotations;
4729 } 3136 }
4730
4731 @override
4732 idl.CodeRange get codeRange {
4733 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 26, null);
4734 return _codeRange;
4735 }
4736
4737 @override
4738 List<idl.UnlinkedConstructorInitializer> get constantInitializers {
4739 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <i dl.UnlinkedConstructorInitializer>[]);
4740 return _constantInitializers;
4741 }
4742
4743 @override
4744 int get constCycleSlot {
4745 _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0);
4746 return _constCycleSlot;
4747 }
4748
4749 @override
4750 idl.UnlinkedDocumentationComment get documentationComment {
4751 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 7, null);
4752 return _documentationComment;
4753 }
4754
4755 @override
4756 int get inferredReturnTypeSlot {
4757 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
4758 return _inferredReturnTypeSlot;
4759 }
4760
4761 @override
4762 bool get isAbstract {
4763 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 10, false);
4764 return _isAbstract;
4765 }
4766
4767 @override
4768 bool get isConst {
4769 _isConst ??= const fb.BoolReader().vTableGet(_bp, 12, false);
4770 return _isConst;
4771 }
4772
4773 @override
4774 bool get isExternal {
4775 _isExternal ??= const fb.BoolReader().vTableGet(_bp, 11, false);
4776 return _isExternal;
4777 }
4778
4779 @override
4780 bool get isFactory {
4781 _isFactory ??= const fb.BoolReader().vTableGet(_bp, 8, false);
4782 return _isFactory;
4783 }
4784
4785 @override
4786 bool get isRedirectedConstructor {
4787 _isRedirectedConstructor ??= const fb.BoolReader().vTableGet(_bp, 13, false) ;
4788 return _isRedirectedConstructor;
4789 }
4790
4791 @override
4792 bool get isStatic {
4793 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 9, false);
4794 return _isStatic;
4795 }
4796
4797 @override
4798 idl.UnlinkedExecutableKind get kind {
4799 _kind ??= const _UnlinkedExecutableKindReader().vTableGet(_bp, 4, idl.Unlink edExecutableKind.functionOrMethod);
4800 return _kind;
4801 }
4802
4803 @override
4804 List<idl.UnlinkedExecutable> get localFunctions {
4805 _localFunctions ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlin kedExecutableReader()).vTableGet(_bp, 18, const <idl.UnlinkedExecutable>[]);
4806 return _localFunctions;
4807 }
4808
4809 @override
4810 List<idl.UnlinkedLabel> get localLabels {
4811 _localLabels ??= const fb.ListReader<idl.UnlinkedLabel>(const _UnlinkedLabel Reader()).vTableGet(_bp, 22, const <idl.UnlinkedLabel>[]);
4812 return _localLabels;
4813 }
4814
4815 @override
4816 List<idl.UnlinkedVariable> get localVariables {
4817 _localVariables ??= const fb.ListReader<idl.UnlinkedVariable>(const _Unlinke dVariableReader()).vTableGet(_bp, 19, const <idl.UnlinkedVariable>[]);
4818 return _localVariables;
4819 }
4820
4821 @override
4822 String get name {
4823 _name ??= const fb.StringReader().vTableGet(_bp, 1, '');
4824 return _name;
4825 }
4826
4827 @override
4828 int get nameEnd {
4829 _nameEnd ??= const fb.Uint32Reader().vTableGet(_bp, 23, 0);
4830 return _nameEnd;
4831 }
4832
4833 @override
4834 int get nameOffset {
4835 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
4836 return _nameOffset;
4837 }
4838
4839 @override
4840 List<idl.UnlinkedParam> get parameters {
4841 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR eader()).vTableGet(_bp, 2, const <idl.UnlinkedParam>[]);
4842 return _parameters;
4843 }
4844
4845 @override
4846 int get periodOffset {
4847 _periodOffset ??= const fb.Uint32Reader().vTableGet(_bp, 24, 0);
4848 return _periodOffset;
4849 }
4850
4851 @override
4852 idl.EntityRef get redirectedConstructor {
4853 _redirectedConstructor ??= const _EntityRefReader().vTableGet(_bp, 15, null) ;
4854 return _redirectedConstructor;
4855 }
4856
4857 @override
4858 String get redirectedConstructorName {
4859 _redirectedConstructorName ??= const fb.StringReader().vTableGet(_bp, 17, '' );
4860 return _redirectedConstructorName;
4861 }
4862
4863 @override
4864 idl.EntityRef get returnType {
4865 _returnType ??= const _EntityRefReader().vTableGet(_bp, 3, null);
4866 return _returnType;
4867 }
4868
4869 @override
4870 List<idl.UnlinkedTypeParam> get typeParameters {
4871 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink edTypeParamReader()).vTableGet(_bp, 16, const <idl.UnlinkedTypeParam>[]);
4872 return _typeParameters;
4873 }
4874
4875 @override
4876 int get visibleLength {
4877 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 20, 0);
4878 return _visibleLength;
4879 }
4880
4881 @override
4882 int get visibleOffset {
4883 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 21, 0);
4884 return _visibleOffset;
4885 }
4886 }
4887
4888 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
4889 @override
4890 Map<String, Object> toJson() {
4891 Map<String, Object> _result = <String, Object>{};
4892 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
4893 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
4894 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const antInitializers.map((_value) => _value.toJson()).toList();
4895 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot;
4896 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
4897 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre dReturnTypeSlot;
4898 if (isAbstract != false) _result["isAbstract"] = isAbstract;
4899 if (isConst != false) _result["isConst"] = isConst;
4900 if (isExternal != false) _result["isExternal"] = isExternal;
4901 if (isFactory != false) _result["isFactory"] = isFactory;
4902 if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = i sRedirectedConstructor;
4903 if (isStatic != false) _result["isStatic"] = isStatic;
4904 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) _result["kind"] = k ind.toString().split('.')[1];
4905 if (localFunctions.isNotEmpty) _result["localFunctions"] = localFunctions.ma p((_value) => _value.toJson()).toList();
4906 if (localLabels.isNotEmpty) _result["localLabels"] = localLabels.map((_value ) => _value.toJson()).toList();
4907 if (localVariables.isNotEmpty) _result["localVariables"] = localVariables.ma p((_value) => _value.toJson()).toList();
4908 if (name != '') _result["name"] = name;
4909 if (nameEnd != 0) _result["nameEnd"] = nameEnd;
4910 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
4911 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
4912 if (periodOffset != 0) _result["periodOffset"] = periodOffset;
4913 if (redirectedConstructor != null) _result["redirectedConstructor"] = redire ctedConstructor.toJson();
4914 if (redirectedConstructorName != '') _result["redirectedConstructorName"] = redirectedConstructorName;
4915 if (returnType != null) _result["returnType"] = returnType.toJson();
4916 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList();
4917 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
4918 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
4919 return _result;
4920 }
4921
4922 @override
4923 Map<String, Object> toMap() => {
4924 "annotations": annotations,
4925 "codeRange": codeRange,
4926 "constantInitializers": constantInitializers,
4927 "constCycleSlot": constCycleSlot,
4928 "documentationComment": documentationComment,
4929 "inferredReturnTypeSlot": inferredReturnTypeSlot,
4930 "isAbstract": isAbstract,
4931 "isConst": isConst,
4932 "isExternal": isExternal,
4933 "isFactory": isFactory,
4934 "isRedirectedConstructor": isRedirectedConstructor,
4935 "isStatic": isStatic,
4936 "kind": kind,
4937 "localFunctions": localFunctions,
4938 "localLabels": localLabels,
4939 "localVariables": localVariables,
4940 "name": name,
4941 "nameEnd": nameEnd,
4942 "nameOffset": nameOffset,
4943 "parameters": parameters,
4944 "periodOffset": periodOffset,
4945 "redirectedConstructor": redirectedConstructor,
4946 "redirectedConstructorName": redirectedConstructorName,
4947 "returnType": returnType,
4948 "typeParameters": typeParameters,
4949 "visibleLength": visibleLength,
4950 "visibleOffset": visibleOffset,
4951 };
4952
4953 @override
4954 String toString() => convert.JSON.encode(toJson());
4955 } 3137 }
4956 3138
4957 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli cMixin implements idl.UnlinkedExportNonPublic { 3139 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli cMixin implements idl.UnlinkedExportNonPublic {
4958 bool _finished = false; 3140 bool _finished = false;
4959 3141
4960 List<UnlinkedConstBuilder> _annotations; 3142 List<UnlinkedConstBuilder> _annotations;
4961 int _offset; 3143 int _offset;
4962 int _uriEnd; 3144 int _uriEnd;
4963 int _uriOffset; 3145 int _uriOffset;
4964 3146
3147 UnlinkedExportNonPublicBuilder({List<UnlinkedConstBuilder> annotations, int of fset, int uriEnd, int uriOffset})
3148 : _annotations = annotations,
3149 _offset = offset,
3150 _uriEnd = uriEnd,
3151 _uriOffset = uriOffset;
3152
4965 @override 3153 @override
4966 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 3154 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
4967 3155
4968 /** 3156 /**
4969 * Annotations for this export directive. 3157 * Annotations for this export directive.
4970 */ 3158 */
4971 void set annotations(List<UnlinkedConstBuilder> _value) { 3159 void set annotations(List<UnlinkedConstBuilder> _value) {
4972 assert(!_finished); 3160 assert(!_finished);
4973 _annotations = _value; 3161 _annotations = _value;
4974 } 3162 }
(...skipping 29 matching lines...) Expand all
5004 /** 3192 /**
5005 * Offset of the URI string (including quotes) relative to the beginning of 3193 * Offset of the URI string (including quotes) relative to the beginning of
5006 * the file. 3194 * the file.
5007 */ 3195 */
5008 void set uriOffset(int _value) { 3196 void set uriOffset(int _value) {
5009 assert(!_finished); 3197 assert(!_finished);
5010 assert(_value == null || _value >= 0); 3198 assert(_value == null || _value >= 0);
5011 _uriOffset = _value; 3199 _uriOffset = _value;
5012 } 3200 }
5013 3201
5014 UnlinkedExportNonPublicBuilder({List<UnlinkedConstBuilder> annotations, int of fset, int uriEnd, int uriOffset})
5015 : _annotations = annotations,
5016 _offset = offset,
5017 _uriEnd = uriEnd,
5018 _uriOffset = uriOffset;
5019
5020 /**
5021 * Flush [informative] data recursively.
5022 */
5023 void flushInformative() {
5024 _annotations?.forEach((b) => b.flushInformative());
5025 _offset = null;
5026 _uriEnd = null;
5027 _uriOffset = null;
5028 }
5029
5030 fb.Offset finish(fb.Builder fbBuilder) { 3202 fb.Offset finish(fb.Builder fbBuilder) {
5031 assert(!_finished); 3203 assert(!_finished);
5032 _finished = true; 3204 _finished = true;
5033 fb.Offset offset_annotations; 3205 fb.Offset offset_annotations;
5034 if (!(_annotations == null || _annotations.isEmpty)) { 3206 if (!(_annotations == null || _annotations.isEmpty)) {
5035 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 3207 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
5036 } 3208 }
5037 fbBuilder.startTable(); 3209 fbBuilder.startTable();
5038 if (offset_annotations != null) { 3210 if (offset_annotations != null) {
5039 fbBuilder.addOffset(3, offset_annotations); 3211 fbBuilder.addOffset(3, offset_annotations);
5040 } 3212 }
5041 if (_offset != null && _offset != 0) { 3213 if (_offset != null && _offset != 0) {
5042 fbBuilder.addUint32(0, _offset); 3214 fbBuilder.addUint32(0, _offset);
5043 } 3215 }
5044 if (_uriEnd != null && _uriEnd != 0) { 3216 if (_uriEnd != null && _uriEnd != 0) {
5045 fbBuilder.addUint32(1, _uriEnd); 3217 fbBuilder.addUint32(1, _uriEnd);
5046 } 3218 }
5047 if (_uriOffset != null && _uriOffset != 0) { 3219 if (_uriOffset != null && _uriOffset != 0) {
5048 fbBuilder.addUint32(2, _uriOffset); 3220 fbBuilder.addUint32(2, _uriOffset);
5049 } 3221 }
5050 return fbBuilder.endTable(); 3222 return fbBuilder.endTable();
5051 } 3223 }
5052 }
5053 3224
5054 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu blicImpl> { 3225 /**
5055 const _UnlinkedExportNonPublicReader(); 3226 * Flush [informative] data recursively.
5056 3227 */
5057 @override 3228 void flushInformative() {
5058 _UnlinkedExportNonPublicImpl createObject(fb.BufferPointer bp) => new _Unlinke dExportNonPublicImpl(bp); 3229 _annotations?.forEach((b) => b.flushInformative());
5059 } 3230 _offset = null;
5060 3231 _uriEnd = null;
5061 class _UnlinkedExportNonPublicImpl extends Object with _UnlinkedExportNonPublicM ixin implements idl.UnlinkedExportNonPublic { 3232 _uriOffset = null;
5062 final fb.BufferPointer _bp;
5063
5064 _UnlinkedExportNonPublicImpl(this._bp);
5065
5066 List<idl.UnlinkedConst> _annotations;
5067 int _offset;
5068 int _uriEnd;
5069 int _uriOffset;
5070
5071 @override
5072 List<idl.UnlinkedConst> get annotations {
5073 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]);
5074 return _annotations;
5075 }
5076
5077 @override
5078 int get offset {
5079 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
5080 return _offset;
5081 }
5082
5083 @override
5084 int get uriEnd {
5085 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
5086 return _uriEnd;
5087 }
5088
5089 @override
5090 int get uriOffset {
5091 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
5092 return _uriOffset;
5093 } 3233 }
5094 } 3234 }
5095 3235
5096 abstract class _UnlinkedExportNonPublicMixin implements idl.UnlinkedExportNonPub lic {
5097 @override
5098 Map<String, Object> toJson() {
5099 Map<String, Object> _result = <String, Object>{};
5100 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
5101 if (offset != 0) _result["offset"] = offset;
5102 if (uriEnd != 0) _result["uriEnd"] = uriEnd;
5103 if (uriOffset != 0) _result["uriOffset"] = uriOffset;
5104 return _result;
5105 }
5106
5107 @override
5108 Map<String, Object> toMap() => {
5109 "annotations": annotations,
5110 "offset": offset,
5111 "uriEnd": uriEnd,
5112 "uriOffset": uriOffset,
5113 };
5114
5115 @override
5116 String toString() => convert.JSON.encode(toJson());
5117 }
5118
5119 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic { 3236 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic {
5120 bool _finished = false; 3237 bool _finished = false;
5121 3238
5122 List<UnlinkedCombinatorBuilder> _combinators; 3239 List<UnlinkedCombinatorBuilder> _combinators;
5123 String _uri; 3240 String _uri;
5124 3241
3242 UnlinkedExportPublicBuilder({List<UnlinkedCombinatorBuilder> combinators, Stri ng uri})
3243 : _combinators = combinators,
3244 _uri = uri;
3245
5125 @override 3246 @override
5126 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC ombinatorBuilder>[]; 3247 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC ombinatorBuilder>[];
5127 3248
5128 /** 3249 /**
5129 * Combinators contained in this import declaration. 3250 * Combinators contained in this import declaration.
5130 */ 3251 */
5131 void set combinators(List<UnlinkedCombinatorBuilder> _value) { 3252 void set combinators(List<UnlinkedCombinatorBuilder> _value) {
5132 assert(!_finished); 3253 assert(!_finished);
5133 _combinators = _value; 3254 _combinators = _value;
5134 } 3255 }
5135 3256
5136 @override 3257 @override
5137 String get uri => _uri ??= ''; 3258 String get uri => _uri ??= '';
5138 3259
5139 /** 3260 /**
5140 * URI used in the source code to reference the exported library. 3261 * URI used in the source code to reference the exported library.
5141 */ 3262 */
5142 void set uri(String _value) { 3263 void set uri(String _value) {
5143 assert(!_finished); 3264 assert(!_finished);
5144 _uri = _value; 3265 _uri = _value;
5145 } 3266 }
5146 3267
5147 UnlinkedExportPublicBuilder({List<UnlinkedCombinatorBuilder> combinators, Stri ng uri})
5148 : _combinators = combinators,
5149 _uri = uri;
5150
5151 /**
5152 * Flush [informative] data recursively.
5153 */
5154 void flushInformative() {
5155 _combinators?.forEach((b) => b.flushInformative());
5156 }
5157
5158 fb.Offset finish(fb.Builder fbBuilder) { 3268 fb.Offset finish(fb.Builder fbBuilder) {
5159 assert(!_finished); 3269 assert(!_finished);
5160 _finished = true; 3270 _finished = true;
5161 fb.Offset offset_combinators; 3271 fb.Offset offset_combinators;
5162 fb.Offset offset_uri; 3272 fb.Offset offset_uri;
5163 if (!(_combinators == null || _combinators.isEmpty)) { 3273 if (!(_combinators == null || _combinators.isEmpty)) {
5164 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList()); 3274 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish( fbBuilder)).toList());
5165 } 3275 }
5166 if (_uri != null) { 3276 if (_uri != null) {
5167 offset_uri = fbBuilder.writeString(_uri); 3277 offset_uri = fbBuilder.writeString(_uri);
5168 } 3278 }
5169 fbBuilder.startTable(); 3279 fbBuilder.startTable();
5170 if (offset_combinators != null) { 3280 if (offset_combinators != null) {
5171 fbBuilder.addOffset(1, offset_combinators); 3281 fbBuilder.addOffset(1, offset_combinators);
5172 } 3282 }
5173 if (offset_uri != null) { 3283 if (offset_uri != null) {
5174 fbBuilder.addOffset(0, offset_uri); 3284 fbBuilder.addOffset(0, offset_uri);
5175 } 3285 }
5176 return fbBuilder.endTable(); 3286 return fbBuilder.endTable();
5177 } 3287 }
5178 }
5179 3288
5180 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm pl> { 3289 /**
5181 const _UnlinkedExportPublicReader(); 3290 * Flush [informative] data recursively.
5182 3291 */
5183 @override 3292 void flushInformative() {
5184 _UnlinkedExportPublicImpl createObject(fb.BufferPointer bp) => new _UnlinkedEx portPublicImpl(bp); 3293 _combinators?.forEach((b) => b.flushInformative());
5185 }
5186
5187 class _UnlinkedExportPublicImpl extends Object with _UnlinkedExportPublicMixin i mplements idl.UnlinkedExportPublic {
5188 final fb.BufferPointer _bp;
5189
5190 _UnlinkedExportPublicImpl(this._bp);
5191
5192 List<idl.UnlinkedCombinator> _combinators;
5193 String _uri;
5194
5195 @override
5196 List<idl.UnlinkedCombinator> get combinators {
5197 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked CombinatorReader()).vTableGet(_bp, 1, const <idl.UnlinkedCombinator>[]);
5198 return _combinators;
5199 }
5200
5201 @override
5202 String get uri {
5203 _uri ??= const fb.StringReader().vTableGet(_bp, 0, '');
5204 return _uri;
5205 } 3294 }
5206 } 3295 }
5207 3296
5208 abstract class _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic {
5209 @override
5210 Map<String, Object> toJson() {
5211 Map<String, Object> _result = <String, Object>{};
5212 if (combinators.isNotEmpty) _result["combinators"] = combinators.map((_value ) => _value.toJson()).toList();
5213 if (uri != '') _result["uri"] = uri;
5214 return _result;
5215 }
5216
5217 @override
5218 Map<String, Object> toMap() => {
5219 "combinators": combinators,
5220 "uri": uri,
5221 };
5222
5223 @override
5224 String toString() => convert.JSON.encode(toJson());
5225 }
5226
5227 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements idl.UnlinkedImport { 3297 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements idl.UnlinkedImport {
5228 bool _finished = false; 3298 bool _finished = false;
5229 3299
5230 List<UnlinkedConstBuilder> _annotations; 3300 List<UnlinkedConstBuilder> _annotations;
5231 List<UnlinkedCombinatorBuilder> _combinators; 3301 List<UnlinkedCombinatorBuilder> _combinators;
5232 bool _isDeferred; 3302 bool _isDeferred;
5233 bool _isImplicit; 3303 bool _isImplicit;
5234 int _offset; 3304 int _offset;
5235 int _prefixOffset; 3305 int _prefixOffset;
5236 int _prefixReference; 3306 int _prefixReference;
5237 String _uri; 3307 String _uri;
5238 int _uriEnd; 3308 int _uriEnd;
5239 int _uriOffset; 3309 int _uriOffset;
5240 3310
3311 UnlinkedImportBuilder({List<UnlinkedConstBuilder> annotations, List<UnlinkedCo mbinatorBuilder> combinators, bool isDeferred, bool isImplicit, int offset, int prefixOffset, int prefixReference, String uri, int uriEnd, int uriOffset})
3312 : _annotations = annotations,
3313 _combinators = combinators,
3314 _isDeferred = isDeferred,
3315 _isImplicit = isImplicit,
3316 _offset = offset,
3317 _prefixOffset = prefixOffset,
3318 _prefixReference = prefixReference,
3319 _uri = uri,
3320 _uriEnd = uriEnd,
3321 _uriOffset = uriOffset;
3322
5241 @override 3323 @override
5242 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 3324 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
5243 3325
5244 /** 3326 /**
5245 * Annotations for this import declaration. 3327 * Annotations for this import declaration.
5246 */ 3328 */
5247 void set annotations(List<UnlinkedConstBuilder> _value) { 3329 void set annotations(List<UnlinkedConstBuilder> _value) {
5248 assert(!_finished); 3330 assert(!_finished);
5249 _annotations = _value; 3331 _annotations = _value;
5250 } 3332 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
5353 /** 3435 /**
5354 * Offset of the URI string (including quotes) relative to the beginning of 3436 * Offset of the URI string (including quotes) relative to the beginning of
5355 * the file. If [isImplicit] is true, zero. 3437 * the file. If [isImplicit] is true, zero.
5356 */ 3438 */
5357 void set uriOffset(int _value) { 3439 void set uriOffset(int _value) {
5358 assert(!_finished); 3440 assert(!_finished);
5359 assert(_value == null || _value >= 0); 3441 assert(_value == null || _value >= 0);
5360 _uriOffset = _value; 3442 _uriOffset = _value;
5361 } 3443 }
5362 3444
5363 UnlinkedImportBuilder({List<UnlinkedConstBuilder> annotations, List<UnlinkedCo mbinatorBuilder> combinators, bool isDeferred, bool isImplicit, int offset, int prefixOffset, int prefixReference, String uri, int uriEnd, int uriOffset})
5364 : _annotations = annotations,
5365 _combinators = combinators,
5366 _isDeferred = isDeferred,
5367 _isImplicit = isImplicit,
5368 _offset = offset,
5369 _prefixOffset = prefixOffset,
5370 _prefixReference = prefixReference,
5371 _uri = uri,
5372 _uriEnd = uriEnd,
5373 _uriOffset = uriOffset;
5374
5375 /**
5376 * Flush [informative] data recursively.
5377 */
5378 void flushInformative() {
5379 _annotations?.forEach((b) => b.flushInformative());
5380 _combinators?.forEach((b) => b.flushInformative());
5381 _offset = null;
5382 _prefixOffset = null;
5383 _uriEnd = null;
5384 _uriOffset = null;
5385 }
5386
5387 fb.Offset finish(fb.Builder fbBuilder) { 3445 fb.Offset finish(fb.Builder fbBuilder) {
5388 assert(!_finished); 3446 assert(!_finished);
5389 _finished = true; 3447 _finished = true;
5390 fb.Offset offset_annotations; 3448 fb.Offset offset_annotations;
5391 fb.Offset offset_combinators; 3449 fb.Offset offset_combinators;
5392 fb.Offset offset_uri; 3450 fb.Offset offset_uri;
5393 if (!(_annotations == null || _annotations.isEmpty)) { 3451 if (!(_annotations == null || _annotations.isEmpty)) {
5394 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 3452 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
5395 } 3453 }
5396 if (!(_combinators == null || _combinators.isEmpty)) { 3454 if (!(_combinators == null || _combinators.isEmpty)) {
(...skipping 28 matching lines...) Expand all
5425 fbBuilder.addOffset(1, offset_uri); 3483 fbBuilder.addOffset(1, offset_uri);
5426 } 3484 }
5427 if (_uriEnd != null && _uriEnd != 0) { 3485 if (_uriEnd != null && _uriEnd != 0) {
5428 fbBuilder.addUint32(2, _uriEnd); 3486 fbBuilder.addUint32(2, _uriEnd);
5429 } 3487 }
5430 if (_uriOffset != null && _uriOffset != 0) { 3488 if (_uriOffset != null && _uriOffset != 0) {
5431 fbBuilder.addUint32(3, _uriOffset); 3489 fbBuilder.addUint32(3, _uriOffset);
5432 } 3490 }
5433 return fbBuilder.endTable(); 3491 return fbBuilder.endTable();
5434 } 3492 }
5435 }
5436 3493
5437 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> { 3494 /**
5438 const _UnlinkedImportReader(); 3495 * Flush [informative] data recursively.
5439 3496 */
5440 @override 3497 void flushInformative() {
5441 _UnlinkedImportImpl createObject(fb.BufferPointer bp) => new _UnlinkedImportIm pl(bp); 3498 _annotations?.forEach((b) => b.flushInformative());
5442 } 3499 _combinators?.forEach((b) => b.flushInformative());
5443 3500 _offset = null;
5444 class _UnlinkedImportImpl extends Object with _UnlinkedImportMixin implements id l.UnlinkedImport { 3501 _prefixOffset = null;
5445 final fb.BufferPointer _bp; 3502 _uriEnd = null;
5446 3503 _uriOffset = null;
5447 _UnlinkedImportImpl(this._bp);
5448
5449 List<idl.UnlinkedConst> _annotations;
5450 List<idl.UnlinkedCombinator> _combinators;
5451 bool _isDeferred;
5452 bool _isImplicit;
5453 int _offset;
5454 int _prefixOffset;
5455 int _prefixReference;
5456 String _uri;
5457 int _uriEnd;
5458 int _uriOffset;
5459
5460 @override
5461 List<idl.UnlinkedConst> get annotations {
5462 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]);
5463 return _annotations;
5464 } 3504 }
5465
5466 @override
5467 List<idl.UnlinkedCombinator> get combinators {
5468 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked CombinatorReader()).vTableGet(_bp, 4, const <idl.UnlinkedCombinator>[]);
5469 return _combinators;
5470 }
5471
5472 @override
5473 bool get isDeferred {
5474 _isDeferred ??= const fb.BoolReader().vTableGet(_bp, 9, false);
5475 return _isDeferred;
5476 }
5477
5478 @override
5479 bool get isImplicit {
5480 _isImplicit ??= const fb.BoolReader().vTableGet(_bp, 5, false);
5481 return _isImplicit;
5482 }
5483
5484 @override
5485 int get offset {
5486 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
5487 return _offset;
5488 }
5489
5490 @override
5491 int get prefixOffset {
5492 _prefixOffset ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
5493 return _prefixOffset;
5494 }
5495
5496 @override
5497 int get prefixReference {
5498 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0);
5499 return _prefixReference;
5500 }
5501
5502 @override
5503 String get uri {
5504 _uri ??= const fb.StringReader().vTableGet(_bp, 1, '');
5505 return _uri;
5506 }
5507
5508 @override
5509 int get uriEnd {
5510 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
5511 return _uriEnd;
5512 }
5513
5514 @override
5515 int get uriOffset {
5516 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
5517 return _uriOffset;
5518 }
5519 }
5520
5521 abstract class _UnlinkedImportMixin implements idl.UnlinkedImport {
5522 @override
5523 Map<String, Object> toJson() {
5524 Map<String, Object> _result = <String, Object>{};
5525 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
5526 if (combinators.isNotEmpty) _result["combinators"] = combinators.map((_value ) => _value.toJson()).toList();
5527 if (isDeferred != false) _result["isDeferred"] = isDeferred;
5528 if (isImplicit != false) _result["isImplicit"] = isImplicit;
5529 if (offset != 0) _result["offset"] = offset;
5530 if (prefixOffset != 0) _result["prefixOffset"] = prefixOffset;
5531 if (prefixReference != 0) _result["prefixReference"] = prefixReference;
5532 if (uri != '') _result["uri"] = uri;
5533 if (uriEnd != 0) _result["uriEnd"] = uriEnd;
5534 if (uriOffset != 0) _result["uriOffset"] = uriOffset;
5535 return _result;
5536 }
5537
5538 @override
5539 Map<String, Object> toMap() => {
5540 "annotations": annotations,
5541 "combinators": combinators,
5542 "isDeferred": isDeferred,
5543 "isImplicit": isImplicit,
5544 "offset": offset,
5545 "prefixOffset": prefixOffset,
5546 "prefixReference": prefixReference,
5547 "uri": uri,
5548 "uriEnd": uriEnd,
5549 "uriOffset": uriOffset,
5550 };
5551
5552 @override
5553 String toString() => convert.JSON.encode(toJson());
5554 } 3505 }
5555 3506
5556 class UnlinkedLabelBuilder extends Object with _UnlinkedLabelMixin implements id l.UnlinkedLabel { 3507 class UnlinkedLabelBuilder extends Object with _UnlinkedLabelMixin implements id l.UnlinkedLabel {
5557 bool _finished = false; 3508 bool _finished = false;
5558 3509
5559 bool _isOnSwitchMember; 3510 bool _isOnSwitchMember;
5560 bool _isOnSwitchStatement; 3511 bool _isOnSwitchStatement;
5561 String _name; 3512 String _name;
5562 int _nameOffset; 3513 int _nameOffset;
5563 3514
3515 UnlinkedLabelBuilder({bool isOnSwitchMember, bool isOnSwitchStatement, String name, int nameOffset})
3516 : _isOnSwitchMember = isOnSwitchMember,
3517 _isOnSwitchStatement = isOnSwitchStatement,
3518 _name = name,
3519 _nameOffset = nameOffset;
3520
5564 @override 3521 @override
5565 bool get isOnSwitchMember => _isOnSwitchMember ??= false; 3522 bool get isOnSwitchMember => _isOnSwitchMember ??= false;
5566 3523
5567 /** 3524 /**
5568 * Return `true` if this label is associated with a `switch` member (`case` or 3525 * Return `true` if this label is associated with a `switch` member (`case` or
5569 * `default`). 3526 * `default`).
5570 */ 3527 */
5571 void set isOnSwitchMember(bool _value) { 3528 void set isOnSwitchMember(bool _value) {
5572 assert(!_finished); 3529 assert(!_finished);
5573 _isOnSwitchMember = _value; 3530 _isOnSwitchMember = _value;
(...skipping 26 matching lines...) Expand all
5600 3557
5601 /** 3558 /**
5602 * Offset of the label relative to the beginning of the file. 3559 * Offset of the label relative to the beginning of the file.
5603 */ 3560 */
5604 void set nameOffset(int _value) { 3561 void set nameOffset(int _value) {
5605 assert(!_finished); 3562 assert(!_finished);
5606 assert(_value == null || _value >= 0); 3563 assert(_value == null || _value >= 0);
5607 _nameOffset = _value; 3564 _nameOffset = _value;
5608 } 3565 }
5609 3566
5610 UnlinkedLabelBuilder({bool isOnSwitchMember, bool isOnSwitchStatement, String name, int nameOffset})
5611 : _isOnSwitchMember = isOnSwitchMember,
5612 _isOnSwitchStatement = isOnSwitchStatement,
5613 _name = name,
5614 _nameOffset = nameOffset;
5615
5616 /**
5617 * Flush [informative] data recursively.
5618 */
5619 void flushInformative() {
5620 _nameOffset = null;
5621 }
5622
5623 fb.Offset finish(fb.Builder fbBuilder) { 3567 fb.Offset finish(fb.Builder fbBuilder) {
5624 assert(!_finished); 3568 assert(!_finished);
5625 _finished = true; 3569 _finished = true;
5626 fb.Offset offset_name; 3570 fb.Offset offset_name;
5627 if (_name != null) { 3571 if (_name != null) {
5628 offset_name = fbBuilder.writeString(_name); 3572 offset_name = fbBuilder.writeString(_name);
5629 } 3573 }
5630 fbBuilder.startTable(); 3574 fbBuilder.startTable();
5631 if (_isOnSwitchMember == true) { 3575 if (_isOnSwitchMember == true) {
5632 fbBuilder.addBool(2, true); 3576 fbBuilder.addBool(2, true);
5633 } 3577 }
5634 if (_isOnSwitchStatement == true) { 3578 if (_isOnSwitchStatement == true) {
5635 fbBuilder.addBool(3, true); 3579 fbBuilder.addBool(3, true);
5636 } 3580 }
5637 if (offset_name != null) { 3581 if (offset_name != null) {
5638 fbBuilder.addOffset(0, offset_name); 3582 fbBuilder.addOffset(0, offset_name);
5639 } 3583 }
5640 if (_nameOffset != null && _nameOffset != 0) { 3584 if (_nameOffset != null && _nameOffset != 0) {
5641 fbBuilder.addUint32(1, _nameOffset); 3585 fbBuilder.addUint32(1, _nameOffset);
5642 } 3586 }
5643 return fbBuilder.endTable(); 3587 return fbBuilder.endTable();
5644 } 3588 }
5645 }
5646 3589
5647 class _UnlinkedLabelReader extends fb.TableReader<_UnlinkedLabelImpl> { 3590 /**
5648 const _UnlinkedLabelReader(); 3591 * Flush [informative] data recursively.
5649 3592 */
5650 @override 3593 void flushInformative() {
5651 _UnlinkedLabelImpl createObject(fb.BufferPointer bp) => new _UnlinkedLabelImpl (bp); 3594 _nameOffset = null;
5652 }
5653
5654 class _UnlinkedLabelImpl extends Object with _UnlinkedLabelMixin implements idl. UnlinkedLabel {
5655 final fb.BufferPointer _bp;
5656
5657 _UnlinkedLabelImpl(this._bp);
5658
5659 bool _isOnSwitchMember;
5660 bool _isOnSwitchStatement;
5661 String _name;
5662 int _nameOffset;
5663
5664 @override
5665 bool get isOnSwitchMember {
5666 _isOnSwitchMember ??= const fb.BoolReader().vTableGet(_bp, 2, false);
5667 return _isOnSwitchMember;
5668 }
5669
5670 @override
5671 bool get isOnSwitchStatement {
5672 _isOnSwitchStatement ??= const fb.BoolReader().vTableGet(_bp, 3, false);
5673 return _isOnSwitchStatement;
5674 }
5675
5676 @override
5677 String get name {
5678 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
5679 return _name;
5680 }
5681
5682 @override
5683 int get nameOffset {
5684 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
5685 return _nameOffset;
5686 } 3595 }
5687 } 3596 }
5688 3597
5689 abstract class _UnlinkedLabelMixin implements idl.UnlinkedLabel {
5690 @override
5691 Map<String, Object> toJson() {
5692 Map<String, Object> _result = <String, Object>{};
5693 if (isOnSwitchMember != false) _result["isOnSwitchMember"] = isOnSwitchMembe r;
5694 if (isOnSwitchStatement != false) _result["isOnSwitchStatement"] = isOnSwitc hStatement;
5695 if (name != '') _result["name"] = name;
5696 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
5697 return _result;
5698 }
5699
5700 @override
5701 Map<String, Object> toMap() => {
5702 "isOnSwitchMember": isOnSwitchMember,
5703 "isOnSwitchStatement": isOnSwitchStatement,
5704 "name": name,
5705 "nameOffset": nameOffset,
5706 };
5707
5708 @override
5709 String toString() => convert.JSON.encode(toJson());
5710 }
5711
5712 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id l.UnlinkedParam { 3598 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id l.UnlinkedParam {
5713 bool _finished = false; 3599 bool _finished = false;
5714 3600
5715 List<UnlinkedConstBuilder> _annotations; 3601 List<UnlinkedConstBuilder> _annotations;
5716 CodeRangeBuilder _codeRange; 3602 CodeRangeBuilder _codeRange;
5717 UnlinkedConstBuilder _defaultValue; 3603 UnlinkedConstBuilder _defaultValue;
5718 String _defaultValueCode; 3604 String _defaultValueCode;
5719 int _inferredTypeSlot; 3605 int _inferredTypeSlot;
5720 UnlinkedExecutableBuilder _initializer; 3606 UnlinkedExecutableBuilder _initializer;
5721 bool _isFunctionTyped; 3607 bool _isFunctionTyped;
5722 bool _isInitializingFormal; 3608 bool _isInitializingFormal;
5723 idl.UnlinkedParamKind _kind; 3609 idl.UnlinkedParamKind _kind;
5724 String _name; 3610 String _name;
5725 int _nameOffset; 3611 int _nameOffset;
5726 List<UnlinkedParamBuilder> _parameters; 3612 List<UnlinkedParamBuilder> _parameters;
5727 EntityRefBuilder _type; 3613 EntityRefBuilder _type;
5728 int _visibleLength; 3614 int _visibleLength;
5729 int _visibleOffset; 3615 int _visibleOffset;
5730 3616
3617 UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedConstBuilder defaultValue, String defaultValueCode, int infe rredTypeSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, L ist<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
3618 : _annotations = annotations,
3619 _codeRange = codeRange,
3620 _defaultValue = defaultValue,
3621 _defaultValueCode = defaultValueCode,
3622 _inferredTypeSlot = inferredTypeSlot,
3623 _initializer = initializer,
3624 _isFunctionTyped = isFunctionTyped,
3625 _isInitializingFormal = isInitializingFormal,
3626 _kind = kind,
3627 _name = name,
3628 _nameOffset = nameOffset,
3629 _parameters = parameters,
3630 _type = type,
3631 _visibleLength = visibleLength,
3632 _visibleOffset = visibleOffset;
3633
5731 @override 3634 @override
5732 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 3635 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
5733 3636
5734 /** 3637 /**
5735 * Annotations for this parameter. 3638 * Annotations for this parameter.
5736 */ 3639 */
5737 void set annotations(List<UnlinkedConstBuilder> _value) { 3640 void set annotations(List<UnlinkedConstBuilder> _value) {
5738 assert(!_finished); 3641 assert(!_finished);
5739 _annotations = _value; 3642 _annotations = _value;
5740 } 3643 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
5905 3808
5906 /** 3809 /**
5907 * The beginning of the visible range. 3810 * The beginning of the visible range.
5908 */ 3811 */
5909 void set visibleOffset(int _value) { 3812 void set visibleOffset(int _value) {
5910 assert(!_finished); 3813 assert(!_finished);
5911 assert(_value == null || _value >= 0); 3814 assert(_value == null || _value >= 0);
5912 _visibleOffset = _value; 3815 _visibleOffset = _value;
5913 } 3816 }
5914 3817
5915 UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, UnlinkedConstBuilder defaultValue, String defaultValueCode, int infe rredTypeSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, L ist<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
5916 : _annotations = annotations,
5917 _codeRange = codeRange,
5918 _defaultValue = defaultValue,
5919 _defaultValueCode = defaultValueCode,
5920 _inferredTypeSlot = inferredTypeSlot,
5921 _initializer = initializer,
5922 _isFunctionTyped = isFunctionTyped,
5923 _isInitializingFormal = isInitializingFormal,
5924 _kind = kind,
5925 _name = name,
5926 _nameOffset = nameOffset,
5927 _parameters = parameters,
5928 _type = type,
5929 _visibleLength = visibleLength,
5930 _visibleOffset = visibleOffset;
5931
5932 /**
5933 * Flush [informative] data recursively.
5934 */
5935 void flushInformative() {
5936 _annotations?.forEach((b) => b.flushInformative());
5937 _codeRange = null;
5938 _defaultValue?.flushInformative();
5939 _defaultValueCode = null;
5940 _initializer?.flushInformative();
5941 _nameOffset = null;
5942 _parameters?.forEach((b) => b.flushInformative());
5943 _type?.flushInformative();
5944 }
5945
5946 fb.Offset finish(fb.Builder fbBuilder) { 3818 fb.Offset finish(fb.Builder fbBuilder) {
5947 assert(!_finished); 3819 assert(!_finished);
5948 _finished = true; 3820 _finished = true;
5949 fb.Offset offset_annotations; 3821 fb.Offset offset_annotations;
5950 fb.Offset offset_codeRange; 3822 fb.Offset offset_codeRange;
5951 fb.Offset offset_defaultValue; 3823 fb.Offset offset_defaultValue;
5952 fb.Offset offset_defaultValueCode; 3824 fb.Offset offset_defaultValueCode;
5953 fb.Offset offset_initializer; 3825 fb.Offset offset_initializer;
5954 fb.Offset offset_name; 3826 fb.Offset offset_name;
5955 fb.Offset offset_parameters; 3827 fb.Offset offset_parameters;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
6019 fbBuilder.addOffset(3, offset_type); 3891 fbBuilder.addOffset(3, offset_type);
6020 } 3892 }
6021 if (_visibleLength != null && _visibleLength != 0) { 3893 if (_visibleLength != null && _visibleLength != 0) {
6022 fbBuilder.addUint32(10, _visibleLength); 3894 fbBuilder.addUint32(10, _visibleLength);
6023 } 3895 }
6024 if (_visibleOffset != null && _visibleOffset != 0) { 3896 if (_visibleOffset != null && _visibleOffset != 0) {
6025 fbBuilder.addUint32(11, _visibleOffset); 3897 fbBuilder.addUint32(11, _visibleOffset);
6026 } 3898 }
6027 return fbBuilder.endTable(); 3899 return fbBuilder.endTable();
6028 } 3900 }
6029 }
6030 3901
6031 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { 3902 /**
6032 const _UnlinkedParamReader(); 3903 * Flush [informative] data recursively.
6033 3904 */
6034 @override 3905 void flushInformative() {
6035 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl (bp); 3906 _annotations?.forEach((b) => b.flushInformative());
6036 } 3907 _codeRange = null;
6037 3908 _defaultValue?.flushInformative();
6038 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl. UnlinkedParam { 3909 _defaultValueCode = null;
6039 final fb.BufferPointer _bp; 3910 _initializer?.flushInformative();
6040 3911 _nameOffset = null;
6041 _UnlinkedParamImpl(this._bp); 3912 _parameters?.forEach((b) => b.flushInformative());
6042 3913 _type?.flushInformative();
6043 List<idl.UnlinkedConst> _annotations;
6044 idl.CodeRange _codeRange;
6045 idl.UnlinkedConst _defaultValue;
6046 String _defaultValueCode;
6047 int _inferredTypeSlot;
6048 idl.UnlinkedExecutable _initializer;
6049 bool _isFunctionTyped;
6050 bool _isInitializingFormal;
6051 idl.UnlinkedParamKind _kind;
6052 String _name;
6053 int _nameOffset;
6054 List<idl.UnlinkedParam> _parameters;
6055 idl.EntityRef _type;
6056 int _visibleLength;
6057 int _visibleOffset;
6058
6059 @override
6060 List<idl.UnlinkedConst> get annotations {
6061 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]);
6062 return _annotations;
6063 } 3914 }
6064
6065 @override
6066 idl.CodeRange get codeRange {
6067 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null);
6068 return _codeRange;
6069 }
6070
6071 @override
6072 idl.UnlinkedConst get defaultValue {
6073 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null);
6074 return _defaultValue;
6075 }
6076
6077 @override
6078 String get defaultValueCode {
6079 _defaultValueCode ??= const fb.StringReader().vTableGet(_bp, 13, '');
6080 return _defaultValueCode;
6081 }
6082
6083 @override
6084 int get inferredTypeSlot {
6085 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
6086 return _inferredTypeSlot;
6087 }
6088
6089 @override
6090 idl.UnlinkedExecutable get initializer {
6091 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 12, null);
6092 return _initializer;
6093 }
6094
6095 @override
6096 bool get isFunctionTyped {
6097 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bp, 5, false);
6098 return _isFunctionTyped;
6099 }
6100
6101 @override
6102 bool get isInitializingFormal {
6103 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bp, 6, false);
6104 return _isInitializingFormal;
6105 }
6106
6107 @override
6108 idl.UnlinkedParamKind get kind {
6109 _kind ??= const _UnlinkedParamKindReader().vTableGet(_bp, 4, idl.UnlinkedPar amKind.required);
6110 return _kind;
6111 }
6112
6113 @override
6114 String get name {
6115 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6116 return _name;
6117 }
6118
6119 @override
6120 int get nameOffset {
6121 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
6122 return _nameOffset;
6123 }
6124
6125 @override
6126 List<idl.UnlinkedParam> get parameters {
6127 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR eader()).vTableGet(_bp, 8, const <idl.UnlinkedParam>[]);
6128 return _parameters;
6129 }
6130
6131 @override
6132 idl.EntityRef get type {
6133 _type ??= const _EntityRefReader().vTableGet(_bp, 3, null);
6134 return _type;
6135 }
6136
6137 @override
6138 int get visibleLength {
6139 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 10, 0);
6140 return _visibleLength;
6141 }
6142
6143 @override
6144 int get visibleOffset {
6145 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0);
6146 return _visibleOffset;
6147 }
6148 }
6149
6150 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam {
6151 @override
6152 Map<String, Object> toJson() {
6153 Map<String, Object> _result = <String, Object>{};
6154 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
6155 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
6156 if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson();
6157 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode;
6158 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
6159 if (initializer != null) _result["initializer"] = initializer.toJson();
6160 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped;
6161 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti alizingFormal;
6162 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString( ).split('.')[1];
6163 if (name != '') _result["name"] = name;
6164 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
6165 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
6166 if (type != null) _result["type"] = type.toJson();
6167 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
6168 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
6169 return _result;
6170 }
6171
6172 @override
6173 Map<String, Object> toMap() => {
6174 "annotations": annotations,
6175 "codeRange": codeRange,
6176 "defaultValue": defaultValue,
6177 "defaultValueCode": defaultValueCode,
6178 "inferredTypeSlot": inferredTypeSlot,
6179 "initializer": initializer,
6180 "isFunctionTyped": isFunctionTyped,
6181 "isInitializingFormal": isInitializingFormal,
6182 "kind": kind,
6183 "name": name,
6184 "nameOffset": nameOffset,
6185 "parameters": parameters,
6186 "type": type,
6187 "visibleLength": visibleLength,
6188 "visibleOffset": visibleOffset,
6189 };
6190
6191 @override
6192 String toString() => convert.JSON.encode(toJson());
6193 } 3915 }
6194 3916
6195 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl. UnlinkedPart { 3917 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl. UnlinkedPart {
6196 bool _finished = false; 3918 bool _finished = false;
6197 3919
6198 List<UnlinkedConstBuilder> _annotations; 3920 List<UnlinkedConstBuilder> _annotations;
6199 int _uriEnd; 3921 int _uriEnd;
6200 int _uriOffset; 3922 int _uriOffset;
6201 3923
3924 UnlinkedPartBuilder({List<UnlinkedConstBuilder> annotations, int uriEnd, int u riOffset})
3925 : _annotations = annotations,
3926 _uriEnd = uriEnd,
3927 _uriOffset = uriOffset;
3928
6202 @override 3929 @override
6203 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 3930 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
6204 3931
6205 /** 3932 /**
6206 * Annotations for this part declaration. 3933 * Annotations for this part declaration.
6207 */ 3934 */
6208 void set annotations(List<UnlinkedConstBuilder> _value) { 3935 void set annotations(List<UnlinkedConstBuilder> _value) {
6209 assert(!_finished); 3936 assert(!_finished);
6210 _annotations = _value; 3937 _annotations = _value;
6211 } 3938 }
(...skipping 17 matching lines...) Expand all
6229 /** 3956 /**
6230 * Offset of the URI string (including quotes) relative to the beginning of 3957 * Offset of the URI string (including quotes) relative to the beginning of
6231 * the file. 3958 * the file.
6232 */ 3959 */
6233 void set uriOffset(int _value) { 3960 void set uriOffset(int _value) {
6234 assert(!_finished); 3961 assert(!_finished);
6235 assert(_value == null || _value >= 0); 3962 assert(_value == null || _value >= 0);
6236 _uriOffset = _value; 3963 _uriOffset = _value;
6237 } 3964 }
6238 3965
6239 UnlinkedPartBuilder({List<UnlinkedConstBuilder> annotations, int uriEnd, int u riOffset})
6240 : _annotations = annotations,
6241 _uriEnd = uriEnd,
6242 _uriOffset = uriOffset;
6243
6244 /**
6245 * Flush [informative] data recursively.
6246 */
6247 void flushInformative() {
6248 _annotations?.forEach((b) => b.flushInformative());
6249 _uriEnd = null;
6250 _uriOffset = null;
6251 }
6252
6253 fb.Offset finish(fb.Builder fbBuilder) { 3966 fb.Offset finish(fb.Builder fbBuilder) {
6254 assert(!_finished); 3967 assert(!_finished);
6255 _finished = true; 3968 _finished = true;
6256 fb.Offset offset_annotations; 3969 fb.Offset offset_annotations;
6257 if (!(_annotations == null || _annotations.isEmpty)) { 3970 if (!(_annotations == null || _annotations.isEmpty)) {
6258 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 3971 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
6259 } 3972 }
6260 fbBuilder.startTable(); 3973 fbBuilder.startTable();
6261 if (offset_annotations != null) { 3974 if (offset_annotations != null) {
6262 fbBuilder.addOffset(2, offset_annotations); 3975 fbBuilder.addOffset(2, offset_annotations);
6263 } 3976 }
6264 if (_uriEnd != null && _uriEnd != 0) { 3977 if (_uriEnd != null && _uriEnd != 0) {
6265 fbBuilder.addUint32(0, _uriEnd); 3978 fbBuilder.addUint32(0, _uriEnd);
6266 } 3979 }
6267 if (_uriOffset != null && _uriOffset != 0) { 3980 if (_uriOffset != null && _uriOffset != 0) {
6268 fbBuilder.addUint32(1, _uriOffset); 3981 fbBuilder.addUint32(1, _uriOffset);
6269 } 3982 }
6270 return fbBuilder.endTable(); 3983 return fbBuilder.endTable();
6271 } 3984 }
6272 }
6273 3985
6274 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> { 3986 /**
6275 const _UnlinkedPartReader(); 3987 * Flush [informative] data recursively.
6276 3988 */
6277 @override 3989 void flushInformative() {
6278 _UnlinkedPartImpl createObject(fb.BufferPointer bp) => new _UnlinkedPartImpl(b p); 3990 _annotations?.forEach((b) => b.flushInformative());
6279 } 3991 _uriEnd = null;
6280 3992 _uriOffset = null;
6281 class _UnlinkedPartImpl extends Object with _UnlinkedPartMixin implements idl.Un linkedPart {
6282 final fb.BufferPointer _bp;
6283
6284 _UnlinkedPartImpl(this._bp);
6285
6286 List<idl.UnlinkedConst> _annotations;
6287 int _uriEnd;
6288 int _uriOffset;
6289
6290 @override
6291 List<idl.UnlinkedConst> get annotations {
6292 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 2, const <idl.UnlinkedConst>[]);
6293 return _annotations;
6294 }
6295
6296 @override
6297 int get uriEnd {
6298 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
6299 return _uriEnd;
6300 }
6301
6302 @override
6303 int get uriOffset {
6304 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
6305 return _uriOffset;
6306 } 3993 }
6307 } 3994 }
6308 3995
6309 abstract class _UnlinkedPartMixin implements idl.UnlinkedPart {
6310 @override
6311 Map<String, Object> toJson() {
6312 Map<String, Object> _result = <String, Object>{};
6313 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
6314 if (uriEnd != 0) _result["uriEnd"] = uriEnd;
6315 if (uriOffset != 0) _result["uriOffset"] = uriOffset;
6316 return _result;
6317 }
6318
6319 @override
6320 Map<String, Object> toMap() => {
6321 "annotations": annotations,
6322 "uriEnd": uriEnd,
6323 "uriOffset": uriOffset,
6324 };
6325
6326 @override
6327 String toString() => convert.JSON.encode(toJson());
6328 }
6329
6330 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp lements idl.UnlinkedPublicName { 3996 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp lements idl.UnlinkedPublicName {
6331 bool _finished = false; 3997 bool _finished = false;
6332 3998
6333 idl.ReferenceKind _kind; 3999 idl.ReferenceKind _kind;
6334 List<UnlinkedPublicNameBuilder> _members; 4000 List<UnlinkedPublicNameBuilder> _members;
6335 String _name; 4001 String _name;
6336 int _numTypeParameters; 4002 int _numTypeParameters;
6337 4003
4004 UnlinkedPublicNameBuilder({idl.ReferenceKind kind, List<UnlinkedPublicNameBuil der> members, String name, int numTypeParameters})
4005 : _kind = kind,
4006 _members = members,
4007 _name = name,
4008 _numTypeParameters = numTypeParameters;
4009
6338 @override 4010 @override
6339 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; 4011 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum;
6340 4012
6341 /** 4013 /**
6342 * The kind of object referred to by the name. 4014 * The kind of object referred to by the name.
6343 */ 4015 */
6344 void set kind(idl.ReferenceKind _value) { 4016 void set kind(idl.ReferenceKind _value) {
6345 assert(!_finished); 4017 assert(!_finished);
6346 _kind = _value; 4018 _kind = _value;
6347 } 4019 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
6379 /** 4051 /**
6380 * If the entity being referred to is generic, the number of type parameters 4052 * If the entity being referred to is generic, the number of type parameters
6381 * it accepts. Otherwise zero. 4053 * it accepts. Otherwise zero.
6382 */ 4054 */
6383 void set numTypeParameters(int _value) { 4055 void set numTypeParameters(int _value) {
6384 assert(!_finished); 4056 assert(!_finished);
6385 assert(_value == null || _value >= 0); 4057 assert(_value == null || _value >= 0);
6386 _numTypeParameters = _value; 4058 _numTypeParameters = _value;
6387 } 4059 }
6388 4060
6389 UnlinkedPublicNameBuilder({idl.ReferenceKind kind, List<UnlinkedPublicNameBuil der> members, String name, int numTypeParameters})
6390 : _kind = kind,
6391 _members = members,
6392 _name = name,
6393 _numTypeParameters = numTypeParameters;
6394
6395 /**
6396 * Flush [informative] data recursively.
6397 */
6398 void flushInformative() {
6399 _members?.forEach((b) => b.flushInformative());
6400 }
6401
6402 fb.Offset finish(fb.Builder fbBuilder) { 4061 fb.Offset finish(fb.Builder fbBuilder) {
6403 assert(!_finished); 4062 assert(!_finished);
6404 _finished = true; 4063 _finished = true;
6405 fb.Offset offset_members; 4064 fb.Offset offset_members;
6406 fb.Offset offset_name; 4065 fb.Offset offset_name;
6407 if (!(_members == null || _members.isEmpty)) { 4066 if (!(_members == null || _members.isEmpty)) {
6408 offset_members = fbBuilder.writeList(_members.map((b) => b.finish(fbBuilde r)).toList()); 4067 offset_members = fbBuilder.writeList(_members.map((b) => b.finish(fbBuilde r)).toList());
6409 } 4068 }
6410 if (_name != null) { 4069 if (_name != null) {
6411 offset_name = fbBuilder.writeString(_name); 4070 offset_name = fbBuilder.writeString(_name);
6412 } 4071 }
6413 fbBuilder.startTable(); 4072 fbBuilder.startTable();
6414 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { 4073 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) {
6415 fbBuilder.addUint8(1, _kind.index); 4074 fbBuilder.addUint8(1, _kind.index);
6416 } 4075 }
6417 if (offset_members != null) { 4076 if (offset_members != null) {
6418 fbBuilder.addOffset(2, offset_members); 4077 fbBuilder.addOffset(2, offset_members);
6419 } 4078 }
6420 if (offset_name != null) { 4079 if (offset_name != null) {
6421 fbBuilder.addOffset(0, offset_name); 4080 fbBuilder.addOffset(0, offset_name);
6422 } 4081 }
6423 if (_numTypeParameters != null && _numTypeParameters != 0) { 4082 if (_numTypeParameters != null && _numTypeParameters != 0) {
6424 fbBuilder.addUint32(3, _numTypeParameters); 4083 fbBuilder.addUint32(3, _numTypeParameters);
6425 } 4084 }
6426 return fbBuilder.endTable(); 4085 return fbBuilder.endTable();
6427 } 4086 }
6428 }
6429 4087
6430 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl> { 4088 /**
6431 const _UnlinkedPublicNameReader(); 4089 * Flush [informative] data recursively.
6432 4090 */
6433 @override 4091 void flushInformative() {
6434 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl icNameImpl(bp); 4092 _members?.forEach((b) => b.flushInformative());
6435 }
6436
6437 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple ments idl.UnlinkedPublicName {
6438 final fb.BufferPointer _bp;
6439
6440 _UnlinkedPublicNameImpl(this._bp);
6441
6442 idl.ReferenceKind _kind;
6443 List<idl.UnlinkedPublicName> _members;
6444 String _name;
6445 int _numTypeParameters;
6446
6447 @override
6448 idl.ReferenceKind get kind {
6449 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, idl.ReferenceKind.c lassOrEnum);
6450 return _kind;
6451 } 4093 }
6452
6453 @override
6454 List<idl.UnlinkedPublicName> get members {
6455 _members ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPubl icNameReader()).vTableGet(_bp, 2, const <idl.UnlinkedPublicName>[]);
6456 return _members;
6457 }
6458
6459 @override
6460 String get name {
6461 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6462 return _name;
6463 }
6464
6465 @override
6466 int get numTypeParameters {
6467 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
6468 return _numTypeParameters;
6469 }
6470 }
6471
6472 abstract class _UnlinkedPublicNameMixin implements idl.UnlinkedPublicName {
6473 @override
6474 Map<String, Object> toJson() {
6475 Map<String, Object> _result = <String, Object>{};
6476 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString() .split('.')[1];
6477 if (members.isNotEmpty) _result["members"] = members.map((_value) => _value. toJson()).toList();
6478 if (name != '') _result["name"] = name;
6479 if (numTypeParameters != 0) _result["numTypeParameters"] = numTypeParameters ;
6480 return _result;
6481 }
6482
6483 @override
6484 Map<String, Object> toMap() => {
6485 "kind": kind,
6486 "members": members,
6487 "name": name,
6488 "numTypeParameters": numTypeParameters,
6489 };
6490
6491 @override
6492 String toString() => convert.JSON.encode(toJson());
6493 } 4094 }
6494 4095
6495 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac eMixin implements idl.UnlinkedPublicNamespace { 4096 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac eMixin implements idl.UnlinkedPublicNamespace {
6496 bool _finished = false; 4097 bool _finished = false;
6497 4098
6498 List<UnlinkedExportPublicBuilder> _exports; 4099 List<UnlinkedExportPublicBuilder> _exports;
6499 List<UnlinkedPublicNameBuilder> _names; 4100 List<UnlinkedPublicNameBuilder> _names;
6500 List<String> _parts; 4101 List<String> _parts;
6501 4102
4103 UnlinkedPublicNamespaceBuilder({List<UnlinkedExportPublicBuilder> exports, Lis t<UnlinkedPublicNameBuilder> names, List<String> parts})
4104 : _exports = exports,
4105 _names = names,
4106 _parts = parts;
4107
6502 @override 4108 @override
6503 List<UnlinkedExportPublicBuilder> get exports => _exports ??= <UnlinkedExportP ublicBuilder>[]; 4109 List<UnlinkedExportPublicBuilder> get exports => _exports ??= <UnlinkedExportP ublicBuilder>[];
6504 4110
6505 /** 4111 /**
6506 * Export declarations in the compilation unit. 4112 * Export declarations in the compilation unit.
6507 */ 4113 */
6508 void set exports(List<UnlinkedExportPublicBuilder> _value) { 4114 void set exports(List<UnlinkedExportPublicBuilder> _value) {
6509 assert(!_finished); 4115 assert(!_finished);
6510 _exports = _value; 4116 _exports = _value;
6511 } 4117 }
(...skipping 16 matching lines...) Expand all
6528 List<String> get parts => _parts ??= <String>[]; 4134 List<String> get parts => _parts ??= <String>[];
6529 4135
6530 /** 4136 /**
6531 * URIs referenced by part declarations in the compilation unit. 4137 * URIs referenced by part declarations in the compilation unit.
6532 */ 4138 */
6533 void set parts(List<String> _value) { 4139 void set parts(List<String> _value) {
6534 assert(!_finished); 4140 assert(!_finished);
6535 _parts = _value; 4141 _parts = _value;
6536 } 4142 }
6537 4143
6538 UnlinkedPublicNamespaceBuilder({List<UnlinkedExportPublicBuilder> exports, Lis t<UnlinkedPublicNameBuilder> names, List<String> parts})
6539 : _exports = exports,
6540 _names = names,
6541 _parts = parts;
6542
6543 /**
6544 * Flush [informative] data recursively.
6545 */
6546 void flushInformative() {
6547 _exports?.forEach((b) => b.flushInformative());
6548 _names?.forEach((b) => b.flushInformative());
6549 }
6550
6551 List<int> toBuffer() {
6552 fb.Builder fbBuilder = new fb.Builder();
6553 return fbBuilder.finish(finish(fbBuilder), "UPNS");
6554 }
6555
6556 fb.Offset finish(fb.Builder fbBuilder) { 4144 fb.Offset finish(fb.Builder fbBuilder) {
6557 assert(!_finished); 4145 assert(!_finished);
6558 _finished = true; 4146 _finished = true;
6559 fb.Offset offset_exports; 4147 fb.Offset offset_exports;
6560 fb.Offset offset_names; 4148 fb.Offset offset_names;
6561 fb.Offset offset_parts; 4149 fb.Offset offset_parts;
6562 if (!(_exports == null || _exports.isEmpty)) { 4150 if (!(_exports == null || _exports.isEmpty)) {
6563 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde r)).toList()); 4151 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde r)).toList());
6564 } 4152 }
6565 if (!(_names == null || _names.isEmpty)) { 4153 if (!(_names == null || _names.isEmpty)) {
6566 offset_names = fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)). toList()); 4154 offset_names = fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)). toList());
6567 } 4155 }
6568 if (!(_parts == null || _parts.isEmpty)) { 4156 if (!(_parts == null || _parts.isEmpty)) {
6569 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList()); 4157 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString (b)).toList());
6570 } 4158 }
6571 fbBuilder.startTable(); 4159 fbBuilder.startTable();
6572 if (offset_exports != null) { 4160 if (offset_exports != null) {
6573 fbBuilder.addOffset(2, offset_exports); 4161 fbBuilder.addOffset(2, offset_exports);
6574 } 4162 }
6575 if (offset_names != null) { 4163 if (offset_names != null) {
6576 fbBuilder.addOffset(0, offset_names); 4164 fbBuilder.addOffset(0, offset_names);
6577 } 4165 }
6578 if (offset_parts != null) { 4166 if (offset_parts != null) {
6579 fbBuilder.addOffset(1, offset_parts); 4167 fbBuilder.addOffset(1, offset_parts);
6580 } 4168 }
6581 return fbBuilder.endTable(); 4169 return fbBuilder.endTable();
6582 } 4170 }
6583 }
6584 4171
6585 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) { 4172 /**
6586 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 4173 * Flush [informative] data recursively.
6587 return const _UnlinkedPublicNamespaceReader().read(rootRef); 4174 */
6588 } 4175 void flushInformative() {
6589 4176 _exports?.forEach((b) => b.flushInformative());
6590 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames paceImpl> { 4177 _names?.forEach((b) => b.flushInformative());
6591 const _UnlinkedPublicNamespaceReader();
6592
6593 @override
6594 _UnlinkedPublicNamespaceImpl createObject(fb.BufferPointer bp) => new _Unlinke dPublicNamespaceImpl(bp);
6595 }
6596
6597 class _UnlinkedPublicNamespaceImpl extends Object with _UnlinkedPublicNamespaceM ixin implements idl.UnlinkedPublicNamespace {
6598 final fb.BufferPointer _bp;
6599
6600 _UnlinkedPublicNamespaceImpl(this._bp);
6601
6602 List<idl.UnlinkedExportPublic> _exports;
6603 List<idl.UnlinkedPublicName> _names;
6604 List<String> _parts;
6605
6606 @override
6607 List<idl.UnlinkedExportPublic> get exports {
6608 _exports ??= const fb.ListReader<idl.UnlinkedExportPublic>(const _UnlinkedEx portPublicReader()).vTableGet(_bp, 2, const <idl.UnlinkedExportPublic>[]);
6609 return _exports;
6610 } 4178 }
6611 4179
6612 @override 4180 List<int> toBuffer() {
6613 List<idl.UnlinkedPublicName> get names { 4181 fb.Builder fbBuilder = new fb.Builder();
6614 _names ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPublic NameReader()).vTableGet(_bp, 0, const <idl.UnlinkedPublicName>[]); 4182 return fbBuilder.finish(finish(fbBuilder), "UPNS");
6615 return _names;
6616 }
6617
6618 @override
6619 List<String> get parts {
6620 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
6621 return _parts;
6622 } 4183 }
6623 } 4184 }
6624 4185
6625 abstract class _UnlinkedPublicNamespaceMixin implements idl.UnlinkedPublicNamesp ace {
6626 @override
6627 Map<String, Object> toJson() {
6628 Map<String, Object> _result = <String, Object>{};
6629 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value. toJson()).toList();
6630 if (names.isNotEmpty) _result["names"] = names.map((_value) => _value.toJson ()).toList();
6631 if (parts.isNotEmpty) _result["parts"] = parts;
6632 return _result;
6633 }
6634
6635 @override
6636 Map<String, Object> toMap() => {
6637 "exports": exports,
6638 "names": names,
6639 "parts": parts,
6640 };
6641
6642 @override
6643 String toString() => convert.JSON.encode(toJson());
6644 }
6645
6646 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple ments idl.UnlinkedReference { 4186 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple ments idl.UnlinkedReference {
6647 bool _finished = false; 4187 bool _finished = false;
6648 4188
6649 String _name; 4189 String _name;
6650 int _prefixReference; 4190 int _prefixReference;
6651 4191
4192 UnlinkedReferenceBuilder({String name, int prefixReference})
4193 : _name = name,
4194 _prefixReference = prefixReference;
4195
6652 @override 4196 @override
6653 String get name => _name ??= ''; 4197 String get name => _name ??= '';
6654 4198
6655 /** 4199 /**
6656 * Name of the entity being referred to. For the pseudo-type `dynamic`, the 4200 * Name of the entity being referred to. For the pseudo-type `dynamic`, the
6657 * string is "dynamic". For the pseudo-type `void`, the string is "void". 4201 * string is "dynamic". For the pseudo-type `void`, the string is "void".
6658 * For the pseudo-type `bottom`, the string is "*bottom*". 4202 * For the pseudo-type `bottom`, the string is "*bottom*".
6659 */ 4203 */
6660 void set name(String _value) { 4204 void set name(String _value) {
6661 assert(!_finished); 4205 assert(!_finished);
(...skipping 10 matching lines...) Expand all
6672 * Prefix references must always point backward; that is, for all i, if 4216 * Prefix references must always point backward; that is, for all i, if
6673 * UnlinkedUnit.references[i].prefixReference != 0, then 4217 * UnlinkedUnit.references[i].prefixReference != 0, then
6674 * UnlinkedUnit.references[i].prefixReference < i. 4218 * UnlinkedUnit.references[i].prefixReference < i.
6675 */ 4219 */
6676 void set prefixReference(int _value) { 4220 void set prefixReference(int _value) {
6677 assert(!_finished); 4221 assert(!_finished);
6678 assert(_value == null || _value >= 0); 4222 assert(_value == null || _value >= 0);
6679 _prefixReference = _value; 4223 _prefixReference = _value;
6680 } 4224 }
6681 4225
6682 UnlinkedReferenceBuilder({String name, int prefixReference})
6683 : _name = name,
6684 _prefixReference = prefixReference;
6685
6686 /**
6687 * Flush [informative] data recursively.
6688 */
6689 void flushInformative() {
6690 }
6691
6692 fb.Offset finish(fb.Builder fbBuilder) { 4226 fb.Offset finish(fb.Builder fbBuilder) {
6693 assert(!_finished); 4227 assert(!_finished);
6694 _finished = true; 4228 _finished = true;
6695 fb.Offset offset_name; 4229 fb.Offset offset_name;
6696 if (_name != null) { 4230 if (_name != null) {
6697 offset_name = fbBuilder.writeString(_name); 4231 offset_name = fbBuilder.writeString(_name);
6698 } 4232 }
6699 fbBuilder.startTable(); 4233 fbBuilder.startTable();
6700 if (offset_name != null) { 4234 if (offset_name != null) {
6701 fbBuilder.addOffset(0, offset_name); 4235 fbBuilder.addOffset(0, offset_name);
6702 } 4236 }
6703 if (_prefixReference != null && _prefixReference != 0) { 4237 if (_prefixReference != null && _prefixReference != 0) {
6704 fbBuilder.addUint32(1, _prefixReference); 4238 fbBuilder.addUint32(1, _prefixReference);
6705 } 4239 }
6706 return fbBuilder.endTable(); 4240 return fbBuilder.endTable();
6707 } 4241 }
6708 }
6709 4242
6710 class _UnlinkedReferenceReader extends fb.TableReader<_UnlinkedReferenceImpl> { 4243 /**
6711 const _UnlinkedReferenceReader(); 4244 * Flush [informative] data recursively.
6712 4245 */
6713 @override 4246 void flushInformative() {
6714 _UnlinkedReferenceImpl createObject(fb.BufferPointer bp) => new _UnlinkedRefer enceImpl(bp);
6715 }
6716
6717 class _UnlinkedReferenceImpl extends Object with _UnlinkedReferenceMixin impleme nts idl.UnlinkedReference {
6718 final fb.BufferPointer _bp;
6719
6720 _UnlinkedReferenceImpl(this._bp);
6721
6722 String _name;
6723 int _prefixReference;
6724
6725 @override
6726 String get name {
6727 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6728 return _name;
6729 }
6730
6731 @override
6732 int get prefixReference {
6733 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
6734 return _prefixReference;
6735 } 4247 }
6736 } 4248 }
6737 4249
6738 abstract class _UnlinkedReferenceMixin implements idl.UnlinkedReference {
6739 @override
6740 Map<String, Object> toJson() {
6741 Map<String, Object> _result = <String, Object>{};
6742 if (name != '') _result["name"] = name;
6743 if (prefixReference != 0) _result["prefixReference"] = prefixReference;
6744 return _result;
6745 }
6746
6747 @override
6748 Map<String, Object> toMap() => {
6749 "name": name,
6750 "prefixReference": prefixReference,
6751 };
6752
6753 @override
6754 String toString() => convert.JSON.encode(toJson());
6755 }
6756
6757 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement s idl.UnlinkedTypedef { 4250 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement s idl.UnlinkedTypedef {
6758 bool _finished = false; 4251 bool _finished = false;
6759 4252
6760 List<UnlinkedConstBuilder> _annotations; 4253 List<UnlinkedConstBuilder> _annotations;
6761 CodeRangeBuilder _codeRange; 4254 CodeRangeBuilder _codeRange;
6762 UnlinkedDocumentationCommentBuilder _documentationComment; 4255 UnlinkedDocumentationCommentBuilder _documentationComment;
6763 String _name; 4256 String _name;
6764 int _nameOffset; 4257 int _nameOffset;
6765 List<UnlinkedParamBuilder> _parameters; 4258 List<UnlinkedParamBuilder> _parameters;
6766 EntityRefBuilder _returnType; 4259 EntityRefBuilder _returnType;
6767 List<UnlinkedTypeParamBuilder> _typeParameters; 4260 List<UnlinkedTypeParamBuilder> _typeParameters;
6768 4261
4262 UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuild er codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String n ame, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder ret urnType, List<UnlinkedTypeParamBuilder> typeParameters})
4263 : _annotations = annotations,
4264 _codeRange = codeRange,
4265 _documentationComment = documentationComment,
4266 _name = name,
4267 _nameOffset = nameOffset,
4268 _parameters = parameters,
4269 _returnType = returnType,
4270 _typeParameters = typeParameters;
4271
6769 @override 4272 @override
6770 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 4273 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
6771 4274
6772 /** 4275 /**
6773 * Annotations for this typedef. 4276 * Annotations for this typedef.
6774 */ 4277 */
6775 void set annotations(List<UnlinkedConstBuilder> _value) { 4278 void set annotations(List<UnlinkedConstBuilder> _value) {
6776 assert(!_finished); 4279 assert(!_finished);
6777 _annotations = _value; 4280 _annotations = _value;
6778 } 4281 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
6849 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli nkedTypeParamBuilder>[]; 4352 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli nkedTypeParamBuilder>[];
6850 4353
6851 /** 4354 /**
6852 * Type parameters of the typedef, if any. 4355 * Type parameters of the typedef, if any.
6853 */ 4356 */
6854 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 4357 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
6855 assert(!_finished); 4358 assert(!_finished);
6856 _typeParameters = _value; 4359 _typeParameters = _value;
6857 } 4360 }
6858 4361
6859 UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuild er codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String n ame, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder ret urnType, List<UnlinkedTypeParamBuilder> typeParameters})
6860 : _annotations = annotations,
6861 _codeRange = codeRange,
6862 _documentationComment = documentationComment,
6863 _name = name,
6864 _nameOffset = nameOffset,
6865 _parameters = parameters,
6866 _returnType = returnType,
6867 _typeParameters = typeParameters;
6868
6869 /**
6870 * Flush [informative] data recursively.
6871 */
6872 void flushInformative() {
6873 _annotations?.forEach((b) => b.flushInformative());
6874 _codeRange = null;
6875 _documentationComment = null;
6876 _nameOffset = null;
6877 _parameters?.forEach((b) => b.flushInformative());
6878 _returnType?.flushInformative();
6879 _typeParameters?.forEach((b) => b.flushInformative());
6880 }
6881
6882 fb.Offset finish(fb.Builder fbBuilder) { 4362 fb.Offset finish(fb.Builder fbBuilder) {
6883 assert(!_finished); 4363 assert(!_finished);
6884 _finished = true; 4364 _finished = true;
6885 fb.Offset offset_annotations; 4365 fb.Offset offset_annotations;
6886 fb.Offset offset_codeRange; 4366 fb.Offset offset_codeRange;
6887 fb.Offset offset_documentationComment; 4367 fb.Offset offset_documentationComment;
6888 fb.Offset offset_name; 4368 fb.Offset offset_name;
6889 fb.Offset offset_parameters; 4369 fb.Offset offset_parameters;
6890 fb.Offset offset_returnType; 4370 fb.Offset offset_returnType;
6891 fb.Offset offset_typeParameters; 4371 fb.Offset offset_typeParameters;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
6930 fbBuilder.addOffset(3, offset_parameters); 4410 fbBuilder.addOffset(3, offset_parameters);
6931 } 4411 }
6932 if (offset_returnType != null) { 4412 if (offset_returnType != null) {
6933 fbBuilder.addOffset(2, offset_returnType); 4413 fbBuilder.addOffset(2, offset_returnType);
6934 } 4414 }
6935 if (offset_typeParameters != null) { 4415 if (offset_typeParameters != null) {
6936 fbBuilder.addOffset(5, offset_typeParameters); 4416 fbBuilder.addOffset(5, offset_typeParameters);
6937 } 4417 }
6938 return fbBuilder.endTable(); 4418 return fbBuilder.endTable();
6939 } 4419 }
6940 }
6941 4420
6942 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { 4421 /**
6943 const _UnlinkedTypedefReader(); 4422 * Flush [informative] data recursively.
6944 4423 */
6945 @override 4424 void flushInformative() {
6946 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef Impl(bp); 4425 _annotations?.forEach((b) => b.flushInformative());
6947 } 4426 _codeRange = null;
6948 4427 _documentationComment = null;
6949 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { 4428 _nameOffset = null;
6950 final fb.BufferPointer _bp; 4429 _parameters?.forEach((b) => b.flushInformative());
6951 4430 _returnType?.flushInformative();
6952 _UnlinkedTypedefImpl(this._bp); 4431 _typeParameters?.forEach((b) => b.flushInformative());
6953
6954 List<idl.UnlinkedConst> _annotations;
6955 idl.CodeRange _codeRange;
6956 idl.UnlinkedDocumentationComment _documentationComment;
6957 String _name;
6958 int _nameOffset;
6959 List<idl.UnlinkedParam> _parameters;
6960 idl.EntityRef _returnType;
6961 List<idl.UnlinkedTypeParam> _typeParameters;
6962
6963 @override
6964 List<idl.UnlinkedConst> get annotations {
6965 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]);
6966 return _annotations;
6967 } 4432 }
6968
6969 @override
6970 idl.CodeRange get codeRange {
6971 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 7, null);
6972 return _codeRange;
6973 }
6974
6975 @override
6976 idl.UnlinkedDocumentationComment get documentationComment {
6977 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 6, null);
6978 return _documentationComment;
6979 }
6980
6981 @override
6982 String get name {
6983 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6984 return _name;
6985 }
6986
6987 @override
6988 int get nameOffset {
6989 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
6990 return _nameOffset;
6991 }
6992
6993 @override
6994 List<idl.UnlinkedParam> get parameters {
6995 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR eader()).vTableGet(_bp, 3, const <idl.UnlinkedParam>[]);
6996 return _parameters;
6997 }
6998
6999 @override
7000 idl.EntityRef get returnType {
7001 _returnType ??= const _EntityRefReader().vTableGet(_bp, 2, null);
7002 return _returnType;
7003 }
7004
7005 @override
7006 List<idl.UnlinkedTypeParam> get typeParameters {
7007 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink edTypeParamReader()).vTableGet(_bp, 5, const <idl.UnlinkedTypeParam>[]);
7008 return _typeParameters;
7009 }
7010 }
7011
7012 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef {
7013 @override
7014 Map<String, Object> toJson() {
7015 Map<String, Object> _result = <String, Object>{};
7016 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7017 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7018 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
7019 if (name != '') _result["name"] = name;
7020 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
7021 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
7022 if (returnType != null) _result["returnType"] = returnType.toJson();
7023 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList();
7024 return _result;
7025 }
7026
7027 @override
7028 Map<String, Object> toMap() => {
7029 "annotations": annotations,
7030 "codeRange": codeRange,
7031 "documentationComment": documentationComment,
7032 "name": name,
7033 "nameOffset": nameOffset,
7034 "parameters": parameters,
7035 "returnType": returnType,
7036 "typeParameters": typeParameters,
7037 };
7038
7039 @override
7040 String toString() => convert.JSON.encode(toJson());
7041 } 4433 }
7042 4434
7043 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple ments idl.UnlinkedTypeParam { 4435 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple ments idl.UnlinkedTypeParam {
7044 bool _finished = false; 4436 bool _finished = false;
7045 4437
7046 List<UnlinkedConstBuilder> _annotations; 4438 List<UnlinkedConstBuilder> _annotations;
7047 EntityRefBuilder _bound; 4439 EntityRefBuilder _bound;
7048 CodeRangeBuilder _codeRange; 4440 CodeRangeBuilder _codeRange;
7049 String _name; 4441 String _name;
7050 int _nameOffset; 4442 int _nameOffset;
7051 4443
4444 UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBui lder bound, CodeRangeBuilder codeRange, String name, int nameOffset})
4445 : _annotations = annotations,
4446 _bound = bound,
4447 _codeRange = codeRange,
4448 _name = name,
4449 _nameOffset = nameOffset;
4450
7052 @override 4451 @override
7053 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 4452 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
7054 4453
7055 /** 4454 /**
7056 * Annotations for this type parameter. 4455 * Annotations for this type parameter.
7057 */ 4456 */
7058 void set annotations(List<UnlinkedConstBuilder> _value) { 4457 void set annotations(List<UnlinkedConstBuilder> _value) {
7059 assert(!_finished); 4458 assert(!_finished);
7060 _annotations = _value; 4459 _annotations = _value;
7061 } 4460 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
7099 4498
7100 /** 4499 /**
7101 * Offset of the type parameter name relative to the beginning of the file. 4500 * Offset of the type parameter name relative to the beginning of the file.
7102 */ 4501 */
7103 void set nameOffset(int _value) { 4502 void set nameOffset(int _value) {
7104 assert(!_finished); 4503 assert(!_finished);
7105 assert(_value == null || _value >= 0); 4504 assert(_value == null || _value >= 0);
7106 _nameOffset = _value; 4505 _nameOffset = _value;
7107 } 4506 }
7108 4507
7109 UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBui lder bound, CodeRangeBuilder codeRange, String name, int nameOffset})
7110 : _annotations = annotations,
7111 _bound = bound,
7112 _codeRange = codeRange,
7113 _name = name,
7114 _nameOffset = nameOffset;
7115
7116 /**
7117 * Flush [informative] data recursively.
7118 */
7119 void flushInformative() {
7120 _annotations?.forEach((b) => b.flushInformative());
7121 _bound?.flushInformative();
7122 _codeRange = null;
7123 _nameOffset = null;
7124 }
7125
7126 fb.Offset finish(fb.Builder fbBuilder) { 4508 fb.Offset finish(fb.Builder fbBuilder) {
7127 assert(!_finished); 4509 assert(!_finished);
7128 _finished = true; 4510 _finished = true;
7129 fb.Offset offset_annotations; 4511 fb.Offset offset_annotations;
7130 fb.Offset offset_bound; 4512 fb.Offset offset_bound;
7131 fb.Offset offset_codeRange; 4513 fb.Offset offset_codeRange;
7132 fb.Offset offset_name; 4514 fb.Offset offset_name;
7133 if (!(_annotations == null || _annotations.isEmpty)) { 4515 if (!(_annotations == null || _annotations.isEmpty)) {
7134 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 4516 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
7135 } 4517 }
(...skipping 17 matching lines...) Expand all
7153 fbBuilder.addOffset(4, offset_codeRange); 4535 fbBuilder.addOffset(4, offset_codeRange);
7154 } 4536 }
7155 if (offset_name != null) { 4537 if (offset_name != null) {
7156 fbBuilder.addOffset(0, offset_name); 4538 fbBuilder.addOffset(0, offset_name);
7157 } 4539 }
7158 if (_nameOffset != null && _nameOffset != 0) { 4540 if (_nameOffset != null && _nameOffset != 0) {
7159 fbBuilder.addUint32(1, _nameOffset); 4541 fbBuilder.addUint32(1, _nameOffset);
7160 } 4542 }
7161 return fbBuilder.endTable(); 4543 return fbBuilder.endTable();
7162 } 4544 }
7163 }
7164 4545
7165 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { 4546 /**
7166 const _UnlinkedTypeParamReader(); 4547 * Flush [informative] data recursively.
7167 4548 */
7168 @override 4549 void flushInformative() {
7169 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP aramImpl(bp); 4550 _annotations?.forEach((b) => b.flushInformative());
7170 } 4551 _bound?.flushInformative();
7171 4552 _codeRange = null;
7172 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme nts idl.UnlinkedTypeParam { 4553 _nameOffset = null;
7173 final fb.BufferPointer _bp;
7174
7175 _UnlinkedTypeParamImpl(this._bp);
7176
7177 List<idl.UnlinkedConst> _annotations;
7178 idl.EntityRef _bound;
7179 idl.CodeRange _codeRange;
7180 String _name;
7181 int _nameOffset;
7182
7183 @override
7184 List<idl.UnlinkedConst> get annotations {
7185 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]);
7186 return _annotations;
7187 }
7188
7189 @override
7190 idl.EntityRef get bound {
7191 _bound ??= const _EntityRefReader().vTableGet(_bp, 2, null);
7192 return _bound;
7193 }
7194
7195 @override
7196 idl.CodeRange get codeRange {
7197 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 4, null);
7198 return _codeRange;
7199 }
7200
7201 @override
7202 String get name {
7203 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
7204 return _name;
7205 }
7206
7207 @override
7208 int get nameOffset {
7209 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7210 return _nameOffset;
7211 } 4554 }
7212 } 4555 }
7213 4556
7214 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam {
7215 @override
7216 Map<String, Object> toJson() {
7217 Map<String, Object> _result = <String, Object>{};
7218 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7219 if (bound != null) _result["bound"] = bound.toJson();
7220 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7221 if (name != '') _result["name"] = name;
7222 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
7223 return _result;
7224 }
7225
7226 @override
7227 Map<String, Object> toMap() => {
7228 "annotations": annotations,
7229 "bound": bound,
7230 "codeRange": codeRange,
7231 "name": name,
7232 "nameOffset": nameOffset,
7233 };
7234
7235 @override
7236 String toString() => convert.JSON.encode(toJson());
7237 }
7238
7239 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl. UnlinkedUnit { 4557 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl. UnlinkedUnit {
7240 bool _finished = false; 4558 bool _finished = false;
7241 4559
7242 String _fallbackModePath; 4560 String _fallbackModePath;
7243 List<UnlinkedClassBuilder> _classes; 4561 List<UnlinkedClassBuilder> _classes;
7244 CodeRangeBuilder _codeRange; 4562 CodeRangeBuilder _codeRange;
7245 List<UnlinkedEnumBuilder> _enums; 4563 List<UnlinkedEnumBuilder> _enums;
7246 List<UnlinkedExecutableBuilder> _executables; 4564 List<UnlinkedExecutableBuilder> _executables;
7247 List<UnlinkedExportNonPublicBuilder> _exports; 4565 List<UnlinkedExportNonPublicBuilder> _exports;
7248 List<UnlinkedImportBuilder> _imports; 4566 List<UnlinkedImportBuilder> _imports;
7249 List<UnlinkedConstBuilder> _libraryAnnotations; 4567 List<UnlinkedConstBuilder> _libraryAnnotations;
7250 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; 4568 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment;
7251 String _libraryName; 4569 String _libraryName;
7252 int _libraryNameLength; 4570 int _libraryNameLength;
7253 int _libraryNameOffset; 4571 int _libraryNameOffset;
7254 List<UnlinkedPartBuilder> _parts; 4572 List<UnlinkedPartBuilder> _parts;
7255 UnlinkedPublicNamespaceBuilder _publicNamespace; 4573 UnlinkedPublicNamespaceBuilder _publicNamespace;
7256 List<UnlinkedReferenceBuilder> _references; 4574 List<UnlinkedReferenceBuilder> _references;
7257 List<UnlinkedTypedefBuilder> _typedefs; 4575 List<UnlinkedTypedefBuilder> _typedefs;
7258 List<UnlinkedVariableBuilder> _variables; 4576 List<UnlinkedVariableBuilder> _variables;
7259 4577
7260 @override 4578 UnlinkedUnitBuilder({String fallbackModePath, List<UnlinkedClassBuilder> class es, CodeRangeBuilder codeRange, List<UnlinkedEnumBuilder> enums, List<UnlinkedEx ecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, List <UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryN ame, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> par ts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilde r> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuild er> variables})
7261 String get fallbackModePath => _fallbackModePath ??= ''; 4579 : _fallbackModePath = fallbackModePath,
7262 4580 _classes = classes,
7263 /** 4581 _codeRange = codeRange,
7264 * If this compilation unit was summarized in fallback mode, the path where 4582 _enums = enums,
7265 * the compilation unit may be found on disk. Otherwise empty. 4583 _executables = executables,
7266 * 4584 _exports = exports,
7267 * When this field is non-empty, all other fields in the data structure have 4585 _imports = imports,
7268 * their default values. 4586 _libraryAnnotations = libraryAnnotations,
7269 */ 4587 _libraryDocumentationComment = libraryDocumentationComment,
7270 void set fallbackModePath(String _value) { 4588 _libraryName = libraryName,
7271 assert(!_finished); 4589 _libraryNameLength = libraryNameLength,
7272 _fallbackModePath = _value; 4590 _libraryNameOffset = libraryNameOffset,
7273 } 4591 _parts = parts,
4592 _publicNamespace = publicNamespace,
4593 _references = references,
4594 _typedefs = typedefs,
4595 _variables = variables;
7274 4596
7275 @override 4597 @override
7276 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[ ]; 4598 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[ ];
7277 4599
7278 /** 4600 /**
7279 * Classes declared in the compilation unit. 4601 * Classes declared in the compilation unit.
7280 */ 4602 */
7281 void set classes(List<UnlinkedClassBuilder> _value) { 4603 void set classes(List<UnlinkedClassBuilder> _value) {
7282 assert(!_finished); 4604 assert(!_finished);
7283 _classes = _value; 4605 _classes = _value;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
7322 4644
7323 /** 4645 /**
7324 * Export declarations in the compilation unit. 4646 * Export declarations in the compilation unit.
7325 */ 4647 */
7326 void set exports(List<UnlinkedExportNonPublicBuilder> _value) { 4648 void set exports(List<UnlinkedExportNonPublicBuilder> _value) {
7327 assert(!_finished); 4649 assert(!_finished);
7328 _exports = _value; 4650 _exports = _value;
7329 } 4651 }
7330 4652
7331 @override 4653 @override
4654 String get fallbackModePath => _fallbackModePath ??= '';
4655
4656 /**
4657 * If this compilation unit was summarized in fallback mode, the path where
4658 * the compilation unit may be found on disk. Otherwise empty.
4659 *
4660 * When this field is non-empty, all other fields in the data structure have
4661 * their default values.
4662 */
4663 void set fallbackModePath(String _value) {
4664 assert(!_finished);
4665 _fallbackModePath = _value;
4666 }
4667
4668 @override
7332 List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder >[]; 4669 List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder >[];
7333 4670
7334 /** 4671 /**
7335 * Import declarations in the compilation unit. 4672 * Import declarations in the compilation unit.
7336 */ 4673 */
7337 void set imports(List<UnlinkedImportBuilder> _value) { 4674 void set imports(List<UnlinkedImportBuilder> _value) {
7338 assert(!_finished); 4675 assert(!_finished);
7339 _imports = _value; 4676 _imports = _value;
7340 } 4677 }
7341 4678
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
7452 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl eBuilder>[]; 4789 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl eBuilder>[];
7453 4790
7454 /** 4791 /**
7455 * Top level variables declared in the compilation unit. 4792 * Top level variables declared in the compilation unit.
7456 */ 4793 */
7457 void set variables(List<UnlinkedVariableBuilder> _value) { 4794 void set variables(List<UnlinkedVariableBuilder> _value) {
7458 assert(!_finished); 4795 assert(!_finished);
7459 _variables = _value; 4796 _variables = _value;
7460 } 4797 }
7461 4798
7462 UnlinkedUnitBuilder({String fallbackModePath, List<UnlinkedClassBuilder> class es, CodeRangeBuilder codeRange, List<UnlinkedEnumBuilder> enums, List<UnlinkedEx ecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, List <UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryN ame, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> par ts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilde r> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuild er> variables})
7463 : _fallbackModePath = fallbackModePath,
7464 _classes = classes,
7465 _codeRange = codeRange,
7466 _enums = enums,
7467 _executables = executables,
7468 _exports = exports,
7469 _imports = imports,
7470 _libraryAnnotations = libraryAnnotations,
7471 _libraryDocumentationComment = libraryDocumentationComment,
7472 _libraryName = libraryName,
7473 _libraryNameLength = libraryNameLength,
7474 _libraryNameOffset = libraryNameOffset,
7475 _parts = parts,
7476 _publicNamespace = publicNamespace,
7477 _references = references,
7478 _typedefs = typedefs,
7479 _variables = variables;
7480
7481 /**
7482 * Flush [informative] data recursively.
7483 */
7484 void flushInformative() {
7485 _classes?.forEach((b) => b.flushInformative());
7486 _codeRange = null;
7487 _enums?.forEach((b) => b.flushInformative());
7488 _executables?.forEach((b) => b.flushInformative());
7489 _exports?.forEach((b) => b.flushInformative());
7490 _imports?.forEach((b) => b.flushInformative());
7491 _libraryAnnotations?.forEach((b) => b.flushInformative());
7492 _libraryDocumentationComment = null;
7493 _libraryNameLength = null;
7494 _libraryNameOffset = null;
7495 _parts?.forEach((b) => b.flushInformative());
7496 _publicNamespace?.flushInformative();
7497 _references?.forEach((b) => b.flushInformative());
7498 _typedefs?.forEach((b) => b.flushInformative());
7499 _variables?.forEach((b) => b.flushInformative());
7500 }
7501
7502 List<int> toBuffer() {
7503 fb.Builder fbBuilder = new fb.Builder();
7504 return fbBuilder.finish(finish(fbBuilder), "UUnt");
7505 }
7506
7507 fb.Offset finish(fb.Builder fbBuilder) { 4799 fb.Offset finish(fb.Builder fbBuilder) {
7508 assert(!_finished); 4800 assert(!_finished);
7509 _finished = true; 4801 _finished = true;
7510 fb.Offset offset_fallbackModePath; 4802 fb.Offset offset_fallbackModePath;
7511 fb.Offset offset_classes; 4803 fb.Offset offset_classes;
7512 fb.Offset offset_codeRange; 4804 fb.Offset offset_codeRange;
7513 fb.Offset offset_enums; 4805 fb.Offset offset_enums;
7514 fb.Offset offset_executables; 4806 fb.Offset offset_executables;
7515 fb.Offset offset_exports; 4807 fb.Offset offset_exports;
7516 fb.Offset offset_imports; 4808 fb.Offset offset_imports;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
7614 fbBuilder.addOffset(1, offset_references); 4906 fbBuilder.addOffset(1, offset_references);
7615 } 4907 }
7616 if (offset_typedefs != null) { 4908 if (offset_typedefs != null) {
7617 fbBuilder.addOffset(10, offset_typedefs); 4909 fbBuilder.addOffset(10, offset_typedefs);
7618 } 4910 }
7619 if (offset_variables != null) { 4911 if (offset_variables != null) {
7620 fbBuilder.addOffset(3, offset_variables); 4912 fbBuilder.addOffset(3, offset_variables);
7621 } 4913 }
7622 return fbBuilder.endTable(); 4914 return fbBuilder.endTable();
7623 } 4915 }
7624 }
7625 4916
7626 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) { 4917 /**
7627 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); 4918 * Flush [informative] data recursively.
7628 return const _UnlinkedUnitReader().read(rootRef); 4919 */
7629 } 4920 void flushInformative() {
7630 4921 _classes?.forEach((b) => b.flushInformative());
7631 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { 4922 _codeRange = null;
7632 const _UnlinkedUnitReader(); 4923 _enums?.forEach((b) => b.flushInformative());
7633 4924 _executables?.forEach((b) => b.flushInformative());
7634 @override 4925 _exports?.forEach((b) => b.flushInformative());
7635 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b p); 4926 _imports?.forEach((b) => b.flushInformative());
7636 } 4927 _libraryAnnotations?.forEach((b) => b.flushInformative());
7637 4928 _libraryDocumentationComment = null;
7638 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un linkedUnit { 4929 _libraryNameLength = null;
7639 final fb.BufferPointer _bp; 4930 _libraryNameOffset = null;
7640 4931 _parts?.forEach((b) => b.flushInformative());
7641 _UnlinkedUnitImpl(this._bp); 4932 _publicNamespace?.flushInformative();
7642 4933 _references?.forEach((b) => b.flushInformative());
7643 String _fallbackModePath; 4934 _typedefs?.forEach((b) => b.flushInformative());
7644 List<idl.UnlinkedClass> _classes; 4935 _variables?.forEach((b) => b.flushInformative());
7645 idl.CodeRange _codeRange;
7646 List<idl.UnlinkedEnum> _enums;
7647 List<idl.UnlinkedExecutable> _executables;
7648 List<idl.UnlinkedExportNonPublic> _exports;
7649 List<idl.UnlinkedImport> _imports;
7650 List<idl.UnlinkedConst> _libraryAnnotations;
7651 idl.UnlinkedDocumentationComment _libraryDocumentationComment;
7652 String _libraryName;
7653 int _libraryNameLength;
7654 int _libraryNameOffset;
7655 List<idl.UnlinkedPart> _parts;
7656 idl.UnlinkedPublicNamespace _publicNamespace;
7657 List<idl.UnlinkedReference> _references;
7658 List<idl.UnlinkedTypedef> _typedefs;
7659 List<idl.UnlinkedVariable> _variables;
7660
7661 @override
7662 String get fallbackModePath {
7663 _fallbackModePath ??= const fb.StringReader().vTableGet(_bp, 16, '');
7664 return _fallbackModePath;
7665 } 4936 }
7666 4937
7667 @override 4938 List<int> toBuffer() {
7668 List<idl.UnlinkedClass> get classes { 4939 fb.Builder fbBuilder = new fb.Builder();
7669 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); 4940 return fbBuilder.finish(finish(fbBuilder), "UUnt");
7670 return _classes;
7671 }
7672
7673 @override
7674 idl.CodeRange get codeRange {
7675 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null);
7676 return _codeRange;
7677 }
7678
7679 @override
7680 List<idl.UnlinkedEnum> get enums {
7681 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader() ).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]);
7682 return _enums;
7683 }
7684
7685 @override
7686 List<idl.UnlinkedExecutable> get executables {
7687 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked ExecutableReader()).vTableGet(_bp, 4, const <idl.UnlinkedExecutable>[]);
7688 return _executables;
7689 }
7690
7691 @override
7692 List<idl.UnlinkedExportNonPublic> get exports {
7693 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>(const _Unlinke dExportNonPublicReader()).vTableGet(_bp, 13, const <idl.UnlinkedExportNonPublic> []);
7694 return _exports;
7695 }
7696
7697 @override
7698 List<idl.UnlinkedImport> get imports {
7699 _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportRe ader()).vTableGet(_bp, 5, const <idl.UnlinkedImport>[]);
7700 return _imports;
7701 }
7702
7703 @override
7704 List<idl.UnlinkedConst> get libraryAnnotations {
7705 _libraryAnnotations ??= const fb.ListReader<idl.UnlinkedConst>(const _Unlink edConstReader()).vTableGet(_bp, 14, const <idl.UnlinkedConst>[]);
7706 return _libraryAnnotations;
7707 }
7708
7709 @override
7710 idl.UnlinkedDocumentationComment get libraryDocumentationComment {
7711 _libraryDocumentationComment ??= const _UnlinkedDocumentationCommentReader() .vTableGet(_bp, 9, null);
7712 return _libraryDocumentationComment;
7713 }
7714
7715 @override
7716 String get libraryName {
7717 _libraryName ??= const fb.StringReader().vTableGet(_bp, 6, '');
7718 return _libraryName;
7719 }
7720
7721 @override
7722 int get libraryNameLength {
7723 _libraryNameLength ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0);
7724 return _libraryNameLength;
7725 }
7726
7727 @override
7728 int get libraryNameOffset {
7729 _libraryNameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0);
7730 return _libraryNameOffset;
7731 }
7732
7733 @override
7734 List<idl.UnlinkedPart> get parts {
7735 _parts ??= const fb.ListReader<idl.UnlinkedPart>(const _UnlinkedPartReader() ).vTableGet(_bp, 11, const <idl.UnlinkedPart>[]);
7736 return _parts;
7737 }
7738
7739 @override
7740 idl.UnlinkedPublicNamespace get publicNamespace {
7741 _publicNamespace ??= const _UnlinkedPublicNamespaceReader().vTableGet(_bp, 0 , null);
7742 return _publicNamespace;
7743 }
7744
7745 @override
7746 List<idl.UnlinkedReference> get references {
7747 _references ??= const fb.ListReader<idl.UnlinkedReference>(const _UnlinkedRe ferenceReader()).vTableGet(_bp, 1, const <idl.UnlinkedReference>[]);
7748 return _references;
7749 }
7750
7751 @override
7752 List<idl.UnlinkedTypedef> get typedefs {
7753 _typedefs ??= const fb.ListReader<idl.UnlinkedTypedef>(const _UnlinkedTypede fReader()).vTableGet(_bp, 10, const <idl.UnlinkedTypedef>[]);
7754 return _typedefs;
7755 }
7756
7757 @override
7758 List<idl.UnlinkedVariable> get variables {
7759 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]);
7760 return _variables;
7761 } 4941 }
7762 } 4942 }
7763 4943
7764 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit {
7765 @override
7766 Map<String, Object> toJson() {
7767 Map<String, Object> _result = <String, Object>{};
7768 if (fallbackModePath != '') _result["fallbackModePath"] = fallbackModePath;
7769 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value. toJson()).toList();
7770 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7771 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson ()).toList();
7772 if (executables.isNotEmpty) _result["executables"] = executables.map((_value ) => _value.toJson()).toList();
7773 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value. toJson()).toList();
7774 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value. toJson()).toList();
7775 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn notations.map((_value) => _value.toJson()).toList();
7776 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen t"] = libraryDocumentationComment.toJson();
7777 if (libraryName != '') _result["libraryName"] = libraryName;
7778 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength ;
7779 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset ;
7780 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson ()).toList();
7781 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to Json();
7782 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList();
7783 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val ue.toJson()).toList();
7784 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _ value.toJson()).toList();
7785 return _result;
7786 }
7787
7788 @override
7789 Map<String, Object> toMap() => {
7790 "fallbackModePath": fallbackModePath,
7791 "classes": classes,
7792 "codeRange": codeRange,
7793 "enums": enums,
7794 "executables": executables,
7795 "exports": exports,
7796 "imports": imports,
7797 "libraryAnnotations": libraryAnnotations,
7798 "libraryDocumentationComment": libraryDocumentationComment,
7799 "libraryName": libraryName,
7800 "libraryNameLength": libraryNameLength,
7801 "libraryNameOffset": libraryNameOffset,
7802 "parts": parts,
7803 "publicNamespace": publicNamespace,
7804 "references": references,
7805 "typedefs": typedefs,
7806 "variables": variables,
7807 };
7808
7809 @override
7810 String toString() => convert.JSON.encode(toJson());
7811 }
7812
7813 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts idl.UnlinkedVariable { 4944 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts idl.UnlinkedVariable {
7814 bool _finished = false; 4945 bool _finished = false;
7815 4946
7816 List<UnlinkedConstBuilder> _annotations; 4947 List<UnlinkedConstBuilder> _annotations;
7817 CodeRangeBuilder _codeRange; 4948 CodeRangeBuilder _codeRange;
7818 UnlinkedConstBuilder _constExpr; 4949 UnlinkedConstBuilder _constExpr;
7819 UnlinkedDocumentationCommentBuilder _documentationComment; 4950 UnlinkedDocumentationCommentBuilder _documentationComment;
7820 int _inferredTypeSlot; 4951 int _inferredTypeSlot;
7821 UnlinkedExecutableBuilder _initializer; 4952 UnlinkedExecutableBuilder _initializer;
7822 bool _isConst; 4953 bool _isConst;
7823 bool _isFinal; 4954 bool _isFinal;
7824 bool _isStatic; 4955 bool _isStatic;
7825 String _name; 4956 String _name;
7826 int _nameOffset; 4957 int _nameOffset;
7827 int _propagatedTypeSlot; 4958 int _propagatedTypeSlot;
7828 EntityRefBuilder _type; 4959 EntityRefBuilder _type;
7829 int _visibleLength; 4960 int _visibleLength;
7830 int _visibleOffset; 4961 int _visibleOffset;
7831 4962
4963 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuil der codeRange, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuild er documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initial izer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, in t propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffse t})
4964 : _annotations = annotations,
4965 _codeRange = codeRange,
4966 _constExpr = constExpr,
4967 _documentationComment = documentationComment,
4968 _inferredTypeSlot = inferredTypeSlot,
4969 _initializer = initializer,
4970 _isConst = isConst,
4971 _isFinal = isFinal,
4972 _isStatic = isStatic,
4973 _name = name,
4974 _nameOffset = nameOffset,
4975 _propagatedTypeSlot = propagatedTypeSlot,
4976 _type = type,
4977 _visibleLength = visibleLength,
4978 _visibleOffset = visibleOffset;
4979
7832 @override 4980 @override
7833 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[]; 4981 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB uilder>[];
7834 4982
7835 /** 4983 /**
7836 * Annotations for this variable. 4984 * Annotations for this variable.
7837 */ 4985 */
7838 void set annotations(List<UnlinkedConstBuilder> _value) { 4986 void set annotations(List<UnlinkedConstBuilder> _value) {
7839 assert(!_finished); 4987 assert(!_finished);
7840 _annotations = _value; 4988 _annotations = _value;
7841 } 4989 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
8008 5156
8009 /** 5157 /**
8010 * If a local variable, the beginning of the visible range; zero otherwise. 5158 * If a local variable, the beginning of the visible range; zero otherwise.
8011 */ 5159 */
8012 void set visibleOffset(int _value) { 5160 void set visibleOffset(int _value) {
8013 assert(!_finished); 5161 assert(!_finished);
8014 assert(_value == null || _value >= 0); 5162 assert(_value == null || _value >= 0);
8015 _visibleOffset = _value; 5163 _visibleOffset = _value;
8016 } 5164 }
8017 5165
8018 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuil der codeRange, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuild er documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initial izer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, in t propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffse t})
8019 : _annotations = annotations,
8020 _codeRange = codeRange,
8021 _constExpr = constExpr,
8022 _documentationComment = documentationComment,
8023 _inferredTypeSlot = inferredTypeSlot,
8024 _initializer = initializer,
8025 _isConst = isConst,
8026 _isFinal = isFinal,
8027 _isStatic = isStatic,
8028 _name = name,
8029 _nameOffset = nameOffset,
8030 _propagatedTypeSlot = propagatedTypeSlot,
8031 _type = type,
8032 _visibleLength = visibleLength,
8033 _visibleOffset = visibleOffset;
8034
8035 /**
8036 * Flush [informative] data recursively.
8037 */
8038 void flushInformative() {
8039 _annotations?.forEach((b) => b.flushInformative());
8040 _codeRange = null;
8041 _constExpr?.flushInformative();
8042 _documentationComment = null;
8043 _initializer?.flushInformative();
8044 _nameOffset = null;
8045 _type?.flushInformative();
8046 }
8047
8048 fb.Offset finish(fb.Builder fbBuilder) { 5166 fb.Offset finish(fb.Builder fbBuilder) {
8049 assert(!_finished); 5167 assert(!_finished);
8050 _finished = true; 5168 _finished = true;
8051 fb.Offset offset_annotations; 5169 fb.Offset offset_annotations;
8052 fb.Offset offset_codeRange; 5170 fb.Offset offset_codeRange;
8053 fb.Offset offset_constExpr; 5171 fb.Offset offset_constExpr;
8054 fb.Offset offset_documentationComment; 5172 fb.Offset offset_documentationComment;
8055 fb.Offset offset_initializer; 5173 fb.Offset offset_initializer;
8056 fb.Offset offset_name; 5174 fb.Offset offset_name;
8057 fb.Offset offset_type; 5175 fb.Offset offset_type;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
8117 fbBuilder.addOffset(3, offset_type); 5235 fbBuilder.addOffset(3, offset_type);
8118 } 5236 }
8119 if (_visibleLength != null && _visibleLength != 0) { 5237 if (_visibleLength != null && _visibleLength != 0) {
8120 fbBuilder.addUint32(11, _visibleLength); 5238 fbBuilder.addUint32(11, _visibleLength);
8121 } 5239 }
8122 if (_visibleOffset != null && _visibleOffset != 0) { 5240 if (_visibleOffset != null && _visibleOffset != 0) {
8123 fbBuilder.addUint32(12, _visibleOffset); 5241 fbBuilder.addUint32(12, _visibleOffset);
8124 } 5242 }
8125 return fbBuilder.endTable(); 5243 return fbBuilder.endTable();
8126 } 5244 }
8127 } 5245
8128 5246 /**
8129 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> { 5247 * Flush [informative] data recursively.
8130 const _UnlinkedVariableReader(); 5248 */
8131 5249 void flushInformative() {
8132 @override 5250 _annotations?.forEach((b) => b.flushInformative());
8133 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab leImpl(bp); 5251 _codeRange = null;
5252 _constExpr?.flushInformative();
5253 _documentationComment = null;
5254 _initializer?.flushInformative();
5255 _nameOffset = null;
5256 _type?.flushInformative();
5257 }
5258 }
5259
5260 class _CacheSourceContentImpl extends Object with _CacheSourceContentMixin imple ments idl.CacheSourceContent {
5261 final fb.BufferPointer _bp;
5262
5263 List<String> _exportedUris;
5264
5265 List<String> _importedUris;
5266 idl.CacheSourceKind _kind;
5267 List<String> _partUris;
5268 _CacheSourceContentImpl(this._bp);
5269
5270 @override
5271 List<String> get exportedUris {
5272 _exportedUris ??= const fb.ListReader<String>(const fb.StringReader()).vTabl eGet(_bp, 2, const <String>[]);
5273 return _exportedUris;
5274 }
5275
5276 @override
5277 List<String> get importedUris {
5278 _importedUris ??= const fb.ListReader<String>(const fb.StringReader()).vTabl eGet(_bp, 1, const <String>[]);
5279 return _importedUris;
5280 }
5281
5282 @override
5283 idl.CacheSourceKind get kind {
5284 _kind ??= const _CacheSourceKindReader().vTableGet(_bp, 0, idl.CacheSourceKi nd.library);
5285 return _kind;
5286 }
5287
5288 @override
5289 List<String> get partUris {
5290 _partUris ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet (_bp, 3, const <String>[]);
5291 return _partUris;
5292 }
5293 }
5294
5295 abstract class _CacheSourceContentMixin implements idl.CacheSourceContent {
5296 @override
5297 Map<String, Object> toJson() {
5298 Map<String, Object> _result = <String, Object>{};
5299 if (exportedUris.isNotEmpty) _result["exportedUris"] = exportedUris;
5300 if (importedUris.isNotEmpty) _result["importedUris"] = importedUris;
5301 if (kind != idl.CacheSourceKind.library) _result["kind"] = kind.toString().s plit('.')[1];
5302 if (partUris.isNotEmpty) _result["partUris"] = partUris;
5303 return _result;
5304 }
5305
5306 @override
5307 Map<String, Object> toMap() => {
5308 "exportedUris": exportedUris,
5309 "importedUris": importedUris,
5310 "kind": kind,
5311 "partUris": partUris,
5312 };
5313
5314 @override
5315 String toString() => convert.JSON.encode(toJson());
5316 }
5317
5318 class _CacheSourceContentReader extends fb.TableReader<_CacheSourceContentImpl> {
5319 const _CacheSourceContentReader();
5320
5321 @override
5322 _CacheSourceContentImpl createObject(fb.BufferPointer bp) => new _CacheSourceC ontentImpl(bp);
5323 }
5324
5325 class _CacheSourceKindReader extends fb.Reader<idl.CacheSourceKind> {
5326 const _CacheSourceKindReader() : super();
5327
5328 @override
5329 int get size => 1;
5330
5331 @override
5332 idl.CacheSourceKind read(fb.BufferPointer bp) {
5333 int index = const fb.Uint8Reader().read(bp);
5334 return index < idl.CacheSourceKind.values.length ? idl.CacheSourceKind.value s[index] : idl.CacheSourceKind.library;
5335 }
5336 }
5337
5338 class _CodeRangeImpl extends Object with _CodeRangeMixin implements idl.CodeRang e {
5339 final fb.BufferPointer _bp;
5340
5341 int _length;
5342
5343 int _offset;
5344 _CodeRangeImpl(this._bp);
5345
5346 @override
5347 int get length {
5348 _length ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
5349 return _length;
5350 }
5351
5352 @override
5353 int get offset {
5354 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
5355 return _offset;
5356 }
5357 }
5358
5359 abstract class _CodeRangeMixin implements idl.CodeRange {
5360 @override
5361 Map<String, Object> toJson() {
5362 Map<String, Object> _result = <String, Object>{};
5363 if (length != 0) _result["length"] = length;
5364 if (offset != 0) _result["offset"] = offset;
5365 return _result;
5366 }
5367
5368 @override
5369 Map<String, Object> toMap() => {
5370 "length": length,
5371 "offset": offset,
5372 };
5373
5374 @override
5375 String toString() => convert.JSON.encode(toJson());
5376 }
5377
5378 class _CodeRangeReader extends fb.TableReader<_CodeRangeImpl> {
5379 const _CodeRangeReader();
5380
5381 @override
5382 _CodeRangeImpl createObject(fb.BufferPointer bp) => new _CodeRangeImpl(bp);
5383 }
5384
5385 class _EntityRefImpl extends Object with _EntityRefMixin implements idl.EntityRe f {
5386 final fb.BufferPointer _bp;
5387
5388 List<int> _implicitFunctionTypeIndices;
5389
5390 int _paramReference;
5391 int _reference;
5392 int _slot;
5393 List<idl.UnlinkedParam> _syntheticParams;
5394 idl.EntityRef _syntheticReturnType;
5395 List<idl.EntityRef> _typeArguments;
5396 _EntityRefImpl(this._bp);
5397
5398 @override
5399 List<int> get implicitFunctionTypeIndices {
5400 _implicitFunctionTypeIndices ??= const fb.Uint32ListReader().vTableGet(_bp, 4, const <int>[]);
5401 return _implicitFunctionTypeIndices;
5402 }
5403
5404 @override
5405 int get paramReference {
5406 _paramReference ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
5407 return _paramReference;
5408 }
5409
5410 @override
5411 int get reference {
5412 _reference ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
5413 return _reference;
5414 }
5415
5416 @override
5417 int get slot {
5418 _slot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
5419 return _slot;
5420 }
5421
5422 @override
5423 List<idl.UnlinkedParam> get syntheticParams {
5424 _syntheticParams ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedP aramReader()).vTableGet(_bp, 6, const <idl.UnlinkedParam>[]);
5425 return _syntheticParams;
5426 }
5427
5428 @override
5429 idl.EntityRef get syntheticReturnType {
5430 _syntheticReturnType ??= const _EntityRefReader().vTableGet(_bp, 5, null);
5431 return _syntheticReturnType;
5432 }
5433
5434 @override
5435 List<idl.EntityRef> get typeArguments {
5436 _typeArguments ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader ()).vTableGet(_bp, 1, const <idl.EntityRef>[]);
5437 return _typeArguments;
5438 }
5439 }
5440
5441 abstract class _EntityRefMixin implements idl.EntityRef {
5442 @override
5443 Map<String, Object> toJson() {
5444 Map<String, Object> _result = <String, Object>{};
5445 if (implicitFunctionTypeIndices.isNotEmpty) _result["implicitFunctionTypeInd ices"] = implicitFunctionTypeIndices;
5446 if (paramReference != 0) _result["paramReference"] = paramReference;
5447 if (reference != 0) _result["reference"] = reference;
5448 if (slot != 0) _result["slot"] = slot;
5449 if (syntheticParams.isNotEmpty) _result["syntheticParams"] = syntheticParams .map((_value) => _value.toJson()).toList();
5450 if (syntheticReturnType != null) _result["syntheticReturnType"] = syntheticR eturnType.toJson();
5451 if (typeArguments.isNotEmpty) _result["typeArguments"] = typeArguments.map(( _value) => _value.toJson()).toList();
5452 return _result;
5453 }
5454
5455 @override
5456 Map<String, Object> toMap() => {
5457 "implicitFunctionTypeIndices": implicitFunctionTypeIndices,
5458 "paramReference": paramReference,
5459 "reference": reference,
5460 "slot": slot,
5461 "syntheticParams": syntheticParams,
5462 "syntheticReturnType": syntheticReturnType,
5463 "typeArguments": typeArguments,
5464 };
5465
5466 @override
5467 String toString() => convert.JSON.encode(toJson());
5468 }
5469
5470 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> {
5471 const _EntityRefReader();
5472
5473 @override
5474 _EntityRefImpl createObject(fb.BufferPointer bp) => new _EntityRefImpl(bp);
5475 }
5476
5477 class _IndexNameKindReader extends fb.Reader<idl.IndexNameKind> {
5478 const _IndexNameKindReader() : super();
5479
5480 @override
5481 int get size => 1;
5482
5483 @override
5484 idl.IndexNameKind read(fb.BufferPointer bp) {
5485 int index = const fb.Uint8Reader().read(bp);
5486 return index < idl.IndexNameKind.values.length ? idl.IndexNameKind.values[in dex] : idl.IndexNameKind.topLevel;
5487 }
5488 }
5489
5490 class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> {
5491 const _IndexRelationKindReader() : super();
5492
5493 @override
5494 int get size => 1;
5495
5496 @override
5497 idl.IndexRelationKind read(fb.BufferPointer bp) {
5498 int index = const fb.Uint8Reader().read(bp);
5499 return index < idl.IndexRelationKind.values.length ? idl.IndexRelationKind.v alues[index] : idl.IndexRelationKind.IS_ANCESTOR_OF;
5500 }
5501 }
5502
5503 class _IndexSyntheticElementKindReader extends fb.Reader<idl.IndexSyntheticEleme ntKind> {
5504 const _IndexSyntheticElementKindReader() : super();
5505
5506 @override
5507 int get size => 1;
5508
5509 @override
5510 idl.IndexSyntheticElementKind read(fb.BufferPointer bp) {
5511 int index = const fb.Uint8Reader().read(bp);
5512 return index < idl.IndexSyntheticElementKind.values.length ? idl.IndexSynthe ticElementKind.values[index] : idl.IndexSyntheticElementKind.notSynthetic;
5513 }
5514 }
5515
5516 class _LinkedDependencyImpl extends Object with _LinkedDependencyMixin implement s idl.LinkedDependency {
5517 final fb.BufferPointer _bp;
5518
5519 List<String> _parts;
5520
5521 String _uri;
5522 _LinkedDependencyImpl(this._bp);
5523
5524 @override
5525 List<String> get parts {
5526 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
5527 return _parts;
5528 }
5529
5530 @override
5531 String get uri {
5532 _uri ??= const fb.StringReader().vTableGet(_bp, 0, '');
5533 return _uri;
5534 }
5535 }
5536
5537 abstract class _LinkedDependencyMixin implements idl.LinkedDependency {
5538 @override
5539 Map<String, Object> toJson() {
5540 Map<String, Object> _result = <String, Object>{};
5541 if (parts.isNotEmpty) _result["parts"] = parts;
5542 if (uri != '') _result["uri"] = uri;
5543 return _result;
5544 }
5545
5546 @override
5547 Map<String, Object> toMap() => {
5548 "parts": parts,
5549 "uri": uri,
5550 };
5551
5552 @override
5553 String toString() => convert.JSON.encode(toJson());
5554 }
5555
5556 class _LinkedDependencyReader extends fb.TableReader<_LinkedDependencyImpl> {
5557 const _LinkedDependencyReader();
5558
5559 @override
5560 _LinkedDependencyImpl createObject(fb.BufferPointer bp) => new _LinkedDependen cyImpl(bp);
5561 }
5562
5563 class _LinkedExportNameImpl extends Object with _LinkedExportNameMixin implement s idl.LinkedExportName {
5564 final fb.BufferPointer _bp;
5565
5566 int _dependency;
5567
5568 idl.ReferenceKind _kind;
5569 String _name;
5570 int _unit;
5571 _LinkedExportNameImpl(this._bp);
5572
5573 @override
5574 int get dependency {
5575 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
5576 return _dependency;
5577 }
5578
5579 @override
5580 idl.ReferenceKind get kind {
5581 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 3, idl.ReferenceKind.c lassOrEnum);
5582 return _kind;
5583 }
5584
5585 @override
5586 String get name {
5587 _name ??= const fb.StringReader().vTableGet(_bp, 1, '');
5588 return _name;
5589 }
5590
5591 @override
5592 int get unit {
5593 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
5594 return _unit;
5595 }
5596 }
5597
5598 abstract class _LinkedExportNameMixin implements idl.LinkedExportName {
5599 @override
5600 Map<String, Object> toJson() {
5601 Map<String, Object> _result = <String, Object>{};
5602 if (dependency != 0) _result["dependency"] = dependency;
5603 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString() .split('.')[1];
5604 if (name != '') _result["name"] = name;
5605 if (unit != 0) _result["unit"] = unit;
5606 return _result;
5607 }
5608
5609 @override
5610 Map<String, Object> toMap() => {
5611 "dependency": dependency,
5612 "kind": kind,
5613 "name": name,
5614 "unit": unit,
5615 };
5616
5617 @override
5618 String toString() => convert.JSON.encode(toJson());
5619 }
5620
5621 class _LinkedExportNameReader extends fb.TableReader<_LinkedExportNameImpl> {
5622 const _LinkedExportNameReader();
5623
5624 @override
5625 _LinkedExportNameImpl createObject(fb.BufferPointer bp) => new _LinkedExportNa meImpl(bp);
5626 }
5627
5628 class _LinkedLibraryImpl extends Object with _LinkedLibraryMixin implements idl. LinkedLibrary {
5629 final fb.BufferPointer _bp;
5630
5631 List<idl.LinkedDependency> _dependencies;
5632
5633 List<idl.LinkedExportName> _exportNames;
5634 bool _fallbackMode;
5635 List<int> _importDependencies;
5636 int _numPrelinkedDependencies;
5637 List<idl.LinkedUnit> _units;
5638 _LinkedLibraryImpl(this._bp);
5639
5640 @override
5641 List<idl.LinkedDependency> get dependencies {
5642 _dependencies ??= const fb.ListReader<idl.LinkedDependency>(const _LinkedDep endencyReader()).vTableGet(_bp, 0, const <idl.LinkedDependency>[]);
5643 return _dependencies;
5644 }
5645
5646 @override
5647 List<idl.LinkedExportName> get exportNames {
5648 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo rtNameReader()).vTableGet(_bp, 4, const <idl.LinkedExportName>[]);
5649 return _exportNames;
5650 }
5651
5652 @override
5653 bool get fallbackMode {
5654 _fallbackMode ??= const fb.BoolReader().vTableGet(_bp, 5, false);
5655 return _fallbackMode;
5656 }
5657
5658 @override
5659 List<int> get importDependencies {
5660 _importDependencies ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
5661 return _importDependencies;
5662 }
5663
5664 @override
5665 int get numPrelinkedDependencies {
5666 _numPrelinkedDependencies ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
5667 return _numPrelinkedDependencies;
5668 }
5669
5670 @override
5671 List<idl.LinkedUnit> get units {
5672 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()).vT ableGet(_bp, 3, const <idl.LinkedUnit>[]);
5673 return _units;
5674 }
5675 }
5676
5677 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary {
5678 @override
5679 Map<String, Object> toJson() {
5680 Map<String, Object> _result = <String, Object>{};
5681 if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_va lue) => _value.toJson()).toList();
5682 if (exportNames.isNotEmpty) _result["exportNames"] = exportNames.map((_value ) => _value.toJson()).toList();
5683 if (fallbackMode != false) _result["fallbackMode"] = fallbackMode;
5684 if (importDependencies.isNotEmpty) _result["importDependencies"] = importDep endencies;
5685 if (numPrelinkedDependencies != 0) _result["numPrelinkedDependencies"] = num PrelinkedDependencies;
5686 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson ()).toList();
5687 return _result;
5688 }
5689
5690 @override
5691 Map<String, Object> toMap() => {
5692 "dependencies": dependencies,
5693 "exportNames": exportNames,
5694 "fallbackMode": fallbackMode,
5695 "importDependencies": importDependencies,
5696 "numPrelinkedDependencies": numPrelinkedDependencies,
5697 "units": units,
5698 };
5699
5700 @override
5701 String toString() => convert.JSON.encode(toJson());
5702 }
5703
5704 class _LinkedLibraryReader extends fb.TableReader<_LinkedLibraryImpl> {
5705 const _LinkedLibraryReader();
5706
5707 @override
5708 _LinkedLibraryImpl createObject(fb.BufferPointer bp) => new _LinkedLibraryImpl (bp);
5709 }
5710
5711 class _LinkedReferenceImpl extends Object with _LinkedReferenceMixin implements idl.LinkedReference {
5712 final fb.BufferPointer _bp;
5713
5714 int _containingReference;
5715
5716 int _dependency;
5717 idl.ReferenceKind _kind;
5718 int _localIndex;
5719 String _name;
5720 int _numTypeParameters;
5721 int _unit;
5722 _LinkedReferenceImpl(this._bp);
5723
5724 @override
5725 int get containingReference {
5726 _containingReference ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
5727 return _containingReference;
5728 }
5729
5730 @override
5731 int get dependency {
5732 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
5733 return _dependency;
5734 }
5735
5736 @override
5737 idl.ReferenceKind get kind {
5738 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 2, idl.ReferenceKind.c lassOrEnum);
5739 return _kind;
5740 }
5741
5742 @override
5743 int get localIndex {
5744 _localIndex ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
5745 return _localIndex;
5746 }
5747
5748 @override
5749 String get name {
5750 _name ??= const fb.StringReader().vTableGet(_bp, 3, '');
5751 return _name;
5752 }
5753
5754 @override
5755 int get numTypeParameters {
5756 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 4, 0);
5757 return _numTypeParameters;
5758 }
5759
5760 @override
5761 int get unit {
5762 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
5763 return _unit;
5764 }
5765 }
5766
5767 abstract class _LinkedReferenceMixin implements idl.LinkedReference {
5768 @override
5769 Map<String, Object> toJson() {
5770 Map<String, Object> _result = <String, Object>{};
5771 if (containingReference != 0) _result["containingReference"] = containingRef erence;
5772 if (dependency != 0) _result["dependency"] = dependency;
5773 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString() .split('.')[1];
5774 if (localIndex != 0) _result["localIndex"] = localIndex;
5775 if (name != '') _result["name"] = name;
5776 if (numTypeParameters != 0) _result["numTypeParameters"] = numTypeParameters ;
5777 if (unit != 0) _result["unit"] = unit;
5778 return _result;
5779 }
5780
5781 @override
5782 Map<String, Object> toMap() => {
5783 "containingReference": containingReference,
5784 "dependency": dependency,
5785 "kind": kind,
5786 "localIndex": localIndex,
5787 "name": name,
5788 "numTypeParameters": numTypeParameters,
5789 "unit": unit,
5790 };
5791
5792 @override
5793 String toString() => convert.JSON.encode(toJson());
5794 }
5795
5796 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> {
5797 const _LinkedReferenceReader();
5798
5799 @override
5800 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference Impl(bp);
5801 }
5802
5803 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked Unit {
5804 final fb.BufferPointer _bp;
5805
5806 List<int> _constCycles;
5807
5808 List<idl.LinkedReference> _references;
5809 List<idl.EntityRef> _types;
5810 _LinkedUnitImpl(this._bp);
5811
5812 @override
5813 List<int> get constCycles {
5814 _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[] );
5815 return _constCycles;
5816 }
5817
5818 @override
5819 List<idl.LinkedReference> get references {
5820 _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedRefere nceReader()).vTableGet(_bp, 0, const <idl.LinkedReference>[]);
5821 return _references;
5822 }
5823
5824 @override
5825 List<idl.EntityRef> get types {
5826 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTab leGet(_bp, 1, const <idl.EntityRef>[]);
5827 return _types;
5828 }
5829 }
5830
5831 abstract class _LinkedUnitMixin implements idl.LinkedUnit {
5832 @override
5833 Map<String, Object> toJson() {
5834 Map<String, Object> _result = <String, Object>{};
5835 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles;
5836 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList();
5837 if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson ()).toList();
5838 return _result;
5839 }
5840
5841 @override
5842 Map<String, Object> toMap() => {
5843 "constCycles": constCycles,
5844 "references": references,
5845 "types": types,
5846 };
5847
5848 @override
5849 String toString() => convert.JSON.encode(toJson());
5850 }
5851
5852 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> {
5853 const _LinkedUnitReader();
5854
5855 @override
5856 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp);
5857 }
5858
5859 class _PackageBundleImpl extends Object with _PackageBundleMixin implements idl. PackageBundle {
5860 final fb.BufferPointer _bp;
5861
5862 List<idl.LinkedLibrary> _linkedLibraries;
5863
5864 List<String> _linkedLibraryUris;
5865 int _majorVersion;
5866 int _minorVersion;
5867 List<String> _unlinkedUnitHashes;
5868 List<idl.UnlinkedUnit> _unlinkedUnits;
5869 List<String> _unlinkedUnitUris;
5870 _PackageBundleImpl(this._bp);
5871
5872 @override
5873 List<idl.LinkedLibrary> get linkedLibraries {
5874 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib raryReader()).vTableGet(_bp, 0, const <idl.LinkedLibrary>[]);
5875 return _linkedLibraries;
5876 }
5877
5878 @override
5879 List<String> get linkedLibraryUris {
5880 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()). vTableGet(_bp, 1, const <String>[]);
5881 return _linkedLibraryUris;
5882 }
5883
5884 @override
5885 int get majorVersion {
5886 _majorVersion ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
5887 return _majorVersion;
5888 }
5889
5890 @override
5891 int get minorVersion {
5892 _minorVersion ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
5893 return _minorVersion;
5894 }
5895
5896 @override
5897 List<String> get unlinkedUnitHashes {
5898 _unlinkedUnitHashes ??= const fb.ListReader<String>(const fb.StringReader()) .vTableGet(_bp, 4, const <String>[]);
5899 return _unlinkedUnitHashes;
5900 }
5901
5902 @override
5903 List<idl.UnlinkedUnit> get unlinkedUnits {
5904 _unlinkedUnits ??= const fb.ListReader<idl.UnlinkedUnit>(const _UnlinkedUnit Reader()).vTableGet(_bp, 2, const <idl.UnlinkedUnit>[]);
5905 return _unlinkedUnits;
5906 }
5907
5908 @override
5909 List<String> get unlinkedUnitUris {
5910 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v TableGet(_bp, 3, const <String>[]);
5911 return _unlinkedUnitUris;
5912 }
5913 }
5914
5915 abstract class _PackageBundleMixin implements idl.PackageBundle {
5916 @override
5917 Map<String, Object> toJson() {
5918 Map<String, Object> _result = <String, Object>{};
5919 if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries .map((_value) => _value.toJson()).toList();
5920 if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibra ryUris;
5921 if (majorVersion != 0) _result["majorVersion"] = majorVersion;
5922 if (minorVersion != 0) _result["minorVersion"] = minorVersion;
5923 if (unlinkedUnitHashes.isNotEmpty) _result["unlinkedUnitHashes"] = unlinkedU nitHashes;
5924 if (unlinkedUnits.isNotEmpty) _result["unlinkedUnits"] = unlinkedUnits.map(( _value) => _value.toJson()).toList();
5925 if (unlinkedUnitUris.isNotEmpty) _result["unlinkedUnitUris"] = unlinkedUnitU ris;
5926 return _result;
5927 }
5928
5929 @override
5930 Map<String, Object> toMap() => {
5931 "linkedLibraries": linkedLibraries,
5932 "linkedLibraryUris": linkedLibraryUris,
5933 "majorVersion": majorVersion,
5934 "minorVersion": minorVersion,
5935 "unlinkedUnitHashes": unlinkedUnitHashes,
5936 "unlinkedUnits": unlinkedUnits,
5937 "unlinkedUnitUris": unlinkedUnitUris,
5938 };
5939
5940 @override
5941 String toString() => convert.JSON.encode(toJson());
5942 }
5943
5944 class _PackageBundleReader extends fb.TableReader<_PackageBundleImpl> {
5945 const _PackageBundleReader();
5946
5947 @override
5948 _PackageBundleImpl createObject(fb.BufferPointer bp) => new _PackageBundleImpl (bp);
5949 }
5950
5951 class _PackageIndexImpl extends Object with _PackageIndexMixin implements idl.Pa ckageIndex {
5952 final fb.BufferPointer _bp;
5953
5954 List<idl.IndexSyntheticElementKind> _elementKinds;
5955
5956 List<int> _elementOffsets;
5957 List<int> _elementUnits;
5958 List<String> _strings;
5959 List<int> _unitLibraryUris;
5960 List<idl.UnitIndex> _units;
5961 List<int> _unitUnitUris;
5962 _PackageIndexImpl(this._bp);
5963
5964 @override
5965 List<idl.IndexSyntheticElementKind> get elementKinds {
5966 _elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>(const _ IndexSyntheticElementKindReader()).vTableGet(_bp, 5, const <idl.IndexSyntheticEl ementKind>[]);
5967 return _elementKinds;
5968 }
5969
5970 @override
5971 List<int> get elementOffsets {
5972 _elementOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int >[]);
5973 return _elementOffsets;
5974 }
5975
5976 @override
5977 List<int> get elementUnits {
5978 _elementUnits ??= const fb.Uint32ListReader().vTableGet(_bp, 0, const <int>[ ]);
5979 return _elementUnits;
5980 }
5981
5982 @override
5983 List<String> get strings {
5984 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet( _bp, 6, const <String>[]);
5985 return _strings;
5986 }
5987
5988 @override
5989 List<int> get unitLibraryUris {
5990 _unitLibraryUris ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <in t>[]);
5991 return _unitLibraryUris;
5992 }
5993
5994 @override
5995 List<idl.UnitIndex> get units {
5996 _units ??= const fb.ListReader<idl.UnitIndex>(const _UnitIndexReader()).vTab leGet(_bp, 4, const <idl.UnitIndex>[]);
5997 return _units;
5998 }
5999
6000 @override
6001 List<int> get unitUnitUris {
6002 _unitUnitUris ??= const fb.Uint32ListReader().vTableGet(_bp, 3, const <int>[ ]);
6003 return _unitUnitUris;
6004 }
6005 }
6006
6007 abstract class _PackageIndexMixin implements idl.PackageIndex {
6008 @override
6009 Map<String, Object> toJson() {
6010 Map<String, Object> _result = <String, Object>{};
6011 if (elementKinds.isNotEmpty) _result["elementKinds"] = elementKinds.map((_va lue) => _value.toString().split('.')[1]).toList();
6012 if (elementOffsets.isNotEmpty) _result["elementOffsets"] = elementOffsets;
6013 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits;
6014 if (strings.isNotEmpty) _result["strings"] = strings;
6015 if (unitLibraryUris.isNotEmpty) _result["unitLibraryUris"] = unitLibraryUris ;
6016 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson ()).toList();
6017 if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris;
6018 return _result;
6019 }
6020
6021 @override
6022 Map<String, Object> toMap() => {
6023 "elementKinds": elementKinds,
6024 "elementOffsets": elementOffsets,
6025 "elementUnits": elementUnits,
6026 "strings": strings,
6027 "unitLibraryUris": unitLibraryUris,
6028 "units": units,
6029 "unitUnitUris": unitUnitUris,
6030 };
6031
6032 @override
6033 String toString() => convert.JSON.encode(toJson());
6034 }
6035
6036 class _PackageIndexReader extends fb.TableReader<_PackageIndexImpl> {
6037 const _PackageIndexReader();
6038
6039 @override
6040 _PackageIndexImpl createObject(fb.BufferPointer bp) => new _PackageIndexImpl(b p);
6041 }
6042
6043 class _ReferenceKindReader extends fb.Reader<idl.ReferenceKind> {
6044 const _ReferenceKindReader() : super();
6045
6046 @override
6047 int get size => 1;
6048
6049 @override
6050 idl.ReferenceKind read(fb.BufferPointer bp) {
6051 int index = const fb.Uint8Reader().read(bp);
6052 return index < idl.ReferenceKind.values.length ? idl.ReferenceKind.values[in dex] : idl.ReferenceKind.classOrEnum;
6053 }
6054 }
6055
6056 class _UnitIndexImpl extends Object with _UnitIndexMixin implements idl.UnitInde x {
6057 final fb.BufferPointer _bp;
6058
6059 List<idl.IndexNameKind> _definedNameKinds;
6060
6061 List<int> _definedNameOffsets;
6062 List<int> _definedNames;
6063 int _unit;
6064 List<bool> _usedElementIsQualifiedFlags;
6065 List<idl.IndexRelationKind> _usedElementKinds;
6066 List<int> _usedElementLengths;
6067 List<int> _usedElementOffsets;
6068 List<int> _usedElements;
6069 List<bool> _usedNameIsQualifiedFlags;
6070 List<idl.IndexRelationKind> _usedNameKinds;
6071 List<int> _usedNameOffsets;
6072 List<int> _usedNames;
6073 _UnitIndexImpl(this._bp);
6074
6075 @override
6076 List<idl.IndexNameKind> get definedNameKinds {
6077 _definedNameKinds ??= const fb.ListReader<idl.IndexNameKind>(const _IndexNam eKindReader()).vTableGet(_bp, 6, const <idl.IndexNameKind>[]);
6078 return _definedNameKinds;
6079 }
6080
6081 @override
6082 List<int> get definedNameOffsets {
6083 _definedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 7, const <int>[]);
6084 return _definedNameOffsets;
6085 }
6086
6087 @override
6088 List<int> get definedNames {
6089 _definedNames ??= const fb.Uint32ListReader().vTableGet(_bp, 5, const <int>[ ]);
6090 return _definedNames;
6091 }
6092
6093 @override
6094 int get unit {
6095 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
6096 return _unit;
6097 }
6098
6099 @override
6100 List<bool> get usedElementIsQualifiedFlags {
6101 _usedElementIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bp, 11 , const <bool>[]);
6102 return _usedElementIsQualifiedFlags;
6103 }
6104
6105 @override
6106 List<idl.IndexRelationKind> get usedElementKinds {
6107 _usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _Inde xRelationKindReader()).vTableGet(_bp, 4, const <idl.IndexRelationKind>[]);
6108 return _usedElementKinds;
6109 }
6110
6111 @override
6112 List<int> get usedElementLengths {
6113 _usedElementLengths ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
6114 return _usedElementLengths;
6115 }
6116
6117 @override
6118 List<int> get usedElementOffsets {
6119 _usedElementOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]);
6120 return _usedElementOffsets;
6121 }
6122
6123 @override
6124 List<int> get usedElements {
6125 _usedElements ??= const fb.Uint32ListReader().vTableGet(_bp, 3, const <int>[ ]);
6126 return _usedElements;
6127 }
6128
6129 @override
6130 List<bool> get usedNameIsQualifiedFlags {
6131 _usedNameIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bp, 12, c onst <bool>[]);
6132 return _usedNameIsQualifiedFlags;
6133 }
6134
6135 @override
6136 List<idl.IndexRelationKind> get usedNameKinds {
6137 _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _IndexRe lationKindReader()).vTableGet(_bp, 10, const <idl.IndexRelationKind>[]);
6138 return _usedNameKinds;
6139 }
6140
6141 @override
6142 List<int> get usedNameOffsets {
6143 _usedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 9, const <in t>[]);
6144 return _usedNameOffsets;
6145 }
6146
6147 @override
6148 List<int> get usedNames {
6149 _usedNames ??= const fb.Uint32ListReader().vTableGet(_bp, 8, const <int>[]);
6150 return _usedNames;
6151 }
6152 }
6153
6154 abstract class _UnitIndexMixin implements idl.UnitIndex {
6155 @override
6156 Map<String, Object> toJson() {
6157 Map<String, Object> _result = <String, Object>{};
6158 if (definedNameKinds.isNotEmpty) _result["definedNameKinds"] = definedNameKi nds.map((_value) => _value.toString().split('.')[1]).toList();
6159 if (definedNameOffsets.isNotEmpty) _result["definedNameOffsets"] = definedNa meOffsets;
6160 if (definedNames.isNotEmpty) _result["definedNames"] = definedNames;
6161 if (unit != 0) _result["unit"] = unit;
6162 if (usedElementIsQualifiedFlags.isNotEmpty) _result["usedElementIsQualifiedF lags"] = usedElementIsQualifiedFlags;
6163 if (usedElementKinds.isNotEmpty) _result["usedElementKinds"] = usedElementKi nds.map((_value) => _value.toString().split('.')[1]).toList();
6164 if (usedElementLengths.isNotEmpty) _result["usedElementLengths"] = usedEleme ntLengths;
6165 if (usedElementOffsets.isNotEmpty) _result["usedElementOffsets"] = usedEleme ntOffsets;
6166 if (usedElements.isNotEmpty) _result["usedElements"] = usedElements;
6167 if (usedNameIsQualifiedFlags.isNotEmpty) _result["usedNameIsQualifiedFlags"] = usedNameIsQualifiedFlags;
6168 if (usedNameKinds.isNotEmpty) _result["usedNameKinds"] = usedNameKinds.map(( _value) => _value.toString().split('.')[1]).toList();
6169 if (usedNameOffsets.isNotEmpty) _result["usedNameOffsets"] = usedNameOffsets ;
6170 if (usedNames.isNotEmpty) _result["usedNames"] = usedNames;
6171 return _result;
6172 }
6173
6174 @override
6175 Map<String, Object> toMap() => {
6176 "definedNameKinds": definedNameKinds,
6177 "definedNameOffsets": definedNameOffsets,
6178 "definedNames": definedNames,
6179 "unit": unit,
6180 "usedElementIsQualifiedFlags": usedElementIsQualifiedFlags,
6181 "usedElementKinds": usedElementKinds,
6182 "usedElementLengths": usedElementLengths,
6183 "usedElementOffsets": usedElementOffsets,
6184 "usedElements": usedElements,
6185 "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags,
6186 "usedNameKinds": usedNameKinds,
6187 "usedNameOffsets": usedNameOffsets,
6188 "usedNames": usedNames,
6189 };
6190
6191 @override
6192 String toString() => convert.JSON.encode(toJson());
6193 }
6194
6195 class _UnitIndexReader extends fb.TableReader<_UnitIndexImpl> {
6196 const _UnitIndexReader();
6197
6198 @override
6199 _UnitIndexImpl createObject(fb.BufferPointer bp) => new _UnitIndexImpl(bp);
6200 }
6201
6202 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl. UnlinkedClass {
6203 final fb.BufferPointer _bp;
6204
6205 List<idl.UnlinkedConst> _annotations;
6206
6207 idl.CodeRange _codeRange;
6208 idl.UnlinkedDocumentationComment _documentationComment;
6209 List<idl.UnlinkedExecutable> _executables;
6210 List<idl.UnlinkedVariable> _fields;
6211 bool _hasNoSupertype;
6212 List<idl.EntityRef> _interfaces;
6213 bool _isAbstract;
6214 bool _isMixinApplication;
6215 List<idl.EntityRef> _mixins;
6216 String _name;
6217 int _nameOffset;
6218 idl.EntityRef _supertype;
6219 List<idl.UnlinkedTypeParam> _typeParameters;
6220 _UnlinkedClassImpl(this._bp);
6221
6222 @override
6223 List<idl.UnlinkedConst> get annotations {
6224 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 5, const <idl.UnlinkedConst>[]);
6225 return _annotations;
6226 }
6227
6228 @override
6229 idl.CodeRange get codeRange {
6230 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 13, null);
6231 return _codeRange;
6232 }
6233
6234 @override
6235 idl.UnlinkedDocumentationComment get documentationComment {
6236 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 6, null);
6237 return _documentationComment;
6238 }
6239
6240 @override
6241 List<idl.UnlinkedExecutable> get executables {
6242 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]);
6243 return _executables;
6244 }
6245
6246 @override
6247 List<idl.UnlinkedVariable> get fields {
6248 _fields ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVariabl eReader()).vTableGet(_bp, 4, const <idl.UnlinkedVariable>[]);
6249 return _fields;
6250 }
6251
6252 @override
6253 bool get hasNoSupertype {
6254 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 12, false);
6255 return _hasNoSupertype;
6256 }
6257
6258 @override
6259 List<idl.EntityRef> get interfaces {
6260 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) .vTableGet(_bp, 7, const <idl.EntityRef>[]);
6261 return _interfaces;
6262 }
6263
6264 @override
6265 bool get isAbstract {
6266 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 8, false);
6267 return _isAbstract;
6268 }
6269
6270 @override
6271 bool get isMixinApplication {
6272 _isMixinApplication ??= const fb.BoolReader().vTableGet(_bp, 11, false);
6273 return _isMixinApplication;
6274 }
6275
6276 @override
6277 List<idl.EntityRef> get mixins {
6278 _mixins ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTa bleGet(_bp, 10, const <idl.EntityRef>[]);
6279 return _mixins;
6280 }
6281
6282 @override
6283 String get name {
6284 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6285 return _name;
6286 }
6287
6288 @override
6289 int get nameOffset {
6290 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
6291 return _nameOffset;
6292 }
6293
6294 @override
6295 idl.EntityRef get supertype {
6296 _supertype ??= const _EntityRefReader().vTableGet(_bp, 3, null);
6297 return _supertype;
6298 }
6299
6300 @override
6301 List<idl.UnlinkedTypeParam> get typeParameters {
6302 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink edTypeParamReader()).vTableGet(_bp, 9, const <idl.UnlinkedTypeParam>[]);
6303 return _typeParameters;
6304 }
6305 }
6306
6307 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass {
6308 @override
6309 Map<String, Object> toJson() {
6310 Map<String, Object> _result = <String, Object>{};
6311 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
6312 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
6313 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
6314 if (executables.isNotEmpty) _result["executables"] = executables.map((_value ) => _value.toJson()).toList();
6315 if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJ son()).toList();
6316 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype;
6317 if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) = > _value.toJson()).toList();
6318 if (isAbstract != false) _result["isAbstract"] = isAbstract;
6319 if (isMixinApplication != false) _result["isMixinApplication"] = isMixinAppl ication;
6320 if (mixins.isNotEmpty) _result["mixins"] = mixins.map((_value) => _value.toJ son()).toList();
6321 if (name != '') _result["name"] = name;
6322 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
6323 if (supertype != null) _result["supertype"] = supertype.toJson();
6324 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList();
6325 return _result;
6326 }
6327
6328 @override
6329 Map<String, Object> toMap() => {
6330 "annotations": annotations,
6331 "codeRange": codeRange,
6332 "documentationComment": documentationComment,
6333 "executables": executables,
6334 "fields": fields,
6335 "hasNoSupertype": hasNoSupertype,
6336 "interfaces": interfaces,
6337 "isAbstract": isAbstract,
6338 "isMixinApplication": isMixinApplication,
6339 "mixins": mixins,
6340 "name": name,
6341 "nameOffset": nameOffset,
6342 "supertype": supertype,
6343 "typeParameters": typeParameters,
6344 };
6345
6346 @override
6347 String toString() => convert.JSON.encode(toJson());
6348 }
6349
6350 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> {
6351 const _UnlinkedClassReader();
6352
6353 @override
6354 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl (bp);
6355 }
6356
6357 class _UnlinkedCombinatorImpl extends Object with _UnlinkedCombinatorMixin imple ments idl.UnlinkedCombinator {
6358 final fb.BufferPointer _bp;
6359
6360 int _end;
6361
6362 List<String> _hides;
6363 int _offset;
6364 List<String> _shows;
6365 _UnlinkedCombinatorImpl(this._bp);
6366
6367 @override
6368 int get end {
6369 _end ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
6370 return _end;
6371 }
6372
6373 @override
6374 List<String> get hides {
6375 _hides ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
6376 return _hides;
6377 }
6378
6379 @override
6380 int get offset {
6381 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
6382 return _offset;
6383 }
6384
6385 @override
6386 List<String> get shows {
6387 _shows ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 0, const <String>[]);
6388 return _shows;
6389 }
6390 }
6391
6392 abstract class _UnlinkedCombinatorMixin implements idl.UnlinkedCombinator {
6393 @override
6394 Map<String, Object> toJson() {
6395 Map<String, Object> _result = <String, Object>{};
6396 if (end != 0) _result["end"] = end;
6397 if (hides.isNotEmpty) _result["hides"] = hides;
6398 if (offset != 0) _result["offset"] = offset;
6399 if (shows.isNotEmpty) _result["shows"] = shows;
6400 return _result;
6401 }
6402
6403 @override
6404 Map<String, Object> toMap() => {
6405 "end": end,
6406 "hides": hides,
6407 "offset": offset,
6408 "shows": shows,
6409 };
6410
6411 @override
6412 String toString() => convert.JSON.encode(toJson());
6413 }
6414
6415 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl> {
6416 const _UnlinkedCombinatorReader();
6417
6418 @override
6419 _UnlinkedCombinatorImpl createObject(fb.BufferPointer bp) => new _UnlinkedComb inatorImpl(bp);
6420 }
6421
6422 class _UnlinkedConstImpl extends Object with _UnlinkedConstMixin implements idl. UnlinkedConst {
6423 final fb.BufferPointer _bp;
6424
6425 List<double> _doubles;
6426
6427 List<int> _ints;
6428 bool _isInvalid;
6429 List<idl.UnlinkedConstOperation> _operations;
6430 List<idl.EntityRef> _references;
6431 List<String> _strings;
6432 _UnlinkedConstImpl(this._bp);
6433
6434 @override
6435 List<double> get doubles {
6436 _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 4, const <double>[] );
6437 return _doubles;
6438 }
6439
6440 @override
6441 List<int> get ints {
6442 _ints ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
6443 return _ints;
6444 }
6445
6446 @override
6447 bool get isInvalid {
6448 _isInvalid ??= const fb.BoolReader().vTableGet(_bp, 5, false);
6449 return _isInvalid;
6450 }
6451
6452 @override
6453 List<idl.UnlinkedConstOperation> get operations {
6454 _operations ??= const fb.ListReader<idl.UnlinkedConstOperation>(const _Unlin kedConstOperationReader()).vTableGet(_bp, 0, const <idl.UnlinkedConstOperation>[ ]);
6455 return _operations;
6456 }
6457
6458 @override
6459 List<idl.EntityRef> get references {
6460 _references ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) .vTableGet(_bp, 2, const <idl.EntityRef>[]);
6461 return _references;
6462 }
6463
6464 @override
6465 List<String> get strings {
6466 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet( _bp, 3, const <String>[]);
6467 return _strings;
6468 }
6469 }
6470
6471 abstract class _UnlinkedConstMixin implements idl.UnlinkedConst {
6472 @override
6473 Map<String, Object> toJson() {
6474 Map<String, Object> _result = <String, Object>{};
6475 if (doubles.isNotEmpty) _result["doubles"] = doubles.map((_value) => _value. isFinite ? _value : _value.toString()).toList();
6476 if (ints.isNotEmpty) _result["ints"] = ints;
6477 if (isInvalid != false) _result["isInvalid"] = isInvalid;
6478 if (operations.isNotEmpty) _result["operations"] = operations.map((_value) = > _value.toString().split('.')[1]).toList();
6479 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList();
6480 if (strings.isNotEmpty) _result["strings"] = strings;
6481 return _result;
6482 }
6483
6484 @override
6485 Map<String, Object> toMap() => {
6486 "doubles": doubles,
6487 "ints": ints,
6488 "isInvalid": isInvalid,
6489 "operations": operations,
6490 "references": references,
6491 "strings": strings,
6492 };
6493
6494 @override
6495 String toString() => convert.JSON.encode(toJson());
6496 }
6497
6498 class _UnlinkedConstOperationReader extends fb.Reader<idl.UnlinkedConstOperation > {
6499 const _UnlinkedConstOperationReader() : super();
6500
6501 @override
6502 int get size => 1;
6503
6504 @override
6505 idl.UnlinkedConstOperation read(fb.BufferPointer bp) {
6506 int index = const fb.Uint8Reader().read(bp);
6507 return index < idl.UnlinkedConstOperation.values.length ? idl.UnlinkedConstO peration.values[index] : idl.UnlinkedConstOperation.pushInt;
6508 }
6509 }
6510
6511 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> {
6512 const _UnlinkedConstReader();
6513
6514 @override
6515 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl (bp);
6516 }
6517
6518 class _UnlinkedConstructorInitializerImpl extends Object with _UnlinkedConstruct orInitializerMixin implements idl.UnlinkedConstructorInitializer {
6519 final fb.BufferPointer _bp;
6520
6521 List<idl.UnlinkedConst> _arguments;
6522
6523 idl.UnlinkedConst _expression;
6524 idl.UnlinkedConstructorInitializerKind _kind;
6525 String _name;
6526 _UnlinkedConstructorInitializerImpl(this._bp);
6527
6528 @override
6529 List<idl.UnlinkedConst> get arguments {
6530 _arguments ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstRe ader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]);
6531 return _arguments;
6532 }
6533
6534 @override
6535 idl.UnlinkedConst get expression {
6536 _expression ??= const _UnlinkedConstReader().vTableGet(_bp, 1, null);
6537 return _expression;
6538 }
6539
6540 @override
6541 idl.UnlinkedConstructorInitializerKind get kind {
6542 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet(_bp, 2 , idl.UnlinkedConstructorInitializerKind.field);
6543 return _kind;
6544 }
6545
6546 @override
6547 String get name {
6548 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6549 return _name;
6550 }
6551 }
6552
6553 class _UnlinkedConstructorInitializerKindReader extends fb.Reader<idl.UnlinkedCo nstructorInitializerKind> {
6554 const _UnlinkedConstructorInitializerKindReader() : super();
6555
6556 @override
6557 int get size => 1;
6558
6559 @override
6560 idl.UnlinkedConstructorInitializerKind read(fb.BufferPointer bp) {
6561 int index = const fb.Uint8Reader().read(bp);
6562 return index < idl.UnlinkedConstructorInitializerKind.values.length ? idl.Un linkedConstructorInitializerKind.values[index] : idl.UnlinkedConstructorInitiali zerKind.field;
6563 }
6564 }
6565
6566 abstract class _UnlinkedConstructorInitializerMixin implements idl.UnlinkedConst ructorInitializer {
6567 @override
6568 Map<String, Object> toJson() {
6569 Map<String, Object> _result = <String, Object>{};
6570 if (arguments.isNotEmpty) _result["arguments"] = arguments.map((_value) => _ value.toJson()).toList();
6571 if (expression != null) _result["expression"] = expression.toJson();
6572 if (kind != idl.UnlinkedConstructorInitializerKind.field) _result["kind"] = kind.toString().split('.')[1];
6573 if (name != '') _result["name"] = name;
6574 return _result;
6575 }
6576
6577 @override
6578 Map<String, Object> toMap() => {
6579 "arguments": arguments,
6580 "expression": expression,
6581 "kind": kind,
6582 "name": name,
6583 };
6584
6585 @override
6586 String toString() => convert.JSON.encode(toJson());
6587 }
6588
6589 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons tructorInitializerImpl> {
6590 const _UnlinkedConstructorInitializerReader();
6591
6592 @override
6593 _UnlinkedConstructorInitializerImpl createObject(fb.BufferPointer bp) => new _ UnlinkedConstructorInitializerImpl(bp);
6594 }
6595
6596 class _UnlinkedDocumentationCommentImpl extends Object with _UnlinkedDocumentati onCommentMixin implements idl.UnlinkedDocumentationComment {
6597 final fb.BufferPointer _bp;
6598
6599 int _length;
6600
6601 int _offset;
6602 String _text;
6603 _UnlinkedDocumentationCommentImpl(this._bp);
6604
6605 @override
6606 int get length {
6607 _length ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
6608 return _length;
6609 }
6610
6611 @override
6612 int get offset {
6613 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
6614 return _offset;
6615 }
6616
6617 @override
6618 String get text {
6619 _text ??= const fb.StringReader().vTableGet(_bp, 1, '');
6620 return _text;
6621 }
6622 }
6623
6624 abstract class _UnlinkedDocumentationCommentMixin implements idl.UnlinkedDocumen tationComment {
6625 @override
6626 Map<String, Object> toJson() {
6627 Map<String, Object> _result = <String, Object>{};
6628 if (length != 0) _result["length"] = length;
6629 if (offset != 0) _result["offset"] = offset;
6630 if (text != '') _result["text"] = text;
6631 return _result;
6632 }
6633
6634 @override
6635 Map<String, Object> toMap() => {
6636 "length": length,
6637 "offset": offset,
6638 "text": text,
6639 };
6640
6641 @override
6642 String toString() => convert.JSON.encode(toJson());
6643 }
6644
6645 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume ntationCommentImpl> {
6646 const _UnlinkedDocumentationCommentReader();
6647
6648 @override
6649 _UnlinkedDocumentationCommentImpl createObject(fb.BufferPointer bp) => new _Un linkedDocumentationCommentImpl(bp);
6650 }
6651
6652 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un linkedEnum {
6653 final fb.BufferPointer _bp;
6654
6655 List<idl.UnlinkedConst> _annotations;
6656
6657 idl.CodeRange _codeRange;
6658 idl.UnlinkedDocumentationComment _documentationComment;
6659 String _name;
6660 int _nameOffset;
6661 List<idl.UnlinkedEnumValue> _values;
6662 _UnlinkedEnumImpl(this._bp);
6663
6664 @override
6665 List<idl.UnlinkedConst> get annotations {
6666 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]);
6667 return _annotations;
6668 }
6669
6670 @override
6671 idl.CodeRange get codeRange {
6672 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 5, null);
6673 return _codeRange;
6674 }
6675
6676 @override
6677 idl.UnlinkedDocumentationComment get documentationComment {
6678 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 3, null);
6679 return _documentationComment;
6680 }
6681
6682 @override
6683 String get name {
6684 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6685 return _name;
6686 }
6687
6688 @override
6689 int get nameOffset {
6690 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
6691 return _nameOffset;
6692 }
6693
6694 @override
6695 List<idl.UnlinkedEnumValue> get values {
6696 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa lueReader()).vTableGet(_bp, 2, const <idl.UnlinkedEnumValue>[]);
6697 return _values;
6698 }
6699 }
6700
6701 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum {
6702 @override
6703 Map<String, Object> toJson() {
6704 Map<String, Object> _result = <String, Object>{};
6705 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
6706 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
6707 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
6708 if (name != '') _result["name"] = name;
6709 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
6710 if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJ son()).toList();
6711 return _result;
6712 }
6713
6714 @override
6715 Map<String, Object> toMap() => {
6716 "annotations": annotations,
6717 "codeRange": codeRange,
6718 "documentationComment": documentationComment,
6719 "name": name,
6720 "nameOffset": nameOffset,
6721 "values": values,
6722 };
6723
6724 @override
6725 String toString() => convert.JSON.encode(toJson());
6726 }
6727
6728 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> {
6729 const _UnlinkedEnumReader();
6730
6731 @override
6732 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b p);
6733 }
6734
6735 class _UnlinkedEnumValueImpl extends Object with _UnlinkedEnumValueMixin impleme nts idl.UnlinkedEnumValue {
6736 final fb.BufferPointer _bp;
6737
6738 idl.UnlinkedDocumentationComment _documentationComment;
6739
6740 String _name;
6741 int _nameOffset;
6742 _UnlinkedEnumValueImpl(this._bp);
6743
6744 @override
6745 idl.UnlinkedDocumentationComment get documentationComment {
6746 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 2, null);
6747 return _documentationComment;
6748 }
6749
6750 @override
6751 String get name {
6752 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
6753 return _name;
6754 }
6755
6756 @override
6757 int get nameOffset {
6758 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
6759 return _nameOffset;
6760 }
6761 }
6762
6763 abstract class _UnlinkedEnumValueMixin implements idl.UnlinkedEnumValue {
6764 @override
6765 Map<String, Object> toJson() {
6766 Map<String, Object> _result = <String, Object>{};
6767 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
6768 if (name != '') _result["name"] = name;
6769 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
6770 return _result;
6771 }
6772
6773 @override
6774 Map<String, Object> toMap() => {
6775 "documentationComment": documentationComment,
6776 "name": name,
6777 "nameOffset": nameOffset,
6778 };
6779
6780 @override
6781 String toString() => convert.JSON.encode(toJson());
6782 }
6783
6784 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> {
6785 const _UnlinkedEnumValueReader();
6786
6787 @override
6788 _UnlinkedEnumValueImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumV alueImpl(bp);
6789 }
6790
6791 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple ments idl.UnlinkedExecutable {
6792 final fb.BufferPointer _bp;
6793
6794 List<idl.UnlinkedConst> _annotations;
6795
6796 idl.CodeRange _codeRange;
6797 List<idl.UnlinkedConstructorInitializer> _constantInitializers;
6798 int _constCycleSlot;
6799 idl.UnlinkedDocumentationComment _documentationComment;
6800 int _inferredReturnTypeSlot;
6801 bool _isAbstract;
6802 bool _isConst;
6803 bool _isExternal;
6804 bool _isFactory;
6805 bool _isRedirectedConstructor;
6806 bool _isStatic;
6807 idl.UnlinkedExecutableKind _kind;
6808 List<idl.UnlinkedExecutable> _localFunctions;
6809 List<idl.UnlinkedLabel> _localLabels;
6810 List<idl.UnlinkedVariable> _localVariables;
6811 String _name;
6812 int _nameEnd;
6813 int _nameOffset;
6814 List<idl.UnlinkedParam> _parameters;
6815 int _periodOffset;
6816 idl.EntityRef _redirectedConstructor;
6817 String _redirectedConstructorName;
6818 idl.EntityRef _returnType;
6819 List<idl.UnlinkedTypeParam> _typeParameters;
6820 int _visibleLength;
6821 int _visibleOffset;
6822 _UnlinkedExecutableImpl(this._bp);
6823
6824 @override
6825 List<idl.UnlinkedConst> get annotations {
6826 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 6, const <idl.UnlinkedConst>[]);
6827 return _annotations;
6828 }
6829
6830 @override
6831 idl.CodeRange get codeRange {
6832 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 26, null);
6833 return _codeRange;
6834 }
6835
6836 @override
6837 List<idl.UnlinkedConstructorInitializer> get constantInitializers {
6838 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <i dl.UnlinkedConstructorInitializer>[]);
6839 return _constantInitializers;
6840 }
6841
6842 @override
6843 int get constCycleSlot {
6844 _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0);
6845 return _constCycleSlot;
6846 }
6847
6848 @override
6849 idl.UnlinkedDocumentationComment get documentationComment {
6850 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 7, null);
6851 return _documentationComment;
6852 }
6853
6854 @override
6855 int get inferredReturnTypeSlot {
6856 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
6857 return _inferredReturnTypeSlot;
6858 }
6859
6860 @override
6861 bool get isAbstract {
6862 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 10, false);
6863 return _isAbstract;
6864 }
6865
6866 @override
6867 bool get isConst {
6868 _isConst ??= const fb.BoolReader().vTableGet(_bp, 12, false);
6869 return _isConst;
6870 }
6871
6872 @override
6873 bool get isExternal {
6874 _isExternal ??= const fb.BoolReader().vTableGet(_bp, 11, false);
6875 return _isExternal;
6876 }
6877
6878 @override
6879 bool get isFactory {
6880 _isFactory ??= const fb.BoolReader().vTableGet(_bp, 8, false);
6881 return _isFactory;
6882 }
6883
6884 @override
6885 bool get isRedirectedConstructor {
6886 _isRedirectedConstructor ??= const fb.BoolReader().vTableGet(_bp, 13, false) ;
6887 return _isRedirectedConstructor;
6888 }
6889
6890 @override
6891 bool get isStatic {
6892 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 9, false);
6893 return _isStatic;
6894 }
6895
6896 @override
6897 idl.UnlinkedExecutableKind get kind {
6898 _kind ??= const _UnlinkedExecutableKindReader().vTableGet(_bp, 4, idl.Unlink edExecutableKind.functionOrMethod);
6899 return _kind;
6900 }
6901
6902 @override
6903 List<idl.UnlinkedExecutable> get localFunctions {
6904 _localFunctions ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlin kedExecutableReader()).vTableGet(_bp, 18, const <idl.UnlinkedExecutable>[]);
6905 return _localFunctions;
6906 }
6907
6908 @override
6909 List<idl.UnlinkedLabel> get localLabels {
6910 _localLabels ??= const fb.ListReader<idl.UnlinkedLabel>(const _UnlinkedLabel Reader()).vTableGet(_bp, 22, const <idl.UnlinkedLabel>[]);
6911 return _localLabels;
6912 }
6913
6914 @override
6915 List<idl.UnlinkedVariable> get localVariables {
6916 _localVariables ??= const fb.ListReader<idl.UnlinkedVariable>(const _Unlinke dVariableReader()).vTableGet(_bp, 19, const <idl.UnlinkedVariable>[]);
6917 return _localVariables;
6918 }
6919
6920 @override
6921 String get name {
6922 _name ??= const fb.StringReader().vTableGet(_bp, 1, '');
6923 return _name;
6924 }
6925
6926 @override
6927 int get nameEnd {
6928 _nameEnd ??= const fb.Uint32Reader().vTableGet(_bp, 23, 0);
6929 return _nameEnd;
6930 }
6931
6932 @override
6933 int get nameOffset {
6934 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
6935 return _nameOffset;
6936 }
6937
6938 @override
6939 List<idl.UnlinkedParam> get parameters {
6940 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR eader()).vTableGet(_bp, 2, const <idl.UnlinkedParam>[]);
6941 return _parameters;
6942 }
6943
6944 @override
6945 int get periodOffset {
6946 _periodOffset ??= const fb.Uint32Reader().vTableGet(_bp, 24, 0);
6947 return _periodOffset;
6948 }
6949
6950 @override
6951 idl.EntityRef get redirectedConstructor {
6952 _redirectedConstructor ??= const _EntityRefReader().vTableGet(_bp, 15, null) ;
6953 return _redirectedConstructor;
6954 }
6955
6956 @override
6957 String get redirectedConstructorName {
6958 _redirectedConstructorName ??= const fb.StringReader().vTableGet(_bp, 17, '' );
6959 return _redirectedConstructorName;
6960 }
6961
6962 @override
6963 idl.EntityRef get returnType {
6964 _returnType ??= const _EntityRefReader().vTableGet(_bp, 3, null);
6965 return _returnType;
6966 }
6967
6968 @override
6969 List<idl.UnlinkedTypeParam> get typeParameters {
6970 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink edTypeParamReader()).vTableGet(_bp, 16, const <idl.UnlinkedTypeParam>[]);
6971 return _typeParameters;
6972 }
6973
6974 @override
6975 int get visibleLength {
6976 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 20, 0);
6977 return _visibleLength;
6978 }
6979
6980 @override
6981 int get visibleOffset {
6982 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 21, 0);
6983 return _visibleOffset;
6984 }
6985 }
6986
6987 class _UnlinkedExecutableKindReader extends fb.Reader<idl.UnlinkedExecutableKind > {
6988 const _UnlinkedExecutableKindReader() : super();
6989
6990 @override
6991 int get size => 1;
6992
6993 @override
6994 idl.UnlinkedExecutableKind read(fb.BufferPointer bp) {
6995 int index = const fb.Uint8Reader().read(bp);
6996 return index < idl.UnlinkedExecutableKind.values.length ? idl.UnlinkedExecut ableKind.values[index] : idl.UnlinkedExecutableKind.functionOrMethod;
6997 }
6998 }
6999
7000 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
7001 @override
7002 Map<String, Object> toJson() {
7003 Map<String, Object> _result = <String, Object>{};
7004 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7005 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7006 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const antInitializers.map((_value) => _value.toJson()).toList();
7007 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot;
7008 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
7009 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre dReturnTypeSlot;
7010 if (isAbstract != false) _result["isAbstract"] = isAbstract;
7011 if (isConst != false) _result["isConst"] = isConst;
7012 if (isExternal != false) _result["isExternal"] = isExternal;
7013 if (isFactory != false) _result["isFactory"] = isFactory;
7014 if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = i sRedirectedConstructor;
7015 if (isStatic != false) _result["isStatic"] = isStatic;
7016 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) _result["kind"] = k ind.toString().split('.')[1];
7017 if (localFunctions.isNotEmpty) _result["localFunctions"] = localFunctions.ma p((_value) => _value.toJson()).toList();
7018 if (localLabels.isNotEmpty) _result["localLabels"] = localLabels.map((_value ) => _value.toJson()).toList();
7019 if (localVariables.isNotEmpty) _result["localVariables"] = localVariables.ma p((_value) => _value.toJson()).toList();
7020 if (name != '') _result["name"] = name;
7021 if (nameEnd != 0) _result["nameEnd"] = nameEnd;
7022 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
7023 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
7024 if (periodOffset != 0) _result["periodOffset"] = periodOffset;
7025 if (redirectedConstructor != null) _result["redirectedConstructor"] = redire ctedConstructor.toJson();
7026 if (redirectedConstructorName != '') _result["redirectedConstructorName"] = redirectedConstructorName;
7027 if (returnType != null) _result["returnType"] = returnType.toJson();
7028 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList();
7029 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
7030 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
7031 return _result;
7032 }
7033
7034 @override
7035 Map<String, Object> toMap() => {
7036 "annotations": annotations,
7037 "codeRange": codeRange,
7038 "constantInitializers": constantInitializers,
7039 "constCycleSlot": constCycleSlot,
7040 "documentationComment": documentationComment,
7041 "inferredReturnTypeSlot": inferredReturnTypeSlot,
7042 "isAbstract": isAbstract,
7043 "isConst": isConst,
7044 "isExternal": isExternal,
7045 "isFactory": isFactory,
7046 "isRedirectedConstructor": isRedirectedConstructor,
7047 "isStatic": isStatic,
7048 "kind": kind,
7049 "localFunctions": localFunctions,
7050 "localLabels": localLabels,
7051 "localVariables": localVariables,
7052 "name": name,
7053 "nameEnd": nameEnd,
7054 "nameOffset": nameOffset,
7055 "parameters": parameters,
7056 "periodOffset": periodOffset,
7057 "redirectedConstructor": redirectedConstructor,
7058 "redirectedConstructorName": redirectedConstructorName,
7059 "returnType": returnType,
7060 "typeParameters": typeParameters,
7061 "visibleLength": visibleLength,
7062 "visibleOffset": visibleOffset,
7063 };
7064
7065 @override
7066 String toString() => convert.JSON.encode(toJson());
7067 }
7068
7069 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl> {
7070 const _UnlinkedExecutableReader();
7071
7072 @override
7073 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec utableImpl(bp);
7074 }
7075
7076 class _UnlinkedExportNonPublicImpl extends Object with _UnlinkedExportNonPublicM ixin implements idl.UnlinkedExportNonPublic {
7077 final fb.BufferPointer _bp;
7078
7079 List<idl.UnlinkedConst> _annotations;
7080
7081 int _offset;
7082 int _uriEnd;
7083 int _uriOffset;
7084 _UnlinkedExportNonPublicImpl(this._bp);
7085
7086 @override
7087 List<idl.UnlinkedConst> get annotations {
7088 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]);
7089 return _annotations;
7090 }
7091
7092 @override
7093 int get offset {
7094 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
7095 return _offset;
7096 }
7097
7098 @override
7099 int get uriEnd {
7100 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7101 return _uriEnd;
7102 }
7103
7104 @override
7105 int get uriOffset {
7106 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
7107 return _uriOffset;
7108 }
7109 }
7110
7111 abstract class _UnlinkedExportNonPublicMixin implements idl.UnlinkedExportNonPub lic {
7112 @override
7113 Map<String, Object> toJson() {
7114 Map<String, Object> _result = <String, Object>{};
7115 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7116 if (offset != 0) _result["offset"] = offset;
7117 if (uriEnd != 0) _result["uriEnd"] = uriEnd;
7118 if (uriOffset != 0) _result["uriOffset"] = uriOffset;
7119 return _result;
7120 }
7121
7122 @override
7123 Map<String, Object> toMap() => {
7124 "annotations": annotations,
7125 "offset": offset,
7126 "uriEnd": uriEnd,
7127 "uriOffset": uriOffset,
7128 };
7129
7130 @override
7131 String toString() => convert.JSON.encode(toJson());
7132 }
7133
7134 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu blicImpl> {
7135 const _UnlinkedExportNonPublicReader();
7136
7137 @override
7138 _UnlinkedExportNonPublicImpl createObject(fb.BufferPointer bp) => new _Unlinke dExportNonPublicImpl(bp);
7139 }
7140
7141 class _UnlinkedExportPublicImpl extends Object with _UnlinkedExportPublicMixin i mplements idl.UnlinkedExportPublic {
7142 final fb.BufferPointer _bp;
7143
7144 List<idl.UnlinkedCombinator> _combinators;
7145
7146 String _uri;
7147 _UnlinkedExportPublicImpl(this._bp);
7148
7149 @override
7150 List<idl.UnlinkedCombinator> get combinators {
7151 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked CombinatorReader()).vTableGet(_bp, 1, const <idl.UnlinkedCombinator>[]);
7152 return _combinators;
7153 }
7154
7155 @override
7156 String get uri {
7157 _uri ??= const fb.StringReader().vTableGet(_bp, 0, '');
7158 return _uri;
7159 }
7160 }
7161
7162 abstract class _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic {
7163 @override
7164 Map<String, Object> toJson() {
7165 Map<String, Object> _result = <String, Object>{};
7166 if (combinators.isNotEmpty) _result["combinators"] = combinators.map((_value ) => _value.toJson()).toList();
7167 if (uri != '') _result["uri"] = uri;
7168 return _result;
7169 }
7170
7171 @override
7172 Map<String, Object> toMap() => {
7173 "combinators": combinators,
7174 "uri": uri,
7175 };
7176
7177 @override
7178 String toString() => convert.JSON.encode(toJson());
7179 }
7180
7181 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm pl> {
7182 const _UnlinkedExportPublicReader();
7183
7184 @override
7185 _UnlinkedExportPublicImpl createObject(fb.BufferPointer bp) => new _UnlinkedEx portPublicImpl(bp);
7186 }
7187
7188 class _UnlinkedImportImpl extends Object with _UnlinkedImportMixin implements id l.UnlinkedImport {
7189 final fb.BufferPointer _bp;
7190
7191 List<idl.UnlinkedConst> _annotations;
7192
7193 List<idl.UnlinkedCombinator> _combinators;
7194 bool _isDeferred;
7195 bool _isImplicit;
7196 int _offset;
7197 int _prefixOffset;
7198 int _prefixReference;
7199 String _uri;
7200 int _uriEnd;
7201 int _uriOffset;
7202 _UnlinkedImportImpl(this._bp);
7203
7204 @override
7205 List<idl.UnlinkedConst> get annotations {
7206 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]);
7207 return _annotations;
7208 }
7209
7210 @override
7211 List<idl.UnlinkedCombinator> get combinators {
7212 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked CombinatorReader()).vTableGet(_bp, 4, const <idl.UnlinkedCombinator>[]);
7213 return _combinators;
7214 }
7215
7216 @override
7217 bool get isDeferred {
7218 _isDeferred ??= const fb.BoolReader().vTableGet(_bp, 9, false);
7219 return _isDeferred;
7220 }
7221
7222 @override
7223 bool get isImplicit {
7224 _isImplicit ??= const fb.BoolReader().vTableGet(_bp, 5, false);
7225 return _isImplicit;
7226 }
7227
7228 @override
7229 int get offset {
7230 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
7231 return _offset;
7232 }
7233
7234 @override
7235 int get prefixOffset {
7236 _prefixOffset ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
7237 return _prefixOffset;
7238 }
7239
7240 @override
7241 int get prefixReference {
7242 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0);
7243 return _prefixReference;
7244 }
7245
7246 @override
7247 String get uri {
7248 _uri ??= const fb.StringReader().vTableGet(_bp, 1, '');
7249 return _uri;
7250 }
7251
7252 @override
7253 int get uriEnd {
7254 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
7255 return _uriEnd;
7256 }
7257
7258 @override
7259 int get uriOffset {
7260 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
7261 return _uriOffset;
7262 }
7263 }
7264
7265 abstract class _UnlinkedImportMixin implements idl.UnlinkedImport {
7266 @override
7267 Map<String, Object> toJson() {
7268 Map<String, Object> _result = <String, Object>{};
7269 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7270 if (combinators.isNotEmpty) _result["combinators"] = combinators.map((_value ) => _value.toJson()).toList();
7271 if (isDeferred != false) _result["isDeferred"] = isDeferred;
7272 if (isImplicit != false) _result["isImplicit"] = isImplicit;
7273 if (offset != 0) _result["offset"] = offset;
7274 if (prefixOffset != 0) _result["prefixOffset"] = prefixOffset;
7275 if (prefixReference != 0) _result["prefixReference"] = prefixReference;
7276 if (uri != '') _result["uri"] = uri;
7277 if (uriEnd != 0) _result["uriEnd"] = uriEnd;
7278 if (uriOffset != 0) _result["uriOffset"] = uriOffset;
7279 return _result;
7280 }
7281
7282 @override
7283 Map<String, Object> toMap() => {
7284 "annotations": annotations,
7285 "combinators": combinators,
7286 "isDeferred": isDeferred,
7287 "isImplicit": isImplicit,
7288 "offset": offset,
7289 "prefixOffset": prefixOffset,
7290 "prefixReference": prefixReference,
7291 "uri": uri,
7292 "uriEnd": uriEnd,
7293 "uriOffset": uriOffset,
7294 };
7295
7296 @override
7297 String toString() => convert.JSON.encode(toJson());
7298 }
7299
7300 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> {
7301 const _UnlinkedImportReader();
7302
7303 @override
7304 _UnlinkedImportImpl createObject(fb.BufferPointer bp) => new _UnlinkedImportIm pl(bp);
7305 }
7306
7307 class _UnlinkedLabelImpl extends Object with _UnlinkedLabelMixin implements idl. UnlinkedLabel {
7308 final fb.BufferPointer _bp;
7309
7310 bool _isOnSwitchMember;
7311
7312 bool _isOnSwitchStatement;
7313 String _name;
7314 int _nameOffset;
7315 _UnlinkedLabelImpl(this._bp);
7316
7317 @override
7318 bool get isOnSwitchMember {
7319 _isOnSwitchMember ??= const fb.BoolReader().vTableGet(_bp, 2, false);
7320 return _isOnSwitchMember;
7321 }
7322
7323 @override
7324 bool get isOnSwitchStatement {
7325 _isOnSwitchStatement ??= const fb.BoolReader().vTableGet(_bp, 3, false);
7326 return _isOnSwitchStatement;
7327 }
7328
7329 @override
7330 String get name {
7331 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
7332 return _name;
7333 }
7334
7335 @override
7336 int get nameOffset {
7337 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7338 return _nameOffset;
7339 }
7340 }
7341
7342 abstract class _UnlinkedLabelMixin implements idl.UnlinkedLabel {
7343 @override
7344 Map<String, Object> toJson() {
7345 Map<String, Object> _result = <String, Object>{};
7346 if (isOnSwitchMember != false) _result["isOnSwitchMember"] = isOnSwitchMembe r;
7347 if (isOnSwitchStatement != false) _result["isOnSwitchStatement"] = isOnSwitc hStatement;
7348 if (name != '') _result["name"] = name;
7349 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
7350 return _result;
7351 }
7352
7353 @override
7354 Map<String, Object> toMap() => {
7355 "isOnSwitchMember": isOnSwitchMember,
7356 "isOnSwitchStatement": isOnSwitchStatement,
7357 "name": name,
7358 "nameOffset": nameOffset,
7359 };
7360
7361 @override
7362 String toString() => convert.JSON.encode(toJson());
7363 }
7364
7365 class _UnlinkedLabelReader extends fb.TableReader<_UnlinkedLabelImpl> {
7366 const _UnlinkedLabelReader();
7367
7368 @override
7369 _UnlinkedLabelImpl createObject(fb.BufferPointer bp) => new _UnlinkedLabelImpl (bp);
7370 }
7371
7372 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl. UnlinkedParam {
7373 final fb.BufferPointer _bp;
7374
7375 List<idl.UnlinkedConst> _annotations;
7376
7377 idl.CodeRange _codeRange;
7378 idl.UnlinkedConst _defaultValue;
7379 String _defaultValueCode;
7380 int _inferredTypeSlot;
7381 idl.UnlinkedExecutable _initializer;
7382 bool _isFunctionTyped;
7383 bool _isInitializingFormal;
7384 idl.UnlinkedParamKind _kind;
7385 String _name;
7386 int _nameOffset;
7387 List<idl.UnlinkedParam> _parameters;
7388 idl.EntityRef _type;
7389 int _visibleLength;
7390 int _visibleOffset;
7391 _UnlinkedParamImpl(this._bp);
7392
7393 @override
7394 List<idl.UnlinkedConst> get annotations {
7395 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]);
7396 return _annotations;
7397 }
7398
7399 @override
7400 idl.CodeRange get codeRange {
7401 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null);
7402 return _codeRange;
7403 }
7404
7405 @override
7406 idl.UnlinkedConst get defaultValue {
7407 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null);
7408 return _defaultValue;
7409 }
7410
7411 @override
7412 String get defaultValueCode {
7413 _defaultValueCode ??= const fb.StringReader().vTableGet(_bp, 13, '');
7414 return _defaultValueCode;
7415 }
7416
7417 @override
7418 int get inferredTypeSlot {
7419 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
7420 return _inferredTypeSlot;
7421 }
7422
7423 @override
7424 idl.UnlinkedExecutable get initializer {
7425 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 12, null);
7426 return _initializer;
7427 }
7428
7429 @override
7430 bool get isFunctionTyped {
7431 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bp, 5, false);
7432 return _isFunctionTyped;
7433 }
7434
7435 @override
7436 bool get isInitializingFormal {
7437 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bp, 6, false);
7438 return _isInitializingFormal;
7439 }
7440
7441 @override
7442 idl.UnlinkedParamKind get kind {
7443 _kind ??= const _UnlinkedParamKindReader().vTableGet(_bp, 4, idl.UnlinkedPar amKind.required);
7444 return _kind;
7445 }
7446
7447 @override
7448 String get name {
7449 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
7450 return _name;
7451 }
7452
7453 @override
7454 int get nameOffset {
7455 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7456 return _nameOffset;
7457 }
7458
7459 @override
7460 List<idl.UnlinkedParam> get parameters {
7461 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR eader()).vTableGet(_bp, 8, const <idl.UnlinkedParam>[]);
7462 return _parameters;
7463 }
7464
7465 @override
7466 idl.EntityRef get type {
7467 _type ??= const _EntityRefReader().vTableGet(_bp, 3, null);
7468 return _type;
7469 }
7470
7471 @override
7472 int get visibleLength {
7473 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 10, 0);
7474 return _visibleLength;
7475 }
7476
7477 @override
7478 int get visibleOffset {
7479 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0);
7480 return _visibleOffset;
7481 }
7482 }
7483
7484 class _UnlinkedParamKindReader extends fb.Reader<idl.UnlinkedParamKind> {
7485 const _UnlinkedParamKindReader() : super();
7486
7487 @override
7488 int get size => 1;
7489
7490 @override
7491 idl.UnlinkedParamKind read(fb.BufferPointer bp) {
7492 int index = const fb.Uint8Reader().read(bp);
7493 return index < idl.UnlinkedParamKind.values.length ? idl.UnlinkedParamKind.v alues[index] : idl.UnlinkedParamKind.required;
7494 }
7495 }
7496
7497 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam {
7498 @override
7499 Map<String, Object> toJson() {
7500 Map<String, Object> _result = <String, Object>{};
7501 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7502 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7503 if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson();
7504 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode;
7505 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
7506 if (initializer != null) _result["initializer"] = initializer.toJson();
7507 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped;
7508 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti alizingFormal;
7509 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString( ).split('.')[1];
7510 if (name != '') _result["name"] = name;
7511 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
7512 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
7513 if (type != null) _result["type"] = type.toJson();
7514 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
7515 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
7516 return _result;
7517 }
7518
7519 @override
7520 Map<String, Object> toMap() => {
7521 "annotations": annotations,
7522 "codeRange": codeRange,
7523 "defaultValue": defaultValue,
7524 "defaultValueCode": defaultValueCode,
7525 "inferredTypeSlot": inferredTypeSlot,
7526 "initializer": initializer,
7527 "isFunctionTyped": isFunctionTyped,
7528 "isInitializingFormal": isInitializingFormal,
7529 "kind": kind,
7530 "name": name,
7531 "nameOffset": nameOffset,
7532 "parameters": parameters,
7533 "type": type,
7534 "visibleLength": visibleLength,
7535 "visibleOffset": visibleOffset,
7536 };
7537
7538 @override
7539 String toString() => convert.JSON.encode(toJson());
7540 }
7541
7542 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> {
7543 const _UnlinkedParamReader();
7544
7545 @override
7546 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl (bp);
7547 }
7548
7549 class _UnlinkedPartImpl extends Object with _UnlinkedPartMixin implements idl.Un linkedPart {
7550 final fb.BufferPointer _bp;
7551
7552 List<idl.UnlinkedConst> _annotations;
7553
7554 int _uriEnd;
7555 int _uriOffset;
7556 _UnlinkedPartImpl(this._bp);
7557
7558 @override
7559 List<idl.UnlinkedConst> get annotations {
7560 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 2, const <idl.UnlinkedConst>[]);
7561 return _annotations;
7562 }
7563
7564 @override
7565 int get uriEnd {
7566 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
7567 return _uriEnd;
7568 }
7569
7570 @override
7571 int get uriOffset {
7572 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7573 return _uriOffset;
7574 }
7575 }
7576
7577 abstract class _UnlinkedPartMixin implements idl.UnlinkedPart {
7578 @override
7579 Map<String, Object> toJson() {
7580 Map<String, Object> _result = <String, Object>{};
7581 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7582 if (uriEnd != 0) _result["uriEnd"] = uriEnd;
7583 if (uriOffset != 0) _result["uriOffset"] = uriOffset;
7584 return _result;
7585 }
7586
7587 @override
7588 Map<String, Object> toMap() => {
7589 "annotations": annotations,
7590 "uriEnd": uriEnd,
7591 "uriOffset": uriOffset,
7592 };
7593
7594 @override
7595 String toString() => convert.JSON.encode(toJson());
7596 }
7597
7598 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> {
7599 const _UnlinkedPartReader();
7600
7601 @override
7602 _UnlinkedPartImpl createObject(fb.BufferPointer bp) => new _UnlinkedPartImpl(b p);
7603 }
7604
7605 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple ments idl.UnlinkedPublicName {
7606 final fb.BufferPointer _bp;
7607
7608 idl.ReferenceKind _kind;
7609
7610 List<idl.UnlinkedPublicName> _members;
7611 String _name;
7612 int _numTypeParameters;
7613 _UnlinkedPublicNameImpl(this._bp);
7614
7615 @override
7616 idl.ReferenceKind get kind {
7617 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, idl.ReferenceKind.c lassOrEnum);
7618 return _kind;
7619 }
7620
7621 @override
7622 List<idl.UnlinkedPublicName> get members {
7623 _members ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPubl icNameReader()).vTableGet(_bp, 2, const <idl.UnlinkedPublicName>[]);
7624 return _members;
7625 }
7626
7627 @override
7628 String get name {
7629 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
7630 return _name;
7631 }
7632
7633 @override
7634 int get numTypeParameters {
7635 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0);
7636 return _numTypeParameters;
7637 }
7638 }
7639
7640 abstract class _UnlinkedPublicNameMixin implements idl.UnlinkedPublicName {
7641 @override
7642 Map<String, Object> toJson() {
7643 Map<String, Object> _result = <String, Object>{};
7644 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString() .split('.')[1];
7645 if (members.isNotEmpty) _result["members"] = members.map((_value) => _value. toJson()).toList();
7646 if (name != '') _result["name"] = name;
7647 if (numTypeParameters != 0) _result["numTypeParameters"] = numTypeParameters ;
7648 return _result;
7649 }
7650
7651 @override
7652 Map<String, Object> toMap() => {
7653 "kind": kind,
7654 "members": members,
7655 "name": name,
7656 "numTypeParameters": numTypeParameters,
7657 };
7658
7659 @override
7660 String toString() => convert.JSON.encode(toJson());
7661 }
7662
7663 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl> {
7664 const _UnlinkedPublicNameReader();
7665
7666 @override
7667 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl icNameImpl(bp);
7668 }
7669
7670 class _UnlinkedPublicNamespaceImpl extends Object with _UnlinkedPublicNamespaceM ixin implements idl.UnlinkedPublicNamespace {
7671 final fb.BufferPointer _bp;
7672
7673 List<idl.UnlinkedExportPublic> _exports;
7674
7675 List<idl.UnlinkedPublicName> _names;
7676 List<String> _parts;
7677 _UnlinkedPublicNamespaceImpl(this._bp);
7678
7679 @override
7680 List<idl.UnlinkedExportPublic> get exports {
7681 _exports ??= const fb.ListReader<idl.UnlinkedExportPublic>(const _UnlinkedEx portPublicReader()).vTableGet(_bp, 2, const <idl.UnlinkedExportPublic>[]);
7682 return _exports;
7683 }
7684
7685 @override
7686 List<idl.UnlinkedPublicName> get names {
7687 _names ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPublic NameReader()).vTableGet(_bp, 0, const <idl.UnlinkedPublicName>[]);
7688 return _names;
7689 }
7690
7691 @override
7692 List<String> get parts {
7693 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
7694 return _parts;
7695 }
7696 }
7697
7698 abstract class _UnlinkedPublicNamespaceMixin implements idl.UnlinkedPublicNamesp ace {
7699 @override
7700 Map<String, Object> toJson() {
7701 Map<String, Object> _result = <String, Object>{};
7702 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value. toJson()).toList();
7703 if (names.isNotEmpty) _result["names"] = names.map((_value) => _value.toJson ()).toList();
7704 if (parts.isNotEmpty) _result["parts"] = parts;
7705 return _result;
7706 }
7707
7708 @override
7709 Map<String, Object> toMap() => {
7710 "exports": exports,
7711 "names": names,
7712 "parts": parts,
7713 };
7714
7715 @override
7716 String toString() => convert.JSON.encode(toJson());
7717 }
7718
7719 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames paceImpl> {
7720 const _UnlinkedPublicNamespaceReader();
7721
7722 @override
7723 _UnlinkedPublicNamespaceImpl createObject(fb.BufferPointer bp) => new _Unlinke dPublicNamespaceImpl(bp);
7724 }
7725
7726 class _UnlinkedReferenceImpl extends Object with _UnlinkedReferenceMixin impleme nts idl.UnlinkedReference {
7727 final fb.BufferPointer _bp;
7728
7729 String _name;
7730
7731 int _prefixReference;
7732 _UnlinkedReferenceImpl(this._bp);
7733
7734 @override
7735 String get name {
7736 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
7737 return _name;
7738 }
7739
7740 @override
7741 int get prefixReference {
7742 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7743 return _prefixReference;
7744 }
7745 }
7746
7747 abstract class _UnlinkedReferenceMixin implements idl.UnlinkedReference {
7748 @override
7749 Map<String, Object> toJson() {
7750 Map<String, Object> _result = <String, Object>{};
7751 if (name != '') _result["name"] = name;
7752 if (prefixReference != 0) _result["prefixReference"] = prefixReference;
7753 return _result;
7754 }
7755
7756 @override
7757 Map<String, Object> toMap() => {
7758 "name": name,
7759 "prefixReference": prefixReference,
7760 };
7761
7762 @override
7763 String toString() => convert.JSON.encode(toJson());
7764 }
7765
7766 class _UnlinkedReferenceReader extends fb.TableReader<_UnlinkedReferenceImpl> {
7767 const _UnlinkedReferenceReader();
7768
7769 @override
7770 _UnlinkedReferenceImpl createObject(fb.BufferPointer bp) => new _UnlinkedRefer enceImpl(bp);
7771 }
7772
7773 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements idl.UnlinkedTypedef {
7774 final fb.BufferPointer _bp;
7775
7776 List<idl.UnlinkedConst> _annotations;
7777
7778 idl.CodeRange _codeRange;
7779 idl.UnlinkedDocumentationComment _documentationComment;
7780 String _name;
7781 int _nameOffset;
7782 List<idl.UnlinkedParam> _parameters;
7783 idl.EntityRef _returnType;
7784 List<idl.UnlinkedTypeParam> _typeParameters;
7785 _UnlinkedTypedefImpl(this._bp);
7786
7787 @override
7788 List<idl.UnlinkedConst> get annotations {
7789 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]);
7790 return _annotations;
7791 }
7792
7793 @override
7794 idl.CodeRange get codeRange {
7795 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 7, null);
7796 return _codeRange;
7797 }
7798
7799 @override
7800 idl.UnlinkedDocumentationComment get documentationComment {
7801 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 6, null);
7802 return _documentationComment;
7803 }
7804
7805 @override
7806 String get name {
7807 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
7808 return _name;
7809 }
7810
7811 @override
7812 int get nameOffset {
7813 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7814 return _nameOffset;
7815 }
7816
7817 @override
7818 List<idl.UnlinkedParam> get parameters {
7819 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR eader()).vTableGet(_bp, 3, const <idl.UnlinkedParam>[]);
7820 return _parameters;
7821 }
7822
7823 @override
7824 idl.EntityRef get returnType {
7825 _returnType ??= const _EntityRefReader().vTableGet(_bp, 2, null);
7826 return _returnType;
7827 }
7828
7829 @override
7830 List<idl.UnlinkedTypeParam> get typeParameters {
7831 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink edTypeParamReader()).vTableGet(_bp, 5, const <idl.UnlinkedTypeParam>[]);
7832 return _typeParameters;
7833 }
7834 }
7835
7836 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef {
7837 @override
7838 Map<String, Object> toJson() {
7839 Map<String, Object> _result = <String, Object>{};
7840 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7841 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7842 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
7843 if (name != '') _result["name"] = name;
7844 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
7845 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
7846 if (returnType != null) _result["returnType"] = returnType.toJson();
7847 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList();
7848 return _result;
7849 }
7850
7851 @override
7852 Map<String, Object> toMap() => {
7853 "annotations": annotations,
7854 "codeRange": codeRange,
7855 "documentationComment": documentationComment,
7856 "name": name,
7857 "nameOffset": nameOffset,
7858 "parameters": parameters,
7859 "returnType": returnType,
7860 "typeParameters": typeParameters,
7861 };
7862
7863 @override
7864 String toString() => convert.JSON.encode(toJson());
7865 }
7866
7867 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> {
7868 const _UnlinkedTypedefReader();
7869
7870 @override
7871 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef Impl(bp);
7872 }
7873
7874 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme nts idl.UnlinkedTypeParam {
7875 final fb.BufferPointer _bp;
7876
7877 List<idl.UnlinkedConst> _annotations;
7878
7879 idl.EntityRef _bound;
7880 idl.CodeRange _codeRange;
7881 String _name;
7882 int _nameOffset;
7883 _UnlinkedTypeParamImpl(this._bp);
7884
7885 @override
7886 List<idl.UnlinkedConst> get annotations {
7887 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]);
7888 return _annotations;
7889 }
7890
7891 @override
7892 idl.EntityRef get bound {
7893 _bound ??= const _EntityRefReader().vTableGet(_bp, 2, null);
7894 return _bound;
7895 }
7896
7897 @override
7898 idl.CodeRange get codeRange {
7899 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 4, null);
7900 return _codeRange;
7901 }
7902
7903 @override
7904 String get name {
7905 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
7906 return _name;
7907 }
7908
7909 @override
7910 int get nameOffset {
7911 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
7912 return _nameOffset;
7913 }
7914 }
7915
7916 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam {
7917 @override
7918 Map<String, Object> toJson() {
7919 Map<String, Object> _result = <String, Object>{};
7920 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
7921 if (bound != null) _result["bound"] = bound.toJson();
7922 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7923 if (name != '') _result["name"] = name;
7924 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
7925 return _result;
7926 }
7927
7928 @override
7929 Map<String, Object> toMap() => {
7930 "annotations": annotations,
7931 "bound": bound,
7932 "codeRange": codeRange,
7933 "name": name,
7934 "nameOffset": nameOffset,
7935 };
7936
7937 @override
7938 String toString() => convert.JSON.encode(toJson());
7939 }
7940
7941 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> {
7942 const _UnlinkedTypeParamReader();
7943
7944 @override
7945 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP aramImpl(bp);
7946 }
7947
7948 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un linkedUnit {
7949 final fb.BufferPointer _bp;
7950
7951 String _fallbackModePath;
7952
7953 List<idl.UnlinkedClass> _classes;
7954 idl.CodeRange _codeRange;
7955 List<idl.UnlinkedEnum> _enums;
7956 List<idl.UnlinkedExecutable> _executables;
7957 List<idl.UnlinkedExportNonPublic> _exports;
7958 List<idl.UnlinkedImport> _imports;
7959 List<idl.UnlinkedConst> _libraryAnnotations;
7960 idl.UnlinkedDocumentationComment _libraryDocumentationComment;
7961 String _libraryName;
7962 int _libraryNameLength;
7963 int _libraryNameOffset;
7964 List<idl.UnlinkedPart> _parts;
7965 idl.UnlinkedPublicNamespace _publicNamespace;
7966 List<idl.UnlinkedReference> _references;
7967 List<idl.UnlinkedTypedef> _typedefs;
7968 List<idl.UnlinkedVariable> _variables;
7969 _UnlinkedUnitImpl(this._bp);
7970
7971 @override
7972 List<idl.UnlinkedClass> get classes {
7973 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]);
7974 return _classes;
7975 }
7976
7977 @override
7978 idl.CodeRange get codeRange {
7979 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null);
7980 return _codeRange;
7981 }
7982
7983 @override
7984 List<idl.UnlinkedEnum> get enums {
7985 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader() ).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]);
7986 return _enums;
7987 }
7988
7989 @override
7990 List<idl.UnlinkedExecutable> get executables {
7991 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked ExecutableReader()).vTableGet(_bp, 4, const <idl.UnlinkedExecutable>[]);
7992 return _executables;
7993 }
7994
7995 @override
7996 List<idl.UnlinkedExportNonPublic> get exports {
7997 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>(const _Unlinke dExportNonPublicReader()).vTableGet(_bp, 13, const <idl.UnlinkedExportNonPublic> []);
7998 return _exports;
7999 }
8000
8001 @override
8002 String get fallbackModePath {
8003 _fallbackModePath ??= const fb.StringReader().vTableGet(_bp, 16, '');
8004 return _fallbackModePath;
8005 }
8006
8007 @override
8008 List<idl.UnlinkedImport> get imports {
8009 _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportRe ader()).vTableGet(_bp, 5, const <idl.UnlinkedImport>[]);
8010 return _imports;
8011 }
8012
8013 @override
8014 List<idl.UnlinkedConst> get libraryAnnotations {
8015 _libraryAnnotations ??= const fb.ListReader<idl.UnlinkedConst>(const _Unlink edConstReader()).vTableGet(_bp, 14, const <idl.UnlinkedConst>[]);
8016 return _libraryAnnotations;
8017 }
8018
8019 @override
8020 idl.UnlinkedDocumentationComment get libraryDocumentationComment {
8021 _libraryDocumentationComment ??= const _UnlinkedDocumentationCommentReader() .vTableGet(_bp, 9, null);
8022 return _libraryDocumentationComment;
8023 }
8024
8025 @override
8026 String get libraryName {
8027 _libraryName ??= const fb.StringReader().vTableGet(_bp, 6, '');
8028 return _libraryName;
8029 }
8030
8031 @override
8032 int get libraryNameLength {
8033 _libraryNameLength ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0);
8034 return _libraryNameLength;
8035 }
8036
8037 @override
8038 int get libraryNameOffset {
8039 _libraryNameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0);
8040 return _libraryNameOffset;
8041 }
8042
8043 @override
8044 List<idl.UnlinkedPart> get parts {
8045 _parts ??= const fb.ListReader<idl.UnlinkedPart>(const _UnlinkedPartReader() ).vTableGet(_bp, 11, const <idl.UnlinkedPart>[]);
8046 return _parts;
8047 }
8048
8049 @override
8050 idl.UnlinkedPublicNamespace get publicNamespace {
8051 _publicNamespace ??= const _UnlinkedPublicNamespaceReader().vTableGet(_bp, 0 , null);
8052 return _publicNamespace;
8053 }
8054
8055 @override
8056 List<idl.UnlinkedReference> get references {
8057 _references ??= const fb.ListReader<idl.UnlinkedReference>(const _UnlinkedRe ferenceReader()).vTableGet(_bp, 1, const <idl.UnlinkedReference>[]);
8058 return _references;
8059 }
8060
8061 @override
8062 List<idl.UnlinkedTypedef> get typedefs {
8063 _typedefs ??= const fb.ListReader<idl.UnlinkedTypedef>(const _UnlinkedTypede fReader()).vTableGet(_bp, 10, const <idl.UnlinkedTypedef>[]);
8064 return _typedefs;
8065 }
8066
8067 @override
8068 List<idl.UnlinkedVariable> get variables {
8069 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]);
8070 return _variables;
8071 }
8072 }
8073
8074 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit {
8075 @override
8076 Map<String, Object> toJson() {
8077 Map<String, Object> _result = <String, Object>{};
8078 if (fallbackModePath != '') _result["fallbackModePath"] = fallbackModePath;
8079 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value. toJson()).toList();
8080 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
8081 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson ()).toList();
8082 if (executables.isNotEmpty) _result["executables"] = executables.map((_value ) => _value.toJson()).toList();
8083 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value. toJson()).toList();
8084 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value. toJson()).toList();
8085 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn notations.map((_value) => _value.toJson()).toList();
8086 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen t"] = libraryDocumentationComment.toJson();
8087 if (libraryName != '') _result["libraryName"] = libraryName;
8088 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength ;
8089 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset ;
8090 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson ()).toList();
8091 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to Json();
8092 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList();
8093 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val ue.toJson()).toList();
8094 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _ value.toJson()).toList();
8095 return _result;
8096 }
8097
8098 @override
8099 Map<String, Object> toMap() => {
8100 "fallbackModePath": fallbackModePath,
8101 "classes": classes,
8102 "codeRange": codeRange,
8103 "enums": enums,
8104 "executables": executables,
8105 "exports": exports,
8106 "imports": imports,
8107 "libraryAnnotations": libraryAnnotations,
8108 "libraryDocumentationComment": libraryDocumentationComment,
8109 "libraryName": libraryName,
8110 "libraryNameLength": libraryNameLength,
8111 "libraryNameOffset": libraryNameOffset,
8112 "parts": parts,
8113 "publicNamespace": publicNamespace,
8114 "references": references,
8115 "typedefs": typedefs,
8116 "variables": variables,
8117 };
8118
8119 @override
8120 String toString() => convert.JSON.encode(toJson());
8121 }
8122
8123 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> {
8124 const _UnlinkedUnitReader();
8125
8126 @override
8127 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b p);
8134 } 8128 }
8135 8129
8136 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement s idl.UnlinkedVariable { 8130 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement s idl.UnlinkedVariable {
8137 final fb.BufferPointer _bp; 8131 final fb.BufferPointer _bp;
8138 8132
8139 _UnlinkedVariableImpl(this._bp);
8140
8141 List<idl.UnlinkedConst> _annotations; 8133 List<idl.UnlinkedConst> _annotations;
8134
8142 idl.CodeRange _codeRange; 8135 idl.CodeRange _codeRange;
8143 idl.UnlinkedConst _constExpr; 8136 idl.UnlinkedConst _constExpr;
8144 idl.UnlinkedDocumentationComment _documentationComment; 8137 idl.UnlinkedDocumentationComment _documentationComment;
8145 int _inferredTypeSlot; 8138 int _inferredTypeSlot;
8146 idl.UnlinkedExecutable _initializer; 8139 idl.UnlinkedExecutable _initializer;
8147 bool _isConst; 8140 bool _isConst;
8148 bool _isFinal; 8141 bool _isFinal;
8149 bool _isStatic; 8142 bool _isStatic;
8150 String _name; 8143 String _name;
8151 int _nameOffset; 8144 int _nameOffset;
8152 int _propagatedTypeSlot; 8145 int _propagatedTypeSlot;
8153 idl.EntityRef _type; 8146 idl.EntityRef _type;
8154 int _visibleLength; 8147 int _visibleLength;
8155 int _visibleOffset; 8148 int _visibleOffset;
8149 _UnlinkedVariableImpl(this._bp);
8156 8150
8157 @override 8151 @override
8158 List<idl.UnlinkedConst> get annotations { 8152 List<idl.UnlinkedConst> get annotations {
8159 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]); 8153 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]);
8160 return _annotations; 8154 return _annotations;
8161 } 8155 }
8162 8156
8163 @override 8157 @override
8164 idl.CodeRange get codeRange { 8158 idl.CodeRange get codeRange {
8165 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null); 8159 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
8283 "propagatedTypeSlot": propagatedTypeSlot, 8277 "propagatedTypeSlot": propagatedTypeSlot,
8284 "type": type, 8278 "type": type,
8285 "visibleLength": visibleLength, 8279 "visibleLength": visibleLength,
8286 "visibleOffset": visibleOffset, 8280 "visibleOffset": visibleOffset,
8287 }; 8281 };
8288 8282
8289 @override 8283 @override
8290 String toString() => convert.JSON.encode(toJson()); 8284 String toString() => convert.JSON.encode(toJson());
8291 } 8285 }
8292 8286
8287 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> {
8288 const _UnlinkedVariableReader();
8289
8290 @override
8291 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab leImpl(bp);
8292 }
8293
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/base.dart ('k') | pkg/analyzer/lib/src/summary/idl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698