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; |
11 import 'idl.dart' as idl; | 11 import 'idl.dart' as idl; |
12 import 'dart:convert' as convert; | 12 import 'dart:convert' as convert; |
13 import 'api_signature.dart' as api_sig; | 13 import 'api_signature.dart' as api_sig; |
14 | 14 |
15 class _IndexNameKindReader extends fb.Reader<idl.IndexNameKind> { | 15 class _IndexNameKindReader extends fb.Reader<idl.IndexNameKind> { |
16 const _IndexNameKindReader() : super(); | 16 const _IndexNameKindReader() : super(); |
17 | 17 |
18 @override | 18 @override |
19 int get size => 1; | 19 int get size => 1; |
20 | 20 |
21 @override | 21 @override |
22 idl.IndexNameKind read(fb.BufferContext bc, int offset) { | 22 idl.IndexNameKind read(fb.BufferContext bc, int offset) { |
23 int index = const fb.Uint8Reader().read(bc, offset); | 23 int index = const fb.Uint8Reader().read(bc, offset); |
24 return index < idl.IndexNameKind.values.length ? idl.IndexNameKind.values[in
dex] : idl.IndexNameKind.topLevel; | 24 return index < idl.IndexNameKind.values.length |
| 25 ? idl.IndexNameKind.values[index] |
| 26 : idl.IndexNameKind.topLevel; |
25 } | 27 } |
26 } | 28 } |
27 | 29 |
28 class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> { | 30 class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> { |
29 const _IndexRelationKindReader() : super(); | 31 const _IndexRelationKindReader() : super(); |
30 | 32 |
31 @override | 33 @override |
32 int get size => 1; | 34 int get size => 1; |
33 | 35 |
34 @override | 36 @override |
35 idl.IndexRelationKind read(fb.BufferContext bc, int offset) { | 37 idl.IndexRelationKind read(fb.BufferContext bc, int offset) { |
36 int index = const fb.Uint8Reader().read(bc, offset); | 38 int index = const fb.Uint8Reader().read(bc, offset); |
37 return index < idl.IndexRelationKind.values.length ? idl.IndexRelationKind.v
alues[index] : idl.IndexRelationKind.IS_ANCESTOR_OF; | 39 return index < idl.IndexRelationKind.values.length |
| 40 ? idl.IndexRelationKind.values[index] |
| 41 : idl.IndexRelationKind.IS_ANCESTOR_OF; |
38 } | 42 } |
39 } | 43 } |
40 | 44 |
41 class _IndexSyntheticElementKindReader extends fb.Reader<idl.IndexSyntheticEleme
ntKind> { | 45 class _IndexSyntheticElementKindReader |
| 46 extends fb.Reader<idl.IndexSyntheticElementKind> { |
42 const _IndexSyntheticElementKindReader() : super(); | 47 const _IndexSyntheticElementKindReader() : super(); |
43 | 48 |
44 @override | 49 @override |
45 int get size => 1; | 50 int get size => 1; |
46 | 51 |
47 @override | 52 @override |
48 idl.IndexSyntheticElementKind read(fb.BufferContext bc, int offset) { | 53 idl.IndexSyntheticElementKind read(fb.BufferContext bc, int offset) { |
49 int index = const fb.Uint8Reader().read(bc, offset); | 54 int index = const fb.Uint8Reader().read(bc, offset); |
50 return index < idl.IndexSyntheticElementKind.values.length ? idl.IndexSynthe
ticElementKind.values[index] : idl.IndexSyntheticElementKind.notSynthetic; | 55 return index < idl.IndexSyntheticElementKind.values.length |
| 56 ? idl.IndexSyntheticElementKind.values[index] |
| 57 : idl.IndexSyntheticElementKind.notSynthetic; |
51 } | 58 } |
52 } | 59 } |
53 | 60 |
54 class _ReferenceKindReader extends fb.Reader<idl.ReferenceKind> { | 61 class _ReferenceKindReader extends fb.Reader<idl.ReferenceKind> { |
55 const _ReferenceKindReader() : super(); | 62 const _ReferenceKindReader() : super(); |
56 | 63 |
57 @override | 64 @override |
58 int get size => 1; | 65 int get size => 1; |
59 | 66 |
60 @override | 67 @override |
61 idl.ReferenceKind read(fb.BufferContext bc, int offset) { | 68 idl.ReferenceKind read(fb.BufferContext bc, int offset) { |
62 int index = const fb.Uint8Reader().read(bc, offset); | 69 int index = const fb.Uint8Reader().read(bc, offset); |
63 return index < idl.ReferenceKind.values.length ? idl.ReferenceKind.values[in
dex] : idl.ReferenceKind.classOrEnum; | 70 return index < idl.ReferenceKind.values.length |
| 71 ? idl.ReferenceKind.values[index] |
| 72 : idl.ReferenceKind.classOrEnum; |
64 } | 73 } |
65 } | 74 } |
66 | 75 |
67 class _TypedefStyleReader extends fb.Reader<idl.TypedefStyle> { | 76 class _TypedefStyleReader extends fb.Reader<idl.TypedefStyle> { |
68 const _TypedefStyleReader() : super(); | 77 const _TypedefStyleReader() : super(); |
69 | 78 |
70 @override | 79 @override |
71 int get size => 1; | 80 int get size => 1; |
72 | 81 |
73 @override | 82 @override |
74 idl.TypedefStyle read(fb.BufferContext bc, int offset) { | 83 idl.TypedefStyle read(fb.BufferContext bc, int offset) { |
75 int index = const fb.Uint8Reader().read(bc, offset); | 84 int index = const fb.Uint8Reader().read(bc, offset); |
76 return index < idl.TypedefStyle.values.length ? idl.TypedefStyle.values[inde
x] : idl.TypedefStyle.functionType; | 85 return index < idl.TypedefStyle.values.length |
| 86 ? idl.TypedefStyle.values[index] |
| 87 : idl.TypedefStyle.functionType; |
77 } | 88 } |
78 } | 89 } |
79 | 90 |
80 class _UnlinkedConstructorInitializerKindReader extends fb.Reader<idl.UnlinkedCo
nstructorInitializerKind> { | 91 class _UnlinkedConstructorInitializerKindReader |
| 92 extends fb.Reader<idl.UnlinkedConstructorInitializerKind> { |
81 const _UnlinkedConstructorInitializerKindReader() : super(); | 93 const _UnlinkedConstructorInitializerKindReader() : super(); |
82 | 94 |
83 @override | 95 @override |
84 int get size => 1; | 96 int get size => 1; |
85 | 97 |
86 @override | 98 @override |
87 idl.UnlinkedConstructorInitializerKind read(fb.BufferContext bc, int offset) { | 99 idl.UnlinkedConstructorInitializerKind read(fb.BufferContext bc, int offset) { |
88 int index = const fb.Uint8Reader().read(bc, offset); | 100 int index = const fb.Uint8Reader().read(bc, offset); |
89 return index < idl.UnlinkedConstructorInitializerKind.values.length ? idl.Un
linkedConstructorInitializerKind.values[index] : idl.UnlinkedConstructorInitiali
zerKind.field; | 101 return index < idl.UnlinkedConstructorInitializerKind.values.length |
| 102 ? idl.UnlinkedConstructorInitializerKind.values[index] |
| 103 : idl.UnlinkedConstructorInitializerKind.field; |
90 } | 104 } |
91 } | 105 } |
92 | 106 |
93 class _UnlinkedExecutableKindReader extends fb.Reader<idl.UnlinkedExecutableKind
> { | 107 class _UnlinkedExecutableKindReader |
| 108 extends fb.Reader<idl.UnlinkedExecutableKind> { |
94 const _UnlinkedExecutableKindReader() : super(); | 109 const _UnlinkedExecutableKindReader() : super(); |
95 | 110 |
96 @override | 111 @override |
97 int get size => 1; | 112 int get size => 1; |
98 | 113 |
99 @override | 114 @override |
100 idl.UnlinkedExecutableKind read(fb.BufferContext bc, int offset) { | 115 idl.UnlinkedExecutableKind read(fb.BufferContext bc, int offset) { |
101 int index = const fb.Uint8Reader().read(bc, offset); | 116 int index = const fb.Uint8Reader().read(bc, offset); |
102 return index < idl.UnlinkedExecutableKind.values.length ? idl.UnlinkedExecut
ableKind.values[index] : idl.UnlinkedExecutableKind.functionOrMethod; | 117 return index < idl.UnlinkedExecutableKind.values.length |
| 118 ? idl.UnlinkedExecutableKind.values[index] |
| 119 : idl.UnlinkedExecutableKind.functionOrMethod; |
103 } | 120 } |
104 } | 121 } |
105 | 122 |
106 class _UnlinkedExprAssignOperatorReader extends fb.Reader<idl.UnlinkedExprAssign
Operator> { | 123 class _UnlinkedExprAssignOperatorReader |
| 124 extends fb.Reader<idl.UnlinkedExprAssignOperator> { |
107 const _UnlinkedExprAssignOperatorReader() : super(); | 125 const _UnlinkedExprAssignOperatorReader() : super(); |
108 | 126 |
109 @override | 127 @override |
110 int get size => 1; | 128 int get size => 1; |
111 | 129 |
112 @override | 130 @override |
113 idl.UnlinkedExprAssignOperator read(fb.BufferContext bc, int offset) { | 131 idl.UnlinkedExprAssignOperator read(fb.BufferContext bc, int offset) { |
114 int index = const fb.Uint8Reader().read(bc, offset); | 132 int index = const fb.Uint8Reader().read(bc, offset); |
115 return index < idl.UnlinkedExprAssignOperator.values.length ? idl.UnlinkedEx
prAssignOperator.values[index] : idl.UnlinkedExprAssignOperator.assign; | 133 return index < idl.UnlinkedExprAssignOperator.values.length |
| 134 ? idl.UnlinkedExprAssignOperator.values[index] |
| 135 : idl.UnlinkedExprAssignOperator.assign; |
116 } | 136 } |
117 } | 137 } |
118 | 138 |
119 class _UnlinkedExprOperationReader extends fb.Reader<idl.UnlinkedExprOperation>
{ | 139 class _UnlinkedExprOperationReader |
| 140 extends fb.Reader<idl.UnlinkedExprOperation> { |
120 const _UnlinkedExprOperationReader() : super(); | 141 const _UnlinkedExprOperationReader() : super(); |
121 | 142 |
122 @override | 143 @override |
123 int get size => 1; | 144 int get size => 1; |
124 | 145 |
125 @override | 146 @override |
126 idl.UnlinkedExprOperation read(fb.BufferContext bc, int offset) { | 147 idl.UnlinkedExprOperation read(fb.BufferContext bc, int offset) { |
127 int index = const fb.Uint8Reader().read(bc, offset); | 148 int index = const fb.Uint8Reader().read(bc, offset); |
128 return index < idl.UnlinkedExprOperation.values.length ? idl.UnlinkedExprOpe
ration.values[index] : idl.UnlinkedExprOperation.pushInt; | 149 return index < idl.UnlinkedExprOperation.values.length |
| 150 ? idl.UnlinkedExprOperation.values[index] |
| 151 : idl.UnlinkedExprOperation.pushInt; |
129 } | 152 } |
130 } | 153 } |
131 | 154 |
132 class _UnlinkedParamKindReader extends fb.Reader<idl.UnlinkedParamKind> { | 155 class _UnlinkedParamKindReader extends fb.Reader<idl.UnlinkedParamKind> { |
133 const _UnlinkedParamKindReader() : super(); | 156 const _UnlinkedParamKindReader() : super(); |
134 | 157 |
135 @override | 158 @override |
136 int get size => 1; | 159 int get size => 1; |
137 | 160 |
138 @override | 161 @override |
139 idl.UnlinkedParamKind read(fb.BufferContext bc, int offset) { | 162 idl.UnlinkedParamKind read(fb.BufferContext bc, int offset) { |
140 int index = const fb.Uint8Reader().read(bc, offset); | 163 int index = const fb.Uint8Reader().read(bc, offset); |
141 return index < idl.UnlinkedParamKind.values.length ? idl.UnlinkedParamKind.v
alues[index] : idl.UnlinkedParamKind.required; | 164 return index < idl.UnlinkedParamKind.values.length |
| 165 ? idl.UnlinkedParamKind.values[index] |
| 166 : idl.UnlinkedParamKind.required; |
142 } | 167 } |
143 } | 168 } |
144 | 169 |
145 class AnalysisDriverExceptionContextBuilder extends Object with _AnalysisDriverE
xceptionContextMixin implements idl.AnalysisDriverExceptionContext { | 170 class AnalysisDriverExceptionContextBuilder extends Object |
| 171 with _AnalysisDriverExceptionContextMixin |
| 172 implements idl.AnalysisDriverExceptionContext { |
146 String _exception; | 173 String _exception; |
147 List<AnalysisDriverExceptionFileBuilder> _files; | 174 List<AnalysisDriverExceptionFileBuilder> _files; |
148 String _path; | 175 String _path; |
149 String _stackTrace; | 176 String _stackTrace; |
150 | 177 |
151 @override | 178 @override |
152 String get exception => _exception ??= ''; | 179 String get exception => _exception ??= ''; |
153 | 180 |
154 /** | 181 /** |
155 * The exception string. | 182 * The exception string. |
156 */ | 183 */ |
157 void set exception(String value) { | 184 void set exception(String value) { |
158 this._exception = value; | 185 this._exception = value; |
159 } | 186 } |
160 | 187 |
161 @override | 188 @override |
162 List<AnalysisDriverExceptionFileBuilder> get files => _files ??= <AnalysisDriv
erExceptionFileBuilder>[]; | 189 List<AnalysisDriverExceptionFileBuilder> get files => |
| 190 _files ??= <AnalysisDriverExceptionFileBuilder>[]; |
163 | 191 |
164 /** | 192 /** |
165 * The state of files when the exception happened. | 193 * The state of files when the exception happened. |
166 */ | 194 */ |
167 void set files(List<AnalysisDriverExceptionFileBuilder> value) { | 195 void set files(List<AnalysisDriverExceptionFileBuilder> value) { |
168 this._files = value; | 196 this._files = value; |
169 } | 197 } |
170 | 198 |
171 @override | 199 @override |
172 String get path => _path ??= ''; | 200 String get path => _path ??= ''; |
173 | 201 |
174 /** | 202 /** |
175 * The path of the file being analyzed when the exception happened. | 203 * The path of the file being analyzed when the exception happened. |
176 */ | 204 */ |
177 void set path(String value) { | 205 void set path(String value) { |
178 this._path = value; | 206 this._path = value; |
179 } | 207 } |
180 | 208 |
181 @override | 209 @override |
182 String get stackTrace => _stackTrace ??= ''; | 210 String get stackTrace => _stackTrace ??= ''; |
183 | 211 |
184 /** | 212 /** |
185 * The exception stack trace string. | 213 * The exception stack trace string. |
186 */ | 214 */ |
187 void set stackTrace(String value) { | 215 void set stackTrace(String value) { |
188 this._stackTrace = value; | 216 this._stackTrace = value; |
189 } | 217 } |
190 | 218 |
191 AnalysisDriverExceptionContextBuilder({String exception, List<AnalysisDriverEx
ceptionFileBuilder> files, String path, String stackTrace}) | 219 AnalysisDriverExceptionContextBuilder( |
192 : _exception = exception, | 220 {String exception, |
193 _files = files, | 221 List<AnalysisDriverExceptionFileBuilder> files, |
194 _path = path, | 222 String path, |
195 _stackTrace = stackTrace; | 223 String stackTrace}) |
| 224 : _exception = exception, |
| 225 _files = files, |
| 226 _path = path, |
| 227 _stackTrace = stackTrace; |
196 | 228 |
197 /** | 229 /** |
198 * Flush [informative] data recursively. | 230 * Flush [informative] data recursively. |
199 */ | 231 */ |
200 void flushInformative() { | 232 void flushInformative() { |
201 _files?.forEach((b) => b.flushInformative()); | 233 _files?.forEach((b) => b.flushInformative()); |
202 } | 234 } |
203 | 235 |
204 /** | 236 /** |
205 * Accumulate non-[informative] data into [signature]. | 237 * Accumulate non-[informative] data into [signature]. |
(...skipping 19 matching lines...) Expand all Loading... |
225 | 257 |
226 fb.Offset finish(fb.Builder fbBuilder) { | 258 fb.Offset finish(fb.Builder fbBuilder) { |
227 fb.Offset offset_exception; | 259 fb.Offset offset_exception; |
228 fb.Offset offset_files; | 260 fb.Offset offset_files; |
229 fb.Offset offset_path; | 261 fb.Offset offset_path; |
230 fb.Offset offset_stackTrace; | 262 fb.Offset offset_stackTrace; |
231 if (_exception != null) { | 263 if (_exception != null) { |
232 offset_exception = fbBuilder.writeString(_exception); | 264 offset_exception = fbBuilder.writeString(_exception); |
233 } | 265 } |
234 if (!(_files == null || _files.isEmpty)) { | 266 if (!(_files == null || _files.isEmpty)) { |
235 offset_files = fbBuilder.writeList(_files.map((b) => b.finish(fbBuilder)).
toList()); | 267 offset_files = |
| 268 fbBuilder.writeList(_files.map((b) => b.finish(fbBuilder)).toList()); |
236 } | 269 } |
237 if (_path != null) { | 270 if (_path != null) { |
238 offset_path = fbBuilder.writeString(_path); | 271 offset_path = fbBuilder.writeString(_path); |
239 } | 272 } |
240 if (_stackTrace != null) { | 273 if (_stackTrace != null) { |
241 offset_stackTrace = fbBuilder.writeString(_stackTrace); | 274 offset_stackTrace = fbBuilder.writeString(_stackTrace); |
242 } | 275 } |
243 fbBuilder.startTable(); | 276 fbBuilder.startTable(); |
244 if (offset_exception != null) { | 277 if (offset_exception != null) { |
245 fbBuilder.addOffset(1, offset_exception); | 278 fbBuilder.addOffset(1, offset_exception); |
246 } | 279 } |
247 if (offset_files != null) { | 280 if (offset_files != null) { |
248 fbBuilder.addOffset(3, offset_files); | 281 fbBuilder.addOffset(3, offset_files); |
249 } | 282 } |
250 if (offset_path != null) { | 283 if (offset_path != null) { |
251 fbBuilder.addOffset(0, offset_path); | 284 fbBuilder.addOffset(0, offset_path); |
252 } | 285 } |
253 if (offset_stackTrace != null) { | 286 if (offset_stackTrace != null) { |
254 fbBuilder.addOffset(2, offset_stackTrace); | 287 fbBuilder.addOffset(2, offset_stackTrace); |
255 } | 288 } |
256 return fbBuilder.endTable(); | 289 return fbBuilder.endTable(); |
257 } | 290 } |
258 } | 291 } |
259 | 292 |
260 idl.AnalysisDriverExceptionContext readAnalysisDriverExceptionContext(List<int>
buffer) { | 293 idl.AnalysisDriverExceptionContext readAnalysisDriverExceptionContext( |
| 294 List<int> buffer) { |
261 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 295 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
262 return const _AnalysisDriverExceptionContextReader().read(rootRef, 0); | 296 return const _AnalysisDriverExceptionContextReader().read(rootRef, 0); |
263 } | 297 } |
264 | 298 |
265 class _AnalysisDriverExceptionContextReader extends fb.TableReader<_AnalysisDriv
erExceptionContextImpl> { | 299 class _AnalysisDriverExceptionContextReader |
| 300 extends fb.TableReader<_AnalysisDriverExceptionContextImpl> { |
266 const _AnalysisDriverExceptionContextReader(); | 301 const _AnalysisDriverExceptionContextReader(); |
267 | 302 |
268 @override | 303 @override |
269 _AnalysisDriverExceptionContextImpl createObject(fb.BufferContext bc, int offs
et) => new _AnalysisDriverExceptionContextImpl(bc, offset); | 304 _AnalysisDriverExceptionContextImpl createObject( |
| 305 fb.BufferContext bc, int offset) => |
| 306 new _AnalysisDriverExceptionContextImpl(bc, offset); |
270 } | 307 } |
271 | 308 |
272 class _AnalysisDriverExceptionContextImpl extends Object with _AnalysisDriverExc
eptionContextMixin implements idl.AnalysisDriverExceptionContext { | 309 class _AnalysisDriverExceptionContextImpl extends Object |
| 310 with _AnalysisDriverExceptionContextMixin |
| 311 implements idl.AnalysisDriverExceptionContext { |
273 final fb.BufferContext _bc; | 312 final fb.BufferContext _bc; |
274 final int _bcOffset; | 313 final int _bcOffset; |
275 | 314 |
276 _AnalysisDriverExceptionContextImpl(this._bc, this._bcOffset); | 315 _AnalysisDriverExceptionContextImpl(this._bc, this._bcOffset); |
277 | 316 |
278 String _exception; | 317 String _exception; |
279 List<idl.AnalysisDriverExceptionFile> _files; | 318 List<idl.AnalysisDriverExceptionFile> _files; |
280 String _path; | 319 String _path; |
281 String _stackTrace; | 320 String _stackTrace; |
282 | 321 |
283 @override | 322 @override |
284 String get exception { | 323 String get exception { |
285 _exception ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 324 _exception ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
286 return _exception; | 325 return _exception; |
287 } | 326 } |
288 | 327 |
289 @override | 328 @override |
290 List<idl.AnalysisDriverExceptionFile> get files { | 329 List<idl.AnalysisDriverExceptionFile> get files { |
291 _files ??= const fb.ListReader<idl.AnalysisDriverExceptionFile>(const _Analy
sisDriverExceptionFileReader()).vTableGet(_bc, _bcOffset, 3, const <idl.Analysis
DriverExceptionFile>[]); | 330 _files ??= const fb.ListReader<idl.AnalysisDriverExceptionFile>( |
| 331 const _AnalysisDriverExceptionFileReader()) |
| 332 .vTableGet( |
| 333 _bc, _bcOffset, 3, const <idl.AnalysisDriverExceptionFile>[]); |
292 return _files; | 334 return _files; |
293 } | 335 } |
294 | 336 |
295 @override | 337 @override |
296 String get path { | 338 String get path { |
297 _path ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 339 _path ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
298 return _path; | 340 return _path; |
299 } | 341 } |
300 | 342 |
301 @override | 343 @override |
302 String get stackTrace { | 344 String get stackTrace { |
303 _stackTrace ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, ''); | 345 _stackTrace ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, ''); |
304 return _stackTrace; | 346 return _stackTrace; |
305 } | 347 } |
306 } | 348 } |
307 | 349 |
308 abstract class _AnalysisDriverExceptionContextMixin implements idl.AnalysisDrive
rExceptionContext { | 350 abstract class _AnalysisDriverExceptionContextMixin |
| 351 implements idl.AnalysisDriverExceptionContext { |
309 @override | 352 @override |
310 Map<String, Object> toJson() { | 353 Map<String, Object> toJson() { |
311 Map<String, Object> _result = <String, Object>{}; | 354 Map<String, Object> _result = <String, Object>{}; |
312 if (exception != '') _result["exception"] = exception; | 355 if (exception != '') _result["exception"] = exception; |
313 if (files.isNotEmpty) _result["files"] = files.map((_value) => _value.toJson
()).toList(); | 356 if (files.isNotEmpty) |
| 357 _result["files"] = files.map((_value) => _value.toJson()).toList(); |
314 if (path != '') _result["path"] = path; | 358 if (path != '') _result["path"] = path; |
315 if (stackTrace != '') _result["stackTrace"] = stackTrace; | 359 if (stackTrace != '') _result["stackTrace"] = stackTrace; |
316 return _result; | 360 return _result; |
317 } | 361 } |
318 | 362 |
319 @override | 363 @override |
320 Map<String, Object> toMap() => { | 364 Map<String, Object> toMap() => { |
321 "exception": exception, | 365 "exception": exception, |
322 "files": files, | 366 "files": files, |
323 "path": path, | 367 "path": path, |
324 "stackTrace": stackTrace, | 368 "stackTrace": stackTrace, |
325 }; | 369 }; |
326 | 370 |
327 @override | 371 @override |
328 String toString() => convert.JSON.encode(toJson()); | 372 String toString() => convert.JSON.encode(toJson()); |
329 } | 373 } |
330 | 374 |
331 class AnalysisDriverExceptionFileBuilder extends Object with _AnalysisDriverExce
ptionFileMixin implements idl.AnalysisDriverExceptionFile { | 375 class AnalysisDriverExceptionFileBuilder extends Object |
| 376 with _AnalysisDriverExceptionFileMixin |
| 377 implements idl.AnalysisDriverExceptionFile { |
332 String _content; | 378 String _content; |
333 String _path; | 379 String _path; |
334 | 380 |
335 @override | 381 @override |
336 String get content => _content ??= ''; | 382 String get content => _content ??= ''; |
337 | 383 |
338 /** | 384 /** |
339 * The content of the file. | 385 * The content of the file. |
340 */ | 386 */ |
341 void set content(String value) { | 387 void set content(String value) { |
342 this._content = value; | 388 this._content = value; |
343 } | 389 } |
344 | 390 |
345 @override | 391 @override |
346 String get path => _path ??= ''; | 392 String get path => _path ??= ''; |
347 | 393 |
348 /** | 394 /** |
349 * The path of the file. | 395 * The path of the file. |
350 */ | 396 */ |
351 void set path(String value) { | 397 void set path(String value) { |
352 this._path = value; | 398 this._path = value; |
353 } | 399 } |
354 | 400 |
355 AnalysisDriverExceptionFileBuilder({String content, String path}) | 401 AnalysisDriverExceptionFileBuilder({String content, String path}) |
356 : _content = content, | 402 : _content = content, |
357 _path = path; | 403 _path = path; |
358 | 404 |
359 /** | 405 /** |
360 * Flush [informative] data recursively. | 406 * Flush [informative] data recursively. |
361 */ | 407 */ |
362 void flushInformative() { | 408 void flushInformative() {} |
363 } | |
364 | 409 |
365 /** | 410 /** |
366 * Accumulate non-[informative] data into [signature]. | 411 * Accumulate non-[informative] data into [signature]. |
367 */ | 412 */ |
368 void collectApiSignature(api_sig.ApiSignature signature) { | 413 void collectApiSignature(api_sig.ApiSignature signature) { |
369 signature.addString(this._path ?? ''); | 414 signature.addString(this._path ?? ''); |
370 signature.addString(this._content ?? ''); | 415 signature.addString(this._content ?? ''); |
371 } | 416 } |
372 | 417 |
373 fb.Offset finish(fb.Builder fbBuilder) { | 418 fb.Offset finish(fb.Builder fbBuilder) { |
374 fb.Offset offset_content; | 419 fb.Offset offset_content; |
375 fb.Offset offset_path; | 420 fb.Offset offset_path; |
376 if (_content != null) { | 421 if (_content != null) { |
377 offset_content = fbBuilder.writeString(_content); | 422 offset_content = fbBuilder.writeString(_content); |
378 } | 423 } |
379 if (_path != null) { | 424 if (_path != null) { |
380 offset_path = fbBuilder.writeString(_path); | 425 offset_path = fbBuilder.writeString(_path); |
381 } | 426 } |
382 fbBuilder.startTable(); | 427 fbBuilder.startTable(); |
383 if (offset_content != null) { | 428 if (offset_content != null) { |
384 fbBuilder.addOffset(1, offset_content); | 429 fbBuilder.addOffset(1, offset_content); |
385 } | 430 } |
386 if (offset_path != null) { | 431 if (offset_path != null) { |
387 fbBuilder.addOffset(0, offset_path); | 432 fbBuilder.addOffset(0, offset_path); |
388 } | 433 } |
389 return fbBuilder.endTable(); | 434 return fbBuilder.endTable(); |
390 } | 435 } |
391 } | 436 } |
392 | 437 |
393 class _AnalysisDriverExceptionFileReader extends fb.TableReader<_AnalysisDriverE
xceptionFileImpl> { | 438 class _AnalysisDriverExceptionFileReader |
| 439 extends fb.TableReader<_AnalysisDriverExceptionFileImpl> { |
394 const _AnalysisDriverExceptionFileReader(); | 440 const _AnalysisDriverExceptionFileReader(); |
395 | 441 |
396 @override | 442 @override |
397 _AnalysisDriverExceptionFileImpl createObject(fb.BufferContext bc, int offset)
=> new _AnalysisDriverExceptionFileImpl(bc, offset); | 443 _AnalysisDriverExceptionFileImpl createObject( |
| 444 fb.BufferContext bc, int offset) => |
| 445 new _AnalysisDriverExceptionFileImpl(bc, offset); |
398 } | 446 } |
399 | 447 |
400 class _AnalysisDriverExceptionFileImpl extends Object with _AnalysisDriverExcept
ionFileMixin implements idl.AnalysisDriverExceptionFile { | 448 class _AnalysisDriverExceptionFileImpl extends Object |
| 449 with _AnalysisDriverExceptionFileMixin |
| 450 implements idl.AnalysisDriverExceptionFile { |
401 final fb.BufferContext _bc; | 451 final fb.BufferContext _bc; |
402 final int _bcOffset; | 452 final int _bcOffset; |
403 | 453 |
404 _AnalysisDriverExceptionFileImpl(this._bc, this._bcOffset); | 454 _AnalysisDriverExceptionFileImpl(this._bc, this._bcOffset); |
405 | 455 |
406 String _content; | 456 String _content; |
407 String _path; | 457 String _path; |
408 | 458 |
409 @override | 459 @override |
410 String get content { | 460 String get content { |
411 _content ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 461 _content ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
412 return _content; | 462 return _content; |
413 } | 463 } |
414 | 464 |
415 @override | 465 @override |
416 String get path { | 466 String get path { |
417 _path ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 467 _path ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
418 return _path; | 468 return _path; |
419 } | 469 } |
420 } | 470 } |
421 | 471 |
422 abstract class _AnalysisDriverExceptionFileMixin implements idl.AnalysisDriverEx
ceptionFile { | 472 abstract class _AnalysisDriverExceptionFileMixin |
| 473 implements idl.AnalysisDriverExceptionFile { |
423 @override | 474 @override |
424 Map<String, Object> toJson() { | 475 Map<String, Object> toJson() { |
425 Map<String, Object> _result = <String, Object>{}; | 476 Map<String, Object> _result = <String, Object>{}; |
426 if (content != '') _result["content"] = content; | 477 if (content != '') _result["content"] = content; |
427 if (path != '') _result["path"] = path; | 478 if (path != '') _result["path"] = path; |
428 return _result; | 479 return _result; |
429 } | 480 } |
430 | 481 |
431 @override | 482 @override |
432 Map<String, Object> toMap() => { | 483 Map<String, Object> toMap() => { |
433 "content": content, | 484 "content": content, |
434 "path": path, | 485 "path": path, |
435 }; | 486 }; |
436 | 487 |
437 @override | 488 @override |
438 String toString() => convert.JSON.encode(toJson()); | 489 String toString() => convert.JSON.encode(toJson()); |
439 } | 490 } |
440 | 491 |
441 class AnalysisDriverResolvedUnitBuilder extends Object with _AnalysisDriverResol
vedUnitMixin implements idl.AnalysisDriverResolvedUnit { | 492 class AnalysisDriverResolvedUnitBuilder extends Object |
| 493 with _AnalysisDriverResolvedUnitMixin |
| 494 implements idl.AnalysisDriverResolvedUnit { |
442 List<AnalysisDriverUnitErrorBuilder> _errors; | 495 List<AnalysisDriverUnitErrorBuilder> _errors; |
443 AnalysisDriverUnitIndexBuilder _index; | 496 AnalysisDriverUnitIndexBuilder _index; |
444 | 497 |
445 @override | 498 @override |
446 List<AnalysisDriverUnitErrorBuilder> get errors => _errors ??= <AnalysisDriver
UnitErrorBuilder>[]; | 499 List<AnalysisDriverUnitErrorBuilder> get errors => |
| 500 _errors ??= <AnalysisDriverUnitErrorBuilder>[]; |
447 | 501 |
448 /** | 502 /** |
449 * The full list of analysis errors, both syntactic and semantic. | 503 * The full list of analysis errors, both syntactic and semantic. |
450 */ | 504 */ |
451 void set errors(List<AnalysisDriverUnitErrorBuilder> value) { | 505 void set errors(List<AnalysisDriverUnitErrorBuilder> value) { |
452 this._errors = value; | 506 this._errors = value; |
453 } | 507 } |
454 | 508 |
455 @override | 509 @override |
456 AnalysisDriverUnitIndexBuilder get index => _index; | 510 AnalysisDriverUnitIndexBuilder get index => _index; |
457 | 511 |
458 /** | 512 /** |
459 * The index of the unit. | 513 * The index of the unit. |
460 */ | 514 */ |
461 void set index(AnalysisDriverUnitIndexBuilder value) { | 515 void set index(AnalysisDriverUnitIndexBuilder value) { |
462 this._index = value; | 516 this._index = value; |
463 } | 517 } |
464 | 518 |
465 AnalysisDriverResolvedUnitBuilder({List<AnalysisDriverUnitErrorBuilder> errors
, AnalysisDriverUnitIndexBuilder index}) | 519 AnalysisDriverResolvedUnitBuilder( |
466 : _errors = errors, | 520 {List<AnalysisDriverUnitErrorBuilder> errors, |
467 _index = index; | 521 AnalysisDriverUnitIndexBuilder index}) |
| 522 : _errors = errors, |
| 523 _index = index; |
468 | 524 |
469 /** | 525 /** |
470 * Flush [informative] data recursively. | 526 * Flush [informative] data recursively. |
471 */ | 527 */ |
472 void flushInformative() { | 528 void flushInformative() { |
473 _errors?.forEach((b) => b.flushInformative()); | 529 _errors?.forEach((b) => b.flushInformative()); |
474 _index?.flushInformative(); | 530 _index?.flushInformative(); |
475 } | 531 } |
476 | 532 |
477 /** | 533 /** |
(...skipping 14 matching lines...) Expand all Loading... |
492 | 548 |
493 List<int> toBuffer() { | 549 List<int> toBuffer() { |
494 fb.Builder fbBuilder = new fb.Builder(); | 550 fb.Builder fbBuilder = new fb.Builder(); |
495 return fbBuilder.finish(finish(fbBuilder), "ADRU"); | 551 return fbBuilder.finish(finish(fbBuilder), "ADRU"); |
496 } | 552 } |
497 | 553 |
498 fb.Offset finish(fb.Builder fbBuilder) { | 554 fb.Offset finish(fb.Builder fbBuilder) { |
499 fb.Offset offset_errors; | 555 fb.Offset offset_errors; |
500 fb.Offset offset_index; | 556 fb.Offset offset_index; |
501 if (!(_errors == null || _errors.isEmpty)) { | 557 if (!(_errors == null || _errors.isEmpty)) { |
502 offset_errors = fbBuilder.writeList(_errors.map((b) => b.finish(fbBuilder)
).toList()); | 558 offset_errors = |
| 559 fbBuilder.writeList(_errors.map((b) => b.finish(fbBuilder)).toList()); |
503 } | 560 } |
504 if (_index != null) { | 561 if (_index != null) { |
505 offset_index = _index.finish(fbBuilder); | 562 offset_index = _index.finish(fbBuilder); |
506 } | 563 } |
507 fbBuilder.startTable(); | 564 fbBuilder.startTable(); |
508 if (offset_errors != null) { | 565 if (offset_errors != null) { |
509 fbBuilder.addOffset(0, offset_errors); | 566 fbBuilder.addOffset(0, offset_errors); |
510 } | 567 } |
511 if (offset_index != null) { | 568 if (offset_index != null) { |
512 fbBuilder.addOffset(1, offset_index); | 569 fbBuilder.addOffset(1, offset_index); |
513 } | 570 } |
514 return fbBuilder.endTable(); | 571 return fbBuilder.endTable(); |
515 } | 572 } |
516 } | 573 } |
517 | 574 |
518 idl.AnalysisDriverResolvedUnit readAnalysisDriverResolvedUnit(List<int> buffer)
{ | 575 idl.AnalysisDriverResolvedUnit readAnalysisDriverResolvedUnit( |
| 576 List<int> buffer) { |
519 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 577 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
520 return const _AnalysisDriverResolvedUnitReader().read(rootRef, 0); | 578 return const _AnalysisDriverResolvedUnitReader().read(rootRef, 0); |
521 } | 579 } |
522 | 580 |
523 class _AnalysisDriverResolvedUnitReader extends fb.TableReader<_AnalysisDriverRe
solvedUnitImpl> { | 581 class _AnalysisDriverResolvedUnitReader |
| 582 extends fb.TableReader<_AnalysisDriverResolvedUnitImpl> { |
524 const _AnalysisDriverResolvedUnitReader(); | 583 const _AnalysisDriverResolvedUnitReader(); |
525 | 584 |
526 @override | 585 @override |
527 _AnalysisDriverResolvedUnitImpl createObject(fb.BufferContext bc, int offset)
=> new _AnalysisDriverResolvedUnitImpl(bc, offset); | 586 _AnalysisDriverResolvedUnitImpl createObject( |
| 587 fb.BufferContext bc, int offset) => |
| 588 new _AnalysisDriverResolvedUnitImpl(bc, offset); |
528 } | 589 } |
529 | 590 |
530 class _AnalysisDriverResolvedUnitImpl extends Object with _AnalysisDriverResolve
dUnitMixin implements idl.AnalysisDriverResolvedUnit { | 591 class _AnalysisDriverResolvedUnitImpl extends Object |
| 592 with _AnalysisDriverResolvedUnitMixin |
| 593 implements idl.AnalysisDriverResolvedUnit { |
531 final fb.BufferContext _bc; | 594 final fb.BufferContext _bc; |
532 final int _bcOffset; | 595 final int _bcOffset; |
533 | 596 |
534 _AnalysisDriverResolvedUnitImpl(this._bc, this._bcOffset); | 597 _AnalysisDriverResolvedUnitImpl(this._bc, this._bcOffset); |
535 | 598 |
536 List<idl.AnalysisDriverUnitError> _errors; | 599 List<idl.AnalysisDriverUnitError> _errors; |
537 idl.AnalysisDriverUnitIndex _index; | 600 idl.AnalysisDriverUnitIndex _index; |
538 | 601 |
539 @override | 602 @override |
540 List<idl.AnalysisDriverUnitError> get errors { | 603 List<idl.AnalysisDriverUnitError> get errors { |
541 _errors ??= const fb.ListReader<idl.AnalysisDriverUnitError>(const _Analysis
DriverUnitErrorReader()).vTableGet(_bc, _bcOffset, 0, const <idl.AnalysisDriverU
nitError>[]); | 604 _errors ??= const fb.ListReader<idl.AnalysisDriverUnitError>( |
| 605 const _AnalysisDriverUnitErrorReader()) |
| 606 .vTableGet(_bc, _bcOffset, 0, const <idl.AnalysisDriverUnitError>[]); |
542 return _errors; | 607 return _errors; |
543 } | 608 } |
544 | 609 |
545 @override | 610 @override |
546 idl.AnalysisDriverUnitIndex get index { | 611 idl.AnalysisDriverUnitIndex get index { |
547 _index ??= const _AnalysisDriverUnitIndexReader().vTableGet(_bc, _bcOffset,
1, null); | 612 _index ??= const _AnalysisDriverUnitIndexReader() |
| 613 .vTableGet(_bc, _bcOffset, 1, null); |
548 return _index; | 614 return _index; |
549 } | 615 } |
550 } | 616 } |
551 | 617 |
552 abstract class _AnalysisDriverResolvedUnitMixin implements idl.AnalysisDriverRes
olvedUnit { | 618 abstract class _AnalysisDriverResolvedUnitMixin |
| 619 implements idl.AnalysisDriverResolvedUnit { |
553 @override | 620 @override |
554 Map<String, Object> toJson() { | 621 Map<String, Object> toJson() { |
555 Map<String, Object> _result = <String, Object>{}; | 622 Map<String, Object> _result = <String, Object>{}; |
556 if (errors.isNotEmpty) _result["errors"] = errors.map((_value) => _value.toJ
son()).toList(); | 623 if (errors.isNotEmpty) |
| 624 _result["errors"] = errors.map((_value) => _value.toJson()).toList(); |
557 if (index != null) _result["index"] = index.toJson(); | 625 if (index != null) _result["index"] = index.toJson(); |
558 return _result; | 626 return _result; |
559 } | 627 } |
560 | 628 |
561 @override | 629 @override |
562 Map<String, Object> toMap() => { | 630 Map<String, Object> toMap() => { |
563 "errors": errors, | 631 "errors": errors, |
564 "index": index, | 632 "index": index, |
565 }; | 633 }; |
566 | 634 |
567 @override | 635 @override |
568 String toString() => convert.JSON.encode(toJson()); | 636 String toString() => convert.JSON.encode(toJson()); |
569 } | 637 } |
570 | 638 |
571 class AnalysisDriverUnitErrorBuilder extends Object with _AnalysisDriverUnitErro
rMixin implements idl.AnalysisDriverUnitError { | 639 class AnalysisDriverUnitErrorBuilder extends Object |
| 640 with _AnalysisDriverUnitErrorMixin |
| 641 implements idl.AnalysisDriverUnitError { |
572 String _correction; | 642 String _correction; |
573 int _length; | 643 int _length; |
574 String _message; | 644 String _message; |
575 int _offset; | 645 int _offset; |
576 String _uniqueName; | 646 String _uniqueName; |
577 | 647 |
578 @override | 648 @override |
579 String get correction => _correction ??= ''; | 649 String get correction => _correction ??= ''; |
580 | 650 |
581 /** | 651 /** |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 @override | 690 @override |
621 String get uniqueName => _uniqueName ??= ''; | 691 String get uniqueName => _uniqueName ??= ''; |
622 | 692 |
623 /** | 693 /** |
624 * The unique name of the error code. | 694 * The unique name of the error code. |
625 */ | 695 */ |
626 void set uniqueName(String value) { | 696 void set uniqueName(String value) { |
627 this._uniqueName = value; | 697 this._uniqueName = value; |
628 } | 698 } |
629 | 699 |
630 AnalysisDriverUnitErrorBuilder({String correction, int length, String message,
int offset, String uniqueName}) | 700 AnalysisDriverUnitErrorBuilder( |
631 : _correction = correction, | 701 {String correction, |
632 _length = length, | 702 int length, |
633 _message = message, | 703 String message, |
634 _offset = offset, | 704 int offset, |
635 _uniqueName = uniqueName; | 705 String uniqueName}) |
| 706 : _correction = correction, |
| 707 _length = length, |
| 708 _message = message, |
| 709 _offset = offset, |
| 710 _uniqueName = uniqueName; |
636 | 711 |
637 /** | 712 /** |
638 * Flush [informative] data recursively. | 713 * Flush [informative] data recursively. |
639 */ | 714 */ |
640 void flushInformative() { | 715 void flushInformative() {} |
641 } | |
642 | 716 |
643 /** | 717 /** |
644 * Accumulate non-[informative] data into [signature]. | 718 * Accumulate non-[informative] data into [signature]. |
645 */ | 719 */ |
646 void collectApiSignature(api_sig.ApiSignature signature) { | 720 void collectApiSignature(api_sig.ApiSignature signature) { |
647 signature.addInt(this._offset ?? 0); | 721 signature.addInt(this._offset ?? 0); |
648 signature.addInt(this._length ?? 0); | 722 signature.addInt(this._length ?? 0); |
649 signature.addString(this._uniqueName ?? ''); | 723 signature.addString(this._uniqueName ?? ''); |
650 signature.addString(this._message ?? ''); | 724 signature.addString(this._message ?? ''); |
651 signature.addString(this._correction ?? ''); | 725 signature.addString(this._correction ?? ''); |
(...skipping 25 matching lines...) Expand all Loading... |
677 if (_offset != null && _offset != 0) { | 751 if (_offset != null && _offset != 0) { |
678 fbBuilder.addUint32(0, _offset); | 752 fbBuilder.addUint32(0, _offset); |
679 } | 753 } |
680 if (offset_uniqueName != null) { | 754 if (offset_uniqueName != null) { |
681 fbBuilder.addOffset(2, offset_uniqueName); | 755 fbBuilder.addOffset(2, offset_uniqueName); |
682 } | 756 } |
683 return fbBuilder.endTable(); | 757 return fbBuilder.endTable(); |
684 } | 758 } |
685 } | 759 } |
686 | 760 |
687 class _AnalysisDriverUnitErrorReader extends fb.TableReader<_AnalysisDriverUnitE
rrorImpl> { | 761 class _AnalysisDriverUnitErrorReader |
| 762 extends fb.TableReader<_AnalysisDriverUnitErrorImpl> { |
688 const _AnalysisDriverUnitErrorReader(); | 763 const _AnalysisDriverUnitErrorReader(); |
689 | 764 |
690 @override | 765 @override |
691 _AnalysisDriverUnitErrorImpl createObject(fb.BufferContext bc, int offset) =>
new _AnalysisDriverUnitErrorImpl(bc, offset); | 766 _AnalysisDriverUnitErrorImpl createObject(fb.BufferContext bc, int offset) => |
| 767 new _AnalysisDriverUnitErrorImpl(bc, offset); |
692 } | 768 } |
693 | 769 |
694 class _AnalysisDriverUnitErrorImpl extends Object with _AnalysisDriverUnitErrorM
ixin implements idl.AnalysisDriverUnitError { | 770 class _AnalysisDriverUnitErrorImpl extends Object |
| 771 with _AnalysisDriverUnitErrorMixin |
| 772 implements idl.AnalysisDriverUnitError { |
695 final fb.BufferContext _bc; | 773 final fb.BufferContext _bc; |
696 final int _bcOffset; | 774 final int _bcOffset; |
697 | 775 |
698 _AnalysisDriverUnitErrorImpl(this._bc, this._bcOffset); | 776 _AnalysisDriverUnitErrorImpl(this._bc, this._bcOffset); |
699 | 777 |
700 String _correction; | 778 String _correction; |
701 int _length; | 779 int _length; |
702 String _message; | 780 String _message; |
703 int _offset; | 781 int _offset; |
704 String _uniqueName; | 782 String _uniqueName; |
(...skipping 22 matching lines...) Expand all Loading... |
727 return _offset; | 805 return _offset; |
728 } | 806 } |
729 | 807 |
730 @override | 808 @override |
731 String get uniqueName { | 809 String get uniqueName { |
732 _uniqueName ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, ''); | 810 _uniqueName ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, ''); |
733 return _uniqueName; | 811 return _uniqueName; |
734 } | 812 } |
735 } | 813 } |
736 | 814 |
737 abstract class _AnalysisDriverUnitErrorMixin implements idl.AnalysisDriverUnitEr
ror { | 815 abstract class _AnalysisDriverUnitErrorMixin |
| 816 implements idl.AnalysisDriverUnitError { |
738 @override | 817 @override |
739 Map<String, Object> toJson() { | 818 Map<String, Object> toJson() { |
740 Map<String, Object> _result = <String, Object>{}; | 819 Map<String, Object> _result = <String, Object>{}; |
741 if (correction != '') _result["correction"] = correction; | 820 if (correction != '') _result["correction"] = correction; |
742 if (length != 0) _result["length"] = length; | 821 if (length != 0) _result["length"] = length; |
743 if (message != '') _result["message"] = message; | 822 if (message != '') _result["message"] = message; |
744 if (offset != 0) _result["offset"] = offset; | 823 if (offset != 0) _result["offset"] = offset; |
745 if (uniqueName != '') _result["uniqueName"] = uniqueName; | 824 if (uniqueName != '') _result["uniqueName"] = uniqueName; |
746 return _result; | 825 return _result; |
747 } | 826 } |
748 | 827 |
749 @override | 828 @override |
750 Map<String, Object> toMap() => { | 829 Map<String, Object> toMap() => { |
751 "correction": correction, | 830 "correction": correction, |
752 "length": length, | 831 "length": length, |
753 "message": message, | 832 "message": message, |
754 "offset": offset, | 833 "offset": offset, |
755 "uniqueName": uniqueName, | 834 "uniqueName": uniqueName, |
756 }; | 835 }; |
757 | 836 |
758 @override | 837 @override |
759 String toString() => convert.JSON.encode(toJson()); | 838 String toString() => convert.JSON.encode(toJson()); |
760 } | 839 } |
761 | 840 |
762 class AnalysisDriverUnitIndexBuilder extends Object with _AnalysisDriverUnitInde
xMixin implements idl.AnalysisDriverUnitIndex { | 841 class AnalysisDriverUnitIndexBuilder extends Object |
| 842 with _AnalysisDriverUnitIndexMixin |
| 843 implements idl.AnalysisDriverUnitIndex { |
763 List<idl.IndexSyntheticElementKind> _elementKinds; | 844 List<idl.IndexSyntheticElementKind> _elementKinds; |
764 List<int> _elementNameClassMemberIds; | 845 List<int> _elementNameClassMemberIds; |
765 List<int> _elementNameParameterIds; | 846 List<int> _elementNameParameterIds; |
766 List<int> _elementNameUnitMemberIds; | 847 List<int> _elementNameUnitMemberIds; |
767 List<int> _elementUnits; | 848 List<int> _elementUnits; |
768 int _nullStringId; | 849 int _nullStringId; |
769 List<String> _strings; | 850 List<String> _strings; |
770 List<int> _unitLibraryUris; | 851 List<int> _unitLibraryUris; |
771 List<int> _unitUnitUris; | 852 List<int> _unitUnitUris; |
772 List<bool> _usedElementIsQualifiedFlags; | 853 List<bool> _usedElementIsQualifiedFlags; |
773 List<idl.IndexRelationKind> _usedElementKinds; | 854 List<idl.IndexRelationKind> _usedElementKinds; |
774 List<int> _usedElementLengths; | 855 List<int> _usedElementLengths; |
775 List<int> _usedElementOffsets; | 856 List<int> _usedElementOffsets; |
776 List<int> _usedElements; | 857 List<int> _usedElements; |
777 List<bool> _usedNameIsQualifiedFlags; | 858 List<bool> _usedNameIsQualifiedFlags; |
778 List<idl.IndexRelationKind> _usedNameKinds; | 859 List<idl.IndexRelationKind> _usedNameKinds; |
779 List<int> _usedNameOffsets; | 860 List<int> _usedNameOffsets; |
780 List<int> _usedNames; | 861 List<int> _usedNames; |
781 | 862 |
782 @override | 863 @override |
783 List<idl.IndexSyntheticElementKind> get elementKinds => _elementKinds ??= <idl
.IndexSyntheticElementKind>[]; | 864 List<idl.IndexSyntheticElementKind> get elementKinds => |
| 865 _elementKinds ??= <idl.IndexSyntheticElementKind>[]; |
784 | 866 |
785 /** | 867 /** |
786 * Each item of this list corresponds to a unique referenced element. It is | 868 * Each item of this list corresponds to a unique referenced element. It is |
787 * the kind of the synthetic element. | 869 * the kind of the synthetic element. |
788 */ | 870 */ |
789 void set elementKinds(List<idl.IndexSyntheticElementKind> value) { | 871 void set elementKinds(List<idl.IndexSyntheticElementKind> value) { |
790 this._elementKinds = value; | 872 this._elementKinds = value; |
791 } | 873 } |
792 | 874 |
793 @override | 875 @override |
794 List<int> get elementNameClassMemberIds => _elementNameClassMemberIds ??= <int
>[]; | 876 List<int> get elementNameClassMemberIds => |
| 877 _elementNameClassMemberIds ??= <int>[]; |
795 | 878 |
796 /** | 879 /** |
797 * Each item of this list corresponds to a unique referenced element. It is | 880 * Each item of this list corresponds to a unique referenced element. It is |
798 * the identifier of the class member element name, or `null` if the element | 881 * the identifier of the class member element name, or `null` if the element |
799 * is a top-level element. The list is sorted in ascending order, so that the | 882 * is a top-level element. The list is sorted in ascending order, so that the |
800 * client can quickly check whether an element is referenced in this index. | 883 * client can quickly check whether an element is referenced in this index. |
801 */ | 884 */ |
802 void set elementNameClassMemberIds(List<int> value) { | 885 void set elementNameClassMemberIds(List<int> value) { |
803 assert(value == null || value.every((e) => e >= 0)); | 886 assert(value == null || value.every((e) => e >= 0)); |
804 this._elementNameClassMemberIds = value; | 887 this._elementNameClassMemberIds = value; |
805 } | 888 } |
806 | 889 |
807 @override | 890 @override |
808 List<int> get elementNameParameterIds => _elementNameParameterIds ??= <int>[]; | 891 List<int> get elementNameParameterIds => _elementNameParameterIds ??= <int>[]; |
809 | 892 |
810 /** | 893 /** |
811 * Each item of this list corresponds to a unique referenced element. It is | 894 * Each item of this list corresponds to a unique referenced element. It is |
812 * the identifier of the named parameter name, or `null` if the element is not | 895 * the identifier of the named parameter name, or `null` if the element is not |
813 * a named parameter. The list is sorted in ascending order, so that the | 896 * a named parameter. The list is sorted in ascending order, so that the |
814 * client can quickly check whether an element is referenced in this index. | 897 * client can quickly check whether an element is referenced in this index. |
815 */ | 898 */ |
816 void set elementNameParameterIds(List<int> value) { | 899 void set elementNameParameterIds(List<int> value) { |
817 assert(value == null || value.every((e) => e >= 0)); | 900 assert(value == null || value.every((e) => e >= 0)); |
818 this._elementNameParameterIds = value; | 901 this._elementNameParameterIds = value; |
819 } | 902 } |
820 | 903 |
821 @override | 904 @override |
822 List<int> get elementNameUnitMemberIds => _elementNameUnitMemberIds ??= <int>[
]; | 905 List<int> get elementNameUnitMemberIds => |
| 906 _elementNameUnitMemberIds ??= <int>[]; |
823 | 907 |
824 /** | 908 /** |
825 * Each item of this list corresponds to a unique referenced element. It is | 909 * Each item of this list corresponds to a unique referenced element. It is |
826 * the identifier of the top-level element name, or `null` if the element is | 910 * the identifier of the top-level element name, or `null` if the element is |
827 * the unit. The list is sorted in ascending order, so that the client can | 911 * the unit. The list is sorted in ascending order, so that the client can |
828 * quickly check whether an element is referenced in this index. | 912 * quickly check whether an element is referenced in this index. |
829 */ | 913 */ |
830 void set elementNameUnitMemberIds(List<int> value) { | 914 void set elementNameUnitMemberIds(List<int> value) { |
831 assert(value == null || value.every((e) => e >= 0)); | 915 assert(value == null || value.every((e) => e >= 0)); |
832 this._elementNameUnitMemberIds = value; | 916 this._elementNameUnitMemberIds = value; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 /** | 970 /** |
887 * Each item of this list corresponds to the unit URI of a unique library | 971 * Each item of this list corresponds to the unit URI of a unique library |
888 * specific unit referenced in the index. It is an index into [strings] list. | 972 * specific unit referenced in the index. It is an index into [strings] list. |
889 */ | 973 */ |
890 void set unitUnitUris(List<int> value) { | 974 void set unitUnitUris(List<int> value) { |
891 assert(value == null || value.every((e) => e >= 0)); | 975 assert(value == null || value.every((e) => e >= 0)); |
892 this._unitUnitUris = value; | 976 this._unitUnitUris = value; |
893 } | 977 } |
894 | 978 |
895 @override | 979 @override |
896 List<bool> get usedElementIsQualifiedFlags => _usedElementIsQualifiedFlags ??=
<bool>[]; | 980 List<bool> get usedElementIsQualifiedFlags => |
| 981 _usedElementIsQualifiedFlags ??= <bool>[]; |
897 | 982 |
898 /** | 983 /** |
899 * Each item of this list is the `true` if the corresponding element usage | 984 * Each item of this list is the `true` if the corresponding element usage |
900 * is qualified with some prefix. | 985 * is qualified with some prefix. |
901 */ | 986 */ |
902 void set usedElementIsQualifiedFlags(List<bool> value) { | 987 void set usedElementIsQualifiedFlags(List<bool> value) { |
903 this._usedElementIsQualifiedFlags = value; | 988 this._usedElementIsQualifiedFlags = value; |
904 } | 989 } |
905 | 990 |
906 @override | 991 @override |
907 List<idl.IndexRelationKind> get usedElementKinds => _usedElementKinds ??= <idl
.IndexRelationKind>[]; | 992 List<idl.IndexRelationKind> get usedElementKinds => |
| 993 _usedElementKinds ??= <idl.IndexRelationKind>[]; |
908 | 994 |
909 /** | 995 /** |
910 * Each item of this list is the kind of the element usage. | 996 * Each item of this list is the kind of the element usage. |
911 */ | 997 */ |
912 void set usedElementKinds(List<idl.IndexRelationKind> value) { | 998 void set usedElementKinds(List<idl.IndexRelationKind> value) { |
913 this._usedElementKinds = value; | 999 this._usedElementKinds = value; |
914 } | 1000 } |
915 | 1001 |
916 @override | 1002 @override |
917 List<int> get usedElementLengths => _usedElementLengths ??= <int>[]; | 1003 List<int> get usedElementLengths => _usedElementLengths ??= <int>[]; |
(...skipping 26 matching lines...) Expand all Loading... |
944 * [elementNameUnitMemberIds], [elementNameClassMemberIds] and | 1030 * [elementNameUnitMemberIds], [elementNameClassMemberIds] and |
945 * [elementNameParameterIds]. The list is sorted in ascending order, so | 1031 * [elementNameParameterIds]. The list is sorted in ascending order, so |
946 * that the client can quickly find element references in this index. | 1032 * that the client can quickly find element references in this index. |
947 */ | 1033 */ |
948 void set usedElements(List<int> value) { | 1034 void set usedElements(List<int> value) { |
949 assert(value == null || value.every((e) => e >= 0)); | 1035 assert(value == null || value.every((e) => e >= 0)); |
950 this._usedElements = value; | 1036 this._usedElements = value; |
951 } | 1037 } |
952 | 1038 |
953 @override | 1039 @override |
954 List<bool> get usedNameIsQualifiedFlags => _usedNameIsQualifiedFlags ??= <bool
>[]; | 1040 List<bool> get usedNameIsQualifiedFlags => |
| 1041 _usedNameIsQualifiedFlags ??= <bool>[]; |
955 | 1042 |
956 /** | 1043 /** |
957 * Each item of this list is the `true` if the corresponding name usage | 1044 * Each item of this list is the `true` if the corresponding name usage |
958 * is qualified with some prefix. | 1045 * is qualified with some prefix. |
959 */ | 1046 */ |
960 void set usedNameIsQualifiedFlags(List<bool> value) { | 1047 void set usedNameIsQualifiedFlags(List<bool> value) { |
961 this._usedNameIsQualifiedFlags = value; | 1048 this._usedNameIsQualifiedFlags = value; |
962 } | 1049 } |
963 | 1050 |
964 @override | 1051 @override |
965 List<idl.IndexRelationKind> get usedNameKinds => _usedNameKinds ??= <idl.Index
RelationKind>[]; | 1052 List<idl.IndexRelationKind> get usedNameKinds => |
| 1053 _usedNameKinds ??= <idl.IndexRelationKind>[]; |
966 | 1054 |
967 /** | 1055 /** |
968 * Each item of this list is the kind of the name usage. | 1056 * Each item of this list is the kind of the name usage. |
969 */ | 1057 */ |
970 void set usedNameKinds(List<idl.IndexRelationKind> value) { | 1058 void set usedNameKinds(List<idl.IndexRelationKind> value) { |
971 this._usedNameKinds = value; | 1059 this._usedNameKinds = value; |
972 } | 1060 } |
973 | 1061 |
974 @override | 1062 @override |
975 List<int> get usedNameOffsets => _usedNameOffsets ??= <int>[]; | 1063 List<int> get usedNameOffsets => _usedNameOffsets ??= <int>[]; |
(...skipping 13 matching lines...) Expand all Loading... |
989 /** | 1077 /** |
990 * Each item of this list is the index into [strings] for a used name. The | 1078 * Each item of this list is the index into [strings] for a used name. The |
991 * list is sorted in ascending order, so that the client can quickly find | 1079 * list is sorted in ascending order, so that the client can quickly find |
992 * whether a name is used in this index. | 1080 * whether a name is used in this index. |
993 */ | 1081 */ |
994 void set usedNames(List<int> value) { | 1082 void set usedNames(List<int> value) { |
995 assert(value == null || value.every((e) => e >= 0)); | 1083 assert(value == null || value.every((e) => e >= 0)); |
996 this._usedNames = value; | 1084 this._usedNames = value; |
997 } | 1085 } |
998 | 1086 |
999 AnalysisDriverUnitIndexBuilder({List<idl.IndexSyntheticElementKind> elementKin
ds, List<int> elementNameClassMemberIds, List<int> elementNameParameterIds, List
<int> elementNameUnitMemberIds, List<int> elementUnits, int nullStringId, List<S
tring> strings, List<int> unitLibraryUris, List<int> unitUnitUris, List<bool> us
edElementIsQualifiedFlags, List<idl.IndexRelationKind> usedElementKinds, List<in
t> usedElementLengths, List<int> usedElementOffsets, List<int> usedElements, Lis
t<bool> usedNameIsQualifiedFlags, List<idl.IndexRelationKind> usedNameKinds, Lis
t<int> usedNameOffsets, List<int> usedNames}) | 1087 AnalysisDriverUnitIndexBuilder( |
1000 : _elementKinds = elementKinds, | 1088 {List<idl.IndexSyntheticElementKind> elementKinds, |
1001 _elementNameClassMemberIds = elementNameClassMemberIds, | 1089 List<int> elementNameClassMemberIds, |
1002 _elementNameParameterIds = elementNameParameterIds, | 1090 List<int> elementNameParameterIds, |
1003 _elementNameUnitMemberIds = elementNameUnitMemberIds, | 1091 List<int> elementNameUnitMemberIds, |
1004 _elementUnits = elementUnits, | 1092 List<int> elementUnits, |
1005 _nullStringId = nullStringId, | 1093 int nullStringId, |
1006 _strings = strings, | 1094 List<String> strings, |
1007 _unitLibraryUris = unitLibraryUris, | 1095 List<int> unitLibraryUris, |
1008 _unitUnitUris = unitUnitUris, | 1096 List<int> unitUnitUris, |
1009 _usedElementIsQualifiedFlags = usedElementIsQualifiedFlags, | 1097 List<bool> usedElementIsQualifiedFlags, |
1010 _usedElementKinds = usedElementKinds, | 1098 List<idl.IndexRelationKind> usedElementKinds, |
1011 _usedElementLengths = usedElementLengths, | 1099 List<int> usedElementLengths, |
1012 _usedElementOffsets = usedElementOffsets, | 1100 List<int> usedElementOffsets, |
1013 _usedElements = usedElements, | 1101 List<int> usedElements, |
1014 _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags, | 1102 List<bool> usedNameIsQualifiedFlags, |
1015 _usedNameKinds = usedNameKinds, | 1103 List<idl.IndexRelationKind> usedNameKinds, |
1016 _usedNameOffsets = usedNameOffsets, | 1104 List<int> usedNameOffsets, |
1017 _usedNames = usedNames; | 1105 List<int> usedNames}) |
| 1106 : _elementKinds = elementKinds, |
| 1107 _elementNameClassMemberIds = elementNameClassMemberIds, |
| 1108 _elementNameParameterIds = elementNameParameterIds, |
| 1109 _elementNameUnitMemberIds = elementNameUnitMemberIds, |
| 1110 _elementUnits = elementUnits, |
| 1111 _nullStringId = nullStringId, |
| 1112 _strings = strings, |
| 1113 _unitLibraryUris = unitLibraryUris, |
| 1114 _unitUnitUris = unitUnitUris, |
| 1115 _usedElementIsQualifiedFlags = usedElementIsQualifiedFlags, |
| 1116 _usedElementKinds = usedElementKinds, |
| 1117 _usedElementLengths = usedElementLengths, |
| 1118 _usedElementOffsets = usedElementOffsets, |
| 1119 _usedElements = usedElements, |
| 1120 _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags, |
| 1121 _usedNameKinds = usedNameKinds, |
| 1122 _usedNameOffsets = usedNameOffsets, |
| 1123 _usedNames = usedNames; |
1018 | 1124 |
1019 /** | 1125 /** |
1020 * Flush [informative] data recursively. | 1126 * Flush [informative] data recursively. |
1021 */ | 1127 */ |
1022 void flushInformative() { | 1128 void flushInformative() {} |
1023 } | |
1024 | 1129 |
1025 /** | 1130 /** |
1026 * Accumulate non-[informative] data into [signature]. | 1131 * Accumulate non-[informative] data into [signature]. |
1027 */ | 1132 */ |
1028 void collectApiSignature(api_sig.ApiSignature signature) { | 1133 void collectApiSignature(api_sig.ApiSignature signature) { |
1029 if (this._strings == null) { | 1134 if (this._strings == null) { |
1030 signature.addInt(0); | 1135 signature.addInt(0); |
1031 } else { | 1136 } else { |
1032 signature.addInt(this._strings.length); | 1137 signature.addInt(this._strings.length); |
1033 for (var x in this._strings) { | 1138 for (var x in this._strings) { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 fb.Offset offset_usedElementIsQualifiedFlags; | 1287 fb.Offset offset_usedElementIsQualifiedFlags; |
1183 fb.Offset offset_usedElementKinds; | 1288 fb.Offset offset_usedElementKinds; |
1184 fb.Offset offset_usedElementLengths; | 1289 fb.Offset offset_usedElementLengths; |
1185 fb.Offset offset_usedElementOffsets; | 1290 fb.Offset offset_usedElementOffsets; |
1186 fb.Offset offset_usedElements; | 1291 fb.Offset offset_usedElements; |
1187 fb.Offset offset_usedNameIsQualifiedFlags; | 1292 fb.Offset offset_usedNameIsQualifiedFlags; |
1188 fb.Offset offset_usedNameKinds; | 1293 fb.Offset offset_usedNameKinds; |
1189 fb.Offset offset_usedNameOffsets; | 1294 fb.Offset offset_usedNameOffsets; |
1190 fb.Offset offset_usedNames; | 1295 fb.Offset offset_usedNames; |
1191 if (!(_elementKinds == null || _elementKinds.isEmpty)) { | 1296 if (!(_elementKinds == null || _elementKinds.isEmpty)) { |
1192 offset_elementKinds = fbBuilder.writeListUint8(_elementKinds.map((b) => b.
index).toList()); | 1297 offset_elementKinds = |
| 1298 fbBuilder.writeListUint8(_elementKinds.map((b) => b.index).toList()); |
1193 } | 1299 } |
1194 if (!(_elementNameClassMemberIds == null || _elementNameClassMemberIds.isEmp
ty)) { | 1300 if (!(_elementNameClassMemberIds == null || |
1195 offset_elementNameClassMemberIds = fbBuilder.writeListUint32(_elementNameC
lassMemberIds); | 1301 _elementNameClassMemberIds.isEmpty)) { |
| 1302 offset_elementNameClassMemberIds = |
| 1303 fbBuilder.writeListUint32(_elementNameClassMemberIds); |
1196 } | 1304 } |
1197 if (!(_elementNameParameterIds == null || _elementNameParameterIds.isEmpty))
{ | 1305 if (!(_elementNameParameterIds == null || |
1198 offset_elementNameParameterIds = fbBuilder.writeListUint32(_elementNamePar
ameterIds); | 1306 _elementNameParameterIds.isEmpty)) { |
| 1307 offset_elementNameParameterIds = |
| 1308 fbBuilder.writeListUint32(_elementNameParameterIds); |
1199 } | 1309 } |
1200 if (!(_elementNameUnitMemberIds == null || _elementNameUnitMemberIds.isEmpty
)) { | 1310 if (!(_elementNameUnitMemberIds == null || |
1201 offset_elementNameUnitMemberIds = fbBuilder.writeListUint32(_elementNameUn
itMemberIds); | 1311 _elementNameUnitMemberIds.isEmpty)) { |
| 1312 offset_elementNameUnitMemberIds = |
| 1313 fbBuilder.writeListUint32(_elementNameUnitMemberIds); |
1202 } | 1314 } |
1203 if (!(_elementUnits == null || _elementUnits.isEmpty)) { | 1315 if (!(_elementUnits == null || _elementUnits.isEmpty)) { |
1204 offset_elementUnits = fbBuilder.writeListUint32(_elementUnits); | 1316 offset_elementUnits = fbBuilder.writeListUint32(_elementUnits); |
1205 } | 1317 } |
1206 if (!(_strings == null || _strings.isEmpty)) { | 1318 if (!(_strings == null || _strings.isEmpty)) { |
1207 offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeSt
ring(b)).toList()); | 1319 offset_strings = fbBuilder |
| 1320 .writeList(_strings.map((b) => fbBuilder.writeString(b)).toList()); |
1208 } | 1321 } |
1209 if (!(_unitLibraryUris == null || _unitLibraryUris.isEmpty)) { | 1322 if (!(_unitLibraryUris == null || _unitLibraryUris.isEmpty)) { |
1210 offset_unitLibraryUris = fbBuilder.writeListUint32(_unitLibraryUris); | 1323 offset_unitLibraryUris = fbBuilder.writeListUint32(_unitLibraryUris); |
1211 } | 1324 } |
1212 if (!(_unitUnitUris == null || _unitUnitUris.isEmpty)) { | 1325 if (!(_unitUnitUris == null || _unitUnitUris.isEmpty)) { |
1213 offset_unitUnitUris = fbBuilder.writeListUint32(_unitUnitUris); | 1326 offset_unitUnitUris = fbBuilder.writeListUint32(_unitUnitUris); |
1214 } | 1327 } |
1215 if (!(_usedElementIsQualifiedFlags == null || _usedElementIsQualifiedFlags.i
sEmpty)) { | 1328 if (!(_usedElementIsQualifiedFlags == null || |
1216 offset_usedElementIsQualifiedFlags = fbBuilder.writeListBool(_usedElementI
sQualifiedFlags); | 1329 _usedElementIsQualifiedFlags.isEmpty)) { |
| 1330 offset_usedElementIsQualifiedFlags = |
| 1331 fbBuilder.writeListBool(_usedElementIsQualifiedFlags); |
1217 } | 1332 } |
1218 if (!(_usedElementKinds == null || _usedElementKinds.isEmpty)) { | 1333 if (!(_usedElementKinds == null || _usedElementKinds.isEmpty)) { |
1219 offset_usedElementKinds = fbBuilder.writeListUint8(_usedElementKinds.map((
b) => b.index).toList()); | 1334 offset_usedElementKinds = fbBuilder |
| 1335 .writeListUint8(_usedElementKinds.map((b) => b.index).toList()); |
1220 } | 1336 } |
1221 if (!(_usedElementLengths == null || _usedElementLengths.isEmpty)) { | 1337 if (!(_usedElementLengths == null || _usedElementLengths.isEmpty)) { |
1222 offset_usedElementLengths = fbBuilder.writeListUint32(_usedElementLengths)
; | 1338 offset_usedElementLengths = |
| 1339 fbBuilder.writeListUint32(_usedElementLengths); |
1223 } | 1340 } |
1224 if (!(_usedElementOffsets == null || _usedElementOffsets.isEmpty)) { | 1341 if (!(_usedElementOffsets == null || _usedElementOffsets.isEmpty)) { |
1225 offset_usedElementOffsets = fbBuilder.writeListUint32(_usedElementOffsets)
; | 1342 offset_usedElementOffsets = |
| 1343 fbBuilder.writeListUint32(_usedElementOffsets); |
1226 } | 1344 } |
1227 if (!(_usedElements == null || _usedElements.isEmpty)) { | 1345 if (!(_usedElements == null || _usedElements.isEmpty)) { |
1228 offset_usedElements = fbBuilder.writeListUint32(_usedElements); | 1346 offset_usedElements = fbBuilder.writeListUint32(_usedElements); |
1229 } | 1347 } |
1230 if (!(_usedNameIsQualifiedFlags == null || _usedNameIsQualifiedFlags.isEmpty
)) { | 1348 if (!(_usedNameIsQualifiedFlags == null || |
1231 offset_usedNameIsQualifiedFlags = fbBuilder.writeListBool(_usedNameIsQuali
fiedFlags); | 1349 _usedNameIsQualifiedFlags.isEmpty)) { |
| 1350 offset_usedNameIsQualifiedFlags = |
| 1351 fbBuilder.writeListBool(_usedNameIsQualifiedFlags); |
1232 } | 1352 } |
1233 if (!(_usedNameKinds == null || _usedNameKinds.isEmpty)) { | 1353 if (!(_usedNameKinds == null || _usedNameKinds.isEmpty)) { |
1234 offset_usedNameKinds = fbBuilder.writeListUint8(_usedNameKinds.map((b) =>
b.index).toList()); | 1354 offset_usedNameKinds = |
| 1355 fbBuilder.writeListUint8(_usedNameKinds.map((b) => b.index).toList()); |
1235 } | 1356 } |
1236 if (!(_usedNameOffsets == null || _usedNameOffsets.isEmpty)) { | 1357 if (!(_usedNameOffsets == null || _usedNameOffsets.isEmpty)) { |
1237 offset_usedNameOffsets = fbBuilder.writeListUint32(_usedNameOffsets); | 1358 offset_usedNameOffsets = fbBuilder.writeListUint32(_usedNameOffsets); |
1238 } | 1359 } |
1239 if (!(_usedNames == null || _usedNames.isEmpty)) { | 1360 if (!(_usedNames == null || _usedNames.isEmpty)) { |
1240 offset_usedNames = fbBuilder.writeListUint32(_usedNames); | 1361 offset_usedNames = fbBuilder.writeListUint32(_usedNames); |
1241 } | 1362 } |
1242 fbBuilder.startTable(); | 1363 fbBuilder.startTable(); |
1243 if (offset_elementKinds != null) { | 1364 if (offset_elementKinds != null) { |
1244 fbBuilder.addOffset(4, offset_elementKinds); | 1365 fbBuilder.addOffset(4, offset_elementKinds); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 } | 1417 } |
1297 return fbBuilder.endTable(); | 1418 return fbBuilder.endTable(); |
1298 } | 1419 } |
1299 } | 1420 } |
1300 | 1421 |
1301 idl.AnalysisDriverUnitIndex readAnalysisDriverUnitIndex(List<int> buffer) { | 1422 idl.AnalysisDriverUnitIndex readAnalysisDriverUnitIndex(List<int> buffer) { |
1302 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 1423 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
1303 return const _AnalysisDriverUnitIndexReader().read(rootRef, 0); | 1424 return const _AnalysisDriverUnitIndexReader().read(rootRef, 0); |
1304 } | 1425 } |
1305 | 1426 |
1306 class _AnalysisDriverUnitIndexReader extends fb.TableReader<_AnalysisDriverUnitI
ndexImpl> { | 1427 class _AnalysisDriverUnitIndexReader |
| 1428 extends fb.TableReader<_AnalysisDriverUnitIndexImpl> { |
1307 const _AnalysisDriverUnitIndexReader(); | 1429 const _AnalysisDriverUnitIndexReader(); |
1308 | 1430 |
1309 @override | 1431 @override |
1310 _AnalysisDriverUnitIndexImpl createObject(fb.BufferContext bc, int offset) =>
new _AnalysisDriverUnitIndexImpl(bc, offset); | 1432 _AnalysisDriverUnitIndexImpl createObject(fb.BufferContext bc, int offset) => |
| 1433 new _AnalysisDriverUnitIndexImpl(bc, offset); |
1311 } | 1434 } |
1312 | 1435 |
1313 class _AnalysisDriverUnitIndexImpl extends Object with _AnalysisDriverUnitIndexM
ixin implements idl.AnalysisDriverUnitIndex { | 1436 class _AnalysisDriverUnitIndexImpl extends Object |
| 1437 with _AnalysisDriverUnitIndexMixin |
| 1438 implements idl.AnalysisDriverUnitIndex { |
1314 final fb.BufferContext _bc; | 1439 final fb.BufferContext _bc; |
1315 final int _bcOffset; | 1440 final int _bcOffset; |
1316 | 1441 |
1317 _AnalysisDriverUnitIndexImpl(this._bc, this._bcOffset); | 1442 _AnalysisDriverUnitIndexImpl(this._bc, this._bcOffset); |
1318 | 1443 |
1319 List<idl.IndexSyntheticElementKind> _elementKinds; | 1444 List<idl.IndexSyntheticElementKind> _elementKinds; |
1320 List<int> _elementNameClassMemberIds; | 1445 List<int> _elementNameClassMemberIds; |
1321 List<int> _elementNameParameterIds; | 1446 List<int> _elementNameParameterIds; |
1322 List<int> _elementNameUnitMemberIds; | 1447 List<int> _elementNameUnitMemberIds; |
1323 List<int> _elementUnits; | 1448 List<int> _elementUnits; |
1324 int _nullStringId; | 1449 int _nullStringId; |
1325 List<String> _strings; | 1450 List<String> _strings; |
1326 List<int> _unitLibraryUris; | 1451 List<int> _unitLibraryUris; |
1327 List<int> _unitUnitUris; | 1452 List<int> _unitUnitUris; |
1328 List<bool> _usedElementIsQualifiedFlags; | 1453 List<bool> _usedElementIsQualifiedFlags; |
1329 List<idl.IndexRelationKind> _usedElementKinds; | 1454 List<idl.IndexRelationKind> _usedElementKinds; |
1330 List<int> _usedElementLengths; | 1455 List<int> _usedElementLengths; |
1331 List<int> _usedElementOffsets; | 1456 List<int> _usedElementOffsets; |
1332 List<int> _usedElements; | 1457 List<int> _usedElements; |
1333 List<bool> _usedNameIsQualifiedFlags; | 1458 List<bool> _usedNameIsQualifiedFlags; |
1334 List<idl.IndexRelationKind> _usedNameKinds; | 1459 List<idl.IndexRelationKind> _usedNameKinds; |
1335 List<int> _usedNameOffsets; | 1460 List<int> _usedNameOffsets; |
1336 List<int> _usedNames; | 1461 List<int> _usedNames; |
1337 | 1462 |
1338 @override | 1463 @override |
1339 List<idl.IndexSyntheticElementKind> get elementKinds { | 1464 List<idl.IndexSyntheticElementKind> get elementKinds { |
1340 _elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>(const _
IndexSyntheticElementKindReader()).vTableGet(_bc, _bcOffset, 4, const <idl.Index
SyntheticElementKind>[]); | 1465 _elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>( |
| 1466 const _IndexSyntheticElementKindReader()) |
| 1467 .vTableGet(_bc, _bcOffset, 4, const <idl.IndexSyntheticElementKind>[]); |
1341 return _elementKinds; | 1468 return _elementKinds; |
1342 } | 1469 } |
1343 | 1470 |
1344 @override | 1471 @override |
1345 List<int> get elementNameClassMemberIds { | 1472 List<int> get elementNameClassMemberIds { |
1346 _elementNameClassMemberIds ??= const fb.Uint32ListReader().vTableGet(_bc, _b
cOffset, 7, const <int>[]); | 1473 _elementNameClassMemberIds ??= |
| 1474 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 7, const <int>[]); |
1347 return _elementNameClassMemberIds; | 1475 return _elementNameClassMemberIds; |
1348 } | 1476 } |
1349 | 1477 |
1350 @override | 1478 @override |
1351 List<int> get elementNameParameterIds { | 1479 List<int> get elementNameParameterIds { |
1352 _elementNameParameterIds ??= const fb.Uint32ListReader().vTableGet(_bc, _bcO
ffset, 8, const <int>[]); | 1480 _elementNameParameterIds ??= |
| 1481 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 8, const <int>[]); |
1353 return _elementNameParameterIds; | 1482 return _elementNameParameterIds; |
1354 } | 1483 } |
1355 | 1484 |
1356 @override | 1485 @override |
1357 List<int> get elementNameUnitMemberIds { | 1486 List<int> get elementNameUnitMemberIds { |
1358 _elementNameUnitMemberIds ??= const fb.Uint32ListReader().vTableGet(_bc, _bc
Offset, 6, const <int>[]); | 1487 _elementNameUnitMemberIds ??= |
| 1488 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 6, const <int>[]); |
1359 return _elementNameUnitMemberIds; | 1489 return _elementNameUnitMemberIds; |
1360 } | 1490 } |
1361 | 1491 |
1362 @override | 1492 @override |
1363 List<int> get elementUnits { | 1493 List<int> get elementUnits { |
1364 _elementUnits ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, c
onst <int>[]); | 1494 _elementUnits ??= |
| 1495 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, const <int>[]); |
1365 return _elementUnits; | 1496 return _elementUnits; |
1366 } | 1497 } |
1367 | 1498 |
1368 @override | 1499 @override |
1369 int get nullStringId { | 1500 int get nullStringId { |
1370 _nullStringId ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 1501 _nullStringId ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
1371 return _nullStringId; | 1502 return _nullStringId; |
1372 } | 1503 } |
1373 | 1504 |
1374 @override | 1505 @override |
1375 List<String> get strings { | 1506 List<String> get strings { |
1376 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bc, _bcOffset, 0, const <String>[]); | 1507 _strings ??= const fb.ListReader<String>(const fb.StringReader()) |
| 1508 .vTableGet(_bc, _bcOffset, 0, const <String>[]); |
1377 return _strings; | 1509 return _strings; |
1378 } | 1510 } |
1379 | 1511 |
1380 @override | 1512 @override |
1381 List<int> get unitLibraryUris { | 1513 List<int> get unitLibraryUris { |
1382 _unitLibraryUris ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2
, const <int>[]); | 1514 _unitLibraryUris ??= |
| 1515 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, const <int>[]); |
1383 return _unitLibraryUris; | 1516 return _unitLibraryUris; |
1384 } | 1517 } |
1385 | 1518 |
1386 @override | 1519 @override |
1387 List<int> get unitUnitUris { | 1520 List<int> get unitUnitUris { |
1388 _unitUnitUris ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, c
onst <int>[]); | 1521 _unitUnitUris ??= |
| 1522 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, const <int>[]); |
1389 return _unitUnitUris; | 1523 return _unitUnitUris; |
1390 } | 1524 } |
1391 | 1525 |
1392 @override | 1526 @override |
1393 List<bool> get usedElementIsQualifiedFlags { | 1527 List<bool> get usedElementIsQualifiedFlags { |
1394 _usedElementIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bc, _b
cOffset, 13, const <bool>[]); | 1528 _usedElementIsQualifiedFlags ??= |
| 1529 const fb.BoolListReader().vTableGet(_bc, _bcOffset, 13, const <bool>[]); |
1395 return _usedElementIsQualifiedFlags; | 1530 return _usedElementIsQualifiedFlags; |
1396 } | 1531 } |
1397 | 1532 |
1398 @override | 1533 @override |
1399 List<idl.IndexRelationKind> get usedElementKinds { | 1534 List<idl.IndexRelationKind> get usedElementKinds { |
1400 _usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _Inde
xRelationKindReader()).vTableGet(_bc, _bcOffset, 10, const <idl.IndexRelationKin
d>[]); | 1535 _usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>( |
| 1536 const _IndexRelationKindReader()) |
| 1537 .vTableGet(_bc, _bcOffset, 10, const <idl.IndexRelationKind>[]); |
1401 return _usedElementKinds; | 1538 return _usedElementKinds; |
1402 } | 1539 } |
1403 | 1540 |
1404 @override | 1541 @override |
1405 List<int> get usedElementLengths { | 1542 List<int> get usedElementLengths { |
1406 _usedElementLengths ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 12, const <int>[]); | 1543 _usedElementLengths ??= const fb.Uint32ListReader() |
| 1544 .vTableGet(_bc, _bcOffset, 12, const <int>[]); |
1407 return _usedElementLengths; | 1545 return _usedElementLengths; |
1408 } | 1546 } |
1409 | 1547 |
1410 @override | 1548 @override |
1411 List<int> get usedElementOffsets { | 1549 List<int> get usedElementOffsets { |
1412 _usedElementOffsets ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 11, const <int>[]); | 1550 _usedElementOffsets ??= const fb.Uint32ListReader() |
| 1551 .vTableGet(_bc, _bcOffset, 11, const <int>[]); |
1413 return _usedElementOffsets; | 1552 return _usedElementOffsets; |
1414 } | 1553 } |
1415 | 1554 |
1416 @override | 1555 @override |
1417 List<int> get usedElements { | 1556 List<int> get usedElements { |
1418 _usedElements ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 9, c
onst <int>[]); | 1557 _usedElements ??= |
| 1558 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 9, const <int>[]); |
1419 return _usedElements; | 1559 return _usedElements; |
1420 } | 1560 } |
1421 | 1561 |
1422 @override | 1562 @override |
1423 List<bool> get usedNameIsQualifiedFlags { | 1563 List<bool> get usedNameIsQualifiedFlags { |
1424 _usedNameIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bc, _bcOf
fset, 17, const <bool>[]); | 1564 _usedNameIsQualifiedFlags ??= |
| 1565 const fb.BoolListReader().vTableGet(_bc, _bcOffset, 17, const <bool>[]); |
1425 return _usedNameIsQualifiedFlags; | 1566 return _usedNameIsQualifiedFlags; |
1426 } | 1567 } |
1427 | 1568 |
1428 @override | 1569 @override |
1429 List<idl.IndexRelationKind> get usedNameKinds { | 1570 List<idl.IndexRelationKind> get usedNameKinds { |
1430 _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _IndexRe
lationKindReader()).vTableGet(_bc, _bcOffset, 15, const <idl.IndexRelationKind>[
]); | 1571 _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>( |
| 1572 const _IndexRelationKindReader()) |
| 1573 .vTableGet(_bc, _bcOffset, 15, const <idl.IndexRelationKind>[]); |
1431 return _usedNameKinds; | 1574 return _usedNameKinds; |
1432 } | 1575 } |
1433 | 1576 |
1434 @override | 1577 @override |
1435 List<int> get usedNameOffsets { | 1578 List<int> get usedNameOffsets { |
1436 _usedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1
6, const <int>[]); | 1579 _usedNameOffsets ??= const fb.Uint32ListReader() |
| 1580 .vTableGet(_bc, _bcOffset, 16, const <int>[]); |
1437 return _usedNameOffsets; | 1581 return _usedNameOffsets; |
1438 } | 1582 } |
1439 | 1583 |
1440 @override | 1584 @override |
1441 List<int> get usedNames { | 1585 List<int> get usedNames { |
1442 _usedNames ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 14, con
st <int>[]); | 1586 _usedNames ??= const fb.Uint32ListReader() |
| 1587 .vTableGet(_bc, _bcOffset, 14, const <int>[]); |
1443 return _usedNames; | 1588 return _usedNames; |
1444 } | 1589 } |
1445 } | 1590 } |
1446 | 1591 |
1447 abstract class _AnalysisDriverUnitIndexMixin implements idl.AnalysisDriverUnitIn
dex { | 1592 abstract class _AnalysisDriverUnitIndexMixin |
| 1593 implements idl.AnalysisDriverUnitIndex { |
1448 @override | 1594 @override |
1449 Map<String, Object> toJson() { | 1595 Map<String, Object> toJson() { |
1450 Map<String, Object> _result = <String, Object>{}; | 1596 Map<String, Object> _result = <String, Object>{}; |
1451 if (elementKinds.isNotEmpty) _result["elementKinds"] = elementKinds.map((_va
lue) => _value.toString().split('.')[1]).toList(); | 1597 if (elementKinds.isNotEmpty) |
1452 if (elementNameClassMemberIds.isNotEmpty) _result["elementNameClassMemberIds
"] = elementNameClassMemberIds; | 1598 _result["elementKinds"] = elementKinds |
1453 if (elementNameParameterIds.isNotEmpty) _result["elementNameParameterIds"] =
elementNameParameterIds; | 1599 .map((_value) => _value.toString().split('.')[1]) |
1454 if (elementNameUnitMemberIds.isNotEmpty) _result["elementNameUnitMemberIds"]
= elementNameUnitMemberIds; | 1600 .toList(); |
| 1601 if (elementNameClassMemberIds.isNotEmpty) |
| 1602 _result["elementNameClassMemberIds"] = elementNameClassMemberIds; |
| 1603 if (elementNameParameterIds.isNotEmpty) |
| 1604 _result["elementNameParameterIds"] = elementNameParameterIds; |
| 1605 if (elementNameUnitMemberIds.isNotEmpty) |
| 1606 _result["elementNameUnitMemberIds"] = elementNameUnitMemberIds; |
1455 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits; | 1607 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits; |
1456 if (nullStringId != 0) _result["nullStringId"] = nullStringId; | 1608 if (nullStringId != 0) _result["nullStringId"] = nullStringId; |
1457 if (strings.isNotEmpty) _result["strings"] = strings; | 1609 if (strings.isNotEmpty) _result["strings"] = strings; |
1458 if (unitLibraryUris.isNotEmpty) _result["unitLibraryUris"] = unitLibraryUris
; | 1610 if (unitLibraryUris.isNotEmpty) |
| 1611 _result["unitLibraryUris"] = unitLibraryUris; |
1459 if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris; | 1612 if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris; |
1460 if (usedElementIsQualifiedFlags.isNotEmpty) _result["usedElementIsQualifiedF
lags"] = usedElementIsQualifiedFlags; | 1613 if (usedElementIsQualifiedFlags.isNotEmpty) |
1461 if (usedElementKinds.isNotEmpty) _result["usedElementKinds"] = usedElementKi
nds.map((_value) => _value.toString().split('.')[1]).toList(); | 1614 _result["usedElementIsQualifiedFlags"] = usedElementIsQualifiedFlags; |
1462 if (usedElementLengths.isNotEmpty) _result["usedElementLengths"] = usedEleme
ntLengths; | 1615 if (usedElementKinds.isNotEmpty) |
1463 if (usedElementOffsets.isNotEmpty) _result["usedElementOffsets"] = usedEleme
ntOffsets; | 1616 _result["usedElementKinds"] = usedElementKinds |
| 1617 .map((_value) => _value.toString().split('.')[1]) |
| 1618 .toList(); |
| 1619 if (usedElementLengths.isNotEmpty) |
| 1620 _result["usedElementLengths"] = usedElementLengths; |
| 1621 if (usedElementOffsets.isNotEmpty) |
| 1622 _result["usedElementOffsets"] = usedElementOffsets; |
1464 if (usedElements.isNotEmpty) _result["usedElements"] = usedElements; | 1623 if (usedElements.isNotEmpty) _result["usedElements"] = usedElements; |
1465 if (usedNameIsQualifiedFlags.isNotEmpty) _result["usedNameIsQualifiedFlags"]
= usedNameIsQualifiedFlags; | 1624 if (usedNameIsQualifiedFlags.isNotEmpty) |
1466 if (usedNameKinds.isNotEmpty) _result["usedNameKinds"] = usedNameKinds.map((
_value) => _value.toString().split('.')[1]).toList(); | 1625 _result["usedNameIsQualifiedFlags"] = usedNameIsQualifiedFlags; |
1467 if (usedNameOffsets.isNotEmpty) _result["usedNameOffsets"] = usedNameOffsets
; | 1626 if (usedNameKinds.isNotEmpty) |
| 1627 _result["usedNameKinds"] = usedNameKinds |
| 1628 .map((_value) => _value.toString().split('.')[1]) |
| 1629 .toList(); |
| 1630 if (usedNameOffsets.isNotEmpty) |
| 1631 _result["usedNameOffsets"] = usedNameOffsets; |
1468 if (usedNames.isNotEmpty) _result["usedNames"] = usedNames; | 1632 if (usedNames.isNotEmpty) _result["usedNames"] = usedNames; |
1469 return _result; | 1633 return _result; |
1470 } | 1634 } |
1471 | 1635 |
1472 @override | 1636 @override |
1473 Map<String, Object> toMap() => { | 1637 Map<String, Object> toMap() => { |
1474 "elementKinds": elementKinds, | 1638 "elementKinds": elementKinds, |
1475 "elementNameClassMemberIds": elementNameClassMemberIds, | 1639 "elementNameClassMemberIds": elementNameClassMemberIds, |
1476 "elementNameParameterIds": elementNameParameterIds, | 1640 "elementNameParameterIds": elementNameParameterIds, |
1477 "elementNameUnitMemberIds": elementNameUnitMemberIds, | 1641 "elementNameUnitMemberIds": elementNameUnitMemberIds, |
1478 "elementUnits": elementUnits, | 1642 "elementUnits": elementUnits, |
1479 "nullStringId": nullStringId, | 1643 "nullStringId": nullStringId, |
1480 "strings": strings, | 1644 "strings": strings, |
1481 "unitLibraryUris": unitLibraryUris, | 1645 "unitLibraryUris": unitLibraryUris, |
1482 "unitUnitUris": unitUnitUris, | 1646 "unitUnitUris": unitUnitUris, |
1483 "usedElementIsQualifiedFlags": usedElementIsQualifiedFlags, | 1647 "usedElementIsQualifiedFlags": usedElementIsQualifiedFlags, |
1484 "usedElementKinds": usedElementKinds, | 1648 "usedElementKinds": usedElementKinds, |
1485 "usedElementLengths": usedElementLengths, | 1649 "usedElementLengths": usedElementLengths, |
1486 "usedElementOffsets": usedElementOffsets, | 1650 "usedElementOffsets": usedElementOffsets, |
1487 "usedElements": usedElements, | 1651 "usedElements": usedElements, |
1488 "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags, | 1652 "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags, |
1489 "usedNameKinds": usedNameKinds, | 1653 "usedNameKinds": usedNameKinds, |
1490 "usedNameOffsets": usedNameOffsets, | 1654 "usedNameOffsets": usedNameOffsets, |
1491 "usedNames": usedNames, | 1655 "usedNames": usedNames, |
1492 }; | 1656 }; |
1493 | 1657 |
1494 @override | 1658 @override |
1495 String toString() => convert.JSON.encode(toJson()); | 1659 String toString() => convert.JSON.encode(toJson()); |
1496 } | 1660 } |
1497 | 1661 |
1498 class AnalysisDriverUnlinkedUnitBuilder extends Object with _AnalysisDriverUnlin
kedUnitMixin implements idl.AnalysisDriverUnlinkedUnit { | 1662 class AnalysisDriverUnlinkedUnitBuilder extends Object |
| 1663 with _AnalysisDriverUnlinkedUnitMixin |
| 1664 implements idl.AnalysisDriverUnlinkedUnit { |
1499 List<String> _definedClassMemberNames; | 1665 List<String> _definedClassMemberNames; |
1500 List<String> _definedTopLevelNames; | 1666 List<String> _definedTopLevelNames; |
1501 List<String> _referencedNames; | 1667 List<String> _referencedNames; |
1502 UnlinkedUnitBuilder _unit; | 1668 UnlinkedUnitBuilder _unit; |
1503 | 1669 |
1504 @override | 1670 @override |
1505 List<String> get definedClassMemberNames => _definedClassMemberNames ??= <Stri
ng>[]; | 1671 List<String> get definedClassMemberNames => |
| 1672 _definedClassMemberNames ??= <String>[]; |
1506 | 1673 |
1507 /** | 1674 /** |
1508 * List of class member names defined by the unit. | 1675 * List of class member names defined by the unit. |
1509 */ | 1676 */ |
1510 void set definedClassMemberNames(List<String> value) { | 1677 void set definedClassMemberNames(List<String> value) { |
1511 this._definedClassMemberNames = value; | 1678 this._definedClassMemberNames = value; |
1512 } | 1679 } |
1513 | 1680 |
1514 @override | 1681 @override |
1515 List<String> get definedTopLevelNames => _definedTopLevelNames ??= <String>[]; | 1682 List<String> get definedTopLevelNames => _definedTopLevelNames ??= <String>[]; |
(...skipping 18 matching lines...) Expand all Loading... |
1534 @override | 1701 @override |
1535 UnlinkedUnitBuilder get unit => _unit; | 1702 UnlinkedUnitBuilder get unit => _unit; |
1536 | 1703 |
1537 /** | 1704 /** |
1538 * Unlinked information for the unit. | 1705 * Unlinked information for the unit. |
1539 */ | 1706 */ |
1540 void set unit(UnlinkedUnitBuilder value) { | 1707 void set unit(UnlinkedUnitBuilder value) { |
1541 this._unit = value; | 1708 this._unit = value; |
1542 } | 1709 } |
1543 | 1710 |
1544 AnalysisDriverUnlinkedUnitBuilder({List<String> definedClassMemberNames, List<
String> definedTopLevelNames, List<String> referencedNames, UnlinkedUnitBuilder
unit}) | 1711 AnalysisDriverUnlinkedUnitBuilder( |
1545 : _definedClassMemberNames = definedClassMemberNames, | 1712 {List<String> definedClassMemberNames, |
1546 _definedTopLevelNames = definedTopLevelNames, | 1713 List<String> definedTopLevelNames, |
1547 _referencedNames = referencedNames, | 1714 List<String> referencedNames, |
1548 _unit = unit; | 1715 UnlinkedUnitBuilder unit}) |
| 1716 : _definedClassMemberNames = definedClassMemberNames, |
| 1717 _definedTopLevelNames = definedTopLevelNames, |
| 1718 _referencedNames = referencedNames, |
| 1719 _unit = unit; |
1549 | 1720 |
1550 /** | 1721 /** |
1551 * Flush [informative] data recursively. | 1722 * Flush [informative] data recursively. |
1552 */ | 1723 */ |
1553 void flushInformative() { | 1724 void flushInformative() { |
1554 _unit?.flushInformative(); | 1725 _unit?.flushInformative(); |
1555 } | 1726 } |
1556 | 1727 |
1557 /** | 1728 /** |
1558 * Accumulate non-[informative] data into [signature]. | 1729 * Accumulate non-[informative] data into [signature]. |
(...skipping 30 matching lines...) Expand all Loading... |
1589 List<int> toBuffer() { | 1760 List<int> toBuffer() { |
1590 fb.Builder fbBuilder = new fb.Builder(); | 1761 fb.Builder fbBuilder = new fb.Builder(); |
1591 return fbBuilder.finish(finish(fbBuilder), "ADUU"); | 1762 return fbBuilder.finish(finish(fbBuilder), "ADUU"); |
1592 } | 1763 } |
1593 | 1764 |
1594 fb.Offset finish(fb.Builder fbBuilder) { | 1765 fb.Offset finish(fb.Builder fbBuilder) { |
1595 fb.Offset offset_definedClassMemberNames; | 1766 fb.Offset offset_definedClassMemberNames; |
1596 fb.Offset offset_definedTopLevelNames; | 1767 fb.Offset offset_definedTopLevelNames; |
1597 fb.Offset offset_referencedNames; | 1768 fb.Offset offset_referencedNames; |
1598 fb.Offset offset_unit; | 1769 fb.Offset offset_unit; |
1599 if (!(_definedClassMemberNames == null || _definedClassMemberNames.isEmpty))
{ | 1770 if (!(_definedClassMemberNames == null || |
1600 offset_definedClassMemberNames = fbBuilder.writeList(_definedClassMemberNa
mes.map((b) => fbBuilder.writeString(b)).toList()); | 1771 _definedClassMemberNames.isEmpty)) { |
| 1772 offset_definedClassMemberNames = fbBuilder.writeList( |
| 1773 _definedClassMemberNames |
| 1774 .map((b) => fbBuilder.writeString(b)) |
| 1775 .toList()); |
1601 } | 1776 } |
1602 if (!(_definedTopLevelNames == null || _definedTopLevelNames.isEmpty)) { | 1777 if (!(_definedTopLevelNames == null || _definedTopLevelNames.isEmpty)) { |
1603 offset_definedTopLevelNames = fbBuilder.writeList(_definedTopLevelNames.ma
p((b) => fbBuilder.writeString(b)).toList()); | 1778 offset_definedTopLevelNames = fbBuilder.writeList( |
| 1779 _definedTopLevelNames.map((b) => fbBuilder.writeString(b)).toList()); |
1604 } | 1780 } |
1605 if (!(_referencedNames == null || _referencedNames.isEmpty)) { | 1781 if (!(_referencedNames == null || _referencedNames.isEmpty)) { |
1606 offset_referencedNames = fbBuilder.writeList(_referencedNames.map((b) => f
bBuilder.writeString(b)).toList()); | 1782 offset_referencedNames = fbBuilder.writeList( |
| 1783 _referencedNames.map((b) => fbBuilder.writeString(b)).toList()); |
1607 } | 1784 } |
1608 if (_unit != null) { | 1785 if (_unit != null) { |
1609 offset_unit = _unit.finish(fbBuilder); | 1786 offset_unit = _unit.finish(fbBuilder); |
1610 } | 1787 } |
1611 fbBuilder.startTable(); | 1788 fbBuilder.startTable(); |
1612 if (offset_definedClassMemberNames != null) { | 1789 if (offset_definedClassMemberNames != null) { |
1613 fbBuilder.addOffset(3, offset_definedClassMemberNames); | 1790 fbBuilder.addOffset(3, offset_definedClassMemberNames); |
1614 } | 1791 } |
1615 if (offset_definedTopLevelNames != null) { | 1792 if (offset_definedTopLevelNames != null) { |
1616 fbBuilder.addOffset(2, offset_definedTopLevelNames); | 1793 fbBuilder.addOffset(2, offset_definedTopLevelNames); |
1617 } | 1794 } |
1618 if (offset_referencedNames != null) { | 1795 if (offset_referencedNames != null) { |
1619 fbBuilder.addOffset(0, offset_referencedNames); | 1796 fbBuilder.addOffset(0, offset_referencedNames); |
1620 } | 1797 } |
1621 if (offset_unit != null) { | 1798 if (offset_unit != null) { |
1622 fbBuilder.addOffset(1, offset_unit); | 1799 fbBuilder.addOffset(1, offset_unit); |
1623 } | 1800 } |
1624 return fbBuilder.endTable(); | 1801 return fbBuilder.endTable(); |
1625 } | 1802 } |
1626 } | 1803 } |
1627 | 1804 |
1628 idl.AnalysisDriverUnlinkedUnit readAnalysisDriverUnlinkedUnit(List<int> buffer)
{ | 1805 idl.AnalysisDriverUnlinkedUnit readAnalysisDriverUnlinkedUnit( |
| 1806 List<int> buffer) { |
1629 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 1807 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
1630 return const _AnalysisDriverUnlinkedUnitReader().read(rootRef, 0); | 1808 return const _AnalysisDriverUnlinkedUnitReader().read(rootRef, 0); |
1631 } | 1809 } |
1632 | 1810 |
1633 class _AnalysisDriverUnlinkedUnitReader extends fb.TableReader<_AnalysisDriverUn
linkedUnitImpl> { | 1811 class _AnalysisDriverUnlinkedUnitReader |
| 1812 extends fb.TableReader<_AnalysisDriverUnlinkedUnitImpl> { |
1634 const _AnalysisDriverUnlinkedUnitReader(); | 1813 const _AnalysisDriverUnlinkedUnitReader(); |
1635 | 1814 |
1636 @override | 1815 @override |
1637 _AnalysisDriverUnlinkedUnitImpl createObject(fb.BufferContext bc, int offset)
=> new _AnalysisDriverUnlinkedUnitImpl(bc, offset); | 1816 _AnalysisDriverUnlinkedUnitImpl createObject( |
| 1817 fb.BufferContext bc, int offset) => |
| 1818 new _AnalysisDriverUnlinkedUnitImpl(bc, offset); |
1638 } | 1819 } |
1639 | 1820 |
1640 class _AnalysisDriverUnlinkedUnitImpl extends Object with _AnalysisDriverUnlinke
dUnitMixin implements idl.AnalysisDriverUnlinkedUnit { | 1821 class _AnalysisDriverUnlinkedUnitImpl extends Object |
| 1822 with _AnalysisDriverUnlinkedUnitMixin |
| 1823 implements idl.AnalysisDriverUnlinkedUnit { |
1641 final fb.BufferContext _bc; | 1824 final fb.BufferContext _bc; |
1642 final int _bcOffset; | 1825 final int _bcOffset; |
1643 | 1826 |
1644 _AnalysisDriverUnlinkedUnitImpl(this._bc, this._bcOffset); | 1827 _AnalysisDriverUnlinkedUnitImpl(this._bc, this._bcOffset); |
1645 | 1828 |
1646 List<String> _definedClassMemberNames; | 1829 List<String> _definedClassMemberNames; |
1647 List<String> _definedTopLevelNames; | 1830 List<String> _definedTopLevelNames; |
1648 List<String> _referencedNames; | 1831 List<String> _referencedNames; |
1649 idl.UnlinkedUnit _unit; | 1832 idl.UnlinkedUnit _unit; |
1650 | 1833 |
1651 @override | 1834 @override |
1652 List<String> get definedClassMemberNames { | 1835 List<String> get definedClassMemberNames { |
1653 _definedClassMemberNames ??= const fb.ListReader<String>(const fb.StringRead
er()).vTableGet(_bc, _bcOffset, 3, const <String>[]); | 1836 _definedClassMemberNames ??= |
| 1837 const fb.ListReader<String>(const fb.StringReader()) |
| 1838 .vTableGet(_bc, _bcOffset, 3, const <String>[]); |
1654 return _definedClassMemberNames; | 1839 return _definedClassMemberNames; |
1655 } | 1840 } |
1656 | 1841 |
1657 @override | 1842 @override |
1658 List<String> get definedTopLevelNames { | 1843 List<String> get definedTopLevelNames { |
1659 _definedTopLevelNames ??= const fb.ListReader<String>(const fb.StringReader(
)).vTableGet(_bc, _bcOffset, 2, const <String>[]); | 1844 _definedTopLevelNames ??= |
| 1845 const fb.ListReader<String>(const fb.StringReader()) |
| 1846 .vTableGet(_bc, _bcOffset, 2, const <String>[]); |
1660 return _definedTopLevelNames; | 1847 return _definedTopLevelNames; |
1661 } | 1848 } |
1662 | 1849 |
1663 @override | 1850 @override |
1664 List<String> get referencedNames { | 1851 List<String> get referencedNames { |
1665 _referencedNames ??= const fb.ListReader<String>(const fb.StringReader()).vT
ableGet(_bc, _bcOffset, 0, const <String>[]); | 1852 _referencedNames ??= const fb.ListReader<String>(const fb.StringReader()) |
| 1853 .vTableGet(_bc, _bcOffset, 0, const <String>[]); |
1666 return _referencedNames; | 1854 return _referencedNames; |
1667 } | 1855 } |
1668 | 1856 |
1669 @override | 1857 @override |
1670 idl.UnlinkedUnit get unit { | 1858 idl.UnlinkedUnit get unit { |
1671 _unit ??= const _UnlinkedUnitReader().vTableGet(_bc, _bcOffset, 1, null); | 1859 _unit ??= const _UnlinkedUnitReader().vTableGet(_bc, _bcOffset, 1, null); |
1672 return _unit; | 1860 return _unit; |
1673 } | 1861 } |
1674 } | 1862 } |
1675 | 1863 |
1676 abstract class _AnalysisDriverUnlinkedUnitMixin implements idl.AnalysisDriverUnl
inkedUnit { | 1864 abstract class _AnalysisDriverUnlinkedUnitMixin |
| 1865 implements idl.AnalysisDriverUnlinkedUnit { |
1677 @override | 1866 @override |
1678 Map<String, Object> toJson() { | 1867 Map<String, Object> toJson() { |
1679 Map<String, Object> _result = <String, Object>{}; | 1868 Map<String, Object> _result = <String, Object>{}; |
1680 if (definedClassMemberNames.isNotEmpty) _result["definedClassMemberNames"] =
definedClassMemberNames; | 1869 if (definedClassMemberNames.isNotEmpty) |
1681 if (definedTopLevelNames.isNotEmpty) _result["definedTopLevelNames"] = defin
edTopLevelNames; | 1870 _result["definedClassMemberNames"] = definedClassMemberNames; |
1682 if (referencedNames.isNotEmpty) _result["referencedNames"] = referencedNames
; | 1871 if (definedTopLevelNames.isNotEmpty) |
| 1872 _result["definedTopLevelNames"] = definedTopLevelNames; |
| 1873 if (referencedNames.isNotEmpty) |
| 1874 _result["referencedNames"] = referencedNames; |
1683 if (unit != null) _result["unit"] = unit.toJson(); | 1875 if (unit != null) _result["unit"] = unit.toJson(); |
1684 return _result; | 1876 return _result; |
1685 } | 1877 } |
1686 | 1878 |
1687 @override | 1879 @override |
1688 Map<String, Object> toMap() => { | 1880 Map<String, Object> toMap() => { |
1689 "definedClassMemberNames": definedClassMemberNames, | 1881 "definedClassMemberNames": definedClassMemberNames, |
1690 "definedTopLevelNames": definedTopLevelNames, | 1882 "definedTopLevelNames": definedTopLevelNames, |
1691 "referencedNames": referencedNames, | 1883 "referencedNames": referencedNames, |
1692 "unit": unit, | 1884 "unit": unit, |
1693 }; | 1885 }; |
1694 | 1886 |
1695 @override | 1887 @override |
1696 String toString() => convert.JSON.encode(toJson()); | 1888 String toString() => convert.JSON.encode(toJson()); |
1697 } | 1889 } |
1698 | 1890 |
1699 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa
nge { | 1891 class CodeRangeBuilder extends Object |
| 1892 with _CodeRangeMixin |
| 1893 implements idl.CodeRange { |
1700 int _length; | 1894 int _length; |
1701 int _offset; | 1895 int _offset; |
1702 | 1896 |
1703 @override | 1897 @override |
1704 int get length => _length ??= 0; | 1898 int get length => _length ??= 0; |
1705 | 1899 |
1706 /** | 1900 /** |
1707 * Length of the element code. | 1901 * Length of the element code. |
1708 */ | 1902 */ |
1709 void set length(int value) { | 1903 void set length(int value) { |
1710 assert(value == null || value >= 0); | 1904 assert(value == null || value >= 0); |
1711 this._length = value; | 1905 this._length = value; |
1712 } | 1906 } |
1713 | 1907 |
1714 @override | 1908 @override |
1715 int get offset => _offset ??= 0; | 1909 int get offset => _offset ??= 0; |
1716 | 1910 |
1717 /** | 1911 /** |
1718 * Offset of the element code relative to the beginning of the file. | 1912 * Offset of the element code relative to the beginning of the file. |
1719 */ | 1913 */ |
1720 void set offset(int value) { | 1914 void set offset(int value) { |
1721 assert(value == null || value >= 0); | 1915 assert(value == null || value >= 0); |
1722 this._offset = value; | 1916 this._offset = value; |
1723 } | 1917 } |
1724 | 1918 |
1725 CodeRangeBuilder({int length, int offset}) | 1919 CodeRangeBuilder({int length, int offset}) |
1726 : _length = length, | 1920 : _length = length, |
1727 _offset = offset; | 1921 _offset = offset; |
1728 | 1922 |
1729 /** | 1923 /** |
1730 * Flush [informative] data recursively. | 1924 * Flush [informative] data recursively. |
1731 */ | 1925 */ |
1732 void flushInformative() { | 1926 void flushInformative() {} |
1733 } | |
1734 | 1927 |
1735 /** | 1928 /** |
1736 * Accumulate non-[informative] data into [signature]. | 1929 * Accumulate non-[informative] data into [signature]. |
1737 */ | 1930 */ |
1738 void collectApiSignature(api_sig.ApiSignature signature) { | 1931 void collectApiSignature(api_sig.ApiSignature signature) { |
1739 signature.addInt(this._offset ?? 0); | 1932 signature.addInt(this._offset ?? 0); |
1740 signature.addInt(this._length ?? 0); | 1933 signature.addInt(this._length ?? 0); |
1741 } | 1934 } |
1742 | 1935 |
1743 fb.Offset finish(fb.Builder fbBuilder) { | 1936 fb.Offset finish(fb.Builder fbBuilder) { |
1744 fbBuilder.startTable(); | 1937 fbBuilder.startTable(); |
1745 if (_length != null && _length != 0) { | 1938 if (_length != null && _length != 0) { |
1746 fbBuilder.addUint32(1, _length); | 1939 fbBuilder.addUint32(1, _length); |
1747 } | 1940 } |
1748 if (_offset != null && _offset != 0) { | 1941 if (_offset != null && _offset != 0) { |
1749 fbBuilder.addUint32(0, _offset); | 1942 fbBuilder.addUint32(0, _offset); |
1750 } | 1943 } |
1751 return fbBuilder.endTable(); | 1944 return fbBuilder.endTable(); |
1752 } | 1945 } |
1753 } | 1946 } |
1754 | 1947 |
1755 class _CodeRangeReader extends fb.TableReader<_CodeRangeImpl> { | 1948 class _CodeRangeReader extends fb.TableReader<_CodeRangeImpl> { |
1756 const _CodeRangeReader(); | 1949 const _CodeRangeReader(); |
1757 | 1950 |
1758 @override | 1951 @override |
1759 _CodeRangeImpl createObject(fb.BufferContext bc, int offset) => new _CodeRange
Impl(bc, offset); | 1952 _CodeRangeImpl createObject(fb.BufferContext bc, int offset) => |
| 1953 new _CodeRangeImpl(bc, offset); |
1760 } | 1954 } |
1761 | 1955 |
1762 class _CodeRangeImpl extends Object with _CodeRangeMixin implements idl.CodeRang
e { | 1956 class _CodeRangeImpl extends Object |
| 1957 with _CodeRangeMixin |
| 1958 implements idl.CodeRange { |
1763 final fb.BufferContext _bc; | 1959 final fb.BufferContext _bc; |
1764 final int _bcOffset; | 1960 final int _bcOffset; |
1765 | 1961 |
1766 _CodeRangeImpl(this._bc, this._bcOffset); | 1962 _CodeRangeImpl(this._bc, this._bcOffset); |
1767 | 1963 |
1768 int _length; | 1964 int _length; |
1769 int _offset; | 1965 int _offset; |
1770 | 1966 |
1771 @override | 1967 @override |
1772 int get length { | 1968 int get length { |
(...skipping 12 matching lines...) Expand all Loading... |
1785 @override | 1981 @override |
1786 Map<String, Object> toJson() { | 1982 Map<String, Object> toJson() { |
1787 Map<String, Object> _result = <String, Object>{}; | 1983 Map<String, Object> _result = <String, Object>{}; |
1788 if (length != 0) _result["length"] = length; | 1984 if (length != 0) _result["length"] = length; |
1789 if (offset != 0) _result["offset"] = offset; | 1985 if (offset != 0) _result["offset"] = offset; |
1790 return _result; | 1986 return _result; |
1791 } | 1987 } |
1792 | 1988 |
1793 @override | 1989 @override |
1794 Map<String, Object> toMap() => { | 1990 Map<String, Object> toMap() => { |
1795 "length": length, | 1991 "length": length, |
1796 "offset": offset, | 1992 "offset": offset, |
1797 }; | 1993 }; |
1798 | 1994 |
1799 @override | 1995 @override |
1800 String toString() => convert.JSON.encode(toJson()); | 1996 String toString() => convert.JSON.encode(toJson()); |
1801 } | 1997 } |
1802 | 1998 |
1803 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity
Ref { | 1999 class EntityRefBuilder extends Object |
| 2000 with _EntityRefMixin |
| 2001 implements idl.EntityRef { |
1804 List<int> _implicitFunctionTypeIndices; | 2002 List<int> _implicitFunctionTypeIndices; |
1805 int _paramReference; | 2003 int _paramReference; |
1806 int _reference; | 2004 int _reference; |
1807 int _slot; | 2005 int _slot; |
1808 List<UnlinkedParamBuilder> _syntheticParams; | 2006 List<UnlinkedParamBuilder> _syntheticParams; |
1809 EntityRefBuilder _syntheticReturnType; | 2007 EntityRefBuilder _syntheticReturnType; |
1810 List<TopLevelInferenceErrorBuilder> _topLevelInferenceErrors; | 2008 List<TopLevelInferenceErrorBuilder> _topLevelInferenceErrors; |
1811 List<EntityRefBuilder> _typeArguments; | 2009 List<EntityRefBuilder> _typeArguments; |
1812 List<UnlinkedTypeParamBuilder> _typeParameters; | 2010 List<UnlinkedTypeParamBuilder> _typeParameters; |
1813 | 2011 |
1814 @override | 2012 @override |
1815 List<int> get implicitFunctionTypeIndices => _implicitFunctionTypeIndices ??=
<int>[]; | 2013 List<int> get implicitFunctionTypeIndices => |
| 2014 _implicitFunctionTypeIndices ??= <int>[]; |
1816 | 2015 |
1817 /** | 2016 /** |
1818 * If this is a reference to a function type implicitly defined by a | 2017 * If this is a reference to a function type implicitly defined by a |
1819 * function-typed parameter, a list of zero-based indices indicating the path | 2018 * function-typed parameter, a list of zero-based indices indicating the path |
1820 * from the entity referred to by [reference] to the appropriate type | 2019 * from the entity referred to by [reference] to the appropriate type |
1821 * parameter. Otherwise the empty list. | 2020 * parameter. Otherwise the empty list. |
1822 * | 2021 * |
1823 * If there are N indices in this list, then the entity being referred to is | 2022 * If there are N indices in this list, then the entity being referred to is |
1824 * the function type implicitly defined by a function-typed parameter of a | 2023 * the function type implicitly defined by a function-typed parameter of a |
1825 * function-typed parameter, to N levels of nesting. The first index in the | 2024 * function-typed parameter, to N levels of nesting. The first index in the |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1889 * propagation or type inference with which this [EntityRef] is associated. | 2088 * propagation or type inference with which this [EntityRef] is associated. |
1890 * | 2089 * |
1891 * Otherwise zero. | 2090 * Otherwise zero. |
1892 */ | 2091 */ |
1893 void set slot(int value) { | 2092 void set slot(int value) { |
1894 assert(value == null || value >= 0); | 2093 assert(value == null || value >= 0); |
1895 this._slot = value; | 2094 this._slot = value; |
1896 } | 2095 } |
1897 | 2096 |
1898 @override | 2097 @override |
1899 List<UnlinkedParamBuilder> get syntheticParams => _syntheticParams ??= <Unlink
edParamBuilder>[]; | 2098 List<UnlinkedParamBuilder> get syntheticParams => |
| 2099 _syntheticParams ??= <UnlinkedParamBuilder>[]; |
1900 | 2100 |
1901 /** | 2101 /** |
1902 * If this [EntityRef] is a reference to a function type whose | 2102 * If this [EntityRef] is a reference to a function type whose |
1903 * [FunctionElement] is not in any library (e.g. a function type that was | 2103 * [FunctionElement] is not in any library (e.g. a function type that was |
1904 * synthesized by a LUB computation), the function parameters. Otherwise | 2104 * synthesized by a LUB computation), the function parameters. Otherwise |
1905 * empty. | 2105 * empty. |
1906 */ | 2106 */ |
1907 void set syntheticParams(List<UnlinkedParamBuilder> value) { | 2107 void set syntheticParams(List<UnlinkedParamBuilder> value) { |
1908 this._syntheticParams = value; | 2108 this._syntheticParams = value; |
1909 } | 2109 } |
1910 | 2110 |
1911 @override | 2111 @override |
1912 EntityRefBuilder get syntheticReturnType => _syntheticReturnType; | 2112 EntityRefBuilder get syntheticReturnType => _syntheticReturnType; |
1913 | 2113 |
1914 /** | 2114 /** |
1915 * If this [EntityRef] is a reference to a function type whose | 2115 * If this [EntityRef] is a reference to a function type whose |
1916 * [FunctionElement] is not in any library (e.g. a function type that was | 2116 * [FunctionElement] is not in any library (e.g. a function type that was |
1917 * synthesized by a LUB computation), the return type of the function. | 2117 * synthesized by a LUB computation), the return type of the function. |
1918 * Otherwise `null`. | 2118 * Otherwise `null`. |
1919 */ | 2119 */ |
1920 void set syntheticReturnType(EntityRefBuilder value) { | 2120 void set syntheticReturnType(EntityRefBuilder value) { |
1921 this._syntheticReturnType = value; | 2121 this._syntheticReturnType = value; |
1922 } | 2122 } |
1923 | 2123 |
1924 @override | 2124 @override |
1925 List<TopLevelInferenceErrorBuilder> get topLevelInferenceErrors => _topLevelIn
ferenceErrors ??= <TopLevelInferenceErrorBuilder>[]; | 2125 List<TopLevelInferenceErrorBuilder> get topLevelInferenceErrors => |
| 2126 _topLevelInferenceErrors ??= <TopLevelInferenceErrorBuilder>[]; |
1926 | 2127 |
1927 /** | 2128 /** |
1928 * If this [EntityRef] is a result of type inference, and so contained within | 2129 * If this [EntityRef] is a result of type inference, and so contained within |
1929 * [LinkedUnit.types], and was computed as a result of top-level type | 2130 * [LinkedUnit.types], and was computed as a result of top-level type |
1930 * inference, which failed for this target, contains the list of one or more | 2131 * inference, which failed for this target, contains the list of one or more |
1931 * errors describing the failure. The [reference] must point at `dynamic` in | 2132 * errors describing the failure. The [reference] must point at `dynamic` in |
1932 * this case. | 2133 * this case. |
1933 */ | 2134 */ |
1934 void set topLevelInferenceErrors(List<TopLevelInferenceErrorBuilder> value) { | 2135 void set topLevelInferenceErrors(List<TopLevelInferenceErrorBuilder> value) { |
1935 this._topLevelInferenceErrors = value; | 2136 this._topLevelInferenceErrors = value; |
1936 } | 2137 } |
1937 | 2138 |
1938 @override | 2139 @override |
1939 List<EntityRefBuilder> get typeArguments => _typeArguments ??= <EntityRefBuild
er>[]; | 2140 List<EntityRefBuilder> get typeArguments => |
| 2141 _typeArguments ??= <EntityRefBuilder>[]; |
1940 | 2142 |
1941 /** | 2143 /** |
1942 * If this is an instantiation of a generic type or generic executable, the | 2144 * If this is an instantiation of a generic type or generic executable, the |
1943 * type arguments used to instantiate it (if any). | 2145 * type arguments used to instantiate it (if any). |
1944 */ | 2146 */ |
1945 void set typeArguments(List<EntityRefBuilder> value) { | 2147 void set typeArguments(List<EntityRefBuilder> value) { |
1946 this._typeArguments = value; | 2148 this._typeArguments = value; |
1947 } | 2149 } |
1948 | 2150 |
1949 @override | 2151 @override |
1950 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 2152 List<UnlinkedTypeParamBuilder> get typeParameters => |
| 2153 _typeParameters ??= <UnlinkedTypeParamBuilder>[]; |
1951 | 2154 |
1952 /** | 2155 /** |
1953 * If this is a function type, the type parameters defined for the function | 2156 * If this is a function type, the type parameters defined for the function |
1954 * type (if any). | 2157 * type (if any). |
1955 */ | 2158 */ |
1956 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { | 2159 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { |
1957 this._typeParameters = value; | 2160 this._typeParameters = value; |
1958 } | 2161 } |
1959 | 2162 |
1960 EntityRefBuilder({List<int> implicitFunctionTypeIndices, int paramReference, i
nt reference, int slot, List<UnlinkedParamBuilder> syntheticParams, EntityRefBui
lder syntheticReturnType, List<TopLevelInferenceErrorBuilder> topLevelInferenceE
rrors, List<EntityRefBuilder> typeArguments, List<UnlinkedTypeParamBuilder> type
Parameters}) | 2163 EntityRefBuilder( |
1961 : _implicitFunctionTypeIndices = implicitFunctionTypeIndices, | 2164 {List<int> implicitFunctionTypeIndices, |
1962 _paramReference = paramReference, | 2165 int paramReference, |
1963 _reference = reference, | 2166 int reference, |
1964 _slot = slot, | 2167 int slot, |
1965 _syntheticParams = syntheticParams, | 2168 List<UnlinkedParamBuilder> syntheticParams, |
1966 _syntheticReturnType = syntheticReturnType, | 2169 EntityRefBuilder syntheticReturnType, |
1967 _topLevelInferenceErrors = topLevelInferenceErrors, | 2170 List<TopLevelInferenceErrorBuilder> topLevelInferenceErrors, |
1968 _typeArguments = typeArguments, | 2171 List<EntityRefBuilder> typeArguments, |
1969 _typeParameters = typeParameters; | 2172 List<UnlinkedTypeParamBuilder> typeParameters}) |
| 2173 : _implicitFunctionTypeIndices = implicitFunctionTypeIndices, |
| 2174 _paramReference = paramReference, |
| 2175 _reference = reference, |
| 2176 _slot = slot, |
| 2177 _syntheticParams = syntheticParams, |
| 2178 _syntheticReturnType = syntheticReturnType, |
| 2179 _topLevelInferenceErrors = topLevelInferenceErrors, |
| 2180 _typeArguments = typeArguments, |
| 2181 _typeParameters = typeParameters; |
1970 | 2182 |
1971 /** | 2183 /** |
1972 * Flush [informative] data recursively. | 2184 * Flush [informative] data recursively. |
1973 */ | 2185 */ |
1974 void flushInformative() { | 2186 void flushInformative() { |
1975 _syntheticParams?.forEach((b) => b.flushInformative()); | 2187 _syntheticParams?.forEach((b) => b.flushInformative()); |
1976 _syntheticReturnType?.flushInformative(); | 2188 _syntheticReturnType?.flushInformative(); |
1977 _topLevelInferenceErrors?.forEach((b) => b.flushInformative()); | 2189 _topLevelInferenceErrors?.forEach((b) => b.flushInformative()); |
1978 _typeArguments?.forEach((b) => b.flushInformative()); | 2190 _typeArguments?.forEach((b) => b.flushInformative()); |
1979 _typeParameters?.forEach((b) => b.flushInformative()); | 2191 _typeParameters?.forEach((b) => b.flushInformative()); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2030 } | 2242 } |
2031 } | 2243 } |
2032 | 2244 |
2033 fb.Offset finish(fb.Builder fbBuilder) { | 2245 fb.Offset finish(fb.Builder fbBuilder) { |
2034 fb.Offset offset_implicitFunctionTypeIndices; | 2246 fb.Offset offset_implicitFunctionTypeIndices; |
2035 fb.Offset offset_syntheticParams; | 2247 fb.Offset offset_syntheticParams; |
2036 fb.Offset offset_syntheticReturnType; | 2248 fb.Offset offset_syntheticReturnType; |
2037 fb.Offset offset_topLevelInferenceErrors; | 2249 fb.Offset offset_topLevelInferenceErrors; |
2038 fb.Offset offset_typeArguments; | 2250 fb.Offset offset_typeArguments; |
2039 fb.Offset offset_typeParameters; | 2251 fb.Offset offset_typeParameters; |
2040 if (!(_implicitFunctionTypeIndices == null || _implicitFunctionTypeIndices.i
sEmpty)) { | 2252 if (!(_implicitFunctionTypeIndices == null || |
2041 offset_implicitFunctionTypeIndices = fbBuilder.writeListUint32(_implicitFu
nctionTypeIndices); | 2253 _implicitFunctionTypeIndices.isEmpty)) { |
| 2254 offset_implicitFunctionTypeIndices = |
| 2255 fbBuilder.writeListUint32(_implicitFunctionTypeIndices); |
2042 } | 2256 } |
2043 if (!(_syntheticParams == null || _syntheticParams.isEmpty)) { | 2257 if (!(_syntheticParams == null || _syntheticParams.isEmpty)) { |
2044 offset_syntheticParams = fbBuilder.writeList(_syntheticParams.map((b) => b
.finish(fbBuilder)).toList()); | 2258 offset_syntheticParams = fbBuilder |
| 2259 .writeList(_syntheticParams.map((b) => b.finish(fbBuilder)).toList()); |
2045 } | 2260 } |
2046 if (_syntheticReturnType != null) { | 2261 if (_syntheticReturnType != null) { |
2047 offset_syntheticReturnType = _syntheticReturnType.finish(fbBuilder); | 2262 offset_syntheticReturnType = _syntheticReturnType.finish(fbBuilder); |
2048 } | 2263 } |
2049 if (!(_topLevelInferenceErrors == null || _topLevelInferenceErrors.isEmpty))
{ | 2264 if (!(_topLevelInferenceErrors == null || |
2050 offset_topLevelInferenceErrors = fbBuilder.writeList(_topLevelInferenceErr
ors.map((b) => b.finish(fbBuilder)).toList()); | 2265 _topLevelInferenceErrors.isEmpty)) { |
| 2266 offset_topLevelInferenceErrors = fbBuilder.writeList( |
| 2267 _topLevelInferenceErrors.map((b) => b.finish(fbBuilder)).toList()); |
2051 } | 2268 } |
2052 if (!(_typeArguments == null || _typeArguments.isEmpty)) { | 2269 if (!(_typeArguments == null || _typeArguments.isEmpty)) { |
2053 offset_typeArguments = fbBuilder.writeList(_typeArguments.map((b) => b.fin
ish(fbBuilder)).toList()); | 2270 offset_typeArguments = fbBuilder |
| 2271 .writeList(_typeArguments.map((b) => b.finish(fbBuilder)).toList()); |
2054 } | 2272 } |
2055 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 2273 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
2056 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 2274 offset_typeParameters = fbBuilder |
| 2275 .writeList(_typeParameters.map((b) => b.finish(fbBuilder)).toList()); |
2057 } | 2276 } |
2058 fbBuilder.startTable(); | 2277 fbBuilder.startTable(); |
2059 if (offset_implicitFunctionTypeIndices != null) { | 2278 if (offset_implicitFunctionTypeIndices != null) { |
2060 fbBuilder.addOffset(4, offset_implicitFunctionTypeIndices); | 2279 fbBuilder.addOffset(4, offset_implicitFunctionTypeIndices); |
2061 } | 2280 } |
2062 if (_paramReference != null && _paramReference != 0) { | 2281 if (_paramReference != null && _paramReference != 0) { |
2063 fbBuilder.addUint32(3, _paramReference); | 2282 fbBuilder.addUint32(3, _paramReference); |
2064 } | 2283 } |
2065 if (_reference != null && _reference != 0) { | 2284 if (_reference != null && _reference != 0) { |
2066 fbBuilder.addUint32(0, _reference); | 2285 fbBuilder.addUint32(0, _reference); |
(...skipping 17 matching lines...) Expand all Loading... |
2084 fbBuilder.addOffset(7, offset_typeParameters); | 2303 fbBuilder.addOffset(7, offset_typeParameters); |
2085 } | 2304 } |
2086 return fbBuilder.endTable(); | 2305 return fbBuilder.endTable(); |
2087 } | 2306 } |
2088 } | 2307 } |
2089 | 2308 |
2090 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> { | 2309 class _EntityRefReader extends fb.TableReader<_EntityRefImpl> { |
2091 const _EntityRefReader(); | 2310 const _EntityRefReader(); |
2092 | 2311 |
2093 @override | 2312 @override |
2094 _EntityRefImpl createObject(fb.BufferContext bc, int offset) => new _EntityRef
Impl(bc, offset); | 2313 _EntityRefImpl createObject(fb.BufferContext bc, int offset) => |
| 2314 new _EntityRefImpl(bc, offset); |
2095 } | 2315 } |
2096 | 2316 |
2097 class _EntityRefImpl extends Object with _EntityRefMixin implements idl.EntityRe
f { | 2317 class _EntityRefImpl extends Object |
| 2318 with _EntityRefMixin |
| 2319 implements idl.EntityRef { |
2098 final fb.BufferContext _bc; | 2320 final fb.BufferContext _bc; |
2099 final int _bcOffset; | 2321 final int _bcOffset; |
2100 | 2322 |
2101 _EntityRefImpl(this._bc, this._bcOffset); | 2323 _EntityRefImpl(this._bc, this._bcOffset); |
2102 | 2324 |
2103 List<int> _implicitFunctionTypeIndices; | 2325 List<int> _implicitFunctionTypeIndices; |
2104 int _paramReference; | 2326 int _paramReference; |
2105 int _reference; | 2327 int _reference; |
2106 int _slot; | 2328 int _slot; |
2107 List<idl.UnlinkedParam> _syntheticParams; | 2329 List<idl.UnlinkedParam> _syntheticParams; |
2108 idl.EntityRef _syntheticReturnType; | 2330 idl.EntityRef _syntheticReturnType; |
2109 List<idl.TopLevelInferenceError> _topLevelInferenceErrors; | 2331 List<idl.TopLevelInferenceError> _topLevelInferenceErrors; |
2110 List<idl.EntityRef> _typeArguments; | 2332 List<idl.EntityRef> _typeArguments; |
2111 List<idl.UnlinkedTypeParam> _typeParameters; | 2333 List<idl.UnlinkedTypeParam> _typeParameters; |
2112 | 2334 |
2113 @override | 2335 @override |
2114 List<int> get implicitFunctionTypeIndices { | 2336 List<int> get implicitFunctionTypeIndices { |
2115 _implicitFunctionTypeIndices ??= const fb.Uint32ListReader().vTableGet(_bc,
_bcOffset, 4, const <int>[]); | 2337 _implicitFunctionTypeIndices ??= |
| 2338 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 4, const <int>[]); |
2116 return _implicitFunctionTypeIndices; | 2339 return _implicitFunctionTypeIndices; |
2117 } | 2340 } |
2118 | 2341 |
2119 @override | 2342 @override |
2120 int get paramReference { | 2343 int get paramReference { |
2121 _paramReference ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0); | 2344 _paramReference ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0); |
2122 return _paramReference; | 2345 return _paramReference; |
2123 } | 2346 } |
2124 | 2347 |
2125 @override | 2348 @override |
2126 int get reference { | 2349 int get reference { |
2127 _reference ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 2350 _reference ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
2128 return _reference; | 2351 return _reference; |
2129 } | 2352 } |
2130 | 2353 |
2131 @override | 2354 @override |
2132 int get slot { | 2355 int get slot { |
2133 _slot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); | 2356 _slot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
2134 return _slot; | 2357 return _slot; |
2135 } | 2358 } |
2136 | 2359 |
2137 @override | 2360 @override |
2138 List<idl.UnlinkedParam> get syntheticParams { | 2361 List<idl.UnlinkedParam> get syntheticParams { |
2139 _syntheticParams ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedP
aramReader()).vTableGet(_bc, _bcOffset, 6, const <idl.UnlinkedParam>[]); | 2362 _syntheticParams ??= |
| 2363 const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamReader()) |
| 2364 .vTableGet(_bc, _bcOffset, 6, const <idl.UnlinkedParam>[]); |
2140 return _syntheticParams; | 2365 return _syntheticParams; |
2141 } | 2366 } |
2142 | 2367 |
2143 @override | 2368 @override |
2144 idl.EntityRef get syntheticReturnType { | 2369 idl.EntityRef get syntheticReturnType { |
2145 _syntheticReturnType ??= const _EntityRefReader().vTableGet(_bc, _bcOffset,
5, null); | 2370 _syntheticReturnType ??= |
| 2371 const _EntityRefReader().vTableGet(_bc, _bcOffset, 5, null); |
2146 return _syntheticReturnType; | 2372 return _syntheticReturnType; |
2147 } | 2373 } |
2148 | 2374 |
2149 @override | 2375 @override |
2150 List<idl.TopLevelInferenceError> get topLevelInferenceErrors { | 2376 List<idl.TopLevelInferenceError> get topLevelInferenceErrors { |
2151 _topLevelInferenceErrors ??= const fb.ListReader<idl.TopLevelInferenceError>
(const _TopLevelInferenceErrorReader()).vTableGet(_bc, _bcOffset, 8, const <idl.
TopLevelInferenceError>[]); | 2377 _topLevelInferenceErrors ??= |
| 2378 const fb.ListReader<idl.TopLevelInferenceError>( |
| 2379 const _TopLevelInferenceErrorReader()) |
| 2380 .vTableGet(_bc, _bcOffset, 8, const <idl.TopLevelInferenceError>[]); |
2152 return _topLevelInferenceErrors; | 2381 return _topLevelInferenceErrors; |
2153 } | 2382 } |
2154 | 2383 |
2155 @override | 2384 @override |
2156 List<idl.EntityRef> get typeArguments { | 2385 List<idl.EntityRef> get typeArguments { |
2157 _typeArguments ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader
()).vTableGet(_bc, _bcOffset, 1, const <idl.EntityRef>[]); | 2386 _typeArguments ??= |
| 2387 const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) |
| 2388 .vTableGet(_bc, _bcOffset, 1, const <idl.EntityRef>[]); |
2158 return _typeArguments; | 2389 return _typeArguments; |
2159 } | 2390 } |
2160 | 2391 |
2161 @override | 2392 @override |
2162 List<idl.UnlinkedTypeParam> get typeParameters { | 2393 List<idl.UnlinkedTypeParam> get typeParameters { |
2163 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bc, _bcOffset, 7, const <idl.UnlinkedTypeParam>[
]); | 2394 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>( |
| 2395 const _UnlinkedTypeParamReader()) |
| 2396 .vTableGet(_bc, _bcOffset, 7, const <idl.UnlinkedTypeParam>[]); |
2164 return _typeParameters; | 2397 return _typeParameters; |
2165 } | 2398 } |
2166 } | 2399 } |
2167 | 2400 |
2168 abstract class _EntityRefMixin implements idl.EntityRef { | 2401 abstract class _EntityRefMixin implements idl.EntityRef { |
2169 @override | 2402 @override |
2170 Map<String, Object> toJson() { | 2403 Map<String, Object> toJson() { |
2171 Map<String, Object> _result = <String, Object>{}; | 2404 Map<String, Object> _result = <String, Object>{}; |
2172 if (implicitFunctionTypeIndices.isNotEmpty) _result["implicitFunctionTypeInd
ices"] = implicitFunctionTypeIndices; | 2405 if (implicitFunctionTypeIndices.isNotEmpty) |
| 2406 _result["implicitFunctionTypeIndices"] = implicitFunctionTypeIndices; |
2173 if (paramReference != 0) _result["paramReference"] = paramReference; | 2407 if (paramReference != 0) _result["paramReference"] = paramReference; |
2174 if (reference != 0) _result["reference"] = reference; | 2408 if (reference != 0) _result["reference"] = reference; |
2175 if (slot != 0) _result["slot"] = slot; | 2409 if (slot != 0) _result["slot"] = slot; |
2176 if (syntheticParams.isNotEmpty) _result["syntheticParams"] = syntheticParams
.map((_value) => _value.toJson()).toList(); | 2410 if (syntheticParams.isNotEmpty) |
2177 if (syntheticReturnType != null) _result["syntheticReturnType"] = syntheticR
eturnType.toJson(); | 2411 _result["syntheticParams"] = |
2178 if (topLevelInferenceErrors.isNotEmpty) _result["topLevelInferenceErrors"] =
topLevelInferenceErrors.map((_value) => _value.toJson()).toList(); | 2412 syntheticParams.map((_value) => _value.toJson()).toList(); |
2179 if (typeArguments.isNotEmpty) _result["typeArguments"] = typeArguments.map((
_value) => _value.toJson()).toList(); | 2413 if (syntheticReturnType != null) |
2180 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 2414 _result["syntheticReturnType"] = syntheticReturnType.toJson(); |
| 2415 if (topLevelInferenceErrors.isNotEmpty) |
| 2416 _result["topLevelInferenceErrors"] = |
| 2417 topLevelInferenceErrors.map((_value) => _value.toJson()).toList(); |
| 2418 if (typeArguments.isNotEmpty) |
| 2419 _result["typeArguments"] = |
| 2420 typeArguments.map((_value) => _value.toJson()).toList(); |
| 2421 if (typeParameters.isNotEmpty) |
| 2422 _result["typeParameters"] = |
| 2423 typeParameters.map((_value) => _value.toJson()).toList(); |
2181 return _result; | 2424 return _result; |
2182 } | 2425 } |
2183 | 2426 |
2184 @override | 2427 @override |
2185 Map<String, Object> toMap() => { | 2428 Map<String, Object> toMap() => { |
2186 "implicitFunctionTypeIndices": implicitFunctionTypeIndices, | 2429 "implicitFunctionTypeIndices": implicitFunctionTypeIndices, |
2187 "paramReference": paramReference, | 2430 "paramReference": paramReference, |
2188 "reference": reference, | 2431 "reference": reference, |
2189 "slot": slot, | 2432 "slot": slot, |
2190 "syntheticParams": syntheticParams, | 2433 "syntheticParams": syntheticParams, |
2191 "syntheticReturnType": syntheticReturnType, | 2434 "syntheticReturnType": syntheticReturnType, |
2192 "topLevelInferenceErrors": topLevelInferenceErrors, | 2435 "topLevelInferenceErrors": topLevelInferenceErrors, |
2193 "typeArguments": typeArguments, | 2436 "typeArguments": typeArguments, |
2194 "typeParameters": typeParameters, | 2437 "typeParameters": typeParameters, |
2195 }; | 2438 }; |
2196 | 2439 |
2197 @override | 2440 @override |
2198 String toString() => convert.JSON.encode(toJson()); | 2441 String toString() => convert.JSON.encode(toJson()); |
2199 } | 2442 } |
2200 | 2443 |
2201 class LinkedDependencyBuilder extends Object with _LinkedDependencyMixin impleme
nts idl.LinkedDependency { | 2444 class LinkedDependencyBuilder extends Object |
| 2445 with _LinkedDependencyMixin |
| 2446 implements idl.LinkedDependency { |
2202 List<String> _parts; | 2447 List<String> _parts; |
2203 String _uri; | 2448 String _uri; |
2204 | 2449 |
2205 @override | 2450 @override |
2206 List<String> get parts => _parts ??= <String>[]; | 2451 List<String> get parts => _parts ??= <String>[]; |
2207 | 2452 |
2208 /** | 2453 /** |
2209 * Absolute URI for the compilation units listed in the library's `part` | 2454 * Absolute URI for the compilation units listed in the library's `part` |
2210 * declarations, empty string for invalid URI. | 2455 * declarations, empty string for invalid URI. |
2211 */ | 2456 */ |
2212 void set parts(List<String> value) { | 2457 void set parts(List<String> value) { |
2213 this._parts = value; | 2458 this._parts = value; |
2214 } | 2459 } |
2215 | 2460 |
2216 @override | 2461 @override |
2217 String get uri => _uri ??= ''; | 2462 String get uri => _uri ??= ''; |
2218 | 2463 |
2219 /** | 2464 /** |
2220 * The absolute URI of the dependent library, e.g. `package:foo/bar.dart`. | 2465 * The absolute URI of the dependent library, e.g. `package:foo/bar.dart`. |
2221 */ | 2466 */ |
2222 void set uri(String value) { | 2467 void set uri(String value) { |
2223 this._uri = value; | 2468 this._uri = value; |
2224 } | 2469 } |
2225 | 2470 |
2226 LinkedDependencyBuilder({List<String> parts, String uri}) | 2471 LinkedDependencyBuilder({List<String> parts, String uri}) |
2227 : _parts = parts, | 2472 : _parts = parts, |
2228 _uri = uri; | 2473 _uri = uri; |
2229 | 2474 |
2230 /** | 2475 /** |
2231 * Flush [informative] data recursively. | 2476 * Flush [informative] data recursively. |
2232 */ | 2477 */ |
2233 void flushInformative() { | 2478 void flushInformative() {} |
2234 } | |
2235 | 2479 |
2236 /** | 2480 /** |
2237 * Accumulate non-[informative] data into [signature]. | 2481 * Accumulate non-[informative] data into [signature]. |
2238 */ | 2482 */ |
2239 void collectApiSignature(api_sig.ApiSignature signature) { | 2483 void collectApiSignature(api_sig.ApiSignature signature) { |
2240 signature.addString(this._uri ?? ''); | 2484 signature.addString(this._uri ?? ''); |
2241 if (this._parts == null) { | 2485 if (this._parts == null) { |
2242 signature.addInt(0); | 2486 signature.addInt(0); |
2243 } else { | 2487 } else { |
2244 signature.addInt(this._parts.length); | 2488 signature.addInt(this._parts.length); |
2245 for (var x in this._parts) { | 2489 for (var x in this._parts) { |
2246 signature.addString(x); | 2490 signature.addString(x); |
2247 } | 2491 } |
2248 } | 2492 } |
2249 } | 2493 } |
2250 | 2494 |
2251 fb.Offset finish(fb.Builder fbBuilder) { | 2495 fb.Offset finish(fb.Builder fbBuilder) { |
2252 fb.Offset offset_parts; | 2496 fb.Offset offset_parts; |
2253 fb.Offset offset_uri; | 2497 fb.Offset offset_uri; |
2254 if (!(_parts == null || _parts.isEmpty)) { | 2498 if (!(_parts == null || _parts.isEmpty)) { |
2255 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); | 2499 offset_parts = fbBuilder |
| 2500 .writeList(_parts.map((b) => fbBuilder.writeString(b)).toList()); |
2256 } | 2501 } |
2257 if (_uri != null) { | 2502 if (_uri != null) { |
2258 offset_uri = fbBuilder.writeString(_uri); | 2503 offset_uri = fbBuilder.writeString(_uri); |
2259 } | 2504 } |
2260 fbBuilder.startTable(); | 2505 fbBuilder.startTable(); |
2261 if (offset_parts != null) { | 2506 if (offset_parts != null) { |
2262 fbBuilder.addOffset(1, offset_parts); | 2507 fbBuilder.addOffset(1, offset_parts); |
2263 } | 2508 } |
2264 if (offset_uri != null) { | 2509 if (offset_uri != null) { |
2265 fbBuilder.addOffset(0, offset_uri); | 2510 fbBuilder.addOffset(0, offset_uri); |
2266 } | 2511 } |
2267 return fbBuilder.endTable(); | 2512 return fbBuilder.endTable(); |
2268 } | 2513 } |
2269 } | 2514 } |
2270 | 2515 |
2271 class _LinkedDependencyReader extends fb.TableReader<_LinkedDependencyImpl> { | 2516 class _LinkedDependencyReader extends fb.TableReader<_LinkedDependencyImpl> { |
2272 const _LinkedDependencyReader(); | 2517 const _LinkedDependencyReader(); |
2273 | 2518 |
2274 @override | 2519 @override |
2275 _LinkedDependencyImpl createObject(fb.BufferContext bc, int offset) => new _Li
nkedDependencyImpl(bc, offset); | 2520 _LinkedDependencyImpl createObject(fb.BufferContext bc, int offset) => |
| 2521 new _LinkedDependencyImpl(bc, offset); |
2276 } | 2522 } |
2277 | 2523 |
2278 class _LinkedDependencyImpl extends Object with _LinkedDependencyMixin implement
s idl.LinkedDependency { | 2524 class _LinkedDependencyImpl extends Object |
| 2525 with _LinkedDependencyMixin |
| 2526 implements idl.LinkedDependency { |
2279 final fb.BufferContext _bc; | 2527 final fb.BufferContext _bc; |
2280 final int _bcOffset; | 2528 final int _bcOffset; |
2281 | 2529 |
2282 _LinkedDependencyImpl(this._bc, this._bcOffset); | 2530 _LinkedDependencyImpl(this._bc, this._bcOffset); |
2283 | 2531 |
2284 List<String> _parts; | 2532 List<String> _parts; |
2285 String _uri; | 2533 String _uri; |
2286 | 2534 |
2287 @override | 2535 @override |
2288 List<String> get parts { | 2536 List<String> get parts { |
2289 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
c, _bcOffset, 1, const <String>[]); | 2537 _parts ??= const fb.ListReader<String>(const fb.StringReader()) |
| 2538 .vTableGet(_bc, _bcOffset, 1, const <String>[]); |
2290 return _parts; | 2539 return _parts; |
2291 } | 2540 } |
2292 | 2541 |
2293 @override | 2542 @override |
2294 String get uri { | 2543 String get uri { |
2295 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 2544 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
2296 return _uri; | 2545 return _uri; |
2297 } | 2546 } |
2298 } | 2547 } |
2299 | 2548 |
2300 abstract class _LinkedDependencyMixin implements idl.LinkedDependency { | 2549 abstract class _LinkedDependencyMixin implements idl.LinkedDependency { |
2301 @override | 2550 @override |
2302 Map<String, Object> toJson() { | 2551 Map<String, Object> toJson() { |
2303 Map<String, Object> _result = <String, Object>{}; | 2552 Map<String, Object> _result = <String, Object>{}; |
2304 if (parts.isNotEmpty) _result["parts"] = parts; | 2553 if (parts.isNotEmpty) _result["parts"] = parts; |
2305 if (uri != '') _result["uri"] = uri; | 2554 if (uri != '') _result["uri"] = uri; |
2306 return _result; | 2555 return _result; |
2307 } | 2556 } |
2308 | 2557 |
2309 @override | 2558 @override |
2310 Map<String, Object> toMap() => { | 2559 Map<String, Object> toMap() => { |
2311 "parts": parts, | 2560 "parts": parts, |
2312 "uri": uri, | 2561 "uri": uri, |
2313 }; | 2562 }; |
2314 | 2563 |
2315 @override | 2564 @override |
2316 String toString() => convert.JSON.encode(toJson()); | 2565 String toString() => convert.JSON.encode(toJson()); |
2317 } | 2566 } |
2318 | 2567 |
2319 class LinkedExportNameBuilder extends Object with _LinkedExportNameMixin impleme
nts idl.LinkedExportName { | 2568 class LinkedExportNameBuilder extends Object |
| 2569 with _LinkedExportNameMixin |
| 2570 implements idl.LinkedExportName { |
2320 int _dependency; | 2571 int _dependency; |
2321 idl.ReferenceKind _kind; | 2572 idl.ReferenceKind _kind; |
2322 String _name; | 2573 String _name; |
2323 int _unit; | 2574 int _unit; |
2324 | 2575 |
2325 @override | 2576 @override |
2326 int get dependency => _dependency ??= 0; | 2577 int get dependency => _dependency ??= 0; |
2327 | 2578 |
2328 /** | 2579 /** |
2329 * Index into [LinkedLibrary.dependencies] for the library in which the | 2580 * Index into [LinkedLibrary.dependencies] for the library in which the |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 * Integer index indicating which unit in the exported library contains the | 2613 * Integer index indicating which unit in the exported library contains the |
2363 * definition of the entity. As with indices into [LinkedLibrary.units], | 2614 * definition of the entity. As with indices into [LinkedLibrary.units], |
2364 * zero represents the defining compilation unit, and nonzero values | 2615 * zero represents the defining compilation unit, and nonzero values |
2365 * represent parts in the order of the corresponding `part` declarations. | 2616 * represent parts in the order of the corresponding `part` declarations. |
2366 */ | 2617 */ |
2367 void set unit(int value) { | 2618 void set unit(int value) { |
2368 assert(value == null || value >= 0); | 2619 assert(value == null || value >= 0); |
2369 this._unit = value; | 2620 this._unit = value; |
2370 } | 2621 } |
2371 | 2622 |
2372 LinkedExportNameBuilder({int dependency, idl.ReferenceKind kind, String name,
int unit}) | 2623 LinkedExportNameBuilder( |
2373 : _dependency = dependency, | 2624 {int dependency, idl.ReferenceKind kind, String name, int unit}) |
2374 _kind = kind, | 2625 : _dependency = dependency, |
2375 _name = name, | 2626 _kind = kind, |
2376 _unit = unit; | 2627 _name = name, |
| 2628 _unit = unit; |
2377 | 2629 |
2378 /** | 2630 /** |
2379 * Flush [informative] data recursively. | 2631 * Flush [informative] data recursively. |
2380 */ | 2632 */ |
2381 void flushInformative() { | 2633 void flushInformative() {} |
2382 } | |
2383 | 2634 |
2384 /** | 2635 /** |
2385 * Accumulate non-[informative] data into [signature]. | 2636 * Accumulate non-[informative] data into [signature]. |
2386 */ | 2637 */ |
2387 void collectApiSignature(api_sig.ApiSignature signature) { | 2638 void collectApiSignature(api_sig.ApiSignature signature) { |
2388 signature.addInt(this._dependency ?? 0); | 2639 signature.addInt(this._dependency ?? 0); |
2389 signature.addString(this._name ?? ''); | 2640 signature.addString(this._name ?? ''); |
2390 signature.addInt(this._unit ?? 0); | 2641 signature.addInt(this._unit ?? 0); |
2391 signature.addInt(this._kind == null ? 0 : this._kind.index); | 2642 signature.addInt(this._kind == null ? 0 : this._kind.index); |
2392 } | 2643 } |
(...skipping 17 matching lines...) Expand all Loading... |
2410 fbBuilder.addUint32(2, _unit); | 2661 fbBuilder.addUint32(2, _unit); |
2411 } | 2662 } |
2412 return fbBuilder.endTable(); | 2663 return fbBuilder.endTable(); |
2413 } | 2664 } |
2414 } | 2665 } |
2415 | 2666 |
2416 class _LinkedExportNameReader extends fb.TableReader<_LinkedExportNameImpl> { | 2667 class _LinkedExportNameReader extends fb.TableReader<_LinkedExportNameImpl> { |
2417 const _LinkedExportNameReader(); | 2668 const _LinkedExportNameReader(); |
2418 | 2669 |
2419 @override | 2670 @override |
2420 _LinkedExportNameImpl createObject(fb.BufferContext bc, int offset) => new _Li
nkedExportNameImpl(bc, offset); | 2671 _LinkedExportNameImpl createObject(fb.BufferContext bc, int offset) => |
| 2672 new _LinkedExportNameImpl(bc, offset); |
2421 } | 2673 } |
2422 | 2674 |
2423 class _LinkedExportNameImpl extends Object with _LinkedExportNameMixin implement
s idl.LinkedExportName { | 2675 class _LinkedExportNameImpl extends Object |
| 2676 with _LinkedExportNameMixin |
| 2677 implements idl.LinkedExportName { |
2424 final fb.BufferContext _bc; | 2678 final fb.BufferContext _bc; |
2425 final int _bcOffset; | 2679 final int _bcOffset; |
2426 | 2680 |
2427 _LinkedExportNameImpl(this._bc, this._bcOffset); | 2681 _LinkedExportNameImpl(this._bc, this._bcOffset); |
2428 | 2682 |
2429 int _dependency; | 2683 int _dependency; |
2430 idl.ReferenceKind _kind; | 2684 idl.ReferenceKind _kind; |
2431 String _name; | 2685 String _name; |
2432 int _unit; | 2686 int _unit; |
2433 | 2687 |
2434 @override | 2688 @override |
2435 int get dependency { | 2689 int get dependency { |
2436 _dependency ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 2690 _dependency ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
2437 return _dependency; | 2691 return _dependency; |
2438 } | 2692 } |
2439 | 2693 |
2440 @override | 2694 @override |
2441 idl.ReferenceKind get kind { | 2695 idl.ReferenceKind get kind { |
2442 _kind ??= const _ReferenceKindReader().vTableGet(_bc, _bcOffset, 3, idl.Refe
renceKind.classOrEnum); | 2696 _kind ??= const _ReferenceKindReader() |
| 2697 .vTableGet(_bc, _bcOffset, 3, idl.ReferenceKind.classOrEnum); |
2443 return _kind; | 2698 return _kind; |
2444 } | 2699 } |
2445 | 2700 |
2446 @override | 2701 @override |
2447 String get name { | 2702 String get name { |
2448 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 2703 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
2449 return _name; | 2704 return _name; |
2450 } | 2705 } |
2451 | 2706 |
2452 @override | 2707 @override |
2453 int get unit { | 2708 int get unit { |
2454 _unit ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); | 2709 _unit ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
2455 return _unit; | 2710 return _unit; |
2456 } | 2711 } |
2457 } | 2712 } |
2458 | 2713 |
2459 abstract class _LinkedExportNameMixin implements idl.LinkedExportName { | 2714 abstract class _LinkedExportNameMixin implements idl.LinkedExportName { |
2460 @override | 2715 @override |
2461 Map<String, Object> toJson() { | 2716 Map<String, Object> toJson() { |
2462 Map<String, Object> _result = <String, Object>{}; | 2717 Map<String, Object> _result = <String, Object>{}; |
2463 if (dependency != 0) _result["dependency"] = dependency; | 2718 if (dependency != 0) _result["dependency"] = dependency; |
2464 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString()
.split('.')[1]; | 2719 if (kind != idl.ReferenceKind.classOrEnum) |
| 2720 _result["kind"] = kind.toString().split('.')[1]; |
2465 if (name != '') _result["name"] = name; | 2721 if (name != '') _result["name"] = name; |
2466 if (unit != 0) _result["unit"] = unit; | 2722 if (unit != 0) _result["unit"] = unit; |
2467 return _result; | 2723 return _result; |
2468 } | 2724 } |
2469 | 2725 |
2470 @override | 2726 @override |
2471 Map<String, Object> toMap() => { | 2727 Map<String, Object> toMap() => { |
2472 "dependency": dependency, | 2728 "dependency": dependency, |
2473 "kind": kind, | 2729 "kind": kind, |
2474 "name": name, | 2730 "name": name, |
2475 "unit": unit, | 2731 "unit": unit, |
2476 }; | 2732 }; |
2477 | 2733 |
2478 @override | 2734 @override |
2479 String toString() => convert.JSON.encode(toJson()); | 2735 String toString() => convert.JSON.encode(toJson()); |
2480 } | 2736 } |
2481 | 2737 |
2482 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id
l.LinkedLibrary { | 2738 class LinkedLibraryBuilder extends Object |
| 2739 with _LinkedLibraryMixin |
| 2740 implements idl.LinkedLibrary { |
2483 List<LinkedDependencyBuilder> _dependencies; | 2741 List<LinkedDependencyBuilder> _dependencies; |
2484 List<int> _exportDependencies; | 2742 List<int> _exportDependencies; |
2485 List<LinkedExportNameBuilder> _exportNames; | 2743 List<LinkedExportNameBuilder> _exportNames; |
2486 List<int> _importDependencies; | 2744 List<int> _importDependencies; |
2487 int _numPrelinkedDependencies; | 2745 int _numPrelinkedDependencies; |
2488 List<LinkedUnitBuilder> _units; | 2746 List<LinkedUnitBuilder> _units; |
2489 | 2747 |
2490 @override | 2748 @override |
2491 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep
endencyBuilder>[]; | 2749 List<LinkedDependencyBuilder> get dependencies => |
| 2750 _dependencies ??= <LinkedDependencyBuilder>[]; |
2492 | 2751 |
2493 /** | 2752 /** |
2494 * The libraries that this library depends on (either via an explicit import | 2753 * The libraries that this library depends on (either via an explicit import |
2495 * statement or via the implicit dependencies on `dart:core` and | 2754 * statement or via the implicit dependencies on `dart:core` and |
2496 * `dart:async`). The first element of this array is a pseudo-dependency | 2755 * `dart:async`). The first element of this array is a pseudo-dependency |
2497 * representing the library itself (it is also used for `dynamic` and | 2756 * representing the library itself (it is also used for `dynamic` and |
2498 * `void`). This is followed by elements representing "prelinked" | 2757 * `void`). This is followed by elements representing "prelinked" |
2499 * dependencies (direct imports and the transitive closure of exports). | 2758 * dependencies (direct imports and the transitive closure of exports). |
2500 * After the prelinked dependencies are elements representing "linked" | 2759 * After the prelinked dependencies are elements representing "linked" |
2501 * dependencies. | 2760 * dependencies. |
(...skipping 14 matching lines...) Expand all Loading... |
2516 /** | 2775 /** |
2517 * For each export in [UnlinkedUnit.exports], an index into [dependencies] | 2776 * For each export in [UnlinkedUnit.exports], an index into [dependencies] |
2518 * of the library being exported. | 2777 * of the library being exported. |
2519 */ | 2778 */ |
2520 void set exportDependencies(List<int> value) { | 2779 void set exportDependencies(List<int> value) { |
2521 assert(value == null || value.every((e) => e >= 0)); | 2780 assert(value == null || value.every((e) => e >= 0)); |
2522 this._exportDependencies = value; | 2781 this._exportDependencies = value; |
2523 } | 2782 } |
2524 | 2783 |
2525 @override | 2784 @override |
2526 List<LinkedExportNameBuilder> get exportNames => _exportNames ??= <LinkedExpor
tNameBuilder>[]; | 2785 List<LinkedExportNameBuilder> get exportNames => |
| 2786 _exportNames ??= <LinkedExportNameBuilder>[]; |
2527 | 2787 |
2528 /** | 2788 /** |
2529 * Information about entities in the export namespace of the library that are | 2789 * Information about entities in the export namespace of the library that are |
2530 * not in the public namespace of the library (that is, entities that are | 2790 * not in the public namespace of the library (that is, entities that are |
2531 * brought into the namespace via `export` directives). | 2791 * brought into the namespace via `export` directives). |
2532 * | 2792 * |
2533 * Sorted by name. | 2793 * Sorted by name. |
2534 */ | 2794 */ |
2535 void set exportNames(List<LinkedExportNameBuilder> value) { | 2795 void set exportNames(List<LinkedExportNameBuilder> value) { |
2536 this._exportNames = value; | 2796 this._exportNames = value; |
2537 } | 2797 } |
2538 | 2798 |
2539 @override | 2799 @override |
2540 bool get fallbackMode => throw new UnimplementedError('attempt to access depre
cated field'); | 2800 bool get fallbackMode => |
| 2801 throw new UnimplementedError('attempt to access deprecated field'); |
2541 | 2802 |
2542 @override | 2803 @override |
2543 List<int> get importDependencies => _importDependencies ??= <int>[]; | 2804 List<int> get importDependencies => _importDependencies ??= <int>[]; |
2544 | 2805 |
2545 /** | 2806 /** |
2546 * For each import in [UnlinkedUnit.imports], an index into [dependencies] | 2807 * For each import in [UnlinkedUnit.imports], an index into [dependencies] |
2547 * of the library being imported. | 2808 * of the library being imported. |
2548 */ | 2809 */ |
2549 void set importDependencies(List<int> value) { | 2810 void set importDependencies(List<int> value) { |
2550 assert(value == null || value.every((e) => e >= 0)); | 2811 assert(value == null || value.every((e) => e >= 0)); |
(...skipping 19 matching lines...) Expand all Loading... |
2570 /** | 2831 /** |
2571 * The linked summary of all the compilation units constituting the | 2832 * The linked summary of all the compilation units constituting the |
2572 * library. The summary of the defining compilation unit is listed first, | 2833 * library. The summary of the defining compilation unit is listed first, |
2573 * followed by the summary of each part, in the order of the `part` | 2834 * followed by the summary of each part, in the order of the `part` |
2574 * declarations in the defining compilation unit. | 2835 * declarations in the defining compilation unit. |
2575 */ | 2836 */ |
2576 void set units(List<LinkedUnitBuilder> value) { | 2837 void set units(List<LinkedUnitBuilder> value) { |
2577 this._units = value; | 2838 this._units = value; |
2578 } | 2839 } |
2579 | 2840 |
2580 LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<int> ex
portDependencies, List<LinkedExportNameBuilder> exportNames, List<int> importDep
endencies, int numPrelinkedDependencies, List<LinkedUnitBuilder> units}) | 2841 LinkedLibraryBuilder( |
2581 : _dependencies = dependencies, | 2842 {List<LinkedDependencyBuilder> dependencies, |
2582 _exportDependencies = exportDependencies, | 2843 List<int> exportDependencies, |
2583 _exportNames = exportNames, | 2844 List<LinkedExportNameBuilder> exportNames, |
2584 _importDependencies = importDependencies, | 2845 List<int> importDependencies, |
2585 _numPrelinkedDependencies = numPrelinkedDependencies, | 2846 int numPrelinkedDependencies, |
2586 _units = units; | 2847 List<LinkedUnitBuilder> units}) |
| 2848 : _dependencies = dependencies, |
| 2849 _exportDependencies = exportDependencies, |
| 2850 _exportNames = exportNames, |
| 2851 _importDependencies = importDependencies, |
| 2852 _numPrelinkedDependencies = numPrelinkedDependencies, |
| 2853 _units = units; |
2587 | 2854 |
2588 /** | 2855 /** |
2589 * Flush [informative] data recursively. | 2856 * Flush [informative] data recursively. |
2590 */ | 2857 */ |
2591 void flushInformative() { | 2858 void flushInformative() { |
2592 _dependencies?.forEach((b) => b.flushInformative()); | 2859 _dependencies?.forEach((b) => b.flushInformative()); |
2593 _exportNames?.forEach((b) => b.flushInformative()); | 2860 _exportNames?.forEach((b) => b.flushInformative()); |
2594 _units?.forEach((b) => b.flushInformative()); | 2861 _units?.forEach((b) => b.flushInformative()); |
2595 } | 2862 } |
2596 | 2863 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 return fbBuilder.finish(finish(fbBuilder), "LLib"); | 2913 return fbBuilder.finish(finish(fbBuilder), "LLib"); |
2647 } | 2914 } |
2648 | 2915 |
2649 fb.Offset finish(fb.Builder fbBuilder) { | 2916 fb.Offset finish(fb.Builder fbBuilder) { |
2650 fb.Offset offset_dependencies; | 2917 fb.Offset offset_dependencies; |
2651 fb.Offset offset_exportDependencies; | 2918 fb.Offset offset_exportDependencies; |
2652 fb.Offset offset_exportNames; | 2919 fb.Offset offset_exportNames; |
2653 fb.Offset offset_importDependencies; | 2920 fb.Offset offset_importDependencies; |
2654 fb.Offset offset_units; | 2921 fb.Offset offset_units; |
2655 if (!(_dependencies == null || _dependencies.isEmpty)) { | 2922 if (!(_dependencies == null || _dependencies.isEmpty)) { |
2656 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis
h(fbBuilder)).toList()); | 2923 offset_dependencies = fbBuilder |
| 2924 .writeList(_dependencies.map((b) => b.finish(fbBuilder)).toList()); |
2657 } | 2925 } |
2658 if (!(_exportDependencies == null || _exportDependencies.isEmpty)) { | 2926 if (!(_exportDependencies == null || _exportDependencies.isEmpty)) { |
2659 offset_exportDependencies = fbBuilder.writeListUint32(_exportDependencies)
; | 2927 offset_exportDependencies = |
| 2928 fbBuilder.writeListUint32(_exportDependencies); |
2660 } | 2929 } |
2661 if (!(_exportNames == null || _exportNames.isEmpty)) { | 2930 if (!(_exportNames == null || _exportNames.isEmpty)) { |
2662 offset_exportNames = fbBuilder.writeList(_exportNames.map((b) => b.finish(
fbBuilder)).toList()); | 2931 offset_exportNames = fbBuilder |
| 2932 .writeList(_exportNames.map((b) => b.finish(fbBuilder)).toList()); |
2663 } | 2933 } |
2664 if (!(_importDependencies == null || _importDependencies.isEmpty)) { | 2934 if (!(_importDependencies == null || _importDependencies.isEmpty)) { |
2665 offset_importDependencies = fbBuilder.writeListUint32(_importDependencies)
; | 2935 offset_importDependencies = |
| 2936 fbBuilder.writeListUint32(_importDependencies); |
2666 } | 2937 } |
2667 if (!(_units == null || _units.isEmpty)) { | 2938 if (!(_units == null || _units.isEmpty)) { |
2668 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).
toList()); | 2939 offset_units = |
| 2940 fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).toList()); |
2669 } | 2941 } |
2670 fbBuilder.startTable(); | 2942 fbBuilder.startTable(); |
2671 if (offset_dependencies != null) { | 2943 if (offset_dependencies != null) { |
2672 fbBuilder.addOffset(0, offset_dependencies); | 2944 fbBuilder.addOffset(0, offset_dependencies); |
2673 } | 2945 } |
2674 if (offset_exportDependencies != null) { | 2946 if (offset_exportDependencies != null) { |
2675 fbBuilder.addOffset(6, offset_exportDependencies); | 2947 fbBuilder.addOffset(6, offset_exportDependencies); |
2676 } | 2948 } |
2677 if (offset_exportNames != null) { | 2949 if (offset_exportNames != null) { |
2678 fbBuilder.addOffset(4, offset_exportNames); | 2950 fbBuilder.addOffset(4, offset_exportNames); |
(...skipping 13 matching lines...) Expand all Loading... |
2692 | 2964 |
2693 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) { | 2965 idl.LinkedLibrary readLinkedLibrary(List<int> buffer) { |
2694 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 2966 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
2695 return const _LinkedLibraryReader().read(rootRef, 0); | 2967 return const _LinkedLibraryReader().read(rootRef, 0); |
2696 } | 2968 } |
2697 | 2969 |
2698 class _LinkedLibraryReader extends fb.TableReader<_LinkedLibraryImpl> { | 2970 class _LinkedLibraryReader extends fb.TableReader<_LinkedLibraryImpl> { |
2699 const _LinkedLibraryReader(); | 2971 const _LinkedLibraryReader(); |
2700 | 2972 |
2701 @override | 2973 @override |
2702 _LinkedLibraryImpl createObject(fb.BufferContext bc, int offset) => new _Linke
dLibraryImpl(bc, offset); | 2974 _LinkedLibraryImpl createObject(fb.BufferContext bc, int offset) => |
| 2975 new _LinkedLibraryImpl(bc, offset); |
2703 } | 2976 } |
2704 | 2977 |
2705 class _LinkedLibraryImpl extends Object with _LinkedLibraryMixin implements idl.
LinkedLibrary { | 2978 class _LinkedLibraryImpl extends Object |
| 2979 with _LinkedLibraryMixin |
| 2980 implements idl.LinkedLibrary { |
2706 final fb.BufferContext _bc; | 2981 final fb.BufferContext _bc; |
2707 final int _bcOffset; | 2982 final int _bcOffset; |
2708 | 2983 |
2709 _LinkedLibraryImpl(this._bc, this._bcOffset); | 2984 _LinkedLibraryImpl(this._bc, this._bcOffset); |
2710 | 2985 |
2711 List<idl.LinkedDependency> _dependencies; | 2986 List<idl.LinkedDependency> _dependencies; |
2712 List<int> _exportDependencies; | 2987 List<int> _exportDependencies; |
2713 List<idl.LinkedExportName> _exportNames; | 2988 List<idl.LinkedExportName> _exportNames; |
2714 List<int> _importDependencies; | 2989 List<int> _importDependencies; |
2715 int _numPrelinkedDependencies; | 2990 int _numPrelinkedDependencies; |
2716 List<idl.LinkedUnit> _units; | 2991 List<idl.LinkedUnit> _units; |
2717 | 2992 |
2718 @override | 2993 @override |
2719 List<idl.LinkedDependency> get dependencies { | 2994 List<idl.LinkedDependency> get dependencies { |
2720 _dependencies ??= const fb.ListReader<idl.LinkedDependency>(const _LinkedDep
endencyReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedDependency>[]); | 2995 _dependencies ??= const fb.ListReader<idl.LinkedDependency>( |
| 2996 const _LinkedDependencyReader()) |
| 2997 .vTableGet(_bc, _bcOffset, 0, const <idl.LinkedDependency>[]); |
2721 return _dependencies; | 2998 return _dependencies; |
2722 } | 2999 } |
2723 | 3000 |
2724 @override | 3001 @override |
2725 List<int> get exportDependencies { | 3002 List<int> get exportDependencies { |
2726 _exportDependencies ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 6, const <int>[]); | 3003 _exportDependencies ??= |
| 3004 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 6, const <int>[]); |
2727 return _exportDependencies; | 3005 return _exportDependencies; |
2728 } | 3006 } |
2729 | 3007 |
2730 @override | 3008 @override |
2731 List<idl.LinkedExportName> get exportNames { | 3009 List<idl.LinkedExportName> get exportNames { |
2732 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo
rtNameReader()).vTableGet(_bc, _bcOffset, 4, const <idl.LinkedExportName>[]); | 3010 _exportNames ??= const fb.ListReader<idl.LinkedExportName>( |
| 3011 const _LinkedExportNameReader()) |
| 3012 .vTableGet(_bc, _bcOffset, 4, const <idl.LinkedExportName>[]); |
2733 return _exportNames; | 3013 return _exportNames; |
2734 } | 3014 } |
2735 | 3015 |
2736 @override | 3016 @override |
2737 bool get fallbackMode => throw new UnimplementedError('attempt to access depre
cated field'); | 3017 bool get fallbackMode => |
| 3018 throw new UnimplementedError('attempt to access deprecated field'); |
2738 | 3019 |
2739 @override | 3020 @override |
2740 List<int> get importDependencies { | 3021 List<int> get importDependencies { |
2741 _importDependencies ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 1, const <int>[]); | 3022 _importDependencies ??= |
| 3023 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1, const <int>[]); |
2742 return _importDependencies; | 3024 return _importDependencies; |
2743 } | 3025 } |
2744 | 3026 |
2745 @override | 3027 @override |
2746 int get numPrelinkedDependencies { | 3028 int get numPrelinkedDependencies { |
2747 _numPrelinkedDependencies ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffs
et, 2, 0); | 3029 _numPrelinkedDependencies ??= |
| 3030 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
2748 return _numPrelinkedDependencies; | 3031 return _numPrelinkedDependencies; |
2749 } | 3032 } |
2750 | 3033 |
2751 @override | 3034 @override |
2752 List<idl.LinkedUnit> get units { | 3035 List<idl.LinkedUnit> get units { |
2753 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()).vT
ableGet(_bc, _bcOffset, 3, const <idl.LinkedUnit>[]); | 3036 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()) |
| 3037 .vTableGet(_bc, _bcOffset, 3, const <idl.LinkedUnit>[]); |
2754 return _units; | 3038 return _units; |
2755 } | 3039 } |
2756 } | 3040 } |
2757 | 3041 |
2758 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary { | 3042 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary { |
2759 @override | 3043 @override |
2760 Map<String, Object> toJson() { | 3044 Map<String, Object> toJson() { |
2761 Map<String, Object> _result = <String, Object>{}; | 3045 Map<String, Object> _result = <String, Object>{}; |
2762 if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_va
lue) => _value.toJson()).toList(); | 3046 if (dependencies.isNotEmpty) |
2763 if (exportDependencies.isNotEmpty) _result["exportDependencies"] = exportDep
endencies; | 3047 _result["dependencies"] = |
2764 if (exportNames.isNotEmpty) _result["exportNames"] = exportNames.map((_value
) => _value.toJson()).toList(); | 3048 dependencies.map((_value) => _value.toJson()).toList(); |
2765 if (importDependencies.isNotEmpty) _result["importDependencies"] = importDep
endencies; | 3049 if (exportDependencies.isNotEmpty) |
2766 if (numPrelinkedDependencies != 0) _result["numPrelinkedDependencies"] = num
PrelinkedDependencies; | 3050 _result["exportDependencies"] = exportDependencies; |
2767 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson
()).toList(); | 3051 if (exportNames.isNotEmpty) |
| 3052 _result["exportNames"] = |
| 3053 exportNames.map((_value) => _value.toJson()).toList(); |
| 3054 if (importDependencies.isNotEmpty) |
| 3055 _result["importDependencies"] = importDependencies; |
| 3056 if (numPrelinkedDependencies != 0) |
| 3057 _result["numPrelinkedDependencies"] = numPrelinkedDependencies; |
| 3058 if (units.isNotEmpty) |
| 3059 _result["units"] = units.map((_value) => _value.toJson()).toList(); |
2768 return _result; | 3060 return _result; |
2769 } | 3061 } |
2770 | 3062 |
2771 @override | 3063 @override |
2772 Map<String, Object> toMap() => { | 3064 Map<String, Object> toMap() => { |
2773 "dependencies": dependencies, | 3065 "dependencies": dependencies, |
2774 "exportDependencies": exportDependencies, | 3066 "exportDependencies": exportDependencies, |
2775 "exportNames": exportNames, | 3067 "exportNames": exportNames, |
2776 "importDependencies": importDependencies, | 3068 "importDependencies": importDependencies, |
2777 "numPrelinkedDependencies": numPrelinkedDependencies, | 3069 "numPrelinkedDependencies": numPrelinkedDependencies, |
2778 "units": units, | 3070 "units": units, |
2779 }; | 3071 }; |
2780 | 3072 |
2781 @override | 3073 @override |
2782 String toString() => convert.JSON.encode(toJson()); | 3074 String toString() => convert.JSON.encode(toJson()); |
2783 } | 3075 } |
2784 | 3076 |
2785 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement
s idl.LinkedReference { | 3077 class LinkedReferenceBuilder extends Object |
| 3078 with _LinkedReferenceMixin |
| 3079 implements idl.LinkedReference { |
2786 int _containingReference; | 3080 int _containingReference; |
2787 int _dependency; | 3081 int _dependency; |
2788 idl.ReferenceKind _kind; | 3082 idl.ReferenceKind _kind; |
2789 int _localIndex; | 3083 int _localIndex; |
2790 String _name; | 3084 String _name; |
2791 int _numTypeParameters; | 3085 int _numTypeParameters; |
2792 int _unit; | 3086 int _unit; |
2793 | 3087 |
2794 @override | 3088 @override |
2795 int get containingReference => _containingReference ??= 0; | 3089 int get containingReference => _containingReference ??= 0; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2886 * represent parts in the order of the corresponding `part` declarations. | 3180 * represent parts in the order of the corresponding `part` declarations. |
2887 * | 3181 * |
2888 * Zero if this entity is contained within another entity (e.g. a class | 3182 * Zero if this entity is contained within another entity (e.g. a class |
2889 * member). | 3183 * member). |
2890 */ | 3184 */ |
2891 void set unit(int value) { | 3185 void set unit(int value) { |
2892 assert(value == null || value >= 0); | 3186 assert(value == null || value >= 0); |
2893 this._unit = value; | 3187 this._unit = value; |
2894 } | 3188 } |
2895 | 3189 |
2896 LinkedReferenceBuilder({int containingReference, int dependency, idl.Reference
Kind kind, int localIndex, String name, int numTypeParameters, int unit}) | 3190 LinkedReferenceBuilder( |
2897 : _containingReference = containingReference, | 3191 {int containingReference, |
2898 _dependency = dependency, | 3192 int dependency, |
2899 _kind = kind, | 3193 idl.ReferenceKind kind, |
2900 _localIndex = localIndex, | 3194 int localIndex, |
2901 _name = name, | 3195 String name, |
2902 _numTypeParameters = numTypeParameters, | 3196 int numTypeParameters, |
2903 _unit = unit; | 3197 int unit}) |
| 3198 : _containingReference = containingReference, |
| 3199 _dependency = dependency, |
| 3200 _kind = kind, |
| 3201 _localIndex = localIndex, |
| 3202 _name = name, |
| 3203 _numTypeParameters = numTypeParameters, |
| 3204 _unit = unit; |
2904 | 3205 |
2905 /** | 3206 /** |
2906 * Flush [informative] data recursively. | 3207 * Flush [informative] data recursively. |
2907 */ | 3208 */ |
2908 void flushInformative() { | 3209 void flushInformative() {} |
2909 } | |
2910 | 3210 |
2911 /** | 3211 /** |
2912 * Accumulate non-[informative] data into [signature]. | 3212 * Accumulate non-[informative] data into [signature]. |
2913 */ | 3213 */ |
2914 void collectApiSignature(api_sig.ApiSignature signature) { | 3214 void collectApiSignature(api_sig.ApiSignature signature) { |
2915 signature.addInt(this._unit ?? 0); | 3215 signature.addInt(this._unit ?? 0); |
2916 signature.addInt(this._dependency ?? 0); | 3216 signature.addInt(this._dependency ?? 0); |
2917 signature.addInt(this._kind == null ? 0 : this._kind.index); | 3217 signature.addInt(this._kind == null ? 0 : this._kind.index); |
2918 signature.addString(this._name ?? ''); | 3218 signature.addString(this._name ?? ''); |
2919 signature.addInt(this._numTypeParameters ?? 0); | 3219 signature.addInt(this._numTypeParameters ?? 0); |
(...skipping 29 matching lines...) Expand all Loading... |
2949 fbBuilder.addUint32(0, _unit); | 3249 fbBuilder.addUint32(0, _unit); |
2950 } | 3250 } |
2951 return fbBuilder.endTable(); | 3251 return fbBuilder.endTable(); |
2952 } | 3252 } |
2953 } | 3253 } |
2954 | 3254 |
2955 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { | 3255 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { |
2956 const _LinkedReferenceReader(); | 3256 const _LinkedReferenceReader(); |
2957 | 3257 |
2958 @override | 3258 @override |
2959 _LinkedReferenceImpl createObject(fb.BufferContext bc, int offset) => new _Lin
kedReferenceImpl(bc, offset); | 3259 _LinkedReferenceImpl createObject(fb.BufferContext bc, int offset) => |
| 3260 new _LinkedReferenceImpl(bc, offset); |
2960 } | 3261 } |
2961 | 3262 |
2962 class _LinkedReferenceImpl extends Object with _LinkedReferenceMixin implements
idl.LinkedReference { | 3263 class _LinkedReferenceImpl extends Object |
| 3264 with _LinkedReferenceMixin |
| 3265 implements idl.LinkedReference { |
2963 final fb.BufferContext _bc; | 3266 final fb.BufferContext _bc; |
2964 final int _bcOffset; | 3267 final int _bcOffset; |
2965 | 3268 |
2966 _LinkedReferenceImpl(this._bc, this._bcOffset); | 3269 _LinkedReferenceImpl(this._bc, this._bcOffset); |
2967 | 3270 |
2968 int _containingReference; | 3271 int _containingReference; |
2969 int _dependency; | 3272 int _dependency; |
2970 idl.ReferenceKind _kind; | 3273 idl.ReferenceKind _kind; |
2971 int _localIndex; | 3274 int _localIndex; |
2972 String _name; | 3275 String _name; |
2973 int _numTypeParameters; | 3276 int _numTypeParameters; |
2974 int _unit; | 3277 int _unit; |
2975 | 3278 |
2976 @override | 3279 @override |
2977 int get containingReference { | 3280 int get containingReference { |
2978 _containingReference ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5
, 0); | 3281 _containingReference ??= |
| 3282 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5, 0); |
2979 return _containingReference; | 3283 return _containingReference; |
2980 } | 3284 } |
2981 | 3285 |
2982 @override | 3286 @override |
2983 int get dependency { | 3287 int get dependency { |
2984 _dependency ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 3288 _dependency ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
2985 return _dependency; | 3289 return _dependency; |
2986 } | 3290 } |
2987 | 3291 |
2988 @override | 3292 @override |
2989 idl.ReferenceKind get kind { | 3293 idl.ReferenceKind get kind { |
2990 _kind ??= const _ReferenceKindReader().vTableGet(_bc, _bcOffset, 2, idl.Refe
renceKind.classOrEnum); | 3294 _kind ??= const _ReferenceKindReader() |
| 3295 .vTableGet(_bc, _bcOffset, 2, idl.ReferenceKind.classOrEnum); |
2991 return _kind; | 3296 return _kind; |
2992 } | 3297 } |
2993 | 3298 |
2994 @override | 3299 @override |
2995 int get localIndex { | 3300 int get localIndex { |
2996 _localIndex ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0); | 3301 _localIndex ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0); |
2997 return _localIndex; | 3302 return _localIndex; |
2998 } | 3303 } |
2999 | 3304 |
3000 @override | 3305 @override |
3001 String get name { | 3306 String get name { |
3002 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 3, ''); | 3307 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 3, ''); |
3003 return _name; | 3308 return _name; |
3004 } | 3309 } |
3005 | 3310 |
3006 @override | 3311 @override |
3007 int get numTypeParameters { | 3312 int get numTypeParameters { |
3008 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4,
0); | 3313 _numTypeParameters ??= |
| 3314 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); |
3009 return _numTypeParameters; | 3315 return _numTypeParameters; |
3010 } | 3316 } |
3011 | 3317 |
3012 @override | 3318 @override |
3013 int get unit { | 3319 int get unit { |
3014 _unit ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 3320 _unit ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
3015 return _unit; | 3321 return _unit; |
3016 } | 3322 } |
3017 } | 3323 } |
3018 | 3324 |
3019 abstract class _LinkedReferenceMixin implements idl.LinkedReference { | 3325 abstract class _LinkedReferenceMixin implements idl.LinkedReference { |
3020 @override | 3326 @override |
3021 Map<String, Object> toJson() { | 3327 Map<String, Object> toJson() { |
3022 Map<String, Object> _result = <String, Object>{}; | 3328 Map<String, Object> _result = <String, Object>{}; |
3023 if (containingReference != 0) _result["containingReference"] = containingRef
erence; | 3329 if (containingReference != 0) |
| 3330 _result["containingReference"] = containingReference; |
3024 if (dependency != 0) _result["dependency"] = dependency; | 3331 if (dependency != 0) _result["dependency"] = dependency; |
3025 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString()
.split('.')[1]; | 3332 if (kind != idl.ReferenceKind.classOrEnum) |
| 3333 _result["kind"] = kind.toString().split('.')[1]; |
3026 if (localIndex != 0) _result["localIndex"] = localIndex; | 3334 if (localIndex != 0) _result["localIndex"] = localIndex; |
3027 if (name != '') _result["name"] = name; | 3335 if (name != '') _result["name"] = name; |
3028 if (numTypeParameters != 0) _result["numTypeParameters"] = numTypeParameters
; | 3336 if (numTypeParameters != 0) |
| 3337 _result["numTypeParameters"] = numTypeParameters; |
3029 if (unit != 0) _result["unit"] = unit; | 3338 if (unit != 0) _result["unit"] = unit; |
3030 return _result; | 3339 return _result; |
3031 } | 3340 } |
3032 | 3341 |
3033 @override | 3342 @override |
3034 Map<String, Object> toMap() => { | 3343 Map<String, Object> toMap() => { |
3035 "containingReference": containingReference, | 3344 "containingReference": containingReference, |
3036 "dependency": dependency, | 3345 "dependency": dependency, |
3037 "kind": kind, | 3346 "kind": kind, |
3038 "localIndex": localIndex, | 3347 "localIndex": localIndex, |
3039 "name": name, | 3348 "name": name, |
3040 "numTypeParameters": numTypeParameters, | 3349 "numTypeParameters": numTypeParameters, |
3041 "unit": unit, | 3350 "unit": unit, |
3042 }; | 3351 }; |
3043 | 3352 |
3044 @override | 3353 @override |
3045 String toString() => convert.JSON.encode(toJson()); | 3354 String toString() => convert.JSON.encode(toJson()); |
3046 } | 3355 } |
3047 | 3356 |
3048 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { | 3357 class LinkedUnitBuilder extends Object |
| 3358 with _LinkedUnitMixin |
| 3359 implements idl.LinkedUnit { |
3049 List<int> _constCycles; | 3360 List<int> _constCycles; |
3050 List<int> _parametersInheritingCovariant; | 3361 List<int> _parametersInheritingCovariant; |
3051 List<LinkedReferenceBuilder> _references; | 3362 List<LinkedReferenceBuilder> _references; |
3052 List<EntityRefBuilder> _types; | 3363 List<EntityRefBuilder> _types; |
3053 | 3364 |
3054 @override | 3365 @override |
3055 List<int> get constCycles => _constCycles ??= <int>[]; | 3366 List<int> get constCycles => _constCycles ??= <int>[]; |
3056 | 3367 |
3057 /** | 3368 /** |
3058 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) | 3369 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) |
3059 * corresponding to const constructors that are part of cycles. | 3370 * corresponding to const constructors that are part of cycles. |
3060 */ | 3371 */ |
3061 void set constCycles(List<int> value) { | 3372 void set constCycles(List<int> value) { |
3062 assert(value == null || value.every((e) => e >= 0)); | 3373 assert(value == null || value.every((e) => e >= 0)); |
3063 this._constCycles = value; | 3374 this._constCycles = value; |
3064 } | 3375 } |
3065 | 3376 |
3066 @override | 3377 @override |
3067 List<int> get parametersInheritingCovariant => _parametersInheritingCovariant
??= <int>[]; | 3378 List<int> get parametersInheritingCovariant => |
| 3379 _parametersInheritingCovariant ??= <int>[]; |
3068 | 3380 |
3069 /** | 3381 /** |
3070 * List of slot ids (referring to [UnlinkedParam.inheritsCovariantSlot]) | 3382 * List of slot ids (referring to [UnlinkedParam.inheritsCovariantSlot]) |
3071 * corresponding to parameters that inherit `@covariant` behavior from a base | 3383 * corresponding to parameters that inherit `@covariant` behavior from a base |
3072 * class. | 3384 * class. |
3073 */ | 3385 */ |
3074 void set parametersInheritingCovariant(List<int> value) { | 3386 void set parametersInheritingCovariant(List<int> value) { |
3075 assert(value == null || value.every((e) => e >= 0)); | 3387 assert(value == null || value.every((e) => e >= 0)); |
3076 this._parametersInheritingCovariant = value; | 3388 this._parametersInheritingCovariant = value; |
3077 } | 3389 } |
3078 | 3390 |
3079 @override | 3391 @override |
3080 List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenc
eBuilder>[]; | 3392 List<LinkedReferenceBuilder> get references => |
| 3393 _references ??= <LinkedReferenceBuilder>[]; |
3081 | 3394 |
3082 /** | 3395 /** |
3083 * Information about the resolution of references within the compilation | 3396 * Information about the resolution of references within the compilation |
3084 * unit. Each element of [UnlinkedUnit.references] has a corresponding | 3397 * unit. Each element of [UnlinkedUnit.references] has a corresponding |
3085 * element in this list (at the same index). If this list has additional | 3398 * element in this list (at the same index). If this list has additional |
3086 * elements beyond the number of elements in [UnlinkedUnit.references], those | 3399 * elements beyond the number of elements in [UnlinkedUnit.references], those |
3087 * additional elements are references that are only referred to implicitly | 3400 * additional elements are references that are only referred to implicitly |
3088 * (e.g. elements involved in inferred or propagated types). | 3401 * (e.g. elements involved in inferred or propagated types). |
3089 */ | 3402 */ |
3090 void set references(List<LinkedReferenceBuilder> value) { | 3403 void set references(List<LinkedReferenceBuilder> value) { |
3091 this._references = value; | 3404 this._references = value; |
3092 } | 3405 } |
3093 | 3406 |
3094 @override | 3407 @override |
3095 List<EntityRefBuilder> get types => _types ??= <EntityRefBuilder>[]; | 3408 List<EntityRefBuilder> get types => _types ??= <EntityRefBuilder>[]; |
3096 | 3409 |
3097 /** | 3410 /** |
3098 * List associating slot ids found inside the unlinked summary for the | 3411 * List associating slot ids found inside the unlinked summary for the |
3099 * compilation unit with propagated and inferred types. | 3412 * compilation unit with propagated and inferred types. |
3100 */ | 3413 */ |
3101 void set types(List<EntityRefBuilder> value) { | 3414 void set types(List<EntityRefBuilder> value) { |
3102 this._types = value; | 3415 this._types = value; |
3103 } | 3416 } |
3104 | 3417 |
3105 LinkedUnitBuilder({List<int> constCycles, List<int> parametersInheritingCovari
ant, List<LinkedReferenceBuilder> references, List<EntityRefBuilder> types}) | 3418 LinkedUnitBuilder( |
3106 : _constCycles = constCycles, | 3419 {List<int> constCycles, |
3107 _parametersInheritingCovariant = parametersInheritingCovariant, | 3420 List<int> parametersInheritingCovariant, |
3108 _references = references, | 3421 List<LinkedReferenceBuilder> references, |
3109 _types = types; | 3422 List<EntityRefBuilder> types}) |
| 3423 : _constCycles = constCycles, |
| 3424 _parametersInheritingCovariant = parametersInheritingCovariant, |
| 3425 _references = references, |
| 3426 _types = types; |
3110 | 3427 |
3111 /** | 3428 /** |
3112 * Flush [informative] data recursively. | 3429 * Flush [informative] data recursively. |
3113 */ | 3430 */ |
3114 void flushInformative() { | 3431 void flushInformative() { |
3115 _references?.forEach((b) => b.flushInformative()); | 3432 _references?.forEach((b) => b.flushInformative()); |
3116 _types?.forEach((b) => b.flushInformative()); | 3433 _types?.forEach((b) => b.flushInformative()); |
3117 } | 3434 } |
3118 | 3435 |
3119 /** | 3436 /** |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3155 } | 3472 } |
3156 | 3473 |
3157 fb.Offset finish(fb.Builder fbBuilder) { | 3474 fb.Offset finish(fb.Builder fbBuilder) { |
3158 fb.Offset offset_constCycles; | 3475 fb.Offset offset_constCycles; |
3159 fb.Offset offset_parametersInheritingCovariant; | 3476 fb.Offset offset_parametersInheritingCovariant; |
3160 fb.Offset offset_references; | 3477 fb.Offset offset_references; |
3161 fb.Offset offset_types; | 3478 fb.Offset offset_types; |
3162 if (!(_constCycles == null || _constCycles.isEmpty)) { | 3479 if (!(_constCycles == null || _constCycles.isEmpty)) { |
3163 offset_constCycles = fbBuilder.writeListUint32(_constCycles); | 3480 offset_constCycles = fbBuilder.writeListUint32(_constCycles); |
3164 } | 3481 } |
3165 if (!(_parametersInheritingCovariant == null || _parametersInheritingCovaria
nt.isEmpty)) { | 3482 if (!(_parametersInheritingCovariant == null || |
3166 offset_parametersInheritingCovariant = fbBuilder.writeListUint32(_paramete
rsInheritingCovariant); | 3483 _parametersInheritingCovariant.isEmpty)) { |
| 3484 offset_parametersInheritingCovariant = |
| 3485 fbBuilder.writeListUint32(_parametersInheritingCovariant); |
3167 } | 3486 } |
3168 if (!(_references == null || _references.isEmpty)) { | 3487 if (!(_references == null || _references.isEmpty)) { |
3169 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 3488 offset_references = fbBuilder |
| 3489 .writeList(_references.map((b) => b.finish(fbBuilder)).toList()); |
3170 } | 3490 } |
3171 if (!(_types == null || _types.isEmpty)) { | 3491 if (!(_types == null || _types.isEmpty)) { |
3172 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).
toList()); | 3492 offset_types = |
| 3493 fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).toList()); |
3173 } | 3494 } |
3174 fbBuilder.startTable(); | 3495 fbBuilder.startTable(); |
3175 if (offset_constCycles != null) { | 3496 if (offset_constCycles != null) { |
3176 fbBuilder.addOffset(2, offset_constCycles); | 3497 fbBuilder.addOffset(2, offset_constCycles); |
3177 } | 3498 } |
3178 if (offset_parametersInheritingCovariant != null) { | 3499 if (offset_parametersInheritingCovariant != null) { |
3179 fbBuilder.addOffset(3, offset_parametersInheritingCovariant); | 3500 fbBuilder.addOffset(3, offset_parametersInheritingCovariant); |
3180 } | 3501 } |
3181 if (offset_references != null) { | 3502 if (offset_references != null) { |
3182 fbBuilder.addOffset(0, offset_references); | 3503 fbBuilder.addOffset(0, offset_references); |
3183 } | 3504 } |
3184 if (offset_types != null) { | 3505 if (offset_types != null) { |
3185 fbBuilder.addOffset(1, offset_types); | 3506 fbBuilder.addOffset(1, offset_types); |
3186 } | 3507 } |
3187 return fbBuilder.endTable(); | 3508 return fbBuilder.endTable(); |
3188 } | 3509 } |
3189 } | 3510 } |
3190 | 3511 |
3191 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { | 3512 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { |
3192 const _LinkedUnitReader(); | 3513 const _LinkedUnitReader(); |
3193 | 3514 |
3194 @override | 3515 @override |
3195 _LinkedUnitImpl createObject(fb.BufferContext bc, int offset) => new _LinkedUn
itImpl(bc, offset); | 3516 _LinkedUnitImpl createObject(fb.BufferContext bc, int offset) => |
| 3517 new _LinkedUnitImpl(bc, offset); |
3196 } | 3518 } |
3197 | 3519 |
3198 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked
Unit { | 3520 class _LinkedUnitImpl extends Object |
| 3521 with _LinkedUnitMixin |
| 3522 implements idl.LinkedUnit { |
3199 final fb.BufferContext _bc; | 3523 final fb.BufferContext _bc; |
3200 final int _bcOffset; | 3524 final int _bcOffset; |
3201 | 3525 |
3202 _LinkedUnitImpl(this._bc, this._bcOffset); | 3526 _LinkedUnitImpl(this._bc, this._bcOffset); |
3203 | 3527 |
3204 List<int> _constCycles; | 3528 List<int> _constCycles; |
3205 List<int> _parametersInheritingCovariant; | 3529 List<int> _parametersInheritingCovariant; |
3206 List<idl.LinkedReference> _references; | 3530 List<idl.LinkedReference> _references; |
3207 List<idl.EntityRef> _types; | 3531 List<idl.EntityRef> _types; |
3208 | 3532 |
3209 @override | 3533 @override |
3210 List<int> get constCycles { | 3534 List<int> get constCycles { |
3211 _constCycles ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, co
nst <int>[]); | 3535 _constCycles ??= |
| 3536 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, const <int>[]); |
3212 return _constCycles; | 3537 return _constCycles; |
3213 } | 3538 } |
3214 | 3539 |
3215 @override | 3540 @override |
3216 List<int> get parametersInheritingCovariant { | 3541 List<int> get parametersInheritingCovariant { |
3217 _parametersInheritingCovariant ??= const fb.Uint32ListReader().vTableGet(_bc
, _bcOffset, 3, const <int>[]); | 3542 _parametersInheritingCovariant ??= |
| 3543 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, const <int>[]); |
3218 return _parametersInheritingCovariant; | 3544 return _parametersInheritingCovariant; |
3219 } | 3545 } |
3220 | 3546 |
3221 @override | 3547 @override |
3222 List<idl.LinkedReference> get references { | 3548 List<idl.LinkedReference> get references { |
3223 _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedRefere
nceReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedReference>[]); | 3549 _references ??= |
| 3550 const fb.ListReader<idl.LinkedReference>(const _LinkedReferenceReader()) |
| 3551 .vTableGet(_bc, _bcOffset, 0, const <idl.LinkedReference>[]); |
3224 return _references; | 3552 return _references; |
3225 } | 3553 } |
3226 | 3554 |
3227 @override | 3555 @override |
3228 List<idl.EntityRef> get types { | 3556 List<idl.EntityRef> get types { |
3229 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTab
leGet(_bc, _bcOffset, 1, const <idl.EntityRef>[]); | 3557 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) |
| 3558 .vTableGet(_bc, _bcOffset, 1, const <idl.EntityRef>[]); |
3230 return _types; | 3559 return _types; |
3231 } | 3560 } |
3232 } | 3561 } |
3233 | 3562 |
3234 abstract class _LinkedUnitMixin implements idl.LinkedUnit { | 3563 abstract class _LinkedUnitMixin implements idl.LinkedUnit { |
3235 @override | 3564 @override |
3236 Map<String, Object> toJson() { | 3565 Map<String, Object> toJson() { |
3237 Map<String, Object> _result = <String, Object>{}; | 3566 Map<String, Object> _result = <String, Object>{}; |
3238 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles; | 3567 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles; |
3239 if (parametersInheritingCovariant.isNotEmpty) _result["parametersInheritingC
ovariant"] = parametersInheritingCovariant; | 3568 if (parametersInheritingCovariant.isNotEmpty) |
3240 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 3569 _result["parametersInheritingCovariant"] = parametersInheritingCovariant; |
3241 if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson
()).toList(); | 3570 if (references.isNotEmpty) |
| 3571 _result["references"] = |
| 3572 references.map((_value) => _value.toJson()).toList(); |
| 3573 if (types.isNotEmpty) |
| 3574 _result["types"] = types.map((_value) => _value.toJson()).toList(); |
3242 return _result; | 3575 return _result; |
3243 } | 3576 } |
3244 | 3577 |
3245 @override | 3578 @override |
3246 Map<String, Object> toMap() => { | 3579 Map<String, Object> toMap() => { |
3247 "constCycles": constCycles, | 3580 "constCycles": constCycles, |
3248 "parametersInheritingCovariant": parametersInheritingCovariant, | 3581 "parametersInheritingCovariant": parametersInheritingCovariant, |
3249 "references": references, | 3582 "references": references, |
3250 "types": types, | 3583 "types": types, |
3251 }; | 3584 }; |
3252 | 3585 |
3253 @override | 3586 @override |
3254 String toString() => convert.JSON.encode(toJson()); | 3587 String toString() => convert.JSON.encode(toJson()); |
3255 } | 3588 } |
3256 | 3589 |
3257 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { | 3590 class PackageBundleBuilder extends Object |
| 3591 with _PackageBundleMixin |
| 3592 implements idl.PackageBundle { |
3258 String _apiSignature; | 3593 String _apiSignature; |
3259 List<PackageDependencyInfoBuilder> _dependencies; | 3594 List<PackageDependencyInfoBuilder> _dependencies; |
3260 List<LinkedLibraryBuilder> _linkedLibraries; | 3595 List<LinkedLibraryBuilder> _linkedLibraries; |
3261 List<String> _linkedLibraryUris; | 3596 List<String> _linkedLibraryUris; |
3262 int _majorVersion; | 3597 int _majorVersion; |
3263 int _minorVersion; | 3598 int _minorVersion; |
3264 List<String> _unlinkedUnitHashes; | 3599 List<String> _unlinkedUnitHashes; |
3265 List<UnlinkedUnitBuilder> _unlinkedUnits; | 3600 List<UnlinkedUnitBuilder> _unlinkedUnits; |
3266 List<String> _unlinkedUnitUris; | 3601 List<String> _unlinkedUnitUris; |
3267 | 3602 |
3268 @override | 3603 @override |
3269 String get apiSignature => _apiSignature ??= ''; | 3604 String get apiSignature => _apiSignature ??= ''; |
3270 | 3605 |
3271 /** | 3606 /** |
3272 * MD5 hash of the non-informative fields of the [PackageBundle] (not | 3607 * MD5 hash of the non-informative fields of the [PackageBundle] (not |
3273 * including this one). This can be used to identify when the API of a | 3608 * including this one). This can be used to identify when the API of a |
3274 * package may have changed. | 3609 * package may have changed. |
3275 */ | 3610 */ |
3276 void set apiSignature(String value) { | 3611 void set apiSignature(String value) { |
3277 this._apiSignature = value; | 3612 this._apiSignature = value; |
3278 } | 3613 } |
3279 | 3614 |
3280 @override | 3615 @override |
3281 List<PackageDependencyInfoBuilder> get dependencies => _dependencies ??= <Pack
ageDependencyInfoBuilder>[]; | 3616 List<PackageDependencyInfoBuilder> get dependencies => |
| 3617 _dependencies ??= <PackageDependencyInfoBuilder>[]; |
3282 | 3618 |
3283 /** | 3619 /** |
3284 * Information about the packages this package depends on, if known. | 3620 * Information about the packages this package depends on, if known. |
3285 */ | 3621 */ |
3286 void set dependencies(List<PackageDependencyInfoBuilder> value) { | 3622 void set dependencies(List<PackageDependencyInfoBuilder> value) { |
3287 this._dependencies = value; | 3623 this._dependencies = value; |
3288 } | 3624 } |
3289 | 3625 |
3290 @override | 3626 @override |
3291 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked
LibraryBuilder>[]; | 3627 List<LinkedLibraryBuilder> get linkedLibraries => |
| 3628 _linkedLibraries ??= <LinkedLibraryBuilder>[]; |
3292 | 3629 |
3293 /** | 3630 /** |
3294 * Linked libraries. | 3631 * Linked libraries. |
3295 */ | 3632 */ |
3296 void set linkedLibraries(List<LinkedLibraryBuilder> value) { | 3633 void set linkedLibraries(List<LinkedLibraryBuilder> value) { |
3297 this._linkedLibraries = value; | 3634 this._linkedLibraries = value; |
3298 } | 3635 } |
3299 | 3636 |
3300 @override | 3637 @override |
3301 List<String> get linkedLibraryUris => _linkedLibraryUris ??= <String>[]; | 3638 List<String> get linkedLibraryUris => _linkedLibraryUris ??= <String>[]; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3337 | 3674 |
3338 /** | 3675 /** |
3339 * List of MD5 hashes of the files listed in [unlinkedUnitUris]. Each hash | 3676 * List of MD5 hashes of the files listed in [unlinkedUnitUris]. Each hash |
3340 * is encoded as a hexadecimal string using lower case letters. | 3677 * is encoded as a hexadecimal string using lower case letters. |
3341 */ | 3678 */ |
3342 void set unlinkedUnitHashes(List<String> value) { | 3679 void set unlinkedUnitHashes(List<String> value) { |
3343 this._unlinkedUnitHashes = value; | 3680 this._unlinkedUnitHashes = value; |
3344 } | 3681 } |
3345 | 3682 |
3346 @override | 3683 @override |
3347 List<UnlinkedUnitBuilder> get unlinkedUnits => _unlinkedUnits ??= <UnlinkedUni
tBuilder>[]; | 3684 List<UnlinkedUnitBuilder> get unlinkedUnits => |
| 3685 _unlinkedUnits ??= <UnlinkedUnitBuilder>[]; |
3348 | 3686 |
3349 /** | 3687 /** |
3350 * Unlinked information for the compilation units constituting the package. | 3688 * Unlinked information for the compilation units constituting the package. |
3351 */ | 3689 */ |
3352 void set unlinkedUnits(List<UnlinkedUnitBuilder> value) { | 3690 void set unlinkedUnits(List<UnlinkedUnitBuilder> value) { |
3353 this._unlinkedUnits = value; | 3691 this._unlinkedUnits = value; |
3354 } | 3692 } |
3355 | 3693 |
3356 @override | 3694 @override |
3357 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; | 3695 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; |
3358 | 3696 |
3359 /** | 3697 /** |
3360 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. | 3698 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. |
3361 */ | 3699 */ |
3362 void set unlinkedUnitUris(List<String> value) { | 3700 void set unlinkedUnitUris(List<String> value) { |
3363 this._unlinkedUnitUris = value; | 3701 this._unlinkedUnitUris = value; |
3364 } | 3702 } |
3365 | 3703 |
3366 PackageBundleBuilder({String apiSignature, List<PackageDependencyInfoBuilder>
dependencies, List<LinkedLibraryBuilder> linkedLibraries, List<String> linkedLib
raryUris, int majorVersion, int minorVersion, List<String> unlinkedUnitHashes, L
ist<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUnitUris}) | 3704 PackageBundleBuilder( |
3367 : _apiSignature = apiSignature, | 3705 {String apiSignature, |
3368 _dependencies = dependencies, | 3706 List<PackageDependencyInfoBuilder> dependencies, |
3369 _linkedLibraries = linkedLibraries, | 3707 List<LinkedLibraryBuilder> linkedLibraries, |
3370 _linkedLibraryUris = linkedLibraryUris, | 3708 List<String> linkedLibraryUris, |
3371 _majorVersion = majorVersion, | 3709 int majorVersion, |
3372 _minorVersion = minorVersion, | 3710 int minorVersion, |
3373 _unlinkedUnitHashes = unlinkedUnitHashes, | 3711 List<String> unlinkedUnitHashes, |
3374 _unlinkedUnits = unlinkedUnits, | 3712 List<UnlinkedUnitBuilder> unlinkedUnits, |
3375 _unlinkedUnitUris = unlinkedUnitUris; | 3713 List<String> unlinkedUnitUris}) |
| 3714 : _apiSignature = apiSignature, |
| 3715 _dependencies = dependencies, |
| 3716 _linkedLibraries = linkedLibraries, |
| 3717 _linkedLibraryUris = linkedLibraryUris, |
| 3718 _majorVersion = majorVersion, |
| 3719 _minorVersion = minorVersion, |
| 3720 _unlinkedUnitHashes = unlinkedUnitHashes, |
| 3721 _unlinkedUnits = unlinkedUnits, |
| 3722 _unlinkedUnitUris = unlinkedUnitUris; |
3376 | 3723 |
3377 /** | 3724 /** |
3378 * Flush [informative] data recursively. | 3725 * Flush [informative] data recursively. |
3379 */ | 3726 */ |
3380 void flushInformative() { | 3727 void flushInformative() { |
3381 _dependencies = null; | 3728 _dependencies = null; |
3382 _linkedLibraries?.forEach((b) => b.flushInformative()); | 3729 _linkedLibraries?.forEach((b) => b.flushInformative()); |
3383 _unlinkedUnitHashes = null; | 3730 _unlinkedUnitHashes = null; |
3384 _unlinkedUnits?.forEach((b) => b.flushInformative()); | 3731 _unlinkedUnits?.forEach((b) => b.flushInformative()); |
3385 } | 3732 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3435 fb.Offset offset_dependencies; | 3782 fb.Offset offset_dependencies; |
3436 fb.Offset offset_linkedLibraries; | 3783 fb.Offset offset_linkedLibraries; |
3437 fb.Offset offset_linkedLibraryUris; | 3784 fb.Offset offset_linkedLibraryUris; |
3438 fb.Offset offset_unlinkedUnitHashes; | 3785 fb.Offset offset_unlinkedUnitHashes; |
3439 fb.Offset offset_unlinkedUnits; | 3786 fb.Offset offset_unlinkedUnits; |
3440 fb.Offset offset_unlinkedUnitUris; | 3787 fb.Offset offset_unlinkedUnitUris; |
3441 if (_apiSignature != null) { | 3788 if (_apiSignature != null) { |
3442 offset_apiSignature = fbBuilder.writeString(_apiSignature); | 3789 offset_apiSignature = fbBuilder.writeString(_apiSignature); |
3443 } | 3790 } |
3444 if (!(_dependencies == null || _dependencies.isEmpty)) { | 3791 if (!(_dependencies == null || _dependencies.isEmpty)) { |
3445 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis
h(fbBuilder)).toList()); | 3792 offset_dependencies = fbBuilder |
| 3793 .writeList(_dependencies.map((b) => b.finish(fbBuilder)).toList()); |
3446 } | 3794 } |
3447 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { | 3795 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { |
3448 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b
.finish(fbBuilder)).toList()); | 3796 offset_linkedLibraries = fbBuilder |
| 3797 .writeList(_linkedLibraries.map((b) => b.finish(fbBuilder)).toList()); |
3449 } | 3798 } |
3450 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) { | 3799 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) { |
3451 offset_linkedLibraryUris = fbBuilder.writeList(_linkedLibraryUris.map((b)
=> fbBuilder.writeString(b)).toList()); | 3800 offset_linkedLibraryUris = fbBuilder.writeList( |
| 3801 _linkedLibraryUris.map((b) => fbBuilder.writeString(b)).toList()); |
3452 } | 3802 } |
3453 if (!(_unlinkedUnitHashes == null || _unlinkedUnitHashes.isEmpty)) { | 3803 if (!(_unlinkedUnitHashes == null || _unlinkedUnitHashes.isEmpty)) { |
3454 offset_unlinkedUnitHashes = fbBuilder.writeList(_unlinkedUnitHashes.map((b
) => fbBuilder.writeString(b)).toList()); | 3804 offset_unlinkedUnitHashes = fbBuilder.writeList( |
| 3805 _unlinkedUnitHashes.map((b) => fbBuilder.writeString(b)).toList()); |
3455 } | 3806 } |
3456 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) { | 3807 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) { |
3457 offset_unlinkedUnits = fbBuilder.writeList(_unlinkedUnits.map((b) => b.fin
ish(fbBuilder)).toList()); | 3808 offset_unlinkedUnits = fbBuilder |
| 3809 .writeList(_unlinkedUnits.map((b) => b.finish(fbBuilder)).toList()); |
3458 } | 3810 } |
3459 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) { | 3811 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) { |
3460 offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) =>
fbBuilder.writeString(b)).toList()); | 3812 offset_unlinkedUnitUris = fbBuilder.writeList( |
| 3813 _unlinkedUnitUris.map((b) => fbBuilder.writeString(b)).toList()); |
3461 } | 3814 } |
3462 fbBuilder.startTable(); | 3815 fbBuilder.startTable(); |
3463 if (offset_apiSignature != null) { | 3816 if (offset_apiSignature != null) { |
3464 fbBuilder.addOffset(7, offset_apiSignature); | 3817 fbBuilder.addOffset(7, offset_apiSignature); |
3465 } | 3818 } |
3466 if (offset_dependencies != null) { | 3819 if (offset_dependencies != null) { |
3467 fbBuilder.addOffset(8, offset_dependencies); | 3820 fbBuilder.addOffset(8, offset_dependencies); |
3468 } | 3821 } |
3469 if (offset_linkedLibraries != null) { | 3822 if (offset_linkedLibraries != null) { |
3470 fbBuilder.addOffset(0, offset_linkedLibraries); | 3823 fbBuilder.addOffset(0, offset_linkedLibraries); |
(...skipping 22 matching lines...) Expand all Loading... |
3493 | 3846 |
3494 idl.PackageBundle readPackageBundle(List<int> buffer) { | 3847 idl.PackageBundle readPackageBundle(List<int> buffer) { |
3495 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 3848 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
3496 return const _PackageBundleReader().read(rootRef, 0); | 3849 return const _PackageBundleReader().read(rootRef, 0); |
3497 } | 3850 } |
3498 | 3851 |
3499 class _PackageBundleReader extends fb.TableReader<_PackageBundleImpl> { | 3852 class _PackageBundleReader extends fb.TableReader<_PackageBundleImpl> { |
3500 const _PackageBundleReader(); | 3853 const _PackageBundleReader(); |
3501 | 3854 |
3502 @override | 3855 @override |
3503 _PackageBundleImpl createObject(fb.BufferContext bc, int offset) => new _Packa
geBundleImpl(bc, offset); | 3856 _PackageBundleImpl createObject(fb.BufferContext bc, int offset) => |
| 3857 new _PackageBundleImpl(bc, offset); |
3504 } | 3858 } |
3505 | 3859 |
3506 class _PackageBundleImpl extends Object with _PackageBundleMixin implements idl.
PackageBundle { | 3860 class _PackageBundleImpl extends Object |
| 3861 with _PackageBundleMixin |
| 3862 implements idl.PackageBundle { |
3507 final fb.BufferContext _bc; | 3863 final fb.BufferContext _bc; |
3508 final int _bcOffset; | 3864 final int _bcOffset; |
3509 | 3865 |
3510 _PackageBundleImpl(this._bc, this._bcOffset); | 3866 _PackageBundleImpl(this._bc, this._bcOffset); |
3511 | 3867 |
3512 String _apiSignature; | 3868 String _apiSignature; |
3513 List<idl.PackageDependencyInfo> _dependencies; | 3869 List<idl.PackageDependencyInfo> _dependencies; |
3514 List<idl.LinkedLibrary> _linkedLibraries; | 3870 List<idl.LinkedLibrary> _linkedLibraries; |
3515 List<String> _linkedLibraryUris; | 3871 List<String> _linkedLibraryUris; |
3516 int _majorVersion; | 3872 int _majorVersion; |
3517 int _minorVersion; | 3873 int _minorVersion; |
3518 List<String> _unlinkedUnitHashes; | 3874 List<String> _unlinkedUnitHashes; |
3519 List<idl.UnlinkedUnit> _unlinkedUnits; | 3875 List<idl.UnlinkedUnit> _unlinkedUnits; |
3520 List<String> _unlinkedUnitUris; | 3876 List<String> _unlinkedUnitUris; |
3521 | 3877 |
3522 @override | 3878 @override |
3523 String get apiSignature { | 3879 String get apiSignature { |
3524 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 7, ''); | 3880 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 7, ''); |
3525 return _apiSignature; | 3881 return _apiSignature; |
3526 } | 3882 } |
3527 | 3883 |
3528 @override | 3884 @override |
3529 List<idl.PackageDependencyInfo> get dependencies { | 3885 List<idl.PackageDependencyInfo> get dependencies { |
3530 _dependencies ??= const fb.ListReader<idl.PackageDependencyInfo>(const _Pack
ageDependencyInfoReader()).vTableGet(_bc, _bcOffset, 8, const <idl.PackageDepend
encyInfo>[]); | 3886 _dependencies ??= const fb.ListReader<idl.PackageDependencyInfo>( |
| 3887 const _PackageDependencyInfoReader()) |
| 3888 .vTableGet(_bc, _bcOffset, 8, const <idl.PackageDependencyInfo>[]); |
3531 return _dependencies; | 3889 return _dependencies; |
3532 } | 3890 } |
3533 | 3891 |
3534 @override | 3892 @override |
3535 List<idl.LinkedLibrary> get linkedLibraries { | 3893 List<idl.LinkedLibrary> get linkedLibraries { |
3536 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib
raryReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedLibrary>[]); | 3894 _linkedLibraries ??= |
| 3895 const fb.ListReader<idl.LinkedLibrary>(const _LinkedLibraryReader()) |
| 3896 .vTableGet(_bc, _bcOffset, 0, const <idl.LinkedLibrary>[]); |
3537 return _linkedLibraries; | 3897 return _linkedLibraries; |
3538 } | 3898 } |
3539 | 3899 |
3540 @override | 3900 @override |
3541 List<String> get linkedLibraryUris { | 3901 List<String> get linkedLibraryUris { |
3542 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()).
vTableGet(_bc, _bcOffset, 1, const <String>[]); | 3902 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()) |
| 3903 .vTableGet(_bc, _bcOffset, 1, const <String>[]); |
3543 return _linkedLibraryUris; | 3904 return _linkedLibraryUris; |
3544 } | 3905 } |
3545 | 3906 |
3546 @override | 3907 @override |
3547 int get majorVersion { | 3908 int get majorVersion { |
3548 _majorVersion ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5, 0); | 3909 _majorVersion ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5, 0); |
3549 return _majorVersion; | 3910 return _majorVersion; |
3550 } | 3911 } |
3551 | 3912 |
3552 @override | 3913 @override |
3553 int get minorVersion { | 3914 int get minorVersion { |
3554 _minorVersion ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0); | 3915 _minorVersion ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0); |
3555 return _minorVersion; | 3916 return _minorVersion; |
3556 } | 3917 } |
3557 | 3918 |
3558 @override | 3919 @override |
3559 List<String> get unlinkedUnitHashes { | 3920 List<String> get unlinkedUnitHashes { |
3560 _unlinkedUnitHashes ??= const fb.ListReader<String>(const fb.StringReader())
.vTableGet(_bc, _bcOffset, 4, const <String>[]); | 3921 _unlinkedUnitHashes ??= const fb.ListReader<String>(const fb.StringReader()) |
| 3922 .vTableGet(_bc, _bcOffset, 4, const <String>[]); |
3561 return _unlinkedUnitHashes; | 3923 return _unlinkedUnitHashes; |
3562 } | 3924 } |
3563 | 3925 |
3564 @override | 3926 @override |
3565 List<idl.UnlinkedUnit> get unlinkedUnits { | 3927 List<idl.UnlinkedUnit> get unlinkedUnits { |
3566 _unlinkedUnits ??= const fb.ListReader<idl.UnlinkedUnit>(const _UnlinkedUnit
Reader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedUnit>[]); | 3928 _unlinkedUnits ??= |
| 3929 const fb.ListReader<idl.UnlinkedUnit>(const _UnlinkedUnitReader()) |
| 3930 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedUnit>[]); |
3567 return _unlinkedUnits; | 3931 return _unlinkedUnits; |
3568 } | 3932 } |
3569 | 3933 |
3570 @override | 3934 @override |
3571 List<String> get unlinkedUnitUris { | 3935 List<String> get unlinkedUnitUris { |
3572 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v
TableGet(_bc, _bcOffset, 3, const <String>[]); | 3936 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()) |
| 3937 .vTableGet(_bc, _bcOffset, 3, const <String>[]); |
3573 return _unlinkedUnitUris; | 3938 return _unlinkedUnitUris; |
3574 } | 3939 } |
3575 } | 3940 } |
3576 | 3941 |
3577 abstract class _PackageBundleMixin implements idl.PackageBundle { | 3942 abstract class _PackageBundleMixin implements idl.PackageBundle { |
3578 @override | 3943 @override |
3579 Map<String, Object> toJson() { | 3944 Map<String, Object> toJson() { |
3580 Map<String, Object> _result = <String, Object>{}; | 3945 Map<String, Object> _result = <String, Object>{}; |
3581 if (apiSignature != '') _result["apiSignature"] = apiSignature; | 3946 if (apiSignature != '') _result["apiSignature"] = apiSignature; |
3582 if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_va
lue) => _value.toJson()).toList(); | 3947 if (dependencies.isNotEmpty) |
3583 if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries
.map((_value) => _value.toJson()).toList(); | 3948 _result["dependencies"] = |
3584 if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibra
ryUris; | 3949 dependencies.map((_value) => _value.toJson()).toList(); |
| 3950 if (linkedLibraries.isNotEmpty) |
| 3951 _result["linkedLibraries"] = |
| 3952 linkedLibraries.map((_value) => _value.toJson()).toList(); |
| 3953 if (linkedLibraryUris.isNotEmpty) |
| 3954 _result["linkedLibraryUris"] = linkedLibraryUris; |
3585 if (majorVersion != 0) _result["majorVersion"] = majorVersion; | 3955 if (majorVersion != 0) _result["majorVersion"] = majorVersion; |
3586 if (minorVersion != 0) _result["minorVersion"] = minorVersion; | 3956 if (minorVersion != 0) _result["minorVersion"] = minorVersion; |
3587 if (unlinkedUnitHashes.isNotEmpty) _result["unlinkedUnitHashes"] = unlinkedU
nitHashes; | 3957 if (unlinkedUnitHashes.isNotEmpty) |
3588 if (unlinkedUnits.isNotEmpty) _result["unlinkedUnits"] = unlinkedUnits.map((
_value) => _value.toJson()).toList(); | 3958 _result["unlinkedUnitHashes"] = unlinkedUnitHashes; |
3589 if (unlinkedUnitUris.isNotEmpty) _result["unlinkedUnitUris"] = unlinkedUnitU
ris; | 3959 if (unlinkedUnits.isNotEmpty) |
| 3960 _result["unlinkedUnits"] = |
| 3961 unlinkedUnits.map((_value) => _value.toJson()).toList(); |
| 3962 if (unlinkedUnitUris.isNotEmpty) |
| 3963 _result["unlinkedUnitUris"] = unlinkedUnitUris; |
3590 return _result; | 3964 return _result; |
3591 } | 3965 } |
3592 | 3966 |
3593 @override | 3967 @override |
3594 Map<String, Object> toMap() => { | 3968 Map<String, Object> toMap() => { |
3595 "apiSignature": apiSignature, | 3969 "apiSignature": apiSignature, |
3596 "dependencies": dependencies, | 3970 "dependencies": dependencies, |
3597 "linkedLibraries": linkedLibraries, | 3971 "linkedLibraries": linkedLibraries, |
3598 "linkedLibraryUris": linkedLibraryUris, | 3972 "linkedLibraryUris": linkedLibraryUris, |
3599 "majorVersion": majorVersion, | 3973 "majorVersion": majorVersion, |
3600 "minorVersion": minorVersion, | 3974 "minorVersion": minorVersion, |
3601 "unlinkedUnitHashes": unlinkedUnitHashes, | 3975 "unlinkedUnitHashes": unlinkedUnitHashes, |
3602 "unlinkedUnits": unlinkedUnits, | 3976 "unlinkedUnits": unlinkedUnits, |
3603 "unlinkedUnitUris": unlinkedUnitUris, | 3977 "unlinkedUnitUris": unlinkedUnitUris, |
3604 }; | 3978 }; |
3605 | 3979 |
3606 @override | 3980 @override |
3607 String toString() => convert.JSON.encode(toJson()); | 3981 String toString() => convert.JSON.encode(toJson()); |
3608 } | 3982 } |
3609 | 3983 |
3610 class PackageDependencyInfoBuilder extends Object with _PackageDependencyInfoMix
in implements idl.PackageDependencyInfo { | 3984 class PackageDependencyInfoBuilder extends Object |
| 3985 with _PackageDependencyInfoMixin |
| 3986 implements idl.PackageDependencyInfo { |
3611 String _apiSignature; | 3987 String _apiSignature; |
3612 List<String> _includedPackageNames; | 3988 List<String> _includedPackageNames; |
3613 bool _includesDartUris; | 3989 bool _includesDartUris; |
3614 bool _includesFileUris; | 3990 bool _includesFileUris; |
3615 String _summaryPath; | 3991 String _summaryPath; |
3616 | 3992 |
3617 @override | 3993 @override |
3618 String get apiSignature => _apiSignature ??= ''; | 3994 String get apiSignature => _apiSignature ??= ''; |
3619 | 3995 |
3620 /** | 3996 /** |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3667 * don't specify precisely what this path is relative to, but we expect it to | 4043 * don't specify precisely what this path is relative to, but we expect it to |
3668 * be relative to a directory the analysis server can find (e.g. for projects | 4044 * be relative to a directory the analysis server can find (e.g. for projects |
3669 * built using Bazel, it would be relative to the "bazel-bin" directory). | 4045 * built using Bazel, it would be relative to the "bazel-bin" directory). |
3670 * | 4046 * |
3671 * Absent if the path is not known. | 4047 * Absent if the path is not known. |
3672 */ | 4048 */ |
3673 void set summaryPath(String value) { | 4049 void set summaryPath(String value) { |
3674 this._summaryPath = value; | 4050 this._summaryPath = value; |
3675 } | 4051 } |
3676 | 4052 |
3677 PackageDependencyInfoBuilder({String apiSignature, List<String> includedPackag
eNames, bool includesDartUris, bool includesFileUris, String summaryPath}) | 4053 PackageDependencyInfoBuilder( |
3678 : _apiSignature = apiSignature, | 4054 {String apiSignature, |
3679 _includedPackageNames = includedPackageNames, | 4055 List<String> includedPackageNames, |
3680 _includesDartUris = includesDartUris, | 4056 bool includesDartUris, |
3681 _includesFileUris = includesFileUris, | 4057 bool includesFileUris, |
3682 _summaryPath = summaryPath; | 4058 String summaryPath}) |
| 4059 : _apiSignature = apiSignature, |
| 4060 _includedPackageNames = includedPackageNames, |
| 4061 _includesDartUris = includesDartUris, |
| 4062 _includesFileUris = includesFileUris, |
| 4063 _summaryPath = summaryPath; |
3683 | 4064 |
3684 /** | 4065 /** |
3685 * Flush [informative] data recursively. | 4066 * Flush [informative] data recursively. |
3686 */ | 4067 */ |
3687 void flushInformative() { | 4068 void flushInformative() {} |
3688 } | |
3689 | 4069 |
3690 /** | 4070 /** |
3691 * Accumulate non-[informative] data into [signature]. | 4071 * Accumulate non-[informative] data into [signature]. |
3692 */ | 4072 */ |
3693 void collectApiSignature(api_sig.ApiSignature signature) { | 4073 void collectApiSignature(api_sig.ApiSignature signature) { |
3694 signature.addString(this._apiSignature ?? ''); | 4074 signature.addString(this._apiSignature ?? ''); |
3695 signature.addString(this._summaryPath ?? ''); | 4075 signature.addString(this._summaryPath ?? ''); |
3696 if (this._includedPackageNames == null) { | 4076 if (this._includedPackageNames == null) { |
3697 signature.addInt(0); | 4077 signature.addInt(0); |
3698 } else { | 4078 } else { |
3699 signature.addInt(this._includedPackageNames.length); | 4079 signature.addInt(this._includedPackageNames.length); |
3700 for (var x in this._includedPackageNames) { | 4080 for (var x in this._includedPackageNames) { |
3701 signature.addString(x); | 4081 signature.addString(x); |
3702 } | 4082 } |
3703 } | 4083 } |
3704 signature.addBool(this._includesFileUris == true); | 4084 signature.addBool(this._includesFileUris == true); |
3705 signature.addBool(this._includesDartUris == true); | 4085 signature.addBool(this._includesDartUris == true); |
3706 } | 4086 } |
3707 | 4087 |
3708 fb.Offset finish(fb.Builder fbBuilder) { | 4088 fb.Offset finish(fb.Builder fbBuilder) { |
3709 fb.Offset offset_apiSignature; | 4089 fb.Offset offset_apiSignature; |
3710 fb.Offset offset_includedPackageNames; | 4090 fb.Offset offset_includedPackageNames; |
3711 fb.Offset offset_summaryPath; | 4091 fb.Offset offset_summaryPath; |
3712 if (_apiSignature != null) { | 4092 if (_apiSignature != null) { |
3713 offset_apiSignature = fbBuilder.writeString(_apiSignature); | 4093 offset_apiSignature = fbBuilder.writeString(_apiSignature); |
3714 } | 4094 } |
3715 if (!(_includedPackageNames == null || _includedPackageNames.isEmpty)) { | 4095 if (!(_includedPackageNames == null || _includedPackageNames.isEmpty)) { |
3716 offset_includedPackageNames = fbBuilder.writeList(_includedPackageNames.ma
p((b) => fbBuilder.writeString(b)).toList()); | 4096 offset_includedPackageNames = fbBuilder.writeList( |
| 4097 _includedPackageNames.map((b) => fbBuilder.writeString(b)).toList()); |
3717 } | 4098 } |
3718 if (_summaryPath != null) { | 4099 if (_summaryPath != null) { |
3719 offset_summaryPath = fbBuilder.writeString(_summaryPath); | 4100 offset_summaryPath = fbBuilder.writeString(_summaryPath); |
3720 } | 4101 } |
3721 fbBuilder.startTable(); | 4102 fbBuilder.startTable(); |
3722 if (offset_apiSignature != null) { | 4103 if (offset_apiSignature != null) { |
3723 fbBuilder.addOffset(0, offset_apiSignature); | 4104 fbBuilder.addOffset(0, offset_apiSignature); |
3724 } | 4105 } |
3725 if (offset_includedPackageNames != null) { | 4106 if (offset_includedPackageNames != null) { |
3726 fbBuilder.addOffset(2, offset_includedPackageNames); | 4107 fbBuilder.addOffset(2, offset_includedPackageNames); |
3727 } | 4108 } |
3728 if (_includesDartUris == true) { | 4109 if (_includesDartUris == true) { |
3729 fbBuilder.addBool(4, true); | 4110 fbBuilder.addBool(4, true); |
3730 } | 4111 } |
3731 if (_includesFileUris == true) { | 4112 if (_includesFileUris == true) { |
3732 fbBuilder.addBool(3, true); | 4113 fbBuilder.addBool(3, true); |
3733 } | 4114 } |
3734 if (offset_summaryPath != null) { | 4115 if (offset_summaryPath != null) { |
3735 fbBuilder.addOffset(1, offset_summaryPath); | 4116 fbBuilder.addOffset(1, offset_summaryPath); |
3736 } | 4117 } |
3737 return fbBuilder.endTable(); | 4118 return fbBuilder.endTable(); |
3738 } | 4119 } |
3739 } | 4120 } |
3740 | 4121 |
3741 class _PackageDependencyInfoReader extends fb.TableReader<_PackageDependencyInfo
Impl> { | 4122 class _PackageDependencyInfoReader |
| 4123 extends fb.TableReader<_PackageDependencyInfoImpl> { |
3742 const _PackageDependencyInfoReader(); | 4124 const _PackageDependencyInfoReader(); |
3743 | 4125 |
3744 @override | 4126 @override |
3745 _PackageDependencyInfoImpl createObject(fb.BufferContext bc, int offset) => ne
w _PackageDependencyInfoImpl(bc, offset); | 4127 _PackageDependencyInfoImpl createObject(fb.BufferContext bc, int offset) => |
| 4128 new _PackageDependencyInfoImpl(bc, offset); |
3746 } | 4129 } |
3747 | 4130 |
3748 class _PackageDependencyInfoImpl extends Object with _PackageDependencyInfoMixin
implements idl.PackageDependencyInfo { | 4131 class _PackageDependencyInfoImpl extends Object |
| 4132 with _PackageDependencyInfoMixin |
| 4133 implements idl.PackageDependencyInfo { |
3749 final fb.BufferContext _bc; | 4134 final fb.BufferContext _bc; |
3750 final int _bcOffset; | 4135 final int _bcOffset; |
3751 | 4136 |
3752 _PackageDependencyInfoImpl(this._bc, this._bcOffset); | 4137 _PackageDependencyInfoImpl(this._bc, this._bcOffset); |
3753 | 4138 |
3754 String _apiSignature; | 4139 String _apiSignature; |
3755 List<String> _includedPackageNames; | 4140 List<String> _includedPackageNames; |
3756 bool _includesDartUris; | 4141 bool _includesDartUris; |
3757 bool _includesFileUris; | 4142 bool _includesFileUris; |
3758 String _summaryPath; | 4143 String _summaryPath; |
3759 | 4144 |
3760 @override | 4145 @override |
3761 String get apiSignature { | 4146 String get apiSignature { |
3762 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 4147 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
3763 return _apiSignature; | 4148 return _apiSignature; |
3764 } | 4149 } |
3765 | 4150 |
3766 @override | 4151 @override |
3767 List<String> get includedPackageNames { | 4152 List<String> get includedPackageNames { |
3768 _includedPackageNames ??= const fb.ListReader<String>(const fb.StringReader(
)).vTableGet(_bc, _bcOffset, 2, const <String>[]); | 4153 _includedPackageNames ??= |
| 4154 const fb.ListReader<String>(const fb.StringReader()) |
| 4155 .vTableGet(_bc, _bcOffset, 2, const <String>[]); |
3769 return _includedPackageNames; | 4156 return _includedPackageNames; |
3770 } | 4157 } |
3771 | 4158 |
3772 @override | 4159 @override |
3773 bool get includesDartUris { | 4160 bool get includesDartUris { |
3774 _includesDartUris ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, fal
se); | 4161 _includesDartUris ??= |
| 4162 const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false); |
3775 return _includesDartUris; | 4163 return _includesDartUris; |
3776 } | 4164 } |
3777 | 4165 |
3778 @override | 4166 @override |
3779 bool get includesFileUris { | 4167 bool get includesFileUris { |
3780 _includesFileUris ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, fal
se); | 4168 _includesFileUris ??= |
| 4169 const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, false); |
3781 return _includesFileUris; | 4170 return _includesFileUris; |
3782 } | 4171 } |
3783 | 4172 |
3784 @override | 4173 @override |
3785 String get summaryPath { | 4174 String get summaryPath { |
3786 _summaryPath ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 4175 _summaryPath ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
3787 return _summaryPath; | 4176 return _summaryPath; |
3788 } | 4177 } |
3789 } | 4178 } |
3790 | 4179 |
3791 abstract class _PackageDependencyInfoMixin implements idl.PackageDependencyInfo
{ | 4180 abstract class _PackageDependencyInfoMixin |
| 4181 implements idl.PackageDependencyInfo { |
3792 @override | 4182 @override |
3793 Map<String, Object> toJson() { | 4183 Map<String, Object> toJson() { |
3794 Map<String, Object> _result = <String, Object>{}; | 4184 Map<String, Object> _result = <String, Object>{}; |
3795 if (apiSignature != '') _result["apiSignature"] = apiSignature; | 4185 if (apiSignature != '') _result["apiSignature"] = apiSignature; |
3796 if (includedPackageNames.isNotEmpty) _result["includedPackageNames"] = inclu
dedPackageNames; | 4186 if (includedPackageNames.isNotEmpty) |
3797 if (includesDartUris != false) _result["includesDartUris"] = includesDartUri
s; | 4187 _result["includedPackageNames"] = includedPackageNames; |
3798 if (includesFileUris != false) _result["includesFileUris"] = includesFileUri
s; | 4188 if (includesDartUris != false) |
| 4189 _result["includesDartUris"] = includesDartUris; |
| 4190 if (includesFileUris != false) |
| 4191 _result["includesFileUris"] = includesFileUris; |
3799 if (summaryPath != '') _result["summaryPath"] = summaryPath; | 4192 if (summaryPath != '') _result["summaryPath"] = summaryPath; |
3800 return _result; | 4193 return _result; |
3801 } | 4194 } |
3802 | 4195 |
3803 @override | 4196 @override |
3804 Map<String, Object> toMap() => { | 4197 Map<String, Object> toMap() => { |
3805 "apiSignature": apiSignature, | 4198 "apiSignature": apiSignature, |
3806 "includedPackageNames": includedPackageNames, | 4199 "includedPackageNames": includedPackageNames, |
3807 "includesDartUris": includesDartUris, | 4200 "includesDartUris": includesDartUris, |
3808 "includesFileUris": includesFileUris, | 4201 "includesFileUris": includesFileUris, |
3809 "summaryPath": summaryPath, | 4202 "summaryPath": summaryPath, |
3810 }; | 4203 }; |
3811 | 4204 |
3812 @override | 4205 @override |
3813 String toString() => convert.JSON.encode(toJson()); | 4206 String toString() => convert.JSON.encode(toJson()); |
3814 } | 4207 } |
3815 | 4208 |
3816 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl.
PackageIndex { | 4209 class PackageIndexBuilder extends Object |
| 4210 with _PackageIndexMixin |
| 4211 implements idl.PackageIndex { |
3817 List<idl.IndexSyntheticElementKind> _elementKinds; | 4212 List<idl.IndexSyntheticElementKind> _elementKinds; |
3818 List<int> _elementNameClassMemberIds; | 4213 List<int> _elementNameClassMemberIds; |
3819 List<int> _elementNameParameterIds; | 4214 List<int> _elementNameParameterIds; |
3820 List<int> _elementNameUnitMemberIds; | 4215 List<int> _elementNameUnitMemberIds; |
3821 List<int> _elementUnits; | 4216 List<int> _elementUnits; |
3822 List<String> _strings; | 4217 List<String> _strings; |
3823 List<int> _unitLibraryUris; | 4218 List<int> _unitLibraryUris; |
3824 List<UnitIndexBuilder> _units; | 4219 List<UnitIndexBuilder> _units; |
3825 List<int> _unitUnitUris; | 4220 List<int> _unitUnitUris; |
3826 | 4221 |
3827 @override | 4222 @override |
3828 List<idl.IndexSyntheticElementKind> get elementKinds => _elementKinds ??= <idl
.IndexSyntheticElementKind>[]; | 4223 List<idl.IndexSyntheticElementKind> get elementKinds => |
| 4224 _elementKinds ??= <idl.IndexSyntheticElementKind>[]; |
3829 | 4225 |
3830 /** | 4226 /** |
3831 * Each item of this list corresponds to a unique referenced element. It is | 4227 * Each item of this list corresponds to a unique referenced element. It is |
3832 * the kind of the synthetic element. | 4228 * the kind of the synthetic element. |
3833 */ | 4229 */ |
3834 void set elementKinds(List<idl.IndexSyntheticElementKind> value) { | 4230 void set elementKinds(List<idl.IndexSyntheticElementKind> value) { |
3835 this._elementKinds = value; | 4231 this._elementKinds = value; |
3836 } | 4232 } |
3837 | 4233 |
3838 @override | 4234 @override |
3839 List<int> get elementNameClassMemberIds => _elementNameClassMemberIds ??= <int
>[]; | 4235 List<int> get elementNameClassMemberIds => |
| 4236 _elementNameClassMemberIds ??= <int>[]; |
3840 | 4237 |
3841 /** | 4238 /** |
3842 * Each item of this list corresponds to a unique referenced element. It is | 4239 * Each item of this list corresponds to a unique referenced element. It is |
3843 * the identifier of the class member element name, or `null` if the element | 4240 * the identifier of the class member element name, or `null` if the element |
3844 * is a top-level element. The list is sorted in ascending order, so that the | 4241 * is a top-level element. The list is sorted in ascending order, so that the |
3845 * client can quickly check whether an element is referenced in this | 4242 * client can quickly check whether an element is referenced in this |
3846 * [PackageIndex]. | 4243 * [PackageIndex]. |
3847 */ | 4244 */ |
3848 void set elementNameClassMemberIds(List<int> value) { | 4245 void set elementNameClassMemberIds(List<int> value) { |
3849 assert(value == null || value.every((e) => e >= 0)); | 4246 assert(value == null || value.every((e) => e >= 0)); |
3850 this._elementNameClassMemberIds = value; | 4247 this._elementNameClassMemberIds = value; |
3851 } | 4248 } |
3852 | 4249 |
3853 @override | 4250 @override |
3854 List<int> get elementNameParameterIds => _elementNameParameterIds ??= <int>[]; | 4251 List<int> get elementNameParameterIds => _elementNameParameterIds ??= <int>[]; |
3855 | 4252 |
3856 /** | 4253 /** |
3857 * Each item of this list corresponds to a unique referenced element. It is | 4254 * Each item of this list corresponds to a unique referenced element. It is |
3858 * the identifier of the named parameter name, or `null` if the element is not | 4255 * the identifier of the named parameter name, or `null` if the element is not |
3859 * a named parameter. The list is sorted in ascending order, so that the | 4256 * a named parameter. The list is sorted in ascending order, so that the |
3860 * client can quickly check whether an element is referenced in this | 4257 * client can quickly check whether an element is referenced in this |
3861 * [PackageIndex]. | 4258 * [PackageIndex]. |
3862 */ | 4259 */ |
3863 void set elementNameParameterIds(List<int> value) { | 4260 void set elementNameParameterIds(List<int> value) { |
3864 assert(value == null || value.every((e) => e >= 0)); | 4261 assert(value == null || value.every((e) => e >= 0)); |
3865 this._elementNameParameterIds = value; | 4262 this._elementNameParameterIds = value; |
3866 } | 4263 } |
3867 | 4264 |
3868 @override | 4265 @override |
3869 List<int> get elementNameUnitMemberIds => _elementNameUnitMemberIds ??= <int>[
]; | 4266 List<int> get elementNameUnitMemberIds => |
| 4267 _elementNameUnitMemberIds ??= <int>[]; |
3870 | 4268 |
3871 /** | 4269 /** |
3872 * Each item of this list corresponds to a unique referenced element. It is | 4270 * Each item of this list corresponds to a unique referenced element. It is |
3873 * the identifier of the top-level element name, or `null` if the element is | 4271 * the identifier of the top-level element name, or `null` if the element is |
3874 * the unit. The list is sorted in ascending order, so that the client can | 4272 * the unit. The list is sorted in ascending order, so that the client can |
3875 * quickly check whether an element is referenced in this [PackageIndex]. | 4273 * quickly check whether an element is referenced in this [PackageIndex]. |
3876 */ | 4274 */ |
3877 void set elementNameUnitMemberIds(List<int> value) { | 4275 void set elementNameUnitMemberIds(List<int> value) { |
3878 assert(value == null || value.every((e) => e >= 0)); | 4276 assert(value == null || value.every((e) => e >= 0)); |
3879 this._elementNameUnitMemberIds = value; | 4277 this._elementNameUnitMemberIds = value; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3933 /** | 4331 /** |
3934 * Each item of this list corresponds to the unit URI of a unique library | 4332 * Each item of this list corresponds to the unit URI of a unique library |
3935 * specific unit referenced in the [PackageIndex]. It is an index into | 4333 * specific unit referenced in the [PackageIndex]. It is an index into |
3936 * [strings] list. | 4334 * [strings] list. |
3937 */ | 4335 */ |
3938 void set unitUnitUris(List<int> value) { | 4336 void set unitUnitUris(List<int> value) { |
3939 assert(value == null || value.every((e) => e >= 0)); | 4337 assert(value == null || value.every((e) => e >= 0)); |
3940 this._unitUnitUris = value; | 4338 this._unitUnitUris = value; |
3941 } | 4339 } |
3942 | 4340 |
3943 PackageIndexBuilder({List<idl.IndexSyntheticElementKind> elementKinds, List<in
t> elementNameClassMemberIds, List<int> elementNameParameterIds, List<int> eleme
ntNameUnitMemberIds, List<int> elementUnits, List<String> strings, List<int> uni
tLibraryUris, List<UnitIndexBuilder> units, List<int> unitUnitUris}) | 4341 PackageIndexBuilder( |
3944 : _elementKinds = elementKinds, | 4342 {List<idl.IndexSyntheticElementKind> elementKinds, |
3945 _elementNameClassMemberIds = elementNameClassMemberIds, | 4343 List<int> elementNameClassMemberIds, |
3946 _elementNameParameterIds = elementNameParameterIds, | 4344 List<int> elementNameParameterIds, |
3947 _elementNameUnitMemberIds = elementNameUnitMemberIds, | 4345 List<int> elementNameUnitMemberIds, |
3948 _elementUnits = elementUnits, | 4346 List<int> elementUnits, |
3949 _strings = strings, | 4347 List<String> strings, |
3950 _unitLibraryUris = unitLibraryUris, | 4348 List<int> unitLibraryUris, |
3951 _units = units, | 4349 List<UnitIndexBuilder> units, |
3952 _unitUnitUris = unitUnitUris; | 4350 List<int> unitUnitUris}) |
| 4351 : _elementKinds = elementKinds, |
| 4352 _elementNameClassMemberIds = elementNameClassMemberIds, |
| 4353 _elementNameParameterIds = elementNameParameterIds, |
| 4354 _elementNameUnitMemberIds = elementNameUnitMemberIds, |
| 4355 _elementUnits = elementUnits, |
| 4356 _strings = strings, |
| 4357 _unitLibraryUris = unitLibraryUris, |
| 4358 _units = units, |
| 4359 _unitUnitUris = unitUnitUris; |
3953 | 4360 |
3954 /** | 4361 /** |
3955 * Flush [informative] data recursively. | 4362 * Flush [informative] data recursively. |
3956 */ | 4363 */ |
3957 void flushInformative() { | 4364 void flushInformative() { |
3958 _units?.forEach((b) => b.flushInformative()); | 4365 _units?.forEach((b) => b.flushInformative()); |
3959 } | 4366 } |
3960 | 4367 |
3961 /** | 4368 /** |
3962 * Accumulate non-[informative] data into [signature]. | 4369 * Accumulate non-[informative] data into [signature]. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4045 fb.Offset offset_elementKinds; | 4452 fb.Offset offset_elementKinds; |
4046 fb.Offset offset_elementNameClassMemberIds; | 4453 fb.Offset offset_elementNameClassMemberIds; |
4047 fb.Offset offset_elementNameParameterIds; | 4454 fb.Offset offset_elementNameParameterIds; |
4048 fb.Offset offset_elementNameUnitMemberIds; | 4455 fb.Offset offset_elementNameUnitMemberIds; |
4049 fb.Offset offset_elementUnits; | 4456 fb.Offset offset_elementUnits; |
4050 fb.Offset offset_strings; | 4457 fb.Offset offset_strings; |
4051 fb.Offset offset_unitLibraryUris; | 4458 fb.Offset offset_unitLibraryUris; |
4052 fb.Offset offset_units; | 4459 fb.Offset offset_units; |
4053 fb.Offset offset_unitUnitUris; | 4460 fb.Offset offset_unitUnitUris; |
4054 if (!(_elementKinds == null || _elementKinds.isEmpty)) { | 4461 if (!(_elementKinds == null || _elementKinds.isEmpty)) { |
4055 offset_elementKinds = fbBuilder.writeListUint8(_elementKinds.map((b) => b.
index).toList()); | 4462 offset_elementKinds = |
| 4463 fbBuilder.writeListUint8(_elementKinds.map((b) => b.index).toList()); |
4056 } | 4464 } |
4057 if (!(_elementNameClassMemberIds == null || _elementNameClassMemberIds.isEmp
ty)) { | 4465 if (!(_elementNameClassMemberIds == null || |
4058 offset_elementNameClassMemberIds = fbBuilder.writeListUint32(_elementNameC
lassMemberIds); | 4466 _elementNameClassMemberIds.isEmpty)) { |
| 4467 offset_elementNameClassMemberIds = |
| 4468 fbBuilder.writeListUint32(_elementNameClassMemberIds); |
4059 } | 4469 } |
4060 if (!(_elementNameParameterIds == null || _elementNameParameterIds.isEmpty))
{ | 4470 if (!(_elementNameParameterIds == null || |
4061 offset_elementNameParameterIds = fbBuilder.writeListUint32(_elementNamePar
ameterIds); | 4471 _elementNameParameterIds.isEmpty)) { |
| 4472 offset_elementNameParameterIds = |
| 4473 fbBuilder.writeListUint32(_elementNameParameterIds); |
4062 } | 4474 } |
4063 if (!(_elementNameUnitMemberIds == null || _elementNameUnitMemberIds.isEmpty
)) { | 4475 if (!(_elementNameUnitMemberIds == null || |
4064 offset_elementNameUnitMemberIds = fbBuilder.writeListUint32(_elementNameUn
itMemberIds); | 4476 _elementNameUnitMemberIds.isEmpty)) { |
| 4477 offset_elementNameUnitMemberIds = |
| 4478 fbBuilder.writeListUint32(_elementNameUnitMemberIds); |
4065 } | 4479 } |
4066 if (!(_elementUnits == null || _elementUnits.isEmpty)) { | 4480 if (!(_elementUnits == null || _elementUnits.isEmpty)) { |
4067 offset_elementUnits = fbBuilder.writeListUint32(_elementUnits); | 4481 offset_elementUnits = fbBuilder.writeListUint32(_elementUnits); |
4068 } | 4482 } |
4069 if (!(_strings == null || _strings.isEmpty)) { | 4483 if (!(_strings == null || _strings.isEmpty)) { |
4070 offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeSt
ring(b)).toList()); | 4484 offset_strings = fbBuilder |
| 4485 .writeList(_strings.map((b) => fbBuilder.writeString(b)).toList()); |
4071 } | 4486 } |
4072 if (!(_unitLibraryUris == null || _unitLibraryUris.isEmpty)) { | 4487 if (!(_unitLibraryUris == null || _unitLibraryUris.isEmpty)) { |
4073 offset_unitLibraryUris = fbBuilder.writeListUint32(_unitLibraryUris); | 4488 offset_unitLibraryUris = fbBuilder.writeListUint32(_unitLibraryUris); |
4074 } | 4489 } |
4075 if (!(_units == null || _units.isEmpty)) { | 4490 if (!(_units == null || _units.isEmpty)) { |
4076 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).
toList()); | 4491 offset_units = |
| 4492 fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).toList()); |
4077 } | 4493 } |
4078 if (!(_unitUnitUris == null || _unitUnitUris.isEmpty)) { | 4494 if (!(_unitUnitUris == null || _unitUnitUris.isEmpty)) { |
4079 offset_unitUnitUris = fbBuilder.writeListUint32(_unitUnitUris); | 4495 offset_unitUnitUris = fbBuilder.writeListUint32(_unitUnitUris); |
4080 } | 4496 } |
4081 fbBuilder.startTable(); | 4497 fbBuilder.startTable(); |
4082 if (offset_elementKinds != null) { | 4498 if (offset_elementKinds != null) { |
4083 fbBuilder.addOffset(5, offset_elementKinds); | 4499 fbBuilder.addOffset(5, offset_elementKinds); |
4084 } | 4500 } |
4085 if (offset_elementNameClassMemberIds != null) { | 4501 if (offset_elementNameClassMemberIds != null) { |
4086 fbBuilder.addOffset(7, offset_elementNameClassMemberIds); | 4502 fbBuilder.addOffset(7, offset_elementNameClassMemberIds); |
(...skipping 25 matching lines...) Expand all Loading... |
4112 | 4528 |
4113 idl.PackageIndex readPackageIndex(List<int> buffer) { | 4529 idl.PackageIndex readPackageIndex(List<int> buffer) { |
4114 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 4530 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
4115 return const _PackageIndexReader().read(rootRef, 0); | 4531 return const _PackageIndexReader().read(rootRef, 0); |
4116 } | 4532 } |
4117 | 4533 |
4118 class _PackageIndexReader extends fb.TableReader<_PackageIndexImpl> { | 4534 class _PackageIndexReader extends fb.TableReader<_PackageIndexImpl> { |
4119 const _PackageIndexReader(); | 4535 const _PackageIndexReader(); |
4120 | 4536 |
4121 @override | 4537 @override |
4122 _PackageIndexImpl createObject(fb.BufferContext bc, int offset) => new _Packag
eIndexImpl(bc, offset); | 4538 _PackageIndexImpl createObject(fb.BufferContext bc, int offset) => |
| 4539 new _PackageIndexImpl(bc, offset); |
4123 } | 4540 } |
4124 | 4541 |
4125 class _PackageIndexImpl extends Object with _PackageIndexMixin implements idl.Pa
ckageIndex { | 4542 class _PackageIndexImpl extends Object |
| 4543 with _PackageIndexMixin |
| 4544 implements idl.PackageIndex { |
4126 final fb.BufferContext _bc; | 4545 final fb.BufferContext _bc; |
4127 final int _bcOffset; | 4546 final int _bcOffset; |
4128 | 4547 |
4129 _PackageIndexImpl(this._bc, this._bcOffset); | 4548 _PackageIndexImpl(this._bc, this._bcOffset); |
4130 | 4549 |
4131 List<idl.IndexSyntheticElementKind> _elementKinds; | 4550 List<idl.IndexSyntheticElementKind> _elementKinds; |
4132 List<int> _elementNameClassMemberIds; | 4551 List<int> _elementNameClassMemberIds; |
4133 List<int> _elementNameParameterIds; | 4552 List<int> _elementNameParameterIds; |
4134 List<int> _elementNameUnitMemberIds; | 4553 List<int> _elementNameUnitMemberIds; |
4135 List<int> _elementUnits; | 4554 List<int> _elementUnits; |
4136 List<String> _strings; | 4555 List<String> _strings; |
4137 List<int> _unitLibraryUris; | 4556 List<int> _unitLibraryUris; |
4138 List<idl.UnitIndex> _units; | 4557 List<idl.UnitIndex> _units; |
4139 List<int> _unitUnitUris; | 4558 List<int> _unitUnitUris; |
4140 | 4559 |
4141 @override | 4560 @override |
4142 List<idl.IndexSyntheticElementKind> get elementKinds { | 4561 List<idl.IndexSyntheticElementKind> get elementKinds { |
4143 _elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>(const _
IndexSyntheticElementKindReader()).vTableGet(_bc, _bcOffset, 5, const <idl.Index
SyntheticElementKind>[]); | 4562 _elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>( |
| 4563 const _IndexSyntheticElementKindReader()) |
| 4564 .vTableGet(_bc, _bcOffset, 5, const <idl.IndexSyntheticElementKind>[]); |
4144 return _elementKinds; | 4565 return _elementKinds; |
4145 } | 4566 } |
4146 | 4567 |
4147 @override | 4568 @override |
4148 List<int> get elementNameClassMemberIds { | 4569 List<int> get elementNameClassMemberIds { |
4149 _elementNameClassMemberIds ??= const fb.Uint32ListReader().vTableGet(_bc, _b
cOffset, 7, const <int>[]); | 4570 _elementNameClassMemberIds ??= |
| 4571 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 7, const <int>[]); |
4150 return _elementNameClassMemberIds; | 4572 return _elementNameClassMemberIds; |
4151 } | 4573 } |
4152 | 4574 |
4153 @override | 4575 @override |
4154 List<int> get elementNameParameterIds { | 4576 List<int> get elementNameParameterIds { |
4155 _elementNameParameterIds ??= const fb.Uint32ListReader().vTableGet(_bc, _bcO
ffset, 8, const <int>[]); | 4577 _elementNameParameterIds ??= |
| 4578 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 8, const <int>[]); |
4156 return _elementNameParameterIds; | 4579 return _elementNameParameterIds; |
4157 } | 4580 } |
4158 | 4581 |
4159 @override | 4582 @override |
4160 List<int> get elementNameUnitMemberIds { | 4583 List<int> get elementNameUnitMemberIds { |
4161 _elementNameUnitMemberIds ??= const fb.Uint32ListReader().vTableGet(_bc, _bc
Offset, 1, const <int>[]); | 4584 _elementNameUnitMemberIds ??= |
| 4585 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1, const <int>[]); |
4162 return _elementNameUnitMemberIds; | 4586 return _elementNameUnitMemberIds; |
4163 } | 4587 } |
4164 | 4588 |
4165 @override | 4589 @override |
4166 List<int> get elementUnits { | 4590 List<int> get elementUnits { |
4167 _elementUnits ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 0, c
onst <int>[]); | 4591 _elementUnits ??= |
| 4592 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 0, const <int>[]); |
4168 return _elementUnits; | 4593 return _elementUnits; |
4169 } | 4594 } |
4170 | 4595 |
4171 @override | 4596 @override |
4172 List<String> get strings { | 4597 List<String> get strings { |
4173 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bc, _bcOffset, 6, const <String>[]); | 4598 _strings ??= const fb.ListReader<String>(const fb.StringReader()) |
| 4599 .vTableGet(_bc, _bcOffset, 6, const <String>[]); |
4174 return _strings; | 4600 return _strings; |
4175 } | 4601 } |
4176 | 4602 |
4177 @override | 4603 @override |
4178 List<int> get unitLibraryUris { | 4604 List<int> get unitLibraryUris { |
4179 _unitLibraryUris ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2
, const <int>[]); | 4605 _unitLibraryUris ??= |
| 4606 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, const <int>[]); |
4180 return _unitLibraryUris; | 4607 return _unitLibraryUris; |
4181 } | 4608 } |
4182 | 4609 |
4183 @override | 4610 @override |
4184 List<idl.UnitIndex> get units { | 4611 List<idl.UnitIndex> get units { |
4185 _units ??= const fb.ListReader<idl.UnitIndex>(const _UnitIndexReader()).vTab
leGet(_bc, _bcOffset, 4, const <idl.UnitIndex>[]); | 4612 _units ??= const fb.ListReader<idl.UnitIndex>(const _UnitIndexReader()) |
| 4613 .vTableGet(_bc, _bcOffset, 4, const <idl.UnitIndex>[]); |
4186 return _units; | 4614 return _units; |
4187 } | 4615 } |
4188 | 4616 |
4189 @override | 4617 @override |
4190 List<int> get unitUnitUris { | 4618 List<int> get unitUnitUris { |
4191 _unitUnitUris ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, c
onst <int>[]); | 4619 _unitUnitUris ??= |
| 4620 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, const <int>[]); |
4192 return _unitUnitUris; | 4621 return _unitUnitUris; |
4193 } | 4622 } |
4194 } | 4623 } |
4195 | 4624 |
4196 abstract class _PackageIndexMixin implements idl.PackageIndex { | 4625 abstract class _PackageIndexMixin implements idl.PackageIndex { |
4197 @override | 4626 @override |
4198 Map<String, Object> toJson() { | 4627 Map<String, Object> toJson() { |
4199 Map<String, Object> _result = <String, Object>{}; | 4628 Map<String, Object> _result = <String, Object>{}; |
4200 if (elementKinds.isNotEmpty) _result["elementKinds"] = elementKinds.map((_va
lue) => _value.toString().split('.')[1]).toList(); | 4629 if (elementKinds.isNotEmpty) |
4201 if (elementNameClassMemberIds.isNotEmpty) _result["elementNameClassMemberIds
"] = elementNameClassMemberIds; | 4630 _result["elementKinds"] = elementKinds |
4202 if (elementNameParameterIds.isNotEmpty) _result["elementNameParameterIds"] =
elementNameParameterIds; | 4631 .map((_value) => _value.toString().split('.')[1]) |
4203 if (elementNameUnitMemberIds.isNotEmpty) _result["elementNameUnitMemberIds"]
= elementNameUnitMemberIds; | 4632 .toList(); |
| 4633 if (elementNameClassMemberIds.isNotEmpty) |
| 4634 _result["elementNameClassMemberIds"] = elementNameClassMemberIds; |
| 4635 if (elementNameParameterIds.isNotEmpty) |
| 4636 _result["elementNameParameterIds"] = elementNameParameterIds; |
| 4637 if (elementNameUnitMemberIds.isNotEmpty) |
| 4638 _result["elementNameUnitMemberIds"] = elementNameUnitMemberIds; |
4204 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits; | 4639 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits; |
4205 if (strings.isNotEmpty) _result["strings"] = strings; | 4640 if (strings.isNotEmpty) _result["strings"] = strings; |
4206 if (unitLibraryUris.isNotEmpty) _result["unitLibraryUris"] = unitLibraryUris
; | 4641 if (unitLibraryUris.isNotEmpty) |
4207 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson
()).toList(); | 4642 _result["unitLibraryUris"] = unitLibraryUris; |
| 4643 if (units.isNotEmpty) |
| 4644 _result["units"] = units.map((_value) => _value.toJson()).toList(); |
4208 if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris; | 4645 if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris; |
4209 return _result; | 4646 return _result; |
4210 } | 4647 } |
4211 | 4648 |
4212 @override | 4649 @override |
4213 Map<String, Object> toMap() => { | 4650 Map<String, Object> toMap() => { |
4214 "elementKinds": elementKinds, | 4651 "elementKinds": elementKinds, |
4215 "elementNameClassMemberIds": elementNameClassMemberIds, | 4652 "elementNameClassMemberIds": elementNameClassMemberIds, |
4216 "elementNameParameterIds": elementNameParameterIds, | 4653 "elementNameParameterIds": elementNameParameterIds, |
4217 "elementNameUnitMemberIds": elementNameUnitMemberIds, | 4654 "elementNameUnitMemberIds": elementNameUnitMemberIds, |
4218 "elementUnits": elementUnits, | 4655 "elementUnits": elementUnits, |
4219 "strings": strings, | 4656 "strings": strings, |
4220 "unitLibraryUris": unitLibraryUris, | 4657 "unitLibraryUris": unitLibraryUris, |
4221 "units": units, | 4658 "units": units, |
4222 "unitUnitUris": unitUnitUris, | 4659 "unitUnitUris": unitUnitUris, |
4223 }; | 4660 }; |
4224 | 4661 |
4225 @override | 4662 @override |
4226 String toString() => convert.JSON.encode(toJson()); | 4663 String toString() => convert.JSON.encode(toJson()); |
4227 } | 4664 } |
4228 | 4665 |
4229 class TopLevelInferenceErrorBuilder extends Object with _TopLevelInferenceErrorM
ixin implements idl.TopLevelInferenceError { | 4666 class TopLevelInferenceErrorBuilder extends Object |
| 4667 with _TopLevelInferenceErrorMixin |
| 4668 implements idl.TopLevelInferenceError { |
4230 String _message; | 4669 String _message; |
4231 | 4670 |
4232 @override | 4671 @override |
4233 String get message => _message ??= ''; | 4672 String get message => _message ??= ''; |
4234 | 4673 |
4235 /** | 4674 /** |
4236 * The message describing the error. | 4675 * The message describing the error. |
4237 */ | 4676 */ |
4238 void set message(String value) { | 4677 void set message(String value) { |
4239 this._message = value; | 4678 this._message = value; |
4240 } | 4679 } |
4241 | 4680 |
4242 TopLevelInferenceErrorBuilder({String message}) | 4681 TopLevelInferenceErrorBuilder({String message}) : _message = message; |
4243 : _message = message; | |
4244 | 4682 |
4245 /** | 4683 /** |
4246 * Flush [informative] data recursively. | 4684 * Flush [informative] data recursively. |
4247 */ | 4685 */ |
4248 void flushInformative() { | 4686 void flushInformative() {} |
4249 } | |
4250 | 4687 |
4251 /** | 4688 /** |
4252 * Accumulate non-[informative] data into [signature]. | 4689 * Accumulate non-[informative] data into [signature]. |
4253 */ | 4690 */ |
4254 void collectApiSignature(api_sig.ApiSignature signature) { | 4691 void collectApiSignature(api_sig.ApiSignature signature) { |
4255 signature.addString(this._message ?? ''); | 4692 signature.addString(this._message ?? ''); |
4256 } | 4693 } |
4257 | 4694 |
4258 fb.Offset finish(fb.Builder fbBuilder) { | 4695 fb.Offset finish(fb.Builder fbBuilder) { |
4259 fb.Offset offset_message; | 4696 fb.Offset offset_message; |
4260 if (_message != null) { | 4697 if (_message != null) { |
4261 offset_message = fbBuilder.writeString(_message); | 4698 offset_message = fbBuilder.writeString(_message); |
4262 } | 4699 } |
4263 fbBuilder.startTable(); | 4700 fbBuilder.startTable(); |
4264 if (offset_message != null) { | 4701 if (offset_message != null) { |
4265 fbBuilder.addOffset(0, offset_message); | 4702 fbBuilder.addOffset(0, offset_message); |
4266 } | 4703 } |
4267 return fbBuilder.endTable(); | 4704 return fbBuilder.endTable(); |
4268 } | 4705 } |
4269 } | 4706 } |
4270 | 4707 |
4271 class _TopLevelInferenceErrorReader extends fb.TableReader<_TopLevelInferenceErr
orImpl> { | 4708 class _TopLevelInferenceErrorReader |
| 4709 extends fb.TableReader<_TopLevelInferenceErrorImpl> { |
4272 const _TopLevelInferenceErrorReader(); | 4710 const _TopLevelInferenceErrorReader(); |
4273 | 4711 |
4274 @override | 4712 @override |
4275 _TopLevelInferenceErrorImpl createObject(fb.BufferContext bc, int offset) => n
ew _TopLevelInferenceErrorImpl(bc, offset); | 4713 _TopLevelInferenceErrorImpl createObject(fb.BufferContext bc, int offset) => |
| 4714 new _TopLevelInferenceErrorImpl(bc, offset); |
4276 } | 4715 } |
4277 | 4716 |
4278 class _TopLevelInferenceErrorImpl extends Object with _TopLevelInferenceErrorMix
in implements idl.TopLevelInferenceError { | 4717 class _TopLevelInferenceErrorImpl extends Object |
| 4718 with _TopLevelInferenceErrorMixin |
| 4719 implements idl.TopLevelInferenceError { |
4279 final fb.BufferContext _bc; | 4720 final fb.BufferContext _bc; |
4280 final int _bcOffset; | 4721 final int _bcOffset; |
4281 | 4722 |
4282 _TopLevelInferenceErrorImpl(this._bc, this._bcOffset); | 4723 _TopLevelInferenceErrorImpl(this._bc, this._bcOffset); |
4283 | 4724 |
4284 String _message; | 4725 String _message; |
4285 | 4726 |
4286 @override | 4727 @override |
4287 String get message { | 4728 String get message { |
4288 _message ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 4729 _message ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
4289 return _message; | 4730 return _message; |
4290 } | 4731 } |
4291 } | 4732 } |
4292 | 4733 |
4293 abstract class _TopLevelInferenceErrorMixin implements idl.TopLevelInferenceErro
r { | 4734 abstract class _TopLevelInferenceErrorMixin |
| 4735 implements idl.TopLevelInferenceError { |
4294 @override | 4736 @override |
4295 Map<String, Object> toJson() { | 4737 Map<String, Object> toJson() { |
4296 Map<String, Object> _result = <String, Object>{}; | 4738 Map<String, Object> _result = <String, Object>{}; |
4297 if (message != '') _result["message"] = message; | 4739 if (message != '') _result["message"] = message; |
4298 return _result; | 4740 return _result; |
4299 } | 4741 } |
4300 | 4742 |
4301 @override | 4743 @override |
4302 Map<String, Object> toMap() => { | 4744 Map<String, Object> toMap() => { |
4303 "message": message, | 4745 "message": message, |
4304 }; | 4746 }; |
4305 | 4747 |
4306 @override | 4748 @override |
4307 String toString() => convert.JSON.encode(toJson()); | 4749 String toString() => convert.JSON.encode(toJson()); |
4308 } | 4750 } |
4309 | 4751 |
4310 class UnitIndexBuilder extends Object with _UnitIndexMixin implements idl.UnitIn
dex { | 4752 class UnitIndexBuilder extends Object |
| 4753 with _UnitIndexMixin |
| 4754 implements idl.UnitIndex { |
4311 List<idl.IndexNameKind> _definedNameKinds; | 4755 List<idl.IndexNameKind> _definedNameKinds; |
4312 List<int> _definedNameOffsets; | 4756 List<int> _definedNameOffsets; |
4313 List<int> _definedNames; | 4757 List<int> _definedNames; |
4314 int _unit; | 4758 int _unit; |
4315 List<bool> _usedElementIsQualifiedFlags; | 4759 List<bool> _usedElementIsQualifiedFlags; |
4316 List<idl.IndexRelationKind> _usedElementKinds; | 4760 List<idl.IndexRelationKind> _usedElementKinds; |
4317 List<int> _usedElementLengths; | 4761 List<int> _usedElementLengths; |
4318 List<int> _usedElementOffsets; | 4762 List<int> _usedElementOffsets; |
4319 List<int> _usedElements; | 4763 List<int> _usedElements; |
4320 List<bool> _usedNameIsQualifiedFlags; | 4764 List<bool> _usedNameIsQualifiedFlags; |
4321 List<idl.IndexRelationKind> _usedNameKinds; | 4765 List<idl.IndexRelationKind> _usedNameKinds; |
4322 List<int> _usedNameOffsets; | 4766 List<int> _usedNameOffsets; |
4323 List<int> _usedNames; | 4767 List<int> _usedNames; |
4324 | 4768 |
4325 @override | 4769 @override |
4326 List<idl.IndexNameKind> get definedNameKinds => _definedNameKinds ??= <idl.Ind
exNameKind>[]; | 4770 List<idl.IndexNameKind> get definedNameKinds => |
| 4771 _definedNameKinds ??= <idl.IndexNameKind>[]; |
4327 | 4772 |
4328 /** | 4773 /** |
4329 * Each item of this list is the kind of an element defined in this unit. | 4774 * Each item of this list is the kind of an element defined in this unit. |
4330 */ | 4775 */ |
4331 void set definedNameKinds(List<idl.IndexNameKind> value) { | 4776 void set definedNameKinds(List<idl.IndexNameKind> value) { |
4332 this._definedNameKinds = value; | 4777 this._definedNameKinds = value; |
4333 } | 4778 } |
4334 | 4779 |
4335 @override | 4780 @override |
4336 List<int> get definedNameOffsets => _definedNameOffsets ??= <int>[]; | 4781 List<int> get definedNameOffsets => _definedNameOffsets ??= <int>[]; |
(...skipping 27 matching lines...) Expand all Loading... |
4364 /** | 4809 /** |
4365 * Index into [PackageIndex.unitLibraryUris] and [PackageIndex.unitUnitUris] | 4810 * Index into [PackageIndex.unitLibraryUris] and [PackageIndex.unitUnitUris] |
4366 * for the library specific unit that corresponds to this [UnitIndex]. | 4811 * for the library specific unit that corresponds to this [UnitIndex]. |
4367 */ | 4812 */ |
4368 void set unit(int value) { | 4813 void set unit(int value) { |
4369 assert(value == null || value >= 0); | 4814 assert(value == null || value >= 0); |
4370 this._unit = value; | 4815 this._unit = value; |
4371 } | 4816 } |
4372 | 4817 |
4373 @override | 4818 @override |
4374 List<bool> get usedElementIsQualifiedFlags => _usedElementIsQualifiedFlags ??=
<bool>[]; | 4819 List<bool> get usedElementIsQualifiedFlags => |
| 4820 _usedElementIsQualifiedFlags ??= <bool>[]; |
4375 | 4821 |
4376 /** | 4822 /** |
4377 * Each item of this list is the `true` if the corresponding element usage | 4823 * Each item of this list is the `true` if the corresponding element usage |
4378 * is qualified with some prefix. | 4824 * is qualified with some prefix. |
4379 */ | 4825 */ |
4380 void set usedElementIsQualifiedFlags(List<bool> value) { | 4826 void set usedElementIsQualifiedFlags(List<bool> value) { |
4381 this._usedElementIsQualifiedFlags = value; | 4827 this._usedElementIsQualifiedFlags = value; |
4382 } | 4828 } |
4383 | 4829 |
4384 @override | 4830 @override |
4385 List<idl.IndexRelationKind> get usedElementKinds => _usedElementKinds ??= <idl
.IndexRelationKind>[]; | 4831 List<idl.IndexRelationKind> get usedElementKinds => |
| 4832 _usedElementKinds ??= <idl.IndexRelationKind>[]; |
4386 | 4833 |
4387 /** | 4834 /** |
4388 * Each item of this list is the kind of the element usage. | 4835 * Each item of this list is the kind of the element usage. |
4389 */ | 4836 */ |
4390 void set usedElementKinds(List<idl.IndexRelationKind> value) { | 4837 void set usedElementKinds(List<idl.IndexRelationKind> value) { |
4391 this._usedElementKinds = value; | 4838 this._usedElementKinds = value; |
4392 } | 4839 } |
4393 | 4840 |
4394 @override | 4841 @override |
4395 List<int> get usedElementLengths => _usedElementLengths ??= <int>[]; | 4842 List<int> get usedElementLengths => _usedElementLengths ??= <int>[]; |
(...skipping 25 matching lines...) Expand all Loading... |
4421 * Each item of this list is the index into [PackageIndex.elementUnits] and | 4868 * Each item of this list is the index into [PackageIndex.elementUnits] and |
4422 * [PackageIndex.elementOffsets]. The list is sorted in ascending order, so | 4869 * [PackageIndex.elementOffsets]. The list is sorted in ascending order, so |
4423 * that the client can quickly find element references in this [UnitIndex]. | 4870 * that the client can quickly find element references in this [UnitIndex]. |
4424 */ | 4871 */ |
4425 void set usedElements(List<int> value) { | 4872 void set usedElements(List<int> value) { |
4426 assert(value == null || value.every((e) => e >= 0)); | 4873 assert(value == null || value.every((e) => e >= 0)); |
4427 this._usedElements = value; | 4874 this._usedElements = value; |
4428 } | 4875 } |
4429 | 4876 |
4430 @override | 4877 @override |
4431 List<bool> get usedNameIsQualifiedFlags => _usedNameIsQualifiedFlags ??= <bool
>[]; | 4878 List<bool> get usedNameIsQualifiedFlags => |
| 4879 _usedNameIsQualifiedFlags ??= <bool>[]; |
4432 | 4880 |
4433 /** | 4881 /** |
4434 * Each item of this list is the `true` if the corresponding name usage | 4882 * Each item of this list is the `true` if the corresponding name usage |
4435 * is qualified with some prefix. | 4883 * is qualified with some prefix. |
4436 */ | 4884 */ |
4437 void set usedNameIsQualifiedFlags(List<bool> value) { | 4885 void set usedNameIsQualifiedFlags(List<bool> value) { |
4438 this._usedNameIsQualifiedFlags = value; | 4886 this._usedNameIsQualifiedFlags = value; |
4439 } | 4887 } |
4440 | 4888 |
4441 @override | 4889 @override |
4442 List<idl.IndexRelationKind> get usedNameKinds => _usedNameKinds ??= <idl.Index
RelationKind>[]; | 4890 List<idl.IndexRelationKind> get usedNameKinds => |
| 4891 _usedNameKinds ??= <idl.IndexRelationKind>[]; |
4443 | 4892 |
4444 /** | 4893 /** |
4445 * Each item of this list is the kind of the name usage. | 4894 * Each item of this list is the kind of the name usage. |
4446 */ | 4895 */ |
4447 void set usedNameKinds(List<idl.IndexRelationKind> value) { | 4896 void set usedNameKinds(List<idl.IndexRelationKind> value) { |
4448 this._usedNameKinds = value; | 4897 this._usedNameKinds = value; |
4449 } | 4898 } |
4450 | 4899 |
4451 @override | 4900 @override |
4452 List<int> get usedNameOffsets => _usedNameOffsets ??= <int>[]; | 4901 List<int> get usedNameOffsets => _usedNameOffsets ??= <int>[]; |
(...skipping 13 matching lines...) Expand all Loading... |
4466 /** | 4915 /** |
4467 * Each item of this list is the index into [PackageIndex.strings] for a | 4916 * Each item of this list is the index into [PackageIndex.strings] for a |
4468 * used name. The list is sorted in ascending order, so that the client can | 4917 * used name. The list is sorted in ascending order, so that the client can |
4469 * quickly find name uses in this [UnitIndex]. | 4918 * quickly find name uses in this [UnitIndex]. |
4470 */ | 4919 */ |
4471 void set usedNames(List<int> value) { | 4920 void set usedNames(List<int> value) { |
4472 assert(value == null || value.every((e) => e >= 0)); | 4921 assert(value == null || value.every((e) => e >= 0)); |
4473 this._usedNames = value; | 4922 this._usedNames = value; |
4474 } | 4923 } |
4475 | 4924 |
4476 UnitIndexBuilder({List<idl.IndexNameKind> definedNameKinds, List<int> definedN
ameOffsets, List<int> definedNames, int unit, List<bool> usedElementIsQualifiedF
lags, List<idl.IndexRelationKind> usedElementKinds, List<int> usedElementLengths
, List<int> usedElementOffsets, List<int> usedElements, List<bool> usedNameIsQua
lifiedFlags, List<idl.IndexRelationKind> usedNameKinds, List<int> usedNameOffset
s, List<int> usedNames}) | 4925 UnitIndexBuilder( |
4477 : _definedNameKinds = definedNameKinds, | 4926 {List<idl.IndexNameKind> definedNameKinds, |
4478 _definedNameOffsets = definedNameOffsets, | 4927 List<int> definedNameOffsets, |
4479 _definedNames = definedNames, | 4928 List<int> definedNames, |
4480 _unit = unit, | 4929 int unit, |
4481 _usedElementIsQualifiedFlags = usedElementIsQualifiedFlags, | 4930 List<bool> usedElementIsQualifiedFlags, |
4482 _usedElementKinds = usedElementKinds, | 4931 List<idl.IndexRelationKind> usedElementKinds, |
4483 _usedElementLengths = usedElementLengths, | 4932 List<int> usedElementLengths, |
4484 _usedElementOffsets = usedElementOffsets, | 4933 List<int> usedElementOffsets, |
4485 _usedElements = usedElements, | 4934 List<int> usedElements, |
4486 _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags, | 4935 List<bool> usedNameIsQualifiedFlags, |
4487 _usedNameKinds = usedNameKinds, | 4936 List<idl.IndexRelationKind> usedNameKinds, |
4488 _usedNameOffsets = usedNameOffsets, | 4937 List<int> usedNameOffsets, |
4489 _usedNames = usedNames; | 4938 List<int> usedNames}) |
| 4939 : _definedNameKinds = definedNameKinds, |
| 4940 _definedNameOffsets = definedNameOffsets, |
| 4941 _definedNames = definedNames, |
| 4942 _unit = unit, |
| 4943 _usedElementIsQualifiedFlags = usedElementIsQualifiedFlags, |
| 4944 _usedElementKinds = usedElementKinds, |
| 4945 _usedElementLengths = usedElementLengths, |
| 4946 _usedElementOffsets = usedElementOffsets, |
| 4947 _usedElements = usedElements, |
| 4948 _usedNameIsQualifiedFlags = usedNameIsQualifiedFlags, |
| 4949 _usedNameKinds = usedNameKinds, |
| 4950 _usedNameOffsets = usedNameOffsets, |
| 4951 _usedNames = usedNames; |
4490 | 4952 |
4491 /** | 4953 /** |
4492 * Flush [informative] data recursively. | 4954 * Flush [informative] data recursively. |
4493 */ | 4955 */ |
4494 void flushInformative() { | 4956 void flushInformative() {} |
4495 } | |
4496 | 4957 |
4497 /** | 4958 /** |
4498 * Accumulate non-[informative] data into [signature]. | 4959 * Accumulate non-[informative] data into [signature]. |
4499 */ | 4960 */ |
4500 void collectApiSignature(api_sig.ApiSignature signature) { | 4961 void collectApiSignature(api_sig.ApiSignature signature) { |
4501 signature.addInt(this._unit ?? 0); | 4962 signature.addInt(this._unit ?? 0); |
4502 if (this._usedElementLengths == null) { | 4963 if (this._usedElementLengths == null) { |
4503 signature.addInt(0); | 4964 signature.addInt(0); |
4504 } else { | 4965 } else { |
4505 signature.addInt(this._usedElementLengths.length); | 4966 signature.addInt(this._usedElementLengths.length); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4604 fb.Offset offset_usedElementIsQualifiedFlags; | 5065 fb.Offset offset_usedElementIsQualifiedFlags; |
4605 fb.Offset offset_usedElementKinds; | 5066 fb.Offset offset_usedElementKinds; |
4606 fb.Offset offset_usedElementLengths; | 5067 fb.Offset offset_usedElementLengths; |
4607 fb.Offset offset_usedElementOffsets; | 5068 fb.Offset offset_usedElementOffsets; |
4608 fb.Offset offset_usedElements; | 5069 fb.Offset offset_usedElements; |
4609 fb.Offset offset_usedNameIsQualifiedFlags; | 5070 fb.Offset offset_usedNameIsQualifiedFlags; |
4610 fb.Offset offset_usedNameKinds; | 5071 fb.Offset offset_usedNameKinds; |
4611 fb.Offset offset_usedNameOffsets; | 5072 fb.Offset offset_usedNameOffsets; |
4612 fb.Offset offset_usedNames; | 5073 fb.Offset offset_usedNames; |
4613 if (!(_definedNameKinds == null || _definedNameKinds.isEmpty)) { | 5074 if (!(_definedNameKinds == null || _definedNameKinds.isEmpty)) { |
4614 offset_definedNameKinds = fbBuilder.writeListUint8(_definedNameKinds.map((
b) => b.index).toList()); | 5075 offset_definedNameKinds = fbBuilder |
| 5076 .writeListUint8(_definedNameKinds.map((b) => b.index).toList()); |
4615 } | 5077 } |
4616 if (!(_definedNameOffsets == null || _definedNameOffsets.isEmpty)) { | 5078 if (!(_definedNameOffsets == null || _definedNameOffsets.isEmpty)) { |
4617 offset_definedNameOffsets = fbBuilder.writeListUint32(_definedNameOffsets)
; | 5079 offset_definedNameOffsets = |
| 5080 fbBuilder.writeListUint32(_definedNameOffsets); |
4618 } | 5081 } |
4619 if (!(_definedNames == null || _definedNames.isEmpty)) { | 5082 if (!(_definedNames == null || _definedNames.isEmpty)) { |
4620 offset_definedNames = fbBuilder.writeListUint32(_definedNames); | 5083 offset_definedNames = fbBuilder.writeListUint32(_definedNames); |
4621 } | 5084 } |
4622 if (!(_usedElementIsQualifiedFlags == null || _usedElementIsQualifiedFlags.i
sEmpty)) { | 5085 if (!(_usedElementIsQualifiedFlags == null || |
4623 offset_usedElementIsQualifiedFlags = fbBuilder.writeListBool(_usedElementI
sQualifiedFlags); | 5086 _usedElementIsQualifiedFlags.isEmpty)) { |
| 5087 offset_usedElementIsQualifiedFlags = |
| 5088 fbBuilder.writeListBool(_usedElementIsQualifiedFlags); |
4624 } | 5089 } |
4625 if (!(_usedElementKinds == null || _usedElementKinds.isEmpty)) { | 5090 if (!(_usedElementKinds == null || _usedElementKinds.isEmpty)) { |
4626 offset_usedElementKinds = fbBuilder.writeListUint8(_usedElementKinds.map((
b) => b.index).toList()); | 5091 offset_usedElementKinds = fbBuilder |
| 5092 .writeListUint8(_usedElementKinds.map((b) => b.index).toList()); |
4627 } | 5093 } |
4628 if (!(_usedElementLengths == null || _usedElementLengths.isEmpty)) { | 5094 if (!(_usedElementLengths == null || _usedElementLengths.isEmpty)) { |
4629 offset_usedElementLengths = fbBuilder.writeListUint32(_usedElementLengths)
; | 5095 offset_usedElementLengths = |
| 5096 fbBuilder.writeListUint32(_usedElementLengths); |
4630 } | 5097 } |
4631 if (!(_usedElementOffsets == null || _usedElementOffsets.isEmpty)) { | 5098 if (!(_usedElementOffsets == null || _usedElementOffsets.isEmpty)) { |
4632 offset_usedElementOffsets = fbBuilder.writeListUint32(_usedElementOffsets)
; | 5099 offset_usedElementOffsets = |
| 5100 fbBuilder.writeListUint32(_usedElementOffsets); |
4633 } | 5101 } |
4634 if (!(_usedElements == null || _usedElements.isEmpty)) { | 5102 if (!(_usedElements == null || _usedElements.isEmpty)) { |
4635 offset_usedElements = fbBuilder.writeListUint32(_usedElements); | 5103 offset_usedElements = fbBuilder.writeListUint32(_usedElements); |
4636 } | 5104 } |
4637 if (!(_usedNameIsQualifiedFlags == null || _usedNameIsQualifiedFlags.isEmpty
)) { | 5105 if (!(_usedNameIsQualifiedFlags == null || |
4638 offset_usedNameIsQualifiedFlags = fbBuilder.writeListBool(_usedNameIsQuali
fiedFlags); | 5106 _usedNameIsQualifiedFlags.isEmpty)) { |
| 5107 offset_usedNameIsQualifiedFlags = |
| 5108 fbBuilder.writeListBool(_usedNameIsQualifiedFlags); |
4639 } | 5109 } |
4640 if (!(_usedNameKinds == null || _usedNameKinds.isEmpty)) { | 5110 if (!(_usedNameKinds == null || _usedNameKinds.isEmpty)) { |
4641 offset_usedNameKinds = fbBuilder.writeListUint8(_usedNameKinds.map((b) =>
b.index).toList()); | 5111 offset_usedNameKinds = |
| 5112 fbBuilder.writeListUint8(_usedNameKinds.map((b) => b.index).toList()); |
4642 } | 5113 } |
4643 if (!(_usedNameOffsets == null || _usedNameOffsets.isEmpty)) { | 5114 if (!(_usedNameOffsets == null || _usedNameOffsets.isEmpty)) { |
4644 offset_usedNameOffsets = fbBuilder.writeListUint32(_usedNameOffsets); | 5115 offset_usedNameOffsets = fbBuilder.writeListUint32(_usedNameOffsets); |
4645 } | 5116 } |
4646 if (!(_usedNames == null || _usedNames.isEmpty)) { | 5117 if (!(_usedNames == null || _usedNames.isEmpty)) { |
4647 offset_usedNames = fbBuilder.writeListUint32(_usedNames); | 5118 offset_usedNames = fbBuilder.writeListUint32(_usedNames); |
4648 } | 5119 } |
4649 fbBuilder.startTable(); | 5120 fbBuilder.startTable(); |
4650 if (offset_definedNameKinds != null) { | 5121 if (offset_definedNameKinds != null) { |
4651 fbBuilder.addOffset(6, offset_definedNameKinds); | 5122 fbBuilder.addOffset(6, offset_definedNameKinds); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4687 fbBuilder.addOffset(8, offset_usedNames); | 5158 fbBuilder.addOffset(8, offset_usedNames); |
4688 } | 5159 } |
4689 return fbBuilder.endTable(); | 5160 return fbBuilder.endTable(); |
4690 } | 5161 } |
4691 } | 5162 } |
4692 | 5163 |
4693 class _UnitIndexReader extends fb.TableReader<_UnitIndexImpl> { | 5164 class _UnitIndexReader extends fb.TableReader<_UnitIndexImpl> { |
4694 const _UnitIndexReader(); | 5165 const _UnitIndexReader(); |
4695 | 5166 |
4696 @override | 5167 @override |
4697 _UnitIndexImpl createObject(fb.BufferContext bc, int offset) => new _UnitIndex
Impl(bc, offset); | 5168 _UnitIndexImpl createObject(fb.BufferContext bc, int offset) => |
| 5169 new _UnitIndexImpl(bc, offset); |
4698 } | 5170 } |
4699 | 5171 |
4700 class _UnitIndexImpl extends Object with _UnitIndexMixin implements idl.UnitInde
x { | 5172 class _UnitIndexImpl extends Object |
| 5173 with _UnitIndexMixin |
| 5174 implements idl.UnitIndex { |
4701 final fb.BufferContext _bc; | 5175 final fb.BufferContext _bc; |
4702 final int _bcOffset; | 5176 final int _bcOffset; |
4703 | 5177 |
4704 _UnitIndexImpl(this._bc, this._bcOffset); | 5178 _UnitIndexImpl(this._bc, this._bcOffset); |
4705 | 5179 |
4706 List<idl.IndexNameKind> _definedNameKinds; | 5180 List<idl.IndexNameKind> _definedNameKinds; |
4707 List<int> _definedNameOffsets; | 5181 List<int> _definedNameOffsets; |
4708 List<int> _definedNames; | 5182 List<int> _definedNames; |
4709 int _unit; | 5183 int _unit; |
4710 List<bool> _usedElementIsQualifiedFlags; | 5184 List<bool> _usedElementIsQualifiedFlags; |
4711 List<idl.IndexRelationKind> _usedElementKinds; | 5185 List<idl.IndexRelationKind> _usedElementKinds; |
4712 List<int> _usedElementLengths; | 5186 List<int> _usedElementLengths; |
4713 List<int> _usedElementOffsets; | 5187 List<int> _usedElementOffsets; |
4714 List<int> _usedElements; | 5188 List<int> _usedElements; |
4715 List<bool> _usedNameIsQualifiedFlags; | 5189 List<bool> _usedNameIsQualifiedFlags; |
4716 List<idl.IndexRelationKind> _usedNameKinds; | 5190 List<idl.IndexRelationKind> _usedNameKinds; |
4717 List<int> _usedNameOffsets; | 5191 List<int> _usedNameOffsets; |
4718 List<int> _usedNames; | 5192 List<int> _usedNames; |
4719 | 5193 |
4720 @override | 5194 @override |
4721 List<idl.IndexNameKind> get definedNameKinds { | 5195 List<idl.IndexNameKind> get definedNameKinds { |
4722 _definedNameKinds ??= const fb.ListReader<idl.IndexNameKind>(const _IndexNam
eKindReader()).vTableGet(_bc, _bcOffset, 6, const <idl.IndexNameKind>[]); | 5196 _definedNameKinds ??= |
| 5197 const fb.ListReader<idl.IndexNameKind>(const _IndexNameKindReader()) |
| 5198 .vTableGet(_bc, _bcOffset, 6, const <idl.IndexNameKind>[]); |
4723 return _definedNameKinds; | 5199 return _definedNameKinds; |
4724 } | 5200 } |
4725 | 5201 |
4726 @override | 5202 @override |
4727 List<int> get definedNameOffsets { | 5203 List<int> get definedNameOffsets { |
4728 _definedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 7, const <int>[]); | 5204 _definedNameOffsets ??= |
| 5205 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 7, const <int>[]); |
4729 return _definedNameOffsets; | 5206 return _definedNameOffsets; |
4730 } | 5207 } |
4731 | 5208 |
4732 @override | 5209 @override |
4733 List<int> get definedNames { | 5210 List<int> get definedNames { |
4734 _definedNames ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, c
onst <int>[]); | 5211 _definedNames ??= |
| 5212 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, const <int>[]); |
4735 return _definedNames; | 5213 return _definedNames; |
4736 } | 5214 } |
4737 | 5215 |
4738 @override | 5216 @override |
4739 int get unit { | 5217 int get unit { |
4740 _unit ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 5218 _unit ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
4741 return _unit; | 5219 return _unit; |
4742 } | 5220 } |
4743 | 5221 |
4744 @override | 5222 @override |
4745 List<bool> get usedElementIsQualifiedFlags { | 5223 List<bool> get usedElementIsQualifiedFlags { |
4746 _usedElementIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bc, _b
cOffset, 11, const <bool>[]); | 5224 _usedElementIsQualifiedFlags ??= |
| 5225 const fb.BoolListReader().vTableGet(_bc, _bcOffset, 11, const <bool>[]); |
4747 return _usedElementIsQualifiedFlags; | 5226 return _usedElementIsQualifiedFlags; |
4748 } | 5227 } |
4749 | 5228 |
4750 @override | 5229 @override |
4751 List<idl.IndexRelationKind> get usedElementKinds { | 5230 List<idl.IndexRelationKind> get usedElementKinds { |
4752 _usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _Inde
xRelationKindReader()).vTableGet(_bc, _bcOffset, 4, const <idl.IndexRelationKind
>[]); | 5231 _usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>( |
| 5232 const _IndexRelationKindReader()) |
| 5233 .vTableGet(_bc, _bcOffset, 4, const <idl.IndexRelationKind>[]); |
4753 return _usedElementKinds; | 5234 return _usedElementKinds; |
4754 } | 5235 } |
4755 | 5236 |
4756 @override | 5237 @override |
4757 List<int> get usedElementLengths { | 5238 List<int> get usedElementLengths { |
4758 _usedElementLengths ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 1, const <int>[]); | 5239 _usedElementLengths ??= |
| 5240 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1, const <int>[]); |
4759 return _usedElementLengths; | 5241 return _usedElementLengths; |
4760 } | 5242 } |
4761 | 5243 |
4762 @override | 5244 @override |
4763 List<int> get usedElementOffsets { | 5245 List<int> get usedElementOffsets { |
4764 _usedElementOffsets ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset
, 2, const <int>[]); | 5246 _usedElementOffsets ??= |
| 5247 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, const <int>[]); |
4765 return _usedElementOffsets; | 5248 return _usedElementOffsets; |
4766 } | 5249 } |
4767 | 5250 |
4768 @override | 5251 @override |
4769 List<int> get usedElements { | 5252 List<int> get usedElements { |
4770 _usedElements ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, c
onst <int>[]); | 5253 _usedElements ??= |
| 5254 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, const <int>[]); |
4771 return _usedElements; | 5255 return _usedElements; |
4772 } | 5256 } |
4773 | 5257 |
4774 @override | 5258 @override |
4775 List<bool> get usedNameIsQualifiedFlags { | 5259 List<bool> get usedNameIsQualifiedFlags { |
4776 _usedNameIsQualifiedFlags ??= const fb.BoolListReader().vTableGet(_bc, _bcOf
fset, 12, const <bool>[]); | 5260 _usedNameIsQualifiedFlags ??= |
| 5261 const fb.BoolListReader().vTableGet(_bc, _bcOffset, 12, const <bool>[]); |
4777 return _usedNameIsQualifiedFlags; | 5262 return _usedNameIsQualifiedFlags; |
4778 } | 5263 } |
4779 | 5264 |
4780 @override | 5265 @override |
4781 List<idl.IndexRelationKind> get usedNameKinds { | 5266 List<idl.IndexRelationKind> get usedNameKinds { |
4782 _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>(const _IndexRe
lationKindReader()).vTableGet(_bc, _bcOffset, 10, const <idl.IndexRelationKind>[
]); | 5267 _usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>( |
| 5268 const _IndexRelationKindReader()) |
| 5269 .vTableGet(_bc, _bcOffset, 10, const <idl.IndexRelationKind>[]); |
4783 return _usedNameKinds; | 5270 return _usedNameKinds; |
4784 } | 5271 } |
4785 | 5272 |
4786 @override | 5273 @override |
4787 List<int> get usedNameOffsets { | 5274 List<int> get usedNameOffsets { |
4788 _usedNameOffsets ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 9
, const <int>[]); | 5275 _usedNameOffsets ??= |
| 5276 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 9, const <int>[]); |
4789 return _usedNameOffsets; | 5277 return _usedNameOffsets; |
4790 } | 5278 } |
4791 | 5279 |
4792 @override | 5280 @override |
4793 List<int> get usedNames { | 5281 List<int> get usedNames { |
4794 _usedNames ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 8, cons
t <int>[]); | 5282 _usedNames ??= |
| 5283 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 8, const <int>[]); |
4795 return _usedNames; | 5284 return _usedNames; |
4796 } | 5285 } |
4797 } | 5286 } |
4798 | 5287 |
4799 abstract class _UnitIndexMixin implements idl.UnitIndex { | 5288 abstract class _UnitIndexMixin implements idl.UnitIndex { |
4800 @override | 5289 @override |
4801 Map<String, Object> toJson() { | 5290 Map<String, Object> toJson() { |
4802 Map<String, Object> _result = <String, Object>{}; | 5291 Map<String, Object> _result = <String, Object>{}; |
4803 if (definedNameKinds.isNotEmpty) _result["definedNameKinds"] = definedNameKi
nds.map((_value) => _value.toString().split('.')[1]).toList(); | 5292 if (definedNameKinds.isNotEmpty) |
4804 if (definedNameOffsets.isNotEmpty) _result["definedNameOffsets"] = definedNa
meOffsets; | 5293 _result["definedNameKinds"] = definedNameKinds |
| 5294 .map((_value) => _value.toString().split('.')[1]) |
| 5295 .toList(); |
| 5296 if (definedNameOffsets.isNotEmpty) |
| 5297 _result["definedNameOffsets"] = definedNameOffsets; |
4805 if (definedNames.isNotEmpty) _result["definedNames"] = definedNames; | 5298 if (definedNames.isNotEmpty) _result["definedNames"] = definedNames; |
4806 if (unit != 0) _result["unit"] = unit; | 5299 if (unit != 0) _result["unit"] = unit; |
4807 if (usedElementIsQualifiedFlags.isNotEmpty) _result["usedElementIsQualifiedF
lags"] = usedElementIsQualifiedFlags; | 5300 if (usedElementIsQualifiedFlags.isNotEmpty) |
4808 if (usedElementKinds.isNotEmpty) _result["usedElementKinds"] = usedElementKi
nds.map((_value) => _value.toString().split('.')[1]).toList(); | 5301 _result["usedElementIsQualifiedFlags"] = usedElementIsQualifiedFlags; |
4809 if (usedElementLengths.isNotEmpty) _result["usedElementLengths"] = usedEleme
ntLengths; | 5302 if (usedElementKinds.isNotEmpty) |
4810 if (usedElementOffsets.isNotEmpty) _result["usedElementOffsets"] = usedEleme
ntOffsets; | 5303 _result["usedElementKinds"] = usedElementKinds |
| 5304 .map((_value) => _value.toString().split('.')[1]) |
| 5305 .toList(); |
| 5306 if (usedElementLengths.isNotEmpty) |
| 5307 _result["usedElementLengths"] = usedElementLengths; |
| 5308 if (usedElementOffsets.isNotEmpty) |
| 5309 _result["usedElementOffsets"] = usedElementOffsets; |
4811 if (usedElements.isNotEmpty) _result["usedElements"] = usedElements; | 5310 if (usedElements.isNotEmpty) _result["usedElements"] = usedElements; |
4812 if (usedNameIsQualifiedFlags.isNotEmpty) _result["usedNameIsQualifiedFlags"]
= usedNameIsQualifiedFlags; | 5311 if (usedNameIsQualifiedFlags.isNotEmpty) |
4813 if (usedNameKinds.isNotEmpty) _result["usedNameKinds"] = usedNameKinds.map((
_value) => _value.toString().split('.')[1]).toList(); | 5312 _result["usedNameIsQualifiedFlags"] = usedNameIsQualifiedFlags; |
4814 if (usedNameOffsets.isNotEmpty) _result["usedNameOffsets"] = usedNameOffsets
; | 5313 if (usedNameKinds.isNotEmpty) |
| 5314 _result["usedNameKinds"] = usedNameKinds |
| 5315 .map((_value) => _value.toString().split('.')[1]) |
| 5316 .toList(); |
| 5317 if (usedNameOffsets.isNotEmpty) |
| 5318 _result["usedNameOffsets"] = usedNameOffsets; |
4815 if (usedNames.isNotEmpty) _result["usedNames"] = usedNames; | 5319 if (usedNames.isNotEmpty) _result["usedNames"] = usedNames; |
4816 return _result; | 5320 return _result; |
4817 } | 5321 } |
4818 | 5322 |
4819 @override | 5323 @override |
4820 Map<String, Object> toMap() => { | 5324 Map<String, Object> toMap() => { |
4821 "definedNameKinds": definedNameKinds, | 5325 "definedNameKinds": definedNameKinds, |
4822 "definedNameOffsets": definedNameOffsets, | 5326 "definedNameOffsets": definedNameOffsets, |
4823 "definedNames": definedNames, | 5327 "definedNames": definedNames, |
4824 "unit": unit, | 5328 "unit": unit, |
4825 "usedElementIsQualifiedFlags": usedElementIsQualifiedFlags, | 5329 "usedElementIsQualifiedFlags": usedElementIsQualifiedFlags, |
4826 "usedElementKinds": usedElementKinds, | 5330 "usedElementKinds": usedElementKinds, |
4827 "usedElementLengths": usedElementLengths, | 5331 "usedElementLengths": usedElementLengths, |
4828 "usedElementOffsets": usedElementOffsets, | 5332 "usedElementOffsets": usedElementOffsets, |
4829 "usedElements": usedElements, | 5333 "usedElements": usedElements, |
4830 "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags, | 5334 "usedNameIsQualifiedFlags": usedNameIsQualifiedFlags, |
4831 "usedNameKinds": usedNameKinds, | 5335 "usedNameKinds": usedNameKinds, |
4832 "usedNameOffsets": usedNameOffsets, | 5336 "usedNameOffsets": usedNameOffsets, |
4833 "usedNames": usedNames, | 5337 "usedNames": usedNames, |
4834 }; | 5338 }; |
4835 | 5339 |
4836 @override | 5340 @override |
4837 String toString() => convert.JSON.encode(toJson()); | 5341 String toString() => convert.JSON.encode(toJson()); |
4838 } | 5342 } |
4839 | 5343 |
4840 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { | 5344 class UnlinkedClassBuilder extends Object |
| 5345 with _UnlinkedClassMixin |
| 5346 implements idl.UnlinkedClass { |
4841 List<UnlinkedExprBuilder> _annotations; | 5347 List<UnlinkedExprBuilder> _annotations; |
4842 CodeRangeBuilder _codeRange; | 5348 CodeRangeBuilder _codeRange; |
4843 UnlinkedDocumentationCommentBuilder _documentationComment; | 5349 UnlinkedDocumentationCommentBuilder _documentationComment; |
4844 List<UnlinkedExecutableBuilder> _executables; | 5350 List<UnlinkedExecutableBuilder> _executables; |
4845 List<UnlinkedVariableBuilder> _fields; | 5351 List<UnlinkedVariableBuilder> _fields; |
4846 bool _hasNoSupertype; | 5352 bool _hasNoSupertype; |
4847 List<EntityRefBuilder> _interfaces; | 5353 List<EntityRefBuilder> _interfaces; |
4848 bool _isAbstract; | 5354 bool _isAbstract; |
4849 bool _isMixinApplication; | 5355 bool _isMixinApplication; |
4850 List<EntityRefBuilder> _mixins; | 5356 List<EntityRefBuilder> _mixins; |
4851 String _name; | 5357 String _name; |
4852 int _nameOffset; | 5358 int _nameOffset; |
4853 EntityRefBuilder _supertype; | 5359 EntityRefBuilder _supertype; |
4854 List<UnlinkedTypeParamBuilder> _typeParameters; | 5360 List<UnlinkedTypeParamBuilder> _typeParameters; |
4855 | 5361 |
4856 @override | 5362 @override |
4857 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 5363 List<UnlinkedExprBuilder> get annotations => |
| 5364 _annotations ??= <UnlinkedExprBuilder>[]; |
4858 | 5365 |
4859 /** | 5366 /** |
4860 * Annotations for this class. | 5367 * Annotations for this class. |
4861 */ | 5368 */ |
4862 void set annotations(List<UnlinkedExprBuilder> value) { | 5369 void set annotations(List<UnlinkedExprBuilder> value) { |
4863 this._annotations = value; | 5370 this._annotations = value; |
4864 } | 5371 } |
4865 | 5372 |
4866 @override | 5373 @override |
4867 CodeRangeBuilder get codeRange => _codeRange; | 5374 CodeRangeBuilder get codeRange => _codeRange; |
4868 | 5375 |
4869 /** | 5376 /** |
4870 * Code range of the class. | 5377 * Code range of the class. |
4871 */ | 5378 */ |
4872 void set codeRange(CodeRangeBuilder value) { | 5379 void set codeRange(CodeRangeBuilder value) { |
4873 this._codeRange = value; | 5380 this._codeRange = value; |
4874 } | 5381 } |
4875 | 5382 |
4876 @override | 5383 @override |
4877 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 5384 UnlinkedDocumentationCommentBuilder get documentationComment => |
| 5385 _documentationComment; |
4878 | 5386 |
4879 /** | 5387 /** |
4880 * Documentation comment for the class, or `null` if there is no | 5388 * Documentation comment for the class, or `null` if there is no |
4881 * documentation comment. | 5389 * documentation comment. |
4882 */ | 5390 */ |
4883 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { | 5391 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { |
4884 this._documentationComment = value; | 5392 this._documentationComment = value; |
4885 } | 5393 } |
4886 | 5394 |
4887 @override | 5395 @override |
4888 List<UnlinkedExecutableBuilder> get executables => _executables ??= <UnlinkedE
xecutableBuilder>[]; | 5396 List<UnlinkedExecutableBuilder> get executables => |
| 5397 _executables ??= <UnlinkedExecutableBuilder>[]; |
4889 | 5398 |
4890 /** | 5399 /** |
4891 * Executable objects (methods, getters, and setters) contained in the class. | 5400 * Executable objects (methods, getters, and setters) contained in the class. |
4892 */ | 5401 */ |
4893 void set executables(List<UnlinkedExecutableBuilder> value) { | 5402 void set executables(List<UnlinkedExecutableBuilder> value) { |
4894 this._executables = value; | 5403 this._executables = value; |
4895 } | 5404 } |
4896 | 5405 |
4897 @override | 5406 @override |
4898 List<UnlinkedVariableBuilder> get fields => _fields ??= <UnlinkedVariableBuild
er>[]; | 5407 List<UnlinkedVariableBuilder> get fields => |
| 5408 _fields ??= <UnlinkedVariableBuilder>[]; |
4899 | 5409 |
4900 /** | 5410 /** |
4901 * Field declarations contained in the class. | 5411 * Field declarations contained in the class. |
4902 */ | 5412 */ |
4903 void set fields(List<UnlinkedVariableBuilder> value) { | 5413 void set fields(List<UnlinkedVariableBuilder> value) { |
4904 this._fields = value; | 5414 this._fields = value; |
4905 } | 5415 } |
4906 | 5416 |
4907 @override | 5417 @override |
4908 bool get hasNoSupertype => _hasNoSupertype ??= false; | 5418 bool get hasNoSupertype => _hasNoSupertype ??= false; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4982 /** | 5492 /** |
4983 * Supertype of the class, or `null` if either (a) the class doesn't | 5493 * Supertype of the class, or `null` if either (a) the class doesn't |
4984 * explicitly declare a supertype (and hence has supertype `Object`), or (b) | 5494 * explicitly declare a supertype (and hence has supertype `Object`), or (b) |
4985 * the class *is* `Object` (and hence has no supertype). | 5495 * the class *is* `Object` (and hence has no supertype). |
4986 */ | 5496 */ |
4987 void set supertype(EntityRefBuilder value) { | 5497 void set supertype(EntityRefBuilder value) { |
4988 this._supertype = value; | 5498 this._supertype = value; |
4989 } | 5499 } |
4990 | 5500 |
4991 @override | 5501 @override |
4992 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 5502 List<UnlinkedTypeParamBuilder> get typeParameters => |
| 5503 _typeParameters ??= <UnlinkedTypeParamBuilder>[]; |
4993 | 5504 |
4994 /** | 5505 /** |
4995 * Type parameters of the class, if any. | 5506 * Type parameters of the class, if any. |
4996 */ | 5507 */ |
4997 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { | 5508 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { |
4998 this._typeParameters = value; | 5509 this._typeParameters = value; |
4999 } | 5510 } |
5000 | 5511 |
5001 UnlinkedClassBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder
codeRange, UnlinkedDocumentationCommentBuilder documentationComment, List<Unlink
edExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool has
NoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinApp
lication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRefB
uilder supertype, List<UnlinkedTypeParamBuilder> typeParameters}) | 5512 UnlinkedClassBuilder( |
5002 : _annotations = annotations, | 5513 {List<UnlinkedExprBuilder> annotations, |
5003 _codeRange = codeRange, | 5514 CodeRangeBuilder codeRange, |
5004 _documentationComment = documentationComment, | 5515 UnlinkedDocumentationCommentBuilder documentationComment, |
5005 _executables = executables, | 5516 List<UnlinkedExecutableBuilder> executables, |
5006 _fields = fields, | 5517 List<UnlinkedVariableBuilder> fields, |
5007 _hasNoSupertype = hasNoSupertype, | 5518 bool hasNoSupertype, |
5008 _interfaces = interfaces, | 5519 List<EntityRefBuilder> interfaces, |
5009 _isAbstract = isAbstract, | 5520 bool isAbstract, |
5010 _isMixinApplication = isMixinApplication, | 5521 bool isMixinApplication, |
5011 _mixins = mixins, | 5522 List<EntityRefBuilder> mixins, |
5012 _name = name, | 5523 String name, |
5013 _nameOffset = nameOffset, | 5524 int nameOffset, |
5014 _supertype = supertype, | 5525 EntityRefBuilder supertype, |
5015 _typeParameters = typeParameters; | 5526 List<UnlinkedTypeParamBuilder> typeParameters}) |
| 5527 : _annotations = annotations, |
| 5528 _codeRange = codeRange, |
| 5529 _documentationComment = documentationComment, |
| 5530 _executables = executables, |
| 5531 _fields = fields, |
| 5532 _hasNoSupertype = hasNoSupertype, |
| 5533 _interfaces = interfaces, |
| 5534 _isAbstract = isAbstract, |
| 5535 _isMixinApplication = isMixinApplication, |
| 5536 _mixins = mixins, |
| 5537 _name = name, |
| 5538 _nameOffset = nameOffset, |
| 5539 _supertype = supertype, |
| 5540 _typeParameters = typeParameters; |
5016 | 5541 |
5017 /** | 5542 /** |
5018 * Flush [informative] data recursively. | 5543 * Flush [informative] data recursively. |
5019 */ | 5544 */ |
5020 void flushInformative() { | 5545 void flushInformative() { |
5021 _annotations?.forEach((b) => b.flushInformative()); | 5546 _annotations?.forEach((b) => b.flushInformative()); |
5022 _codeRange = null; | 5547 _codeRange = null; |
5023 _documentationComment = null; | 5548 _documentationComment = null; |
5024 _executables?.forEach((b) => b.flushInformative()); | 5549 _executables?.forEach((b) => b.flushInformative()); |
5025 _fields?.forEach((b) => b.flushInformative()); | 5550 _fields?.forEach((b) => b.flushInformative()); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5095 fb.Offset offset_codeRange; | 5620 fb.Offset offset_codeRange; |
5096 fb.Offset offset_documentationComment; | 5621 fb.Offset offset_documentationComment; |
5097 fb.Offset offset_executables; | 5622 fb.Offset offset_executables; |
5098 fb.Offset offset_fields; | 5623 fb.Offset offset_fields; |
5099 fb.Offset offset_interfaces; | 5624 fb.Offset offset_interfaces; |
5100 fb.Offset offset_mixins; | 5625 fb.Offset offset_mixins; |
5101 fb.Offset offset_name; | 5626 fb.Offset offset_name; |
5102 fb.Offset offset_supertype; | 5627 fb.Offset offset_supertype; |
5103 fb.Offset offset_typeParameters; | 5628 fb.Offset offset_typeParameters; |
5104 if (!(_annotations == null || _annotations.isEmpty)) { | 5629 if (!(_annotations == null || _annotations.isEmpty)) { |
5105 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 5630 offset_annotations = fbBuilder |
| 5631 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
5106 } | 5632 } |
5107 if (_codeRange != null) { | 5633 if (_codeRange != null) { |
5108 offset_codeRange = _codeRange.finish(fbBuilder); | 5634 offset_codeRange = _codeRange.finish(fbBuilder); |
5109 } | 5635 } |
5110 if (_documentationComment != null) { | 5636 if (_documentationComment != null) { |
5111 offset_documentationComment = _documentationComment.finish(fbBuilder); | 5637 offset_documentationComment = _documentationComment.finish(fbBuilder); |
5112 } | 5638 } |
5113 if (!(_executables == null || _executables.isEmpty)) { | 5639 if (!(_executables == null || _executables.isEmpty)) { |
5114 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | 5640 offset_executables = fbBuilder |
| 5641 .writeList(_executables.map((b) => b.finish(fbBuilder)).toList()); |
5115 } | 5642 } |
5116 if (!(_fields == null || _fields.isEmpty)) { | 5643 if (!(_fields == null || _fields.isEmpty)) { |
5117 offset_fields = fbBuilder.writeList(_fields.map((b) => b.finish(fbBuilder)
).toList()); | 5644 offset_fields = |
| 5645 fbBuilder.writeList(_fields.map((b) => b.finish(fbBuilder)).toList()); |
5118 } | 5646 } |
5119 if (!(_interfaces == null || _interfaces.isEmpty)) { | 5647 if (!(_interfaces == null || _interfaces.isEmpty)) { |
5120 offset_interfaces = fbBuilder.writeList(_interfaces.map((b) => b.finish(fb
Builder)).toList()); | 5648 offset_interfaces = fbBuilder |
| 5649 .writeList(_interfaces.map((b) => b.finish(fbBuilder)).toList()); |
5121 } | 5650 } |
5122 if (!(_mixins == null || _mixins.isEmpty)) { | 5651 if (!(_mixins == null || _mixins.isEmpty)) { |
5123 offset_mixins = fbBuilder.writeList(_mixins.map((b) => b.finish(fbBuilder)
).toList()); | 5652 offset_mixins = |
| 5653 fbBuilder.writeList(_mixins.map((b) => b.finish(fbBuilder)).toList()); |
5124 } | 5654 } |
5125 if (_name != null) { | 5655 if (_name != null) { |
5126 offset_name = fbBuilder.writeString(_name); | 5656 offset_name = fbBuilder.writeString(_name); |
5127 } | 5657 } |
5128 if (_supertype != null) { | 5658 if (_supertype != null) { |
5129 offset_supertype = _supertype.finish(fbBuilder); | 5659 offset_supertype = _supertype.finish(fbBuilder); |
5130 } | 5660 } |
5131 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 5661 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
5132 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 5662 offset_typeParameters = fbBuilder |
| 5663 .writeList(_typeParameters.map((b) => b.finish(fbBuilder)).toList()); |
5133 } | 5664 } |
5134 fbBuilder.startTable(); | 5665 fbBuilder.startTable(); |
5135 if (offset_annotations != null) { | 5666 if (offset_annotations != null) { |
5136 fbBuilder.addOffset(5, offset_annotations); | 5667 fbBuilder.addOffset(5, offset_annotations); |
5137 } | 5668 } |
5138 if (offset_codeRange != null) { | 5669 if (offset_codeRange != null) { |
5139 fbBuilder.addOffset(13, offset_codeRange); | 5670 fbBuilder.addOffset(13, offset_codeRange); |
5140 } | 5671 } |
5141 if (offset_documentationComment != null) { | 5672 if (offset_documentationComment != null) { |
5142 fbBuilder.addOffset(6, offset_documentationComment); | 5673 fbBuilder.addOffset(6, offset_documentationComment); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5175 fbBuilder.addOffset(9, offset_typeParameters); | 5706 fbBuilder.addOffset(9, offset_typeParameters); |
5176 } | 5707 } |
5177 return fbBuilder.endTable(); | 5708 return fbBuilder.endTable(); |
5178 } | 5709 } |
5179 } | 5710 } |
5180 | 5711 |
5181 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> { | 5712 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> { |
5182 const _UnlinkedClassReader(); | 5713 const _UnlinkedClassReader(); |
5183 | 5714 |
5184 @override | 5715 @override |
5185 _UnlinkedClassImpl createObject(fb.BufferContext bc, int offset) => new _Unlin
kedClassImpl(bc, offset); | 5716 _UnlinkedClassImpl createObject(fb.BufferContext bc, int offset) => |
| 5717 new _UnlinkedClassImpl(bc, offset); |
5186 } | 5718 } |
5187 | 5719 |
5188 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { | 5720 class _UnlinkedClassImpl extends Object |
| 5721 with _UnlinkedClassMixin |
| 5722 implements idl.UnlinkedClass { |
5189 final fb.BufferContext _bc; | 5723 final fb.BufferContext _bc; |
5190 final int _bcOffset; | 5724 final int _bcOffset; |
5191 | 5725 |
5192 _UnlinkedClassImpl(this._bc, this._bcOffset); | 5726 _UnlinkedClassImpl(this._bc, this._bcOffset); |
5193 | 5727 |
5194 List<idl.UnlinkedExpr> _annotations; | 5728 List<idl.UnlinkedExpr> _annotations; |
5195 idl.CodeRange _codeRange; | 5729 idl.CodeRange _codeRange; |
5196 idl.UnlinkedDocumentationComment _documentationComment; | 5730 idl.UnlinkedDocumentationComment _documentationComment; |
5197 List<idl.UnlinkedExecutable> _executables; | 5731 List<idl.UnlinkedExecutable> _executables; |
5198 List<idl.UnlinkedVariable> _fields; | 5732 List<idl.UnlinkedVariable> _fields; |
5199 bool _hasNoSupertype; | 5733 bool _hasNoSupertype; |
5200 List<idl.EntityRef> _interfaces; | 5734 List<idl.EntityRef> _interfaces; |
5201 bool _isAbstract; | 5735 bool _isAbstract; |
5202 bool _isMixinApplication; | 5736 bool _isMixinApplication; |
5203 List<idl.EntityRef> _mixins; | 5737 List<idl.EntityRef> _mixins; |
5204 String _name; | 5738 String _name; |
5205 int _nameOffset; | 5739 int _nameOffset; |
5206 idl.EntityRef _supertype; | 5740 idl.EntityRef _supertype; |
5207 List<idl.UnlinkedTypeParam> _typeParameters; | 5741 List<idl.UnlinkedTypeParam> _typeParameters; |
5208 | 5742 |
5209 @override | 5743 @override |
5210 List<idl.UnlinkedExpr> get annotations { | 5744 List<idl.UnlinkedExpr> get annotations { |
5211 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 5, const <idl.UnlinkedExpr>[]); | 5745 _annotations ??= |
| 5746 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 5747 .vTableGet(_bc, _bcOffset, 5, const <idl.UnlinkedExpr>[]); |
5212 return _annotations; | 5748 return _annotations; |
5213 } | 5749 } |
5214 | 5750 |
5215 @override | 5751 @override |
5216 idl.CodeRange get codeRange { | 5752 idl.CodeRange get codeRange { |
5217 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 13, null); | 5753 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 13, null); |
5218 return _codeRange; | 5754 return _codeRange; |
5219 } | 5755 } |
5220 | 5756 |
5221 @override | 5757 @override |
5222 idl.UnlinkedDocumentationComment get documentationComment { | 5758 idl.UnlinkedDocumentationComment get documentationComment { |
5223 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bc, _bcOffset, 6, null); | 5759 _documentationComment ??= const _UnlinkedDocumentationCommentReader() |
| 5760 .vTableGet(_bc, _bcOffset, 6, null); |
5224 return _documentationComment; | 5761 return _documentationComment; |
5225 } | 5762 } |
5226 | 5763 |
5227 @override | 5764 @override |
5228 List<idl.UnlinkedExecutable> get executables { | 5765 List<idl.UnlinkedExecutable> get executables { |
5229 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedExecutable>[
]); | 5766 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>( |
| 5767 const _UnlinkedExecutableReader()) |
| 5768 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedExecutable>[]); |
5230 return _executables; | 5769 return _executables; |
5231 } | 5770 } |
5232 | 5771 |
5233 @override | 5772 @override |
5234 List<idl.UnlinkedVariable> get fields { | 5773 List<idl.UnlinkedVariable> get fields { |
5235 _fields ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVariabl
eReader()).vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedVariable>[]); | 5774 _fields ??= const fb.ListReader<idl.UnlinkedVariable>( |
| 5775 const _UnlinkedVariableReader()) |
| 5776 .vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedVariable>[]); |
5236 return _fields; | 5777 return _fields; |
5237 } | 5778 } |
5238 | 5779 |
5239 @override | 5780 @override |
5240 bool get hasNoSupertype { | 5781 bool get hasNoSupertype { |
5241 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 12, fals
e); | 5782 _hasNoSupertype ??= |
| 5783 const fb.BoolReader().vTableGet(_bc, _bcOffset, 12, false); |
5242 return _hasNoSupertype; | 5784 return _hasNoSupertype; |
5243 } | 5785 } |
5244 | 5786 |
5245 @override | 5787 @override |
5246 List<idl.EntityRef> get interfaces { | 5788 List<idl.EntityRef> get interfaces { |
5247 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bc, _bcOffset, 7, const <idl.EntityRef>[]); | 5789 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) |
| 5790 .vTableGet(_bc, _bcOffset, 7, const <idl.EntityRef>[]); |
5248 return _interfaces; | 5791 return _interfaces; |
5249 } | 5792 } |
5250 | 5793 |
5251 @override | 5794 @override |
5252 bool get isAbstract { | 5795 bool get isAbstract { |
5253 _isAbstract ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 8, false); | 5796 _isAbstract ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 8, false); |
5254 return _isAbstract; | 5797 return _isAbstract; |
5255 } | 5798 } |
5256 | 5799 |
5257 @override | 5800 @override |
5258 bool get isMixinApplication { | 5801 bool get isMixinApplication { |
5259 _isMixinApplication ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 11,
false); | 5802 _isMixinApplication ??= |
| 5803 const fb.BoolReader().vTableGet(_bc, _bcOffset, 11, false); |
5260 return _isMixinApplication; | 5804 return _isMixinApplication; |
5261 } | 5805 } |
5262 | 5806 |
5263 @override | 5807 @override |
5264 List<idl.EntityRef> get mixins { | 5808 List<idl.EntityRef> get mixins { |
5265 _mixins ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTa
bleGet(_bc, _bcOffset, 10, const <idl.EntityRef>[]); | 5809 _mixins ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) |
| 5810 .vTableGet(_bc, _bcOffset, 10, const <idl.EntityRef>[]); |
5266 return _mixins; | 5811 return _mixins; |
5267 } | 5812 } |
5268 | 5813 |
5269 @override | 5814 @override |
5270 String get name { | 5815 String get name { |
5271 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 5816 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
5272 return _name; | 5817 return _name; |
5273 } | 5818 } |
5274 | 5819 |
5275 @override | 5820 @override |
5276 int get nameOffset { | 5821 int get nameOffset { |
5277 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 5822 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
5278 return _nameOffset; | 5823 return _nameOffset; |
5279 } | 5824 } |
5280 | 5825 |
5281 @override | 5826 @override |
5282 idl.EntityRef get supertype { | 5827 idl.EntityRef get supertype { |
5283 _supertype ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); | 5828 _supertype ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); |
5284 return _supertype; | 5829 return _supertype; |
5285 } | 5830 } |
5286 | 5831 |
5287 @override | 5832 @override |
5288 List<idl.UnlinkedTypeParam> get typeParameters { | 5833 List<idl.UnlinkedTypeParam> get typeParameters { |
5289 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bc, _bcOffset, 9, const <idl.UnlinkedTypeParam>[
]); | 5834 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>( |
| 5835 const _UnlinkedTypeParamReader()) |
| 5836 .vTableGet(_bc, _bcOffset, 9, const <idl.UnlinkedTypeParam>[]); |
5290 return _typeParameters; | 5837 return _typeParameters; |
5291 } | 5838 } |
5292 } | 5839 } |
5293 | 5840 |
5294 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { | 5841 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { |
5295 @override | 5842 @override |
5296 Map<String, Object> toJson() { | 5843 Map<String, Object> toJson() { |
5297 Map<String, Object> _result = <String, Object>{}; | 5844 Map<String, Object> _result = <String, Object>{}; |
5298 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 5845 if (annotations.isNotEmpty) |
| 5846 _result["annotations"] = |
| 5847 annotations.map((_value) => _value.toJson()).toList(); |
5299 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 5848 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
5300 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 5849 if (documentationComment != null) |
5301 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); | 5850 _result["documentationComment"] = documentationComment.toJson(); |
5302 if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJ
son()).toList(); | 5851 if (executables.isNotEmpty) |
| 5852 _result["executables"] = |
| 5853 executables.map((_value) => _value.toJson()).toList(); |
| 5854 if (fields.isNotEmpty) |
| 5855 _result["fields"] = fields.map((_value) => _value.toJson()).toList(); |
5303 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype; | 5856 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype; |
5304 if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) =
> _value.toJson()).toList(); | 5857 if (interfaces.isNotEmpty) |
| 5858 _result["interfaces"] = |
| 5859 interfaces.map((_value) => _value.toJson()).toList(); |
5305 if (isAbstract != false) _result["isAbstract"] = isAbstract; | 5860 if (isAbstract != false) _result["isAbstract"] = isAbstract; |
5306 if (isMixinApplication != false) _result["isMixinApplication"] = isMixinAppl
ication; | 5861 if (isMixinApplication != false) |
5307 if (mixins.isNotEmpty) _result["mixins"] = mixins.map((_value) => _value.toJ
son()).toList(); | 5862 _result["isMixinApplication"] = isMixinApplication; |
| 5863 if (mixins.isNotEmpty) |
| 5864 _result["mixins"] = mixins.map((_value) => _value.toJson()).toList(); |
5308 if (name != '') _result["name"] = name; | 5865 if (name != '') _result["name"] = name; |
5309 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 5866 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
5310 if (supertype != null) _result["supertype"] = supertype.toJson(); | 5867 if (supertype != null) _result["supertype"] = supertype.toJson(); |
5311 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 5868 if (typeParameters.isNotEmpty) |
| 5869 _result["typeParameters"] = |
| 5870 typeParameters.map((_value) => _value.toJson()).toList(); |
5312 return _result; | 5871 return _result; |
5313 } | 5872 } |
5314 | 5873 |
5315 @override | 5874 @override |
5316 Map<String, Object> toMap() => { | 5875 Map<String, Object> toMap() => { |
5317 "annotations": annotations, | 5876 "annotations": annotations, |
5318 "codeRange": codeRange, | 5877 "codeRange": codeRange, |
5319 "documentationComment": documentationComment, | 5878 "documentationComment": documentationComment, |
5320 "executables": executables, | 5879 "executables": executables, |
5321 "fields": fields, | 5880 "fields": fields, |
5322 "hasNoSupertype": hasNoSupertype, | 5881 "hasNoSupertype": hasNoSupertype, |
5323 "interfaces": interfaces, | 5882 "interfaces": interfaces, |
5324 "isAbstract": isAbstract, | 5883 "isAbstract": isAbstract, |
5325 "isMixinApplication": isMixinApplication, | 5884 "isMixinApplication": isMixinApplication, |
5326 "mixins": mixins, | 5885 "mixins": mixins, |
5327 "name": name, | 5886 "name": name, |
5328 "nameOffset": nameOffset, | 5887 "nameOffset": nameOffset, |
5329 "supertype": supertype, | 5888 "supertype": supertype, |
5330 "typeParameters": typeParameters, | 5889 "typeParameters": typeParameters, |
5331 }; | 5890 }; |
5332 | 5891 |
5333 @override | 5892 @override |
5334 String toString() => convert.JSON.encode(toJson()); | 5893 String toString() => convert.JSON.encode(toJson()); |
5335 } | 5894 } |
5336 | 5895 |
5337 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp
lements idl.UnlinkedCombinator { | 5896 class UnlinkedCombinatorBuilder extends Object |
| 5897 with _UnlinkedCombinatorMixin |
| 5898 implements idl.UnlinkedCombinator { |
5338 int _end; | 5899 int _end; |
5339 List<String> _hides; | 5900 List<String> _hides; |
5340 int _offset; | 5901 int _offset; |
5341 List<String> _shows; | 5902 List<String> _shows; |
5342 | 5903 |
5343 @override | 5904 @override |
5344 int get end => _end ??= 0; | 5905 int get end => _end ??= 0; |
5345 | 5906 |
5346 /** | 5907 /** |
5347 * If this is a `show` combinator, offset of the end of the list of shown | 5908 * If this is a `show` combinator, offset of the end of the list of shown |
(...skipping 29 matching lines...) Expand all Loading... |
5377 @override | 5938 @override |
5378 List<String> get shows => _shows ??= <String>[]; | 5939 List<String> get shows => _shows ??= <String>[]; |
5379 | 5940 |
5380 /** | 5941 /** |
5381 * List of names which are shown. Empty if this is a `hide` combinator. | 5942 * List of names which are shown. Empty if this is a `hide` combinator. |
5382 */ | 5943 */ |
5383 void set shows(List<String> value) { | 5944 void set shows(List<String> value) { |
5384 this._shows = value; | 5945 this._shows = value; |
5385 } | 5946 } |
5386 | 5947 |
5387 UnlinkedCombinatorBuilder({int end, List<String> hides, int offset, List<Strin
g> shows}) | 5948 UnlinkedCombinatorBuilder( |
5388 : _end = end, | 5949 {int end, List<String> hides, int offset, List<String> shows}) |
5389 _hides = hides, | 5950 : _end = end, |
5390 _offset = offset, | 5951 _hides = hides, |
5391 _shows = shows; | 5952 _offset = offset, |
| 5953 _shows = shows; |
5392 | 5954 |
5393 /** | 5955 /** |
5394 * Flush [informative] data recursively. | 5956 * Flush [informative] data recursively. |
5395 */ | 5957 */ |
5396 void flushInformative() { | 5958 void flushInformative() { |
5397 _end = null; | 5959 _end = null; |
5398 _offset = null; | 5960 _offset = null; |
5399 } | 5961 } |
5400 | 5962 |
5401 /** | 5963 /** |
(...skipping 15 matching lines...) Expand all Loading... |
5417 for (var x in this._hides) { | 5979 for (var x in this._hides) { |
5418 signature.addString(x); | 5980 signature.addString(x); |
5419 } | 5981 } |
5420 } | 5982 } |
5421 } | 5983 } |
5422 | 5984 |
5423 fb.Offset finish(fb.Builder fbBuilder) { | 5985 fb.Offset finish(fb.Builder fbBuilder) { |
5424 fb.Offset offset_hides; | 5986 fb.Offset offset_hides; |
5425 fb.Offset offset_shows; | 5987 fb.Offset offset_shows; |
5426 if (!(_hides == null || _hides.isEmpty)) { | 5988 if (!(_hides == null || _hides.isEmpty)) { |
5427 offset_hides = fbBuilder.writeList(_hides.map((b) => fbBuilder.writeString
(b)).toList()); | 5989 offset_hides = fbBuilder |
| 5990 .writeList(_hides.map((b) => fbBuilder.writeString(b)).toList()); |
5428 } | 5991 } |
5429 if (!(_shows == null || _shows.isEmpty)) { | 5992 if (!(_shows == null || _shows.isEmpty)) { |
5430 offset_shows = fbBuilder.writeList(_shows.map((b) => fbBuilder.writeString
(b)).toList()); | 5993 offset_shows = fbBuilder |
| 5994 .writeList(_shows.map((b) => fbBuilder.writeString(b)).toList()); |
5431 } | 5995 } |
5432 fbBuilder.startTable(); | 5996 fbBuilder.startTable(); |
5433 if (_end != null && _end != 0) { | 5997 if (_end != null && _end != 0) { |
5434 fbBuilder.addUint32(3, _end); | 5998 fbBuilder.addUint32(3, _end); |
5435 } | 5999 } |
5436 if (offset_hides != null) { | 6000 if (offset_hides != null) { |
5437 fbBuilder.addOffset(1, offset_hides); | 6001 fbBuilder.addOffset(1, offset_hides); |
5438 } | 6002 } |
5439 if (_offset != null && _offset != 0) { | 6003 if (_offset != null && _offset != 0) { |
5440 fbBuilder.addUint32(2, _offset); | 6004 fbBuilder.addUint32(2, _offset); |
5441 } | 6005 } |
5442 if (offset_shows != null) { | 6006 if (offset_shows != null) { |
5443 fbBuilder.addOffset(0, offset_shows); | 6007 fbBuilder.addOffset(0, offset_shows); |
5444 } | 6008 } |
5445 return fbBuilder.endTable(); | 6009 return fbBuilder.endTable(); |
5446 } | 6010 } |
5447 } | 6011 } |
5448 | 6012 |
5449 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl>
{ | 6013 class _UnlinkedCombinatorReader |
| 6014 extends fb.TableReader<_UnlinkedCombinatorImpl> { |
5450 const _UnlinkedCombinatorReader(); | 6015 const _UnlinkedCombinatorReader(); |
5451 | 6016 |
5452 @override | 6017 @override |
5453 _UnlinkedCombinatorImpl createObject(fb.BufferContext bc, int offset) => new _
UnlinkedCombinatorImpl(bc, offset); | 6018 _UnlinkedCombinatorImpl createObject(fb.BufferContext bc, int offset) => |
| 6019 new _UnlinkedCombinatorImpl(bc, offset); |
5454 } | 6020 } |
5455 | 6021 |
5456 class _UnlinkedCombinatorImpl extends Object with _UnlinkedCombinatorMixin imple
ments idl.UnlinkedCombinator { | 6022 class _UnlinkedCombinatorImpl extends Object |
| 6023 with _UnlinkedCombinatorMixin |
| 6024 implements idl.UnlinkedCombinator { |
5457 final fb.BufferContext _bc; | 6025 final fb.BufferContext _bc; |
5458 final int _bcOffset; | 6026 final int _bcOffset; |
5459 | 6027 |
5460 _UnlinkedCombinatorImpl(this._bc, this._bcOffset); | 6028 _UnlinkedCombinatorImpl(this._bc, this._bcOffset); |
5461 | 6029 |
5462 int _end; | 6030 int _end; |
5463 List<String> _hides; | 6031 List<String> _hides; |
5464 int _offset; | 6032 int _offset; |
5465 List<String> _shows; | 6033 List<String> _shows; |
5466 | 6034 |
5467 @override | 6035 @override |
5468 int get end { | 6036 int get end { |
5469 _end ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0); | 6037 _end ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0); |
5470 return _end; | 6038 return _end; |
5471 } | 6039 } |
5472 | 6040 |
5473 @override | 6041 @override |
5474 List<String> get hides { | 6042 List<String> get hides { |
5475 _hides ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
c, _bcOffset, 1, const <String>[]); | 6043 _hides ??= const fb.ListReader<String>(const fb.StringReader()) |
| 6044 .vTableGet(_bc, _bcOffset, 1, const <String>[]); |
5476 return _hides; | 6045 return _hides; |
5477 } | 6046 } |
5478 | 6047 |
5479 @override | 6048 @override |
5480 int get offset { | 6049 int get offset { |
5481 _offset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); | 6050 _offset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
5482 return _offset; | 6051 return _offset; |
5483 } | 6052 } |
5484 | 6053 |
5485 @override | 6054 @override |
5486 List<String> get shows { | 6055 List<String> get shows { |
5487 _shows ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
c, _bcOffset, 0, const <String>[]); | 6056 _shows ??= const fb.ListReader<String>(const fb.StringReader()) |
| 6057 .vTableGet(_bc, _bcOffset, 0, const <String>[]); |
5488 return _shows; | 6058 return _shows; |
5489 } | 6059 } |
5490 } | 6060 } |
5491 | 6061 |
5492 abstract class _UnlinkedCombinatorMixin implements idl.UnlinkedCombinator { | 6062 abstract class _UnlinkedCombinatorMixin implements idl.UnlinkedCombinator { |
5493 @override | 6063 @override |
5494 Map<String, Object> toJson() { | 6064 Map<String, Object> toJson() { |
5495 Map<String, Object> _result = <String, Object>{}; | 6065 Map<String, Object> _result = <String, Object>{}; |
5496 if (end != 0) _result["end"] = end; | 6066 if (end != 0) _result["end"] = end; |
5497 if (hides.isNotEmpty) _result["hides"] = hides; | 6067 if (hides.isNotEmpty) _result["hides"] = hides; |
5498 if (offset != 0) _result["offset"] = offset; | 6068 if (offset != 0) _result["offset"] = offset; |
5499 if (shows.isNotEmpty) _result["shows"] = shows; | 6069 if (shows.isNotEmpty) _result["shows"] = shows; |
5500 return _result; | 6070 return _result; |
5501 } | 6071 } |
5502 | 6072 |
5503 @override | 6073 @override |
5504 Map<String, Object> toMap() => { | 6074 Map<String, Object> toMap() => { |
5505 "end": end, | 6075 "end": end, |
5506 "hides": hides, | 6076 "hides": hides, |
5507 "offset": offset, | 6077 "offset": offset, |
5508 "shows": shows, | 6078 "shows": shows, |
5509 }; | 6079 }; |
5510 | 6080 |
5511 @override | 6081 @override |
5512 String toString() => convert.JSON.encode(toJson()); | 6082 String toString() => convert.JSON.encode(toJson()); |
5513 } | 6083 } |
5514 | 6084 |
5515 class UnlinkedConfigurationBuilder extends Object with _UnlinkedConfigurationMix
in implements idl.UnlinkedConfiguration { | 6085 class UnlinkedConfigurationBuilder extends Object |
| 6086 with _UnlinkedConfigurationMixin |
| 6087 implements idl.UnlinkedConfiguration { |
5516 String _name; | 6088 String _name; |
5517 String _uri; | 6089 String _uri; |
5518 String _value; | 6090 String _value; |
5519 | 6091 |
5520 @override | 6092 @override |
5521 String get name => _name ??= ''; | 6093 String get name => _name ??= ''; |
5522 | 6094 |
5523 /** | 6095 /** |
5524 * The name of the declared variable whose value is being used in the | 6096 * The name of the declared variable whose value is being used in the |
5525 * condition. | 6097 * condition. |
(...skipping 17 matching lines...) Expand all Loading... |
5543 | 6115 |
5544 /** | 6116 /** |
5545 * The value to which the value of the declared variable will be compared, | 6117 * The value to which the value of the declared variable will be compared, |
5546 * or `true` if the condition does not include an equality test. | 6118 * or `true` if the condition does not include an equality test. |
5547 */ | 6119 */ |
5548 void set value(String value) { | 6120 void set value(String value) { |
5549 this._value = value; | 6121 this._value = value; |
5550 } | 6122 } |
5551 | 6123 |
5552 UnlinkedConfigurationBuilder({String name, String uri, String value}) | 6124 UnlinkedConfigurationBuilder({String name, String uri, String value}) |
5553 : _name = name, | 6125 : _name = name, |
5554 _uri = uri, | 6126 _uri = uri, |
5555 _value = value; | 6127 _value = value; |
5556 | 6128 |
5557 /** | 6129 /** |
5558 * Flush [informative] data recursively. | 6130 * Flush [informative] data recursively. |
5559 */ | 6131 */ |
5560 void flushInformative() { | 6132 void flushInformative() {} |
5561 } | |
5562 | 6133 |
5563 /** | 6134 /** |
5564 * Accumulate non-[informative] data into [signature]. | 6135 * Accumulate non-[informative] data into [signature]. |
5565 */ | 6136 */ |
5566 void collectApiSignature(api_sig.ApiSignature signature) { | 6137 void collectApiSignature(api_sig.ApiSignature signature) { |
5567 signature.addString(this._name ?? ''); | 6138 signature.addString(this._name ?? ''); |
5568 signature.addString(this._value ?? ''); | 6139 signature.addString(this._value ?? ''); |
5569 signature.addString(this._uri ?? ''); | 6140 signature.addString(this._uri ?? ''); |
5570 } | 6141 } |
5571 | 6142 |
(...skipping 17 matching lines...) Expand all Loading... |
5589 if (offset_uri != null) { | 6160 if (offset_uri != null) { |
5590 fbBuilder.addOffset(2, offset_uri); | 6161 fbBuilder.addOffset(2, offset_uri); |
5591 } | 6162 } |
5592 if (offset_value != null) { | 6163 if (offset_value != null) { |
5593 fbBuilder.addOffset(1, offset_value); | 6164 fbBuilder.addOffset(1, offset_value); |
5594 } | 6165 } |
5595 return fbBuilder.endTable(); | 6166 return fbBuilder.endTable(); |
5596 } | 6167 } |
5597 } | 6168 } |
5598 | 6169 |
5599 class _UnlinkedConfigurationReader extends fb.TableReader<_UnlinkedConfiguration
Impl> { | 6170 class _UnlinkedConfigurationReader |
| 6171 extends fb.TableReader<_UnlinkedConfigurationImpl> { |
5600 const _UnlinkedConfigurationReader(); | 6172 const _UnlinkedConfigurationReader(); |
5601 | 6173 |
5602 @override | 6174 @override |
5603 _UnlinkedConfigurationImpl createObject(fb.BufferContext bc, int offset) => ne
w _UnlinkedConfigurationImpl(bc, offset); | 6175 _UnlinkedConfigurationImpl createObject(fb.BufferContext bc, int offset) => |
| 6176 new _UnlinkedConfigurationImpl(bc, offset); |
5604 } | 6177 } |
5605 | 6178 |
5606 class _UnlinkedConfigurationImpl extends Object with _UnlinkedConfigurationMixin
implements idl.UnlinkedConfiguration { | 6179 class _UnlinkedConfigurationImpl extends Object |
| 6180 with _UnlinkedConfigurationMixin |
| 6181 implements idl.UnlinkedConfiguration { |
5607 final fb.BufferContext _bc; | 6182 final fb.BufferContext _bc; |
5608 final int _bcOffset; | 6183 final int _bcOffset; |
5609 | 6184 |
5610 _UnlinkedConfigurationImpl(this._bc, this._bcOffset); | 6185 _UnlinkedConfigurationImpl(this._bc, this._bcOffset); |
5611 | 6186 |
5612 String _name; | 6187 String _name; |
5613 String _uri; | 6188 String _uri; |
5614 String _value; | 6189 String _value; |
5615 | 6190 |
5616 @override | 6191 @override |
5617 String get name { | 6192 String get name { |
5618 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 6193 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
5619 return _name; | 6194 return _name; |
5620 } | 6195 } |
5621 | 6196 |
5622 @override | 6197 @override |
5623 String get uri { | 6198 String get uri { |
5624 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, ''); | 6199 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, ''); |
5625 return _uri; | 6200 return _uri; |
5626 } | 6201 } |
5627 | 6202 |
5628 @override | 6203 @override |
5629 String get value { | 6204 String get value { |
5630 _value ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 6205 _value ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
5631 return _value; | 6206 return _value; |
5632 } | 6207 } |
5633 } | 6208 } |
5634 | 6209 |
5635 abstract class _UnlinkedConfigurationMixin implements idl.UnlinkedConfiguration
{ | 6210 abstract class _UnlinkedConfigurationMixin |
| 6211 implements idl.UnlinkedConfiguration { |
5636 @override | 6212 @override |
5637 Map<String, Object> toJson() { | 6213 Map<String, Object> toJson() { |
5638 Map<String, Object> _result = <String, Object>{}; | 6214 Map<String, Object> _result = <String, Object>{}; |
5639 if (name != '') _result["name"] = name; | 6215 if (name != '') _result["name"] = name; |
5640 if (uri != '') _result["uri"] = uri; | 6216 if (uri != '') _result["uri"] = uri; |
5641 if (value != '') _result["value"] = value; | 6217 if (value != '') _result["value"] = value; |
5642 return _result; | 6218 return _result; |
5643 } | 6219 } |
5644 | 6220 |
5645 @override | 6221 @override |
5646 Map<String, Object> toMap() => { | 6222 Map<String, Object> toMap() => { |
5647 "name": name, | 6223 "name": name, |
5648 "uri": uri, | 6224 "uri": uri, |
5649 "value": value, | 6225 "value": value, |
5650 }; | 6226 }; |
5651 | 6227 |
5652 @override | 6228 @override |
5653 String toString() => convert.JSON.encode(toJson()); | 6229 String toString() => convert.JSON.encode(toJson()); |
5654 } | 6230 } |
5655 | 6231 |
5656 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru
ctorInitializerMixin implements idl.UnlinkedConstructorInitializer { | 6232 class UnlinkedConstructorInitializerBuilder extends Object |
| 6233 with _UnlinkedConstructorInitializerMixin |
| 6234 implements idl.UnlinkedConstructorInitializer { |
5657 List<String> _argumentNames; | 6235 List<String> _argumentNames; |
5658 List<UnlinkedExprBuilder> _arguments; | 6236 List<UnlinkedExprBuilder> _arguments; |
5659 UnlinkedExprBuilder _expression; | 6237 UnlinkedExprBuilder _expression; |
5660 idl.UnlinkedConstructorInitializerKind _kind; | 6238 idl.UnlinkedConstructorInitializerKind _kind; |
5661 String _name; | 6239 String _name; |
5662 | 6240 |
5663 @override | 6241 @override |
5664 List<String> get argumentNames => _argumentNames ??= <String>[]; | 6242 List<String> get argumentNames => _argumentNames ??= <String>[]; |
5665 | 6243 |
5666 /** | 6244 /** |
5667 * If there are `m` [arguments] and `n` [argumentNames], then each argument | 6245 * If there are `m` [arguments] and `n` [argumentNames], then each argument |
5668 * from [arguments] with index `i` such that `n + i - m >= 0`, should be used | 6246 * from [arguments] with index `i` such that `n + i - m >= 0`, should be used |
5669 * with the name at `n + i - m`. | 6247 * with the name at `n + i - m`. |
5670 */ | 6248 */ |
5671 void set argumentNames(List<String> value) { | 6249 void set argumentNames(List<String> value) { |
5672 this._argumentNames = value; | 6250 this._argumentNames = value; |
5673 } | 6251 } |
5674 | 6252 |
5675 @override | 6253 @override |
5676 List<UnlinkedExprBuilder> get arguments => _arguments ??= <UnlinkedExprBuilder
>[]; | 6254 List<UnlinkedExprBuilder> get arguments => |
| 6255 _arguments ??= <UnlinkedExprBuilder>[]; |
5677 | 6256 |
5678 /** | 6257 /** |
5679 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the | 6258 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the |
5680 * invocation. Otherwise empty. | 6259 * invocation. Otherwise empty. |
5681 */ | 6260 */ |
5682 void set arguments(List<UnlinkedExprBuilder> value) { | 6261 void set arguments(List<UnlinkedExprBuilder> value) { |
5683 this._arguments = value; | 6262 this._arguments = value; |
5684 } | 6263 } |
5685 | 6264 |
5686 @override | 6265 @override |
5687 UnlinkedExprBuilder get expression => _expression; | 6266 UnlinkedExprBuilder get expression => _expression; |
5688 | 6267 |
5689 /** | 6268 /** |
5690 * If [kind] is `field`, the expression of the field initializer. | 6269 * If [kind] is `field`, the expression of the field initializer. |
5691 * Otherwise `null`. | 6270 * Otherwise `null`. |
5692 */ | 6271 */ |
5693 void set expression(UnlinkedExprBuilder value) { | 6272 void set expression(UnlinkedExprBuilder value) { |
5694 this._expression = value; | 6273 this._expression = value; |
5695 } | 6274 } |
5696 | 6275 |
5697 @override | 6276 @override |
5698 idl.UnlinkedConstructorInitializerKind get kind => _kind ??= idl.UnlinkedConst
ructorInitializerKind.field; | 6277 idl.UnlinkedConstructorInitializerKind get kind => |
| 6278 _kind ??= idl.UnlinkedConstructorInitializerKind.field; |
5699 | 6279 |
5700 /** | 6280 /** |
5701 * The kind of the constructor initializer (field, redirect, super). | 6281 * The kind of the constructor initializer (field, redirect, super). |
5702 */ | 6282 */ |
5703 void set kind(idl.UnlinkedConstructorInitializerKind value) { | 6283 void set kind(idl.UnlinkedConstructorInitializerKind value) { |
5704 this._kind = value; | 6284 this._kind = value; |
5705 } | 6285 } |
5706 | 6286 |
5707 @override | 6287 @override |
5708 String get name => _name ??= ''; | 6288 String get name => _name ??= ''; |
5709 | 6289 |
5710 /** | 6290 /** |
5711 * If [kind] is `field`, the name of the field declared in the class. If | 6291 * If [kind] is `field`, the name of the field declared in the class. If |
5712 * [kind] is `thisInvocation`, the name of the constructor, declared in this | 6292 * [kind] is `thisInvocation`, the name of the constructor, declared in this |
5713 * class, to redirect to. If [kind] is `superInvocation`, the name of the | 6293 * class, to redirect to. If [kind] is `superInvocation`, the name of the |
5714 * constructor, declared in the superclass, to invoke. | 6294 * constructor, declared in the superclass, to invoke. |
5715 */ | 6295 */ |
5716 void set name(String value) { | 6296 void set name(String value) { |
5717 this._name = value; | 6297 this._name = value; |
5718 } | 6298 } |
5719 | 6299 |
5720 UnlinkedConstructorInitializerBuilder({List<String> argumentNames, List<Unlink
edExprBuilder> arguments, UnlinkedExprBuilder expression, idl.UnlinkedConstructo
rInitializerKind kind, String name}) | 6300 UnlinkedConstructorInitializerBuilder( |
5721 : _argumentNames = argumentNames, | 6301 {List<String> argumentNames, |
5722 _arguments = arguments, | 6302 List<UnlinkedExprBuilder> arguments, |
5723 _expression = expression, | 6303 UnlinkedExprBuilder expression, |
5724 _kind = kind, | 6304 idl.UnlinkedConstructorInitializerKind kind, |
5725 _name = name; | 6305 String name}) |
| 6306 : _argumentNames = argumentNames, |
| 6307 _arguments = arguments, |
| 6308 _expression = expression, |
| 6309 _kind = kind, |
| 6310 _name = name; |
5726 | 6311 |
5727 /** | 6312 /** |
5728 * Flush [informative] data recursively. | 6313 * Flush [informative] data recursively. |
5729 */ | 6314 */ |
5730 void flushInformative() { | 6315 void flushInformative() { |
5731 _arguments?.forEach((b) => b.flushInformative()); | 6316 _arguments?.forEach((b) => b.flushInformative()); |
5732 _expression?.flushInformative(); | 6317 _expression?.flushInformative(); |
5733 } | 6318 } |
5734 | 6319 |
5735 /** | 6320 /** |
(...skipping 21 matching lines...) Expand all Loading... |
5757 } | 6342 } |
5758 } | 6343 } |
5759 } | 6344 } |
5760 | 6345 |
5761 fb.Offset finish(fb.Builder fbBuilder) { | 6346 fb.Offset finish(fb.Builder fbBuilder) { |
5762 fb.Offset offset_argumentNames; | 6347 fb.Offset offset_argumentNames; |
5763 fb.Offset offset_arguments; | 6348 fb.Offset offset_arguments; |
5764 fb.Offset offset_expression; | 6349 fb.Offset offset_expression; |
5765 fb.Offset offset_name; | 6350 fb.Offset offset_name; |
5766 if (!(_argumentNames == null || _argumentNames.isEmpty)) { | 6351 if (!(_argumentNames == null || _argumentNames.isEmpty)) { |
5767 offset_argumentNames = fbBuilder.writeList(_argumentNames.map((b) => fbBui
lder.writeString(b)).toList()); | 6352 offset_argumentNames = fbBuilder.writeList( |
| 6353 _argumentNames.map((b) => fbBuilder.writeString(b)).toList()); |
5768 } | 6354 } |
5769 if (!(_arguments == null || _arguments.isEmpty)) { | 6355 if (!(_arguments == null || _arguments.isEmpty)) { |
5770 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu
ilder)).toList()); | 6356 offset_arguments = fbBuilder |
| 6357 .writeList(_arguments.map((b) => b.finish(fbBuilder)).toList()); |
5771 } | 6358 } |
5772 if (_expression != null) { | 6359 if (_expression != null) { |
5773 offset_expression = _expression.finish(fbBuilder); | 6360 offset_expression = _expression.finish(fbBuilder); |
5774 } | 6361 } |
5775 if (_name != null) { | 6362 if (_name != null) { |
5776 offset_name = fbBuilder.writeString(_name); | 6363 offset_name = fbBuilder.writeString(_name); |
5777 } | 6364 } |
5778 fbBuilder.startTable(); | 6365 fbBuilder.startTable(); |
5779 if (offset_argumentNames != null) { | 6366 if (offset_argumentNames != null) { |
5780 fbBuilder.addOffset(4, offset_argumentNames); | 6367 fbBuilder.addOffset(4, offset_argumentNames); |
5781 } | 6368 } |
5782 if (offset_arguments != null) { | 6369 if (offset_arguments != null) { |
5783 fbBuilder.addOffset(3, offset_arguments); | 6370 fbBuilder.addOffset(3, offset_arguments); |
5784 } | 6371 } |
5785 if (offset_expression != null) { | 6372 if (offset_expression != null) { |
5786 fbBuilder.addOffset(1, offset_expression); | 6373 fbBuilder.addOffset(1, offset_expression); |
5787 } | 6374 } |
5788 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field)
{ | 6375 if (_kind != null && |
| 6376 _kind != idl.UnlinkedConstructorInitializerKind.field) { |
5789 fbBuilder.addUint8(2, _kind.index); | 6377 fbBuilder.addUint8(2, _kind.index); |
5790 } | 6378 } |
5791 if (offset_name != null) { | 6379 if (offset_name != null) { |
5792 fbBuilder.addOffset(0, offset_name); | 6380 fbBuilder.addOffset(0, offset_name); |
5793 } | 6381 } |
5794 return fbBuilder.endTable(); | 6382 return fbBuilder.endTable(); |
5795 } | 6383 } |
5796 } | 6384 } |
5797 | 6385 |
5798 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons
tructorInitializerImpl> { | 6386 class _UnlinkedConstructorInitializerReader |
| 6387 extends fb.TableReader<_UnlinkedConstructorInitializerImpl> { |
5799 const _UnlinkedConstructorInitializerReader(); | 6388 const _UnlinkedConstructorInitializerReader(); |
5800 | 6389 |
5801 @override | 6390 @override |
5802 _UnlinkedConstructorInitializerImpl createObject(fb.BufferContext bc, int offs
et) => new _UnlinkedConstructorInitializerImpl(bc, offset); | 6391 _UnlinkedConstructorInitializerImpl createObject( |
| 6392 fb.BufferContext bc, int offset) => |
| 6393 new _UnlinkedConstructorInitializerImpl(bc, offset); |
5803 } | 6394 } |
5804 | 6395 |
5805 class _UnlinkedConstructorInitializerImpl extends Object with _UnlinkedConstruct
orInitializerMixin implements idl.UnlinkedConstructorInitializer { | 6396 class _UnlinkedConstructorInitializerImpl extends Object |
| 6397 with _UnlinkedConstructorInitializerMixin |
| 6398 implements idl.UnlinkedConstructorInitializer { |
5806 final fb.BufferContext _bc; | 6399 final fb.BufferContext _bc; |
5807 final int _bcOffset; | 6400 final int _bcOffset; |
5808 | 6401 |
5809 _UnlinkedConstructorInitializerImpl(this._bc, this._bcOffset); | 6402 _UnlinkedConstructorInitializerImpl(this._bc, this._bcOffset); |
5810 | 6403 |
5811 List<String> _argumentNames; | 6404 List<String> _argumentNames; |
5812 List<idl.UnlinkedExpr> _arguments; | 6405 List<idl.UnlinkedExpr> _arguments; |
5813 idl.UnlinkedExpr _expression; | 6406 idl.UnlinkedExpr _expression; |
5814 idl.UnlinkedConstructorInitializerKind _kind; | 6407 idl.UnlinkedConstructorInitializerKind _kind; |
5815 String _name; | 6408 String _name; |
5816 | 6409 |
5817 @override | 6410 @override |
5818 List<String> get argumentNames { | 6411 List<String> get argumentNames { |
5819 _argumentNames ??= const fb.ListReader<String>(const fb.StringReader()).vTab
leGet(_bc, _bcOffset, 4, const <String>[]); | 6412 _argumentNames ??= const fb.ListReader<String>(const fb.StringReader()) |
| 6413 .vTableGet(_bc, _bcOffset, 4, const <String>[]); |
5820 return _argumentNames; | 6414 return _argumentNames; |
5821 } | 6415 } |
5822 | 6416 |
5823 @override | 6417 @override |
5824 List<idl.UnlinkedExpr> get arguments { | 6418 List<idl.UnlinkedExpr> get arguments { |
5825 _arguments ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRead
er()).vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedExpr>[]); | 6419 _arguments ??= |
| 6420 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 6421 .vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedExpr>[]); |
5826 return _arguments; | 6422 return _arguments; |
5827 } | 6423 } |
5828 | 6424 |
5829 @override | 6425 @override |
5830 idl.UnlinkedExpr get expression { | 6426 idl.UnlinkedExpr get expression { |
5831 _expression ??= const _UnlinkedExprReader().vTableGet(_bc, _bcOffset, 1, nul
l); | 6427 _expression ??= |
| 6428 const _UnlinkedExprReader().vTableGet(_bc, _bcOffset, 1, null); |
5832 return _expression; | 6429 return _expression; |
5833 } | 6430 } |
5834 | 6431 |
5835 @override | 6432 @override |
5836 idl.UnlinkedConstructorInitializerKind get kind { | 6433 idl.UnlinkedConstructorInitializerKind get kind { |
5837 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet(_bc, _
bcOffset, 2, idl.UnlinkedConstructorInitializerKind.field); | 6434 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet( |
| 6435 _bc, _bcOffset, 2, idl.UnlinkedConstructorInitializerKind.field); |
5838 return _kind; | 6436 return _kind; |
5839 } | 6437 } |
5840 | 6438 |
5841 @override | 6439 @override |
5842 String get name { | 6440 String get name { |
5843 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 6441 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
5844 return _name; | 6442 return _name; |
5845 } | 6443 } |
5846 } | 6444 } |
5847 | 6445 |
5848 abstract class _UnlinkedConstructorInitializerMixin implements idl.UnlinkedConst
ructorInitializer { | 6446 abstract class _UnlinkedConstructorInitializerMixin |
| 6447 implements idl.UnlinkedConstructorInitializer { |
5849 @override | 6448 @override |
5850 Map<String, Object> toJson() { | 6449 Map<String, Object> toJson() { |
5851 Map<String, Object> _result = <String, Object>{}; | 6450 Map<String, Object> _result = <String, Object>{}; |
5852 if (argumentNames.isNotEmpty) _result["argumentNames"] = argumentNames; | 6451 if (argumentNames.isNotEmpty) _result["argumentNames"] = argumentNames; |
5853 if (arguments.isNotEmpty) _result["arguments"] = arguments.map((_value) => _
value.toJson()).toList(); | 6452 if (arguments.isNotEmpty) |
| 6453 _result["arguments"] = |
| 6454 arguments.map((_value) => _value.toJson()).toList(); |
5854 if (expression != null) _result["expression"] = expression.toJson(); | 6455 if (expression != null) _result["expression"] = expression.toJson(); |
5855 if (kind != idl.UnlinkedConstructorInitializerKind.field) _result["kind"] =
kind.toString().split('.')[1]; | 6456 if (kind != idl.UnlinkedConstructorInitializerKind.field) |
| 6457 _result["kind"] = kind.toString().split('.')[1]; |
5856 if (name != '') _result["name"] = name; | 6458 if (name != '') _result["name"] = name; |
5857 return _result; | 6459 return _result; |
5858 } | 6460 } |
5859 | 6461 |
5860 @override | 6462 @override |
5861 Map<String, Object> toMap() => { | 6463 Map<String, Object> toMap() => { |
5862 "argumentNames": argumentNames, | 6464 "argumentNames": argumentNames, |
5863 "arguments": arguments, | 6465 "arguments": arguments, |
5864 "expression": expression, | 6466 "expression": expression, |
5865 "kind": kind, | 6467 "kind": kind, |
5866 "name": name, | 6468 "name": name, |
5867 }; | 6469 }; |
5868 | 6470 |
5869 @override | 6471 @override |
5870 String toString() => convert.JSON.encode(toJson()); | 6472 String toString() => convert.JSON.encode(toJson()); |
5871 } | 6473 } |
5872 | 6474 |
5873 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta
tionCommentMixin implements idl.UnlinkedDocumentationComment { | 6475 class UnlinkedDocumentationCommentBuilder extends Object |
| 6476 with _UnlinkedDocumentationCommentMixin |
| 6477 implements idl.UnlinkedDocumentationComment { |
5874 String _text; | 6478 String _text; |
5875 | 6479 |
5876 @override | 6480 @override |
5877 int get length => throw new UnimplementedError('attempt to access deprecated f
ield'); | 6481 int get length => |
| 6482 throw new UnimplementedError('attempt to access deprecated field'); |
5878 | 6483 |
5879 @override | 6484 @override |
5880 int get offset => throw new UnimplementedError('attempt to access deprecated f
ield'); | 6485 int get offset => |
| 6486 throw new UnimplementedError('attempt to access deprecated field'); |
5881 | 6487 |
5882 @override | 6488 @override |
5883 String get text => _text ??= ''; | 6489 String get text => _text ??= ''; |
5884 | 6490 |
5885 /** | 6491 /** |
5886 * Text of the documentation comment, with '\r\n' replaced by '\n'. | 6492 * Text of the documentation comment, with '\r\n' replaced by '\n'. |
5887 * | 6493 * |
5888 * References appearing within the doc comment in square brackets are not | 6494 * References appearing within the doc comment in square brackets are not |
5889 * specially encoded. | 6495 * specially encoded. |
5890 */ | 6496 */ |
5891 void set text(String value) { | 6497 void set text(String value) { |
5892 this._text = value; | 6498 this._text = value; |
5893 } | 6499 } |
5894 | 6500 |
5895 UnlinkedDocumentationCommentBuilder({String text}) | 6501 UnlinkedDocumentationCommentBuilder({String text}) : _text = text; |
5896 : _text = text; | |
5897 | 6502 |
5898 /** | 6503 /** |
5899 * Flush [informative] data recursively. | 6504 * Flush [informative] data recursively. |
5900 */ | 6505 */ |
5901 void flushInformative() { | 6506 void flushInformative() {} |
5902 } | |
5903 | 6507 |
5904 /** | 6508 /** |
5905 * Accumulate non-[informative] data into [signature]. | 6509 * Accumulate non-[informative] data into [signature]. |
5906 */ | 6510 */ |
5907 void collectApiSignature(api_sig.ApiSignature signature) { | 6511 void collectApiSignature(api_sig.ApiSignature signature) { |
5908 signature.addString(this._text ?? ''); | 6512 signature.addString(this._text ?? ''); |
5909 } | 6513 } |
5910 | 6514 |
5911 fb.Offset finish(fb.Builder fbBuilder) { | 6515 fb.Offset finish(fb.Builder fbBuilder) { |
5912 fb.Offset offset_text; | 6516 fb.Offset offset_text; |
5913 if (_text != null) { | 6517 if (_text != null) { |
5914 offset_text = fbBuilder.writeString(_text); | 6518 offset_text = fbBuilder.writeString(_text); |
5915 } | 6519 } |
5916 fbBuilder.startTable(); | 6520 fbBuilder.startTable(); |
5917 if (offset_text != null) { | 6521 if (offset_text != null) { |
5918 fbBuilder.addOffset(1, offset_text); | 6522 fbBuilder.addOffset(1, offset_text); |
5919 } | 6523 } |
5920 return fbBuilder.endTable(); | 6524 return fbBuilder.endTable(); |
5921 } | 6525 } |
5922 } | 6526 } |
5923 | 6527 |
5924 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume
ntationCommentImpl> { | 6528 class _UnlinkedDocumentationCommentReader |
| 6529 extends fb.TableReader<_UnlinkedDocumentationCommentImpl> { |
5925 const _UnlinkedDocumentationCommentReader(); | 6530 const _UnlinkedDocumentationCommentReader(); |
5926 | 6531 |
5927 @override | 6532 @override |
5928 _UnlinkedDocumentationCommentImpl createObject(fb.BufferContext bc, int offset
) => new _UnlinkedDocumentationCommentImpl(bc, offset); | 6533 _UnlinkedDocumentationCommentImpl createObject( |
| 6534 fb.BufferContext bc, int offset) => |
| 6535 new _UnlinkedDocumentationCommentImpl(bc, offset); |
5929 } | 6536 } |
5930 | 6537 |
5931 class _UnlinkedDocumentationCommentImpl extends Object with _UnlinkedDocumentati
onCommentMixin implements idl.UnlinkedDocumentationComment { | 6538 class _UnlinkedDocumentationCommentImpl extends Object |
| 6539 with _UnlinkedDocumentationCommentMixin |
| 6540 implements idl.UnlinkedDocumentationComment { |
5932 final fb.BufferContext _bc; | 6541 final fb.BufferContext _bc; |
5933 final int _bcOffset; | 6542 final int _bcOffset; |
5934 | 6543 |
5935 _UnlinkedDocumentationCommentImpl(this._bc, this._bcOffset); | 6544 _UnlinkedDocumentationCommentImpl(this._bc, this._bcOffset); |
5936 | 6545 |
5937 String _text; | 6546 String _text; |
5938 | 6547 |
5939 @override | 6548 @override |
5940 int get length => throw new UnimplementedError('attempt to access deprecated f
ield'); | 6549 int get length => |
| 6550 throw new UnimplementedError('attempt to access deprecated field'); |
5941 | 6551 |
5942 @override | 6552 @override |
5943 int get offset => throw new UnimplementedError('attempt to access deprecated f
ield'); | 6553 int get offset => |
| 6554 throw new UnimplementedError('attempt to access deprecated field'); |
5944 | 6555 |
5945 @override | 6556 @override |
5946 String get text { | 6557 String get text { |
5947 _text ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 6558 _text ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
5948 return _text; | 6559 return _text; |
5949 } | 6560 } |
5950 } | 6561 } |
5951 | 6562 |
5952 abstract class _UnlinkedDocumentationCommentMixin implements idl.UnlinkedDocumen
tationComment { | 6563 abstract class _UnlinkedDocumentationCommentMixin |
| 6564 implements idl.UnlinkedDocumentationComment { |
5953 @override | 6565 @override |
5954 Map<String, Object> toJson() { | 6566 Map<String, Object> toJson() { |
5955 Map<String, Object> _result = <String, Object>{}; | 6567 Map<String, Object> _result = <String, Object>{}; |
5956 if (text != '') _result["text"] = text; | 6568 if (text != '') _result["text"] = text; |
5957 return _result; | 6569 return _result; |
5958 } | 6570 } |
5959 | 6571 |
5960 @override | 6572 @override |
5961 Map<String, Object> toMap() => { | 6573 Map<String, Object> toMap() => { |
5962 "text": text, | 6574 "text": text, |
5963 }; | 6575 }; |
5964 | 6576 |
5965 @override | 6577 @override |
5966 String toString() => convert.JSON.encode(toJson()); | 6578 String toString() => convert.JSON.encode(toJson()); |
5967 } | 6579 } |
5968 | 6580 |
5969 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { | 6581 class UnlinkedEnumBuilder extends Object |
| 6582 with _UnlinkedEnumMixin |
| 6583 implements idl.UnlinkedEnum { |
5970 List<UnlinkedExprBuilder> _annotations; | 6584 List<UnlinkedExprBuilder> _annotations; |
5971 CodeRangeBuilder _codeRange; | 6585 CodeRangeBuilder _codeRange; |
5972 UnlinkedDocumentationCommentBuilder _documentationComment; | 6586 UnlinkedDocumentationCommentBuilder _documentationComment; |
5973 String _name; | 6587 String _name; |
5974 int _nameOffset; | 6588 int _nameOffset; |
5975 List<UnlinkedEnumValueBuilder> _values; | 6589 List<UnlinkedEnumValueBuilder> _values; |
5976 | 6590 |
5977 @override | 6591 @override |
5978 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 6592 List<UnlinkedExprBuilder> get annotations => |
| 6593 _annotations ??= <UnlinkedExprBuilder>[]; |
5979 | 6594 |
5980 /** | 6595 /** |
5981 * Annotations for this enum. | 6596 * Annotations for this enum. |
5982 */ | 6597 */ |
5983 void set annotations(List<UnlinkedExprBuilder> value) { | 6598 void set annotations(List<UnlinkedExprBuilder> value) { |
5984 this._annotations = value; | 6599 this._annotations = value; |
5985 } | 6600 } |
5986 | 6601 |
5987 @override | 6602 @override |
5988 CodeRangeBuilder get codeRange => _codeRange; | 6603 CodeRangeBuilder get codeRange => _codeRange; |
5989 | 6604 |
5990 /** | 6605 /** |
5991 * Code range of the enum. | 6606 * Code range of the enum. |
5992 */ | 6607 */ |
5993 void set codeRange(CodeRangeBuilder value) { | 6608 void set codeRange(CodeRangeBuilder value) { |
5994 this._codeRange = value; | 6609 this._codeRange = value; |
5995 } | 6610 } |
5996 | 6611 |
5997 @override | 6612 @override |
5998 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 6613 UnlinkedDocumentationCommentBuilder get documentationComment => |
| 6614 _documentationComment; |
5999 | 6615 |
6000 /** | 6616 /** |
6001 * Documentation comment for the enum, or `null` if there is no documentation | 6617 * Documentation comment for the enum, or `null` if there is no documentation |
6002 * comment. | 6618 * comment. |
6003 */ | 6619 */ |
6004 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { | 6620 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { |
6005 this._documentationComment = value; | 6621 this._documentationComment = value; |
6006 } | 6622 } |
6007 | 6623 |
6008 @override | 6624 @override |
(...skipping 11 matching lines...) Expand all Loading... |
6020 | 6636 |
6021 /** | 6637 /** |
6022 * Offset of the enum name relative to the beginning of the file. | 6638 * Offset of the enum name relative to the beginning of the file. |
6023 */ | 6639 */ |
6024 void set nameOffset(int value) { | 6640 void set nameOffset(int value) { |
6025 assert(value == null || value >= 0); | 6641 assert(value == null || value >= 0); |
6026 this._nameOffset = value; | 6642 this._nameOffset = value; |
6027 } | 6643 } |
6028 | 6644 |
6029 @override | 6645 @override |
6030 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; | 6646 List<UnlinkedEnumValueBuilder> get values => |
| 6647 _values ??= <UnlinkedEnumValueBuilder>[]; |
6031 | 6648 |
6032 /** | 6649 /** |
6033 * Values listed in the enum declaration, in declaration order. | 6650 * Values listed in the enum declaration, in declaration order. |
6034 */ | 6651 */ |
6035 void set values(List<UnlinkedEnumValueBuilder> value) { | 6652 void set values(List<UnlinkedEnumValueBuilder> value) { |
6036 this._values = value; | 6653 this._values = value; |
6037 } | 6654 } |
6038 | 6655 |
6039 UnlinkedEnumBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder c
odeRange, UnlinkedDocumentationCommentBuilder documentationComment, String name,
int nameOffset, List<UnlinkedEnumValueBuilder> values}) | 6656 UnlinkedEnumBuilder( |
6040 : _annotations = annotations, | 6657 {List<UnlinkedExprBuilder> annotations, |
6041 _codeRange = codeRange, | 6658 CodeRangeBuilder codeRange, |
6042 _documentationComment = documentationComment, | 6659 UnlinkedDocumentationCommentBuilder documentationComment, |
6043 _name = name, | 6660 String name, |
6044 _nameOffset = nameOffset, | 6661 int nameOffset, |
6045 _values = values; | 6662 List<UnlinkedEnumValueBuilder> values}) |
| 6663 : _annotations = annotations, |
| 6664 _codeRange = codeRange, |
| 6665 _documentationComment = documentationComment, |
| 6666 _name = name, |
| 6667 _nameOffset = nameOffset, |
| 6668 _values = values; |
6046 | 6669 |
6047 /** | 6670 /** |
6048 * Flush [informative] data recursively. | 6671 * Flush [informative] data recursively. |
6049 */ | 6672 */ |
6050 void flushInformative() { | 6673 void flushInformative() { |
6051 _annotations?.forEach((b) => b.flushInformative()); | 6674 _annotations?.forEach((b) => b.flushInformative()); |
6052 _codeRange = null; | 6675 _codeRange = null; |
6053 _documentationComment = null; | 6676 _documentationComment = null; |
6054 _nameOffset = null; | 6677 _nameOffset = null; |
6055 _values?.forEach((b) => b.flushInformative()); | 6678 _values?.forEach((b) => b.flushInformative()); |
(...skipping 22 matching lines...) Expand all Loading... |
6078 } | 6701 } |
6079 } | 6702 } |
6080 | 6703 |
6081 fb.Offset finish(fb.Builder fbBuilder) { | 6704 fb.Offset finish(fb.Builder fbBuilder) { |
6082 fb.Offset offset_annotations; | 6705 fb.Offset offset_annotations; |
6083 fb.Offset offset_codeRange; | 6706 fb.Offset offset_codeRange; |
6084 fb.Offset offset_documentationComment; | 6707 fb.Offset offset_documentationComment; |
6085 fb.Offset offset_name; | 6708 fb.Offset offset_name; |
6086 fb.Offset offset_values; | 6709 fb.Offset offset_values; |
6087 if (!(_annotations == null || _annotations.isEmpty)) { | 6710 if (!(_annotations == null || _annotations.isEmpty)) { |
6088 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 6711 offset_annotations = fbBuilder |
| 6712 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
6089 } | 6713 } |
6090 if (_codeRange != null) { | 6714 if (_codeRange != null) { |
6091 offset_codeRange = _codeRange.finish(fbBuilder); | 6715 offset_codeRange = _codeRange.finish(fbBuilder); |
6092 } | 6716 } |
6093 if (_documentationComment != null) { | 6717 if (_documentationComment != null) { |
6094 offset_documentationComment = _documentationComment.finish(fbBuilder); | 6718 offset_documentationComment = _documentationComment.finish(fbBuilder); |
6095 } | 6719 } |
6096 if (_name != null) { | 6720 if (_name != null) { |
6097 offset_name = fbBuilder.writeString(_name); | 6721 offset_name = fbBuilder.writeString(_name); |
6098 } | 6722 } |
6099 if (!(_values == null || _values.isEmpty)) { | 6723 if (!(_values == null || _values.isEmpty)) { |
6100 offset_values = fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)
).toList()); | 6724 offset_values = |
| 6725 fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)).toList()); |
6101 } | 6726 } |
6102 fbBuilder.startTable(); | 6727 fbBuilder.startTable(); |
6103 if (offset_annotations != null) { | 6728 if (offset_annotations != null) { |
6104 fbBuilder.addOffset(4, offset_annotations); | 6729 fbBuilder.addOffset(4, offset_annotations); |
6105 } | 6730 } |
6106 if (offset_codeRange != null) { | 6731 if (offset_codeRange != null) { |
6107 fbBuilder.addOffset(5, offset_codeRange); | 6732 fbBuilder.addOffset(5, offset_codeRange); |
6108 } | 6733 } |
6109 if (offset_documentationComment != null) { | 6734 if (offset_documentationComment != null) { |
6110 fbBuilder.addOffset(3, offset_documentationComment); | 6735 fbBuilder.addOffset(3, offset_documentationComment); |
6111 } | 6736 } |
6112 if (offset_name != null) { | 6737 if (offset_name != null) { |
6113 fbBuilder.addOffset(0, offset_name); | 6738 fbBuilder.addOffset(0, offset_name); |
6114 } | 6739 } |
6115 if (_nameOffset != null && _nameOffset != 0) { | 6740 if (_nameOffset != null && _nameOffset != 0) { |
6116 fbBuilder.addUint32(1, _nameOffset); | 6741 fbBuilder.addUint32(1, _nameOffset); |
6117 } | 6742 } |
6118 if (offset_values != null) { | 6743 if (offset_values != null) { |
6119 fbBuilder.addOffset(2, offset_values); | 6744 fbBuilder.addOffset(2, offset_values); |
6120 } | 6745 } |
6121 return fbBuilder.endTable(); | 6746 return fbBuilder.endTable(); |
6122 } | 6747 } |
6123 } | 6748 } |
6124 | 6749 |
6125 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { | 6750 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { |
6126 const _UnlinkedEnumReader(); | 6751 const _UnlinkedEnumReader(); |
6127 | 6752 |
6128 @override | 6753 @override |
6129 _UnlinkedEnumImpl createObject(fb.BufferContext bc, int offset) => new _Unlink
edEnumImpl(bc, offset); | 6754 _UnlinkedEnumImpl createObject(fb.BufferContext bc, int offset) => |
| 6755 new _UnlinkedEnumImpl(bc, offset); |
6130 } | 6756 } |
6131 | 6757 |
6132 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { | 6758 class _UnlinkedEnumImpl extends Object |
| 6759 with _UnlinkedEnumMixin |
| 6760 implements idl.UnlinkedEnum { |
6133 final fb.BufferContext _bc; | 6761 final fb.BufferContext _bc; |
6134 final int _bcOffset; | 6762 final int _bcOffset; |
6135 | 6763 |
6136 _UnlinkedEnumImpl(this._bc, this._bcOffset); | 6764 _UnlinkedEnumImpl(this._bc, this._bcOffset); |
6137 | 6765 |
6138 List<idl.UnlinkedExpr> _annotations; | 6766 List<idl.UnlinkedExpr> _annotations; |
6139 idl.CodeRange _codeRange; | 6767 idl.CodeRange _codeRange; |
6140 idl.UnlinkedDocumentationComment _documentationComment; | 6768 idl.UnlinkedDocumentationComment _documentationComment; |
6141 String _name; | 6769 String _name; |
6142 int _nameOffset; | 6770 int _nameOffset; |
6143 List<idl.UnlinkedEnumValue> _values; | 6771 List<idl.UnlinkedEnumValue> _values; |
6144 | 6772 |
6145 @override | 6773 @override |
6146 List<idl.UnlinkedExpr> get annotations { | 6774 List<idl.UnlinkedExpr> get annotations { |
6147 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedExpr>[]); | 6775 _annotations ??= |
| 6776 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 6777 .vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedExpr>[]); |
6148 return _annotations; | 6778 return _annotations; |
6149 } | 6779 } |
6150 | 6780 |
6151 @override | 6781 @override |
6152 idl.CodeRange get codeRange { | 6782 idl.CodeRange get codeRange { |
6153 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 5, null); | 6783 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 5, null); |
6154 return _codeRange; | 6784 return _codeRange; |
6155 } | 6785 } |
6156 | 6786 |
6157 @override | 6787 @override |
6158 idl.UnlinkedDocumentationComment get documentationComment { | 6788 idl.UnlinkedDocumentationComment get documentationComment { |
6159 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bc, _bcOffset, 3, null); | 6789 _documentationComment ??= const _UnlinkedDocumentationCommentReader() |
| 6790 .vTableGet(_bc, _bcOffset, 3, null); |
6160 return _documentationComment; | 6791 return _documentationComment; |
6161 } | 6792 } |
6162 | 6793 |
6163 @override | 6794 @override |
6164 String get name { | 6795 String get name { |
6165 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 6796 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
6166 return _name; | 6797 return _name; |
6167 } | 6798 } |
6168 | 6799 |
6169 @override | 6800 @override |
6170 int get nameOffset { | 6801 int get nameOffset { |
6171 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 6802 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
6172 return _nameOffset; | 6803 return _nameOffset; |
6173 } | 6804 } |
6174 | 6805 |
6175 @override | 6806 @override |
6176 List<idl.UnlinkedEnumValue> get values { | 6807 List<idl.UnlinkedEnumValue> get values { |
6177 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa
lueReader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedEnumValue>[]); | 6808 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>( |
| 6809 const _UnlinkedEnumValueReader()) |
| 6810 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedEnumValue>[]); |
6178 return _values; | 6811 return _values; |
6179 } | 6812 } |
6180 } | 6813 } |
6181 | 6814 |
6182 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { | 6815 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { |
6183 @override | 6816 @override |
6184 Map<String, Object> toJson() { | 6817 Map<String, Object> toJson() { |
6185 Map<String, Object> _result = <String, Object>{}; | 6818 Map<String, Object> _result = <String, Object>{}; |
6186 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 6819 if (annotations.isNotEmpty) |
| 6820 _result["annotations"] = |
| 6821 annotations.map((_value) => _value.toJson()).toList(); |
6187 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 6822 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
6188 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 6823 if (documentationComment != null) |
| 6824 _result["documentationComment"] = documentationComment.toJson(); |
6189 if (name != '') _result["name"] = name; | 6825 if (name != '') _result["name"] = name; |
6190 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 6826 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
6191 if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJ
son()).toList(); | 6827 if (values.isNotEmpty) |
| 6828 _result["values"] = values.map((_value) => _value.toJson()).toList(); |
6192 return _result; | 6829 return _result; |
6193 } | 6830 } |
6194 | 6831 |
6195 @override | 6832 @override |
6196 Map<String, Object> toMap() => { | 6833 Map<String, Object> toMap() => { |
6197 "annotations": annotations, | 6834 "annotations": annotations, |
6198 "codeRange": codeRange, | 6835 "codeRange": codeRange, |
6199 "documentationComment": documentationComment, | 6836 "documentationComment": documentationComment, |
6200 "name": name, | 6837 "name": name, |
6201 "nameOffset": nameOffset, | 6838 "nameOffset": nameOffset, |
6202 "values": values, | 6839 "values": values, |
6203 }; | 6840 }; |
6204 | 6841 |
6205 @override | 6842 @override |
6206 String toString() => convert.JSON.encode(toJson()); | 6843 String toString() => convert.JSON.encode(toJson()); |
6207 } | 6844 } |
6208 | 6845 |
6209 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple
ments idl.UnlinkedEnumValue { | 6846 class UnlinkedEnumValueBuilder extends Object |
| 6847 with _UnlinkedEnumValueMixin |
| 6848 implements idl.UnlinkedEnumValue { |
6210 UnlinkedDocumentationCommentBuilder _documentationComment; | 6849 UnlinkedDocumentationCommentBuilder _documentationComment; |
6211 String _name; | 6850 String _name; |
6212 int _nameOffset; | 6851 int _nameOffset; |
6213 | 6852 |
6214 @override | 6853 @override |
6215 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 6854 UnlinkedDocumentationCommentBuilder get documentationComment => |
| 6855 _documentationComment; |
6216 | 6856 |
6217 /** | 6857 /** |
6218 * Documentation comment for the enum value, or `null` if there is no | 6858 * Documentation comment for the enum value, or `null` if there is no |
6219 * documentation comment. | 6859 * documentation comment. |
6220 */ | 6860 */ |
6221 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { | 6861 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { |
6222 this._documentationComment = value; | 6862 this._documentationComment = value; |
6223 } | 6863 } |
6224 | 6864 |
6225 @override | 6865 @override |
(...skipping 10 matching lines...) Expand all Loading... |
6236 int get nameOffset => _nameOffset ??= 0; | 6876 int get nameOffset => _nameOffset ??= 0; |
6237 | 6877 |
6238 /** | 6878 /** |
6239 * Offset of the enum value name relative to the beginning of the file. | 6879 * Offset of the enum value name relative to the beginning of the file. |
6240 */ | 6880 */ |
6241 void set nameOffset(int value) { | 6881 void set nameOffset(int value) { |
6242 assert(value == null || value >= 0); | 6882 assert(value == null || value >= 0); |
6243 this._nameOffset = value; | 6883 this._nameOffset = value; |
6244 } | 6884 } |
6245 | 6885 |
6246 UnlinkedEnumValueBuilder({UnlinkedDocumentationCommentBuilder documentationCom
ment, String name, int nameOffset}) | 6886 UnlinkedEnumValueBuilder( |
6247 : _documentationComment = documentationComment, | 6887 {UnlinkedDocumentationCommentBuilder documentationComment, |
6248 _name = name, | 6888 String name, |
6249 _nameOffset = nameOffset; | 6889 int nameOffset}) |
| 6890 : _documentationComment = documentationComment, |
| 6891 _name = name, |
| 6892 _nameOffset = nameOffset; |
6250 | 6893 |
6251 /** | 6894 /** |
6252 * Flush [informative] data recursively. | 6895 * Flush [informative] data recursively. |
6253 */ | 6896 */ |
6254 void flushInformative() { | 6897 void flushInformative() { |
6255 _documentationComment = null; | 6898 _documentationComment = null; |
6256 _nameOffset = null; | 6899 _nameOffset = null; |
6257 } | 6900 } |
6258 | 6901 |
6259 /** | 6902 /** |
(...skipping 23 matching lines...) Expand all Loading... |
6283 fbBuilder.addUint32(1, _nameOffset); | 6926 fbBuilder.addUint32(1, _nameOffset); |
6284 } | 6927 } |
6285 return fbBuilder.endTable(); | 6928 return fbBuilder.endTable(); |
6286 } | 6929 } |
6287 } | 6930 } |
6288 | 6931 |
6289 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> { | 6932 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> { |
6290 const _UnlinkedEnumValueReader(); | 6933 const _UnlinkedEnumValueReader(); |
6291 | 6934 |
6292 @override | 6935 @override |
6293 _UnlinkedEnumValueImpl createObject(fb.BufferContext bc, int offset) => new _U
nlinkedEnumValueImpl(bc, offset); | 6936 _UnlinkedEnumValueImpl createObject(fb.BufferContext bc, int offset) => |
| 6937 new _UnlinkedEnumValueImpl(bc, offset); |
6294 } | 6938 } |
6295 | 6939 |
6296 class _UnlinkedEnumValueImpl extends Object with _UnlinkedEnumValueMixin impleme
nts idl.UnlinkedEnumValue { | 6940 class _UnlinkedEnumValueImpl extends Object |
| 6941 with _UnlinkedEnumValueMixin |
| 6942 implements idl.UnlinkedEnumValue { |
6297 final fb.BufferContext _bc; | 6943 final fb.BufferContext _bc; |
6298 final int _bcOffset; | 6944 final int _bcOffset; |
6299 | 6945 |
6300 _UnlinkedEnumValueImpl(this._bc, this._bcOffset); | 6946 _UnlinkedEnumValueImpl(this._bc, this._bcOffset); |
6301 | 6947 |
6302 idl.UnlinkedDocumentationComment _documentationComment; | 6948 idl.UnlinkedDocumentationComment _documentationComment; |
6303 String _name; | 6949 String _name; |
6304 int _nameOffset; | 6950 int _nameOffset; |
6305 | 6951 |
6306 @override | 6952 @override |
6307 idl.UnlinkedDocumentationComment get documentationComment { | 6953 idl.UnlinkedDocumentationComment get documentationComment { |
6308 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bc, _bcOffset, 2, null); | 6954 _documentationComment ??= const _UnlinkedDocumentationCommentReader() |
| 6955 .vTableGet(_bc, _bcOffset, 2, null); |
6309 return _documentationComment; | 6956 return _documentationComment; |
6310 } | 6957 } |
6311 | 6958 |
6312 @override | 6959 @override |
6313 String get name { | 6960 String get name { |
6314 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 6961 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
6315 return _name; | 6962 return _name; |
6316 } | 6963 } |
6317 | 6964 |
6318 @override | 6965 @override |
6319 int get nameOffset { | 6966 int get nameOffset { |
6320 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 6967 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
6321 return _nameOffset; | 6968 return _nameOffset; |
6322 } | 6969 } |
6323 } | 6970 } |
6324 | 6971 |
6325 abstract class _UnlinkedEnumValueMixin implements idl.UnlinkedEnumValue { | 6972 abstract class _UnlinkedEnumValueMixin implements idl.UnlinkedEnumValue { |
6326 @override | 6973 @override |
6327 Map<String, Object> toJson() { | 6974 Map<String, Object> toJson() { |
6328 Map<String, Object> _result = <String, Object>{}; | 6975 Map<String, Object> _result = <String, Object>{}; |
6329 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 6976 if (documentationComment != null) |
| 6977 _result["documentationComment"] = documentationComment.toJson(); |
6330 if (name != '') _result["name"] = name; | 6978 if (name != '') _result["name"] = name; |
6331 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 6979 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
6332 return _result; | 6980 return _result; |
6333 } | 6981 } |
6334 | 6982 |
6335 @override | 6983 @override |
6336 Map<String, Object> toMap() => { | 6984 Map<String, Object> toMap() => { |
6337 "documentationComment": documentationComment, | 6985 "documentationComment": documentationComment, |
6338 "name": name, | 6986 "name": name, |
6339 "nameOffset": nameOffset, | 6987 "nameOffset": nameOffset, |
6340 }; | 6988 }; |
6341 | 6989 |
6342 @override | 6990 @override |
6343 String toString() => convert.JSON.encode(toJson()); | 6991 String toString() => convert.JSON.encode(toJson()); |
6344 } | 6992 } |
6345 | 6993 |
6346 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { | 6994 class UnlinkedExecutableBuilder extends Object |
| 6995 with _UnlinkedExecutableMixin |
| 6996 implements idl.UnlinkedExecutable { |
6347 List<UnlinkedExprBuilder> _annotations; | 6997 List<UnlinkedExprBuilder> _annotations; |
6348 UnlinkedExprBuilder _bodyExpr; | 6998 UnlinkedExprBuilder _bodyExpr; |
6349 CodeRangeBuilder _codeRange; | 6999 CodeRangeBuilder _codeRange; |
6350 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; | 7000 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; |
6351 int _constCycleSlot; | 7001 int _constCycleSlot; |
6352 UnlinkedDocumentationCommentBuilder _documentationComment; | 7002 UnlinkedDocumentationCommentBuilder _documentationComment; |
6353 int _inferredReturnTypeSlot; | 7003 int _inferredReturnTypeSlot; |
6354 bool _isAbstract; | 7004 bool _isAbstract; |
6355 bool _isAsynchronous; | 7005 bool _isAsynchronous; |
6356 bool _isConst; | 7006 bool _isConst; |
(...skipping 12 matching lines...) Expand all Loading... |
6369 List<UnlinkedParamBuilder> _parameters; | 7019 List<UnlinkedParamBuilder> _parameters; |
6370 int _periodOffset; | 7020 int _periodOffset; |
6371 EntityRefBuilder _redirectedConstructor; | 7021 EntityRefBuilder _redirectedConstructor; |
6372 String _redirectedConstructorName; | 7022 String _redirectedConstructorName; |
6373 EntityRefBuilder _returnType; | 7023 EntityRefBuilder _returnType; |
6374 List<UnlinkedTypeParamBuilder> _typeParameters; | 7024 List<UnlinkedTypeParamBuilder> _typeParameters; |
6375 int _visibleLength; | 7025 int _visibleLength; |
6376 int _visibleOffset; | 7026 int _visibleOffset; |
6377 | 7027 |
6378 @override | 7028 @override |
6379 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 7029 List<UnlinkedExprBuilder> get annotations => |
| 7030 _annotations ??= <UnlinkedExprBuilder>[]; |
6380 | 7031 |
6381 /** | 7032 /** |
6382 * Annotations for this executable. | 7033 * Annotations for this executable. |
6383 */ | 7034 */ |
6384 void set annotations(List<UnlinkedExprBuilder> value) { | 7035 void set annotations(List<UnlinkedExprBuilder> value) { |
6385 this._annotations = value; | 7036 this._annotations = value; |
6386 } | 7037 } |
6387 | 7038 |
6388 @override | 7039 @override |
6389 UnlinkedExprBuilder get bodyExpr => _bodyExpr; | 7040 UnlinkedExprBuilder get bodyExpr => _bodyExpr; |
(...skipping 11 matching lines...) Expand all Loading... |
6401 CodeRangeBuilder get codeRange => _codeRange; | 7052 CodeRangeBuilder get codeRange => _codeRange; |
6402 | 7053 |
6403 /** | 7054 /** |
6404 * Code range of the executable. | 7055 * Code range of the executable. |
6405 */ | 7056 */ |
6406 void set codeRange(CodeRangeBuilder value) { | 7057 void set codeRange(CodeRangeBuilder value) { |
6407 this._codeRange = value; | 7058 this._codeRange = value; |
6408 } | 7059 } |
6409 | 7060 |
6410 @override | 7061 @override |
6411 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _const
antInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; | 7062 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => |
| 7063 _constantInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; |
6412 | 7064 |
6413 /** | 7065 /** |
6414 * If a constant [UnlinkedExecutableKind.constructor], the constructor | 7066 * If a constant [UnlinkedExecutableKind.constructor], the constructor |
6415 * initializers. Otherwise empty. | 7067 * initializers. Otherwise empty. |
6416 */ | 7068 */ |
6417 void set constantInitializers(List<UnlinkedConstructorInitializerBuilder> valu
e) { | 7069 void set constantInitializers( |
| 7070 List<UnlinkedConstructorInitializerBuilder> value) { |
6418 this._constantInitializers = value; | 7071 this._constantInitializers = value; |
6419 } | 7072 } |
6420 | 7073 |
6421 @override | 7074 @override |
6422 int get constCycleSlot => _constCycleSlot ??= 0; | 7075 int get constCycleSlot => _constCycleSlot ??= 0; |
6423 | 7076 |
6424 /** | 7077 /** |
6425 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, | 7078 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, |
6426 * a nonzero slot id which is unique within this compilation unit. If this id | 7079 * a nonzero slot id which is unique within this compilation unit. If this id |
6427 * is found in [LinkedUnit.constCycles], then this constructor is part of a | 7080 * is found in [LinkedUnit.constCycles], then this constructor is part of a |
6428 * cycle. | 7081 * cycle. |
6429 * | 7082 * |
6430 * Otherwise, zero. | 7083 * Otherwise, zero. |
6431 */ | 7084 */ |
6432 void set constCycleSlot(int value) { | 7085 void set constCycleSlot(int value) { |
6433 assert(value == null || value >= 0); | 7086 assert(value == null || value >= 0); |
6434 this._constCycleSlot = value; | 7087 this._constCycleSlot = value; |
6435 } | 7088 } |
6436 | 7089 |
6437 @override | 7090 @override |
6438 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 7091 UnlinkedDocumentationCommentBuilder get documentationComment => |
| 7092 _documentationComment; |
6439 | 7093 |
6440 /** | 7094 /** |
6441 * Documentation comment for the executable, or `null` if there is no | 7095 * Documentation comment for the executable, or `null` if there is no |
6442 * documentation comment. | 7096 * documentation comment. |
6443 */ | 7097 */ |
6444 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { | 7098 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { |
6445 this._documentationComment = value; | 7099 this._documentationComment = value; |
6446 } | 7100 } |
6447 | 7101 |
6448 @override | 7102 @override |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6538 * | 7192 * |
6539 * Note that for top level executables, this flag is false, since they are | 7193 * Note that for top level executables, this flag is false, since they are |
6540 * not declared using the `static` keyword (even though they are considered | 7194 * not declared using the `static` keyword (even though they are considered |
6541 * static for semantic purposes). | 7195 * static for semantic purposes). |
6542 */ | 7196 */ |
6543 void set isStatic(bool value) { | 7197 void set isStatic(bool value) { |
6544 this._isStatic = value; | 7198 this._isStatic = value; |
6545 } | 7199 } |
6546 | 7200 |
6547 @override | 7201 @override |
6548 idl.UnlinkedExecutableKind get kind => _kind ??= idl.UnlinkedExecutableKind.fu
nctionOrMethod; | 7202 idl.UnlinkedExecutableKind get kind => |
| 7203 _kind ??= idl.UnlinkedExecutableKind.functionOrMethod; |
6549 | 7204 |
6550 /** | 7205 /** |
6551 * The kind of the executable (function/method, getter, setter, or | 7206 * The kind of the executable (function/method, getter, setter, or |
6552 * constructor). | 7207 * constructor). |
6553 */ | 7208 */ |
6554 void set kind(idl.UnlinkedExecutableKind value) { | 7209 void set kind(idl.UnlinkedExecutableKind value) { |
6555 this._kind = value; | 7210 this._kind = value; |
6556 } | 7211 } |
6557 | 7212 |
6558 @override | 7213 @override |
6559 List<UnlinkedExecutableBuilder> get localFunctions => _localFunctions ??= <Unl
inkedExecutableBuilder>[]; | 7214 List<UnlinkedExecutableBuilder> get localFunctions => |
| 7215 _localFunctions ??= <UnlinkedExecutableBuilder>[]; |
6560 | 7216 |
6561 /** | 7217 /** |
6562 * The list of local functions. | 7218 * The list of local functions. |
6563 */ | 7219 */ |
6564 void set localFunctions(List<UnlinkedExecutableBuilder> value) { | 7220 void set localFunctions(List<UnlinkedExecutableBuilder> value) { |
6565 this._localFunctions = value; | 7221 this._localFunctions = value; |
6566 } | 7222 } |
6567 | 7223 |
6568 @override | 7224 @override |
6569 List<UnlinkedLabelBuilder> get localLabels => _localLabels ??= <UnlinkedLabelB
uilder>[]; | 7225 List<UnlinkedLabelBuilder> get localLabels => |
| 7226 _localLabels ??= <UnlinkedLabelBuilder>[]; |
6570 | 7227 |
6571 /** | 7228 /** |
6572 * The list of local labels. | 7229 * The list of local labels. |
6573 */ | 7230 */ |
6574 void set localLabels(List<UnlinkedLabelBuilder> value) { | 7231 void set localLabels(List<UnlinkedLabelBuilder> value) { |
6575 this._localLabels = value; | 7232 this._localLabels = value; |
6576 } | 7233 } |
6577 | 7234 |
6578 @override | 7235 @override |
6579 List<UnlinkedVariableBuilder> get localVariables => _localVariables ??= <Unlin
kedVariableBuilder>[]; | 7236 List<UnlinkedVariableBuilder> get localVariables => |
| 7237 _localVariables ??= <UnlinkedVariableBuilder>[]; |
6580 | 7238 |
6581 /** | 7239 /** |
6582 * The list of local variables. | 7240 * The list of local variables. |
6583 */ | 7241 */ |
6584 void set localVariables(List<UnlinkedVariableBuilder> value) { | 7242 void set localVariables(List<UnlinkedVariableBuilder> value) { |
6585 this._localVariables = value; | 7243 this._localVariables = value; |
6586 } | 7244 } |
6587 | 7245 |
6588 @override | 7246 @override |
6589 String get name => _name ??= ''; | 7247 String get name => _name ??= ''; |
(...skipping 27 matching lines...) Expand all Loading... |
6617 * named constructors, this excludes the class name and excludes the ".". | 7275 * named constructors, this excludes the class name and excludes the ".". |
6618 * For unnamed constructors, this is the offset of the class name (i.e. the | 7276 * For unnamed constructors, this is the offset of the class name (i.e. the |
6619 * offset of the second "C" in "class C { C(); }"). | 7277 * offset of the second "C" in "class C { C(); }"). |
6620 */ | 7278 */ |
6621 void set nameOffset(int value) { | 7279 void set nameOffset(int value) { |
6622 assert(value == null || value >= 0); | 7280 assert(value == null || value >= 0); |
6623 this._nameOffset = value; | 7281 this._nameOffset = value; |
6624 } | 7282 } |
6625 | 7283 |
6626 @override | 7284 @override |
6627 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 7285 List<UnlinkedParamBuilder> get parameters => |
| 7286 _parameters ??= <UnlinkedParamBuilder>[]; |
6628 | 7287 |
6629 /** | 7288 /** |
6630 * Parameters of the executable, if any. Note that getters have no | 7289 * Parameters of the executable, if any. Note that getters have no |
6631 * parameters (hence this will be the empty list), and setters have a single | 7290 * parameters (hence this will be the empty list), and setters have a single |
6632 * parameter. | 7291 * parameter. |
6633 */ | 7292 */ |
6634 void set parameters(List<UnlinkedParamBuilder> value) { | 7293 void set parameters(List<UnlinkedParamBuilder> value) { |
6635 this._parameters = value; | 7294 this._parameters = value; |
6636 } | 7295 } |
6637 | 7296 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6678 * constructor or the return type is implicit. Absent for executables | 7337 * constructor or the return type is implicit. Absent for executables |
6679 * associated with variable initializers and closures, since these | 7338 * associated with variable initializers and closures, since these |
6680 * executables may have return types that are not accessible via direct | 7339 * executables may have return types that are not accessible via direct |
6681 * imports. | 7340 * imports. |
6682 */ | 7341 */ |
6683 void set returnType(EntityRefBuilder value) { | 7342 void set returnType(EntityRefBuilder value) { |
6684 this._returnType = value; | 7343 this._returnType = value; |
6685 } | 7344 } |
6686 | 7345 |
6687 @override | 7346 @override |
6688 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 7347 List<UnlinkedTypeParamBuilder> get typeParameters => |
| 7348 _typeParameters ??= <UnlinkedTypeParamBuilder>[]; |
6689 | 7349 |
6690 /** | 7350 /** |
6691 * Type parameters of the executable, if any. Empty if support for generic | 7351 * Type parameters of the executable, if any. Empty if support for generic |
6692 * method syntax is disabled. | 7352 * method syntax is disabled. |
6693 */ | 7353 */ |
6694 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { | 7354 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { |
6695 this._typeParameters = value; | 7355 this._typeParameters = value; |
6696 } | 7356 } |
6697 | 7357 |
6698 @override | 7358 @override |
(...skipping 11 matching lines...) Expand all Loading... |
6710 int get visibleOffset => _visibleOffset ??= 0; | 7370 int get visibleOffset => _visibleOffset ??= 0; |
6711 | 7371 |
6712 /** | 7372 /** |
6713 * If a local function, the beginning of the visible range; zero otherwise. | 7373 * If a local function, the beginning of the visible range; zero otherwise. |
6714 */ | 7374 */ |
6715 void set visibleOffset(int value) { | 7375 void set visibleOffset(int value) { |
6716 assert(value == null || value >= 0); | 7376 assert(value == null || value >= 0); |
6717 this._visibleOffset = value; | 7377 this._visibleOffset = value; |
6718 } | 7378 } |
6719 | 7379 |
6720 UnlinkedExecutableBuilder({List<UnlinkedExprBuilder> annotations, UnlinkedExpr
Builder bodyExpr, CodeRangeBuilder codeRange, List<UnlinkedConstructorInitialize
rBuilder> constantInitializers, int constCycleSlot, UnlinkedDocumentationComment
Builder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bool
isAsynchronous, bool isConst, bool isExternal, bool isFactory, bool isGenerator,
bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutableKind kind, L
ist<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBuilder> localL
abels, List<UnlinkedVariableBuilder> localVariables, String name, int nameEnd, i
nt nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffset, EntityRe
fBuilder redirectedConstructor, String redirectedConstructorName, EntityRefBuild
er returnType, List<UnlinkedTypeParamBuilder> typeParameters, int visibleLength,
int visibleOffset}) | 7380 UnlinkedExecutableBuilder( |
6721 : _annotations = annotations, | 7381 {List<UnlinkedExprBuilder> annotations, |
6722 _bodyExpr = bodyExpr, | 7382 UnlinkedExprBuilder bodyExpr, |
6723 _codeRange = codeRange, | 7383 CodeRangeBuilder codeRange, |
6724 _constantInitializers = constantInitializers, | 7384 List<UnlinkedConstructorInitializerBuilder> constantInitializers, |
6725 _constCycleSlot = constCycleSlot, | 7385 int constCycleSlot, |
6726 _documentationComment = documentationComment, | 7386 UnlinkedDocumentationCommentBuilder documentationComment, |
6727 _inferredReturnTypeSlot = inferredReturnTypeSlot, | 7387 int inferredReturnTypeSlot, |
6728 _isAbstract = isAbstract, | 7388 bool isAbstract, |
6729 _isAsynchronous = isAsynchronous, | 7389 bool isAsynchronous, |
6730 _isConst = isConst, | 7390 bool isConst, |
6731 _isExternal = isExternal, | 7391 bool isExternal, |
6732 _isFactory = isFactory, | 7392 bool isFactory, |
6733 _isGenerator = isGenerator, | 7393 bool isGenerator, |
6734 _isRedirectedConstructor = isRedirectedConstructor, | 7394 bool isRedirectedConstructor, |
6735 _isStatic = isStatic, | 7395 bool isStatic, |
6736 _kind = kind, | 7396 idl.UnlinkedExecutableKind kind, |
6737 _localFunctions = localFunctions, | 7397 List<UnlinkedExecutableBuilder> localFunctions, |
6738 _localLabels = localLabels, | 7398 List<UnlinkedLabelBuilder> localLabels, |
6739 _localVariables = localVariables, | 7399 List<UnlinkedVariableBuilder> localVariables, |
6740 _name = name, | 7400 String name, |
6741 _nameEnd = nameEnd, | 7401 int nameEnd, |
6742 _nameOffset = nameOffset, | 7402 int nameOffset, |
6743 _parameters = parameters, | 7403 List<UnlinkedParamBuilder> parameters, |
6744 _periodOffset = periodOffset, | 7404 int periodOffset, |
6745 _redirectedConstructor = redirectedConstructor, | 7405 EntityRefBuilder redirectedConstructor, |
6746 _redirectedConstructorName = redirectedConstructorName, | 7406 String redirectedConstructorName, |
6747 _returnType = returnType, | 7407 EntityRefBuilder returnType, |
6748 _typeParameters = typeParameters, | 7408 List<UnlinkedTypeParamBuilder> typeParameters, |
6749 _visibleLength = visibleLength, | 7409 int visibleLength, |
6750 _visibleOffset = visibleOffset; | 7410 int visibleOffset}) |
| 7411 : _annotations = annotations, |
| 7412 _bodyExpr = bodyExpr, |
| 7413 _codeRange = codeRange, |
| 7414 _constantInitializers = constantInitializers, |
| 7415 _constCycleSlot = constCycleSlot, |
| 7416 _documentationComment = documentationComment, |
| 7417 _inferredReturnTypeSlot = inferredReturnTypeSlot, |
| 7418 _isAbstract = isAbstract, |
| 7419 _isAsynchronous = isAsynchronous, |
| 7420 _isConst = isConst, |
| 7421 _isExternal = isExternal, |
| 7422 _isFactory = isFactory, |
| 7423 _isGenerator = isGenerator, |
| 7424 _isRedirectedConstructor = isRedirectedConstructor, |
| 7425 _isStatic = isStatic, |
| 7426 _kind = kind, |
| 7427 _localFunctions = localFunctions, |
| 7428 _localLabels = localLabels, |
| 7429 _localVariables = localVariables, |
| 7430 _name = name, |
| 7431 _nameEnd = nameEnd, |
| 7432 _nameOffset = nameOffset, |
| 7433 _parameters = parameters, |
| 7434 _periodOffset = periodOffset, |
| 7435 _redirectedConstructor = redirectedConstructor, |
| 7436 _redirectedConstructorName = redirectedConstructorName, |
| 7437 _returnType = returnType, |
| 7438 _typeParameters = typeParameters, |
| 7439 _visibleLength = visibleLength, |
| 7440 _visibleOffset = visibleOffset; |
6751 | 7441 |
6752 /** | 7442 /** |
6753 * Flush [informative] data recursively. | 7443 * Flush [informative] data recursively. |
6754 */ | 7444 */ |
6755 void flushInformative() { | 7445 void flushInformative() { |
6756 _annotations?.forEach((b) => b.flushInformative()); | 7446 _annotations?.forEach((b) => b.flushInformative()); |
6757 _bodyExpr?.flushInformative(); | 7447 _bodyExpr?.flushInformative(); |
6758 _codeRange = null; | 7448 _codeRange = null; |
6759 _constantInitializers?.forEach((b) => b.flushInformative()); | 7449 _constantInitializers?.forEach((b) => b.flushInformative()); |
6760 _documentationComment = null; | 7450 _documentationComment = null; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6846 fb.Offset offset_localFunctions; | 7536 fb.Offset offset_localFunctions; |
6847 fb.Offset offset_localLabels; | 7537 fb.Offset offset_localLabels; |
6848 fb.Offset offset_localVariables; | 7538 fb.Offset offset_localVariables; |
6849 fb.Offset offset_name; | 7539 fb.Offset offset_name; |
6850 fb.Offset offset_parameters; | 7540 fb.Offset offset_parameters; |
6851 fb.Offset offset_redirectedConstructor; | 7541 fb.Offset offset_redirectedConstructor; |
6852 fb.Offset offset_redirectedConstructorName; | 7542 fb.Offset offset_redirectedConstructorName; |
6853 fb.Offset offset_returnType; | 7543 fb.Offset offset_returnType; |
6854 fb.Offset offset_typeParameters; | 7544 fb.Offset offset_typeParameters; |
6855 if (!(_annotations == null || _annotations.isEmpty)) { | 7545 if (!(_annotations == null || _annotations.isEmpty)) { |
6856 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 7546 offset_annotations = fbBuilder |
| 7547 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
6857 } | 7548 } |
6858 if (_bodyExpr != null) { | 7549 if (_bodyExpr != null) { |
6859 offset_bodyExpr = _bodyExpr.finish(fbBuilder); | 7550 offset_bodyExpr = _bodyExpr.finish(fbBuilder); |
6860 } | 7551 } |
6861 if (_codeRange != null) { | 7552 if (_codeRange != null) { |
6862 offset_codeRange = _codeRange.finish(fbBuilder); | 7553 offset_codeRange = _codeRange.finish(fbBuilder); |
6863 } | 7554 } |
6864 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { | 7555 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { |
6865 offset_constantInitializers = fbBuilder.writeList(_constantInitializers.ma
p((b) => b.finish(fbBuilder)).toList()); | 7556 offset_constantInitializers = fbBuilder.writeList( |
| 7557 _constantInitializers.map((b) => b.finish(fbBuilder)).toList()); |
6866 } | 7558 } |
6867 if (_documentationComment != null) { | 7559 if (_documentationComment != null) { |
6868 offset_documentationComment = _documentationComment.finish(fbBuilder); | 7560 offset_documentationComment = _documentationComment.finish(fbBuilder); |
6869 } | 7561 } |
6870 if (!(_localFunctions == null || _localFunctions.isEmpty)) { | 7562 if (!(_localFunctions == null || _localFunctions.isEmpty)) { |
6871 offset_localFunctions = fbBuilder.writeList(_localFunctions.map((b) => b.f
inish(fbBuilder)).toList()); | 7563 offset_localFunctions = fbBuilder |
| 7564 .writeList(_localFunctions.map((b) => b.finish(fbBuilder)).toList()); |
6872 } | 7565 } |
6873 if (!(_localLabels == null || _localLabels.isEmpty)) { | 7566 if (!(_localLabels == null || _localLabels.isEmpty)) { |
6874 offset_localLabels = fbBuilder.writeList(_localLabels.map((b) => b.finish(
fbBuilder)).toList()); | 7567 offset_localLabels = fbBuilder |
| 7568 .writeList(_localLabels.map((b) => b.finish(fbBuilder)).toList()); |
6875 } | 7569 } |
6876 if (!(_localVariables == null || _localVariables.isEmpty)) { | 7570 if (!(_localVariables == null || _localVariables.isEmpty)) { |
6877 offset_localVariables = fbBuilder.writeList(_localVariables.map((b) => b.f
inish(fbBuilder)).toList()); | 7571 offset_localVariables = fbBuilder |
| 7572 .writeList(_localVariables.map((b) => b.finish(fbBuilder)).toList()); |
6878 } | 7573 } |
6879 if (_name != null) { | 7574 if (_name != null) { |
6880 offset_name = fbBuilder.writeString(_name); | 7575 offset_name = fbBuilder.writeString(_name); |
6881 } | 7576 } |
6882 if (!(_parameters == null || _parameters.isEmpty)) { | 7577 if (!(_parameters == null || _parameters.isEmpty)) { |
6883 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 7578 offset_parameters = fbBuilder |
| 7579 .writeList(_parameters.map((b) => b.finish(fbBuilder)).toList()); |
6884 } | 7580 } |
6885 if (_redirectedConstructor != null) { | 7581 if (_redirectedConstructor != null) { |
6886 offset_redirectedConstructor = _redirectedConstructor.finish(fbBuilder); | 7582 offset_redirectedConstructor = _redirectedConstructor.finish(fbBuilder); |
6887 } | 7583 } |
6888 if (_redirectedConstructorName != null) { | 7584 if (_redirectedConstructorName != null) { |
6889 offset_redirectedConstructorName = fbBuilder.writeString(_redirectedConstr
uctorName); | 7585 offset_redirectedConstructorName = |
| 7586 fbBuilder.writeString(_redirectedConstructorName); |
6890 } | 7587 } |
6891 if (_returnType != null) { | 7588 if (_returnType != null) { |
6892 offset_returnType = _returnType.finish(fbBuilder); | 7589 offset_returnType = _returnType.finish(fbBuilder); |
6893 } | 7590 } |
6894 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 7591 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
6895 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 7592 offset_typeParameters = fbBuilder |
| 7593 .writeList(_typeParameters.map((b) => b.finish(fbBuilder)).toList()); |
6896 } | 7594 } |
6897 fbBuilder.startTable(); | 7595 fbBuilder.startTable(); |
6898 if (offset_annotations != null) { | 7596 if (offset_annotations != null) { |
6899 fbBuilder.addOffset(6, offset_annotations); | 7597 fbBuilder.addOffset(6, offset_annotations); |
6900 } | 7598 } |
6901 if (offset_bodyExpr != null) { | 7599 if (offset_bodyExpr != null) { |
6902 fbBuilder.addOffset(29, offset_bodyExpr); | 7600 fbBuilder.addOffset(29, offset_bodyExpr); |
6903 } | 7601 } |
6904 if (offset_codeRange != null) { | 7602 if (offset_codeRange != null) { |
6905 fbBuilder.addOffset(26, offset_codeRange); | 7603 fbBuilder.addOffset(26, offset_codeRange); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6982 if (_visibleLength != null && _visibleLength != 0) { | 7680 if (_visibleLength != null && _visibleLength != 0) { |
6983 fbBuilder.addUint32(20, _visibleLength); | 7681 fbBuilder.addUint32(20, _visibleLength); |
6984 } | 7682 } |
6985 if (_visibleOffset != null && _visibleOffset != 0) { | 7683 if (_visibleOffset != null && _visibleOffset != 0) { |
6986 fbBuilder.addUint32(21, _visibleOffset); | 7684 fbBuilder.addUint32(21, _visibleOffset); |
6987 } | 7685 } |
6988 return fbBuilder.endTable(); | 7686 return fbBuilder.endTable(); |
6989 } | 7687 } |
6990 } | 7688 } |
6991 | 7689 |
6992 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ | 7690 class _UnlinkedExecutableReader |
| 7691 extends fb.TableReader<_UnlinkedExecutableImpl> { |
6993 const _UnlinkedExecutableReader(); | 7692 const _UnlinkedExecutableReader(); |
6994 | 7693 |
6995 @override | 7694 @override |
6996 _UnlinkedExecutableImpl createObject(fb.BufferContext bc, int offset) => new _
UnlinkedExecutableImpl(bc, offset); | 7695 _UnlinkedExecutableImpl createObject(fb.BufferContext bc, int offset) => |
| 7696 new _UnlinkedExecutableImpl(bc, offset); |
6997 } | 7697 } |
6998 | 7698 |
6999 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { | 7699 class _UnlinkedExecutableImpl extends Object |
| 7700 with _UnlinkedExecutableMixin |
| 7701 implements idl.UnlinkedExecutable { |
7000 final fb.BufferContext _bc; | 7702 final fb.BufferContext _bc; |
7001 final int _bcOffset; | 7703 final int _bcOffset; |
7002 | 7704 |
7003 _UnlinkedExecutableImpl(this._bc, this._bcOffset); | 7705 _UnlinkedExecutableImpl(this._bc, this._bcOffset); |
7004 | 7706 |
7005 List<idl.UnlinkedExpr> _annotations; | 7707 List<idl.UnlinkedExpr> _annotations; |
7006 idl.UnlinkedExpr _bodyExpr; | 7708 idl.UnlinkedExpr _bodyExpr; |
7007 idl.CodeRange _codeRange; | 7709 idl.CodeRange _codeRange; |
7008 List<idl.UnlinkedConstructorInitializer> _constantInitializers; | 7710 List<idl.UnlinkedConstructorInitializer> _constantInitializers; |
7009 int _constCycleSlot; | 7711 int _constCycleSlot; |
(...skipping 18 matching lines...) Expand all Loading... |
7028 int _periodOffset; | 7730 int _periodOffset; |
7029 idl.EntityRef _redirectedConstructor; | 7731 idl.EntityRef _redirectedConstructor; |
7030 String _redirectedConstructorName; | 7732 String _redirectedConstructorName; |
7031 idl.EntityRef _returnType; | 7733 idl.EntityRef _returnType; |
7032 List<idl.UnlinkedTypeParam> _typeParameters; | 7734 List<idl.UnlinkedTypeParam> _typeParameters; |
7033 int _visibleLength; | 7735 int _visibleLength; |
7034 int _visibleOffset; | 7736 int _visibleOffset; |
7035 | 7737 |
7036 @override | 7738 @override |
7037 List<idl.UnlinkedExpr> get annotations { | 7739 List<idl.UnlinkedExpr> get annotations { |
7038 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 6, const <idl.UnlinkedExpr>[]); | 7740 _annotations ??= |
| 7741 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 7742 .vTableGet(_bc, _bcOffset, 6, const <idl.UnlinkedExpr>[]); |
7039 return _annotations; | 7743 return _annotations; |
7040 } | 7744 } |
7041 | 7745 |
7042 @override | 7746 @override |
7043 idl.UnlinkedExpr get bodyExpr { | 7747 idl.UnlinkedExpr get bodyExpr { |
7044 _bodyExpr ??= const _UnlinkedExprReader().vTableGet(_bc, _bcOffset, 29, null
); | 7748 _bodyExpr ??= |
| 7749 const _UnlinkedExprReader().vTableGet(_bc, _bcOffset, 29, null); |
7045 return _bodyExpr; | 7750 return _bodyExpr; |
7046 } | 7751 } |
7047 | 7752 |
7048 @override | 7753 @override |
7049 idl.CodeRange get codeRange { | 7754 idl.CodeRange get codeRange { |
7050 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 26, null); | 7755 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 26, null); |
7051 return _codeRange; | 7756 return _codeRange; |
7052 } | 7757 } |
7053 | 7758 |
7054 @override | 7759 @override |
7055 List<idl.UnlinkedConstructorInitializer> get constantInitializers { | 7760 List<idl.UnlinkedConstructorInitializer> get constantInitializers { |
7056 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial
izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bc, _bcOffset, 1
4, const <idl.UnlinkedConstructorInitializer>[]); | 7761 _constantInitializers ??= |
| 7762 const fb.ListReader<idl.UnlinkedConstructorInitializer>( |
| 7763 const _UnlinkedConstructorInitializerReader()) |
| 7764 .vTableGet(_bc, _bcOffset, 14, |
| 7765 const <idl.UnlinkedConstructorInitializer>[]); |
7057 return _constantInitializers; | 7766 return _constantInitializers; |
7058 } | 7767 } |
7059 | 7768 |
7060 @override | 7769 @override |
7061 int get constCycleSlot { | 7770 int get constCycleSlot { |
7062 _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 25, 0)
; | 7771 _constCycleSlot ??= |
| 7772 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 25, 0); |
7063 return _constCycleSlot; | 7773 return _constCycleSlot; |
7064 } | 7774 } |
7065 | 7775 |
7066 @override | 7776 @override |
7067 idl.UnlinkedDocumentationComment get documentationComment { | 7777 idl.UnlinkedDocumentationComment get documentationComment { |
7068 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bc, _bcOffset, 7, null); | 7778 _documentationComment ??= const _UnlinkedDocumentationCommentReader() |
| 7779 .vTableGet(_bc, _bcOffset, 7, null); |
7069 return _documentationComment; | 7780 return _documentationComment; |
7070 } | 7781 } |
7071 | 7782 |
7072 @override | 7783 @override |
7073 int get inferredReturnTypeSlot { | 7784 int get inferredReturnTypeSlot { |
7074 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset
, 5, 0); | 7785 _inferredReturnTypeSlot ??= |
| 7786 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5, 0); |
7075 return _inferredReturnTypeSlot; | 7787 return _inferredReturnTypeSlot; |
7076 } | 7788 } |
7077 | 7789 |
7078 @override | 7790 @override |
7079 bool get isAbstract { | 7791 bool get isAbstract { |
7080 _isAbstract ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 10, false); | 7792 _isAbstract ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 10, false); |
7081 return _isAbstract; | 7793 return _isAbstract; |
7082 } | 7794 } |
7083 | 7795 |
7084 @override | 7796 @override |
7085 bool get isAsynchronous { | 7797 bool get isAsynchronous { |
7086 _isAsynchronous ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 27, fals
e); | 7798 _isAsynchronous ??= |
| 7799 const fb.BoolReader().vTableGet(_bc, _bcOffset, 27, false); |
7087 return _isAsynchronous; | 7800 return _isAsynchronous; |
7088 } | 7801 } |
7089 | 7802 |
7090 @override | 7803 @override |
7091 bool get isConst { | 7804 bool get isConst { |
7092 _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 12, false); | 7805 _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 12, false); |
7093 return _isConst; | 7806 return _isConst; |
7094 } | 7807 } |
7095 | 7808 |
7096 @override | 7809 @override |
7097 bool get isExternal { | 7810 bool get isExternal { |
7098 _isExternal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 11, false); | 7811 _isExternal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 11, false); |
7099 return _isExternal; | 7812 return _isExternal; |
7100 } | 7813 } |
7101 | 7814 |
7102 @override | 7815 @override |
7103 bool get isFactory { | 7816 bool get isFactory { |
7104 _isFactory ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 8, false); | 7817 _isFactory ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 8, false); |
7105 return _isFactory; | 7818 return _isFactory; |
7106 } | 7819 } |
7107 | 7820 |
7108 @override | 7821 @override |
7109 bool get isGenerator { | 7822 bool get isGenerator { |
7110 _isGenerator ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 28, false); | 7823 _isGenerator ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 28, false); |
7111 return _isGenerator; | 7824 return _isGenerator; |
7112 } | 7825 } |
7113 | 7826 |
7114 @override | 7827 @override |
7115 bool get isRedirectedConstructor { | 7828 bool get isRedirectedConstructor { |
7116 _isRedirectedConstructor ??= const fb.BoolReader().vTableGet(_bc, _bcOffset,
13, false); | 7829 _isRedirectedConstructor ??= |
| 7830 const fb.BoolReader().vTableGet(_bc, _bcOffset, 13, false); |
7117 return _isRedirectedConstructor; | 7831 return _isRedirectedConstructor; |
7118 } | 7832 } |
7119 | 7833 |
7120 @override | 7834 @override |
7121 bool get isStatic { | 7835 bool get isStatic { |
7122 _isStatic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 9, false); | 7836 _isStatic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 9, false); |
7123 return _isStatic; | 7837 return _isStatic; |
7124 } | 7838 } |
7125 | 7839 |
7126 @override | 7840 @override |
7127 idl.UnlinkedExecutableKind get kind { | 7841 idl.UnlinkedExecutableKind get kind { |
7128 _kind ??= const _UnlinkedExecutableKindReader().vTableGet(_bc, _bcOffset, 4,
idl.UnlinkedExecutableKind.functionOrMethod); | 7842 _kind ??= const _UnlinkedExecutableKindReader().vTableGet( |
| 7843 _bc, _bcOffset, 4, idl.UnlinkedExecutableKind.functionOrMethod); |
7129 return _kind; | 7844 return _kind; |
7130 } | 7845 } |
7131 | 7846 |
7132 @override | 7847 @override |
7133 List<idl.UnlinkedExecutable> get localFunctions { | 7848 List<idl.UnlinkedExecutable> get localFunctions { |
7134 _localFunctions ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlin
kedExecutableReader()).vTableGet(_bc, _bcOffset, 18, const <idl.UnlinkedExecutab
le>[]); | 7849 _localFunctions ??= const fb.ListReader<idl.UnlinkedExecutable>( |
| 7850 const _UnlinkedExecutableReader()) |
| 7851 .vTableGet(_bc, _bcOffset, 18, const <idl.UnlinkedExecutable>[]); |
7135 return _localFunctions; | 7852 return _localFunctions; |
7136 } | 7853 } |
7137 | 7854 |
7138 @override | 7855 @override |
7139 List<idl.UnlinkedLabel> get localLabels { | 7856 List<idl.UnlinkedLabel> get localLabels { |
7140 _localLabels ??= const fb.ListReader<idl.UnlinkedLabel>(const _UnlinkedLabel
Reader()).vTableGet(_bc, _bcOffset, 22, const <idl.UnlinkedLabel>[]); | 7857 _localLabels ??= |
| 7858 const fb.ListReader<idl.UnlinkedLabel>(const _UnlinkedLabelReader()) |
| 7859 .vTableGet(_bc, _bcOffset, 22, const <idl.UnlinkedLabel>[]); |
7141 return _localLabels; | 7860 return _localLabels; |
7142 } | 7861 } |
7143 | 7862 |
7144 @override | 7863 @override |
7145 List<idl.UnlinkedVariable> get localVariables { | 7864 List<idl.UnlinkedVariable> get localVariables { |
7146 _localVariables ??= const fb.ListReader<idl.UnlinkedVariable>(const _Unlinke
dVariableReader()).vTableGet(_bc, _bcOffset, 19, const <idl.UnlinkedVariable>[])
; | 7865 _localVariables ??= const fb.ListReader<idl.UnlinkedVariable>( |
| 7866 const _UnlinkedVariableReader()) |
| 7867 .vTableGet(_bc, _bcOffset, 19, const <idl.UnlinkedVariable>[]); |
7147 return _localVariables; | 7868 return _localVariables; |
7148 } | 7869 } |
7149 | 7870 |
7150 @override | 7871 @override |
7151 String get name { | 7872 String get name { |
7152 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 7873 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
7153 return _name; | 7874 return _name; |
7154 } | 7875 } |
7155 | 7876 |
7156 @override | 7877 @override |
7157 int get nameEnd { | 7878 int get nameEnd { |
7158 _nameEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 23, 0); | 7879 _nameEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 23, 0); |
7159 return _nameEnd; | 7880 return _nameEnd; |
7160 } | 7881 } |
7161 | 7882 |
7162 @override | 7883 @override |
7163 int get nameOffset { | 7884 int get nameOffset { |
7164 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 7885 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
7165 return _nameOffset; | 7886 return _nameOffset; |
7166 } | 7887 } |
7167 | 7888 |
7168 @override | 7889 @override |
7169 List<idl.UnlinkedParam> get parameters { | 7890 List<idl.UnlinkedParam> get parameters { |
7170 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedParam>[]); | 7891 _parameters ??= |
| 7892 const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamReader()) |
| 7893 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedParam>[]); |
7171 return _parameters; | 7894 return _parameters; |
7172 } | 7895 } |
7173 | 7896 |
7174 @override | 7897 @override |
7175 int get periodOffset { | 7898 int get periodOffset { |
7176 _periodOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 24, 0); | 7899 _periodOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 24, 0); |
7177 return _periodOffset; | 7900 return _periodOffset; |
7178 } | 7901 } |
7179 | 7902 |
7180 @override | 7903 @override |
7181 idl.EntityRef get redirectedConstructor { | 7904 idl.EntityRef get redirectedConstructor { |
7182 _redirectedConstructor ??= const _EntityRefReader().vTableGet(_bc, _bcOffset
, 15, null); | 7905 _redirectedConstructor ??= |
| 7906 const _EntityRefReader().vTableGet(_bc, _bcOffset, 15, null); |
7183 return _redirectedConstructor; | 7907 return _redirectedConstructor; |
7184 } | 7908 } |
7185 | 7909 |
7186 @override | 7910 @override |
7187 String get redirectedConstructorName { | 7911 String get redirectedConstructorName { |
7188 _redirectedConstructorName ??= const fb.StringReader().vTableGet(_bc, _bcOff
set, 17, ''); | 7912 _redirectedConstructorName ??= |
| 7913 const fb.StringReader().vTableGet(_bc, _bcOffset, 17, ''); |
7189 return _redirectedConstructorName; | 7914 return _redirectedConstructorName; |
7190 } | 7915 } |
7191 | 7916 |
7192 @override | 7917 @override |
7193 idl.EntityRef get returnType { | 7918 idl.EntityRef get returnType { |
7194 _returnType ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); | 7919 _returnType ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); |
7195 return _returnType; | 7920 return _returnType; |
7196 } | 7921 } |
7197 | 7922 |
7198 @override | 7923 @override |
7199 List<idl.UnlinkedTypeParam> get typeParameters { | 7924 List<idl.UnlinkedTypeParam> get typeParameters { |
7200 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bc, _bcOffset, 16, const <idl.UnlinkedTypeParam>
[]); | 7925 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>( |
| 7926 const _UnlinkedTypeParamReader()) |
| 7927 .vTableGet(_bc, _bcOffset, 16, const <idl.UnlinkedTypeParam>[]); |
7201 return _typeParameters; | 7928 return _typeParameters; |
7202 } | 7929 } |
7203 | 7930 |
7204 @override | 7931 @override |
7205 int get visibleLength { | 7932 int get visibleLength { |
7206 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 20, 0); | 7933 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 20, 0); |
7207 return _visibleLength; | 7934 return _visibleLength; |
7208 } | 7935 } |
7209 | 7936 |
7210 @override | 7937 @override |
7211 int get visibleOffset { | 7938 int get visibleOffset { |
7212 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 21, 0); | 7939 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 21, 0); |
7213 return _visibleOffset; | 7940 return _visibleOffset; |
7214 } | 7941 } |
7215 } | 7942 } |
7216 | 7943 |
7217 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { | 7944 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { |
7218 @override | 7945 @override |
7219 Map<String, Object> toJson() { | 7946 Map<String, Object> toJson() { |
7220 Map<String, Object> _result = <String, Object>{}; | 7947 Map<String, Object> _result = <String, Object>{}; |
7221 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 7948 if (annotations.isNotEmpty) |
| 7949 _result["annotations"] = |
| 7950 annotations.map((_value) => _value.toJson()).toList(); |
7222 if (bodyExpr != null) _result["bodyExpr"] = bodyExpr.toJson(); | 7951 if (bodyExpr != null) _result["bodyExpr"] = bodyExpr.toJson(); |
7223 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 7952 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
7224 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const
antInitializers.map((_value) => _value.toJson()).toList(); | 7953 if (constantInitializers.isNotEmpty) |
| 7954 _result["constantInitializers"] = |
| 7955 constantInitializers.map((_value) => _value.toJson()).toList(); |
7225 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot; | 7956 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot; |
7226 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 7957 if (documentationComment != null) |
7227 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre
dReturnTypeSlot; | 7958 _result["documentationComment"] = documentationComment.toJson(); |
| 7959 if (inferredReturnTypeSlot != 0) |
| 7960 _result["inferredReturnTypeSlot"] = inferredReturnTypeSlot; |
7228 if (isAbstract != false) _result["isAbstract"] = isAbstract; | 7961 if (isAbstract != false) _result["isAbstract"] = isAbstract; |
7229 if (isAsynchronous != false) _result["isAsynchronous"] = isAsynchronous; | 7962 if (isAsynchronous != false) _result["isAsynchronous"] = isAsynchronous; |
7230 if (isConst != false) _result["isConst"] = isConst; | 7963 if (isConst != false) _result["isConst"] = isConst; |
7231 if (isExternal != false) _result["isExternal"] = isExternal; | 7964 if (isExternal != false) _result["isExternal"] = isExternal; |
7232 if (isFactory != false) _result["isFactory"] = isFactory; | 7965 if (isFactory != false) _result["isFactory"] = isFactory; |
7233 if (isGenerator != false) _result["isGenerator"] = isGenerator; | 7966 if (isGenerator != false) _result["isGenerator"] = isGenerator; |
7234 if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = i
sRedirectedConstructor; | 7967 if (isRedirectedConstructor != false) |
| 7968 _result["isRedirectedConstructor"] = isRedirectedConstructor; |
7235 if (isStatic != false) _result["isStatic"] = isStatic; | 7969 if (isStatic != false) _result["isStatic"] = isStatic; |
7236 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) _result["kind"] = k
ind.toString().split('.')[1]; | 7970 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) |
7237 if (localFunctions.isNotEmpty) _result["localFunctions"] = localFunctions.ma
p((_value) => _value.toJson()).toList(); | 7971 _result["kind"] = kind.toString().split('.')[1]; |
7238 if (localLabels.isNotEmpty) _result["localLabels"] = localLabels.map((_value
) => _value.toJson()).toList(); | 7972 if (localFunctions.isNotEmpty) |
7239 if (localVariables.isNotEmpty) _result["localVariables"] = localVariables.ma
p((_value) => _value.toJson()).toList(); | 7973 _result["localFunctions"] = |
| 7974 localFunctions.map((_value) => _value.toJson()).toList(); |
| 7975 if (localLabels.isNotEmpty) |
| 7976 _result["localLabels"] = |
| 7977 localLabels.map((_value) => _value.toJson()).toList(); |
| 7978 if (localVariables.isNotEmpty) |
| 7979 _result["localVariables"] = |
| 7980 localVariables.map((_value) => _value.toJson()).toList(); |
7240 if (name != '') _result["name"] = name; | 7981 if (name != '') _result["name"] = name; |
7241 if (nameEnd != 0) _result["nameEnd"] = nameEnd; | 7982 if (nameEnd != 0) _result["nameEnd"] = nameEnd; |
7242 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 7983 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
7243 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 7984 if (parameters.isNotEmpty) |
| 7985 _result["parameters"] = |
| 7986 parameters.map((_value) => _value.toJson()).toList(); |
7244 if (periodOffset != 0) _result["periodOffset"] = periodOffset; | 7987 if (periodOffset != 0) _result["periodOffset"] = periodOffset; |
7245 if (redirectedConstructor != null) _result["redirectedConstructor"] = redire
ctedConstructor.toJson(); | 7988 if (redirectedConstructor != null) |
7246 if (redirectedConstructorName != '') _result["redirectedConstructorName"] =
redirectedConstructorName; | 7989 _result["redirectedConstructor"] = redirectedConstructor.toJson(); |
| 7990 if (redirectedConstructorName != '') |
| 7991 _result["redirectedConstructorName"] = redirectedConstructorName; |
7247 if (returnType != null) _result["returnType"] = returnType.toJson(); | 7992 if (returnType != null) _result["returnType"] = returnType.toJson(); |
7248 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 7993 if (typeParameters.isNotEmpty) |
| 7994 _result["typeParameters"] = |
| 7995 typeParameters.map((_value) => _value.toJson()).toList(); |
7249 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 7996 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
7250 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 7997 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
7251 return _result; | 7998 return _result; |
7252 } | 7999 } |
7253 | 8000 |
7254 @override | 8001 @override |
7255 Map<String, Object> toMap() => { | 8002 Map<String, Object> toMap() => { |
7256 "annotations": annotations, | 8003 "annotations": annotations, |
7257 "bodyExpr": bodyExpr, | 8004 "bodyExpr": bodyExpr, |
7258 "codeRange": codeRange, | 8005 "codeRange": codeRange, |
7259 "constantInitializers": constantInitializers, | 8006 "constantInitializers": constantInitializers, |
7260 "constCycleSlot": constCycleSlot, | 8007 "constCycleSlot": constCycleSlot, |
7261 "documentationComment": documentationComment, | 8008 "documentationComment": documentationComment, |
7262 "inferredReturnTypeSlot": inferredReturnTypeSlot, | 8009 "inferredReturnTypeSlot": inferredReturnTypeSlot, |
7263 "isAbstract": isAbstract, | 8010 "isAbstract": isAbstract, |
7264 "isAsynchronous": isAsynchronous, | 8011 "isAsynchronous": isAsynchronous, |
7265 "isConst": isConst, | 8012 "isConst": isConst, |
7266 "isExternal": isExternal, | 8013 "isExternal": isExternal, |
7267 "isFactory": isFactory, | 8014 "isFactory": isFactory, |
7268 "isGenerator": isGenerator, | 8015 "isGenerator": isGenerator, |
7269 "isRedirectedConstructor": isRedirectedConstructor, | 8016 "isRedirectedConstructor": isRedirectedConstructor, |
7270 "isStatic": isStatic, | 8017 "isStatic": isStatic, |
7271 "kind": kind, | 8018 "kind": kind, |
7272 "localFunctions": localFunctions, | 8019 "localFunctions": localFunctions, |
7273 "localLabels": localLabels, | 8020 "localLabels": localLabels, |
7274 "localVariables": localVariables, | 8021 "localVariables": localVariables, |
7275 "name": name, | 8022 "name": name, |
7276 "nameEnd": nameEnd, | 8023 "nameEnd": nameEnd, |
7277 "nameOffset": nameOffset, | 8024 "nameOffset": nameOffset, |
7278 "parameters": parameters, | 8025 "parameters": parameters, |
7279 "periodOffset": periodOffset, | 8026 "periodOffset": periodOffset, |
7280 "redirectedConstructor": redirectedConstructor, | 8027 "redirectedConstructor": redirectedConstructor, |
7281 "redirectedConstructorName": redirectedConstructorName, | 8028 "redirectedConstructorName": redirectedConstructorName, |
7282 "returnType": returnType, | 8029 "returnType": returnType, |
7283 "typeParameters": typeParameters, | 8030 "typeParameters": typeParameters, |
7284 "visibleLength": visibleLength, | 8031 "visibleLength": visibleLength, |
7285 "visibleOffset": visibleOffset, | 8032 "visibleOffset": visibleOffset, |
7286 }; | 8033 }; |
7287 | 8034 |
7288 @override | 8035 @override |
7289 String toString() => convert.JSON.encode(toJson()); | 8036 String toString() => convert.JSON.encode(toJson()); |
7290 } | 8037 } |
7291 | 8038 |
7292 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { | 8039 class UnlinkedExportNonPublicBuilder extends Object |
| 8040 with _UnlinkedExportNonPublicMixin |
| 8041 implements idl.UnlinkedExportNonPublic { |
7293 List<UnlinkedExprBuilder> _annotations; | 8042 List<UnlinkedExprBuilder> _annotations; |
7294 int _offset; | 8043 int _offset; |
7295 int _uriEnd; | 8044 int _uriEnd; |
7296 int _uriOffset; | 8045 int _uriOffset; |
7297 | 8046 |
7298 @override | 8047 @override |
7299 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 8048 List<UnlinkedExprBuilder> get annotations => |
| 8049 _annotations ??= <UnlinkedExprBuilder>[]; |
7300 | 8050 |
7301 /** | 8051 /** |
7302 * Annotations for this export directive. | 8052 * Annotations for this export directive. |
7303 */ | 8053 */ |
7304 void set annotations(List<UnlinkedExprBuilder> value) { | 8054 void set annotations(List<UnlinkedExprBuilder> value) { |
7305 this._annotations = value; | 8055 this._annotations = value; |
7306 } | 8056 } |
7307 | 8057 |
7308 @override | 8058 @override |
7309 int get offset => _offset ??= 0; | 8059 int get offset => _offset ??= 0; |
(...skipping 23 matching lines...) Expand all Loading... |
7333 | 8083 |
7334 /** | 8084 /** |
7335 * Offset of the URI string (including quotes) relative to the beginning of | 8085 * Offset of the URI string (including quotes) relative to the beginning of |
7336 * the file. | 8086 * the file. |
7337 */ | 8087 */ |
7338 void set uriOffset(int value) { | 8088 void set uriOffset(int value) { |
7339 assert(value == null || value >= 0); | 8089 assert(value == null || value >= 0); |
7340 this._uriOffset = value; | 8090 this._uriOffset = value; |
7341 } | 8091 } |
7342 | 8092 |
7343 UnlinkedExportNonPublicBuilder({List<UnlinkedExprBuilder> annotations, int off
set, int uriEnd, int uriOffset}) | 8093 UnlinkedExportNonPublicBuilder( |
7344 : _annotations = annotations, | 8094 {List<UnlinkedExprBuilder> annotations, |
7345 _offset = offset, | 8095 int offset, |
7346 _uriEnd = uriEnd, | 8096 int uriEnd, |
7347 _uriOffset = uriOffset; | 8097 int uriOffset}) |
| 8098 : _annotations = annotations, |
| 8099 _offset = offset, |
| 8100 _uriEnd = uriEnd, |
| 8101 _uriOffset = uriOffset; |
7348 | 8102 |
7349 /** | 8103 /** |
7350 * Flush [informative] data recursively. | 8104 * Flush [informative] data recursively. |
7351 */ | 8105 */ |
7352 void flushInformative() { | 8106 void flushInformative() { |
7353 _annotations?.forEach((b) => b.flushInformative()); | 8107 _annotations?.forEach((b) => b.flushInformative()); |
7354 _offset = null; | 8108 _offset = null; |
7355 _uriEnd = null; | 8109 _uriEnd = null; |
7356 _uriOffset = null; | 8110 _uriOffset = null; |
7357 } | 8111 } |
7358 | 8112 |
7359 /** | 8113 /** |
7360 * Accumulate non-[informative] data into [signature]. | 8114 * Accumulate non-[informative] data into [signature]. |
7361 */ | 8115 */ |
7362 void collectApiSignature(api_sig.ApiSignature signature) { | 8116 void collectApiSignature(api_sig.ApiSignature signature) { |
7363 if (this._annotations == null) { | 8117 if (this._annotations == null) { |
7364 signature.addInt(0); | 8118 signature.addInt(0); |
7365 } else { | 8119 } else { |
7366 signature.addInt(this._annotations.length); | 8120 signature.addInt(this._annotations.length); |
7367 for (var x in this._annotations) { | 8121 for (var x in this._annotations) { |
7368 x?.collectApiSignature(signature); | 8122 x?.collectApiSignature(signature); |
7369 } | 8123 } |
7370 } | 8124 } |
7371 } | 8125 } |
7372 | 8126 |
7373 fb.Offset finish(fb.Builder fbBuilder) { | 8127 fb.Offset finish(fb.Builder fbBuilder) { |
7374 fb.Offset offset_annotations; | 8128 fb.Offset offset_annotations; |
7375 if (!(_annotations == null || _annotations.isEmpty)) { | 8129 if (!(_annotations == null || _annotations.isEmpty)) { |
7376 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 8130 offset_annotations = fbBuilder |
| 8131 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
7377 } | 8132 } |
7378 fbBuilder.startTable(); | 8133 fbBuilder.startTable(); |
7379 if (offset_annotations != null) { | 8134 if (offset_annotations != null) { |
7380 fbBuilder.addOffset(3, offset_annotations); | 8135 fbBuilder.addOffset(3, offset_annotations); |
7381 } | 8136 } |
7382 if (_offset != null && _offset != 0) { | 8137 if (_offset != null && _offset != 0) { |
7383 fbBuilder.addUint32(0, _offset); | 8138 fbBuilder.addUint32(0, _offset); |
7384 } | 8139 } |
7385 if (_uriEnd != null && _uriEnd != 0) { | 8140 if (_uriEnd != null && _uriEnd != 0) { |
7386 fbBuilder.addUint32(1, _uriEnd); | 8141 fbBuilder.addUint32(1, _uriEnd); |
7387 } | 8142 } |
7388 if (_uriOffset != null && _uriOffset != 0) { | 8143 if (_uriOffset != null && _uriOffset != 0) { |
7389 fbBuilder.addUint32(2, _uriOffset); | 8144 fbBuilder.addUint32(2, _uriOffset); |
7390 } | 8145 } |
7391 return fbBuilder.endTable(); | 8146 return fbBuilder.endTable(); |
7392 } | 8147 } |
7393 } | 8148 } |
7394 | 8149 |
7395 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu
blicImpl> { | 8150 class _UnlinkedExportNonPublicReader |
| 8151 extends fb.TableReader<_UnlinkedExportNonPublicImpl> { |
7396 const _UnlinkedExportNonPublicReader(); | 8152 const _UnlinkedExportNonPublicReader(); |
7397 | 8153 |
7398 @override | 8154 @override |
7399 _UnlinkedExportNonPublicImpl createObject(fb.BufferContext bc, int offset) =>
new _UnlinkedExportNonPublicImpl(bc, offset); | 8155 _UnlinkedExportNonPublicImpl createObject(fb.BufferContext bc, int offset) => |
| 8156 new _UnlinkedExportNonPublicImpl(bc, offset); |
7400 } | 8157 } |
7401 | 8158 |
7402 class _UnlinkedExportNonPublicImpl extends Object with _UnlinkedExportNonPublicM
ixin implements idl.UnlinkedExportNonPublic { | 8159 class _UnlinkedExportNonPublicImpl extends Object |
| 8160 with _UnlinkedExportNonPublicMixin |
| 8161 implements idl.UnlinkedExportNonPublic { |
7403 final fb.BufferContext _bc; | 8162 final fb.BufferContext _bc; |
7404 final int _bcOffset; | 8163 final int _bcOffset; |
7405 | 8164 |
7406 _UnlinkedExportNonPublicImpl(this._bc, this._bcOffset); | 8165 _UnlinkedExportNonPublicImpl(this._bc, this._bcOffset); |
7407 | 8166 |
7408 List<idl.UnlinkedExpr> _annotations; | 8167 List<idl.UnlinkedExpr> _annotations; |
7409 int _offset; | 8168 int _offset; |
7410 int _uriEnd; | 8169 int _uriEnd; |
7411 int _uriOffset; | 8170 int _uriOffset; |
7412 | 8171 |
7413 @override | 8172 @override |
7414 List<idl.UnlinkedExpr> get annotations { | 8173 List<idl.UnlinkedExpr> get annotations { |
7415 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedExpr>[]); | 8174 _annotations ??= |
| 8175 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 8176 .vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedExpr>[]); |
7416 return _annotations; | 8177 return _annotations; |
7417 } | 8178 } |
7418 | 8179 |
7419 @override | 8180 @override |
7420 int get offset { | 8181 int get offset { |
7421 _offset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 8182 _offset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
7422 return _offset; | 8183 return _offset; |
7423 } | 8184 } |
7424 | 8185 |
7425 @override | 8186 @override |
7426 int get uriEnd { | 8187 int get uriEnd { |
7427 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 8188 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
7428 return _uriEnd; | 8189 return _uriEnd; |
7429 } | 8190 } |
7430 | 8191 |
7431 @override | 8192 @override |
7432 int get uriOffset { | 8193 int get uriOffset { |
7433 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); | 8194 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
7434 return _uriOffset; | 8195 return _uriOffset; |
7435 } | 8196 } |
7436 } | 8197 } |
7437 | 8198 |
7438 abstract class _UnlinkedExportNonPublicMixin implements idl.UnlinkedExportNonPub
lic { | 8199 abstract class _UnlinkedExportNonPublicMixin |
| 8200 implements idl.UnlinkedExportNonPublic { |
7439 @override | 8201 @override |
7440 Map<String, Object> toJson() { | 8202 Map<String, Object> toJson() { |
7441 Map<String, Object> _result = <String, Object>{}; | 8203 Map<String, Object> _result = <String, Object>{}; |
7442 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 8204 if (annotations.isNotEmpty) |
| 8205 _result["annotations"] = |
| 8206 annotations.map((_value) => _value.toJson()).toList(); |
7443 if (offset != 0) _result["offset"] = offset; | 8207 if (offset != 0) _result["offset"] = offset; |
7444 if (uriEnd != 0) _result["uriEnd"] = uriEnd; | 8208 if (uriEnd != 0) _result["uriEnd"] = uriEnd; |
7445 if (uriOffset != 0) _result["uriOffset"] = uriOffset; | 8209 if (uriOffset != 0) _result["uriOffset"] = uriOffset; |
7446 return _result; | 8210 return _result; |
7447 } | 8211 } |
7448 | 8212 |
7449 @override | 8213 @override |
7450 Map<String, Object> toMap() => { | 8214 Map<String, Object> toMap() => { |
7451 "annotations": annotations, | 8215 "annotations": annotations, |
7452 "offset": offset, | 8216 "offset": offset, |
7453 "uriEnd": uriEnd, | 8217 "uriEnd": uriEnd, |
7454 "uriOffset": uriOffset, | 8218 "uriOffset": uriOffset, |
7455 }; | 8219 }; |
7456 | 8220 |
7457 @override | 8221 @override |
7458 String toString() => convert.JSON.encode(toJson()); | 8222 String toString() => convert.JSON.encode(toJson()); |
7459 } | 8223 } |
7460 | 8224 |
7461 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin
implements idl.UnlinkedExportPublic { | 8225 class UnlinkedExportPublicBuilder extends Object |
| 8226 with _UnlinkedExportPublicMixin |
| 8227 implements idl.UnlinkedExportPublic { |
7462 List<UnlinkedCombinatorBuilder> _combinators; | 8228 List<UnlinkedCombinatorBuilder> _combinators; |
7463 List<UnlinkedConfigurationBuilder> _configurations; | 8229 List<UnlinkedConfigurationBuilder> _configurations; |
7464 String _uri; | 8230 String _uri; |
7465 | 8231 |
7466 @override | 8232 @override |
7467 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; | 8233 List<UnlinkedCombinatorBuilder> get combinators => |
| 8234 _combinators ??= <UnlinkedCombinatorBuilder>[]; |
7468 | 8235 |
7469 /** | 8236 /** |
7470 * Combinators contained in this export declaration. | 8237 * Combinators contained in this export declaration. |
7471 */ | 8238 */ |
7472 void set combinators(List<UnlinkedCombinatorBuilder> value) { | 8239 void set combinators(List<UnlinkedCombinatorBuilder> value) { |
7473 this._combinators = value; | 8240 this._combinators = value; |
7474 } | 8241 } |
7475 | 8242 |
7476 @override | 8243 @override |
7477 List<UnlinkedConfigurationBuilder> get configurations => _configurations ??= <
UnlinkedConfigurationBuilder>[]; | 8244 List<UnlinkedConfigurationBuilder> get configurations => |
| 8245 _configurations ??= <UnlinkedConfigurationBuilder>[]; |
7478 | 8246 |
7479 /** | 8247 /** |
7480 * Configurations used to control which library will actually be loaded at | 8248 * Configurations used to control which library will actually be loaded at |
7481 * run-time. | 8249 * run-time. |
7482 */ | 8250 */ |
7483 void set configurations(List<UnlinkedConfigurationBuilder> value) { | 8251 void set configurations(List<UnlinkedConfigurationBuilder> value) { |
7484 this._configurations = value; | 8252 this._configurations = value; |
7485 } | 8253 } |
7486 | 8254 |
7487 @override | 8255 @override |
7488 String get uri => _uri ??= ''; | 8256 String get uri => _uri ??= ''; |
7489 | 8257 |
7490 /** | 8258 /** |
7491 * URI used in the source code to reference the exported library. | 8259 * URI used in the source code to reference the exported library. |
7492 */ | 8260 */ |
7493 void set uri(String value) { | 8261 void set uri(String value) { |
7494 this._uri = value; | 8262 this._uri = value; |
7495 } | 8263 } |
7496 | 8264 |
7497 UnlinkedExportPublicBuilder({List<UnlinkedCombinatorBuilder> combinators, List
<UnlinkedConfigurationBuilder> configurations, String uri}) | 8265 UnlinkedExportPublicBuilder( |
7498 : _combinators = combinators, | 8266 {List<UnlinkedCombinatorBuilder> combinators, |
7499 _configurations = configurations, | 8267 List<UnlinkedConfigurationBuilder> configurations, |
7500 _uri = uri; | 8268 String uri}) |
| 8269 : _combinators = combinators, |
| 8270 _configurations = configurations, |
| 8271 _uri = uri; |
7501 | 8272 |
7502 /** | 8273 /** |
7503 * Flush [informative] data recursively. | 8274 * Flush [informative] data recursively. |
7504 */ | 8275 */ |
7505 void flushInformative() { | 8276 void flushInformative() { |
7506 _combinators?.forEach((b) => b.flushInformative()); | 8277 _combinators?.forEach((b) => b.flushInformative()); |
7507 _configurations?.forEach((b) => b.flushInformative()); | 8278 _configurations?.forEach((b) => b.flushInformative()); |
7508 } | 8279 } |
7509 | 8280 |
7510 /** | 8281 /** |
(...skipping 17 matching lines...) Expand all Loading... |
7528 x?.collectApiSignature(signature); | 8299 x?.collectApiSignature(signature); |
7529 } | 8300 } |
7530 } | 8301 } |
7531 } | 8302 } |
7532 | 8303 |
7533 fb.Offset finish(fb.Builder fbBuilder) { | 8304 fb.Offset finish(fb.Builder fbBuilder) { |
7534 fb.Offset offset_combinators; | 8305 fb.Offset offset_combinators; |
7535 fb.Offset offset_configurations; | 8306 fb.Offset offset_configurations; |
7536 fb.Offset offset_uri; | 8307 fb.Offset offset_uri; |
7537 if (!(_combinators == null || _combinators.isEmpty)) { | 8308 if (!(_combinators == null || _combinators.isEmpty)) { |
7538 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); | 8309 offset_combinators = fbBuilder |
| 8310 .writeList(_combinators.map((b) => b.finish(fbBuilder)).toList()); |
7539 } | 8311 } |
7540 if (!(_configurations == null || _configurations.isEmpty)) { | 8312 if (!(_configurations == null || _configurations.isEmpty)) { |
7541 offset_configurations = fbBuilder.writeList(_configurations.map((b) => b.f
inish(fbBuilder)).toList()); | 8313 offset_configurations = fbBuilder |
| 8314 .writeList(_configurations.map((b) => b.finish(fbBuilder)).toList()); |
7542 } | 8315 } |
7543 if (_uri != null) { | 8316 if (_uri != null) { |
7544 offset_uri = fbBuilder.writeString(_uri); | 8317 offset_uri = fbBuilder.writeString(_uri); |
7545 } | 8318 } |
7546 fbBuilder.startTable(); | 8319 fbBuilder.startTable(); |
7547 if (offset_combinators != null) { | 8320 if (offset_combinators != null) { |
7548 fbBuilder.addOffset(1, offset_combinators); | 8321 fbBuilder.addOffset(1, offset_combinators); |
7549 } | 8322 } |
7550 if (offset_configurations != null) { | 8323 if (offset_configurations != null) { |
7551 fbBuilder.addOffset(2, offset_configurations); | 8324 fbBuilder.addOffset(2, offset_configurations); |
7552 } | 8325 } |
7553 if (offset_uri != null) { | 8326 if (offset_uri != null) { |
7554 fbBuilder.addOffset(0, offset_uri); | 8327 fbBuilder.addOffset(0, offset_uri); |
7555 } | 8328 } |
7556 return fbBuilder.endTable(); | 8329 return fbBuilder.endTable(); |
7557 } | 8330 } |
7558 } | 8331 } |
7559 | 8332 |
7560 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm
pl> { | 8333 class _UnlinkedExportPublicReader |
| 8334 extends fb.TableReader<_UnlinkedExportPublicImpl> { |
7561 const _UnlinkedExportPublicReader(); | 8335 const _UnlinkedExportPublicReader(); |
7562 | 8336 |
7563 @override | 8337 @override |
7564 _UnlinkedExportPublicImpl createObject(fb.BufferContext bc, int offset) => new
_UnlinkedExportPublicImpl(bc, offset); | 8338 _UnlinkedExportPublicImpl createObject(fb.BufferContext bc, int offset) => |
| 8339 new _UnlinkedExportPublicImpl(bc, offset); |
7565 } | 8340 } |
7566 | 8341 |
7567 class _UnlinkedExportPublicImpl extends Object with _UnlinkedExportPublicMixin i
mplements idl.UnlinkedExportPublic { | 8342 class _UnlinkedExportPublicImpl extends Object |
| 8343 with _UnlinkedExportPublicMixin |
| 8344 implements idl.UnlinkedExportPublic { |
7568 final fb.BufferContext _bc; | 8345 final fb.BufferContext _bc; |
7569 final int _bcOffset; | 8346 final int _bcOffset; |
7570 | 8347 |
7571 _UnlinkedExportPublicImpl(this._bc, this._bcOffset); | 8348 _UnlinkedExportPublicImpl(this._bc, this._bcOffset); |
7572 | 8349 |
7573 List<idl.UnlinkedCombinator> _combinators; | 8350 List<idl.UnlinkedCombinator> _combinators; |
7574 List<idl.UnlinkedConfiguration> _configurations; | 8351 List<idl.UnlinkedConfiguration> _configurations; |
7575 String _uri; | 8352 String _uri; |
7576 | 8353 |
7577 @override | 8354 @override |
7578 List<idl.UnlinkedCombinator> get combinators { | 8355 List<idl.UnlinkedCombinator> get combinators { |
7579 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked
CombinatorReader()).vTableGet(_bc, _bcOffset, 1, const <idl.UnlinkedCombinator>[
]); | 8356 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>( |
| 8357 const _UnlinkedCombinatorReader()) |
| 8358 .vTableGet(_bc, _bcOffset, 1, const <idl.UnlinkedCombinator>[]); |
7580 return _combinators; | 8359 return _combinators; |
7581 } | 8360 } |
7582 | 8361 |
7583 @override | 8362 @override |
7584 List<idl.UnlinkedConfiguration> get configurations { | 8363 List<idl.UnlinkedConfiguration> get configurations { |
7585 _configurations ??= const fb.ListReader<idl.UnlinkedConfiguration>(const _Un
linkedConfigurationReader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedCon
figuration>[]); | 8364 _configurations ??= const fb.ListReader<idl.UnlinkedConfiguration>( |
| 8365 const _UnlinkedConfigurationReader()) |
| 8366 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedConfiguration>[]); |
7586 return _configurations; | 8367 return _configurations; |
7587 } | 8368 } |
7588 | 8369 |
7589 @override | 8370 @override |
7590 String get uri { | 8371 String get uri { |
7591 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 8372 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
7592 return _uri; | 8373 return _uri; |
7593 } | 8374 } |
7594 } | 8375 } |
7595 | 8376 |
7596 abstract class _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic { | 8377 abstract class _UnlinkedExportPublicMixin implements idl.UnlinkedExportPublic { |
7597 @override | 8378 @override |
7598 Map<String, Object> toJson() { | 8379 Map<String, Object> toJson() { |
7599 Map<String, Object> _result = <String, Object>{}; | 8380 Map<String, Object> _result = <String, Object>{}; |
7600 if (combinators.isNotEmpty) _result["combinators"] = combinators.map((_value
) => _value.toJson()).toList(); | 8381 if (combinators.isNotEmpty) |
7601 if (configurations.isNotEmpty) _result["configurations"] = configurations.ma
p((_value) => _value.toJson()).toList(); | 8382 _result["combinators"] = |
| 8383 combinators.map((_value) => _value.toJson()).toList(); |
| 8384 if (configurations.isNotEmpty) |
| 8385 _result["configurations"] = |
| 8386 configurations.map((_value) => _value.toJson()).toList(); |
7602 if (uri != '') _result["uri"] = uri; | 8387 if (uri != '') _result["uri"] = uri; |
7603 return _result; | 8388 return _result; |
7604 } | 8389 } |
7605 | 8390 |
7606 @override | 8391 @override |
7607 Map<String, Object> toMap() => { | 8392 Map<String, Object> toMap() => { |
7608 "combinators": combinators, | 8393 "combinators": combinators, |
7609 "configurations": configurations, | 8394 "configurations": configurations, |
7610 "uri": uri, | 8395 "uri": uri, |
7611 }; | 8396 }; |
7612 | 8397 |
7613 @override | 8398 @override |
7614 String toString() => convert.JSON.encode(toJson()); | 8399 String toString() => convert.JSON.encode(toJson()); |
7615 } | 8400 } |
7616 | 8401 |
7617 class UnlinkedExprBuilder extends Object with _UnlinkedExprMixin implements idl.
UnlinkedExpr { | 8402 class UnlinkedExprBuilder extends Object |
| 8403 with _UnlinkedExprMixin |
| 8404 implements idl.UnlinkedExpr { |
7618 List<idl.UnlinkedExprAssignOperator> _assignmentOperators; | 8405 List<idl.UnlinkedExprAssignOperator> _assignmentOperators; |
7619 List<double> _doubles; | 8406 List<double> _doubles; |
7620 List<int> _ints; | 8407 List<int> _ints; |
7621 bool _isValidConst; | 8408 bool _isValidConst; |
7622 List<idl.UnlinkedExprOperation> _operations; | 8409 List<idl.UnlinkedExprOperation> _operations; |
7623 List<EntityRefBuilder> _references; | 8410 List<EntityRefBuilder> _references; |
7624 List<String> _strings; | 8411 List<String> _strings; |
7625 | 8412 |
7626 @override | 8413 @override |
7627 List<idl.UnlinkedExprAssignOperator> get assignmentOperators => _assignmentOpe
rators ??= <idl.UnlinkedExprAssignOperator>[]; | 8414 List<idl.UnlinkedExprAssignOperator> get assignmentOperators => |
| 8415 _assignmentOperators ??= <idl.UnlinkedExprAssignOperator>[]; |
7628 | 8416 |
7629 /** | 8417 /** |
7630 * Sequence of operators used by assignment operations. | 8418 * Sequence of operators used by assignment operations. |
7631 */ | 8419 */ |
7632 void set assignmentOperators(List<idl.UnlinkedExprAssignOperator> value) { | 8420 void set assignmentOperators(List<idl.UnlinkedExprAssignOperator> value) { |
7633 this._assignmentOperators = value; | 8421 this._assignmentOperators = value; |
7634 } | 8422 } |
7635 | 8423 |
7636 @override | 8424 @override |
7637 List<double> get doubles => _doubles ??= <double>[]; | 8425 List<double> get doubles => _doubles ??= <double>[]; |
(...skipping 23 matching lines...) Expand all Loading... |
7661 | 8449 |
7662 /** | 8450 /** |
7663 * Indicates whether the expression is a valid potentially constant | 8451 * Indicates whether the expression is a valid potentially constant |
7664 * expression. | 8452 * expression. |
7665 */ | 8453 */ |
7666 void set isValidConst(bool value) { | 8454 void set isValidConst(bool value) { |
7667 this._isValidConst = value; | 8455 this._isValidConst = value; |
7668 } | 8456 } |
7669 | 8457 |
7670 @override | 8458 @override |
7671 List<idl.UnlinkedExprOperation> get operations => _operations ??= <idl.Unlinke
dExprOperation>[]; | 8459 List<idl.UnlinkedExprOperation> get operations => |
| 8460 _operations ??= <idl.UnlinkedExprOperation>[]; |
7672 | 8461 |
7673 /** | 8462 /** |
7674 * Sequence of operations to execute (starting with an empty stack) to form | 8463 * Sequence of operations to execute (starting with an empty stack) to form |
7675 * the constant value. | 8464 * the constant value. |
7676 */ | 8465 */ |
7677 void set operations(List<idl.UnlinkedExprOperation> value) { | 8466 void set operations(List<idl.UnlinkedExprOperation> value) { |
7678 this._operations = value; | 8467 this._operations = value; |
7679 } | 8468 } |
7680 | 8469 |
7681 @override | 8470 @override |
(...skipping 13 matching lines...) Expand all Loading... |
7695 List<String> get strings => _strings ??= <String>[]; | 8484 List<String> get strings => _strings ??= <String>[]; |
7696 | 8485 |
7697 /** | 8486 /** |
7698 * Sequence of strings consumed by the operations `pushString` and | 8487 * Sequence of strings consumed by the operations `pushString` and |
7699 * `invokeConstructor`. | 8488 * `invokeConstructor`. |
7700 */ | 8489 */ |
7701 void set strings(List<String> value) { | 8490 void set strings(List<String> value) { |
7702 this._strings = value; | 8491 this._strings = value; |
7703 } | 8492 } |
7704 | 8493 |
7705 UnlinkedExprBuilder({List<idl.UnlinkedExprAssignOperator> assignmentOperators,
List<double> doubles, List<int> ints, bool isValidConst, List<idl.UnlinkedExprO
peration> operations, List<EntityRefBuilder> references, List<String> strings}) | 8494 UnlinkedExprBuilder( |
7706 : _assignmentOperators = assignmentOperators, | 8495 {List<idl.UnlinkedExprAssignOperator> assignmentOperators, |
7707 _doubles = doubles, | 8496 List<double> doubles, |
7708 _ints = ints, | 8497 List<int> ints, |
7709 _isValidConst = isValidConst, | 8498 bool isValidConst, |
7710 _operations = operations, | 8499 List<idl.UnlinkedExprOperation> operations, |
7711 _references = references, | 8500 List<EntityRefBuilder> references, |
7712 _strings = strings; | 8501 List<String> strings}) |
| 8502 : _assignmentOperators = assignmentOperators, |
| 8503 _doubles = doubles, |
| 8504 _ints = ints, |
| 8505 _isValidConst = isValidConst, |
| 8506 _operations = operations, |
| 8507 _references = references, |
| 8508 _strings = strings; |
7713 | 8509 |
7714 /** | 8510 /** |
7715 * Flush [informative] data recursively. | 8511 * Flush [informative] data recursively. |
7716 */ | 8512 */ |
7717 void flushInformative() { | 8513 void flushInformative() { |
7718 _references?.forEach((b) => b.flushInformative()); | 8514 _references?.forEach((b) => b.flushInformative()); |
7719 } | 8515 } |
7720 | 8516 |
7721 /** | 8517 /** |
7722 * Accumulate non-[informative] data into [signature]. | 8518 * Accumulate non-[informative] data into [signature]. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7774 } | 8570 } |
7775 | 8571 |
7776 fb.Offset finish(fb.Builder fbBuilder) { | 8572 fb.Offset finish(fb.Builder fbBuilder) { |
7777 fb.Offset offset_assignmentOperators; | 8573 fb.Offset offset_assignmentOperators; |
7778 fb.Offset offset_doubles; | 8574 fb.Offset offset_doubles; |
7779 fb.Offset offset_ints; | 8575 fb.Offset offset_ints; |
7780 fb.Offset offset_operations; | 8576 fb.Offset offset_operations; |
7781 fb.Offset offset_references; | 8577 fb.Offset offset_references; |
7782 fb.Offset offset_strings; | 8578 fb.Offset offset_strings; |
7783 if (!(_assignmentOperators == null || _assignmentOperators.isEmpty)) { | 8579 if (!(_assignmentOperators == null || _assignmentOperators.isEmpty)) { |
7784 offset_assignmentOperators = fbBuilder.writeListUint8(_assignmentOperators
.map((b) => b.index).toList()); | 8580 offset_assignmentOperators = fbBuilder |
| 8581 .writeListUint8(_assignmentOperators.map((b) => b.index).toList()); |
7785 } | 8582 } |
7786 if (!(_doubles == null || _doubles.isEmpty)) { | 8583 if (!(_doubles == null || _doubles.isEmpty)) { |
7787 offset_doubles = fbBuilder.writeListFloat64(_doubles); | 8584 offset_doubles = fbBuilder.writeListFloat64(_doubles); |
7788 } | 8585 } |
7789 if (!(_ints == null || _ints.isEmpty)) { | 8586 if (!(_ints == null || _ints.isEmpty)) { |
7790 offset_ints = fbBuilder.writeListUint32(_ints); | 8587 offset_ints = fbBuilder.writeListUint32(_ints); |
7791 } | 8588 } |
7792 if (!(_operations == null || _operations.isEmpty)) { | 8589 if (!(_operations == null || _operations.isEmpty)) { |
7793 offset_operations = fbBuilder.writeListUint8(_operations.map((b) => b.inde
x).toList()); | 8590 offset_operations = |
| 8591 fbBuilder.writeListUint8(_operations.map((b) => b.index).toList()); |
7794 } | 8592 } |
7795 if (!(_references == null || _references.isEmpty)) { | 8593 if (!(_references == null || _references.isEmpty)) { |
7796 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 8594 offset_references = fbBuilder |
| 8595 .writeList(_references.map((b) => b.finish(fbBuilder)).toList()); |
7797 } | 8596 } |
7798 if (!(_strings == null || _strings.isEmpty)) { | 8597 if (!(_strings == null || _strings.isEmpty)) { |
7799 offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeSt
ring(b)).toList()); | 8598 offset_strings = fbBuilder |
| 8599 .writeList(_strings.map((b) => fbBuilder.writeString(b)).toList()); |
7800 } | 8600 } |
7801 fbBuilder.startTable(); | 8601 fbBuilder.startTable(); |
7802 if (offset_assignmentOperators != null) { | 8602 if (offset_assignmentOperators != null) { |
7803 fbBuilder.addOffset(6, offset_assignmentOperators); | 8603 fbBuilder.addOffset(6, offset_assignmentOperators); |
7804 } | 8604 } |
7805 if (offset_doubles != null) { | 8605 if (offset_doubles != null) { |
7806 fbBuilder.addOffset(4, offset_doubles); | 8606 fbBuilder.addOffset(4, offset_doubles); |
7807 } | 8607 } |
7808 if (offset_ints != null) { | 8608 if (offset_ints != null) { |
7809 fbBuilder.addOffset(1, offset_ints); | 8609 fbBuilder.addOffset(1, offset_ints); |
(...skipping 11 matching lines...) Expand all Loading... |
7821 fbBuilder.addOffset(3, offset_strings); | 8621 fbBuilder.addOffset(3, offset_strings); |
7822 } | 8622 } |
7823 return fbBuilder.endTable(); | 8623 return fbBuilder.endTable(); |
7824 } | 8624 } |
7825 } | 8625 } |
7826 | 8626 |
7827 class _UnlinkedExprReader extends fb.TableReader<_UnlinkedExprImpl> { | 8627 class _UnlinkedExprReader extends fb.TableReader<_UnlinkedExprImpl> { |
7828 const _UnlinkedExprReader(); | 8628 const _UnlinkedExprReader(); |
7829 | 8629 |
7830 @override | 8630 @override |
7831 _UnlinkedExprImpl createObject(fb.BufferContext bc, int offset) => new _Unlink
edExprImpl(bc, offset); | 8631 _UnlinkedExprImpl createObject(fb.BufferContext bc, int offset) => |
| 8632 new _UnlinkedExprImpl(bc, offset); |
7832 } | 8633 } |
7833 | 8634 |
7834 class _UnlinkedExprImpl extends Object with _UnlinkedExprMixin implements idl.Un
linkedExpr { | 8635 class _UnlinkedExprImpl extends Object |
| 8636 with _UnlinkedExprMixin |
| 8637 implements idl.UnlinkedExpr { |
7835 final fb.BufferContext _bc; | 8638 final fb.BufferContext _bc; |
7836 final int _bcOffset; | 8639 final int _bcOffset; |
7837 | 8640 |
7838 _UnlinkedExprImpl(this._bc, this._bcOffset); | 8641 _UnlinkedExprImpl(this._bc, this._bcOffset); |
7839 | 8642 |
7840 List<idl.UnlinkedExprAssignOperator> _assignmentOperators; | 8643 List<idl.UnlinkedExprAssignOperator> _assignmentOperators; |
7841 List<double> _doubles; | 8644 List<double> _doubles; |
7842 List<int> _ints; | 8645 List<int> _ints; |
7843 bool _isValidConst; | 8646 bool _isValidConst; |
7844 List<idl.UnlinkedExprOperation> _operations; | 8647 List<idl.UnlinkedExprOperation> _operations; |
7845 List<idl.EntityRef> _references; | 8648 List<idl.EntityRef> _references; |
7846 List<String> _strings; | 8649 List<String> _strings; |
7847 | 8650 |
7848 @override | 8651 @override |
7849 List<idl.UnlinkedExprAssignOperator> get assignmentOperators { | 8652 List<idl.UnlinkedExprAssignOperator> get assignmentOperators { |
7850 _assignmentOperators ??= const fb.ListReader<idl.UnlinkedExprAssignOperator>
(const _UnlinkedExprAssignOperatorReader()).vTableGet(_bc, _bcOffset, 6, const <
idl.UnlinkedExprAssignOperator>[]); | 8653 _assignmentOperators ??= |
| 8654 const fb.ListReader<idl.UnlinkedExprAssignOperator>( |
| 8655 const _UnlinkedExprAssignOperatorReader()) |
| 8656 .vTableGet( |
| 8657 _bc, _bcOffset, 6, const <idl.UnlinkedExprAssignOperator>[]); |
7851 return _assignmentOperators; | 8658 return _assignmentOperators; |
7852 } | 8659 } |
7853 | 8660 |
7854 @override | 8661 @override |
7855 List<double> get doubles { | 8662 List<double> get doubles { |
7856 _doubles ??= const fb.Float64ListReader().vTableGet(_bc, _bcOffset, 4, const
<double>[]); | 8663 _doubles ??= const fb.Float64ListReader() |
| 8664 .vTableGet(_bc, _bcOffset, 4, const <double>[]); |
7857 return _doubles; | 8665 return _doubles; |
7858 } | 8666 } |
7859 | 8667 |
7860 @override | 8668 @override |
7861 List<int> get ints { | 8669 List<int> get ints { |
7862 _ints ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1, const <in
t>[]); | 8670 _ints ??= |
| 8671 const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1, const <int>[]); |
7863 return _ints; | 8672 return _ints; |
7864 } | 8673 } |
7865 | 8674 |
7866 @override | 8675 @override |
7867 bool get isValidConst { | 8676 bool get isValidConst { |
7868 _isValidConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, false); | 8677 _isValidConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, false); |
7869 return _isValidConst; | 8678 return _isValidConst; |
7870 } | 8679 } |
7871 | 8680 |
7872 @override | 8681 @override |
7873 List<idl.UnlinkedExprOperation> get operations { | 8682 List<idl.UnlinkedExprOperation> get operations { |
7874 _operations ??= const fb.ListReader<idl.UnlinkedExprOperation>(const _Unlink
edExprOperationReader()).vTableGet(_bc, _bcOffset, 0, const <idl.UnlinkedExprOpe
ration>[]); | 8683 _operations ??= const fb.ListReader<idl.UnlinkedExprOperation>( |
| 8684 const _UnlinkedExprOperationReader()) |
| 8685 .vTableGet(_bc, _bcOffset, 0, const <idl.UnlinkedExprOperation>[]); |
7875 return _operations; | 8686 return _operations; |
7876 } | 8687 } |
7877 | 8688 |
7878 @override | 8689 @override |
7879 List<idl.EntityRef> get references { | 8690 List<idl.EntityRef> get references { |
7880 _references ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bc, _bcOffset, 2, const <idl.EntityRef>[]); | 8691 _references ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()) |
| 8692 .vTableGet(_bc, _bcOffset, 2, const <idl.EntityRef>[]); |
7881 return _references; | 8693 return _references; |
7882 } | 8694 } |
7883 | 8695 |
7884 @override | 8696 @override |
7885 List<String> get strings { | 8697 List<String> get strings { |
7886 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(
_bc, _bcOffset, 3, const <String>[]); | 8698 _strings ??= const fb.ListReader<String>(const fb.StringReader()) |
| 8699 .vTableGet(_bc, _bcOffset, 3, const <String>[]); |
7887 return _strings; | 8700 return _strings; |
7888 } | 8701 } |
7889 } | 8702 } |
7890 | 8703 |
7891 abstract class _UnlinkedExprMixin implements idl.UnlinkedExpr { | 8704 abstract class _UnlinkedExprMixin implements idl.UnlinkedExpr { |
7892 @override | 8705 @override |
7893 Map<String, Object> toJson() { | 8706 Map<String, Object> toJson() { |
7894 Map<String, Object> _result = <String, Object>{}; | 8707 Map<String, Object> _result = <String, Object>{}; |
7895 if (assignmentOperators.isNotEmpty) _result["assignmentOperators"] = assignm
entOperators.map((_value) => _value.toString().split('.')[1]).toList(); | 8708 if (assignmentOperators.isNotEmpty) |
7896 if (doubles.isNotEmpty) _result["doubles"] = doubles.map((_value) => _value.
isFinite ? _value : _value.toString()).toList(); | 8709 _result["assignmentOperators"] = assignmentOperators |
| 8710 .map((_value) => _value.toString().split('.')[1]) |
| 8711 .toList(); |
| 8712 if (doubles.isNotEmpty) |
| 8713 _result["doubles"] = doubles |
| 8714 .map((_value) => _value.isFinite ? _value : _value.toString()) |
| 8715 .toList(); |
7897 if (ints.isNotEmpty) _result["ints"] = ints; | 8716 if (ints.isNotEmpty) _result["ints"] = ints; |
7898 if (isValidConst != false) _result["isValidConst"] = isValidConst; | 8717 if (isValidConst != false) _result["isValidConst"] = isValidConst; |
7899 if (operations.isNotEmpty) _result["operations"] = operations.map((_value) =
> _value.toString().split('.')[1]).toList(); | 8718 if (operations.isNotEmpty) |
7900 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 8719 _result["operations"] = |
| 8720 operations.map((_value) => _value.toString().split('.')[1]).toList(); |
| 8721 if (references.isNotEmpty) |
| 8722 _result["references"] = |
| 8723 references.map((_value) => _value.toJson()).toList(); |
7901 if (strings.isNotEmpty) _result["strings"] = strings; | 8724 if (strings.isNotEmpty) _result["strings"] = strings; |
7902 return _result; | 8725 return _result; |
7903 } | 8726 } |
7904 | 8727 |
7905 @override | 8728 @override |
7906 Map<String, Object> toMap() => { | 8729 Map<String, Object> toMap() => { |
7907 "assignmentOperators": assignmentOperators, | 8730 "assignmentOperators": assignmentOperators, |
7908 "doubles": doubles, | 8731 "doubles": doubles, |
7909 "ints": ints, | 8732 "ints": ints, |
7910 "isValidConst": isValidConst, | 8733 "isValidConst": isValidConst, |
7911 "operations": operations, | 8734 "operations": operations, |
7912 "references": references, | 8735 "references": references, |
7913 "strings": strings, | 8736 "strings": strings, |
7914 }; | 8737 }; |
7915 | 8738 |
7916 @override | 8739 @override |
7917 String toString() => convert.JSON.encode(toJson()); | 8740 String toString() => convert.JSON.encode(toJson()); |
7918 } | 8741 } |
7919 | 8742 |
7920 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements
idl.UnlinkedImport { | 8743 class UnlinkedImportBuilder extends Object |
| 8744 with _UnlinkedImportMixin |
| 8745 implements idl.UnlinkedImport { |
7921 List<UnlinkedExprBuilder> _annotations; | 8746 List<UnlinkedExprBuilder> _annotations; |
7922 List<UnlinkedCombinatorBuilder> _combinators; | 8747 List<UnlinkedCombinatorBuilder> _combinators; |
7923 List<UnlinkedConfigurationBuilder> _configurations; | 8748 List<UnlinkedConfigurationBuilder> _configurations; |
7924 bool _isDeferred; | 8749 bool _isDeferred; |
7925 bool _isImplicit; | 8750 bool _isImplicit; |
7926 int _offset; | 8751 int _offset; |
7927 int _prefixOffset; | 8752 int _prefixOffset; |
7928 int _prefixReference; | 8753 int _prefixReference; |
7929 String _uri; | 8754 String _uri; |
7930 int _uriEnd; | 8755 int _uriEnd; |
7931 int _uriOffset; | 8756 int _uriOffset; |
7932 | 8757 |
7933 @override | 8758 @override |
7934 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 8759 List<UnlinkedExprBuilder> get annotations => |
| 8760 _annotations ??= <UnlinkedExprBuilder>[]; |
7935 | 8761 |
7936 /** | 8762 /** |
7937 * Annotations for this import declaration. | 8763 * Annotations for this import declaration. |
7938 */ | 8764 */ |
7939 void set annotations(List<UnlinkedExprBuilder> value) { | 8765 void set annotations(List<UnlinkedExprBuilder> value) { |
7940 this._annotations = value; | 8766 this._annotations = value; |
7941 } | 8767 } |
7942 | 8768 |
7943 @override | 8769 @override |
7944 List<UnlinkedCombinatorBuilder> get combinators => _combinators ??= <UnlinkedC
ombinatorBuilder>[]; | 8770 List<UnlinkedCombinatorBuilder> get combinators => |
| 8771 _combinators ??= <UnlinkedCombinatorBuilder>[]; |
7945 | 8772 |
7946 /** | 8773 /** |
7947 * Combinators contained in this import declaration. | 8774 * Combinators contained in this import declaration. |
7948 */ | 8775 */ |
7949 void set combinators(List<UnlinkedCombinatorBuilder> value) { | 8776 void set combinators(List<UnlinkedCombinatorBuilder> value) { |
7950 this._combinators = value; | 8777 this._combinators = value; |
7951 } | 8778 } |
7952 | 8779 |
7953 @override | 8780 @override |
7954 List<UnlinkedConfigurationBuilder> get configurations => _configurations ??= <
UnlinkedConfigurationBuilder>[]; | 8781 List<UnlinkedConfigurationBuilder> get configurations => |
| 8782 _configurations ??= <UnlinkedConfigurationBuilder>[]; |
7955 | 8783 |
7956 /** | 8784 /** |
7957 * Configurations used to control which library will actually be loaded at | 8785 * Configurations used to control which library will actually be loaded at |
7958 * run-time. | 8786 * run-time. |
7959 */ | 8787 */ |
7960 void set configurations(List<UnlinkedConfigurationBuilder> value) { | 8788 void set configurations(List<UnlinkedConfigurationBuilder> value) { |
7961 this._configurations = value; | 8789 this._configurations = value; |
7962 } | 8790 } |
7963 | 8791 |
7964 @override | 8792 @override |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8046 | 8874 |
8047 /** | 8875 /** |
8048 * Offset of the URI string (including quotes) relative to the beginning of | 8876 * Offset of the URI string (including quotes) relative to the beginning of |
8049 * the file. If [isImplicit] is true, zero. | 8877 * the file. If [isImplicit] is true, zero. |
8050 */ | 8878 */ |
8051 void set uriOffset(int value) { | 8879 void set uriOffset(int value) { |
8052 assert(value == null || value >= 0); | 8880 assert(value == null || value >= 0); |
8053 this._uriOffset = value; | 8881 this._uriOffset = value; |
8054 } | 8882 } |
8055 | 8883 |
8056 UnlinkedImportBuilder({List<UnlinkedExprBuilder> annotations, List<UnlinkedCom
binatorBuilder> combinators, List<UnlinkedConfigurationBuilder> configurations,
bool isDeferred, bool isImplicit, int offset, int prefixOffset, int prefixRefere
nce, String uri, int uriEnd, int uriOffset}) | 8884 UnlinkedImportBuilder( |
8057 : _annotations = annotations, | 8885 {List<UnlinkedExprBuilder> annotations, |
8058 _combinators = combinators, | 8886 List<UnlinkedCombinatorBuilder> combinators, |
8059 _configurations = configurations, | 8887 List<UnlinkedConfigurationBuilder> configurations, |
8060 _isDeferred = isDeferred, | 8888 bool isDeferred, |
8061 _isImplicit = isImplicit, | 8889 bool isImplicit, |
8062 _offset = offset, | 8890 int offset, |
8063 _prefixOffset = prefixOffset, | 8891 int prefixOffset, |
8064 _prefixReference = prefixReference, | 8892 int prefixReference, |
8065 _uri = uri, | 8893 String uri, |
8066 _uriEnd = uriEnd, | 8894 int uriEnd, |
8067 _uriOffset = uriOffset; | 8895 int uriOffset}) |
| 8896 : _annotations = annotations, |
| 8897 _combinators = combinators, |
| 8898 _configurations = configurations, |
| 8899 _isDeferred = isDeferred, |
| 8900 _isImplicit = isImplicit, |
| 8901 _offset = offset, |
| 8902 _prefixOffset = prefixOffset, |
| 8903 _prefixReference = prefixReference, |
| 8904 _uri = uri, |
| 8905 _uriEnd = uriEnd, |
| 8906 _uriOffset = uriOffset; |
8068 | 8907 |
8069 /** | 8908 /** |
8070 * Flush [informative] data recursively. | 8909 * Flush [informative] data recursively. |
8071 */ | 8910 */ |
8072 void flushInformative() { | 8911 void flushInformative() { |
8073 _annotations?.forEach((b) => b.flushInformative()); | 8912 _annotations?.forEach((b) => b.flushInformative()); |
8074 _combinators?.forEach((b) => b.flushInformative()); | 8913 _combinators?.forEach((b) => b.flushInformative()); |
8075 _configurations?.forEach((b) => b.flushInformative()); | 8914 _configurations?.forEach((b) => b.flushInformative()); |
8076 _offset = null; | 8915 _offset = null; |
8077 _prefixOffset = null; | 8916 _prefixOffset = null; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8112 } | 8951 } |
8113 } | 8952 } |
8114 } | 8953 } |
8115 | 8954 |
8116 fb.Offset finish(fb.Builder fbBuilder) { | 8955 fb.Offset finish(fb.Builder fbBuilder) { |
8117 fb.Offset offset_annotations; | 8956 fb.Offset offset_annotations; |
8118 fb.Offset offset_combinators; | 8957 fb.Offset offset_combinators; |
8119 fb.Offset offset_configurations; | 8958 fb.Offset offset_configurations; |
8120 fb.Offset offset_uri; | 8959 fb.Offset offset_uri; |
8121 if (!(_annotations == null || _annotations.isEmpty)) { | 8960 if (!(_annotations == null || _annotations.isEmpty)) { |
8122 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 8961 offset_annotations = fbBuilder |
| 8962 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
8123 } | 8963 } |
8124 if (!(_combinators == null || _combinators.isEmpty)) { | 8964 if (!(_combinators == null || _combinators.isEmpty)) { |
8125 offset_combinators = fbBuilder.writeList(_combinators.map((b) => b.finish(
fbBuilder)).toList()); | 8965 offset_combinators = fbBuilder |
| 8966 .writeList(_combinators.map((b) => b.finish(fbBuilder)).toList()); |
8126 } | 8967 } |
8127 if (!(_configurations == null || _configurations.isEmpty)) { | 8968 if (!(_configurations == null || _configurations.isEmpty)) { |
8128 offset_configurations = fbBuilder.writeList(_configurations.map((b) => b.f
inish(fbBuilder)).toList()); | 8969 offset_configurations = fbBuilder |
| 8970 .writeList(_configurations.map((b) => b.finish(fbBuilder)).toList()); |
8129 } | 8971 } |
8130 if (_uri != null) { | 8972 if (_uri != null) { |
8131 offset_uri = fbBuilder.writeString(_uri); | 8973 offset_uri = fbBuilder.writeString(_uri); |
8132 } | 8974 } |
8133 fbBuilder.startTable(); | 8975 fbBuilder.startTable(); |
8134 if (offset_annotations != null) { | 8976 if (offset_annotations != null) { |
8135 fbBuilder.addOffset(8, offset_annotations); | 8977 fbBuilder.addOffset(8, offset_annotations); |
8136 } | 8978 } |
8137 if (offset_combinators != null) { | 8979 if (offset_combinators != null) { |
8138 fbBuilder.addOffset(4, offset_combinators); | 8980 fbBuilder.addOffset(4, offset_combinators); |
(...skipping 26 matching lines...) Expand all Loading... |
8165 fbBuilder.addUint32(3, _uriOffset); | 9007 fbBuilder.addUint32(3, _uriOffset); |
8166 } | 9008 } |
8167 return fbBuilder.endTable(); | 9009 return fbBuilder.endTable(); |
8168 } | 9010 } |
8169 } | 9011 } |
8170 | 9012 |
8171 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> { | 9013 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> { |
8172 const _UnlinkedImportReader(); | 9014 const _UnlinkedImportReader(); |
8173 | 9015 |
8174 @override | 9016 @override |
8175 _UnlinkedImportImpl createObject(fb.BufferContext bc, int offset) => new _Unli
nkedImportImpl(bc, offset); | 9017 _UnlinkedImportImpl createObject(fb.BufferContext bc, int offset) => |
| 9018 new _UnlinkedImportImpl(bc, offset); |
8176 } | 9019 } |
8177 | 9020 |
8178 class _UnlinkedImportImpl extends Object with _UnlinkedImportMixin implements id
l.UnlinkedImport { | 9021 class _UnlinkedImportImpl extends Object |
| 9022 with _UnlinkedImportMixin |
| 9023 implements idl.UnlinkedImport { |
8179 final fb.BufferContext _bc; | 9024 final fb.BufferContext _bc; |
8180 final int _bcOffset; | 9025 final int _bcOffset; |
8181 | 9026 |
8182 _UnlinkedImportImpl(this._bc, this._bcOffset); | 9027 _UnlinkedImportImpl(this._bc, this._bcOffset); |
8183 | 9028 |
8184 List<idl.UnlinkedExpr> _annotations; | 9029 List<idl.UnlinkedExpr> _annotations; |
8185 List<idl.UnlinkedCombinator> _combinators; | 9030 List<idl.UnlinkedCombinator> _combinators; |
8186 List<idl.UnlinkedConfiguration> _configurations; | 9031 List<idl.UnlinkedConfiguration> _configurations; |
8187 bool _isDeferred; | 9032 bool _isDeferred; |
8188 bool _isImplicit; | 9033 bool _isImplicit; |
8189 int _offset; | 9034 int _offset; |
8190 int _prefixOffset; | 9035 int _prefixOffset; |
8191 int _prefixReference; | 9036 int _prefixReference; |
8192 String _uri; | 9037 String _uri; |
8193 int _uriEnd; | 9038 int _uriEnd; |
8194 int _uriOffset; | 9039 int _uriOffset; |
8195 | 9040 |
8196 @override | 9041 @override |
8197 List<idl.UnlinkedExpr> get annotations { | 9042 List<idl.UnlinkedExpr> get annotations { |
8198 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedExpr>[]); | 9043 _annotations ??= |
| 9044 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 9045 .vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedExpr>[]); |
8199 return _annotations; | 9046 return _annotations; |
8200 } | 9047 } |
8201 | 9048 |
8202 @override | 9049 @override |
8203 List<idl.UnlinkedCombinator> get combinators { | 9050 List<idl.UnlinkedCombinator> get combinators { |
8204 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>(const _Unlinked
CombinatorReader()).vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedCombinator>[
]); | 9051 _combinators ??= const fb.ListReader<idl.UnlinkedCombinator>( |
| 9052 const _UnlinkedCombinatorReader()) |
| 9053 .vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedCombinator>[]); |
8205 return _combinators; | 9054 return _combinators; |
8206 } | 9055 } |
8207 | 9056 |
8208 @override | 9057 @override |
8209 List<idl.UnlinkedConfiguration> get configurations { | 9058 List<idl.UnlinkedConfiguration> get configurations { |
8210 _configurations ??= const fb.ListReader<idl.UnlinkedConfiguration>(const _Un
linkedConfigurationReader()).vTableGet(_bc, _bcOffset, 10, const <idl.UnlinkedCo
nfiguration>[]); | 9059 _configurations ??= const fb.ListReader<idl.UnlinkedConfiguration>( |
| 9060 const _UnlinkedConfigurationReader()) |
| 9061 .vTableGet(_bc, _bcOffset, 10, const <idl.UnlinkedConfiguration>[]); |
8211 return _configurations; | 9062 return _configurations; |
8212 } | 9063 } |
8213 | 9064 |
8214 @override | 9065 @override |
8215 bool get isDeferred { | 9066 bool get isDeferred { |
8216 _isDeferred ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 9, false); | 9067 _isDeferred ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 9, false); |
8217 return _isDeferred; | 9068 return _isDeferred; |
8218 } | 9069 } |
8219 | 9070 |
8220 @override | 9071 @override |
8221 bool get isImplicit { | 9072 bool get isImplicit { |
8222 _isImplicit ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, false); | 9073 _isImplicit ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, false); |
8223 return _isImplicit; | 9074 return _isImplicit; |
8224 } | 9075 } |
8225 | 9076 |
8226 @override | 9077 @override |
8227 int get offset { | 9078 int get offset { |
8228 _offset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 9079 _offset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
8229 return _offset; | 9080 return _offset; |
8230 } | 9081 } |
8231 | 9082 |
8232 @override | 9083 @override |
8233 int get prefixOffset { | 9084 int get prefixOffset { |
8234 _prefixOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0); | 9085 _prefixOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0); |
8235 return _prefixOffset; | 9086 return _prefixOffset; |
8236 } | 9087 } |
8237 | 9088 |
8238 @override | 9089 @override |
8239 int get prefixReference { | 9090 int get prefixReference { |
8240 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 7, 0)
; | 9091 _prefixReference ??= |
| 9092 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 7, 0); |
8241 return _prefixReference; | 9093 return _prefixReference; |
8242 } | 9094 } |
8243 | 9095 |
8244 @override | 9096 @override |
8245 String get uri { | 9097 String get uri { |
8246 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 9098 _uri ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
8247 return _uri; | 9099 return _uri; |
8248 } | 9100 } |
8249 | 9101 |
8250 @override | 9102 @override |
8251 int get uriEnd { | 9103 int get uriEnd { |
8252 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); | 9104 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
8253 return _uriEnd; | 9105 return _uriEnd; |
8254 } | 9106 } |
8255 | 9107 |
8256 @override | 9108 @override |
8257 int get uriOffset { | 9109 int get uriOffset { |
8258 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0); | 9110 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0); |
8259 return _uriOffset; | 9111 return _uriOffset; |
8260 } | 9112 } |
8261 } | 9113 } |
8262 | 9114 |
8263 abstract class _UnlinkedImportMixin implements idl.UnlinkedImport { | 9115 abstract class _UnlinkedImportMixin implements idl.UnlinkedImport { |
8264 @override | 9116 @override |
8265 Map<String, Object> toJson() { | 9117 Map<String, Object> toJson() { |
8266 Map<String, Object> _result = <String, Object>{}; | 9118 Map<String, Object> _result = <String, Object>{}; |
8267 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 9119 if (annotations.isNotEmpty) |
8268 if (combinators.isNotEmpty) _result["combinators"] = combinators.map((_value
) => _value.toJson()).toList(); | 9120 _result["annotations"] = |
8269 if (configurations.isNotEmpty) _result["configurations"] = configurations.ma
p((_value) => _value.toJson()).toList(); | 9121 annotations.map((_value) => _value.toJson()).toList(); |
| 9122 if (combinators.isNotEmpty) |
| 9123 _result["combinators"] = |
| 9124 combinators.map((_value) => _value.toJson()).toList(); |
| 9125 if (configurations.isNotEmpty) |
| 9126 _result["configurations"] = |
| 9127 configurations.map((_value) => _value.toJson()).toList(); |
8270 if (isDeferred != false) _result["isDeferred"] = isDeferred; | 9128 if (isDeferred != false) _result["isDeferred"] = isDeferred; |
8271 if (isImplicit != false) _result["isImplicit"] = isImplicit; | 9129 if (isImplicit != false) _result["isImplicit"] = isImplicit; |
8272 if (offset != 0) _result["offset"] = offset; | 9130 if (offset != 0) _result["offset"] = offset; |
8273 if (prefixOffset != 0) _result["prefixOffset"] = prefixOffset; | 9131 if (prefixOffset != 0) _result["prefixOffset"] = prefixOffset; |
8274 if (prefixReference != 0) _result["prefixReference"] = prefixReference; | 9132 if (prefixReference != 0) _result["prefixReference"] = prefixReference; |
8275 if (uri != '') _result["uri"] = uri; | 9133 if (uri != '') _result["uri"] = uri; |
8276 if (uriEnd != 0) _result["uriEnd"] = uriEnd; | 9134 if (uriEnd != 0) _result["uriEnd"] = uriEnd; |
8277 if (uriOffset != 0) _result["uriOffset"] = uriOffset; | 9135 if (uriOffset != 0) _result["uriOffset"] = uriOffset; |
8278 return _result; | 9136 return _result; |
8279 } | 9137 } |
8280 | 9138 |
8281 @override | 9139 @override |
8282 Map<String, Object> toMap() => { | 9140 Map<String, Object> toMap() => { |
8283 "annotations": annotations, | 9141 "annotations": annotations, |
8284 "combinators": combinators, | 9142 "combinators": combinators, |
8285 "configurations": configurations, | 9143 "configurations": configurations, |
8286 "isDeferred": isDeferred, | 9144 "isDeferred": isDeferred, |
8287 "isImplicit": isImplicit, | 9145 "isImplicit": isImplicit, |
8288 "offset": offset, | 9146 "offset": offset, |
8289 "prefixOffset": prefixOffset, | 9147 "prefixOffset": prefixOffset, |
8290 "prefixReference": prefixReference, | 9148 "prefixReference": prefixReference, |
8291 "uri": uri, | 9149 "uri": uri, |
8292 "uriEnd": uriEnd, | 9150 "uriEnd": uriEnd, |
8293 "uriOffset": uriOffset, | 9151 "uriOffset": uriOffset, |
8294 }; | 9152 }; |
8295 | 9153 |
8296 @override | 9154 @override |
8297 String toString() => convert.JSON.encode(toJson()); | 9155 String toString() => convert.JSON.encode(toJson()); |
8298 } | 9156 } |
8299 | 9157 |
8300 class UnlinkedLabelBuilder extends Object with _UnlinkedLabelMixin implements id
l.UnlinkedLabel { | 9158 class UnlinkedLabelBuilder extends Object |
| 9159 with _UnlinkedLabelMixin |
| 9160 implements idl.UnlinkedLabel { |
8301 bool _isOnSwitchMember; | 9161 bool _isOnSwitchMember; |
8302 bool _isOnSwitchStatement; | 9162 bool _isOnSwitchStatement; |
8303 String _name; | 9163 String _name; |
8304 int _nameOffset; | 9164 int _nameOffset; |
8305 | 9165 |
8306 @override | 9166 @override |
8307 bool get isOnSwitchMember => _isOnSwitchMember ??= false; | 9167 bool get isOnSwitchMember => _isOnSwitchMember ??= false; |
8308 | 9168 |
8309 /** | 9169 /** |
8310 * Return `true` if this label is associated with a `switch` member (`case` or | 9170 * Return `true` if this label is associated with a `switch` member (`case` or |
(...skipping 27 matching lines...) Expand all Loading... |
8338 int get nameOffset => _nameOffset ??= 0; | 9198 int get nameOffset => _nameOffset ??= 0; |
8339 | 9199 |
8340 /** | 9200 /** |
8341 * Offset of the label relative to the beginning of the file. | 9201 * Offset of the label relative to the beginning of the file. |
8342 */ | 9202 */ |
8343 void set nameOffset(int value) { | 9203 void set nameOffset(int value) { |
8344 assert(value == null || value >= 0); | 9204 assert(value == null || value >= 0); |
8345 this._nameOffset = value; | 9205 this._nameOffset = value; |
8346 } | 9206 } |
8347 | 9207 |
8348 UnlinkedLabelBuilder({bool isOnSwitchMember, bool isOnSwitchStatement, String
name, int nameOffset}) | 9208 UnlinkedLabelBuilder( |
8349 : _isOnSwitchMember = isOnSwitchMember, | 9209 {bool isOnSwitchMember, |
8350 _isOnSwitchStatement = isOnSwitchStatement, | 9210 bool isOnSwitchStatement, |
8351 _name = name, | 9211 String name, |
8352 _nameOffset = nameOffset; | 9212 int nameOffset}) |
| 9213 : _isOnSwitchMember = isOnSwitchMember, |
| 9214 _isOnSwitchStatement = isOnSwitchStatement, |
| 9215 _name = name, |
| 9216 _nameOffset = nameOffset; |
8353 | 9217 |
8354 /** | 9218 /** |
8355 * Flush [informative] data recursively. | 9219 * Flush [informative] data recursively. |
8356 */ | 9220 */ |
8357 void flushInformative() { | 9221 void flushInformative() { |
8358 _nameOffset = null; | 9222 _nameOffset = null; |
8359 } | 9223 } |
8360 | 9224 |
8361 /** | 9225 /** |
8362 * Accumulate non-[informative] data into [signature]. | 9226 * Accumulate non-[informative] data into [signature]. |
(...skipping 23 matching lines...) Expand all Loading... |
8386 fbBuilder.addUint32(1, _nameOffset); | 9250 fbBuilder.addUint32(1, _nameOffset); |
8387 } | 9251 } |
8388 return fbBuilder.endTable(); | 9252 return fbBuilder.endTable(); |
8389 } | 9253 } |
8390 } | 9254 } |
8391 | 9255 |
8392 class _UnlinkedLabelReader extends fb.TableReader<_UnlinkedLabelImpl> { | 9256 class _UnlinkedLabelReader extends fb.TableReader<_UnlinkedLabelImpl> { |
8393 const _UnlinkedLabelReader(); | 9257 const _UnlinkedLabelReader(); |
8394 | 9258 |
8395 @override | 9259 @override |
8396 _UnlinkedLabelImpl createObject(fb.BufferContext bc, int offset) => new _Unlin
kedLabelImpl(bc, offset); | 9260 _UnlinkedLabelImpl createObject(fb.BufferContext bc, int offset) => |
| 9261 new _UnlinkedLabelImpl(bc, offset); |
8397 } | 9262 } |
8398 | 9263 |
8399 class _UnlinkedLabelImpl extends Object with _UnlinkedLabelMixin implements idl.
UnlinkedLabel { | 9264 class _UnlinkedLabelImpl extends Object |
| 9265 with _UnlinkedLabelMixin |
| 9266 implements idl.UnlinkedLabel { |
8400 final fb.BufferContext _bc; | 9267 final fb.BufferContext _bc; |
8401 final int _bcOffset; | 9268 final int _bcOffset; |
8402 | 9269 |
8403 _UnlinkedLabelImpl(this._bc, this._bcOffset); | 9270 _UnlinkedLabelImpl(this._bc, this._bcOffset); |
8404 | 9271 |
8405 bool _isOnSwitchMember; | 9272 bool _isOnSwitchMember; |
8406 bool _isOnSwitchStatement; | 9273 bool _isOnSwitchStatement; |
8407 String _name; | 9274 String _name; |
8408 int _nameOffset; | 9275 int _nameOffset; |
8409 | 9276 |
8410 @override | 9277 @override |
8411 bool get isOnSwitchMember { | 9278 bool get isOnSwitchMember { |
8412 _isOnSwitchMember ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 2, fal
se); | 9279 _isOnSwitchMember ??= |
| 9280 const fb.BoolReader().vTableGet(_bc, _bcOffset, 2, false); |
8413 return _isOnSwitchMember; | 9281 return _isOnSwitchMember; |
8414 } | 9282 } |
8415 | 9283 |
8416 @override | 9284 @override |
8417 bool get isOnSwitchStatement { | 9285 bool get isOnSwitchStatement { |
8418 _isOnSwitchStatement ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 3,
false); | 9286 _isOnSwitchStatement ??= |
| 9287 const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, false); |
8419 return _isOnSwitchStatement; | 9288 return _isOnSwitchStatement; |
8420 } | 9289 } |
8421 | 9290 |
8422 @override | 9291 @override |
8423 String get name { | 9292 String get name { |
8424 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 9293 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
8425 return _name; | 9294 return _name; |
8426 } | 9295 } |
8427 | 9296 |
8428 @override | 9297 @override |
8429 int get nameOffset { | 9298 int get nameOffset { |
8430 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 9299 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
8431 return _nameOffset; | 9300 return _nameOffset; |
8432 } | 9301 } |
8433 } | 9302 } |
8434 | 9303 |
8435 abstract class _UnlinkedLabelMixin implements idl.UnlinkedLabel { | 9304 abstract class _UnlinkedLabelMixin implements idl.UnlinkedLabel { |
8436 @override | 9305 @override |
8437 Map<String, Object> toJson() { | 9306 Map<String, Object> toJson() { |
8438 Map<String, Object> _result = <String, Object>{}; | 9307 Map<String, Object> _result = <String, Object>{}; |
8439 if (isOnSwitchMember != false) _result["isOnSwitchMember"] = isOnSwitchMembe
r; | 9308 if (isOnSwitchMember != false) |
8440 if (isOnSwitchStatement != false) _result["isOnSwitchStatement"] = isOnSwitc
hStatement; | 9309 _result["isOnSwitchMember"] = isOnSwitchMember; |
| 9310 if (isOnSwitchStatement != false) |
| 9311 _result["isOnSwitchStatement"] = isOnSwitchStatement; |
8441 if (name != '') _result["name"] = name; | 9312 if (name != '') _result["name"] = name; |
8442 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 9313 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
8443 return _result; | 9314 return _result; |
8444 } | 9315 } |
8445 | 9316 |
8446 @override | 9317 @override |
8447 Map<String, Object> toMap() => { | 9318 Map<String, Object> toMap() => { |
8448 "isOnSwitchMember": isOnSwitchMember, | 9319 "isOnSwitchMember": isOnSwitchMember, |
8449 "isOnSwitchStatement": isOnSwitchStatement, | 9320 "isOnSwitchStatement": isOnSwitchStatement, |
8450 "name": name, | 9321 "name": name, |
8451 "nameOffset": nameOffset, | 9322 "nameOffset": nameOffset, |
8452 }; | 9323 }; |
8453 | 9324 |
8454 @override | 9325 @override |
8455 String toString() => convert.JSON.encode(toJson()); | 9326 String toString() => convert.JSON.encode(toJson()); |
8456 } | 9327 } |
8457 | 9328 |
8458 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { | 9329 class UnlinkedParamBuilder extends Object |
| 9330 with _UnlinkedParamMixin |
| 9331 implements idl.UnlinkedParam { |
8459 List<UnlinkedExprBuilder> _annotations; | 9332 List<UnlinkedExprBuilder> _annotations; |
8460 CodeRangeBuilder _codeRange; | 9333 CodeRangeBuilder _codeRange; |
8461 String _defaultValueCode; | 9334 String _defaultValueCode; |
8462 int _inferredTypeSlot; | 9335 int _inferredTypeSlot; |
8463 int _inheritsCovariantSlot; | 9336 int _inheritsCovariantSlot; |
8464 UnlinkedExecutableBuilder _initializer; | 9337 UnlinkedExecutableBuilder _initializer; |
8465 bool _isExplicitlyCovariant; | 9338 bool _isExplicitlyCovariant; |
8466 bool _isFinal; | 9339 bool _isFinal; |
8467 bool _isFunctionTyped; | 9340 bool _isFunctionTyped; |
8468 bool _isInitializingFormal; | 9341 bool _isInitializingFormal; |
8469 idl.UnlinkedParamKind _kind; | 9342 idl.UnlinkedParamKind _kind; |
8470 String _name; | 9343 String _name; |
8471 int _nameOffset; | 9344 int _nameOffset; |
8472 List<UnlinkedParamBuilder> _parameters; | 9345 List<UnlinkedParamBuilder> _parameters; |
8473 EntityRefBuilder _type; | 9346 EntityRefBuilder _type; |
8474 int _visibleLength; | 9347 int _visibleLength; |
8475 int _visibleOffset; | 9348 int _visibleOffset; |
8476 | 9349 |
8477 @override | 9350 @override |
8478 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 9351 List<UnlinkedExprBuilder> get annotations => |
| 9352 _annotations ??= <UnlinkedExprBuilder>[]; |
8479 | 9353 |
8480 /** | 9354 /** |
8481 * Annotations for this parameter. | 9355 * Annotations for this parameter. |
8482 */ | 9356 */ |
8483 void set annotations(List<UnlinkedExprBuilder> value) { | 9357 void set annotations(List<UnlinkedExprBuilder> value) { |
8484 this._annotations = value; | 9358 this._annotations = value; |
8485 } | 9359 } |
8486 | 9360 |
8487 @override | 9361 @override |
8488 CodeRangeBuilder get codeRange => _codeRange; | 9362 CodeRangeBuilder get codeRange => _codeRange; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8624 | 9498 |
8625 /** | 9499 /** |
8626 * Offset of the parameter name relative to the beginning of the file. | 9500 * Offset of the parameter name relative to the beginning of the file. |
8627 */ | 9501 */ |
8628 void set nameOffset(int value) { | 9502 void set nameOffset(int value) { |
8629 assert(value == null || value >= 0); | 9503 assert(value == null || value >= 0); |
8630 this._nameOffset = value; | 9504 this._nameOffset = value; |
8631 } | 9505 } |
8632 | 9506 |
8633 @override | 9507 @override |
8634 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 9508 List<UnlinkedParamBuilder> get parameters => |
| 9509 _parameters ??= <UnlinkedParamBuilder>[]; |
8635 | 9510 |
8636 /** | 9511 /** |
8637 * If [isFunctionTyped] is `true`, the parameters of the function type. | 9512 * If [isFunctionTyped] is `true`, the parameters of the function type. |
8638 */ | 9513 */ |
8639 void set parameters(List<UnlinkedParamBuilder> value) { | 9514 void set parameters(List<UnlinkedParamBuilder> value) { |
8640 this._parameters = value; | 9515 this._parameters = value; |
8641 } | 9516 } |
8642 | 9517 |
8643 @override | 9518 @override |
8644 EntityRefBuilder get type => _type; | 9519 EntityRefBuilder get type => _type; |
(...skipping 22 matching lines...) Expand all Loading... |
8667 int get visibleOffset => _visibleOffset ??= 0; | 9542 int get visibleOffset => _visibleOffset ??= 0; |
8668 | 9543 |
8669 /** | 9544 /** |
8670 * The beginning of the visible range. | 9545 * The beginning of the visible range. |
8671 */ | 9546 */ |
8672 void set visibleOffset(int value) { | 9547 void set visibleOffset(int value) { |
8673 assert(value == null || value >= 0); | 9548 assert(value == null || value >= 0); |
8674 this._visibleOffset = value; | 9549 this._visibleOffset = value; |
8675 } | 9550 } |
8676 | 9551 |
8677 UnlinkedParamBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder
codeRange, String defaultValueCode, int inferredTypeSlot, int inheritsCovariantS
lot, UnlinkedExecutableBuilder initializer, bool isExplicitlyCovariant, bool isF
inal, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kin
d, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRef
Builder type, int visibleLength, int visibleOffset}) | 9552 UnlinkedParamBuilder( |
8678 : _annotations = annotations, | 9553 {List<UnlinkedExprBuilder> annotations, |
8679 _codeRange = codeRange, | 9554 CodeRangeBuilder codeRange, |
8680 _defaultValueCode = defaultValueCode, | 9555 String defaultValueCode, |
8681 _inferredTypeSlot = inferredTypeSlot, | 9556 int inferredTypeSlot, |
8682 _inheritsCovariantSlot = inheritsCovariantSlot, | 9557 int inheritsCovariantSlot, |
8683 _initializer = initializer, | 9558 UnlinkedExecutableBuilder initializer, |
8684 _isExplicitlyCovariant = isExplicitlyCovariant, | 9559 bool isExplicitlyCovariant, |
8685 _isFinal = isFinal, | 9560 bool isFinal, |
8686 _isFunctionTyped = isFunctionTyped, | 9561 bool isFunctionTyped, |
8687 _isInitializingFormal = isInitializingFormal, | 9562 bool isInitializingFormal, |
8688 _kind = kind, | 9563 idl.UnlinkedParamKind kind, |
8689 _name = name, | 9564 String name, |
8690 _nameOffset = nameOffset, | 9565 int nameOffset, |
8691 _parameters = parameters, | 9566 List<UnlinkedParamBuilder> parameters, |
8692 _type = type, | 9567 EntityRefBuilder type, |
8693 _visibleLength = visibleLength, | 9568 int visibleLength, |
8694 _visibleOffset = visibleOffset; | 9569 int visibleOffset}) |
| 9570 : _annotations = annotations, |
| 9571 _codeRange = codeRange, |
| 9572 _defaultValueCode = defaultValueCode, |
| 9573 _inferredTypeSlot = inferredTypeSlot, |
| 9574 _inheritsCovariantSlot = inheritsCovariantSlot, |
| 9575 _initializer = initializer, |
| 9576 _isExplicitlyCovariant = isExplicitlyCovariant, |
| 9577 _isFinal = isFinal, |
| 9578 _isFunctionTyped = isFunctionTyped, |
| 9579 _isInitializingFormal = isInitializingFormal, |
| 9580 _kind = kind, |
| 9581 _name = name, |
| 9582 _nameOffset = nameOffset, |
| 9583 _parameters = parameters, |
| 9584 _type = type, |
| 9585 _visibleLength = visibleLength, |
| 9586 _visibleOffset = visibleOffset; |
8695 | 9587 |
8696 /** | 9588 /** |
8697 * Flush [informative] data recursively. | 9589 * Flush [informative] data recursively. |
8698 */ | 9590 */ |
8699 void flushInformative() { | 9591 void flushInformative() { |
8700 _annotations?.forEach((b) => b.flushInformative()); | 9592 _annotations?.forEach((b) => b.flushInformative()); |
8701 _codeRange = null; | 9593 _codeRange = null; |
8702 _defaultValueCode = null; | 9594 _defaultValueCode = null; |
8703 _initializer?.flushInformative(); | 9595 _initializer?.flushInformative(); |
8704 _nameOffset = null; | 9596 _nameOffset = null; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8744 | 9636 |
8745 fb.Offset finish(fb.Builder fbBuilder) { | 9637 fb.Offset finish(fb.Builder fbBuilder) { |
8746 fb.Offset offset_annotations; | 9638 fb.Offset offset_annotations; |
8747 fb.Offset offset_codeRange; | 9639 fb.Offset offset_codeRange; |
8748 fb.Offset offset_defaultValueCode; | 9640 fb.Offset offset_defaultValueCode; |
8749 fb.Offset offset_initializer; | 9641 fb.Offset offset_initializer; |
8750 fb.Offset offset_name; | 9642 fb.Offset offset_name; |
8751 fb.Offset offset_parameters; | 9643 fb.Offset offset_parameters; |
8752 fb.Offset offset_type; | 9644 fb.Offset offset_type; |
8753 if (!(_annotations == null || _annotations.isEmpty)) { | 9645 if (!(_annotations == null || _annotations.isEmpty)) { |
8754 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 9646 offset_annotations = fbBuilder |
| 9647 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
8755 } | 9648 } |
8756 if (_codeRange != null) { | 9649 if (_codeRange != null) { |
8757 offset_codeRange = _codeRange.finish(fbBuilder); | 9650 offset_codeRange = _codeRange.finish(fbBuilder); |
8758 } | 9651 } |
8759 if (_defaultValueCode != null) { | 9652 if (_defaultValueCode != null) { |
8760 offset_defaultValueCode = fbBuilder.writeString(_defaultValueCode); | 9653 offset_defaultValueCode = fbBuilder.writeString(_defaultValueCode); |
8761 } | 9654 } |
8762 if (_initializer != null) { | 9655 if (_initializer != null) { |
8763 offset_initializer = _initializer.finish(fbBuilder); | 9656 offset_initializer = _initializer.finish(fbBuilder); |
8764 } | 9657 } |
8765 if (_name != null) { | 9658 if (_name != null) { |
8766 offset_name = fbBuilder.writeString(_name); | 9659 offset_name = fbBuilder.writeString(_name); |
8767 } | 9660 } |
8768 if (!(_parameters == null || _parameters.isEmpty)) { | 9661 if (!(_parameters == null || _parameters.isEmpty)) { |
8769 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 9662 offset_parameters = fbBuilder |
| 9663 .writeList(_parameters.map((b) => b.finish(fbBuilder)).toList()); |
8770 } | 9664 } |
8771 if (_type != null) { | 9665 if (_type != null) { |
8772 offset_type = _type.finish(fbBuilder); | 9666 offset_type = _type.finish(fbBuilder); |
8773 } | 9667 } |
8774 fbBuilder.startTable(); | 9668 fbBuilder.startTable(); |
8775 if (offset_annotations != null) { | 9669 if (offset_annotations != null) { |
8776 fbBuilder.addOffset(9, offset_annotations); | 9670 fbBuilder.addOffset(9, offset_annotations); |
8777 } | 9671 } |
8778 if (offset_codeRange != null) { | 9672 if (offset_codeRange != null) { |
8779 fbBuilder.addOffset(7, offset_codeRange); | 9673 fbBuilder.addOffset(7, offset_codeRange); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8824 fbBuilder.addUint32(11, _visibleOffset); | 9718 fbBuilder.addUint32(11, _visibleOffset); |
8825 } | 9719 } |
8826 return fbBuilder.endTable(); | 9720 return fbBuilder.endTable(); |
8827 } | 9721 } |
8828 } | 9722 } |
8829 | 9723 |
8830 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { | 9724 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { |
8831 const _UnlinkedParamReader(); | 9725 const _UnlinkedParamReader(); |
8832 | 9726 |
8833 @override | 9727 @override |
8834 _UnlinkedParamImpl createObject(fb.BufferContext bc, int offset) => new _Unlin
kedParamImpl(bc, offset); | 9728 _UnlinkedParamImpl createObject(fb.BufferContext bc, int offset) => |
| 9729 new _UnlinkedParamImpl(bc, offset); |
8835 } | 9730 } |
8836 | 9731 |
8837 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { | 9732 class _UnlinkedParamImpl extends Object |
| 9733 with _UnlinkedParamMixin |
| 9734 implements idl.UnlinkedParam { |
8838 final fb.BufferContext _bc; | 9735 final fb.BufferContext _bc; |
8839 final int _bcOffset; | 9736 final int _bcOffset; |
8840 | 9737 |
8841 _UnlinkedParamImpl(this._bc, this._bcOffset); | 9738 _UnlinkedParamImpl(this._bc, this._bcOffset); |
8842 | 9739 |
8843 List<idl.UnlinkedExpr> _annotations; | 9740 List<idl.UnlinkedExpr> _annotations; |
8844 idl.CodeRange _codeRange; | 9741 idl.CodeRange _codeRange; |
8845 String _defaultValueCode; | 9742 String _defaultValueCode; |
8846 int _inferredTypeSlot; | 9743 int _inferredTypeSlot; |
8847 int _inheritsCovariantSlot; | 9744 int _inheritsCovariantSlot; |
8848 idl.UnlinkedExecutable _initializer; | 9745 idl.UnlinkedExecutable _initializer; |
8849 bool _isExplicitlyCovariant; | 9746 bool _isExplicitlyCovariant; |
8850 bool _isFinal; | 9747 bool _isFinal; |
8851 bool _isFunctionTyped; | 9748 bool _isFunctionTyped; |
8852 bool _isInitializingFormal; | 9749 bool _isInitializingFormal; |
8853 idl.UnlinkedParamKind _kind; | 9750 idl.UnlinkedParamKind _kind; |
8854 String _name; | 9751 String _name; |
8855 int _nameOffset; | 9752 int _nameOffset; |
8856 List<idl.UnlinkedParam> _parameters; | 9753 List<idl.UnlinkedParam> _parameters; |
8857 idl.EntityRef _type; | 9754 idl.EntityRef _type; |
8858 int _visibleLength; | 9755 int _visibleLength; |
8859 int _visibleOffset; | 9756 int _visibleOffset; |
8860 | 9757 |
8861 @override | 9758 @override |
8862 List<idl.UnlinkedExpr> get annotations { | 9759 List<idl.UnlinkedExpr> get annotations { |
8863 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 9, const <idl.UnlinkedExpr>[]); | 9760 _annotations ??= |
| 9761 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 9762 .vTableGet(_bc, _bcOffset, 9, const <idl.UnlinkedExpr>[]); |
8864 return _annotations; | 9763 return _annotations; |
8865 } | 9764 } |
8866 | 9765 |
8867 @override | 9766 @override |
8868 idl.CodeRange get codeRange { | 9767 idl.CodeRange get codeRange { |
8869 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 7, null); | 9768 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 7, null); |
8870 return _codeRange; | 9769 return _codeRange; |
8871 } | 9770 } |
8872 | 9771 |
8873 @override | 9772 @override |
8874 String get defaultValueCode { | 9773 String get defaultValueCode { |
8875 _defaultValueCode ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 13,
''); | 9774 _defaultValueCode ??= |
| 9775 const fb.StringReader().vTableGet(_bc, _bcOffset, 13, ''); |
8876 return _defaultValueCode; | 9776 return _defaultValueCode; |
8877 } | 9777 } |
8878 | 9778 |
8879 @override | 9779 @override |
8880 int get inferredTypeSlot { | 9780 int get inferredTypeSlot { |
8881 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0
); | 9781 _inferredTypeSlot ??= |
| 9782 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
8882 return _inferredTypeSlot; | 9783 return _inferredTypeSlot; |
8883 } | 9784 } |
8884 | 9785 |
8885 @override | 9786 @override |
8886 int get inheritsCovariantSlot { | 9787 int get inheritsCovariantSlot { |
8887 _inheritsCovariantSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset,
14, 0); | 9788 _inheritsCovariantSlot ??= |
| 9789 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 14, 0); |
8888 return _inheritsCovariantSlot; | 9790 return _inheritsCovariantSlot; |
8889 } | 9791 } |
8890 | 9792 |
8891 @override | 9793 @override |
8892 idl.UnlinkedExecutable get initializer { | 9794 idl.UnlinkedExecutable get initializer { |
8893 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bc, _bcOffset,
12, null); | 9795 _initializer ??= |
| 9796 const _UnlinkedExecutableReader().vTableGet(_bc, _bcOffset, 12, null); |
8894 return _initializer; | 9797 return _initializer; |
8895 } | 9798 } |
8896 | 9799 |
8897 @override | 9800 @override |
8898 bool get isExplicitlyCovariant { | 9801 bool get isExplicitlyCovariant { |
8899 _isExplicitlyCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1
5, false); | 9802 _isExplicitlyCovariant ??= |
| 9803 const fb.BoolReader().vTableGet(_bc, _bcOffset, 15, false); |
8900 return _isExplicitlyCovariant; | 9804 return _isExplicitlyCovariant; |
8901 } | 9805 } |
8902 | 9806 |
8903 @override | 9807 @override |
8904 bool get isFinal { | 9808 bool get isFinal { |
8905 _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 16, false); | 9809 _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 16, false); |
8906 return _isFinal; | 9810 return _isFinal; |
8907 } | 9811 } |
8908 | 9812 |
8909 @override | 9813 @override |
8910 bool get isFunctionTyped { | 9814 bool get isFunctionTyped { |
8911 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, fals
e); | 9815 _isFunctionTyped ??= |
| 9816 const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, false); |
8912 return _isFunctionTyped; | 9817 return _isFunctionTyped; |
8913 } | 9818 } |
8914 | 9819 |
8915 @override | 9820 @override |
8916 bool get isInitializingFormal { | 9821 bool get isInitializingFormal { |
8917 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6,
false); | 9822 _isInitializingFormal ??= |
| 9823 const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false); |
8918 return _isInitializingFormal; | 9824 return _isInitializingFormal; |
8919 } | 9825 } |
8920 | 9826 |
8921 @override | 9827 @override |
8922 idl.UnlinkedParamKind get kind { | 9828 idl.UnlinkedParamKind get kind { |
8923 _kind ??= const _UnlinkedParamKindReader().vTableGet(_bc, _bcOffset, 4, idl.
UnlinkedParamKind.required); | 9829 _kind ??= const _UnlinkedParamKindReader() |
| 9830 .vTableGet(_bc, _bcOffset, 4, idl.UnlinkedParamKind.required); |
8924 return _kind; | 9831 return _kind; |
8925 } | 9832 } |
8926 | 9833 |
8927 @override | 9834 @override |
8928 String get name { | 9835 String get name { |
8929 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 9836 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
8930 return _name; | 9837 return _name; |
8931 } | 9838 } |
8932 | 9839 |
8933 @override | 9840 @override |
8934 int get nameOffset { | 9841 int get nameOffset { |
8935 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 9842 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
8936 return _nameOffset; | 9843 return _nameOffset; |
8937 } | 9844 } |
8938 | 9845 |
8939 @override | 9846 @override |
8940 List<idl.UnlinkedParam> get parameters { | 9847 List<idl.UnlinkedParam> get parameters { |
8941 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedParam>[]); | 9848 _parameters ??= |
| 9849 const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamReader()) |
| 9850 .vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedParam>[]); |
8942 return _parameters; | 9851 return _parameters; |
8943 } | 9852 } |
8944 | 9853 |
8945 @override | 9854 @override |
8946 idl.EntityRef get type { | 9855 idl.EntityRef get type { |
8947 _type ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); | 9856 _type ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); |
8948 return _type; | 9857 return _type; |
8949 } | 9858 } |
8950 | 9859 |
8951 @override | 9860 @override |
8952 int get visibleLength { | 9861 int get visibleLength { |
8953 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0); | 9862 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0); |
8954 return _visibleLength; | 9863 return _visibleLength; |
8955 } | 9864 } |
8956 | 9865 |
8957 @override | 9866 @override |
8958 int get visibleOffset { | 9867 int get visibleOffset { |
8959 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 11, 0); | 9868 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 11, 0); |
8960 return _visibleOffset; | 9869 return _visibleOffset; |
8961 } | 9870 } |
8962 } | 9871 } |
8963 | 9872 |
8964 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { | 9873 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { |
8965 @override | 9874 @override |
8966 Map<String, Object> toJson() { | 9875 Map<String, Object> toJson() { |
8967 Map<String, Object> _result = <String, Object>{}; | 9876 Map<String, Object> _result = <String, Object>{}; |
8968 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 9877 if (annotations.isNotEmpty) |
| 9878 _result["annotations"] = |
| 9879 annotations.map((_value) => _value.toJson()).toList(); |
8969 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 9880 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
8970 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; | 9881 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; |
8971 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; | 9882 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; |
8972 if (inheritsCovariantSlot != 0) _result["inheritsCovariantSlot"] = inheritsC
ovariantSlot; | 9883 if (inheritsCovariantSlot != 0) |
| 9884 _result["inheritsCovariantSlot"] = inheritsCovariantSlot; |
8973 if (initializer != null) _result["initializer"] = initializer.toJson(); | 9885 if (initializer != null) _result["initializer"] = initializer.toJson(); |
8974 if (isExplicitlyCovariant != false) _result["isExplicitlyCovariant"] = isExp
licitlyCovariant; | 9886 if (isExplicitlyCovariant != false) |
| 9887 _result["isExplicitlyCovariant"] = isExplicitlyCovariant; |
8975 if (isFinal != false) _result["isFinal"] = isFinal; | 9888 if (isFinal != false) _result["isFinal"] = isFinal; |
8976 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; | 9889 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; |
8977 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti
alizingFormal; | 9890 if (isInitializingFormal != false) |
8978 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString(
).split('.')[1]; | 9891 _result["isInitializingFormal"] = isInitializingFormal; |
| 9892 if (kind != idl.UnlinkedParamKind.required) |
| 9893 _result["kind"] = kind.toString().split('.')[1]; |
8979 if (name != '') _result["name"] = name; | 9894 if (name != '') _result["name"] = name; |
8980 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 9895 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
8981 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 9896 if (parameters.isNotEmpty) |
| 9897 _result["parameters"] = |
| 9898 parameters.map((_value) => _value.toJson()).toList(); |
8982 if (type != null) _result["type"] = type.toJson(); | 9899 if (type != null) _result["type"] = type.toJson(); |
8983 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 9900 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
8984 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 9901 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
8985 return _result; | 9902 return _result; |
8986 } | 9903 } |
8987 | 9904 |
8988 @override | 9905 @override |
8989 Map<String, Object> toMap() => { | 9906 Map<String, Object> toMap() => { |
8990 "annotations": annotations, | 9907 "annotations": annotations, |
8991 "codeRange": codeRange, | 9908 "codeRange": codeRange, |
8992 "defaultValueCode": defaultValueCode, | 9909 "defaultValueCode": defaultValueCode, |
8993 "inferredTypeSlot": inferredTypeSlot, | 9910 "inferredTypeSlot": inferredTypeSlot, |
8994 "inheritsCovariantSlot": inheritsCovariantSlot, | 9911 "inheritsCovariantSlot": inheritsCovariantSlot, |
8995 "initializer": initializer, | 9912 "initializer": initializer, |
8996 "isExplicitlyCovariant": isExplicitlyCovariant, | 9913 "isExplicitlyCovariant": isExplicitlyCovariant, |
8997 "isFinal": isFinal, | 9914 "isFinal": isFinal, |
8998 "isFunctionTyped": isFunctionTyped, | 9915 "isFunctionTyped": isFunctionTyped, |
8999 "isInitializingFormal": isInitializingFormal, | 9916 "isInitializingFormal": isInitializingFormal, |
9000 "kind": kind, | 9917 "kind": kind, |
9001 "name": name, | 9918 "name": name, |
9002 "nameOffset": nameOffset, | 9919 "nameOffset": nameOffset, |
9003 "parameters": parameters, | 9920 "parameters": parameters, |
9004 "type": type, | 9921 "type": type, |
9005 "visibleLength": visibleLength, | 9922 "visibleLength": visibleLength, |
9006 "visibleOffset": visibleOffset, | 9923 "visibleOffset": visibleOffset, |
9007 }; | 9924 }; |
9008 | 9925 |
9009 @override | 9926 @override |
9010 String toString() => convert.JSON.encode(toJson()); | 9927 String toString() => convert.JSON.encode(toJson()); |
9011 } | 9928 } |
9012 | 9929 |
9013 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl.
UnlinkedPart { | 9930 class UnlinkedPartBuilder extends Object |
| 9931 with _UnlinkedPartMixin |
| 9932 implements idl.UnlinkedPart { |
9014 List<UnlinkedExprBuilder> _annotations; | 9933 List<UnlinkedExprBuilder> _annotations; |
9015 int _uriEnd; | 9934 int _uriEnd; |
9016 int _uriOffset; | 9935 int _uriOffset; |
9017 | 9936 |
9018 @override | 9937 @override |
9019 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 9938 List<UnlinkedExprBuilder> get annotations => |
| 9939 _annotations ??= <UnlinkedExprBuilder>[]; |
9020 | 9940 |
9021 /** | 9941 /** |
9022 * Annotations for this part declaration. | 9942 * Annotations for this part declaration. |
9023 */ | 9943 */ |
9024 void set annotations(List<UnlinkedExprBuilder> value) { | 9944 void set annotations(List<UnlinkedExprBuilder> value) { |
9025 this._annotations = value; | 9945 this._annotations = value; |
9026 } | 9946 } |
9027 | 9947 |
9028 @override | 9948 @override |
9029 int get uriEnd => _uriEnd ??= 0; | 9949 int get uriEnd => _uriEnd ??= 0; |
(...skipping 12 matching lines...) Expand all Loading... |
9042 | 9962 |
9043 /** | 9963 /** |
9044 * Offset of the URI string (including quotes) relative to the beginning of | 9964 * Offset of the URI string (including quotes) relative to the beginning of |
9045 * the file. | 9965 * the file. |
9046 */ | 9966 */ |
9047 void set uriOffset(int value) { | 9967 void set uriOffset(int value) { |
9048 assert(value == null || value >= 0); | 9968 assert(value == null || value >= 0); |
9049 this._uriOffset = value; | 9969 this._uriOffset = value; |
9050 } | 9970 } |
9051 | 9971 |
9052 UnlinkedPartBuilder({List<UnlinkedExprBuilder> annotations, int uriEnd, int ur
iOffset}) | 9972 UnlinkedPartBuilder( |
9053 : _annotations = annotations, | 9973 {List<UnlinkedExprBuilder> annotations, int uriEnd, int uriOffset}) |
9054 _uriEnd = uriEnd, | 9974 : _annotations = annotations, |
9055 _uriOffset = uriOffset; | 9975 _uriEnd = uriEnd, |
| 9976 _uriOffset = uriOffset; |
9056 | 9977 |
9057 /** | 9978 /** |
9058 * Flush [informative] data recursively. | 9979 * Flush [informative] data recursively. |
9059 */ | 9980 */ |
9060 void flushInformative() { | 9981 void flushInformative() { |
9061 _annotations?.forEach((b) => b.flushInformative()); | 9982 _annotations?.forEach((b) => b.flushInformative()); |
9062 _uriEnd = null; | 9983 _uriEnd = null; |
9063 _uriOffset = null; | 9984 _uriOffset = null; |
9064 } | 9985 } |
9065 | 9986 |
9066 /** | 9987 /** |
9067 * Accumulate non-[informative] data into [signature]. | 9988 * Accumulate non-[informative] data into [signature]. |
9068 */ | 9989 */ |
9069 void collectApiSignature(api_sig.ApiSignature signature) { | 9990 void collectApiSignature(api_sig.ApiSignature signature) { |
9070 if (this._annotations == null) { | 9991 if (this._annotations == null) { |
9071 signature.addInt(0); | 9992 signature.addInt(0); |
9072 } else { | 9993 } else { |
9073 signature.addInt(this._annotations.length); | 9994 signature.addInt(this._annotations.length); |
9074 for (var x in this._annotations) { | 9995 for (var x in this._annotations) { |
9075 x?.collectApiSignature(signature); | 9996 x?.collectApiSignature(signature); |
9076 } | 9997 } |
9077 } | 9998 } |
9078 } | 9999 } |
9079 | 10000 |
9080 fb.Offset finish(fb.Builder fbBuilder) { | 10001 fb.Offset finish(fb.Builder fbBuilder) { |
9081 fb.Offset offset_annotations; | 10002 fb.Offset offset_annotations; |
9082 if (!(_annotations == null || _annotations.isEmpty)) { | 10003 if (!(_annotations == null || _annotations.isEmpty)) { |
9083 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 10004 offset_annotations = fbBuilder |
| 10005 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
9084 } | 10006 } |
9085 fbBuilder.startTable(); | 10007 fbBuilder.startTable(); |
9086 if (offset_annotations != null) { | 10008 if (offset_annotations != null) { |
9087 fbBuilder.addOffset(2, offset_annotations); | 10009 fbBuilder.addOffset(2, offset_annotations); |
9088 } | 10010 } |
9089 if (_uriEnd != null && _uriEnd != 0) { | 10011 if (_uriEnd != null && _uriEnd != 0) { |
9090 fbBuilder.addUint32(0, _uriEnd); | 10012 fbBuilder.addUint32(0, _uriEnd); |
9091 } | 10013 } |
9092 if (_uriOffset != null && _uriOffset != 0) { | 10014 if (_uriOffset != null && _uriOffset != 0) { |
9093 fbBuilder.addUint32(1, _uriOffset); | 10015 fbBuilder.addUint32(1, _uriOffset); |
9094 } | 10016 } |
9095 return fbBuilder.endTable(); | 10017 return fbBuilder.endTable(); |
9096 } | 10018 } |
9097 } | 10019 } |
9098 | 10020 |
9099 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> { | 10021 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> { |
9100 const _UnlinkedPartReader(); | 10022 const _UnlinkedPartReader(); |
9101 | 10023 |
9102 @override | 10024 @override |
9103 _UnlinkedPartImpl createObject(fb.BufferContext bc, int offset) => new _Unlink
edPartImpl(bc, offset); | 10025 _UnlinkedPartImpl createObject(fb.BufferContext bc, int offset) => |
| 10026 new _UnlinkedPartImpl(bc, offset); |
9104 } | 10027 } |
9105 | 10028 |
9106 class _UnlinkedPartImpl extends Object with _UnlinkedPartMixin implements idl.Un
linkedPart { | 10029 class _UnlinkedPartImpl extends Object |
| 10030 with _UnlinkedPartMixin |
| 10031 implements idl.UnlinkedPart { |
9107 final fb.BufferContext _bc; | 10032 final fb.BufferContext _bc; |
9108 final int _bcOffset; | 10033 final int _bcOffset; |
9109 | 10034 |
9110 _UnlinkedPartImpl(this._bc, this._bcOffset); | 10035 _UnlinkedPartImpl(this._bc, this._bcOffset); |
9111 | 10036 |
9112 List<idl.UnlinkedExpr> _annotations; | 10037 List<idl.UnlinkedExpr> _annotations; |
9113 int _uriEnd; | 10038 int _uriEnd; |
9114 int _uriOffset; | 10039 int _uriOffset; |
9115 | 10040 |
9116 @override | 10041 @override |
9117 List<idl.UnlinkedExpr> get annotations { | 10042 List<idl.UnlinkedExpr> get annotations { |
9118 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedExpr>[]); | 10043 _annotations ??= |
| 10044 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 10045 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedExpr>[]); |
9119 return _annotations; | 10046 return _annotations; |
9120 } | 10047 } |
9121 | 10048 |
9122 @override | 10049 @override |
9123 int get uriEnd { | 10050 int get uriEnd { |
9124 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); | 10051 _uriEnd ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0); |
9125 return _uriEnd; | 10052 return _uriEnd; |
9126 } | 10053 } |
9127 | 10054 |
9128 @override | 10055 @override |
9129 int get uriOffset { | 10056 int get uriOffset { |
9130 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 10057 _uriOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
9131 return _uriOffset; | 10058 return _uriOffset; |
9132 } | 10059 } |
9133 } | 10060 } |
9134 | 10061 |
9135 abstract class _UnlinkedPartMixin implements idl.UnlinkedPart { | 10062 abstract class _UnlinkedPartMixin implements idl.UnlinkedPart { |
9136 @override | 10063 @override |
9137 Map<String, Object> toJson() { | 10064 Map<String, Object> toJson() { |
9138 Map<String, Object> _result = <String, Object>{}; | 10065 Map<String, Object> _result = <String, Object>{}; |
9139 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 10066 if (annotations.isNotEmpty) |
| 10067 _result["annotations"] = |
| 10068 annotations.map((_value) => _value.toJson()).toList(); |
9140 if (uriEnd != 0) _result["uriEnd"] = uriEnd; | 10069 if (uriEnd != 0) _result["uriEnd"] = uriEnd; |
9141 if (uriOffset != 0) _result["uriOffset"] = uriOffset; | 10070 if (uriOffset != 0) _result["uriOffset"] = uriOffset; |
9142 return _result; | 10071 return _result; |
9143 } | 10072 } |
9144 | 10073 |
9145 @override | 10074 @override |
9146 Map<String, Object> toMap() => { | 10075 Map<String, Object> toMap() => { |
9147 "annotations": annotations, | 10076 "annotations": annotations, |
9148 "uriEnd": uriEnd, | 10077 "uriEnd": uriEnd, |
9149 "uriOffset": uriOffset, | 10078 "uriOffset": uriOffset, |
9150 }; | 10079 }; |
9151 | 10080 |
9152 @override | 10081 @override |
9153 String toString() => convert.JSON.encode(toJson()); | 10082 String toString() => convert.JSON.encode(toJson()); |
9154 } | 10083 } |
9155 | 10084 |
9156 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp
lements idl.UnlinkedPublicName { | 10085 class UnlinkedPublicNameBuilder extends Object |
| 10086 with _UnlinkedPublicNameMixin |
| 10087 implements idl.UnlinkedPublicName { |
9157 idl.ReferenceKind _kind; | 10088 idl.ReferenceKind _kind; |
9158 List<UnlinkedPublicNameBuilder> _members; | 10089 List<UnlinkedPublicNameBuilder> _members; |
9159 String _name; | 10090 String _name; |
9160 int _numTypeParameters; | 10091 int _numTypeParameters; |
9161 | 10092 |
9162 @override | 10093 @override |
9163 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; | 10094 idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum; |
9164 | 10095 |
9165 /** | 10096 /** |
9166 * The kind of object referred to by the name. | 10097 * The kind of object referred to by the name. |
9167 */ | 10098 */ |
9168 void set kind(idl.ReferenceKind value) { | 10099 void set kind(idl.ReferenceKind value) { |
9169 this._kind = value; | 10100 this._kind = value; |
9170 } | 10101 } |
9171 | 10102 |
9172 @override | 10103 @override |
9173 List<UnlinkedPublicNameBuilder> get members => _members ??= <UnlinkedPublicNam
eBuilder>[]; | 10104 List<UnlinkedPublicNameBuilder> get members => |
| 10105 _members ??= <UnlinkedPublicNameBuilder>[]; |
9174 | 10106 |
9175 /** | 10107 /** |
9176 * If this [UnlinkedPublicName] is a class, the list of members which can be | 10108 * If this [UnlinkedPublicName] is a class, the list of members which can be |
9177 * referenced statically - static fields, static methods, and constructors. | 10109 * referenced statically - static fields, static methods, and constructors. |
9178 * Otherwise empty. | 10110 * Otherwise empty. |
9179 * | 10111 * |
9180 * Unnamed constructors are not included since they do not constitute a | 10112 * Unnamed constructors are not included since they do not constitute a |
9181 * separate name added to any namespace. | 10113 * separate name added to any namespace. |
9182 */ | 10114 */ |
9183 void set members(List<UnlinkedPublicNameBuilder> value) { | 10115 void set members(List<UnlinkedPublicNameBuilder> value) { |
(...skipping 15 matching lines...) Expand all Loading... |
9199 | 10131 |
9200 /** | 10132 /** |
9201 * If the entity being referred to is generic, the number of type parameters | 10133 * If the entity being referred to is generic, the number of type parameters |
9202 * it accepts. Otherwise zero. | 10134 * it accepts. Otherwise zero. |
9203 */ | 10135 */ |
9204 void set numTypeParameters(int value) { | 10136 void set numTypeParameters(int value) { |
9205 assert(value == null || value >= 0); | 10137 assert(value == null || value >= 0); |
9206 this._numTypeParameters = value; | 10138 this._numTypeParameters = value; |
9207 } | 10139 } |
9208 | 10140 |
9209 UnlinkedPublicNameBuilder({idl.ReferenceKind kind, List<UnlinkedPublicNameBuil
der> members, String name, int numTypeParameters}) | 10141 UnlinkedPublicNameBuilder( |
9210 : _kind = kind, | 10142 {idl.ReferenceKind kind, |
9211 _members = members, | 10143 List<UnlinkedPublicNameBuilder> members, |
9212 _name = name, | 10144 String name, |
9213 _numTypeParameters = numTypeParameters; | 10145 int numTypeParameters}) |
| 10146 : _kind = kind, |
| 10147 _members = members, |
| 10148 _name = name, |
| 10149 _numTypeParameters = numTypeParameters; |
9214 | 10150 |
9215 /** | 10151 /** |
9216 * Flush [informative] data recursively. | 10152 * Flush [informative] data recursively. |
9217 */ | 10153 */ |
9218 void flushInformative() { | 10154 void flushInformative() { |
9219 _members?.forEach((b) => b.flushInformative()); | 10155 _members?.forEach((b) => b.flushInformative()); |
9220 } | 10156 } |
9221 | 10157 |
9222 /** | 10158 /** |
9223 * Accumulate non-[informative] data into [signature]. | 10159 * Accumulate non-[informative] data into [signature]. |
9224 */ | 10160 */ |
9225 void collectApiSignature(api_sig.ApiSignature signature) { | 10161 void collectApiSignature(api_sig.ApiSignature signature) { |
9226 signature.addString(this._name ?? ''); | 10162 signature.addString(this._name ?? ''); |
9227 signature.addInt(this._kind == null ? 0 : this._kind.index); | 10163 signature.addInt(this._kind == null ? 0 : this._kind.index); |
9228 if (this._members == null) { | 10164 if (this._members == null) { |
9229 signature.addInt(0); | 10165 signature.addInt(0); |
9230 } else { | 10166 } else { |
9231 signature.addInt(this._members.length); | 10167 signature.addInt(this._members.length); |
9232 for (var x in this._members) { | 10168 for (var x in this._members) { |
9233 x?.collectApiSignature(signature); | 10169 x?.collectApiSignature(signature); |
9234 } | 10170 } |
9235 } | 10171 } |
9236 signature.addInt(this._numTypeParameters ?? 0); | 10172 signature.addInt(this._numTypeParameters ?? 0); |
9237 } | 10173 } |
9238 | 10174 |
9239 fb.Offset finish(fb.Builder fbBuilder) { | 10175 fb.Offset finish(fb.Builder fbBuilder) { |
9240 fb.Offset offset_members; | 10176 fb.Offset offset_members; |
9241 fb.Offset offset_name; | 10177 fb.Offset offset_name; |
9242 if (!(_members == null || _members.isEmpty)) { | 10178 if (!(_members == null || _members.isEmpty)) { |
9243 offset_members = fbBuilder.writeList(_members.map((b) => b.finish(fbBuilde
r)).toList()); | 10179 offset_members = fbBuilder |
| 10180 .writeList(_members.map((b) => b.finish(fbBuilder)).toList()); |
9244 } | 10181 } |
9245 if (_name != null) { | 10182 if (_name != null) { |
9246 offset_name = fbBuilder.writeString(_name); | 10183 offset_name = fbBuilder.writeString(_name); |
9247 } | 10184 } |
9248 fbBuilder.startTable(); | 10185 fbBuilder.startTable(); |
9249 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { | 10186 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { |
9250 fbBuilder.addUint8(1, _kind.index); | 10187 fbBuilder.addUint8(1, _kind.index); |
9251 } | 10188 } |
9252 if (offset_members != null) { | 10189 if (offset_members != null) { |
9253 fbBuilder.addOffset(2, offset_members); | 10190 fbBuilder.addOffset(2, offset_members); |
9254 } | 10191 } |
9255 if (offset_name != null) { | 10192 if (offset_name != null) { |
9256 fbBuilder.addOffset(0, offset_name); | 10193 fbBuilder.addOffset(0, offset_name); |
9257 } | 10194 } |
9258 if (_numTypeParameters != null && _numTypeParameters != 0) { | 10195 if (_numTypeParameters != null && _numTypeParameters != 0) { |
9259 fbBuilder.addUint32(3, _numTypeParameters); | 10196 fbBuilder.addUint32(3, _numTypeParameters); |
9260 } | 10197 } |
9261 return fbBuilder.endTable(); | 10198 return fbBuilder.endTable(); |
9262 } | 10199 } |
9263 } | 10200 } |
9264 | 10201 |
9265 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl>
{ | 10202 class _UnlinkedPublicNameReader |
| 10203 extends fb.TableReader<_UnlinkedPublicNameImpl> { |
9266 const _UnlinkedPublicNameReader(); | 10204 const _UnlinkedPublicNameReader(); |
9267 | 10205 |
9268 @override | 10206 @override |
9269 _UnlinkedPublicNameImpl createObject(fb.BufferContext bc, int offset) => new _
UnlinkedPublicNameImpl(bc, offset); | 10207 _UnlinkedPublicNameImpl createObject(fb.BufferContext bc, int offset) => |
| 10208 new _UnlinkedPublicNameImpl(bc, offset); |
9270 } | 10209 } |
9271 | 10210 |
9272 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple
ments idl.UnlinkedPublicName { | 10211 class _UnlinkedPublicNameImpl extends Object |
| 10212 with _UnlinkedPublicNameMixin |
| 10213 implements idl.UnlinkedPublicName { |
9273 final fb.BufferContext _bc; | 10214 final fb.BufferContext _bc; |
9274 final int _bcOffset; | 10215 final int _bcOffset; |
9275 | 10216 |
9276 _UnlinkedPublicNameImpl(this._bc, this._bcOffset); | 10217 _UnlinkedPublicNameImpl(this._bc, this._bcOffset); |
9277 | 10218 |
9278 idl.ReferenceKind _kind; | 10219 idl.ReferenceKind _kind; |
9279 List<idl.UnlinkedPublicName> _members; | 10220 List<idl.UnlinkedPublicName> _members; |
9280 String _name; | 10221 String _name; |
9281 int _numTypeParameters; | 10222 int _numTypeParameters; |
9282 | 10223 |
9283 @override | 10224 @override |
9284 idl.ReferenceKind get kind { | 10225 idl.ReferenceKind get kind { |
9285 _kind ??= const _ReferenceKindReader().vTableGet(_bc, _bcOffset, 1, idl.Refe
renceKind.classOrEnum); | 10226 _kind ??= const _ReferenceKindReader() |
| 10227 .vTableGet(_bc, _bcOffset, 1, idl.ReferenceKind.classOrEnum); |
9286 return _kind; | 10228 return _kind; |
9287 } | 10229 } |
9288 | 10230 |
9289 @override | 10231 @override |
9290 List<idl.UnlinkedPublicName> get members { | 10232 List<idl.UnlinkedPublicName> get members { |
9291 _members ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPubl
icNameReader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedPublicName>[]); | 10233 _members ??= const fb.ListReader<idl.UnlinkedPublicName>( |
| 10234 const _UnlinkedPublicNameReader()) |
| 10235 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedPublicName>[]); |
9292 return _members; | 10236 return _members; |
9293 } | 10237 } |
9294 | 10238 |
9295 @override | 10239 @override |
9296 String get name { | 10240 String get name { |
9297 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 10241 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
9298 return _name; | 10242 return _name; |
9299 } | 10243 } |
9300 | 10244 |
9301 @override | 10245 @override |
9302 int get numTypeParameters { | 10246 int get numTypeParameters { |
9303 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3,
0); | 10247 _numTypeParameters ??= |
| 10248 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0); |
9304 return _numTypeParameters; | 10249 return _numTypeParameters; |
9305 } | 10250 } |
9306 } | 10251 } |
9307 | 10252 |
9308 abstract class _UnlinkedPublicNameMixin implements idl.UnlinkedPublicName { | 10253 abstract class _UnlinkedPublicNameMixin implements idl.UnlinkedPublicName { |
9309 @override | 10254 @override |
9310 Map<String, Object> toJson() { | 10255 Map<String, Object> toJson() { |
9311 Map<String, Object> _result = <String, Object>{}; | 10256 Map<String, Object> _result = <String, Object>{}; |
9312 if (kind != idl.ReferenceKind.classOrEnum) _result["kind"] = kind.toString()
.split('.')[1]; | 10257 if (kind != idl.ReferenceKind.classOrEnum) |
9313 if (members.isNotEmpty) _result["members"] = members.map((_value) => _value.
toJson()).toList(); | 10258 _result["kind"] = kind.toString().split('.')[1]; |
| 10259 if (members.isNotEmpty) |
| 10260 _result["members"] = members.map((_value) => _value.toJson()).toList(); |
9314 if (name != '') _result["name"] = name; | 10261 if (name != '') _result["name"] = name; |
9315 if (numTypeParameters != 0) _result["numTypeParameters"] = numTypeParameters
; | 10262 if (numTypeParameters != 0) |
| 10263 _result["numTypeParameters"] = numTypeParameters; |
9316 return _result; | 10264 return _result; |
9317 } | 10265 } |
9318 | 10266 |
9319 @override | 10267 @override |
9320 Map<String, Object> toMap() => { | 10268 Map<String, Object> toMap() => { |
9321 "kind": kind, | 10269 "kind": kind, |
9322 "members": members, | 10270 "members": members, |
9323 "name": name, | 10271 "name": name, |
9324 "numTypeParameters": numTypeParameters, | 10272 "numTypeParameters": numTypeParameters, |
9325 }; | 10273 }; |
9326 | 10274 |
9327 @override | 10275 @override |
9328 String toString() => convert.JSON.encode(toJson()); | 10276 String toString() => convert.JSON.encode(toJson()); |
9329 } | 10277 } |
9330 | 10278 |
9331 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac
eMixin implements idl.UnlinkedPublicNamespace { | 10279 class UnlinkedPublicNamespaceBuilder extends Object |
| 10280 with _UnlinkedPublicNamespaceMixin |
| 10281 implements idl.UnlinkedPublicNamespace { |
9332 List<UnlinkedExportPublicBuilder> _exports; | 10282 List<UnlinkedExportPublicBuilder> _exports; |
9333 List<UnlinkedPublicNameBuilder> _names; | 10283 List<UnlinkedPublicNameBuilder> _names; |
9334 List<String> _parts; | 10284 List<String> _parts; |
9335 | 10285 |
9336 @override | 10286 @override |
9337 List<UnlinkedExportPublicBuilder> get exports => _exports ??= <UnlinkedExportP
ublicBuilder>[]; | 10287 List<UnlinkedExportPublicBuilder> get exports => |
| 10288 _exports ??= <UnlinkedExportPublicBuilder>[]; |
9338 | 10289 |
9339 /** | 10290 /** |
9340 * Export declarations in the compilation unit. | 10291 * Export declarations in the compilation unit. |
9341 */ | 10292 */ |
9342 void set exports(List<UnlinkedExportPublicBuilder> value) { | 10293 void set exports(List<UnlinkedExportPublicBuilder> value) { |
9343 this._exports = value; | 10294 this._exports = value; |
9344 } | 10295 } |
9345 | 10296 |
9346 @override | 10297 @override |
9347 List<UnlinkedPublicNameBuilder> get names => _names ??= <UnlinkedPublicNameBui
lder>[]; | 10298 List<UnlinkedPublicNameBuilder> get names => |
| 10299 _names ??= <UnlinkedPublicNameBuilder>[]; |
9348 | 10300 |
9349 /** | 10301 /** |
9350 * Public names defined in the compilation unit. | 10302 * Public names defined in the compilation unit. |
9351 * | 10303 * |
9352 * TODO(paulberry): consider sorting these names to reduce unnecessary | 10304 * TODO(paulberry): consider sorting these names to reduce unnecessary |
9353 * relinking. | 10305 * relinking. |
9354 */ | 10306 */ |
9355 void set names(List<UnlinkedPublicNameBuilder> value) { | 10307 void set names(List<UnlinkedPublicNameBuilder> value) { |
9356 this._names = value; | 10308 this._names = value; |
9357 } | 10309 } |
9358 | 10310 |
9359 @override | 10311 @override |
9360 List<String> get parts => _parts ??= <String>[]; | 10312 List<String> get parts => _parts ??= <String>[]; |
9361 | 10313 |
9362 /** | 10314 /** |
9363 * URIs referenced by part declarations in the compilation unit. | 10315 * URIs referenced by part declarations in the compilation unit. |
9364 */ | 10316 */ |
9365 void set parts(List<String> value) { | 10317 void set parts(List<String> value) { |
9366 this._parts = value; | 10318 this._parts = value; |
9367 } | 10319 } |
9368 | 10320 |
9369 UnlinkedPublicNamespaceBuilder({List<UnlinkedExportPublicBuilder> exports, Lis
t<UnlinkedPublicNameBuilder> names, List<String> parts}) | 10321 UnlinkedPublicNamespaceBuilder( |
9370 : _exports = exports, | 10322 {List<UnlinkedExportPublicBuilder> exports, |
9371 _names = names, | 10323 List<UnlinkedPublicNameBuilder> names, |
9372 _parts = parts; | 10324 List<String> parts}) |
| 10325 : _exports = exports, |
| 10326 _names = names, |
| 10327 _parts = parts; |
9373 | 10328 |
9374 /** | 10329 /** |
9375 * Flush [informative] data recursively. | 10330 * Flush [informative] data recursively. |
9376 */ | 10331 */ |
9377 void flushInformative() { | 10332 void flushInformative() { |
9378 _exports?.forEach((b) => b.flushInformative()); | 10333 _exports?.forEach((b) => b.flushInformative()); |
9379 _names?.forEach((b) => b.flushInformative()); | 10334 _names?.forEach((b) => b.flushInformative()); |
9380 } | 10335 } |
9381 | 10336 |
9382 /** | 10337 /** |
(...skipping 29 matching lines...) Expand all Loading... |
9412 List<int> toBuffer() { | 10367 List<int> toBuffer() { |
9413 fb.Builder fbBuilder = new fb.Builder(); | 10368 fb.Builder fbBuilder = new fb.Builder(); |
9414 return fbBuilder.finish(finish(fbBuilder), "UPNS"); | 10369 return fbBuilder.finish(finish(fbBuilder), "UPNS"); |
9415 } | 10370 } |
9416 | 10371 |
9417 fb.Offset finish(fb.Builder fbBuilder) { | 10372 fb.Offset finish(fb.Builder fbBuilder) { |
9418 fb.Offset offset_exports; | 10373 fb.Offset offset_exports; |
9419 fb.Offset offset_names; | 10374 fb.Offset offset_names; |
9420 fb.Offset offset_parts; | 10375 fb.Offset offset_parts; |
9421 if (!(_exports == null || _exports.isEmpty)) { | 10376 if (!(_exports == null || _exports.isEmpty)) { |
9422 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); | 10377 offset_exports = fbBuilder |
| 10378 .writeList(_exports.map((b) => b.finish(fbBuilder)).toList()); |
9423 } | 10379 } |
9424 if (!(_names == null || _names.isEmpty)) { | 10380 if (!(_names == null || _names.isEmpty)) { |
9425 offset_names = fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)).
toList()); | 10381 offset_names = |
| 10382 fbBuilder.writeList(_names.map((b) => b.finish(fbBuilder)).toList()); |
9426 } | 10383 } |
9427 if (!(_parts == null || _parts.isEmpty)) { | 10384 if (!(_parts == null || _parts.isEmpty)) { |
9428 offset_parts = fbBuilder.writeList(_parts.map((b) => fbBuilder.writeString
(b)).toList()); | 10385 offset_parts = fbBuilder |
| 10386 .writeList(_parts.map((b) => fbBuilder.writeString(b)).toList()); |
9429 } | 10387 } |
9430 fbBuilder.startTable(); | 10388 fbBuilder.startTable(); |
9431 if (offset_exports != null) { | 10389 if (offset_exports != null) { |
9432 fbBuilder.addOffset(2, offset_exports); | 10390 fbBuilder.addOffset(2, offset_exports); |
9433 } | 10391 } |
9434 if (offset_names != null) { | 10392 if (offset_names != null) { |
9435 fbBuilder.addOffset(0, offset_names); | 10393 fbBuilder.addOffset(0, offset_names); |
9436 } | 10394 } |
9437 if (offset_parts != null) { | 10395 if (offset_parts != null) { |
9438 fbBuilder.addOffset(1, offset_parts); | 10396 fbBuilder.addOffset(1, offset_parts); |
9439 } | 10397 } |
9440 return fbBuilder.endTable(); | 10398 return fbBuilder.endTable(); |
9441 } | 10399 } |
9442 } | 10400 } |
9443 | 10401 |
9444 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) { | 10402 idl.UnlinkedPublicNamespace readUnlinkedPublicNamespace(List<int> buffer) { |
9445 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 10403 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
9446 return const _UnlinkedPublicNamespaceReader().read(rootRef, 0); | 10404 return const _UnlinkedPublicNamespaceReader().read(rootRef, 0); |
9447 } | 10405 } |
9448 | 10406 |
9449 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames
paceImpl> { | 10407 class _UnlinkedPublicNamespaceReader |
| 10408 extends fb.TableReader<_UnlinkedPublicNamespaceImpl> { |
9450 const _UnlinkedPublicNamespaceReader(); | 10409 const _UnlinkedPublicNamespaceReader(); |
9451 | 10410 |
9452 @override | 10411 @override |
9453 _UnlinkedPublicNamespaceImpl createObject(fb.BufferContext bc, int offset) =>
new _UnlinkedPublicNamespaceImpl(bc, offset); | 10412 _UnlinkedPublicNamespaceImpl createObject(fb.BufferContext bc, int offset) => |
| 10413 new _UnlinkedPublicNamespaceImpl(bc, offset); |
9454 } | 10414 } |
9455 | 10415 |
9456 class _UnlinkedPublicNamespaceImpl extends Object with _UnlinkedPublicNamespaceM
ixin implements idl.UnlinkedPublicNamespace { | 10416 class _UnlinkedPublicNamespaceImpl extends Object |
| 10417 with _UnlinkedPublicNamespaceMixin |
| 10418 implements idl.UnlinkedPublicNamespace { |
9457 final fb.BufferContext _bc; | 10419 final fb.BufferContext _bc; |
9458 final int _bcOffset; | 10420 final int _bcOffset; |
9459 | 10421 |
9460 _UnlinkedPublicNamespaceImpl(this._bc, this._bcOffset); | 10422 _UnlinkedPublicNamespaceImpl(this._bc, this._bcOffset); |
9461 | 10423 |
9462 List<idl.UnlinkedExportPublic> _exports; | 10424 List<idl.UnlinkedExportPublic> _exports; |
9463 List<idl.UnlinkedPublicName> _names; | 10425 List<idl.UnlinkedPublicName> _names; |
9464 List<String> _parts; | 10426 List<String> _parts; |
9465 | 10427 |
9466 @override | 10428 @override |
9467 List<idl.UnlinkedExportPublic> get exports { | 10429 List<idl.UnlinkedExportPublic> get exports { |
9468 _exports ??= const fb.ListReader<idl.UnlinkedExportPublic>(const _UnlinkedEx
portPublicReader()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedExportPublic
>[]); | 10430 _exports ??= const fb.ListReader<idl.UnlinkedExportPublic>( |
| 10431 const _UnlinkedExportPublicReader()) |
| 10432 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedExportPublic>[]); |
9469 return _exports; | 10433 return _exports; |
9470 } | 10434 } |
9471 | 10435 |
9472 @override | 10436 @override |
9473 List<idl.UnlinkedPublicName> get names { | 10437 List<idl.UnlinkedPublicName> get names { |
9474 _names ??= const fb.ListReader<idl.UnlinkedPublicName>(const _UnlinkedPublic
NameReader()).vTableGet(_bc, _bcOffset, 0, const <idl.UnlinkedPublicName>[]); | 10438 _names ??= const fb.ListReader<idl.UnlinkedPublicName>( |
| 10439 const _UnlinkedPublicNameReader()) |
| 10440 .vTableGet(_bc, _bcOffset, 0, const <idl.UnlinkedPublicName>[]); |
9475 return _names; | 10441 return _names; |
9476 } | 10442 } |
9477 | 10443 |
9478 @override | 10444 @override |
9479 List<String> get parts { | 10445 List<String> get parts { |
9480 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b
c, _bcOffset, 1, const <String>[]); | 10446 _parts ??= const fb.ListReader<String>(const fb.StringReader()) |
| 10447 .vTableGet(_bc, _bcOffset, 1, const <String>[]); |
9481 return _parts; | 10448 return _parts; |
9482 } | 10449 } |
9483 } | 10450 } |
9484 | 10451 |
9485 abstract class _UnlinkedPublicNamespaceMixin implements idl.UnlinkedPublicNamesp
ace { | 10452 abstract class _UnlinkedPublicNamespaceMixin |
| 10453 implements idl.UnlinkedPublicNamespace { |
9486 @override | 10454 @override |
9487 Map<String, Object> toJson() { | 10455 Map<String, Object> toJson() { |
9488 Map<String, Object> _result = <String, Object>{}; | 10456 Map<String, Object> _result = <String, Object>{}; |
9489 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); | 10457 if (exports.isNotEmpty) |
9490 if (names.isNotEmpty) _result["names"] = names.map((_value) => _value.toJson
()).toList(); | 10458 _result["exports"] = exports.map((_value) => _value.toJson()).toList(); |
| 10459 if (names.isNotEmpty) |
| 10460 _result["names"] = names.map((_value) => _value.toJson()).toList(); |
9491 if (parts.isNotEmpty) _result["parts"] = parts; | 10461 if (parts.isNotEmpty) _result["parts"] = parts; |
9492 return _result; | 10462 return _result; |
9493 } | 10463 } |
9494 | 10464 |
9495 @override | 10465 @override |
9496 Map<String, Object> toMap() => { | 10466 Map<String, Object> toMap() => { |
9497 "exports": exports, | 10467 "exports": exports, |
9498 "names": names, | 10468 "names": names, |
9499 "parts": parts, | 10469 "parts": parts, |
9500 }; | 10470 }; |
9501 | 10471 |
9502 @override | 10472 @override |
9503 String toString() => convert.JSON.encode(toJson()); | 10473 String toString() => convert.JSON.encode(toJson()); |
9504 } | 10474 } |
9505 | 10475 |
9506 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple
ments idl.UnlinkedReference { | 10476 class UnlinkedReferenceBuilder extends Object |
| 10477 with _UnlinkedReferenceMixin |
| 10478 implements idl.UnlinkedReference { |
9507 String _name; | 10479 String _name; |
9508 int _prefixReference; | 10480 int _prefixReference; |
9509 | 10481 |
9510 @override | 10482 @override |
9511 String get name => _name ??= ''; | 10483 String get name => _name ??= ''; |
9512 | 10484 |
9513 /** | 10485 /** |
9514 * Name of the entity being referred to. For the pseudo-type `dynamic`, the | 10486 * Name of the entity being referred to. For the pseudo-type `dynamic`, the |
9515 * string is "dynamic". For the pseudo-type `void`, the string is "void". | 10487 * string is "dynamic". For the pseudo-type `void`, the string is "void". |
9516 * For the pseudo-type `bottom`, the string is "*bottom*". | 10488 * For the pseudo-type `bottom`, the string is "*bottom*". |
(...skipping 12 matching lines...) Expand all Loading... |
9529 * Prefix references must always point backward; that is, for all i, if | 10501 * Prefix references must always point backward; that is, for all i, if |
9530 * UnlinkedUnit.references[i].prefixReference != 0, then | 10502 * UnlinkedUnit.references[i].prefixReference != 0, then |
9531 * UnlinkedUnit.references[i].prefixReference < i. | 10503 * UnlinkedUnit.references[i].prefixReference < i. |
9532 */ | 10504 */ |
9533 void set prefixReference(int value) { | 10505 void set prefixReference(int value) { |
9534 assert(value == null || value >= 0); | 10506 assert(value == null || value >= 0); |
9535 this._prefixReference = value; | 10507 this._prefixReference = value; |
9536 } | 10508 } |
9537 | 10509 |
9538 UnlinkedReferenceBuilder({String name, int prefixReference}) | 10510 UnlinkedReferenceBuilder({String name, int prefixReference}) |
9539 : _name = name, | 10511 : _name = name, |
9540 _prefixReference = prefixReference; | 10512 _prefixReference = prefixReference; |
9541 | 10513 |
9542 /** | 10514 /** |
9543 * Flush [informative] data recursively. | 10515 * Flush [informative] data recursively. |
9544 */ | 10516 */ |
9545 void flushInformative() { | 10517 void flushInformative() {} |
9546 } | |
9547 | 10518 |
9548 /** | 10519 /** |
9549 * Accumulate non-[informative] data into [signature]. | 10520 * Accumulate non-[informative] data into [signature]. |
9550 */ | 10521 */ |
9551 void collectApiSignature(api_sig.ApiSignature signature) { | 10522 void collectApiSignature(api_sig.ApiSignature signature) { |
9552 signature.addString(this._name ?? ''); | 10523 signature.addString(this._name ?? ''); |
9553 signature.addInt(this._prefixReference ?? 0); | 10524 signature.addInt(this._prefixReference ?? 0); |
9554 } | 10525 } |
9555 | 10526 |
9556 fb.Offset finish(fb.Builder fbBuilder) { | 10527 fb.Offset finish(fb.Builder fbBuilder) { |
9557 fb.Offset offset_name; | 10528 fb.Offset offset_name; |
9558 if (_name != null) { | 10529 if (_name != null) { |
9559 offset_name = fbBuilder.writeString(_name); | 10530 offset_name = fbBuilder.writeString(_name); |
9560 } | 10531 } |
9561 fbBuilder.startTable(); | 10532 fbBuilder.startTable(); |
9562 if (offset_name != null) { | 10533 if (offset_name != null) { |
9563 fbBuilder.addOffset(0, offset_name); | 10534 fbBuilder.addOffset(0, offset_name); |
9564 } | 10535 } |
9565 if (_prefixReference != null && _prefixReference != 0) { | 10536 if (_prefixReference != null && _prefixReference != 0) { |
9566 fbBuilder.addUint32(1, _prefixReference); | 10537 fbBuilder.addUint32(1, _prefixReference); |
9567 } | 10538 } |
9568 return fbBuilder.endTable(); | 10539 return fbBuilder.endTable(); |
9569 } | 10540 } |
9570 } | 10541 } |
9571 | 10542 |
9572 class _UnlinkedReferenceReader extends fb.TableReader<_UnlinkedReferenceImpl> { | 10543 class _UnlinkedReferenceReader extends fb.TableReader<_UnlinkedReferenceImpl> { |
9573 const _UnlinkedReferenceReader(); | 10544 const _UnlinkedReferenceReader(); |
9574 | 10545 |
9575 @override | 10546 @override |
9576 _UnlinkedReferenceImpl createObject(fb.BufferContext bc, int offset) => new _U
nlinkedReferenceImpl(bc, offset); | 10547 _UnlinkedReferenceImpl createObject(fb.BufferContext bc, int offset) => |
| 10548 new _UnlinkedReferenceImpl(bc, offset); |
9577 } | 10549 } |
9578 | 10550 |
9579 class _UnlinkedReferenceImpl extends Object with _UnlinkedReferenceMixin impleme
nts idl.UnlinkedReference { | 10551 class _UnlinkedReferenceImpl extends Object |
| 10552 with _UnlinkedReferenceMixin |
| 10553 implements idl.UnlinkedReference { |
9580 final fb.BufferContext _bc; | 10554 final fb.BufferContext _bc; |
9581 final int _bcOffset; | 10555 final int _bcOffset; |
9582 | 10556 |
9583 _UnlinkedReferenceImpl(this._bc, this._bcOffset); | 10557 _UnlinkedReferenceImpl(this._bc, this._bcOffset); |
9584 | 10558 |
9585 String _name; | 10559 String _name; |
9586 int _prefixReference; | 10560 int _prefixReference; |
9587 | 10561 |
9588 @override | 10562 @override |
9589 String get name { | 10563 String get name { |
9590 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 10564 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
9591 return _name; | 10565 return _name; |
9592 } | 10566 } |
9593 | 10567 |
9594 @override | 10568 @override |
9595 int get prefixReference { | 10569 int get prefixReference { |
9596 _prefixReference ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0)
; | 10570 _prefixReference ??= |
| 10571 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
9597 return _prefixReference; | 10572 return _prefixReference; |
9598 } | 10573 } |
9599 } | 10574 } |
9600 | 10575 |
9601 abstract class _UnlinkedReferenceMixin implements idl.UnlinkedReference { | 10576 abstract class _UnlinkedReferenceMixin implements idl.UnlinkedReference { |
9602 @override | 10577 @override |
9603 Map<String, Object> toJson() { | 10578 Map<String, Object> toJson() { |
9604 Map<String, Object> _result = <String, Object>{}; | 10579 Map<String, Object> _result = <String, Object>{}; |
9605 if (name != '') _result["name"] = name; | 10580 if (name != '') _result["name"] = name; |
9606 if (prefixReference != 0) _result["prefixReference"] = prefixReference; | 10581 if (prefixReference != 0) _result["prefixReference"] = prefixReference; |
9607 return _result; | 10582 return _result; |
9608 } | 10583 } |
9609 | 10584 |
9610 @override | 10585 @override |
9611 Map<String, Object> toMap() => { | 10586 Map<String, Object> toMap() => { |
9612 "name": name, | 10587 "name": name, |
9613 "prefixReference": prefixReference, | 10588 "prefixReference": prefixReference, |
9614 }; | 10589 }; |
9615 | 10590 |
9616 @override | 10591 @override |
9617 String toString() => convert.JSON.encode(toJson()); | 10592 String toString() => convert.JSON.encode(toJson()); |
9618 } | 10593 } |
9619 | 10594 |
9620 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { | 10595 class UnlinkedTypedefBuilder extends Object |
| 10596 with _UnlinkedTypedefMixin |
| 10597 implements idl.UnlinkedTypedef { |
9621 List<UnlinkedExprBuilder> _annotations; | 10598 List<UnlinkedExprBuilder> _annotations; |
9622 CodeRangeBuilder _codeRange; | 10599 CodeRangeBuilder _codeRange; |
9623 UnlinkedDocumentationCommentBuilder _documentationComment; | 10600 UnlinkedDocumentationCommentBuilder _documentationComment; |
9624 String _name; | 10601 String _name; |
9625 int _nameOffset; | 10602 int _nameOffset; |
9626 List<UnlinkedParamBuilder> _parameters; | 10603 List<UnlinkedParamBuilder> _parameters; |
9627 EntityRefBuilder _returnType; | 10604 EntityRefBuilder _returnType; |
9628 idl.TypedefStyle _style; | 10605 idl.TypedefStyle _style; |
9629 List<UnlinkedTypeParamBuilder> _typeParameters; | 10606 List<UnlinkedTypeParamBuilder> _typeParameters; |
9630 | 10607 |
9631 @override | 10608 @override |
9632 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 10609 List<UnlinkedExprBuilder> get annotations => |
| 10610 _annotations ??= <UnlinkedExprBuilder>[]; |
9633 | 10611 |
9634 /** | 10612 /** |
9635 * Annotations for this typedef. | 10613 * Annotations for this typedef. |
9636 */ | 10614 */ |
9637 void set annotations(List<UnlinkedExprBuilder> value) { | 10615 void set annotations(List<UnlinkedExprBuilder> value) { |
9638 this._annotations = value; | 10616 this._annotations = value; |
9639 } | 10617 } |
9640 | 10618 |
9641 @override | 10619 @override |
9642 CodeRangeBuilder get codeRange => _codeRange; | 10620 CodeRangeBuilder get codeRange => _codeRange; |
9643 | 10621 |
9644 /** | 10622 /** |
9645 * Code range of the typedef. | 10623 * Code range of the typedef. |
9646 */ | 10624 */ |
9647 void set codeRange(CodeRangeBuilder value) { | 10625 void set codeRange(CodeRangeBuilder value) { |
9648 this._codeRange = value; | 10626 this._codeRange = value; |
9649 } | 10627 } |
9650 | 10628 |
9651 @override | 10629 @override |
9652 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 10630 UnlinkedDocumentationCommentBuilder get documentationComment => |
| 10631 _documentationComment; |
9653 | 10632 |
9654 /** | 10633 /** |
9655 * Documentation comment for the typedef, or `null` if there is no | 10634 * Documentation comment for the typedef, or `null` if there is no |
9656 * documentation comment. | 10635 * documentation comment. |
9657 */ | 10636 */ |
9658 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { | 10637 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { |
9659 this._documentationComment = value; | 10638 this._documentationComment = value; |
9660 } | 10639 } |
9661 | 10640 |
9662 @override | 10641 @override |
(...skipping 11 matching lines...) Expand all Loading... |
9674 | 10653 |
9675 /** | 10654 /** |
9676 * Offset of the typedef name relative to the beginning of the file. | 10655 * Offset of the typedef name relative to the beginning of the file. |
9677 */ | 10656 */ |
9678 void set nameOffset(int value) { | 10657 void set nameOffset(int value) { |
9679 assert(value == null || value >= 0); | 10658 assert(value == null || value >= 0); |
9680 this._nameOffset = value; | 10659 this._nameOffset = value; |
9681 } | 10660 } |
9682 | 10661 |
9683 @override | 10662 @override |
9684 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui
lder>[]; | 10663 List<UnlinkedParamBuilder> get parameters => |
| 10664 _parameters ??= <UnlinkedParamBuilder>[]; |
9685 | 10665 |
9686 /** | 10666 /** |
9687 * Parameters of the executable, if any. | 10667 * Parameters of the executable, if any. |
9688 */ | 10668 */ |
9689 void set parameters(List<UnlinkedParamBuilder> value) { | 10669 void set parameters(List<UnlinkedParamBuilder> value) { |
9690 this._parameters = value; | 10670 this._parameters = value; |
9691 } | 10671 } |
9692 | 10672 |
9693 @override | 10673 @override |
9694 EntityRefBuilder get returnType => _returnType; | 10674 EntityRefBuilder get returnType => _returnType; |
(...skipping 11 matching lines...) Expand all Loading... |
9706 idl.TypedefStyle get style => _style ??= idl.TypedefStyle.functionType; | 10686 idl.TypedefStyle get style => _style ??= idl.TypedefStyle.functionType; |
9707 | 10687 |
9708 /** | 10688 /** |
9709 * The style of the typedef. | 10689 * The style of the typedef. |
9710 */ | 10690 */ |
9711 void set style(idl.TypedefStyle value) { | 10691 void set style(idl.TypedefStyle value) { |
9712 this._style = value; | 10692 this._style = value; |
9713 } | 10693 } |
9714 | 10694 |
9715 @override | 10695 @override |
9716 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 10696 List<UnlinkedTypeParamBuilder> get typeParameters => |
| 10697 _typeParameters ??= <UnlinkedTypeParamBuilder>[]; |
9717 | 10698 |
9718 /** | 10699 /** |
9719 * Type parameters of the typedef, if any. | 10700 * Type parameters of the typedef, if any. |
9720 */ | 10701 */ |
9721 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { | 10702 void set typeParameters(List<UnlinkedTypeParamBuilder> value) { |
9722 this._typeParameters = value; | 10703 this._typeParameters = value; |
9723 } | 10704 } |
9724 | 10705 |
9725 UnlinkedTypedefBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilde
r codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String na
me, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder retu
rnType, idl.TypedefStyle style, List<UnlinkedTypeParamBuilder> typeParameters}) | 10706 UnlinkedTypedefBuilder( |
9726 : _annotations = annotations, | 10707 {List<UnlinkedExprBuilder> annotations, |
9727 _codeRange = codeRange, | 10708 CodeRangeBuilder codeRange, |
9728 _documentationComment = documentationComment, | 10709 UnlinkedDocumentationCommentBuilder documentationComment, |
9729 _name = name, | 10710 String name, |
9730 _nameOffset = nameOffset, | 10711 int nameOffset, |
9731 _parameters = parameters, | 10712 List<UnlinkedParamBuilder> parameters, |
9732 _returnType = returnType, | 10713 EntityRefBuilder returnType, |
9733 _style = style, | 10714 idl.TypedefStyle style, |
9734 _typeParameters = typeParameters; | 10715 List<UnlinkedTypeParamBuilder> typeParameters}) |
| 10716 : _annotations = annotations, |
| 10717 _codeRange = codeRange, |
| 10718 _documentationComment = documentationComment, |
| 10719 _name = name, |
| 10720 _nameOffset = nameOffset, |
| 10721 _parameters = parameters, |
| 10722 _returnType = returnType, |
| 10723 _style = style, |
| 10724 _typeParameters = typeParameters; |
9735 | 10725 |
9736 /** | 10726 /** |
9737 * Flush [informative] data recursively. | 10727 * Flush [informative] data recursively. |
9738 */ | 10728 */ |
9739 void flushInformative() { | 10729 void flushInformative() { |
9740 _annotations?.forEach((b) => b.flushInformative()); | 10730 _annotations?.forEach((b) => b.flushInformative()); |
9741 _codeRange = null; | 10731 _codeRange = null; |
9742 _documentationComment = null; | 10732 _documentationComment = null; |
9743 _nameOffset = null; | 10733 _nameOffset = null; |
9744 _parameters?.forEach((b) => b.flushInformative()); | 10734 _parameters?.forEach((b) => b.flushInformative()); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9782 | 10772 |
9783 fb.Offset finish(fb.Builder fbBuilder) { | 10773 fb.Offset finish(fb.Builder fbBuilder) { |
9784 fb.Offset offset_annotations; | 10774 fb.Offset offset_annotations; |
9785 fb.Offset offset_codeRange; | 10775 fb.Offset offset_codeRange; |
9786 fb.Offset offset_documentationComment; | 10776 fb.Offset offset_documentationComment; |
9787 fb.Offset offset_name; | 10777 fb.Offset offset_name; |
9788 fb.Offset offset_parameters; | 10778 fb.Offset offset_parameters; |
9789 fb.Offset offset_returnType; | 10779 fb.Offset offset_returnType; |
9790 fb.Offset offset_typeParameters; | 10780 fb.Offset offset_typeParameters; |
9791 if (!(_annotations == null || _annotations.isEmpty)) { | 10781 if (!(_annotations == null || _annotations.isEmpty)) { |
9792 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 10782 offset_annotations = fbBuilder |
| 10783 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
9793 } | 10784 } |
9794 if (_codeRange != null) { | 10785 if (_codeRange != null) { |
9795 offset_codeRange = _codeRange.finish(fbBuilder); | 10786 offset_codeRange = _codeRange.finish(fbBuilder); |
9796 } | 10787 } |
9797 if (_documentationComment != null) { | 10788 if (_documentationComment != null) { |
9798 offset_documentationComment = _documentationComment.finish(fbBuilder); | 10789 offset_documentationComment = _documentationComment.finish(fbBuilder); |
9799 } | 10790 } |
9800 if (_name != null) { | 10791 if (_name != null) { |
9801 offset_name = fbBuilder.writeString(_name); | 10792 offset_name = fbBuilder.writeString(_name); |
9802 } | 10793 } |
9803 if (!(_parameters == null || _parameters.isEmpty)) { | 10794 if (!(_parameters == null || _parameters.isEmpty)) { |
9804 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 10795 offset_parameters = fbBuilder |
| 10796 .writeList(_parameters.map((b) => b.finish(fbBuilder)).toList()); |
9805 } | 10797 } |
9806 if (_returnType != null) { | 10798 if (_returnType != null) { |
9807 offset_returnType = _returnType.finish(fbBuilder); | 10799 offset_returnType = _returnType.finish(fbBuilder); |
9808 } | 10800 } |
9809 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 10801 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
9810 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 10802 offset_typeParameters = fbBuilder |
| 10803 .writeList(_typeParameters.map((b) => b.finish(fbBuilder)).toList()); |
9811 } | 10804 } |
9812 fbBuilder.startTable(); | 10805 fbBuilder.startTable(); |
9813 if (offset_annotations != null) { | 10806 if (offset_annotations != null) { |
9814 fbBuilder.addOffset(4, offset_annotations); | 10807 fbBuilder.addOffset(4, offset_annotations); |
9815 } | 10808 } |
9816 if (offset_codeRange != null) { | 10809 if (offset_codeRange != null) { |
9817 fbBuilder.addOffset(7, offset_codeRange); | 10810 fbBuilder.addOffset(7, offset_codeRange); |
9818 } | 10811 } |
9819 if (offset_documentationComment != null) { | 10812 if (offset_documentationComment != null) { |
9820 fbBuilder.addOffset(6, offset_documentationComment); | 10813 fbBuilder.addOffset(6, offset_documentationComment); |
(...skipping 17 matching lines...) Expand all Loading... |
9838 fbBuilder.addOffset(5, offset_typeParameters); | 10831 fbBuilder.addOffset(5, offset_typeParameters); |
9839 } | 10832 } |
9840 return fbBuilder.endTable(); | 10833 return fbBuilder.endTable(); |
9841 } | 10834 } |
9842 } | 10835 } |
9843 | 10836 |
9844 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { | 10837 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { |
9845 const _UnlinkedTypedefReader(); | 10838 const _UnlinkedTypedefReader(); |
9846 | 10839 |
9847 @override | 10840 @override |
9848 _UnlinkedTypedefImpl createObject(fb.BufferContext bc, int offset) => new _Unl
inkedTypedefImpl(bc, offset); | 10841 _UnlinkedTypedefImpl createObject(fb.BufferContext bc, int offset) => |
| 10842 new _UnlinkedTypedefImpl(bc, offset); |
9849 } | 10843 } |
9850 | 10844 |
9851 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { | 10845 class _UnlinkedTypedefImpl extends Object |
| 10846 with _UnlinkedTypedefMixin |
| 10847 implements idl.UnlinkedTypedef { |
9852 final fb.BufferContext _bc; | 10848 final fb.BufferContext _bc; |
9853 final int _bcOffset; | 10849 final int _bcOffset; |
9854 | 10850 |
9855 _UnlinkedTypedefImpl(this._bc, this._bcOffset); | 10851 _UnlinkedTypedefImpl(this._bc, this._bcOffset); |
9856 | 10852 |
9857 List<idl.UnlinkedExpr> _annotations; | 10853 List<idl.UnlinkedExpr> _annotations; |
9858 idl.CodeRange _codeRange; | 10854 idl.CodeRange _codeRange; |
9859 idl.UnlinkedDocumentationComment _documentationComment; | 10855 idl.UnlinkedDocumentationComment _documentationComment; |
9860 String _name; | 10856 String _name; |
9861 int _nameOffset; | 10857 int _nameOffset; |
9862 List<idl.UnlinkedParam> _parameters; | 10858 List<idl.UnlinkedParam> _parameters; |
9863 idl.EntityRef _returnType; | 10859 idl.EntityRef _returnType; |
9864 idl.TypedefStyle _style; | 10860 idl.TypedefStyle _style; |
9865 List<idl.UnlinkedTypeParam> _typeParameters; | 10861 List<idl.UnlinkedTypeParam> _typeParameters; |
9866 | 10862 |
9867 @override | 10863 @override |
9868 List<idl.UnlinkedExpr> get annotations { | 10864 List<idl.UnlinkedExpr> get annotations { |
9869 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedExpr>[]); | 10865 _annotations ??= |
| 10866 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 10867 .vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedExpr>[]); |
9870 return _annotations; | 10868 return _annotations; |
9871 } | 10869 } |
9872 | 10870 |
9873 @override | 10871 @override |
9874 idl.CodeRange get codeRange { | 10872 idl.CodeRange get codeRange { |
9875 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 7, null); | 10873 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 7, null); |
9876 return _codeRange; | 10874 return _codeRange; |
9877 } | 10875 } |
9878 | 10876 |
9879 @override | 10877 @override |
9880 idl.UnlinkedDocumentationComment get documentationComment { | 10878 idl.UnlinkedDocumentationComment get documentationComment { |
9881 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bc, _bcOffset, 6, null); | 10879 _documentationComment ??= const _UnlinkedDocumentationCommentReader() |
| 10880 .vTableGet(_bc, _bcOffset, 6, null); |
9882 return _documentationComment; | 10881 return _documentationComment; |
9883 } | 10882 } |
9884 | 10883 |
9885 @override | 10884 @override |
9886 String get name { | 10885 String get name { |
9887 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | 10886 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
9888 return _name; | 10887 return _name; |
9889 } | 10888 } |
9890 | 10889 |
9891 @override | 10890 @override |
9892 int get nameOffset { | 10891 int get nameOffset { |
9893 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 10892 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
9894 return _nameOffset; | 10893 return _nameOffset; |
9895 } | 10894 } |
9896 | 10895 |
9897 @override | 10896 @override |
9898 List<idl.UnlinkedParam> get parameters { | 10897 List<idl.UnlinkedParam> get parameters { |
9899 _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamR
eader()).vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedParam>[]); | 10898 _parameters ??= |
| 10899 const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamReader()) |
| 10900 .vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedParam>[]); |
9900 return _parameters; | 10901 return _parameters; |
9901 } | 10902 } |
9902 | 10903 |
9903 @override | 10904 @override |
9904 idl.EntityRef get returnType { | 10905 idl.EntityRef get returnType { |
9905 _returnType ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 2, null); | 10906 _returnType ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 2, null); |
9906 return _returnType; | 10907 return _returnType; |
9907 } | 10908 } |
9908 | 10909 |
9909 @override | 10910 @override |
9910 idl.TypedefStyle get style { | 10911 idl.TypedefStyle get style { |
9911 _style ??= const _TypedefStyleReader().vTableGet(_bc, _bcOffset, 8, idl.Type
defStyle.functionType); | 10912 _style ??= const _TypedefStyleReader() |
| 10913 .vTableGet(_bc, _bcOffset, 8, idl.TypedefStyle.functionType); |
9912 return _style; | 10914 return _style; |
9913 } | 10915 } |
9914 | 10916 |
9915 @override | 10917 @override |
9916 List<idl.UnlinkedTypeParam> get typeParameters { | 10918 List<idl.UnlinkedTypeParam> get typeParameters { |
9917 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bc, _bcOffset, 5, const <idl.UnlinkedTypeParam>[
]); | 10919 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>( |
| 10920 const _UnlinkedTypeParamReader()) |
| 10921 .vTableGet(_bc, _bcOffset, 5, const <idl.UnlinkedTypeParam>[]); |
9918 return _typeParameters; | 10922 return _typeParameters; |
9919 } | 10923 } |
9920 } | 10924 } |
9921 | 10925 |
9922 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { | 10926 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { |
9923 @override | 10927 @override |
9924 Map<String, Object> toJson() { | 10928 Map<String, Object> toJson() { |
9925 Map<String, Object> _result = <String, Object>{}; | 10929 Map<String, Object> _result = <String, Object>{}; |
9926 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 10930 if (annotations.isNotEmpty) |
| 10931 _result["annotations"] = |
| 10932 annotations.map((_value) => _value.toJson()).toList(); |
9927 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 10933 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
9928 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 10934 if (documentationComment != null) |
| 10935 _result["documentationComment"] = documentationComment.toJson(); |
9929 if (name != '') _result["name"] = name; | 10936 if (name != '') _result["name"] = name; |
9930 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 10937 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
9931 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 10938 if (parameters.isNotEmpty) |
| 10939 _result["parameters"] = |
| 10940 parameters.map((_value) => _value.toJson()).toList(); |
9932 if (returnType != null) _result["returnType"] = returnType.toJson(); | 10941 if (returnType != null) _result["returnType"] = returnType.toJson(); |
9933 if (style != idl.TypedefStyle.functionType) _result["style"] = style.toStrin
g().split('.')[1]; | 10942 if (style != idl.TypedefStyle.functionType) |
9934 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 10943 _result["style"] = style.toString().split('.')[1]; |
| 10944 if (typeParameters.isNotEmpty) |
| 10945 _result["typeParameters"] = |
| 10946 typeParameters.map((_value) => _value.toJson()).toList(); |
9935 return _result; | 10947 return _result; |
9936 } | 10948 } |
9937 | 10949 |
9938 @override | 10950 @override |
9939 Map<String, Object> toMap() => { | 10951 Map<String, Object> toMap() => { |
9940 "annotations": annotations, | 10952 "annotations": annotations, |
9941 "codeRange": codeRange, | 10953 "codeRange": codeRange, |
9942 "documentationComment": documentationComment, | 10954 "documentationComment": documentationComment, |
9943 "name": name, | 10955 "name": name, |
9944 "nameOffset": nameOffset, | 10956 "nameOffset": nameOffset, |
9945 "parameters": parameters, | 10957 "parameters": parameters, |
9946 "returnType": returnType, | 10958 "returnType": returnType, |
9947 "style": style, | 10959 "style": style, |
9948 "typeParameters": typeParameters, | 10960 "typeParameters": typeParameters, |
9949 }; | 10961 }; |
9950 | 10962 |
9951 @override | 10963 @override |
9952 String toString() => convert.JSON.encode(toJson()); | 10964 String toString() => convert.JSON.encode(toJson()); |
9953 } | 10965 } |
9954 | 10966 |
9955 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { | 10967 class UnlinkedTypeParamBuilder extends Object |
| 10968 with _UnlinkedTypeParamMixin |
| 10969 implements idl.UnlinkedTypeParam { |
9956 List<UnlinkedExprBuilder> _annotations; | 10970 List<UnlinkedExprBuilder> _annotations; |
9957 EntityRefBuilder _bound; | 10971 EntityRefBuilder _bound; |
9958 CodeRangeBuilder _codeRange; | 10972 CodeRangeBuilder _codeRange; |
9959 String _name; | 10973 String _name; |
9960 int _nameOffset; | 10974 int _nameOffset; |
9961 | 10975 |
9962 @override | 10976 @override |
9963 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 10977 List<UnlinkedExprBuilder> get annotations => |
| 10978 _annotations ??= <UnlinkedExprBuilder>[]; |
9964 | 10979 |
9965 /** | 10980 /** |
9966 * Annotations for this type parameter. | 10981 * Annotations for this type parameter. |
9967 */ | 10982 */ |
9968 void set annotations(List<UnlinkedExprBuilder> value) { | 10983 void set annotations(List<UnlinkedExprBuilder> value) { |
9969 this._annotations = value; | 10984 this._annotations = value; |
9970 } | 10985 } |
9971 | 10986 |
9972 @override | 10987 @override |
9973 EntityRefBuilder get bound => _bound; | 10988 EntityRefBuilder get bound => _bound; |
(...skipping 30 matching lines...) Expand all Loading... |
10004 int get nameOffset => _nameOffset ??= 0; | 11019 int get nameOffset => _nameOffset ??= 0; |
10005 | 11020 |
10006 /** | 11021 /** |
10007 * Offset of the type parameter name relative to the beginning of the file. | 11022 * Offset of the type parameter name relative to the beginning of the file. |
10008 */ | 11023 */ |
10009 void set nameOffset(int value) { | 11024 void set nameOffset(int value) { |
10010 assert(value == null || value >= 0); | 11025 assert(value == null || value >= 0); |
10011 this._nameOffset = value; | 11026 this._nameOffset = value; |
10012 } | 11027 } |
10013 | 11028 |
10014 UnlinkedTypeParamBuilder({List<UnlinkedExprBuilder> annotations, EntityRefBuil
der bound, CodeRangeBuilder codeRange, String name, int nameOffset}) | 11029 UnlinkedTypeParamBuilder( |
10015 : _annotations = annotations, | 11030 {List<UnlinkedExprBuilder> annotations, |
10016 _bound = bound, | 11031 EntityRefBuilder bound, |
10017 _codeRange = codeRange, | 11032 CodeRangeBuilder codeRange, |
10018 _name = name, | 11033 String name, |
10019 _nameOffset = nameOffset; | 11034 int nameOffset}) |
| 11035 : _annotations = annotations, |
| 11036 _bound = bound, |
| 11037 _codeRange = codeRange, |
| 11038 _name = name, |
| 11039 _nameOffset = nameOffset; |
10020 | 11040 |
10021 /** | 11041 /** |
10022 * Flush [informative] data recursively. | 11042 * Flush [informative] data recursively. |
10023 */ | 11043 */ |
10024 void flushInformative() { | 11044 void flushInformative() { |
10025 _annotations?.forEach((b) => b.flushInformative()); | 11045 _annotations?.forEach((b) => b.flushInformative()); |
10026 _bound?.flushInformative(); | 11046 _bound?.flushInformative(); |
10027 _codeRange = null; | 11047 _codeRange = null; |
10028 _nameOffset = null; | 11048 _nameOffset = null; |
10029 } | 11049 } |
(...skipping 14 matching lines...) Expand all Loading... |
10044 } | 11064 } |
10045 } | 11065 } |
10046 } | 11066 } |
10047 | 11067 |
10048 fb.Offset finish(fb.Builder fbBuilder) { | 11068 fb.Offset finish(fb.Builder fbBuilder) { |
10049 fb.Offset offset_annotations; | 11069 fb.Offset offset_annotations; |
10050 fb.Offset offset_bound; | 11070 fb.Offset offset_bound; |
10051 fb.Offset offset_codeRange; | 11071 fb.Offset offset_codeRange; |
10052 fb.Offset offset_name; | 11072 fb.Offset offset_name; |
10053 if (!(_annotations == null || _annotations.isEmpty)) { | 11073 if (!(_annotations == null || _annotations.isEmpty)) { |
10054 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 11074 offset_annotations = fbBuilder |
| 11075 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
10055 } | 11076 } |
10056 if (_bound != null) { | 11077 if (_bound != null) { |
10057 offset_bound = _bound.finish(fbBuilder); | 11078 offset_bound = _bound.finish(fbBuilder); |
10058 } | 11079 } |
10059 if (_codeRange != null) { | 11080 if (_codeRange != null) { |
10060 offset_codeRange = _codeRange.finish(fbBuilder); | 11081 offset_codeRange = _codeRange.finish(fbBuilder); |
10061 } | 11082 } |
10062 if (_name != null) { | 11083 if (_name != null) { |
10063 offset_name = fbBuilder.writeString(_name); | 11084 offset_name = fbBuilder.writeString(_name); |
10064 } | 11085 } |
(...skipping 14 matching lines...) Expand all Loading... |
10079 fbBuilder.addUint32(1, _nameOffset); | 11100 fbBuilder.addUint32(1, _nameOffset); |
10080 } | 11101 } |
10081 return fbBuilder.endTable(); | 11102 return fbBuilder.endTable(); |
10082 } | 11103 } |
10083 } | 11104 } |
10084 | 11105 |
10085 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { | 11106 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { |
10086 const _UnlinkedTypeParamReader(); | 11107 const _UnlinkedTypeParamReader(); |
10087 | 11108 |
10088 @override | 11109 @override |
10089 _UnlinkedTypeParamImpl createObject(fb.BufferContext bc, int offset) => new _U
nlinkedTypeParamImpl(bc, offset); | 11110 _UnlinkedTypeParamImpl createObject(fb.BufferContext bc, int offset) => |
| 11111 new _UnlinkedTypeParamImpl(bc, offset); |
10090 } | 11112 } |
10091 | 11113 |
10092 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { | 11114 class _UnlinkedTypeParamImpl extends Object |
| 11115 with _UnlinkedTypeParamMixin |
| 11116 implements idl.UnlinkedTypeParam { |
10093 final fb.BufferContext _bc; | 11117 final fb.BufferContext _bc; |
10094 final int _bcOffset; | 11118 final int _bcOffset; |
10095 | 11119 |
10096 _UnlinkedTypeParamImpl(this._bc, this._bcOffset); | 11120 _UnlinkedTypeParamImpl(this._bc, this._bcOffset); |
10097 | 11121 |
10098 List<idl.UnlinkedExpr> _annotations; | 11122 List<idl.UnlinkedExpr> _annotations; |
10099 idl.EntityRef _bound; | 11123 idl.EntityRef _bound; |
10100 idl.CodeRange _codeRange; | 11124 idl.CodeRange _codeRange; |
10101 String _name; | 11125 String _name; |
10102 int _nameOffset; | 11126 int _nameOffset; |
10103 | 11127 |
10104 @override | 11128 @override |
10105 List<idl.UnlinkedExpr> get annotations { | 11129 List<idl.UnlinkedExpr> get annotations { |
10106 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedExpr>[]); | 11130 _annotations ??= |
| 11131 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 11132 .vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedExpr>[]); |
10107 return _annotations; | 11133 return _annotations; |
10108 } | 11134 } |
10109 | 11135 |
10110 @override | 11136 @override |
10111 idl.EntityRef get bound { | 11137 idl.EntityRef get bound { |
10112 _bound ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 2, null); | 11138 _bound ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 2, null); |
10113 return _bound; | 11139 return _bound; |
10114 } | 11140 } |
10115 | 11141 |
10116 @override | 11142 @override |
(...skipping 12 matching lines...) Expand all Loading... |
10129 int get nameOffset { | 11155 int get nameOffset { |
10130 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 11156 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
10131 return _nameOffset; | 11157 return _nameOffset; |
10132 } | 11158 } |
10133 } | 11159 } |
10134 | 11160 |
10135 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { | 11161 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { |
10136 @override | 11162 @override |
10137 Map<String, Object> toJson() { | 11163 Map<String, Object> toJson() { |
10138 Map<String, Object> _result = <String, Object>{}; | 11164 Map<String, Object> _result = <String, Object>{}; |
10139 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 11165 if (annotations.isNotEmpty) |
| 11166 _result["annotations"] = |
| 11167 annotations.map((_value) => _value.toJson()).toList(); |
10140 if (bound != null) _result["bound"] = bound.toJson(); | 11168 if (bound != null) _result["bound"] = bound.toJson(); |
10141 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 11169 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
10142 if (name != '') _result["name"] = name; | 11170 if (name != '') _result["name"] = name; |
10143 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 11171 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
10144 return _result; | 11172 return _result; |
10145 } | 11173 } |
10146 | 11174 |
10147 @override | 11175 @override |
10148 Map<String, Object> toMap() => { | 11176 Map<String, Object> toMap() => { |
10149 "annotations": annotations, | 11177 "annotations": annotations, |
10150 "bound": bound, | 11178 "bound": bound, |
10151 "codeRange": codeRange, | 11179 "codeRange": codeRange, |
10152 "name": name, | 11180 "name": name, |
10153 "nameOffset": nameOffset, | 11181 "nameOffset": nameOffset, |
10154 }; | 11182 }; |
10155 | 11183 |
10156 @override | 11184 @override |
10157 String toString() => convert.JSON.encode(toJson()); | 11185 String toString() => convert.JSON.encode(toJson()); |
10158 } | 11186 } |
10159 | 11187 |
10160 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { | 11188 class UnlinkedUnitBuilder extends Object |
| 11189 with _UnlinkedUnitMixin |
| 11190 implements idl.UnlinkedUnit { |
10161 List<int> _apiSignature; | 11191 List<int> _apiSignature; |
10162 List<UnlinkedClassBuilder> _classes; | 11192 List<UnlinkedClassBuilder> _classes; |
10163 CodeRangeBuilder _codeRange; | 11193 CodeRangeBuilder _codeRange; |
10164 List<UnlinkedEnumBuilder> _enums; | 11194 List<UnlinkedEnumBuilder> _enums; |
10165 List<UnlinkedExecutableBuilder> _executables; | 11195 List<UnlinkedExecutableBuilder> _executables; |
10166 List<UnlinkedExportNonPublicBuilder> _exports; | 11196 List<UnlinkedExportNonPublicBuilder> _exports; |
10167 List<UnlinkedImportBuilder> _imports; | 11197 List<UnlinkedImportBuilder> _imports; |
10168 bool _isPartOf; | 11198 bool _isPartOf; |
10169 List<UnlinkedExprBuilder> _libraryAnnotations; | 11199 List<UnlinkedExprBuilder> _libraryAnnotations; |
10170 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; | 11200 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; |
(...skipping 14 matching lines...) Expand all Loading... |
10185 * MD5 hash of the non-informative fields of the [UnlinkedUnit] (not | 11215 * MD5 hash of the non-informative fields of the [UnlinkedUnit] (not |
10186 * including this one) as 16 unsigned 8-bit integer values. This can be used | 11216 * including this one) as 16 unsigned 8-bit integer values. This can be used |
10187 * to identify when the API of a unit may have changed. | 11217 * to identify when the API of a unit may have changed. |
10188 */ | 11218 */ |
10189 void set apiSignature(List<int> value) { | 11219 void set apiSignature(List<int> value) { |
10190 assert(value == null || value.every((e) => e >= 0)); | 11220 assert(value == null || value.every((e) => e >= 0)); |
10191 this._apiSignature = value; | 11221 this._apiSignature = value; |
10192 } | 11222 } |
10193 | 11223 |
10194 @override | 11224 @override |
10195 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; | 11225 List<UnlinkedClassBuilder> get classes => |
| 11226 _classes ??= <UnlinkedClassBuilder>[]; |
10196 | 11227 |
10197 /** | 11228 /** |
10198 * Classes declared in the compilation unit. | 11229 * Classes declared in the compilation unit. |
10199 */ | 11230 */ |
10200 void set classes(List<UnlinkedClassBuilder> value) { | 11231 void set classes(List<UnlinkedClassBuilder> value) { |
10201 this._classes = value; | 11232 this._classes = value; |
10202 } | 11233 } |
10203 | 11234 |
10204 @override | 11235 @override |
10205 CodeRangeBuilder get codeRange => _codeRange; | 11236 CodeRangeBuilder get codeRange => _codeRange; |
10206 | 11237 |
10207 /** | 11238 /** |
10208 * Code range of the unit. | 11239 * Code range of the unit. |
10209 */ | 11240 */ |
10210 void set codeRange(CodeRangeBuilder value) { | 11241 void set codeRange(CodeRangeBuilder value) { |
10211 this._codeRange = value; | 11242 this._codeRange = value; |
10212 } | 11243 } |
10213 | 11244 |
10214 @override | 11245 @override |
10215 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; | 11246 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; |
10216 | 11247 |
10217 /** | 11248 /** |
10218 * Enums declared in the compilation unit. | 11249 * Enums declared in the compilation unit. |
10219 */ | 11250 */ |
10220 void set enums(List<UnlinkedEnumBuilder> value) { | 11251 void set enums(List<UnlinkedEnumBuilder> value) { |
10221 this._enums = value; | 11252 this._enums = value; |
10222 } | 11253 } |
10223 | 11254 |
10224 @override | 11255 @override |
10225 List<UnlinkedExecutableBuilder> get executables => _executables ??= <UnlinkedE
xecutableBuilder>[]; | 11256 List<UnlinkedExecutableBuilder> get executables => |
| 11257 _executables ??= <UnlinkedExecutableBuilder>[]; |
10226 | 11258 |
10227 /** | 11259 /** |
10228 * Top level executable objects (functions, getters, and setters) declared in | 11260 * Top level executable objects (functions, getters, and setters) declared in |
10229 * the compilation unit. | 11261 * the compilation unit. |
10230 */ | 11262 */ |
10231 void set executables(List<UnlinkedExecutableBuilder> value) { | 11263 void set executables(List<UnlinkedExecutableBuilder> value) { |
10232 this._executables = value; | 11264 this._executables = value; |
10233 } | 11265 } |
10234 | 11266 |
10235 @override | 11267 @override |
10236 List<UnlinkedExportNonPublicBuilder> get exports => _exports ??= <UnlinkedExpo
rtNonPublicBuilder>[]; | 11268 List<UnlinkedExportNonPublicBuilder> get exports => |
| 11269 _exports ??= <UnlinkedExportNonPublicBuilder>[]; |
10237 | 11270 |
10238 /** | 11271 /** |
10239 * Export declarations in the compilation unit. | 11272 * Export declarations in the compilation unit. |
10240 */ | 11273 */ |
10241 void set exports(List<UnlinkedExportNonPublicBuilder> value) { | 11274 void set exports(List<UnlinkedExportNonPublicBuilder> value) { |
10242 this._exports = value; | 11275 this._exports = value; |
10243 } | 11276 } |
10244 | 11277 |
10245 @override | 11278 @override |
10246 String get fallbackModePath => throw new UnimplementedError('attempt to access
deprecated field'); | 11279 String get fallbackModePath => |
| 11280 throw new UnimplementedError('attempt to access deprecated field'); |
10247 | 11281 |
10248 @override | 11282 @override |
10249 List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder
>[]; | 11283 List<UnlinkedImportBuilder> get imports => |
| 11284 _imports ??= <UnlinkedImportBuilder>[]; |
10250 | 11285 |
10251 /** | 11286 /** |
10252 * Import declarations in the compilation unit. | 11287 * Import declarations in the compilation unit. |
10253 */ | 11288 */ |
10254 void set imports(List<UnlinkedImportBuilder> value) { | 11289 void set imports(List<UnlinkedImportBuilder> value) { |
10255 this._imports = value; | 11290 this._imports = value; |
10256 } | 11291 } |
10257 | 11292 |
10258 @override | 11293 @override |
10259 bool get isPartOf => _isPartOf ??= false; | 11294 bool get isPartOf => _isPartOf ??= false; |
10260 | 11295 |
10261 /** | 11296 /** |
10262 * Indicates whether the unit contains a "part of" declaration. | 11297 * Indicates whether the unit contains a "part of" declaration. |
10263 */ | 11298 */ |
10264 void set isPartOf(bool value) { | 11299 void set isPartOf(bool value) { |
10265 this._isPartOf = value; | 11300 this._isPartOf = value; |
10266 } | 11301 } |
10267 | 11302 |
10268 @override | 11303 @override |
10269 List<UnlinkedExprBuilder> get libraryAnnotations => _libraryAnnotations ??= <U
nlinkedExprBuilder>[]; | 11304 List<UnlinkedExprBuilder> get libraryAnnotations => |
| 11305 _libraryAnnotations ??= <UnlinkedExprBuilder>[]; |
10270 | 11306 |
10271 /** | 11307 /** |
10272 * Annotations for the library declaration, or the empty list if there is no | 11308 * Annotations for the library declaration, or the empty list if there is no |
10273 * library declaration. | 11309 * library declaration. |
10274 */ | 11310 */ |
10275 void set libraryAnnotations(List<UnlinkedExprBuilder> value) { | 11311 void set libraryAnnotations(List<UnlinkedExprBuilder> value) { |
10276 this._libraryAnnotations = value; | 11312 this._libraryAnnotations = value; |
10277 } | 11313 } |
10278 | 11314 |
10279 @override | 11315 @override |
10280 UnlinkedDocumentationCommentBuilder get libraryDocumentationComment => _librar
yDocumentationComment; | 11316 UnlinkedDocumentationCommentBuilder get libraryDocumentationComment => |
| 11317 _libraryDocumentationComment; |
10281 | 11318 |
10282 /** | 11319 /** |
10283 * Documentation comment for the library, or `null` if there is no | 11320 * Documentation comment for the library, or `null` if there is no |
10284 * documentation comment. | 11321 * documentation comment. |
10285 */ | 11322 */ |
10286 void set libraryDocumentationComment(UnlinkedDocumentationCommentBuilder value
) { | 11323 void set libraryDocumentationComment( |
| 11324 UnlinkedDocumentationCommentBuilder value) { |
10287 this._libraryDocumentationComment = value; | 11325 this._libraryDocumentationComment = value; |
10288 } | 11326 } |
10289 | 11327 |
10290 @override | 11328 @override |
10291 String get libraryName => _libraryName ??= ''; | 11329 String get libraryName => _libraryName ??= ''; |
10292 | 11330 |
10293 /** | 11331 /** |
10294 * Name of the library (from a "library" declaration, if present). | 11332 * Name of the library (from a "library" declaration, if present). |
10295 */ | 11333 */ |
10296 void set libraryName(String value) { | 11334 void set libraryName(String value) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10346 UnlinkedPublicNamespaceBuilder get publicNamespace => _publicNamespace; | 11384 UnlinkedPublicNamespaceBuilder get publicNamespace => _publicNamespace; |
10347 | 11385 |
10348 /** | 11386 /** |
10349 * Unlinked public namespace of this compilation unit. | 11387 * Unlinked public namespace of this compilation unit. |
10350 */ | 11388 */ |
10351 void set publicNamespace(UnlinkedPublicNamespaceBuilder value) { | 11389 void set publicNamespace(UnlinkedPublicNamespaceBuilder value) { |
10352 this._publicNamespace = value; | 11390 this._publicNamespace = value; |
10353 } | 11391 } |
10354 | 11392 |
10355 @override | 11393 @override |
10356 List<UnlinkedReferenceBuilder> get references => _references ??= <UnlinkedRefe
renceBuilder>[]; | 11394 List<UnlinkedReferenceBuilder> get references => |
| 11395 _references ??= <UnlinkedReferenceBuilder>[]; |
10357 | 11396 |
10358 /** | 11397 /** |
10359 * Top level and prefixed names referred to by this compilation unit. The | 11398 * Top level and prefixed names referred to by this compilation unit. The |
10360 * zeroth element of this array is always populated and is used to represent | 11399 * zeroth element of this array is always populated and is used to represent |
10361 * the absence of a reference in places where a reference is optional (for | 11400 * the absence of a reference in places where a reference is optional (for |
10362 * example [UnlinkedReference.prefixReference or | 11401 * example [UnlinkedReference.prefixReference or |
10363 * UnlinkedImport.prefixReference]). | 11402 * UnlinkedImport.prefixReference]). |
10364 */ | 11403 */ |
10365 void set references(List<UnlinkedReferenceBuilder> value) { | 11404 void set references(List<UnlinkedReferenceBuilder> value) { |
10366 this._references = value; | 11405 this._references = value; |
10367 } | 11406 } |
10368 | 11407 |
10369 @override | 11408 @override |
10370 List<UnlinkedTypedefBuilder> get typedefs => _typedefs ??= <UnlinkedTypedefBui
lder>[]; | 11409 List<UnlinkedTypedefBuilder> get typedefs => |
| 11410 _typedefs ??= <UnlinkedTypedefBuilder>[]; |
10371 | 11411 |
10372 /** | 11412 /** |
10373 * Typedefs declared in the compilation unit. | 11413 * Typedefs declared in the compilation unit. |
10374 */ | 11414 */ |
10375 void set typedefs(List<UnlinkedTypedefBuilder> value) { | 11415 void set typedefs(List<UnlinkedTypedefBuilder> value) { |
10376 this._typedefs = value; | 11416 this._typedefs = value; |
10377 } | 11417 } |
10378 | 11418 |
10379 @override | 11419 @override |
10380 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; | 11420 List<UnlinkedVariableBuilder> get variables => |
| 11421 _variables ??= <UnlinkedVariableBuilder>[]; |
10381 | 11422 |
10382 /** | 11423 /** |
10383 * Top level variables declared in the compilation unit. | 11424 * Top level variables declared in the compilation unit. |
10384 */ | 11425 */ |
10385 void set variables(List<UnlinkedVariableBuilder> value) { | 11426 void set variables(List<UnlinkedVariableBuilder> value) { |
10386 this._variables = value; | 11427 this._variables = value; |
10387 } | 11428 } |
10388 | 11429 |
10389 UnlinkedUnitBuilder({List<int> apiSignature, List<UnlinkedClassBuilder> classe
s, CodeRangeBuilder codeRange, List<UnlinkedEnumBuilder> enums, List<UnlinkedExe
cutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, List<
UnlinkedImportBuilder> imports, bool isPartOf, List<UnlinkedExprBuilder> library
Annotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, St
ring libraryName, int libraryNameLength, int libraryNameOffset, List<int> lineSt
arts, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicName
space, List<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> t
ypedefs, List<UnlinkedVariableBuilder> variables}) | 11430 UnlinkedUnitBuilder( |
10390 : _apiSignature = apiSignature, | 11431 {List<int> apiSignature, |
10391 _classes = classes, | 11432 List<UnlinkedClassBuilder> classes, |
10392 _codeRange = codeRange, | 11433 CodeRangeBuilder codeRange, |
10393 _enums = enums, | 11434 List<UnlinkedEnumBuilder> enums, |
10394 _executables = executables, | 11435 List<UnlinkedExecutableBuilder> executables, |
10395 _exports = exports, | 11436 List<UnlinkedExportNonPublicBuilder> exports, |
10396 _imports = imports, | 11437 List<UnlinkedImportBuilder> imports, |
10397 _isPartOf = isPartOf, | 11438 bool isPartOf, |
10398 _libraryAnnotations = libraryAnnotations, | 11439 List<UnlinkedExprBuilder> libraryAnnotations, |
10399 _libraryDocumentationComment = libraryDocumentationComment, | 11440 UnlinkedDocumentationCommentBuilder libraryDocumentationComment, |
10400 _libraryName = libraryName, | 11441 String libraryName, |
10401 _libraryNameLength = libraryNameLength, | 11442 int libraryNameLength, |
10402 _libraryNameOffset = libraryNameOffset, | 11443 int libraryNameOffset, |
10403 _lineStarts = lineStarts, | 11444 List<int> lineStarts, |
10404 _parts = parts, | 11445 List<UnlinkedPartBuilder> parts, |
10405 _publicNamespace = publicNamespace, | 11446 UnlinkedPublicNamespaceBuilder publicNamespace, |
10406 _references = references, | 11447 List<UnlinkedReferenceBuilder> references, |
10407 _typedefs = typedefs, | 11448 List<UnlinkedTypedefBuilder> typedefs, |
10408 _variables = variables; | 11449 List<UnlinkedVariableBuilder> variables}) |
| 11450 : _apiSignature = apiSignature, |
| 11451 _classes = classes, |
| 11452 _codeRange = codeRange, |
| 11453 _enums = enums, |
| 11454 _executables = executables, |
| 11455 _exports = exports, |
| 11456 _imports = imports, |
| 11457 _isPartOf = isPartOf, |
| 11458 _libraryAnnotations = libraryAnnotations, |
| 11459 _libraryDocumentationComment = libraryDocumentationComment, |
| 11460 _libraryName = libraryName, |
| 11461 _libraryNameLength = libraryNameLength, |
| 11462 _libraryNameOffset = libraryNameOffset, |
| 11463 _lineStarts = lineStarts, |
| 11464 _parts = parts, |
| 11465 _publicNamespace = publicNamespace, |
| 11466 _references = references, |
| 11467 _typedefs = typedefs, |
| 11468 _variables = variables; |
10409 | 11469 |
10410 /** | 11470 /** |
10411 * Flush [informative] data recursively. | 11471 * Flush [informative] data recursively. |
10412 */ | 11472 */ |
10413 void flushInformative() { | 11473 void flushInformative() { |
10414 _classes?.forEach((b) => b.flushInformative()); | 11474 _classes?.forEach((b) => b.flushInformative()); |
10415 _codeRange = null; | 11475 _codeRange = null; |
10416 _enums?.forEach((b) => b.flushInformative()); | 11476 _enums?.forEach((b) => b.flushInformative()); |
10417 _executables?.forEach((b) => b.flushInformative()); | 11477 _executables?.forEach((b) => b.flushInformative()); |
10418 _exports?.forEach((b) => b.flushInformative()); | 11478 _exports?.forEach((b) => b.flushInformative()); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10546 fb.Offset offset_lineStarts; | 11606 fb.Offset offset_lineStarts; |
10547 fb.Offset offset_parts; | 11607 fb.Offset offset_parts; |
10548 fb.Offset offset_publicNamespace; | 11608 fb.Offset offset_publicNamespace; |
10549 fb.Offset offset_references; | 11609 fb.Offset offset_references; |
10550 fb.Offset offset_typedefs; | 11610 fb.Offset offset_typedefs; |
10551 fb.Offset offset_variables; | 11611 fb.Offset offset_variables; |
10552 if (!(_apiSignature == null || _apiSignature.isEmpty)) { | 11612 if (!(_apiSignature == null || _apiSignature.isEmpty)) { |
10553 offset_apiSignature = fbBuilder.writeListUint32(_apiSignature); | 11613 offset_apiSignature = fbBuilder.writeListUint32(_apiSignature); |
10554 } | 11614 } |
10555 if (!(_classes == null || _classes.isEmpty)) { | 11615 if (!(_classes == null || _classes.isEmpty)) { |
10556 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde
r)).toList()); | 11616 offset_classes = fbBuilder |
| 11617 .writeList(_classes.map((b) => b.finish(fbBuilder)).toList()); |
10557 } | 11618 } |
10558 if (_codeRange != null) { | 11619 if (_codeRange != null) { |
10559 offset_codeRange = _codeRange.finish(fbBuilder); | 11620 offset_codeRange = _codeRange.finish(fbBuilder); |
10560 } | 11621 } |
10561 if (!(_enums == null || _enums.isEmpty)) { | 11622 if (!(_enums == null || _enums.isEmpty)) { |
10562 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).
toList()); | 11623 offset_enums = |
| 11624 fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).toList()); |
10563 } | 11625 } |
10564 if (!(_executables == null || _executables.isEmpty)) { | 11626 if (!(_executables == null || _executables.isEmpty)) { |
10565 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | 11627 offset_executables = fbBuilder |
| 11628 .writeList(_executables.map((b) => b.finish(fbBuilder)).toList()); |
10566 } | 11629 } |
10567 if (!(_exports == null || _exports.isEmpty)) { | 11630 if (!(_exports == null || _exports.isEmpty)) { |
10568 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); | 11631 offset_exports = fbBuilder |
| 11632 .writeList(_exports.map((b) => b.finish(fbBuilder)).toList()); |
10569 } | 11633 } |
10570 if (!(_imports == null || _imports.isEmpty)) { | 11634 if (!(_imports == null || _imports.isEmpty)) { |
10571 offset_imports = fbBuilder.writeList(_imports.map((b) => b.finish(fbBuilde
r)).toList()); | 11635 offset_imports = fbBuilder |
| 11636 .writeList(_imports.map((b) => b.finish(fbBuilder)).toList()); |
10572 } | 11637 } |
10573 if (!(_libraryAnnotations == null || _libraryAnnotations.isEmpty)) { | 11638 if (!(_libraryAnnotations == null || _libraryAnnotations.isEmpty)) { |
10574 offset_libraryAnnotations = fbBuilder.writeList(_libraryAnnotations.map((b
) => b.finish(fbBuilder)).toList()); | 11639 offset_libraryAnnotations = fbBuilder.writeList( |
| 11640 _libraryAnnotations.map((b) => b.finish(fbBuilder)).toList()); |
10575 } | 11641 } |
10576 if (_libraryDocumentationComment != null) { | 11642 if (_libraryDocumentationComment != null) { |
10577 offset_libraryDocumentationComment = _libraryDocumentationComment.finish(f
bBuilder); | 11643 offset_libraryDocumentationComment = |
| 11644 _libraryDocumentationComment.finish(fbBuilder); |
10578 } | 11645 } |
10579 if (_libraryName != null) { | 11646 if (_libraryName != null) { |
10580 offset_libraryName = fbBuilder.writeString(_libraryName); | 11647 offset_libraryName = fbBuilder.writeString(_libraryName); |
10581 } | 11648 } |
10582 if (!(_lineStarts == null || _lineStarts.isEmpty)) { | 11649 if (!(_lineStarts == null || _lineStarts.isEmpty)) { |
10583 offset_lineStarts = fbBuilder.writeListUint32(_lineStarts); | 11650 offset_lineStarts = fbBuilder.writeListUint32(_lineStarts); |
10584 } | 11651 } |
10585 if (!(_parts == null || _parts.isEmpty)) { | 11652 if (!(_parts == null || _parts.isEmpty)) { |
10586 offset_parts = fbBuilder.writeList(_parts.map((b) => b.finish(fbBuilder)).
toList()); | 11653 offset_parts = |
| 11654 fbBuilder.writeList(_parts.map((b) => b.finish(fbBuilder)).toList()); |
10587 } | 11655 } |
10588 if (_publicNamespace != null) { | 11656 if (_publicNamespace != null) { |
10589 offset_publicNamespace = _publicNamespace.finish(fbBuilder); | 11657 offset_publicNamespace = _publicNamespace.finish(fbBuilder); |
10590 } | 11658 } |
10591 if (!(_references == null || _references.isEmpty)) { | 11659 if (!(_references == null || _references.isEmpty)) { |
10592 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 11660 offset_references = fbBuilder |
| 11661 .writeList(_references.map((b) => b.finish(fbBuilder)).toList()); |
10593 } | 11662 } |
10594 if (!(_typedefs == null || _typedefs.isEmpty)) { | 11663 if (!(_typedefs == null || _typedefs.isEmpty)) { |
10595 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); | 11664 offset_typedefs = fbBuilder |
| 11665 .writeList(_typedefs.map((b) => b.finish(fbBuilder)).toList()); |
10596 } | 11666 } |
10597 if (!(_variables == null || _variables.isEmpty)) { | 11667 if (!(_variables == null || _variables.isEmpty)) { |
10598 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); | 11668 offset_variables = fbBuilder |
| 11669 .writeList(_variables.map((b) => b.finish(fbBuilder)).toList()); |
10599 } | 11670 } |
10600 fbBuilder.startTable(); | 11671 fbBuilder.startTable(); |
10601 if (offset_apiSignature != null) { | 11672 if (offset_apiSignature != null) { |
10602 fbBuilder.addOffset(19, offset_apiSignature); | 11673 fbBuilder.addOffset(19, offset_apiSignature); |
10603 } | 11674 } |
10604 if (offset_classes != null) { | 11675 if (offset_classes != null) { |
10605 fbBuilder.addOffset(2, offset_classes); | 11676 fbBuilder.addOffset(2, offset_classes); |
10606 } | 11677 } |
10607 if (offset_codeRange != null) { | 11678 if (offset_codeRange != null) { |
10608 fbBuilder.addOffset(15, offset_codeRange); | 11679 fbBuilder.addOffset(15, offset_codeRange); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10661 | 11732 |
10662 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) { | 11733 idl.UnlinkedUnit readUnlinkedUnit(List<int> buffer) { |
10663 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); | 11734 fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer); |
10664 return const _UnlinkedUnitReader().read(rootRef, 0); | 11735 return const _UnlinkedUnitReader().read(rootRef, 0); |
10665 } | 11736 } |
10666 | 11737 |
10667 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { | 11738 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { |
10668 const _UnlinkedUnitReader(); | 11739 const _UnlinkedUnitReader(); |
10669 | 11740 |
10670 @override | 11741 @override |
10671 _UnlinkedUnitImpl createObject(fb.BufferContext bc, int offset) => new _Unlink
edUnitImpl(bc, offset); | 11742 _UnlinkedUnitImpl createObject(fb.BufferContext bc, int offset) => |
| 11743 new _UnlinkedUnitImpl(bc, offset); |
10672 } | 11744 } |
10673 | 11745 |
10674 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { | 11746 class _UnlinkedUnitImpl extends Object |
| 11747 with _UnlinkedUnitMixin |
| 11748 implements idl.UnlinkedUnit { |
10675 final fb.BufferContext _bc; | 11749 final fb.BufferContext _bc; |
10676 final int _bcOffset; | 11750 final int _bcOffset; |
10677 | 11751 |
10678 _UnlinkedUnitImpl(this._bc, this._bcOffset); | 11752 _UnlinkedUnitImpl(this._bc, this._bcOffset); |
10679 | 11753 |
10680 List<int> _apiSignature; | 11754 List<int> _apiSignature; |
10681 List<idl.UnlinkedClass> _classes; | 11755 List<idl.UnlinkedClass> _classes; |
10682 idl.CodeRange _codeRange; | 11756 idl.CodeRange _codeRange; |
10683 List<idl.UnlinkedEnum> _enums; | 11757 List<idl.UnlinkedEnum> _enums; |
10684 List<idl.UnlinkedExecutable> _executables; | 11758 List<idl.UnlinkedExecutable> _executables; |
10685 List<idl.UnlinkedExportNonPublic> _exports; | 11759 List<idl.UnlinkedExportNonPublic> _exports; |
10686 List<idl.UnlinkedImport> _imports; | 11760 List<idl.UnlinkedImport> _imports; |
10687 bool _isPartOf; | 11761 bool _isPartOf; |
10688 List<idl.UnlinkedExpr> _libraryAnnotations; | 11762 List<idl.UnlinkedExpr> _libraryAnnotations; |
10689 idl.UnlinkedDocumentationComment _libraryDocumentationComment; | 11763 idl.UnlinkedDocumentationComment _libraryDocumentationComment; |
10690 String _libraryName; | 11764 String _libraryName; |
10691 int _libraryNameLength; | 11765 int _libraryNameLength; |
10692 int _libraryNameOffset; | 11766 int _libraryNameOffset; |
10693 List<int> _lineStarts; | 11767 List<int> _lineStarts; |
10694 List<idl.UnlinkedPart> _parts; | 11768 List<idl.UnlinkedPart> _parts; |
10695 idl.UnlinkedPublicNamespace _publicNamespace; | 11769 idl.UnlinkedPublicNamespace _publicNamespace; |
10696 List<idl.UnlinkedReference> _references; | 11770 List<idl.UnlinkedReference> _references; |
10697 List<idl.UnlinkedTypedef> _typedefs; | 11771 List<idl.UnlinkedTypedef> _typedefs; |
10698 List<idl.UnlinkedVariable> _variables; | 11772 List<idl.UnlinkedVariable> _variables; |
10699 | 11773 |
10700 @override | 11774 @override |
10701 List<int> get apiSignature { | 11775 List<int> get apiSignature { |
10702 _apiSignature ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 19,
const <int>[]); | 11776 _apiSignature ??= const fb.Uint32ListReader() |
| 11777 .vTableGet(_bc, _bcOffset, 19, const <int>[]); |
10703 return _apiSignature; | 11778 return _apiSignature; |
10704 } | 11779 } |
10705 | 11780 |
10706 @override | 11781 @override |
10707 List<idl.UnlinkedClass> get classes { | 11782 List<idl.UnlinkedClass> get classes { |
10708 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedClass>[]); | 11783 _classes ??= |
| 11784 const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassReader()) |
| 11785 .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedClass>[]); |
10709 return _classes; | 11786 return _classes; |
10710 } | 11787 } |
10711 | 11788 |
10712 @override | 11789 @override |
10713 idl.CodeRange get codeRange { | 11790 idl.CodeRange get codeRange { |
10714 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 15, null); | 11791 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 15, null); |
10715 return _codeRange; | 11792 return _codeRange; |
10716 } | 11793 } |
10717 | 11794 |
10718 @override | 11795 @override |
10719 List<idl.UnlinkedEnum> get enums { | 11796 List<idl.UnlinkedEnum> get enums { |
10720 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()
).vTableGet(_bc, _bcOffset, 12, const <idl.UnlinkedEnum>[]); | 11797 _enums ??= |
| 11798 const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()) |
| 11799 .vTableGet(_bc, _bcOffset, 12, const <idl.UnlinkedEnum>[]); |
10721 return _enums; | 11800 return _enums; |
10722 } | 11801 } |
10723 | 11802 |
10724 @override | 11803 @override |
10725 List<idl.UnlinkedExecutable> get executables { | 11804 List<idl.UnlinkedExecutable> get executables { |
10726 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedExecutable>[
]); | 11805 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>( |
| 11806 const _UnlinkedExecutableReader()) |
| 11807 .vTableGet(_bc, _bcOffset, 4, const <idl.UnlinkedExecutable>[]); |
10727 return _executables; | 11808 return _executables; |
10728 } | 11809 } |
10729 | 11810 |
10730 @override | 11811 @override |
10731 List<idl.UnlinkedExportNonPublic> get exports { | 11812 List<idl.UnlinkedExportNonPublic> get exports { |
10732 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>(const _Unlinke
dExportNonPublicReader()).vTableGet(_bc, _bcOffset, 13, const <idl.UnlinkedExpor
tNonPublic>[]); | 11813 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>( |
| 11814 const _UnlinkedExportNonPublicReader()) |
| 11815 .vTableGet(_bc, _bcOffset, 13, const <idl.UnlinkedExportNonPublic>[]); |
10733 return _exports; | 11816 return _exports; |
10734 } | 11817 } |
10735 | 11818 |
10736 @override | 11819 @override |
10737 String get fallbackModePath => throw new UnimplementedError('attempt to access
deprecated field'); | 11820 String get fallbackModePath => |
| 11821 throw new UnimplementedError('attempt to access deprecated field'); |
10738 | 11822 |
10739 @override | 11823 @override |
10740 List<idl.UnlinkedImport> get imports { | 11824 List<idl.UnlinkedImport> get imports { |
10741 _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportRe
ader()).vTableGet(_bc, _bcOffset, 5, const <idl.UnlinkedImport>[]); | 11825 _imports ??= |
| 11826 const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportReader()) |
| 11827 .vTableGet(_bc, _bcOffset, 5, const <idl.UnlinkedImport>[]); |
10742 return _imports; | 11828 return _imports; |
10743 } | 11829 } |
10744 | 11830 |
10745 @override | 11831 @override |
10746 bool get isPartOf { | 11832 bool get isPartOf { |
10747 _isPartOf ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 18, false); | 11833 _isPartOf ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 18, false); |
10748 return _isPartOf; | 11834 return _isPartOf; |
10749 } | 11835 } |
10750 | 11836 |
10751 @override | 11837 @override |
10752 List<idl.UnlinkedExpr> get libraryAnnotations { | 11838 List<idl.UnlinkedExpr> get libraryAnnotations { |
10753 _libraryAnnotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _Unlinke
dExprReader()).vTableGet(_bc, _bcOffset, 14, const <idl.UnlinkedExpr>[]); | 11839 _libraryAnnotations ??= |
| 11840 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 11841 .vTableGet(_bc, _bcOffset, 14, const <idl.UnlinkedExpr>[]); |
10754 return _libraryAnnotations; | 11842 return _libraryAnnotations; |
10755 } | 11843 } |
10756 | 11844 |
10757 @override | 11845 @override |
10758 idl.UnlinkedDocumentationComment get libraryDocumentationComment { | 11846 idl.UnlinkedDocumentationComment get libraryDocumentationComment { |
10759 _libraryDocumentationComment ??= const _UnlinkedDocumentationCommentReader()
.vTableGet(_bc, _bcOffset, 9, null); | 11847 _libraryDocumentationComment ??= const _UnlinkedDocumentationCommentReader() |
| 11848 .vTableGet(_bc, _bcOffset, 9, null); |
10760 return _libraryDocumentationComment; | 11849 return _libraryDocumentationComment; |
10761 } | 11850 } |
10762 | 11851 |
10763 @override | 11852 @override |
10764 String get libraryName { | 11853 String get libraryName { |
10765 _libraryName ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 6, ''); | 11854 _libraryName ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 6, ''); |
10766 return _libraryName; | 11855 return _libraryName; |
10767 } | 11856 } |
10768 | 11857 |
10769 @override | 11858 @override |
10770 int get libraryNameLength { | 11859 int get libraryNameLength { |
10771 _libraryNameLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 7,
0); | 11860 _libraryNameLength ??= |
| 11861 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 7, 0); |
10772 return _libraryNameLength; | 11862 return _libraryNameLength; |
10773 } | 11863 } |
10774 | 11864 |
10775 @override | 11865 @override |
10776 int get libraryNameOffset { | 11866 int get libraryNameOffset { |
10777 _libraryNameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 8,
0); | 11867 _libraryNameOffset ??= |
| 11868 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 8, 0); |
10778 return _libraryNameOffset; | 11869 return _libraryNameOffset; |
10779 } | 11870 } |
10780 | 11871 |
10781 @override | 11872 @override |
10782 List<int> get lineStarts { | 11873 List<int> get lineStarts { |
10783 _lineStarts ??= const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 17, co
nst <int>[]); | 11874 _lineStarts ??= const fb.Uint32ListReader() |
| 11875 .vTableGet(_bc, _bcOffset, 17, const <int>[]); |
10784 return _lineStarts; | 11876 return _lineStarts; |
10785 } | 11877 } |
10786 | 11878 |
10787 @override | 11879 @override |
10788 List<idl.UnlinkedPart> get parts { | 11880 List<idl.UnlinkedPart> get parts { |
10789 _parts ??= const fb.ListReader<idl.UnlinkedPart>(const _UnlinkedPartReader()
).vTableGet(_bc, _bcOffset, 11, const <idl.UnlinkedPart>[]); | 11881 _parts ??= |
| 11882 const fb.ListReader<idl.UnlinkedPart>(const _UnlinkedPartReader()) |
| 11883 .vTableGet(_bc, _bcOffset, 11, const <idl.UnlinkedPart>[]); |
10790 return _parts; | 11884 return _parts; |
10791 } | 11885 } |
10792 | 11886 |
10793 @override | 11887 @override |
10794 idl.UnlinkedPublicNamespace get publicNamespace { | 11888 idl.UnlinkedPublicNamespace get publicNamespace { |
10795 _publicNamespace ??= const _UnlinkedPublicNamespaceReader().vTableGet(_bc, _
bcOffset, 0, null); | 11889 _publicNamespace ??= const _UnlinkedPublicNamespaceReader() |
| 11890 .vTableGet(_bc, _bcOffset, 0, null); |
10796 return _publicNamespace; | 11891 return _publicNamespace; |
10797 } | 11892 } |
10798 | 11893 |
10799 @override | 11894 @override |
10800 List<idl.UnlinkedReference> get references { | 11895 List<idl.UnlinkedReference> get references { |
10801 _references ??= const fb.ListReader<idl.UnlinkedReference>(const _UnlinkedRe
ferenceReader()).vTableGet(_bc, _bcOffset, 1, const <idl.UnlinkedReference>[]); | 11896 _references ??= const fb.ListReader<idl.UnlinkedReference>( |
| 11897 const _UnlinkedReferenceReader()) |
| 11898 .vTableGet(_bc, _bcOffset, 1, const <idl.UnlinkedReference>[]); |
10802 return _references; | 11899 return _references; |
10803 } | 11900 } |
10804 | 11901 |
10805 @override | 11902 @override |
10806 List<idl.UnlinkedTypedef> get typedefs { | 11903 List<idl.UnlinkedTypedef> get typedefs { |
10807 _typedefs ??= const fb.ListReader<idl.UnlinkedTypedef>(const _UnlinkedTypede
fReader()).vTableGet(_bc, _bcOffset, 10, const <idl.UnlinkedTypedef>[]); | 11904 _typedefs ??= |
| 11905 const fb.ListReader<idl.UnlinkedTypedef>(const _UnlinkedTypedefReader()) |
| 11906 .vTableGet(_bc, _bcOffset, 10, const <idl.UnlinkedTypedef>[]); |
10808 return _typedefs; | 11907 return _typedefs; |
10809 } | 11908 } |
10810 | 11909 |
10811 @override | 11910 @override |
10812 List<idl.UnlinkedVariable> get variables { | 11911 List<idl.UnlinkedVariable> get variables { |
10813 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedVariable>[]); | 11912 _variables ??= const fb.ListReader<idl.UnlinkedVariable>( |
| 11913 const _UnlinkedVariableReader()) |
| 11914 .vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedVariable>[]); |
10814 return _variables; | 11915 return _variables; |
10815 } | 11916 } |
10816 } | 11917 } |
10817 | 11918 |
10818 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { | 11919 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { |
10819 @override | 11920 @override |
10820 Map<String, Object> toJson() { | 11921 Map<String, Object> toJson() { |
10821 Map<String, Object> _result = <String, Object>{}; | 11922 Map<String, Object> _result = <String, Object>{}; |
10822 if (apiSignature.isNotEmpty) _result["apiSignature"] = apiSignature; | 11923 if (apiSignature.isNotEmpty) _result["apiSignature"] = apiSignature; |
10823 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.
toJson()).toList(); | 11924 if (classes.isNotEmpty) |
| 11925 _result["classes"] = classes.map((_value) => _value.toJson()).toList(); |
10824 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 11926 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
10825 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson
()).toList(); | 11927 if (enums.isNotEmpty) |
10826 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); | 11928 _result["enums"] = enums.map((_value) => _value.toJson()).toList(); |
10827 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); | 11929 if (executables.isNotEmpty) |
10828 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.
toJson()).toList(); | 11930 _result["executables"] = |
| 11931 executables.map((_value) => _value.toJson()).toList(); |
| 11932 if (exports.isNotEmpty) |
| 11933 _result["exports"] = exports.map((_value) => _value.toJson()).toList(); |
| 11934 if (imports.isNotEmpty) |
| 11935 _result["imports"] = imports.map((_value) => _value.toJson()).toList(); |
10829 if (isPartOf != false) _result["isPartOf"] = isPartOf; | 11936 if (isPartOf != false) _result["isPartOf"] = isPartOf; |
10830 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn
notations.map((_value) => _value.toJson()).toList(); | 11937 if (libraryAnnotations.isNotEmpty) |
10831 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen
t"] = libraryDocumentationComment.toJson(); | 11938 _result["libraryAnnotations"] = |
| 11939 libraryAnnotations.map((_value) => _value.toJson()).toList(); |
| 11940 if (libraryDocumentationComment != null) |
| 11941 _result["libraryDocumentationComment"] = |
| 11942 libraryDocumentationComment.toJson(); |
10832 if (libraryName != '') _result["libraryName"] = libraryName; | 11943 if (libraryName != '') _result["libraryName"] = libraryName; |
10833 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength
; | 11944 if (libraryNameLength != 0) |
10834 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset
; | 11945 _result["libraryNameLength"] = libraryNameLength; |
| 11946 if (libraryNameOffset != 0) |
| 11947 _result["libraryNameOffset"] = libraryNameOffset; |
10835 if (lineStarts.isNotEmpty) _result["lineStarts"] = lineStarts; | 11948 if (lineStarts.isNotEmpty) _result["lineStarts"] = lineStarts; |
10836 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson
()).toList(); | 11949 if (parts.isNotEmpty) |
10837 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to
Json(); | 11950 _result["parts"] = parts.map((_value) => _value.toJson()).toList(); |
10838 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 11951 if (publicNamespace != null) |
10839 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val
ue.toJson()).toList(); | 11952 _result["publicNamespace"] = publicNamespace.toJson(); |
10840 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _
value.toJson()).toList(); | 11953 if (references.isNotEmpty) |
| 11954 _result["references"] = |
| 11955 references.map((_value) => _value.toJson()).toList(); |
| 11956 if (typedefs.isNotEmpty) |
| 11957 _result["typedefs"] = typedefs.map((_value) => _value.toJson()).toList(); |
| 11958 if (variables.isNotEmpty) |
| 11959 _result["variables"] = |
| 11960 variables.map((_value) => _value.toJson()).toList(); |
10841 return _result; | 11961 return _result; |
10842 } | 11962 } |
10843 | 11963 |
10844 @override | 11964 @override |
10845 Map<String, Object> toMap() => { | 11965 Map<String, Object> toMap() => { |
10846 "apiSignature": apiSignature, | 11966 "apiSignature": apiSignature, |
10847 "classes": classes, | 11967 "classes": classes, |
10848 "codeRange": codeRange, | 11968 "codeRange": codeRange, |
10849 "enums": enums, | 11969 "enums": enums, |
10850 "executables": executables, | 11970 "executables": executables, |
10851 "exports": exports, | 11971 "exports": exports, |
10852 "imports": imports, | 11972 "imports": imports, |
10853 "isPartOf": isPartOf, | 11973 "isPartOf": isPartOf, |
10854 "libraryAnnotations": libraryAnnotations, | 11974 "libraryAnnotations": libraryAnnotations, |
10855 "libraryDocumentationComment": libraryDocumentationComment, | 11975 "libraryDocumentationComment": libraryDocumentationComment, |
10856 "libraryName": libraryName, | 11976 "libraryName": libraryName, |
10857 "libraryNameLength": libraryNameLength, | 11977 "libraryNameLength": libraryNameLength, |
10858 "libraryNameOffset": libraryNameOffset, | 11978 "libraryNameOffset": libraryNameOffset, |
10859 "lineStarts": lineStarts, | 11979 "lineStarts": lineStarts, |
10860 "parts": parts, | 11980 "parts": parts, |
10861 "publicNamespace": publicNamespace, | 11981 "publicNamespace": publicNamespace, |
10862 "references": references, | 11982 "references": references, |
10863 "typedefs": typedefs, | 11983 "typedefs": typedefs, |
10864 "variables": variables, | 11984 "variables": variables, |
10865 }; | 11985 }; |
10866 | 11986 |
10867 @override | 11987 @override |
10868 String toString() => convert.JSON.encode(toJson()); | 11988 String toString() => convert.JSON.encode(toJson()); |
10869 } | 11989 } |
10870 | 11990 |
10871 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { | 11991 class UnlinkedVariableBuilder extends Object |
| 11992 with _UnlinkedVariableMixin |
| 11993 implements idl.UnlinkedVariable { |
10872 List<UnlinkedExprBuilder> _annotations; | 11994 List<UnlinkedExprBuilder> _annotations; |
10873 CodeRangeBuilder _codeRange; | 11995 CodeRangeBuilder _codeRange; |
10874 UnlinkedDocumentationCommentBuilder _documentationComment; | 11996 UnlinkedDocumentationCommentBuilder _documentationComment; |
10875 int _inferredTypeSlot; | 11997 int _inferredTypeSlot; |
10876 UnlinkedExecutableBuilder _initializer; | 11998 UnlinkedExecutableBuilder _initializer; |
10877 bool _isConst; | 11999 bool _isConst; |
10878 bool _isCovariant; | 12000 bool _isCovariant; |
10879 bool _isFinal; | 12001 bool _isFinal; |
10880 bool _isStatic; | 12002 bool _isStatic; |
10881 String _name; | 12003 String _name; |
10882 int _nameOffset; | 12004 int _nameOffset; |
10883 int _propagatedTypeSlot; | 12005 int _propagatedTypeSlot; |
10884 EntityRefBuilder _type; | 12006 EntityRefBuilder _type; |
10885 int _visibleLength; | 12007 int _visibleLength; |
10886 int _visibleOffset; | 12008 int _visibleOffset; |
10887 | 12009 |
10888 @override | 12010 @override |
10889 List<UnlinkedExprBuilder> get annotations => _annotations ??= <UnlinkedExprBui
lder>[]; | 12011 List<UnlinkedExprBuilder> get annotations => |
| 12012 _annotations ??= <UnlinkedExprBuilder>[]; |
10890 | 12013 |
10891 /** | 12014 /** |
10892 * Annotations for this variable. | 12015 * Annotations for this variable. |
10893 */ | 12016 */ |
10894 void set annotations(List<UnlinkedExprBuilder> value) { | 12017 void set annotations(List<UnlinkedExprBuilder> value) { |
10895 this._annotations = value; | 12018 this._annotations = value; |
10896 } | 12019 } |
10897 | 12020 |
10898 @override | 12021 @override |
10899 CodeRangeBuilder get codeRange => _codeRange; | 12022 CodeRangeBuilder get codeRange => _codeRange; |
10900 | 12023 |
10901 /** | 12024 /** |
10902 * Code range of the variable. | 12025 * Code range of the variable. |
10903 */ | 12026 */ |
10904 void set codeRange(CodeRangeBuilder value) { | 12027 void set codeRange(CodeRangeBuilder value) { |
10905 this._codeRange = value; | 12028 this._codeRange = value; |
10906 } | 12029 } |
10907 | 12030 |
10908 @override | 12031 @override |
10909 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 12032 UnlinkedDocumentationCommentBuilder get documentationComment => |
| 12033 _documentationComment; |
10910 | 12034 |
10911 /** | 12035 /** |
10912 * Documentation comment for the variable, or `null` if there is no | 12036 * Documentation comment for the variable, or `null` if there is no |
10913 * documentation comment. | 12037 * documentation comment. |
10914 */ | 12038 */ |
10915 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { | 12039 void set documentationComment(UnlinkedDocumentationCommentBuilder value) { |
10916 this._documentationComment = value; | 12040 this._documentationComment = value; |
10917 } | 12041 } |
10918 | 12042 |
10919 @override | 12043 @override |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11048 int get visibleOffset => _visibleOffset ??= 0; | 12172 int get visibleOffset => _visibleOffset ??= 0; |
11049 | 12173 |
11050 /** | 12174 /** |
11051 * If a local variable, the beginning of the visible range; zero otherwise. | 12175 * If a local variable, the beginning of the visible range; zero otherwise. |
11052 */ | 12176 */ |
11053 void set visibleOffset(int value) { | 12177 void set visibleOffset(int value) { |
11054 assert(value == null || value >= 0); | 12178 assert(value == null || value >= 0); |
11055 this._visibleOffset = value; | 12179 this._visibleOffset = value; |
11056 } | 12180 } |
11057 | 12181 |
11058 UnlinkedVariableBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuild
er codeRange, UnlinkedDocumentationCommentBuilder documentationComment, int infe
rredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isCovari
ant, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTyp
eSlot, EntityRefBuilder type, int visibleLength, int visibleOffset}) | 12182 UnlinkedVariableBuilder( |
11059 : _annotations = annotations, | 12183 {List<UnlinkedExprBuilder> annotations, |
11060 _codeRange = codeRange, | 12184 CodeRangeBuilder codeRange, |
11061 _documentationComment = documentationComment, | 12185 UnlinkedDocumentationCommentBuilder documentationComment, |
11062 _inferredTypeSlot = inferredTypeSlot, | 12186 int inferredTypeSlot, |
11063 _initializer = initializer, | 12187 UnlinkedExecutableBuilder initializer, |
11064 _isConst = isConst, | 12188 bool isConst, |
11065 _isCovariant = isCovariant, | 12189 bool isCovariant, |
11066 _isFinal = isFinal, | 12190 bool isFinal, |
11067 _isStatic = isStatic, | 12191 bool isStatic, |
11068 _name = name, | 12192 String name, |
11069 _nameOffset = nameOffset, | 12193 int nameOffset, |
11070 _propagatedTypeSlot = propagatedTypeSlot, | 12194 int propagatedTypeSlot, |
11071 _type = type, | 12195 EntityRefBuilder type, |
11072 _visibleLength = visibleLength, | 12196 int visibleLength, |
11073 _visibleOffset = visibleOffset; | 12197 int visibleOffset}) |
| 12198 : _annotations = annotations, |
| 12199 _codeRange = codeRange, |
| 12200 _documentationComment = documentationComment, |
| 12201 _inferredTypeSlot = inferredTypeSlot, |
| 12202 _initializer = initializer, |
| 12203 _isConst = isConst, |
| 12204 _isCovariant = isCovariant, |
| 12205 _isFinal = isFinal, |
| 12206 _isStatic = isStatic, |
| 12207 _name = name, |
| 12208 _nameOffset = nameOffset, |
| 12209 _propagatedTypeSlot = propagatedTypeSlot, |
| 12210 _type = type, |
| 12211 _visibleLength = visibleLength, |
| 12212 _visibleOffset = visibleOffset; |
11074 | 12213 |
11075 /** | 12214 /** |
11076 * Flush [informative] data recursively. | 12215 * Flush [informative] data recursively. |
11077 */ | 12216 */ |
11078 void flushInformative() { | 12217 void flushInformative() { |
11079 _annotations?.forEach((b) => b.flushInformative()); | 12218 _annotations?.forEach((b) => b.flushInformative()); |
11080 _codeRange = null; | 12219 _codeRange = null; |
11081 _documentationComment = null; | 12220 _documentationComment = null; |
11082 _initializer?.flushInformative(); | 12221 _initializer?.flushInformative(); |
11083 _nameOffset = null; | 12222 _nameOffset = null; |
(...skipping 28 matching lines...) Expand all Loading... |
11112 } | 12251 } |
11113 | 12252 |
11114 fb.Offset finish(fb.Builder fbBuilder) { | 12253 fb.Offset finish(fb.Builder fbBuilder) { |
11115 fb.Offset offset_annotations; | 12254 fb.Offset offset_annotations; |
11116 fb.Offset offset_codeRange; | 12255 fb.Offset offset_codeRange; |
11117 fb.Offset offset_documentationComment; | 12256 fb.Offset offset_documentationComment; |
11118 fb.Offset offset_initializer; | 12257 fb.Offset offset_initializer; |
11119 fb.Offset offset_name; | 12258 fb.Offset offset_name; |
11120 fb.Offset offset_type; | 12259 fb.Offset offset_type; |
11121 if (!(_annotations == null || _annotations.isEmpty)) { | 12260 if (!(_annotations == null || _annotations.isEmpty)) { |
11122 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 12261 offset_annotations = fbBuilder |
| 12262 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
11123 } | 12263 } |
11124 if (_codeRange != null) { | 12264 if (_codeRange != null) { |
11125 offset_codeRange = _codeRange.finish(fbBuilder); | 12265 offset_codeRange = _codeRange.finish(fbBuilder); |
11126 } | 12266 } |
11127 if (_documentationComment != null) { | 12267 if (_documentationComment != null) { |
11128 offset_documentationComment = _documentationComment.finish(fbBuilder); | 12268 offset_documentationComment = _documentationComment.finish(fbBuilder); |
11129 } | 12269 } |
11130 if (_initializer != null) { | 12270 if (_initializer != null) { |
11131 offset_initializer = _initializer.finish(fbBuilder); | 12271 offset_initializer = _initializer.finish(fbBuilder); |
11132 } | 12272 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11183 fbBuilder.addUint32(12, _visibleOffset); | 12323 fbBuilder.addUint32(12, _visibleOffset); |
11184 } | 12324 } |
11185 return fbBuilder.endTable(); | 12325 return fbBuilder.endTable(); |
11186 } | 12326 } |
11187 } | 12327 } |
11188 | 12328 |
11189 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> { | 12329 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> { |
11190 const _UnlinkedVariableReader(); | 12330 const _UnlinkedVariableReader(); |
11191 | 12331 |
11192 @override | 12332 @override |
11193 _UnlinkedVariableImpl createObject(fb.BufferContext bc, int offset) => new _Un
linkedVariableImpl(bc, offset); | 12333 _UnlinkedVariableImpl createObject(fb.BufferContext bc, int offset) => |
| 12334 new _UnlinkedVariableImpl(bc, offset); |
11194 } | 12335 } |
11195 | 12336 |
11196 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { | 12337 class _UnlinkedVariableImpl extends Object |
| 12338 with _UnlinkedVariableMixin |
| 12339 implements idl.UnlinkedVariable { |
11197 final fb.BufferContext _bc; | 12340 final fb.BufferContext _bc; |
11198 final int _bcOffset; | 12341 final int _bcOffset; |
11199 | 12342 |
11200 _UnlinkedVariableImpl(this._bc, this._bcOffset); | 12343 _UnlinkedVariableImpl(this._bc, this._bcOffset); |
11201 | 12344 |
11202 List<idl.UnlinkedExpr> _annotations; | 12345 List<idl.UnlinkedExpr> _annotations; |
11203 idl.CodeRange _codeRange; | 12346 idl.CodeRange _codeRange; |
11204 idl.UnlinkedDocumentationComment _documentationComment; | 12347 idl.UnlinkedDocumentationComment _documentationComment; |
11205 int _inferredTypeSlot; | 12348 int _inferredTypeSlot; |
11206 idl.UnlinkedExecutable _initializer; | 12349 idl.UnlinkedExecutable _initializer; |
11207 bool _isConst; | 12350 bool _isConst; |
11208 bool _isCovariant; | 12351 bool _isCovariant; |
11209 bool _isFinal; | 12352 bool _isFinal; |
11210 bool _isStatic; | 12353 bool _isStatic; |
11211 String _name; | 12354 String _name; |
11212 int _nameOffset; | 12355 int _nameOffset; |
11213 int _propagatedTypeSlot; | 12356 int _propagatedTypeSlot; |
11214 idl.EntityRef _type; | 12357 idl.EntityRef _type; |
11215 int _visibleLength; | 12358 int _visibleLength; |
11216 int _visibleOffset; | 12359 int _visibleOffset; |
11217 | 12360 |
11218 @override | 12361 @override |
11219 List<idl.UnlinkedExpr> get annotations { | 12362 List<idl.UnlinkedExpr> get annotations { |
11220 _annotations ??= const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprRe
ader()).vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedExpr>[]); | 12363 _annotations ??= |
| 12364 const fb.ListReader<idl.UnlinkedExpr>(const _UnlinkedExprReader()) |
| 12365 .vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedExpr>[]); |
11221 return _annotations; | 12366 return _annotations; |
11222 } | 12367 } |
11223 | 12368 |
11224 @override | 12369 @override |
11225 idl.CodeRange get codeRange { | 12370 idl.CodeRange get codeRange { |
11226 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 5, null); | 12371 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 5, null); |
11227 return _codeRange; | 12372 return _codeRange; |
11228 } | 12373 } |
11229 | 12374 |
11230 @override | 12375 @override |
11231 idl.UnlinkedDocumentationComment get documentationComment { | 12376 idl.UnlinkedDocumentationComment get documentationComment { |
11232 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bc, _bcOffset, 10, null); | 12377 _documentationComment ??= const _UnlinkedDocumentationCommentReader() |
| 12378 .vTableGet(_bc, _bcOffset, 10, null); |
11233 return _documentationComment; | 12379 return _documentationComment; |
11234 } | 12380 } |
11235 | 12381 |
11236 @override | 12382 @override |
11237 int get inferredTypeSlot { | 12383 int get inferredTypeSlot { |
11238 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 9, 0
); | 12384 _inferredTypeSlot ??= |
| 12385 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 9, 0); |
11239 return _inferredTypeSlot; | 12386 return _inferredTypeSlot; |
11240 } | 12387 } |
11241 | 12388 |
11242 @override | 12389 @override |
11243 idl.UnlinkedExecutable get initializer { | 12390 idl.UnlinkedExecutable get initializer { |
11244 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bc, _bcOffset,
13, null); | 12391 _initializer ??= |
| 12392 const _UnlinkedExecutableReader().vTableGet(_bc, _bcOffset, 13, null); |
11245 return _initializer; | 12393 return _initializer; |
11246 } | 12394 } |
11247 | 12395 |
11248 @override | 12396 @override |
11249 bool get isConst { | 12397 bool get isConst { |
11250 _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false); | 12398 _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false); |
11251 return _isConst; | 12399 return _isConst; |
11252 } | 12400 } |
11253 | 12401 |
11254 @override | 12402 @override |
(...skipping 21 matching lines...) Expand all Loading... |
11276 } | 12424 } |
11277 | 12425 |
11278 @override | 12426 @override |
11279 int get nameOffset { | 12427 int get nameOffset { |
11280 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | 12428 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); |
11281 return _nameOffset; | 12429 return _nameOffset; |
11282 } | 12430 } |
11283 | 12431 |
11284 @override | 12432 @override |
11285 int get propagatedTypeSlot { | 12433 int get propagatedTypeSlot { |
11286 _propagatedTypeSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2,
0); | 12434 _propagatedTypeSlot ??= |
| 12435 const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0); |
11287 return _propagatedTypeSlot; | 12436 return _propagatedTypeSlot; |
11288 } | 12437 } |
11289 | 12438 |
11290 @override | 12439 @override |
11291 idl.EntityRef get type { | 12440 idl.EntityRef get type { |
11292 _type ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); | 12441 _type ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null); |
11293 return _type; | 12442 return _type; |
11294 } | 12443 } |
11295 | 12444 |
11296 @override | 12445 @override |
11297 int get visibleLength { | 12446 int get visibleLength { |
11298 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 11, 0); | 12447 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 11, 0); |
11299 return _visibleLength; | 12448 return _visibleLength; |
11300 } | 12449 } |
11301 | 12450 |
11302 @override | 12451 @override |
11303 int get visibleOffset { | 12452 int get visibleOffset { |
11304 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 12, 0); | 12453 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 12, 0); |
11305 return _visibleOffset; | 12454 return _visibleOffset; |
11306 } | 12455 } |
11307 } | 12456 } |
11308 | 12457 |
11309 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { | 12458 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { |
11310 @override | 12459 @override |
11311 Map<String, Object> toJson() { | 12460 Map<String, Object> toJson() { |
11312 Map<String, Object> _result = <String, Object>{}; | 12461 Map<String, Object> _result = <String, Object>{}; |
11313 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 12462 if (annotations.isNotEmpty) |
| 12463 _result["annotations"] = |
| 12464 annotations.map((_value) => _value.toJson()).toList(); |
11314 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); | 12465 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
11315 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 12466 if (documentationComment != null) |
| 12467 _result["documentationComment"] = documentationComment.toJson(); |
11316 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; | 12468 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; |
11317 if (initializer != null) _result["initializer"] = initializer.toJson(); | 12469 if (initializer != null) _result["initializer"] = initializer.toJson(); |
11318 if (isConst != false) _result["isConst"] = isConst; | 12470 if (isConst != false) _result["isConst"] = isConst; |
11319 if (isCovariant != false) _result["isCovariant"] = isCovariant; | 12471 if (isCovariant != false) _result["isCovariant"] = isCovariant; |
11320 if (isFinal != false) _result["isFinal"] = isFinal; | 12472 if (isFinal != false) _result["isFinal"] = isFinal; |
11321 if (isStatic != false) _result["isStatic"] = isStatic; | 12473 if (isStatic != false) _result["isStatic"] = isStatic; |
11322 if (name != '') _result["name"] = name; | 12474 if (name != '') _result["name"] = name; |
11323 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 12475 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
11324 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS
lot; | 12476 if (propagatedTypeSlot != 0) |
| 12477 _result["propagatedTypeSlot"] = propagatedTypeSlot; |
11325 if (type != null) _result["type"] = type.toJson(); | 12478 if (type != null) _result["type"] = type.toJson(); |
11326 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 12479 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
11327 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 12480 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
11328 return _result; | 12481 return _result; |
11329 } | 12482 } |
11330 | 12483 |
11331 @override | 12484 @override |
11332 Map<String, Object> toMap() => { | 12485 Map<String, Object> toMap() => { |
11333 "annotations": annotations, | 12486 "annotations": annotations, |
11334 "codeRange": codeRange, | 12487 "codeRange": codeRange, |
11335 "documentationComment": documentationComment, | 12488 "documentationComment": documentationComment, |
11336 "inferredTypeSlot": inferredTypeSlot, | 12489 "inferredTypeSlot": inferredTypeSlot, |
11337 "initializer": initializer, | 12490 "initializer": initializer, |
11338 "isConst": isConst, | 12491 "isConst": isConst, |
11339 "isCovariant": isCovariant, | 12492 "isCovariant": isCovariant, |
11340 "isFinal": isFinal, | 12493 "isFinal": isFinal, |
11341 "isStatic": isStatic, | 12494 "isStatic": isStatic, |
11342 "name": name, | 12495 "name": name, |
11343 "nameOffset": nameOffset, | 12496 "nameOffset": nameOffset, |
11344 "propagatedTypeSlot": propagatedTypeSlot, | 12497 "propagatedTypeSlot": propagatedTypeSlot, |
11345 "type": type, | 12498 "type": type, |
11346 "visibleLength": visibleLength, | 12499 "visibleLength": visibleLength, |
11347 "visibleOffset": visibleOffset, | 12500 "visibleOffset": visibleOffset, |
11348 }; | 12501 }; |
11349 | 12502 |
11350 @override | 12503 @override |
11351 String toString() => convert.JSON.encode(toJson()); | 12504 String toString() => convert.JSON.encode(toJson()); |
11352 } | 12505 } |
11353 | |
OLD | NEW |