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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 @override | 125 @override |
126 idl.UnlinkedParamKind read(fb.BufferContext bc, int offset) { | 126 idl.UnlinkedParamKind read(fb.BufferContext bc, int offset) { |
127 int index = const fb.Uint8Reader().read(bc, offset); | 127 int index = const fb.Uint8Reader().read(bc, offset); |
128 return index < idl.UnlinkedParamKind.values.length ? idl.UnlinkedParamKind.v
alues[index] : idl.UnlinkedParamKind.required; | 128 return index < idl.UnlinkedParamKind.values.length ? idl.UnlinkedParamKind.v
alues[index] : idl.UnlinkedParamKind.required; |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 class AnalysisDriverResolvedUnitBuilder extends Object with _AnalysisDriverResol
vedUnitMixin implements idl.AnalysisDriverResolvedUnit { | 132 class AnalysisDriverResolvedUnitBuilder extends Object with _AnalysisDriverResol
vedUnitMixin implements idl.AnalysisDriverResolvedUnit { |
133 List<AnalysisDriverUnitErrorBuilder> _errors; | 133 List<AnalysisDriverUnitErrorBuilder> _errors; |
| 134 AnalysisDriverUnitIndexBuilder _index; |
134 | 135 |
135 @override | 136 @override |
136 List<AnalysisDriverUnitErrorBuilder> get errors => _errors ??= <AnalysisDriver
UnitErrorBuilder>[]; | 137 List<AnalysisDriverUnitErrorBuilder> get errors => _errors ??= <AnalysisDriver
UnitErrorBuilder>[]; |
137 | 138 |
138 /** | 139 /** |
139 * The full list of analysis errors, both syntactic and semantic. | 140 * The full list of analysis errors, both syntactic and semantic. |
140 */ | 141 */ |
141 void set errors(List<AnalysisDriverUnitErrorBuilder> value) { | 142 void set errors(List<AnalysisDriverUnitErrorBuilder> value) { |
142 this._errors = value; | 143 this._errors = value; |
143 } | 144 } |
144 | 145 |
145 AnalysisDriverResolvedUnitBuilder({List<AnalysisDriverUnitErrorBuilder> errors
}) | 146 @override |
146 : _errors = errors; | 147 AnalysisDriverUnitIndexBuilder get index => _index; |
| 148 |
| 149 /** |
| 150 * The index of the unit. |
| 151 */ |
| 152 void set index(AnalysisDriverUnitIndexBuilder value) { |
| 153 this._index = value; |
| 154 } |
| 155 |
| 156 AnalysisDriverResolvedUnitBuilder({List<AnalysisDriverUnitErrorBuilder> errors
, AnalysisDriverUnitIndexBuilder index}) |
| 157 : _errors = errors, |
| 158 _index = index; |
147 | 159 |
148 /** | 160 /** |
149 * Flush [informative] data recursively. | 161 * Flush [informative] data recursively. |
150 */ | 162 */ |
151 void flushInformative() { | 163 void flushInformative() { |
152 _errors?.forEach((b) => b.flushInformative()); | 164 _errors?.forEach((b) => b.flushInformative()); |
| 165 _index?.flushInformative(); |
153 } | 166 } |
154 | 167 |
155 /** | 168 /** |
156 * Accumulate non-[informative] data into [signature]. | 169 * Accumulate non-[informative] data into [signature]. |
157 */ | 170 */ |
158 void collectApiSignature(api_sig.ApiSignature signature) { | 171 void collectApiSignature(api_sig.ApiSignature signature) { |
159 if (this._errors == null) { | 172 if (this._errors == null) { |
160 signature.addInt(0); | 173 signature.addInt(0); |
161 } else { | 174 } else { |
162 signature.addInt(this._errors.length); | 175 signature.addInt(this._errors.length); |
163 for (var x in this._errors) { | 176 for (var x in this._errors) { |
164 x?.collectApiSignature(signature); | 177 x?.collectApiSignature(signature); |
165 } | 178 } |
166 } | 179 } |
| 180 signature.addBool(this._index != null); |
| 181 this._index?.collectApiSignature(signature); |
167 } | 182 } |
168 | 183 |
169 List<int> toBuffer() { | 184 List<int> toBuffer() { |
170 fb.Builder fbBuilder = new fb.Builder(); | 185 fb.Builder fbBuilder = new fb.Builder(); |
171 return fbBuilder.finish(finish(fbBuilder), "ADRU"); | 186 return fbBuilder.finish(finish(fbBuilder), "ADRU"); |
172 } | 187 } |
173 | 188 |
174 fb.Offset finish(fb.Builder fbBuilder) { | 189 fb.Offset finish(fb.Builder fbBuilder) { |
175 fb.Offset offset_errors; | 190 fb.Offset offset_errors; |
| 191 fb.Offset offset_index; |
176 if (!(_errors == null || _errors.isEmpty)) { | 192 if (!(_errors == null || _errors.isEmpty)) { |
177 offset_errors = fbBuilder.writeList(_errors.map((b) => b.finish(fbBuilder)
).toList()); | 193 offset_errors = fbBuilder.writeList(_errors.map((b) => b.finish(fbBuilder)
).toList()); |
178 } | 194 } |
| 195 if (_index != null) { |
| 196 offset_index = _index.finish(fbBuilder); |
| 197 } |
179 fbBuilder.startTable(); | 198 fbBuilder.startTable(); |
180 if (offset_errors != null) { | 199 if (offset_errors != null) { |
181 fbBuilder.addOffset(0, offset_errors); | 200 fbBuilder.addOffset(0, offset_errors); |
182 } | 201 } |
| 202 if (offset_index != null) { |
| 203 fbBuilder.addOffset(1, offset_index); |
| 204 } |
183 return fbBuilder.endTable(); | 205 return fbBuilder.endTable(); |
184 } | 206 } |
185 } | 207 } |
186 | 208 |
187 idl.AnalysisDriverResolvedUnit readAnalysisDriverResolvedUnit(List<int> buffer)
{ | 209 idl.AnalysisDriverResolvedUnit readAnalysisDriverResolvedUnit(List<int> buffer)
{ |
188 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 210 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
189 return const _AnalysisDriverResolvedUnitReader().read(rootRef, 0); | 211 return const _AnalysisDriverResolvedUnitReader().read(rootRef, 0); |
190 } | 212 } |
191 | 213 |
192 class _AnalysisDriverResolvedUnitReader extends fb.TableReader<_AnalysisDriverRe
solvedUnitImpl> { | 214 class _AnalysisDriverResolvedUnitReader extends fb.TableReader<_AnalysisDriverRe
solvedUnitImpl> { |
193 const _AnalysisDriverResolvedUnitReader(); | 215 const _AnalysisDriverResolvedUnitReader(); |
194 | 216 |
195 @override | 217 @override |
196 _AnalysisDriverResolvedUnitImpl createObject(fb.BufferContext bc, int offset)
=> new _AnalysisDriverResolvedUnitImpl(bc, offset); | 218 _AnalysisDriverResolvedUnitImpl createObject(fb.BufferContext bc, int offset)
=> new _AnalysisDriverResolvedUnitImpl(bc, offset); |
197 } | 219 } |
198 | 220 |
199 class _AnalysisDriverResolvedUnitImpl extends Object with _AnalysisDriverResolve
dUnitMixin implements idl.AnalysisDriverResolvedUnit { | 221 class _AnalysisDriverResolvedUnitImpl extends Object with _AnalysisDriverResolve
dUnitMixin implements idl.AnalysisDriverResolvedUnit { |
200 final fb.BufferContext _bc; | 222 final fb.BufferContext _bc; |
201 final int _bcOffset; | 223 final int _bcOffset; |
202 | 224 |
203 _AnalysisDriverResolvedUnitImpl(this._bc, this._bcOffset); | 225 _AnalysisDriverResolvedUnitImpl(this._bc, this._bcOffset); |
204 | 226 |
205 List<idl.AnalysisDriverUnitError> _errors; | 227 List<idl.AnalysisDriverUnitError> _errors; |
| 228 idl.AnalysisDriverUnitIndex _index; |
206 | 229 |
207 @override | 230 @override |
208 List<idl.AnalysisDriverUnitError> get errors { | 231 List<idl.AnalysisDriverUnitError> get errors { |
209 _errors ??= const fb.ListReader<idl.AnalysisDriverUnitError>(const _Analysis
DriverUnitErrorReader()).vTableGet(_bc, _bcOffset, 0, const <idl.AnalysisDriverU
nitError>[]); | 232 _errors ??= const fb.ListReader<idl.AnalysisDriverUnitError>(const _Analysis
DriverUnitErrorReader()).vTableGet(_bc, _bcOffset, 0, const <idl.AnalysisDriverU
nitError>[]); |
210 return _errors; | 233 return _errors; |
211 } | 234 } |
| 235 |
| 236 @override |
| 237 idl.AnalysisDriverUnitIndex get index { |
| 238 _index ??= const _AnalysisDriverUnitIndexReader().vTableGet(_bc, _bcOffset,
1, null); |
| 239 return _index; |
| 240 } |
212 } | 241 } |
213 | 242 |
214 abstract class _AnalysisDriverResolvedUnitMixin implements idl.AnalysisDriverRes
olvedUnit { | 243 abstract class _AnalysisDriverResolvedUnitMixin implements idl.AnalysisDriverRes
olvedUnit { |
215 @override | 244 @override |
216 Map<String, Object> toJson() { | 245 Map<String, Object> toJson() { |
217 Map<String, Object> _result = <String, Object>{}; | 246 Map<String, Object> _result = <String, Object>{}; |
218 if (errors.isNotEmpty) _result["errors"] = errors.map((_value) => _value.toJ
son()).toList(); | 247 if (errors.isNotEmpty) _result["errors"] = errors.map((_value) => _value.toJ
son()).toList(); |
| 248 if (index != null) _result["index"] = index.toJson(); |
219 return _result; | 249 return _result; |
220 } | 250 } |
221 | 251 |
222 @override | 252 @override |
223 Map<String, Object> toMap() => { | 253 Map<String, Object> toMap() => { |
224 "errors": errors, | 254 "errors": errors, |
| 255 "index": index, |
225 }; | 256 }; |
226 | 257 |
227 @override | 258 @override |
228 String toString() => convert.JSON.encode(toJson()); | 259 String toString() => convert.JSON.encode(toJson()); |
229 } | 260 } |
230 | 261 |
231 class AnalysisDriverUnitErrorBuilder extends Object with _AnalysisDriverUnitErro
rMixin implements idl.AnalysisDriverUnitError { | 262 class AnalysisDriverUnitErrorBuilder extends Object with _AnalysisDriverUnitErro
rMixin implements idl.AnalysisDriverUnitError { |
232 String _correction; | 263 String _correction; |
233 int _length; | 264 int _length; |
234 String _message; | 265 String _message; |
(...skipping 10478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10713 "propagatedTypeSlot": propagatedTypeSlot, | 10744 "propagatedTypeSlot": propagatedTypeSlot, |
10714 "type": type, | 10745 "type": type, |
10715 "visibleLength": visibleLength, | 10746 "visibleLength": visibleLength, |
10716 "visibleOffset": visibleOffset, | 10747 "visibleOffset": visibleOffset, |
10717 }; | 10748 }; |
10718 | 10749 |
10719 @override | 10750 @override |
10720 String toString() => convert.JSON.encode(toJson()); | 10751 String toString() => convert.JSON.encode(toJson()); |
10721 } | 10752 } |
10722 | 10753 |
OLD | NEW |