| 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 4703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4714 "unitUnitUris": unitUnitUris, | 4714 "unitUnitUris": unitUnitUris, |
| 4715 }; | 4715 }; |
| 4716 | 4716 |
| 4717 @override | 4717 @override |
| 4718 String toString() => convert.JSON.encode(toJson()); | 4718 String toString() => convert.JSON.encode(toJson()); |
| 4719 } | 4719 } |
| 4720 | 4720 |
| 4721 class TopLevelInferenceErrorBuilder extends Object | 4721 class TopLevelInferenceErrorBuilder extends Object |
| 4722 with _TopLevelInferenceErrorMixin | 4722 with _TopLevelInferenceErrorMixin |
| 4723 implements idl.TopLevelInferenceError { | 4723 implements idl.TopLevelInferenceError { |
| 4724 List<String> _arguments; |
| 4724 idl.TopLevelInferenceErrorKind _kind; | 4725 idl.TopLevelInferenceErrorKind _kind; |
| 4725 int _slot; | 4726 int _slot; |
| 4726 | 4727 |
| 4727 @override | 4728 @override |
| 4729 List<String> get arguments => _arguments ??= <String>[]; |
| 4730 |
| 4731 /** |
| 4732 * The [kind] specific arguments. |
| 4733 */ |
| 4734 void set arguments(List<String> value) { |
| 4735 this._arguments = value; |
| 4736 } |
| 4737 |
| 4738 @override |
| 4728 idl.TopLevelInferenceErrorKind get kind => | 4739 idl.TopLevelInferenceErrorKind get kind => |
| 4729 _kind ??= idl.TopLevelInferenceErrorKind.assignment; | 4740 _kind ??= idl.TopLevelInferenceErrorKind.assignment; |
| 4730 | 4741 |
| 4731 /** | 4742 /** |
| 4732 * The kind of the error. | 4743 * The kind of the error. |
| 4733 */ | 4744 */ |
| 4734 void set kind(idl.TopLevelInferenceErrorKind value) { | 4745 void set kind(idl.TopLevelInferenceErrorKind value) { |
| 4735 this._kind = value; | 4746 this._kind = value; |
| 4736 } | 4747 } |
| 4737 | 4748 |
| 4738 @override | 4749 @override |
| 4739 int get slot => _slot ??= 0; | 4750 int get slot => _slot ??= 0; |
| 4740 | 4751 |
| 4741 /** | 4752 /** |
| 4742 * The slot id (which is unique within the compilation unit) identifying the | 4753 * The slot id (which is unique within the compilation unit) identifying the |
| 4743 * target of type inference with which this [TopLevelInferenceError] is | 4754 * target of type inference with which this [TopLevelInferenceError] is |
| 4744 * associated. | 4755 * associated. |
| 4745 */ | 4756 */ |
| 4746 void set slot(int value) { | 4757 void set slot(int value) { |
| 4747 assert(value == null || value >= 0); | 4758 assert(value == null || value >= 0); |
| 4748 this._slot = value; | 4759 this._slot = value; |
| 4749 } | 4760 } |
| 4750 | 4761 |
| 4751 TopLevelInferenceErrorBuilder({idl.TopLevelInferenceErrorKind kind, int slot}) | 4762 TopLevelInferenceErrorBuilder( |
| 4752 : _kind = kind, | 4763 {List<String> arguments, idl.TopLevelInferenceErrorKind kind, int slot}) |
| 4764 : _arguments = arguments, |
| 4765 _kind = kind, |
| 4753 _slot = slot; | 4766 _slot = slot; |
| 4754 | 4767 |
| 4755 /** | 4768 /** |
| 4756 * Flush [informative] data recursively. | 4769 * Flush [informative] data recursively. |
| 4757 */ | 4770 */ |
| 4758 void flushInformative() {} | 4771 void flushInformative() {} |
| 4759 | 4772 |
| 4760 /** | 4773 /** |
| 4761 * Accumulate non-[informative] data into [signature]. | 4774 * Accumulate non-[informative] data into [signature]. |
| 4762 */ | 4775 */ |
| 4763 void collectApiSignature(api_sig.ApiSignature signature) { | 4776 void collectApiSignature(api_sig.ApiSignature signature) { |
| 4764 signature.addInt(this._slot ?? 0); | 4777 signature.addInt(this._slot ?? 0); |
| 4765 signature.addInt(this._kind == null ? 0 : this._kind.index); | 4778 signature.addInt(this._kind == null ? 0 : this._kind.index); |
| 4779 if (this._arguments == null) { |
| 4780 signature.addInt(0); |
| 4781 } else { |
| 4782 signature.addInt(this._arguments.length); |
| 4783 for (var x in this._arguments) { |
| 4784 signature.addString(x); |
| 4785 } |
| 4786 } |
| 4766 } | 4787 } |
| 4767 | 4788 |
| 4768 fb.Offset finish(fb.Builder fbBuilder) { | 4789 fb.Offset finish(fb.Builder fbBuilder) { |
| 4790 fb.Offset offset_arguments; |
| 4791 if (!(_arguments == null || _arguments.isEmpty)) { |
| 4792 offset_arguments = fbBuilder |
| 4793 .writeList(_arguments.map((b) => fbBuilder.writeString(b)).toList()); |
| 4794 } |
| 4769 fbBuilder.startTable(); | 4795 fbBuilder.startTable(); |
| 4796 if (offset_arguments != null) { |
| 4797 fbBuilder.addOffset(2, offset_arguments); |
| 4798 } |
| 4770 if (_kind != null && _kind != idl.TopLevelInferenceErrorKind.assignment) { | 4799 if (_kind != null && _kind != idl.TopLevelInferenceErrorKind.assignment) { |
| 4771 fbBuilder.addUint8(1, _kind.index); | 4800 fbBuilder.addUint8(1, _kind.index); |
| 4772 } | 4801 } |
| 4773 if (_slot != null && _slot != 0) { | 4802 if (_slot != null && _slot != 0) { |
| 4774 fbBuilder.addUint32(0, _slot); | 4803 fbBuilder.addUint32(0, _slot); |
| 4775 } | 4804 } |
| 4776 return fbBuilder.endTable(); | 4805 return fbBuilder.endTable(); |
| 4777 } | 4806 } |
| 4778 } | 4807 } |
| 4779 | 4808 |
| 4780 class _TopLevelInferenceErrorReader | 4809 class _TopLevelInferenceErrorReader |
| 4781 extends fb.TableReader<_TopLevelInferenceErrorImpl> { | 4810 extends fb.TableReader<_TopLevelInferenceErrorImpl> { |
| 4782 const _TopLevelInferenceErrorReader(); | 4811 const _TopLevelInferenceErrorReader(); |
| 4783 | 4812 |
| 4784 @override | 4813 @override |
| 4785 _TopLevelInferenceErrorImpl createObject(fb.BufferContext bc, int offset) => | 4814 _TopLevelInferenceErrorImpl createObject(fb.BufferContext bc, int offset) => |
| 4786 new _TopLevelInferenceErrorImpl(bc, offset); | 4815 new _TopLevelInferenceErrorImpl(bc, offset); |
| 4787 } | 4816 } |
| 4788 | 4817 |
| 4789 class _TopLevelInferenceErrorImpl extends Object | 4818 class _TopLevelInferenceErrorImpl extends Object |
| 4790 with _TopLevelInferenceErrorMixin | 4819 with _TopLevelInferenceErrorMixin |
| 4791 implements idl.TopLevelInferenceError { | 4820 implements idl.TopLevelInferenceError { |
| 4792 final fb.BufferContext _bc; | 4821 final fb.BufferContext _bc; |
| 4793 final int _bcOffset; | 4822 final int _bcOffset; |
| 4794 | 4823 |
| 4795 _TopLevelInferenceErrorImpl(this._bc, this._bcOffset); | 4824 _TopLevelInferenceErrorImpl(this._bc, this._bcOffset); |
| 4796 | 4825 |
| 4826 List<String> _arguments; |
| 4797 idl.TopLevelInferenceErrorKind _kind; | 4827 idl.TopLevelInferenceErrorKind _kind; |
| 4798 int _slot; | 4828 int _slot; |
| 4799 | 4829 |
| 4800 @override | 4830 @override |
| 4831 List<String> get arguments { |
| 4832 _arguments ??= const fb.ListReader<String>(const fb.StringReader()) |
| 4833 .vTableGet(_bc, _bcOffset, 2, const <String>[]); |
| 4834 return _arguments; |
| 4835 } |
| 4836 |
| 4837 @override |
| 4801 idl.TopLevelInferenceErrorKind get kind { | 4838 idl.TopLevelInferenceErrorKind get kind { |
| 4802 _kind ??= const _TopLevelInferenceErrorKindReader().vTableGet( | 4839 _kind ??= const _TopLevelInferenceErrorKindReader().vTableGet( |
| 4803 _bc, _bcOffset, 1, idl.TopLevelInferenceErrorKind.assignment); | 4840 _bc, _bcOffset, 1, idl.TopLevelInferenceErrorKind.assignment); |
| 4804 return _kind; | 4841 return _kind; |
| 4805 } | 4842 } |
| 4806 | 4843 |
| 4807 @override | 4844 @override |
| 4808 int get slot { | 4845 int get slot { |
| 4809 _slot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 4846 _slot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
| 4810 return _slot; | 4847 return _slot; |
| 4811 } | 4848 } |
| 4812 } | 4849 } |
| 4813 | 4850 |
| 4814 abstract class _TopLevelInferenceErrorMixin | 4851 abstract class _TopLevelInferenceErrorMixin |
| 4815 implements idl.TopLevelInferenceError { | 4852 implements idl.TopLevelInferenceError { |
| 4816 @override | 4853 @override |
| 4817 Map<String, Object> toJson() { | 4854 Map<String, Object> toJson() { |
| 4818 Map<String, Object> _result = <String, Object>{}; | 4855 Map<String, Object> _result = <String, Object>{}; |
| 4856 if (arguments.isNotEmpty) _result["arguments"] = arguments; |
| 4819 if (kind != idl.TopLevelInferenceErrorKind.assignment) | 4857 if (kind != idl.TopLevelInferenceErrorKind.assignment) |
| 4820 _result["kind"] = kind.toString().split('.')[1]; | 4858 _result["kind"] = kind.toString().split('.')[1]; |
| 4821 if (slot != 0) _result["slot"] = slot; | 4859 if (slot != 0) _result["slot"] = slot; |
| 4822 return _result; | 4860 return _result; |
| 4823 } | 4861 } |
| 4824 | 4862 |
| 4825 @override | 4863 @override |
| 4826 Map<String, Object> toMap() => { | 4864 Map<String, Object> toMap() => { |
| 4865 "arguments": arguments, |
| 4827 "kind": kind, | 4866 "kind": kind, |
| 4828 "slot": slot, | 4867 "slot": slot, |
| 4829 }; | 4868 }; |
| 4830 | 4869 |
| 4831 @override | 4870 @override |
| 4832 String toString() => convert.JSON.encode(toJson()); | 4871 String toString() => convert.JSON.encode(toJson()); |
| 4833 } | 4872 } |
| 4834 | 4873 |
| 4835 class UnitIndexBuilder extends Object | 4874 class UnitIndexBuilder extends Object |
| 4836 with _UnitIndexMixin | 4875 with _UnitIndexMixin |
| (...skipping 7776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12613 "nameOffset": nameOffset, | 12652 "nameOffset": nameOffset, |
| 12614 "propagatedTypeSlot": propagatedTypeSlot, | 12653 "propagatedTypeSlot": propagatedTypeSlot, |
| 12615 "type": type, | 12654 "type": type, |
| 12616 "visibleLength": visibleLength, | 12655 "visibleLength": visibleLength, |
| 12617 "visibleOffset": visibleOffset, | 12656 "visibleOffset": visibleOffset, |
| 12618 }; | 12657 }; |
| 12619 | 12658 |
| 12620 @override | 12659 @override |
| 12621 String toString() => convert.JSON.encode(toJson()); | 12660 String toString() => convert.JSON.encode(toJson()); |
| 12622 } | 12661 } |
| OLD | NEW |