| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". | 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". |
| 7 | 7 |
| 8 library analyzer.src.summary.format; | 8 library analyzer.src.summary.format; |
| 9 | 9 |
| 10 import 'flat_buffers.dart' as fb; | 10 import 'flat_buffers.dart' as fb; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 @override | 71 @override |
| 72 idl.UnlinkedParamKind read(fb.BufferPointer bp) { | 72 idl.UnlinkedParamKind read(fb.BufferPointer bp) { |
| 73 int index = const fb.Uint32Reader().read(bp); | 73 int index = const fb.Uint32Reader().read(bp); |
| 74 return idl.UnlinkedParamKind.values[index]; | 74 return idl.UnlinkedParamKind.values[index]; |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity
Ref { | 78 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity
Ref { |
| 79 bool _finished = false; | 79 bool _finished = false; |
| 80 | 80 |
| 81 List<int> _implicitFunctionTypeIndices; |
| 82 int _paramReference; |
| 83 int _reference; |
| 81 int _slot; | 84 int _slot; |
| 82 int _reference; | |
| 83 int _paramReference; | |
| 84 List<int> _implicitFunctionTypeIndices; | |
| 85 List<EntityRefBuilder> _typeArguments; | 85 List<EntityRefBuilder> _typeArguments; |
| 86 | 86 |
| 87 @override | 87 @override |
| 88 int get slot => _slot ??= 0; | 88 List<int> get implicitFunctionTypeIndices => _implicitFunctionTypeIndices ??=
<int>[]; |
| 89 | 89 |
| 90 /** | 90 /** |
| 91 * If this [EntityRef] is contained within [LinkedUnit.types], slot id (which | 91 * If this is a reference to a function type implicitly defined by a |
| 92 * is unique within the compilation unit) identifying the target of type | 92 * function-typed parameter, a list of zero-based indices indicating the path |
| 93 * propagation or type inference with which this [EntityRef] is associated. | 93 * from the entity referred to by [reference] to the appropriate type |
| 94 * parameter. Otherwise the empty list. |
| 94 * | 95 * |
| 95 * Otherwise zero. | 96 * If there are N indices in this list, then the entity being referred to is |
| 97 * the function type implicitly defined by a function-typed parameter of a |
| 98 * function-typed parameter, to N levels of nesting. The first index in the |
| 99 * list refers to the outermost level of nesting; for example if [reference] |
| 100 * refers to the entity defined by: |
| 101 * |
| 102 * void f(x, void g(y, z, int h(String w))) { ... } |
| 103 * |
| 104 * Then to refer to the function type implicitly defined by parameter `h` |
| 105 * (which is parameter 2 of parameter 1 of `f`), then |
| 106 * [implicitFunctionTypeIndices] should be [1, 2]. |
| 107 * |
| 108 * Note that if the entity being referred to is a generic method inside a |
| 109 * generic class, then the type arguments in [typeArguments] are applied |
| 110 * first to the class and then to the method. |
| 96 */ | 111 */ |
| 97 void set slot(int _value) { | 112 void set implicitFunctionTypeIndices(List<int> _value) { |
| 98 assert(!_finished); | 113 assert(!_finished); |
| 99 assert(_value == null || _value >= 0); | 114 assert(_value == null || _value.every((e) => e >= 0)); |
| 100 _slot = _value; | 115 _implicitFunctionTypeIndices = _value; |
| 101 } | 116 } |
| 102 | 117 |
| 103 @override | 118 @override |
| 104 int get reference => _reference ??= 0; | |
| 105 | |
| 106 /** | |
| 107 * Index into [UnlinkedUnit.references] for the entity being referred to, or | |
| 108 * zero if this is a reference to a type parameter. | |
| 109 */ | |
| 110 void set reference(int _value) { | |
| 111 assert(!_finished); | |
| 112 assert(_value == null || _value >= 0); | |
| 113 _reference = _value; | |
| 114 } | |
| 115 | |
| 116 @override | |
| 117 int get paramReference => _paramReference ??= 0; | 119 int get paramReference => _paramReference ??= 0; |
| 118 | 120 |
| 119 /** | 121 /** |
| 120 * If this is a reference to a type parameter, one-based index into the list | 122 * If this is a reference to a type parameter, one-based index into the list |
| 121 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De | 123 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De |
| 122 * Bruijn index conventions; that is, innermost parameters come first, and | 124 * Bruijn index conventions; that is, innermost parameters come first, and |
| 123 * if a class or method has multiple parameters, they are indexed from right | 125 * if a class or method has multiple parameters, they are indexed from right |
| 124 * to left. So for instance, if the enclosing declaration is | 126 * to left. So for instance, if the enclosing declaration is |
| 125 * | 127 * |
| 126 * class C<T,U> { | 128 * class C<T,U> { |
| 127 * m<V,W> { | 129 * m<V,W> { |
| 128 * ... | 130 * ... |
| 129 * } | 131 * } |
| 130 * } | 132 * } |
| 131 * | 133 * |
| 132 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T, | 134 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T, |
| 133 * respectively. | 135 * respectively. |
| 134 * | 136 * |
| 135 * If the type being referred to is not a type parameter, [paramReference] is | 137 * If the type being referred to is not a type parameter, [paramReference] is |
| 136 * zero. | 138 * zero. |
| 137 */ | 139 */ |
| 138 void set paramReference(int _value) { | 140 void set paramReference(int _value) { |
| 139 assert(!_finished); | 141 assert(!_finished); |
| 140 assert(_value == null || _value >= 0); | 142 assert(_value == null || _value >= 0); |
| 141 _paramReference = _value; | 143 _paramReference = _value; |
| 142 } | 144 } |
| 143 | 145 |
| 144 @override | 146 @override |
| 145 List<int> get implicitFunctionTypeIndices => _implicitFunctionTypeIndices ??=
<int>[]; | 147 int get reference => _reference ??= 0; |
| 146 | 148 |
| 147 /** | 149 /** |
| 148 * If this is a reference to a function type implicitly defined by a | 150 * Index into [UnlinkedUnit.references] for the entity being referred to, or |
| 149 * function-typed parameter, a list of zero-based indices indicating the path | 151 * zero if this is a reference to a type parameter. |
| 150 * from the entity referred to by [reference] to the appropriate type | |
| 151 * parameter. Otherwise the empty list. | |
| 152 * | |
| 153 * If there are N indices in this list, then the entity being referred to is | |
| 154 * the function type implicitly defined by a function-typed parameter of a | |
| 155 * function-typed parameter, to N levels of nesting. The first index in the | |
| 156 * list refers to the outermost level of nesting; for example if [reference] | |
| 157 * refers to the entity defined by: | |
| 158 * | |
| 159 * void f(x, void g(y, z, int h(String w))) { ... } | |
| 160 * | |
| 161 * Then to refer to the function type implicitly defined by parameter `h` | |
| 162 * (which is parameter 2 of parameter 1 of `f`), then | |
| 163 * [implicitFunctionTypeIndices] should be [1, 2]. | |
| 164 * | |
| 165 * Note that if the entity being referred to is a generic method inside a | |
| 166 * generic class, then the type arguments in [typeArguments] are applied | |
| 167 * first to the class and then to the method. | |
| 168 */ | 152 */ |
| 169 void set implicitFunctionTypeIndices(List<int> _value) { | 153 void set reference(int _value) { |
| 170 assert(!_finished); | 154 assert(!_finished); |
| 171 assert(_value == null || _value.every((e) => e >= 0)); | 155 assert(_value == null || _value >= 0); |
| 172 _implicitFunctionTypeIndices = _value; | 156 _reference = _value; |
| 173 } | 157 } |
| 174 | 158 |
| 175 @override | 159 @override |
| 160 int get slot => _slot ??= 0; |
| 161 |
| 162 /** |
| 163 * If this [EntityRef] is contained within [LinkedUnit.types], slot id (which |
| 164 * is unique within the compilation unit) identifying the target of type |
| 165 * propagation or type inference with which this [EntityRef] is associated. |
| 166 * |
| 167 * Otherwise zero. |
| 168 */ |
| 169 void set slot(int _value) { |
| 170 assert(!_finished); |
| 171 assert(_value == null || _value >= 0); |
| 172 _slot = _value; |
| 173 } |
| 174 |
| 175 @override |
| 176 List<EntityRefBuilder> get typeArguments => _typeArguments ??= <EntityRefBuild
er>[]; | 176 List<EntityRefBuilder> get typeArguments => _typeArguments ??= <EntityRefBuild
er>[]; |
| 177 | 177 |
| 178 /** | 178 /** |
| 179 * If this is an instantiation of a generic type or generic executable, the | 179 * If this is an instantiation of a generic type or generic executable, the |
| 180 * type arguments used to instantiate it. Trailing type arguments of type | 180 * type arguments used to instantiate it. Trailing type arguments of type |
| 181 * `dynamic` are omitted. | 181 * `dynamic` are omitted. |
| 182 */ | 182 */ |
| 183 void set typeArguments(List<EntityRefBuilder> _value) { | 183 void set typeArguments(List<EntityRefBuilder> _value) { |
| 184 assert(!_finished); | 184 assert(!_finished); |
| 185 _typeArguments = _value; | 185 _typeArguments = _value; |
| 186 } | 186 } |
| 187 | 187 |
| 188 EntityRefBuilder({int slot, int reference, int paramReference, List<int> impli
citFunctionTypeIndices, List<EntityRefBuilder> typeArguments}) | 188 EntityRefBuilder({List<int> implicitFunctionTypeIndices, int paramReference, i
nt reference, int slot, List<EntityRefBuilder> typeArguments}) |
| 189 : _slot = slot, | 189 : _implicitFunctionTypeIndices = implicitFunctionTypeIndices, |
| 190 _paramReference = paramReference, |
| 190 _reference = reference, | 191 _reference = reference, |
| 191 _paramReference = paramReference, | 192 _slot = slot, |
| 192 _implicitFunctionTypeIndices = implicitFunctionTypeIndices, | |
| 193 _typeArguments = typeArguments; | 193 _typeArguments = typeArguments; |
| 194 | 194 |
| 195 fb.Offset finish(fb.Builder fbBuilder) { | 195 fb.Offset finish(fb.Builder fbBuilder) { |
| 196 assert(!_finished); | 196 assert(!_finished); |
| 197 _finished = true; | 197 _finished = true; |
| 198 fb.Offset offset_implicitFunctionTypeIndices; | 198 fb.Offset offset_implicitFunctionTypeIndices; |
| 199 fb.Offset offset_typeArguments; | 199 fb.Offset offset_typeArguments; |
| 200 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i
sEmpty)) { | 200 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i
sEmpty)) { |
| 201 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu
nctionTypeIndices); | 201 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu
nctionTypeIndices); |
| 202 } | 202 } |
| 203 if (!(_typeArguments == null || _typeArguments.isEmpty)) { | 203 if (!(_typeArguments == null || _typeArguments.isEmpty)) { |
| 204 offset_typeArguments = fbBuilder.writeList(_typeArguments.map((b) => b.fin
ish(fbBuilder)).toList()); | 204 offset_typeArguments = fbBuilder.writeList(_typeArguments.map((b) => b.fin
ish(fbBuilder)).toList()); |
| 205 } | 205 } |
| 206 fbBuilder.startTable(); | 206 fbBuilder.startTable(); |
| 207 if (_slot != null && _slot != 0) { | 207 if (offset_implicitFunctionTypeIndices != null) { |
| 208 fbBuilder.addUint32(0, _slot); | 208 fbBuilder.addOffset(0, offset_implicitFunctionTypeIndices); |
| 209 } |
| 210 if (_paramReference != null && _paramReference != 0) { |
| 211 fbBuilder.addUint32(1, _paramReference); |
| 209 } | 212 } |
| 210 if (_reference != null && _reference != 0) { | 213 if (_reference != null && _reference != 0) { |
| 211 fbBuilder.addUint32(1, _reference); | 214 fbBuilder.addUint32(2, _reference); |
| 212 } | 215 } |
| 213 if (_paramReference != null && _paramReference != 0) { | 216 if (_slot != null && _slot != 0) { |
| 214 fbBuilder.addUint32(2, _paramReference); | 217 fbBuilder.addUint32(3, _slot); |
| 215 } | |
| 216 if (offset_implicitFunctionTypeIndices != null) { | |
| 217 fbBuilder.addOffset(3, offset_implicitFunctionTypeIndices); | |
| 218 } | 218 } |
| 219 if (offset_typeArguments != null) { | 219 if (offset_typeArguments != null) { |
| 220 fbBuilder.addOffset(4, offset_typeArguments); | 220 fbBuilder.addOffset(4, offset_typeArguments); |
| 221 } | 221 } |
| 222 return fbBuilder.endTable(); | 222 return fbBuilder.endTable(); |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> { | 226 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> { |
| 227 const _EntityRefReader(); | 227 const _EntityRefReader(); |
| 228 | 228 |
| 229 @override | 229 @override |
| 230 _EntityRefImpl createObject(fb.BufferPointer bp) => new _EntityRefImpl(bp); | 230 _EntityRefImpl createObject(fb.BufferPointer bp) => new _EntityRefImpl(bp); |
| 231 } | 231 } |
| 232 | 232 |
| 233 class _EntityRefImpl extends Object with _EntityRefMixin implements idl.EntityRe
f { | 233 class _EntityRefImpl extends Object with _EntityRefMixin implements idl.EntityRe
f { |
| 234 final fb.BufferPointer _bp; | 234 final fb.BufferPointer _bp; |
| 235 | 235 |
| 236 _EntityRefImpl(this._bp); | 236 _EntityRefImpl(this._bp); |
| 237 | 237 |
| 238 List<int> _implicitFunctionTypeIndices; |
| 239 int _paramReference; |
| 240 int _reference; |
| 238 int _slot; | 241 int _slot; |
| 239 int _reference; | |
| 240 int _paramReference; | |
| 241 List<int> _implicitFunctionTypeIndices; | |
| 242 List<idl.EntityRef> _typeArguments; | 242 List<idl.EntityRef> _typeArguments; |
| 243 | 243 |
| 244 @override | 244 @override |
| 245 List<int> get implicitFunctionTypeIndices { |
| 246 _implicitFunctionTypeIndices ??= const fb.ListReader<int>(const fb.Uint32Rea
der()).vTableGet(_bp, 0, const <int>[]); |
| 247 return _implicitFunctionTypeIndices; |
| 248 } |
| 249 |
| 250 @override |
| 251 int get paramReference { |
| 252 _paramReference ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 253 return _paramReference; |
| 254 } |
| 255 |
| 256 @override |
| 257 int get reference { |
| 258 _reference ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
| 259 return _reference; |
| 260 } |
| 261 |
| 262 @override |
| 245 int get slot { | 263 int get slot { |
| 246 _slot ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); | 264 _slot ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 247 return _slot; | 265 return _slot; |
| 248 } | 266 } |
| 249 | 267 |
| 250 @override | 268 @override |
| 251 int get reference { | |
| 252 _reference ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | |
| 253 return _reference; | |
| 254 } | |
| 255 | |
| 256 @override | |
| 257 int get paramReference { | |
| 258 _paramReference ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | |
| 259 return _paramReference; | |
| 260 } | |
| 261 | |
| 262 @override | |
| 263 List<int> get implicitFunctionTypeIndices { | |
| 264 _implicitFunctionTypeIndices ??= const fb.ListReader<int>(const fb.Uint32Rea
der()).vTableGet(_bp, 3, const <int>[]); | |
| 265 return _implicitFunctionTypeIndices; | |
| 266 } | |
| 267 | |
| 268 @override | |
| 269 List<idl.EntityRef> get typeArguments { | 269 List<idl.EntityRef> get typeArguments { |
| 270 _typeArguments ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader
()).vTableGet(_bp, 4, const <idl.EntityRef>[]); | 270 _typeArguments ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader
()).vTableGet(_bp, 4, const <idl.EntityRef>[]); |
| 271 return _typeArguments; | 271 return _typeArguments; |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 | 274 |
| 275 abstract class _EntityRefMixin implements idl.EntityRef { | 275 abstract class _EntityRefMixin implements idl.EntityRef { |
| 276 @override | 276 @override |
| 277 Map<String, Object> toMap() => { | 277 Map<String, Object> toMap() => { |
| 278 "implicitFunctionTypeIndices": implicitFunctionTypeIndices, |
| 279 "paramReference": paramReference, |
| 280 "reference": reference, |
| 278 "slot": slot, | 281 "slot": slot, |
| 279 "reference": reference, | |
| 280 "paramReference": paramReference, | |
| 281 "implicitFunctionTypeIndices": implicitFunctionTypeIndices, | |
| 282 "typeArguments": typeArguments, | 282 "typeArguments": typeArguments, |
| 283 }; | 283 }; |
| 284 } | 284 } |
| 285 | 285 |
| 286 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme
nts idl.LinkedDependency { | 286 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme
nts idl.LinkedDependency { |
| 287 bool _finished = false; | 287 bool _finished = false; |
| 288 | 288 |
| 289 List<String> _parts; |
| 289 String _uri; | 290 String _uri; |
| 290 List<String> _parts; | 291 |
| 292 @override |
| 293 List<String> get parts => _parts ??= <String>[]; |
| 294 |
| 295 /** |
| 296 * URI for the compilation units listed in the library's `part` declarations. |
| 297 * These URIs are relative to the importing library. |
| 298 */ |
| 299 void set parts(List<String> _value) { |
| 300 assert(!_finished); |
| 301 _parts = _value; |
| 302 } |
| 291 | 303 |
| 292 @override | 304 @override |
| 293 String get uri => _uri ??= ''; | 305 String get uri => _uri ??= ''; |
| 294 | 306 |
| 295 /** | 307 /** |
| 296 * The relative URI of the dependent library. This URI is relative to the | 308 * The relative URI of the dependent library. This URI is relative to the |
| 297 * importing library, even if there are intervening `export` declarations. | 309 * importing library, even if there are intervening `export` declarations. |
| 298 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports | 310 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports |
| 299 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be | 311 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be |
| 300 * `b/d/e.dart`. | 312 * `b/d/e.dart`. |
| 301 */ | 313 */ |
| 302 void set uri(String _value) { | 314 void set uri(String _value) { |
| 303 assert(!_finished); | 315 assert(!_finished); |
| 304 _uri = _value; | 316 _uri = _value; |
| 305 } | 317 } |
| 306 | 318 |
| 307 @override | 319 LinkedDependencyBuilder({List<String> parts, String uri}) |
| 308 List<String> get parts => _parts ??= <String>[]; | 320 : _parts = parts, |
| 309 | 321 _uri = uri; |
| 310 /** | |
| 311 * URI for the compilation units listed in the library's `part` declarations. | |
| 312 * These URIs are relative to the importing library. | |
| 313 */ | |
| 314 void set parts(List<String> _value) { | |
| 315 assert(!_finished); | |
| 316 _parts = _value; | |
| 317 } | |
| 318 | |
| 319 LinkedDependencyBuilder({String uri, List<String> parts}) | |
| 320 : _uri = uri, | |
| 321 _parts = parts; | |
| 322 | 322 |
| 323 fb.Offset finish(fb.Builder fbBuilder) { | 323 fb.Offset finish(fb.Builder fbBuilder) { |
| 324 assert(!_finished); | 324 assert(!_finished); |
| 325 _finished = true; | 325 _finished = true; |
| 326 fb.Offset offset_parts; |
| 326 fb.Offset offset_uri; | 327 fb.Offset offset_uri; |
| 327 fb.Offset offset_parts; | 328 if (!(_parts == null || _parts.isEmpty)) { |
| 329 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); |
| 330 } |
| 328 if (_uri != null) { | 331 if (_uri != null) { |
| 329 offset_uri = fbBuilder.writeString(_uri); | 332 offset_uri = fbBuilder.writeString(_uri); |
| 330 } | 333 } |
| 331 if (!(_parts == null || _parts.isEmpty)) { | 334 fbBuilder.startTable(); |
| 332 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); | 335 if (offset_parts != null) { |
| 336 fbBuilder.addOffset(0, offset_parts); |
| 333 } | 337 } |
| 334 fbBuilder.startTable(); | |
| 335 if (offset_uri != null) { | 338 if (offset_uri != null) { |
| 336 fbBuilder.addOffset(0, offset_uri); | 339 fbBuilder.addOffset(1, offset_uri); |
| 337 } | |
| 338 if (offset_parts != null) { | |
| 339 fbBuilder.addOffset(1, offset_parts); | |
| 340 } | 340 } |
| 341 return fbBuilder.endTable(); | 341 return fbBuilder.endTable(); |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 | 344 |
| 345 class _LinkedDependencyReader extends fb.TableReader<_LinkedDependencyImpl> { | 345 class _LinkedDependencyReader extends fb.TableReader<_LinkedDependencyImpl> { |
| 346 const _LinkedDependencyReader(); | 346 const _LinkedDependencyReader(); |
| 347 | 347 |
| 348 @override | 348 @override |
| 349 _LinkedDependencyImpl createObject(fb.BufferPointer bp) => new _LinkedDependen
cyImpl(bp); | 349 _LinkedDependencyImpl createObject(fb.BufferPointer bp) => new _LinkedDependen
cyImpl(bp); |
| 350 } | 350 } |
| 351 | 351 |
| 352 class _LinkedDependencyImpl extends Object with _LinkedDependencyMixin implement
s idl.LinkedDependency { | 352 class _LinkedDependencyImpl extends Object with _LinkedDependencyMixin implement
s idl.LinkedDependency { |
| 353 final fb.BufferPointer _bp; | 353 final fb.BufferPointer _bp; |
| 354 | 354 |
| 355 _LinkedDependencyImpl(this._bp); | 355 _LinkedDependencyImpl(this._bp); |
| 356 | 356 |
| 357 List<String> _parts; |
| 357 String _uri; | 358 String _uri; |
| 358 List<String> _parts; | 359 |
| 360 @override |
| 361 List<String> get parts { |
| 362 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 0, const <String>[]); |
| 363 return _parts; |
| 364 } |
| 359 | 365 |
| 360 @override | 366 @override |
| 361 String get uri { | 367 String get uri { |
| 362 _uri ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 368 _uri ??= const fb.StringReader().vTableGet(_bp, 1, ''); |
| 363 return _uri; | 369 return _uri; |
| 364 } | 370 } |
| 365 | |
| 366 @override | |
| 367 List<String> get parts { | |
| 368 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 1, const <String>[]); | |
| 369 return _parts; | |
| 370 } | |
| 371 } | 371 } |
| 372 | 372 |
| 373 abstract class _LinkedDependencyMixin implements idl.LinkedDependency { | 373 abstract class _LinkedDependencyMixin implements idl.LinkedDependency { |
| 374 @override | 374 @override |
| 375 Map<String, Object> toMap() => { | 375 Map<String, Object> toMap() => { |
| 376 "parts": parts, |
| 376 "uri": uri, | 377 "uri": uri, |
| 377 "parts": parts, | |
| 378 }; | 378 }; |
| 379 } | 379 } |
| 380 | 380 |
| 381 class LinkedExportNameBuilder extends Object with _LinkedExportNameMixin impleme
nts idl.LinkedExportName { | 381 class LinkedExportNameBuilder extends Object with _LinkedExportNameMixin impleme
nts idl.LinkedExportName { |
| 382 bool _finished = false; | 382 bool _finished = false; |
| 383 | 383 |
| 384 int _dependency; |
| 385 idl.ReferenceKind _kind; |
| 384 String _name; | 386 String _name; |
| 385 int _dependency; | |
| 386 int _unit; | 387 int _unit; |
| 387 idl.ReferenceKind _kind; | |
| 388 | |
| 389 @override | |
| 390 String get name => _name ??= ''; | |
| 391 | |
| 392 /** | |
| 393 * Name of the exported entity. For an exported setter, this name includes | |
| 394 * the trailing '='. | |
| 395 */ | |
| 396 void set name(String _value) { | |
| 397 assert(!_finished); | |
| 398 _name = _value; | |
| 399 } | |
| 400 | 388 |
| 401 @override | 389 @override |
| 402 int get dependency => _dependency ??= 0; | 390 int get dependency => _dependency ??= 0; |
| 403 | 391 |
| 404 /** | 392 /** |
| 405 * Index into [LinkedLibrary.dependencies] for the library in which the | 393 * Index into [LinkedLibrary.dependencies] for the library in which the |
| 406 * entity is defined. | 394 * entity is defined. |
| 407 */ | 395 */ |
| 408 void set dependency(int _value) { | 396 void set dependency(int _value) { |
| 409 assert(!_finished); | 397 assert(!_finished); |
| 410 assert(_value == null || _value >= 0); | 398 assert(_value == null || _value >= 0); |
| 411 _dependency = _value; | 399 _dependency = _value; |
| 412 } | 400 } |
| 413 | 401 |
| 414 @override | 402 @override |
| 403 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; |
| 404 |
| 405 /** |
| 406 * The kind of the entity being referred to. |
| 407 */ |
| 408 void set kind(idl.ReferenceKind _value) { |
| 409 assert(!_finished); |
| 410 _kind = _value; |
| 411 } |
| 412 |
| 413 @override |
| 414 String get name => _name ??= ''; |
| 415 |
| 416 /** |
| 417 * Name of the exported entity. For an exported setter, this name includes |
| 418 * the trailing '='. |
| 419 */ |
| 420 void set name(String _value) { |
| 421 assert(!_finished); |
| 422 _name = _value; |
| 423 } |
| 424 |
| 425 @override |
| 415 int get unit => _unit ??= 0; | 426 int get unit => _unit ??= 0; |
| 416 | 427 |
| 417 /** | 428 /** |
| 418 * Integer index indicating which unit in the exported library contains the | 429 * Integer index indicating which unit in the exported library contains the |
| 419 * definition of the entity. As with indices into [LinkedLibrary.units], | 430 * definition of the entity. As with indices into [LinkedLibrary.units], |
| 420 * zero represents the defining compilation unit, and nonzero values | 431 * zero represents the defining compilation unit, and nonzero values |
| 421 * represent parts in the order of the corresponding `part` declarations. | 432 * represent parts in the order of the corresponding `part` declarations. |
| 422 */ | 433 */ |
| 423 void set unit(int _value) { | 434 void set unit(int _value) { |
| 424 assert(!_finished); | 435 assert(!_finished); |
| 425 assert(_value == null || _value >= 0); | 436 assert(_value == null || _value >= 0); |
| 426 _unit = _value; | 437 _unit = _value; |
| 427 } | 438 } |
| 428 | 439 |
| 429 @override | 440 LinkedExportNameBuilder({int dependency, idl.ReferenceKind kind, String name,
int unit}) |
| 430 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; | 441 : _dependency = dependency, |
| 431 | 442 _kind = kind, |
| 432 /** | 443 _name = name, |
| 433 * The kind of the entity being referred to. | 444 _unit = unit; |
| 434 */ | |
| 435 void set kind(idl.ReferenceKind _value) { | |
| 436 assert(!_finished); | |
| 437 _kind = _value; | |
| 438 } | |
| 439 | |
| 440 LinkedExportNameBuilder({String name, int dependency, int unit, idl.ReferenceK
ind kind}) | |
| 441 : _name = name, | |
| 442 _dependency = dependency, | |
| 443 _unit = unit, | |
| 444 _kind = kind; | |
| 445 | 445 |
| 446 fb.Offset finish(fb.Builder fbBuilder) { | 446 fb.Offset finish(fb.Builder fbBuilder) { |
| 447 assert(!_finished); | 447 assert(!_finished); |
| 448 _finished = true; | 448 _finished = true; |
| 449 fb.Offset offset_name; | 449 fb.Offset offset_name; |
| 450 if (_name != null) { | 450 if (_name != null) { |
| 451 offset_name = fbBuilder.writeString(_name); | 451 offset_name = fbBuilder.writeString(_name); |
| 452 } | 452 } |
| 453 fbBuilder.startTable(); | 453 fbBuilder.startTable(); |
| 454 if (_dependency != null && _dependency != 0) { |
| 455 fbBuilder.addUint32(0, _dependency); |
| 456 } |
| 457 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { |
| 458 fbBuilder.addUint32(1, _kind.index); |
| 459 } |
| 454 if (offset_name != null) { | 460 if (offset_name != null) { |
| 455 fbBuilder.addOffset(0, offset_name); | 461 fbBuilder.addOffset(2, offset_name); |
| 456 } | |
| 457 if (_dependency != null && _dependency != 0) { | |
| 458 fbBuilder.addUint32(1, _dependency); | |
| 459 } | 462 } |
| 460 if (_unit != null && _unit != 0) { | 463 if (_unit != null && _unit != 0) { |
| 461 fbBuilder.addUint32(2, _unit); | 464 fbBuilder.addUint32(3, _unit); |
| 462 } | |
| 463 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { | |
| 464 fbBuilder.addUint32(3, _kind.index); | |
| 465 } | 465 } |
| 466 return fbBuilder.endTable(); | 466 return fbBuilder.endTable(); |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 | 469 |
| 470 class _LinkedExportNameReader extends fb.TableReader<_LinkedExportNameImpl> { | 470 class _LinkedExportNameReader extends fb.TableReader<_LinkedExportNameImpl> { |
| 471 const _LinkedExportNameReader(); | 471 const _LinkedExportNameReader(); |
| 472 | 472 |
| 473 @override | 473 @override |
| 474 _LinkedExportNameImpl createObject(fb.BufferPointer bp) => new _LinkedExportNa
meImpl(bp); | 474 _LinkedExportNameImpl createObject(fb.BufferPointer bp) => new _LinkedExportNa
meImpl(bp); |
| 475 } | 475 } |
| 476 | 476 |
| 477 class _LinkedExportNameImpl extends Object with _LinkedExportNameMixin implement
s idl.LinkedExportName { | 477 class _LinkedExportNameImpl extends Object with _LinkedExportNameMixin implement
s idl.LinkedExportName { |
| 478 final fb.BufferPointer _bp; | 478 final fb.BufferPointer _bp; |
| 479 | 479 |
| 480 _LinkedExportNameImpl(this._bp); | 480 _LinkedExportNameImpl(this._bp); |
| 481 | 481 |
| 482 int _dependency; |
| 483 idl.ReferenceKind _kind; |
| 482 String _name; | 484 String _name; |
| 483 int _dependency; | |
| 484 int _unit; | 485 int _unit; |
| 485 idl.ReferenceKind _kind; | 486 |
| 487 @override |
| 488 int get dependency { |
| 489 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); |
| 490 return _dependency; |
| 491 } |
| 492 |
| 493 @override |
| 494 idl.ReferenceKind get kind { |
| 495 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, idl.ReferenceKind.c
lassOrEnum); |
| 496 return _kind; |
| 497 } |
| 486 | 498 |
| 487 @override | 499 @override |
| 488 String get name { | 500 String get name { |
| 489 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 501 _name ??= const fb.StringReader().vTableGet(_bp, 2, ''); |
| 490 return _name; | 502 return _name; |
| 491 } | 503 } |
| 492 | 504 |
| 493 @override | 505 @override |
| 494 int get dependency { | |
| 495 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | |
| 496 return _dependency; | |
| 497 } | |
| 498 | |
| 499 @override | |
| 500 int get unit { | 506 int get unit { |
| 501 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 507 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 502 return _unit; | 508 return _unit; |
| 503 } | 509 } |
| 504 | |
| 505 @override | |
| 506 idl.ReferenceKind get kind { | |
| 507 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 3, idl.ReferenceKind.c
lassOrEnum); | |
| 508 return _kind; | |
| 509 } | |
| 510 } | 510 } |
| 511 | 511 |
| 512 abstract class _LinkedExportNameMixin implements idl.LinkedExportName { | 512 abstract class _LinkedExportNameMixin implements idl.LinkedExportName { |
| 513 @override | 513 @override |
| 514 Map<String, Object> toMap() => { | 514 Map<String, Object> toMap() => { |
| 515 "dependency": dependency, |
| 516 "kind": kind, |
| 515 "name": name, | 517 "name": name, |
| 516 "dependency": dependency, | |
| 517 "unit": unit, | 518 "unit": unit, |
| 518 "kind": kind, | |
| 519 }; | 519 }; |
| 520 } | 520 } |
| 521 | 521 |
| 522 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id
l.LinkedLibrary { | 522 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id
l.LinkedLibrary { |
| 523 bool _finished = false; | 523 bool _finished = false; |
| 524 | 524 |
| 525 List<LinkedDependencyBuilder> _dependencies; |
| 526 List<LinkedExportNameBuilder> _exportNames; |
| 527 List<int> _importDependencies; |
| 528 int _numPrelinkedDependencies; |
| 525 List<LinkedUnitBuilder> _units; | 529 List<LinkedUnitBuilder> _units; |
| 526 List<LinkedDependencyBuilder> _dependencies; | |
| 527 List<int> _importDependencies; | |
| 528 List<LinkedExportNameBuilder> _exportNames; | |
| 529 int _numPrelinkedDependencies; | |
| 530 | |
| 531 @override | |
| 532 List<LinkedUnitBuilder> get units => _units ??= <LinkedUnitBuilder>[]; | |
| 533 | |
| 534 /** | |
| 535 * The linked summary of all the compilation units constituting the | |
| 536 * library. The summary of the defining compilation unit is listed first, | |
| 537 * followed by the summary of each part, in the order of the `part` | |
| 538 * declarations in the defining compilation unit. | |
| 539 */ | |
| 540 void set units(List<LinkedUnitBuilder> _value) { | |
| 541 assert(!_finished); | |
| 542 _units = _value; | |
| 543 } | |
| 544 | 530 |
| 545 @override | 531 @override |
| 546 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep
endencyBuilder>[]; | 532 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep
endencyBuilder>[]; |
| 547 | 533 |
| 548 /** | 534 /** |
| 549 * The libraries that this library depends on (either via an explicit import | 535 * The libraries that this library depends on (either via an explicit import |
| 550 * statement or via the implicit dependencies on `dart:core` and | 536 * statement or via the implicit dependencies on `dart:core` and |
| 551 * `dart:async`). The first element of this array is a pseudo-dependency | 537 * `dart:async`). The first element of this array is a pseudo-dependency |
| 552 * representing the library itself (it is also used for `dynamic` and | 538 * representing the library itself (it is also used for `dynamic` and |
| 553 * `void`). This is followed by elements representing "prelinked" | 539 * `void`). This is followed by elements representing "prelinked" |
| 554 * dependencies (direct imports and the transitive closure of exports). | 540 * dependencies (direct imports and the transitive closure of exports). |
| 555 * After the prelinked dependencies are elements representing "linked" | 541 * After the prelinked dependencies are elements representing "linked" |
| 556 * dependencies. | 542 * dependencies. |
| 557 * | 543 * |
| 558 * A library is only included as a "linked" dependency if it is a true | 544 * A library is only included as a "linked" dependency if it is a true |
| 559 * dependency (e.g. a propagated or inferred type or constant value | 545 * dependency (e.g. a propagated or inferred type or constant value |
| 560 * implicitly refers to an element declared in the library) or | 546 * implicitly refers to an element declared in the library) or |
| 561 * anti-dependency (e.g. the result of type propagation or type inference | 547 * anti-dependency (e.g. the result of type propagation or type inference |
| 562 * depends on the lack of a certain declaration in the library). | 548 * depends on the lack of a certain declaration in the library). |
| 563 */ | 549 */ |
| 564 void set dependencies(List<LinkedDependencyBuilder> _value) { | 550 void set dependencies(List<LinkedDependencyBuilder> _value) { |
| 565 assert(!_finished); | 551 assert(!_finished); |
| 566 _dependencies = _value; | 552 _dependencies = _value; |
| 567 } | 553 } |
| 568 | 554 |
| 569 @override | 555 @override |
| 570 List<int> get importDependencies => _importDependencies ??= <int>[]; | |
| 571 | |
| 572 /** | |
| 573 * For each import in [UnlinkedUnit.imports], an index into [dependencies] | |
| 574 * of the library being imported. | |
| 575 */ | |
| 576 void set importDependencies(List<int> _value) { | |
| 577 assert(!_finished); | |
| 578 assert(_value == null || _value.every((e) => e >= 0)); | |
| 579 _importDependencies = _value; | |
| 580 } | |
| 581 | |
| 582 @override | |
| 583 List<LinkedExportNameBuilder> get exportNames => _exportNames ??= <LinkedExpor
tNameBuilder>[]; | 556 List<LinkedExportNameBuilder> get exportNames => _exportNames ??= <LinkedExpor
tNameBuilder>[]; |
| 584 | 557 |
| 585 /** | 558 /** |
| 586 * Information about entities in the export namespace of the library that are | 559 * Information about entities in the export namespace of the library that are |
| 587 * not in the public namespace of the library (that is, entities that are | 560 * not in the public namespace of the library (that is, entities that are |
| 588 * brought into the namespace via `export` directives). | 561 * brought into the namespace via `export` directives). |
| 589 * | 562 * |
| 590 * Sorted by name. | 563 * Sorted by name. |
| 591 */ | 564 */ |
| 592 void set exportNames(List<LinkedExportNameBuilder> _value) { | 565 void set exportNames(List<LinkedExportNameBuilder> _value) { |
| 593 assert(!_finished); | 566 assert(!_finished); |
| 594 _exportNames = _value; | 567 _exportNames = _value; |
| 595 } | 568 } |
| 596 | 569 |
| 597 @override | 570 @override |
| 571 List<int> get importDependencies => _importDependencies ??= <int>[]; |
| 572 |
| 573 /** |
| 574 * For each import in [UnlinkedUnit.imports], an index into [dependencies] |
| 575 * of the library being imported. |
| 576 */ |
| 577 void set importDependencies(List<int> _value) { |
| 578 assert(!_finished); |
| 579 assert(_value == null || _value.every((e) => e >= 0)); |
| 580 _importDependencies = _value; |
| 581 } |
| 582 |
| 583 @override |
| 598 int get numPrelinkedDependencies => _numPrelinkedDependencies ??= 0; | 584 int get numPrelinkedDependencies => _numPrelinkedDependencies ??= 0; |
| 599 | 585 |
| 600 /** | 586 /** |
| 601 * The number of elements in [dependencies] which are not "linked" | 587 * The number of elements in [dependencies] which are not "linked" |
| 602 * dependencies (that is, the number of libraries in the direct imports plus | 588 * dependencies (that is, the number of libraries in the direct imports plus |
| 603 * the transitive closure of exports, plus the library itself). | 589 * the transitive closure of exports, plus the library itself). |
| 604 */ | 590 */ |
| 605 void set numPrelinkedDependencies(int _value) { | 591 void set numPrelinkedDependencies(int _value) { |
| 606 assert(!_finished); | 592 assert(!_finished); |
| 607 assert(_value == null || _value >= 0); | 593 assert(_value == null || _value >= 0); |
| 608 _numPrelinkedDependencies = _value; | 594 _numPrelinkedDependencies = _value; |
| 609 } | 595 } |
| 610 | 596 |
| 611 LinkedLibraryBuilder({List<LinkedUnitBuilder> units, List<LinkedDependencyBuil
der> dependencies, List<int> importDependencies, List<LinkedExportNameBuilder> e
xportNames, int numPrelinkedDependencies}) | 597 @override |
| 612 : _units = units, | 598 List<LinkedUnitBuilder> get units => _units ??= <LinkedUnitBuilder>[]; |
| 613 _dependencies = dependencies, | 599 |
| 600 /** |
| 601 * The linked summary of all the compilation units constituting the |
| 602 * library. The summary of the defining compilation unit is listed first, |
| 603 * followed by the summary of each part, in the order of the `part` |
| 604 * declarations in the defining compilation unit. |
| 605 */ |
| 606 void set units(List<LinkedUnitBuilder> _value) { |
| 607 assert(!_finished); |
| 608 _units = _value; |
| 609 } |
| 610 |
| 611 LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<LinkedE
xportNameBuilder> exportNames, List<int> importDependencies, int numPrelinkedDep
endencies, List<LinkedUnitBuilder> units}) |
| 612 : _dependencies = dependencies, |
| 613 _exportNames = exportNames, |
| 614 _importDependencies = importDependencies, | 614 _importDependencies = importDependencies, |
| 615 _exportNames = exportNames, | 615 _numPrelinkedDependencies = numPrelinkedDependencies, |
| 616 _numPrelinkedDependencies = numPrelinkedDependencies; | 616 _units = units; |
| 617 | 617 |
| 618 List<int> toBuffer() { | 618 List<int> toBuffer() { |
| 619 fb.Builder fbBuilder = new fb.Builder(); | 619 fb.Builder fbBuilder = new fb.Builder(); |
| 620 return fbBuilder.finish(finish(fbBuilder)); | 620 return fbBuilder.finish(finish(fbBuilder)); |
| 621 } | 621 } |
| 622 | 622 |
| 623 fb.Offset finish(fb.Builder fbBuilder) { | 623 fb.Offset finish(fb.Builder fbBuilder) { |
| 624 assert(!_finished); | 624 assert(!_finished); |
| 625 _finished = true; | 625 _finished = true; |
| 626 fb.Offset offset_dependencies; |
| 627 fb.Offset offset_exportNames; |
| 628 fb.Offset offset_importDependencies; |
| 626 fb.Offset offset_units; | 629 fb.Offset offset_units; |
| 627 fb.Offset offset_dependencies; | |
| 628 fb.Offset offset_importDependencies; | |
| 629 fb.Offset offset_exportNames; | |
| 630 if (!(_units == null || _units.isEmpty)) { | |
| 631 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).
toList()); | |
| 632 } | |
| 633 if (!(_dependencies == null || _dependencies.isEmpty)) { | 630 if (!(_dependencies == null || _dependencies.isEmpty)) { |
| 634 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis
h(fbBuilder)).toList()); | 631 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis
h(fbBuilder)).toList()); |
| 635 } | 632 } |
| 633 if (!(_exportNames == null || _exportNames.isEmpty)) { |
| 634 offset_exportNames = fbBuilder.writeList(_exportNames.map((b) => b.finish(
fbBuilder)).toList()); |
| 635 } |
| 636 if (!(_importDependencies == null || _importDependencies.isEmpty)) { | 636 if (!(_importDependencies == null || _importDependencies.isEmpty)) { |
| 637 offset_importDependencies = fbBuilder.writeListUint32(_importDependencies)
; | 637 offset_importDependencies = fbBuilder.writeListUint32(_importDependencies)
; |
| 638 } | 638 } |
| 639 if (!(_exportNames == null || _exportNames.isEmpty)) { | 639 if (!(_units == null || _units.isEmpty)) { |
| 640 offset_exportNames = fbBuilder.writeList(_exportNames.map((b) => b.finish(
fbBuilder)).toList()); | 640 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).
toList()); |
| 641 } | 641 } |
| 642 fbBuilder.startTable(); | 642 fbBuilder.startTable(); |
| 643 if (offset_units != null) { | 643 if (offset_dependencies != null) { |
| 644 fbBuilder.addOffset(0, offset_units); | 644 fbBuilder.addOffset(0, offset_dependencies); |
| 645 } | 645 } |
| 646 if (offset_dependencies != null) { | 646 if (offset_exportNames != null) { |
| 647 fbBuilder.addOffset(1, offset_dependencies); | 647 fbBuilder.addOffset(1, offset_exportNames); |
| 648 } | 648 } |
| 649 if (offset_importDependencies != null) { | 649 if (offset_importDependencies != null) { |
| 650 fbBuilder.addOffset(2, offset_importDependencies); | 650 fbBuilder.addOffset(2, offset_importDependencies); |
| 651 } | 651 } |
| 652 if (offset_exportNames != null) { | 652 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) { |
| 653 fbBuilder.addOffset(3, offset_exportNames); | 653 fbBuilder.addUint32(3, _numPrelinkedDependencies); |
| 654 } | 654 } |
| 655 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) { | 655 if (offset_units != null) { |
| 656 fbBuilder.addUint32(4, _numPrelinkedDependencies); | 656 fbBuilder.addOffset(4, offset_units); |
| 657 } | 657 } |
| 658 return fbBuilder.endTable(); | 658 return fbBuilder.endTable(); |
| 659 } | 659 } |
| 660 } | 660 } |
| 661 | 661 |
| 662 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) { | 662 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) { |
| 663 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 663 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 664 return const _LinkedLibraryReader().read(rootRef); | 664 return const _LinkedLibraryReader().read(rootRef); |
| 665 } | 665 } |
| 666 | 666 |
| 667 class _LinkedLibraryReader extends fb.TableReader<_LinkedLibraryImpl> { | 667 class _LinkedLibraryReader extends fb.TableReader<_LinkedLibraryImpl> { |
| 668 const _LinkedLibraryReader(); | 668 const _LinkedLibraryReader(); |
| 669 | 669 |
| 670 @override | 670 @override |
| 671 _LinkedLibraryImpl createObject(fb.BufferPointer bp) => new _LinkedLibraryImpl
(bp); | 671 _LinkedLibraryImpl createObject(fb.BufferPointer bp) => new _LinkedLibraryImpl
(bp); |
| 672 } | 672 } |
| 673 | 673 |
| 674 class _LinkedLibraryImpl extends Object with _LinkedLibraryMixin implements idl.
LinkedLibrary { | 674 class _LinkedLibraryImpl extends Object with _LinkedLibraryMixin implements idl.
LinkedLibrary { |
| 675 final fb.BufferPointer _bp; | 675 final fb.BufferPointer _bp; |
| 676 | 676 |
| 677 _LinkedLibraryImpl(this._bp); | 677 _LinkedLibraryImpl(this._bp); |
| 678 | 678 |
| 679 List<idl.LinkedDependency> _dependencies; |
| 680 List<idl.LinkedExportName> _exportNames; |
| 681 List<int> _importDependencies; |
| 682 int _numPrelinkedDependencies; |
| 679 List<idl.LinkedUnit> _units; | 683 List<idl.LinkedUnit> _units; |
| 680 List<idl.LinkedDependency> _dependencies; | |
| 681 List<int> _importDependencies; | |
| 682 List<idl.LinkedExportName> _exportNames; | |
| 683 int _numPrelinkedDependencies; | |
| 684 | |
| 685 @override | |
| 686 List<idl.LinkedUnit> get units { | |
| 687 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()).vT
ableGet(_bp, 0, const <idl.LinkedUnit>[]); | |
| 688 return _units; | |
| 689 } | |
| 690 | 684 |
| 691 @override | 685 @override |
| 692 List<idl.LinkedDependency> get dependencies { | 686 List<idl.LinkedDependency> get dependencies { |
| 693 _dependencies ??= const fb.ListReader<idl.LinkedDependency>(const _LinkedDep
endencyReader()).vTableGet(_bp, 1, const <idl.LinkedDependency>[]); | 687 _dependencies ??= const fb.ListReader<idl.LinkedDependency>(const _LinkedDep
endencyReader()).vTableGet(_bp, 0, const <idl.LinkedDependency>[]); |
| 694 return _dependencies; | 688 return _dependencies; |
| 695 } | 689 } |
| 696 | 690 |
| 697 @override | 691 @override |
| 692 List<idl.LinkedExportName> get exportNames { |
| 693 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo
rtNameReader()).vTableGet(_bp, 1, const <idl.LinkedExportName>[]); |
| 694 return _exportNames; |
| 695 } |
| 696 |
| 697 @override |
| 698 List<int> get importDependencies { | 698 List<int> get importDependencies { |
| 699 _importDependencies ??= const fb.ListReader<int>(const fb.Uint32Reader()).vT
ableGet(_bp, 2, const <int>[]); | 699 _importDependencies ??= const fb.ListReader<int>(const fb.Uint32Reader()).vT
ableGet(_bp, 2, const <int>[]); |
| 700 return _importDependencies; | 700 return _importDependencies; |
| 701 } | 701 } |
| 702 | 702 |
| 703 @override | 703 @override |
| 704 List<idl.LinkedExportName> get exportNames { | |
| 705 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo
rtNameReader()).vTableGet(_bp, 3, const <idl.LinkedExportName>[]); | |
| 706 return _exportNames; | |
| 707 } | |
| 708 | |
| 709 @override | |
| 710 int get numPrelinkedDependencies { | 704 int get numPrelinkedDependencies { |
| 711 _numPrelinkedDependencies ??= const fb.Uint32Reader().vTableGet(_bp, 4, 0); | 705 _numPrelinkedDependencies ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 712 return _numPrelinkedDependencies; | 706 return _numPrelinkedDependencies; |
| 713 } | 707 } |
| 708 |
| 709 @override |
| 710 List<idl.LinkedUnit> get units { |
| 711 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()).vT
ableGet(_bp, 4, const <idl.LinkedUnit>[]); |
| 712 return _units; |
| 713 } |
| 714 } | 714 } |
| 715 | 715 |
| 716 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary { | 716 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary { |
| 717 @override | 717 @override |
| 718 Map<String, Object> toMap() => { | 718 Map<String, Object> toMap() => { |
| 719 "dependencies": dependencies, |
| 720 "exportNames": exportNames, |
| 721 "importDependencies": importDependencies, |
| 722 "numPrelinkedDependencies": numPrelinkedDependencies, |
| 719 "units": units, | 723 "units": units, |
| 720 "dependencies": dependencies, | |
| 721 "importDependencies": importDependencies, | |
| 722 "exportNames": exportNames, | |
| 723 "numPrelinkedDependencies": numPrelinkedDependencies, | |
| 724 }; | 724 }; |
| 725 } | 725 } |
| 726 | 726 |
| 727 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement
s idl.LinkedReference { | 727 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement
s idl.LinkedReference { |
| 728 bool _finished = false; | 728 bool _finished = false; |
| 729 | 729 |
| 730 int _containingReference; |
| 730 int _dependency; | 731 int _dependency; |
| 731 idl.ReferenceKind _kind; | 732 idl.ReferenceKind _kind; |
| 733 String _name; |
| 734 int _numTypeParameters; |
| 732 int _unit; | 735 int _unit; |
| 733 int _numTypeParameters; | 736 |
| 734 String _name; | 737 @override |
| 735 int _containingReference; | 738 int get containingReference => _containingReference ??= 0; |
| 739 |
| 740 /** |
| 741 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], |
| 742 * and the entity being referred to is contained within another entity, index |
| 743 * of the containing entity. This behaves similarly to |
| 744 * [UnlinkedReference.prefixReference], however it is only used for class |
| 745 * members, not for prefixed imports. |
| 746 * |
| 747 * Containing references must always point backward; that is, for all i, if |
| 748 * LinkedUnit.references[i].containingReference != 0, then |
| 749 * LinkedUnit.references[i].containingReference < i. |
| 750 */ |
| 751 void set containingReference(int _value) { |
| 752 assert(!_finished); |
| 753 assert(_value == null || _value >= 0); |
| 754 _containingReference = _value; |
| 755 } |
| 736 | 756 |
| 737 @override | 757 @override |
| 738 int get dependency => _dependency ??= 0; | 758 int get dependency => _dependency ??= 0; |
| 739 | 759 |
| 740 /** | 760 /** |
| 741 * Index into [LinkedLibrary.dependencies] indicating which imported library | 761 * Index into [LinkedLibrary.dependencies] indicating which imported library |
| 742 * declares the entity being referred to. | 762 * declares the entity being referred to. |
| 743 * | 763 * |
| 744 * Zero if this entity is contained within another entity (e.g. a class | 764 * Zero if this entity is contained within another entity (e.g. a class |
| 745 * member), or if [kind] is [ReferenceKind.prefix]. | 765 * member), or if [kind] is [ReferenceKind.prefix]. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 756 /** | 776 /** |
| 757 * The kind of the entity being referred to. For the pseudo-types `dynamic` | 777 * The kind of the entity being referred to. For the pseudo-types `dynamic` |
| 758 * and `void`, the kind is [ReferenceKind.classOrEnum]. | 778 * and `void`, the kind is [ReferenceKind.classOrEnum]. |
| 759 */ | 779 */ |
| 760 void set kind(idl.ReferenceKind _value) { | 780 void set kind(idl.ReferenceKind _value) { |
| 761 assert(!_finished); | 781 assert(!_finished); |
| 762 _kind = _value; | 782 _kind = _value; |
| 763 } | 783 } |
| 764 | 784 |
| 765 @override | 785 @override |
| 766 int get unit => _unit ??= 0; | 786 String get name => _name ??= ''; |
| 767 | 787 |
| 768 /** | 788 /** |
| 769 * Integer index indicating which unit in the imported library contains the | 789 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], |
| 770 * definition of the entity. As with indices into [LinkedLibrary.units], | 790 * name of the entity being referred to. For the pseudo-type `dynamic`, the |
| 771 * zero represents the defining compilation unit, and nonzero values | 791 * string is "dynamic". For the pseudo-type `void`, the string is "void". |
| 772 * represent parts in the order of the corresponding `part` declarations. | |
| 773 * | |
| 774 * Zero if this entity is contained within another entity (e.g. a class | |
| 775 * member). | |
| 776 */ | 792 */ |
| 777 void set unit(int _value) { | 793 void set name(String _value) { |
| 778 assert(!_finished); | 794 assert(!_finished); |
| 779 assert(_value == null || _value >= 0); | 795 _name = _value; |
| 780 _unit = _value; | |
| 781 } | 796 } |
| 782 | 797 |
| 783 @override | 798 @override |
| 784 int get numTypeParameters => _numTypeParameters ??= 0; | 799 int get numTypeParameters => _numTypeParameters ??= 0; |
| 785 | 800 |
| 786 /** | 801 /** |
| 787 * If the entity being referred to is generic, the number of type parameters | 802 * If the entity being referred to is generic, the number of type parameters |
| 788 * it accepts. Otherwise zero. | 803 * it accepts. Otherwise zero. |
| 789 */ | 804 */ |
| 790 void set numTypeParameters(int _value) { | 805 void set numTypeParameters(int _value) { |
| 791 assert(!_finished); | 806 assert(!_finished); |
| 792 assert(_value == null || _value >= 0); | 807 assert(_value == null || _value >= 0); |
| 793 _numTypeParameters = _value; | 808 _numTypeParameters = _value; |
| 794 } | 809 } |
| 795 | 810 |
| 796 @override | 811 @override |
| 797 String get name => _name ??= ''; | 812 int get unit => _unit ??= 0; |
| 798 | 813 |
| 799 /** | 814 /** |
| 800 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], | 815 * Integer index indicating which unit in the imported library contains the |
| 801 * name of the entity being referred to. For the pseudo-type `dynamic`, the | 816 * definition of the entity. As with indices into [LinkedLibrary.units], |
| 802 * string is "dynamic". For the pseudo-type `void`, the string is "void". | 817 * zero represents the defining compilation unit, and nonzero values |
| 818 * represent parts in the order of the corresponding `part` declarations. |
| 819 * |
| 820 * Zero if this entity is contained within another entity (e.g. a class |
| 821 * member). |
| 803 */ | 822 */ |
| 804 void set name(String _value) { | 823 void set unit(int _value) { |
| 805 assert(!_finished); | 824 assert(!_finished); |
| 806 _name = _value; | 825 assert(_value == null || _value >= 0); |
| 826 _unit = _value; |
| 807 } | 827 } |
| 808 | 828 |
| 809 @override | 829 LinkedReferenceBuilder({int containingReference, int dependency, idl.Reference
Kind kind, String name, int numTypeParameters, int unit}) |
| 810 int get containingReference => _containingReference ??= 0; | 830 : _containingReference = containingReference, |
| 811 | 831 _dependency = dependency, |
| 812 /** | |
| 813 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], | |
| 814 * and the entity being referred to is contained within another entity, index | |
| 815 * of the containing entity. This behaves similarly to | |
| 816 * [UnlinkedReference.prefixReference], however it is only used for class | |
| 817 * members, not for prefixed imports. | |
| 818 * | |
| 819 * Containing references must always point backward; that is, for all i, if | |
| 820 * LinkedUnit.references[i].containingReference != 0, then | |
| 821 * LinkedUnit.references[i].containingReference < i. | |
| 822 */ | |
| 823 void set containingReference(int _value) { | |
| 824 assert(!_finished); | |
| 825 assert(_value == null || _value >= 0); | |
| 826 _containingReference = _value; | |
| 827 } | |
| 828 | |
| 829 LinkedReferenceBuilder({int dependency, idl.ReferenceKind kind, int unit, int
numTypeParameters, String name, int containingReference}) | |
| 830 : _dependency = dependency, | |
| 831 _kind = kind, | 832 _kind = kind, |
| 832 _unit = unit, | 833 _name = name, |
| 833 _numTypeParameters = numTypeParameters, | 834 _numTypeParameters = numTypeParameters, |
| 834 _name = name, | 835 _unit = unit; |
| 835 _containingReference = containingReference; | |
| 836 | 836 |
| 837 fb.Offset finish(fb.Builder fbBuilder) { | 837 fb.Offset finish(fb.Builder fbBuilder) { |
| 838 assert(!_finished); | 838 assert(!_finished); |
| 839 _finished = true; | 839 _finished = true; |
| 840 fb.Offset offset_name; | 840 fb.Offset offset_name; |
| 841 if (_name != null) { | 841 if (_name != null) { |
| 842 offset_name = fbBuilder.writeString(_name); | 842 offset_name = fbBuilder.writeString(_name); |
| 843 } | 843 } |
| 844 fbBuilder.startTable(); | 844 fbBuilder.startTable(); |
| 845 if (_containingReference != null && _containingReference != 0) { |
| 846 fbBuilder.addUint32(0, _containingReference); |
| 847 } |
| 845 if (_dependency != null && _dependency != 0) { | 848 if (_dependency != null && _dependency != 0) { |
| 846 fbBuilder.addUint32(0, _dependency); | 849 fbBuilder.addUint32(1, _dependency); |
| 847 } | 850 } |
| 848 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { | 851 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { |
| 849 fbBuilder.addUint32(1, _kind.index); | 852 fbBuilder.addUint32(2, _kind.index); |
| 853 } |
| 854 if (offset_name != null) { |
| 855 fbBuilder.addOffset(3, offset_name); |
| 856 } |
| 857 if (_numTypeParameters != null && _numTypeParameters != 0) { |
| 858 fbBuilder.addUint32(4, _numTypeParameters); |
| 850 } | 859 } |
| 851 if (_unit != null && _unit != 0) { | 860 if (_unit != null && _unit != 0) { |
| 852 fbBuilder.addUint32(2, _unit); | 861 fbBuilder.addUint32(5, _unit); |
| 853 } | |
| 854 if (_numTypeParameters != null && _numTypeParameters != 0) { | |
| 855 fbBuilder.addUint32(3, _numTypeParameters); | |
| 856 } | |
| 857 if (offset_name != null) { | |
| 858 fbBuilder.addOffset(4, offset_name); | |
| 859 } | |
| 860 if (_containingReference != null && _containingReference != 0) { | |
| 861 fbBuilder.addUint32(5, _containingReference); | |
| 862 } | 862 } |
| 863 return fbBuilder.endTable(); | 863 return fbBuilder.endTable(); |
| 864 } | 864 } |
| 865 } | 865 } |
| 866 | 866 |
| 867 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { | 867 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { |
| 868 const _LinkedReferenceReader(); | 868 const _LinkedReferenceReader(); |
| 869 | 869 |
| 870 @override | 870 @override |
| 871 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference
Impl(bp); | 871 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference
Impl(bp); |
| 872 } | 872 } |
| 873 | 873 |
| 874 class _LinkedReferenceImpl extends Object with _LinkedReferenceMixin implements
idl.LinkedReference { | 874 class _LinkedReferenceImpl extends Object with _LinkedReferenceMixin implements
idl.LinkedReference { |
| 875 final fb.BufferPointer _bp; | 875 final fb.BufferPointer _bp; |
| 876 | 876 |
| 877 _LinkedReferenceImpl(this._bp); | 877 _LinkedReferenceImpl(this._bp); |
| 878 | 878 |
| 879 int _containingReference; |
| 879 int _dependency; | 880 int _dependency; |
| 880 idl.ReferenceKind _kind; | 881 idl.ReferenceKind _kind; |
| 882 String _name; |
| 883 int _numTypeParameters; |
| 881 int _unit; | 884 int _unit; |
| 882 int _numTypeParameters; | 885 |
| 883 String _name; | 886 @override |
| 884 int _containingReference; | 887 int get containingReference { |
| 888 _containingReference ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); |
| 889 return _containingReference; |
| 890 } |
| 885 | 891 |
| 886 @override | 892 @override |
| 887 int get dependency { | 893 int get dependency { |
| 888 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); | 894 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 889 return _dependency; | 895 return _dependency; |
| 890 } | 896 } |
| 891 | 897 |
| 892 @override | 898 @override |
| 893 idl.ReferenceKind get kind { | 899 idl.ReferenceKind get kind { |
| 894 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, idl.ReferenceKind.c
lassOrEnum); | 900 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 2, idl.ReferenceKind.c
lassOrEnum); |
| 895 return _kind; | 901 return _kind; |
| 896 } | 902 } |
| 897 | 903 |
| 898 @override | 904 @override |
| 899 int get unit { | 905 String get name { |
| 900 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 906 _name ??= const fb.StringReader().vTableGet(_bp, 3, ''); |
| 901 return _unit; | 907 return _name; |
| 902 } | 908 } |
| 903 | 909 |
| 904 @override | 910 @override |
| 905 int get numTypeParameters { | 911 int get numTypeParameters { |
| 906 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); | 912 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 4, 0); |
| 907 return _numTypeParameters; | 913 return _numTypeParameters; |
| 908 } | 914 } |
| 909 | 915 |
| 910 @override | 916 @override |
| 911 String get name { | 917 int get unit { |
| 912 _name ??= const fb.StringReader().vTableGet(_bp, 4, ''); | 918 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); |
| 913 return _name; | 919 return _unit; |
| 914 } | |
| 915 | |
| 916 @override | |
| 917 int get containingReference { | |
| 918 _containingReference ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); | |
| 919 return _containingReference; | |
| 920 } | 920 } |
| 921 } | 921 } |
| 922 | 922 |
| 923 abstract class _LinkedReferenceMixin implements idl.LinkedReference { | 923 abstract class _LinkedReferenceMixin implements idl.LinkedReference { |
| 924 @override | 924 @override |
| 925 Map<String, Object> toMap() => { | 925 Map<String, Object> toMap() => { |
| 926 "containingReference": containingReference, |
| 926 "dependency": dependency, | 927 "dependency": dependency, |
| 927 "kind": kind, | 928 "kind": kind, |
| 929 "name": name, |
| 930 "numTypeParameters": numTypeParameters, |
| 928 "unit": unit, | 931 "unit": unit, |
| 929 "numTypeParameters": numTypeParameters, | |
| 930 "name": name, | |
| 931 "containingReference": containingReference, | |
| 932 }; | 932 }; |
| 933 } | 933 } |
| 934 | 934 |
| 935 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { | 935 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { |
| 936 bool _finished = false; | 936 bool _finished = false; |
| 937 | 937 |
| 938 List<LinkedReferenceBuilder> _references; | 938 List<LinkedReferenceBuilder> _references; |
| 939 List<EntityRefBuilder> _types; | 939 List<EntityRefBuilder> _types; |
| 940 | 940 |
| 941 @override | 941 @override |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 @override | 1024 @override |
| 1025 Map<String, Object> toMap() => { | 1025 Map<String, Object> toMap() => { |
| 1026 "references": references, | 1026 "references": references, |
| 1027 "types": types, | 1027 "types": types, |
| 1028 }; | 1028 }; |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 class SdkBundleBuilder extends Object with _SdkBundleMixin implements idl.SdkBun
dle { | 1031 class SdkBundleBuilder extends Object with _SdkBundleMixin implements idl.SdkBun
dle { |
| 1032 bool _finished = false; | 1032 bool _finished = false; |
| 1033 | 1033 |
| 1034 List<LinkedLibraryBuilder> _linkedLibraries; |
| 1034 List<String> _linkedLibraryUris; | 1035 List<String> _linkedLibraryUris; |
| 1035 List<LinkedLibraryBuilder> _linkedLibraries; | 1036 List<UnlinkedUnitBuilder> _unlinkedUnits; |
| 1036 List<String> _unlinkedUnitUris; | 1037 List<String> _unlinkedUnitUris; |
| 1037 List<UnlinkedUnitBuilder> _unlinkedUnits; | |
| 1038 | |
| 1039 @override | |
| 1040 List<String> get linkedLibraryUris => _linkedLibraryUris ??= <String>[]; | |
| 1041 | |
| 1042 /** | |
| 1043 * The list of URIs of items in [linkedLibraries], e.g. `dart:core`. | |
| 1044 */ | |
| 1045 void set linkedLibraryUris(List<String> _value) { | |
| 1046 assert(!_finished); | |
| 1047 _linkedLibraryUris = _value; | |
| 1048 } | |
| 1049 | 1038 |
| 1050 @override | 1039 @override |
| 1051 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked
LibraryBuilder>[]; | 1040 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked
LibraryBuilder>[]; |
| 1052 | 1041 |
| 1053 /** | 1042 /** |
| 1054 * Linked libraries. | 1043 * Linked libraries. |
| 1055 */ | 1044 */ |
| 1056 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { | 1045 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { |
| 1057 assert(!_finished); | 1046 assert(!_finished); |
| 1058 _linkedLibraries = _value; | 1047 _linkedLibraries = _value; |
| 1059 } | 1048 } |
| 1060 | 1049 |
| 1061 @override | 1050 @override |
| 1062 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; | 1051 List<String> get linkedLibraryUris => _linkedLibraryUris ??= <String>[]; |
| 1063 | 1052 |
| 1064 /** | 1053 /** |
| 1065 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. | 1054 * The list of URIs of items in [linkedLibraries], e.g. `dart:core`. |
| 1066 */ | 1055 */ |
| 1067 void set unlinkedUnitUris(List<String> _value) { | 1056 void set linkedLibraryUris(List<String> _value) { |
| 1068 assert(!_finished); | 1057 assert(!_finished); |
| 1069 _unlinkedUnitUris = _value; | 1058 _linkedLibraryUris = _value; |
| 1070 } | 1059 } |
| 1071 | 1060 |
| 1072 @override | 1061 @override |
| 1073 List<UnlinkedUnitBuilder> get unlinkedUnits => _unlinkedUnits ??= <UnlinkedUni
tBuilder>[]; | 1062 List<UnlinkedUnitBuilder> get unlinkedUnits => _unlinkedUnits ??= <UnlinkedUni
tBuilder>[]; |
| 1074 | 1063 |
| 1075 /** | 1064 /** |
| 1076 * Unlinked information for the compilation units constituting the SDK. | 1065 * Unlinked information for the compilation units constituting the SDK. |
| 1077 */ | 1066 */ |
| 1078 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) { | 1067 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) { |
| 1079 assert(!_finished); | 1068 assert(!_finished); |
| 1080 _unlinkedUnits = _value; | 1069 _unlinkedUnits = _value; |
| 1081 } | 1070 } |
| 1082 | 1071 |
| 1083 SdkBundleBuilder({List<String> linkedLibraryUris, List<LinkedLibraryBuilder> l
inkedLibraries, List<String> unlinkedUnitUris, List<UnlinkedUnitBuilder> unlinke
dUnits}) | 1072 @override |
| 1084 : _linkedLibraryUris = linkedLibraryUris, | 1073 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; |
| 1085 _linkedLibraries = linkedLibraries, | 1074 |
| 1086 _unlinkedUnitUris = unlinkedUnitUris, | 1075 /** |
| 1087 _unlinkedUnits = unlinkedUnits; | 1076 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. |
| 1077 */ |
| 1078 void set unlinkedUnitUris(List<String> _value) { |
| 1079 assert(!_finished); |
| 1080 _unlinkedUnitUris = _value; |
| 1081 } |
| 1082 |
| 1083 SdkBundleBuilder({List<LinkedLibraryBuilder> linkedLibraries, List<String> lin
kedLibraryUris, List<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUn
itUris}) |
| 1084 : _linkedLibraries = linkedLibraries, |
| 1085 _linkedLibraryUris = linkedLibraryUris, |
| 1086 _unlinkedUnits = unlinkedUnits, |
| 1087 _unlinkedUnitUris = unlinkedUnitUris; |
| 1088 | 1088 |
| 1089 List<int> toBuffer() { | 1089 List<int> toBuffer() { |
| 1090 fb.Builder fbBuilder = new fb.Builder(); | 1090 fb.Builder fbBuilder = new fb.Builder(); |
| 1091 return fbBuilder.finish(finish(fbBuilder)); | 1091 return fbBuilder.finish(finish(fbBuilder)); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 fb.Offset finish(fb.Builder fbBuilder) { | 1094 fb.Offset finish(fb.Builder fbBuilder) { |
| 1095 assert(!_finished); | 1095 assert(!_finished); |
| 1096 _finished = true; | 1096 _finished = true; |
| 1097 fb.Offset offset_linkedLibraries; |
| 1097 fb.Offset offset_linkedLibraryUris; | 1098 fb.Offset offset_linkedLibraryUris; |
| 1098 fb.Offset offset_linkedLibraries; | 1099 fb.Offset offset_unlinkedUnits; |
| 1099 fb.Offset offset_unlinkedUnitUris; | 1100 fb.Offset offset_unlinkedUnitUris; |
| 1100 fb.Offset offset_unlinkedUnits; | 1101 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { |
| 1102 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b
.finish(fbBuilder)).toList()); |
| 1103 } |
| 1101 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) { | 1104 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) { |
| 1102 offset_linkedLibraryUris = fbBuilder.writeList(_linkedLibraryUris.map((b)
=> fbBuilder.writeString(b)).toList()); | 1105 offset_linkedLibraryUris = fbBuilder.writeList(_linkedLibraryUris.map((b)
=> fbBuilder.writeString(b)).toList()); |
| 1103 } | 1106 } |
| 1104 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { | 1107 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) { |
| 1105 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b
.finish(fbBuilder)).toList()); | 1108 offset_unlinkedUnits = fbBuilder.writeList(_unlinkedUnits.map((b) => b.fin
ish(fbBuilder)).toList()); |
| 1106 } | 1109 } |
| 1107 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) { | 1110 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) { |
| 1108 offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) =>
fbBuilder.writeString(b)).toList()); | 1111 offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) =>
fbBuilder.writeString(b)).toList()); |
| 1109 } | 1112 } |
| 1110 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) { | 1113 fbBuilder.startTable(); |
| 1111 offset_unlinkedUnits = fbBuilder.writeList(_unlinkedUnits.map((b) => b.fin
ish(fbBuilder)).toList()); | 1114 if (offset_linkedLibraries != null) { |
| 1115 fbBuilder.addOffset(0, offset_linkedLibraries); |
| 1112 } | 1116 } |
| 1113 fbBuilder.startTable(); | |
| 1114 if (offset_linkedLibraryUris != null) { | 1117 if (offset_linkedLibraryUris != null) { |
| 1115 fbBuilder.addOffset(0, offset_linkedLibraryUris); | 1118 fbBuilder.addOffset(1, offset_linkedLibraryUris); |
| 1116 } | 1119 } |
| 1117 if (offset_linkedLibraries != null) { | 1120 if (offset_unlinkedUnits != null) { |
| 1118 fbBuilder.addOffset(1, offset_linkedLibraries); | 1121 fbBuilder.addOffset(2, offset_unlinkedUnits); |
| 1119 } | 1122 } |
| 1120 if (offset_unlinkedUnitUris != null) { | 1123 if (offset_unlinkedUnitUris != null) { |
| 1121 fbBuilder.addOffset(2, offset_unlinkedUnitUris); | 1124 fbBuilder.addOffset(3, offset_unlinkedUnitUris); |
| 1122 } | |
| 1123 if (offset_unlinkedUnits != null) { | |
| 1124 fbBuilder.addOffset(3, offset_unlinkedUnits); | |
| 1125 } | 1125 } |
| 1126 return fbBuilder.endTable(); | 1126 return fbBuilder.endTable(); |
| 1127 } | 1127 } |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 idl.SdkBundle readSdkBundle(List<int> buffer) { | 1130 idl.SdkBundle readSdkBundle(List<int> buffer) { |
| 1131 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 1131 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 1132 return const _SdkBundleReader().read(rootRef); | 1132 return const _SdkBundleReader().read(rootRef); |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 class _SdkBundleReader extends fb.TableReader<_SdkBundleImpl> { | 1135 class _SdkBundleReader extends fb.TableReader<_SdkBundleImpl> { |
| 1136 const _SdkBundleReader(); | 1136 const _SdkBundleReader(); |
| 1137 | 1137 |
| 1138 @override | 1138 @override |
| 1139 _SdkBundleImpl createObject(fb.BufferPointer bp) => new _SdkBundleImpl(bp); | 1139 _SdkBundleImpl createObject(fb.BufferPointer bp) => new _SdkBundleImpl(bp); |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 class _SdkBundleImpl extends Object with _SdkBundleMixin implements idl.SdkBundl
e { | 1142 class _SdkBundleImpl extends Object with _SdkBundleMixin implements idl.SdkBundl
e { |
| 1143 final fb.BufferPointer _bp; | 1143 final fb.BufferPointer _bp; |
| 1144 | 1144 |
| 1145 _SdkBundleImpl(this._bp); | 1145 _SdkBundleImpl(this._bp); |
| 1146 | 1146 |
| 1147 List<idl.LinkedLibrary> _linkedLibraries; |
| 1147 List<String> _linkedLibraryUris; | 1148 List<String> _linkedLibraryUris; |
| 1148 List<idl.LinkedLibrary> _linkedLibraries; | 1149 List<idl.UnlinkedUnit> _unlinkedUnits; |
| 1149 List<String> _unlinkedUnitUris; | 1150 List<String> _unlinkedUnitUris; |
| 1150 List<idl.UnlinkedUnit> _unlinkedUnits; | 1151 |
| 1152 @override |
| 1153 List<idl.LinkedLibrary> get linkedLibraries { |
| 1154 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib
raryReader()).vTableGet(_bp, 0, const <idl.LinkedLibrary>[]); |
| 1155 return _linkedLibraries; |
| 1156 } |
| 1151 | 1157 |
| 1152 @override | 1158 @override |
| 1153 List<String> get linkedLibraryUris { | 1159 List<String> get linkedLibraryUris { |
| 1154 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()).
vTableGet(_bp, 0, const <String>[]); | 1160 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()).
vTableGet(_bp, 1, const <String>[]); |
| 1155 return _linkedLibraryUris; | 1161 return _linkedLibraryUris; |
| 1156 } | 1162 } |
| 1157 | 1163 |
| 1158 @override | 1164 @override |
| 1159 List<idl.LinkedLibrary> get linkedLibraries { | 1165 List<idl.UnlinkedUnit> get unlinkedUnits { |
| 1160 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib
raryReader()).vTableGet(_bp, 1, const <idl.LinkedLibrary>[]); | 1166 _unlinkedUnits ??= const fb.ListReader<idl.UnlinkedUnit>(const _UnlinkedUnit
Reader()).vTableGet(_bp, 2, const <idl.UnlinkedUnit>[]); |
| 1161 return _linkedLibraries; | 1167 return _unlinkedUnits; |
| 1162 } | 1168 } |
| 1163 | 1169 |
| 1164 @override | 1170 @override |
| 1165 List<String> get unlinkedUnitUris { | 1171 List<String> get unlinkedUnitUris { |
| 1166 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v
TableGet(_bp, 2, const <String>[]); | 1172 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v
TableGet(_bp, 3, const <String>[]); |
| 1167 return _unlinkedUnitUris; | 1173 return _unlinkedUnitUris; |
| 1168 } | 1174 } |
| 1169 | |
| 1170 @override | |
| 1171 List<idl.UnlinkedUnit> get unlinkedUnits { | |
| 1172 _unlinkedUnits ??= const fb.ListReader<idl.UnlinkedUnit>(const _UnlinkedUnit
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedUnit>[]); | |
| 1173 return _unlinkedUnits; | |
| 1174 } | |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 abstract class _SdkBundleMixin implements idl.SdkBundle { | 1177 abstract class _SdkBundleMixin implements idl.SdkBundle { |
| 1178 @override | 1178 @override |
| 1179 Map<String, Object> toMap() => { | 1179 Map<String, Object> toMap() => { |
| 1180 "linkedLibraries": linkedLibraries, |
| 1180 "linkedLibraryUris": linkedLibraryUris, | 1181 "linkedLibraryUris": linkedLibraryUris, |
| 1181 "linkedLibraries": linkedLibraries, | 1182 "unlinkedUnits": unlinkedUnits, |
| 1182 "unlinkedUnitUris": unlinkedUnitUris, | 1183 "unlinkedUnitUris": unlinkedUnitUris, |
| 1183 "unlinkedUnits": unlinkedUnits, | |
| 1184 }; | 1184 }; |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { | 1187 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { |
| 1188 bool _finished = false; | 1188 bool _finished = false; |
| 1189 | 1189 |
| 1190 List<UnlinkedConstBuilder> _annotations; |
| 1191 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 1192 List<UnlinkedExecutableBuilder> _executables; |
| 1193 List<UnlinkedVariableBuilder> _fields; |
| 1194 bool _hasNoSupertype; |
| 1195 List<EntityRefBuilder> _interfaces; |
| 1196 bool _isAbstract; |
| 1197 bool _isMixinApplication; |
| 1198 List<EntityRefBuilder> _mixins; |
| 1190 String _name; | 1199 String _name; |
| 1191 int _nameOffset; | 1200 int _nameOffset; |
| 1192 UnlinkedDocumentationCommentBuilder _documentationComment; | 1201 EntityRefBuilder _supertype; |
| 1193 List<UnlinkedConstBuilder> _annotations; | |
| 1194 List<UnlinkedTypeParamBuilder> _typeParameters; | 1202 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 1195 EntityRefBuilder _supertype; | 1203 |
| 1196 List<EntityRefBuilder> _mixins; | 1204 @override |
| 1197 List<EntityRefBuilder> _interfaces; | 1205 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 1198 List<UnlinkedVariableBuilder> _fields; | 1206 |
| 1199 List<UnlinkedExecutableBuilder> _executables; | 1207 /** |
| 1200 bool _isAbstract; | 1208 * Annotations for this class. |
| 1201 bool _isMixinApplication; | 1209 */ |
| 1202 bool _hasNoSupertype; | 1210 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 1211 assert(!_finished); |
| 1212 _annotations = _value; |
| 1213 } |
| 1214 |
| 1215 @override |
| 1216 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 1217 |
| 1218 /** |
| 1219 * Documentation comment for the class, or `null` if there is no |
| 1220 * documentation comment. |
| 1221 */ |
| 1222 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 1223 assert(!_finished); |
| 1224 _documentationComment = _value; |
| 1225 } |
| 1226 |
| 1227 @override |
| 1228 List<UnlinkedExecutableBuilder> get executables => _executables ??= <UnlinkedE
xecutableBuilder>[]; |
| 1229 |
| 1230 /** |
| 1231 * Executable objects (methods, getters, and setters) contained in the class. |
| 1232 */ |
| 1233 void set executables(List<UnlinkedExecutableBuilder> _value) { |
| 1234 assert(!_finished); |
| 1235 _executables = _value; |
| 1236 } |
| 1237 |
| 1238 @override |
| 1239 List<UnlinkedVariableBuilder> get fields => _fields ??= <UnlinkedVariableBuild
er>[]; |
| 1240 |
| 1241 /** |
| 1242 * Field declarations contained in the class. |
| 1243 */ |
| 1244 void set fields(List<UnlinkedVariableBuilder> _value) { |
| 1245 assert(!_finished); |
| 1246 _fields = _value; |
| 1247 } |
| 1248 |
| 1249 @override |
| 1250 bool get hasNoSupertype => _hasNoSupertype ??= false; |
| 1251 |
| 1252 /** |
| 1253 * Indicates whether this class is the core "Object" class (and hence has no |
| 1254 * supertype) |
| 1255 */ |
| 1256 void set hasNoSupertype(bool _value) { |
| 1257 assert(!_finished); |
| 1258 _hasNoSupertype = _value; |
| 1259 } |
| 1260 |
| 1261 @override |
| 1262 List<EntityRefBuilder> get interfaces => _interfaces ??= <EntityRefBuilder>[]; |
| 1263 |
| 1264 /** |
| 1265 * Interfaces appearing in an `implements` clause, if any. |
| 1266 */ |
| 1267 void set interfaces(List<EntityRefBuilder> _value) { |
| 1268 assert(!_finished); |
| 1269 _interfaces = _value; |
| 1270 } |
| 1271 |
| 1272 @override |
| 1273 bool get isAbstract => _isAbstract ??= false; |
| 1274 |
| 1275 /** |
| 1276 * Indicates whether the class is declared with the `abstract` keyword. |
| 1277 */ |
| 1278 void set isAbstract(bool _value) { |
| 1279 assert(!_finished); |
| 1280 _isAbstract = _value; |
| 1281 } |
| 1282 |
| 1283 @override |
| 1284 bool get isMixinApplication => _isMixinApplication ??= false; |
| 1285 |
| 1286 /** |
| 1287 * Indicates whether the class is declared using mixin application syntax. |
| 1288 */ |
| 1289 void set isMixinApplication(bool _value) { |
| 1290 assert(!_finished); |
| 1291 _isMixinApplication = _value; |
| 1292 } |
| 1293 |
| 1294 @override |
| 1295 List<EntityRefBuilder> get mixins => _mixins ??= <EntityRefBuilder>[]; |
| 1296 |
| 1297 /** |
| 1298 * Mixins appearing in a `with` clause, if any. |
| 1299 */ |
| 1300 void set mixins(List<EntityRefBuilder> _value) { |
| 1301 assert(!_finished); |
| 1302 _mixins = _value; |
| 1303 } |
| 1203 | 1304 |
| 1204 @override | 1305 @override |
| 1205 String get name => _name ??= ''; | 1306 String get name => _name ??= ''; |
| 1206 | 1307 |
| 1207 /** | 1308 /** |
| 1208 * Name of the class. | 1309 * Name of the class. |
| 1209 */ | 1310 */ |
| 1210 void set name(String _value) { | 1311 void set name(String _value) { |
| 1211 assert(!_finished); | 1312 assert(!_finished); |
| 1212 _name = _value; | 1313 _name = _value; |
| 1213 } | 1314 } |
| 1214 | 1315 |
| 1215 @override | 1316 @override |
| 1216 int get nameOffset => _nameOffset ??= 0; | 1317 int get nameOffset => _nameOffset ??= 0; |
| 1217 | 1318 |
| 1218 /** | 1319 /** |
| 1219 * Offset of the class name relative to the beginning of the file. | 1320 * Offset of the class name relative to the beginning of the file. |
| 1220 */ | 1321 */ |
| 1221 void set nameOffset(int _value) { | 1322 void set nameOffset(int _value) { |
| 1222 assert(!_finished); | 1323 assert(!_finished); |
| 1223 assert(_value == null || _value >= 0); | 1324 assert(_value == null || _value >= 0); |
| 1224 _nameOffset = _value; | 1325 _nameOffset = _value; |
| 1225 } | 1326 } |
| 1226 | 1327 |
| 1227 @override | 1328 @override |
| 1228 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | |
| 1229 | |
| 1230 /** | |
| 1231 * Documentation comment for the class, or `null` if there is no | |
| 1232 * documentation comment. | |
| 1233 */ | |
| 1234 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | |
| 1235 assert(!_finished); | |
| 1236 _documentationComment = _value; | |
| 1237 } | |
| 1238 | |
| 1239 @override | |
| 1240 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | |
| 1241 | |
| 1242 /** | |
| 1243 * Annotations for this class. | |
| 1244 */ | |
| 1245 void set annotations(List<UnlinkedConstBuilder> _value) { | |
| 1246 assert(!_finished); | |
| 1247 _annotations = _value; | |
| 1248 } | |
| 1249 | |
| 1250 @override | |
| 1251 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | |
| 1252 | |
| 1253 /** | |
| 1254 * Type parameters of the class, if any. | |
| 1255 */ | |
| 1256 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | |
| 1257 assert(!_finished); | |
| 1258 _typeParameters = _value; | |
| 1259 } | |
| 1260 | |
| 1261 @override | |
| 1262 EntityRefBuilder get supertype => _supertype; | 1329 EntityRefBuilder get supertype => _supertype; |
| 1263 | 1330 |
| 1264 /** | 1331 /** |
| 1265 * Supertype of the class, or `null` if either (a) the class doesn't | 1332 * Supertype of the class, or `null` if either (a) the class doesn't |
| 1266 * explicitly declare a supertype (and hence has supertype `Object`), or (b) | 1333 * explicitly declare a supertype (and hence has supertype `Object`), or (b) |
| 1267 * the class *is* `Object` (and hence has no supertype). | 1334 * the class *is* `Object` (and hence has no supertype). |
| 1268 */ | 1335 */ |
| 1269 void set supertype(EntityRefBuilder _value) { | 1336 void set supertype(EntityRefBuilder _value) { |
| 1270 assert(!_finished); | 1337 assert(!_finished); |
| 1271 _supertype = _value; | 1338 _supertype = _value; |
| 1272 } | 1339 } |
| 1273 | 1340 |
| 1274 @override | 1341 @override |
| 1275 List<EntityRefBuilder> get mixins => _mixins ??= <EntityRefBuilder>[]; | 1342 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
| 1276 | 1343 |
| 1277 /** | 1344 /** |
| 1278 * Mixins appearing in a `with` clause, if any. | 1345 * Type parameters of the class, if any. |
| 1279 */ | 1346 */ |
| 1280 void set mixins(List<EntityRefBuilder> _value) { | 1347 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 1281 assert(!_finished); | 1348 assert(!_finished); |
| 1282 _mixins = _value; | 1349 _typeParameters = _value; |
| 1283 } | 1350 } |
| 1284 | 1351 |
| 1285 @override | 1352 UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocument
ationCommentBuilder documentationComment, List<UnlinkedExecutableBuilder> execut
ables, List<UnlinkedVariableBuilder> fields, bool hasNoSupertype, List<EntityRef
Builder> interfaces, bool isAbstract, bool isMixinApplication, List<EntityRefBui
lder> mixins, String name, int nameOffset, EntityRefBuilder supertype, List<Unli
nkedTypeParamBuilder> typeParameters}) |
| 1286 List<EntityRefBuilder> get interfaces => _interfaces ??= <EntityRefBuilder>[]; | 1353 : _annotations = annotations, |
| 1287 | |
| 1288 /** | |
| 1289 * Interfaces appearing in an `implements` clause, if any. | |
| 1290 */ | |
| 1291 void set interfaces(List<EntityRefBuilder> _value) { | |
| 1292 assert(!_finished); | |
| 1293 _interfaces = _value; | |
| 1294 } | |
| 1295 | |
| 1296 @override | |
| 1297 List<UnlinkedVariableBuilder> get fields => _fields ??= <UnlinkedVariableBuild
er>[]; | |
| 1298 | |
| 1299 /** | |
| 1300 * Field declarations contained in the class. | |
| 1301 */ | |
| 1302 void set fields(List<UnlinkedVariableBuilder> _value) { | |
| 1303 assert(!_finished); | |
| 1304 _fields = _value; | |
| 1305 } | |
| 1306 | |
| 1307 @override | |
| 1308 List<UnlinkedExecutableBuilder> get executables => _executables ??= <UnlinkedE
xecutableBuilder>[]; | |
| 1309 | |
| 1310 /** | |
| 1311 * Executable objects (methods, getters, and setters) contained in the class. | |
| 1312 */ | |
| 1313 void set executables(List<UnlinkedExecutableBuilder> _value) { | |
| 1314 assert(!_finished); | |
| 1315 _executables = _value; | |
| 1316 } | |
| 1317 | |
| 1318 @override | |
| 1319 bool get isAbstract => _isAbstract ??= false; | |
| 1320 | |
| 1321 /** | |
| 1322 * Indicates whether the class is declared with the `abstract` keyword. | |
| 1323 */ | |
| 1324 void set isAbstract(bool _value) { | |
| 1325 assert(!_finished); | |
| 1326 _isAbstract = _value; | |
| 1327 } | |
| 1328 | |
| 1329 @override | |
| 1330 bool get isMixinApplication => _isMixinApplication ??= false; | |
| 1331 | |
| 1332 /** | |
| 1333 * Indicates whether the class is declared using mixin application syntax. | |
| 1334 */ | |
| 1335 void set isMixinApplication(bool _value) { | |
| 1336 assert(!_finished); | |
| 1337 _isMixinApplication = _value; | |
| 1338 } | |
| 1339 | |
| 1340 @override | |
| 1341 bool get hasNoSupertype => _hasNoSupertype ??= false; | |
| 1342 | |
| 1343 /** | |
| 1344 * Indicates whether this class is the core "Object" class (and hence has no | |
| 1345 * supertype) | |
| 1346 */ | |
| 1347 void set hasNoSupertype(bool _value) { | |
| 1348 assert(!_finished); | |
| 1349 _hasNoSupertype = _value; | |
| 1350 } | |
| 1351 | |
| 1352 UnlinkedClassBuilder({String name, int nameOffset, UnlinkedDocumentationCommen
tBuilder documentationComment, List<UnlinkedConstBuilder> annotations, List<Unli
nkedTypeParamBuilder> typeParameters, EntityRefBuilder supertype, List<EntityRef
Builder> mixins, List<EntityRefBuilder> interfaces, List<UnlinkedVariableBuilder
> fields, List<UnlinkedExecutableBuilder> executables, bool isAbstract, bool isM
ixinApplication, bool hasNoSupertype}) | |
| 1353 : _name = name, | |
| 1354 _nameOffset = nameOffset, | |
| 1355 _documentationComment = documentationComment, | 1354 _documentationComment = documentationComment, |
| 1356 _annotations = annotations, | 1355 _executables = executables, |
| 1357 _typeParameters = typeParameters, | 1356 _fields = fields, |
| 1358 _supertype = supertype, | 1357 _hasNoSupertype = hasNoSupertype, |
| 1359 _mixins = mixins, | |
| 1360 _interfaces = interfaces, | 1358 _interfaces = interfaces, |
| 1361 _fields = fields, | |
| 1362 _executables = executables, | |
| 1363 _isAbstract = isAbstract, | 1359 _isAbstract = isAbstract, |
| 1364 _isMixinApplication = isMixinApplication, | 1360 _isMixinApplication = isMixinApplication, |
| 1365 _hasNoSupertype = hasNoSupertype; | 1361 _mixins = mixins, |
| 1362 _name = name, |
| 1363 _nameOffset = nameOffset, |
| 1364 _supertype = supertype, |
| 1365 _typeParameters = typeParameters; |
| 1366 | 1366 |
| 1367 fb.Offset finish(fb.Builder fbBuilder) { | 1367 fb.Offset finish(fb.Builder fbBuilder) { |
| 1368 assert(!_finished); | 1368 assert(!_finished); |
| 1369 _finished = true; | 1369 _finished = true; |
| 1370 fb.Offset offset_annotations; |
| 1371 fb.Offset offset_documentationComment; |
| 1372 fb.Offset offset_executables; |
| 1373 fb.Offset offset_fields; |
| 1374 fb.Offset offset_interfaces; |
| 1375 fb.Offset offset_mixins; |
| 1370 fb.Offset offset_name; | 1376 fb.Offset offset_name; |
| 1371 fb.Offset offset_documentationComment; | 1377 fb.Offset offset_supertype; |
| 1372 fb.Offset offset_annotations; | |
| 1373 fb.Offset offset_typeParameters; | 1378 fb.Offset offset_typeParameters; |
| 1374 fb.Offset offset_supertype; | 1379 if (!(_annotations == null || _annotations.isEmpty)) { |
| 1375 fb.Offset offset_mixins; | 1380 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 1376 fb.Offset offset_interfaces; | 1381 } |
| 1377 fb.Offset offset_fields; | 1382 if (_documentationComment != null) { |
| 1378 fb.Offset offset_executables; | 1383 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 1384 } |
| 1385 if (!(_executables == null || _executables.isEmpty)) { |
| 1386 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); |
| 1387 } |
| 1388 if (!(_fields == null || _fields.isEmpty)) { |
| 1389 offset_fields = fbBuilder.writeList(_fields.map((b) => b.finish(fbBuilder)
).toList()); |
| 1390 } |
| 1391 if (!(_interfaces == null || _interfaces.isEmpty)) { |
| 1392 offset_interfaces = fbBuilder.writeList(_interfaces.map((b) => b.finish(fb
Builder)).toList()); |
| 1393 } |
| 1394 if (!(_mixins == null || _mixins.isEmpty)) { |
| 1395 offset_mixins = fbBuilder.writeList(_mixins.map((b) => b.finish(fbBuilder)
).toList()); |
| 1396 } |
| 1379 if (_name != null) { | 1397 if (_name != null) { |
| 1380 offset_name = fbBuilder.writeString(_name); | 1398 offset_name = fbBuilder.writeString(_name); |
| 1381 } | 1399 } |
| 1382 if (_documentationComment != null) { | 1400 if (_supertype != null) { |
| 1383 offset_documentationComment = _documentationComment.finish(fbBuilder); | 1401 offset_supertype = _supertype.finish(fbBuilder); |
| 1384 } | |
| 1385 if (!(_annotations == null || _annotations.isEmpty)) { | |
| 1386 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | |
| 1387 } | 1402 } |
| 1388 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 1403 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
| 1389 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 1404 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
| 1390 } | 1405 } |
| 1391 if (_supertype != null) { | |
| 1392 offset_supertype = _supertype.finish(fbBuilder); | |
| 1393 } | |
| 1394 if (!(_mixins == null || _mixins.isEmpty)) { | |
| 1395 offset_mixins = fbBuilder.writeList(_mixins.map((b) => b.finish(fbBuilder)
).toList()); | |
| 1396 } | |
| 1397 if (!(_interfaces == null || _interfaces.isEmpty)) { | |
| 1398 offset_interfaces = fbBuilder.writeList(_interfaces.map((b) => b.finish(fb
Builder)).toList()); | |
| 1399 } | |
| 1400 if (!(_fields == null || _fields.isEmpty)) { | |
| 1401 offset_fields = fbBuilder.writeList(_fields.map((b) => b.finish(fbBuilder)
).toList()); | |
| 1402 } | |
| 1403 if (!(_executables == null || _executables.isEmpty)) { | |
| 1404 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | |
| 1405 } | |
| 1406 fbBuilder.startTable(); | 1406 fbBuilder.startTable(); |
| 1407 if (offset_annotations != null) { |
| 1408 fbBuilder.addOffset(0, offset_annotations); |
| 1409 } |
| 1410 if (offset_documentationComment != null) { |
| 1411 fbBuilder.addOffset(1, offset_documentationComment); |
| 1412 } |
| 1413 if (offset_executables != null) { |
| 1414 fbBuilder.addOffset(2, offset_executables); |
| 1415 } |
| 1416 if (offset_fields != null) { |
| 1417 fbBuilder.addOffset(3, offset_fields); |
| 1418 } |
| 1419 if (_hasNoSupertype == true) { |
| 1420 fbBuilder.addBool(4, true); |
| 1421 } |
| 1422 if (offset_interfaces != null) { |
| 1423 fbBuilder.addOffset(5, offset_interfaces); |
| 1424 } |
| 1425 if (_isAbstract == true) { |
| 1426 fbBuilder.addBool(6, true); |
| 1427 } |
| 1428 if (_isMixinApplication == true) { |
| 1429 fbBuilder.addBool(7, true); |
| 1430 } |
| 1431 if (offset_mixins != null) { |
| 1432 fbBuilder.addOffset(8, offset_mixins); |
| 1433 } |
| 1407 if (offset_name != null) { | 1434 if (offset_name != null) { |
| 1408 fbBuilder.addOffset(0, offset_name); | 1435 fbBuilder.addOffset(9, offset_name); |
| 1409 } | 1436 } |
| 1410 if (_nameOffset != null && _nameOffset != 0) { | 1437 if (_nameOffset != null && _nameOffset != 0) { |
| 1411 fbBuilder.addUint32(1, _nameOffset); | 1438 fbBuilder.addUint32(10, _nameOffset); |
| 1412 } | 1439 } |
| 1413 if (offset_documentationComment != null) { | 1440 if (offset_supertype != null) { |
| 1414 fbBuilder.addOffset(2, offset_documentationComment); | 1441 fbBuilder.addOffset(11, offset_supertype); |
| 1415 } | |
| 1416 if (offset_annotations != null) { | |
| 1417 fbBuilder.addOffset(3, offset_annotations); | |
| 1418 } | 1442 } |
| 1419 if (offset_typeParameters != null) { | 1443 if (offset_typeParameters != null) { |
| 1420 fbBuilder.addOffset(4, offset_typeParameters); | 1444 fbBuilder.addOffset(12, offset_typeParameters); |
| 1421 } | |
| 1422 if (offset_supertype != null) { | |
| 1423 fbBuilder.addOffset(5, offset_supertype); | |
| 1424 } | |
| 1425 if (offset_mixins != null) { | |
| 1426 fbBuilder.addOffset(6, offset_mixins); | |
| 1427 } | |
| 1428 if (offset_interfaces != null) { | |
| 1429 fbBuilder.addOffset(7, offset_interfaces); | |
| 1430 } | |
| 1431 if (offset_fields != null) { | |
| 1432 fbBuilder.addOffset(8, offset_fields); | |
| 1433 } | |
| 1434 if (offset_executables != null) { | |
| 1435 fbBuilder.addOffset(9, offset_executables); | |
| 1436 } | |
| 1437 if (_isAbstract == true) { | |
| 1438 fbBuilder.addBool(10, true); | |
| 1439 } | |
| 1440 if (_isMixinApplication == true) { | |
| 1441 fbBuilder.addBool(11, true); | |
| 1442 } | |
| 1443 if (_hasNoSupertype == true) { | |
| 1444 fbBuilder.addBool(12, true); | |
| 1445 } | 1445 } |
| 1446 return fbBuilder.endTable(); | 1446 return fbBuilder.endTable(); |
| 1447 } | 1447 } |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> { | 1450 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> { |
| 1451 const _UnlinkedClassReader(); | 1451 const _UnlinkedClassReader(); |
| 1452 | 1452 |
| 1453 @override | 1453 @override |
| 1454 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl
(bp); | 1454 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl
(bp); |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { | 1457 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { |
| 1458 final fb.BufferPointer _bp; | 1458 final fb.BufferPointer _bp; |
| 1459 | 1459 |
| 1460 _UnlinkedClassImpl(this._bp); | 1460 _UnlinkedClassImpl(this._bp); |
| 1461 | 1461 |
| 1462 List<idl.UnlinkedConst> _annotations; |
| 1463 idl.UnlinkedDocumentationComment _documentationComment; |
| 1464 List<idl.UnlinkedExecutable> _executables; |
| 1465 List<idl.UnlinkedVariable> _fields; |
| 1466 bool _hasNoSupertype; |
| 1467 List<idl.EntityRef> _interfaces; |
| 1468 bool _isAbstract; |
| 1469 bool _isMixinApplication; |
| 1470 List<idl.EntityRef> _mixins; |
| 1462 String _name; | 1471 String _name; |
| 1463 int _nameOffset; | 1472 int _nameOffset; |
| 1464 idl.UnlinkedDocumentationComment _documentationComment; | 1473 idl.EntityRef _supertype; |
| 1465 List<idl.UnlinkedConst> _annotations; | |
| 1466 List<idl.UnlinkedTypeParam> _typeParameters; | 1474 List<idl.UnlinkedTypeParam> _typeParameters; |
| 1467 idl.EntityRef _supertype; | 1475 |
| 1468 List<idl.EntityRef> _mixins; | 1476 @override |
| 1469 List<idl.EntityRef> _interfaces; | 1477 List<idl.UnlinkedConst> get annotations { |
| 1470 List<idl.UnlinkedVariable> _fields; | 1478 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 1471 List<idl.UnlinkedExecutable> _executables; | 1479 return _annotations; |
| 1472 bool _isAbstract; | 1480 } |
| 1473 bool _isMixinApplication; | 1481 |
| 1474 bool _hasNoSupertype; | 1482 @override |
| 1483 idl.UnlinkedDocumentationComment get documentationComment { |
| 1484 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 1, null); |
| 1485 return _documentationComment; |
| 1486 } |
| 1487 |
| 1488 @override |
| 1489 List<idl.UnlinkedExecutable> get executables { |
| 1490 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]); |
| 1491 return _executables; |
| 1492 } |
| 1493 |
| 1494 @override |
| 1495 List<idl.UnlinkedVariable> get fields { |
| 1496 _fields ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVariabl
eReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]); |
| 1497 return _fields; |
| 1498 } |
| 1499 |
| 1500 @override |
| 1501 bool get hasNoSupertype { |
| 1502 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 4, false); |
| 1503 return _hasNoSupertype; |
| 1504 } |
| 1505 |
| 1506 @override |
| 1507 List<idl.EntityRef> get interfaces { |
| 1508 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bp, 5, const <idl.EntityRef>[]); |
| 1509 return _interfaces; |
| 1510 } |
| 1511 |
| 1512 @override |
| 1513 bool get isAbstract { |
| 1514 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 6, false); |
| 1515 return _isAbstract; |
| 1516 } |
| 1517 |
| 1518 @override |
| 1519 bool get isMixinApplication { |
| 1520 _isMixinApplication ??= const fb.BoolReader().vTableGet(_bp, 7, false); |
| 1521 return _isMixinApplication; |
| 1522 } |
| 1523 |
| 1524 @override |
| 1525 List<idl.EntityRef> get mixins { |
| 1526 _mixins ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTa
bleGet(_bp, 8, const <idl.EntityRef>[]); |
| 1527 return _mixins; |
| 1528 } |
| 1475 | 1529 |
| 1476 @override | 1530 @override |
| 1477 String get name { | 1531 String get name { |
| 1478 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 1532 _name ??= const fb.StringReader().vTableGet(_bp, 9, ''); |
| 1479 return _name; | 1533 return _name; |
| 1480 } | 1534 } |
| 1481 | 1535 |
| 1482 @override | 1536 @override |
| 1483 int get nameOffset { | 1537 int get nameOffset { |
| 1484 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 1538 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 10, 0); |
| 1485 return _nameOffset; | 1539 return _nameOffset; |
| 1486 } | 1540 } |
| 1487 | 1541 |
| 1488 @override | 1542 @override |
| 1489 idl.UnlinkedDocumentationComment get documentationComment { | 1543 idl.EntityRef get supertype { |
| 1490 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | 1544 _supertype ??= const _EntityRefReader().vTableGet(_bp, 11, null); |
| 1491 return _documentationComment; | 1545 return _supertype; |
| 1492 } | |
| 1493 | |
| 1494 @override | |
| 1495 List<idl.UnlinkedConst> get annotations { | |
| 1496 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | |
| 1497 return _annotations; | |
| 1498 } | 1546 } |
| 1499 | 1547 |
| 1500 @override | 1548 @override |
| 1501 List<idl.UnlinkedTypeParam> get typeParameters { | 1549 List<idl.UnlinkedTypeParam> get typeParameters { |
| 1502 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 4, const <idl.UnlinkedTypeParam>[]); | 1550 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 12, const <idl.UnlinkedTypeParam>[]); |
| 1503 return _typeParameters; | 1551 return _typeParameters; |
| 1504 } | 1552 } |
| 1505 | |
| 1506 @override | |
| 1507 idl.EntityRef get supertype { | |
| 1508 _supertype ??= const _EntityRefReader().vTableGet(_bp, 5, null); | |
| 1509 return _supertype; | |
| 1510 } | |
| 1511 | |
| 1512 @override | |
| 1513 List<idl.EntityRef> get mixins { | |
| 1514 _mixins ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTa
bleGet(_bp, 6, const <idl.EntityRef>[]); | |
| 1515 return _mixins; | |
| 1516 } | |
| 1517 | |
| 1518 @override | |
| 1519 List<idl.EntityRef> get interfaces { | |
| 1520 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bp, 7, const <idl.EntityRef>[]); | |
| 1521 return _interfaces; | |
| 1522 } | |
| 1523 | |
| 1524 @override | |
| 1525 List<idl.UnlinkedVariable> get fields { | |
| 1526 _fields ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVariabl
eReader()).vTableGet(_bp, 8, const <idl.UnlinkedVariable>[]); | |
| 1527 return _fields; | |
| 1528 } | |
| 1529 | |
| 1530 @override | |
| 1531 List<idl.UnlinkedExecutable> get executables { | |
| 1532 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 9, const <idl.UnlinkedExecutable>[]); | |
| 1533 return _executables; | |
| 1534 } | |
| 1535 | |
| 1536 @override | |
| 1537 bool get isAbstract { | |
| 1538 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 10, false); | |
| 1539 return _isAbstract; | |
| 1540 } | |
| 1541 | |
| 1542 @override | |
| 1543 bool get isMixinApplication { | |
| 1544 _isMixinApplication ??= const fb.BoolReader().vTableGet(_bp, 11, false); | |
| 1545 return _isMixinApplication; | |
| 1546 } | |
| 1547 | |
| 1548 @override | |
| 1549 bool get hasNoSupertype { | |
| 1550 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 12, false); | |
| 1551 return _hasNoSupertype; | |
| 1552 } | |
| 1553 } | 1553 } |
| 1554 | 1554 |
| 1555 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { | 1555 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { |
| 1556 @override | 1556 @override |
| 1557 Map<String, Object> toMap() => { | 1557 Map<String, Object> toMap() => { |
| 1558 "annotations": annotations, |
| 1559 "documentationComment": documentationComment, |
| 1560 "executables": executables, |
| 1561 "fields": fields, |
| 1562 "hasNoSupertype": hasNoSupertype, |
| 1563 "interfaces": interfaces, |
| 1564 "isAbstract": isAbstract, |
| 1565 "isMixinApplication": isMixinApplication, |
| 1566 "mixins": mixins, |
| 1558 "name": name, | 1567 "name": name, |
| 1559 "nameOffset": nameOffset, | 1568 "nameOffset": nameOffset, |
| 1560 "documentationComment": documentationComment, | 1569 "supertype": supertype, |
| 1561 "annotations": annotations, | |
| 1562 "typeParameters": typeParameters, | 1570 "typeParameters": typeParameters, |
| 1563 "supertype": supertype, | |
| 1564 "mixins": mixins, | |
| 1565 "interfaces": interfaces, | |
| 1566 "fields": fields, | |
| 1567 "executables": executables, | |
| 1568 "isAbstract": isAbstract, | |
| 1569 "isMixinApplication": isMixinApplication, | |
| 1570 "hasNoSupertype": hasNoSupertype, | |
| 1571 }; | 1571 }; |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp
lements idl.UnlinkedCombinator { | 1574 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp
lements idl.UnlinkedCombinator { |
| 1575 bool _finished = false; | 1575 bool _finished = false; |
| 1576 | 1576 |
| 1577 List<String> _hides; |
| 1577 List<String> _shows; | 1578 List<String> _shows; |
| 1578 List<String> _hides; | 1579 |
| 1580 @override |
| 1581 List<String> get hides => _hides ??= <String>[]; |
| 1582 |
| 1583 /** |
| 1584 * List of names which are hidden. Empty if this is a `show` combinator. |
| 1585 */ |
| 1586 void set hides(List<String> _value) { |
| 1587 assert(!_finished); |
| 1588 _hides = _value; |
| 1589 } |
| 1579 | 1590 |
| 1580 @override | 1591 @override |
| 1581 List<String> get shows => _shows ??= <String>[]; | 1592 List<String> get shows => _shows ??= <String>[]; |
| 1582 | 1593 |
| 1583 /** | 1594 /** |
| 1584 * List of names which are shown. Empty if this is a `hide` combinator. | 1595 * List of names which are shown. Empty if this is a `hide` combinator. |
| 1585 */ | 1596 */ |
| 1586 void set shows(List<String> _value) { | 1597 void set shows(List<String> _value) { |
| 1587 assert(!_finished); | 1598 assert(!_finished); |
| 1588 _shows = _value; | 1599 _shows = _value; |
| 1589 } | 1600 } |
| 1590 | 1601 |
| 1591 @override | 1602 UnlinkedCombinatorBuilder({List<String> hides, List<String> shows}) |
| 1592 List<String> get hides => _hides ??= <String>[]; | 1603 : _hides = hides, |
| 1593 | 1604 _shows = shows; |
| 1594 /** | |
| 1595 * List of names which are hidden. Empty if this is a `show` combinator. | |
| 1596 */ | |
| 1597 void set hides(List<String> _value) { | |
| 1598 assert(!_finished); | |
| 1599 _hides = _value; | |
| 1600 } | |
| 1601 | |
| 1602 UnlinkedCombinatorBuilder({List<String> shows, List<String> hides}) | |
| 1603 : _shows = shows, | |
| 1604 _hides = hides; | |
| 1605 | 1605 |
| 1606 fb.Offset finish(fb.Builder fbBuilder) { | 1606 fb.Offset finish(fb.Builder fbBuilder) { |
| 1607 assert(!_finished); | 1607 assert(!_finished); |
| 1608 _finished = true; | 1608 _finished = true; |
| 1609 fb.Offset offset_hides; |
| 1609 fb.Offset offset_shows; | 1610 fb.Offset offset_shows; |
| 1610 fb.Offset offset_hides; | 1611 if (!(_hides == null || _hides.isEmpty)) { |
| 1612 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString
(b)).toList()); |
| 1613 } |
| 1611 if (!(_shows == null || _shows.isEmpty)) { | 1614 if (!(_shows == null || _shows.isEmpty)) { |
| 1612 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString
(b)).toList()); | 1615 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString
(b)).toList()); |
| 1613 } | 1616 } |
| 1614 if (!(_hides == null || _hides.isEmpty)) { | 1617 fbBuilder.startTable(); |
| 1615 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString
(b)).toList()); | 1618 if (offset_hides != null) { |
| 1619 fbBuilder.addOffset(0, offset_hides); |
| 1616 } | 1620 } |
| 1617 fbBuilder.startTable(); | |
| 1618 if (offset_shows != null) { | 1621 if (offset_shows != null) { |
| 1619 fbBuilder.addOffset(0, offset_shows); | 1622 fbBuilder.addOffset(1, offset_shows); |
| 1620 } | |
| 1621 if (offset_hides != null) { | |
| 1622 fbBuilder.addOffset(1, offset_hides); | |
| 1623 } | 1623 } |
| 1624 return fbBuilder.endTable(); | 1624 return fbBuilder.endTable(); |
| 1625 } | 1625 } |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl>
{ | 1628 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl>
{ |
| 1629 const _UnlinkedCombinatorReader(); | 1629 const _UnlinkedCombinatorReader(); |
| 1630 | 1630 |
| 1631 @override | 1631 @override |
| 1632 _UnlinkedCombinatorImpl createObject(fb.BufferPointer bp) => new _UnlinkedComb
inatorImpl(bp); | 1632 _UnlinkedCombinatorImpl createObject(fb.BufferPointer bp) => new _UnlinkedComb
inatorImpl(bp); |
| 1633 } | 1633 } |
| 1634 | 1634 |
| 1635 class _UnlinkedCombinatorImpl extends Object with _UnlinkedCombinatorMixin imple
ments idl.UnlinkedCombinator { | 1635 class _UnlinkedCombinatorImpl extends Object with _UnlinkedCombinatorMixin imple
ments idl.UnlinkedCombinator { |
| 1636 final fb.BufferPointer _bp; | 1636 final fb.BufferPointer _bp; |
| 1637 | 1637 |
| 1638 _UnlinkedCombinatorImpl(this._bp); | 1638 _UnlinkedCombinatorImpl(this._bp); |
| 1639 | 1639 |
| 1640 List<String> _hides; |
| 1640 List<String> _shows; | 1641 List<String> _shows; |
| 1641 List<String> _hides; | 1642 |
| 1643 @override |
| 1644 List<String> get hides { |
| 1645 _hides ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 0, const <String>[]); |
| 1646 return _hides; |
| 1647 } |
| 1642 | 1648 |
| 1643 @override | 1649 @override |
| 1644 List<String> get shows { | 1650 List<String> get shows { |
| 1645 _shows ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 0, const <String>[]); | 1651 _shows ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 1, const <String>[]); |
| 1646 return _shows; | 1652 return _shows; |
| 1647 } | 1653 } |
| 1648 | |
| 1649 @override | |
| 1650 List<String> get hides { | |
| 1651 _hides ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 1, const <String>[]); | |
| 1652 return _hides; | |
| 1653 } | |
| 1654 } | 1654 } |
| 1655 | 1655 |
| 1656 abstract class _UnlinkedCombinatorMixin implements idl.UnlinkedCombinator { | 1656 abstract class _UnlinkedCombinatorMixin implements idl.UnlinkedCombinator { |
| 1657 @override | 1657 @override |
| 1658 Map<String, Object> toMap() => { | 1658 Map<String, Object> toMap() => { |
| 1659 "hides": hides, |
| 1659 "shows": shows, | 1660 "shows": shows, |
| 1660 "hides": hides, | |
| 1661 }; | 1661 }; |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements id
l.UnlinkedConst { | 1664 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements id
l.UnlinkedConst { |
| 1665 bool _finished = false; | 1665 bool _finished = false; |
| 1666 | 1666 |
| 1667 List<double> _doubles; |
| 1668 List<int> _ints; |
| 1667 bool _isInvalid; | 1669 bool _isInvalid; |
| 1668 List<idl.UnlinkedConstOperation> _operations; | 1670 List<idl.UnlinkedConstOperation> _operations; |
| 1669 List<int> _ints; | 1671 List<EntityRefBuilder> _references; |
| 1670 List<double> _doubles; | |
| 1671 List<String> _strings; | 1672 List<String> _strings; |
| 1672 List<EntityRefBuilder> _references; | |
| 1673 | 1673 |
| 1674 @override | 1674 @override |
| 1675 bool get isInvalid => _isInvalid ??= false; | 1675 List<double> get doubles => _doubles ??= <double>[]; |
| 1676 | 1676 |
| 1677 /** | 1677 /** |
| 1678 * Indicates whether the expression is not a valid potentially constant | 1678 * Sequence of 64-bit doubles consumed by the operation `pushDouble`. |
| 1679 * expression. | |
| 1680 */ | 1679 */ |
| 1681 void set isInvalid(bool _value) { | 1680 void set doubles(List<double> _value) { |
| 1682 assert(!_finished); | 1681 assert(!_finished); |
| 1683 _isInvalid = _value; | 1682 _doubles = _value; |
| 1684 } | 1683 } |
| 1685 | 1684 |
| 1686 @override | 1685 @override |
| 1687 List<idl.UnlinkedConstOperation> get operations => _operations ??= <idl.Unlink
edConstOperation>[]; | |
| 1688 | |
| 1689 /** | |
| 1690 * Sequence of operations to execute (starting with an empty stack) to form | |
| 1691 * the constant value. | |
| 1692 */ | |
| 1693 void set operations(List<idl.UnlinkedConstOperation> _value) { | |
| 1694 assert(!_finished); | |
| 1695 _operations = _value; | |
| 1696 } | |
| 1697 | |
| 1698 @override | |
| 1699 List<int> get ints => _ints ??= <int>[]; | 1686 List<int> get ints => _ints ??= <int>[]; |
| 1700 | 1687 |
| 1701 /** | 1688 /** |
| 1702 * Sequence of unsigned 32-bit integers consumed by the operations | 1689 * Sequence of unsigned 32-bit integers consumed by the operations |
| 1703 * `pushArgument`, `pushInt`, `shiftOr`, `concatenate`, `invokeConstructor`, | 1690 * `pushArgument`, `pushInt`, `shiftOr`, `concatenate`, `invokeConstructor`, |
| 1704 * `makeList`, and `makeMap`. | 1691 * `makeList`, and `makeMap`. |
| 1705 */ | 1692 */ |
| 1706 void set ints(List<int> _value) { | 1693 void set ints(List<int> _value) { |
| 1707 assert(!_finished); | 1694 assert(!_finished); |
| 1708 assert(_value == null || _value.every((e) => e >= 0)); | 1695 assert(_value == null || _value.every((e) => e >= 0)); |
| 1709 _ints = _value; | 1696 _ints = _value; |
| 1710 } | 1697 } |
| 1711 | 1698 |
| 1712 @override | 1699 @override |
| 1713 List<double> get doubles => _doubles ??= <double>[]; | 1700 bool get isInvalid => _isInvalid ??= false; |
| 1714 | 1701 |
| 1715 /** | 1702 /** |
| 1716 * Sequence of 64-bit doubles consumed by the operation `pushDouble`. | 1703 * Indicates whether the expression is not a valid potentially constant |
| 1704 * expression. |
| 1717 */ | 1705 */ |
| 1718 void set doubles(List<double> _value) { | 1706 void set isInvalid(bool _value) { |
| 1719 assert(!_finished); | 1707 assert(!_finished); |
| 1720 _doubles = _value; | 1708 _isInvalid = _value; |
| 1721 } | 1709 } |
| 1722 | 1710 |
| 1723 @override | 1711 @override |
| 1724 List<String> get strings => _strings ??= <String>[]; | 1712 List<idl.UnlinkedConstOperation> get operations => _operations ??= <idl.Unlink
edConstOperation>[]; |
| 1725 | 1713 |
| 1726 /** | 1714 /** |
| 1727 * Sequence of strings consumed by the operations `pushString` and | 1715 * Sequence of operations to execute (starting with an empty stack) to form |
| 1728 * `invokeConstructor`. | 1716 * the constant value. |
| 1729 */ | 1717 */ |
| 1730 void set strings(List<String> _value) { | 1718 void set operations(List<idl.UnlinkedConstOperation> _value) { |
| 1731 assert(!_finished); | 1719 assert(!_finished); |
| 1732 _strings = _value; | 1720 _operations = _value; |
| 1733 } | 1721 } |
| 1734 | 1722 |
| 1735 @override | 1723 @override |
| 1736 List<EntityRefBuilder> get references => _references ??= <EntityRefBuilder>[]; | 1724 List<EntityRefBuilder> get references => _references ??= <EntityRefBuilder>[]; |
| 1737 | 1725 |
| 1738 /** | 1726 /** |
| 1739 * Sequence of language constructs consumed by the operations | 1727 * Sequence of language constructs consumed by the operations |
| 1740 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note | 1728 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note |
| 1741 * that in the case of `pushReference` (and sometimes `invokeConstructor` the | 1729 * that in the case of `pushReference` (and sometimes `invokeConstructor` the |
| 1742 * actual entity being referred to may be something other than a type. | 1730 * actual entity being referred to may be something other than a type. |
| 1743 */ | 1731 */ |
| 1744 void set references(List<EntityRefBuilder> _value) { | 1732 void set references(List<EntityRefBuilder> _value) { |
| 1745 assert(!_finished); | 1733 assert(!_finished); |
| 1746 _references = _value; | 1734 _references = _value; |
| 1747 } | 1735 } |
| 1748 | 1736 |
| 1749 UnlinkedConstBuilder({bool isInvalid, List<idl.UnlinkedConstOperation> operati
ons, List<int> ints, List<double> doubles, List<String> strings, List<EntityRefB
uilder> references}) | 1737 @override |
| 1750 : _isInvalid = isInvalid, | 1738 List<String> get strings => _strings ??= <String>[]; |
| 1739 |
| 1740 /** |
| 1741 * Sequence of strings consumed by the operations `pushString` and |
| 1742 * `invokeConstructor`. |
| 1743 */ |
| 1744 void set strings(List<String> _value) { |
| 1745 assert(!_finished); |
| 1746 _strings = _value; |
| 1747 } |
| 1748 |
| 1749 UnlinkedConstBuilder({List<double> doubles, List<int> ints, bool isInvalid, Li
st<idl.UnlinkedConstOperation> operations, List<EntityRefBuilder> references, Li
st<String> strings}) |
| 1750 : _doubles = doubles, |
| 1751 _ints = ints, |
| 1752 _isInvalid = isInvalid, |
| 1751 _operations = operations, | 1753 _operations = operations, |
| 1752 _ints = ints, | 1754 _references = references, |
| 1753 _doubles = doubles, | 1755 _strings = strings; |
| 1754 _strings = strings, | |
| 1755 _references = references; | |
| 1756 | 1756 |
| 1757 fb.Offset finish(fb.Builder fbBuilder) { | 1757 fb.Offset finish(fb.Builder fbBuilder) { |
| 1758 assert(!_finished); | 1758 assert(!_finished); |
| 1759 _finished = true; | 1759 _finished = true; |
| 1760 fb.Offset offset_doubles; |
| 1761 fb.Offset offset_ints; |
| 1760 fb.Offset offset_operations; | 1762 fb.Offset offset_operations; |
| 1761 fb.Offset offset_ints; | 1763 fb.Offset offset_references; |
| 1762 fb.Offset offset_doubles; | |
| 1763 fb.Offset offset_strings; | 1764 fb.Offset offset_strings; |
| 1764 fb.Offset offset_references; | 1765 if (!(_doubles == null || _doubles.isEmpty)) { |
| 1765 if (!(_operations == null || _operations.isEmpty)) { | 1766 offset_doubles = fbBuilder.writeListFloat64(_doubles); |
| 1766 offset_operations = fbBuilder.writeListUint32(_operations.map((b) => b.ind
ex).toList()); | |
| 1767 } | 1767 } |
| 1768 if (!(_ints == null || _ints.isEmpty)) { | 1768 if (!(_ints == null || _ints.isEmpty)) { |
| 1769 offset_ints = fbBuilder.writeListUint32(_ints); | 1769 offset_ints = fbBuilder.writeListUint32(_ints); |
| 1770 } | 1770 } |
| 1771 if (!(_doubles == null || _doubles.isEmpty)) { | 1771 if (!(_operations == null || _operations.isEmpty)) { |
| 1772 offset_doubles = fbBuilder.writeListFloat64(_doubles); | 1772 offset_operations = fbBuilder.writeListUint32(_operations.map((b) => b.ind
ex).toList()); |
| 1773 } |
| 1774 if (!(_references == null || _references.isEmpty)) { |
| 1775 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); |
| 1773 } | 1776 } |
| 1774 if (!(_strings == null || _strings.isEmpty)) { | 1777 if (!(_strings == null || _strings.isEmpty)) { |
| 1775 offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeSt
ring(b)).toList()); | 1778 offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeSt
ring(b)).toList()); |
| 1776 } | 1779 } |
| 1777 if (!(_references == null || _references.isEmpty)) { | 1780 fbBuilder.startTable(); |
| 1778 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 1781 if (offset_doubles != null) { |
| 1782 fbBuilder.addOffset(0, offset_doubles); |
| 1779 } | 1783 } |
| 1780 fbBuilder.startTable(); | 1784 if (offset_ints != null) { |
| 1785 fbBuilder.addOffset(1, offset_ints); |
| 1786 } |
| 1781 if (_isInvalid == true) { | 1787 if (_isInvalid == true) { |
| 1782 fbBuilder.addBool(0, true); | 1788 fbBuilder.addBool(2, true); |
| 1783 } | 1789 } |
| 1784 if (offset_operations != null) { | 1790 if (offset_operations != null) { |
| 1785 fbBuilder.addOffset(1, offset_operations); | 1791 fbBuilder.addOffset(3, offset_operations); |
| 1786 } | 1792 } |
| 1787 if (offset_ints != null) { | 1793 if (offset_references != null) { |
| 1788 fbBuilder.addOffset(2, offset_ints); | 1794 fbBuilder.addOffset(4, offset_references); |
| 1789 } | |
| 1790 if (offset_doubles != null) { | |
| 1791 fbBuilder.addOffset(3, offset_doubles); | |
| 1792 } | 1795 } |
| 1793 if (offset_strings != null) { | 1796 if (offset_strings != null) { |
| 1794 fbBuilder.addOffset(4, offset_strings); | 1797 fbBuilder.addOffset(5, offset_strings); |
| 1795 } | |
| 1796 if (offset_references != null) { | |
| 1797 fbBuilder.addOffset(5, offset_references); | |
| 1798 } | 1798 } |
| 1799 return fbBuilder.endTable(); | 1799 return fbBuilder.endTable(); |
| 1800 } | 1800 } |
| 1801 } | 1801 } |
| 1802 | 1802 |
| 1803 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> { | 1803 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> { |
| 1804 const _UnlinkedConstReader(); | 1804 const _UnlinkedConstReader(); |
| 1805 | 1805 |
| 1806 @override | 1806 @override |
| 1807 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl
(bp); | 1807 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl
(bp); |
| 1808 } | 1808 } |
| 1809 | 1809 |
| 1810 class _UnlinkedConstImpl extends Object with _UnlinkedConstMixin implements idl.
UnlinkedConst { | 1810 class _UnlinkedConstImpl extends Object with _UnlinkedConstMixin implements idl.
UnlinkedConst { |
| 1811 final fb.BufferPointer _bp; | 1811 final fb.BufferPointer _bp; |
| 1812 | 1812 |
| 1813 _UnlinkedConstImpl(this._bp); | 1813 _UnlinkedConstImpl(this._bp); |
| 1814 | 1814 |
| 1815 List<double> _doubles; |
| 1816 List<int> _ints; |
| 1815 bool _isInvalid; | 1817 bool _isInvalid; |
| 1816 List<idl.UnlinkedConstOperation> _operations; | 1818 List<idl.UnlinkedConstOperation> _operations; |
| 1817 List<int> _ints; | 1819 List<idl.EntityRef> _references; |
| 1818 List<double> _doubles; | |
| 1819 List<String> _strings; | 1820 List<String> _strings; |
| 1820 List<idl.EntityRef> _references; | 1821 |
| 1822 @override |
| 1823 List<double> get doubles { |
| 1824 _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 0, const <double>[]
); |
| 1825 return _doubles; |
| 1826 } |
| 1827 |
| 1828 @override |
| 1829 List<int> get ints { |
| 1830 _ints ??= const fb.ListReader<int>(const fb.Uint32Reader()).vTableGet(_bp, 1
, const <int>[]); |
| 1831 return _ints; |
| 1832 } |
| 1821 | 1833 |
| 1822 @override | 1834 @override |
| 1823 bool get isInvalid { | 1835 bool get isInvalid { |
| 1824 _isInvalid ??= const fb.BoolReader().vTableGet(_bp, 0, false); | 1836 _isInvalid ??= const fb.BoolReader().vTableGet(_bp, 2, false); |
| 1825 return _isInvalid; | 1837 return _isInvalid; |
| 1826 } | 1838 } |
| 1827 | 1839 |
| 1828 @override | 1840 @override |
| 1829 List<idl.UnlinkedConstOperation> get operations { | 1841 List<idl.UnlinkedConstOperation> get operations { |
| 1830 _operations ??= const fb.ListReader<idl.UnlinkedConstOperation>(const _Unlin
kedConstOperationReader()).vTableGet(_bp, 1, const <idl.UnlinkedConstOperation>[
]); | 1842 _operations ??= const fb.ListReader<idl.UnlinkedConstOperation>(const _Unlin
kedConstOperationReader()).vTableGet(_bp, 3, const <idl.UnlinkedConstOperation>[
]); |
| 1831 return _operations; | 1843 return _operations; |
| 1832 } | 1844 } |
| 1833 | 1845 |
| 1834 @override | 1846 @override |
| 1835 List<int> get ints { | 1847 List<idl.EntityRef> get references { |
| 1836 _ints ??= const fb.ListReader<int>(const fb.Uint32Reader()).vTableGet(_bp, 2
, const <int>[]); | 1848 _references ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bp, 4, const <idl.EntityRef>[]); |
| 1837 return _ints; | 1849 return _references; |
| 1838 } | |
| 1839 | |
| 1840 @override | |
| 1841 List<double> get doubles { | |
| 1842 _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 3, const <double>[]
); | |
| 1843 return _doubles; | |
| 1844 } | 1850 } |
| 1845 | 1851 |
| 1846 @override | 1852 @override |
| 1847 List<String> get strings { | 1853 List<String> get strings { |
| 1848 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bp, 4, const <String>[]); | 1854 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bp, 5, const <String>[]); |
| 1849 return _strings; | 1855 return _strings; |
| 1850 } | 1856 } |
| 1851 | |
| 1852 @override | |
| 1853 List<idl.EntityRef> get references { | |
| 1854 _references ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bp, 5, const <idl.EntityRef>[]); | |
| 1855 return _references; | |
| 1856 } | |
| 1857 } | 1857 } |
| 1858 | 1858 |
| 1859 abstract class _UnlinkedConstMixin implements idl.UnlinkedConst { | 1859 abstract class _UnlinkedConstMixin implements idl.UnlinkedConst { |
| 1860 @override | 1860 @override |
| 1861 Map<String, Object> toMap() => { | 1861 Map<String, Object> toMap() => { |
| 1862 "doubles": doubles, |
| 1863 "ints": ints, |
| 1862 "isInvalid": isInvalid, | 1864 "isInvalid": isInvalid, |
| 1863 "operations": operations, | 1865 "operations": operations, |
| 1864 "ints": ints, | 1866 "references": references, |
| 1865 "doubles": doubles, | |
| 1866 "strings": strings, | 1867 "strings": strings, |
| 1867 "references": references, | |
| 1868 }; | 1868 }; |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru
ctorInitializerMixin implements idl.UnlinkedConstructorInitializer { | 1871 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru
ctorInitializerMixin implements idl.UnlinkedConstructorInitializer { |
| 1872 bool _finished = false; | 1872 bool _finished = false; |
| 1873 | 1873 |
| 1874 List<UnlinkedConstBuilder> _arguments; |
| 1875 UnlinkedConstBuilder _expression; |
| 1874 idl.UnlinkedConstructorInitializerKind _kind; | 1876 idl.UnlinkedConstructorInitializerKind _kind; |
| 1875 String _name; | 1877 String _name; |
| 1876 UnlinkedConstBuilder _expression; | 1878 |
| 1877 List<UnlinkedConstBuilder> _arguments; | 1879 @override |
| 1880 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild
er>[]; |
| 1881 |
| 1882 /** |
| 1883 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the |
| 1884 * invocation. Otherwise empty. |
| 1885 */ |
| 1886 void set arguments(List<UnlinkedConstBuilder> _value) { |
| 1887 assert(!_finished); |
| 1888 _arguments = _value; |
| 1889 } |
| 1890 |
| 1891 @override |
| 1892 UnlinkedConstBuilder get expression => _expression; |
| 1893 |
| 1894 /** |
| 1895 * If [kind] is `field`, the expression of the field initializer. |
| 1896 * Otherwise `null`. |
| 1897 */ |
| 1898 void set expression(UnlinkedConstBuilder _value) { |
| 1899 assert(!_finished); |
| 1900 _expression = _value; |
| 1901 } |
| 1878 | 1902 |
| 1879 @override | 1903 @override |
| 1880 idl.UnlinkedConstructorInitializerKind get kind => _kind ??= idl.UnlinkedConst
ructorInitializerKind.field; | 1904 idl.UnlinkedConstructorInitializerKind get kind => _kind ??= idl.UnlinkedConst
ructorInitializerKind.field; |
| 1881 | 1905 |
| 1882 /** | 1906 /** |
| 1883 * The kind of the constructor initializer (field, redirect, super). | 1907 * The kind of the constructor initializer (field, redirect, super). |
| 1884 */ | 1908 */ |
| 1885 void set kind(idl.UnlinkedConstructorInitializerKind _value) { | 1909 void set kind(idl.UnlinkedConstructorInitializerKind _value) { |
| 1886 assert(!_finished); | 1910 assert(!_finished); |
| 1887 _kind = _value; | 1911 _kind = _value; |
| 1888 } | 1912 } |
| 1889 | 1913 |
| 1890 @override | 1914 @override |
| 1891 String get name => _name ??= ''; | 1915 String get name => _name ??= ''; |
| 1892 | 1916 |
| 1893 /** | 1917 /** |
| 1894 * If [kind] is `field`, the name of the field declared in the class. If | 1918 * If [kind] is `field`, the name of the field declared in the class. If |
| 1895 * [kind] is `thisInvocation`, the name of the constructor, declared in this | 1919 * [kind] is `thisInvocation`, the name of the constructor, declared in this |
| 1896 * class, to redirect to. If [kind] is `superInvocation`, the name of the | 1920 * class, to redirect to. If [kind] is `superInvocation`, the name of the |
| 1897 * constructor, declared in the superclass, to invoke. | 1921 * constructor, declared in the superclass, to invoke. |
| 1898 */ | 1922 */ |
| 1899 void set name(String _value) { | 1923 void set name(String _value) { |
| 1900 assert(!_finished); | 1924 assert(!_finished); |
| 1901 _name = _value; | 1925 _name = _value; |
| 1902 } | 1926 } |
| 1903 | 1927 |
| 1904 @override | 1928 UnlinkedConstructorInitializerBuilder({List<UnlinkedConstBuilder> arguments, U
nlinkedConstBuilder expression, idl.UnlinkedConstructorInitializerKind kind, Str
ing name}) |
| 1905 UnlinkedConstBuilder get expression => _expression; | 1929 : _arguments = arguments, |
| 1906 | |
| 1907 /** | |
| 1908 * If [kind] is `field`, the expression of the field initializer. | |
| 1909 * Otherwise `null`. | |
| 1910 */ | |
| 1911 void set expression(UnlinkedConstBuilder _value) { | |
| 1912 assert(!_finished); | |
| 1913 _expression = _value; | |
| 1914 } | |
| 1915 | |
| 1916 @override | |
| 1917 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild
er>[]; | |
| 1918 | |
| 1919 /** | |
| 1920 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the | |
| 1921 * invocation. Otherwise empty. | |
| 1922 */ | |
| 1923 void set arguments(List<UnlinkedConstBuilder> _value) { | |
| 1924 assert(!_finished); | |
| 1925 _arguments = _value; | |
| 1926 } | |
| 1927 | |
| 1928 UnlinkedConstructorInitializerBuilder({idl.UnlinkedConstructorInitializerKind
kind, String name, UnlinkedConstBuilder expression, List<UnlinkedConstBuilder> a
rguments}) | |
| 1929 : _kind = kind, | |
| 1930 _name = name, | |
| 1931 _expression = expression, | 1930 _expression = expression, |
| 1932 _arguments = arguments; | 1931 _kind = kind, |
| 1932 _name = name; |
| 1933 | 1933 |
| 1934 fb.Offset finish(fb.Builder fbBuilder) { | 1934 fb.Offset finish(fb.Builder fbBuilder) { |
| 1935 assert(!_finished); | 1935 assert(!_finished); |
| 1936 _finished = true; | 1936 _finished = true; |
| 1937 fb.Offset offset_arguments; |
| 1938 fb.Offset offset_expression; |
| 1937 fb.Offset offset_name; | 1939 fb.Offset offset_name; |
| 1938 fb.Offset offset_expression; | 1940 if (!(_arguments == null || _arguments.isEmpty)) { |
| 1939 fb.Offset offset_arguments; | 1941 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu
ilder)).toList()); |
| 1940 if (_name != null) { | |
| 1941 offset_name = fbBuilder.writeString(_name); | |
| 1942 } | 1942 } |
| 1943 if (_expression != null) { | 1943 if (_expression != null) { |
| 1944 offset_expression = _expression.finish(fbBuilder); | 1944 offset_expression = _expression.finish(fbBuilder); |
| 1945 } | 1945 } |
| 1946 if (!(_arguments == null || _arguments.isEmpty)) { | 1946 if (_name != null) { |
| 1947 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu
ilder)).toList()); | 1947 offset_name = fbBuilder.writeString(_name); |
| 1948 } | 1948 } |
| 1949 fbBuilder.startTable(); | 1949 fbBuilder.startTable(); |
| 1950 if (offset_arguments != null) { |
| 1951 fbBuilder.addOffset(0, offset_arguments); |
| 1952 } |
| 1953 if (offset_expression != null) { |
| 1954 fbBuilder.addOffset(1, offset_expression); |
| 1955 } |
| 1950 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field)
{ | 1956 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field)
{ |
| 1951 fbBuilder.addUint32(0, _kind.index); | 1957 fbBuilder.addUint32(2, _kind.index); |
| 1952 } | 1958 } |
| 1953 if (offset_name != null) { | 1959 if (offset_name != null) { |
| 1954 fbBuilder.addOffset(1, offset_name); | 1960 fbBuilder.addOffset(3, offset_name); |
| 1955 } | |
| 1956 if (offset_expression != null) { | |
| 1957 fbBuilder.addOffset(2, offset_expression); | |
| 1958 } | |
| 1959 if (offset_arguments != null) { | |
| 1960 fbBuilder.addOffset(3, offset_arguments); | |
| 1961 } | 1961 } |
| 1962 return fbBuilder.endTable(); | 1962 return fbBuilder.endTable(); |
| 1963 } | 1963 } |
| 1964 } | 1964 } |
| 1965 | 1965 |
| 1966 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons
tructorInitializerImpl> { | 1966 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons
tructorInitializerImpl> { |
| 1967 const _UnlinkedConstructorInitializerReader(); | 1967 const _UnlinkedConstructorInitializerReader(); |
| 1968 | 1968 |
| 1969 @override | 1969 @override |
| 1970 _UnlinkedConstructorInitializerImpl createObject(fb.BufferPointer bp) => new _
UnlinkedConstructorInitializerImpl(bp); | 1970 _UnlinkedConstructorInitializerImpl createObject(fb.BufferPointer bp) => new _
UnlinkedConstructorInitializerImpl(bp); |
| 1971 } | 1971 } |
| 1972 | 1972 |
| 1973 class _UnlinkedConstructorInitializerImpl extends Object with _UnlinkedConstruct
orInitializerMixin implements idl.UnlinkedConstructorInitializer { | 1973 class _UnlinkedConstructorInitializerImpl extends Object with _UnlinkedConstruct
orInitializerMixin implements idl.UnlinkedConstructorInitializer { |
| 1974 final fb.BufferPointer _bp; | 1974 final fb.BufferPointer _bp; |
| 1975 | 1975 |
| 1976 _UnlinkedConstructorInitializerImpl(this._bp); | 1976 _UnlinkedConstructorInitializerImpl(this._bp); |
| 1977 | 1977 |
| 1978 List<idl.UnlinkedConst> _arguments; |
| 1979 idl.UnlinkedConst _expression; |
| 1978 idl.UnlinkedConstructorInitializerKind _kind; | 1980 idl.UnlinkedConstructorInitializerKind _kind; |
| 1979 String _name; | 1981 String _name; |
| 1980 idl.UnlinkedConst _expression; | 1982 |
| 1981 List<idl.UnlinkedConst> _arguments; | 1983 @override |
| 1984 List<idl.UnlinkedConst> get arguments { |
| 1985 _arguments ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstRe
ader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 1986 return _arguments; |
| 1987 } |
| 1988 |
| 1989 @override |
| 1990 idl.UnlinkedConst get expression { |
| 1991 _expression ??= const _UnlinkedConstReader().vTableGet(_bp, 1, null); |
| 1992 return _expression; |
| 1993 } |
| 1982 | 1994 |
| 1983 @override | 1995 @override |
| 1984 idl.UnlinkedConstructorInitializerKind get kind { | 1996 idl.UnlinkedConstructorInitializerKind get kind { |
| 1985 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet(_bp, 0
, idl.UnlinkedConstructorInitializerKind.field); | 1997 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet(_bp, 2
, idl.UnlinkedConstructorInitializerKind.field); |
| 1986 return _kind; | 1998 return _kind; |
| 1987 } | 1999 } |
| 1988 | 2000 |
| 1989 @override | 2001 @override |
| 1990 String get name { | 2002 String get name { |
| 1991 _name ??= const fb.StringReader().vTableGet(_bp, 1, ''); | 2003 _name ??= const fb.StringReader().vTableGet(_bp, 3, ''); |
| 1992 return _name; | 2004 return _name; |
| 1993 } | 2005 } |
| 1994 | |
| 1995 @override | |
| 1996 idl.UnlinkedConst get expression { | |
| 1997 _expression ??= const _UnlinkedConstReader().vTableGet(_bp, 2, null); | |
| 1998 return _expression; | |
| 1999 } | |
| 2000 | |
| 2001 @override | |
| 2002 List<idl.UnlinkedConst> get arguments { | |
| 2003 _arguments ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstRe
ader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | |
| 2004 return _arguments; | |
| 2005 } | |
| 2006 } | 2006 } |
| 2007 | 2007 |
| 2008 abstract class _UnlinkedConstructorInitializerMixin implements idl.UnlinkedConst
ructorInitializer { | 2008 abstract class _UnlinkedConstructorInitializerMixin implements idl.UnlinkedConst
ructorInitializer { |
| 2009 @override | 2009 @override |
| 2010 Map<String, Object> toMap() => { | 2010 Map<String, Object> toMap() => { |
| 2011 "arguments": arguments, |
| 2012 "expression": expression, |
| 2011 "kind": kind, | 2013 "kind": kind, |
| 2012 "name": name, | 2014 "name": name, |
| 2013 "expression": expression, | |
| 2014 "arguments": arguments, | |
| 2015 }; | 2015 }; |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta
tionCommentMixin implements idl.UnlinkedDocumentationComment { | 2018 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta
tionCommentMixin implements idl.UnlinkedDocumentationComment { |
| 2019 bool _finished = false; | 2019 bool _finished = false; |
| 2020 | 2020 |
| 2021 int _length; |
| 2022 int _offset; |
| 2021 String _text; | 2023 String _text; |
| 2022 int _offset; | |
| 2023 int _length; | |
| 2024 | 2024 |
| 2025 @override | 2025 @override |
| 2026 String get text => _text ??= ''; | 2026 int get length => _length ??= 0; |
| 2027 | 2027 |
| 2028 /** | 2028 /** |
| 2029 * Text of the documentation comment, with '\r\n' replaced by '\n'. | 2029 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). |
| 2030 * | |
| 2031 * References appearing within the doc comment in square brackets are not | |
| 2032 * specially encoded. | |
| 2033 */ | 2030 */ |
| 2034 void set text(String _value) { | 2031 void set length(int _value) { |
| 2035 assert(!_finished); | 2032 assert(!_finished); |
| 2036 _text = _value; | 2033 assert(_value == null || _value >= 0); |
| 2034 _length = _value; |
| 2037 } | 2035 } |
| 2038 | 2036 |
| 2039 @override | 2037 @override |
| 2040 int get offset => _offset ??= 0; | 2038 int get offset => _offset ??= 0; |
| 2041 | 2039 |
| 2042 /** | 2040 /** |
| 2043 * Offset of the beginning of the documentation comment relative to the | 2041 * Offset of the beginning of the documentation comment relative to the |
| 2044 * beginning of the file. | 2042 * beginning of the file. |
| 2045 */ | 2043 */ |
| 2046 void set offset(int _value) { | 2044 void set offset(int _value) { |
| 2047 assert(!_finished); | 2045 assert(!_finished); |
| 2048 assert(_value == null || _value >= 0); | 2046 assert(_value == null || _value >= 0); |
| 2049 _offset = _value; | 2047 _offset = _value; |
| 2050 } | 2048 } |
| 2051 | 2049 |
| 2052 @override | 2050 @override |
| 2053 int get length => _length ??= 0; | 2051 String get text => _text ??= ''; |
| 2054 | 2052 |
| 2055 /** | 2053 /** |
| 2056 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). | 2054 * Text of the documentation comment, with '\r\n' replaced by '\n'. |
| 2055 * |
| 2056 * References appearing within the doc comment in square brackets are not |
| 2057 * specially encoded. |
| 2057 */ | 2058 */ |
| 2058 void set length(int _value) { | 2059 void set text(String _value) { |
| 2059 assert(!_finished); | 2060 assert(!_finished); |
| 2060 assert(_value == null || _value >= 0); | 2061 _text = _value; |
| 2061 _length = _value; | |
| 2062 } | 2062 } |
| 2063 | 2063 |
| 2064 UnlinkedDocumentationCommentBuilder({String text, int offset, int length}) | 2064 UnlinkedDocumentationCommentBuilder({int length, int offset, String text}) |
| 2065 : _text = text, | 2065 : _length = length, |
| 2066 _offset = offset, | 2066 _offset = offset, |
| 2067 _length = length; | 2067 _text = text; |
| 2068 | 2068 |
| 2069 fb.Offset finish(fb.Builder fbBuilder) { | 2069 fb.Offset finish(fb.Builder fbBuilder) { |
| 2070 assert(!_finished); | 2070 assert(!_finished); |
| 2071 _finished = true; | 2071 _finished = true; |
| 2072 fb.Offset offset_text; | 2072 fb.Offset offset_text; |
| 2073 if (_text != null) { | 2073 if (_text != null) { |
| 2074 offset_text = fbBuilder.writeString(_text); | 2074 offset_text = fbBuilder.writeString(_text); |
| 2075 } | 2075 } |
| 2076 fbBuilder.startTable(); | 2076 fbBuilder.startTable(); |
| 2077 if (offset_text != null) { | 2077 if (_length != null && _length != 0) { |
| 2078 fbBuilder.addOffset(0, offset_text); | 2078 fbBuilder.addUint32(0, _length); |
| 2079 } | 2079 } |
| 2080 if (_offset != null && _offset != 0) { | 2080 if (_offset != null && _offset != 0) { |
| 2081 fbBuilder.addUint32(1, _offset); | 2081 fbBuilder.addUint32(1, _offset); |
| 2082 } | 2082 } |
| 2083 if (_length != null && _length != 0) { | 2083 if (offset_text != null) { |
| 2084 fbBuilder.addUint32(2, _length); | 2084 fbBuilder.addOffset(2, offset_text); |
| 2085 } | 2085 } |
| 2086 return fbBuilder.endTable(); | 2086 return fbBuilder.endTable(); |
| 2087 } | 2087 } |
| 2088 } | 2088 } |
| 2089 | 2089 |
| 2090 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume
ntationCommentImpl> { | 2090 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume
ntationCommentImpl> { |
| 2091 const _UnlinkedDocumentationCommentReader(); | 2091 const _UnlinkedDocumentationCommentReader(); |
| 2092 | 2092 |
| 2093 @override | 2093 @override |
| 2094 _UnlinkedDocumentationCommentImpl createObject(fb.BufferPointer bp) => new _Un
linkedDocumentationCommentImpl(bp); | 2094 _UnlinkedDocumentationCommentImpl createObject(fb.BufferPointer bp) => new _Un
linkedDocumentationCommentImpl(bp); |
| 2095 } | 2095 } |
| 2096 | 2096 |
| 2097 class _UnlinkedDocumentationCommentImpl extends Object with _UnlinkedDocumentati
onCommentMixin implements idl.UnlinkedDocumentationComment { | 2097 class _UnlinkedDocumentationCommentImpl extends Object with _UnlinkedDocumentati
onCommentMixin implements idl.UnlinkedDocumentationComment { |
| 2098 final fb.BufferPointer _bp; | 2098 final fb.BufferPointer _bp; |
| 2099 | 2099 |
| 2100 _UnlinkedDocumentationCommentImpl(this._bp); | 2100 _UnlinkedDocumentationCommentImpl(this._bp); |
| 2101 | 2101 |
| 2102 int _length; |
| 2103 int _offset; |
| 2102 String _text; | 2104 String _text; |
| 2103 int _offset; | |
| 2104 int _length; | |
| 2105 | 2105 |
| 2106 @override | 2106 @override |
| 2107 String get text { | 2107 int get length { |
| 2108 _text ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 2108 _length ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); |
| 2109 return _text; | 2109 return _length; |
| 2110 } | 2110 } |
| 2111 | 2111 |
| 2112 @override | 2112 @override |
| 2113 int get offset { | 2113 int get offset { |
| 2114 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 2114 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 2115 return _offset; | 2115 return _offset; |
| 2116 } | 2116 } |
| 2117 | 2117 |
| 2118 @override | 2118 @override |
| 2119 int get length { | 2119 String get text { |
| 2120 _length ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 2120 _text ??= const fb.StringReader().vTableGet(_bp, 2, ''); |
| 2121 return _length; | 2121 return _text; |
| 2122 } | 2122 } |
| 2123 } | 2123 } |
| 2124 | 2124 |
| 2125 abstract class _UnlinkedDocumentationCommentMixin implements idl.UnlinkedDocumen
tationComment { | 2125 abstract class _UnlinkedDocumentationCommentMixin implements idl.UnlinkedDocumen
tationComment { |
| 2126 @override | 2126 @override |
| 2127 Map<String, Object> toMap() => { | 2127 Map<String, Object> toMap() => { |
| 2128 "length": length, |
| 2129 "offset": offset, |
| 2128 "text": text, | 2130 "text": text, |
| 2129 "offset": offset, | |
| 2130 "length": length, | |
| 2131 }; | 2131 }; |
| 2132 } | 2132 } |
| 2133 | 2133 |
| 2134 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { | 2134 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { |
| 2135 bool _finished = false; | 2135 bool _finished = false; |
| 2136 | 2136 |
| 2137 List<UnlinkedConstBuilder> _annotations; |
| 2138 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 2137 String _name; | 2139 String _name; |
| 2138 int _nameOffset; | 2140 int _nameOffset; |
| 2139 UnlinkedDocumentationCommentBuilder _documentationComment; | |
| 2140 List<UnlinkedConstBuilder> _annotations; | |
| 2141 List<UnlinkedEnumValueBuilder> _values; | 2141 List<UnlinkedEnumValueBuilder> _values; |
| 2142 | 2142 |
| 2143 @override | 2143 @override |
| 2144 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 2145 |
| 2146 /** |
| 2147 * Annotations for this enum. |
| 2148 */ |
| 2149 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 2150 assert(!_finished); |
| 2151 _annotations = _value; |
| 2152 } |
| 2153 |
| 2154 @override |
| 2155 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 2156 |
| 2157 /** |
| 2158 * Documentation comment for the enum, or `null` if there is no documentation |
| 2159 * comment. |
| 2160 */ |
| 2161 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 2162 assert(!_finished); |
| 2163 _documentationComment = _value; |
| 2164 } |
| 2165 |
| 2166 @override |
| 2144 String get name => _name ??= ''; | 2167 String get name => _name ??= ''; |
| 2145 | 2168 |
| 2146 /** | 2169 /** |
| 2147 * Name of the enum type. | 2170 * Name of the enum type. |
| 2148 */ | 2171 */ |
| 2149 void set name(String _value) { | 2172 void set name(String _value) { |
| 2150 assert(!_finished); | 2173 assert(!_finished); |
| 2151 _name = _value; | 2174 _name = _value; |
| 2152 } | 2175 } |
| 2153 | 2176 |
| 2154 @override | 2177 @override |
| 2155 int get nameOffset => _nameOffset ??= 0; | 2178 int get nameOffset => _nameOffset ??= 0; |
| 2156 | 2179 |
| 2157 /** | 2180 /** |
| 2158 * Offset of the enum name relative to the beginning of the file. | 2181 * Offset of the enum name relative to the beginning of the file. |
| 2159 */ | 2182 */ |
| 2160 void set nameOffset(int _value) { | 2183 void set nameOffset(int _value) { |
| 2161 assert(!_finished); | 2184 assert(!_finished); |
| 2162 assert(_value == null || _value >= 0); | 2185 assert(_value == null || _value >= 0); |
| 2163 _nameOffset = _value; | 2186 _nameOffset = _value; |
| 2164 } | 2187 } |
| 2165 | 2188 |
| 2166 @override | 2189 @override |
| 2167 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | |
| 2168 | |
| 2169 /** | |
| 2170 * Documentation comment for the enum, or `null` if there is no documentation | |
| 2171 * comment. | |
| 2172 */ | |
| 2173 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | |
| 2174 assert(!_finished); | |
| 2175 _documentationComment = _value; | |
| 2176 } | |
| 2177 | |
| 2178 @override | |
| 2179 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | |
| 2180 | |
| 2181 /** | |
| 2182 * Annotations for this enum. | |
| 2183 */ | |
| 2184 void set annotations(List<UnlinkedConstBuilder> _value) { | |
| 2185 assert(!_finished); | |
| 2186 _annotations = _value; | |
| 2187 } | |
| 2188 | |
| 2189 @override | |
| 2190 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; | 2190 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; |
| 2191 | 2191 |
| 2192 /** | 2192 /** |
| 2193 * Values listed in the enum declaration, in declaration order. | 2193 * Values listed in the enum declaration, in declaration order. |
| 2194 */ | 2194 */ |
| 2195 void set values(List<UnlinkedEnumValueBuilder> _value) { | 2195 void set values(List<UnlinkedEnumValueBuilder> _value) { |
| 2196 assert(!_finished); | 2196 assert(!_finished); |
| 2197 _values = _value; | 2197 _values = _value; |
| 2198 } | 2198 } |
| 2199 | 2199 |
| 2200 UnlinkedEnumBuilder({String name, int nameOffset, UnlinkedDocumentationComment
Builder documentationComment, List<UnlinkedConstBuilder> annotations, List<Unlin
kedEnumValueBuilder> values}) | 2200 UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumenta
tionCommentBuilder documentationComment, String name, int nameOffset, List<Unlin
kedEnumValueBuilder> values}) |
| 2201 : _name = name, | 2201 : _annotations = annotations, |
| 2202 _documentationComment = documentationComment, |
| 2203 _name = name, |
| 2202 _nameOffset = nameOffset, | 2204 _nameOffset = nameOffset, |
| 2203 _documentationComment = documentationComment, | |
| 2204 _annotations = annotations, | |
| 2205 _values = values; | 2205 _values = values; |
| 2206 | 2206 |
| 2207 fb.Offset finish(fb.Builder fbBuilder) { | 2207 fb.Offset finish(fb.Builder fbBuilder) { |
| 2208 assert(!_finished); | 2208 assert(!_finished); |
| 2209 _finished = true; | 2209 _finished = true; |
| 2210 fb.Offset offset_annotations; |
| 2211 fb.Offset offset_documentationComment; |
| 2210 fb.Offset offset_name; | 2212 fb.Offset offset_name; |
| 2211 fb.Offset offset_documentationComment; | |
| 2212 fb.Offset offset_annotations; | |
| 2213 fb.Offset offset_values; | 2213 fb.Offset offset_values; |
| 2214 if (_name != null) { | 2214 if (!(_annotations == null || _annotations.isEmpty)) { |
| 2215 offset_name = fbBuilder.writeString(_name); | 2215 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 2216 } | 2216 } |
| 2217 if (_documentationComment != null) { | 2217 if (_documentationComment != null) { |
| 2218 offset_documentationComment = _documentationComment.finish(fbBuilder); | 2218 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 2219 } | 2219 } |
| 2220 if (!(_annotations == null || _annotations.isEmpty)) { | 2220 if (_name != null) { |
| 2221 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 2221 offset_name = fbBuilder.writeString(_name); |
| 2222 } | 2222 } |
| 2223 if (!(_values == null || _values.isEmpty)) { | 2223 if (!(_values == null || _values.isEmpty)) { |
| 2224 offset_values = fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)
).toList()); | 2224 offset_values = fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)
).toList()); |
| 2225 } | 2225 } |
| 2226 fbBuilder.startTable(); | 2226 fbBuilder.startTable(); |
| 2227 if (offset_annotations != null) { |
| 2228 fbBuilder.addOffset(0, offset_annotations); |
| 2229 } |
| 2230 if (offset_documentationComment != null) { |
| 2231 fbBuilder.addOffset(1, offset_documentationComment); |
| 2232 } |
| 2227 if (offset_name != null) { | 2233 if (offset_name != null) { |
| 2228 fbBuilder.addOffset(0, offset_name); | 2234 fbBuilder.addOffset(2, offset_name); |
| 2229 } | 2235 } |
| 2230 if (_nameOffset != null && _nameOffset != 0) { | 2236 if (_nameOffset != null && _nameOffset != 0) { |
| 2231 fbBuilder.addUint32(1, _nameOffset); | 2237 fbBuilder.addUint32(3, _nameOffset); |
| 2232 } | |
| 2233 if (offset_documentationComment != null) { | |
| 2234 fbBuilder.addOffset(2, offset_documentationComment); | |
| 2235 } | |
| 2236 if (offset_annotations != null) { | |
| 2237 fbBuilder.addOffset(3, offset_annotations); | |
| 2238 } | 2238 } |
| 2239 if (offset_values != null) { | 2239 if (offset_values != null) { |
| 2240 fbBuilder.addOffset(4, offset_values); | 2240 fbBuilder.addOffset(4, offset_values); |
| 2241 } | 2241 } |
| 2242 return fbBuilder.endTable(); | 2242 return fbBuilder.endTable(); |
| 2243 } | 2243 } |
| 2244 } | 2244 } |
| 2245 | 2245 |
| 2246 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { | 2246 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { |
| 2247 const _UnlinkedEnumReader(); | 2247 const _UnlinkedEnumReader(); |
| 2248 | 2248 |
| 2249 @override | 2249 @override |
| 2250 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b
p); | 2250 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b
p); |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { | 2253 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { |
| 2254 final fb.BufferPointer _bp; | 2254 final fb.BufferPointer _bp; |
| 2255 | 2255 |
| 2256 _UnlinkedEnumImpl(this._bp); | 2256 _UnlinkedEnumImpl(this._bp); |
| 2257 | 2257 |
| 2258 List<idl.UnlinkedConst> _annotations; |
| 2259 idl.UnlinkedDocumentationComment _documentationComment; |
| 2258 String _name; | 2260 String _name; |
| 2259 int _nameOffset; | 2261 int _nameOffset; |
| 2260 idl.UnlinkedDocumentationComment _documentationComment; | |
| 2261 List<idl.UnlinkedConst> _annotations; | |
| 2262 List<idl.UnlinkedEnumValue> _values; | 2262 List<idl.UnlinkedEnumValue> _values; |
| 2263 | 2263 |
| 2264 @override | 2264 @override |
| 2265 List<idl.UnlinkedConst> get annotations { |
| 2266 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 2267 return _annotations; |
| 2268 } |
| 2269 |
| 2270 @override |
| 2271 idl.UnlinkedDocumentationComment get documentationComment { |
| 2272 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 1, null); |
| 2273 return _documentationComment; |
| 2274 } |
| 2275 |
| 2276 @override |
| 2265 String get name { | 2277 String get name { |
| 2266 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 2278 _name ??= const fb.StringReader().vTableGet(_bp, 2, ''); |
| 2267 return _name; | 2279 return _name; |
| 2268 } | 2280 } |
| 2269 | 2281 |
| 2270 @override | 2282 @override |
| 2271 int get nameOffset { | 2283 int get nameOffset { |
| 2272 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 2284 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 2273 return _nameOffset; | 2285 return _nameOffset; |
| 2274 } | 2286 } |
| 2275 | 2287 |
| 2276 @override | 2288 @override |
| 2277 idl.UnlinkedDocumentationComment get documentationComment { | |
| 2278 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | |
| 2279 return _documentationComment; | |
| 2280 } | |
| 2281 | |
| 2282 @override | |
| 2283 List<idl.UnlinkedConst> get annotations { | |
| 2284 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | |
| 2285 return _annotations; | |
| 2286 } | |
| 2287 | |
| 2288 @override | |
| 2289 List<idl.UnlinkedEnumValue> get values { | 2289 List<idl.UnlinkedEnumValue> get values { |
| 2290 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa
lueReader()).vTableGet(_bp, 4, const <idl.UnlinkedEnumValue>[]); | 2290 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa
lueReader()).vTableGet(_bp, 4, const <idl.UnlinkedEnumValue>[]); |
| 2291 return _values; | 2291 return _values; |
| 2292 } | 2292 } |
| 2293 } | 2293 } |
| 2294 | 2294 |
| 2295 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { | 2295 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { |
| 2296 @override | 2296 @override |
| 2297 Map<String, Object> toMap() => { | 2297 Map<String, Object> toMap() => { |
| 2298 "annotations": annotations, |
| 2299 "documentationComment": documentationComment, |
| 2298 "name": name, | 2300 "name": name, |
| 2299 "nameOffset": nameOffset, | 2301 "nameOffset": nameOffset, |
| 2300 "documentationComment": documentationComment, | |
| 2301 "annotations": annotations, | |
| 2302 "values": values, | 2302 "values": values, |
| 2303 }; | 2303 }; |
| 2304 } | 2304 } |
| 2305 | 2305 |
| 2306 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple
ments idl.UnlinkedEnumValue { | 2306 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple
ments idl.UnlinkedEnumValue { |
| 2307 bool _finished = false; | 2307 bool _finished = false; |
| 2308 | 2308 |
| 2309 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 2309 String _name; | 2310 String _name; |
| 2310 int _nameOffset; | 2311 int _nameOffset; |
| 2311 UnlinkedDocumentationCommentBuilder _documentationComment; | 2312 |
| 2313 @override |
| 2314 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 2315 |
| 2316 /** |
| 2317 * Documentation comment for the enum value, or `null` if there is no |
| 2318 * documentation comment. |
| 2319 */ |
| 2320 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 2321 assert(!_finished); |
| 2322 _documentationComment = _value; |
| 2323 } |
| 2312 | 2324 |
| 2313 @override | 2325 @override |
| 2314 String get name => _name ??= ''; | 2326 String get name => _name ??= ''; |
| 2315 | 2327 |
| 2316 /** | 2328 /** |
| 2317 * Name of the enumerated value. | 2329 * Name of the enumerated value. |
| 2318 */ | 2330 */ |
| 2319 void set name(String _value) { | 2331 void set name(String _value) { |
| 2320 assert(!_finished); | 2332 assert(!_finished); |
| 2321 _name = _value; | 2333 _name = _value; |
| 2322 } | 2334 } |
| 2323 | 2335 |
| 2324 @override | 2336 @override |
| 2325 int get nameOffset => _nameOffset ??= 0; | 2337 int get nameOffset => _nameOffset ??= 0; |
| 2326 | 2338 |
| 2327 /** | 2339 /** |
| 2328 * Offset of the enum value name relative to the beginning of the file. | 2340 * Offset of the enum value name relative to the beginning of the file. |
| 2329 */ | 2341 */ |
| 2330 void set nameOffset(int _value) { | 2342 void set nameOffset(int _value) { |
| 2331 assert(!_finished); | 2343 assert(!_finished); |
| 2332 assert(_value == null || _value >= 0); | 2344 assert(_value == null || _value >= 0); |
| 2333 _nameOffset = _value; | 2345 _nameOffset = _value; |
| 2334 } | 2346 } |
| 2335 | 2347 |
| 2336 @override | 2348 UnlinkedEnumValueBuilder({UnlinkedDocumentationCommentBuilder documentationCom
ment, String name, int nameOffset}) |
| 2337 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 2349 : _documentationComment = documentationComment, |
| 2338 | 2350 _name = name, |
| 2339 /** | 2351 _nameOffset = nameOffset; |
| 2340 * Documentation comment for the enum value, or `null` if there is no | |
| 2341 * documentation comment. | |
| 2342 */ | |
| 2343 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | |
| 2344 assert(!_finished); | |
| 2345 _documentationComment = _value; | |
| 2346 } | |
| 2347 | |
| 2348 UnlinkedEnumValueBuilder({String name, int nameOffset, UnlinkedDocumentationCo
mmentBuilder documentationComment}) | |
| 2349 : _name = name, | |
| 2350 _nameOffset = nameOffset, | |
| 2351 _documentationComment = documentationComment; | |
| 2352 | 2352 |
| 2353 fb.Offset finish(fb.Builder fbBuilder) { | 2353 fb.Offset finish(fb.Builder fbBuilder) { |
| 2354 assert(!_finished); | 2354 assert(!_finished); |
| 2355 _finished = true; | 2355 _finished = true; |
| 2356 fb.Offset offset_documentationComment; |
| 2356 fb.Offset offset_name; | 2357 fb.Offset offset_name; |
| 2357 fb.Offset offset_documentationComment; | 2358 if (_documentationComment != null) { |
| 2359 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 2360 } |
| 2358 if (_name != null) { | 2361 if (_name != null) { |
| 2359 offset_name = fbBuilder.writeString(_name); | 2362 offset_name = fbBuilder.writeString(_name); |
| 2360 } | 2363 } |
| 2361 if (_documentationComment != null) { | 2364 fbBuilder.startTable(); |
| 2362 offset_documentationComment = _documentationComment.finish(fbBuilder); | 2365 if (offset_documentationComment != null) { |
| 2366 fbBuilder.addOffset(0, offset_documentationComment); |
| 2363 } | 2367 } |
| 2364 fbBuilder.startTable(); | |
| 2365 if (offset_name != null) { | 2368 if (offset_name != null) { |
| 2366 fbBuilder.addOffset(0, offset_name); | 2369 fbBuilder.addOffset(1, offset_name); |
| 2367 } | 2370 } |
| 2368 if (_nameOffset != null && _nameOffset != 0) { | 2371 if (_nameOffset != null && _nameOffset != 0) { |
| 2369 fbBuilder.addUint32(1, _nameOffset); | 2372 fbBuilder.addUint32(2, _nameOffset); |
| 2370 } | |
| 2371 if (offset_documentationComment != null) { | |
| 2372 fbBuilder.addOffset(2, offset_documentationComment); | |
| 2373 } | 2373 } |
| 2374 return fbBuilder.endTable(); | 2374 return fbBuilder.endTable(); |
| 2375 } | 2375 } |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> { | 2378 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> { |
| 2379 const _UnlinkedEnumValueReader(); | 2379 const _UnlinkedEnumValueReader(); |
| 2380 | 2380 |
| 2381 @override | 2381 @override |
| 2382 _UnlinkedEnumValueImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumV
alueImpl(bp); | 2382 _UnlinkedEnumValueImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumV
alueImpl(bp); |
| 2383 } | 2383 } |
| 2384 | 2384 |
| 2385 class _UnlinkedEnumValueImpl extends Object with _UnlinkedEnumValueMixin impleme
nts idl.UnlinkedEnumValue { | 2385 class _UnlinkedEnumValueImpl extends Object with _UnlinkedEnumValueMixin impleme
nts idl.UnlinkedEnumValue { |
| 2386 final fb.BufferPointer _bp; | 2386 final fb.BufferPointer _bp; |
| 2387 | 2387 |
| 2388 _UnlinkedEnumValueImpl(this._bp); | 2388 _UnlinkedEnumValueImpl(this._bp); |
| 2389 | 2389 |
| 2390 idl.UnlinkedDocumentationComment _documentationComment; |
| 2390 String _name; | 2391 String _name; |
| 2391 int _nameOffset; | 2392 int _nameOffset; |
| 2392 idl.UnlinkedDocumentationComment _documentationComment; | 2393 |
| 2394 @override |
| 2395 idl.UnlinkedDocumentationComment get documentationComment { |
| 2396 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 0, null); |
| 2397 return _documentationComment; |
| 2398 } |
| 2393 | 2399 |
| 2394 @override | 2400 @override |
| 2395 String get name { | 2401 String get name { |
| 2396 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 2402 _name ??= const fb.StringReader().vTableGet(_bp, 1, ''); |
| 2397 return _name; | 2403 return _name; |
| 2398 } | 2404 } |
| 2399 | 2405 |
| 2400 @override | 2406 @override |
| 2401 int get nameOffset { | 2407 int get nameOffset { |
| 2402 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 2408 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
| 2403 return _nameOffset; | 2409 return _nameOffset; |
| 2404 } | 2410 } |
| 2405 | |
| 2406 @override | |
| 2407 idl.UnlinkedDocumentationComment get documentationComment { | |
| 2408 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | |
| 2409 return _documentationComment; | |
| 2410 } | |
| 2411 } | 2411 } |
| 2412 | 2412 |
| 2413 abstract class _UnlinkedEnumValueMixin implements idl.UnlinkedEnumValue { | 2413 abstract class _UnlinkedEnumValueMixin implements idl.UnlinkedEnumValue { |
| 2414 @override | 2414 @override |
| 2415 Map<String, Object> toMap() => { | 2415 Map<String, Object> toMap() => { |
| 2416 "documentationComment": documentationComment, |
| 2416 "name": name, | 2417 "name": name, |
| 2417 "nameOffset": nameOffset, | 2418 "nameOffset": nameOffset, |
| 2418 "documentationComment": documentationComment, | |
| 2419 }; | 2419 }; |
| 2420 } | 2420 } |
| 2421 | 2421 |
| 2422 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { | 2422 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { |
| 2423 bool _finished = false; | 2423 bool _finished = false; |
| 2424 | 2424 |
| 2425 List<UnlinkedConstBuilder> _annotations; |
| 2426 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; |
| 2427 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 2428 int _inferredReturnTypeSlot; |
| 2429 bool _isAbstract; |
| 2430 bool _isConst; |
| 2431 bool _isExternal; |
| 2432 bool _isFactory; |
| 2433 bool _isStatic; |
| 2434 idl.UnlinkedExecutableKind _kind; |
| 2425 String _name; | 2435 String _name; |
| 2426 int _nameOffset; | 2436 int _nameOffset; |
| 2427 UnlinkedDocumentationCommentBuilder _documentationComment; | 2437 List<UnlinkedParamBuilder> _parameters; |
| 2428 List<UnlinkedConstBuilder> _annotations; | 2438 EntityRefBuilder _returnType; |
| 2429 List<UnlinkedTypeParamBuilder> _typeParameters; | 2439 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 2430 EntityRefBuilder _returnType; | |
| 2431 List<UnlinkedParamBuilder> _parameters; | |
| 2432 idl.UnlinkedExecutableKind _kind; | |
| 2433 bool _isAbstract; | |
| 2434 bool _isStatic; | |
| 2435 bool _isConst; | |
| 2436 bool _isFactory; | |
| 2437 bool _isExternal; | |
| 2438 int _inferredReturnTypeSlot; | |
| 2439 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; | |
| 2440 | 2440 |
| 2441 @override | 2441 @override |
| 2442 String get name => _name ??= ''; | 2442 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 2443 | 2443 |
| 2444 /** | 2444 /** |
| 2445 * Name of the executable. For setters, this includes the trailing "=". For | 2445 * Annotations for this executable. |
| 2446 * named constructors, this excludes the class name and excludes the ".". | |
| 2447 * For unnamed constructors, this is the empty string. | |
| 2448 */ | 2446 */ |
| 2449 void set name(String _value) { | 2447 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 2450 assert(!_finished); | 2448 assert(!_finished); |
| 2451 _name = _value; | 2449 _annotations = _value; |
| 2452 } | 2450 } |
| 2453 | 2451 |
| 2454 @override | 2452 @override |
| 2455 int get nameOffset => _nameOffset ??= 0; | 2453 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _const
antInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; |
| 2456 | 2454 |
| 2457 /** | 2455 /** |
| 2458 * Offset of the executable name relative to the beginning of the file. For | 2456 * If a constant [UnlinkedExecutableKind.constructor], the constructor |
| 2459 * named constructors, this excludes the class name and excludes the ".". | 2457 * initializers. Otherwise empty. |
| 2460 * For unnamed constructors, this is the offset of the class name (i.e. the | |
| 2461 * offset of the second "C" in "class C { C(); }"). | |
| 2462 */ | 2458 */ |
| 2463 void set nameOffset(int _value) { | 2459 void set constantInitializers(List<UnlinkedConstructorInitializerBuilder> _val
ue) { |
| 2464 assert(!_finished); | 2460 assert(!_finished); |
| 2465 assert(_value == null || _value >= 0); | 2461 _constantInitializers = _value; |
| 2466 _nameOffset = _value; | |
| 2467 } | 2462 } |
| 2468 | 2463 |
| 2469 @override | 2464 @override |
| 2470 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 2465 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 2471 | 2466 |
| 2472 /** | 2467 /** |
| 2473 * Documentation comment for the executable, or `null` if there is no | 2468 * Documentation comment for the executable, or `null` if there is no |
| 2474 * documentation comment. | 2469 * documentation comment. |
| 2475 */ | 2470 */ |
| 2476 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 2471 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 2477 assert(!_finished); | 2472 assert(!_finished); |
| 2478 _documentationComment = _value; | 2473 _documentationComment = _value; |
| 2479 } | 2474 } |
| 2480 | 2475 |
| 2481 @override | 2476 @override |
| 2482 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 2477 int get inferredReturnTypeSlot => _inferredReturnTypeSlot ??= 0; |
| 2483 | 2478 |
| 2484 /** | 2479 /** |
| 2485 * Annotations for this executable. | 2480 * If this executable's return type is inferable, nonzero slot id |
| 2481 * identifying which entry in [LinkedUnit.types] contains the inferred |
| 2482 * return type. If there is no matching entry in [LinkedUnit.types], then |
| 2483 * no return type was inferred for this variable, so its static type is |
| 2484 * `dynamic`. |
| 2486 */ | 2485 */ |
| 2487 void set annotations(List<UnlinkedConstBuilder> _value) { | 2486 void set inferredReturnTypeSlot(int _value) { |
| 2488 assert(!_finished); | 2487 assert(!_finished); |
| 2489 _annotations = _value; | 2488 assert(_value == null || _value >= 0); |
| 2490 } | 2489 _inferredReturnTypeSlot = _value; |
| 2491 | |
| 2492 @override | |
| 2493 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | |
| 2494 | |
| 2495 /** | |
| 2496 * Type parameters of the executable, if any. Empty if support for generic | |
| 2497 * method syntax is disabled. | |
| 2498 */ | |
| 2499 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | |
| 2500 assert(!_finished); | |
| 2501 _typeParameters = _value; | |
| 2502 } | |
| 2503 | |
| 2504 @override | |
| 2505 EntityRefBuilder get returnType => _returnType; | |
| 2506 | |
| 2507 /** | |
| 2508 * Declared return type of the executable. Absent if the executable is a | |
| 2509 * constructor or the return type is implicit. | |
| 2510 */ | |
| 2511 void set returnType(EntityRefBuilder _value) { | |
| 2512 assert(!_finished); | |
| 2513 _returnType = _value; | |
| 2514 } | |
| 2515 | |
| 2516 @override | |
| 2517 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | |
| 2518 | |
| 2519 /** | |
| 2520 * Parameters of the executable, if any. Note that getters have no | |
| 2521 * parameters (hence this will be the empty list), and setters have a single | |
| 2522 * parameter. | |
| 2523 */ | |
| 2524 void set parameters(List<UnlinkedParamBuilder> _value) { | |
| 2525 assert(!_finished); | |
| 2526 _parameters = _value; | |
| 2527 } | |
| 2528 | |
| 2529 @override | |
| 2530 idl.UnlinkedExecutableKind get kind => _kind ??= idl.UnlinkedExecutableKind.fu
nctionOrMethod; | |
| 2531 | |
| 2532 /** | |
| 2533 * The kind of the executable (function/method, getter, setter, or | |
| 2534 * constructor). | |
| 2535 */ | |
| 2536 void set kind(idl.UnlinkedExecutableKind _value) { | |
| 2537 assert(!_finished); | |
| 2538 _kind = _value; | |
| 2539 } | 2490 } |
| 2540 | 2491 |
| 2541 @override | 2492 @override |
| 2542 bool get isAbstract => _isAbstract ??= false; | 2493 bool get isAbstract => _isAbstract ??= false; |
| 2543 | 2494 |
| 2544 /** | 2495 /** |
| 2545 * Indicates whether the executable is declared using the `abstract` keyword. | 2496 * Indicates whether the executable is declared using the `abstract` keyword. |
| 2546 */ | 2497 */ |
| 2547 void set isAbstract(bool _value) { | 2498 void set isAbstract(bool _value) { |
| 2548 assert(!_finished); | 2499 assert(!_finished); |
| 2549 _isAbstract = _value; | 2500 _isAbstract = _value; |
| 2550 } | 2501 } |
| 2551 | 2502 |
| 2552 @override | 2503 @override |
| 2504 bool get isConst => _isConst ??= false; |
| 2505 |
| 2506 /** |
| 2507 * Indicates whether the executable is declared using the `const` keyword. |
| 2508 */ |
| 2509 void set isConst(bool _value) { |
| 2510 assert(!_finished); |
| 2511 _isConst = _value; |
| 2512 } |
| 2513 |
| 2514 @override |
| 2515 bool get isExternal => _isExternal ??= false; |
| 2516 |
| 2517 /** |
| 2518 * Indicates whether the executable is declared using the `external` keyword. |
| 2519 */ |
| 2520 void set isExternal(bool _value) { |
| 2521 assert(!_finished); |
| 2522 _isExternal = _value; |
| 2523 } |
| 2524 |
| 2525 @override |
| 2526 bool get isFactory => _isFactory ??= false; |
| 2527 |
| 2528 /** |
| 2529 * Indicates whether the executable is declared using the `factory` keyword. |
| 2530 */ |
| 2531 void set isFactory(bool _value) { |
| 2532 assert(!_finished); |
| 2533 _isFactory = _value; |
| 2534 } |
| 2535 |
| 2536 @override |
| 2553 bool get isStatic => _isStatic ??= false; | 2537 bool get isStatic => _isStatic ??= false; |
| 2554 | 2538 |
| 2555 /** | 2539 /** |
| 2556 * Indicates whether the executable is declared using the `static` keyword. | 2540 * Indicates whether the executable is declared using the `static` keyword. |
| 2557 * | 2541 * |
| 2558 * Note that for top level executables, this flag is false, since they are | 2542 * Note that for top level executables, this flag is false, since they are |
| 2559 * not declared using the `static` keyword (even though they are considered | 2543 * not declared using the `static` keyword (even though they are considered |
| 2560 * static for semantic purposes). | 2544 * static for semantic purposes). |
| 2561 */ | 2545 */ |
| 2562 void set isStatic(bool _value) { | 2546 void set isStatic(bool _value) { |
| 2563 assert(!_finished); | 2547 assert(!_finished); |
| 2564 _isStatic = _value; | 2548 _isStatic = _value; |
| 2565 } | 2549 } |
| 2566 | 2550 |
| 2567 @override | 2551 @override |
| 2568 bool get isConst => _isConst ??= false; | 2552 idl.UnlinkedExecutableKind get kind => _kind ??= idl.UnlinkedExecutableKind.fu
nctionOrMethod; |
| 2569 | 2553 |
| 2570 /** | 2554 /** |
| 2571 * Indicates whether the executable is declared using the `const` keyword. | 2555 * The kind of the executable (function/method, getter, setter, or |
| 2556 * constructor). |
| 2572 */ | 2557 */ |
| 2573 void set isConst(bool _value) { | 2558 void set kind(idl.UnlinkedExecutableKind _value) { |
| 2574 assert(!_finished); | 2559 assert(!_finished); |
| 2575 _isConst = _value; | 2560 _kind = _value; |
| 2576 } | 2561 } |
| 2577 | 2562 |
| 2578 @override | 2563 @override |
| 2579 bool get isFactory => _isFactory ??= false; | 2564 String get name => _name ??= ''; |
| 2580 | 2565 |
| 2581 /** | 2566 /** |
| 2582 * Indicates whether the executable is declared using the `factory` keyword. | 2567 * Name of the executable. For setters, this includes the trailing "=". For |
| 2568 * named constructors, this excludes the class name and excludes the ".". |
| 2569 * For unnamed constructors, this is the empty string. |
| 2583 */ | 2570 */ |
| 2584 void set isFactory(bool _value) { | 2571 void set name(String _value) { |
| 2585 assert(!_finished); | 2572 assert(!_finished); |
| 2586 _isFactory = _value; | 2573 _name = _value; |
| 2587 } | 2574 } |
| 2588 | 2575 |
| 2589 @override | 2576 @override |
| 2590 bool get isExternal => _isExternal ??= false; | 2577 int get nameOffset => _nameOffset ??= 0; |
| 2591 | 2578 |
| 2592 /** | 2579 /** |
| 2593 * Indicates whether the executable is declared using the `external` keyword. | 2580 * Offset of the executable name relative to the beginning of the file. For |
| 2581 * named constructors, this excludes the class name and excludes the ".". |
| 2582 * For unnamed constructors, this is the offset of the class name (i.e. the |
| 2583 * offset of the second "C" in "class C { C(); }"). |
| 2594 */ | 2584 */ |
| 2595 void set isExternal(bool _value) { | 2585 void set nameOffset(int _value) { |
| 2596 assert(!_finished); | 2586 assert(!_finished); |
| 2597 _isExternal = _value; | 2587 assert(_value == null || _value >= 0); |
| 2588 _nameOffset = _value; |
| 2598 } | 2589 } |
| 2599 | 2590 |
| 2600 @override | 2591 @override |
| 2601 int get inferredReturnTypeSlot => _inferredReturnTypeSlot ??= 0; | 2592 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; |
| 2602 | 2593 |
| 2603 /** | 2594 /** |
| 2604 * If this executable's return type is inferable, nonzero slot id | 2595 * Parameters of the executable, if any. Note that getters have no |
| 2605 * identifying which entry in [LinkedUnit.types] contains the inferred | 2596 * parameters (hence this will be the empty list), and setters have a single |
| 2606 * return type. If there is no matching entry in [LinkedUnit.types], then | 2597 * parameter. |
| 2607 * no return type was inferred for this variable, so its static type is | |
| 2608 * `dynamic`. | |
| 2609 */ | 2598 */ |
| 2610 void set inferredReturnTypeSlot(int _value) { | 2599 void set parameters(List<UnlinkedParamBuilder> _value) { |
| 2611 assert(!_finished); | 2600 assert(!_finished); |
| 2612 assert(_value == null || _value >= 0); | 2601 _parameters = _value; |
| 2613 _inferredReturnTypeSlot = _value; | |
| 2614 } | 2602 } |
| 2615 | 2603 |
| 2616 @override | 2604 @override |
| 2617 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _const
antInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; | 2605 EntityRefBuilder get returnType => _returnType; |
| 2618 | 2606 |
| 2619 /** | 2607 /** |
| 2620 * If a constant [UnlinkedExecutableKind.constructor], the constructor | 2608 * Declared return type of the executable. Absent if the executable is a |
| 2621 * initializers. Otherwise empty. | 2609 * constructor or the return type is implicit. |
| 2622 */ | 2610 */ |
| 2623 void set constantInitializers(List<UnlinkedConstructorInitializerBuilder> _val
ue) { | 2611 void set returnType(EntityRefBuilder _value) { |
| 2624 assert(!_finished); | 2612 assert(!_finished); |
| 2625 _constantInitializers = _value; | 2613 _returnType = _value; |
| 2626 } | 2614 } |
| 2627 | 2615 |
| 2628 UnlinkedExecutableBuilder({String name, int nameOffset, UnlinkedDocumentationC
ommentBuilder documentationComment, List<UnlinkedConstBuilder> annotations, List
<UnlinkedTypeParamBuilder> typeParameters, EntityRefBuilder returnType, List<Unl
inkedParamBuilder> parameters, idl.UnlinkedExecutableKind kind, bool isAbstract,
bool isStatic, bool isConst, bool isFactory, bool isExternal, int inferredRetur
nTypeSlot, List<UnlinkedConstructorInitializerBuilder> constantInitializers}) | 2616 @override |
| 2629 : _name = name, | 2617 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
| 2618 |
| 2619 /** |
| 2620 * Type parameters of the executable, if any. Empty if support for generic |
| 2621 * method syntax is disabled. |
| 2622 */ |
| 2623 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 2624 assert(!_finished); |
| 2625 _typeParameters = _value; |
| 2626 } |
| 2627 |
| 2628 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, List<Unlink
edConstructorInitializerBuilder> constantInitializers, UnlinkedDocumentationComm
entBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bo
ol isConst, bool isExternal, bool isFactory, bool isStatic, idl.UnlinkedExecutab
leKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters,
EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters}) |
| 2629 : _annotations = annotations, |
| 2630 _constantInitializers = constantInitializers, |
| 2631 _documentationComment = documentationComment, |
| 2632 _inferredReturnTypeSlot = inferredReturnTypeSlot, |
| 2633 _isAbstract = isAbstract, |
| 2634 _isConst = isConst, |
| 2635 _isExternal = isExternal, |
| 2636 _isFactory = isFactory, |
| 2637 _isStatic = isStatic, |
| 2638 _kind = kind, |
| 2639 _name = name, |
| 2630 _nameOffset = nameOffset, | 2640 _nameOffset = nameOffset, |
| 2631 _documentationComment = documentationComment, | 2641 _parameters = parameters, |
| 2632 _annotations = annotations, | |
| 2633 _typeParameters = typeParameters, | |
| 2634 _returnType = returnType, | 2642 _returnType = returnType, |
| 2635 _parameters = parameters, | 2643 _typeParameters = typeParameters; |
| 2636 _kind = kind, | |
| 2637 _isAbstract = isAbstract, | |
| 2638 _isStatic = isStatic, | |
| 2639 _isConst = isConst, | |
| 2640 _isFactory = isFactory, | |
| 2641 _isExternal = isExternal, | |
| 2642 _inferredReturnTypeSlot = inferredReturnTypeSlot, | |
| 2643 _constantInitializers = constantInitializers; | |
| 2644 | 2644 |
| 2645 fb.Offset finish(fb.Builder fbBuilder) { | 2645 fb.Offset finish(fb.Builder fbBuilder) { |
| 2646 assert(!_finished); | 2646 assert(!_finished); |
| 2647 _finished = true; | 2647 _finished = true; |
| 2648 fb.Offset offset_annotations; |
| 2649 fb.Offset offset_constantInitializers; |
| 2650 fb.Offset offset_documentationComment; |
| 2648 fb.Offset offset_name; | 2651 fb.Offset offset_name; |
| 2649 fb.Offset offset_documentationComment; | 2652 fb.Offset offset_parameters; |
| 2650 fb.Offset offset_annotations; | 2653 fb.Offset offset_returnType; |
| 2651 fb.Offset offset_typeParameters; | 2654 fb.Offset offset_typeParameters; |
| 2652 fb.Offset offset_returnType; | 2655 if (!(_annotations == null || _annotations.isEmpty)) { |
| 2653 fb.Offset offset_parameters; | 2656 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 2654 fb.Offset offset_constantInitializers; | 2657 } |
| 2655 if (_name != null) { | 2658 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { |
| 2656 offset_name = fbBuilder.writeString(_name); | 2659 offset_constantInitializers = fbBuilder.writeList(_constantInitializers.ma
p((b) => b.finish(fbBuilder)).toList()); |
| 2657 } | 2660 } |
| 2658 if (_documentationComment != null) { | 2661 if (_documentationComment != null) { |
| 2659 offset_documentationComment = _documentationComment.finish(fbBuilder); | 2662 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 2660 } | 2663 } |
| 2661 if (!(_annotations == null || _annotations.isEmpty)) { | 2664 if (_name != null) { |
| 2662 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 2665 offset_name = fbBuilder.writeString(_name); |
| 2666 } |
| 2667 if (!(_parameters == null || _parameters.isEmpty)) { |
| 2668 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); |
| 2669 } |
| 2670 if (_returnType != null) { |
| 2671 offset_returnType = _returnType.finish(fbBuilder); |
| 2663 } | 2672 } |
| 2664 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 2673 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
| 2665 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 2674 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
| 2666 } | 2675 } |
| 2667 if (_returnType != null) { | 2676 fbBuilder.startTable(); |
| 2668 offset_returnType = _returnType.finish(fbBuilder); | 2677 if (offset_annotations != null) { |
| 2678 fbBuilder.addOffset(0, offset_annotations); |
| 2669 } | 2679 } |
| 2670 if (!(_parameters == null || _parameters.isEmpty)) { | 2680 if (offset_constantInitializers != null) { |
| 2671 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 2681 fbBuilder.addOffset(1, offset_constantInitializers); |
| 2672 } | |
| 2673 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { | |
| 2674 offset_constantInitializers = fbBuilder.writeList(_constantInitializers.ma
p((b) => b.finish(fbBuilder)).toList()); | |
| 2675 } | |
| 2676 fbBuilder.startTable(); | |
| 2677 if (offset_name != null) { | |
| 2678 fbBuilder.addOffset(0, offset_name); | |
| 2679 } | |
| 2680 if (_nameOffset != null && _nameOffset != 0) { | |
| 2681 fbBuilder.addUint32(1, _nameOffset); | |
| 2682 } | 2682 } |
| 2683 if (offset_documentationComment != null) { | 2683 if (offset_documentationComment != null) { |
| 2684 fbBuilder.addOffset(2, offset_documentationComment); | 2684 fbBuilder.addOffset(2, offset_documentationComment); |
| 2685 } | 2685 } |
| 2686 if (offset_annotations != null) { | 2686 if (_inferredReturnTypeSlot != null && _inferredReturnTypeSlot != 0) { |
| 2687 fbBuilder.addOffset(3, offset_annotations); | 2687 fbBuilder.addUint32(3, _inferredReturnTypeSlot); |
| 2688 } |
| 2689 if (_isAbstract == true) { |
| 2690 fbBuilder.addBool(4, true); |
| 2691 } |
| 2692 if (_isConst == true) { |
| 2693 fbBuilder.addBool(5, true); |
| 2694 } |
| 2695 if (_isExternal == true) { |
| 2696 fbBuilder.addBool(6, true); |
| 2697 } |
| 2698 if (_isFactory == true) { |
| 2699 fbBuilder.addBool(7, true); |
| 2700 } |
| 2701 if (_isStatic == true) { |
| 2702 fbBuilder.addBool(8, true); |
| 2703 } |
| 2704 if (_kind != null && _kind != idl.UnlinkedExecutableKind.functionOrMethod) { |
| 2705 fbBuilder.addUint32(9, _kind.index); |
| 2706 } |
| 2707 if (offset_name != null) { |
| 2708 fbBuilder.addOffset(10, offset_name); |
| 2709 } |
| 2710 if (_nameOffset != null && _nameOffset != 0) { |
| 2711 fbBuilder.addUint32(11, _nameOffset); |
| 2712 } |
| 2713 if (offset_parameters != null) { |
| 2714 fbBuilder.addOffset(12, offset_parameters); |
| 2715 } |
| 2716 if (offset_returnType != null) { |
| 2717 fbBuilder.addOffset(13, offset_returnType); |
| 2688 } | 2718 } |
| 2689 if (offset_typeParameters != null) { | 2719 if (offset_typeParameters != null) { |
| 2690 fbBuilder.addOffset(4, offset_typeParameters); | 2720 fbBuilder.addOffset(14, offset_typeParameters); |
| 2691 } | |
| 2692 if (offset_returnType != null) { | |
| 2693 fbBuilder.addOffset(5, offset_returnType); | |
| 2694 } | |
| 2695 if (offset_parameters != null) { | |
| 2696 fbBuilder.addOffset(6, offset_parameters); | |
| 2697 } | |
| 2698 if (_kind != null && _kind != idl.UnlinkedExecutableKind.functionOrMethod) { | |
| 2699 fbBuilder.addUint32(7, _kind.index); | |
| 2700 } | |
| 2701 if (_isAbstract == true) { | |
| 2702 fbBuilder.addBool(8, true); | |
| 2703 } | |
| 2704 if (_isStatic == true) { | |
| 2705 fbBuilder.addBool(9, true); | |
| 2706 } | |
| 2707 if (_isConst == true) { | |
| 2708 fbBuilder.addBool(10, true); | |
| 2709 } | |
| 2710 if (_isFactory == true) { | |
| 2711 fbBuilder.addBool(11, true); | |
| 2712 } | |
| 2713 if (_isExternal == true) { | |
| 2714 fbBuilder.addBool(12, true); | |
| 2715 } | |
| 2716 if (_inferredReturnTypeSlot != null && _inferredReturnTypeSlot != 0) { | |
| 2717 fbBuilder.addUint32(13, _inferredReturnTypeSlot); | |
| 2718 } | |
| 2719 if (offset_constantInitializers != null) { | |
| 2720 fbBuilder.addOffset(14, offset_constantInitializers); | |
| 2721 } | 2721 } |
| 2722 return fbBuilder.endTable(); | 2722 return fbBuilder.endTable(); |
| 2723 } | 2723 } |
| 2724 } | 2724 } |
| 2725 | 2725 |
| 2726 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ | 2726 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ |
| 2727 const _UnlinkedExecutableReader(); | 2727 const _UnlinkedExecutableReader(); |
| 2728 | 2728 |
| 2729 @override | 2729 @override |
| 2730 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec
utableImpl(bp); | 2730 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec
utableImpl(bp); |
| 2731 } | 2731 } |
| 2732 | 2732 |
| 2733 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { | 2733 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { |
| 2734 final fb.BufferPointer _bp; | 2734 final fb.BufferPointer _bp; |
| 2735 | 2735 |
| 2736 _UnlinkedExecutableImpl(this._bp); | 2736 _UnlinkedExecutableImpl(this._bp); |
| 2737 | 2737 |
| 2738 List<idl.UnlinkedConst> _annotations; |
| 2739 List<idl.UnlinkedConstructorInitializer> _constantInitializers; |
| 2740 idl.UnlinkedDocumentationComment _documentationComment; |
| 2741 int _inferredReturnTypeSlot; |
| 2742 bool _isAbstract; |
| 2743 bool _isConst; |
| 2744 bool _isExternal; |
| 2745 bool _isFactory; |
| 2746 bool _isStatic; |
| 2747 idl.UnlinkedExecutableKind _kind; |
| 2738 String _name; | 2748 String _name; |
| 2739 int _nameOffset; | 2749 int _nameOffset; |
| 2740 idl.UnlinkedDocumentationComment _documentationComment; | 2750 List<idl.UnlinkedParam> _parameters; |
| 2741 List<idl.UnlinkedConst> _annotations; | 2751 idl.EntityRef _returnType; |
| 2742 List<idl.UnlinkedTypeParam> _typeParameters; | 2752 List<idl.UnlinkedTypeParam> _typeParameters; |
| 2743 idl.EntityRef _returnType; | |
| 2744 List<idl.UnlinkedParam> _parameters; | |
| 2745 idl.UnlinkedExecutableKind _kind; | |
| 2746 bool _isAbstract; | |
| 2747 bool _isStatic; | |
| 2748 bool _isConst; | |
| 2749 bool _isFactory; | |
| 2750 bool _isExternal; | |
| 2751 int _inferredReturnTypeSlot; | |
| 2752 List<idl.UnlinkedConstructorInitializer> _constantInitializers; | |
| 2753 | 2753 |
| 2754 @override | 2754 @override |
| 2755 String get name { | 2755 List<idl.UnlinkedConst> get annotations { |
| 2756 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 2756 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 2757 return _name; | 2757 return _annotations; |
| 2758 } | 2758 } |
| 2759 | 2759 |
| 2760 @override | 2760 @override |
| 2761 int get nameOffset { | 2761 List<idl.UnlinkedConstructorInitializer> get constantInitializers { |
| 2762 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 2762 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial
izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 1, const <id
l.UnlinkedConstructorInitializer>[]); |
| 2763 return _nameOffset; | 2763 return _constantInitializers; |
| 2764 } | 2764 } |
| 2765 | 2765 |
| 2766 @override | 2766 @override |
| 2767 idl.UnlinkedDocumentationComment get documentationComment { | 2767 idl.UnlinkedDocumentationComment get documentationComment { |
| 2768 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | 2768 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); |
| 2769 return _documentationComment; | 2769 return _documentationComment; |
| 2770 } | 2770 } |
| 2771 | 2771 |
| 2772 @override | 2772 @override |
| 2773 List<idl.UnlinkedConst> get annotations { | 2773 int get inferredReturnTypeSlot { |
| 2774 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | 2774 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 2775 return _annotations; | 2775 return _inferredReturnTypeSlot; |
| 2776 } |
| 2777 |
| 2778 @override |
| 2779 bool get isAbstract { |
| 2780 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 4, false); |
| 2781 return _isAbstract; |
| 2782 } |
| 2783 |
| 2784 @override |
| 2785 bool get isConst { |
| 2786 _isConst ??= const fb.BoolReader().vTableGet(_bp, 5, false); |
| 2787 return _isConst; |
| 2788 } |
| 2789 |
| 2790 @override |
| 2791 bool get isExternal { |
| 2792 _isExternal ??= const fb.BoolReader().vTableGet(_bp, 6, false); |
| 2793 return _isExternal; |
| 2794 } |
| 2795 |
| 2796 @override |
| 2797 bool get isFactory { |
| 2798 _isFactory ??= const fb.BoolReader().vTableGet(_bp, 7, false); |
| 2799 return _isFactory; |
| 2800 } |
| 2801 |
| 2802 @override |
| 2803 bool get isStatic { |
| 2804 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 8, false); |
| 2805 return _isStatic; |
| 2806 } |
| 2807 |
| 2808 @override |
| 2809 idl.UnlinkedExecutableKind get kind { |
| 2810 _kind ??= const _UnlinkedExecutableKindReader().vTableGet(_bp, 9, idl.Unlink
edExecutableKind.functionOrMethod); |
| 2811 return _kind; |
| 2812 } |
| 2813 |
| 2814 @override |
| 2815 String get name { |
| 2816 _name ??= const fb.StringReader().vTableGet(_bp, 10, ''); |
| 2817 return _name; |
| 2818 } |
| 2819 |
| 2820 @override |
| 2821 int get nameOffset { |
| 2822 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0); |
| 2823 return _nameOffset; |
| 2824 } |
| 2825 |
| 2826 @override |
| 2827 List<idl.UnlinkedParam> get parameters { |
| 2828 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bp, 12, const <idl.UnlinkedParam>[]); |
| 2829 return _parameters; |
| 2830 } |
| 2831 |
| 2832 @override |
| 2833 idl.EntityRef get returnType { |
| 2834 _returnType ??= const _EntityRefReader().vTableGet(_bp, 13, null); |
| 2835 return _returnType; |
| 2776 } | 2836 } |
| 2777 | 2837 |
| 2778 @override | 2838 @override |
| 2779 List<idl.UnlinkedTypeParam> get typeParameters { | 2839 List<idl.UnlinkedTypeParam> get typeParameters { |
| 2780 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 4, const <idl.UnlinkedTypeParam>[]); | 2840 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 14, const <idl.UnlinkedTypeParam>[]); |
| 2781 return _typeParameters; | 2841 return _typeParameters; |
| 2782 } | 2842 } |
| 2783 | |
| 2784 @override | |
| 2785 idl.EntityRef get returnType { | |
| 2786 _returnType ??= const _EntityRefReader().vTableGet(_bp, 5, null); | |
| 2787 return _returnType; | |
| 2788 } | |
| 2789 | |
| 2790 @override | |
| 2791 List<idl.UnlinkedParam> get parameters { | |
| 2792 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bp, 6, const <idl.UnlinkedParam>[]); | |
| 2793 return _parameters; | |
| 2794 } | |
| 2795 | |
| 2796 @override | |
| 2797 idl.UnlinkedExecutableKind get kind { | |
| 2798 _kind ??= const _UnlinkedExecutableKindReader().vTableGet(_bp, 7, idl.Unlink
edExecutableKind.functionOrMethod); | |
| 2799 return _kind; | |
| 2800 } | |
| 2801 | |
| 2802 @override | |
| 2803 bool get isAbstract { | |
| 2804 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 8, false); | |
| 2805 return _isAbstract; | |
| 2806 } | |
| 2807 | |
| 2808 @override | |
| 2809 bool get isStatic { | |
| 2810 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 9, false); | |
| 2811 return _isStatic; | |
| 2812 } | |
| 2813 | |
| 2814 @override | |
| 2815 bool get isConst { | |
| 2816 _isConst ??= const fb.BoolReader().vTableGet(_bp, 10, false); | |
| 2817 return _isConst; | |
| 2818 } | |
| 2819 | |
| 2820 @override | |
| 2821 bool get isFactory { | |
| 2822 _isFactory ??= const fb.BoolReader().vTableGet(_bp, 11, false); | |
| 2823 return _isFactory; | |
| 2824 } | |
| 2825 | |
| 2826 @override | |
| 2827 bool get isExternal { | |
| 2828 _isExternal ??= const fb.BoolReader().vTableGet(_bp, 12, false); | |
| 2829 return _isExternal; | |
| 2830 } | |
| 2831 | |
| 2832 @override | |
| 2833 int get inferredReturnTypeSlot { | |
| 2834 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 13, 0); | |
| 2835 return _inferredReturnTypeSlot; | |
| 2836 } | |
| 2837 | |
| 2838 @override | |
| 2839 List<idl.UnlinkedConstructorInitializer> get constantInitializers { | |
| 2840 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial
izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <i
dl.UnlinkedConstructorInitializer>[]); | |
| 2841 return _constantInitializers; | |
| 2842 } | |
| 2843 } | 2843 } |
| 2844 | 2844 |
| 2845 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { | 2845 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { |
| 2846 @override | 2846 @override |
| 2847 Map<String, Object> toMap() => { | 2847 Map<String, Object> toMap() => { |
| 2848 "annotations": annotations, |
| 2849 "constantInitializers": constantInitializers, |
| 2850 "documentationComment": documentationComment, |
| 2851 "inferredReturnTypeSlot": inferredReturnTypeSlot, |
| 2852 "isAbstract": isAbstract, |
| 2853 "isConst": isConst, |
| 2854 "isExternal": isExternal, |
| 2855 "isFactory": isFactory, |
| 2856 "isStatic": isStatic, |
| 2857 "kind": kind, |
| 2848 "name": name, | 2858 "name": name, |
| 2849 "nameOffset": nameOffset, | 2859 "nameOffset": nameOffset, |
| 2850 "documentationComment": documentationComment, | 2860 "parameters": parameters, |
| 2851 "annotations": annotations, | 2861 "returnType": returnType, |
| 2852 "typeParameters": typeParameters, | 2862 "typeParameters": typeParameters, |
| 2853 "returnType": returnType, | |
| 2854 "parameters": parameters, | |
| 2855 "kind": kind, | |
| 2856 "isAbstract": isAbstract, | |
| 2857 "isStatic": isStatic, | |
| 2858 "isConst": isConst, | |
| 2859 "isFactory": isFactory, | |
| 2860 "isExternal": isExternal, | |
| 2861 "inferredReturnTypeSlot": inferredReturnTypeSlot, | |
| 2862 "constantInitializers": constantInitializers, | |
| 2863 }; | 2863 }; |
| 2864 } | 2864 } |
| 2865 | 2865 |
| 2866 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { | 2866 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { |
| 2867 bool _finished = false; | 2867 bool _finished = false; |
| 2868 | 2868 |
| 2869 List<UnlinkedConstBuilder> _annotations; |
| 2869 int _offset; | 2870 int _offset; |
| 2871 int _uriEnd; |
| 2870 int _uriOffset; | 2872 int _uriOffset; |
| 2871 int _uriEnd; | 2873 |
| 2872 List<UnlinkedConstBuilder> _annotations; | 2874 @override |
| 2875 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 2876 |
| 2877 /** |
| 2878 * Annotations for this export directive. |
| 2879 */ |
| 2880 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 2881 assert(!_finished); |
| 2882 _annotations = _value; |
| 2883 } |
| 2873 | 2884 |
| 2874 @override | 2885 @override |
| 2875 int get offset => _offset ??= 0; | 2886 int get offset => _offset ??= 0; |
| 2876 | 2887 |
| 2877 /** | 2888 /** |
| 2878 * Offset of the "export" keyword. | 2889 * Offset of the "export" keyword. |
| 2879 */ | 2890 */ |
| 2880 void set offset(int _value) { | 2891 void set offset(int _value) { |
| 2881 assert(!_finished); | 2892 assert(!_finished); |
| 2882 assert(_value == null || _value >= 0); | 2893 assert(_value == null || _value >= 0); |
| 2883 _offset = _value; | 2894 _offset = _value; |
| 2884 } | 2895 } |
| 2885 | 2896 |
| 2886 @override | 2897 @override |
| 2887 int get uriOffset => _uriOffset ??= 0; | |
| 2888 | |
| 2889 /** | |
| 2890 * Offset of the URI string (including quotes) relative to the beginning of | |
| 2891 * the file. | |
| 2892 */ | |
| 2893 void set uriOffset(int _value) { | |
| 2894 assert(!_finished); | |
| 2895 assert(_value == null || _value >= 0); | |
| 2896 _uriOffset = _value; | |
| 2897 } | |
| 2898 | |
| 2899 @override | |
| 2900 int get uriEnd => _uriEnd ??= 0; | 2898 int get uriEnd => _uriEnd ??= 0; |
| 2901 | 2899 |
| 2902 /** | 2900 /** |
| 2903 * End of the URI string (including quotes) relative to the beginning of the | 2901 * End of the URI string (including quotes) relative to the beginning of the |
| 2904 * file. | 2902 * file. |
| 2905 */ | 2903 */ |
| 2906 void set uriEnd(int _value) { | 2904 void set uriEnd(int _value) { |
| 2907 assert(!_finished); | 2905 assert(!_finished); |
| 2908 assert(_value == null || _value >= 0); | 2906 assert(_value == null || _value >= 0); |
| 2909 _uriEnd = _value; | 2907 _uriEnd = _value; |
| 2910 } | 2908 } |
| 2911 | 2909 |
| 2912 @override | 2910 @override |
| 2913 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 2911 int get uriOffset => _uriOffset ??= 0; |
| 2914 | 2912 |
| 2915 /** | 2913 /** |
| 2916 * Annotations for this export directive. | 2914 * Offset of the URI string (including quotes) relative to the beginning of |
| 2915 * the file. |
| 2917 */ | 2916 */ |
| 2918 void set annotations(List<UnlinkedConstBuilder> _value) { | 2917 void set uriOffset(int _value) { |
| 2919 assert(!_finished); | 2918 assert(!_finished); |
| 2920 _annotations = _value; | 2919 assert(_value == null || _value >= 0); |
| 2920 _uriOffset = _value; |
| 2921 } | 2921 } |
| 2922 | 2922 |
| 2923 UnlinkedExportNonPublicBuilder({int offset, int uriOffset, int uriEnd, List<Un
linkedConstBuilder> annotations}) | 2923 UnlinkedExportNonPublicBuilder({List<UnlinkedConstBuilder> annotations, int of
fset, int uriEnd, int uriOffset}) |
| 2924 : _offset = offset, | 2924 : _annotations = annotations, |
| 2925 _uriOffset = uriOffset, | 2925 _offset = offset, |
| 2926 _uriEnd = uriEnd, | 2926 _uriEnd = uriEnd, |
| 2927 _annotations = annotations; | 2927 _uriOffset = uriOffset; |
| 2928 | 2928 |
| 2929 fb.Offset finish(fb.Builder fbBuilder) { | 2929 fb.Offset finish(fb.Builder fbBuilder) { |
| 2930 assert(!_finished); | 2930 assert(!_finished); |
| 2931 _finished = true; | 2931 _finished = true; |
| 2932 fb.Offset offset_annotations; | 2932 fb.Offset offset_annotations; |
| 2933 if (!(_annotations == null || _annotations.isEmpty)) { | 2933 if (!(_annotations == null || _annotations.isEmpty)) { |
| 2934 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 2934 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 2935 } | 2935 } |
| 2936 fbBuilder.startTable(); | 2936 fbBuilder.startTable(); |
| 2937 if (offset_annotations != null) { |
| 2938 fbBuilder.addOffset(0, offset_annotations); |
| 2939 } |
| 2937 if (_offset != null && _offset != 0) { | 2940 if (_offset != null && _offset != 0) { |
| 2938 fbBuilder.addUint32(0, _offset); | 2941 fbBuilder.addUint32(1, _offset); |
| 2939 } | |
| 2940 if (_uriOffset != null && _uriOffset != 0) { | |
| 2941 fbBuilder.addUint32(1, _uriOffset); | |
| 2942 } | 2942 } |
| 2943 if (_uriEnd != null && _uriEnd != 0) { | 2943 if (_uriEnd != null && _uriEnd != 0) { |
| 2944 fbBuilder.addUint32(2, _uriEnd); | 2944 fbBuilder.addUint32(2, _uriEnd); |
| 2945 } | 2945 } |
| 2946 if (offset_annotations != null) { | 2946 if (_uriOffset != null && _uriOffset != 0) { |
| 2947 fbBuilder.addOffset(3, offset_annotations); | 2947 fbBuilder.addUint32(3, _uriOffset); |
| 2948 } | 2948 } |
| 2949 return fbBuilder.endTable(); | 2949 return fbBuilder.endTable(); |
| 2950 } | 2950 } |
| 2951 } | 2951 } |
| 2952 | 2952 |
| 2953 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu
blicImpl> { | 2953 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu
blicImpl> { |
| 2954 const _UnlinkedExportNonPublicReader(); | 2954 const _UnlinkedExportNonPublicReader(); |
| 2955 | 2955 |
| 2956 @override | 2956 @override |
| 2957 _UnlinkedExportNonPublicImpl createObject(fb.BufferPointer bp) => new _Unlinke
dExportNonPublicImpl(bp); | 2957 _UnlinkedExportNonPublicImpl createObject(fb.BufferPointer bp) => new _Unlinke
dExportNonPublicImpl(bp); |
| 2958 } | 2958 } |
| 2959 | 2959 |
| 2960 class _UnlinkedExportNonPublicImpl extends Object with _UnlinkedExportNonPublicM
ixin implements idl.UnlinkedExportNonPublic { | 2960 class _UnlinkedExportNonPublicImpl extends Object with _UnlinkedExportNonPublicM
ixin implements idl.UnlinkedExportNonPublic { |
| 2961 final fb.BufferPointer _bp; | 2961 final fb.BufferPointer _bp; |
| 2962 | 2962 |
| 2963 _UnlinkedExportNonPublicImpl(this._bp); | 2963 _UnlinkedExportNonPublicImpl(this._bp); |
| 2964 | 2964 |
| 2965 List<idl.UnlinkedConst> _annotations; |
| 2965 int _offset; | 2966 int _offset; |
| 2967 int _uriEnd; |
| 2966 int _uriOffset; | 2968 int _uriOffset; |
| 2967 int _uriEnd; | 2969 |
| 2968 List<idl.UnlinkedConst> _annotations; | 2970 @override |
| 2971 List<idl.UnlinkedConst> get annotations { |
| 2972 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 2973 return _annotations; |
| 2974 } |
| 2969 | 2975 |
| 2970 @override | 2976 @override |
| 2971 int get offset { | 2977 int get offset { |
| 2972 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); | 2978 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 2973 return _offset; | 2979 return _offset; |
| 2974 } | 2980 } |
| 2975 | 2981 |
| 2976 @override | 2982 @override |
| 2977 int get uriOffset { | |
| 2978 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | |
| 2979 return _uriOffset; | |
| 2980 } | |
| 2981 | |
| 2982 @override | |
| 2983 int get uriEnd { | 2983 int get uriEnd { |
| 2984 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 2984 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
| 2985 return _uriEnd; | 2985 return _uriEnd; |
| 2986 } | 2986 } |
| 2987 | 2987 |
| 2988 @override | 2988 @override |
| 2989 List<idl.UnlinkedConst> get annotations { | 2989 int get uriOffset { |
| 2990 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | 2990 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 2991 return _annotations; | 2991 return _uriOffset; |
| 2992 } | 2992 } |
| 2993 } | 2993 } |
| 2994 | 2994 |
| 2995 abstract class _UnlinkedExportNonPublicMixin implements idl.UnlinkedExportNonPub
lic { | 2995 abstract class _UnlinkedExportNonPublicMixin implements idl.UnlinkedExportNonPub
lic { |
| 2996 @override | 2996 @override |
| 2997 Map<String, Object> toMap() => { | 2997 Map<String, Object> toMap() => { |
| 2998 "annotations": annotations, |
| 2998 "offset": offset, | 2999 "offset": offset, |
| 3000 "uriEnd": uriEnd, |
| 2999 "uriOffset": uriOffset, | 3001 "uriOffset": uriOffset, |
| 3000 "uriEnd": uriEnd, | |
| 3001 "annotations": annotations, | |
| 3002 }; | 3002 }; |
| 3003 } | 3003 } |
| 3004 | 3004 |
| 3005 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin
implements idl.UnlinkedExportPublic { | 3005 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin
implements idl.UnlinkedExportPublic { |
| 3006 bool _finished = false; | 3006 bool _finished = false; |
| 3007 | 3007 |
| 3008 List<UnlinkedCombinatorBuilder> _combinators; |
| 3008 String _uri; | 3009 String _uri; |
| 3009 List<UnlinkedCombinatorBuilder> _combinators; | 3010 |
| 3011 @override |
| 3012 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; |
| 3013 |
| 3014 /** |
| 3015 * Combinators contained in this import declaration. |
| 3016 */ |
| 3017 void set combinators(List<UnlinkedCombinatorBuilder> _value) { |
| 3018 assert(!_finished); |
| 3019 _combinators = _value; |
| 3020 } |
| 3010 | 3021 |
| 3011 @override | 3022 @override |
| 3012 String get uri => _uri ??= ''; | 3023 String get uri => _uri ??= ''; |
| 3013 | 3024 |
| 3014 /** | 3025 /** |
| 3015 * URI used in the source code to reference the exported library. | 3026 * URI used in the source code to reference the exported library. |
| 3016 */ | 3027 */ |
| 3017 void set uri(String _value) { | 3028 void set uri(String _value) { |
| 3018 assert(!_finished); | 3029 assert(!_finished); |
| 3019 _uri = _value; | 3030 _uri = _value; |
| 3020 } | 3031 } |
| 3021 | 3032 |
| 3022 @override | 3033 UnlinkedExportPublicBuilder({List<UnlinkedCombinatorBuilder> combinators, Stri
ng uri}) |
| 3023 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; | 3034 : _combinators = combinators, |
| 3024 | 3035 _uri = uri; |
| 3025 /** | |
| 3026 * Combinators contained in this import declaration. | |
| 3027 */ | |
| 3028 void set combinators(List<UnlinkedCombinatorBuilder> _value) { | |
| 3029 assert(!_finished); | |
| 3030 _combinators = _value; | |
| 3031 } | |
| 3032 | |
| 3033 UnlinkedExportPublicBuilder({String uri, List<UnlinkedCombinatorBuilder> combi
nators}) | |
| 3034 : _uri = uri, | |
| 3035 _combinators = combinators; | |
| 3036 | 3036 |
| 3037 fb.Offset finish(fb.Builder fbBuilder) { | 3037 fb.Offset finish(fb.Builder fbBuilder) { |
| 3038 assert(!_finished); | 3038 assert(!_finished); |
| 3039 _finished = true; | 3039 _finished = true; |
| 3040 fb.Offset offset_combinators; |
| 3040 fb.Offset offset_uri; | 3041 fb.Offset offset_uri; |
| 3041 fb.Offset offset_combinators; | 3042 if (!(_combinators == null || _combinators.isEmpty)) { |
| 3043 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); |
| 3044 } |
| 3042 if (_uri != null) { | 3045 if (_uri != null) { |
| 3043 offset_uri = fbBuilder.writeString(_uri); | 3046 offset_uri = fbBuilder.writeString(_uri); |
| 3044 } | 3047 } |
| 3045 if (!(_combinators == null || _combinators.isEmpty)) { | 3048 fbBuilder.startTable(); |
| 3046 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); | 3049 if (offset_combinators != null) { |
| 3050 fbBuilder.addOffset(0, offset_combinators); |
| 3047 } | 3051 } |
| 3048 fbBuilder.startTable(); | |
| 3049 if (offset_uri != null) { | 3052 if (offset_uri != null) { |
| 3050 fbBuilder.addOffset(0, offset_uri); | 3053 fbBuilder.addOffset(1, offset_uri); |
| 3051 } | |
| 3052 if (offset_combinators != null) { | |
| 3053 fbBuilder.addOffset(1, offset_combinators); | |
| 3054 } | 3054 } |
| 3055 return fbBuilder.endTable(); | 3055 return fbBuilder.endTable(); |
| 3056 } | 3056 } |
| 3057 } | 3057 } |
| 3058 | 3058 |
| 3059 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm
pl> { | 3059 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm
pl> { |
| 3060 const _UnlinkedExportPublicReader(); | 3060 const _UnlinkedExportPublicReader(); |
| 3061 | 3061 |
| 3062 @override | 3062 @override |
| 3063 _UnlinkedExportPublicImpl createObject(fb.BufferPointer bp) => new _UnlinkedEx
portPublicImpl(bp); | 3063 _UnlinkedExportPublicImpl createObject(fb.BufferPointer bp) => new _UnlinkedEx
portPublicImpl(bp); |
| 3064 } | 3064 } |
| 3065 | 3065 |
| 3066 class _UnlinkedExportPublicImpl extends Object with _UnlinkedExportPublicMixin i
mplements idl.UnlinkedExportPublic { | 3066 class _UnlinkedExportPublicImpl extends Object with _UnlinkedExportPublicMixin i
mplements idl.UnlinkedExportPublic { |
| 3067 final fb.BufferPointer _bp; | 3067 final fb.BufferPointer _bp; |
| 3068 | 3068 |
| 3069 _UnlinkedExportPublicImpl(this._bp); | 3069 _UnlinkedExportPublicImpl(this._bp); |
| 3070 | 3070 |
| 3071 List<idl.UnlinkedCombinator> _combinators; |
| 3071 String _uri; | 3072 String _uri; |
| 3072 List<idl.UnlinkedCombinator> _combinators; | 3073 |
| 3074 @override |
| 3075 List<idl.UnlinkedCombinator> get combinators { |
| 3076 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked
CombinatorReader()).vTableGet(_bp, 0, const <idl.UnlinkedCombinator>[]); |
| 3077 return _combinators; |
| 3078 } |
| 3073 | 3079 |
| 3074 @override | 3080 @override |
| 3075 String get uri { | 3081 String get uri { |
| 3076 _uri ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 3082 _uri ??= const fb.StringReader().vTableGet(_bp, 1, ''); |
| 3077 return _uri; | 3083 return _uri; |
| 3078 } | 3084 } |
| 3079 | |
| 3080 @override | |
| 3081 List<idl.UnlinkedCombinator> get combinators { | |
| 3082 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked
CombinatorReader()).vTableGet(_bp, 1, const <idl.UnlinkedCombinator>[]); | |
| 3083 return _combinators; | |
| 3084 } | |
| 3085 } | 3085 } |
| 3086 | 3086 |
| 3087 abstract class _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic { | 3087 abstract class _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic { |
| 3088 @override | 3088 @override |
| 3089 Map<String, Object> toMap() => { | 3089 Map<String, Object> toMap() => { |
| 3090 "combinators": combinators, |
| 3090 "uri": uri, | 3091 "uri": uri, |
| 3091 "combinators": combinators, | |
| 3092 }; | 3092 }; |
| 3093 } | 3093 } |
| 3094 | 3094 |
| 3095 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements
idl.UnlinkedImport { | 3095 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements
idl.UnlinkedImport { |
| 3096 bool _finished = false; | 3096 bool _finished = false; |
| 3097 | 3097 |
| 3098 String _uri; | |
| 3099 int _offset; | |
| 3100 List<UnlinkedConstBuilder> _annotations; | 3098 List<UnlinkedConstBuilder> _annotations; |
| 3101 int _prefixReference; | |
| 3102 List<UnlinkedCombinatorBuilder> _combinators; | 3099 List<UnlinkedCombinatorBuilder> _combinators; |
| 3103 bool _isDeferred; | 3100 bool _isDeferred; |
| 3104 bool _isImplicit; | 3101 bool _isImplicit; |
| 3102 int _offset; |
| 3103 int _prefixOffset; |
| 3104 int _prefixReference; |
| 3105 String _uri; |
| 3106 int _uriEnd; |
| 3105 int _uriOffset; | 3107 int _uriOffset; |
| 3106 int _uriEnd; | |
| 3107 int _prefixOffset; | |
| 3108 | |
| 3109 @override | |
| 3110 String get uri => _uri ??= ''; | |
| 3111 | |
| 3112 /** | |
| 3113 * URI used in the source code to reference the imported library. | |
| 3114 */ | |
| 3115 void set uri(String _value) { | |
| 3116 assert(!_finished); | |
| 3117 _uri = _value; | |
| 3118 } | |
| 3119 | |
| 3120 @override | |
| 3121 int get offset => _offset ??= 0; | |
| 3122 | |
| 3123 /** | |
| 3124 * If [isImplicit] is false, offset of the "import" keyword. If [isImplicit] | |
| 3125 * is true, zero. | |
| 3126 */ | |
| 3127 void set offset(int _value) { | |
| 3128 assert(!_finished); | |
| 3129 assert(_value == null || _value >= 0); | |
| 3130 _offset = _value; | |
| 3131 } | |
| 3132 | 3108 |
| 3133 @override | 3109 @override |
| 3134 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3110 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 3135 | 3111 |
| 3136 /** | 3112 /** |
| 3137 * Annotations for this import declaration. | 3113 * Annotations for this import declaration. |
| 3138 */ | 3114 */ |
| 3139 void set annotations(List<UnlinkedConstBuilder> _value) { | 3115 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 3140 assert(!_finished); | 3116 assert(!_finished); |
| 3141 _annotations = _value; | 3117 _annotations = _value; |
| 3142 } | 3118 } |
| 3143 | 3119 |
| 3144 @override | 3120 @override |
| 3145 int get prefixReference => _prefixReference ??= 0; | |
| 3146 | |
| 3147 /** | |
| 3148 * Index into [UnlinkedUnit.references] of the prefix declared by this | |
| 3149 * import declaration, or zero if this import declaration declares no prefix. | |
| 3150 * | |
| 3151 * Note that multiple imports can declare the same prefix. | |
| 3152 */ | |
| 3153 void set prefixReference(int _value) { | |
| 3154 assert(!_finished); | |
| 3155 assert(_value == null || _value >= 0); | |
| 3156 _prefixReference = _value; | |
| 3157 } | |
| 3158 | |
| 3159 @override | |
| 3160 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; | 3121 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; |
| 3161 | 3122 |
| 3162 /** | 3123 /** |
| 3163 * Combinators contained in this import declaration. | 3124 * Combinators contained in this import declaration. |
| 3164 */ | 3125 */ |
| 3165 void set combinators(List<UnlinkedCombinatorBuilder> _value) { | 3126 void set combinators(List<UnlinkedCombinatorBuilder> _value) { |
| 3166 assert(!_finished); | 3127 assert(!_finished); |
| 3167 _combinators = _value; | 3128 _combinators = _value; |
| 3168 } | 3129 } |
| 3169 | 3130 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3183 | 3144 |
| 3184 /** | 3145 /** |
| 3185 * Indicates whether the import declaration is implicit. | 3146 * Indicates whether the import declaration is implicit. |
| 3186 */ | 3147 */ |
| 3187 void set isImplicit(bool _value) { | 3148 void set isImplicit(bool _value) { |
| 3188 assert(!_finished); | 3149 assert(!_finished); |
| 3189 _isImplicit = _value; | 3150 _isImplicit = _value; |
| 3190 } | 3151 } |
| 3191 | 3152 |
| 3192 @override | 3153 @override |
| 3193 int get uriOffset => _uriOffset ??= 0; | 3154 int get offset => _offset ??= 0; |
| 3194 | 3155 |
| 3195 /** | 3156 /** |
| 3196 * Offset of the URI string (including quotes) relative to the beginning of | 3157 * If [isImplicit] is false, offset of the "import" keyword. If [isImplicit] |
| 3197 * the file. If [isImplicit] is true, zero. | 3158 * is true, zero. |
| 3198 */ | 3159 */ |
| 3199 void set uriOffset(int _value) { | 3160 void set offset(int _value) { |
| 3200 assert(!_finished); | 3161 assert(!_finished); |
| 3201 assert(_value == null || _value >= 0); | 3162 assert(_value == null || _value >= 0); |
| 3202 _uriOffset = _value; | 3163 _offset = _value; |
| 3203 } | 3164 } |
| 3204 | 3165 |
| 3205 @override | 3166 @override |
| 3167 int get prefixOffset => _prefixOffset ??= 0; |
| 3168 |
| 3169 /** |
| 3170 * Offset of the prefix name relative to the beginning of the file, or zero |
| 3171 * if there is no prefix. |
| 3172 */ |
| 3173 void set prefixOffset(int _value) { |
| 3174 assert(!_finished); |
| 3175 assert(_value == null || _value >= 0); |
| 3176 _prefixOffset = _value; |
| 3177 } |
| 3178 |
| 3179 @override |
| 3180 int get prefixReference => _prefixReference ??= 0; |
| 3181 |
| 3182 /** |
| 3183 * Index into [UnlinkedUnit.references] of the prefix declared by this |
| 3184 * import declaration, or zero if this import declaration declares no prefix. |
| 3185 * |
| 3186 * Note that multiple imports can declare the same prefix. |
| 3187 */ |
| 3188 void set prefixReference(int _value) { |
| 3189 assert(!_finished); |
| 3190 assert(_value == null || _value >= 0); |
| 3191 _prefixReference = _value; |
| 3192 } |
| 3193 |
| 3194 @override |
| 3195 String get uri => _uri ??= ''; |
| 3196 |
| 3197 /** |
| 3198 * URI used in the source code to reference the imported library. |
| 3199 */ |
| 3200 void set uri(String _value) { |
| 3201 assert(!_finished); |
| 3202 _uri = _value; |
| 3203 } |
| 3204 |
| 3205 @override |
| 3206 int get uriEnd => _uriEnd ??= 0; | 3206 int get uriEnd => _uriEnd ??= 0; |
| 3207 | 3207 |
| 3208 /** | 3208 /** |
| 3209 * End of the URI string (including quotes) relative to the beginning of the | 3209 * End of the URI string (including quotes) relative to the beginning of the |
| 3210 * file. If [isImplicit] is true, zero. | 3210 * file. If [isImplicit] is true, zero. |
| 3211 */ | 3211 */ |
| 3212 void set uriEnd(int _value) { | 3212 void set uriEnd(int _value) { |
| 3213 assert(!_finished); | 3213 assert(!_finished); |
| 3214 assert(_value == null || _value >= 0); | 3214 assert(_value == null || _value >= 0); |
| 3215 _uriEnd = _value; | 3215 _uriEnd = _value; |
| 3216 } | 3216 } |
| 3217 | 3217 |
| 3218 @override | 3218 @override |
| 3219 int get prefixOffset => _prefixOffset ??= 0; | 3219 int get uriOffset => _uriOffset ??= 0; |
| 3220 | 3220 |
| 3221 /** | 3221 /** |
| 3222 * Offset of the prefix name relative to the beginning of the file, or zero | 3222 * Offset of the URI string (including quotes) relative to the beginning of |
| 3223 * if there is no prefix. | 3223 * the file. If [isImplicit] is true, zero. |
| 3224 */ | 3224 */ |
| 3225 void set prefixOffset(int _value) { | 3225 void set uriOffset(int _value) { |
| 3226 assert(!_finished); | 3226 assert(!_finished); |
| 3227 assert(_value == null || _value >= 0); | 3227 assert(_value == null || _value >= 0); |
| 3228 _prefixOffset = _value; | 3228 _uriOffset = _value; |
| 3229 } | 3229 } |
| 3230 | 3230 |
| 3231 UnlinkedImportBuilder({String uri, int offset, List<UnlinkedConstBuilder> anno
tations, int prefixReference, List<UnlinkedCombinatorBuilder> combinators, bool
isDeferred, bool isImplicit, int uriOffset, int uriEnd, int prefixOffset}) | 3231 UnlinkedImportBuilder({List<UnlinkedConstBuilder> annotations, List<UnlinkedCo
mbinatorBuilder> combinators, bool isDeferred, bool isImplicit, int offset, int
prefixOffset, int prefixReference, String uri, int uriEnd, int uriOffset}) |
| 3232 : _uri = uri, | 3232 : _annotations = annotations, |
| 3233 _offset = offset, | |
| 3234 _annotations = annotations, | |
| 3235 _prefixReference = prefixReference, | |
| 3236 _combinators = combinators, | 3233 _combinators = combinators, |
| 3237 _isDeferred = isDeferred, | 3234 _isDeferred = isDeferred, |
| 3238 _isImplicit = isImplicit, | 3235 _isImplicit = isImplicit, |
| 3239 _uriOffset = uriOffset, | 3236 _offset = offset, |
| 3237 _prefixOffset = prefixOffset, |
| 3238 _prefixReference = prefixReference, |
| 3239 _uri = uri, |
| 3240 _uriEnd = uriEnd, | 3240 _uriEnd = uriEnd, |
| 3241 _prefixOffset = prefixOffset; | 3241 _uriOffset = uriOffset; |
| 3242 | 3242 |
| 3243 fb.Offset finish(fb.Builder fbBuilder) { | 3243 fb.Offset finish(fb.Builder fbBuilder) { |
| 3244 assert(!_finished); | 3244 assert(!_finished); |
| 3245 _finished = true; | 3245 _finished = true; |
| 3246 fb.Offset offset_uri; | |
| 3247 fb.Offset offset_annotations; | 3246 fb.Offset offset_annotations; |
| 3248 fb.Offset offset_combinators; | 3247 fb.Offset offset_combinators; |
| 3249 if (_uri != null) { | 3248 fb.Offset offset_uri; |
| 3250 offset_uri = fbBuilder.writeString(_uri); | |
| 3251 } | |
| 3252 if (!(_annotations == null || _annotations.isEmpty)) { | 3249 if (!(_annotations == null || _annotations.isEmpty)) { |
| 3253 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 3250 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 3254 } | 3251 } |
| 3255 if (!(_combinators == null || _combinators.isEmpty)) { | 3252 if (!(_combinators == null || _combinators.isEmpty)) { |
| 3256 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); | 3253 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); |
| 3257 } | 3254 } |
| 3255 if (_uri != null) { |
| 3256 offset_uri = fbBuilder.writeString(_uri); |
| 3257 } |
| 3258 fbBuilder.startTable(); | 3258 fbBuilder.startTable(); |
| 3259 if (offset_uri != null) { | 3259 if (offset_annotations != null) { |
| 3260 fbBuilder.addOffset(0, offset_uri); | 3260 fbBuilder.addOffset(0, offset_annotations); |
| 3261 } |
| 3262 if (offset_combinators != null) { |
| 3263 fbBuilder.addOffset(1, offset_combinators); |
| 3264 } |
| 3265 if (_isDeferred == true) { |
| 3266 fbBuilder.addBool(2, true); |
| 3267 } |
| 3268 if (_isImplicit == true) { |
| 3269 fbBuilder.addBool(3, true); |
| 3261 } | 3270 } |
| 3262 if (_offset != null && _offset != 0) { | 3271 if (_offset != null && _offset != 0) { |
| 3263 fbBuilder.addUint32(1, _offset); | 3272 fbBuilder.addUint32(4, _offset); |
| 3264 } | 3273 } |
| 3265 if (offset_annotations != null) { | 3274 if (_prefixOffset != null && _prefixOffset != 0) { |
| 3266 fbBuilder.addOffset(2, offset_annotations); | 3275 fbBuilder.addUint32(5, _prefixOffset); |
| 3267 } | 3276 } |
| 3268 if (_prefixReference != null && _prefixReference != 0) { | 3277 if (_prefixReference != null && _prefixReference != 0) { |
| 3269 fbBuilder.addUint32(3, _prefixReference); | 3278 fbBuilder.addUint32(6, _prefixReference); |
| 3270 } | 3279 } |
| 3271 if (offset_combinators != null) { | 3280 if (offset_uri != null) { |
| 3272 fbBuilder.addOffset(4, offset_combinators); | 3281 fbBuilder.addOffset(7, offset_uri); |
| 3273 } | |
| 3274 if (_isDeferred == true) { | |
| 3275 fbBuilder.addBool(5, true); | |
| 3276 } | |
| 3277 if (_isImplicit == true) { | |
| 3278 fbBuilder.addBool(6, true); | |
| 3279 } | |
| 3280 if (_uriOffset != null && _uriOffset != 0) { | |
| 3281 fbBuilder.addUint32(7, _uriOffset); | |
| 3282 } | 3282 } |
| 3283 if (_uriEnd != null && _uriEnd != 0) { | 3283 if (_uriEnd != null && _uriEnd != 0) { |
| 3284 fbBuilder.addUint32(8, _uriEnd); | 3284 fbBuilder.addUint32(8, _uriEnd); |
| 3285 } | 3285 } |
| 3286 if (_prefixOffset != null && _prefixOffset != 0) { | 3286 if (_uriOffset != null && _uriOffset != 0) { |
| 3287 fbBuilder.addUint32(9, _prefixOffset); | 3287 fbBuilder.addUint32(9, _uriOffset); |
| 3288 } | 3288 } |
| 3289 return fbBuilder.endTable(); | 3289 return fbBuilder.endTable(); |
| 3290 } | 3290 } |
| 3291 } | 3291 } |
| 3292 | 3292 |
| 3293 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> { | 3293 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> { |
| 3294 const _UnlinkedImportReader(); | 3294 const _UnlinkedImportReader(); |
| 3295 | 3295 |
| 3296 @override | 3296 @override |
| 3297 _UnlinkedImportImpl createObject(fb.BufferPointer bp) => new _UnlinkedImportIm
pl(bp); | 3297 _UnlinkedImportImpl createObject(fb.BufferPointer bp) => new _UnlinkedImportIm
pl(bp); |
| 3298 } | 3298 } |
| 3299 | 3299 |
| 3300 class _UnlinkedImportImpl extends Object with _UnlinkedImportMixin implements id
l.UnlinkedImport { | 3300 class _UnlinkedImportImpl extends Object with _UnlinkedImportMixin implements id
l.UnlinkedImport { |
| 3301 final fb.BufferPointer _bp; | 3301 final fb.BufferPointer _bp; |
| 3302 | 3302 |
| 3303 _UnlinkedImportImpl(this._bp); | 3303 _UnlinkedImportImpl(this._bp); |
| 3304 | 3304 |
| 3305 String _uri; | |
| 3306 int _offset; | |
| 3307 List<idl.UnlinkedConst> _annotations; | 3305 List<idl.UnlinkedConst> _annotations; |
| 3308 int _prefixReference; | |
| 3309 List<idl.UnlinkedCombinator> _combinators; | 3306 List<idl.UnlinkedCombinator> _combinators; |
| 3310 bool _isDeferred; | 3307 bool _isDeferred; |
| 3311 bool _isImplicit; | 3308 bool _isImplicit; |
| 3309 int _offset; |
| 3310 int _prefixOffset; |
| 3311 int _prefixReference; |
| 3312 String _uri; |
| 3313 int _uriEnd; |
| 3312 int _uriOffset; | 3314 int _uriOffset; |
| 3313 int _uriEnd; | |
| 3314 int _prefixOffset; | |
| 3315 | |
| 3316 @override | |
| 3317 String get uri { | |
| 3318 _uri ??= const fb.StringReader().vTableGet(_bp, 0, ''); | |
| 3319 return _uri; | |
| 3320 } | |
| 3321 | |
| 3322 @override | |
| 3323 int get offset { | |
| 3324 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | |
| 3325 return _offset; | |
| 3326 } | |
| 3327 | 3315 |
| 3328 @override | 3316 @override |
| 3329 List<idl.UnlinkedConst> get annotations { | 3317 List<idl.UnlinkedConst> get annotations { |
| 3330 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 2, const <idl.UnlinkedConst>[]); | 3318 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 3331 return _annotations; | 3319 return _annotations; |
| 3332 } | 3320 } |
| 3333 | 3321 |
| 3334 @override | 3322 @override |
| 3335 int get prefixReference { | |
| 3336 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); | |
| 3337 return _prefixReference; | |
| 3338 } | |
| 3339 | |
| 3340 @override | |
| 3341 List<idl.UnlinkedCombinator> get combinators { | 3323 List<idl.UnlinkedCombinator> get combinators { |
| 3342 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked
CombinatorReader()).vTableGet(_bp, 4, const <idl.UnlinkedCombinator>[]); | 3324 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked
CombinatorReader()).vTableGet(_bp, 1, const <idl.UnlinkedCombinator>[]); |
| 3343 return _combinators; | 3325 return _combinators; |
| 3344 } | 3326 } |
| 3345 | 3327 |
| 3346 @override | 3328 @override |
| 3347 bool get isDeferred { | 3329 bool get isDeferred { |
| 3348 _isDeferred ??= const fb.BoolReader().vTableGet(_bp, 5, false); | 3330 _isDeferred ??= const fb.BoolReader().vTableGet(_bp, 2, false); |
| 3349 return _isDeferred; | 3331 return _isDeferred; |
| 3350 } | 3332 } |
| 3351 | 3333 |
| 3352 @override | 3334 @override |
| 3353 bool get isImplicit { | 3335 bool get isImplicit { |
| 3354 _isImplicit ??= const fb.BoolReader().vTableGet(_bp, 6, false); | 3336 _isImplicit ??= const fb.BoolReader().vTableGet(_bp, 3, false); |
| 3355 return _isImplicit; | 3337 return _isImplicit; |
| 3356 } | 3338 } |
| 3357 | 3339 |
| 3358 @override | 3340 @override |
| 3359 int get uriOffset { | 3341 int get offset { |
| 3360 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0); | 3342 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 4, 0); |
| 3361 return _uriOffset; | 3343 return _offset; |
| 3362 } | 3344 } |
| 3363 | 3345 |
| 3364 @override | 3346 @override |
| 3347 int get prefixOffset { |
| 3348 _prefixOffset ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); |
| 3349 return _prefixOffset; |
| 3350 } |
| 3351 |
| 3352 @override |
| 3353 int get prefixReference { |
| 3354 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0); |
| 3355 return _prefixReference; |
| 3356 } |
| 3357 |
| 3358 @override |
| 3359 String get uri { |
| 3360 _uri ??= const fb.StringReader().vTableGet(_bp, 7, ''); |
| 3361 return _uri; |
| 3362 } |
| 3363 |
| 3364 @override |
| 3365 int get uriEnd { | 3365 int get uriEnd { |
| 3366 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0); | 3366 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0); |
| 3367 return _uriEnd; | 3367 return _uriEnd; |
| 3368 } | 3368 } |
| 3369 | 3369 |
| 3370 @override | 3370 @override |
| 3371 int get prefixOffset { | 3371 int get uriOffset { |
| 3372 _prefixOffset ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); | 3372 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); |
| 3373 return _prefixOffset; | 3373 return _uriOffset; |
| 3374 } | 3374 } |
| 3375 } | 3375 } |
| 3376 | 3376 |
| 3377 abstract class _UnlinkedImportMixin implements idl.UnlinkedImport { | 3377 abstract class _UnlinkedImportMixin implements idl.UnlinkedImport { |
| 3378 @override | 3378 @override |
| 3379 Map<String, Object> toMap() => { | 3379 Map<String, Object> toMap() => { |
| 3380 "uri": uri, | |
| 3381 "offset": offset, | |
| 3382 "annotations": annotations, | 3380 "annotations": annotations, |
| 3383 "prefixReference": prefixReference, | |
| 3384 "combinators": combinators, | 3381 "combinators": combinators, |
| 3385 "isDeferred": isDeferred, | 3382 "isDeferred": isDeferred, |
| 3386 "isImplicit": isImplicit, | 3383 "isImplicit": isImplicit, |
| 3384 "offset": offset, |
| 3385 "prefixOffset": prefixOffset, |
| 3386 "prefixReference": prefixReference, |
| 3387 "uri": uri, |
| 3388 "uriEnd": uriEnd, |
| 3387 "uriOffset": uriOffset, | 3389 "uriOffset": uriOffset, |
| 3388 "uriEnd": uriEnd, | |
| 3389 "prefixOffset": prefixOffset, | |
| 3390 }; | 3390 }; |
| 3391 } | 3391 } |
| 3392 | 3392 |
| 3393 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { | 3393 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { |
| 3394 bool _finished = false; | 3394 bool _finished = false; |
| 3395 | 3395 |
| 3396 List<UnlinkedConstBuilder> _annotations; |
| 3397 UnlinkedConstBuilder _defaultValue; |
| 3398 int _inferredTypeSlot; |
| 3399 bool _isFunctionTyped; |
| 3400 bool _isInitializingFormal; |
| 3401 idl.UnlinkedParamKind _kind; |
| 3396 String _name; | 3402 String _name; |
| 3397 int _nameOffset; | 3403 int _nameOffset; |
| 3398 List<UnlinkedConstBuilder> _annotations; | 3404 List<UnlinkedParamBuilder> _parameters; |
| 3399 EntityRefBuilder _type; | 3405 EntityRefBuilder _type; |
| 3400 List<UnlinkedParamBuilder> _parameters; | |
| 3401 idl.UnlinkedParamKind _kind; | |
| 3402 bool _isFunctionTyped; | |
| 3403 bool _isInitializingFormal; | |
| 3404 int _inferredTypeSlot; | |
| 3405 UnlinkedConstBuilder _defaultValue; | |
| 3406 | |
| 3407 @override | |
| 3408 String get name => _name ??= ''; | |
| 3409 | |
| 3410 /** | |
| 3411 * Name of the parameter. | |
| 3412 */ | |
| 3413 void set name(String _value) { | |
| 3414 assert(!_finished); | |
| 3415 _name = _value; | |
| 3416 } | |
| 3417 | |
| 3418 @override | |
| 3419 int get nameOffset => _nameOffset ??= 0; | |
| 3420 | |
| 3421 /** | |
| 3422 * Offset of the parameter name relative to the beginning of the file. | |
| 3423 */ | |
| 3424 void set nameOffset(int _value) { | |
| 3425 assert(!_finished); | |
| 3426 assert(_value == null || _value >= 0); | |
| 3427 _nameOffset = _value; | |
| 3428 } | |
| 3429 | 3406 |
| 3430 @override | 3407 @override |
| 3431 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3408 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 3432 | 3409 |
| 3433 /** | 3410 /** |
| 3434 * Annotations for this parameter. | 3411 * Annotations for this parameter. |
| 3435 */ | 3412 */ |
| 3436 void set annotations(List<UnlinkedConstBuilder> _value) { | 3413 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 3437 assert(!_finished); | 3414 assert(!_finished); |
| 3438 _annotations = _value; | 3415 _annotations = _value; |
| 3439 } | 3416 } |
| 3440 | 3417 |
| 3441 @override | 3418 @override |
| 3442 EntityRefBuilder get type => _type; | 3419 UnlinkedConstBuilder get defaultValue => _defaultValue; |
| 3443 | 3420 |
| 3444 /** | 3421 /** |
| 3445 * If [isFunctionTyped] is `true`, the declared return type. If | 3422 * If the parameter has a default value, the constant expression in the |
| 3446 * [isFunctionTyped] is `false`, the declared type. Absent if the type is | 3423 * default value. Note that the presence of this expression does not mean |
| 3447 * implicit. | 3424 * that it is a valid, check [UnlinkedConst.isInvalid]. |
| 3448 */ | 3425 */ |
| 3449 void set type(EntityRefBuilder _value) { | 3426 void set defaultValue(UnlinkedConstBuilder _value) { |
| 3450 assert(!_finished); | 3427 assert(!_finished); |
| 3451 _type = _value; | 3428 _defaultValue = _value; |
| 3452 } | 3429 } |
| 3453 | 3430 |
| 3454 @override | 3431 @override |
| 3455 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 3432 int get inferredTypeSlot => _inferredTypeSlot ??= 0; |
| 3456 | 3433 |
| 3457 /** | 3434 /** |
| 3458 * If [isFunctionTyped] is `true`, the parameters of the function type. | 3435 * If this parameter's type is inferable, nonzero slot id identifying which |
| 3436 * entry in [LinkedLibrary.types] contains the inferred type. If there is no |
| 3437 * matching entry in [LinkedLibrary.types], then no type was inferred for |
| 3438 * this variable, so its static type is `dynamic`. |
| 3439 * |
| 3440 * Note that although strong mode considers initializing formals to be |
| 3441 * inferable, they are not marked as such in the summary; if their type is |
| 3442 * not specified, they always inherit the static type of the corresponding |
| 3443 * field. |
| 3459 */ | 3444 */ |
| 3460 void set parameters(List<UnlinkedParamBuilder> _value) { | 3445 void set inferredTypeSlot(int _value) { |
| 3461 assert(!_finished); | 3446 assert(!_finished); |
| 3462 _parameters = _value; | 3447 assert(_value == null || _value >= 0); |
| 3448 _inferredTypeSlot = _value; |
| 3463 } | 3449 } |
| 3464 | 3450 |
| 3465 @override | 3451 @override |
| 3452 bool get isFunctionTyped => _isFunctionTyped ??= false; |
| 3453 |
| 3454 /** |
| 3455 * Indicates whether this is a function-typed parameter. |
| 3456 */ |
| 3457 void set isFunctionTyped(bool _value) { |
| 3458 assert(!_finished); |
| 3459 _isFunctionTyped = _value; |
| 3460 } |
| 3461 |
| 3462 @override |
| 3463 bool get isInitializingFormal => _isInitializingFormal ??= false; |
| 3464 |
| 3465 /** |
| 3466 * Indicates whether this is an initializing formal parameter (i.e. it is |
| 3467 * declared using `this.` syntax). |
| 3468 */ |
| 3469 void set isInitializingFormal(bool _value) { |
| 3470 assert(!_finished); |
| 3471 _isInitializingFormal = _value; |
| 3472 } |
| 3473 |
| 3474 @override |
| 3466 idl.UnlinkedParamKind get kind => _kind ??= idl.UnlinkedParamKind.required; | 3475 idl.UnlinkedParamKind get kind => _kind ??= idl.UnlinkedParamKind.required; |
| 3467 | 3476 |
| 3468 /** | 3477 /** |
| 3469 * Kind of the parameter. | 3478 * Kind of the parameter. |
| 3470 */ | 3479 */ |
| 3471 void set kind(idl.UnlinkedParamKind _value) { | 3480 void set kind(idl.UnlinkedParamKind _value) { |
| 3472 assert(!_finished); | 3481 assert(!_finished); |
| 3473 _kind = _value; | 3482 _kind = _value; |
| 3474 } | 3483 } |
| 3475 | 3484 |
| 3476 @override | 3485 @override |
| 3477 bool get isFunctionTyped => _isFunctionTyped ??= false; | 3486 String get name => _name ??= ''; |
| 3478 | 3487 |
| 3479 /** | 3488 /** |
| 3480 * Indicates whether this is a function-typed parameter. | 3489 * Name of the parameter. |
| 3481 */ | 3490 */ |
| 3482 void set isFunctionTyped(bool _value) { | 3491 void set name(String _value) { |
| 3483 assert(!_finished); | 3492 assert(!_finished); |
| 3484 _isFunctionTyped = _value; | 3493 _name = _value; |
| 3485 } | 3494 } |
| 3486 | 3495 |
| 3487 @override | 3496 @override |
| 3488 bool get isInitializingFormal => _isInitializingFormal ??= false; | 3497 int get nameOffset => _nameOffset ??= 0; |
| 3489 | 3498 |
| 3490 /** | 3499 /** |
| 3491 * Indicates whether this is an initializing formal parameter (i.e. it is | 3500 * Offset of the parameter name relative to the beginning of the file. |
| 3492 * declared using `this.` syntax). | |
| 3493 */ | 3501 */ |
| 3494 void set isInitializingFormal(bool _value) { | 3502 void set nameOffset(int _value) { |
| 3495 assert(!_finished); | 3503 assert(!_finished); |
| 3496 _isInitializingFormal = _value; | 3504 assert(_value == null || _value >= 0); |
| 3505 _nameOffset = _value; |
| 3497 } | 3506 } |
| 3498 | 3507 |
| 3499 @override | 3508 @override |
| 3500 int get inferredTypeSlot => _inferredTypeSlot ??= 0; | 3509 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; |
| 3501 | 3510 |
| 3502 /** | 3511 /** |
| 3503 * If this parameter's type is inferable, nonzero slot id identifying which | 3512 * If [isFunctionTyped] is `true`, the parameters of the function type. |
| 3504 * entry in [LinkedLibrary.types] contains the inferred type. If there is no | |
| 3505 * matching entry in [LinkedLibrary.types], then no type was inferred for | |
| 3506 * this variable, so its static type is `dynamic`. | |
| 3507 * | |
| 3508 * Note that although strong mode considers initializing formals to be | |
| 3509 * inferable, they are not marked as such in the summary; if their type is | |
| 3510 * not specified, they always inherit the static type of the corresponding | |
| 3511 * field. | |
| 3512 */ | 3513 */ |
| 3513 void set inferredTypeSlot(int _value) { | 3514 void set parameters(List<UnlinkedParamBuilder> _value) { |
| 3514 assert(!_finished); | 3515 assert(!_finished); |
| 3515 assert(_value == null || _value >= 0); | 3516 _parameters = _value; |
| 3516 _inferredTypeSlot = _value; | |
| 3517 } | 3517 } |
| 3518 | 3518 |
| 3519 @override | 3519 @override |
| 3520 UnlinkedConstBuilder get defaultValue => _defaultValue; | 3520 EntityRefBuilder get type => _type; |
| 3521 | 3521 |
| 3522 /** | 3522 /** |
| 3523 * If the parameter has a default value, the constant expression in the | 3523 * If [isFunctionTyped] is `true`, the declared return type. If |
| 3524 * default value. Note that the presence of this expression does not mean | 3524 * [isFunctionTyped] is `false`, the declared type. Absent if the type is |
| 3525 * that it is a valid, check [UnlinkedConst.isInvalid]. | 3525 * implicit. |
| 3526 */ | 3526 */ |
| 3527 void set defaultValue(UnlinkedConstBuilder _value) { | 3527 void set type(EntityRefBuilder _value) { |
| 3528 assert(!_finished); | 3528 assert(!_finished); |
| 3529 _defaultValue = _value; | 3529 _type = _value; |
| 3530 } | 3530 } |
| 3531 | 3531 |
| 3532 UnlinkedParamBuilder({String name, int nameOffset, List<UnlinkedConstBuilder>
annotations, EntityRefBuilder type, List<UnlinkedParamBuilder> parameters, idl.U
nlinkedParamKind kind, bool isFunctionTyped, bool isInitializingFormal, int infe
rredTypeSlot, UnlinkedConstBuilder defaultValue}) | 3532 UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBui
lder defaultValue, int inferredTypeSlot, bool isFunctionTyped, bool isInitializi
ngFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<Unlinked
ParamBuilder> parameters, EntityRefBuilder type}) |
| 3533 : _name = name, | 3533 : _annotations = annotations, |
| 3534 _nameOffset = nameOffset, | 3534 _defaultValue = defaultValue, |
| 3535 _annotations = annotations, | 3535 _inferredTypeSlot = inferredTypeSlot, |
| 3536 _type = type, | |
| 3537 _parameters = parameters, | |
| 3538 _kind = kind, | |
| 3539 _isFunctionTyped = isFunctionTyped, | 3536 _isFunctionTyped = isFunctionTyped, |
| 3540 _isInitializingFormal = isInitializingFormal, | 3537 _isInitializingFormal = isInitializingFormal, |
| 3541 _inferredTypeSlot = inferredTypeSlot, | 3538 _kind = kind, |
| 3542 _defaultValue = defaultValue; | 3539 _name = name, |
| 3540 _nameOffset = nameOffset, |
| 3541 _parameters = parameters, |
| 3542 _type = type; |
| 3543 | 3543 |
| 3544 fb.Offset finish(fb.Builder fbBuilder) { | 3544 fb.Offset finish(fb.Builder fbBuilder) { |
| 3545 assert(!_finished); | 3545 assert(!_finished); |
| 3546 _finished = true; | 3546 _finished = true; |
| 3547 fb.Offset offset_annotations; |
| 3548 fb.Offset offset_defaultValue; |
| 3547 fb.Offset offset_name; | 3549 fb.Offset offset_name; |
| 3548 fb.Offset offset_annotations; | 3550 fb.Offset offset_parameters; |
| 3549 fb.Offset offset_type; | 3551 fb.Offset offset_type; |
| 3550 fb.Offset offset_parameters; | 3552 if (!(_annotations == null || _annotations.isEmpty)) { |
| 3551 fb.Offset offset_defaultValue; | 3553 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 3554 } |
| 3555 if (_defaultValue != null) { |
| 3556 offset_defaultValue = _defaultValue.finish(fbBuilder); |
| 3557 } |
| 3552 if (_name != null) { | 3558 if (_name != null) { |
| 3553 offset_name = fbBuilder.writeString(_name); | 3559 offset_name = fbBuilder.writeString(_name); |
| 3554 } | 3560 } |
| 3555 if (!(_annotations == null || _annotations.isEmpty)) { | 3561 if (!(_parameters == null || _parameters.isEmpty)) { |
| 3556 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 3562 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); |
| 3557 } | 3563 } |
| 3558 if (_type != null) { | 3564 if (_type != null) { |
| 3559 offset_type = _type.finish(fbBuilder); | 3565 offset_type = _type.finish(fbBuilder); |
| 3560 } | 3566 } |
| 3561 if (!(_parameters == null || _parameters.isEmpty)) { | 3567 fbBuilder.startTable(); |
| 3562 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 3568 if (offset_annotations != null) { |
| 3569 fbBuilder.addOffset(0, offset_annotations); |
| 3563 } | 3570 } |
| 3564 if (_defaultValue != null) { | 3571 if (offset_defaultValue != null) { |
| 3565 offset_defaultValue = _defaultValue.finish(fbBuilder); | 3572 fbBuilder.addOffset(1, offset_defaultValue); |
| 3566 } | 3573 } |
| 3567 fbBuilder.startTable(); | 3574 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
| 3568 if (offset_name != null) { | 3575 fbBuilder.addUint32(2, _inferredTypeSlot); |
| 3569 fbBuilder.addOffset(0, offset_name); | |
| 3570 } | 3576 } |
| 3571 if (_nameOffset != null && _nameOffset != 0) { | 3577 if (_isFunctionTyped == true) { |
| 3572 fbBuilder.addUint32(1, _nameOffset); | 3578 fbBuilder.addBool(3, true); |
| 3573 } | 3579 } |
| 3574 if (offset_annotations != null) { | 3580 if (_isInitializingFormal == true) { |
| 3575 fbBuilder.addOffset(2, offset_annotations); | 3581 fbBuilder.addBool(4, true); |
| 3576 } | |
| 3577 if (offset_type != null) { | |
| 3578 fbBuilder.addOffset(3, offset_type); | |
| 3579 } | |
| 3580 if (offset_parameters != null) { | |
| 3581 fbBuilder.addOffset(4, offset_parameters); | |
| 3582 } | 3582 } |
| 3583 if (_kind != null && _kind != idl.UnlinkedParamKind.required) { | 3583 if (_kind != null && _kind != idl.UnlinkedParamKind.required) { |
| 3584 fbBuilder.addUint32(5, _kind.index); | 3584 fbBuilder.addUint32(5, _kind.index); |
| 3585 } | 3585 } |
| 3586 if (_isFunctionTyped == true) { | 3586 if (offset_name != null) { |
| 3587 fbBuilder.addBool(6, true); | 3587 fbBuilder.addOffset(6, offset_name); |
| 3588 } | 3588 } |
| 3589 if (_isInitializingFormal == true) { | 3589 if (_nameOffset != null && _nameOffset != 0) { |
| 3590 fbBuilder.addBool(7, true); | 3590 fbBuilder.addUint32(7, _nameOffset); |
| 3591 } | 3591 } |
| 3592 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | 3592 if (offset_parameters != null) { |
| 3593 fbBuilder.addUint32(8, _inferredTypeSlot); | 3593 fbBuilder.addOffset(8, offset_parameters); |
| 3594 } | 3594 } |
| 3595 if (offset_defaultValue != null) { | 3595 if (offset_type != null) { |
| 3596 fbBuilder.addOffset(9, offset_defaultValue); | 3596 fbBuilder.addOffset(9, offset_type); |
| 3597 } | 3597 } |
| 3598 return fbBuilder.endTable(); | 3598 return fbBuilder.endTable(); |
| 3599 } | 3599 } |
| 3600 } | 3600 } |
| 3601 | 3601 |
| 3602 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { | 3602 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { |
| 3603 const _UnlinkedParamReader(); | 3603 const _UnlinkedParamReader(); |
| 3604 | 3604 |
| 3605 @override | 3605 @override |
| 3606 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); | 3606 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); |
| 3607 } | 3607 } |
| 3608 | 3608 |
| 3609 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { | 3609 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { |
| 3610 final fb.BufferPointer _bp; | 3610 final fb.BufferPointer _bp; |
| 3611 | 3611 |
| 3612 _UnlinkedParamImpl(this._bp); | 3612 _UnlinkedParamImpl(this._bp); |
| 3613 | 3613 |
| 3614 List<idl.UnlinkedConst> _annotations; |
| 3615 idl.UnlinkedConst _defaultValue; |
| 3616 int _inferredTypeSlot; |
| 3617 bool _isFunctionTyped; |
| 3618 bool _isInitializingFormal; |
| 3619 idl.UnlinkedParamKind _kind; |
| 3614 String _name; | 3620 String _name; |
| 3615 int _nameOffset; | 3621 int _nameOffset; |
| 3616 List<idl.UnlinkedConst> _annotations; | 3622 List<idl.UnlinkedParam> _parameters; |
| 3617 idl.EntityRef _type; | 3623 idl.EntityRef _type; |
| 3618 List<idl.UnlinkedParam> _parameters; | |
| 3619 idl.UnlinkedParamKind _kind; | |
| 3620 bool _isFunctionTyped; | |
| 3621 bool _isInitializingFormal; | |
| 3622 int _inferredTypeSlot; | |
| 3623 idl.UnlinkedConst _defaultValue; | |
| 3624 | |
| 3625 @override | |
| 3626 String get name { | |
| 3627 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | |
| 3628 return _name; | |
| 3629 } | |
| 3630 | |
| 3631 @override | |
| 3632 int get nameOffset { | |
| 3633 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | |
| 3634 return _nameOffset; | |
| 3635 } | |
| 3636 | 3624 |
| 3637 @override | 3625 @override |
| 3638 List<idl.UnlinkedConst> get annotations { | 3626 List<idl.UnlinkedConst> get annotations { |
| 3639 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 2, const <idl.UnlinkedConst>[]); | 3627 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 3640 return _annotations; | 3628 return _annotations; |
| 3641 } | 3629 } |
| 3642 | 3630 |
| 3643 @override | 3631 @override |
| 3644 idl.EntityRef get type { | 3632 idl.UnlinkedConst get defaultValue { |
| 3645 _type ??= const _EntityRefReader().vTableGet(_bp, 3, null); | 3633 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 1, null); |
| 3646 return _type; | 3634 return _defaultValue; |
| 3647 } | 3635 } |
| 3648 | 3636 |
| 3649 @override | 3637 @override |
| 3650 List<idl.UnlinkedParam> get parameters { | 3638 int get inferredTypeSlot { |
| 3651 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bp, 4, const <idl.UnlinkedParam>[]); | 3639 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
| 3652 return _parameters; | 3640 return _inferredTypeSlot; |
| 3653 } | 3641 } |
| 3654 | 3642 |
| 3655 @override | 3643 @override |
| 3644 bool get isFunctionTyped { |
| 3645 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bp, 3, false); |
| 3646 return _isFunctionTyped; |
| 3647 } |
| 3648 |
| 3649 @override |
| 3650 bool get isInitializingFormal { |
| 3651 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bp, 4, false); |
| 3652 return _isInitializingFormal; |
| 3653 } |
| 3654 |
| 3655 @override |
| 3656 idl.UnlinkedParamKind get kind { | 3656 idl.UnlinkedParamKind get kind { |
| 3657 _kind ??= const _UnlinkedParamKindReader().vTableGet(_bp, 5, idl.UnlinkedPar
amKind.required); | 3657 _kind ??= const _UnlinkedParamKindReader().vTableGet(_bp, 5, idl.UnlinkedPar
amKind.required); |
| 3658 return _kind; | 3658 return _kind; |
| 3659 } | 3659 } |
| 3660 | 3660 |
| 3661 @override | 3661 @override |
| 3662 bool get isFunctionTyped { | 3662 String get name { |
| 3663 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bp, 6, false); | 3663 _name ??= const fb.StringReader().vTableGet(_bp, 6, ''); |
| 3664 return _isFunctionTyped; | 3664 return _name; |
| 3665 } | 3665 } |
| 3666 | 3666 |
| 3667 @override | 3667 @override |
| 3668 bool get isInitializingFormal { | 3668 int get nameOffset { |
| 3669 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bp, 7, false); | 3669 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0); |
| 3670 return _isInitializingFormal; | 3670 return _nameOffset; |
| 3671 } | 3671 } |
| 3672 | 3672 |
| 3673 @override | 3673 @override |
| 3674 int get inferredTypeSlot { | 3674 List<idl.UnlinkedParam> get parameters { |
| 3675 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0); | 3675 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bp, 8, const <idl.UnlinkedParam>[]); |
| 3676 return _inferredTypeSlot; | 3676 return _parameters; |
| 3677 } | 3677 } |
| 3678 | 3678 |
| 3679 @override | 3679 @override |
| 3680 idl.UnlinkedConst get defaultValue { | 3680 idl.EntityRef get type { |
| 3681 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 9, null); | 3681 _type ??= const _EntityRefReader().vTableGet(_bp, 9, null); |
| 3682 return _defaultValue; | 3682 return _type; |
| 3683 } | 3683 } |
| 3684 } | 3684 } |
| 3685 | 3685 |
| 3686 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { | 3686 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { |
| 3687 @override | 3687 @override |
| 3688 Map<String, Object> toMap() => { | 3688 Map<String, Object> toMap() => { |
| 3689 "annotations": annotations, |
| 3690 "defaultValue": defaultValue, |
| 3691 "inferredTypeSlot": inferredTypeSlot, |
| 3692 "isFunctionTyped": isFunctionTyped, |
| 3693 "isInitializingFormal": isInitializingFormal, |
| 3694 "kind": kind, |
| 3689 "name": name, | 3695 "name": name, |
| 3690 "nameOffset": nameOffset, | 3696 "nameOffset": nameOffset, |
| 3691 "annotations": annotations, | 3697 "parameters": parameters, |
| 3692 "type": type, | 3698 "type": type, |
| 3693 "parameters": parameters, | |
| 3694 "kind": kind, | |
| 3695 "isFunctionTyped": isFunctionTyped, | |
| 3696 "isInitializingFormal": isInitializingFormal, | |
| 3697 "inferredTypeSlot": inferredTypeSlot, | |
| 3698 "defaultValue": defaultValue, | |
| 3699 }; | 3699 }; |
| 3700 } | 3700 } |
| 3701 | 3701 |
| 3702 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl.
UnlinkedPart { | 3702 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl.
UnlinkedPart { |
| 3703 bool _finished = false; | 3703 bool _finished = false; |
| 3704 | 3704 |
| 3705 List<UnlinkedConstBuilder> _annotations; |
| 3706 int _uriEnd; |
| 3705 int _uriOffset; | 3707 int _uriOffset; |
| 3706 int _uriEnd; | |
| 3707 List<UnlinkedConstBuilder> _annotations; | |
| 3708 | 3708 |
| 3709 @override | 3709 @override |
| 3710 int get uriOffset => _uriOffset ??= 0; | 3710 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 3711 | 3711 |
| 3712 /** | 3712 /** |
| 3713 * Offset of the URI string (including quotes) relative to the beginning of | 3713 * Annotations for this part declaration. |
| 3714 * the file. | |
| 3715 */ | 3714 */ |
| 3716 void set uriOffset(int _value) { | 3715 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 3717 assert(!_finished); | 3716 assert(!_finished); |
| 3718 assert(_value == null || _value >= 0); | 3717 _annotations = _value; |
| 3719 _uriOffset = _value; | |
| 3720 } | 3718 } |
| 3721 | 3719 |
| 3722 @override | 3720 @override |
| 3723 int get uriEnd => _uriEnd ??= 0; | 3721 int get uriEnd => _uriEnd ??= 0; |
| 3724 | 3722 |
| 3725 /** | 3723 /** |
| 3726 * End of the URI string (including quotes) relative to the beginning of the | 3724 * End of the URI string (including quotes) relative to the beginning of the |
| 3727 * file. | 3725 * file. |
| 3728 */ | 3726 */ |
| 3729 void set uriEnd(int _value) { | 3727 void set uriEnd(int _value) { |
| 3730 assert(!_finished); | 3728 assert(!_finished); |
| 3731 assert(_value == null || _value >= 0); | 3729 assert(_value == null || _value >= 0); |
| 3732 _uriEnd = _value; | 3730 _uriEnd = _value; |
| 3733 } | 3731 } |
| 3734 | 3732 |
| 3735 @override | 3733 @override |
| 3736 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3734 int get uriOffset => _uriOffset ??= 0; |
| 3737 | 3735 |
| 3738 /** | 3736 /** |
| 3739 * Annotations for this part declaration. | 3737 * Offset of the URI string (including quotes) relative to the beginning of |
| 3738 * the file. |
| 3740 */ | 3739 */ |
| 3741 void set annotations(List<UnlinkedConstBuilder> _value) { | 3740 void set uriOffset(int _value) { |
| 3742 assert(!_finished); | 3741 assert(!_finished); |
| 3743 _annotations = _value; | 3742 assert(_value == null || _value >= 0); |
| 3743 _uriOffset = _value; |
| 3744 } | 3744 } |
| 3745 | 3745 |
| 3746 UnlinkedPartBuilder({int uriOffset, int uriEnd, List<UnlinkedConstBuilder> ann
otations}) | 3746 UnlinkedPartBuilder({List<UnlinkedConstBuilder> annotations, int uriEnd, int u
riOffset}) |
| 3747 : _uriOffset = uriOffset, | 3747 : _annotations = annotations, |
| 3748 _uriEnd = uriEnd, | 3748 _uriEnd = uriEnd, |
| 3749 _annotations = annotations; | 3749 _uriOffset = uriOffset; |
| 3750 | 3750 |
| 3751 fb.Offset finish(fb.Builder fbBuilder) { | 3751 fb.Offset finish(fb.Builder fbBuilder) { |
| 3752 assert(!_finished); | 3752 assert(!_finished); |
| 3753 _finished = true; | 3753 _finished = true; |
| 3754 fb.Offset offset_annotations; | 3754 fb.Offset offset_annotations; |
| 3755 if (!(_annotations == null || _annotations.isEmpty)) { | 3755 if (!(_annotations == null || _annotations.isEmpty)) { |
| 3756 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 3756 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 3757 } | 3757 } |
| 3758 fbBuilder.startTable(); | 3758 fbBuilder.startTable(); |
| 3759 if (_uriOffset != null && _uriOffset != 0) { | 3759 if (offset_annotations != null) { |
| 3760 fbBuilder.addUint32(0, _uriOffset); | 3760 fbBuilder.addOffset(0, offset_annotations); |
| 3761 } | 3761 } |
| 3762 if (_uriEnd != null && _uriEnd != 0) { | 3762 if (_uriEnd != null && _uriEnd != 0) { |
| 3763 fbBuilder.addUint32(1, _uriEnd); | 3763 fbBuilder.addUint32(1, _uriEnd); |
| 3764 } | 3764 } |
| 3765 if (offset_annotations != null) { | 3765 if (_uriOffset != null && _uriOffset != 0) { |
| 3766 fbBuilder.addOffset(2, offset_annotations); | 3766 fbBuilder.addUint32(2, _uriOffset); |
| 3767 } | 3767 } |
| 3768 return fbBuilder.endTable(); | 3768 return fbBuilder.endTable(); |
| 3769 } | 3769 } |
| 3770 } | 3770 } |
| 3771 | 3771 |
| 3772 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> { | 3772 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> { |
| 3773 const _UnlinkedPartReader(); | 3773 const _UnlinkedPartReader(); |
| 3774 | 3774 |
| 3775 @override | 3775 @override |
| 3776 _UnlinkedPartImpl createObject(fb.BufferPointer bp) => new _UnlinkedPartImpl(b
p); | 3776 _UnlinkedPartImpl createObject(fb.BufferPointer bp) => new _UnlinkedPartImpl(b
p); |
| 3777 } | 3777 } |
| 3778 | 3778 |
| 3779 class _UnlinkedPartImpl extends Object with _UnlinkedPartMixin implements idl.Un
linkedPart { | 3779 class _UnlinkedPartImpl extends Object with _UnlinkedPartMixin implements idl.Un
linkedPart { |
| 3780 final fb.BufferPointer _bp; | 3780 final fb.BufferPointer _bp; |
| 3781 | 3781 |
| 3782 _UnlinkedPartImpl(this._bp); | 3782 _UnlinkedPartImpl(this._bp); |
| 3783 | 3783 |
| 3784 List<idl.UnlinkedConst> _annotations; |
| 3785 int _uriEnd; |
| 3784 int _uriOffset; | 3786 int _uriOffset; |
| 3785 int _uriEnd; | |
| 3786 List<idl.UnlinkedConst> _annotations; | |
| 3787 | 3787 |
| 3788 @override | 3788 @override |
| 3789 int get uriOffset { | 3789 List<idl.UnlinkedConst> get annotations { |
| 3790 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); | 3790 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 3791 return _uriOffset; | 3791 return _annotations; |
| 3792 } | 3792 } |
| 3793 | 3793 |
| 3794 @override | 3794 @override |
| 3795 int get uriEnd { | 3795 int get uriEnd { |
| 3796 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 3796 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 3797 return _uriEnd; | 3797 return _uriEnd; |
| 3798 } | 3798 } |
| 3799 | 3799 |
| 3800 @override | 3800 @override |
| 3801 List<idl.UnlinkedConst> get annotations { | 3801 int get uriOffset { |
| 3802 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 2, const <idl.UnlinkedConst>[]); | 3802 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
| 3803 return _annotations; | 3803 return _uriOffset; |
| 3804 } | 3804 } |
| 3805 } | 3805 } |
| 3806 | 3806 |
| 3807 abstract class _UnlinkedPartMixin implements idl.UnlinkedPart { | 3807 abstract class _UnlinkedPartMixin implements idl.UnlinkedPart { |
| 3808 @override | 3808 @override |
| 3809 Map<String, Object> toMap() => { | 3809 Map<String, Object> toMap() => { |
| 3810 "annotations": annotations, |
| 3811 "uriEnd": uriEnd, |
| 3810 "uriOffset": uriOffset, | 3812 "uriOffset": uriOffset, |
| 3811 "uriEnd": uriEnd, | |
| 3812 "annotations": annotations, | |
| 3813 }; | 3813 }; |
| 3814 } | 3814 } |
| 3815 | 3815 |
| 3816 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp
lements idl.UnlinkedPublicName { | 3816 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp
lements idl.UnlinkedPublicName { |
| 3817 bool _finished = false; | 3817 bool _finished = false; |
| 3818 | 3818 |
| 3819 List<UnlinkedPublicNameBuilder> _constMembers; |
| 3820 idl.ReferenceKind _kind; |
| 3819 String _name; | 3821 String _name; |
| 3820 idl.ReferenceKind _kind; | |
| 3821 int _numTypeParameters; | 3822 int _numTypeParameters; |
| 3822 List<UnlinkedPublicNameBuilder> _constMembers; | |
| 3823 | 3823 |
| 3824 @override | 3824 @override |
| 3825 String get name => _name ??= ''; | 3825 List<UnlinkedPublicNameBuilder> get constMembers => _constMembers ??= <Unlinke
dPublicNameBuilder>[]; |
| 3826 | 3826 |
| 3827 /** | 3827 /** |
| 3828 * The name itself. | 3828 * If this [UnlinkedPublicName] is a class, the list of members which can be |
| 3829 * referenced from constants - static constant fields, static methods, and |
| 3830 * constructors. Otherwise empty. |
| 3829 */ | 3831 */ |
| 3830 void set name(String _value) { | 3832 void set constMembers(List<UnlinkedPublicNameBuilder> _value) { |
| 3831 assert(!_finished); | 3833 assert(!_finished); |
| 3832 _name = _value; | 3834 _constMembers = _value; |
| 3833 } | 3835 } |
| 3834 | 3836 |
| 3835 @override | 3837 @override |
| 3836 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; | 3838 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; |
| 3837 | 3839 |
| 3838 /** | 3840 /** |
| 3839 * The kind of object referred to by the name. | 3841 * The kind of object referred to by the name. |
| 3840 */ | 3842 */ |
| 3841 void set kind(idl.ReferenceKind _value) { | 3843 void set kind(idl.ReferenceKind _value) { |
| 3842 assert(!_finished); | 3844 assert(!_finished); |
| 3843 _kind = _value; | 3845 _kind = _value; |
| 3844 } | 3846 } |
| 3845 | 3847 |
| 3846 @override | 3848 @override |
| 3849 String get name => _name ??= ''; |
| 3850 |
| 3851 /** |
| 3852 * The name itself. |
| 3853 */ |
| 3854 void set name(String _value) { |
| 3855 assert(!_finished); |
| 3856 _name = _value; |
| 3857 } |
| 3858 |
| 3859 @override |
| 3847 int get numTypeParameters => _numTypeParameters ??= 0; | 3860 int get numTypeParameters => _numTypeParameters ??= 0; |
| 3848 | 3861 |
| 3849 /** | 3862 /** |
| 3850 * If the entity being referred to is generic, the number of type parameters | 3863 * If the entity being referred to is generic, the number of type parameters |
| 3851 * it accepts. Otherwise zero. | 3864 * it accepts. Otherwise zero. |
| 3852 */ | 3865 */ |
| 3853 void set numTypeParameters(int _value) { | 3866 void set numTypeParameters(int _value) { |
| 3854 assert(!_finished); | 3867 assert(!_finished); |
| 3855 assert(_value == null || _value >= 0); | 3868 assert(_value == null || _value >= 0); |
| 3856 _numTypeParameters = _value; | 3869 _numTypeParameters = _value; |
| 3857 } | 3870 } |
| 3858 | 3871 |
| 3859 @override | 3872 UnlinkedPublicNameBuilder({List<UnlinkedPublicNameBuilder> constMembers, idl.R
eferenceKind kind, String name, int numTypeParameters}) |
| 3860 List<UnlinkedPublicNameBuilder> get constMembers => _constMembers ??= <Unlinke
dPublicNameBuilder>[]; | 3873 : _constMembers = constMembers, |
| 3861 | |
| 3862 /** | |
| 3863 * If this [UnlinkedPublicName] is a class, the list of members which can be | |
| 3864 * referenced from constants - static constant fields, static methods, and | |
| 3865 * constructors. Otherwise empty. | |
| 3866 */ | |
| 3867 void set constMembers(List<UnlinkedPublicNameBuilder> _value) { | |
| 3868 assert(!_finished); | |
| 3869 _constMembers = _value; | |
| 3870 } | |
| 3871 | |
| 3872 UnlinkedPublicNameBuilder({String name, idl.ReferenceKind kind, int numTypePar
ameters, List<UnlinkedPublicNameBuilder> constMembers}) | |
| 3873 : _name = name, | |
| 3874 _kind = kind, | 3874 _kind = kind, |
| 3875 _numTypeParameters = numTypeParameters, | 3875 _name = name, |
| 3876 _constMembers = constMembers; | 3876 _numTypeParameters = numTypeParameters; |
| 3877 | 3877 |
| 3878 fb.Offset finish(fb.Builder fbBuilder) { | 3878 fb.Offset finish(fb.Builder fbBuilder) { |
| 3879 assert(!_finished); | 3879 assert(!_finished); |
| 3880 _finished = true; | 3880 _finished = true; |
| 3881 fb.Offset offset_constMembers; |
| 3881 fb.Offset offset_name; | 3882 fb.Offset offset_name; |
| 3882 fb.Offset offset_constMembers; | 3883 if (!(_constMembers == null || _constMembers.isEmpty)) { |
| 3884 offset_constMembers = fbBuilder.writeList(_constMembers.map((b) => b.finis
h(fbBuilder)).toList()); |
| 3885 } |
| 3883 if (_name != null) { | 3886 if (_name != null) { |
| 3884 offset_name = fbBuilder.writeString(_name); | 3887 offset_name = fbBuilder.writeString(_name); |
| 3885 } | 3888 } |
| 3886 if (!(_constMembers == null || _constMembers.isEmpty)) { | |
| 3887 offset_constMembers = fbBuilder.writeList(_constMembers.map((b) => b.finis
h(fbBuilder)).toList()); | |
| 3888 } | |
| 3889 fbBuilder.startTable(); | 3889 fbBuilder.startTable(); |
| 3890 if (offset_name != null) { | 3890 if (offset_constMembers != null) { |
| 3891 fbBuilder.addOffset(0, offset_name); | 3891 fbBuilder.addOffset(0, offset_constMembers); |
| 3892 } | 3892 } |
| 3893 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { | 3893 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { |
| 3894 fbBuilder.addUint32(1, _kind.index); | 3894 fbBuilder.addUint32(1, _kind.index); |
| 3895 } | 3895 } |
| 3896 if (offset_name != null) { |
| 3897 fbBuilder.addOffset(2, offset_name); |
| 3898 } |
| 3896 if (_numTypeParameters != null && _numTypeParameters != 0) { | 3899 if (_numTypeParameters != null && _numTypeParameters != 0) { |
| 3897 fbBuilder.addUint32(2, _numTypeParameters); | 3900 fbBuilder.addUint32(3, _numTypeParameters); |
| 3898 } | |
| 3899 if (offset_constMembers != null) { | |
| 3900 fbBuilder.addOffset(3, offset_constMembers); | |
| 3901 } | 3901 } |
| 3902 return fbBuilder.endTable(); | 3902 return fbBuilder.endTable(); |
| 3903 } | 3903 } |
| 3904 } | 3904 } |
| 3905 | 3905 |
| 3906 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl>
{ | 3906 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl>
{ |
| 3907 const _UnlinkedPublicNameReader(); | 3907 const _UnlinkedPublicNameReader(); |
| 3908 | 3908 |
| 3909 @override | 3909 @override |
| 3910 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl
icNameImpl(bp); | 3910 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl
icNameImpl(bp); |
| 3911 } | 3911 } |
| 3912 | 3912 |
| 3913 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple
ments idl.UnlinkedPublicName { | 3913 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple
ments idl.UnlinkedPublicName { |
| 3914 final fb.BufferPointer _bp; | 3914 final fb.BufferPointer _bp; |
| 3915 | 3915 |
| 3916 _UnlinkedPublicNameImpl(this._bp); | 3916 _UnlinkedPublicNameImpl(this._bp); |
| 3917 | 3917 |
| 3918 List<idl.UnlinkedPublicName> _constMembers; |
| 3919 idl.ReferenceKind _kind; |
| 3918 String _name; | 3920 String _name; |
| 3919 idl.ReferenceKind _kind; | |
| 3920 int _numTypeParameters; | 3921 int _numTypeParameters; |
| 3921 List<idl.UnlinkedPublicName> _constMembers; | |
| 3922 | 3922 |
| 3923 @override | 3923 @override |
| 3924 String get name { | 3924 List<idl.UnlinkedPublicName> get constMembers { |
| 3925 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 3925 _constMembers ??= const fb.ListReader<idl.UnlinkedPublicName>(const _Unlinke
dPublicNameReader()).vTableGet(_bp, 0, const <idl.UnlinkedPublicName>[]); |
| 3926 return _name; | 3926 return _constMembers; |
| 3927 } | 3927 } |
| 3928 | 3928 |
| 3929 @override | 3929 @override |
| 3930 idl.ReferenceKind get kind { | 3930 idl.ReferenceKind get kind { |
| 3931 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, idl.ReferenceKind.c
lassOrEnum); | 3931 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, idl.ReferenceKind.c
lassOrEnum); |
| 3932 return _kind; | 3932 return _kind; |
| 3933 } | 3933 } |
| 3934 | 3934 |
| 3935 @override | 3935 @override |
| 3936 String get name { |
| 3937 _name ??= const fb.StringReader().vTableGet(_bp, 2, ''); |
| 3938 return _name; |
| 3939 } |
| 3940 |
| 3941 @override |
| 3936 int get numTypeParameters { | 3942 int get numTypeParameters { |
| 3937 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 3943 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 3938 return _numTypeParameters; | 3944 return _numTypeParameters; |
| 3939 } | 3945 } |
| 3940 | |
| 3941 @override | |
| 3942 List<idl.UnlinkedPublicName> get constMembers { | |
| 3943 _constMembers ??= const fb.ListReader<idl.UnlinkedPublicName>(const _Unlinke
dPublicNameReader()).vTableGet(_bp, 3, const <idl.UnlinkedPublicName>[]); | |
| 3944 return _constMembers; | |
| 3945 } | |
| 3946 } | 3946 } |
| 3947 | 3947 |
| 3948 abstract class _UnlinkedPublicNameMixin implements idl.UnlinkedPublicName { | 3948 abstract class _UnlinkedPublicNameMixin implements idl.UnlinkedPublicName { |
| 3949 @override | 3949 @override |
| 3950 Map<String, Object> toMap() => { | 3950 Map<String, Object> toMap() => { |
| 3951 "constMembers": constMembers, |
| 3952 "kind": kind, |
| 3951 "name": name, | 3953 "name": name, |
| 3952 "kind": kind, | |
| 3953 "numTypeParameters": numTypeParameters, | 3954 "numTypeParameters": numTypeParameters, |
| 3954 "constMembers": constMembers, | |
| 3955 }; | 3955 }; |
| 3956 } | 3956 } |
| 3957 | 3957 |
| 3958 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac
eMixin implements idl.UnlinkedPublicNamespace { | 3958 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac
eMixin implements idl.UnlinkedPublicNamespace { |
| 3959 bool _finished = false; | 3959 bool _finished = false; |
| 3960 | 3960 |
| 3961 List<UnlinkedExportPublicBuilder> _exports; |
| 3961 List<UnlinkedPublicNameBuilder> _names; | 3962 List<UnlinkedPublicNameBuilder> _names; |
| 3962 List<UnlinkedExportPublicBuilder> _exports; | |
| 3963 List<String> _parts; | 3963 List<String> _parts; |
| 3964 | 3964 |
| 3965 @override | 3965 @override |
| 3966 List<UnlinkedExportPublicBuilder> get exports => _exports ??= <UnlinkedExportP
ublicBuilder>[]; |
| 3967 |
| 3968 /** |
| 3969 * Export declarations in the compilation unit. |
| 3970 */ |
| 3971 void set exports(List<UnlinkedExportPublicBuilder> _value) { |
| 3972 assert(!_finished); |
| 3973 _exports = _value; |
| 3974 } |
| 3975 |
| 3976 @override |
| 3966 List<UnlinkedPublicNameBuilder> get names => _names ??= <UnlinkedPublicNameBui
lder>[]; | 3977 List<UnlinkedPublicNameBuilder> get names => _names ??= <UnlinkedPublicNameBui
lder>[]; |
| 3967 | 3978 |
| 3968 /** | 3979 /** |
| 3969 * Public names defined in the compilation unit. | 3980 * Public names defined in the compilation unit. |
| 3970 * | 3981 * |
| 3971 * TODO(paulberry): consider sorting these names to reduce unnecessary | 3982 * TODO(paulberry): consider sorting these names to reduce unnecessary |
| 3972 * relinking. | 3983 * relinking. |
| 3973 */ | 3984 */ |
| 3974 void set names(List<UnlinkedPublicNameBuilder> _value) { | 3985 void set names(List<UnlinkedPublicNameBuilder> _value) { |
| 3975 assert(!_finished); | 3986 assert(!_finished); |
| 3976 _names = _value; | 3987 _names = _value; |
| 3977 } | 3988 } |
| 3978 | 3989 |
| 3979 @override | 3990 @override |
| 3980 List<UnlinkedExportPublicBuilder> get exports => _exports ??= <UnlinkedExportP
ublicBuilder>[]; | |
| 3981 | |
| 3982 /** | |
| 3983 * Export declarations in the compilation unit. | |
| 3984 */ | |
| 3985 void set exports(List<UnlinkedExportPublicBuilder> _value) { | |
| 3986 assert(!_finished); | |
| 3987 _exports = _value; | |
| 3988 } | |
| 3989 | |
| 3990 @override | |
| 3991 List<String> get parts => _parts ??= <String>[]; | 3991 List<String> get parts => _parts ??= <String>[]; |
| 3992 | 3992 |
| 3993 /** | 3993 /** |
| 3994 * URIs referenced by part declarations in the compilation unit. | 3994 * URIs referenced by part declarations in the compilation unit. |
| 3995 */ | 3995 */ |
| 3996 void set parts(List<String> _value) { | 3996 void set parts(List<String> _value) { |
| 3997 assert(!_finished); | 3997 assert(!_finished); |
| 3998 _parts = _value; | 3998 _parts = _value; |
| 3999 } | 3999 } |
| 4000 | 4000 |
| 4001 UnlinkedPublicNamespaceBuilder({List<UnlinkedPublicNameBuilder> names, List<Un
linkedExportPublicBuilder> exports, List<String> parts}) | 4001 UnlinkedPublicNamespaceBuilder({List<UnlinkedExportPublicBuilder> exports, Lis
t<UnlinkedPublicNameBuilder> names, List<String> parts}) |
| 4002 : _names = names, | 4002 : _exports = exports, |
| 4003 _exports = exports, | 4003 _names = names, |
| 4004 _parts = parts; | 4004 _parts = parts; |
| 4005 | 4005 |
| 4006 List<int> toBuffer() { | 4006 List<int> toBuffer() { |
| 4007 fb.Builder fbBuilder = new fb.Builder(); | 4007 fb.Builder fbBuilder = new fb.Builder(); |
| 4008 return fbBuilder.finish(finish(fbBuilder)); | 4008 return fbBuilder.finish(finish(fbBuilder)); |
| 4009 } | 4009 } |
| 4010 | 4010 |
| 4011 fb.Offset finish(fb.Builder fbBuilder) { | 4011 fb.Offset finish(fb.Builder fbBuilder) { |
| 4012 assert(!_finished); | 4012 assert(!_finished); |
| 4013 _finished = true; | 4013 _finished = true; |
| 4014 fb.Offset offset_exports; |
| 4014 fb.Offset offset_names; | 4015 fb.Offset offset_names; |
| 4015 fb.Offset offset_exports; | |
| 4016 fb.Offset offset_parts; | 4016 fb.Offset offset_parts; |
| 4017 if (!(_exports == null || _exports.isEmpty)) { |
| 4018 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4019 } |
| 4017 if (!(_names == null || _names.isEmpty)) { | 4020 if (!(_names == null || _names.isEmpty)) { |
| 4018 offset_names = fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)).
toList()); | 4021 offset_names = fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)).
toList()); |
| 4019 } | 4022 } |
| 4020 if (!(_exports == null || _exports.isEmpty)) { | |
| 4021 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); | |
| 4022 } | |
| 4023 if (!(_parts == null || _parts.isEmpty)) { | 4023 if (!(_parts == null || _parts.isEmpty)) { |
| 4024 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); | 4024 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); |
| 4025 } | 4025 } |
| 4026 fbBuilder.startTable(); | 4026 fbBuilder.startTable(); |
| 4027 if (offset_exports != null) { |
| 4028 fbBuilder.addOffset(0, offset_exports); |
| 4029 } |
| 4027 if (offset_names != null) { | 4030 if (offset_names != null) { |
| 4028 fbBuilder.addOffset(0, offset_names); | 4031 fbBuilder.addOffset(1, offset_names); |
| 4029 } | |
| 4030 if (offset_exports != null) { | |
| 4031 fbBuilder.addOffset(1, offset_exports); | |
| 4032 } | 4032 } |
| 4033 if (offset_parts != null) { | 4033 if (offset_parts != null) { |
| 4034 fbBuilder.addOffset(2, offset_parts); | 4034 fbBuilder.addOffset(2, offset_parts); |
| 4035 } | 4035 } |
| 4036 return fbBuilder.endTable(); | 4036 return fbBuilder.endTable(); |
| 4037 } | 4037 } |
| 4038 } | 4038 } |
| 4039 | 4039 |
| 4040 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) { | 4040 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) { |
| 4041 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 4041 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 4042 return const _UnlinkedPublicNamespaceReader().read(rootRef); | 4042 return const _UnlinkedPublicNamespaceReader().read(rootRef); |
| 4043 } | 4043 } |
| 4044 | 4044 |
| 4045 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames
paceImpl> { | 4045 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames
paceImpl> { |
| 4046 const _UnlinkedPublicNamespaceReader(); | 4046 const _UnlinkedPublicNamespaceReader(); |
| 4047 | 4047 |
| 4048 @override | 4048 @override |
| 4049 _UnlinkedPublicNamespaceImpl createObject(fb.BufferPointer bp) => new _Unlinke
dPublicNamespaceImpl(bp); | 4049 _UnlinkedPublicNamespaceImpl createObject(fb.BufferPointer bp) => new _Unlinke
dPublicNamespaceImpl(bp); |
| 4050 } | 4050 } |
| 4051 | 4051 |
| 4052 class _UnlinkedPublicNamespaceImpl extends Object with _UnlinkedPublicNamespaceM
ixin implements idl.UnlinkedPublicNamespace { | 4052 class _UnlinkedPublicNamespaceImpl extends Object with _UnlinkedPublicNamespaceM
ixin implements idl.UnlinkedPublicNamespace { |
| 4053 final fb.BufferPointer _bp; | 4053 final fb.BufferPointer _bp; |
| 4054 | 4054 |
| 4055 _UnlinkedPublicNamespaceImpl(this._bp); | 4055 _UnlinkedPublicNamespaceImpl(this._bp); |
| 4056 | 4056 |
| 4057 List<idl.UnlinkedExportPublic> _exports; |
| 4057 List<idl.UnlinkedPublicName> _names; | 4058 List<idl.UnlinkedPublicName> _names; |
| 4058 List<idl.UnlinkedExportPublic> _exports; | |
| 4059 List<String> _parts; | 4059 List<String> _parts; |
| 4060 | 4060 |
| 4061 @override | 4061 @override |
| 4062 List<idl.UnlinkedExportPublic> get exports { |
| 4063 _exports ??= const fb.ListReader<idl.UnlinkedExportPublic>(const _UnlinkedEx
portPublicReader()).vTableGet(_bp, 0, const <idl.UnlinkedExportPublic>[]); |
| 4064 return _exports; |
| 4065 } |
| 4066 |
| 4067 @override |
| 4062 List<idl.UnlinkedPublicName> get names { | 4068 List<idl.UnlinkedPublicName> get names { |
| 4063 _names ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPublic
NameReader()).vTableGet(_bp, 0, const <idl.UnlinkedPublicName>[]); | 4069 _names ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPublic
NameReader()).vTableGet(_bp, 1, const <idl.UnlinkedPublicName>[]); |
| 4064 return _names; | 4070 return _names; |
| 4065 } | 4071 } |
| 4066 | 4072 |
| 4067 @override | 4073 @override |
| 4068 List<idl.UnlinkedExportPublic> get exports { | |
| 4069 _exports ??= const fb.ListReader<idl.UnlinkedExportPublic>(const _UnlinkedEx
portPublicReader()).vTableGet(_bp, 1, const <idl.UnlinkedExportPublic>[]); | |
| 4070 return _exports; | |
| 4071 } | |
| 4072 | |
| 4073 @override | |
| 4074 List<String> get parts { | 4074 List<String> get parts { |
| 4075 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 2, const <String>[]); | 4075 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
p, 2, const <String>[]); |
| 4076 return _parts; | 4076 return _parts; |
| 4077 } | 4077 } |
| 4078 } | 4078 } |
| 4079 | 4079 |
| 4080 abstract class _UnlinkedPublicNamespaceMixin implements idl.UnlinkedPublicNamesp
ace { | 4080 abstract class _UnlinkedPublicNamespaceMixin implements idl.UnlinkedPublicNamesp
ace { |
| 4081 @override | 4081 @override |
| 4082 Map<String, Object> toMap() => { | 4082 Map<String, Object> toMap() => { |
| 4083 "exports": exports, |
| 4083 "names": names, | 4084 "names": names, |
| 4084 "exports": exports, | |
| 4085 "parts": parts, | 4085 "parts": parts, |
| 4086 }; | 4086 }; |
| 4087 } | 4087 } |
| 4088 | 4088 |
| 4089 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple
ments idl.UnlinkedReference { | 4089 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple
ments idl.UnlinkedReference { |
| 4090 bool _finished = false; | 4090 bool _finished = false; |
| 4091 | 4091 |
| 4092 String _name; | 4092 String _name; |
| 4093 int _prefixReference; | 4093 int _prefixReference; |
| 4094 | 4094 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4175 @override | 4175 @override |
| 4176 Map<String, Object> toMap() => { | 4176 Map<String, Object> toMap() => { |
| 4177 "name": name, | 4177 "name": name, |
| 4178 "prefixReference": prefixReference, | 4178 "prefixReference": prefixReference, |
| 4179 }; | 4179 }; |
| 4180 } | 4180 } |
| 4181 | 4181 |
| 4182 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { | 4182 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { |
| 4183 bool _finished = false; | 4183 bool _finished = false; |
| 4184 | 4184 |
| 4185 List<UnlinkedConstBuilder> _annotations; |
| 4186 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 4185 String _name; | 4187 String _name; |
| 4186 int _nameOffset; | 4188 int _nameOffset; |
| 4187 UnlinkedDocumentationCommentBuilder _documentationComment; | 4189 List<UnlinkedParamBuilder> _parameters; |
| 4188 List<UnlinkedConstBuilder> _annotations; | 4190 EntityRefBuilder _returnType; |
| 4189 List<UnlinkedTypeParamBuilder> _typeParameters; | 4191 List<UnlinkedTypeParamBuilder> _typeParameters; |
| 4190 EntityRefBuilder _returnType; | 4192 |
| 4191 List<UnlinkedParamBuilder> _parameters; | 4193 @override |
| 4194 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 4195 |
| 4196 /** |
| 4197 * Annotations for this typedef. |
| 4198 */ |
| 4199 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 4200 assert(!_finished); |
| 4201 _annotations = _value; |
| 4202 } |
| 4203 |
| 4204 @override |
| 4205 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 4206 |
| 4207 /** |
| 4208 * Documentation comment for the typedef, or `null` if there is no |
| 4209 * documentation comment. |
| 4210 */ |
| 4211 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 4212 assert(!_finished); |
| 4213 _documentationComment = _value; |
| 4214 } |
| 4192 | 4215 |
| 4193 @override | 4216 @override |
| 4194 String get name => _name ??= ''; | 4217 String get name => _name ??= ''; |
| 4195 | 4218 |
| 4196 /** | 4219 /** |
| 4197 * Name of the typedef. | 4220 * Name of the typedef. |
| 4198 */ | 4221 */ |
| 4199 void set name(String _value) { | 4222 void set name(String _value) { |
| 4200 assert(!_finished); | 4223 assert(!_finished); |
| 4201 _name = _value; | 4224 _name = _value; |
| 4202 } | 4225 } |
| 4203 | 4226 |
| 4204 @override | 4227 @override |
| 4205 int get nameOffset => _nameOffset ??= 0; | 4228 int get nameOffset => _nameOffset ??= 0; |
| 4206 | 4229 |
| 4207 /** | 4230 /** |
| 4208 * Offset of the typedef name relative to the beginning of the file. | 4231 * Offset of the typedef name relative to the beginning of the file. |
| 4209 */ | 4232 */ |
| 4210 void set nameOffset(int _value) { | 4233 void set nameOffset(int _value) { |
| 4211 assert(!_finished); | 4234 assert(!_finished); |
| 4212 assert(_value == null || _value >= 0); | 4235 assert(_value == null || _value >= 0); |
| 4213 _nameOffset = _value; | 4236 _nameOffset = _value; |
| 4214 } | 4237 } |
| 4215 | 4238 |
| 4216 @override | 4239 @override |
| 4217 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 4240 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; |
| 4218 | 4241 |
| 4219 /** | 4242 /** |
| 4220 * Documentation comment for the typedef, or `null` if there is no | 4243 * Parameters of the executable, if any. |
| 4221 * documentation comment. | |
| 4222 */ | 4244 */ |
| 4223 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 4245 void set parameters(List<UnlinkedParamBuilder> _value) { |
| 4224 assert(!_finished); | 4246 assert(!_finished); |
| 4225 _documentationComment = _value; | 4247 _parameters = _value; |
| 4226 } | 4248 } |
| 4227 | 4249 |
| 4228 @override | 4250 @override |
| 4229 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | |
| 4230 | |
| 4231 /** | |
| 4232 * Annotations for this typedef. | |
| 4233 */ | |
| 4234 void set annotations(List<UnlinkedConstBuilder> _value) { | |
| 4235 assert(!_finished); | |
| 4236 _annotations = _value; | |
| 4237 } | |
| 4238 | |
| 4239 @override | |
| 4240 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | |
| 4241 | |
| 4242 /** | |
| 4243 * Type parameters of the typedef, if any. | |
| 4244 */ | |
| 4245 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | |
| 4246 assert(!_finished); | |
| 4247 _typeParameters = _value; | |
| 4248 } | |
| 4249 | |
| 4250 @override | |
| 4251 EntityRefBuilder get returnType => _returnType; | 4251 EntityRefBuilder get returnType => _returnType; |
| 4252 | 4252 |
| 4253 /** | 4253 /** |
| 4254 * Return type of the typedef. | 4254 * Return type of the typedef. |
| 4255 */ | 4255 */ |
| 4256 void set returnType(EntityRefBuilder _value) { | 4256 void set returnType(EntityRefBuilder _value) { |
| 4257 assert(!_finished); | 4257 assert(!_finished); |
| 4258 _returnType = _value; | 4258 _returnType = _value; |
| 4259 } | 4259 } |
| 4260 | 4260 |
| 4261 @override | 4261 @override |
| 4262 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 4262 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
| 4263 | 4263 |
| 4264 /** | 4264 /** |
| 4265 * Parameters of the executable, if any. | 4265 * Type parameters of the typedef, if any. |
| 4266 */ | 4266 */ |
| 4267 void set parameters(List<UnlinkedParamBuilder> _value) { | 4267 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 4268 assert(!_finished); | 4268 assert(!_finished); |
| 4269 _parameters = _value; | 4269 _typeParameters = _value; |
| 4270 } | 4270 } |
| 4271 | 4271 |
| 4272 UnlinkedTypedefBuilder({String name, int nameOffset, UnlinkedDocumentationComm
entBuilder documentationComment, List<UnlinkedConstBuilder> annotations, List<Un
linkedTypeParamBuilder> typeParameters, EntityRefBuilder returnType, List<Unlink
edParamBuilder> parameters}) | 4272 UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocume
ntationCommentBuilder documentationComment, String name, int nameOffset, List<Un
linkedParamBuilder> parameters, EntityRefBuilder returnType, List<UnlinkedTypePa
ramBuilder> typeParameters}) |
| 4273 : _name = name, | 4273 : _annotations = annotations, |
| 4274 _documentationComment = documentationComment, |
| 4275 _name = name, |
| 4274 _nameOffset = nameOffset, | 4276 _nameOffset = nameOffset, |
| 4275 _documentationComment = documentationComment, | 4277 _parameters = parameters, |
| 4276 _annotations = annotations, | |
| 4277 _typeParameters = typeParameters, | |
| 4278 _returnType = returnType, | 4278 _returnType = returnType, |
| 4279 _parameters = parameters; | 4279 _typeParameters = typeParameters; |
| 4280 | 4280 |
| 4281 fb.Offset finish(fb.Builder fbBuilder) { | 4281 fb.Offset finish(fb.Builder fbBuilder) { |
| 4282 assert(!_finished); | 4282 assert(!_finished); |
| 4283 _finished = true; | 4283 _finished = true; |
| 4284 fb.Offset offset_annotations; |
| 4285 fb.Offset offset_documentationComment; |
| 4284 fb.Offset offset_name; | 4286 fb.Offset offset_name; |
| 4285 fb.Offset offset_documentationComment; | 4287 fb.Offset offset_parameters; |
| 4286 fb.Offset offset_annotations; | 4288 fb.Offset offset_returnType; |
| 4287 fb.Offset offset_typeParameters; | 4289 fb.Offset offset_typeParameters; |
| 4288 fb.Offset offset_returnType; | 4290 if (!(_annotations == null || _annotations.isEmpty)) { |
| 4289 fb.Offset offset_parameters; | 4291 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 4290 if (_name != null) { | |
| 4291 offset_name = fbBuilder.writeString(_name); | |
| 4292 } | 4292 } |
| 4293 if (_documentationComment != null) { | 4293 if (_documentationComment != null) { |
| 4294 offset_documentationComment = _documentationComment.finish(fbBuilder); | 4294 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 4295 } | 4295 } |
| 4296 if (!(_annotations == null || _annotations.isEmpty)) { | 4296 if (_name != null) { |
| 4297 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 4297 offset_name = fbBuilder.writeString(_name); |
| 4298 } |
| 4299 if (!(_parameters == null || _parameters.isEmpty)) { |
| 4300 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); |
| 4301 } |
| 4302 if (_returnType != null) { |
| 4303 offset_returnType = _returnType.finish(fbBuilder); |
| 4298 } | 4304 } |
| 4299 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 4305 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
| 4300 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 4306 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
| 4301 } | 4307 } |
| 4302 if (_returnType != null) { | 4308 fbBuilder.startTable(); |
| 4303 offset_returnType = _returnType.finish(fbBuilder); | 4309 if (offset_annotations != null) { |
| 4310 fbBuilder.addOffset(0, offset_annotations); |
| 4304 } | 4311 } |
| 4305 if (!(_parameters == null || _parameters.isEmpty)) { | 4312 if (offset_documentationComment != null) { |
| 4306 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 4313 fbBuilder.addOffset(1, offset_documentationComment); |
| 4307 } | 4314 } |
| 4308 fbBuilder.startTable(); | |
| 4309 if (offset_name != null) { | 4315 if (offset_name != null) { |
| 4310 fbBuilder.addOffset(0, offset_name); | 4316 fbBuilder.addOffset(2, offset_name); |
| 4311 } | 4317 } |
| 4312 if (_nameOffset != null && _nameOffset != 0) { | 4318 if (_nameOffset != null && _nameOffset != 0) { |
| 4313 fbBuilder.addUint32(1, _nameOffset); | 4319 fbBuilder.addUint32(3, _nameOffset); |
| 4314 } | 4320 } |
| 4315 if (offset_documentationComment != null) { | 4321 if (offset_parameters != null) { |
| 4316 fbBuilder.addOffset(2, offset_documentationComment); | 4322 fbBuilder.addOffset(4, offset_parameters); |
| 4317 } | |
| 4318 if (offset_annotations != null) { | |
| 4319 fbBuilder.addOffset(3, offset_annotations); | |
| 4320 } | |
| 4321 if (offset_typeParameters != null) { | |
| 4322 fbBuilder.addOffset(4, offset_typeParameters); | |
| 4323 } | 4323 } |
| 4324 if (offset_returnType != null) { | 4324 if (offset_returnType != null) { |
| 4325 fbBuilder.addOffset(5, offset_returnType); | 4325 fbBuilder.addOffset(5, offset_returnType); |
| 4326 } | 4326 } |
| 4327 if (offset_parameters != null) { | 4327 if (offset_typeParameters != null) { |
| 4328 fbBuilder.addOffset(6, offset_parameters); | 4328 fbBuilder.addOffset(6, offset_typeParameters); |
| 4329 } | 4329 } |
| 4330 return fbBuilder.endTable(); | 4330 return fbBuilder.endTable(); |
| 4331 } | 4331 } |
| 4332 } | 4332 } |
| 4333 | 4333 |
| 4334 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { | 4334 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { |
| 4335 const _UnlinkedTypedefReader(); | 4335 const _UnlinkedTypedefReader(); |
| 4336 | 4336 |
| 4337 @override | 4337 @override |
| 4338 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); | 4338 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); |
| 4339 } | 4339 } |
| 4340 | 4340 |
| 4341 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { | 4341 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { |
| 4342 final fb.BufferPointer _bp; | 4342 final fb.BufferPointer _bp; |
| 4343 | 4343 |
| 4344 _UnlinkedTypedefImpl(this._bp); | 4344 _UnlinkedTypedefImpl(this._bp); |
| 4345 | 4345 |
| 4346 List<idl.UnlinkedConst> _annotations; |
| 4347 idl.UnlinkedDocumentationComment _documentationComment; |
| 4346 String _name; | 4348 String _name; |
| 4347 int _nameOffset; | 4349 int _nameOffset; |
| 4348 idl.UnlinkedDocumentationComment _documentationComment; | 4350 List<idl.UnlinkedParam> _parameters; |
| 4349 List<idl.UnlinkedConst> _annotations; | 4351 idl.EntityRef _returnType; |
| 4350 List<idl.UnlinkedTypeParam> _typeParameters; | 4352 List<idl.UnlinkedTypeParam> _typeParameters; |
| 4351 idl.EntityRef _returnType; | 4353 |
| 4352 List<idl.UnlinkedParam> _parameters; | 4354 @override |
| 4355 List<idl.UnlinkedConst> get annotations { |
| 4356 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 4357 return _annotations; |
| 4358 } |
| 4359 |
| 4360 @override |
| 4361 idl.UnlinkedDocumentationComment get documentationComment { |
| 4362 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 1, null); |
| 4363 return _documentationComment; |
| 4364 } |
| 4353 | 4365 |
| 4354 @override | 4366 @override |
| 4355 String get name { | 4367 String get name { |
| 4356 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 4368 _name ??= const fb.StringReader().vTableGet(_bp, 2, ''); |
| 4357 return _name; | 4369 return _name; |
| 4358 } | 4370 } |
| 4359 | 4371 |
| 4360 @override | 4372 @override |
| 4361 int get nameOffset { | 4373 int get nameOffset { |
| 4362 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 4374 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 4363 return _nameOffset; | 4375 return _nameOffset; |
| 4364 } | 4376 } |
| 4365 | 4377 |
| 4366 @override | 4378 @override |
| 4367 idl.UnlinkedDocumentationComment get documentationComment { | 4379 List<idl.UnlinkedParam> get parameters { |
| 4368 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | 4380 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bp, 4, const <idl.UnlinkedParam>[]); |
| 4369 return _documentationComment; | 4381 return _parameters; |
| 4370 } | 4382 } |
| 4371 | 4383 |
| 4372 @override | 4384 @override |
| 4373 List<idl.UnlinkedConst> get annotations { | |
| 4374 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | |
| 4375 return _annotations; | |
| 4376 } | |
| 4377 | |
| 4378 @override | |
| 4379 List<idl.UnlinkedTypeParam> get typeParameters { | |
| 4380 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 4, const <idl.UnlinkedTypeParam>[]); | |
| 4381 return _typeParameters; | |
| 4382 } | |
| 4383 | |
| 4384 @override | |
| 4385 idl.EntityRef get returnType { | 4385 idl.EntityRef get returnType { |
| 4386 _returnType ??= const _EntityRefReader().vTableGet(_bp, 5, null); | 4386 _returnType ??= const _EntityRefReader().vTableGet(_bp, 5, null); |
| 4387 return _returnType; | 4387 return _returnType; |
| 4388 } | 4388 } |
| 4389 | 4389 |
| 4390 @override | 4390 @override |
| 4391 List<idl.UnlinkedParam> get parameters { | 4391 List<idl.UnlinkedTypeParam> get typeParameters { |
| 4392 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bp, 6, const <idl.UnlinkedParam>[]); | 4392 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 6, const <idl.UnlinkedTypeParam>[]); |
| 4393 return _parameters; | 4393 return _typeParameters; |
| 4394 } | 4394 } |
| 4395 } | 4395 } |
| 4396 | 4396 |
| 4397 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { | 4397 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { |
| 4398 @override | 4398 @override |
| 4399 Map<String, Object> toMap() => { | 4399 Map<String, Object> toMap() => { |
| 4400 "annotations": annotations, |
| 4401 "documentationComment": documentationComment, |
| 4400 "name": name, | 4402 "name": name, |
| 4401 "nameOffset": nameOffset, | 4403 "nameOffset": nameOffset, |
| 4402 "documentationComment": documentationComment, | 4404 "parameters": parameters, |
| 4403 "annotations": annotations, | 4405 "returnType": returnType, |
| 4404 "typeParameters": typeParameters, | 4406 "typeParameters": typeParameters, |
| 4405 "returnType": returnType, | |
| 4406 "parameters": parameters, | |
| 4407 }; | 4407 }; |
| 4408 } | 4408 } |
| 4409 | 4409 |
| 4410 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { | 4410 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { |
| 4411 bool _finished = false; | 4411 bool _finished = false; |
| 4412 | 4412 |
| 4413 List<UnlinkedConstBuilder> _annotations; |
| 4414 EntityRefBuilder _bound; |
| 4413 String _name; | 4415 String _name; |
| 4414 int _nameOffset; | 4416 int _nameOffset; |
| 4415 List<UnlinkedConstBuilder> _annotations; | 4417 |
| 4416 EntityRefBuilder _bound; | 4418 @override |
| 4419 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 4420 |
| 4421 /** |
| 4422 * Annotations for this type parameter. |
| 4423 */ |
| 4424 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 4425 assert(!_finished); |
| 4426 _annotations = _value; |
| 4427 } |
| 4428 |
| 4429 @override |
| 4430 EntityRefBuilder get bound => _bound; |
| 4431 |
| 4432 /** |
| 4433 * Bound of the type parameter, if a bound is explicitly declared. Otherwise |
| 4434 * null. |
| 4435 */ |
| 4436 void set bound(EntityRefBuilder _value) { |
| 4437 assert(!_finished); |
| 4438 _bound = _value; |
| 4439 } |
| 4417 | 4440 |
| 4418 @override | 4441 @override |
| 4419 String get name => _name ??= ''; | 4442 String get name => _name ??= ''; |
| 4420 | 4443 |
| 4421 /** | 4444 /** |
| 4422 * Name of the type parameter. | 4445 * Name of the type parameter. |
| 4423 */ | 4446 */ |
| 4424 void set name(String _value) { | 4447 void set name(String _value) { |
| 4425 assert(!_finished); | 4448 assert(!_finished); |
| 4426 _name = _value; | 4449 _name = _value; |
| 4427 } | 4450 } |
| 4428 | 4451 |
| 4429 @override | 4452 @override |
| 4430 int get nameOffset => _nameOffset ??= 0; | 4453 int get nameOffset => _nameOffset ??= 0; |
| 4431 | 4454 |
| 4432 /** | 4455 /** |
| 4433 * Offset of the type parameter name relative to the beginning of the file. | 4456 * Offset of the type parameter name relative to the beginning of the file. |
| 4434 */ | 4457 */ |
| 4435 void set nameOffset(int _value) { | 4458 void set nameOffset(int _value) { |
| 4436 assert(!_finished); | 4459 assert(!_finished); |
| 4437 assert(_value == null || _value >= 0); | 4460 assert(_value == null || _value >= 0); |
| 4438 _nameOffset = _value; | 4461 _nameOffset = _value; |
| 4439 } | 4462 } |
| 4440 | 4463 |
| 4441 @override | 4464 UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBui
lder bound, String name, int nameOffset}) |
| 4442 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 4465 : _annotations = annotations, |
| 4443 | 4466 _bound = bound, |
| 4444 /** | 4467 _name = name, |
| 4445 * Annotations for this type parameter. | 4468 _nameOffset = nameOffset; |
| 4446 */ | |
| 4447 void set annotations(List<UnlinkedConstBuilder> _value) { | |
| 4448 assert(!_finished); | |
| 4449 _annotations = _value; | |
| 4450 } | |
| 4451 | |
| 4452 @override | |
| 4453 EntityRefBuilder get bound => _bound; | |
| 4454 | |
| 4455 /** | |
| 4456 * Bound of the type parameter, if a bound is explicitly declared. Otherwise | |
| 4457 * null. | |
| 4458 */ | |
| 4459 void set bound(EntityRefBuilder _value) { | |
| 4460 assert(!_finished); | |
| 4461 _bound = _value; | |
| 4462 } | |
| 4463 | |
| 4464 UnlinkedTypeParamBuilder({String name, int nameOffset, List<UnlinkedConstBuild
er> annotations, EntityRefBuilder bound}) | |
| 4465 : _name = name, | |
| 4466 _nameOffset = nameOffset, | |
| 4467 _annotations = annotations, | |
| 4468 _bound = bound; | |
| 4469 | 4469 |
| 4470 fb.Offset finish(fb.Builder fbBuilder) { | 4470 fb.Offset finish(fb.Builder fbBuilder) { |
| 4471 assert(!_finished); | 4471 assert(!_finished); |
| 4472 _finished = true; | 4472 _finished = true; |
| 4473 fb.Offset offset_name; | |
| 4474 fb.Offset offset_annotations; | 4473 fb.Offset offset_annotations; |
| 4475 fb.Offset offset_bound; | 4474 fb.Offset offset_bound; |
| 4476 if (_name != null) { | 4475 fb.Offset offset_name; |
| 4477 offset_name = fbBuilder.writeString(_name); | |
| 4478 } | |
| 4479 if (!(_annotations == null || _annotations.isEmpty)) { | 4476 if (!(_annotations == null || _annotations.isEmpty)) { |
| 4480 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 4477 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 4481 } | 4478 } |
| 4482 if (_bound != null) { | 4479 if (_bound != null) { |
| 4483 offset_bound = _bound.finish(fbBuilder); | 4480 offset_bound = _bound.finish(fbBuilder); |
| 4484 } | 4481 } |
| 4482 if (_name != null) { |
| 4483 offset_name = fbBuilder.writeString(_name); |
| 4484 } |
| 4485 fbBuilder.startTable(); | 4485 fbBuilder.startTable(); |
| 4486 if (offset_annotations != null) { |
| 4487 fbBuilder.addOffset(0, offset_annotations); |
| 4488 } |
| 4489 if (offset_bound != null) { |
| 4490 fbBuilder.addOffset(1, offset_bound); |
| 4491 } |
| 4486 if (offset_name != null) { | 4492 if (offset_name != null) { |
| 4487 fbBuilder.addOffset(0, offset_name); | 4493 fbBuilder.addOffset(2, offset_name); |
| 4488 } | 4494 } |
| 4489 if (_nameOffset != null && _nameOffset != 0) { | 4495 if (_nameOffset != null && _nameOffset != 0) { |
| 4490 fbBuilder.addUint32(1, _nameOffset); | 4496 fbBuilder.addUint32(3, _nameOffset); |
| 4491 } | |
| 4492 if (offset_annotations != null) { | |
| 4493 fbBuilder.addOffset(2, offset_annotations); | |
| 4494 } | |
| 4495 if (offset_bound != null) { | |
| 4496 fbBuilder.addOffset(3, offset_bound); | |
| 4497 } | 4497 } |
| 4498 return fbBuilder.endTable(); | 4498 return fbBuilder.endTable(); |
| 4499 } | 4499 } |
| 4500 } | 4500 } |
| 4501 | 4501 |
| 4502 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { | 4502 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { |
| 4503 const _UnlinkedTypeParamReader(); | 4503 const _UnlinkedTypeParamReader(); |
| 4504 | 4504 |
| 4505 @override | 4505 @override |
| 4506 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); | 4506 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); |
| 4507 } | 4507 } |
| 4508 | 4508 |
| 4509 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { | 4509 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { |
| 4510 final fb.BufferPointer _bp; | 4510 final fb.BufferPointer _bp; |
| 4511 | 4511 |
| 4512 _UnlinkedTypeParamImpl(this._bp); | 4512 _UnlinkedTypeParamImpl(this._bp); |
| 4513 | 4513 |
| 4514 List<idl.UnlinkedConst> _annotations; |
| 4515 idl.EntityRef _bound; |
| 4514 String _name; | 4516 String _name; |
| 4515 int _nameOffset; | 4517 int _nameOffset; |
| 4516 List<idl.UnlinkedConst> _annotations; | 4518 |
| 4517 idl.EntityRef _bound; | 4519 @override |
| 4520 List<idl.UnlinkedConst> get annotations { |
| 4521 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 4522 return _annotations; |
| 4523 } |
| 4524 |
| 4525 @override |
| 4526 idl.EntityRef get bound { |
| 4527 _bound ??= const _EntityRefReader().vTableGet(_bp, 1, null); |
| 4528 return _bound; |
| 4529 } |
| 4518 | 4530 |
| 4519 @override | 4531 @override |
| 4520 String get name { | 4532 String get name { |
| 4521 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 4533 _name ??= const fb.StringReader().vTableGet(_bp, 2, ''); |
| 4522 return _name; | 4534 return _name; |
| 4523 } | 4535 } |
| 4524 | 4536 |
| 4525 @override | 4537 @override |
| 4526 int get nameOffset { | 4538 int get nameOffset { |
| 4527 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 4539 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 4528 return _nameOffset; | 4540 return _nameOffset; |
| 4529 } | 4541 } |
| 4530 | |
| 4531 @override | |
| 4532 List<idl.UnlinkedConst> get annotations { | |
| 4533 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 2, const <idl.UnlinkedConst>[]); | |
| 4534 return _annotations; | |
| 4535 } | |
| 4536 | |
| 4537 @override | |
| 4538 idl.EntityRef get bound { | |
| 4539 _bound ??= const _EntityRefReader().vTableGet(_bp, 3, null); | |
| 4540 return _bound; | |
| 4541 } | |
| 4542 } | 4542 } |
| 4543 | 4543 |
| 4544 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { | 4544 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { |
| 4545 @override | 4545 @override |
| 4546 Map<String, Object> toMap() => { | 4546 Map<String, Object> toMap() => { |
| 4547 "annotations": annotations, |
| 4548 "bound": bound, |
| 4547 "name": name, | 4549 "name": name, |
| 4548 "nameOffset": nameOffset, | 4550 "nameOffset": nameOffset, |
| 4549 "annotations": annotations, | |
| 4550 "bound": bound, | |
| 4551 }; | 4551 }; |
| 4552 } | 4552 } |
| 4553 | 4553 |
| 4554 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { | 4554 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { |
| 4555 bool _finished = false; | 4555 bool _finished = false; |
| 4556 | 4556 |
| 4557 String _libraryName; | |
| 4558 int _libraryNameOffset; | |
| 4559 int _libraryNameLength; | |
| 4560 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; | |
| 4561 List<UnlinkedConstBuilder> _libraryAnnotations; | |
| 4562 UnlinkedPublicNamespaceBuilder _publicNamespace; | |
| 4563 List<UnlinkedReferenceBuilder> _references; | |
| 4564 List<UnlinkedClassBuilder> _classes; | 4557 List<UnlinkedClassBuilder> _classes; |
| 4565 List<UnlinkedEnumBuilder> _enums; | 4558 List<UnlinkedEnumBuilder> _enums; |
| 4566 List<UnlinkedExecutableBuilder> _executables; | 4559 List<UnlinkedExecutableBuilder> _executables; |
| 4567 List<UnlinkedExportNonPublicBuilder> _exports; | 4560 List<UnlinkedExportNonPublicBuilder> _exports; |
| 4568 List<UnlinkedImportBuilder> _imports; | 4561 List<UnlinkedImportBuilder> _imports; |
| 4562 List<UnlinkedConstBuilder> _libraryAnnotations; |
| 4563 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; |
| 4564 String _libraryName; |
| 4565 int _libraryNameLength; |
| 4566 int _libraryNameOffset; |
| 4569 List<UnlinkedPartBuilder> _parts; | 4567 List<UnlinkedPartBuilder> _parts; |
| 4568 UnlinkedPublicNamespaceBuilder _publicNamespace; |
| 4569 List<UnlinkedReferenceBuilder> _references; |
| 4570 List<UnlinkedTypedefBuilder> _typedefs; | 4570 List<UnlinkedTypedefBuilder> _typedefs; |
| 4571 List<UnlinkedVariableBuilder> _variables; | 4571 List<UnlinkedVariableBuilder> _variables; |
| 4572 | 4572 |
| 4573 @override | 4573 @override |
| 4574 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; |
| 4575 |
| 4576 /** |
| 4577 * Classes declared in the compilation unit. |
| 4578 */ |
| 4579 void set classes(List<UnlinkedClassBuilder> _value) { |
| 4580 assert(!_finished); |
| 4581 _classes = _value; |
| 4582 } |
| 4583 |
| 4584 @override |
| 4585 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; |
| 4586 |
| 4587 /** |
| 4588 * Enums declared in the compilation unit. |
| 4589 */ |
| 4590 void set enums(List<UnlinkedEnumBuilder> _value) { |
| 4591 assert(!_finished); |
| 4592 _enums = _value; |
| 4593 } |
| 4594 |
| 4595 @override |
| 4596 List<UnlinkedExecutableBuilder> get executables => _executables ??= <UnlinkedE
xecutableBuilder>[]; |
| 4597 |
| 4598 /** |
| 4599 * Top level executable objects (functions, getters, and setters) declared in |
| 4600 * the compilation unit. |
| 4601 */ |
| 4602 void set executables(List<UnlinkedExecutableBuilder> _value) { |
| 4603 assert(!_finished); |
| 4604 _executables = _value; |
| 4605 } |
| 4606 |
| 4607 @override |
| 4608 List<UnlinkedExportNonPublicBuilder> get exports => _exports ??= <UnlinkedExpo
rtNonPublicBuilder>[]; |
| 4609 |
| 4610 /** |
| 4611 * Export declarations in the compilation unit. |
| 4612 */ |
| 4613 void set exports(List<UnlinkedExportNonPublicBuilder> _value) { |
| 4614 assert(!_finished); |
| 4615 _exports = _value; |
| 4616 } |
| 4617 |
| 4618 @override |
| 4619 List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder
>[]; |
| 4620 |
| 4621 /** |
| 4622 * Import declarations in the compilation unit. |
| 4623 */ |
| 4624 void set imports(List<UnlinkedImportBuilder> _value) { |
| 4625 assert(!_finished); |
| 4626 _imports = _value; |
| 4627 } |
| 4628 |
| 4629 @override |
| 4630 List<UnlinkedConstBuilder> get libraryAnnotations => _libraryAnnotations ??= <
UnlinkedConstBuilder>[]; |
| 4631 |
| 4632 /** |
| 4633 * Annotations for the library declaration, or the empty list if there is no |
| 4634 * library declaration. |
| 4635 */ |
| 4636 void set libraryAnnotations(List<UnlinkedConstBuilder> _value) { |
| 4637 assert(!_finished); |
| 4638 _libraryAnnotations = _value; |
| 4639 } |
| 4640 |
| 4641 @override |
| 4642 UnlinkedDocumentationCommentBuilder get libraryDocumentationComment => _librar
yDocumentationComment; |
| 4643 |
| 4644 /** |
| 4645 * Documentation comment for the library, or `null` if there is no |
| 4646 * documentation comment. |
| 4647 */ |
| 4648 void set libraryDocumentationComment(UnlinkedDocumentationCommentBuilder _valu
e) { |
| 4649 assert(!_finished); |
| 4650 _libraryDocumentationComment = _value; |
| 4651 } |
| 4652 |
| 4653 @override |
| 4574 String get libraryName => _libraryName ??= ''; | 4654 String get libraryName => _libraryName ??= ''; |
| 4575 | 4655 |
| 4576 /** | 4656 /** |
| 4577 * Name of the library (from a "library" declaration, if present). | 4657 * Name of the library (from a "library" declaration, if present). |
| 4578 */ | 4658 */ |
| 4579 void set libraryName(String _value) { | 4659 void set libraryName(String _value) { |
| 4580 assert(!_finished); | 4660 assert(!_finished); |
| 4581 _libraryName = _value; | 4661 _libraryName = _value; |
| 4582 } | 4662 } |
| 4583 | 4663 |
| 4584 @override | 4664 @override |
| 4665 int get libraryNameLength => _libraryNameLength ??= 0; |
| 4666 |
| 4667 /** |
| 4668 * Length of the library name as it appears in the source code (or 0 if the |
| 4669 * library has no name). |
| 4670 */ |
| 4671 void set libraryNameLength(int _value) { |
| 4672 assert(!_finished); |
| 4673 assert(_value == null || _value >= 0); |
| 4674 _libraryNameLength = _value; |
| 4675 } |
| 4676 |
| 4677 @override |
| 4585 int get libraryNameOffset => _libraryNameOffset ??= 0; | 4678 int get libraryNameOffset => _libraryNameOffset ??= 0; |
| 4586 | 4679 |
| 4587 /** | 4680 /** |
| 4588 * Offset of the library name relative to the beginning of the file (or 0 if | 4681 * Offset of the library name relative to the beginning of the file (or 0 if |
| 4589 * the library has no name). | 4682 * the library has no name). |
| 4590 */ | 4683 */ |
| 4591 void set libraryNameOffset(int _value) { | 4684 void set libraryNameOffset(int _value) { |
| 4592 assert(!_finished); | 4685 assert(!_finished); |
| 4593 assert(_value == null || _value >= 0); | 4686 assert(_value == null || _value >= 0); |
| 4594 _libraryNameOffset = _value; | 4687 _libraryNameOffset = _value; |
| 4595 } | 4688 } |
| 4596 | 4689 |
| 4597 @override | 4690 @override |
| 4598 int get libraryNameLength => _libraryNameLength ??= 0; | 4691 List<UnlinkedPartBuilder> get parts => _parts ??= <UnlinkedPartBuilder>[]; |
| 4599 | 4692 |
| 4600 /** | 4693 /** |
| 4601 * Length of the library name as it appears in the source code (or 0 if the | 4694 * Part declarations in the compilation unit. |
| 4602 * library has no name). | 4695 */ |
| 4603 */ | 4696 void set parts(List<UnlinkedPartBuilder> _value) { |
| 4604 void set libraryNameLength(int _value) { | 4697 assert(!_finished); |
| 4605 assert(!_finished); | 4698 _parts = _value; |
| 4606 assert(_value == null || _value >= 0); | |
| 4607 _libraryNameLength = _value; | |
| 4608 } | |
| 4609 | |
| 4610 @override | |
| 4611 UnlinkedDocumentationCommentBuilder get libraryDocumentationComment => _librar
yDocumentationComment; | |
| 4612 | |
| 4613 /** | |
| 4614 * Documentation comment for the library, or `null` if there is no | |
| 4615 * documentation comment. | |
| 4616 */ | |
| 4617 void set libraryDocumentationComment(UnlinkedDocumentationCommentBuilder _valu
e) { | |
| 4618 assert(!_finished); | |
| 4619 _libraryDocumentationComment = _value; | |
| 4620 } | |
| 4621 | |
| 4622 @override | |
| 4623 List<UnlinkedConstBuilder> get libraryAnnotations => _libraryAnnotations ??= <
UnlinkedConstBuilder>[]; | |
| 4624 | |
| 4625 /** | |
| 4626 * Annotations for the library declaration, or the empty list if there is no | |
| 4627 * library declaration. | |
| 4628 */ | |
| 4629 void set libraryAnnotations(List<UnlinkedConstBuilder> _value) { | |
| 4630 assert(!_finished); | |
| 4631 _libraryAnnotations = _value; | |
| 4632 } | 4699 } |
| 4633 | 4700 |
| 4634 @override | 4701 @override |
| 4635 UnlinkedPublicNamespaceBuilder get publicNamespace => _publicNamespace; | 4702 UnlinkedPublicNamespaceBuilder get publicNamespace => _publicNamespace; |
| 4636 | 4703 |
| 4637 /** | 4704 /** |
| 4638 * Unlinked public namespace of this compilation unit. | 4705 * Unlinked public namespace of this compilation unit. |
| 4639 */ | 4706 */ |
| 4640 void set publicNamespace(UnlinkedPublicNamespaceBuilder _value) { | 4707 void set publicNamespace(UnlinkedPublicNamespaceBuilder _value) { |
| 4641 assert(!_finished); | 4708 assert(!_finished); |
| 4642 _publicNamespace = _value; | 4709 _publicNamespace = _value; |
| 4643 } | 4710 } |
| 4644 | 4711 |
| 4645 @override | 4712 @override |
| 4646 List<UnlinkedReferenceBuilder> get references => _references ??= <UnlinkedRefe
renceBuilder>[]; | 4713 List<UnlinkedReferenceBuilder> get references => _references ??= <UnlinkedRefe
renceBuilder>[]; |
| 4647 | 4714 |
| 4648 /** | 4715 /** |
| 4649 * Top level and prefixed names referred to by this compilation unit. The | 4716 * Top level and prefixed names referred to by this compilation unit. The |
| 4650 * zeroth element of this array is always populated and is used to represent | 4717 * zeroth element of this array is always populated and is used to represent |
| 4651 * the absence of a reference in places where a reference is optional (for | 4718 * the absence of a reference in places where a reference is optional (for |
| 4652 * example [UnlinkedReference.prefixReference or | 4719 * example [UnlinkedReference.prefixReference or |
| 4653 * UnlinkedImport.prefixReference]). | 4720 * UnlinkedImport.prefixReference]). |
| 4654 */ | 4721 */ |
| 4655 void set references(List<UnlinkedReferenceBuilder> _value) { | 4722 void set references(List<UnlinkedReferenceBuilder> _value) { |
| 4656 assert(!_finished); | 4723 assert(!_finished); |
| 4657 _references = _value; | 4724 _references = _value; |
| 4658 } | 4725 } |
| 4659 | 4726 |
| 4660 @override | 4727 @override |
| 4661 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; | |
| 4662 | |
| 4663 /** | |
| 4664 * Classes declared in the compilation unit. | |
| 4665 */ | |
| 4666 void set classes(List<UnlinkedClassBuilder> _value) { | |
| 4667 assert(!_finished); | |
| 4668 _classes = _value; | |
| 4669 } | |
| 4670 | |
| 4671 @override | |
| 4672 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; | |
| 4673 | |
| 4674 /** | |
| 4675 * Enums declared in the compilation unit. | |
| 4676 */ | |
| 4677 void set enums(List<UnlinkedEnumBuilder> _value) { | |
| 4678 assert(!_finished); | |
| 4679 _enums = _value; | |
| 4680 } | |
| 4681 | |
| 4682 @override | |
| 4683 List<UnlinkedExecutableBuilder> get executables => _executables ??= <UnlinkedE
xecutableBuilder>[]; | |
| 4684 | |
| 4685 /** | |
| 4686 * Top level executable objects (functions, getters, and setters) declared in | |
| 4687 * the compilation unit. | |
| 4688 */ | |
| 4689 void set executables(List<UnlinkedExecutableBuilder> _value) { | |
| 4690 assert(!_finished); | |
| 4691 _executables = _value; | |
| 4692 } | |
| 4693 | |
| 4694 @override | |
| 4695 List<UnlinkedExportNonPublicBuilder> get exports => _exports ??= <UnlinkedExpo
rtNonPublicBuilder>[]; | |
| 4696 | |
| 4697 /** | |
| 4698 * Export declarations in the compilation unit. | |
| 4699 */ | |
| 4700 void set exports(List<UnlinkedExportNonPublicBuilder> _value) { | |
| 4701 assert(!_finished); | |
| 4702 _exports = _value; | |
| 4703 } | |
| 4704 | |
| 4705 @override | |
| 4706 List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder
>[]; | |
| 4707 | |
| 4708 /** | |
| 4709 * Import declarations in the compilation unit. | |
| 4710 */ | |
| 4711 void set imports(List<UnlinkedImportBuilder> _value) { | |
| 4712 assert(!_finished); | |
| 4713 _imports = _value; | |
| 4714 } | |
| 4715 | |
| 4716 @override | |
| 4717 List<UnlinkedPartBuilder> get parts => _parts ??= <UnlinkedPartBuilder>[]; | |
| 4718 | |
| 4719 /** | |
| 4720 * Part declarations in the compilation unit. | |
| 4721 */ | |
| 4722 void set parts(List<UnlinkedPartBuilder> _value) { | |
| 4723 assert(!_finished); | |
| 4724 _parts = _value; | |
| 4725 } | |
| 4726 | |
| 4727 @override | |
| 4728 List<UnlinkedTypedefBuilder> get typedefs => _typedefs ??= <UnlinkedTypedefBui
lder>[]; | 4728 List<UnlinkedTypedefBuilder> get typedefs => _typedefs ??= <UnlinkedTypedefBui
lder>[]; |
| 4729 | 4729 |
| 4730 /** | 4730 /** |
| 4731 * Typedefs declared in the compilation unit. | 4731 * Typedefs declared in the compilation unit. |
| 4732 */ | 4732 */ |
| 4733 void set typedefs(List<UnlinkedTypedefBuilder> _value) { | 4733 void set typedefs(List<UnlinkedTypedefBuilder> _value) { |
| 4734 assert(!_finished); | 4734 assert(!_finished); |
| 4735 _typedefs = _value; | 4735 _typedefs = _value; |
| 4736 } | 4736 } |
| 4737 | 4737 |
| 4738 @override | 4738 @override |
| 4739 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; | 4739 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; |
| 4740 | 4740 |
| 4741 /** | 4741 /** |
| 4742 * Top level variables declared in the compilation unit. | 4742 * Top level variables declared in the compilation unit. |
| 4743 */ | 4743 */ |
| 4744 void set variables(List<UnlinkedVariableBuilder> _value) { | 4744 void set variables(List<UnlinkedVariableBuilder> _value) { |
| 4745 assert(!_finished); | 4745 assert(!_finished); |
| 4746 _variables = _value; | 4746 _variables = _value; |
| 4747 } | 4747 } |
| 4748 | 4748 |
| 4749 UnlinkedUnitBuilder({String libraryName, int libraryNameOffset, int libraryNam
eLength, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, List<U
nlinkedConstBuilder> libraryAnnotations, UnlinkedPublicNamespaceBuilder publicNa
mespace, List<UnlinkedReferenceBuilder> references, List<UnlinkedClassBuilder> c
lasses, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executa
bles, List<UnlinkedExportNonPublicBuilder> exports, List<UnlinkedImportBuilder>
imports, List<UnlinkedPartBuilder> parts, List<UnlinkedTypedefBuilder> typedefs,
List<UnlinkedVariableBuilder> variables}) | 4749 UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, List<UnlinkedEnumBuil
der> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonP
ublicBuilder> exports, List<UnlinkedImportBuilder> imports, List<UnlinkedConstBu
ilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentat
ionComment, String libraryName, int libraryNameLength, int libraryNameOffset, Li
st<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, L
ist<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs,
List<UnlinkedVariableBuilder> variables}) |
| 4750 : _libraryName = libraryName, | 4750 : _classes = classes, |
| 4751 _libraryNameOffset = libraryNameOffset, | |
| 4752 _libraryNameLength = libraryNameLength, | |
| 4753 _libraryDocumentationComment = libraryDocumentationComment, | |
| 4754 _libraryAnnotations = libraryAnnotations, | |
| 4755 _publicNamespace = publicNamespace, | |
| 4756 _references = references, | |
| 4757 _classes = classes, | |
| 4758 _enums = enums, | 4751 _enums = enums, |
| 4759 _executables = executables, | 4752 _executables = executables, |
| 4760 _exports = exports, | 4753 _exports = exports, |
| 4761 _imports = imports, | 4754 _imports = imports, |
| 4755 _libraryAnnotations = libraryAnnotations, |
| 4756 _libraryDocumentationComment = libraryDocumentationComment, |
| 4757 _libraryName = libraryName, |
| 4758 _libraryNameLength = libraryNameLength, |
| 4759 _libraryNameOffset = libraryNameOffset, |
| 4762 _parts = parts, | 4760 _parts = parts, |
| 4761 _publicNamespace = publicNamespace, |
| 4762 _references = references, |
| 4763 _typedefs = typedefs, | 4763 _typedefs = typedefs, |
| 4764 _variables = variables; | 4764 _variables = variables; |
| 4765 | 4765 |
| 4766 List<int> toBuffer() { | 4766 List<int> toBuffer() { |
| 4767 fb.Builder fbBuilder = new fb.Builder(); | 4767 fb.Builder fbBuilder = new fb.Builder(); |
| 4768 return fbBuilder.finish(finish(fbBuilder)); | 4768 return fbBuilder.finish(finish(fbBuilder)); |
| 4769 } | 4769 } |
| 4770 | 4770 |
| 4771 fb.Offset finish(fb.Builder fbBuilder) { | 4771 fb.Offset finish(fb.Builder fbBuilder) { |
| 4772 assert(!_finished); | 4772 assert(!_finished); |
| 4773 _finished = true; | 4773 _finished = true; |
| 4774 fb.Offset offset_libraryName; | |
| 4775 fb.Offset offset_libraryDocumentationComment; | |
| 4776 fb.Offset offset_libraryAnnotations; | |
| 4777 fb.Offset offset_publicNamespace; | |
| 4778 fb.Offset offset_references; | |
| 4779 fb.Offset offset_classes; | 4774 fb.Offset offset_classes; |
| 4780 fb.Offset offset_enums; | 4775 fb.Offset offset_enums; |
| 4781 fb.Offset offset_executables; | 4776 fb.Offset offset_executables; |
| 4782 fb.Offset offset_exports; | 4777 fb.Offset offset_exports; |
| 4783 fb.Offset offset_imports; | 4778 fb.Offset offset_imports; |
| 4779 fb.Offset offset_libraryAnnotations; |
| 4780 fb.Offset offset_libraryDocumentationComment; |
| 4781 fb.Offset offset_libraryName; |
| 4784 fb.Offset offset_parts; | 4782 fb.Offset offset_parts; |
| 4783 fb.Offset offset_publicNamespace; |
| 4784 fb.Offset offset_references; |
| 4785 fb.Offset offset_typedefs; | 4785 fb.Offset offset_typedefs; |
| 4786 fb.Offset offset_variables; | 4786 fb.Offset offset_variables; |
| 4787 if (_libraryName != null) { | |
| 4788 offset_libraryName = fbBuilder.writeString(_libraryName); | |
| 4789 } | |
| 4790 if (_libraryDocumentationComment != null) { | |
| 4791 offset_libraryDocumentationComment = _libraryDocumentationComment.finish(f
bBuilder); | |
| 4792 } | |
| 4793 if (!(_libraryAnnotations == null || _libraryAnnotations.isEmpty)) { | |
| 4794 offset_libraryAnnotations = fbBuilder.writeList(_libraryAnnotations.map((b
) => b.finish(fbBuilder)).toList()); | |
| 4795 } | |
| 4796 if (_publicNamespace != null) { | |
| 4797 offset_publicNamespace = _publicNamespace.finish(fbBuilder); | |
| 4798 } | |
| 4799 if (!(_references == null || _references.isEmpty)) { | |
| 4800 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | |
| 4801 } | |
| 4802 if (!(_classes == null || _classes.isEmpty)) { | 4787 if (!(_classes == null || _classes.isEmpty)) { |
| 4803 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde
r)).toList()); | 4788 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4804 } | 4789 } |
| 4805 if (!(_enums == null || _enums.isEmpty)) { | 4790 if (!(_enums == null || _enums.isEmpty)) { |
| 4806 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).
toList()); | 4791 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).
toList()); |
| 4807 } | 4792 } |
| 4808 if (!(_executables == null || _executables.isEmpty)) { | 4793 if (!(_executables == null || _executables.isEmpty)) { |
| 4809 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | 4794 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); |
| 4810 } | 4795 } |
| 4811 if (!(_exports == null || _exports.isEmpty)) { | 4796 if (!(_exports == null || _exports.isEmpty)) { |
| 4812 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); | 4797 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4813 } | 4798 } |
| 4814 if (!(_imports == null || _imports.isEmpty)) { | 4799 if (!(_imports == null || _imports.isEmpty)) { |
| 4815 offset_imports = fbBuilder.writeList(_imports.map((b) => b.finish(fbBuilde
r)).toList()); | 4800 offset_imports = fbBuilder.writeList(_imports.map((b) => b.finish(fbBuilde
r)).toList()); |
| 4816 } | 4801 } |
| 4802 if (!(_libraryAnnotations == null || _libraryAnnotations.isEmpty)) { |
| 4803 offset_libraryAnnotations = fbBuilder.writeList(_libraryAnnotations.map((b
) => b.finish(fbBuilder)).toList()); |
| 4804 } |
| 4805 if (_libraryDocumentationComment != null) { |
| 4806 offset_libraryDocumentationComment = _libraryDocumentationComment.finish(f
bBuilder); |
| 4807 } |
| 4808 if (_libraryName != null) { |
| 4809 offset_libraryName = fbBuilder.writeString(_libraryName); |
| 4810 } |
| 4817 if (!(_parts == null || _parts.isEmpty)) { | 4811 if (!(_parts == null || _parts.isEmpty)) { |
| 4818 offset_parts = fbBuilder.writeList(_parts.map((b) => b.finish(fbBuilder)).
toList()); | 4812 offset_parts = fbBuilder.writeList(_parts.map((b) => b.finish(fbBuilder)).
toList()); |
| 4819 } | 4813 } |
| 4814 if (_publicNamespace != null) { |
| 4815 offset_publicNamespace = _publicNamespace.finish(fbBuilder); |
| 4816 } |
| 4817 if (!(_references == null || _references.isEmpty)) { |
| 4818 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); |
| 4819 } |
| 4820 if (!(_typedefs == null || _typedefs.isEmpty)) { | 4820 if (!(_typedefs == null || _typedefs.isEmpty)) { |
| 4821 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); | 4821 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); |
| 4822 } | 4822 } |
| 4823 if (!(_variables == null || _variables.isEmpty)) { | 4823 if (!(_variables == null || _variables.isEmpty)) { |
| 4824 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); | 4824 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); |
| 4825 } | 4825 } |
| 4826 fbBuilder.startTable(); | 4826 fbBuilder.startTable(); |
| 4827 if (offset_classes != null) { |
| 4828 fbBuilder.addOffset(0, offset_classes); |
| 4829 } |
| 4830 if (offset_enums != null) { |
| 4831 fbBuilder.addOffset(1, offset_enums); |
| 4832 } |
| 4833 if (offset_executables != null) { |
| 4834 fbBuilder.addOffset(2, offset_executables); |
| 4835 } |
| 4836 if (offset_exports != null) { |
| 4837 fbBuilder.addOffset(3, offset_exports); |
| 4838 } |
| 4839 if (offset_imports != null) { |
| 4840 fbBuilder.addOffset(4, offset_imports); |
| 4841 } |
| 4842 if (offset_libraryAnnotations != null) { |
| 4843 fbBuilder.addOffset(5, offset_libraryAnnotations); |
| 4844 } |
| 4845 if (offset_libraryDocumentationComment != null) { |
| 4846 fbBuilder.addOffset(6, offset_libraryDocumentationComment); |
| 4847 } |
| 4827 if (offset_libraryName != null) { | 4848 if (offset_libraryName != null) { |
| 4828 fbBuilder.addOffset(0, offset_libraryName); | 4849 fbBuilder.addOffset(7, offset_libraryName); |
| 4850 } |
| 4851 if (_libraryNameLength != null && _libraryNameLength != 0) { |
| 4852 fbBuilder.addUint32(8, _libraryNameLength); |
| 4829 } | 4853 } |
| 4830 if (_libraryNameOffset != null && _libraryNameOffset != 0) { | 4854 if (_libraryNameOffset != null && _libraryNameOffset != 0) { |
| 4831 fbBuilder.addUint32(1, _libraryNameOffset); | 4855 fbBuilder.addUint32(9, _libraryNameOffset); |
| 4832 } | 4856 } |
| 4833 if (_libraryNameLength != null && _libraryNameLength != 0) { | 4857 if (offset_parts != null) { |
| 4834 fbBuilder.addUint32(2, _libraryNameLength); | 4858 fbBuilder.addOffset(10, offset_parts); |
| 4835 } | |
| 4836 if (offset_libraryDocumentationComment != null) { | |
| 4837 fbBuilder.addOffset(3, offset_libraryDocumentationComment); | |
| 4838 } | |
| 4839 if (offset_libraryAnnotations != null) { | |
| 4840 fbBuilder.addOffset(4, offset_libraryAnnotations); | |
| 4841 } | 4859 } |
| 4842 if (offset_publicNamespace != null) { | 4860 if (offset_publicNamespace != null) { |
| 4843 fbBuilder.addOffset(5, offset_publicNamespace); | 4861 fbBuilder.addOffset(11, offset_publicNamespace); |
| 4844 } | 4862 } |
| 4845 if (offset_references != null) { | 4863 if (offset_references != null) { |
| 4846 fbBuilder.addOffset(6, offset_references); | 4864 fbBuilder.addOffset(12, offset_references); |
| 4847 } | |
| 4848 if (offset_classes != null) { | |
| 4849 fbBuilder.addOffset(7, offset_classes); | |
| 4850 } | |
| 4851 if (offset_enums != null) { | |
| 4852 fbBuilder.addOffset(8, offset_enums); | |
| 4853 } | |
| 4854 if (offset_executables != null) { | |
| 4855 fbBuilder.addOffset(9, offset_executables); | |
| 4856 } | |
| 4857 if (offset_exports != null) { | |
| 4858 fbBuilder.addOffset(10, offset_exports); | |
| 4859 } | |
| 4860 if (offset_imports != null) { | |
| 4861 fbBuilder.addOffset(11, offset_imports); | |
| 4862 } | |
| 4863 if (offset_parts != null) { | |
| 4864 fbBuilder.addOffset(12, offset_parts); | |
| 4865 } | 4865 } |
| 4866 if (offset_typedefs != null) { | 4866 if (offset_typedefs != null) { |
| 4867 fbBuilder.addOffset(13, offset_typedefs); | 4867 fbBuilder.addOffset(13, offset_typedefs); |
| 4868 } | 4868 } |
| 4869 if (offset_variables != null) { | 4869 if (offset_variables != null) { |
| 4870 fbBuilder.addOffset(14, offset_variables); | 4870 fbBuilder.addOffset(14, offset_variables); |
| 4871 } | 4871 } |
| 4872 return fbBuilder.endTable(); | 4872 return fbBuilder.endTable(); |
| 4873 } | 4873 } |
| 4874 } | 4874 } |
| 4875 | 4875 |
| 4876 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) { | 4876 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) { |
| 4877 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); | 4877 fb.BufferPointer rootRef = new fb.BufferPointer.fromBytes(buffer); |
| 4878 return const _UnlinkedUnitReader().read(rootRef); | 4878 return const _UnlinkedUnitReader().read(rootRef); |
| 4879 } | 4879 } |
| 4880 | 4880 |
| 4881 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { | 4881 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { |
| 4882 const _UnlinkedUnitReader(); | 4882 const _UnlinkedUnitReader(); |
| 4883 | 4883 |
| 4884 @override | 4884 @override |
| 4885 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); | 4885 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); |
| 4886 } | 4886 } |
| 4887 | 4887 |
| 4888 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { | 4888 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { |
| 4889 final fb.BufferPointer _bp; | 4889 final fb.BufferPointer _bp; |
| 4890 | 4890 |
| 4891 _UnlinkedUnitImpl(this._bp); | 4891 _UnlinkedUnitImpl(this._bp); |
| 4892 | 4892 |
| 4893 String _libraryName; | |
| 4894 int _libraryNameOffset; | |
| 4895 int _libraryNameLength; | |
| 4896 idl.UnlinkedDocumentationComment _libraryDocumentationComment; | |
| 4897 List<idl.UnlinkedConst> _libraryAnnotations; | |
| 4898 idl.UnlinkedPublicNamespace _publicNamespace; | |
| 4899 List<idl.UnlinkedReference> _references; | |
| 4900 List<idl.UnlinkedClass> _classes; | 4893 List<idl.UnlinkedClass> _classes; |
| 4901 List<idl.UnlinkedEnum> _enums; | 4894 List<idl.UnlinkedEnum> _enums; |
| 4902 List<idl.UnlinkedExecutable> _executables; | 4895 List<idl.UnlinkedExecutable> _executables; |
| 4903 List<idl.UnlinkedExportNonPublic> _exports; | 4896 List<idl.UnlinkedExportNonPublic> _exports; |
| 4904 List<idl.UnlinkedImport> _imports; | 4897 List<idl.UnlinkedImport> _imports; |
| 4898 List<idl.UnlinkedConst> _libraryAnnotations; |
| 4899 idl.UnlinkedDocumentationComment _libraryDocumentationComment; |
| 4900 String _libraryName; |
| 4901 int _libraryNameLength; |
| 4902 int _libraryNameOffset; |
| 4905 List<idl.UnlinkedPart> _parts; | 4903 List<idl.UnlinkedPart> _parts; |
| 4904 idl.UnlinkedPublicNamespace _publicNamespace; |
| 4905 List<idl.UnlinkedReference> _references; |
| 4906 List<idl.UnlinkedTypedef> _typedefs; | 4906 List<idl.UnlinkedTypedef> _typedefs; |
| 4907 List<idl.UnlinkedVariable> _variables; | 4907 List<idl.UnlinkedVariable> _variables; |
| 4908 | 4908 |
| 4909 @override | 4909 @override |
| 4910 List<idl.UnlinkedClass> get classes { |
| 4911 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 0, const <idl.UnlinkedClass>[]); |
| 4912 return _classes; |
| 4913 } |
| 4914 |
| 4915 @override |
| 4916 List<idl.UnlinkedEnum> get enums { |
| 4917 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()
).vTableGet(_bp, 1, const <idl.UnlinkedEnum>[]); |
| 4918 return _enums; |
| 4919 } |
| 4920 |
| 4921 @override |
| 4922 List<idl.UnlinkedExecutable> get executables { |
| 4923 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]); |
| 4924 return _executables; |
| 4925 } |
| 4926 |
| 4927 @override |
| 4928 List<idl.UnlinkedExportNonPublic> get exports { |
| 4929 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>(const _Unlinke
dExportNonPublicReader()).vTableGet(_bp, 3, const <idl.UnlinkedExportNonPublic>[
]); |
| 4930 return _exports; |
| 4931 } |
| 4932 |
| 4933 @override |
| 4934 List<idl.UnlinkedImport> get imports { |
| 4935 _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportRe
ader()).vTableGet(_bp, 4, const <idl.UnlinkedImport>[]); |
| 4936 return _imports; |
| 4937 } |
| 4938 |
| 4939 @override |
| 4940 List<idl.UnlinkedConst> get libraryAnnotations { |
| 4941 _libraryAnnotations ??= const fb.ListReader<idl.UnlinkedConst>(const _Unlink
edConstReader()).vTableGet(_bp, 5, const <idl.UnlinkedConst>[]); |
| 4942 return _libraryAnnotations; |
| 4943 } |
| 4944 |
| 4945 @override |
| 4946 idl.UnlinkedDocumentationComment get libraryDocumentationComment { |
| 4947 _libraryDocumentationComment ??= const _UnlinkedDocumentationCommentReader()
.vTableGet(_bp, 6, null); |
| 4948 return _libraryDocumentationComment; |
| 4949 } |
| 4950 |
| 4951 @override |
| 4910 String get libraryName { | 4952 String get libraryName { |
| 4911 _libraryName ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 4953 _libraryName ??= const fb.StringReader().vTableGet(_bp, 7, ''); |
| 4912 return _libraryName; | 4954 return _libraryName; |
| 4913 } | 4955 } |
| 4914 | 4956 |
| 4915 @override | 4957 @override |
| 4958 int get libraryNameLength { |
| 4959 _libraryNameLength ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0); |
| 4960 return _libraryNameLength; |
| 4961 } |
| 4962 |
| 4963 @override |
| 4916 int get libraryNameOffset { | 4964 int get libraryNameOffset { |
| 4917 _libraryNameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 4965 _libraryNameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); |
| 4918 return _libraryNameOffset; | 4966 return _libraryNameOffset; |
| 4919 } | 4967 } |
| 4920 | 4968 |
| 4921 @override | 4969 @override |
| 4922 int get libraryNameLength { | 4970 List<idl.UnlinkedPart> get parts { |
| 4923 _libraryNameLength ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 4971 _parts ??= const fb.ListReader<idl.UnlinkedPart>(const _UnlinkedPartReader()
).vTableGet(_bp, 10, const <idl.UnlinkedPart>[]); |
| 4924 return _libraryNameLength; | 4972 return _parts; |
| 4925 } | |
| 4926 | |
| 4927 @override | |
| 4928 idl.UnlinkedDocumentationComment get libraryDocumentationComment { | |
| 4929 _libraryDocumentationComment ??= const _UnlinkedDocumentationCommentReader()
.vTableGet(_bp, 3, null); | |
| 4930 return _libraryDocumentationComment; | |
| 4931 } | |
| 4932 | |
| 4933 @override | |
| 4934 List<idl.UnlinkedConst> get libraryAnnotations { | |
| 4935 _libraryAnnotations ??= const fb.ListReader<idl.UnlinkedConst>(const _Unlink
edConstReader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); | |
| 4936 return _libraryAnnotations; | |
| 4937 } | 4973 } |
| 4938 | 4974 |
| 4939 @override | 4975 @override |
| 4940 idl.UnlinkedPublicNamespace get publicNamespace { | 4976 idl.UnlinkedPublicNamespace get publicNamespace { |
| 4941 _publicNamespace ??= const _UnlinkedPublicNamespaceReader().vTableGet(_bp, 5
, null); | 4977 _publicNamespace ??= const _UnlinkedPublicNamespaceReader().vTableGet(_bp, 1
1, null); |
| 4942 return _publicNamespace; | 4978 return _publicNamespace; |
| 4943 } | 4979 } |
| 4944 | 4980 |
| 4945 @override | 4981 @override |
| 4946 List<idl.UnlinkedReference> get references { | 4982 List<idl.UnlinkedReference> get references { |
| 4947 _references ??= const fb.ListReader<idl.UnlinkedReference>(const _UnlinkedRe
ferenceReader()).vTableGet(_bp, 6, const <idl.UnlinkedReference>[]); | 4983 _references ??= const fb.ListReader<idl.UnlinkedReference>(const _UnlinkedRe
ferenceReader()).vTableGet(_bp, 12, const <idl.UnlinkedReference>[]); |
| 4948 return _references; | 4984 return _references; |
| 4949 } | 4985 } |
| 4950 | 4986 |
| 4951 @override | 4987 @override |
| 4952 List<idl.UnlinkedClass> get classes { | |
| 4953 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 7, const <idl.UnlinkedClass>[]); | |
| 4954 return _classes; | |
| 4955 } | |
| 4956 | |
| 4957 @override | |
| 4958 List<idl.UnlinkedEnum> get enums { | |
| 4959 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()
).vTableGet(_bp, 8, const <idl.UnlinkedEnum>[]); | |
| 4960 return _enums; | |
| 4961 } | |
| 4962 | |
| 4963 @override | |
| 4964 List<idl.UnlinkedExecutable> get executables { | |
| 4965 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 9, const <idl.UnlinkedExecutable>[]); | |
| 4966 return _executables; | |
| 4967 } | |
| 4968 | |
| 4969 @override | |
| 4970 List<idl.UnlinkedExportNonPublic> get exports { | |
| 4971 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>(const _Unlinke
dExportNonPublicReader()).vTableGet(_bp, 10, const <idl.UnlinkedExportNonPublic>
[]); | |
| 4972 return _exports; | |
| 4973 } | |
| 4974 | |
| 4975 @override | |
| 4976 List<idl.UnlinkedImport> get imports { | |
| 4977 _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportRe
ader()).vTableGet(_bp, 11, const <idl.UnlinkedImport>[]); | |
| 4978 return _imports; | |
| 4979 } | |
| 4980 | |
| 4981 @override | |
| 4982 List<idl.UnlinkedPart> get parts { | |
| 4983 _parts ??= const fb.ListReader<idl.UnlinkedPart>(const _UnlinkedPartReader()
).vTableGet(_bp, 12, const <idl.UnlinkedPart>[]); | |
| 4984 return _parts; | |
| 4985 } | |
| 4986 | |
| 4987 @override | |
| 4988 List<idl.UnlinkedTypedef> get typedefs { | 4988 List<idl.UnlinkedTypedef> get typedefs { |
| 4989 _typedefs ??= const fb.ListReader<idl.UnlinkedTypedef>(const _UnlinkedTypede
fReader()).vTableGet(_bp, 13, const <idl.UnlinkedTypedef>[]); | 4989 _typedefs ??= const fb.ListReader<idl.UnlinkedTypedef>(const _UnlinkedTypede
fReader()).vTableGet(_bp, 13, const <idl.UnlinkedTypedef>[]); |
| 4990 return _typedefs; | 4990 return _typedefs; |
| 4991 } | 4991 } |
| 4992 | 4992 |
| 4993 @override | 4993 @override |
| 4994 List<idl.UnlinkedVariable> get variables { | 4994 List<idl.UnlinkedVariable> get variables { |
| 4995 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bp, 14, const <idl.UnlinkedVariable>[]); | 4995 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bp, 14, const <idl.UnlinkedVariable>[]); |
| 4996 return _variables; | 4996 return _variables; |
| 4997 } | 4997 } |
| 4998 } | 4998 } |
| 4999 | 4999 |
| 5000 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { | 5000 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { |
| 5001 @override | 5001 @override |
| 5002 Map<String, Object> toMap() => { | 5002 Map<String, Object> toMap() => { |
| 5003 "libraryName": libraryName, | |
| 5004 "libraryNameOffset": libraryNameOffset, | |
| 5005 "libraryNameLength": libraryNameLength, | |
| 5006 "libraryDocumentationComment": libraryDocumentationComment, | |
| 5007 "libraryAnnotations": libraryAnnotations, | |
| 5008 "publicNamespace": publicNamespace, | |
| 5009 "references": references, | |
| 5010 "classes": classes, | 5003 "classes": classes, |
| 5011 "enums": enums, | 5004 "enums": enums, |
| 5012 "executables": executables, | 5005 "executables": executables, |
| 5013 "exports": exports, | 5006 "exports": exports, |
| 5014 "imports": imports, | 5007 "imports": imports, |
| 5008 "libraryAnnotations": libraryAnnotations, |
| 5009 "libraryDocumentationComment": libraryDocumentationComment, |
| 5010 "libraryName": libraryName, |
| 5011 "libraryNameLength": libraryNameLength, |
| 5012 "libraryNameOffset": libraryNameOffset, |
| 5015 "parts": parts, | 5013 "parts": parts, |
| 5014 "publicNamespace": publicNamespace, |
| 5015 "references": references, |
| 5016 "typedefs": typedefs, | 5016 "typedefs": typedefs, |
| 5017 "variables": variables, | 5017 "variables": variables, |
| 5018 }; | 5018 }; |
| 5019 } | 5019 } |
| 5020 | 5020 |
| 5021 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { | 5021 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { |
| 5022 bool _finished = false; | 5022 bool _finished = false; |
| 5023 | 5023 |
| 5024 List<UnlinkedConstBuilder> _annotations; |
| 5025 UnlinkedConstBuilder _constExpr; |
| 5026 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 5027 int _inferredTypeSlot; |
| 5028 bool _isConst; |
| 5029 bool _isFinal; |
| 5030 bool _isStatic; |
| 5024 String _name; | 5031 String _name; |
| 5025 int _nameOffset; | 5032 int _nameOffset; |
| 5026 UnlinkedDocumentationCommentBuilder _documentationComment; | 5033 int _propagatedTypeSlot; |
| 5027 List<UnlinkedConstBuilder> _annotations; | |
| 5028 EntityRefBuilder _type; | 5034 EntityRefBuilder _type; |
| 5029 UnlinkedConstBuilder _constExpr; | |
| 5030 bool _isStatic; | |
| 5031 bool _isFinal; | |
| 5032 bool _isConst; | |
| 5033 int _propagatedTypeSlot; | |
| 5034 int _inferredTypeSlot; | |
| 5035 | 5035 |
| 5036 @override | 5036 @override |
| 5037 String get name => _name ??= ''; | 5037 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
| 5038 | 5038 |
| 5039 /** | 5039 /** |
| 5040 * Name of the variable. | 5040 * Annotations for this variable. |
| 5041 */ | 5041 */ |
| 5042 void set name(String _value) { | 5042 void set annotations(List<UnlinkedConstBuilder> _value) { |
| 5043 assert(!_finished); | 5043 assert(!_finished); |
| 5044 _name = _value; | 5044 _annotations = _value; |
| 5045 } | 5045 } |
| 5046 | 5046 |
| 5047 @override | 5047 @override |
| 5048 int get nameOffset => _nameOffset ??= 0; | 5048 UnlinkedConstBuilder get constExpr => _constExpr; |
| 5049 | 5049 |
| 5050 /** | 5050 /** |
| 5051 * Offset of the variable name relative to the beginning of the file. | 5051 * If [isConst] is true, and the variable has an initializer, the constant |
| 5052 * expression in the initializer. Note that the presence of this expression |
| 5053 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. |
| 5052 */ | 5054 */ |
| 5053 void set nameOffset(int _value) { | 5055 void set constExpr(UnlinkedConstBuilder _value) { |
| 5054 assert(!_finished); | 5056 assert(!_finished); |
| 5055 assert(_value == null || _value >= 0); | 5057 _constExpr = _value; |
| 5056 _nameOffset = _value; | |
| 5057 } | 5058 } |
| 5058 | 5059 |
| 5059 @override | 5060 @override |
| 5060 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 5061 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
| 5061 | 5062 |
| 5062 /** | 5063 /** |
| 5063 * Documentation comment for the variable, or `null` if there is no | 5064 * Documentation comment for the variable, or `null` if there is no |
| 5064 * documentation comment. | 5065 * documentation comment. |
| 5065 */ | 5066 */ |
| 5066 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 5067 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
| 5067 assert(!_finished); | 5068 assert(!_finished); |
| 5068 _documentationComment = _value; | 5069 _documentationComment = _value; |
| 5069 } | 5070 } |
| 5070 | 5071 |
| 5071 @override | 5072 @override |
| 5072 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 5073 int get inferredTypeSlot => _inferredTypeSlot ??= 0; |
| 5073 | 5074 |
| 5074 /** | 5075 /** |
| 5075 * Annotations for this variable. | 5076 * If this variable is inferable, nonzero slot id identifying which entry in |
| 5077 * [LinkedLibrary.types] contains the inferred type for this variable. If |
| 5078 * there is no matching entry in [LinkedLibrary.types], then no type was |
| 5079 * inferred for this variable, so its static type is `dynamic`. |
| 5076 */ | 5080 */ |
| 5077 void set annotations(List<UnlinkedConstBuilder> _value) { | 5081 void set inferredTypeSlot(int _value) { |
| 5078 assert(!_finished); | 5082 assert(!_finished); |
| 5079 _annotations = _value; | 5083 assert(_value == null || _value >= 0); |
| 5084 _inferredTypeSlot = _value; |
| 5080 } | 5085 } |
| 5081 | 5086 |
| 5082 @override | 5087 @override |
| 5083 EntityRefBuilder get type => _type; | 5088 bool get isConst => _isConst ??= false; |
| 5084 | 5089 |
| 5085 /** | 5090 /** |
| 5086 * Declared type of the variable. Absent if the type is implicit. | 5091 * Indicates whether the variable is declared using the `const` keyword. |
| 5087 */ | 5092 */ |
| 5088 void set type(EntityRefBuilder _value) { | 5093 void set isConst(bool _value) { |
| 5089 assert(!_finished); | 5094 assert(!_finished); |
| 5090 _type = _value; | 5095 _isConst = _value; |
| 5091 } | 5096 } |
| 5092 | 5097 |
| 5093 @override | 5098 @override |
| 5094 UnlinkedConstBuilder get constExpr => _constExpr; | 5099 bool get isFinal => _isFinal ??= false; |
| 5095 | 5100 |
| 5096 /** | 5101 /** |
| 5097 * If [isConst] is true, and the variable has an initializer, the constant | 5102 * Indicates whether the variable is declared using the `final` keyword. |
| 5098 * expression in the initializer. Note that the presence of this expression | |
| 5099 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. | |
| 5100 */ | 5103 */ |
| 5101 void set constExpr(UnlinkedConstBuilder _value) { | 5104 void set isFinal(bool _value) { |
| 5102 assert(!_finished); | 5105 assert(!_finished); |
| 5103 _constExpr = _value; | 5106 _isFinal = _value; |
| 5104 } | 5107 } |
| 5105 | 5108 |
| 5106 @override | 5109 @override |
| 5107 bool get isStatic => _isStatic ??= false; | 5110 bool get isStatic => _isStatic ??= false; |
| 5108 | 5111 |
| 5109 /** | 5112 /** |
| 5110 * Indicates whether the variable is declared using the `static` keyword. | 5113 * Indicates whether the variable is declared using the `static` keyword. |
| 5111 * | 5114 * |
| 5112 * Note that for top level variables, this flag is false, since they are not | 5115 * Note that for top level variables, this flag is false, since they are not |
| 5113 * declared using the `static` keyword (even though they are considered | 5116 * declared using the `static` keyword (even though they are considered |
| 5114 * static for semantic purposes). | 5117 * static for semantic purposes). |
| 5115 */ | 5118 */ |
| 5116 void set isStatic(bool _value) { | 5119 void set isStatic(bool _value) { |
| 5117 assert(!_finished); | 5120 assert(!_finished); |
| 5118 _isStatic = _value; | 5121 _isStatic = _value; |
| 5119 } | 5122 } |
| 5120 | 5123 |
| 5121 @override | 5124 @override |
| 5122 bool get isFinal => _isFinal ??= false; | 5125 String get name => _name ??= ''; |
| 5123 | 5126 |
| 5124 /** | 5127 /** |
| 5125 * Indicates whether the variable is declared using the `final` keyword. | 5128 * Name of the variable. |
| 5126 */ | 5129 */ |
| 5127 void set isFinal(bool _value) { | 5130 void set name(String _value) { |
| 5128 assert(!_finished); | 5131 assert(!_finished); |
| 5129 _isFinal = _value; | 5132 _name = _value; |
| 5130 } | 5133 } |
| 5131 | 5134 |
| 5132 @override | 5135 @override |
| 5133 bool get isConst => _isConst ??= false; | 5136 int get nameOffset => _nameOffset ??= 0; |
| 5134 | 5137 |
| 5135 /** | 5138 /** |
| 5136 * Indicates whether the variable is declared using the `const` keyword. | 5139 * Offset of the variable name relative to the beginning of the file. |
| 5137 */ | 5140 */ |
| 5138 void set isConst(bool _value) { | 5141 void set nameOffset(int _value) { |
| 5139 assert(!_finished); | 5142 assert(!_finished); |
| 5140 _isConst = _value; | 5143 assert(_value == null || _value >= 0); |
| 5144 _nameOffset = _value; |
| 5141 } | 5145 } |
| 5142 | 5146 |
| 5143 @override | 5147 @override |
| 5144 int get propagatedTypeSlot => _propagatedTypeSlot ??= 0; | 5148 int get propagatedTypeSlot => _propagatedTypeSlot ??= 0; |
| 5145 | 5149 |
| 5146 /** | 5150 /** |
| 5147 * If this variable is propagable, nonzero slot id identifying which entry in | 5151 * If this variable is propagable, nonzero slot id identifying which entry in |
| 5148 * [LinkedLibrary.types] contains the propagated type for this variable. If | 5152 * [LinkedLibrary.types] contains the propagated type for this variable. If |
| 5149 * there is no matching entry in [LinkedLibrary.types], then this variable's | 5153 * there is no matching entry in [LinkedLibrary.types], then this variable's |
| 5150 * propagated type is the same as its declared type. | 5154 * propagated type is the same as its declared type. |
| 5151 * | 5155 * |
| 5152 * Non-propagable variables have a [propagatedTypeSlot] of zero. | 5156 * Non-propagable variables have a [propagatedTypeSlot] of zero. |
| 5153 */ | 5157 */ |
| 5154 void set propagatedTypeSlot(int _value) { | 5158 void set propagatedTypeSlot(int _value) { |
| 5155 assert(!_finished); | 5159 assert(!_finished); |
| 5156 assert(_value == null || _value >= 0); | 5160 assert(_value == null || _value >= 0); |
| 5157 _propagatedTypeSlot = _value; | 5161 _propagatedTypeSlot = _value; |
| 5158 } | 5162 } |
| 5159 | 5163 |
| 5160 @override | 5164 @override |
| 5161 int get inferredTypeSlot => _inferredTypeSlot ??= 0; | 5165 EntityRefBuilder get type => _type; |
| 5162 | 5166 |
| 5163 /** | 5167 /** |
| 5164 * If this variable is inferable, nonzero slot id identifying which entry in | 5168 * Declared type of the variable. Absent if the type is implicit. |
| 5165 * [LinkedLibrary.types] contains the inferred type for this variable. If | |
| 5166 * there is no matching entry in [LinkedLibrary.types], then no type was | |
| 5167 * inferred for this variable, so its static type is `dynamic`. | |
| 5168 */ | 5169 */ |
| 5169 void set inferredTypeSlot(int _value) { | 5170 void set type(EntityRefBuilder _value) { |
| 5170 assert(!_finished); | 5171 assert(!_finished); |
| 5171 assert(_value == null || _value >= 0); | 5172 _type = _value; |
| 5172 _inferredTypeSlot = _value; | |
| 5173 } | 5173 } |
| 5174 | 5174 |
| 5175 UnlinkedVariableBuilder({String name, int nameOffset, UnlinkedDocumentationCom
mentBuilder documentationComment, List<UnlinkedConstBuilder> annotations, Entity
RefBuilder type, UnlinkedConstBuilder constExpr, bool isStatic, bool isFinal, bo
ol isConst, int propagatedTypeSlot, int inferredTypeSlot}) | 5175 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConst
Builder constExpr, UnlinkedDocumentationCommentBuilder documentationComment, int
inferredTypeSlot, bool isConst, bool isFinal, bool isStatic, String name, int n
ameOffset, int propagatedTypeSlot, EntityRefBuilder type}) |
| 5176 : _name = name, | 5176 : _annotations = annotations, |
| 5177 _constExpr = constExpr, |
| 5178 _documentationComment = documentationComment, |
| 5179 _inferredTypeSlot = inferredTypeSlot, |
| 5180 _isConst = isConst, |
| 5181 _isFinal = isFinal, |
| 5182 _isStatic = isStatic, |
| 5183 _name = name, |
| 5177 _nameOffset = nameOffset, | 5184 _nameOffset = nameOffset, |
| 5178 _documentationComment = documentationComment, | |
| 5179 _annotations = annotations, | |
| 5180 _type = type, | |
| 5181 _constExpr = constExpr, | |
| 5182 _isStatic = isStatic, | |
| 5183 _isFinal = isFinal, | |
| 5184 _isConst = isConst, | |
| 5185 _propagatedTypeSlot = propagatedTypeSlot, | 5185 _propagatedTypeSlot = propagatedTypeSlot, |
| 5186 _inferredTypeSlot = inferredTypeSlot; | 5186 _type = type; |
| 5187 | 5187 |
| 5188 fb.Offset finish(fb.Builder fbBuilder) { | 5188 fb.Offset finish(fb.Builder fbBuilder) { |
| 5189 assert(!_finished); | 5189 assert(!_finished); |
| 5190 _finished = true; | 5190 _finished = true; |
| 5191 fb.Offset offset_annotations; |
| 5192 fb.Offset offset_constExpr; |
| 5193 fb.Offset offset_documentationComment; |
| 5191 fb.Offset offset_name; | 5194 fb.Offset offset_name; |
| 5192 fb.Offset offset_documentationComment; | |
| 5193 fb.Offset offset_annotations; | |
| 5194 fb.Offset offset_type; | 5195 fb.Offset offset_type; |
| 5195 fb.Offset offset_constExpr; | 5196 if (!(_annotations == null || _annotations.isEmpty)) { |
| 5196 if (_name != null) { | 5197 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
| 5197 offset_name = fbBuilder.writeString(_name); | 5198 } |
| 5199 if (_constExpr != null) { |
| 5200 offset_constExpr = _constExpr.finish(fbBuilder); |
| 5198 } | 5201 } |
| 5199 if (_documentationComment != null) { | 5202 if (_documentationComment != null) { |
| 5200 offset_documentationComment = _documentationComment.finish(fbBuilder); | 5203 offset_documentationComment = _documentationComment.finish(fbBuilder); |
| 5201 } | 5204 } |
| 5202 if (!(_annotations == null || _annotations.isEmpty)) { | 5205 if (_name != null) { |
| 5203 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 5206 offset_name = fbBuilder.writeString(_name); |
| 5204 } | 5207 } |
| 5205 if (_type != null) { | 5208 if (_type != null) { |
| 5206 offset_type = _type.finish(fbBuilder); | 5209 offset_type = _type.finish(fbBuilder); |
| 5207 } | 5210 } |
| 5208 if (_constExpr != null) { | 5211 fbBuilder.startTable(); |
| 5209 offset_constExpr = _constExpr.finish(fbBuilder); | 5212 if (offset_annotations != null) { |
| 5213 fbBuilder.addOffset(0, offset_annotations); |
| 5210 } | 5214 } |
| 5211 fbBuilder.startTable(); | 5215 if (offset_constExpr != null) { |
| 5212 if (offset_name != null) { | 5216 fbBuilder.addOffset(1, offset_constExpr); |
| 5213 fbBuilder.addOffset(0, offset_name); | |
| 5214 } | |
| 5215 if (_nameOffset != null && _nameOffset != 0) { | |
| 5216 fbBuilder.addUint32(1, _nameOffset); | |
| 5217 } | 5217 } |
| 5218 if (offset_documentationComment != null) { | 5218 if (offset_documentationComment != null) { |
| 5219 fbBuilder.addOffset(2, offset_documentationComment); | 5219 fbBuilder.addOffset(2, offset_documentationComment); |
| 5220 } | 5220 } |
| 5221 if (offset_annotations != null) { | 5221 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
| 5222 fbBuilder.addOffset(3, offset_annotations); | 5222 fbBuilder.addUint32(3, _inferredTypeSlot); |
| 5223 } | 5223 } |
| 5224 if (offset_type != null) { | 5224 if (_isConst == true) { |
| 5225 fbBuilder.addOffset(4, offset_type); | 5225 fbBuilder.addBool(4, true); |
| 5226 } | 5226 } |
| 5227 if (offset_constExpr != null) { | 5227 if (_isFinal == true) { |
| 5228 fbBuilder.addOffset(5, offset_constExpr); | 5228 fbBuilder.addBool(5, true); |
| 5229 } | 5229 } |
| 5230 if (_isStatic == true) { | 5230 if (_isStatic == true) { |
| 5231 fbBuilder.addBool(6, true); | 5231 fbBuilder.addBool(6, true); |
| 5232 } | 5232 } |
| 5233 if (_isFinal == true) { | 5233 if (offset_name != null) { |
| 5234 fbBuilder.addBool(7, true); | 5234 fbBuilder.addOffset(7, offset_name); |
| 5235 } | 5235 } |
| 5236 if (_isConst == true) { | 5236 if (_nameOffset != null && _nameOffset != 0) { |
| 5237 fbBuilder.addBool(8, true); | 5237 fbBuilder.addUint32(8, _nameOffset); |
| 5238 } | 5238 } |
| 5239 if (_propagatedTypeSlot != null && _propagatedTypeSlot != 0) { | 5239 if (_propagatedTypeSlot != null && _propagatedTypeSlot != 0) { |
| 5240 fbBuilder.addUint32(9, _propagatedTypeSlot); | 5240 fbBuilder.addUint32(9, _propagatedTypeSlot); |
| 5241 } | 5241 } |
| 5242 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | 5242 if (offset_type != null) { |
| 5243 fbBuilder.addUint32(10, _inferredTypeSlot); | 5243 fbBuilder.addOffset(10, offset_type); |
| 5244 } | 5244 } |
| 5245 return fbBuilder.endTable(); | 5245 return fbBuilder.endTable(); |
| 5246 } | 5246 } |
| 5247 } | 5247 } |
| 5248 | 5248 |
| 5249 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> { | 5249 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> { |
| 5250 const _UnlinkedVariableReader(); | 5250 const _UnlinkedVariableReader(); |
| 5251 | 5251 |
| 5252 @override | 5252 @override |
| 5253 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab
leImpl(bp); | 5253 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab
leImpl(bp); |
| 5254 } | 5254 } |
| 5255 | 5255 |
| 5256 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { | 5256 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { |
| 5257 final fb.BufferPointer _bp; | 5257 final fb.BufferPointer _bp; |
| 5258 | 5258 |
| 5259 _UnlinkedVariableImpl(this._bp); | 5259 _UnlinkedVariableImpl(this._bp); |
| 5260 | 5260 |
| 5261 List<idl.UnlinkedConst> _annotations; |
| 5262 idl.UnlinkedConst _constExpr; |
| 5263 idl.UnlinkedDocumentationComment _documentationComment; |
| 5264 int _inferredTypeSlot; |
| 5265 bool _isConst; |
| 5266 bool _isFinal; |
| 5267 bool _isStatic; |
| 5261 String _name; | 5268 String _name; |
| 5262 int _nameOffset; | 5269 int _nameOffset; |
| 5263 idl.UnlinkedDocumentationComment _documentationComment; | 5270 int _propagatedTypeSlot; |
| 5264 List<idl.UnlinkedConst> _annotations; | |
| 5265 idl.EntityRef _type; | 5271 idl.EntityRef _type; |
| 5266 idl.UnlinkedConst _constExpr; | |
| 5267 bool _isStatic; | |
| 5268 bool _isFinal; | |
| 5269 bool _isConst; | |
| 5270 int _propagatedTypeSlot; | |
| 5271 int _inferredTypeSlot; | |
| 5272 | 5272 |
| 5273 @override | 5273 @override |
| 5274 String get name { | 5274 List<idl.UnlinkedConst> get annotations { |
| 5275 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 5275 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 0, const <idl.UnlinkedConst>[]); |
| 5276 return _name; | 5276 return _annotations; |
| 5277 } | 5277 } |
| 5278 | 5278 |
| 5279 @override | 5279 @override |
| 5280 int get nameOffset { | 5280 idl.UnlinkedConst get constExpr { |
| 5281 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 5281 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 1, null); |
| 5282 return _nameOffset; | 5282 return _constExpr; |
| 5283 } | 5283 } |
| 5284 | 5284 |
| 5285 @override | 5285 @override |
| 5286 idl.UnlinkedDocumentationComment get documentationComment { | 5286 idl.UnlinkedDocumentationComment get documentationComment { |
| 5287 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); | 5287 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 2, null); |
| 5288 return _documentationComment; | 5288 return _documentationComment; |
| 5289 } | 5289 } |
| 5290 | 5290 |
| 5291 @override | 5291 @override |
| 5292 List<idl.UnlinkedConst> get annotations { | 5292 int get inferredTypeSlot { |
| 5293 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | 5293 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 3, 0); |
| 5294 return _annotations; | 5294 return _inferredTypeSlot; |
| 5295 } | 5295 } |
| 5296 | 5296 |
| 5297 @override | 5297 @override |
| 5298 idl.EntityRef get type { | 5298 bool get isConst { |
| 5299 _type ??= const _EntityRefReader().vTableGet(_bp, 4, null); | 5299 _isConst ??= const fb.BoolReader().vTableGet(_bp, 4, false); |
| 5300 return _type; | 5300 return _isConst; |
| 5301 } | 5301 } |
| 5302 | 5302 |
| 5303 @override | 5303 @override |
| 5304 idl.UnlinkedConst get constExpr { | 5304 bool get isFinal { |
| 5305 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 5, null); | 5305 _isFinal ??= const fb.BoolReader().vTableGet(_bp, 5, false); |
| 5306 return _constExpr; | 5306 return _isFinal; |
| 5307 } | 5307 } |
| 5308 | 5308 |
| 5309 @override | 5309 @override |
| 5310 bool get isStatic { | 5310 bool get isStatic { |
| 5311 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 6, false); | 5311 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 6, false); |
| 5312 return _isStatic; | 5312 return _isStatic; |
| 5313 } | 5313 } |
| 5314 | 5314 |
| 5315 @override | 5315 @override |
| 5316 bool get isFinal { | 5316 String get name { |
| 5317 _isFinal ??= const fb.BoolReader().vTableGet(_bp, 7, false); | 5317 _name ??= const fb.StringReader().vTableGet(_bp, 7, ''); |
| 5318 return _isFinal; | 5318 return _name; |
| 5319 } | 5319 } |
| 5320 | 5320 |
| 5321 @override | 5321 @override |
| 5322 bool get isConst { | 5322 int get nameOffset { |
| 5323 _isConst ??= const fb.BoolReader().vTableGet(_bp, 8, false); | 5323 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0); |
| 5324 return _isConst; | 5324 return _nameOffset; |
| 5325 } | 5325 } |
| 5326 | 5326 |
| 5327 @override | 5327 @override |
| 5328 int get propagatedTypeSlot { | 5328 int get propagatedTypeSlot { |
| 5329 _propagatedTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); | 5329 _propagatedTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); |
| 5330 return _propagatedTypeSlot; | 5330 return _propagatedTypeSlot; |
| 5331 } | 5331 } |
| 5332 | 5332 |
| 5333 @override | 5333 @override |
| 5334 int get inferredTypeSlot { | 5334 idl.EntityRef get type { |
| 5335 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 10, 0); | 5335 _type ??= const _EntityRefReader().vTableGet(_bp, 10, null); |
| 5336 return _inferredTypeSlot; | 5336 return _type; |
| 5337 } | 5337 } |
| 5338 } | 5338 } |
| 5339 | 5339 |
| 5340 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { | 5340 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { |
| 5341 @override | 5341 @override |
| 5342 Map<String, Object> toMap() => { | 5342 Map<String, Object> toMap() => { |
| 5343 "annotations": annotations, |
| 5344 "constExpr": constExpr, |
| 5345 "documentationComment": documentationComment, |
| 5346 "inferredTypeSlot": inferredTypeSlot, |
| 5347 "isConst": isConst, |
| 5348 "isFinal": isFinal, |
| 5349 "isStatic": isStatic, |
| 5343 "name": name, | 5350 "name": name, |
| 5344 "nameOffset": nameOffset, | 5351 "nameOffset": nameOffset, |
| 5345 "documentationComment": documentationComment, | 5352 "propagatedTypeSlot": propagatedTypeSlot, |
| 5346 "annotations": annotations, | |
| 5347 "type": type, | 5353 "type": type, |
| 5348 "constExpr": constExpr, | |
| 5349 "isStatic": isStatic, | |
| 5350 "isFinal": isFinal, | |
| 5351 "isConst": isConst, | |
| 5352 "propagatedTypeSlot": propagatedTypeSlot, | |
| 5353 "inferredTypeSlot": inferredTypeSlot, | |
| 5354 }; | 5354 }; |
| 5355 } | 5355 } |
| 5356 | 5356 |
| OLD | NEW |