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 'dart:convert'; | 10 import 'dart:convert'; |
11 import 'builder.dart' as builder; | 11 import 'builder.dart' as builder; |
12 | 12 |
13 enum PrelinkedReferenceKind { | 13 enum PrelinkedReferenceKind { |
14 classOrEnum, | 14 classOrEnum, |
15 typedef, | 15 typedef, |
16 other, | 16 other, |
| 17 prefix, |
17 unresolved, | 18 unresolved, |
18 } | 19 } |
19 | 20 |
20 enum UnlinkedExecutableKind { | 21 enum UnlinkedExecutableKind { |
21 functionOrMethod, | 22 functionOrMethod, |
22 getter, | 23 getter, |
23 setter, | 24 setter, |
24 constructor, | 25 constructor, |
25 } | 26 } |
26 | 27 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 63 } |
63 | 64 |
64 PrelinkedDependencyBuilder encodePrelinkedDependency(builder.BuilderContext buil
derContext, {String uri}) { | 65 PrelinkedDependencyBuilder encodePrelinkedDependency(builder.BuilderContext buil
derContext, {String uri}) { |
65 PrelinkedDependencyBuilder builder = new PrelinkedDependencyBuilder(builderCon
text); | 66 PrelinkedDependencyBuilder builder = new PrelinkedDependencyBuilder(builderCon
text); |
66 builder.uri = uri; | 67 builder.uri = uri; |
67 return builder; | 68 return builder; |
68 } | 69 } |
69 | 70 |
70 class PrelinkedLibrary { | 71 class PrelinkedLibrary { |
71 List<PrelinkedUnit> _units; | 72 List<PrelinkedUnit> _units; |
72 UnlinkedLibrary _unlinked; | |
73 List<PrelinkedDependency> _dependencies; | 73 List<PrelinkedDependency> _dependencies; |
74 List<int> _importDependencies; | 74 List<int> _importDependencies; |
75 | 75 |
76 PrelinkedLibrary.fromJson(Map json) | 76 PrelinkedLibrary.fromJson(Map json) |
77 : _units = json["units"]?.map((x) => new PrelinkedUnit.fromJson(x))?.toList(
), | 77 : _units = json["units"]?.map((x) => new PrelinkedUnit.fromJson(x))?.toList(
), |
78 _unlinked = json["unlinked"] == null ? null : new UnlinkedLibrary.fromJson
(json["unlinked"]), | |
79 _dependencies = json["dependencies"]?.map((x) => new PrelinkedDependency.f
romJson(x))?.toList(), | 78 _dependencies = json["dependencies"]?.map((x) => new PrelinkedDependency.f
romJson(x))?.toList(), |
80 _importDependencies = json["importDependencies"]; | 79 _importDependencies = json["importDependencies"]; |
81 | 80 |
82 PrelinkedLibrary.fromBuffer(List<int> buffer) : this.fromJson(JSON.decode(UTF8
.decode(buffer))); | 81 PrelinkedLibrary.fromBuffer(List<int> buffer) : this.fromJson(JSON.decode(UTF8
.decode(buffer))); |
83 | 82 |
84 List<PrelinkedUnit> get units => _units ?? const <PrelinkedUnit>[]; | 83 List<PrelinkedUnit> get units => _units ?? const <PrelinkedUnit>[]; |
85 UnlinkedLibrary get unlinked => _unlinked; | |
86 List<PrelinkedDependency> get dependencies => _dependencies ?? const <Prelinke
dDependency>[]; | 84 List<PrelinkedDependency> get dependencies => _dependencies ?? const <Prelinke
dDependency>[]; |
87 List<int> get importDependencies => _importDependencies ?? const <int>[]; | 85 List<int> get importDependencies => _importDependencies ?? const <int>[]; |
88 } | 86 } |
89 | 87 |
90 class PrelinkedLibraryBuilder { | 88 class PrelinkedLibraryBuilder { |
91 final Map _json = {}; | 89 final Map _json = {}; |
92 | 90 |
93 bool _finished = false; | 91 bool _finished = false; |
94 | 92 |
95 PrelinkedLibraryBuilder(builder.BuilderContext context); | 93 PrelinkedLibraryBuilder(builder.BuilderContext context); |
96 | 94 |
97 void set units(List<PrelinkedUnitBuilder> _value) { | 95 void set units(List<PrelinkedUnitBuilder> _value) { |
98 assert(!_finished); | 96 assert(!_finished); |
99 assert(!_json.containsKey("units")); | 97 assert(!_json.containsKey("units")); |
100 if (_value != null || _value.isEmpty) { | 98 if (_value != null || _value.isEmpty) { |
101 _json["units"] = _value.map((b) => b.finish()).toList(); | 99 _json["units"] = _value.map((b) => b.finish()).toList(); |
102 } | 100 } |
103 } | 101 } |
104 | 102 |
105 void set unlinked(UnlinkedLibraryBuilder _value) { | |
106 assert(!_finished); | |
107 assert(!_json.containsKey("unlinked")); | |
108 if (_value != null) { | |
109 _json["unlinked"] = _value.finish(); | |
110 } | |
111 } | |
112 | |
113 void set dependencies(List<PrelinkedDependencyBuilder> _value) { | 103 void set dependencies(List<PrelinkedDependencyBuilder> _value) { |
114 assert(!_finished); | 104 assert(!_finished); |
115 assert(!_json.containsKey("dependencies")); | 105 assert(!_json.containsKey("dependencies")); |
116 if (_value != null || _value.isEmpty) { | 106 if (_value != null || _value.isEmpty) { |
117 _json["dependencies"] = _value.map((b) => b.finish()).toList(); | 107 _json["dependencies"] = _value.map((b) => b.finish()).toList(); |
118 } | 108 } |
119 } | 109 } |
120 | 110 |
121 void set importDependencies(List<int> _value) { | 111 void set importDependencies(List<int> _value) { |
122 assert(!_finished); | 112 assert(!_finished); |
123 assert(!_json.containsKey("importDependencies")); | 113 assert(!_json.containsKey("importDependencies")); |
124 if (_value != null || _value.isEmpty) { | 114 if (_value != null || _value.isEmpty) { |
125 _json["importDependencies"] = _value.toList(); | 115 _json["importDependencies"] = _value.toList(); |
126 } | 116 } |
127 } | 117 } |
128 | 118 |
129 List<int> toBuffer() => UTF8.encode(JSON.encode(finish())); | 119 List<int> toBuffer() => UTF8.encode(JSON.encode(finish())); |
130 | 120 |
131 Map finish() { | 121 Map finish() { |
132 assert(!_finished); | 122 assert(!_finished); |
133 _finished = true; | 123 _finished = true; |
134 return _json; | 124 return _json; |
135 } | 125 } |
136 } | 126 } |
137 | 127 |
138 PrelinkedLibraryBuilder encodePrelinkedLibrary(builder.BuilderContext builderCon
text, {List<PrelinkedUnitBuilder> units, UnlinkedLibraryBuilder unlinked, List<P
relinkedDependencyBuilder> dependencies, List<int> importDependencies}) { | 128 PrelinkedLibraryBuilder encodePrelinkedLibrary(builder.BuilderContext builderCon
text, {List<PrelinkedUnitBuilder> units, List<PrelinkedDependencyBuilder> depend
encies, List<int> importDependencies}) { |
139 PrelinkedLibraryBuilder builder = new PrelinkedLibraryBuilder(builderContext); | 129 PrelinkedLibraryBuilder builder = new PrelinkedLibraryBuilder(builderContext); |
140 builder.units = units; | 130 builder.units = units; |
141 builder.unlinked = unlinked; | |
142 builder.dependencies = dependencies; | 131 builder.dependencies = dependencies; |
143 builder.importDependencies = importDependencies; | 132 builder.importDependencies = importDependencies; |
144 return builder; | 133 return builder; |
145 } | 134 } |
146 | 135 |
147 class PrelinkedReference { | 136 class PrelinkedReference { |
148 int _dependency; | 137 int _dependency; |
149 PrelinkedReferenceKind _kind; | 138 PrelinkedReferenceKind _kind; |
150 int _unit; | 139 int _unit; |
151 | 140 |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 UnlinkedExportBuilder encodeUnlinkedExport(builder.BuilderContext builderContext
, {String uri, List<UnlinkedCombinatorBuilder> combinators}) { | 738 UnlinkedExportBuilder encodeUnlinkedExport(builder.BuilderContext builderContext
, {String uri, List<UnlinkedCombinatorBuilder> combinators}) { |
750 UnlinkedExportBuilder builder = new UnlinkedExportBuilder(builderContext); | 739 UnlinkedExportBuilder builder = new UnlinkedExportBuilder(builderContext); |
751 builder.uri = uri; | 740 builder.uri = uri; |
752 builder.combinators = combinators; | 741 builder.combinators = combinators; |
753 return builder; | 742 return builder; |
754 } | 743 } |
755 | 744 |
756 class UnlinkedImport { | 745 class UnlinkedImport { |
757 String _uri; | 746 String _uri; |
758 int _offset; | 747 int _offset; |
759 int _prefix; | 748 int _prefixReference; |
760 List<UnlinkedCombinator> _combinators; | 749 List<UnlinkedCombinator> _combinators; |
761 bool _isDeferred; | 750 bool _isDeferred; |
762 bool _isImplicit; | 751 bool _isImplicit; |
763 | 752 |
764 UnlinkedImport.fromJson(Map json) | 753 UnlinkedImport.fromJson(Map json) |
765 : _uri = json["uri"], | 754 : _uri = json["uri"], |
766 _offset = json["offset"], | 755 _offset = json["offset"], |
767 _prefix = json["prefix"], | 756 _prefixReference = json["prefixReference"], |
768 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from
Json(x))?.toList(), | 757 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from
Json(x))?.toList(), |
769 _isDeferred = json["isDeferred"], | 758 _isDeferred = json["isDeferred"], |
770 _isImplicit = json["isImplicit"]; | 759 _isImplicit = json["isImplicit"]; |
771 | 760 |
772 String get uri => _uri ?? ''; | 761 String get uri => _uri ?? ''; |
773 int get offset => _offset ?? 0; | 762 int get offset => _offset ?? 0; |
774 int get prefix => _prefix ?? 0; | 763 int get prefixReference => _prefixReference ?? 0; |
775 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom
binator>[]; | 764 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom
binator>[]; |
776 bool get isDeferred => _isDeferred ?? false; | 765 bool get isDeferred => _isDeferred ?? false; |
777 bool get isImplicit => _isImplicit ?? false; | 766 bool get isImplicit => _isImplicit ?? false; |
778 } | 767 } |
779 | 768 |
780 class UnlinkedImportBuilder { | 769 class UnlinkedImportBuilder { |
781 final Map _json = {}; | 770 final Map _json = {}; |
782 | 771 |
783 bool _finished = false; | 772 bool _finished = false; |
784 | 773 |
785 UnlinkedImportBuilder(builder.BuilderContext context); | 774 UnlinkedImportBuilder(builder.BuilderContext context); |
786 | 775 |
787 void set uri(String _value) { | 776 void set uri(String _value) { |
788 assert(!_finished); | 777 assert(!_finished); |
789 assert(!_json.containsKey("uri")); | 778 assert(!_json.containsKey("uri")); |
790 if (_value != null) { | 779 if (_value != null) { |
791 _json["uri"] = _value; | 780 _json["uri"] = _value; |
792 } | 781 } |
793 } | 782 } |
794 | 783 |
795 void set offset(int _value) { | 784 void set offset(int _value) { |
796 assert(!_finished); | 785 assert(!_finished); |
797 assert(!_json.containsKey("offset")); | 786 assert(!_json.containsKey("offset")); |
798 if (_value != null) { | 787 if (_value != null) { |
799 _json["offset"] = _value; | 788 _json["offset"] = _value; |
800 } | 789 } |
801 } | 790 } |
802 | 791 |
803 void set prefix(int _value) { | 792 void set prefixReference(int _value) { |
804 assert(!_finished); | 793 assert(!_finished); |
805 assert(!_json.containsKey("prefix")); | 794 assert(!_json.containsKey("prefixReference")); |
806 if (_value != null) { | 795 if (_value != null) { |
807 _json["prefix"] = _value; | 796 _json["prefixReference"] = _value; |
808 } | 797 } |
809 } | 798 } |
810 | 799 |
811 void set combinators(List<UnlinkedCombinatorBuilder> _value) { | 800 void set combinators(List<UnlinkedCombinatorBuilder> _value) { |
812 assert(!_finished); | 801 assert(!_finished); |
813 assert(!_json.containsKey("combinators")); | 802 assert(!_json.containsKey("combinators")); |
814 if (_value != null || _value.isEmpty) { | 803 if (_value != null || _value.isEmpty) { |
815 _json["combinators"] = _value.map((b) => b.finish()).toList(); | 804 _json["combinators"] = _value.map((b) => b.finish()).toList(); |
816 } | 805 } |
817 } | 806 } |
(...skipping 14 matching lines...) Expand all Loading... |
832 } | 821 } |
833 } | 822 } |
834 | 823 |
835 Map finish() { | 824 Map finish() { |
836 assert(!_finished); | 825 assert(!_finished); |
837 _finished = true; | 826 _finished = true; |
838 return _json; | 827 return _json; |
839 } | 828 } |
840 } | 829 } |
841 | 830 |
842 UnlinkedImportBuilder encodeUnlinkedImport(builder.BuilderContext builderContext
, {String uri, int offset, int prefix, List<UnlinkedCombinatorBuilder> combinato
rs, bool isDeferred, bool isImplicit}) { | 831 UnlinkedImportBuilder encodeUnlinkedImport(builder.BuilderContext builderContext
, {String uri, int offset, int prefixReference, List<UnlinkedCombinatorBuilder>
combinators, bool isDeferred, bool isImplicit}) { |
843 UnlinkedImportBuilder builder = new UnlinkedImportBuilder(builderContext); | 832 UnlinkedImportBuilder builder = new UnlinkedImportBuilder(builderContext); |
844 builder.uri = uri; | 833 builder.uri = uri; |
845 builder.offset = offset; | 834 builder.offset = offset; |
846 builder.prefix = prefix; | 835 builder.prefixReference = prefixReference; |
847 builder.combinators = combinators; | 836 builder.combinators = combinators; |
848 builder.isDeferred = isDeferred; | 837 builder.isDeferred = isDeferred; |
849 builder.isImplicit = isImplicit; | 838 builder.isImplicit = isImplicit; |
850 return builder; | 839 return builder; |
851 } | 840 } |
852 | 841 |
853 class UnlinkedLibrary { | |
854 List<UnlinkedPrefix> _prefixes; | |
855 | |
856 UnlinkedLibrary.fromJson(Map json) | |
857 : _prefixes = json["prefixes"]?.map((x) => new UnlinkedPrefix.fromJson(x))?.
toList(); | |
858 | |
859 List<UnlinkedPrefix> get prefixes => _prefixes ?? const <UnlinkedPrefix>[]; | |
860 } | |
861 | |
862 class UnlinkedLibraryBuilder { | |
863 final Map _json = {}; | |
864 | |
865 bool _finished = false; | |
866 | |
867 UnlinkedLibraryBuilder(builder.BuilderContext context); | |
868 | |
869 void set prefixes(List<UnlinkedPrefixBuilder> _value) { | |
870 assert(!_finished); | |
871 assert(!_json.containsKey("prefixes")); | |
872 if (_value != null || _value.isEmpty) { | |
873 _json["prefixes"] = _value.map((b) => b.finish()).toList(); | |
874 } | |
875 } | |
876 | |
877 Map finish() { | |
878 assert(!_finished); | |
879 _finished = true; | |
880 return _json; | |
881 } | |
882 } | |
883 | |
884 UnlinkedLibraryBuilder encodeUnlinkedLibrary(builder.BuilderContext builderConte
xt, {List<UnlinkedPrefixBuilder> prefixes}) { | |
885 UnlinkedLibraryBuilder builder = new UnlinkedLibraryBuilder(builderContext); | |
886 builder.prefixes = prefixes; | |
887 return builder; | |
888 } | |
889 | |
890 class UnlinkedParam { | 842 class UnlinkedParam { |
891 String _name; | 843 String _name; |
892 UnlinkedTypeRef _type; | 844 UnlinkedTypeRef _type; |
893 List<UnlinkedParam> _parameters; | 845 List<UnlinkedParam> _parameters; |
894 UnlinkedParamKind _kind; | 846 UnlinkedParamKind _kind; |
895 bool _isFunctionTyped; | 847 bool _isFunctionTyped; |
896 bool _isInitializingFormal; | 848 bool _isInitializingFormal; |
897 bool _hasImplicitType; | 849 bool _hasImplicitType; |
898 | 850 |
899 UnlinkedParam.fromJson(Map json) | 851 UnlinkedParam.fromJson(Map json) |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 return _json; | 978 return _json; |
1027 } | 979 } |
1028 } | 980 } |
1029 | 981 |
1030 UnlinkedPartBuilder encodeUnlinkedPart(builder.BuilderContext builderContext, {S
tring uri}) { | 982 UnlinkedPartBuilder encodeUnlinkedPart(builder.BuilderContext builderContext, {S
tring uri}) { |
1031 UnlinkedPartBuilder builder = new UnlinkedPartBuilder(builderContext); | 983 UnlinkedPartBuilder builder = new UnlinkedPartBuilder(builderContext); |
1032 builder.uri = uri; | 984 builder.uri = uri; |
1033 return builder; | 985 return builder; |
1034 } | 986 } |
1035 | 987 |
1036 class UnlinkedPrefix { | |
1037 String _name; | |
1038 | |
1039 UnlinkedPrefix.fromJson(Map json) | |
1040 : _name = json["name"]; | |
1041 | |
1042 String get name => _name ?? ''; | |
1043 } | |
1044 | |
1045 class UnlinkedPrefixBuilder { | |
1046 final Map _json = {}; | |
1047 | |
1048 bool _finished = false; | |
1049 | |
1050 UnlinkedPrefixBuilder(builder.BuilderContext context); | |
1051 | |
1052 void set name(String _value) { | |
1053 assert(!_finished); | |
1054 assert(!_json.containsKey("name")); | |
1055 if (_value != null) { | |
1056 _json["name"] = _value; | |
1057 } | |
1058 } | |
1059 | |
1060 Map finish() { | |
1061 assert(!_finished); | |
1062 _finished = true; | |
1063 return _json; | |
1064 } | |
1065 } | |
1066 | |
1067 UnlinkedPrefixBuilder encodeUnlinkedPrefix(builder.BuilderContext builderContext
, {String name}) { | |
1068 UnlinkedPrefixBuilder builder = new UnlinkedPrefixBuilder(builderContext); | |
1069 builder.name = name; | |
1070 return builder; | |
1071 } | |
1072 | |
1073 class UnlinkedReference { | 988 class UnlinkedReference { |
1074 String _name; | 989 String _name; |
1075 int _prefix; | 990 int _prefixReference; |
1076 | 991 |
1077 UnlinkedReference.fromJson(Map json) | 992 UnlinkedReference.fromJson(Map json) |
1078 : _name = json["name"], | 993 : _name = json["name"], |
1079 _prefix = json["prefix"]; | 994 _prefixReference = json["prefixReference"]; |
1080 | 995 |
1081 String get name => _name ?? ''; | 996 String get name => _name ?? ''; |
1082 int get prefix => _prefix ?? 0; | 997 int get prefixReference => _prefixReference ?? 0; |
1083 } | 998 } |
1084 | 999 |
1085 class UnlinkedReferenceBuilder { | 1000 class UnlinkedReferenceBuilder { |
1086 final Map _json = {}; | 1001 final Map _json = {}; |
1087 | 1002 |
1088 bool _finished = false; | 1003 bool _finished = false; |
1089 | 1004 |
1090 UnlinkedReferenceBuilder(builder.BuilderContext context); | 1005 UnlinkedReferenceBuilder(builder.BuilderContext context); |
1091 | 1006 |
1092 void set name(String _value) { | 1007 void set name(String _value) { |
1093 assert(!_finished); | 1008 assert(!_finished); |
1094 assert(!_json.containsKey("name")); | 1009 assert(!_json.containsKey("name")); |
1095 if (_value != null) { | 1010 if (_value != null) { |
1096 _json["name"] = _value; | 1011 _json["name"] = _value; |
1097 } | 1012 } |
1098 } | 1013 } |
1099 | 1014 |
1100 void set prefix(int _value) { | 1015 void set prefixReference(int _value) { |
1101 assert(!_finished); | 1016 assert(!_finished); |
1102 assert(!_json.containsKey("prefix")); | 1017 assert(!_json.containsKey("prefixReference")); |
1103 if (_value != null) { | 1018 if (_value != null) { |
1104 _json["prefix"] = _value; | 1019 _json["prefixReference"] = _value; |
1105 } | 1020 } |
1106 } | 1021 } |
1107 | 1022 |
1108 Map finish() { | 1023 Map finish() { |
1109 assert(!_finished); | 1024 assert(!_finished); |
1110 _finished = true; | 1025 _finished = true; |
1111 return _json; | 1026 return _json; |
1112 } | 1027 } |
1113 } | 1028 } |
1114 | 1029 |
1115 UnlinkedReferenceBuilder encodeUnlinkedReference(builder.BuilderContext builderC
ontext, {String name, int prefix}) { | 1030 UnlinkedReferenceBuilder encodeUnlinkedReference(builder.BuilderContext builderC
ontext, {String name, int prefixReference}) { |
1116 UnlinkedReferenceBuilder builder = new UnlinkedReferenceBuilder(builderContext
); | 1031 UnlinkedReferenceBuilder builder = new UnlinkedReferenceBuilder(builderContext
); |
1117 builder.name = name; | 1032 builder.name = name; |
1118 builder.prefix = prefix; | 1033 builder.prefixReference = prefixReference; |
1119 return builder; | 1034 return builder; |
1120 } | 1035 } |
1121 | 1036 |
1122 class UnlinkedTypedef { | 1037 class UnlinkedTypedef { |
1123 String _name; | 1038 String _name; |
1124 List<UnlinkedTypeParam> _typeParameters; | 1039 List<UnlinkedTypeParam> _typeParameters; |
1125 UnlinkedTypeRef _returnType; | 1040 UnlinkedTypeRef _returnType; |
1126 List<UnlinkedParam> _parameters; | 1041 List<UnlinkedParam> _parameters; |
1127 | 1042 |
1128 UnlinkedTypedef.fromJson(Map json) | 1043 UnlinkedTypedef.fromJson(Map json) |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); | 1452 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); |
1538 builder.name = name; | 1453 builder.name = name; |
1539 builder.type = type; | 1454 builder.type = type; |
1540 builder.isStatic = isStatic; | 1455 builder.isStatic = isStatic; |
1541 builder.isFinal = isFinal; | 1456 builder.isFinal = isFinal; |
1542 builder.isConst = isConst; | 1457 builder.isConst = isConst; |
1543 builder.hasImplicitType = hasImplicitType; | 1458 builder.hasImplicitType = hasImplicitType; |
1544 return builder; | 1459 return builder; |
1545 } | 1460 } |
1546 | 1461 |
OLD | NEW |