| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". | 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". |
| 7 | 7 |
| 8 library analyzer.src.summary.format; | 8 library analyzer.src.summary.format; |
| 9 | 9 |
| 10 import 'flat_buffers.dart' as fb; |
| 11 import 'idl.dart' as idl; |
| 10 import 'dart:convert' as convert; | 12 import 'dart:convert' as convert; |
| 11 | 13 |
| 12 import 'flat_buffers.dart' as fb; | 14 class _CacheSourceKindReader extends fb.Reader<idl.CacheSourceKind> { |
| 13 import 'idl.dart' as idl; | 15 const _CacheSourceKindReader() : super(); |
| 14 | 16 |
| 15 idl.CacheSourceContent readCacheSourceContent(List<int> buffer) { | 17 @override |
| 16 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 18 int get size => 1; |
| 17 return const _CacheSourceContentReader().read(rootRef); | 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 } |
| 18 } | 25 } |
| 19 | 26 |
| 20 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) { | 27 class _IndexNameKindReader extends fb.Reader<idl.IndexNameKind> { |
| 21 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 28 const _IndexNameKindReader() : super(); |
| 22 return const _LinkedLibraryReader().read(rootRef); | 29 |
| 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 } |
| 23 } | 38 } |
| 24 | 39 |
| 25 idl.PackageBundle readPackageBundle(List<int> buffer) { | 40 class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> { |
| 26 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 41 const _IndexRelationKindReader() : super(); |
| 27 return const _PackageBundleReader().read(rootRef); | 42 |
| 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 } |
| 28 } | 51 } |
| 29 | 52 |
| 30 idl.PackageIndex readPackageIndex(List<int> buffer) { | 53 class _IndexSyntheticElementKindReader extends fb.Reader<idl.IndexSyntheticEleme
ntKind> { |
| 31 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 54 const _IndexSyntheticElementKindReader() : super(); |
| 32 return const _PackageIndexReader().read(rootRef); | 55 |
| 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 } |
| 33 } | 64 } |
| 34 | 65 |
| 35 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) { | 66 class _ReferenceKindReader extends fb.Reader<idl.ReferenceKind> { |
| 36 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 67 const _ReferenceKindReader() : super(); |
| 37 return const _UnlinkedPublicNamespaceReader().read(rootRef); | 68 |
| 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 } |
| 38 } | 77 } |
| 39 | 78 |
| 40 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) { | 79 class _UnlinkedConstOperationReader extends fb.Reader<idl.UnlinkedConstOperation
> { |
| 41 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 80 const _UnlinkedConstOperationReader() : super(); |
| 42 return const _UnlinkedUnitReader().read(rootRef); | 81 |
| 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 } |
| 43 } | 129 } |
| 44 | 130 |
| 45 class CacheSourceContentBuilder extends Object with _CacheSourceContentMixin imp
lements idl.CacheSourceContent { | 131 class CacheSourceContentBuilder extends Object with _CacheSourceContentMixin imp
lements idl.CacheSourceContent { |
| 46 bool _finished = false; | 132 bool _finished = false; |
| 47 | 133 |
| 48 List<String> _exportedUris; | 134 List<String> _exportedUris; |
| 49 List<String> _importedUris; | 135 List<String> _importedUris; |
| 50 idl.CacheSourceKind _kind; | 136 idl.CacheSourceKind _kind; |
| 51 List<String> _partUris; | 137 List<String> _partUris; |
| 52 | 138 |
| 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 | |
| 59 @override | 139 @override |
| 60 List<String> get exportedUris => _exportedUris ??= <String>[]; | 140 List<String> get exportedUris => _exportedUris ??= <String>[]; |
| 61 | 141 |
| 62 /** | 142 /** |
| 63 * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`, | 143 * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`, |
| 64 * or `package:foo/bar.dart`. Empty if [kind] is [CacheSourceKind.part]. | 144 * or `package:foo/bar.dart`. Empty if [kind] is [CacheSourceKind.part]. |
| 65 */ | 145 */ |
| 66 void set exportedUris(List<String> _value) { | 146 void set exportedUris(List<String> _value) { |
| 67 assert(!_finished); | 147 assert(!_finished); |
| 68 _exportedUris = _value; | 148 _exportedUris = _value; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 96 | 176 |
| 97 /** | 177 /** |
| 98 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is | 178 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is |
| 99 * [CacheSourceKind.part]. | 179 * [CacheSourceKind.part]. |
| 100 */ | 180 */ |
| 101 void set partUris(List<String> _value) { | 181 void set partUris(List<String> _value) { |
| 102 assert(!_finished); | 182 assert(!_finished); |
| 103 _partUris = _value; | 183 _partUris = _value; |
| 104 } | 184 } |
| 105 | 185 |
| 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 |
| 106 fb.Offset finish(fb.Builder fbBuilder) { | 203 fb.Offset finish(fb.Builder fbBuilder) { |
| 107 assert(!_finished); | 204 assert(!_finished); |
| 108 _finished = true; | 205 _finished = true; |
| 109 fb.Offset offset_exportedUris; | 206 fb.Offset offset_exportedUris; |
| 110 fb.Offset offset_importedUris; | 207 fb.Offset offset_importedUris; |
| 111 fb.Offset offset_partUris; | 208 fb.Offset offset_partUris; |
| 112 if (!(_exportedUris == null || _exportedUris.isEmpty)) { | 209 if (!(_exportedUris == null || _exportedUris.isEmpty)) { |
| 113 offset_exportedUris = fbBuilder.writeList(_exportedUris.map((b) => fbBuild
er.writeString(b)).toList()); | 210 offset_exportedUris = fbBuilder.writeList(_exportedUris.map((b) => fbBuild
er.writeString(b)).toList()); |
| 114 } | 211 } |
| 115 if (!(_importedUris == null || _importedUris.isEmpty)) { | 212 if (!(_importedUris == null || _importedUris.isEmpty)) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 126 fbBuilder.addOffset(1, offset_importedUris); | 223 fbBuilder.addOffset(1, offset_importedUris); |
| 127 } | 224 } |
| 128 if (_kind != null && _kind != idl.CacheSourceKind.library) { | 225 if (_kind != null && _kind != idl.CacheSourceKind.library) { |
| 129 fbBuilder.addUint8(0, _kind.index); | 226 fbBuilder.addUint8(0, _kind.index); |
| 130 } | 227 } |
| 131 if (offset_partUris != null) { | 228 if (offset_partUris != null) { |
| 132 fbBuilder.addOffset(3, offset_partUris); | 229 fbBuilder.addOffset(3, offset_partUris); |
| 133 } | 230 } |
| 134 return fbBuilder.endTable(); | 231 return fbBuilder.endTable(); |
| 135 } | 232 } |
| 233 } |
| 136 | 234 |
| 137 /** | 235 idl.CacheSourceContent readCacheSourceContent(List<int> buffer) { |
| 138 * Flush [informative] data recursively. | 236 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 139 */ | 237 return const _CacheSourceContentReader().read(rootRef); |
| 140 void flushInformative() { | 238 } |
| 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; |
| 141 } | 261 } |
| 142 | 262 |
| 143 List<int> toBuffer() { | 263 @override |
| 144 fb.Builder fbBuilder = new fb.Builder(); | 264 List<String> get importedUris { |
| 145 return fbBuilder.finish(finish(fbBuilder), "CaSS"); | 265 _importedUris ??= const fb.ListReader<String>(const fb.StringReader()).vTabl
eGet(_bp, 1, const <String>[]); |
| 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; |
| 146 } | 279 } |
| 147 } | 280 } |
| 148 | 281 |
| 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 |
| 149 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa
nge { | 305 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa
nge { |
| 150 bool _finished = false; | 306 bool _finished = false; |
| 151 | 307 |
| 152 int _length; | 308 int _length; |
| 153 int _offset; | 309 int _offset; |
| 154 | 310 |
| 155 CodeRangeBuilder({int length, int offset}) | |
| 156 : _length = length, | |
| 157 _offset = offset; | |
| 158 | |
| 159 @override | 311 @override |
| 160 int get length => _length ??= 0; | 312 int get length => _length ??= 0; |
| 161 | 313 |
| 162 /** | 314 /** |
| 163 * Length of the element code. | 315 * Length of the element code. |
| 164 */ | 316 */ |
| 165 void set length(int _value) { | 317 void set length(int _value) { |
| 166 assert(!_finished); | 318 assert(!_finished); |
| 167 assert(_value == null || _value >= 0); | 319 assert(_value == null || _value >= 0); |
| 168 _length = _value; | 320 _length = _value; |
| 169 } | 321 } |
| 170 | 322 |
| 171 @override | 323 @override |
| 172 int get offset => _offset ??= 0; | 324 int get offset => _offset ??= 0; |
| 173 | 325 |
| 174 /** | 326 /** |
| 175 * Offset of the element code relative to the beginning of the file. | 327 * Offset of the element code relative to the beginning of the file. |
| 176 */ | 328 */ |
| 177 void set offset(int _value) { | 329 void set offset(int _value) { |
| 178 assert(!_finished); | 330 assert(!_finished); |
| 179 assert(_value == null || _value >= 0); | 331 assert(_value == null || _value >= 0); |
| 180 _offset = _value; | 332 _offset = _value; |
| 181 } | 333 } |
| 182 | 334 |
| 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 |
| 183 fb.Offset finish(fb.Builder fbBuilder) { | 345 fb.Offset finish(fb.Builder fbBuilder) { |
| 184 assert(!_finished); | 346 assert(!_finished); |
| 185 _finished = true; | 347 _finished = true; |
| 186 fbBuilder.startTable(); | 348 fbBuilder.startTable(); |
| 187 if (_length != null && _length != 0) { | 349 if (_length != null && _length != 0) { |
| 188 fbBuilder.addUint32(1, _length); | 350 fbBuilder.addUint32(1, _length); |
| 189 } | 351 } |
| 190 if (_offset != null && _offset != 0) { | 352 if (_offset != null && _offset != 0) { |
| 191 fbBuilder.addUint32(0, _offset); | 353 fbBuilder.addUint32(0, _offset); |
| 192 } | 354 } |
| 193 return fbBuilder.endTable(); | 355 return fbBuilder.endTable(); |
| 194 } | 356 } |
| 357 } |
| 195 | 358 |
| 196 /** | 359 class _CodeRangeReader extends fb.TableReader<_CodeRangeImpl> { |
| 197 * Flush [informative] data recursively. | 360 const _CodeRangeReader(); |
| 198 */ | 361 |
| 199 void flushInformative() { | 362 @override |
| 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; |
| 200 } | 378 } |
| 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()); |
| 201 } | 404 } |
| 202 | 405 |
| 203 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity
Ref { | 406 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity
Ref { |
| 204 bool _finished = false; | 407 bool _finished = false; |
| 205 | 408 |
| 206 List<int> _implicitFunctionTypeIndices; | 409 List<int> _implicitFunctionTypeIndices; |
| 207 int _paramReference; | 410 int _paramReference; |
| 208 int _reference; | 411 int _reference; |
| 209 int _slot; | 412 int _slot; |
| 210 List<UnlinkedParamBuilder> _syntheticParams; | 413 List<UnlinkedParamBuilder> _syntheticParams; |
| 211 EntityRefBuilder _syntheticReturnType; | 414 EntityRefBuilder _syntheticReturnType; |
| 212 List<EntityRefBuilder> _typeArguments; | 415 List<EntityRefBuilder> _typeArguments; |
| 213 | 416 |
| 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 | |
| 223 @override | 417 @override |
| 224 List<int> get implicitFunctionTypeIndices => _implicitFunctionTypeIndices ??=
<int>[]; | 418 List<int> get implicitFunctionTypeIndices => _implicitFunctionTypeIndices ??=
<int>[]; |
| 225 | 419 |
| 226 /** | 420 /** |
| 227 * If this is a reference to a function type implicitly defined by a | 421 * If this is a reference to a function type implicitly defined by a |
| 228 * function-typed parameter, a list of zero-based indices indicating the path | 422 * function-typed parameter, a list of zero-based indices indicating the path |
| 229 * from the entity referred to by [reference] to the appropriate type | 423 * from the entity referred to by [reference] to the appropriate type |
| 230 * parameter. Otherwise the empty list. | 424 * parameter. Otherwise the empty list. |
| 231 * | 425 * |
| 232 * If there are N indices in this list, then the entity being referred to is | 426 * 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 Loading... |
| 342 /** | 536 /** |
| 343 * If this is an instantiation of a generic type or generic executable, the | 537 * If this is an instantiation of a generic type or generic executable, the |
| 344 * type arguments used to instantiate it. Trailing type arguments of type | 538 * type arguments used to instantiate it. Trailing type arguments of type |
| 345 * `dynamic` are omitted. | 539 * `dynamic` are omitted. |
| 346 */ | 540 */ |
| 347 void set typeArguments(List<EntityRefBuilder> _value) { | 541 void set typeArguments(List<EntityRefBuilder> _value) { |
| 348 assert(!_finished); | 542 assert(!_finished); |
| 349 _typeArguments = _value; | 543 _typeArguments = _value; |
| 350 } | 544 } |
| 351 | 545 |
| 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 |
| 352 fb.Offset finish(fb.Builder fbBuilder) { | 564 fb.Offset finish(fb.Builder fbBuilder) { |
| 353 assert(!_finished); | 565 assert(!_finished); |
| 354 _finished = true; | 566 _finished = true; |
| 355 fb.Offset offset_implicitFunctionTypeIndices; | 567 fb.Offset offset_implicitFunctionTypeIndices; |
| 356 fb.Offset offset_syntheticParams; | 568 fb.Offset offset_syntheticParams; |
| 357 fb.Offset offset_syntheticReturnType; | 569 fb.Offset offset_syntheticReturnType; |
| 358 fb.Offset offset_typeArguments; | 570 fb.Offset offset_typeArguments; |
| 359 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i
sEmpty)) { | 571 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i
sEmpty)) { |
| 360 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu
nctionTypeIndices); | 572 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu
nctionTypeIndices); |
| 361 } | 573 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 385 fbBuilder.addOffset(6, offset_syntheticParams); | 597 fbBuilder.addOffset(6, offset_syntheticParams); |
| 386 } | 598 } |
| 387 if (offset_syntheticReturnType != null) { | 599 if (offset_syntheticReturnType != null) { |
| 388 fbBuilder.addOffset(5, offset_syntheticReturnType); | 600 fbBuilder.addOffset(5, offset_syntheticReturnType); |
| 389 } | 601 } |
| 390 if (offset_typeArguments != null) { | 602 if (offset_typeArguments != null) { |
| 391 fbBuilder.addOffset(1, offset_typeArguments); | 603 fbBuilder.addOffset(1, offset_typeArguments); |
| 392 } | 604 } |
| 393 return fbBuilder.endTable(); | 605 return fbBuilder.endTable(); |
| 394 } | 606 } |
| 607 } |
| 395 | 608 |
| 396 /** | 609 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> { |
| 397 * Flush [informative] data recursively. | 610 const _EntityRefReader(); |
| 398 */ | 611 |
| 399 void flushInformative() { | 612 @override |
| 400 _syntheticParams?.forEach((b) => b.flushInformative()); | 613 _EntityRefImpl createObject(fb.BufferPointer bp) => new _EntityRefImpl(bp); |
| 401 _syntheticReturnType?.flushInformative(); | 614 } |
| 402 _typeArguments?.forEach((b) => b.flushInformative()); | 615 |
| 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; |
| 403 } | 669 } |
| 404 } | 670 } |
| 405 | 671 |
| 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 |
| 406 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme
nts idl.LinkedDependency { | 701 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme
nts idl.LinkedDependency { |
| 407 bool _finished = false; | 702 bool _finished = false; |
| 408 | 703 |
| 409 List<String> _parts; | 704 List<String> _parts; |
| 410 String _uri; | 705 String _uri; |
| 411 | 706 |
| 412 LinkedDependencyBuilder({List<String> parts, String uri}) | |
| 413 : _parts = parts, | |
| 414 _uri = uri; | |
| 415 | |
| 416 @override | 707 @override |
| 417 List<String> get parts => _parts ??= <String>[]; | 708 List<String> get parts => _parts ??= <String>[]; |
| 418 | 709 |
| 419 /** | 710 /** |
| 420 * URI for the compilation units listed in the library's `part` declarations. | 711 * URI for the compilation units listed in the library's `part` declarations. |
| 421 * These URIs are relative to the importing library. | 712 * These URIs are relative to the importing library. |
| 422 */ | 713 */ |
| 423 void set parts(List<String> _value) { | 714 void set parts(List<String> _value) { |
| 424 assert(!_finished); | 715 assert(!_finished); |
| 425 _parts = _value; | 716 _parts = _value; |
| 426 } | 717 } |
| 427 | 718 |
| 428 @override | 719 @override |
| 429 String get uri => _uri ??= ''; | 720 String get uri => _uri ??= ''; |
| 430 | 721 |
| 431 /** | 722 /** |
| 432 * The relative URI of the dependent library. This URI is relative to the | 723 * The relative URI of the dependent library. This URI is relative to the |
| 433 * importing library, even if there are intervening `export` declarations. | 724 * importing library, even if there are intervening `export` declarations. |
| 434 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports | 725 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports |
| 435 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be | 726 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be |
| 436 * `b/d/e.dart`. | 727 * `b/d/e.dart`. |
| 437 */ | 728 */ |
| 438 void set uri(String _value) { | 729 void set uri(String _value) { |
| 439 assert(!_finished); | 730 assert(!_finished); |
| 440 _uri = _value; | 731 _uri = _value; |
| 441 } | 732 } |
| 442 | 733 |
| 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 |
| 443 fb.Offset finish(fb.Builder fbBuilder) { | 744 fb.Offset finish(fb.Builder fbBuilder) { |
| 444 assert(!_finished); | 745 assert(!_finished); |
| 445 _finished = true; | 746 _finished = true; |
| 446 fb.Offset offset_parts; | 747 fb.Offset offset_parts; |
| 447 fb.Offset offset_uri; | 748 fb.Offset offset_uri; |
| 448 if (!(_parts == null || _parts.isEmpty)) { | 749 if (!(_parts == null || _parts.isEmpty)) { |
| 449 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); | 750 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); |
| 450 } | 751 } |
| 451 if (_uri != null) { | 752 if (_uri != null) { |
| 452 offset_uri = fbBuilder.writeString(_uri); | 753 offset_uri = fbBuilder.writeString(_uri); |
| 453 } | 754 } |
| 454 fbBuilder.startTable(); | 755 fbBuilder.startTable(); |
| 455 if (offset_parts != null) { | 756 if (offset_parts != null) { |
| 456 fbBuilder.addOffset(1, offset_parts); | 757 fbBuilder.addOffset(1, offset_parts); |
| 457 } | 758 } |
| 458 if (offset_uri != null) { | 759 if (offset_uri != null) { |
| 459 fbBuilder.addOffset(0, offset_uri); | 760 fbBuilder.addOffset(0, offset_uri); |
| 460 } | 761 } |
| 461 return fbBuilder.endTable(); | 762 return fbBuilder.endTable(); |
| 462 } | 763 } |
| 764 } |
| 463 | 765 |
| 464 /** | 766 class _LinkedDependencyReader extends fb.TableReader<_LinkedDependencyImpl> { |
| 465 * Flush [informative] data recursively. | 767 const _LinkedDependencyReader(); |
| 466 */ | 768 |
| 467 void flushInformative() { | 769 @override |
| 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; |
| 468 } | 791 } |
| 469 } | 792 } |
| 470 | 793 |
| 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 |
| 471 class LinkedExportNameBuilder extends Object with _LinkedExportNameMixin impleme
nts idl.LinkedExportName { | 813 class LinkedExportNameBuilder extends Object with _LinkedExportNameMixin impleme
nts idl.LinkedExportName { |
| 472 bool _finished = false; | 814 bool _finished = false; |
| 473 | 815 |
| 474 int _dependency; | 816 int _dependency; |
| 475 idl.ReferenceKind _kind; | 817 idl.ReferenceKind _kind; |
| 476 String _name; | 818 String _name; |
| 477 int _unit; | 819 int _unit; |
| 478 | 820 |
| 479 LinkedExportNameBuilder({int dependency, idl.ReferenceKind kind, String name,
int unit}) | |
| 480 : _dependency = dependency, | |
| 481 _kind = kind, | |
| 482 _name = name, | |
| 483 _unit = unit; | |
| 484 | |
| 485 @override | 821 @override |
| 486 int get dependency => _dependency ??= 0; | 822 int get dependency => _dependency ??= 0; |
| 487 | 823 |
| 488 /** | 824 /** |
| 489 * Index into [LinkedLibrary.dependencies] for the library in which the | 825 * Index into [LinkedLibrary.dependencies] for the library in which the |
| 490 * entity is defined. | 826 * entity is defined. |
| 491 */ | 827 */ |
| 492 void set dependency(int _value) { | 828 void set dependency(int _value) { |
| 493 assert(!_finished); | 829 assert(!_finished); |
| 494 assert(_value == null || _value >= 0); | 830 assert(_value == null || _value >= 0); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 * definition of the entity. As with indices into [LinkedLibrary.units], | 862 * definition of the entity. As with indices into [LinkedLibrary.units], |
| 527 * zero represents the defining compilation unit, and nonzero values | 863 * zero represents the defining compilation unit, and nonzero values |
| 528 * represent parts in the order of the corresponding `part` declarations. | 864 * represent parts in the order of the corresponding `part` declarations. |
| 529 */ | 865 */ |
| 530 void set unit(int _value) { | 866 void set unit(int _value) { |
| 531 assert(!_finished); | 867 assert(!_finished); |
| 532 assert(_value == null || _value >= 0); | 868 assert(_value == null || _value >= 0); |
| 533 _unit = _value; | 869 _unit = _value; |
| 534 } | 870 } |
| 535 | 871 |
| 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 |
| 536 fb.Offset finish(fb.Builder fbBuilder) { | 884 fb.Offset finish(fb.Builder fbBuilder) { |
| 537 assert(!_finished); | 885 assert(!_finished); |
| 538 _finished = true; | 886 _finished = true; |
| 539 fb.Offset offset_name; | 887 fb.Offset offset_name; |
| 540 if (_name != null) { | 888 if (_name != null) { |
| 541 offset_name = fbBuilder.writeString(_name); | 889 offset_name = fbBuilder.writeString(_name); |
| 542 } | 890 } |
| 543 fbBuilder.startTable(); | 891 fbBuilder.startTable(); |
| 544 if (_dependency != null && _dependency != 0) { | 892 if (_dependency != null && _dependency != 0) { |
| 545 fbBuilder.addUint32(0, _dependency); | 893 fbBuilder.addUint32(0, _dependency); |
| 546 } | 894 } |
| 547 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { | 895 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { |
| 548 fbBuilder.addUint8(3, _kind.index); | 896 fbBuilder.addUint8(3, _kind.index); |
| 549 } | 897 } |
| 550 if (offset_name != null) { | 898 if (offset_name != null) { |
| 551 fbBuilder.addOffset(1, offset_name); | 899 fbBuilder.addOffset(1, offset_name); |
| 552 } | 900 } |
| 553 if (_unit != null && _unit != 0) { | 901 if (_unit != null && _unit != 0) { |
| 554 fbBuilder.addUint32(2, _unit); | 902 fbBuilder.addUint32(2, _unit); |
| 555 } | 903 } |
| 556 return fbBuilder.endTable(); | 904 return fbBuilder.endTable(); |
| 557 } | 905 } |
| 906 } |
| 558 | 907 |
| 559 /** | 908 class _LinkedExportNameReader extends fb.TableReader<_LinkedExportNameImpl> { |
| 560 * Flush [informative] data recursively. | 909 const _LinkedExportNameReader(); |
| 561 */ | 910 |
| 562 void flushInformative() { | 911 @override |
| 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; |
| 563 } | 929 } |
| 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()); |
| 564 } | 971 } |
| 565 | 972 |
| 566 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id
l.LinkedLibrary { | 973 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id
l.LinkedLibrary { |
| 567 bool _finished = false; | 974 bool _finished = false; |
| 568 | 975 |
| 569 List<LinkedDependencyBuilder> _dependencies; | 976 List<LinkedDependencyBuilder> _dependencies; |
| 570 List<LinkedExportNameBuilder> _exportNames; | 977 List<LinkedExportNameBuilder> _exportNames; |
| 571 bool _fallbackMode; | 978 bool _fallbackMode; |
| 572 List<int> _importDependencies; | 979 List<int> _importDependencies; |
| 573 int _numPrelinkedDependencies; | 980 int _numPrelinkedDependencies; |
| 574 List<LinkedUnitBuilder> _units; | 981 List<LinkedUnitBuilder> _units; |
| 575 | 982 |
| 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 | |
| 584 @override | 983 @override |
| 585 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep
endencyBuilder>[]; | 984 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep
endencyBuilder>[]; |
| 586 | 985 |
| 587 /** | 986 /** |
| 588 * The libraries that this library depends on (either via an explicit import | 987 * The libraries that this library depends on (either via an explicit import |
| 589 * statement or via the implicit dependencies on `dart:core` and | 988 * statement or via the implicit dependencies on `dart:core` and |
| 590 * `dart:async`). The first element of this array is a pseudo-dependency | 989 * `dart:async`). The first element of this array is a pseudo-dependency |
| 591 * representing the library itself (it is also used for `dynamic` and | 990 * representing the library itself (it is also used for `dynamic` and |
| 592 * `void`). This is followed by elements representing "prelinked" | 991 * `void`). This is followed by elements representing "prelinked" |
| 593 * dependencies (direct imports and the transitive closure of exports). | 992 * dependencies (direct imports and the transitive closure of exports). |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 * The linked summary of all the compilation units constituting the | 1065 * The linked summary of all the compilation units constituting the |
| 667 * library. The summary of the defining compilation unit is listed first, | 1066 * library. The summary of the defining compilation unit is listed first, |
| 668 * followed by the summary of each part, in the order of the `part` | 1067 * followed by the summary of each part, in the order of the `part` |
| 669 * declarations in the defining compilation unit. | 1068 * declarations in the defining compilation unit. |
| 670 */ | 1069 */ |
| 671 void set units(List<LinkedUnitBuilder> _value) { | 1070 void set units(List<LinkedUnitBuilder> _value) { |
| 672 assert(!_finished); | 1071 assert(!_finished); |
| 673 _units = _value; | 1072 _units = _value; |
| 674 } | 1073 } |
| 675 | 1074 |
| 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 |
| 676 fb.Offset finish(fb.Builder fbBuilder) { | 1097 fb.Offset finish(fb.Builder fbBuilder) { |
| 677 assert(!_finished); | 1098 assert(!_finished); |
| 678 _finished = true; | 1099 _finished = true; |
| 679 fb.Offset offset_dependencies; | 1100 fb.Offset offset_dependencies; |
| 680 fb.Offset offset_exportNames; | 1101 fb.Offset offset_exportNames; |
| 681 fb.Offset offset_importDependencies; | 1102 fb.Offset offset_importDependencies; |
| 682 fb.Offset offset_units; | 1103 fb.Offset offset_units; |
| 683 if (!(_dependencies == null || _dependencies.isEmpty)) { | 1104 if (!(_dependencies == null || _dependencies.isEmpty)) { |
| 684 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis
h(fbBuilder)).toList()); | 1105 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis
h(fbBuilder)).toList()); |
| 685 } | 1106 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 706 fbBuilder.addOffset(1, offset_importDependencies); | 1127 fbBuilder.addOffset(1, offset_importDependencies); |
| 707 } | 1128 } |
| 708 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) { | 1129 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) { |
| 709 fbBuilder.addUint32(2, _numPrelinkedDependencies); | 1130 fbBuilder.addUint32(2, _numPrelinkedDependencies); |
| 710 } | 1131 } |
| 711 if (offset_units != null) { | 1132 if (offset_units != null) { |
| 712 fbBuilder.addOffset(3, offset_units); | 1133 fbBuilder.addOffset(3, offset_units); |
| 713 } | 1134 } |
| 714 return fbBuilder.endTable(); | 1135 return fbBuilder.endTable(); |
| 715 } | 1136 } |
| 1137 } |
| 716 | 1138 |
| 717 /** | 1139 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) { |
| 718 * Flush [informative] data recursively. | 1140 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 719 */ | 1141 return const _LinkedLibraryReader().read(rootRef); |
| 720 void flushInformative() { | 1142 } |
| 721 _dependencies?.forEach((b) => b.flushInformative()); | 1143 |
| 722 _exportNames?.forEach((b) => b.flushInformative()); | 1144 class _LinkedLibraryReader extends fb.TableReader<_LinkedLibraryImpl> { |
| 723 _units?.forEach((b) => b.flushInformative()); | 1145 const _LinkedLibraryReader(); |
| 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; |
| 724 } | 1167 } |
| 725 | 1168 |
| 726 List<int> toBuffer() { | 1169 @override |
| 727 fb.Builder fbBuilder = new fb.Builder(); | 1170 List<idl.LinkedExportName> get exportNames { |
| 728 return fbBuilder.finish(finish(fbBuilder), "LLib"); | 1171 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo
rtNameReader()).vTableGet(_bp, 4, const <idl.LinkedExportName>[]); |
| 1172 return _exportNames; |
| 729 } | 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 } |
| 1198 } |
| 1199 |
| 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()); |
| 730 } | 1225 } |
| 731 | 1226 |
| 732 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement
s idl.LinkedReference { | 1227 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement
s idl.LinkedReference { |
| 733 bool _finished = false; | 1228 bool _finished = false; |
| 734 | 1229 |
| 735 int _containingReference; | 1230 int _containingReference; |
| 736 int _dependency; | 1231 int _dependency; |
| 737 idl.ReferenceKind _kind; | 1232 idl.ReferenceKind _kind; |
| 738 int _localIndex; | 1233 int _localIndex; |
| 739 String _name; | 1234 String _name; |
| 740 int _numTypeParameters; | 1235 int _numTypeParameters; |
| 741 int _unit; | 1236 int _unit; |
| 742 | 1237 |
| 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 | |
| 752 @override | 1238 @override |
| 753 int get containingReference => _containingReference ??= 0; | 1239 int get containingReference => _containingReference ??= 0; |
| 754 | 1240 |
| 755 /** | 1241 /** |
| 756 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], | 1242 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], |
| 757 * and the entity being referred to is contained within another entity, index | 1243 * and the entity being referred to is contained within another entity, index |
| 758 * of the containing entity. This behaves similarly to | 1244 * of the containing entity. This behaves similarly to |
| 759 * [UnlinkedReference.prefixReference], however it is only used for class | 1245 * [UnlinkedReference.prefixReference], however it is only used for class |
| 760 * members, not for prefixed imports. | 1246 * members, not for prefixed imports. |
| 761 * | 1247 * |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 * | 1337 * |
| 852 * Zero if this entity is contained within another entity (e.g. a class | 1338 * Zero if this entity is contained within another entity (e.g. a class |
| 853 * member). | 1339 * member). |
| 854 */ | 1340 */ |
| 855 void set unit(int _value) { | 1341 void set unit(int _value) { |
| 856 assert(!_finished); | 1342 assert(!_finished); |
| 857 assert(_value == null || _value >= 0); | 1343 assert(_value == null || _value >= 0); |
| 858 _unit = _value; | 1344 _unit = _value; |
| 859 } | 1345 } |
| 860 | 1346 |
| 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 |
| 861 fb.Offset finish(fb.Builder fbBuilder) { | 1362 fb.Offset finish(fb.Builder fbBuilder) { |
| 862 assert(!_finished); | 1363 assert(!_finished); |
| 863 _finished = true; | 1364 _finished = true; |
| 864 fb.Offset offset_name; | 1365 fb.Offset offset_name; |
| 865 if (_name != null) { | 1366 if (_name != null) { |
| 866 offset_name = fbBuilder.writeString(_name); | 1367 offset_name = fbBuilder.writeString(_name); |
| 867 } | 1368 } |
| 868 fbBuilder.startTable(); | 1369 fbBuilder.startTable(); |
| 869 if (_containingReference != null && _containingReference != 0) { | 1370 if (_containingReference != null && _containingReference != 0) { |
| 870 fbBuilder.addUint32(5, _containingReference); | 1371 fbBuilder.addUint32(5, _containingReference); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 882 fbBuilder.addOffset(3, offset_name); | 1383 fbBuilder.addOffset(3, offset_name); |
| 883 } | 1384 } |
| 884 if (_numTypeParameters != null && _numTypeParameters != 0) { | 1385 if (_numTypeParameters != null && _numTypeParameters != 0) { |
| 885 fbBuilder.addUint32(4, _numTypeParameters); | 1386 fbBuilder.addUint32(4, _numTypeParameters); |
| 886 } | 1387 } |
| 887 if (_unit != null && _unit != 0) { | 1388 if (_unit != null && _unit != 0) { |
| 888 fbBuilder.addUint32(0, _unit); | 1389 fbBuilder.addUint32(0, _unit); |
| 889 } | 1390 } |
| 890 return fbBuilder.endTable(); | 1391 return fbBuilder.endTable(); |
| 891 } | 1392 } |
| 1393 } |
| 892 | 1394 |
| 893 /** | 1395 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { |
| 894 * Flush [informative] data recursively. | 1396 const _LinkedReferenceReader(); |
| 895 */ | 1397 |
| 896 void flushInformative() { | 1398 @override |
| 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; |
| 897 } | 1419 } |
| 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()); |
| 898 } | 1485 } |
| 899 | 1486 |
| 900 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { | 1487 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { |
| 901 bool _finished = false; | 1488 bool _finished = false; |
| 902 | 1489 |
| 903 List<int> _constCycles; | 1490 List<int> _constCycles; |
| 904 List<LinkedReferenceBuilder> _references; | 1491 List<LinkedReferenceBuilder> _references; |
| 905 List<EntityRefBuilder> _types; | 1492 List<EntityRefBuilder> _types; |
| 906 | 1493 |
| 907 LinkedUnitBuilder({List<int> constCycles, List<LinkedReferenceBuilder> referen
ces, List<EntityRefBuilder> types}) | |
| 908 : _constCycles = constCycles, | |
| 909 _references = references, | |
| 910 _types = types; | |
| 911 | |
| 912 @override | 1494 @override |
| 913 List<int> get constCycles => _constCycles ??= <int>[]; | 1495 List<int> get constCycles => _constCycles ??= <int>[]; |
| 914 | 1496 |
| 915 /** | 1497 /** |
| 916 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) | 1498 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) |
| 917 * corresponding to const constructors that are part of cycles. | 1499 * corresponding to const constructors that are part of cycles. |
| 918 */ | 1500 */ |
| 919 void set constCycles(List<int> _value) { | 1501 void set constCycles(List<int> _value) { |
| 920 assert(!_finished); | 1502 assert(!_finished); |
| 921 assert(_value == null || _value.every((e) => e >= 0)); | 1503 assert(_value == null || _value.every((e) => e >= 0)); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 943 | 1525 |
| 944 /** | 1526 /** |
| 945 * List associating slot ids found inside the unlinked summary for the | 1527 * List associating slot ids found inside the unlinked summary for the |
| 946 * compilation unit with propagated and inferred types. | 1528 * compilation unit with propagated and inferred types. |
| 947 */ | 1529 */ |
| 948 void set types(List<EntityRefBuilder> _value) { | 1530 void set types(List<EntityRefBuilder> _value) { |
| 949 assert(!_finished); | 1531 assert(!_finished); |
| 950 _types = _value; | 1532 _types = _value; |
| 951 } | 1533 } |
| 952 | 1534 |
| 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 |
| 953 fb.Offset finish(fb.Builder fbBuilder) { | 1548 fb.Offset finish(fb.Builder fbBuilder) { |
| 954 assert(!_finished); | 1549 assert(!_finished); |
| 955 _finished = true; | 1550 _finished = true; |
| 956 fb.Offset offset_constCycles; | 1551 fb.Offset offset_constCycles; |
| 957 fb.Offset offset_references; | 1552 fb.Offset offset_references; |
| 958 fb.Offset offset_types; | 1553 fb.Offset offset_types; |
| 959 if (!(_constCycles == null || _constCycles.isEmpty)) { | 1554 if (!(_constCycles == null || _constCycles.isEmpty)) { |
| 960 offset_constCycles = fbBuilder.writeListUint32(_constCycles); | 1555 offset_constCycles = fbBuilder.writeListUint32(_constCycles); |
| 961 } | 1556 } |
| 962 if (!(_references == null || _references.isEmpty)) { | 1557 if (!(_references == null || _references.isEmpty)) { |
| 963 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 1558 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); |
| 964 } | 1559 } |
| 965 if (!(_types == null || _types.isEmpty)) { | 1560 if (!(_types == null || _types.isEmpty)) { |
| 966 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).
toList()); | 1561 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).
toList()); |
| 967 } | 1562 } |
| 968 fbBuilder.startTable(); | 1563 fbBuilder.startTable(); |
| 969 if (offset_constCycles != null) { | 1564 if (offset_constCycles != null) { |
| 970 fbBuilder.addOffset(2, offset_constCycles); | 1565 fbBuilder.addOffset(2, offset_constCycles); |
| 971 } | 1566 } |
| 972 if (offset_references != null) { | 1567 if (offset_references != null) { |
| 973 fbBuilder.addOffset(0, offset_references); | 1568 fbBuilder.addOffset(0, offset_references); |
| 974 } | 1569 } |
| 975 if (offset_types != null) { | 1570 if (offset_types != null) { |
| 976 fbBuilder.addOffset(1, offset_types); | 1571 fbBuilder.addOffset(1, offset_types); |
| 977 } | 1572 } |
| 978 return fbBuilder.endTable(); | 1573 return fbBuilder.endTable(); |
| 979 } | 1574 } |
| 1575 } |
| 980 | 1576 |
| 981 /** | 1577 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { |
| 982 * Flush [informative] data recursively. | 1578 const _LinkedUnitReader(); |
| 983 */ | 1579 |
| 984 void flushInformative() { | 1580 @override |
| 985 _references?.forEach((b) => b.flushInformative()); | 1581 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); |
| 986 _types?.forEach((b) => b.flushInformative()); | 1582 } |
| 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; |
| 987 } | 1609 } |
| 988 } | 1610 } |
| 989 | 1611 |
| 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 |
| 990 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { | 1633 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { |
| 991 bool _finished = false; | 1634 bool _finished = false; |
| 992 | 1635 |
| 993 List<LinkedLibraryBuilder> _linkedLibraries; | 1636 List<LinkedLibraryBuilder> _linkedLibraries; |
| 994 List<String> _linkedLibraryUris; | 1637 List<String> _linkedLibraryUris; |
| 995 int _majorVersion; | 1638 int _majorVersion; |
| 996 int _minorVersion; | 1639 int _minorVersion; |
| 997 List<String> _unlinkedUnitHashes; | 1640 List<String> _unlinkedUnitHashes; |
| 998 List<UnlinkedUnitBuilder> _unlinkedUnits; | 1641 List<UnlinkedUnitBuilder> _unlinkedUnits; |
| 999 List<String> _unlinkedUnitUris; | 1642 List<String> _unlinkedUnitUris; |
| 1000 | 1643 |
| 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 | |
| 1010 @override | 1644 @override |
| 1011 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked
LibraryBuilder>[]; | 1645 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked
LibraryBuilder>[]; |
| 1012 | 1646 |
| 1013 /** | 1647 /** |
| 1014 * Linked libraries. | 1648 * Linked libraries. |
| 1015 */ | 1649 */ |
| 1016 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { | 1650 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { |
| 1017 assert(!_finished); | 1651 assert(!_finished); |
| 1018 _linkedLibraries = _value; | 1652 _linkedLibraries = _value; |
| 1019 } | 1653 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; | 1717 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; |
| 1084 | 1718 |
| 1085 /** | 1719 /** |
| 1086 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. | 1720 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. |
| 1087 */ | 1721 */ |
| 1088 void set unlinkedUnitUris(List<String> _value) { | 1722 void set unlinkedUnitUris(List<String> _value) { |
| 1089 assert(!_finished); | 1723 assert(!_finished); |
| 1090 _unlinkedUnitUris = _value; | 1724 _unlinkedUnitUris = _value; |
| 1091 } | 1725 } |
| 1092 | 1726 |
| 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 |
| 1093 fb.Offset finish(fb.Builder fbBuilder) { | 1749 fb.Offset finish(fb.Builder fbBuilder) { |
| 1094 assert(!_finished); | 1750 assert(!_finished); |
| 1095 _finished = true; | 1751 _finished = true; |
| 1096 fb.Offset offset_linkedLibraries; | 1752 fb.Offset offset_linkedLibraries; |
| 1097 fb.Offset offset_linkedLibraryUris; | 1753 fb.Offset offset_linkedLibraryUris; |
| 1098 fb.Offset offset_unlinkedUnitHashes; | 1754 fb.Offset offset_unlinkedUnitHashes; |
| 1099 fb.Offset offset_unlinkedUnits; | 1755 fb.Offset offset_unlinkedUnits; |
| 1100 fb.Offset offset_unlinkedUnitUris; | 1756 fb.Offset offset_unlinkedUnitUris; |
| 1101 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { | 1757 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { |
| 1102 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b
.finish(fbBuilder)).toList()); | 1758 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b
.finish(fbBuilder)).toList()); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1130 fbBuilder.addOffset(4, offset_unlinkedUnitHashes); | 1786 fbBuilder.addOffset(4, offset_unlinkedUnitHashes); |
| 1131 } | 1787 } |
| 1132 if (offset_unlinkedUnits != null) { | 1788 if (offset_unlinkedUnits != null) { |
| 1133 fbBuilder.addOffset(2, offset_unlinkedUnits); | 1789 fbBuilder.addOffset(2, offset_unlinkedUnits); |
| 1134 } | 1790 } |
| 1135 if (offset_unlinkedUnitUris != null) { | 1791 if (offset_unlinkedUnitUris != null) { |
| 1136 fbBuilder.addOffset(3, offset_unlinkedUnitUris); | 1792 fbBuilder.addOffset(3, offset_unlinkedUnitUris); |
| 1137 } | 1793 } |
| 1138 return fbBuilder.endTable(); | 1794 return fbBuilder.endTable(); |
| 1139 } | 1795 } |
| 1796 } |
| 1140 | 1797 |
| 1141 /** | 1798 idl.PackageBundle readPackageBundle(List<int> buffer) { |
| 1142 * Flush [informative] data recursively. | 1799 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 1143 */ | 1800 return const _PackageBundleReader().read(rootRef); |
| 1144 void flushInformative() { | 1801 } |
| 1145 _linkedLibraries?.forEach((b) => b.flushInformative()); | 1802 |
| 1146 _unlinkedUnits?.forEach((b) => b.flushInformative()); | 1803 class _PackageBundleReader extends fb.TableReader<_PackageBundleImpl> { |
| 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; |
| 1147 } | 1827 } |
| 1148 | 1828 |
| 1149 List<int> toBuffer() { | 1829 @override |
| 1150 fb.Builder fbBuilder = new fb.Builder(); | 1830 List<String> get linkedLibraryUris { |
| 1151 return fbBuilder.finish(finish(fbBuilder), "PBdl"); | 1831 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()).
vTableGet(_bp, 1, const <String>[]); |
| 1832 return _linkedLibraryUris; |
| 1152 } | 1833 } |
| 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()); |
| 1153 } | 1893 } |
| 1154 | 1894 |
| 1155 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl.
PackageIndex { | 1895 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl.
PackageIndex { |
| 1156 bool _finished = false; | 1896 bool _finished = false; |
| 1157 | 1897 |
| 1158 List<idl.IndexSyntheticElementKind> _elementKinds; | 1898 List<idl.IndexSyntheticElementKind> _elementKinds; |
| 1159 List<int> _elementOffsets; | 1899 List<int> _elementOffsets; |
| 1160 List<int> _elementUnits; | 1900 List<int> _elementUnits; |
| 1161 List<String> _strings; | 1901 List<String> _strings; |
| 1162 List<int> _unitLibraryUris; | 1902 List<int> _unitLibraryUris; |
| 1163 List<UnitIndexBuilder> _units; | 1903 List<UnitIndexBuilder> _units; |
| 1164 List<int> _unitUnitUris; | 1904 List<int> _unitUnitUris; |
| 1165 | 1905 |
| 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 | |
| 1175 @override | 1906 @override |
| 1176 List<idl.IndexSyntheticElementKind> get elementKinds => _elementKinds ??= <idl
.IndexSyntheticElementKind>[]; | 1907 List<idl.IndexSyntheticElementKind> get elementKinds => _elementKinds ??= <idl
.IndexSyntheticElementKind>[]; |
| 1177 | 1908 |
| 1178 /** | 1909 /** |
| 1179 * Each item of this list corresponds to a unique referenced element. It is | 1910 * Each item of this list corresponds to a unique referenced element. It is |
| 1180 * the kind of the synthetic element. | 1911 * the kind of the synthetic element. |
| 1181 */ | 1912 */ |
| 1182 void set elementKinds(List<idl.IndexSyntheticElementKind> _value) { | 1913 void set elementKinds(List<idl.IndexSyntheticElementKind> _value) { |
| 1183 assert(!_finished); | 1914 assert(!_finished); |
| 1184 _elementKinds = _value; | 1915 _elementKinds = _value; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 * Each item of this list corresponds to the unit URI of a unique library | 1989 * Each item of this list corresponds to the unit URI of a unique library |
| 1259 * specific unit referenced in the [PackageIndex]. It is an index into | 1990 * specific unit referenced in the [PackageIndex]. It is an index into |
| 1260 * [strings] list. | 1991 * [strings] list. |
| 1261 */ | 1992 */ |
| 1262 void set unitUnitUris(List<int> _value) { | 1993 void set unitUnitUris(List<int> _value) { |
| 1263 assert(!_finished); | 1994 assert(!_finished); |
| 1264 assert(_value == null || _value.every((e) => e >= 0)); | 1995 assert(_value == null || _value.every((e) => e >= 0)); |
| 1265 _unitUnitUris = _value; | 1996 _unitUnitUris = _value; |
| 1266 } | 1997 } |
| 1267 | 1998 |
| 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 |
| 1268 fb.Offset finish(fb.Builder fbBuilder) { | 2020 fb.Offset finish(fb.Builder fbBuilder) { |
| 1269 assert(!_finished); | 2021 assert(!_finished); |
| 1270 _finished = true; | 2022 _finished = true; |
| 1271 fb.Offset offset_elementKinds; | 2023 fb.Offset offset_elementKinds; |
| 1272 fb.Offset offset_elementOffsets; | 2024 fb.Offset offset_elementOffsets; |
| 1273 fb.Offset offset_elementUnits; | 2025 fb.Offset offset_elementUnits; |
| 1274 fb.Offset offset_strings; | 2026 fb.Offset offset_strings; |
| 1275 fb.Offset offset_unitLibraryUris; | 2027 fb.Offset offset_unitLibraryUris; |
| 1276 fb.Offset offset_units; | 2028 fb.Offset offset_units; |
| 1277 fb.Offset offset_unitUnitUris; | 2029 fb.Offset offset_unitUnitUris; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 fbBuilder.addOffset(2, offset_unitLibraryUris); | 2065 fbBuilder.addOffset(2, offset_unitLibraryUris); |
| 1314 } | 2066 } |
| 1315 if (offset_units != null) { | 2067 if (offset_units != null) { |
| 1316 fbBuilder.addOffset(4, offset_units); | 2068 fbBuilder.addOffset(4, offset_units); |
| 1317 } | 2069 } |
| 1318 if (offset_unitUnitUris != null) { | 2070 if (offset_unitUnitUris != null) { |
| 1319 fbBuilder.addOffset(3, offset_unitUnitUris); | 2071 fbBuilder.addOffset(3, offset_unitUnitUris); |
| 1320 } | 2072 } |
| 1321 return fbBuilder.endTable(); | 2073 return fbBuilder.endTable(); |
| 1322 } | 2074 } |
| 2075 } |
| 1323 | 2076 |
| 1324 /** | 2077 idl.PackageIndex readPackageIndex(List<int> buffer) { |
| 1325 * Flush [informative] data recursively. | 2078 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 1326 */ | 2079 return const _PackageIndexReader().read(rootRef); |
| 1327 void flushInformative() { | 2080 } |
| 1328 _units?.forEach((b) => b.flushInformative()); | 2081 |
| 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; |
| 1329 } | 2106 } |
| 1330 | 2107 |
| 1331 List<int> toBuffer() { | 2108 @override |
| 1332 fb.Builder fbBuilder = new fb.Builder(); | 2109 List<int> get elementOffsets { |
| 1333 return fbBuilder.finish(finish(fbBuilder), "Indx"); | 2110 _elementOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int
>[]); |
| 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; |
| 1334 } | 2142 } |
| 1335 } | 2143 } |
| 1336 | 2144 |
| 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 |
| 1337 class UnitIndexBuilder extends Object with _UnitIndexMixin implements idl.UnitIn
dex { | 2174 class UnitIndexBuilder extends Object with _UnitIndexMixin implements idl.UnitIn
dex { |
| 1338 bool _finished = false; | 2175 bool _finished = false; |
| 1339 | 2176 |
| 1340 List<idl.IndexNameKind> _definedNameKinds; | 2177 List<idl.IndexNameKind> _definedNameKinds; |
| 1341 List<int> _definedNameOffsets; | 2178 List<int> _definedNameOffsets; |
| 1342 List<int> _definedNames; | 2179 List<int> _definedNames; |
| 1343 int _unit; | 2180 int _unit; |
| 1344 List<bool> _usedElementIsQualifiedFlags; | 2181 List<bool> _usedElementIsQualifiedFlags; |
| 1345 List<idl.IndexRelationKind> _usedElementKinds; | 2182 List<idl.IndexRelationKind> _usedElementKinds; |
| 1346 List<int> _usedElementLengths; | 2183 List<int> _usedElementLengths; |
| 1347 List<int> _usedElementOffsets; | 2184 List<int> _usedElementOffsets; |
| 1348 List<int> _usedElements; | 2185 List<int> _usedElements; |
| 1349 List<bool> _usedNameIsQualifiedFlags; | 2186 List<bool> _usedNameIsQualifiedFlags; |
| 1350 List<idl.IndexRelationKind> _usedNameKinds; | 2187 List<idl.IndexRelationKind> _usedNameKinds; |
| 1351 List<int> _usedNameOffsets; | 2188 List<int> _usedNameOffsets; |
| 1352 List<int> _usedNames; | 2189 List<int> _usedNames; |
| 1353 | 2190 |
| 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 | |
| 1369 @override | 2191 @override |
| 1370 List<idl.IndexNameKind> get definedNameKinds => _definedNameKinds ??= <idl.Ind
exNameKind>[]; | 2192 List<idl.IndexNameKind> get definedNameKinds => _definedNameKinds ??= <idl.Ind
exNameKind>[]; |
| 1371 | 2193 |
| 1372 /** | 2194 /** |
| 1373 * Each item of this list is the kind of an element defined in this unit. | 2195 * Each item of this list is the kind of an element defined in this unit. |
| 1374 */ | 2196 */ |
| 1375 void set definedNameKinds(List<idl.IndexNameKind> _value) { | 2197 void set definedNameKinds(List<idl.IndexNameKind> _value) { |
| 1376 assert(!_finished); | 2198 assert(!_finished); |
| 1377 _definedNameKinds = _value; | 2199 _definedNameKinds = _value; |
| 1378 } | 2200 } |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 * Each item of this list is the index into [PackageIndex.strings] for a | 2345 * Each item of this list is the index into [PackageIndex.strings] for a |
| 1524 * used name. The list is sorted in ascending order, so that the client can | 2346 * used name. The list is sorted in ascending order, so that the client can |
| 1525 * quickly find name uses in this [UnitIndex]. | 2347 * quickly find name uses in this [UnitIndex]. |
| 1526 */ | 2348 */ |
| 1527 void set usedNames(List<int> _value) { | 2349 void set usedNames(List<int> _value) { |
| 1528 assert(!_finished); | 2350 assert(!_finished); |
| 1529 assert(_value == null || _value.every((e) => e >= 0)); | 2351 assert(_value == null || _value.every((e) => e >= 0)); |
| 1530 _usedNames = _value; | 2352 _usedNames = _value; |
| 1531 } | 2353 } |
| 1532 | 2354 |
| 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 |
| 1533 fb.Offset finish(fb.Builder fbBuilder) { | 2376 fb.Offset finish(fb.Builder fbBuilder) { |
| 1534 assert(!_finished); | 2377 assert(!_finished); |
| 1535 _finished = true; | 2378 _finished = true; |
| 1536 fb.Offset offset_definedNameKinds; | 2379 fb.Offset offset_definedNameKinds; |
| 1537 fb.Offset offset_definedNameOffsets; | 2380 fb.Offset offset_definedNameOffsets; |
| 1538 fb.Offset offset_definedNames; | 2381 fb.Offset offset_definedNames; |
| 1539 fb.Offset offset_usedElementIsQualifiedFlags; | 2382 fb.Offset offset_usedElementIsQualifiedFlags; |
| 1540 fb.Offset offset_usedElementKinds; | 2383 fb.Offset offset_usedElementKinds; |
| 1541 fb.Offset offset_usedElementLengths; | 2384 fb.Offset offset_usedElementLengths; |
| 1542 fb.Offset offset_usedElementOffsets; | 2385 fb.Offset offset_usedElementOffsets; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 fbBuilder.addOffset(10, offset_usedNameKinds); | 2459 fbBuilder.addOffset(10, offset_usedNameKinds); |
| 1617 } | 2460 } |
| 1618 if (offset_usedNameOffsets != null) { | 2461 if (offset_usedNameOffsets != null) { |
| 1619 fbBuilder.addOffset(9, offset_usedNameOffsets); | 2462 fbBuilder.addOffset(9, offset_usedNameOffsets); |
| 1620 } | 2463 } |
| 1621 if (offset_usedNames != null) { | 2464 if (offset_usedNames != null) { |
| 1622 fbBuilder.addOffset(8, offset_usedNames); | 2465 fbBuilder.addOffset(8, offset_usedNames); |
| 1623 } | 2466 } |
| 1624 return fbBuilder.endTable(); | 2467 return fbBuilder.endTable(); |
| 1625 } | 2468 } |
| 2469 } |
| 1626 | 2470 |
| 1627 /** | 2471 class _UnitIndexReader extends fb.TableReader<_UnitIndexImpl> { |
| 1628 * Flush [informative] data recursively. | 2472 const _UnitIndexReader(); |
| 1629 */ | 2473 |
| 1630 void flushInformative() { | 2474 @override |
| 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; |
| 1631 } | 2501 } |
| 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()); |
| 1632 } | 2615 } |
| 1633 | 2616 |
| 1634 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { | 2617 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { |
| 1635 bool _finished = false; | 2618 bool _finished = false; |
| 1636 | 2619 |
| 1637 List<UnlinkedConstBuilder> _annotations; | 2620 List<UnlinkedConstBuilder> _annotations; |
| 1638 CodeRangeBuilder _codeRange; | 2621 CodeRangeBuilder _codeRange; |
| 1639 UnlinkedDocumentationCommentBuilder _documentationComment; | 2622 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 1640 List<UnlinkedExecutableBuilder> _executables; | 2623 List<UnlinkedExecutableBuilder> _executables; |
| 1641 List<UnlinkedVariableBuilder> _fields; | 2624 List<UnlinkedVariableBuilder> _fields; |
| 1642 bool _hasNoSupertype; | 2625 bool _hasNoSupertype; |
| 1643 List<EntityRefBuilder> _interfaces; | 2626 List<EntityRefBuilder> _interfaces; |
| 1644 bool _isAbstract; | 2627 bool _isAbstract; |
| 1645 bool _isMixinApplication; | 2628 bool _isMixinApplication; |
| 1646 List<EntityRefBuilder> _mixins; | 2629 List<EntityRefBuilder> _mixins; |
| 1647 String _name; | 2630 String _name; |
| 1648 int _nameOffset; | 2631 int _nameOffset; |
| 1649 EntityRefBuilder _supertype; | 2632 EntityRefBuilder _supertype; |
| 1650 List<UnlinkedTypeParamBuilder> _typeParameters; | 2633 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 1651 | 2634 |
| 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 | |
| 1668 @override | 2635 @override |
| 1669 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 2636 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 1670 | 2637 |
| 1671 /** | 2638 /** |
| 1672 * Annotations for this class. | 2639 * Annotations for this class. |
| 1673 */ | 2640 */ |
| 1674 void set annotations(List<UnlinkedConstBuilder> _value) { | 2641 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 1675 assert(!_finished); | 2642 assert(!_finished); |
| 1676 _annotations = _value; | 2643 _annotations = _value; |
| 1677 } | 2644 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 2784 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
| 1818 | 2785 |
| 1819 /** | 2786 /** |
| 1820 * Type parameters of the class, if any. | 2787 * Type parameters of the class, if any. |
| 1821 */ | 2788 */ |
| 1822 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 2789 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 1823 assert(!_finished); | 2790 assert(!_finished); |
| 1824 _typeParameters = _value; | 2791 _typeParameters = _value; |
| 1825 } | 2792 } |
| 1826 | 2793 |
| 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 |
| 1827 fb.Offset finish(fb.Builder fbBuilder) { | 2826 fb.Offset finish(fb.Builder fbBuilder) { |
| 1828 assert(!_finished); | 2827 assert(!_finished); |
| 1829 _finished = true; | 2828 _finished = true; |
| 1830 fb.Offset offset_annotations; | 2829 fb.Offset offset_annotations; |
| 1831 fb.Offset offset_codeRange; | 2830 fb.Offset offset_codeRange; |
| 1832 fb.Offset offset_documentationComment; | 2831 fb.Offset offset_documentationComment; |
| 1833 fb.Offset offset_executables; | 2832 fb.Offset offset_executables; |
| 1834 fb.Offset offset_fields; | 2833 fb.Offset offset_fields; |
| 1835 fb.Offset offset_interfaces; | 2834 fb.Offset offset_interfaces; |
| 1836 fb.Offset offset_mixins; | 2835 fb.Offset offset_mixins; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1905 fbBuilder.addUint32(1, _nameOffset); | 2904 fbBuilder.addUint32(1, _nameOffset); |
| 1906 } | 2905 } |
| 1907 if (offset_supertype != null) { | 2906 if (offset_supertype != null) { |
| 1908 fbBuilder.addOffset(3, offset_supertype); | 2907 fbBuilder.addOffset(3, offset_supertype); |
| 1909 } | 2908 } |
| 1910 if (offset_typeParameters != null) { | 2909 if (offset_typeParameters != null) { |
| 1911 fbBuilder.addOffset(9, offset_typeParameters); | 2910 fbBuilder.addOffset(9, offset_typeParameters); |
| 1912 } | 2911 } |
| 1913 return fbBuilder.endTable(); | 2912 return fbBuilder.endTable(); |
| 1914 } | 2913 } |
| 2914 } |
| 1915 | 2915 |
| 1916 /** | 2916 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> { |
| 1917 * Flush [informative] data recursively. | 2917 const _UnlinkedClassReader(); |
| 1918 */ | 2918 |
| 1919 void flushInformative() { | 2919 @override |
| 1920 _annotations?.forEach((b) => b.flushInformative()); | 2920 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl
(bp); |
| 1921 _codeRange = null; | 2921 } |
| 1922 _documentationComment = null; | 2922 |
| 1923 _executables?.forEach((b) => b.flushInformative()); | 2923 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { |
| 1924 _fields?.forEach((b) => b.flushInformative()); | 2924 final fb.BufferPointer _bp; |
| 1925 _interfaces?.forEach((b) => b.flushInformative()); | 2925 |
| 1926 _mixins?.forEach((b) => b.flushInformative()); | 2926 _UnlinkedClassImpl(this._bp); |
| 1927 _nameOffset = null; | 2927 |
| 1928 _supertype?.flushInformative(); | 2928 List<idl.UnlinkedConst> _annotations; |
| 1929 _typeParameters?.forEach((b) => b.flushInformative()); | 2929 idl.CodeRange _codeRange; |
| 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; |
| 1930 } | 2947 } |
| 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()); |
| 1931 } | 3069 } |
| 1932 | 3070 |
| 1933 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp
lements idl.UnlinkedCombinator { | 3071 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp
lements idl.UnlinkedCombinator { |
| 1934 bool _finished = false; | 3072 bool _finished = false; |
| 1935 | 3073 |
| 1936 int _end; | 3074 int _end; |
| 1937 List<String> _hides; | 3075 List<String> _hides; |
| 1938 int _offset; | 3076 int _offset; |
| 1939 List<String> _shows; | 3077 List<String> _shows; |
| 1940 | 3078 |
| 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 | |
| 1947 @override | 3079 @override |
| 1948 int get end => _end ??= 0; | 3080 int get end => _end ??= 0; |
| 1949 | 3081 |
| 1950 /** | 3082 /** |
| 1951 * If this is a `show` combinator, offset of the end of the list of shown | 3083 * If this is a `show` combinator, offset of the end of the list of shown |
| 1952 * names. Otherwise zero. | 3084 * names. Otherwise zero. |
| 1953 */ | 3085 */ |
| 1954 void set end(int _value) { | 3086 void set end(int _value) { |
| 1955 assert(!_finished); | 3087 assert(!_finished); |
| 1956 assert(_value == null || _value >= 0); | 3088 assert(_value == null || _value >= 0); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1985 List<String> get shows => _shows ??= <String>[]; | 3117 List<String> get shows => _shows ??= <String>[]; |
| 1986 | 3118 |
| 1987 /** | 3119 /** |
| 1988 * List of names which are shown. Empty if this is a `hide` combinator. | 3120 * List of names which are shown. Empty if this is a `hide` combinator. |
| 1989 */ | 3121 */ |
| 1990 void set shows(List<String> _value) { | 3122 void set shows(List<String> _value) { |
| 1991 assert(!_finished); | 3123 assert(!_finished); |
| 1992 _shows = _value; | 3124 _shows = _value; |
| 1993 } | 3125 } |
| 1994 | 3126 |
| 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 |
| 1995 fb.Offset finish(fb.Builder fbBuilder) { | 3141 fb.Offset finish(fb.Builder fbBuilder) { |
| 1996 assert(!_finished); | 3142 assert(!_finished); |
| 1997 _finished = true; | 3143 _finished = true; |
| 1998 fb.Offset offset_hides; | 3144 fb.Offset offset_hides; |
| 1999 fb.Offset offset_shows; | 3145 fb.Offset offset_shows; |
| 2000 if (!(_hides == null || _hides.isEmpty)) { | 3146 if (!(_hides == null || _hides.isEmpty)) { |
| 2001 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString
(b)).toList()); | 3147 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString
(b)).toList()); |
| 2002 } | 3148 } |
| 2003 if (!(_shows == null || _shows.isEmpty)) { | 3149 if (!(_shows == null || _shows.isEmpty)) { |
| 2004 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString
(b)).toList()); | 3150 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString
(b)).toList()); |
| 2005 } | 3151 } |
| 2006 fbBuilder.startTable(); | 3152 fbBuilder.startTable(); |
| 2007 if (_end != null && _end != 0) { | 3153 if (_end != null && _end != 0) { |
| 2008 fbBuilder.addUint32(3, _end); | 3154 fbBuilder.addUint32(3, _end); |
| 2009 } | 3155 } |
| 2010 if (offset_hides != null) { | 3156 if (offset_hides != null) { |
| 2011 fbBuilder.addOffset(1, offset_hides); | 3157 fbBuilder.addOffset(1, offset_hides); |
| 2012 } | 3158 } |
| 2013 if (_offset != null && _offset != 0) { | 3159 if (_offset != null && _offset != 0) { |
| 2014 fbBuilder.addUint32(2, _offset); | 3160 fbBuilder.addUint32(2, _offset); |
| 2015 } | 3161 } |
| 2016 if (offset_shows != null) { | 3162 if (offset_shows != null) { |
| 2017 fbBuilder.addOffset(0, offset_shows); | 3163 fbBuilder.addOffset(0, offset_shows); |
| 2018 } | 3164 } |
| 2019 return fbBuilder.endTable(); | 3165 return fbBuilder.endTable(); |
| 2020 } | 3166 } |
| 3167 } |
| 2021 | 3168 |
| 2022 /** | 3169 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl>
{ |
| 2023 * Flush [informative] data recursively. | 3170 const _UnlinkedCombinatorReader(); |
| 2024 */ | 3171 |
| 2025 void flushInformative() { | 3172 @override |
| 2026 _end = null; | 3173 _UnlinkedCombinatorImpl createObject(fb.BufferPointer bp) => new _UnlinkedComb
inatorImpl(bp); |
| 2027 _offset = null; | 3174 } |
| 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; |
| 2028 } | 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 } |
| 3209 } |
| 3210 |
| 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()); |
| 2029 } | 3232 } |
| 2030 | 3233 |
| 2031 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements id
l.UnlinkedConst { | 3234 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements id
l.UnlinkedConst { |
| 2032 bool _finished = false; | 3235 bool _finished = false; |
| 2033 | 3236 |
| 2034 List<double> _doubles; | 3237 List<double> _doubles; |
| 2035 List<int> _ints; | 3238 List<int> _ints; |
| 2036 bool _isInvalid; | 3239 bool _isInvalid; |
| 2037 List<idl.UnlinkedConstOperation> _operations; | 3240 List<idl.UnlinkedConstOperation> _operations; |
| 2038 List<EntityRefBuilder> _references; | 3241 List<EntityRefBuilder> _references; |
| 2039 List<String> _strings; | 3242 List<String> _strings; |
| 2040 | 3243 |
| 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 | |
| 2049 @override | 3244 @override |
| 2050 List<double> get doubles => _doubles ??= <double>[]; | 3245 List<double> get doubles => _doubles ??= <double>[]; |
| 2051 | 3246 |
| 2052 /** | 3247 /** |
| 2053 * Sequence of 64-bit doubles consumed by the operation `pushDouble`. | 3248 * Sequence of 64-bit doubles consumed by the operation `pushDouble`. |
| 2054 */ | 3249 */ |
| 2055 void set doubles(List<double> _value) { | 3250 void set doubles(List<double> _value) { |
| 2056 assert(!_finished); | 3251 assert(!_finished); |
| 2057 _doubles = _value; | 3252 _doubles = _value; |
| 2058 } | 3253 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 | 3309 |
| 2115 /** | 3310 /** |
| 2116 * Sequence of strings consumed by the operations `pushString` and | 3311 * Sequence of strings consumed by the operations `pushString` and |
| 2117 * `invokeConstructor`. | 3312 * `invokeConstructor`. |
| 2118 */ | 3313 */ |
| 2119 void set strings(List<String> _value) { | 3314 void set strings(List<String> _value) { |
| 2120 assert(!_finished); | 3315 assert(!_finished); |
| 2121 _strings = _value; | 3316 _strings = _value; |
| 2122 } | 3317 } |
| 2123 | 3318 |
| 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 |
| 2124 fb.Offset finish(fb.Builder fbBuilder) { | 3334 fb.Offset finish(fb.Builder fbBuilder) { |
| 2125 assert(!_finished); | 3335 assert(!_finished); |
| 2126 _finished = true; | 3336 _finished = true; |
| 2127 fb.Offset offset_doubles; | 3337 fb.Offset offset_doubles; |
| 2128 fb.Offset offset_ints; | 3338 fb.Offset offset_ints; |
| 2129 fb.Offset offset_operations; | 3339 fb.Offset offset_operations; |
| 2130 fb.Offset offset_references; | 3340 fb.Offset offset_references; |
| 2131 fb.Offset offset_strings; | 3341 fb.Offset offset_strings; |
| 2132 if (!(_doubles == null || _doubles.isEmpty)) { | 3342 if (!(_doubles == null || _doubles.isEmpty)) { |
| 2133 offset_doubles = fbBuilder.writeListFloat64(_doubles); | 3343 offset_doubles = fbBuilder.writeListFloat64(_doubles); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2158 fbBuilder.addOffset(0, offset_operations); | 3368 fbBuilder.addOffset(0, offset_operations); |
| 2159 } | 3369 } |
| 2160 if (offset_references != null) { | 3370 if (offset_references != null) { |
| 2161 fbBuilder.addOffset(2, offset_references); | 3371 fbBuilder.addOffset(2, offset_references); |
| 2162 } | 3372 } |
| 2163 if (offset_strings != null) { | 3373 if (offset_strings != null) { |
| 2164 fbBuilder.addOffset(3, offset_strings); | 3374 fbBuilder.addOffset(3, offset_strings); |
| 2165 } | 3375 } |
| 2166 return fbBuilder.endTable(); | 3376 return fbBuilder.endTable(); |
| 2167 } | 3377 } |
| 3378 } |
| 2168 | 3379 |
| 2169 /** | 3380 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> { |
| 2170 * Flush [informative] data recursively. | 3381 const _UnlinkedConstReader(); |
| 2171 */ | 3382 |
| 2172 void flushInformative() { | 3383 @override |
| 2173 _references?.forEach((b) => b.flushInformative()); | 3384 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl
(bp); |
| 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; |
| 2174 } | 3403 } |
| 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()); |
| 2175 } | 3461 } |
| 2176 | 3462 |
| 2177 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru
ctorInitializerMixin implements idl.UnlinkedConstructorInitializer { | 3463 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru
ctorInitializerMixin implements idl.UnlinkedConstructorInitializer { |
| 2178 bool _finished = false; | 3464 bool _finished = false; |
| 2179 | 3465 |
| 2180 List<UnlinkedConstBuilder> _arguments; | 3466 List<UnlinkedConstBuilder> _arguments; |
| 2181 UnlinkedConstBuilder _expression; | 3467 UnlinkedConstBuilder _expression; |
| 2182 idl.UnlinkedConstructorInitializerKind _kind; | 3468 idl.UnlinkedConstructorInitializerKind _kind; |
| 2183 String _name; | 3469 String _name; |
| 2184 | 3470 |
| 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 | |
| 2191 @override | 3471 @override |
| 2192 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild
er>[]; | 3472 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild
er>[]; |
| 2193 | 3473 |
| 2194 /** | 3474 /** |
| 2195 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the | 3475 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the |
| 2196 * invocation. Otherwise empty. | 3476 * invocation. Otherwise empty. |
| 2197 */ | 3477 */ |
| 2198 void set arguments(List<UnlinkedConstBuilder> _value) { | 3478 void set arguments(List<UnlinkedConstBuilder> _value) { |
| 2199 assert(!_finished); | 3479 assert(!_finished); |
| 2200 _arguments = _value; | 3480 _arguments = _value; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2230 * If [kind] is `field`, the name of the field declared in the class. If | 3510 * If [kind] is `field`, the name of the field declared in the class. If |
| 2231 * [kind] is `thisInvocation`, the name of the constructor, declared in this | 3511 * [kind] is `thisInvocation`, the name of the constructor, declared in this |
| 2232 * class, to redirect to. If [kind] is `superInvocation`, the name of the | 3512 * class, to redirect to. If [kind] is `superInvocation`, the name of the |
| 2233 * constructor, declared in the superclass, to invoke. | 3513 * constructor, declared in the superclass, to invoke. |
| 2234 */ | 3514 */ |
| 2235 void set name(String _value) { | 3515 void set name(String _value) { |
| 2236 assert(!_finished); | 3516 assert(!_finished); |
| 2237 _name = _value; | 3517 _name = _value; |
| 2238 } | 3518 } |
| 2239 | 3519 |
| 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 |
| 2240 fb.Offset finish(fb.Builder fbBuilder) { | 3534 fb.Offset finish(fb.Builder fbBuilder) { |
| 2241 assert(!_finished); | 3535 assert(!_finished); |
| 2242 _finished = true; | 3536 _finished = true; |
| 2243 fb.Offset offset_arguments; | 3537 fb.Offset offset_arguments; |
| 2244 fb.Offset offset_expression; | 3538 fb.Offset offset_expression; |
| 2245 fb.Offset offset_name; | 3539 fb.Offset offset_name; |
| 2246 if (!(_arguments == null || _arguments.isEmpty)) { | 3540 if (!(_arguments == null || _arguments.isEmpty)) { |
| 2247 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu
ilder)).toList()); | 3541 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu
ilder)).toList()); |
| 2248 } | 3542 } |
| 2249 if (_expression != null) { | 3543 if (_expression != null) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2260 fbBuilder.addOffset(1, offset_expression); | 3554 fbBuilder.addOffset(1, offset_expression); |
| 2261 } | 3555 } |
| 2262 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field)
{ | 3556 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field)
{ |
| 2263 fbBuilder.addUint8(2, _kind.index); | 3557 fbBuilder.addUint8(2, _kind.index); |
| 2264 } | 3558 } |
| 2265 if (offset_name != null) { | 3559 if (offset_name != null) { |
| 2266 fbBuilder.addOffset(0, offset_name); | 3560 fbBuilder.addOffset(0, offset_name); |
| 2267 } | 3561 } |
| 2268 return fbBuilder.endTable(); | 3562 return fbBuilder.endTable(); |
| 2269 } | 3563 } |
| 3564 } |
| 2270 | 3565 |
| 2271 /** | 3566 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons
tructorInitializerImpl> { |
| 2272 * Flush [informative] data recursively. | 3567 const _UnlinkedConstructorInitializerReader(); |
| 2273 */ | 3568 |
| 2274 void flushInformative() { | 3569 @override |
| 2275 _arguments?.forEach((b) => b.flushInformative()); | 3570 _UnlinkedConstructorInitializerImpl createObject(fb.BufferPointer bp) => new _
UnlinkedConstructorInitializerImpl(bp); |
| 2276 _expression?.flushInformative(); | 3571 } |
| 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; |
| 2277 } | 3605 } |
| 2278 } | 3606 } |
| 2279 | 3607 |
| 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 |
| 2280 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta
tionCommentMixin implements idl.UnlinkedDocumentationComment { | 3631 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta
tionCommentMixin implements idl.UnlinkedDocumentationComment { |
| 2281 bool _finished = false; | 3632 bool _finished = false; |
| 2282 | 3633 |
| 2283 int _length; | 3634 int _length; |
| 2284 int _offset; | 3635 int _offset; |
| 2285 String _text; | 3636 String _text; |
| 2286 | 3637 |
| 2287 UnlinkedDocumentationCommentBuilder({int length, int offset, String text}) | |
| 2288 : _length = length, | |
| 2289 _offset = offset, | |
| 2290 _text = text; | |
| 2291 | |
| 2292 @override | 3638 @override |
| 2293 int get length => _length ??= 0; | 3639 int get length => _length ??= 0; |
| 2294 | 3640 |
| 2295 /** | 3641 /** |
| 2296 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). | 3642 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). |
| 2297 */ | 3643 */ |
| 2298 void set length(int _value) { | 3644 void set length(int _value) { |
| 2299 assert(!_finished); | 3645 assert(!_finished); |
| 2300 assert(_value == null || _value >= 0); | 3646 assert(_value == null || _value >= 0); |
| 2301 _length = _value; | 3647 _length = _value; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2321 * Text of the documentation comment, with '\r\n' replaced by '\n'. | 3667 * Text of the documentation comment, with '\r\n' replaced by '\n'. |
| 2322 * | 3668 * |
| 2323 * References appearing within the doc comment in square brackets are not | 3669 * References appearing within the doc comment in square brackets are not |
| 2324 * specially encoded. | 3670 * specially encoded. |
| 2325 */ | 3671 */ |
| 2326 void set text(String _value) { | 3672 void set text(String _value) { |
| 2327 assert(!_finished); | 3673 assert(!_finished); |
| 2328 _text = _value; | 3674 _text = _value; |
| 2329 } | 3675 } |
| 2330 | 3676 |
| 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 |
| 2331 fb.Offset finish(fb.Builder fbBuilder) { | 3688 fb.Offset finish(fb.Builder fbBuilder) { |
| 2332 assert(!_finished); | 3689 assert(!_finished); |
| 2333 _finished = true; | 3690 _finished = true; |
| 2334 fb.Offset offset_text; | 3691 fb.Offset offset_text; |
| 2335 if (_text != null) { | 3692 if (_text != null) { |
| 2336 offset_text = fbBuilder.writeString(_text); | 3693 offset_text = fbBuilder.writeString(_text); |
| 2337 } | 3694 } |
| 2338 fbBuilder.startTable(); | 3695 fbBuilder.startTable(); |
| 2339 if (_length != null && _length != 0) { | 3696 if (_length != null && _length != 0) { |
| 2340 fbBuilder.addUint32(0, _length); | 3697 fbBuilder.addUint32(0, _length); |
| 2341 } | 3698 } |
| 2342 if (_offset != null && _offset != 0) { | 3699 if (_offset != null && _offset != 0) { |
| 2343 fbBuilder.addUint32(2, _offset); | 3700 fbBuilder.addUint32(2, _offset); |
| 2344 } | 3701 } |
| 2345 if (offset_text != null) { | 3702 if (offset_text != null) { |
| 2346 fbBuilder.addOffset(1, offset_text); | 3703 fbBuilder.addOffset(1, offset_text); |
| 2347 } | 3704 } |
| 2348 return fbBuilder.endTable(); | 3705 return fbBuilder.endTable(); |
| 2349 } | 3706 } |
| 3707 } |
| 2350 | 3708 |
| 2351 /** | 3709 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume
ntationCommentImpl> { |
| 2352 * Flush [informative] data recursively. | 3710 const _UnlinkedDocumentationCommentReader(); |
| 2353 */ | 3711 |
| 2354 void flushInformative() { | 3712 @override |
| 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; |
| 2355 } | 3741 } |
| 2356 } | 3742 } |
| 2357 | 3743 |
| 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 |
| 2358 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { | 3765 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { |
| 2359 bool _finished = false; | 3766 bool _finished = false; |
| 2360 | 3767 |
| 2361 List<UnlinkedConstBuilder> _annotations; | 3768 List<UnlinkedConstBuilder> _annotations; |
| 2362 CodeRangeBuilder _codeRange; | 3769 CodeRangeBuilder _codeRange; |
| 2363 UnlinkedDocumentationCommentBuilder _documentationComment; | 3770 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 2364 String _name; | 3771 String _name; |
| 2365 int _nameOffset; | 3772 int _nameOffset; |
| 2366 List<UnlinkedEnumValueBuilder> _values; | 3773 List<UnlinkedEnumValueBuilder> _values; |
| 2367 | 3774 |
| 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 | |
| 2376 @override | 3775 @override |
| 2377 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3776 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 2378 | 3777 |
| 2379 /** | 3778 /** |
| 2380 * Annotations for this enum. | 3779 * Annotations for this enum. |
| 2381 */ | 3780 */ |
| 2382 void set annotations(List<UnlinkedConstBuilder> _value) { | 3781 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 2383 assert(!_finished); | 3782 assert(!_finished); |
| 2384 _annotations = _value; | 3783 _annotations = _value; |
| 2385 } | 3784 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2434 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; | 3833 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; |
| 2435 | 3834 |
| 2436 /** | 3835 /** |
| 2437 * Values listed in the enum declaration, in declaration order. | 3836 * Values listed in the enum declaration, in declaration order. |
| 2438 */ | 3837 */ |
| 2439 void set values(List<UnlinkedEnumValueBuilder> _value) { | 3838 void set values(List<UnlinkedEnumValueBuilder> _value) { |
| 2440 assert(!_finished); | 3839 assert(!_finished); |
| 2441 _values = _value; | 3840 _values = _value; |
| 2442 } | 3841 } |
| 2443 | 3842 |
| 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 |
| 2444 fb.Offset finish(fb.Builder fbBuilder) { | 3862 fb.Offset finish(fb.Builder fbBuilder) { |
| 2445 assert(!_finished); | 3863 assert(!_finished); |
| 2446 _finished = true; | 3864 _finished = true; |
| 2447 fb.Offset offset_annotations; | 3865 fb.Offset offset_annotations; |
| 2448 fb.Offset offset_codeRange; | 3866 fb.Offset offset_codeRange; |
| 2449 fb.Offset offset_documentationComment; | 3867 fb.Offset offset_documentationComment; |
| 2450 fb.Offset offset_name; | 3868 fb.Offset offset_name; |
| 2451 fb.Offset offset_values; | 3869 fb.Offset offset_values; |
| 2452 if (!(_annotations == null || _annotations.isEmpty)) { | 3870 if (!(_annotations == null || _annotations.isEmpty)) { |
| 2453 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 3871 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2478 fbBuilder.addOffset(0, offset_name); | 3896 fbBuilder.addOffset(0, offset_name); |
| 2479 } | 3897 } |
| 2480 if (_nameOffset != null && _nameOffset != 0) { | 3898 if (_nameOffset != null && _nameOffset != 0) { |
| 2481 fbBuilder.addUint32(1, _nameOffset); | 3899 fbBuilder.addUint32(1, _nameOffset); |
| 2482 } | 3900 } |
| 2483 if (offset_values != null) { | 3901 if (offset_values != null) { |
| 2484 fbBuilder.addOffset(2, offset_values); | 3902 fbBuilder.addOffset(2, offset_values); |
| 2485 } | 3903 } |
| 2486 return fbBuilder.endTable(); | 3904 return fbBuilder.endTable(); |
| 2487 } | 3905 } |
| 3906 } |
| 2488 | 3907 |
| 2489 /** | 3908 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { |
| 2490 * Flush [informative] data recursively. | 3909 const _UnlinkedEnumReader(); |
| 2491 */ | 3910 |
| 2492 void flushInformative() { | 3911 @override |
| 2493 _annotations?.forEach((b) => b.flushInformative()); | 3912 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b
p); |
| 2494 _codeRange = null; | 3913 } |
| 2495 _documentationComment = null; | 3914 |
| 2496 _nameOffset = null; | 3915 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { |
| 2497 _values?.forEach((b) => b.flushInformative()); | 3916 final fb.BufferPointer _bp; |
| 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; |
| 2498 } | 3931 } |
| 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()); |
| 2499 } | 3989 } |
| 2500 | 3990 |
| 2501 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple
ments idl.UnlinkedEnumValue { | 3991 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple
ments idl.UnlinkedEnumValue { |
| 2502 bool _finished = false; | 3992 bool _finished = false; |
| 2503 | 3993 |
| 2504 UnlinkedDocumentationCommentBuilder _documentationComment; | 3994 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 2505 String _name; | 3995 String _name; |
| 2506 int _nameOffset; | 3996 int _nameOffset; |
| 2507 | 3997 |
| 2508 UnlinkedEnumValueBuilder({UnlinkedDocumentationCommentBuilder documentationCom
ment, String name, int nameOffset}) | |
| 2509 : _documentationComment = documentationComment, | |
| 2510 _name = name, | |
| 2511 _nameOffset = nameOffset; | |
| 2512 | |
| 2513 @override | 3998 @override |
| 2514 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 3999 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 2515 | 4000 |
| 2516 /** | 4001 /** |
| 2517 * Documentation comment for the enum value, or `null` if there is no | 4002 * Documentation comment for the enum value, or `null` if there is no |
| 2518 * documentation comment. | 4003 * documentation comment. |
| 2519 */ | 4004 */ |
| 2520 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 4005 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 2521 assert(!_finished); | 4006 assert(!_finished); |
| 2522 _documentationComment = _value; | 4007 _documentationComment = _value; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2538 | 4023 |
| 2539 /** | 4024 /** |
| 2540 * Offset of the enum value name relative to the beginning of the file. | 4025 * Offset of the enum value name relative to the beginning of the file. |
| 2541 */ | 4026 */ |
| 2542 void set nameOffset(int _value) { | 4027 void set nameOffset(int _value) { |
| 2543 assert(!_finished); | 4028 assert(!_finished); |
| 2544 assert(_value == null || _value >= 0); | 4029 assert(_value == null || _value >= 0); |
| 2545 _nameOffset = _value; | 4030 _nameOffset = _value; |
| 2546 } | 4031 } |
| 2547 | 4032 |
| 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 |
| 2548 fb.Offset finish(fb.Builder fbBuilder) { | 4046 fb.Offset finish(fb.Builder fbBuilder) { |
| 2549 assert(!_finished); | 4047 assert(!_finished); |
| 2550 _finished = true; | 4048 _finished = true; |
| 2551 fb.Offset offset_documentationComment; | 4049 fb.Offset offset_documentationComment; |
| 2552 fb.Offset offset_name; | 4050 fb.Offset offset_name; |
| 2553 if (_documentationComment != null) { | 4051 if (_documentationComment != null) { |
| 2554 offset_documentationComment = _documentationComment.finish(fbBuilder); | 4052 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 2555 } | 4053 } |
| 2556 if (_name != null) { | 4054 if (_name != null) { |
| 2557 offset_name = fbBuilder.writeString(_name); | 4055 offset_name = fbBuilder.writeString(_name); |
| 2558 } | 4056 } |
| 2559 fbBuilder.startTable(); | 4057 fbBuilder.startTable(); |
| 2560 if (offset_documentationComment != null) { | 4058 if (offset_documentationComment != null) { |
| 2561 fbBuilder.addOffset(2, offset_documentationComment); | 4059 fbBuilder.addOffset(2, offset_documentationComment); |
| 2562 } | 4060 } |
| 2563 if (offset_name != null) { | 4061 if (offset_name != null) { |
| 2564 fbBuilder.addOffset(0, offset_name); | 4062 fbBuilder.addOffset(0, offset_name); |
| 2565 } | 4063 } |
| 2566 if (_nameOffset != null && _nameOffset != 0) { | 4064 if (_nameOffset != null && _nameOffset != 0) { |
| 2567 fbBuilder.addUint32(1, _nameOffset); | 4065 fbBuilder.addUint32(1, _nameOffset); |
| 2568 } | 4066 } |
| 2569 return fbBuilder.endTable(); | 4067 return fbBuilder.endTable(); |
| 2570 } | 4068 } |
| 4069 } |
| 2571 | 4070 |
| 2572 /** | 4071 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> { |
| 2573 * Flush [informative] data recursively. | 4072 const _UnlinkedEnumValueReader(); |
| 2574 */ | 4073 |
| 2575 void flushInformative() { | 4074 @override |
| 2576 _documentationComment = null; | 4075 _UnlinkedEnumValueImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumV
alueImpl(bp); |
| 2577 _nameOffset = null; | 4076 } |
| 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; |
| 2578 } | 4103 } |
| 2579 } | 4104 } |
| 2580 | 4105 |
| 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 |
| 2581 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { | 4127 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { |
| 2582 bool _finished = false; | 4128 bool _finished = false; |
| 2583 | 4129 |
| 2584 List<UnlinkedConstBuilder> _annotations; | 4130 List<UnlinkedConstBuilder> _annotations; |
| 2585 CodeRangeBuilder _codeRange; | 4131 CodeRangeBuilder _codeRange; |
| 2586 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; | 4132 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; |
| 2587 int _constCycleSlot; | 4133 int _constCycleSlot; |
| 2588 UnlinkedDocumentationCommentBuilder _documentationComment; | 4134 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 2589 int _inferredReturnTypeSlot; | 4135 int _inferredReturnTypeSlot; |
| 2590 bool _isAbstract; | 4136 bool _isAbstract; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2602 int _nameOffset; | 4148 int _nameOffset; |
| 2603 List<UnlinkedParamBuilder> _parameters; | 4149 List<UnlinkedParamBuilder> _parameters; |
| 2604 int _periodOffset; | 4150 int _periodOffset; |
| 2605 EntityRefBuilder _redirectedConstructor; | 4151 EntityRefBuilder _redirectedConstructor; |
| 2606 String _redirectedConstructorName; | 4152 String _redirectedConstructorName; |
| 2607 EntityRefBuilder _returnType; | 4153 EntityRefBuilder _returnType; |
| 2608 List<UnlinkedTypeParamBuilder> _typeParameters; | 4154 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 2609 int _visibleLength; | 4155 int _visibleLength; |
| 2610 int _visibleOffset; | 4156 int _visibleOffset; |
| 2611 | 4157 |
| 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 | |
| 2641 @override | 4158 @override |
| 2642 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 4159 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 2643 | 4160 |
| 2644 /** | 4161 /** |
| 2645 * Annotations for this executable. | 4162 * Annotations for this executable. |
| 2646 */ | 4163 */ |
| 2647 void set annotations(List<UnlinkedConstBuilder> _value) { | 4164 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 2648 assert(!_finished); | 4165 assert(!_finished); |
| 2649 _annotations = _value; | 4166 _annotations = _value; |
| 2650 } | 4167 } |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2968 | 4485 |
| 2969 /** | 4486 /** |
| 2970 * If a local function, the beginning of the visible range; zero otherwise. | 4487 * If a local function, the beginning of the visible range; zero otherwise. |
| 2971 */ | 4488 */ |
| 2972 void set visibleOffset(int _value) { | 4489 void set visibleOffset(int _value) { |
| 2973 assert(!_finished); | 4490 assert(!_finished); |
| 2974 assert(_value == null || _value >= 0); | 4491 assert(_value == null || _value >= 0); |
| 2975 _visibleOffset = _value; | 4492 _visibleOffset = _value; |
| 2976 } | 4493 } |
| 2977 | 4494 |
| 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 |
| 2978 fb.Offset finish(fb.Builder fbBuilder) { | 4544 fb.Offset finish(fb.Builder fbBuilder) { |
| 2979 assert(!_finished); | 4545 assert(!_finished); |
| 2980 _finished = true; | 4546 _finished = true; |
| 2981 fb.Offset offset_annotations; | 4547 fb.Offset offset_annotations; |
| 2982 fb.Offset offset_codeRange; | 4548 fb.Offset offset_codeRange; |
| 2983 fb.Offset offset_constantInitializers; | 4549 fb.Offset offset_constantInitializers; |
| 2984 fb.Offset offset_documentationComment; | 4550 fb.Offset offset_documentationComment; |
| 2985 fb.Offset offset_localFunctions; | 4551 fb.Offset offset_localFunctions; |
| 2986 fb.Offset offset_localLabels; | 4552 fb.Offset offset_localLabels; |
| 2987 fb.Offset offset_localVariables; | 4553 fb.Offset offset_localVariables; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3107 fbBuilder.addOffset(16, offset_typeParameters); | 4673 fbBuilder.addOffset(16, offset_typeParameters); |
| 3108 } | 4674 } |
| 3109 if (_visibleLength != null && _visibleLength != 0) { | 4675 if (_visibleLength != null && _visibleLength != 0) { |
| 3110 fbBuilder.addUint32(20, _visibleLength); | 4676 fbBuilder.addUint32(20, _visibleLength); |
| 3111 } | 4677 } |
| 3112 if (_visibleOffset != null && _visibleOffset != 0) { | 4678 if (_visibleOffset != null && _visibleOffset != 0) { |
| 3113 fbBuilder.addUint32(21, _visibleOffset); | 4679 fbBuilder.addUint32(21, _visibleOffset); |
| 3114 } | 4680 } |
| 3115 return fbBuilder.endTable(); | 4681 return fbBuilder.endTable(); |
| 3116 } | 4682 } |
| 3117 | 4683 } |
| 3118 /** | 4684 |
| 3119 * Flush [informative] data recursively. | 4685 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ |
| 3120 */ | 4686 const _UnlinkedExecutableReader(); |
| 3121 void flushInformative() { | 4687 |
| 3122 _annotations?.forEach((b) => b.flushInformative()); | 4688 @override |
| 3123 _codeRange = null; | 4689 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec
utableImpl(bp); |
| 3124 _constantInitializers?.forEach((b) => b.flushInformative()); | 4690 } |
| 3125 _documentationComment = null; | 4691 |
| 3126 _localFunctions?.forEach((b) => b.flushInformative()); | 4692 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { |
| 3127 _localLabels?.forEach((b) => b.flushInformative()); | 4693 final fb.BufferPointer _bp; |
| 3128 _localVariables?.forEach((b) => b.flushInformative()); | 4694 |
| 3129 _nameEnd = null; | 4695 _UnlinkedExecutableImpl(this._bp); |
| 3130 _nameOffset = null; | 4696 |
| 3131 _parameters?.forEach((b) => b.flushInformative()); | 4697 List<idl.UnlinkedConst> _annotations; |
| 3132 _periodOffset = null; | 4698 idl.CodeRange _codeRange; |
| 3133 _redirectedConstructor?.flushInformative(); | 4699 List<idl.UnlinkedConstructorInitializer> _constantInitializers; |
| 3134 _returnType?.flushInformative(); | 4700 int _constCycleSlot; |
| 3135 _typeParameters?.forEach((b) => b.flushInformative()); | 4701 idl.UnlinkedDocumentationComment _documentationComment; |
| 3136 } | 4702 int _inferredReturnTypeSlot; |
| 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 } |
| 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()); |
| 3137 } | 4955 } |
| 3138 | 4956 |
| 3139 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { | 4957 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { |
| 3140 bool _finished = false; | 4958 bool _finished = false; |
| 3141 | 4959 |
| 3142 List<UnlinkedConstBuilder> _annotations; | 4960 List<UnlinkedConstBuilder> _annotations; |
| 3143 int _offset; | 4961 int _offset; |
| 3144 int _uriEnd; | 4962 int _uriEnd; |
| 3145 int _uriOffset; | 4963 int _uriOffset; |
| 3146 | 4964 |
| 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 | |
| 3153 @override | 4965 @override |
| 3154 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 4966 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 3155 | 4967 |
| 3156 /** | 4968 /** |
| 3157 * Annotations for this export directive. | 4969 * Annotations for this export directive. |
| 3158 */ | 4970 */ |
| 3159 void set annotations(List<UnlinkedConstBuilder> _value) { | 4971 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 3160 assert(!_finished); | 4972 assert(!_finished); |
| 3161 _annotations = _value; | 4973 _annotations = _value; |
| 3162 } | 4974 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3192 /** | 5004 /** |
| 3193 * Offset of the URI string (including quotes) relative to the beginning of | 5005 * Offset of the URI string (including quotes) relative to the beginning of |
| 3194 * the file. | 5006 * the file. |
| 3195 */ | 5007 */ |
| 3196 void set uriOffset(int _value) { | 5008 void set uriOffset(int _value) { |
| 3197 assert(!_finished); | 5009 assert(!_finished); |
| 3198 assert(_value == null || _value >= 0); | 5010 assert(_value == null || _value >= 0); |
| 3199 _uriOffset = _value; | 5011 _uriOffset = _value; |
| 3200 } | 5012 } |
| 3201 | 5013 |
| 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 |
| 3202 fb.Offset finish(fb.Builder fbBuilder) { | 5030 fb.Offset finish(fb.Builder fbBuilder) { |
| 3203 assert(!_finished); | 5031 assert(!_finished); |
| 3204 _finished = true; | 5032 _finished = true; |
| 3205 fb.Offset offset_annotations; | 5033 fb.Offset offset_annotations; |
| 3206 if (!(_annotations == null || _annotations.isEmpty)) { | 5034 if (!(_annotations == null || _annotations.isEmpty)) { |
| 3207 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 5035 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 3208 } | 5036 } |
| 3209 fbBuilder.startTable(); | 5037 fbBuilder.startTable(); |
| 3210 if (offset_annotations != null) { | 5038 if (offset_annotations != null) { |
| 3211 fbBuilder.addOffset(3, offset_annotations); | 5039 fbBuilder.addOffset(3, offset_annotations); |
| 3212 } | 5040 } |
| 3213 if (_offset != null && _offset != 0) { | 5041 if (_offset != null && _offset != 0) { |
| 3214 fbBuilder.addUint32(0, _offset); | 5042 fbBuilder.addUint32(0, _offset); |
| 3215 } | 5043 } |
| 3216 if (_uriEnd != null && _uriEnd != 0) { | 5044 if (_uriEnd != null && _uriEnd != 0) { |
| 3217 fbBuilder.addUint32(1, _uriEnd); | 5045 fbBuilder.addUint32(1, _uriEnd); |
| 3218 } | 5046 } |
| 3219 if (_uriOffset != null && _uriOffset != 0) { | 5047 if (_uriOffset != null && _uriOffset != 0) { |
| 3220 fbBuilder.addUint32(2, _uriOffset); | 5048 fbBuilder.addUint32(2, _uriOffset); |
| 3221 } | 5049 } |
| 3222 return fbBuilder.endTable(); | 5050 return fbBuilder.endTable(); |
| 3223 } | 5051 } |
| 5052 } |
| 3224 | 5053 |
| 3225 /** | 5054 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu
blicImpl> { |
| 3226 * Flush [informative] data recursively. | 5055 const _UnlinkedExportNonPublicReader(); |
| 3227 */ | 5056 |
| 3228 void flushInformative() { | 5057 @override |
| 3229 _annotations?.forEach((b) => b.flushInformative()); | 5058 _UnlinkedExportNonPublicImpl createObject(fb.BufferPointer bp) => new _Unlinke
dExportNonPublicImpl(bp); |
| 3230 _offset = null; | 5059 } |
| 3231 _uriEnd = null; | 5060 |
| 3232 _uriOffset = null; | 5061 class _UnlinkedExportNonPublicImpl extends Object with _UnlinkedExportNonPublicM
ixin implements idl.UnlinkedExportNonPublic { |
| 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; |
| 3233 } | 5093 } |
| 3234 } | 5094 } |
| 3235 | 5095 |
| 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 |
| 3236 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin
implements idl.UnlinkedExportPublic { | 5119 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin
implements idl.UnlinkedExportPublic { |
| 3237 bool _finished = false; | 5120 bool _finished = false; |
| 3238 | 5121 |
| 3239 List<UnlinkedCombinatorBuilder> _combinators; | 5122 List<UnlinkedCombinatorBuilder> _combinators; |
| 3240 String _uri; | 5123 String _uri; |
| 3241 | 5124 |
| 3242 UnlinkedExportPublicBuilder({List<UnlinkedCombinatorBuilder> combinators, Stri
ng uri}) | |
| 3243 : _combinators = combinators, | |
| 3244 _uri = uri; | |
| 3245 | |
| 3246 @override | 5125 @override |
| 3247 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; | 5126 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; |
| 3248 | 5127 |
| 3249 /** | 5128 /** |
| 3250 * Combinators contained in this import declaration. | 5129 * Combinators contained in this import declaration. |
| 3251 */ | 5130 */ |
| 3252 void set combinators(List<UnlinkedCombinatorBuilder> _value) { | 5131 void set combinators(List<UnlinkedCombinatorBuilder> _value) { |
| 3253 assert(!_finished); | 5132 assert(!_finished); |
| 3254 _combinators = _value; | 5133 _combinators = _value; |
| 3255 } | 5134 } |
| 3256 | 5135 |
| 3257 @override | 5136 @override |
| 3258 String get uri => _uri ??= ''; | 5137 String get uri => _uri ??= ''; |
| 3259 | 5138 |
| 3260 /** | 5139 /** |
| 3261 * URI used in the source code to reference the exported library. | 5140 * URI used in the source code to reference the exported library. |
| 3262 */ | 5141 */ |
| 3263 void set uri(String _value) { | 5142 void set uri(String _value) { |
| 3264 assert(!_finished); | 5143 assert(!_finished); |
| 3265 _uri = _value; | 5144 _uri = _value; |
| 3266 } | 5145 } |
| 3267 | 5146 |
| 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 |
| 3268 fb.Offset finish(fb.Builder fbBuilder) { | 5158 fb.Offset finish(fb.Builder fbBuilder) { |
| 3269 assert(!_finished); | 5159 assert(!_finished); |
| 3270 _finished = true; | 5160 _finished = true; |
| 3271 fb.Offset offset_combinators; | 5161 fb.Offset offset_combinators; |
| 3272 fb.Offset offset_uri; | 5162 fb.Offset offset_uri; |
| 3273 if (!(_combinators == null || _combinators.isEmpty)) { | 5163 if (!(_combinators == null || _combinators.isEmpty)) { |
| 3274 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); | 5164 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); |
| 3275 } | 5165 } |
| 3276 if (_uri != null) { | 5166 if (_uri != null) { |
| 3277 offset_uri = fbBuilder.writeString(_uri); | 5167 offset_uri = fbBuilder.writeString(_uri); |
| 3278 } | 5168 } |
| 3279 fbBuilder.startTable(); | 5169 fbBuilder.startTable(); |
| 3280 if (offset_combinators != null) { | 5170 if (offset_combinators != null) { |
| 3281 fbBuilder.addOffset(1, offset_combinators); | 5171 fbBuilder.addOffset(1, offset_combinators); |
| 3282 } | 5172 } |
| 3283 if (offset_uri != null) { | 5173 if (offset_uri != null) { |
| 3284 fbBuilder.addOffset(0, offset_uri); | 5174 fbBuilder.addOffset(0, offset_uri); |
| 3285 } | 5175 } |
| 3286 return fbBuilder.endTable(); | 5176 return fbBuilder.endTable(); |
| 3287 } | 5177 } |
| 5178 } |
| 3288 | 5179 |
| 3289 /** | 5180 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm
pl> { |
| 3290 * Flush [informative] data recursively. | 5181 const _UnlinkedExportPublicReader(); |
| 3291 */ | 5182 |
| 3292 void flushInformative() { | 5183 @override |
| 3293 _combinators?.forEach((b) => b.flushInformative()); | 5184 _UnlinkedExportPublicImpl createObject(fb.BufferPointer bp) => new _UnlinkedEx
portPublicImpl(bp); |
| 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; |
| 3294 } | 5205 } |
| 3295 } | 5206 } |
| 3296 | 5207 |
| 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 |
| 3297 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements
idl.UnlinkedImport { | 5227 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements
idl.UnlinkedImport { |
| 3298 bool _finished = false; | 5228 bool _finished = false; |
| 3299 | 5229 |
| 3300 List<UnlinkedConstBuilder> _annotations; | 5230 List<UnlinkedConstBuilder> _annotations; |
| 3301 List<UnlinkedCombinatorBuilder> _combinators; | 5231 List<UnlinkedCombinatorBuilder> _combinators; |
| 3302 bool _isDeferred; | 5232 bool _isDeferred; |
| 3303 bool _isImplicit; | 5233 bool _isImplicit; |
| 3304 int _offset; | 5234 int _offset; |
| 3305 int _prefixOffset; | 5235 int _prefixOffset; |
| 3306 int _prefixReference; | 5236 int _prefixReference; |
| 3307 String _uri; | 5237 String _uri; |
| 3308 int _uriEnd; | 5238 int _uriEnd; |
| 3309 int _uriOffset; | 5239 int _uriOffset; |
| 3310 | 5240 |
| 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 | |
| 3323 @override | 5241 @override |
| 3324 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 5242 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 3325 | 5243 |
| 3326 /** | 5244 /** |
| 3327 * Annotations for this import declaration. | 5245 * Annotations for this import declaration. |
| 3328 */ | 5246 */ |
| 3329 void set annotations(List<UnlinkedConstBuilder> _value) { | 5247 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 3330 assert(!_finished); | 5248 assert(!_finished); |
| 3331 _annotations = _value; | 5249 _annotations = _value; |
| 3332 } | 5250 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3435 /** | 5353 /** |
| 3436 * Offset of the URI string (including quotes) relative to the beginning of | 5354 * Offset of the URI string (including quotes) relative to the beginning of |
| 3437 * the file. If [isImplicit] is true, zero. | 5355 * the file. If [isImplicit] is true, zero. |
| 3438 */ | 5356 */ |
| 3439 void set uriOffset(int _value) { | 5357 void set uriOffset(int _value) { |
| 3440 assert(!_finished); | 5358 assert(!_finished); |
| 3441 assert(_value == null || _value >= 0); | 5359 assert(_value == null || _value >= 0); |
| 3442 _uriOffset = _value; | 5360 _uriOffset = _value; |
| 3443 } | 5361 } |
| 3444 | 5362 |
| 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 |
| 3445 fb.Offset finish(fb.Builder fbBuilder) { | 5387 fb.Offset finish(fb.Builder fbBuilder) { |
| 3446 assert(!_finished); | 5388 assert(!_finished); |
| 3447 _finished = true; | 5389 _finished = true; |
| 3448 fb.Offset offset_annotations; | 5390 fb.Offset offset_annotations; |
| 3449 fb.Offset offset_combinators; | 5391 fb.Offset offset_combinators; |
| 3450 fb.Offset offset_uri; | 5392 fb.Offset offset_uri; |
| 3451 if (!(_annotations == null || _annotations.isEmpty)) { | 5393 if (!(_annotations == null || _annotations.isEmpty)) { |
| 3452 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 5394 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 3453 } | 5395 } |
| 3454 if (!(_combinators == null || _combinators.isEmpty)) { | 5396 if (!(_combinators == null || _combinators.isEmpty)) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 3483 fbBuilder.addOffset(1, offset_uri); | 5425 fbBuilder.addOffset(1, offset_uri); |
| 3484 } | 5426 } |
| 3485 if (_uriEnd != null && _uriEnd != 0) { | 5427 if (_uriEnd != null && _uriEnd != 0) { |
| 3486 fbBuilder.addUint32(2, _uriEnd); | 5428 fbBuilder.addUint32(2, _uriEnd); |
| 3487 } | 5429 } |
| 3488 if (_uriOffset != null && _uriOffset != 0) { | 5430 if (_uriOffset != null && _uriOffset != 0) { |
| 3489 fbBuilder.addUint32(3, _uriOffset); | 5431 fbBuilder.addUint32(3, _uriOffset); |
| 3490 } | 5432 } |
| 3491 return fbBuilder.endTable(); | 5433 return fbBuilder.endTable(); |
| 3492 } | 5434 } |
| 3493 | 5435 } |
| 3494 /** | 5436 |
| 3495 * Flush [informative] data recursively. | 5437 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> { |
| 3496 */ | 5438 const _UnlinkedImportReader(); |
| 3497 void flushInformative() { | 5439 |
| 3498 _annotations?.forEach((b) => b.flushInformative()); | 5440 @override |
| 3499 _combinators?.forEach((b) => b.flushInformative()); | 5441 _UnlinkedImportImpl createObject(fb.BufferPointer bp) => new _UnlinkedImportIm
pl(bp); |
| 3500 _offset = null; | 5442 } |
| 3501 _prefixOffset = null; | 5443 |
| 3502 _uriEnd = null; | 5444 class _UnlinkedImportImpl extends Object with _UnlinkedImportMixin implements id
l.UnlinkedImport { |
| 3503 _uriOffset = null; | 5445 final fb.BufferPointer _bp; |
| 3504 } | 5446 |
| 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 } |
| 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()); |
| 3505 } | 5554 } |
| 3506 | 5555 |
| 3507 class UnlinkedLabelBuilder extends Object with _UnlinkedLabelMixin implements id
l.UnlinkedLabel { | 5556 class UnlinkedLabelBuilder extends Object with _UnlinkedLabelMixin implements id
l.UnlinkedLabel { |
| 3508 bool _finished = false; | 5557 bool _finished = false; |
| 3509 | 5558 |
| 3510 bool _isOnSwitchMember; | 5559 bool _isOnSwitchMember; |
| 3511 bool _isOnSwitchStatement; | 5560 bool _isOnSwitchStatement; |
| 3512 String _name; | 5561 String _name; |
| 3513 int _nameOffset; | 5562 int _nameOffset; |
| 3514 | 5563 |
| 3515 UnlinkedLabelBuilder({bool isOnSwitchMember, bool isOnSwitchStatement, String
name, int nameOffset}) | |
| 3516 : _isOnSwitchMember = isOnSwitchMember, | |
| 3517 _isOnSwitchStatement = isOnSwitchStatement, | |
| 3518 _name = name, | |
| 3519 _nameOffset = nameOffset; | |
| 3520 | |
| 3521 @override | 5564 @override |
| 3522 bool get isOnSwitchMember => _isOnSwitchMember ??= false; | 5565 bool get isOnSwitchMember => _isOnSwitchMember ??= false; |
| 3523 | 5566 |
| 3524 /** | 5567 /** |
| 3525 * Return `true` if this label is associated with a `switch` member (`case` or | 5568 * Return `true` if this label is associated with a `switch` member (`case` or |
| 3526 * `default`). | 5569 * `default`). |
| 3527 */ | 5570 */ |
| 3528 void set isOnSwitchMember(bool _value) { | 5571 void set isOnSwitchMember(bool _value) { |
| 3529 assert(!_finished); | 5572 assert(!_finished); |
| 3530 _isOnSwitchMember = _value; | 5573 _isOnSwitchMember = _value; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 3557 | 5600 |
| 3558 /** | 5601 /** |
| 3559 * Offset of the label relative to the beginning of the file. | 5602 * Offset of the label relative to the beginning of the file. |
| 3560 */ | 5603 */ |
| 3561 void set nameOffset(int _value) { | 5604 void set nameOffset(int _value) { |
| 3562 assert(!_finished); | 5605 assert(!_finished); |
| 3563 assert(_value == null || _value >= 0); | 5606 assert(_value == null || _value >= 0); |
| 3564 _nameOffset = _value; | 5607 _nameOffset = _value; |
| 3565 } | 5608 } |
| 3566 | 5609 |
| 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 |
| 3567 fb.Offset finish(fb.Builder fbBuilder) { | 5623 fb.Offset finish(fb.Builder fbBuilder) { |
| 3568 assert(!_finished); | 5624 assert(!_finished); |
| 3569 _finished = true; | 5625 _finished = true; |
| 3570 fb.Offset offset_name; | 5626 fb.Offset offset_name; |
| 3571 if (_name != null) { | 5627 if (_name != null) { |
| 3572 offset_name = fbBuilder.writeString(_name); | 5628 offset_name = fbBuilder.writeString(_name); |
| 3573 } | 5629 } |
| 3574 fbBuilder.startTable(); | 5630 fbBuilder.startTable(); |
| 3575 if (_isOnSwitchMember == true) { | 5631 if (_isOnSwitchMember == true) { |
| 3576 fbBuilder.addBool(2, true); | 5632 fbBuilder.addBool(2, true); |
| 3577 } | 5633 } |
| 3578 if (_isOnSwitchStatement == true) { | 5634 if (_isOnSwitchStatement == true) { |
| 3579 fbBuilder.addBool(3, true); | 5635 fbBuilder.addBool(3, true); |
| 3580 } | 5636 } |
| 3581 if (offset_name != null) { | 5637 if (offset_name != null) { |
| 3582 fbBuilder.addOffset(0, offset_name); | 5638 fbBuilder.addOffset(0, offset_name); |
| 3583 } | 5639 } |
| 3584 if (_nameOffset != null && _nameOffset != 0) { | 5640 if (_nameOffset != null && _nameOffset != 0) { |
| 3585 fbBuilder.addUint32(1, _nameOffset); | 5641 fbBuilder.addUint32(1, _nameOffset); |
| 3586 } | 5642 } |
| 3587 return fbBuilder.endTable(); | 5643 return fbBuilder.endTable(); |
| 3588 } | 5644 } |
| 5645 } |
| 3589 | 5646 |
| 3590 /** | 5647 class _UnlinkedLabelReader extends fb.TableReader<_UnlinkedLabelImpl> { |
| 3591 * Flush [informative] data recursively. | 5648 const _UnlinkedLabelReader(); |
| 3592 */ | 5649 |
| 3593 void flushInformative() { | 5650 @override |
| 3594 _nameOffset = null; | 5651 _UnlinkedLabelImpl createObject(fb.BufferPointer bp) => new _UnlinkedLabelImpl
(bp); |
| 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; |
| 3595 } | 5686 } |
| 3596 } | 5687 } |
| 3597 | 5688 |
| 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 |
| 3598 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { | 5712 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { |
| 3599 bool _finished = false; | 5713 bool _finished = false; |
| 3600 | 5714 |
| 3601 List<UnlinkedConstBuilder> _annotations; | 5715 List<UnlinkedConstBuilder> _annotations; |
| 3602 CodeRangeBuilder _codeRange; | 5716 CodeRangeBuilder _codeRange; |
| 3603 UnlinkedConstBuilder _defaultValue; | 5717 UnlinkedConstBuilder _defaultValue; |
| 3604 String _defaultValueCode; | 5718 String _defaultValueCode; |
| 3605 int _inferredTypeSlot; | 5719 int _inferredTypeSlot; |
| 3606 UnlinkedExecutableBuilder _initializer; | 5720 UnlinkedExecutableBuilder _initializer; |
| 3607 bool _isFunctionTyped; | 5721 bool _isFunctionTyped; |
| 3608 bool _isInitializingFormal; | 5722 bool _isInitializingFormal; |
| 3609 idl.UnlinkedParamKind _kind; | 5723 idl.UnlinkedParamKind _kind; |
| 3610 String _name; | 5724 String _name; |
| 3611 int _nameOffset; | 5725 int _nameOffset; |
| 3612 List<UnlinkedParamBuilder> _parameters; | 5726 List<UnlinkedParamBuilder> _parameters; |
| 3613 EntityRefBuilder _type; | 5727 EntityRefBuilder _type; |
| 3614 int _visibleLength; | 5728 int _visibleLength; |
| 3615 int _visibleOffset; | 5729 int _visibleOffset; |
| 3616 | 5730 |
| 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 | |
| 3634 @override | 5731 @override |
| 3635 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 5732 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 3636 | 5733 |
| 3637 /** | 5734 /** |
| 3638 * Annotations for this parameter. | 5735 * Annotations for this parameter. |
| 3639 */ | 5736 */ |
| 3640 void set annotations(List<UnlinkedConstBuilder> _value) { | 5737 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 3641 assert(!_finished); | 5738 assert(!_finished); |
| 3642 _annotations = _value; | 5739 _annotations = _value; |
| 3643 } | 5740 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3808 | 5905 |
| 3809 /** | 5906 /** |
| 3810 * The beginning of the visible range. | 5907 * The beginning of the visible range. |
| 3811 */ | 5908 */ |
| 3812 void set visibleOffset(int _value) { | 5909 void set visibleOffset(int _value) { |
| 3813 assert(!_finished); | 5910 assert(!_finished); |
| 3814 assert(_value == null || _value >= 0); | 5911 assert(_value == null || _value >= 0); |
| 3815 _visibleOffset = _value; | 5912 _visibleOffset = _value; |
| 3816 } | 5913 } |
| 3817 | 5914 |
| 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 |
| 3818 fb.Offset finish(fb.Builder fbBuilder) { | 5946 fb.Offset finish(fb.Builder fbBuilder) { |
| 3819 assert(!_finished); | 5947 assert(!_finished); |
| 3820 _finished = true; | 5948 _finished = true; |
| 3821 fb.Offset offset_annotations; | 5949 fb.Offset offset_annotations; |
| 3822 fb.Offset offset_codeRange; | 5950 fb.Offset offset_codeRange; |
| 3823 fb.Offset offset_defaultValue; | 5951 fb.Offset offset_defaultValue; |
| 3824 fb.Offset offset_defaultValueCode; | 5952 fb.Offset offset_defaultValueCode; |
| 3825 fb.Offset offset_initializer; | 5953 fb.Offset offset_initializer; |
| 3826 fb.Offset offset_name; | 5954 fb.Offset offset_name; |
| 3827 fb.Offset offset_parameters; | 5955 fb.Offset offset_parameters; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3891 fbBuilder.addOffset(3, offset_type); | 6019 fbBuilder.addOffset(3, offset_type); |
| 3892 } | 6020 } |
| 3893 if (_visibleLength != null && _visibleLength != 0) { | 6021 if (_visibleLength != null && _visibleLength != 0) { |
| 3894 fbBuilder.addUint32(10, _visibleLength); | 6022 fbBuilder.addUint32(10, _visibleLength); |
| 3895 } | 6023 } |
| 3896 if (_visibleOffset != null && _visibleOffset != 0) { | 6024 if (_visibleOffset != null && _visibleOffset != 0) { |
| 3897 fbBuilder.addUint32(11, _visibleOffset); | 6025 fbBuilder.addUint32(11, _visibleOffset); |
| 3898 } | 6026 } |
| 3899 return fbBuilder.endTable(); | 6027 return fbBuilder.endTable(); |
| 3900 } | 6028 } |
| 6029 } |
| 3901 | 6030 |
| 3902 /** | 6031 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { |
| 3903 * Flush [informative] data recursively. | 6032 const _UnlinkedParamReader(); |
| 3904 */ | 6033 |
| 3905 void flushInformative() { | 6034 @override |
| 3906 _annotations?.forEach((b) => b.flushInformative()); | 6035 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); |
| 3907 _codeRange = null; | 6036 } |
| 3908 _defaultValue?.flushInformative(); | 6037 |
| 3909 _defaultValueCode = null; | 6038 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { |
| 3910 _initializer?.flushInformative(); | 6039 final fb.BufferPointer _bp; |
| 3911 _nameOffset = null; | 6040 |
| 3912 _parameters?.forEach((b) => b.flushInformative()); | 6041 _UnlinkedParamImpl(this._bp); |
| 3913 _type?.flushInformative(); | 6042 |
| 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; |
| 3914 } | 6063 } |
| 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()); |
| 3915 } | 6193 } |
| 3916 | 6194 |
| 3917 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl.
UnlinkedPart { | 6195 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl.
UnlinkedPart { |
| 3918 bool _finished = false; | 6196 bool _finished = false; |
| 3919 | 6197 |
| 3920 List<UnlinkedConstBuilder> _annotations; | 6198 List<UnlinkedConstBuilder> _annotations; |
| 3921 int _uriEnd; | 6199 int _uriEnd; |
| 3922 int _uriOffset; | 6200 int _uriOffset; |
| 3923 | 6201 |
| 3924 UnlinkedPartBuilder({List<UnlinkedConstBuilder> annotations, int uriEnd, int u
riOffset}) | |
| 3925 : _annotations = annotations, | |
| 3926 _uriEnd = uriEnd, | |
| 3927 _uriOffset = uriOffset; | |
| 3928 | |
| 3929 @override | 6202 @override |
| 3930 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 6203 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 3931 | 6204 |
| 3932 /** | 6205 /** |
| 3933 * Annotations for this part declaration. | 6206 * Annotations for this part declaration. |
| 3934 */ | 6207 */ |
| 3935 void set annotations(List<UnlinkedConstBuilder> _value) { | 6208 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 3936 assert(!_finished); | 6209 assert(!_finished); |
| 3937 _annotations = _value; | 6210 _annotations = _value; |
| 3938 } | 6211 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3956 /** | 6229 /** |
| 3957 * Offset of the URI string (including quotes) relative to the beginning of | 6230 * Offset of the URI string (including quotes) relative to the beginning of |
| 3958 * the file. | 6231 * the file. |
| 3959 */ | 6232 */ |
| 3960 void set uriOffset(int _value) { | 6233 void set uriOffset(int _value) { |
| 3961 assert(!_finished); | 6234 assert(!_finished); |
| 3962 assert(_value == null || _value >= 0); | 6235 assert(_value == null || _value >= 0); |
| 3963 _uriOffset = _value; | 6236 _uriOffset = _value; |
| 3964 } | 6237 } |
| 3965 | 6238 |
| 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 |
| 3966 fb.Offset finish(fb.Builder fbBuilder) { | 6253 fb.Offset finish(fb.Builder fbBuilder) { |
| 3967 assert(!_finished); | 6254 assert(!_finished); |
| 3968 _finished = true; | 6255 _finished = true; |
| 3969 fb.Offset offset_annotations; | 6256 fb.Offset offset_annotations; |
| 3970 if (!(_annotations == null || _annotations.isEmpty)) { | 6257 if (!(_annotations == null || _annotations.isEmpty)) { |
| 3971 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 6258 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 3972 } | 6259 } |
| 3973 fbBuilder.startTable(); | 6260 fbBuilder.startTable(); |
| 3974 if (offset_annotations != null) { | 6261 if (offset_annotations != null) { |
| 3975 fbBuilder.addOffset(2, offset_annotations); | 6262 fbBuilder.addOffset(2, offset_annotations); |
| 3976 } | 6263 } |
| 3977 if (_uriEnd != null && _uriEnd != 0) { | 6264 if (_uriEnd != null && _uriEnd != 0) { |
| 3978 fbBuilder.addUint32(0, _uriEnd); | 6265 fbBuilder.addUint32(0, _uriEnd); |
| 3979 } | 6266 } |
| 3980 if (_uriOffset != null && _uriOffset != 0) { | 6267 if (_uriOffset != null && _uriOffset != 0) { |
| 3981 fbBuilder.addUint32(1, _uriOffset); | 6268 fbBuilder.addUint32(1, _uriOffset); |
| 3982 } | 6269 } |
| 3983 return fbBuilder.endTable(); | 6270 return fbBuilder.endTable(); |
| 3984 } | 6271 } |
| 6272 } |
| 3985 | 6273 |
| 3986 /** | 6274 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> { |
| 3987 * Flush [informative] data recursively. | 6275 const _UnlinkedPartReader(); |
| 3988 */ | 6276 |
| 3989 void flushInformative() { | 6277 @override |
| 3990 _annotations?.forEach((b) => b.flushInformative()); | 6278 _UnlinkedPartImpl createObject(fb.BufferPointer bp) => new _UnlinkedPartImpl(b
p); |
| 3991 _uriEnd = null; | 6279 } |
| 3992 _uriOffset = null; | 6280 |
| 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; |
| 3993 } | 6306 } |
| 3994 } | 6307 } |
| 3995 | 6308 |
| 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 |
| 3996 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp
lements idl.UnlinkedPublicName { | 6330 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp
lements idl.UnlinkedPublicName { |
| 3997 bool _finished = false; | 6331 bool _finished = false; |
| 3998 | 6332 |
| 3999 idl.ReferenceKind _kind; | 6333 idl.ReferenceKind _kind; |
| 4000 List<UnlinkedPublicNameBuilder> _members; | 6334 List<UnlinkedPublicNameBuilder> _members; |
| 4001 String _name; | 6335 String _name; |
| 4002 int _numTypeParameters; | 6336 int _numTypeParameters; |
| 4003 | 6337 |
| 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 | |
| 4010 @override | 6338 @override |
| 4011 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; | 6339 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; |
| 4012 | 6340 |
| 4013 /** | 6341 /** |
| 4014 * The kind of object referred to by the name. | 6342 * The kind of object referred to by the name. |
| 4015 */ | 6343 */ |
| 4016 void set kind(idl.ReferenceKind _value) { | 6344 void set kind(idl.ReferenceKind _value) { |
| 4017 assert(!_finished); | 6345 assert(!_finished); |
| 4018 _kind = _value; | 6346 _kind = _value; |
| 4019 } | 6347 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4051 /** | 6379 /** |
| 4052 * If the entity being referred to is generic, the number of type parameters | 6380 * If the entity being referred to is generic, the number of type parameters |
| 4053 * it accepts. Otherwise zero. | 6381 * it accepts. Otherwise zero. |
| 4054 */ | 6382 */ |
| 4055 void set numTypeParameters(int _value) { | 6383 void set numTypeParameters(int _value) { |
| 4056 assert(!_finished); | 6384 assert(!_finished); |
| 4057 assert(_value == null || _value >= 0); | 6385 assert(_value == null || _value >= 0); |
| 4058 _numTypeParameters = _value; | 6386 _numTypeParameters = _value; |
| 4059 } | 6387 } |
| 4060 | 6388 |
| 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 |
| 4061 fb.Offset finish(fb.Builder fbBuilder) { | 6402 fb.Offset finish(fb.Builder fbBuilder) { |
| 4062 assert(!_finished); | 6403 assert(!_finished); |
| 4063 _finished = true; | 6404 _finished = true; |
| 4064 fb.Offset offset_members; | 6405 fb.Offset offset_members; |
| 4065 fb.Offset offset_name; | 6406 fb.Offset offset_name; |
| 4066 if (!(_members == null || _members.isEmpty)) { | 6407 if (!(_members == null || _members.isEmpty)) { |
| 4067 offset_members = fbBuilder.writeList(_members.map((b) => b.finish(fbBuilde
r)).toList()); | 6408 offset_members = fbBuilder.writeList(_members.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4068 } | 6409 } |
| 4069 if (_name != null) { | 6410 if (_name != null) { |
| 4070 offset_name = fbBuilder.writeString(_name); | 6411 offset_name = fbBuilder.writeString(_name); |
| 4071 } | 6412 } |
| 4072 fbBuilder.startTable(); | 6413 fbBuilder.startTable(); |
| 4073 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { | 6414 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { |
| 4074 fbBuilder.addUint8(1, _kind.index); | 6415 fbBuilder.addUint8(1, _kind.index); |
| 4075 } | 6416 } |
| 4076 if (offset_members != null) { | 6417 if (offset_members != null) { |
| 4077 fbBuilder.addOffset(2, offset_members); | 6418 fbBuilder.addOffset(2, offset_members); |
| 4078 } | 6419 } |
| 4079 if (offset_name != null) { | 6420 if (offset_name != null) { |
| 4080 fbBuilder.addOffset(0, offset_name); | 6421 fbBuilder.addOffset(0, offset_name); |
| 4081 } | 6422 } |
| 4082 if (_numTypeParameters != null && _numTypeParameters != 0) { | 6423 if (_numTypeParameters != null && _numTypeParameters != 0) { |
| 4083 fbBuilder.addUint32(3, _numTypeParameters); | 6424 fbBuilder.addUint32(3, _numTypeParameters); |
| 4084 } | 6425 } |
| 4085 return fbBuilder.endTable(); | 6426 return fbBuilder.endTable(); |
| 4086 } | 6427 } |
| 6428 } |
| 4087 | 6429 |
| 4088 /** | 6430 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl>
{ |
| 4089 * Flush [informative] data recursively. | 6431 const _UnlinkedPublicNameReader(); |
| 4090 */ | 6432 |
| 4091 void flushInformative() { | 6433 @override |
| 4092 _members?.forEach((b) => b.flushInformative()); | 6434 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl
icNameImpl(bp); |
| 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 } |
| 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; |
| 4093 } | 6469 } |
| 4094 } | 6470 } |
| 4095 | 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 } |
| 6494 |
| 4096 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac
eMixin implements idl.UnlinkedPublicNamespace { | 6495 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac
eMixin implements idl.UnlinkedPublicNamespace { |
| 4097 bool _finished = false; | 6496 bool _finished = false; |
| 4098 | 6497 |
| 4099 List<UnlinkedExportPublicBuilder> _exports; | 6498 List<UnlinkedExportPublicBuilder> _exports; |
| 4100 List<UnlinkedPublicNameBuilder> _names; | 6499 List<UnlinkedPublicNameBuilder> _names; |
| 4101 List<String> _parts; | 6500 List<String> _parts; |
| 4102 | 6501 |
| 4103 UnlinkedPublicNamespaceBuilder({List<UnlinkedExportPublicBuilder> exports, Lis
t<UnlinkedPublicNameBuilder> names, List<String> parts}) | |
| 4104 : _exports = exports, | |
| 4105 _names = names, | |
| 4106 _parts = parts; | |
| 4107 | |
| 4108 @override | 6502 @override |
| 4109 List<UnlinkedExportPublicBuilder> get exports => _exports ??= <UnlinkedExportP
ublicBuilder>[]; | 6503 List<UnlinkedExportPublicBuilder> get exports => _exports ??= <UnlinkedExportP
ublicBuilder>[]; |
| 4110 | 6504 |
| 4111 /** | 6505 /** |
| 4112 * Export declarations in the compilation unit. | 6506 * Export declarations in the compilation unit. |
| 4113 */ | 6507 */ |
| 4114 void set exports(List<UnlinkedExportPublicBuilder> _value) { | 6508 void set exports(List<UnlinkedExportPublicBuilder> _value) { |
| 4115 assert(!_finished); | 6509 assert(!_finished); |
| 4116 _exports = _value; | 6510 _exports = _value; |
| 4117 } | 6511 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4134 List<String> get parts => _parts ??= <String>[]; | 6528 List<String> get parts => _parts ??= <String>[]; |
| 4135 | 6529 |
| 4136 /** | 6530 /** |
| 4137 * URIs referenced by part declarations in the compilation unit. | 6531 * URIs referenced by part declarations in the compilation unit. |
| 4138 */ | 6532 */ |
| 4139 void set parts(List<String> _value) { | 6533 void set parts(List<String> _value) { |
| 4140 assert(!_finished); | 6534 assert(!_finished); |
| 4141 _parts = _value; | 6535 _parts = _value; |
| 4142 } | 6536 } |
| 4143 | 6537 |
| 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 |
| 4144 fb.Offset finish(fb.Builder fbBuilder) { | 6556 fb.Offset finish(fb.Builder fbBuilder) { |
| 4145 assert(!_finished); | 6557 assert(!_finished); |
| 4146 _finished = true; | 6558 _finished = true; |
| 4147 fb.Offset offset_exports; | 6559 fb.Offset offset_exports; |
| 4148 fb.Offset offset_names; | 6560 fb.Offset offset_names; |
| 4149 fb.Offset offset_parts; | 6561 fb.Offset offset_parts; |
| 4150 if (!(_exports == null || _exports.isEmpty)) { | 6562 if (!(_exports == null || _exports.isEmpty)) { |
| 4151 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); | 6563 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4152 } | 6564 } |
| 4153 if (!(_names == null || _names.isEmpty)) { | 6565 if (!(_names == null || _names.isEmpty)) { |
| 4154 offset_names = fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)).
toList()); | 6566 offset_names = fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)).
toList()); |
| 4155 } | 6567 } |
| 4156 if (!(_parts == null || _parts.isEmpty)) { | 6568 if (!(_parts == null || _parts.isEmpty)) { |
| 4157 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); | 6569 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); |
| 4158 } | 6570 } |
| 4159 fbBuilder.startTable(); | 6571 fbBuilder.startTable(); |
| 4160 if (offset_exports != null) { | 6572 if (offset_exports != null) { |
| 4161 fbBuilder.addOffset(2, offset_exports); | 6573 fbBuilder.addOffset(2, offset_exports); |
| 4162 } | 6574 } |
| 4163 if (offset_names != null) { | 6575 if (offset_names != null) { |
| 4164 fbBuilder.addOffset(0, offset_names); | 6576 fbBuilder.addOffset(0, offset_names); |
| 4165 } | 6577 } |
| 4166 if (offset_parts != null) { | 6578 if (offset_parts != null) { |
| 4167 fbBuilder.addOffset(1, offset_parts); | 6579 fbBuilder.addOffset(1, offset_parts); |
| 4168 } | 6580 } |
| 4169 return fbBuilder.endTable(); | 6581 return fbBuilder.endTable(); |
| 4170 } | 6582 } |
| 6583 } |
| 4171 | 6584 |
| 4172 /** | 6585 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) { |
| 4173 * Flush [informative] data recursively. | 6586 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 4174 */ | 6587 return const _UnlinkedPublicNamespaceReader().read(rootRef); |
| 4175 void flushInformative() { | 6588 } |
| 4176 _exports?.forEach((b) => b.flushInformative()); | 6589 |
| 4177 _names?.forEach((b) => b.flushInformative()); | 6590 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames
paceImpl> { |
| 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; |
| 4178 } | 6610 } |
| 4179 | 6611 |
| 4180 List<int> toBuffer() { | 6612 @override |
| 4181 fb.Builder fbBuilder = new fb.Builder(); | 6613 List<idl.UnlinkedPublicName> get names { |
| 4182 return fbBuilder.finish(finish(fbBuilder), "UPNS"); | 6614 _names ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPublic
NameReader()).vTableGet(_bp, 0, const <idl.UnlinkedPublicName>[]); |
| 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; |
| 4183 } | 6622 } |
| 4184 } | 6623 } |
| 4185 | 6624 |
| 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 |
| 4186 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple
ments idl.UnlinkedReference { | 6646 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple
ments idl.UnlinkedReference { |
| 4187 bool _finished = false; | 6647 bool _finished = false; |
| 4188 | 6648 |
| 4189 String _name; | 6649 String _name; |
| 4190 int _prefixReference; | 6650 int _prefixReference; |
| 4191 | 6651 |
| 4192 UnlinkedReferenceBuilder({String name, int prefixReference}) | |
| 4193 : _name = name, | |
| 4194 _prefixReference = prefixReference; | |
| 4195 | |
| 4196 @override | 6652 @override |
| 4197 String get name => _name ??= ''; | 6653 String get name => _name ??= ''; |
| 4198 | 6654 |
| 4199 /** | 6655 /** |
| 4200 * Name of the entity being referred to. For the pseudo-type `dynamic`, the | 6656 * Name of the entity being referred to. For the pseudo-type `dynamic`, the |
| 4201 * string is "dynamic". For the pseudo-type `void`, the string is "void". | 6657 * string is "dynamic". For the pseudo-type `void`, the string is "void". |
| 4202 * For the pseudo-type `bottom`, the string is "*bottom*". | 6658 * For the pseudo-type `bottom`, the string is "*bottom*". |
| 4203 */ | 6659 */ |
| 4204 void set name(String _value) { | 6660 void set name(String _value) { |
| 4205 assert(!_finished); | 6661 assert(!_finished); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 4216 * Prefix references must always point backward; that is, for all i, if | 6672 * Prefix references must always point backward; that is, for all i, if |
| 4217 * UnlinkedUnit.references[i].prefixReference != 0, then | 6673 * UnlinkedUnit.references[i].prefixReference != 0, then |
| 4218 * UnlinkedUnit.references[i].prefixReference < i. | 6674 * UnlinkedUnit.references[i].prefixReference < i. |
| 4219 */ | 6675 */ |
| 4220 void set prefixReference(int _value) { | 6676 void set prefixReference(int _value) { |
| 4221 assert(!_finished); | 6677 assert(!_finished); |
| 4222 assert(_value == null || _value >= 0); | 6678 assert(_value == null || _value >= 0); |
| 4223 _prefixReference = _value; | 6679 _prefixReference = _value; |
| 4224 } | 6680 } |
| 4225 | 6681 |
| 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 |
| 4226 fb.Offset finish(fb.Builder fbBuilder) { | 6692 fb.Offset finish(fb.Builder fbBuilder) { |
| 4227 assert(!_finished); | 6693 assert(!_finished); |
| 4228 _finished = true; | 6694 _finished = true; |
| 4229 fb.Offset offset_name; | 6695 fb.Offset offset_name; |
| 4230 if (_name != null) { | 6696 if (_name != null) { |
| 4231 offset_name = fbBuilder.writeString(_name); | 6697 offset_name = fbBuilder.writeString(_name); |
| 4232 } | 6698 } |
| 4233 fbBuilder.startTable(); | 6699 fbBuilder.startTable(); |
| 4234 if (offset_name != null) { | 6700 if (offset_name != null) { |
| 4235 fbBuilder.addOffset(0, offset_name); | 6701 fbBuilder.addOffset(0, offset_name); |
| 4236 } | 6702 } |
| 4237 if (_prefixReference != null && _prefixReference != 0) { | 6703 if (_prefixReference != null && _prefixReference != 0) { |
| 4238 fbBuilder.addUint32(1, _prefixReference); | 6704 fbBuilder.addUint32(1, _prefixReference); |
| 4239 } | 6705 } |
| 4240 return fbBuilder.endTable(); | 6706 return fbBuilder.endTable(); |
| 4241 } | 6707 } |
| 6708 } |
| 4242 | 6709 |
| 4243 /** | 6710 class _UnlinkedReferenceReader extends fb.TableReader<_UnlinkedReferenceImpl> { |
| 4244 * Flush [informative] data recursively. | 6711 const _UnlinkedReferenceReader(); |
| 4245 */ | 6712 |
| 4246 void flushInformative() { | 6713 @override |
| 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; |
| 4247 } | 6735 } |
| 4248 } | 6736 } |
| 4249 | 6737 |
| 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 |
| 4250 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { | 6757 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { |
| 4251 bool _finished = false; | 6758 bool _finished = false; |
| 4252 | 6759 |
| 4253 List<UnlinkedConstBuilder> _annotations; | 6760 List<UnlinkedConstBuilder> _annotations; |
| 4254 CodeRangeBuilder _codeRange; | 6761 CodeRangeBuilder _codeRange; |
| 4255 UnlinkedDocumentationCommentBuilder _documentationComment; | 6762 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 4256 String _name; | 6763 String _name; |
| 4257 int _nameOffset; | 6764 int _nameOffset; |
| 4258 List<UnlinkedParamBuilder> _parameters; | 6765 List<UnlinkedParamBuilder> _parameters; |
| 4259 EntityRefBuilder _returnType; | 6766 EntityRefBuilder _returnType; |
| 4260 List<UnlinkedTypeParamBuilder> _typeParameters; | 6767 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 4261 | 6768 |
| 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 | |
| 4272 @override | 6769 @override |
| 4273 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 6770 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 4274 | 6771 |
| 4275 /** | 6772 /** |
| 4276 * Annotations for this typedef. | 6773 * Annotations for this typedef. |
| 4277 */ | 6774 */ |
| 4278 void set annotations(List<UnlinkedConstBuilder> _value) { | 6775 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 4279 assert(!_finished); | 6776 assert(!_finished); |
| 4280 _annotations = _value; | 6777 _annotations = _value; |
| 4281 } | 6778 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4352 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 6849 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
| 4353 | 6850 |
| 4354 /** | 6851 /** |
| 4355 * Type parameters of the typedef, if any. | 6852 * Type parameters of the typedef, if any. |
| 4356 */ | 6853 */ |
| 4357 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 6854 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 4358 assert(!_finished); | 6855 assert(!_finished); |
| 4359 _typeParameters = _value; | 6856 _typeParameters = _value; |
| 4360 } | 6857 } |
| 4361 | 6858 |
| 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 |
| 4362 fb.Offset finish(fb.Builder fbBuilder) { | 6882 fb.Offset finish(fb.Builder fbBuilder) { |
| 4363 assert(!_finished); | 6883 assert(!_finished); |
| 4364 _finished = true; | 6884 _finished = true; |
| 4365 fb.Offset offset_annotations; | 6885 fb.Offset offset_annotations; |
| 4366 fb.Offset offset_codeRange; | 6886 fb.Offset offset_codeRange; |
| 4367 fb.Offset offset_documentationComment; | 6887 fb.Offset offset_documentationComment; |
| 4368 fb.Offset offset_name; | 6888 fb.Offset offset_name; |
| 4369 fb.Offset offset_parameters; | 6889 fb.Offset offset_parameters; |
| 4370 fb.Offset offset_returnType; | 6890 fb.Offset offset_returnType; |
| 4371 fb.Offset offset_typeParameters; | 6891 fb.Offset offset_typeParameters; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4410 fbBuilder.addOffset(3, offset_parameters); | 6930 fbBuilder.addOffset(3, offset_parameters); |
| 4411 } | 6931 } |
| 4412 if (offset_returnType != null) { | 6932 if (offset_returnType != null) { |
| 4413 fbBuilder.addOffset(2, offset_returnType); | 6933 fbBuilder.addOffset(2, offset_returnType); |
| 4414 } | 6934 } |
| 4415 if (offset_typeParameters != null) { | 6935 if (offset_typeParameters != null) { |
| 4416 fbBuilder.addOffset(5, offset_typeParameters); | 6936 fbBuilder.addOffset(5, offset_typeParameters); |
| 4417 } | 6937 } |
| 4418 return fbBuilder.endTable(); | 6938 return fbBuilder.endTable(); |
| 4419 } | 6939 } |
| 6940 } |
| 4420 | 6941 |
| 4421 /** | 6942 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { |
| 4422 * Flush [informative] data recursively. | 6943 const _UnlinkedTypedefReader(); |
| 4423 */ | 6944 |
| 4424 void flushInformative() { | 6945 @override |
| 4425 _annotations?.forEach((b) => b.flushInformative()); | 6946 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); |
| 4426 _codeRange = null; | 6947 } |
| 4427 _documentationComment = null; | 6948 |
| 4428 _nameOffset = null; | 6949 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { |
| 4429 _parameters?.forEach((b) => b.flushInformative()); | 6950 final fb.BufferPointer _bp; |
| 4430 _returnType?.flushInformative(); | 6951 |
| 4431 _typeParameters?.forEach((b) => b.flushInformative()); | 6952 _UnlinkedTypedefImpl(this._bp); |
| 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; |
| 4432 } | 6967 } |
| 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()); |
| 4433 } | 7041 } |
| 4434 | 7042 |
| 4435 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { | 7043 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { |
| 4436 bool _finished = false; | 7044 bool _finished = false; |
| 4437 | 7045 |
| 4438 List<UnlinkedConstBuilder> _annotations; | 7046 List<UnlinkedConstBuilder> _annotations; |
| 4439 EntityRefBuilder _bound; | 7047 EntityRefBuilder _bound; |
| 4440 CodeRangeBuilder _codeRange; | 7048 CodeRangeBuilder _codeRange; |
| 4441 String _name; | 7049 String _name; |
| 4442 int _nameOffset; | 7050 int _nameOffset; |
| 4443 | 7051 |
| 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 | |
| 4451 @override | 7052 @override |
| 4452 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 7053 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 4453 | 7054 |
| 4454 /** | 7055 /** |
| 4455 * Annotations for this type parameter. | 7056 * Annotations for this type parameter. |
| 4456 */ | 7057 */ |
| 4457 void set annotations(List<UnlinkedConstBuilder> _value) { | 7058 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 4458 assert(!_finished); | 7059 assert(!_finished); |
| 4459 _annotations = _value; | 7060 _annotations = _value; |
| 4460 } | 7061 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4498 | 7099 |
| 4499 /** | 7100 /** |
| 4500 * Offset of the type parameter name relative to the beginning of the file. | 7101 * Offset of the type parameter name relative to the beginning of the file. |
| 4501 */ | 7102 */ |
| 4502 void set nameOffset(int _value) { | 7103 void set nameOffset(int _value) { |
| 4503 assert(!_finished); | 7104 assert(!_finished); |
| 4504 assert(_value == null || _value >= 0); | 7105 assert(_value == null || _value >= 0); |
| 4505 _nameOffset = _value; | 7106 _nameOffset = _value; |
| 4506 } | 7107 } |
| 4507 | 7108 |
| 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 |
| 4508 fb.Offset finish(fb.Builder fbBuilder) { | 7126 fb.Offset finish(fb.Builder fbBuilder) { |
| 4509 assert(!_finished); | 7127 assert(!_finished); |
| 4510 _finished = true; | 7128 _finished = true; |
| 4511 fb.Offset offset_annotations; | 7129 fb.Offset offset_annotations; |
| 4512 fb.Offset offset_bound; | 7130 fb.Offset offset_bound; |
| 4513 fb.Offset offset_codeRange; | 7131 fb.Offset offset_codeRange; |
| 4514 fb.Offset offset_name; | 7132 fb.Offset offset_name; |
| 4515 if (!(_annotations == null || _annotations.isEmpty)) { | 7133 if (!(_annotations == null || _annotations.isEmpty)) { |
| 4516 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 7134 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 4517 } | 7135 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4535 fbBuilder.addOffset(4, offset_codeRange); | 7153 fbBuilder.addOffset(4, offset_codeRange); |
| 4536 } | 7154 } |
| 4537 if (offset_name != null) { | 7155 if (offset_name != null) { |
| 4538 fbBuilder.addOffset(0, offset_name); | 7156 fbBuilder.addOffset(0, offset_name); |
| 4539 } | 7157 } |
| 4540 if (_nameOffset != null && _nameOffset != 0) { | 7158 if (_nameOffset != null && _nameOffset != 0) { |
| 4541 fbBuilder.addUint32(1, _nameOffset); | 7159 fbBuilder.addUint32(1, _nameOffset); |
| 4542 } | 7160 } |
| 4543 return fbBuilder.endTable(); | 7161 return fbBuilder.endTable(); |
| 4544 } | 7162 } |
| 7163 } |
| 4545 | 7164 |
| 4546 /** | 7165 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { |
| 4547 * Flush [informative] data recursively. | 7166 const _UnlinkedTypeParamReader(); |
| 4548 */ | 7167 |
| 4549 void flushInformative() { | 7168 @override |
| 4550 _annotations?.forEach((b) => b.flushInformative()); | 7169 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); |
| 4551 _bound?.flushInformative(); | 7170 } |
| 4552 _codeRange = null; | 7171 |
| 4553 _nameOffset = null; | 7172 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { |
| 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; |
| 4554 } | 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 } |
| 7212 } |
| 7213 |
| 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()); |
| 4555 } | 7237 } |
| 4556 | 7238 |
| 4557 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { | 7239 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { |
| 4558 bool _finished = false; | 7240 bool _finished = false; |
| 4559 | 7241 |
| 4560 String _fallbackModePath; | |
| 4561 List<UnlinkedClassBuilder> _classes; | 7242 List<UnlinkedClassBuilder> _classes; |
| 4562 CodeRangeBuilder _codeRange; | 7243 CodeRangeBuilder _codeRange; |
| 4563 List<UnlinkedEnumBuilder> _enums; | 7244 List<UnlinkedEnumBuilder> _enums; |
| 4564 List<UnlinkedExecutableBuilder> _executables; | 7245 List<UnlinkedExecutableBuilder> _executables; |
| 4565 List<UnlinkedExportNonPublicBuilder> _exports; | 7246 List<UnlinkedExportNonPublicBuilder> _exports; |
| 7247 String _fallbackModePath; |
| 4566 List<UnlinkedImportBuilder> _imports; | 7248 List<UnlinkedImportBuilder> _imports; |
| 4567 List<UnlinkedConstBuilder> _libraryAnnotations; | 7249 List<UnlinkedConstBuilder> _libraryAnnotations; |
| 4568 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; | 7250 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; |
| 4569 String _libraryName; | 7251 String _libraryName; |
| 4570 int _libraryNameLength; | 7252 int _libraryNameLength; |
| 4571 int _libraryNameOffset; | 7253 int _libraryNameOffset; |
| 4572 List<UnlinkedPartBuilder> _parts; | 7254 List<UnlinkedPartBuilder> _parts; |
| 4573 UnlinkedPublicNamespaceBuilder _publicNamespace; | 7255 UnlinkedPublicNamespaceBuilder _publicNamespace; |
| 4574 List<UnlinkedReferenceBuilder> _references; | 7256 List<UnlinkedReferenceBuilder> _references; |
| 4575 List<UnlinkedTypedefBuilder> _typedefs; | 7257 List<UnlinkedTypedefBuilder> _typedefs; |
| 4576 List<UnlinkedVariableBuilder> _variables; | 7258 List<UnlinkedVariableBuilder> _variables; |
| 4577 | 7259 |
| 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}) | |
| 4579 : _fallbackModePath = fallbackModePath, | |
| 4580 _classes = classes, | |
| 4581 _codeRange = codeRange, | |
| 4582 _enums = enums, | |
| 4583 _executables = executables, | |
| 4584 _exports = exports, | |
| 4585 _imports = imports, | |
| 4586 _libraryAnnotations = libraryAnnotations, | |
| 4587 _libraryDocumentationComment = libraryDocumentationComment, | |
| 4588 _libraryName = libraryName, | |
| 4589 _libraryNameLength = libraryNameLength, | |
| 4590 _libraryNameOffset = libraryNameOffset, | |
| 4591 _parts = parts, | |
| 4592 _publicNamespace = publicNamespace, | |
| 4593 _references = references, | |
| 4594 _typedefs = typedefs, | |
| 4595 _variables = variables; | |
| 4596 | |
| 4597 @override | 7260 @override |
| 4598 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; | 7261 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; |
| 4599 | 7262 |
| 4600 /** | 7263 /** |
| 4601 * Classes declared in the compilation unit. | 7264 * Classes declared in the compilation unit. |
| 4602 */ | 7265 */ |
| 4603 void set classes(List<UnlinkedClassBuilder> _value) { | 7266 void set classes(List<UnlinkedClassBuilder> _value) { |
| 4604 assert(!_finished); | 7267 assert(!_finished); |
| 4605 _classes = _value; | 7268 _classes = _value; |
| 4606 } | 7269 } |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4789 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; | 7452 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; |
| 4790 | 7453 |
| 4791 /** | 7454 /** |
| 4792 * Top level variables declared in the compilation unit. | 7455 * Top level variables declared in the compilation unit. |
| 4793 */ | 7456 */ |
| 4794 void set variables(List<UnlinkedVariableBuilder> _value) { | 7457 void set variables(List<UnlinkedVariableBuilder> _value) { |
| 4795 assert(!_finished); | 7458 assert(!_finished); |
| 4796 _variables = _value; | 7459 _variables = _value; |
| 4797 } | 7460 } |
| 4798 | 7461 |
| 7462 UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, CodeRangeBuilder code
Range, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executab
les, List<UnlinkedExportNonPublicBuilder> exports, String fallbackModePath, 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 : _classes = classes, |
| 7464 _codeRange = codeRange, |
| 7465 _enums = enums, |
| 7466 _executables = executables, |
| 7467 _exports = exports, |
| 7468 _fallbackModePath = fallbackModePath, |
| 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 |
| 4799 fb.Offset finish(fb.Builder fbBuilder) { | 7507 fb.Offset finish(fb.Builder fbBuilder) { |
| 4800 assert(!_finished); | 7508 assert(!_finished); |
| 4801 _finished = true; | 7509 _finished = true; |
| 4802 fb.Offset offset_fallbackModePath; | |
| 4803 fb.Offset offset_classes; | 7510 fb.Offset offset_classes; |
| 4804 fb.Offset offset_codeRange; | 7511 fb.Offset offset_codeRange; |
| 4805 fb.Offset offset_enums; | 7512 fb.Offset offset_enums; |
| 4806 fb.Offset offset_executables; | 7513 fb.Offset offset_executables; |
| 4807 fb.Offset offset_exports; | 7514 fb.Offset offset_exports; |
| 7515 fb.Offset offset_fallbackModePath; |
| 4808 fb.Offset offset_imports; | 7516 fb.Offset offset_imports; |
| 4809 fb.Offset offset_libraryAnnotations; | 7517 fb.Offset offset_libraryAnnotations; |
| 4810 fb.Offset offset_libraryDocumentationComment; | 7518 fb.Offset offset_libraryDocumentationComment; |
| 4811 fb.Offset offset_libraryName; | 7519 fb.Offset offset_libraryName; |
| 4812 fb.Offset offset_parts; | 7520 fb.Offset offset_parts; |
| 4813 fb.Offset offset_publicNamespace; | 7521 fb.Offset offset_publicNamespace; |
| 4814 fb.Offset offset_references; | 7522 fb.Offset offset_references; |
| 4815 fb.Offset offset_typedefs; | 7523 fb.Offset offset_typedefs; |
| 4816 fb.Offset offset_variables; | 7524 fb.Offset offset_variables; |
| 4817 if (_fallbackModePath != null) { | |
| 4818 offset_fallbackModePath = fbBuilder.writeString(_fallbackModePath); | |
| 4819 } | |
| 4820 if (!(_classes == null || _classes.isEmpty)) { | 7525 if (!(_classes == null || _classes.isEmpty)) { |
| 4821 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde
r)).toList()); | 7526 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4822 } | 7527 } |
| 4823 if (_codeRange != null) { | 7528 if (_codeRange != null) { |
| 4824 offset_codeRange = _codeRange.finish(fbBuilder); | 7529 offset_codeRange = _codeRange.finish(fbBuilder); |
| 4825 } | 7530 } |
| 4826 if (!(_enums == null || _enums.isEmpty)) { | 7531 if (!(_enums == null || _enums.isEmpty)) { |
| 4827 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).
toList()); | 7532 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).
toList()); |
| 4828 } | 7533 } |
| 4829 if (!(_executables == null || _executables.isEmpty)) { | 7534 if (!(_executables == null || _executables.isEmpty)) { |
| 4830 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | 7535 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); |
| 4831 } | 7536 } |
| 4832 if (!(_exports == null || _exports.isEmpty)) { | 7537 if (!(_exports == null || _exports.isEmpty)) { |
| 4833 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); | 7538 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4834 } | 7539 } |
| 7540 if (_fallbackModePath != null) { |
| 7541 offset_fallbackModePath = fbBuilder.writeString(_fallbackModePath); |
| 7542 } |
| 4835 if (!(_imports == null || _imports.isEmpty)) { | 7543 if (!(_imports == null || _imports.isEmpty)) { |
| 4836 offset_imports = fbBuilder.writeList(_imports.map((b) => b.finish(fbBuilde
r)).toList()); | 7544 offset_imports = fbBuilder.writeList(_imports.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4837 } | 7545 } |
| 4838 if (!(_libraryAnnotations == null || _libraryAnnotations.isEmpty)) { | 7546 if (!(_libraryAnnotations == null || _libraryAnnotations.isEmpty)) { |
| 4839 offset_libraryAnnotations = fbBuilder.writeList(_libraryAnnotations.map((b
) => b.finish(fbBuilder)).toList()); | 7547 offset_libraryAnnotations = fbBuilder.writeList(_libraryAnnotations.map((b
) => b.finish(fbBuilder)).toList()); |
| 4840 } | 7548 } |
| 4841 if (_libraryDocumentationComment != null) { | 7549 if (_libraryDocumentationComment != null) { |
| 4842 offset_libraryDocumentationComment = _libraryDocumentationComment.finish(f
bBuilder); | 7550 offset_libraryDocumentationComment = _libraryDocumentationComment.finish(f
bBuilder); |
| 4843 } | 7551 } |
| 4844 if (_libraryName != null) { | 7552 if (_libraryName != null) { |
| 4845 offset_libraryName = fbBuilder.writeString(_libraryName); | 7553 offset_libraryName = fbBuilder.writeString(_libraryName); |
| 4846 } | 7554 } |
| 4847 if (!(_parts == null || _parts.isEmpty)) { | 7555 if (!(_parts == null || _parts.isEmpty)) { |
| 4848 offset_parts = fbBuilder.writeList(_parts.map((b) => b.finish(fbBuilder)).
toList()); | 7556 offset_parts = fbBuilder.writeList(_parts.map((b) => b.finish(fbBuilder)).
toList()); |
| 4849 } | 7557 } |
| 4850 if (_publicNamespace != null) { | 7558 if (_publicNamespace != null) { |
| 4851 offset_publicNamespace = _publicNamespace.finish(fbBuilder); | 7559 offset_publicNamespace = _publicNamespace.finish(fbBuilder); |
| 4852 } | 7560 } |
| 4853 if (!(_references == null || _references.isEmpty)) { | 7561 if (!(_references == null || _references.isEmpty)) { |
| 4854 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 7562 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); |
| 4855 } | 7563 } |
| 4856 if (!(_typedefs == null || _typedefs.isEmpty)) { | 7564 if (!(_typedefs == null || _typedefs.isEmpty)) { |
| 4857 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); | 7565 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); |
| 4858 } | 7566 } |
| 4859 if (!(_variables == null || _variables.isEmpty)) { | 7567 if (!(_variables == null || _variables.isEmpty)) { |
| 4860 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); | 7568 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); |
| 4861 } | 7569 } |
| 4862 fbBuilder.startTable(); | 7570 fbBuilder.startTable(); |
| 4863 if (offset_fallbackModePath != null) { | |
| 4864 fbBuilder.addOffset(16, offset_fallbackModePath); | |
| 4865 } | |
| 4866 if (offset_classes != null) { | 7571 if (offset_classes != null) { |
| 4867 fbBuilder.addOffset(2, offset_classes); | 7572 fbBuilder.addOffset(2, offset_classes); |
| 4868 } | 7573 } |
| 4869 if (offset_codeRange != null) { | 7574 if (offset_codeRange != null) { |
| 4870 fbBuilder.addOffset(15, offset_codeRange); | 7575 fbBuilder.addOffset(15, offset_codeRange); |
| 4871 } | 7576 } |
| 4872 if (offset_enums != null) { | 7577 if (offset_enums != null) { |
| 4873 fbBuilder.addOffset(12, offset_enums); | 7578 fbBuilder.addOffset(12, offset_enums); |
| 4874 } | 7579 } |
| 4875 if (offset_executables != null) { | 7580 if (offset_executables != null) { |
| 4876 fbBuilder.addOffset(4, offset_executables); | 7581 fbBuilder.addOffset(4, offset_executables); |
| 4877 } | 7582 } |
| 4878 if (offset_exports != null) { | 7583 if (offset_exports != null) { |
| 4879 fbBuilder.addOffset(13, offset_exports); | 7584 fbBuilder.addOffset(13, offset_exports); |
| 4880 } | 7585 } |
| 7586 if (offset_fallbackModePath != null) { |
| 7587 fbBuilder.addOffset(16, offset_fallbackModePath); |
| 7588 } |
| 4881 if (offset_imports != null) { | 7589 if (offset_imports != null) { |
| 4882 fbBuilder.addOffset(5, offset_imports); | 7590 fbBuilder.addOffset(5, offset_imports); |
| 4883 } | 7591 } |
| 4884 if (offset_libraryAnnotations != null) { | 7592 if (offset_libraryAnnotations != null) { |
| 4885 fbBuilder.addOffset(14, offset_libraryAnnotations); | 7593 fbBuilder.addOffset(14, offset_libraryAnnotations); |
| 4886 } | 7594 } |
| 4887 if (offset_libraryDocumentationComment != null) { | 7595 if (offset_libraryDocumentationComment != null) { |
| 4888 fbBuilder.addOffset(9, offset_libraryDocumentationComment); | 7596 fbBuilder.addOffset(9, offset_libraryDocumentationComment); |
| 4889 } | 7597 } |
| 4890 if (offset_libraryName != null) { | 7598 if (offset_libraryName != null) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 4906 fbBuilder.addOffset(1, offset_references); | 7614 fbBuilder.addOffset(1, offset_references); |
| 4907 } | 7615 } |
| 4908 if (offset_typedefs != null) { | 7616 if (offset_typedefs != null) { |
| 4909 fbBuilder.addOffset(10, offset_typedefs); | 7617 fbBuilder.addOffset(10, offset_typedefs); |
| 4910 } | 7618 } |
| 4911 if (offset_variables != null) { | 7619 if (offset_variables != null) { |
| 4912 fbBuilder.addOffset(3, offset_variables); | 7620 fbBuilder.addOffset(3, offset_variables); |
| 4913 } | 7621 } |
| 4914 return fbBuilder.endTable(); | 7622 return fbBuilder.endTable(); |
| 4915 } | 7623 } |
| 4916 | |
| 4917 /** | |
| 4918 * Flush [informative] data recursively. | |
| 4919 */ | |
| 4920 void flushInformative() { | |
| 4921 _classes?.forEach((b) => b.flushInformative()); | |
| 4922 _codeRange = null; | |
| 4923 _enums?.forEach((b) => b.flushInformative()); | |
| 4924 _executables?.forEach((b) => b.flushInformative()); | |
| 4925 _exports?.forEach((b) => b.flushInformative()); | |
| 4926 _imports?.forEach((b) => b.flushInformative()); | |
| 4927 _libraryAnnotations?.forEach((b) => b.flushInformative()); | |
| 4928 _libraryDocumentationComment = null; | |
| 4929 _libraryNameLength = null; | |
| 4930 _libraryNameOffset = null; | |
| 4931 _parts?.forEach((b) => b.flushInformative()); | |
| 4932 _publicNamespace?.flushInformative(); | |
| 4933 _references?.forEach((b) => b.flushInformative()); | |
| 4934 _typedefs?.forEach((b) => b.flushInformative()); | |
| 4935 _variables?.forEach((b) => b.flushInformative()); | |
| 4936 } | |
| 4937 | |
| 4938 List<int> toBuffer() { | |
| 4939 fb.Builder fbBuilder = new fb.Builder(); | |
| 4940 return fbBuilder.finish(finish(fbBuilder), "UUnt"); | |
| 4941 } | |
| 4942 } | 7624 } |
| 4943 | 7625 |
| 4944 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { | 7626 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) { |
| 4945 bool _finished = false; | 7627 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 7628 return const _UnlinkedUnitReader().read(rootRef); |
| 7629 } |
| 4946 | 7630 |
| 4947 List<UnlinkedConstBuilder> _annotations; | 7631 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { |
| 4948 CodeRangeBuilder _codeRange; | 7632 const _UnlinkedUnitReader(); |
| 4949 UnlinkedConstBuilder _constExpr; | |
| 4950 UnlinkedDocumentationCommentBuilder _documentationComment; | |
| 4951 int _inferredTypeSlot; | |
| 4952 UnlinkedExecutableBuilder _initializer; | |
| 4953 bool _isConst; | |
| 4954 bool _isFinal; | |
| 4955 bool _isStatic; | |
| 4956 String _name; | |
| 4957 int _nameOffset; | |
| 4958 int _propagatedTypeSlot; | |
| 4959 EntityRefBuilder _type; | |
| 4960 int _visibleLength; | |
| 4961 int _visibleOffset; | |
| 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 | 7633 |
| 4980 @override | 7634 @override |
| 4981 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 7635 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); |
| 4982 | |
| 4983 /** | |
| 4984 * Annotations for this variable. | |
| 4985 */ | |
| 4986 void set annotations(List<UnlinkedConstBuilder> _value) { | |
| 4987 assert(!_finished); | |
| 4988 _annotations = _value; | |
| 4989 } | |
| 4990 | |
| 4991 @override | |
| 4992 CodeRangeBuilder get codeRange => _codeRange; | |
| 4993 | |
| 4994 /** | |
| 4995 * Code range of the variable. | |
| 4996 */ | |
| 4997 void set codeRange(CodeRangeBuilder _value) { | |
| 4998 assert(!_finished); | |
| 4999 _codeRange = _value; | |
| 5000 } | |
| 5001 | |
| 5002 @override | |
| 5003 UnlinkedConstBuilder get constExpr => _constExpr; | |
| 5004 | |
| 5005 /** | |
| 5006 * If [isConst] is true, and the variable has an initializer, the constant | |
| 5007 * expression in the initializer. Note that the presence of this expression | |
| 5008 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. | |
| 5009 */ | |
| 5010 void set constExpr(UnlinkedConstBuilder _value) { | |
| 5011 assert(!_finished); | |
| 5012 _constExpr = _value; | |
| 5013 } | |
| 5014 | |
| 5015 @override | |
| 5016 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | |
| 5017 | |
| 5018 /** | |
| 5019 * Documentation comment for the variable, or `null` if there is no | |
| 5020 * documentation comment. | |
| 5021 */ | |
| 5022 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | |
| 5023 assert(!_finished); | |
| 5024 _documentationComment = _value; | |
| 5025 } | |
| 5026 | |
| 5027 @override | |
| 5028 int get inferredTypeSlot => _inferredTypeSlot ??= 0; | |
| 5029 | |
| 5030 /** | |
| 5031 * If this variable is inferable, nonzero slot id identifying which entry in | |
| 5032 * [LinkedLibrary.types] contains the inferred type for this variable. If | |
| 5033 * there is no matching entry in [LinkedLibrary.types], then no type was | |
| 5034 * inferred for this variable, so its static type is `dynamic`. | |
| 5035 */ | |
| 5036 void set inferredTypeSlot(int _value) { | |
| 5037 assert(!_finished); | |
| 5038 assert(_value == null || _value >= 0); | |
| 5039 _inferredTypeSlot = _value; | |
| 5040 } | |
| 5041 | |
| 5042 @override | |
| 5043 UnlinkedExecutableBuilder get initializer => _initializer; | |
| 5044 | |
| 5045 /** | |
| 5046 * The synthetic initializer function of the variable. Absent if the variable | |
| 5047 * does not have an initializer. | |
| 5048 */ | |
| 5049 void set initializer(UnlinkedExecutableBuilder _value) { | |
| 5050 assert(!_finished); | |
| 5051 _initializer = _value; | |
| 5052 } | |
| 5053 | |
| 5054 @override | |
| 5055 bool get isConst => _isConst ??= false; | |
| 5056 | |
| 5057 /** | |
| 5058 * Indicates whether the variable is declared using the `const` keyword. | |
| 5059 */ | |
| 5060 void set isConst(bool _value) { | |
| 5061 assert(!_finished); | |
| 5062 _isConst = _value; | |
| 5063 } | |
| 5064 | |
| 5065 @override | |
| 5066 bool get isFinal => _isFinal ??= false; | |
| 5067 | |
| 5068 /** | |
| 5069 * Indicates whether the variable is declared using the `final` keyword. | |
| 5070 */ | |
| 5071 void set isFinal(bool _value) { | |
| 5072 assert(!_finished); | |
| 5073 _isFinal = _value; | |
| 5074 } | |
| 5075 | |
| 5076 @override | |
| 5077 bool get isStatic => _isStatic ??= false; | |
| 5078 | |
| 5079 /** | |
| 5080 * Indicates whether the variable is declared using the `static` keyword. | |
| 5081 * | |
| 5082 * Note that for top level variables, this flag is false, since they are not | |
| 5083 * declared using the `static` keyword (even though they are considered | |
| 5084 * static for semantic purposes). | |
| 5085 */ | |
| 5086 void set isStatic(bool _value) { | |
| 5087 assert(!_finished); | |
| 5088 _isStatic = _value; | |
| 5089 } | |
| 5090 | |
| 5091 @override | |
| 5092 String get name => _name ??= ''; | |
| 5093 | |
| 5094 /** | |
| 5095 * Name of the variable. | |
| 5096 */ | |
| 5097 void set name(String _value) { | |
| 5098 assert(!_finished); | |
| 5099 _name = _value; | |
| 5100 } | |
| 5101 | |
| 5102 @override | |
| 5103 int get nameOffset => _nameOffset ??= 0; | |
| 5104 | |
| 5105 /** | |
| 5106 * Offset of the variable name relative to the beginning of the file. | |
| 5107 */ | |
| 5108 void set nameOffset(int _value) { | |
| 5109 assert(!_finished); | |
| 5110 assert(_value == null || _value >= 0); | |
| 5111 _nameOffset = _value; | |
| 5112 } | |
| 5113 | |
| 5114 @override | |
| 5115 int get propagatedTypeSlot => _propagatedTypeSlot ??= 0; | |
| 5116 | |
| 5117 /** | |
| 5118 * If this variable is propagable, nonzero slot id identifying which entry in | |
| 5119 * [LinkedLibrary.types] contains the propagated type for this variable. If | |
| 5120 * there is no matching entry in [LinkedLibrary.types], then this variable's | |
| 5121 * propagated type is the same as its declared type. | |
| 5122 * | |
| 5123 * Non-propagable variables have a [propagatedTypeSlot] of zero. | |
| 5124 */ | |
| 5125 void set propagatedTypeSlot(int _value) { | |
| 5126 assert(!_finished); | |
| 5127 assert(_value == null || _value >= 0); | |
| 5128 _propagatedTypeSlot = _value; | |
| 5129 } | |
| 5130 | |
| 5131 @override | |
| 5132 EntityRefBuilder get type => _type; | |
| 5133 | |
| 5134 /** | |
| 5135 * Declared type of the variable. Absent if the type is implicit. | |
| 5136 */ | |
| 5137 void set type(EntityRefBuilder _value) { | |
| 5138 assert(!_finished); | |
| 5139 _type = _value; | |
| 5140 } | |
| 5141 | |
| 5142 @override | |
| 5143 int get visibleLength => _visibleLength ??= 0; | |
| 5144 | |
| 5145 /** | |
| 5146 * If a local variable, the length of the visible range; zero otherwise. | |
| 5147 */ | |
| 5148 void set visibleLength(int _value) { | |
| 5149 assert(!_finished); | |
| 5150 assert(_value == null || _value >= 0); | |
| 5151 _visibleLength = _value; | |
| 5152 } | |
| 5153 | |
| 5154 @override | |
| 5155 int get visibleOffset => _visibleOffset ??= 0; | |
| 5156 | |
| 5157 /** | |
| 5158 * If a local variable, the beginning of the visible range; zero otherwise. | |
| 5159 */ | |
| 5160 void set visibleOffset(int _value) { | |
| 5161 assert(!_finished); | |
| 5162 assert(_value == null || _value >= 0); | |
| 5163 _visibleOffset = _value; | |
| 5164 } | |
| 5165 | |
| 5166 fb.Offset finish(fb.Builder fbBuilder) { | |
| 5167 assert(!_finished); | |
| 5168 _finished = true; | |
| 5169 fb.Offset offset_annotations; | |
| 5170 fb.Offset offset_codeRange; | |
| 5171 fb.Offset offset_constExpr; | |
| 5172 fb.Offset offset_documentationComment; | |
| 5173 fb.Offset offset_initializer; | |
| 5174 fb.Offset offset_name; | |
| 5175 fb.Offset offset_type; | |
| 5176 if (!(_annotations == null || _annotations.isEmpty)) { | |
| 5177 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | |
| 5178 } | |
| 5179 if (_codeRange != null) { | |
| 5180 offset_codeRange = _codeRange.finish(fbBuilder); | |
| 5181 } | |
| 5182 if (_constExpr != null) { | |
| 5183 offset_constExpr = _constExpr.finish(fbBuilder); | |
| 5184 } | |
| 5185 if (_documentationComment != null) { | |
| 5186 offset_documentationComment = _documentationComment.finish(fbBuilder); | |
| 5187 } | |
| 5188 if (_initializer != null) { | |
| 5189 offset_initializer = _initializer.finish(fbBuilder); | |
| 5190 } | |
| 5191 if (_name != null) { | |
| 5192 offset_name = fbBuilder.writeString(_name); | |
| 5193 } | |
| 5194 if (_type != null) { | |
| 5195 offset_type = _type.finish(fbBuilder); | |
| 5196 } | |
| 5197 fbBuilder.startTable(); | |
| 5198 if (offset_annotations != null) { | |
| 5199 fbBuilder.addOffset(8, offset_annotations); | |
| 5200 } | |
| 5201 if (offset_codeRange != null) { | |
| 5202 fbBuilder.addOffset(14, offset_codeRange); | |
| 5203 } | |
| 5204 if (offset_constExpr != null) { | |
| 5205 fbBuilder.addOffset(5, offset_constExpr); | |
| 5206 } | |
| 5207 if (offset_documentationComment != null) { | |
| 5208 fbBuilder.addOffset(10, offset_documentationComment); | |
| 5209 } | |
| 5210 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | |
| 5211 fbBuilder.addUint32(9, _inferredTypeSlot); | |
| 5212 } | |
| 5213 if (offset_initializer != null) { | |
| 5214 fbBuilder.addOffset(13, offset_initializer); | |
| 5215 } | |
| 5216 if (_isConst == true) { | |
| 5217 fbBuilder.addBool(6, true); | |
| 5218 } | |
| 5219 if (_isFinal == true) { | |
| 5220 fbBuilder.addBool(7, true); | |
| 5221 } | |
| 5222 if (_isStatic == true) { | |
| 5223 fbBuilder.addBool(4, true); | |
| 5224 } | |
| 5225 if (offset_name != null) { | |
| 5226 fbBuilder.addOffset(0, offset_name); | |
| 5227 } | |
| 5228 if (_nameOffset != null && _nameOffset != 0) { | |
| 5229 fbBuilder.addUint32(1, _nameOffset); | |
| 5230 } | |
| 5231 if (_propagatedTypeSlot != null && _propagatedTypeSlot != 0) { | |
| 5232 fbBuilder.addUint32(2, _propagatedTypeSlot); | |
| 5233 } | |
| 5234 if (offset_type != null) { | |
| 5235 fbBuilder.addOffset(3, offset_type); | |
| 5236 } | |
| 5237 if (_visibleLength != null && _visibleLength != 0) { | |
| 5238 fbBuilder.addUint32(11, _visibleLength); | |
| 5239 } | |
| 5240 if (_visibleOffset != null && _visibleOffset != 0) { | |
| 5241 fbBuilder.addUint32(12, _visibleOffset); | |
| 5242 } | |
| 5243 return fbBuilder.endTable(); | |
| 5244 } | |
| 5245 | |
| 5246 /** | |
| 5247 * Flush [informative] data recursively. | |
| 5248 */ | |
| 5249 void flushInformative() { | |
| 5250 _annotations?.forEach((b) => b.flushInformative()); | |
| 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 } | 7636 } |
| 7947 | 7637 |
| 7948 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { | 7638 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { |
| 7949 final fb.BufferPointer _bp; | 7639 final fb.BufferPointer _bp; |
| 7950 | 7640 |
| 7951 String _fallbackModePath; | 7641 _UnlinkedUnitImpl(this._bp); |
| 7952 | 7642 |
| 7953 List<idl.UnlinkedClass> _classes; | 7643 List<idl.UnlinkedClass> _classes; |
| 7954 idl.CodeRange _codeRange; | 7644 idl.CodeRange _codeRange; |
| 7955 List<idl.UnlinkedEnum> _enums; | 7645 List<idl.UnlinkedEnum> _enums; |
| 7956 List<idl.UnlinkedExecutable> _executables; | 7646 List<idl.UnlinkedExecutable> _executables; |
| 7957 List<idl.UnlinkedExportNonPublic> _exports; | 7647 List<idl.UnlinkedExportNonPublic> _exports; |
| 7648 String _fallbackModePath; |
| 7958 List<idl.UnlinkedImport> _imports; | 7649 List<idl.UnlinkedImport> _imports; |
| 7959 List<idl.UnlinkedConst> _libraryAnnotations; | 7650 List<idl.UnlinkedConst> _libraryAnnotations; |
| 7960 idl.UnlinkedDocumentationComment _libraryDocumentationComment; | 7651 idl.UnlinkedDocumentationComment _libraryDocumentationComment; |
| 7961 String _libraryName; | 7652 String _libraryName; |
| 7962 int _libraryNameLength; | 7653 int _libraryNameLength; |
| 7963 int _libraryNameOffset; | 7654 int _libraryNameOffset; |
| 7964 List<idl.UnlinkedPart> _parts; | 7655 List<idl.UnlinkedPart> _parts; |
| 7965 idl.UnlinkedPublicNamespace _publicNamespace; | 7656 idl.UnlinkedPublicNamespace _publicNamespace; |
| 7966 List<idl.UnlinkedReference> _references; | 7657 List<idl.UnlinkedReference> _references; |
| 7967 List<idl.UnlinkedTypedef> _typedefs; | 7658 List<idl.UnlinkedTypedef> _typedefs; |
| 7968 List<idl.UnlinkedVariable> _variables; | 7659 List<idl.UnlinkedVariable> _variables; |
| 7969 _UnlinkedUnitImpl(this._bp); | |
| 7970 | 7660 |
| 7971 @override | 7661 @override |
| 7972 List<idl.UnlinkedClass> get classes { | 7662 List<idl.UnlinkedClass> get classes { |
| 7973 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); | 7663 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); |
| 7974 return _classes; | 7664 return _classes; |
| 7975 } | 7665 } |
| 7976 | 7666 |
| 7977 @override | 7667 @override |
| 7978 idl.CodeRange get codeRange { | 7668 idl.CodeRange get codeRange { |
| 7979 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null); | 7669 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8068 List<idl.UnlinkedVariable> get variables { | 7758 List<idl.UnlinkedVariable> get variables { |
| 8069 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]); | 7759 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]); |
| 8070 return _variables; | 7760 return _variables; |
| 8071 } | 7761 } |
| 8072 } | 7762 } |
| 8073 | 7763 |
| 8074 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { | 7764 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { |
| 8075 @override | 7765 @override |
| 8076 Map<String, Object> toJson() { | 7766 Map<String, Object> toJson() { |
| 8077 Map<String, Object> _result = <String, Object>{}; | 7767 Map<String, Object> _result = <String, Object>{}; |
| 8078 if (fallbackModePath != '') _result["fallbackModePath"] = fallbackModePath; | |
| 8079 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.
toJson()).toList(); | 7768 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.
toJson()).toList(); |
| 8080 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 7769 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
| 8081 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson
()).toList(); | 7770 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson
()).toList(); |
| 8082 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); | 7771 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); |
| 8083 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); | 7772 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); |
| 7773 if (fallbackModePath != '') _result["fallbackModePath"] = fallbackModePath; |
| 8084 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.
toJson()).toList(); | 7774 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.
toJson()).toList(); |
| 8085 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn
notations.map((_value) => _value.toJson()).toList(); | 7775 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn
notations.map((_value) => _value.toJson()).toList(); |
| 8086 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen
t"] = libraryDocumentationComment.toJson(); | 7776 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen
t"] = libraryDocumentationComment.toJson(); |
| 8087 if (libraryName != '') _result["libraryName"] = libraryName; | 7777 if (libraryName != '') _result["libraryName"] = libraryName; |
| 8088 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength
; | 7778 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength
; |
| 8089 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset
; | 7779 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset
; |
| 8090 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson
()).toList(); | 7780 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson
()).toList(); |
| 8091 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to
Json(); | 7781 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to
Json(); |
| 8092 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 7782 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); |
| 8093 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val
ue.toJson()).toList(); | 7783 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val
ue.toJson()).toList(); |
| 8094 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _
value.toJson()).toList(); | 7784 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _
value.toJson()).toList(); |
| 8095 return _result; | 7785 return _result; |
| 8096 } | 7786 } |
| 8097 | 7787 |
| 8098 @override | 7788 @override |
| 8099 Map<String, Object> toMap() => { | 7789 Map<String, Object> toMap() => { |
| 8100 "fallbackModePath": fallbackModePath, | |
| 8101 "classes": classes, | 7790 "classes": classes, |
| 8102 "codeRange": codeRange, | 7791 "codeRange": codeRange, |
| 8103 "enums": enums, | 7792 "enums": enums, |
| 8104 "executables": executables, | 7793 "executables": executables, |
| 8105 "exports": exports, | 7794 "exports": exports, |
| 7795 "fallbackModePath": fallbackModePath, |
| 8106 "imports": imports, | 7796 "imports": imports, |
| 8107 "libraryAnnotations": libraryAnnotations, | 7797 "libraryAnnotations": libraryAnnotations, |
| 8108 "libraryDocumentationComment": libraryDocumentationComment, | 7798 "libraryDocumentationComment": libraryDocumentationComment, |
| 8109 "libraryName": libraryName, | 7799 "libraryName": libraryName, |
| 8110 "libraryNameLength": libraryNameLength, | 7800 "libraryNameLength": libraryNameLength, |
| 8111 "libraryNameOffset": libraryNameOffset, | 7801 "libraryNameOffset": libraryNameOffset, |
| 8112 "parts": parts, | 7802 "parts": parts, |
| 8113 "publicNamespace": publicNamespace, | 7803 "publicNamespace": publicNamespace, |
| 8114 "references": references, | 7804 "references": references, |
| 8115 "typedefs": typedefs, | 7805 "typedefs": typedefs, |
| 8116 "variables": variables, | 7806 "variables": variables, |
| 8117 }; | 7807 }; |
| 8118 | 7808 |
| 8119 @override | 7809 @override |
| 8120 String toString() => convert.JSON.encode(toJson()); | 7810 String toString() => convert.JSON.encode(toJson()); |
| 8121 } | 7811 } |
| 8122 | 7812 |
| 8123 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { | 7813 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { |
| 8124 const _UnlinkedUnitReader(); | 7814 bool _finished = false; |
| 8125 | 7815 |
| 8126 @override | 7816 List<UnlinkedConstBuilder> _annotations; |
| 8127 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); | 7817 CodeRangeBuilder _codeRange; |
| 7818 UnlinkedConstBuilder _constExpr; |
| 7819 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 7820 int _inferredTypeSlot; |
| 7821 UnlinkedExecutableBuilder _initializer; |
| 7822 bool _isConst; |
| 7823 bool _isFinal; |
| 7824 bool _isStatic; |
| 7825 String _name; |
| 7826 int _nameOffset; |
| 7827 int _propagatedTypeSlot; |
| 7828 EntityRefBuilder _type; |
| 7829 int _visibleLength; |
| 7830 int _visibleOffset; |
| 7831 |
| 7832 @override |
| 7833 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 7834 |
| 7835 /** |
| 7836 * Annotations for this variable. |
| 7837 */ |
| 7838 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 7839 assert(!_finished); |
| 7840 _annotations = _value; |
| 7841 } |
| 7842 |
| 7843 @override |
| 7844 CodeRangeBuilder get codeRange => _codeRange; |
| 7845 |
| 7846 /** |
| 7847 * Code range of the variable. |
| 7848 */ |
| 7849 void set codeRange(CodeRangeBuilder _value) { |
| 7850 assert(!_finished); |
| 7851 _codeRange = _value; |
| 7852 } |
| 7853 |
| 7854 @override |
| 7855 UnlinkedConstBuilder get constExpr => _constExpr; |
| 7856 |
| 7857 /** |
| 7858 * If [isConst] is true, and the variable has an initializer, the constant |
| 7859 * expression in the initializer. Note that the presence of this expression |
| 7860 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. |
| 7861 */ |
| 7862 void set constExpr(UnlinkedConstBuilder _value) { |
| 7863 assert(!_finished); |
| 7864 _constExpr = _value; |
| 7865 } |
| 7866 |
| 7867 @override |
| 7868 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 7869 |
| 7870 /** |
| 7871 * Documentation comment for the variable, or `null` if there is no |
| 7872 * documentation comment. |
| 7873 */ |
| 7874 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 7875 assert(!_finished); |
| 7876 _documentationComment = _value; |
| 7877 } |
| 7878 |
| 7879 @override |
| 7880 int get inferredTypeSlot => _inferredTypeSlot ??= 0; |
| 7881 |
| 7882 /** |
| 7883 * If this variable is inferable, nonzero slot id identifying which entry in |
| 7884 * [LinkedLibrary.types] contains the inferred type for this variable. If |
| 7885 * there is no matching entry in [LinkedLibrary.types], then no type was |
| 7886 * inferred for this variable, so its static type is `dynamic`. |
| 7887 */ |
| 7888 void set inferredTypeSlot(int _value) { |
| 7889 assert(!_finished); |
| 7890 assert(_value == null || _value >= 0); |
| 7891 _inferredTypeSlot = _value; |
| 7892 } |
| 7893 |
| 7894 @override |
| 7895 UnlinkedExecutableBuilder get initializer => _initializer; |
| 7896 |
| 7897 /** |
| 7898 * The synthetic initializer function of the variable. Absent if the variable |
| 7899 * does not have an initializer. |
| 7900 */ |
| 7901 void set initializer(UnlinkedExecutableBuilder _value) { |
| 7902 assert(!_finished); |
| 7903 _initializer = _value; |
| 7904 } |
| 7905 |
| 7906 @override |
| 7907 bool get isConst => _isConst ??= false; |
| 7908 |
| 7909 /** |
| 7910 * Indicates whether the variable is declared using the `const` keyword. |
| 7911 */ |
| 7912 void set isConst(bool _value) { |
| 7913 assert(!_finished); |
| 7914 _isConst = _value; |
| 7915 } |
| 7916 |
| 7917 @override |
| 7918 bool get isFinal => _isFinal ??= false; |
| 7919 |
| 7920 /** |
| 7921 * Indicates whether the variable is declared using the `final` keyword. |
| 7922 */ |
| 7923 void set isFinal(bool _value) { |
| 7924 assert(!_finished); |
| 7925 _isFinal = _value; |
| 7926 } |
| 7927 |
| 7928 @override |
| 7929 bool get isStatic => _isStatic ??= false; |
| 7930 |
| 7931 /** |
| 7932 * Indicates whether the variable is declared using the `static` keyword. |
| 7933 * |
| 7934 * Note that for top level variables, this flag is false, since they are not |
| 7935 * declared using the `static` keyword (even though they are considered |
| 7936 * static for semantic purposes). |
| 7937 */ |
| 7938 void set isStatic(bool _value) { |
| 7939 assert(!_finished); |
| 7940 _isStatic = _value; |
| 7941 } |
| 7942 |
| 7943 @override |
| 7944 String get name => _name ??= ''; |
| 7945 |
| 7946 /** |
| 7947 * Name of the variable. |
| 7948 */ |
| 7949 void set name(String _value) { |
| 7950 assert(!_finished); |
| 7951 _name = _value; |
| 7952 } |
| 7953 |
| 7954 @override |
| 7955 int get nameOffset => _nameOffset ??= 0; |
| 7956 |
| 7957 /** |
| 7958 * Offset of the variable name relative to the beginning of the file. |
| 7959 */ |
| 7960 void set nameOffset(int _value) { |
| 7961 assert(!_finished); |
| 7962 assert(_value == null || _value >= 0); |
| 7963 _nameOffset = _value; |
| 7964 } |
| 7965 |
| 7966 @override |
| 7967 int get propagatedTypeSlot => _propagatedTypeSlot ??= 0; |
| 7968 |
| 7969 /** |
| 7970 * If this variable is propagable, nonzero slot id identifying which entry in |
| 7971 * [LinkedLibrary.types] contains the propagated type for this variable. If |
| 7972 * there is no matching entry in [LinkedLibrary.types], then this variable's |
| 7973 * propagated type is the same as its declared type. |
| 7974 * |
| 7975 * Non-propagable variables have a [propagatedTypeSlot] of zero. |
| 7976 */ |
| 7977 void set propagatedTypeSlot(int _value) { |
| 7978 assert(!_finished); |
| 7979 assert(_value == null || _value >= 0); |
| 7980 _propagatedTypeSlot = _value; |
| 7981 } |
| 7982 |
| 7983 @override |
| 7984 EntityRefBuilder get type => _type; |
| 7985 |
| 7986 /** |
| 7987 * Declared type of the variable. Absent if the type is implicit. |
| 7988 */ |
| 7989 void set type(EntityRefBuilder _value) { |
| 7990 assert(!_finished); |
| 7991 _type = _value; |
| 7992 } |
| 7993 |
| 7994 @override |
| 7995 int get visibleLength => _visibleLength ??= 0; |
| 7996 |
| 7997 /** |
| 7998 * If a local variable, the length of the visible range; zero otherwise. |
| 7999 */ |
| 8000 void set visibleLength(int _value) { |
| 8001 assert(!_finished); |
| 8002 assert(_value == null || _value >= 0); |
| 8003 _visibleLength = _value; |
| 8004 } |
| 8005 |
| 8006 @override |
| 8007 int get visibleOffset => _visibleOffset ??= 0; |
| 8008 |
| 8009 /** |
| 8010 * If a local variable, the beginning of the visible range; zero otherwise. |
| 8011 */ |
| 8012 void set visibleOffset(int _value) { |
| 8013 assert(!_finished); |
| 8014 assert(_value == null || _value >= 0); |
| 8015 _visibleOffset = _value; |
| 8016 } |
| 8017 |
| 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) { |
| 8049 assert(!_finished); |
| 8050 _finished = true; |
| 8051 fb.Offset offset_annotations; |
| 8052 fb.Offset offset_codeRange; |
| 8053 fb.Offset offset_constExpr; |
| 8054 fb.Offset offset_documentationComment; |
| 8055 fb.Offset offset_initializer; |
| 8056 fb.Offset offset_name; |
| 8057 fb.Offset offset_type; |
| 8058 if (!(_annotations == null || _annotations.isEmpty)) { |
| 8059 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 8060 } |
| 8061 if (_codeRange != null) { |
| 8062 offset_codeRange = _codeRange.finish(fbBuilder); |
| 8063 } |
| 8064 if (_constExpr != null) { |
| 8065 offset_constExpr = _constExpr.finish(fbBuilder); |
| 8066 } |
| 8067 if (_documentationComment != null) { |
| 8068 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 8069 } |
| 8070 if (_initializer != null) { |
| 8071 offset_initializer = _initializer.finish(fbBuilder); |
| 8072 } |
| 8073 if (_name != null) { |
| 8074 offset_name = fbBuilder.writeString(_name); |
| 8075 } |
| 8076 if (_type != null) { |
| 8077 offset_type = _type.finish(fbBuilder); |
| 8078 } |
| 8079 fbBuilder.startTable(); |
| 8080 if (offset_annotations != null) { |
| 8081 fbBuilder.addOffset(8, offset_annotations); |
| 8082 } |
| 8083 if (offset_codeRange != null) { |
| 8084 fbBuilder.addOffset(14, offset_codeRange); |
| 8085 } |
| 8086 if (offset_constExpr != null) { |
| 8087 fbBuilder.addOffset(5, offset_constExpr); |
| 8088 } |
| 8089 if (offset_documentationComment != null) { |
| 8090 fbBuilder.addOffset(10, offset_documentationComment); |
| 8091 } |
| 8092 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
| 8093 fbBuilder.addUint32(9, _inferredTypeSlot); |
| 8094 } |
| 8095 if (offset_initializer != null) { |
| 8096 fbBuilder.addOffset(13, offset_initializer); |
| 8097 } |
| 8098 if (_isConst == true) { |
| 8099 fbBuilder.addBool(6, true); |
| 8100 } |
| 8101 if (_isFinal == true) { |
| 8102 fbBuilder.addBool(7, true); |
| 8103 } |
| 8104 if (_isStatic == true) { |
| 8105 fbBuilder.addBool(4, true); |
| 8106 } |
| 8107 if (offset_name != null) { |
| 8108 fbBuilder.addOffset(0, offset_name); |
| 8109 } |
| 8110 if (_nameOffset != null && _nameOffset != 0) { |
| 8111 fbBuilder.addUint32(1, _nameOffset); |
| 8112 } |
| 8113 if (_propagatedTypeSlot != null && _propagatedTypeSlot != 0) { |
| 8114 fbBuilder.addUint32(2, _propagatedTypeSlot); |
| 8115 } |
| 8116 if (offset_type != null) { |
| 8117 fbBuilder.addOffset(3, offset_type); |
| 8118 } |
| 8119 if (_visibleLength != null && _visibleLength != 0) { |
| 8120 fbBuilder.addUint32(11, _visibleLength); |
| 8121 } |
| 8122 if (_visibleOffset != null && _visibleOffset != 0) { |
| 8123 fbBuilder.addUint32(12, _visibleOffset); |
| 8124 } |
| 8125 return fbBuilder.endTable(); |
| 8126 } |
| 8127 } |
| 8128 |
| 8129 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> { |
| 8130 const _UnlinkedVariableReader(); |
| 8131 |
| 8132 @override |
| 8133 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab
leImpl(bp); |
| 8128 } | 8134 } |
| 8129 | 8135 |
| 8130 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { | 8136 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { |
| 8131 final fb.BufferPointer _bp; | 8137 final fb.BufferPointer _bp; |
| 8132 | 8138 |
| 8139 _UnlinkedVariableImpl(this._bp); |
| 8140 |
| 8133 List<idl.UnlinkedConst> _annotations; | 8141 List<idl.UnlinkedConst> _annotations; |
| 8134 | |
| 8135 idl.CodeRange _codeRange; | 8142 idl.CodeRange _codeRange; |
| 8136 idl.UnlinkedConst _constExpr; | 8143 idl.UnlinkedConst _constExpr; |
| 8137 idl.UnlinkedDocumentationComment _documentationComment; | 8144 idl.UnlinkedDocumentationComment _documentationComment; |
| 8138 int _inferredTypeSlot; | 8145 int _inferredTypeSlot; |
| 8139 idl.UnlinkedExecutable _initializer; | 8146 idl.UnlinkedExecutable _initializer; |
| 8140 bool _isConst; | 8147 bool _isConst; |
| 8141 bool _isFinal; | 8148 bool _isFinal; |
| 8142 bool _isStatic; | 8149 bool _isStatic; |
| 8143 String _name; | 8150 String _name; |
| 8144 int _nameOffset; | 8151 int _nameOffset; |
| 8145 int _propagatedTypeSlot; | 8152 int _propagatedTypeSlot; |
| 8146 idl.EntityRef _type; | 8153 idl.EntityRef _type; |
| 8147 int _visibleLength; | 8154 int _visibleLength; |
| 8148 int _visibleOffset; | 8155 int _visibleOffset; |
| 8149 _UnlinkedVariableImpl(this._bp); | |
| 8150 | 8156 |
| 8151 @override | 8157 @override |
| 8152 List<idl.UnlinkedConst> get annotations { | 8158 List<idl.UnlinkedConst> get annotations { |
| 8153 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]); | 8159 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]); |
| 8154 return _annotations; | 8160 return _annotations; |
| 8155 } | 8161 } |
| 8156 | 8162 |
| 8157 @override | 8163 @override |
| 8158 idl.CodeRange get codeRange { | 8164 idl.CodeRange get codeRange { |
| 8159 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null); | 8165 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8277 "propagatedTypeSlot": propagatedTypeSlot, | 8283 "propagatedTypeSlot": propagatedTypeSlot, |
| 8278 "type": type, | 8284 "type": type, |
| 8279 "visibleLength": visibleLength, | 8285 "visibleLength": visibleLength, |
| 8280 "visibleOffset": visibleOffset, | 8286 "visibleOffset": visibleOffset, |
| 8281 }; | 8287 }; |
| 8282 | 8288 |
| 8283 @override | 8289 @override |
| 8284 String toString() => convert.JSON.encode(toJson()); | 8290 String toString() => convert.JSON.encode(toJson()); |
| 8285 } | 8291 } |
| 8286 | 8292 |
| 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 | |
| OLD | NEW |