| 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 'base.dart' as base; | 10 import 'base.dart' as base; |
| 11 import 'flat_buffers.dart' as fb; | 11 import 'flat_buffers.dart' as fb; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * Enum used to indicate the kind of entity referred to by a | 14 * Enum used to indicate the kind of entity referred to by a |
| 15 * [LinkedReference]. | 15 * [LinkedReference]. |
| 16 */ | 16 */ |
| 17 enum ReferenceKind { | 17 enum ReferenceKind { |
| 18 /** | 18 /** |
| 19 * The entity is a class or enum. | 19 * The entity is a class or enum. |
| 20 */ | 20 */ |
| 21 classOrEnum, | 21 classOrEnum, |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * The entity is a constructor. | 24 * The entity is a constructor. |
| 25 */ | 25 */ |
| 26 constructor, | 26 constructor, |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * The entity is a static const field. |
| 30 */ |
| 31 constField, |
| 32 |
| 33 /** |
| 29 * The entity is a static method. | 34 * The entity is a static method. |
| 30 */ | 35 */ |
| 31 staticMethod, | 36 staticMethod, |
| 32 | 37 |
| 33 /** | 38 /** |
| 34 * The entity is a typedef. | 39 * The entity is a typedef. |
| 35 */ | 40 */ |
| 36 typedef, | 41 typedef, |
| 37 | 42 |
| 38 /** | 43 /** |
| (...skipping 4338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4377 "uriEnd": uriEnd, | 4382 "uriEnd": uriEnd, |
| 4378 }; | 4383 }; |
| 4379 } | 4384 } |
| 4380 | 4385 |
| 4381 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp
lements UnlinkedPublicName { | 4386 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp
lements UnlinkedPublicName { |
| 4382 bool _finished = false; | 4387 bool _finished = false; |
| 4383 | 4388 |
| 4384 String _name; | 4389 String _name; |
| 4385 ReferenceKind _kind; | 4390 ReferenceKind _kind; |
| 4386 int _numTypeParameters; | 4391 int _numTypeParameters; |
| 4387 List<UnlinkedPublicNameBuilder> _executables; | 4392 List<UnlinkedPublicNameBuilder> _constMembers; |
| 4388 | 4393 |
| 4389 @override | 4394 @override |
| 4390 String get name => _name ??= ''; | 4395 String get name => _name ??= ''; |
| 4391 | 4396 |
| 4392 /** | 4397 /** |
| 4393 * The name itself. | 4398 * The name itself. |
| 4394 */ | 4399 */ |
| 4395 void set name(String _value) { | 4400 void set name(String _value) { |
| 4396 assert(!_finished); | 4401 assert(!_finished); |
| 4397 _name = _value; | 4402 _name = _value; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4415 * If the entity being referred to is generic, the number of type parameters | 4420 * If the entity being referred to is generic, the number of type parameters |
| 4416 * it accepts. Otherwise zero. | 4421 * it accepts. Otherwise zero. |
| 4417 */ | 4422 */ |
| 4418 void set numTypeParameters(int _value) { | 4423 void set numTypeParameters(int _value) { |
| 4419 assert(!_finished); | 4424 assert(!_finished); |
| 4420 assert(_value == null || _value >= 0); | 4425 assert(_value == null || _value >= 0); |
| 4421 _numTypeParameters = _value; | 4426 _numTypeParameters = _value; |
| 4422 } | 4427 } |
| 4423 | 4428 |
| 4424 @override | 4429 @override |
| 4425 List<UnlinkedPublicNameBuilder> get executables => _executables ??= <UnlinkedP
ublicNameBuilder>[]; | 4430 List<UnlinkedPublicNameBuilder> get constMembers => _constMembers ??= <Unlinke
dPublicNameBuilder>[]; |
| 4426 | 4431 |
| 4427 /** | 4432 /** |
| 4428 * If this [UnlinkedPublicName] is a class, the list of static methods | 4433 * If this [UnlinkedPublicName] is a class, the list of members which can be |
| 4429 * and constructors. Otherwise empty. | 4434 * referenced from constants - static constant fields, static methods, and |
| 4435 * constructors. Otherwise empty. |
| 4430 */ | 4436 */ |
| 4431 void set executables(List<UnlinkedPublicNameBuilder> _value) { | 4437 void set constMembers(List<UnlinkedPublicNameBuilder> _value) { |
| 4432 assert(!_finished); | 4438 assert(!_finished); |
| 4433 _executables = _value; | 4439 _constMembers = _value; |
| 4434 } | 4440 } |
| 4435 | 4441 |
| 4436 UnlinkedPublicNameBuilder({String name, ReferenceKind kind, int numTypeParamet
ers, List<UnlinkedPublicNameBuilder> executables}) | 4442 UnlinkedPublicNameBuilder({String name, ReferenceKind kind, int numTypeParamet
ers, List<UnlinkedPublicNameBuilder> constMembers}) |
| 4437 : _name = name, | 4443 : _name = name, |
| 4438 _kind = kind, | 4444 _kind = kind, |
| 4439 _numTypeParameters = numTypeParameters, | 4445 _numTypeParameters = numTypeParameters, |
| 4440 _executables = executables; | 4446 _constMembers = constMembers; |
| 4441 | 4447 |
| 4442 fb.Offset finish(fb.Builder fbBuilder) { | 4448 fb.Offset finish(fb.Builder fbBuilder) { |
| 4443 assert(!_finished); | 4449 assert(!_finished); |
| 4444 _finished = true; | 4450 _finished = true; |
| 4445 fb.Offset offset_name; | 4451 fb.Offset offset_name; |
| 4446 fb.Offset offset_executables; | 4452 fb.Offset offset_constMembers; |
| 4447 if (_name != null) { | 4453 if (_name != null) { |
| 4448 offset_name = fbBuilder.writeString(_name); | 4454 offset_name = fbBuilder.writeString(_name); |
| 4449 } | 4455 } |
| 4450 if (!(_executables == null || _executables.isEmpty)) { | 4456 if (!(_constMembers == null || _constMembers.isEmpty)) { |
| 4451 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | 4457 offset_constMembers = fbBuilder.writeList(_constMembers.map((b) => b.finis
h(fbBuilder)).toList()); |
| 4452 } | 4458 } |
| 4453 fbBuilder.startTable(); | 4459 fbBuilder.startTable(); |
| 4454 if (offset_name != null) { | 4460 if (offset_name != null) { |
| 4455 fbBuilder.addOffset(0, offset_name); | 4461 fbBuilder.addOffset(0, offset_name); |
| 4456 } | 4462 } |
| 4457 if (_kind != null && _kind != ReferenceKind.classOrEnum) { | 4463 if (_kind != null && _kind != ReferenceKind.classOrEnum) { |
| 4458 fbBuilder.addUint32(1, _kind.index); | 4464 fbBuilder.addUint32(1, _kind.index); |
| 4459 } | 4465 } |
| 4460 if (_numTypeParameters != null && _numTypeParameters != 0) { | 4466 if (_numTypeParameters != null && _numTypeParameters != 0) { |
| 4461 fbBuilder.addUint32(2, _numTypeParameters); | 4467 fbBuilder.addUint32(2, _numTypeParameters); |
| 4462 } | 4468 } |
| 4463 if (offset_executables != null) { | 4469 if (offset_constMembers != null) { |
| 4464 fbBuilder.addOffset(3, offset_executables); | 4470 fbBuilder.addOffset(3, offset_constMembers); |
| 4465 } | 4471 } |
| 4466 return fbBuilder.endTable(); | 4472 return fbBuilder.endTable(); |
| 4467 } | 4473 } |
| 4468 } | 4474 } |
| 4469 | 4475 |
| 4470 /** | 4476 /** |
| 4471 * Unlinked summary information about a specific name contributed by a | 4477 * Unlinked summary information about a specific name contributed by a |
| 4472 * compilation unit to a library's public namespace. | 4478 * compilation unit to a library's public namespace. |
| 4473 * | 4479 * |
| 4474 * TODO(paulberry): add a count of generic parameters, so that resynthesis | 4480 * TODO(paulberry): add a count of generic parameters, so that resynthesis |
| (...skipping 15 matching lines...) Expand all Loading... |
| 4490 */ | 4496 */ |
| 4491 ReferenceKind get kind; | 4497 ReferenceKind get kind; |
| 4492 | 4498 |
| 4493 /** | 4499 /** |
| 4494 * If the entity being referred to is generic, the number of type parameters | 4500 * If the entity being referred to is generic, the number of type parameters |
| 4495 * it accepts. Otherwise zero. | 4501 * it accepts. Otherwise zero. |
| 4496 */ | 4502 */ |
| 4497 int get numTypeParameters; | 4503 int get numTypeParameters; |
| 4498 | 4504 |
| 4499 /** | 4505 /** |
| 4500 * If this [UnlinkedPublicName] is a class, the list of static methods | 4506 * If this [UnlinkedPublicName] is a class, the list of members which can be |
| 4501 * and constructors. Otherwise empty. | 4507 * referenced from constants - static constant fields, static methods, and |
| 4508 * constructors. Otherwise empty. |
| 4502 */ | 4509 */ |
| 4503 List<UnlinkedPublicName> get executables; | 4510 List<UnlinkedPublicName> get constMembers; |
| 4504 } | 4511 } |
| 4505 | 4512 |
| 4506 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl>
{ | 4513 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl>
{ |
| 4507 const _UnlinkedPublicNameReader(); | 4514 const _UnlinkedPublicNameReader(); |
| 4508 | 4515 |
| 4509 @override | 4516 @override |
| 4510 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl
icNameImpl(bp); | 4517 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl
icNameImpl(bp); |
| 4511 } | 4518 } |
| 4512 | 4519 |
| 4513 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple
ments UnlinkedPublicName { | 4520 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple
ments UnlinkedPublicName { |
| 4514 final fb.BufferPointer _bp; | 4521 final fb.BufferPointer _bp; |
| 4515 | 4522 |
| 4516 _UnlinkedPublicNameImpl(this._bp); | 4523 _UnlinkedPublicNameImpl(this._bp); |
| 4517 | 4524 |
| 4518 String _name; | 4525 String _name; |
| 4519 ReferenceKind _kind; | 4526 ReferenceKind _kind; |
| 4520 int _numTypeParameters; | 4527 int _numTypeParameters; |
| 4521 List<UnlinkedPublicName> _executables; | 4528 List<UnlinkedPublicName> _constMembers; |
| 4522 | 4529 |
| 4523 @override | 4530 @override |
| 4524 String get name { | 4531 String get name { |
| 4525 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 4532 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
| 4526 return _name; | 4533 return _name; |
| 4527 } | 4534 } |
| 4528 | 4535 |
| 4529 @override | 4536 @override |
| 4530 ReferenceKind get kind { | 4537 ReferenceKind get kind { |
| 4531 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, ReferenceKind.class
OrEnum); | 4538 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 1, ReferenceKind.class
OrEnum); |
| 4532 return _kind; | 4539 return _kind; |
| 4533 } | 4540 } |
| 4534 | 4541 |
| 4535 @override | 4542 @override |
| 4536 int get numTypeParameters { | 4543 int get numTypeParameters { |
| 4537 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 4544 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
| 4538 return _numTypeParameters; | 4545 return _numTypeParameters; |
| 4539 } | 4546 } |
| 4540 | 4547 |
| 4541 @override | 4548 @override |
| 4542 List<UnlinkedPublicName> get executables { | 4549 List<UnlinkedPublicName> get constMembers { |
| 4543 _executables ??= const fb.ListReader<UnlinkedPublicName>(const _UnlinkedPubl
icNameReader()).vTableGet(_bp, 3, const <UnlinkedPublicName>[]); | 4550 _constMembers ??= const fb.ListReader<UnlinkedPublicName>(const _UnlinkedPub
licNameReader()).vTableGet(_bp, 3, const <UnlinkedPublicName>[]); |
| 4544 return _executables; | 4551 return _constMembers; |
| 4545 } | 4552 } |
| 4546 } | 4553 } |
| 4547 | 4554 |
| 4548 abstract class _UnlinkedPublicNameMixin implements UnlinkedPublicName { | 4555 abstract class _UnlinkedPublicNameMixin implements UnlinkedPublicName { |
| 4549 @override | 4556 @override |
| 4550 Map<String, Object> toMap() => { | 4557 Map<String, Object> toMap() => { |
| 4551 "name": name, | 4558 "name": name, |
| 4552 "kind": kind, | 4559 "kind": kind, |
| 4553 "numTypeParameters": numTypeParameters, | 4560 "numTypeParameters": numTypeParameters, |
| 4554 "executables": executables, | 4561 "constMembers": constMembers, |
| 4555 }; | 4562 }; |
| 4556 } | 4563 } |
| 4557 | 4564 |
| 4558 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac
eMixin implements UnlinkedPublicNamespace { | 4565 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac
eMixin implements UnlinkedPublicNamespace { |
| 4559 bool _finished = false; | 4566 bool _finished = false; |
| 4560 | 4567 |
| 4561 List<UnlinkedPublicNameBuilder> _names; | 4568 List<UnlinkedPublicNameBuilder> _names; |
| 4562 List<UnlinkedExportPublicBuilder> _exports; | 4569 List<UnlinkedExportPublicBuilder> _exports; |
| 4563 List<String> _parts; | 4570 List<String> _parts; |
| 4564 | 4571 |
| (...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6094 "type": type, | 6101 "type": type, |
| 6095 "constExpr": constExpr, | 6102 "constExpr": constExpr, |
| 6096 "isStatic": isStatic, | 6103 "isStatic": isStatic, |
| 6097 "isFinal": isFinal, | 6104 "isFinal": isFinal, |
| 6098 "isConst": isConst, | 6105 "isConst": isConst, |
| 6099 "propagatedTypeSlot": propagatedTypeSlot, | 6106 "propagatedTypeSlot": propagatedTypeSlot, |
| 6100 "inferredTypeSlot": inferredTypeSlot, | 6107 "inferredTypeSlot": inferredTypeSlot, |
| 6101 }; | 6108 }; |
| 6102 } | 6109 } |
| 6103 | 6110 |
| OLD | NEW |