OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // | 4 // |
5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". | 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". |
7 | 7 |
8 library analyzer.src.summary.format; | 8 library analyzer.src.summary.format; |
9 | 9 |
10 import 'flat_buffers.dart' as fb; | 10 import 'flat_buffers.dart' as fb; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 @override | 108 @override |
109 int get size => 1; | 109 int get size => 1; |
110 | 110 |
111 @override | 111 @override |
112 idl.UnlinkedParamKind read(fb.BufferPointer bp) { | 112 idl.UnlinkedParamKind read(fb.BufferPointer bp) { |
113 int index = const fb.Uint8Reader().read(bp); | 113 int index = const fb.Uint8Reader().read(bp); |
114 return index < idl.UnlinkedParamKind.values.length ? idl.UnlinkedParamKind.v
alues[index] : idl.UnlinkedParamKind.required; | 114 return index < idl.UnlinkedParamKind.values.length ? idl.UnlinkedParamKind.v
alues[index] : idl.UnlinkedParamKind.required; |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
| 118 class CodeRangeBuilder extends Object with _CodeRangeMixin implements idl.CodeRa
nge { |
| 119 bool _finished = false; |
| 120 |
| 121 int _length; |
| 122 int _offset; |
| 123 |
| 124 @override |
| 125 int get length => _length ??= 0; |
| 126 |
| 127 /** |
| 128 * Length of the element code. |
| 129 */ |
| 130 void set length(int _value) { |
| 131 assert(!_finished); |
| 132 assert(_value == null || _value >= 0); |
| 133 _length = _value; |
| 134 } |
| 135 |
| 136 @override |
| 137 int get offset => _offset ??= 0; |
| 138 |
| 139 /** |
| 140 * Offset of the element code relative to the beginning of the file. |
| 141 */ |
| 142 void set offset(int _value) { |
| 143 assert(!_finished); |
| 144 assert(_value == null || _value >= 0); |
| 145 _offset = _value; |
| 146 } |
| 147 |
| 148 CodeRangeBuilder({int length, int offset}) |
| 149 : _length = length, |
| 150 _offset = offset; |
| 151 |
| 152 fb.Offset finish(fb.Builder fbBuilder) { |
| 153 assert(!_finished); |
| 154 _finished = true; |
| 155 fbBuilder.startTable(); |
| 156 if (_length != null && _length != 0) { |
| 157 fbBuilder.addUint32(1, _length); |
| 158 } |
| 159 if (_offset != null && _offset != 0) { |
| 160 fbBuilder.addUint32(0, _offset); |
| 161 } |
| 162 return fbBuilder.endTable(); |
| 163 } |
| 164 } |
| 165 |
| 166 class _CodeRangeReader extends fb.TableReader<_CodeRangeImpl> { |
| 167 const _CodeRangeReader(); |
| 168 |
| 169 @override |
| 170 _CodeRangeImpl createObject(fb.BufferPointer bp) => new _CodeRangeImpl(bp); |
| 171 } |
| 172 |
| 173 class _CodeRangeImpl extends Object with _CodeRangeMixin implements idl.CodeRang
e { |
| 174 final fb.BufferPointer _bp; |
| 175 |
| 176 _CodeRangeImpl(this._bp); |
| 177 |
| 178 int _length; |
| 179 int _offset; |
| 180 |
| 181 @override |
| 182 int get length { |
| 183 _length ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| 184 return _length; |
| 185 } |
| 186 |
| 187 @override |
| 188 int get offset { |
| 189 _offset ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); |
| 190 return _offset; |
| 191 } |
| 192 } |
| 193 |
| 194 abstract class _CodeRangeMixin implements idl.CodeRange { |
| 195 @override |
| 196 Map<String, Object> toJson() { |
| 197 Map<String, Object> _result = <String, Object>{}; |
| 198 if (length != 0) _result["length"] = length; |
| 199 if (offset != 0) _result["offset"] = offset; |
| 200 return _result; |
| 201 } |
| 202 |
| 203 @override |
| 204 Map<String, Object> toMap() => { |
| 205 "length": length, |
| 206 "offset": offset, |
| 207 }; |
| 208 |
| 209 @override |
| 210 String toString() => convert.JSON.encode(toJson()); |
| 211 } |
| 212 |
118 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity
Ref { | 213 class EntityRefBuilder extends Object with _EntityRefMixin implements idl.Entity
Ref { |
119 bool _finished = false; | 214 bool _finished = false; |
120 | 215 |
121 List<int> _implicitFunctionTypeIndices; | 216 List<int> _implicitFunctionTypeIndices; |
122 int _paramReference; | 217 int _paramReference; |
123 int _reference; | 218 int _reference; |
124 int _slot; | 219 int _slot; |
125 List<UnlinkedParamBuilder> _syntheticParams; | 220 List<UnlinkedParamBuilder> _syntheticParams; |
126 EntityRefBuilder _syntheticReturnType; | 221 EntityRefBuilder _syntheticReturnType; |
127 List<EntityRefBuilder> _typeArguments; | 222 List<EntityRefBuilder> _typeArguments; |
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 "unit": unit, | 1225 "unit": unit, |
1131 }; | 1226 }; |
1132 | 1227 |
1133 @override | 1228 @override |
1134 String toString() => convert.JSON.encode(toJson()); | 1229 String toString() => convert.JSON.encode(toJson()); |
1135 } | 1230 } |
1136 | 1231 |
1137 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { | 1232 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { |
1138 bool _finished = false; | 1233 bool _finished = false; |
1139 | 1234 |
| 1235 List<int> _constCycles; |
1140 List<LinkedReferenceBuilder> _references; | 1236 List<LinkedReferenceBuilder> _references; |
1141 List<EntityRefBuilder> _types; | 1237 List<EntityRefBuilder> _types; |
1142 List<int> _constCycles; | 1238 |
| 1239 @override |
| 1240 List<int> get constCycles => _constCycles ??= <int>[]; |
| 1241 |
| 1242 /** |
| 1243 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) |
| 1244 * corresponding to const constructors that are part of cycles. |
| 1245 */ |
| 1246 void set constCycles(List<int> _value) { |
| 1247 assert(!_finished); |
| 1248 assert(_value == null || _value.every((e) => e >= 0)); |
| 1249 _constCycles = _value; |
| 1250 } |
1143 | 1251 |
1144 @override | 1252 @override |
1145 List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenc
eBuilder>[]; | 1253 List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenc
eBuilder>[]; |
1146 | 1254 |
1147 /** | 1255 /** |
1148 * Information about the resolution of references within the compilation | 1256 * Information about the resolution of references within the compilation |
1149 * unit. Each element of [UnlinkedUnit.references] has a corresponding | 1257 * unit. Each element of [UnlinkedUnit.references] has a corresponding |
1150 * element in this list (at the same index). If this list has additional | 1258 * element in this list (at the same index). If this list has additional |
1151 * elements beyond the number of elements in [UnlinkedUnit.references], those | 1259 * elements beyond the number of elements in [UnlinkedUnit.references], those |
1152 * additional elements are references that are only referred to implicitly | 1260 * additional elements are references that are only referred to implicitly |
1153 * (e.g. elements involved in inferred or propagated types). | 1261 * (e.g. elements involved in inferred or propagated types). |
1154 */ | 1262 */ |
1155 void set references(List<LinkedReferenceBuilder> _value) { | 1263 void set references(List<LinkedReferenceBuilder> _value) { |
1156 assert(!_finished); | 1264 assert(!_finished); |
1157 _references = _value; | 1265 _references = _value; |
1158 } | 1266 } |
1159 | 1267 |
1160 @override | 1268 @override |
1161 List<EntityRefBuilder> get types => _types ??= <EntityRefBuilder>[]; | 1269 List<EntityRefBuilder> get types => _types ??= <EntityRefBuilder>[]; |
1162 | 1270 |
1163 /** | 1271 /** |
1164 * List associating slot ids found inside the unlinked summary for the | 1272 * List associating slot ids found inside the unlinked summary for the |
1165 * compilation unit with propagated and inferred types. | 1273 * compilation unit with propagated and inferred types. |
1166 */ | 1274 */ |
1167 void set types(List<EntityRefBuilder> _value) { | 1275 void set types(List<EntityRefBuilder> _value) { |
1168 assert(!_finished); | 1276 assert(!_finished); |
1169 _types = _value; | 1277 _types = _value; |
1170 } | 1278 } |
1171 | 1279 |
1172 @override | 1280 LinkedUnitBuilder({List<int> constCycles, List<LinkedReferenceBuilder> referen
ces, List<EntityRefBuilder> types}) |
1173 List<int> get constCycles => _constCycles ??= <int>[]; | 1281 : _constCycles = constCycles, |
1174 | 1282 _references = references, |
1175 /** | 1283 _types = types; |
1176 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) | |
1177 * corresponding to const constructors that are part of cycles. | |
1178 */ | |
1179 void set constCycles(List<int> _value) { | |
1180 assert(!_finished); | |
1181 assert(_value == null || _value.every((e) => e >= 0)); | |
1182 _constCycles = _value; | |
1183 } | |
1184 | |
1185 LinkedUnitBuilder({List<LinkedReferenceBuilder> references, List<EntityRefBuil
der> types, List<int> constCycles}) | |
1186 : _references = references, | |
1187 _types = types, | |
1188 _constCycles = constCycles; | |
1189 | 1284 |
1190 fb.Offset finish(fb.Builder fbBuilder) { | 1285 fb.Offset finish(fb.Builder fbBuilder) { |
1191 assert(!_finished); | 1286 assert(!_finished); |
1192 _finished = true; | 1287 _finished = true; |
| 1288 fb.Offset offset_constCycles; |
1193 fb.Offset offset_references; | 1289 fb.Offset offset_references; |
1194 fb.Offset offset_types; | 1290 fb.Offset offset_types; |
1195 fb.Offset offset_constCycles; | 1291 if (!(_constCycles == null || _constCycles.isEmpty)) { |
| 1292 offset_constCycles = fbBuilder.writeListUint32(_constCycles); |
| 1293 } |
1196 if (!(_references == null || _references.isEmpty)) { | 1294 if (!(_references == null || _references.isEmpty)) { |
1197 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 1295 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); |
1198 } | 1296 } |
1199 if (!(_types == null || _types.isEmpty)) { | 1297 if (!(_types == null || _types.isEmpty)) { |
1200 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).
toList()); | 1298 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).
toList()); |
1201 } | 1299 } |
1202 if (!(_constCycles == null || _constCycles.isEmpty)) { | 1300 fbBuilder.startTable(); |
1203 offset_constCycles = fbBuilder.writeListUint32(_constCycles); | 1301 if (offset_constCycles != null) { |
| 1302 fbBuilder.addOffset(2, offset_constCycles); |
1204 } | 1303 } |
1205 fbBuilder.startTable(); | |
1206 if (offset_references != null) { | 1304 if (offset_references != null) { |
1207 fbBuilder.addOffset(0, offset_references); | 1305 fbBuilder.addOffset(0, offset_references); |
1208 } | 1306 } |
1209 if (offset_types != null) { | 1307 if (offset_types != null) { |
1210 fbBuilder.addOffset(1, offset_types); | 1308 fbBuilder.addOffset(1, offset_types); |
1211 } | 1309 } |
1212 if (offset_constCycles != null) { | |
1213 fbBuilder.addOffset(2, offset_constCycles); | |
1214 } | |
1215 return fbBuilder.endTable(); | 1310 return fbBuilder.endTable(); |
1216 } | 1311 } |
1217 } | 1312 } |
1218 | 1313 |
1219 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { | 1314 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { |
1220 const _LinkedUnitReader(); | 1315 const _LinkedUnitReader(); |
1221 | 1316 |
1222 @override | 1317 @override |
1223 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); | 1318 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); |
1224 } | 1319 } |
1225 | 1320 |
1226 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked
Unit { | 1321 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked
Unit { |
1227 final fb.BufferPointer _bp; | 1322 final fb.BufferPointer _bp; |
1228 | 1323 |
1229 _LinkedUnitImpl(this._bp); | 1324 _LinkedUnitImpl(this._bp); |
1230 | 1325 |
| 1326 List<int> _constCycles; |
1231 List<idl.LinkedReference> _references; | 1327 List<idl.LinkedReference> _references; |
1232 List<idl.EntityRef> _types; | 1328 List<idl.EntityRef> _types; |
1233 List<int> _constCycles; | 1329 |
| 1330 @override |
| 1331 List<int> get constCycles { |
| 1332 _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]
); |
| 1333 return _constCycles; |
| 1334 } |
1234 | 1335 |
1235 @override | 1336 @override |
1236 List<idl.LinkedReference> get references { | 1337 List<idl.LinkedReference> get references { |
1237 _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedRefere
nceReader()).vTableGet(_bp, 0, const <idl.LinkedReference>[]); | 1338 _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedRefere
nceReader()).vTableGet(_bp, 0, const <idl.LinkedReference>[]); |
1238 return _references; | 1339 return _references; |
1239 } | 1340 } |
1240 | 1341 |
1241 @override | 1342 @override |
1242 List<idl.EntityRef> get types { | 1343 List<idl.EntityRef> get types { |
1243 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTab
leGet(_bp, 1, const <idl.EntityRef>[]); | 1344 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTab
leGet(_bp, 1, const <idl.EntityRef>[]); |
1244 return _types; | 1345 return _types; |
1245 } | 1346 } |
1246 | |
1247 @override | |
1248 List<int> get constCycles { | |
1249 _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]
); | |
1250 return _constCycles; | |
1251 } | |
1252 } | 1347 } |
1253 | 1348 |
1254 abstract class _LinkedUnitMixin implements idl.LinkedUnit { | 1349 abstract class _LinkedUnitMixin implements idl.LinkedUnit { |
1255 @override | 1350 @override |
1256 Map<String, Object> toJson() { | 1351 Map<String, Object> toJson() { |
1257 Map<String, Object> _result = <String, Object>{}; | 1352 Map<String, Object> _result = <String, Object>{}; |
| 1353 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles; |
1258 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 1354 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); |
1259 if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson
()).toList(); | 1355 if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson
()).toList(); |
1260 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles; | |
1261 return _result; | 1356 return _result; |
1262 } | 1357 } |
1263 | 1358 |
1264 @override | 1359 @override |
1265 Map<String, Object> toMap() => { | 1360 Map<String, Object> toMap() => { |
| 1361 "constCycles": constCycles, |
1266 "references": references, | 1362 "references": references, |
1267 "types": types, | 1363 "types": types, |
1268 "constCycles": constCycles, | |
1269 }; | 1364 }; |
1270 | 1365 |
1271 @override | 1366 @override |
1272 String toString() => convert.JSON.encode(toJson()); | 1367 String toString() => convert.JSON.encode(toJson()); |
1273 } | 1368 } |
1274 | 1369 |
1275 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { | 1370 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { |
1276 bool _finished = false; | 1371 bool _finished = false; |
1277 | 1372 |
1278 List<LinkedLibraryBuilder> _linkedLibraries; | 1373 List<LinkedLibraryBuilder> _linkedLibraries; |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 }; | 2295 }; |
2201 | 2296 |
2202 @override | 2297 @override |
2203 String toString() => convert.JSON.encode(toJson()); | 2298 String toString() => convert.JSON.encode(toJson()); |
2204 } | 2299 } |
2205 | 2300 |
2206 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { | 2301 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { |
2207 bool _finished = false; | 2302 bool _finished = false; |
2208 | 2303 |
2209 List<UnlinkedConstBuilder> _annotations; | 2304 List<UnlinkedConstBuilder> _annotations; |
| 2305 CodeRangeBuilder _codeRange; |
2210 UnlinkedDocumentationCommentBuilder _documentationComment; | 2306 UnlinkedDocumentationCommentBuilder _documentationComment; |
2211 List<UnlinkedExecutableBuilder> _executables; | 2307 List<UnlinkedExecutableBuilder> _executables; |
2212 List<UnlinkedVariableBuilder> _fields; | 2308 List<UnlinkedVariableBuilder> _fields; |
2213 bool _hasNoSupertype; | 2309 bool _hasNoSupertype; |
2214 List<EntityRefBuilder> _interfaces; | 2310 List<EntityRefBuilder> _interfaces; |
2215 bool _isAbstract; | 2311 bool _isAbstract; |
2216 bool _isMixinApplication; | 2312 bool _isMixinApplication; |
2217 List<EntityRefBuilder> _mixins; | 2313 List<EntityRefBuilder> _mixins; |
2218 String _name; | 2314 String _name; |
2219 int _nameOffset; | 2315 int _nameOffset; |
2220 EntityRefBuilder _supertype; | 2316 EntityRefBuilder _supertype; |
2221 List<UnlinkedTypeParamBuilder> _typeParameters; | 2317 List<UnlinkedTypeParamBuilder> _typeParameters; |
2222 | 2318 |
2223 @override | 2319 @override |
2224 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 2320 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
2225 | 2321 |
2226 /** | 2322 /** |
2227 * Annotations for this class. | 2323 * Annotations for this class. |
2228 */ | 2324 */ |
2229 void set annotations(List<UnlinkedConstBuilder> _value) { | 2325 void set annotations(List<UnlinkedConstBuilder> _value) { |
2230 assert(!_finished); | 2326 assert(!_finished); |
2231 _annotations = _value; | 2327 _annotations = _value; |
2232 } | 2328 } |
2233 | 2329 |
2234 @override | 2330 @override |
| 2331 CodeRangeBuilder get codeRange => _codeRange; |
| 2332 |
| 2333 /** |
| 2334 * Code range of the class. |
| 2335 */ |
| 2336 void set codeRange(CodeRangeBuilder _value) { |
| 2337 assert(!_finished); |
| 2338 _codeRange = _value; |
| 2339 } |
| 2340 |
| 2341 @override |
2235 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 2342 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
2236 | 2343 |
2237 /** | 2344 /** |
2238 * Documentation comment for the class, or `null` if there is no | 2345 * Documentation comment for the class, or `null` if there is no |
2239 * documentation comment. | 2346 * documentation comment. |
2240 */ | 2347 */ |
2241 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 2348 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
2242 assert(!_finished); | 2349 assert(!_finished); |
2243 _documentationComment = _value; | 2350 _documentationComment = _value; |
2244 } | 2351 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 2468 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
2362 | 2469 |
2363 /** | 2470 /** |
2364 * Type parameters of the class, if any. | 2471 * Type parameters of the class, if any. |
2365 */ | 2472 */ |
2366 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 2473 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
2367 assert(!_finished); | 2474 assert(!_finished); |
2368 _typeParameters = _value; | 2475 _typeParameters = _value; |
2369 } | 2476 } |
2370 | 2477 |
2371 UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocument
ationCommentBuilder documentationComment, List<UnlinkedExecutableBuilder> execut
ables, List<UnlinkedVariableBuilder> fields, bool hasNoSupertype, List<EntityRef
Builder> interfaces, bool isAbstract, bool isMixinApplication, List<EntityRefBui
lder> mixins, String name, int nameOffset, EntityRefBuilder supertype, List<Unli
nkedTypeParamBuilder> typeParameters}) | 2478 UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder
codeRange, UnlinkedDocumentationCommentBuilder documentationComment, List<Unlin
kedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool ha
sNoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinAp
plication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRef
Builder supertype, List<UnlinkedTypeParamBuilder> typeParameters}) |
2372 : _annotations = annotations, | 2479 : _annotations = annotations, |
| 2480 _codeRange = codeRange, |
2373 _documentationComment = documentationComment, | 2481 _documentationComment = documentationComment, |
2374 _executables = executables, | 2482 _executables = executables, |
2375 _fields = fields, | 2483 _fields = fields, |
2376 _hasNoSupertype = hasNoSupertype, | 2484 _hasNoSupertype = hasNoSupertype, |
2377 _interfaces = interfaces, | 2485 _interfaces = interfaces, |
2378 _isAbstract = isAbstract, | 2486 _isAbstract = isAbstract, |
2379 _isMixinApplication = isMixinApplication, | 2487 _isMixinApplication = isMixinApplication, |
2380 _mixins = mixins, | 2488 _mixins = mixins, |
2381 _name = name, | 2489 _name = name, |
2382 _nameOffset = nameOffset, | 2490 _nameOffset = nameOffset, |
2383 _supertype = supertype, | 2491 _supertype = supertype, |
2384 _typeParameters = typeParameters; | 2492 _typeParameters = typeParameters; |
2385 | 2493 |
2386 fb.Offset finish(fb.Builder fbBuilder) { | 2494 fb.Offset finish(fb.Builder fbBuilder) { |
2387 assert(!_finished); | 2495 assert(!_finished); |
2388 _finished = true; | 2496 _finished = true; |
2389 fb.Offset offset_annotations; | 2497 fb.Offset offset_annotations; |
| 2498 fb.Offset offset_codeRange; |
2390 fb.Offset offset_documentationComment; | 2499 fb.Offset offset_documentationComment; |
2391 fb.Offset offset_executables; | 2500 fb.Offset offset_executables; |
2392 fb.Offset offset_fields; | 2501 fb.Offset offset_fields; |
2393 fb.Offset offset_interfaces; | 2502 fb.Offset offset_interfaces; |
2394 fb.Offset offset_mixins; | 2503 fb.Offset offset_mixins; |
2395 fb.Offset offset_name; | 2504 fb.Offset offset_name; |
2396 fb.Offset offset_supertype; | 2505 fb.Offset offset_supertype; |
2397 fb.Offset offset_typeParameters; | 2506 fb.Offset offset_typeParameters; |
2398 if (!(_annotations == null || _annotations.isEmpty)) { | 2507 if (!(_annotations == null || _annotations.isEmpty)) { |
2399 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 2508 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
2400 } | 2509 } |
| 2510 if (_codeRange != null) { |
| 2511 offset_codeRange = _codeRange.finish(fbBuilder); |
| 2512 } |
2401 if (_documentationComment != null) { | 2513 if (_documentationComment != null) { |
2402 offset_documentationComment = _documentationComment.finish(fbBuilder); | 2514 offset_documentationComment = _documentationComment.finish(fbBuilder); |
2403 } | 2515 } |
2404 if (!(_executables == null || _executables.isEmpty)) { | 2516 if (!(_executables == null || _executables.isEmpty)) { |
2405 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | 2517 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); |
2406 } | 2518 } |
2407 if (!(_fields == null || _fields.isEmpty)) { | 2519 if (!(_fields == null || _fields.isEmpty)) { |
2408 offset_fields = fbBuilder.writeList(_fields.map((b) => b.finish(fbBuilder)
).toList()); | 2520 offset_fields = fbBuilder.writeList(_fields.map((b) => b.finish(fbBuilder)
).toList()); |
2409 } | 2521 } |
2410 if (!(_interfaces == null || _interfaces.isEmpty)) { | 2522 if (!(_interfaces == null || _interfaces.isEmpty)) { |
2411 offset_interfaces = fbBuilder.writeList(_interfaces.map((b) => b.finish(fb
Builder)).toList()); | 2523 offset_interfaces = fbBuilder.writeList(_interfaces.map((b) => b.finish(fb
Builder)).toList()); |
2412 } | 2524 } |
2413 if (!(_mixins == null || _mixins.isEmpty)) { | 2525 if (!(_mixins == null || _mixins.isEmpty)) { |
2414 offset_mixins = fbBuilder.writeList(_mixins.map((b) => b.finish(fbBuilder)
).toList()); | 2526 offset_mixins = fbBuilder.writeList(_mixins.map((b) => b.finish(fbBuilder)
).toList()); |
2415 } | 2527 } |
2416 if (_name != null) { | 2528 if (_name != null) { |
2417 offset_name = fbBuilder.writeString(_name); | 2529 offset_name = fbBuilder.writeString(_name); |
2418 } | 2530 } |
2419 if (_supertype != null) { | 2531 if (_supertype != null) { |
2420 offset_supertype = _supertype.finish(fbBuilder); | 2532 offset_supertype = _supertype.finish(fbBuilder); |
2421 } | 2533 } |
2422 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 2534 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
2423 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 2535 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
2424 } | 2536 } |
2425 fbBuilder.startTable(); | 2537 fbBuilder.startTable(); |
2426 if (offset_annotations != null) { | 2538 if (offset_annotations != null) { |
2427 fbBuilder.addOffset(5, offset_annotations); | 2539 fbBuilder.addOffset(5, offset_annotations); |
2428 } | 2540 } |
| 2541 if (offset_codeRange != null) { |
| 2542 fbBuilder.addOffset(13, offset_codeRange); |
| 2543 } |
2429 if (offset_documentationComment != null) { | 2544 if (offset_documentationComment != null) { |
2430 fbBuilder.addOffset(6, offset_documentationComment); | 2545 fbBuilder.addOffset(6, offset_documentationComment); |
2431 } | 2546 } |
2432 if (offset_executables != null) { | 2547 if (offset_executables != null) { |
2433 fbBuilder.addOffset(2, offset_executables); | 2548 fbBuilder.addOffset(2, offset_executables); |
2434 } | 2549 } |
2435 if (offset_fields != null) { | 2550 if (offset_fields != null) { |
2436 fbBuilder.addOffset(4, offset_fields); | 2551 fbBuilder.addOffset(4, offset_fields); |
2437 } | 2552 } |
2438 if (_hasNoSupertype == true) { | 2553 if (_hasNoSupertype == true) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2472 @override | 2587 @override |
2473 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl
(bp); | 2588 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl
(bp); |
2474 } | 2589 } |
2475 | 2590 |
2476 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { | 2591 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { |
2477 final fb.BufferPointer _bp; | 2592 final fb.BufferPointer _bp; |
2478 | 2593 |
2479 _UnlinkedClassImpl(this._bp); | 2594 _UnlinkedClassImpl(this._bp); |
2480 | 2595 |
2481 List<idl.UnlinkedConst> _annotations; | 2596 List<idl.UnlinkedConst> _annotations; |
| 2597 idl.CodeRange _codeRange; |
2482 idl.UnlinkedDocumentationComment _documentationComment; | 2598 idl.UnlinkedDocumentationComment _documentationComment; |
2483 List<idl.UnlinkedExecutable> _executables; | 2599 List<idl.UnlinkedExecutable> _executables; |
2484 List<idl.UnlinkedVariable> _fields; | 2600 List<idl.UnlinkedVariable> _fields; |
2485 bool _hasNoSupertype; | 2601 bool _hasNoSupertype; |
2486 List<idl.EntityRef> _interfaces; | 2602 List<idl.EntityRef> _interfaces; |
2487 bool _isAbstract; | 2603 bool _isAbstract; |
2488 bool _isMixinApplication; | 2604 bool _isMixinApplication; |
2489 List<idl.EntityRef> _mixins; | 2605 List<idl.EntityRef> _mixins; |
2490 String _name; | 2606 String _name; |
2491 int _nameOffset; | 2607 int _nameOffset; |
2492 idl.EntityRef _supertype; | 2608 idl.EntityRef _supertype; |
2493 List<idl.UnlinkedTypeParam> _typeParameters; | 2609 List<idl.UnlinkedTypeParam> _typeParameters; |
2494 | 2610 |
2495 @override | 2611 @override |
2496 List<idl.UnlinkedConst> get annotations { | 2612 List<idl.UnlinkedConst> get annotations { |
2497 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 5, const <idl.UnlinkedConst>[]); | 2613 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 5, const <idl.UnlinkedConst>[]); |
2498 return _annotations; | 2614 return _annotations; |
2499 } | 2615 } |
2500 | 2616 |
2501 @override | 2617 @override |
| 2618 idl.CodeRange get codeRange { |
| 2619 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 13, null); |
| 2620 return _codeRange; |
| 2621 } |
| 2622 |
| 2623 @override |
2502 idl.UnlinkedDocumentationComment get documentationComment { | 2624 idl.UnlinkedDocumentationComment get documentationComment { |
2503 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); | 2625 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); |
2504 return _documentationComment; | 2626 return _documentationComment; |
2505 } | 2627 } |
2506 | 2628 |
2507 @override | 2629 @override |
2508 List<idl.UnlinkedExecutable> get executables { | 2630 List<idl.UnlinkedExecutable> get executables { |
2509 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]); | 2631 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]); |
2510 return _executables; | 2632 return _executables; |
2511 } | 2633 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2569 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 9, const <idl.UnlinkedTypeParam>[]); | 2691 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 9, const <idl.UnlinkedTypeParam>[]); |
2570 return _typeParameters; | 2692 return _typeParameters; |
2571 } | 2693 } |
2572 } | 2694 } |
2573 | 2695 |
2574 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { | 2696 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { |
2575 @override | 2697 @override |
2576 Map<String, Object> toJson() { | 2698 Map<String, Object> toJson() { |
2577 Map<String, Object> _result = <String, Object>{}; | 2699 Map<String, Object> _result = <String, Object>{}; |
2578 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 2700 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 2701 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
2579 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 2702 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
2580 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); | 2703 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); |
2581 if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJ
son()).toList(); | 2704 if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJ
son()).toList(); |
2582 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype; | 2705 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype; |
2583 if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) =
> _value.toJson()).toList(); | 2706 if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) =
> _value.toJson()).toList(); |
2584 if (isAbstract != false) _result["isAbstract"] = isAbstract; | 2707 if (isAbstract != false) _result["isAbstract"] = isAbstract; |
2585 if (isMixinApplication != false) _result["isMixinApplication"] = isMixinAppl
ication; | 2708 if (isMixinApplication != false) _result["isMixinApplication"] = isMixinAppl
ication; |
2586 if (mixins.isNotEmpty) _result["mixins"] = mixins.map((_value) => _value.toJ
son()).toList(); | 2709 if (mixins.isNotEmpty) _result["mixins"] = mixins.map((_value) => _value.toJ
son()).toList(); |
2587 if (name != '') _result["name"] = name; | 2710 if (name != '') _result["name"] = name; |
2588 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 2711 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
2589 if (supertype != null) _result["supertype"] = supertype.toJson(); | 2712 if (supertype != null) _result["supertype"] = supertype.toJson(); |
2590 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 2713 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); |
2591 return _result; | 2714 return _result; |
2592 } | 2715 } |
2593 | 2716 |
2594 @override | 2717 @override |
2595 Map<String, Object> toMap() => { | 2718 Map<String, Object> toMap() => { |
2596 "annotations": annotations, | 2719 "annotations": annotations, |
| 2720 "codeRange": codeRange, |
2597 "documentationComment": documentationComment, | 2721 "documentationComment": documentationComment, |
2598 "executables": executables, | 2722 "executables": executables, |
2599 "fields": fields, | 2723 "fields": fields, |
2600 "hasNoSupertype": hasNoSupertype, | 2724 "hasNoSupertype": hasNoSupertype, |
2601 "interfaces": interfaces, | 2725 "interfaces": interfaces, |
2602 "isAbstract": isAbstract, | 2726 "isAbstract": isAbstract, |
2603 "isMixinApplication": isMixinApplication, | 2727 "isMixinApplication": isMixinApplication, |
2604 "mixins": mixins, | 2728 "mixins": mixins, |
2605 "name": name, | 2729 "name": name, |
2606 "nameOffset": nameOffset, | 2730 "nameOffset": nameOffset, |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3274 }; | 3398 }; |
3275 | 3399 |
3276 @override | 3400 @override |
3277 String toString() => convert.JSON.encode(toJson()); | 3401 String toString() => convert.JSON.encode(toJson()); |
3278 } | 3402 } |
3279 | 3403 |
3280 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { | 3404 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { |
3281 bool _finished = false; | 3405 bool _finished = false; |
3282 | 3406 |
3283 List<UnlinkedConstBuilder> _annotations; | 3407 List<UnlinkedConstBuilder> _annotations; |
| 3408 CodeRangeBuilder _codeRange; |
3284 UnlinkedDocumentationCommentBuilder _documentationComment; | 3409 UnlinkedDocumentationCommentBuilder _documentationComment; |
3285 String _name; | 3410 String _name; |
3286 int _nameOffset; | 3411 int _nameOffset; |
3287 List<UnlinkedEnumValueBuilder> _values; | 3412 List<UnlinkedEnumValueBuilder> _values; |
3288 | 3413 |
3289 @override | 3414 @override |
3290 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3415 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
3291 | 3416 |
3292 /** | 3417 /** |
3293 * Annotations for this enum. | 3418 * Annotations for this enum. |
3294 */ | 3419 */ |
3295 void set annotations(List<UnlinkedConstBuilder> _value) { | 3420 void set annotations(List<UnlinkedConstBuilder> _value) { |
3296 assert(!_finished); | 3421 assert(!_finished); |
3297 _annotations = _value; | 3422 _annotations = _value; |
3298 } | 3423 } |
3299 | 3424 |
3300 @override | 3425 @override |
| 3426 CodeRangeBuilder get codeRange => _codeRange; |
| 3427 |
| 3428 /** |
| 3429 * Code range of the enum. |
| 3430 */ |
| 3431 void set codeRange(CodeRangeBuilder _value) { |
| 3432 assert(!_finished); |
| 3433 _codeRange = _value; |
| 3434 } |
| 3435 |
| 3436 @override |
3301 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 3437 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
3302 | 3438 |
3303 /** | 3439 /** |
3304 * Documentation comment for the enum, or `null` if there is no documentation | 3440 * Documentation comment for the enum, or `null` if there is no documentation |
3305 * comment. | 3441 * comment. |
3306 */ | 3442 */ |
3307 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 3443 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
3308 assert(!_finished); | 3444 assert(!_finished); |
3309 _documentationComment = _value; | 3445 _documentationComment = _value; |
3310 } | 3446 } |
(...skipping 25 matching lines...) Expand all Loading... |
3336 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; | 3472 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; |
3337 | 3473 |
3338 /** | 3474 /** |
3339 * Values listed in the enum declaration, in declaration order. | 3475 * Values listed in the enum declaration, in declaration order. |
3340 */ | 3476 */ |
3341 void set values(List<UnlinkedEnumValueBuilder> _value) { | 3477 void set values(List<UnlinkedEnumValueBuilder> _value) { |
3342 assert(!_finished); | 3478 assert(!_finished); |
3343 _values = _value; | 3479 _values = _value; |
3344 } | 3480 } |
3345 | 3481 |
3346 UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumenta
tionCommentBuilder documentationComment, String name, int nameOffset, List<Unlin
kedEnumValueBuilder> values}) | 3482 UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder
codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String name
, int nameOffset, List<UnlinkedEnumValueBuilder> values}) |
3347 : _annotations = annotations, | 3483 : _annotations = annotations, |
| 3484 _codeRange = codeRange, |
3348 _documentationComment = documentationComment, | 3485 _documentationComment = documentationComment, |
3349 _name = name, | 3486 _name = name, |
3350 _nameOffset = nameOffset, | 3487 _nameOffset = nameOffset, |
3351 _values = values; | 3488 _values = values; |
3352 | 3489 |
3353 fb.Offset finish(fb.Builder fbBuilder) { | 3490 fb.Offset finish(fb.Builder fbBuilder) { |
3354 assert(!_finished); | 3491 assert(!_finished); |
3355 _finished = true; | 3492 _finished = true; |
3356 fb.Offset offset_annotations; | 3493 fb.Offset offset_annotations; |
| 3494 fb.Offset offset_codeRange; |
3357 fb.Offset offset_documentationComment; | 3495 fb.Offset offset_documentationComment; |
3358 fb.Offset offset_name; | 3496 fb.Offset offset_name; |
3359 fb.Offset offset_values; | 3497 fb.Offset offset_values; |
3360 if (!(_annotations == null || _annotations.isEmpty)) { | 3498 if (!(_annotations == null || _annotations.isEmpty)) { |
3361 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 3499 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
3362 } | 3500 } |
| 3501 if (_codeRange != null) { |
| 3502 offset_codeRange = _codeRange.finish(fbBuilder); |
| 3503 } |
3363 if (_documentationComment != null) { | 3504 if (_documentationComment != null) { |
3364 offset_documentationComment = _documentationComment.finish(fbBuilder); | 3505 offset_documentationComment = _documentationComment.finish(fbBuilder); |
3365 } | 3506 } |
3366 if (_name != null) { | 3507 if (_name != null) { |
3367 offset_name = fbBuilder.writeString(_name); | 3508 offset_name = fbBuilder.writeString(_name); |
3368 } | 3509 } |
3369 if (!(_values == null || _values.isEmpty)) { | 3510 if (!(_values == null || _values.isEmpty)) { |
3370 offset_values = fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)
).toList()); | 3511 offset_values = fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)
).toList()); |
3371 } | 3512 } |
3372 fbBuilder.startTable(); | 3513 fbBuilder.startTable(); |
3373 if (offset_annotations != null) { | 3514 if (offset_annotations != null) { |
3374 fbBuilder.addOffset(4, offset_annotations); | 3515 fbBuilder.addOffset(4, offset_annotations); |
3375 } | 3516 } |
| 3517 if (offset_codeRange != null) { |
| 3518 fbBuilder.addOffset(5, offset_codeRange); |
| 3519 } |
3376 if (offset_documentationComment != null) { | 3520 if (offset_documentationComment != null) { |
3377 fbBuilder.addOffset(3, offset_documentationComment); | 3521 fbBuilder.addOffset(3, offset_documentationComment); |
3378 } | 3522 } |
3379 if (offset_name != null) { | 3523 if (offset_name != null) { |
3380 fbBuilder.addOffset(0, offset_name); | 3524 fbBuilder.addOffset(0, offset_name); |
3381 } | 3525 } |
3382 if (_nameOffset != null && _nameOffset != 0) { | 3526 if (_nameOffset != null && _nameOffset != 0) { |
3383 fbBuilder.addUint32(1, _nameOffset); | 3527 fbBuilder.addUint32(1, _nameOffset); |
3384 } | 3528 } |
3385 if (offset_values != null) { | 3529 if (offset_values != null) { |
3386 fbBuilder.addOffset(2, offset_values); | 3530 fbBuilder.addOffset(2, offset_values); |
3387 } | 3531 } |
3388 return fbBuilder.endTable(); | 3532 return fbBuilder.endTable(); |
3389 } | 3533 } |
3390 } | 3534 } |
3391 | 3535 |
3392 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { | 3536 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { |
3393 const _UnlinkedEnumReader(); | 3537 const _UnlinkedEnumReader(); |
3394 | 3538 |
3395 @override | 3539 @override |
3396 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b
p); | 3540 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b
p); |
3397 } | 3541 } |
3398 | 3542 |
3399 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { | 3543 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { |
3400 final fb.BufferPointer _bp; | 3544 final fb.BufferPointer _bp; |
3401 | 3545 |
3402 _UnlinkedEnumImpl(this._bp); | 3546 _UnlinkedEnumImpl(this._bp); |
3403 | 3547 |
3404 List<idl.UnlinkedConst> _annotations; | 3548 List<idl.UnlinkedConst> _annotations; |
| 3549 idl.CodeRange _codeRange; |
3405 idl.UnlinkedDocumentationComment _documentationComment; | 3550 idl.UnlinkedDocumentationComment _documentationComment; |
3406 String _name; | 3551 String _name; |
3407 int _nameOffset; | 3552 int _nameOffset; |
3408 List<idl.UnlinkedEnumValue> _values; | 3553 List<idl.UnlinkedEnumValue> _values; |
3409 | 3554 |
3410 @override | 3555 @override |
3411 List<idl.UnlinkedConst> get annotations { | 3556 List<idl.UnlinkedConst> get annotations { |
3412 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); | 3557 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); |
3413 return _annotations; | 3558 return _annotations; |
3414 } | 3559 } |
3415 | 3560 |
3416 @override | 3561 @override |
| 3562 idl.CodeRange get codeRange { |
| 3563 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 5, null); |
| 3564 return _codeRange; |
| 3565 } |
| 3566 |
| 3567 @override |
3417 idl.UnlinkedDocumentationComment get documentationComment { | 3568 idl.UnlinkedDocumentationComment get documentationComment { |
3418 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 3, null); | 3569 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 3, null); |
3419 return _documentationComment; | 3570 return _documentationComment; |
3420 } | 3571 } |
3421 | 3572 |
3422 @override | 3573 @override |
3423 String get name { | 3574 String get name { |
3424 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 3575 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
3425 return _name; | 3576 return _name; |
3426 } | 3577 } |
3427 | 3578 |
3428 @override | 3579 @override |
3429 int get nameOffset { | 3580 int get nameOffset { |
3430 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 3581 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
3431 return _nameOffset; | 3582 return _nameOffset; |
3432 } | 3583 } |
3433 | 3584 |
3434 @override | 3585 @override |
3435 List<idl.UnlinkedEnumValue> get values { | 3586 List<idl.UnlinkedEnumValue> get values { |
3436 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa
lueReader()).vTableGet(_bp, 2, const <idl.UnlinkedEnumValue>[]); | 3587 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa
lueReader()).vTableGet(_bp, 2, const <idl.UnlinkedEnumValue>[]); |
3437 return _values; | 3588 return _values; |
3438 } | 3589 } |
3439 } | 3590 } |
3440 | 3591 |
3441 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { | 3592 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { |
3442 @override | 3593 @override |
3443 Map<String, Object> toJson() { | 3594 Map<String, Object> toJson() { |
3444 Map<String, Object> _result = <String, Object>{}; | 3595 Map<String, Object> _result = <String, Object>{}; |
3445 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 3596 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 3597 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
3446 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 3598 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
3447 if (name != '') _result["name"] = name; | 3599 if (name != '') _result["name"] = name; |
3448 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 3600 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
3449 if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJ
son()).toList(); | 3601 if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJ
son()).toList(); |
3450 return _result; | 3602 return _result; |
3451 } | 3603 } |
3452 | 3604 |
3453 @override | 3605 @override |
3454 Map<String, Object> toMap() => { | 3606 Map<String, Object> toMap() => { |
3455 "annotations": annotations, | 3607 "annotations": annotations, |
| 3608 "codeRange": codeRange, |
3456 "documentationComment": documentationComment, | 3609 "documentationComment": documentationComment, |
3457 "name": name, | 3610 "name": name, |
3458 "nameOffset": nameOffset, | 3611 "nameOffset": nameOffset, |
3459 "values": values, | 3612 "values": values, |
3460 }; | 3613 }; |
3461 | 3614 |
3462 @override | 3615 @override |
3463 String toString() => convert.JSON.encode(toJson()); | 3616 String toString() => convert.JSON.encode(toJson()); |
3464 } | 3617 } |
3465 | 3618 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3588 }; | 3741 }; |
3589 | 3742 |
3590 @override | 3743 @override |
3591 String toString() => convert.JSON.encode(toJson()); | 3744 String toString() => convert.JSON.encode(toJson()); |
3592 } | 3745 } |
3593 | 3746 |
3594 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { | 3747 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { |
3595 bool _finished = false; | 3748 bool _finished = false; |
3596 | 3749 |
3597 List<UnlinkedConstBuilder> _annotations; | 3750 List<UnlinkedConstBuilder> _annotations; |
| 3751 CodeRangeBuilder _codeRange; |
3598 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; | 3752 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; |
| 3753 int _constCycleSlot; |
3599 UnlinkedDocumentationCommentBuilder _documentationComment; | 3754 UnlinkedDocumentationCommentBuilder _documentationComment; |
3600 int _inferredReturnTypeSlot; | 3755 int _inferredReturnTypeSlot; |
3601 bool _isAbstract; | 3756 bool _isAbstract; |
3602 bool _isConst; | 3757 bool _isConst; |
3603 bool _isExternal; | 3758 bool _isExternal; |
3604 bool _isFactory; | 3759 bool _isFactory; |
3605 bool _isRedirectedConstructor; | 3760 bool _isRedirectedConstructor; |
3606 bool _isStatic; | 3761 bool _isStatic; |
3607 idl.UnlinkedExecutableKind _kind; | 3762 idl.UnlinkedExecutableKind _kind; |
3608 List<UnlinkedExecutableBuilder> _localFunctions; | 3763 List<UnlinkedExecutableBuilder> _localFunctions; |
3609 List<UnlinkedLabelBuilder> _localLabels; | 3764 List<UnlinkedLabelBuilder> _localLabels; |
3610 List<UnlinkedVariableBuilder> _localVariables; | 3765 List<UnlinkedVariableBuilder> _localVariables; |
3611 String _name; | 3766 String _name; |
3612 int _nameEnd; | 3767 int _nameEnd; |
3613 int _nameOffset; | 3768 int _nameOffset; |
3614 List<UnlinkedParamBuilder> _parameters; | 3769 List<UnlinkedParamBuilder> _parameters; |
3615 int _periodOffset; | 3770 int _periodOffset; |
3616 EntityRefBuilder _redirectedConstructor; | 3771 EntityRefBuilder _redirectedConstructor; |
3617 String _redirectedConstructorName; | 3772 String _redirectedConstructorName; |
3618 EntityRefBuilder _returnType; | 3773 EntityRefBuilder _returnType; |
3619 List<UnlinkedTypeParamBuilder> _typeParameters; | 3774 List<UnlinkedTypeParamBuilder> _typeParameters; |
3620 int _visibleLength; | 3775 int _visibleLength; |
3621 int _visibleOffset; | 3776 int _visibleOffset; |
3622 int _constCycleSlot; | |
3623 | 3777 |
3624 @override | 3778 @override |
3625 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3779 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
3626 | 3780 |
3627 /** | 3781 /** |
3628 * Annotations for this executable. | 3782 * Annotations for this executable. |
3629 */ | 3783 */ |
3630 void set annotations(List<UnlinkedConstBuilder> _value) { | 3784 void set annotations(List<UnlinkedConstBuilder> _value) { |
3631 assert(!_finished); | 3785 assert(!_finished); |
3632 _annotations = _value; | 3786 _annotations = _value; |
3633 } | 3787 } |
3634 | 3788 |
3635 @override | 3789 @override |
| 3790 CodeRangeBuilder get codeRange => _codeRange; |
| 3791 |
| 3792 /** |
| 3793 * Code range of the executable. |
| 3794 */ |
| 3795 void set codeRange(CodeRangeBuilder _value) { |
| 3796 assert(!_finished); |
| 3797 _codeRange = _value; |
| 3798 } |
| 3799 |
| 3800 @override |
3636 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _const
antInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; | 3801 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _const
antInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; |
3637 | 3802 |
3638 /** | 3803 /** |
3639 * If a constant [UnlinkedExecutableKind.constructor], the constructor | 3804 * If a constant [UnlinkedExecutableKind.constructor], the constructor |
3640 * initializers. Otherwise empty. | 3805 * initializers. Otherwise empty. |
3641 */ | 3806 */ |
3642 void set constantInitializers(List<UnlinkedConstructorInitializerBuilder> _val
ue) { | 3807 void set constantInitializers(List<UnlinkedConstructorInitializerBuilder> _val
ue) { |
3643 assert(!_finished); | 3808 assert(!_finished); |
3644 _constantInitializers = _value; | 3809 _constantInitializers = _value; |
3645 } | 3810 } |
3646 | 3811 |
3647 @override | 3812 @override |
| 3813 int get constCycleSlot => _constCycleSlot ??= 0; |
| 3814 |
| 3815 /** |
| 3816 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, |
| 3817 * a nonzero slot id which is unique within this compilation unit. If this id |
| 3818 * is found in [LinkedUnit.constCycles], then this constructor is part of a |
| 3819 * cycle. |
| 3820 * |
| 3821 * Otherwise, zero. |
| 3822 */ |
| 3823 void set constCycleSlot(int _value) { |
| 3824 assert(!_finished); |
| 3825 assert(_value == null || _value >= 0); |
| 3826 _constCycleSlot = _value; |
| 3827 } |
| 3828 |
| 3829 @override |
3648 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 3830 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
3649 | 3831 |
3650 /** | 3832 /** |
3651 * Documentation comment for the executable, or `null` if there is no | 3833 * Documentation comment for the executable, or `null` if there is no |
3652 * documentation comment. | 3834 * documentation comment. |
3653 */ | 3835 */ |
3654 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 3836 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
3655 assert(!_finished); | 3837 assert(!_finished); |
3656 _documentationComment = _value; | 3838 _documentationComment = _value; |
3657 } | 3839 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3923 | 4105 |
3924 /** | 4106 /** |
3925 * If a local function, the beginning of the visible range; zero otherwise. | 4107 * If a local function, the beginning of the visible range; zero otherwise. |
3926 */ | 4108 */ |
3927 void set visibleOffset(int _value) { | 4109 void set visibleOffset(int _value) { |
3928 assert(!_finished); | 4110 assert(!_finished); |
3929 assert(_value == null || _value >= 0); | 4111 assert(_value == null || _value >= 0); |
3930 _visibleOffset = _value; | 4112 _visibleOffset = _value; |
3931 } | 4113 } |
3932 | 4114 |
3933 @override | 4115 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBu
ilder codeRange, List<UnlinkedConstructorInitializerBuilder> constantInitializer
s, int constCycleSlot, UnlinkedDocumentationCommentBuilder documentationComment,
int inferredReturnTypeSlot, bool isAbstract, bool isConst, bool isExternal, boo
l isFactory, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutable
Kind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBui
lder> localLabels, List<UnlinkedVariableBuilder> localVariables, String name, in
t nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffs
et, EntityRefBuilder redirectedConstructor, String redirectedConstructorName, En
tityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int vi
sibleLength, int visibleOffset}) |
3934 int get constCycleSlot => _constCycleSlot ??= 0; | |
3935 | |
3936 /** | |
3937 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, | |
3938 * a nonzero slot id which is unique within this compilation unit. If this id | |
3939 * is found in [LinkedUnit.constCycles], then this constructor is part of a | |
3940 * cycle. | |
3941 * | |
3942 * Otherwise, zero. | |
3943 */ | |
3944 void set constCycleSlot(int _value) { | |
3945 assert(!_finished); | |
3946 assert(_value == null || _value >= 0); | |
3947 _constCycleSlot = _value; | |
3948 } | |
3949 | |
3950 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, List<Unlink
edConstructorInitializerBuilder> constantInitializers, UnlinkedDocumentationComm
entBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bo
ol isConst, bool isExternal, bool isFactory, bool isRedirectedConstructor, bool
isStatic, idl.UnlinkedExecutableKind kind, List<UnlinkedExecutableBuilder> local
Functions, List<UnlinkedLabelBuilder> localLabels, List<UnlinkedVariableBuilder>
localVariables, String name, int nameEnd, int nameOffset, List<UnlinkedParamBui
lder> parameters, int periodOffset, EntityRefBuilder redirectedConstructor, Stri
ng redirectedConstructorName, EntityRefBuilder returnType, List<UnlinkedTypePara
mBuilder> typeParameters, int visibleLength, int visibleOffset, int constCycleSl
ot}) | |
3951 : _annotations = annotations, | 4116 : _annotations = annotations, |
| 4117 _codeRange = codeRange, |
3952 _constantInitializers = constantInitializers, | 4118 _constantInitializers = constantInitializers, |
| 4119 _constCycleSlot = constCycleSlot, |
3953 _documentationComment = documentationComment, | 4120 _documentationComment = documentationComment, |
3954 _inferredReturnTypeSlot = inferredReturnTypeSlot, | 4121 _inferredReturnTypeSlot = inferredReturnTypeSlot, |
3955 _isAbstract = isAbstract, | 4122 _isAbstract = isAbstract, |
3956 _isConst = isConst, | 4123 _isConst = isConst, |
3957 _isExternal = isExternal, | 4124 _isExternal = isExternal, |
3958 _isFactory = isFactory, | 4125 _isFactory = isFactory, |
3959 _isRedirectedConstructor = isRedirectedConstructor, | 4126 _isRedirectedConstructor = isRedirectedConstructor, |
3960 _isStatic = isStatic, | 4127 _isStatic = isStatic, |
3961 _kind = kind, | 4128 _kind = kind, |
3962 _localFunctions = localFunctions, | 4129 _localFunctions = localFunctions, |
3963 _localLabels = localLabels, | 4130 _localLabels = localLabels, |
3964 _localVariables = localVariables, | 4131 _localVariables = localVariables, |
3965 _name = name, | 4132 _name = name, |
3966 _nameEnd = nameEnd, | 4133 _nameEnd = nameEnd, |
3967 _nameOffset = nameOffset, | 4134 _nameOffset = nameOffset, |
3968 _parameters = parameters, | 4135 _parameters = parameters, |
3969 _periodOffset = periodOffset, | 4136 _periodOffset = periodOffset, |
3970 _redirectedConstructor = redirectedConstructor, | 4137 _redirectedConstructor = redirectedConstructor, |
3971 _redirectedConstructorName = redirectedConstructorName, | 4138 _redirectedConstructorName = redirectedConstructorName, |
3972 _returnType = returnType, | 4139 _returnType = returnType, |
3973 _typeParameters = typeParameters, | 4140 _typeParameters = typeParameters, |
3974 _visibleLength = visibleLength, | 4141 _visibleLength = visibleLength, |
3975 _visibleOffset = visibleOffset, | 4142 _visibleOffset = visibleOffset; |
3976 _constCycleSlot = constCycleSlot; | |
3977 | 4143 |
3978 fb.Offset finish(fb.Builder fbBuilder) { | 4144 fb.Offset finish(fb.Builder fbBuilder) { |
3979 assert(!_finished); | 4145 assert(!_finished); |
3980 _finished = true; | 4146 _finished = true; |
3981 fb.Offset offset_annotations; | 4147 fb.Offset offset_annotations; |
| 4148 fb.Offset offset_codeRange; |
3982 fb.Offset offset_constantInitializers; | 4149 fb.Offset offset_constantInitializers; |
3983 fb.Offset offset_documentationComment; | 4150 fb.Offset offset_documentationComment; |
3984 fb.Offset offset_localFunctions; | 4151 fb.Offset offset_localFunctions; |
3985 fb.Offset offset_localLabels; | 4152 fb.Offset offset_localLabels; |
3986 fb.Offset offset_localVariables; | 4153 fb.Offset offset_localVariables; |
3987 fb.Offset offset_name; | 4154 fb.Offset offset_name; |
3988 fb.Offset offset_parameters; | 4155 fb.Offset offset_parameters; |
3989 fb.Offset offset_redirectedConstructor; | 4156 fb.Offset offset_redirectedConstructor; |
3990 fb.Offset offset_redirectedConstructorName; | 4157 fb.Offset offset_redirectedConstructorName; |
3991 fb.Offset offset_returnType; | 4158 fb.Offset offset_returnType; |
3992 fb.Offset offset_typeParameters; | 4159 fb.Offset offset_typeParameters; |
3993 if (!(_annotations == null || _annotations.isEmpty)) { | 4160 if (!(_annotations == null || _annotations.isEmpty)) { |
3994 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 4161 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
3995 } | 4162 } |
| 4163 if (_codeRange != null) { |
| 4164 offset_codeRange = _codeRange.finish(fbBuilder); |
| 4165 } |
3996 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { | 4166 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { |
3997 offset_constantInitializers = fbBuilder.writeList(_constantInitializers.ma
p((b) => b.finish(fbBuilder)).toList()); | 4167 offset_constantInitializers = fbBuilder.writeList(_constantInitializers.ma
p((b) => b.finish(fbBuilder)).toList()); |
3998 } | 4168 } |
3999 if (_documentationComment != null) { | 4169 if (_documentationComment != null) { |
4000 offset_documentationComment = _documentationComment.finish(fbBuilder); | 4170 offset_documentationComment = _documentationComment.finish(fbBuilder); |
4001 } | 4171 } |
4002 if (!(_localFunctions == null || _localFunctions.isEmpty)) { | 4172 if (!(_localFunctions == null || _localFunctions.isEmpty)) { |
4003 offset_localFunctions = fbBuilder.writeList(_localFunctions.map((b) => b.f
inish(fbBuilder)).toList()); | 4173 offset_localFunctions = fbBuilder.writeList(_localFunctions.map((b) => b.f
inish(fbBuilder)).toList()); |
4004 } | 4174 } |
4005 if (!(_localLabels == null || _localLabels.isEmpty)) { | 4175 if (!(_localLabels == null || _localLabels.isEmpty)) { |
(...skipping 17 matching lines...) Expand all Loading... |
4023 if (_returnType != null) { | 4193 if (_returnType != null) { |
4024 offset_returnType = _returnType.finish(fbBuilder); | 4194 offset_returnType = _returnType.finish(fbBuilder); |
4025 } | 4195 } |
4026 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 4196 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
4027 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 4197 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
4028 } | 4198 } |
4029 fbBuilder.startTable(); | 4199 fbBuilder.startTable(); |
4030 if (offset_annotations != null) { | 4200 if (offset_annotations != null) { |
4031 fbBuilder.addOffset(6, offset_annotations); | 4201 fbBuilder.addOffset(6, offset_annotations); |
4032 } | 4202 } |
| 4203 if (offset_codeRange != null) { |
| 4204 fbBuilder.addOffset(26, offset_codeRange); |
| 4205 } |
4033 if (offset_constantInitializers != null) { | 4206 if (offset_constantInitializers != null) { |
4034 fbBuilder.addOffset(14, offset_constantInitializers); | 4207 fbBuilder.addOffset(14, offset_constantInitializers); |
4035 } | 4208 } |
| 4209 if (_constCycleSlot != null && _constCycleSlot != 0) { |
| 4210 fbBuilder.addUint32(25, _constCycleSlot); |
| 4211 } |
4036 if (offset_documentationComment != null) { | 4212 if (offset_documentationComment != null) { |
4037 fbBuilder.addOffset(7, offset_documentationComment); | 4213 fbBuilder.addOffset(7, offset_documentationComment); |
4038 } | 4214 } |
4039 if (_inferredReturnTypeSlot != null && _inferredReturnTypeSlot != 0) { | 4215 if (_inferredReturnTypeSlot != null && _inferredReturnTypeSlot != 0) { |
4040 fbBuilder.addUint32(5, _inferredReturnTypeSlot); | 4216 fbBuilder.addUint32(5, _inferredReturnTypeSlot); |
4041 } | 4217 } |
4042 if (_isAbstract == true) { | 4218 if (_isAbstract == true) { |
4043 fbBuilder.addBool(10, true); | 4219 fbBuilder.addBool(10, true); |
4044 } | 4220 } |
4045 if (_isConst == true) { | 4221 if (_isConst == true) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4095 } | 4271 } |
4096 if (offset_typeParameters != null) { | 4272 if (offset_typeParameters != null) { |
4097 fbBuilder.addOffset(16, offset_typeParameters); | 4273 fbBuilder.addOffset(16, offset_typeParameters); |
4098 } | 4274 } |
4099 if (_visibleLength != null && _visibleLength != 0) { | 4275 if (_visibleLength != null && _visibleLength != 0) { |
4100 fbBuilder.addUint32(20, _visibleLength); | 4276 fbBuilder.addUint32(20, _visibleLength); |
4101 } | 4277 } |
4102 if (_visibleOffset != null && _visibleOffset != 0) { | 4278 if (_visibleOffset != null && _visibleOffset != 0) { |
4103 fbBuilder.addUint32(21, _visibleOffset); | 4279 fbBuilder.addUint32(21, _visibleOffset); |
4104 } | 4280 } |
4105 if (_constCycleSlot != null && _constCycleSlot != 0) { | |
4106 fbBuilder.addUint32(25, _constCycleSlot); | |
4107 } | |
4108 return fbBuilder.endTable(); | 4281 return fbBuilder.endTable(); |
4109 } | 4282 } |
4110 } | 4283 } |
4111 | 4284 |
4112 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ | 4285 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ |
4113 const _UnlinkedExecutableReader(); | 4286 const _UnlinkedExecutableReader(); |
4114 | 4287 |
4115 @override | 4288 @override |
4116 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec
utableImpl(bp); | 4289 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec
utableImpl(bp); |
4117 } | 4290 } |
4118 | 4291 |
4119 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { | 4292 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { |
4120 final fb.BufferPointer _bp; | 4293 final fb.BufferPointer _bp; |
4121 | 4294 |
4122 _UnlinkedExecutableImpl(this._bp); | 4295 _UnlinkedExecutableImpl(this._bp); |
4123 | 4296 |
4124 List<idl.UnlinkedConst> _annotations; | 4297 List<idl.UnlinkedConst> _annotations; |
| 4298 idl.CodeRange _codeRange; |
4125 List<idl.UnlinkedConstructorInitializer> _constantInitializers; | 4299 List<idl.UnlinkedConstructorInitializer> _constantInitializers; |
| 4300 int _constCycleSlot; |
4126 idl.UnlinkedDocumentationComment _documentationComment; | 4301 idl.UnlinkedDocumentationComment _documentationComment; |
4127 int _inferredReturnTypeSlot; | 4302 int _inferredReturnTypeSlot; |
4128 bool _isAbstract; | 4303 bool _isAbstract; |
4129 bool _isConst; | 4304 bool _isConst; |
4130 bool _isExternal; | 4305 bool _isExternal; |
4131 bool _isFactory; | 4306 bool _isFactory; |
4132 bool _isRedirectedConstructor; | 4307 bool _isRedirectedConstructor; |
4133 bool _isStatic; | 4308 bool _isStatic; |
4134 idl.UnlinkedExecutableKind _kind; | 4309 idl.UnlinkedExecutableKind _kind; |
4135 List<idl.UnlinkedExecutable> _localFunctions; | 4310 List<idl.UnlinkedExecutable> _localFunctions; |
4136 List<idl.UnlinkedLabel> _localLabels; | 4311 List<idl.UnlinkedLabel> _localLabels; |
4137 List<idl.UnlinkedVariable> _localVariables; | 4312 List<idl.UnlinkedVariable> _localVariables; |
4138 String _name; | 4313 String _name; |
4139 int _nameEnd; | 4314 int _nameEnd; |
4140 int _nameOffset; | 4315 int _nameOffset; |
4141 List<idl.UnlinkedParam> _parameters; | 4316 List<idl.UnlinkedParam> _parameters; |
4142 int _periodOffset; | 4317 int _periodOffset; |
4143 idl.EntityRef _redirectedConstructor; | 4318 idl.EntityRef _redirectedConstructor; |
4144 String _redirectedConstructorName; | 4319 String _redirectedConstructorName; |
4145 idl.EntityRef _returnType; | 4320 idl.EntityRef _returnType; |
4146 List<idl.UnlinkedTypeParam> _typeParameters; | 4321 List<idl.UnlinkedTypeParam> _typeParameters; |
4147 int _visibleLength; | 4322 int _visibleLength; |
4148 int _visibleOffset; | 4323 int _visibleOffset; |
4149 int _constCycleSlot; | |
4150 | 4324 |
4151 @override | 4325 @override |
4152 List<idl.UnlinkedConst> get annotations { | 4326 List<idl.UnlinkedConst> get annotations { |
4153 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 6, const <idl.UnlinkedConst>[]); | 4327 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 6, const <idl.UnlinkedConst>[]); |
4154 return _annotations; | 4328 return _annotations; |
4155 } | 4329 } |
4156 | 4330 |
4157 @override | 4331 @override |
| 4332 idl.CodeRange get codeRange { |
| 4333 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 26, null); |
| 4334 return _codeRange; |
| 4335 } |
| 4336 |
| 4337 @override |
4158 List<idl.UnlinkedConstructorInitializer> get constantInitializers { | 4338 List<idl.UnlinkedConstructorInitializer> get constantInitializers { |
4159 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial
izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <i
dl.UnlinkedConstructorInitializer>[]); | 4339 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial
izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <i
dl.UnlinkedConstructorInitializer>[]); |
4160 return _constantInitializers; | 4340 return _constantInitializers; |
4161 } | 4341 } |
4162 | 4342 |
4163 @override | 4343 @override |
| 4344 int get constCycleSlot { |
| 4345 _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0); |
| 4346 return _constCycleSlot; |
| 4347 } |
| 4348 |
| 4349 @override |
4164 idl.UnlinkedDocumentationComment get documentationComment { | 4350 idl.UnlinkedDocumentationComment get documentationComment { |
4165 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 7, null); | 4351 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 7, null); |
4166 return _documentationComment; | 4352 return _documentationComment; |
4167 } | 4353 } |
4168 | 4354 |
4169 @override | 4355 @override |
4170 int get inferredReturnTypeSlot { | 4356 int get inferredReturnTypeSlot { |
4171 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); | 4357 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); |
4172 return _inferredReturnTypeSlot; | 4358 return _inferredReturnTypeSlot; |
4173 } | 4359 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4290 int get visibleLength { | 4476 int get visibleLength { |
4291 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 20, 0); | 4477 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 20, 0); |
4292 return _visibleLength; | 4478 return _visibleLength; |
4293 } | 4479 } |
4294 | 4480 |
4295 @override | 4481 @override |
4296 int get visibleOffset { | 4482 int get visibleOffset { |
4297 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 21, 0); | 4483 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 21, 0); |
4298 return _visibleOffset; | 4484 return _visibleOffset; |
4299 } | 4485 } |
4300 | |
4301 @override | |
4302 int get constCycleSlot { | |
4303 _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0); | |
4304 return _constCycleSlot; | |
4305 } | |
4306 } | 4486 } |
4307 | 4487 |
4308 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { | 4488 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { |
4309 @override | 4489 @override |
4310 Map<String, Object> toJson() { | 4490 Map<String, Object> toJson() { |
4311 Map<String, Object> _result = <String, Object>{}; | 4491 Map<String, Object> _result = <String, Object>{}; |
4312 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 4492 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 4493 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
4313 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const
antInitializers.map((_value) => _value.toJson()).toList(); | 4494 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const
antInitializers.map((_value) => _value.toJson()).toList(); |
| 4495 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot; |
4314 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 4496 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
4315 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre
dReturnTypeSlot; | 4497 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre
dReturnTypeSlot; |
4316 if (isAbstract != false) _result["isAbstract"] = isAbstract; | 4498 if (isAbstract != false) _result["isAbstract"] = isAbstract; |
4317 if (isConst != false) _result["isConst"] = isConst; | 4499 if (isConst != false) _result["isConst"] = isConst; |
4318 if (isExternal != false) _result["isExternal"] = isExternal; | 4500 if (isExternal != false) _result["isExternal"] = isExternal; |
4319 if (isFactory != false) _result["isFactory"] = isFactory; | 4501 if (isFactory != false) _result["isFactory"] = isFactory; |
4320 if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = i
sRedirectedConstructor; | 4502 if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = i
sRedirectedConstructor; |
4321 if (isStatic != false) _result["isStatic"] = isStatic; | 4503 if (isStatic != false) _result["isStatic"] = isStatic; |
4322 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) _result["kind"] = k
ind.toString().split('.')[1]; | 4504 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) _result["kind"] = k
ind.toString().split('.')[1]; |
4323 if (localFunctions.isNotEmpty) _result["localFunctions"] = localFunctions.ma
p((_value) => _value.toJson()).toList(); | 4505 if (localFunctions.isNotEmpty) _result["localFunctions"] = localFunctions.ma
p((_value) => _value.toJson()).toList(); |
4324 if (localLabels.isNotEmpty) _result["localLabels"] = localLabels.map((_value
) => _value.toJson()).toList(); | 4506 if (localLabels.isNotEmpty) _result["localLabels"] = localLabels.map((_value
) => _value.toJson()).toList(); |
4325 if (localVariables.isNotEmpty) _result["localVariables"] = localVariables.ma
p((_value) => _value.toJson()).toList(); | 4507 if (localVariables.isNotEmpty) _result["localVariables"] = localVariables.ma
p((_value) => _value.toJson()).toList(); |
4326 if (name != '') _result["name"] = name; | 4508 if (name != '') _result["name"] = name; |
4327 if (nameEnd != 0) _result["nameEnd"] = nameEnd; | 4509 if (nameEnd != 0) _result["nameEnd"] = nameEnd; |
4328 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 4510 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
4329 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 4511 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); |
4330 if (periodOffset != 0) _result["periodOffset"] = periodOffset; | 4512 if (periodOffset != 0) _result["periodOffset"] = periodOffset; |
4331 if (redirectedConstructor != null) _result["redirectedConstructor"] = redire
ctedConstructor.toJson(); | 4513 if (redirectedConstructor != null) _result["redirectedConstructor"] = redire
ctedConstructor.toJson(); |
4332 if (redirectedConstructorName != '') _result["redirectedConstructorName"] =
redirectedConstructorName; | 4514 if (redirectedConstructorName != '') _result["redirectedConstructorName"] =
redirectedConstructorName; |
4333 if (returnType != null) _result["returnType"] = returnType.toJson(); | 4515 if (returnType != null) _result["returnType"] = returnType.toJson(); |
4334 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 4516 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); |
4335 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 4517 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
4336 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 4518 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
4337 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot; | |
4338 return _result; | 4519 return _result; |
4339 } | 4520 } |
4340 | 4521 |
4341 @override | 4522 @override |
4342 Map<String, Object> toMap() => { | 4523 Map<String, Object> toMap() => { |
4343 "annotations": annotations, | 4524 "annotations": annotations, |
| 4525 "codeRange": codeRange, |
4344 "constantInitializers": constantInitializers, | 4526 "constantInitializers": constantInitializers, |
| 4527 "constCycleSlot": constCycleSlot, |
4345 "documentationComment": documentationComment, | 4528 "documentationComment": documentationComment, |
4346 "inferredReturnTypeSlot": inferredReturnTypeSlot, | 4529 "inferredReturnTypeSlot": inferredReturnTypeSlot, |
4347 "isAbstract": isAbstract, | 4530 "isAbstract": isAbstract, |
4348 "isConst": isConst, | 4531 "isConst": isConst, |
4349 "isExternal": isExternal, | 4532 "isExternal": isExternal, |
4350 "isFactory": isFactory, | 4533 "isFactory": isFactory, |
4351 "isRedirectedConstructor": isRedirectedConstructor, | 4534 "isRedirectedConstructor": isRedirectedConstructor, |
4352 "isStatic": isStatic, | 4535 "isStatic": isStatic, |
4353 "kind": kind, | 4536 "kind": kind, |
4354 "localFunctions": localFunctions, | 4537 "localFunctions": localFunctions, |
4355 "localLabels": localLabels, | 4538 "localLabels": localLabels, |
4356 "localVariables": localVariables, | 4539 "localVariables": localVariables, |
4357 "name": name, | 4540 "name": name, |
4358 "nameEnd": nameEnd, | 4541 "nameEnd": nameEnd, |
4359 "nameOffset": nameOffset, | 4542 "nameOffset": nameOffset, |
4360 "parameters": parameters, | 4543 "parameters": parameters, |
4361 "periodOffset": periodOffset, | 4544 "periodOffset": periodOffset, |
4362 "redirectedConstructor": redirectedConstructor, | 4545 "redirectedConstructor": redirectedConstructor, |
4363 "redirectedConstructorName": redirectedConstructorName, | 4546 "redirectedConstructorName": redirectedConstructorName, |
4364 "returnType": returnType, | 4547 "returnType": returnType, |
4365 "typeParameters": typeParameters, | 4548 "typeParameters": typeParameters, |
4366 "visibleLength": visibleLength, | 4549 "visibleLength": visibleLength, |
4367 "visibleOffset": visibleOffset, | 4550 "visibleOffset": visibleOffset, |
4368 "constCycleSlot": constCycleSlot, | |
4369 }; | 4551 }; |
4370 | 4552 |
4371 @override | 4553 @override |
4372 String toString() => convert.JSON.encode(toJson()); | 4554 String toString() => convert.JSON.encode(toJson()); |
4373 } | 4555 } |
4374 | 4556 |
4375 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { | 4557 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { |
4376 bool _finished = false; | 4558 bool _finished = false; |
4377 | 4559 |
4378 List<UnlinkedConstBuilder> _annotations; | 4560 List<UnlinkedConstBuilder> _annotations; |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5088 }; | 5270 }; |
5089 | 5271 |
5090 @override | 5272 @override |
5091 String toString() => convert.JSON.encode(toJson()); | 5273 String toString() => convert.JSON.encode(toJson()); |
5092 } | 5274 } |
5093 | 5275 |
5094 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { | 5276 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { |
5095 bool _finished = false; | 5277 bool _finished = false; |
5096 | 5278 |
5097 List<UnlinkedConstBuilder> _annotations; | 5279 List<UnlinkedConstBuilder> _annotations; |
| 5280 CodeRangeBuilder _codeRange; |
5098 UnlinkedConstBuilder _defaultValue; | 5281 UnlinkedConstBuilder _defaultValue; |
5099 String _defaultValueCode; | 5282 String _defaultValueCode; |
5100 int _inferredTypeSlot; | 5283 int _inferredTypeSlot; |
5101 UnlinkedExecutableBuilder _initializer; | 5284 UnlinkedExecutableBuilder _initializer; |
5102 bool _isFunctionTyped; | 5285 bool _isFunctionTyped; |
5103 bool _isInitializingFormal; | 5286 bool _isInitializingFormal; |
5104 idl.UnlinkedParamKind _kind; | 5287 idl.UnlinkedParamKind _kind; |
5105 String _name; | 5288 String _name; |
5106 int _nameOffset; | 5289 int _nameOffset; |
5107 List<UnlinkedParamBuilder> _parameters; | 5290 List<UnlinkedParamBuilder> _parameters; |
5108 EntityRefBuilder _type; | 5291 EntityRefBuilder _type; |
5109 int _visibleLength; | 5292 int _visibleLength; |
5110 int _visibleOffset; | 5293 int _visibleOffset; |
5111 | 5294 |
5112 @override | 5295 @override |
5113 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 5296 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
5114 | 5297 |
5115 /** | 5298 /** |
5116 * Annotations for this parameter. | 5299 * Annotations for this parameter. |
5117 */ | 5300 */ |
5118 void set annotations(List<UnlinkedConstBuilder> _value) { | 5301 void set annotations(List<UnlinkedConstBuilder> _value) { |
5119 assert(!_finished); | 5302 assert(!_finished); |
5120 _annotations = _value; | 5303 _annotations = _value; |
5121 } | 5304 } |
5122 | 5305 |
5123 @override | 5306 @override |
| 5307 CodeRangeBuilder get codeRange => _codeRange; |
| 5308 |
| 5309 /** |
| 5310 * Code range of the parameter. |
| 5311 */ |
| 5312 void set codeRange(CodeRangeBuilder _value) { |
| 5313 assert(!_finished); |
| 5314 _codeRange = _value; |
| 5315 } |
| 5316 |
| 5317 @override |
5124 UnlinkedConstBuilder get defaultValue => _defaultValue; | 5318 UnlinkedConstBuilder get defaultValue => _defaultValue; |
5125 | 5319 |
5126 /** | 5320 /** |
5127 * If the parameter has a default value, the constant expression in the | 5321 * If the parameter has a default value, the constant expression in the |
5128 * default value. Note that the presence of this expression does not mean | 5322 * default value. Note that the presence of this expression does not mean |
5129 * that it is a valid, check [UnlinkedConst.isInvalid]. | 5323 * that it is a valid, check [UnlinkedConst.isInvalid]. |
5130 */ | 5324 */ |
5131 void set defaultValue(UnlinkedConstBuilder _value) { | 5325 void set defaultValue(UnlinkedConstBuilder _value) { |
5132 assert(!_finished); | 5326 assert(!_finished); |
5133 _defaultValue = _value; | 5327 _defaultValue = _value; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5275 | 5469 |
5276 /** | 5470 /** |
5277 * The beginning of the visible range. | 5471 * The beginning of the visible range. |
5278 */ | 5472 */ |
5279 void set visibleOffset(int _value) { | 5473 void set visibleOffset(int _value) { |
5280 assert(!_finished); | 5474 assert(!_finished); |
5281 assert(_value == null || _value >= 0); | 5475 assert(_value == null || _value >= 0); |
5282 _visibleOffset = _value; | 5476 _visibleOffset = _value; |
5283 } | 5477 } |
5284 | 5478 |
5285 UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBui
lder defaultValue, String defaultValueCode, int inferredTypeSlot, UnlinkedExecut
ableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.Un
linkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> pa
rameters, EntityRefBuilder type, int visibleLength, int visibleOffset}) | 5479 UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder
codeRange, UnlinkedConstBuilder defaultValue, String defaultValueCode, int infe
rredTypeSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool
isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, L
ist<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength,
int visibleOffset}) |
5286 : _annotations = annotations, | 5480 : _annotations = annotations, |
| 5481 _codeRange = codeRange, |
5287 _defaultValue = defaultValue, | 5482 _defaultValue = defaultValue, |
5288 _defaultValueCode = defaultValueCode, | 5483 _defaultValueCode = defaultValueCode, |
5289 _inferredTypeSlot = inferredTypeSlot, | 5484 _inferredTypeSlot = inferredTypeSlot, |
5290 _initializer = initializer, | 5485 _initializer = initializer, |
5291 _isFunctionTyped = isFunctionTyped, | 5486 _isFunctionTyped = isFunctionTyped, |
5292 _isInitializingFormal = isInitializingFormal, | 5487 _isInitializingFormal = isInitializingFormal, |
5293 _kind = kind, | 5488 _kind = kind, |
5294 _name = name, | 5489 _name = name, |
5295 _nameOffset = nameOffset, | 5490 _nameOffset = nameOffset, |
5296 _parameters = parameters, | 5491 _parameters = parameters, |
5297 _type = type, | 5492 _type = type, |
5298 _visibleLength = visibleLength, | 5493 _visibleLength = visibleLength, |
5299 _visibleOffset = visibleOffset; | 5494 _visibleOffset = visibleOffset; |
5300 | 5495 |
5301 fb.Offset finish(fb.Builder fbBuilder) { | 5496 fb.Offset finish(fb.Builder fbBuilder) { |
5302 assert(!_finished); | 5497 assert(!_finished); |
5303 _finished = true; | 5498 _finished = true; |
5304 fb.Offset offset_annotations; | 5499 fb.Offset offset_annotations; |
| 5500 fb.Offset offset_codeRange; |
5305 fb.Offset offset_defaultValue; | 5501 fb.Offset offset_defaultValue; |
5306 fb.Offset offset_defaultValueCode; | 5502 fb.Offset offset_defaultValueCode; |
5307 fb.Offset offset_initializer; | 5503 fb.Offset offset_initializer; |
5308 fb.Offset offset_name; | 5504 fb.Offset offset_name; |
5309 fb.Offset offset_parameters; | 5505 fb.Offset offset_parameters; |
5310 fb.Offset offset_type; | 5506 fb.Offset offset_type; |
5311 if (!(_annotations == null || _annotations.isEmpty)) { | 5507 if (!(_annotations == null || _annotations.isEmpty)) { |
5312 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 5508 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
5313 } | 5509 } |
| 5510 if (_codeRange != null) { |
| 5511 offset_codeRange = _codeRange.finish(fbBuilder); |
| 5512 } |
5314 if (_defaultValue != null) { | 5513 if (_defaultValue != null) { |
5315 offset_defaultValue = _defaultValue.finish(fbBuilder); | 5514 offset_defaultValue = _defaultValue.finish(fbBuilder); |
5316 } | 5515 } |
5317 if (_defaultValueCode != null) { | 5516 if (_defaultValueCode != null) { |
5318 offset_defaultValueCode = fbBuilder.writeString(_defaultValueCode); | 5517 offset_defaultValueCode = fbBuilder.writeString(_defaultValueCode); |
5319 } | 5518 } |
5320 if (_initializer != null) { | 5519 if (_initializer != null) { |
5321 offset_initializer = _initializer.finish(fbBuilder); | 5520 offset_initializer = _initializer.finish(fbBuilder); |
5322 } | 5521 } |
5323 if (_name != null) { | 5522 if (_name != null) { |
5324 offset_name = fbBuilder.writeString(_name); | 5523 offset_name = fbBuilder.writeString(_name); |
5325 } | 5524 } |
5326 if (!(_parameters == null || _parameters.isEmpty)) { | 5525 if (!(_parameters == null || _parameters.isEmpty)) { |
5327 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 5526 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); |
5328 } | 5527 } |
5329 if (_type != null) { | 5528 if (_type != null) { |
5330 offset_type = _type.finish(fbBuilder); | 5529 offset_type = _type.finish(fbBuilder); |
5331 } | 5530 } |
5332 fbBuilder.startTable(); | 5531 fbBuilder.startTable(); |
5333 if (offset_annotations != null) { | 5532 if (offset_annotations != null) { |
5334 fbBuilder.addOffset(9, offset_annotations); | 5533 fbBuilder.addOffset(9, offset_annotations); |
5335 } | 5534 } |
| 5535 if (offset_codeRange != null) { |
| 5536 fbBuilder.addOffset(14, offset_codeRange); |
| 5537 } |
5336 if (offset_defaultValue != null) { | 5538 if (offset_defaultValue != null) { |
5337 fbBuilder.addOffset(7, offset_defaultValue); | 5539 fbBuilder.addOffset(7, offset_defaultValue); |
5338 } | 5540 } |
5339 if (offset_defaultValueCode != null) { | 5541 if (offset_defaultValueCode != null) { |
5340 fbBuilder.addOffset(13, offset_defaultValueCode); | 5542 fbBuilder.addOffset(13, offset_defaultValueCode); |
5341 } | 5543 } |
5342 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | 5544 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
5343 fbBuilder.addUint32(2, _inferredTypeSlot); | 5545 fbBuilder.addUint32(2, _inferredTypeSlot); |
5344 } | 5546 } |
5345 if (offset_initializer != null) { | 5547 if (offset_initializer != null) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5382 @override | 5584 @override |
5383 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); | 5585 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); |
5384 } | 5586 } |
5385 | 5587 |
5386 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { | 5588 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { |
5387 final fb.BufferPointer _bp; | 5589 final fb.BufferPointer _bp; |
5388 | 5590 |
5389 _UnlinkedParamImpl(this._bp); | 5591 _UnlinkedParamImpl(this._bp); |
5390 | 5592 |
5391 List<idl.UnlinkedConst> _annotations; | 5593 List<idl.UnlinkedConst> _annotations; |
| 5594 idl.CodeRange _codeRange; |
5392 idl.UnlinkedConst _defaultValue; | 5595 idl.UnlinkedConst _defaultValue; |
5393 String _defaultValueCode; | 5596 String _defaultValueCode; |
5394 int _inferredTypeSlot; | 5597 int _inferredTypeSlot; |
5395 idl.UnlinkedExecutable _initializer; | 5598 idl.UnlinkedExecutable _initializer; |
5396 bool _isFunctionTyped; | 5599 bool _isFunctionTyped; |
5397 bool _isInitializingFormal; | 5600 bool _isInitializingFormal; |
5398 idl.UnlinkedParamKind _kind; | 5601 idl.UnlinkedParamKind _kind; |
5399 String _name; | 5602 String _name; |
5400 int _nameOffset; | 5603 int _nameOffset; |
5401 List<idl.UnlinkedParam> _parameters; | 5604 List<idl.UnlinkedParam> _parameters; |
5402 idl.EntityRef _type; | 5605 idl.EntityRef _type; |
5403 int _visibleLength; | 5606 int _visibleLength; |
5404 int _visibleOffset; | 5607 int _visibleOffset; |
5405 | 5608 |
5406 @override | 5609 @override |
5407 List<idl.UnlinkedConst> get annotations { | 5610 List<idl.UnlinkedConst> get annotations { |
5408 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]); | 5611 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]); |
5409 return _annotations; | 5612 return _annotations; |
5410 } | 5613 } |
5411 | 5614 |
5412 @override | 5615 @override |
| 5616 idl.CodeRange get codeRange { |
| 5617 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null); |
| 5618 return _codeRange; |
| 5619 } |
| 5620 |
| 5621 @override |
5413 idl.UnlinkedConst get defaultValue { | 5622 idl.UnlinkedConst get defaultValue { |
5414 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null); | 5623 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null); |
5415 return _defaultValue; | 5624 return _defaultValue; |
5416 } | 5625 } |
5417 | 5626 |
5418 @override | 5627 @override |
5419 String get defaultValueCode { | 5628 String get defaultValueCode { |
5420 _defaultValueCode ??= const fb.StringReader().vTableGet(_bp, 13, ''); | 5629 _defaultValueCode ??= const fb.StringReader().vTableGet(_bp, 13, ''); |
5421 return _defaultValueCode; | 5630 return _defaultValueCode; |
5422 } | 5631 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5486 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0); | 5695 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0); |
5487 return _visibleOffset; | 5696 return _visibleOffset; |
5488 } | 5697 } |
5489 } | 5698 } |
5490 | 5699 |
5491 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { | 5700 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { |
5492 @override | 5701 @override |
5493 Map<String, Object> toJson() { | 5702 Map<String, Object> toJson() { |
5494 Map<String, Object> _result = <String, Object>{}; | 5703 Map<String, Object> _result = <String, Object>{}; |
5495 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 5704 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 5705 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
5496 if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson(); | 5706 if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson(); |
5497 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; | 5707 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; |
5498 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; | 5708 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; |
5499 if (initializer != null) _result["initializer"] = initializer.toJson(); | 5709 if (initializer != null) _result["initializer"] = initializer.toJson(); |
5500 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; | 5710 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; |
5501 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti
alizingFormal; | 5711 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti
alizingFormal; |
5502 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString(
).split('.')[1]; | 5712 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString(
).split('.')[1]; |
5503 if (name != '') _result["name"] = name; | 5713 if (name != '') _result["name"] = name; |
5504 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 5714 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
5505 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 5715 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); |
5506 if (type != null) _result["type"] = type.toJson(); | 5716 if (type != null) _result["type"] = type.toJson(); |
5507 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 5717 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
5508 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 5718 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
5509 return _result; | 5719 return _result; |
5510 } | 5720 } |
5511 | 5721 |
5512 @override | 5722 @override |
5513 Map<String, Object> toMap() => { | 5723 Map<String, Object> toMap() => { |
5514 "annotations": annotations, | 5724 "annotations": annotations, |
| 5725 "codeRange": codeRange, |
5515 "defaultValue": defaultValue, | 5726 "defaultValue": defaultValue, |
5516 "defaultValueCode": defaultValueCode, | 5727 "defaultValueCode": defaultValueCode, |
5517 "inferredTypeSlot": inferredTypeSlot, | 5728 "inferredTypeSlot": inferredTypeSlot, |
5518 "initializer": initializer, | 5729 "initializer": initializer, |
5519 "isFunctionTyped": isFunctionTyped, | 5730 "isFunctionTyped": isFunctionTyped, |
5520 "isInitializingFormal": isInitializingFormal, | 5731 "isInitializingFormal": isInitializingFormal, |
5521 "kind": kind, | 5732 "kind": kind, |
5522 "name": name, | 5733 "name": name, |
5523 "nameOffset": nameOffset, | 5734 "nameOffset": nameOffset, |
5524 "parameters": parameters, | 5735 "parameters": parameters, |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6060 }; | 6271 }; |
6061 | 6272 |
6062 @override | 6273 @override |
6063 String toString() => convert.JSON.encode(toJson()); | 6274 String toString() => convert.JSON.encode(toJson()); |
6064 } | 6275 } |
6065 | 6276 |
6066 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { | 6277 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { |
6067 bool _finished = false; | 6278 bool _finished = false; |
6068 | 6279 |
6069 List<UnlinkedConstBuilder> _annotations; | 6280 List<UnlinkedConstBuilder> _annotations; |
| 6281 CodeRangeBuilder _codeRange; |
6070 UnlinkedDocumentationCommentBuilder _documentationComment; | 6282 UnlinkedDocumentationCommentBuilder _documentationComment; |
6071 String _name; | 6283 String _name; |
6072 int _nameOffset; | 6284 int _nameOffset; |
6073 List<UnlinkedParamBuilder> _parameters; | 6285 List<UnlinkedParamBuilder> _parameters; |
6074 EntityRefBuilder _returnType; | 6286 EntityRefBuilder _returnType; |
6075 List<UnlinkedTypeParamBuilder> _typeParameters; | 6287 List<UnlinkedTypeParamBuilder> _typeParameters; |
6076 | 6288 |
6077 @override | 6289 @override |
6078 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 6290 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
6079 | 6291 |
6080 /** | 6292 /** |
6081 * Annotations for this typedef. | 6293 * Annotations for this typedef. |
6082 */ | 6294 */ |
6083 void set annotations(List<UnlinkedConstBuilder> _value) { | 6295 void set annotations(List<UnlinkedConstBuilder> _value) { |
6084 assert(!_finished); | 6296 assert(!_finished); |
6085 _annotations = _value; | 6297 _annotations = _value; |
6086 } | 6298 } |
6087 | 6299 |
6088 @override | 6300 @override |
| 6301 CodeRangeBuilder get codeRange => _codeRange; |
| 6302 |
| 6303 /** |
| 6304 * Code range of the typedef. |
| 6305 */ |
| 6306 void set codeRange(CodeRangeBuilder _value) { |
| 6307 assert(!_finished); |
| 6308 _codeRange = _value; |
| 6309 } |
| 6310 |
| 6311 @override |
6089 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 6312 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
6090 | 6313 |
6091 /** | 6314 /** |
6092 * Documentation comment for the typedef, or `null` if there is no | 6315 * Documentation comment for the typedef, or `null` if there is no |
6093 * documentation comment. | 6316 * documentation comment. |
6094 */ | 6317 */ |
6095 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 6318 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
6096 assert(!_finished); | 6319 assert(!_finished); |
6097 _documentationComment = _value; | 6320 _documentationComment = _value; |
6098 } | 6321 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6146 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 6369 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
6147 | 6370 |
6148 /** | 6371 /** |
6149 * Type parameters of the typedef, if any. | 6372 * Type parameters of the typedef, if any. |
6150 */ | 6373 */ |
6151 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 6374 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
6152 assert(!_finished); | 6375 assert(!_finished); |
6153 _typeParameters = _value; | 6376 _typeParameters = _value; |
6154 } | 6377 } |
6155 | 6378 |
6156 UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocume
ntationCommentBuilder documentationComment, String name, int nameOffset, List<Un
linkedParamBuilder> parameters, EntityRefBuilder returnType, List<UnlinkedTypePa
ramBuilder> typeParameters}) | 6379 UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuild
er codeRange, UnlinkedDocumentationCommentBuilder documentationComment, String n
ame, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder ret
urnType, List<UnlinkedTypeParamBuilder> typeParameters}) |
6157 : _annotations = annotations, | 6380 : _annotations = annotations, |
| 6381 _codeRange = codeRange, |
6158 _documentationComment = documentationComment, | 6382 _documentationComment = documentationComment, |
6159 _name = name, | 6383 _name = name, |
6160 _nameOffset = nameOffset, | 6384 _nameOffset = nameOffset, |
6161 _parameters = parameters, | 6385 _parameters = parameters, |
6162 _returnType = returnType, | 6386 _returnType = returnType, |
6163 _typeParameters = typeParameters; | 6387 _typeParameters = typeParameters; |
6164 | 6388 |
6165 fb.Offset finish(fb.Builder fbBuilder) { | 6389 fb.Offset finish(fb.Builder fbBuilder) { |
6166 assert(!_finished); | 6390 assert(!_finished); |
6167 _finished = true; | 6391 _finished = true; |
6168 fb.Offset offset_annotations; | 6392 fb.Offset offset_annotations; |
| 6393 fb.Offset offset_codeRange; |
6169 fb.Offset offset_documentationComment; | 6394 fb.Offset offset_documentationComment; |
6170 fb.Offset offset_name; | 6395 fb.Offset offset_name; |
6171 fb.Offset offset_parameters; | 6396 fb.Offset offset_parameters; |
6172 fb.Offset offset_returnType; | 6397 fb.Offset offset_returnType; |
6173 fb.Offset offset_typeParameters; | 6398 fb.Offset offset_typeParameters; |
6174 if (!(_annotations == null || _annotations.isEmpty)) { | 6399 if (!(_annotations == null || _annotations.isEmpty)) { |
6175 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 6400 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
6176 } | 6401 } |
| 6402 if (_codeRange != null) { |
| 6403 offset_codeRange = _codeRange.finish(fbBuilder); |
| 6404 } |
6177 if (_documentationComment != null) { | 6405 if (_documentationComment != null) { |
6178 offset_documentationComment = _documentationComment.finish(fbBuilder); | 6406 offset_documentationComment = _documentationComment.finish(fbBuilder); |
6179 } | 6407 } |
6180 if (_name != null) { | 6408 if (_name != null) { |
6181 offset_name = fbBuilder.writeString(_name); | 6409 offset_name = fbBuilder.writeString(_name); |
6182 } | 6410 } |
6183 if (!(_parameters == null || _parameters.isEmpty)) { | 6411 if (!(_parameters == null || _parameters.isEmpty)) { |
6184 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 6412 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); |
6185 } | 6413 } |
6186 if (_returnType != null) { | 6414 if (_returnType != null) { |
6187 offset_returnType = _returnType.finish(fbBuilder); | 6415 offset_returnType = _returnType.finish(fbBuilder); |
6188 } | 6416 } |
6189 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 6417 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
6190 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 6418 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
6191 } | 6419 } |
6192 fbBuilder.startTable(); | 6420 fbBuilder.startTable(); |
6193 if (offset_annotations != null) { | 6421 if (offset_annotations != null) { |
6194 fbBuilder.addOffset(4, offset_annotations); | 6422 fbBuilder.addOffset(4, offset_annotations); |
6195 } | 6423 } |
| 6424 if (offset_codeRange != null) { |
| 6425 fbBuilder.addOffset(7, offset_codeRange); |
| 6426 } |
6196 if (offset_documentationComment != null) { | 6427 if (offset_documentationComment != null) { |
6197 fbBuilder.addOffset(6, offset_documentationComment); | 6428 fbBuilder.addOffset(6, offset_documentationComment); |
6198 } | 6429 } |
6199 if (offset_name != null) { | 6430 if (offset_name != null) { |
6200 fbBuilder.addOffset(0, offset_name); | 6431 fbBuilder.addOffset(0, offset_name); |
6201 } | 6432 } |
6202 if (_nameOffset != null && _nameOffset != 0) { | 6433 if (_nameOffset != null && _nameOffset != 0) { |
6203 fbBuilder.addUint32(1, _nameOffset); | 6434 fbBuilder.addUint32(1, _nameOffset); |
6204 } | 6435 } |
6205 if (offset_parameters != null) { | 6436 if (offset_parameters != null) { |
(...skipping 15 matching lines...) Expand all Loading... |
6221 @override | 6452 @override |
6222 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); | 6453 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); |
6223 } | 6454 } |
6224 | 6455 |
6225 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { | 6456 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { |
6226 final fb.BufferPointer _bp; | 6457 final fb.BufferPointer _bp; |
6227 | 6458 |
6228 _UnlinkedTypedefImpl(this._bp); | 6459 _UnlinkedTypedefImpl(this._bp); |
6229 | 6460 |
6230 List<idl.UnlinkedConst> _annotations; | 6461 List<idl.UnlinkedConst> _annotations; |
| 6462 idl.CodeRange _codeRange; |
6231 idl.UnlinkedDocumentationComment _documentationComment; | 6463 idl.UnlinkedDocumentationComment _documentationComment; |
6232 String _name; | 6464 String _name; |
6233 int _nameOffset; | 6465 int _nameOffset; |
6234 List<idl.UnlinkedParam> _parameters; | 6466 List<idl.UnlinkedParam> _parameters; |
6235 idl.EntityRef _returnType; | 6467 idl.EntityRef _returnType; |
6236 List<idl.UnlinkedTypeParam> _typeParameters; | 6468 List<idl.UnlinkedTypeParam> _typeParameters; |
6237 | 6469 |
6238 @override | 6470 @override |
6239 List<idl.UnlinkedConst> get annotations { | 6471 List<idl.UnlinkedConst> get annotations { |
6240 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); | 6472 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); |
6241 return _annotations; | 6473 return _annotations; |
6242 } | 6474 } |
6243 | 6475 |
6244 @override | 6476 @override |
| 6477 idl.CodeRange get codeRange { |
| 6478 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 7, null); |
| 6479 return _codeRange; |
| 6480 } |
| 6481 |
| 6482 @override |
6245 idl.UnlinkedDocumentationComment get documentationComment { | 6483 idl.UnlinkedDocumentationComment get documentationComment { |
6246 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); | 6484 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); |
6247 return _documentationComment; | 6485 return _documentationComment; |
6248 } | 6486 } |
6249 | 6487 |
6250 @override | 6488 @override |
6251 String get name { | 6489 String get name { |
6252 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 6490 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
6253 return _name; | 6491 return _name; |
6254 } | 6492 } |
(...skipping 21 matching lines...) Expand all Loading... |
6276 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 5, const <idl.UnlinkedTypeParam>[]); | 6514 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 5, const <idl.UnlinkedTypeParam>[]); |
6277 return _typeParameters; | 6515 return _typeParameters; |
6278 } | 6516 } |
6279 } | 6517 } |
6280 | 6518 |
6281 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { | 6519 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { |
6282 @override | 6520 @override |
6283 Map<String, Object> toJson() { | 6521 Map<String, Object> toJson() { |
6284 Map<String, Object> _result = <String, Object>{}; | 6522 Map<String, Object> _result = <String, Object>{}; |
6285 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 6523 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 6524 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
6286 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 6525 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
6287 if (name != '') _result["name"] = name; | 6526 if (name != '') _result["name"] = name; |
6288 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 6527 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
6289 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 6528 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); |
6290 if (returnType != null) _result["returnType"] = returnType.toJson(); | 6529 if (returnType != null) _result["returnType"] = returnType.toJson(); |
6291 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 6530 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); |
6292 return _result; | 6531 return _result; |
6293 } | 6532 } |
6294 | 6533 |
6295 @override | 6534 @override |
6296 Map<String, Object> toMap() => { | 6535 Map<String, Object> toMap() => { |
6297 "annotations": annotations, | 6536 "annotations": annotations, |
| 6537 "codeRange": codeRange, |
6298 "documentationComment": documentationComment, | 6538 "documentationComment": documentationComment, |
6299 "name": name, | 6539 "name": name, |
6300 "nameOffset": nameOffset, | 6540 "nameOffset": nameOffset, |
6301 "parameters": parameters, | 6541 "parameters": parameters, |
6302 "returnType": returnType, | 6542 "returnType": returnType, |
6303 "typeParameters": typeParameters, | 6543 "typeParameters": typeParameters, |
6304 }; | 6544 }; |
6305 | 6545 |
6306 @override | 6546 @override |
6307 String toString() => convert.JSON.encode(toJson()); | 6547 String toString() => convert.JSON.encode(toJson()); |
6308 } | 6548 } |
6309 | 6549 |
6310 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { | 6550 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { |
6311 bool _finished = false; | 6551 bool _finished = false; |
6312 | 6552 |
6313 List<UnlinkedConstBuilder> _annotations; | 6553 List<UnlinkedConstBuilder> _annotations; |
6314 EntityRefBuilder _bound; | 6554 EntityRefBuilder _bound; |
| 6555 CodeRangeBuilder _codeRange; |
6315 String _name; | 6556 String _name; |
6316 int _nameOffset; | 6557 int _nameOffset; |
6317 | 6558 |
6318 @override | 6559 @override |
6319 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 6560 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
6320 | 6561 |
6321 /** | 6562 /** |
6322 * Annotations for this type parameter. | 6563 * Annotations for this type parameter. |
6323 */ | 6564 */ |
6324 void set annotations(List<UnlinkedConstBuilder> _value) { | 6565 void set annotations(List<UnlinkedConstBuilder> _value) { |
6325 assert(!_finished); | 6566 assert(!_finished); |
6326 _annotations = _value; | 6567 _annotations = _value; |
6327 } | 6568 } |
6328 | 6569 |
6329 @override | 6570 @override |
6330 EntityRefBuilder get bound => _bound; | 6571 EntityRefBuilder get bound => _bound; |
6331 | 6572 |
6332 /** | 6573 /** |
6333 * Bound of the type parameter, if a bound is explicitly declared. Otherwise | 6574 * Bound of the type parameter, if a bound is explicitly declared. Otherwise |
6334 * null. | 6575 * null. |
6335 */ | 6576 */ |
6336 void set bound(EntityRefBuilder _value) { | 6577 void set bound(EntityRefBuilder _value) { |
6337 assert(!_finished); | 6578 assert(!_finished); |
6338 _bound = _value; | 6579 _bound = _value; |
6339 } | 6580 } |
6340 | 6581 |
6341 @override | 6582 @override |
| 6583 CodeRangeBuilder get codeRange => _codeRange; |
| 6584 |
| 6585 /** |
| 6586 * Code range of the type parameter. |
| 6587 */ |
| 6588 void set codeRange(CodeRangeBuilder _value) { |
| 6589 assert(!_finished); |
| 6590 _codeRange = _value; |
| 6591 } |
| 6592 |
| 6593 @override |
6342 String get name => _name ??= ''; | 6594 String get name => _name ??= ''; |
6343 | 6595 |
6344 /** | 6596 /** |
6345 * Name of the type parameter. | 6597 * Name of the type parameter. |
6346 */ | 6598 */ |
6347 void set name(String _value) { | 6599 void set name(String _value) { |
6348 assert(!_finished); | 6600 assert(!_finished); |
6349 _name = _value; | 6601 _name = _value; |
6350 } | 6602 } |
6351 | 6603 |
6352 @override | 6604 @override |
6353 int get nameOffset => _nameOffset ??= 0; | 6605 int get nameOffset => _nameOffset ??= 0; |
6354 | 6606 |
6355 /** | 6607 /** |
6356 * Offset of the type parameter name relative to the beginning of the file. | 6608 * Offset of the type parameter name relative to the beginning of the file. |
6357 */ | 6609 */ |
6358 void set nameOffset(int _value) { | 6610 void set nameOffset(int _value) { |
6359 assert(!_finished); | 6611 assert(!_finished); |
6360 assert(_value == null || _value >= 0); | 6612 assert(_value == null || _value >= 0); |
6361 _nameOffset = _value; | 6613 _nameOffset = _value; |
6362 } | 6614 } |
6363 | 6615 |
6364 UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBui
lder bound, String name, int nameOffset}) | 6616 UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBui
lder bound, CodeRangeBuilder codeRange, String name, int nameOffset}) |
6365 : _annotations = annotations, | 6617 : _annotations = annotations, |
6366 _bound = bound, | 6618 _bound = bound, |
| 6619 _codeRange = codeRange, |
6367 _name = name, | 6620 _name = name, |
6368 _nameOffset = nameOffset; | 6621 _nameOffset = nameOffset; |
6369 | 6622 |
6370 fb.Offset finish(fb.Builder fbBuilder) { | 6623 fb.Offset finish(fb.Builder fbBuilder) { |
6371 assert(!_finished); | 6624 assert(!_finished); |
6372 _finished = true; | 6625 _finished = true; |
6373 fb.Offset offset_annotations; | 6626 fb.Offset offset_annotations; |
6374 fb.Offset offset_bound; | 6627 fb.Offset offset_bound; |
| 6628 fb.Offset offset_codeRange; |
6375 fb.Offset offset_name; | 6629 fb.Offset offset_name; |
6376 if (!(_annotations == null || _annotations.isEmpty)) { | 6630 if (!(_annotations == null || _annotations.isEmpty)) { |
6377 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 6631 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
6378 } | 6632 } |
6379 if (_bound != null) { | 6633 if (_bound != null) { |
6380 offset_bound = _bound.finish(fbBuilder); | 6634 offset_bound = _bound.finish(fbBuilder); |
6381 } | 6635 } |
| 6636 if (_codeRange != null) { |
| 6637 offset_codeRange = _codeRange.finish(fbBuilder); |
| 6638 } |
6382 if (_name != null) { | 6639 if (_name != null) { |
6383 offset_name = fbBuilder.writeString(_name); | 6640 offset_name = fbBuilder.writeString(_name); |
6384 } | 6641 } |
6385 fbBuilder.startTable(); | 6642 fbBuilder.startTable(); |
6386 if (offset_annotations != null) { | 6643 if (offset_annotations != null) { |
6387 fbBuilder.addOffset(3, offset_annotations); | 6644 fbBuilder.addOffset(3, offset_annotations); |
6388 } | 6645 } |
6389 if (offset_bound != null) { | 6646 if (offset_bound != null) { |
6390 fbBuilder.addOffset(2, offset_bound); | 6647 fbBuilder.addOffset(2, offset_bound); |
6391 } | 6648 } |
| 6649 if (offset_codeRange != null) { |
| 6650 fbBuilder.addOffset(4, offset_codeRange); |
| 6651 } |
6392 if (offset_name != null) { | 6652 if (offset_name != null) { |
6393 fbBuilder.addOffset(0, offset_name); | 6653 fbBuilder.addOffset(0, offset_name); |
6394 } | 6654 } |
6395 if (_nameOffset != null && _nameOffset != 0) { | 6655 if (_nameOffset != null && _nameOffset != 0) { |
6396 fbBuilder.addUint32(1, _nameOffset); | 6656 fbBuilder.addUint32(1, _nameOffset); |
6397 } | 6657 } |
6398 return fbBuilder.endTable(); | 6658 return fbBuilder.endTable(); |
6399 } | 6659 } |
6400 } | 6660 } |
6401 | 6661 |
6402 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { | 6662 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { |
6403 const _UnlinkedTypeParamReader(); | 6663 const _UnlinkedTypeParamReader(); |
6404 | 6664 |
6405 @override | 6665 @override |
6406 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); | 6666 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); |
6407 } | 6667 } |
6408 | 6668 |
6409 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { | 6669 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { |
6410 final fb.BufferPointer _bp; | 6670 final fb.BufferPointer _bp; |
6411 | 6671 |
6412 _UnlinkedTypeParamImpl(this._bp); | 6672 _UnlinkedTypeParamImpl(this._bp); |
6413 | 6673 |
6414 List<idl.UnlinkedConst> _annotations; | 6674 List<idl.UnlinkedConst> _annotations; |
6415 idl.EntityRef _bound; | 6675 idl.EntityRef _bound; |
| 6676 idl.CodeRange _codeRange; |
6416 String _name; | 6677 String _name; |
6417 int _nameOffset; | 6678 int _nameOffset; |
6418 | 6679 |
6419 @override | 6680 @override |
6420 List<idl.UnlinkedConst> get annotations { | 6681 List<idl.UnlinkedConst> get annotations { |
6421 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | 6682 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); |
6422 return _annotations; | 6683 return _annotations; |
6423 } | 6684 } |
6424 | 6685 |
6425 @override | 6686 @override |
6426 idl.EntityRef get bound { | 6687 idl.EntityRef get bound { |
6427 _bound ??= const _EntityRefReader().vTableGet(_bp, 2, null); | 6688 _bound ??= const _EntityRefReader().vTableGet(_bp, 2, null); |
6428 return _bound; | 6689 return _bound; |
6429 } | 6690 } |
6430 | 6691 |
6431 @override | 6692 @override |
| 6693 idl.CodeRange get codeRange { |
| 6694 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 4, null); |
| 6695 return _codeRange; |
| 6696 } |
| 6697 |
| 6698 @override |
6432 String get name { | 6699 String get name { |
6433 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 6700 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
6434 return _name; | 6701 return _name; |
6435 } | 6702 } |
6436 | 6703 |
6437 @override | 6704 @override |
6438 int get nameOffset { | 6705 int get nameOffset { |
6439 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 6706 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
6440 return _nameOffset; | 6707 return _nameOffset; |
6441 } | 6708 } |
6442 } | 6709 } |
6443 | 6710 |
6444 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { | 6711 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { |
6445 @override | 6712 @override |
6446 Map<String, Object> toJson() { | 6713 Map<String, Object> toJson() { |
6447 Map<String, Object> _result = <String, Object>{}; | 6714 Map<String, Object> _result = <String, Object>{}; |
6448 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 6715 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
6449 if (bound != null) _result["bound"] = bound.toJson(); | 6716 if (bound != null) _result["bound"] = bound.toJson(); |
| 6717 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
6450 if (name != '') _result["name"] = name; | 6718 if (name != '') _result["name"] = name; |
6451 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 6719 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
6452 return _result; | 6720 return _result; |
6453 } | 6721 } |
6454 | 6722 |
6455 @override | 6723 @override |
6456 Map<String, Object> toMap() => { | 6724 Map<String, Object> toMap() => { |
6457 "annotations": annotations, | 6725 "annotations": annotations, |
6458 "bound": bound, | 6726 "bound": bound, |
| 6727 "codeRange": codeRange, |
6459 "name": name, | 6728 "name": name, |
6460 "nameOffset": nameOffset, | 6729 "nameOffset": nameOffset, |
6461 }; | 6730 }; |
6462 | 6731 |
6463 @override | 6732 @override |
6464 String toString() => convert.JSON.encode(toJson()); | 6733 String toString() => convert.JSON.encode(toJson()); |
6465 } | 6734 } |
6466 | 6735 |
6467 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { | 6736 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { |
6468 bool _finished = false; | 6737 bool _finished = false; |
6469 | 6738 |
6470 List<UnlinkedClassBuilder> _classes; | 6739 List<UnlinkedClassBuilder> _classes; |
| 6740 CodeRangeBuilder _codeRange; |
6471 List<UnlinkedEnumBuilder> _enums; | 6741 List<UnlinkedEnumBuilder> _enums; |
6472 List<UnlinkedExecutableBuilder> _executables; | 6742 List<UnlinkedExecutableBuilder> _executables; |
6473 List<UnlinkedExportNonPublicBuilder> _exports; | 6743 List<UnlinkedExportNonPublicBuilder> _exports; |
6474 List<UnlinkedImportBuilder> _imports; | 6744 List<UnlinkedImportBuilder> _imports; |
6475 List<UnlinkedConstBuilder> _libraryAnnotations; | 6745 List<UnlinkedConstBuilder> _libraryAnnotations; |
6476 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; | 6746 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; |
6477 String _libraryName; | 6747 String _libraryName; |
6478 int _libraryNameLength; | 6748 int _libraryNameLength; |
6479 int _libraryNameOffset; | 6749 int _libraryNameOffset; |
6480 List<UnlinkedPartBuilder> _parts; | 6750 List<UnlinkedPartBuilder> _parts; |
6481 UnlinkedPublicNamespaceBuilder _publicNamespace; | 6751 UnlinkedPublicNamespaceBuilder _publicNamespace; |
6482 List<UnlinkedReferenceBuilder> _references; | 6752 List<UnlinkedReferenceBuilder> _references; |
6483 List<UnlinkedTypedefBuilder> _typedefs; | 6753 List<UnlinkedTypedefBuilder> _typedefs; |
6484 List<UnlinkedVariableBuilder> _variables; | 6754 List<UnlinkedVariableBuilder> _variables; |
6485 | 6755 |
6486 @override | 6756 @override |
6487 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; | 6757 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; |
6488 | 6758 |
6489 /** | 6759 /** |
6490 * Classes declared in the compilation unit. | 6760 * Classes declared in the compilation unit. |
6491 */ | 6761 */ |
6492 void set classes(List<UnlinkedClassBuilder> _value) { | 6762 void set classes(List<UnlinkedClassBuilder> _value) { |
6493 assert(!_finished); | 6763 assert(!_finished); |
6494 _classes = _value; | 6764 _classes = _value; |
6495 } | 6765 } |
6496 | 6766 |
6497 @override | 6767 @override |
| 6768 CodeRangeBuilder get codeRange => _codeRange; |
| 6769 |
| 6770 /** |
| 6771 * Code range of the unit. |
| 6772 */ |
| 6773 void set codeRange(CodeRangeBuilder _value) { |
| 6774 assert(!_finished); |
| 6775 _codeRange = _value; |
| 6776 } |
| 6777 |
| 6778 @override |
6498 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; | 6779 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; |
6499 | 6780 |
6500 /** | 6781 /** |
6501 * Enums declared in the compilation unit. | 6782 * Enums declared in the compilation unit. |
6502 */ | 6783 */ |
6503 void set enums(List<UnlinkedEnumBuilder> _value) { | 6784 void set enums(List<UnlinkedEnumBuilder> _value) { |
6504 assert(!_finished); | 6785 assert(!_finished); |
6505 _enums = _value; | 6786 _enums = _value; |
6506 } | 6787 } |
6507 | 6788 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6652 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; | 6933 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; |
6653 | 6934 |
6654 /** | 6935 /** |
6655 * Top level variables declared in the compilation unit. | 6936 * Top level variables declared in the compilation unit. |
6656 */ | 6937 */ |
6657 void set variables(List<UnlinkedVariableBuilder> _value) { | 6938 void set variables(List<UnlinkedVariableBuilder> _value) { |
6658 assert(!_finished); | 6939 assert(!_finished); |
6659 _variables = _value; | 6940 _variables = _value; |
6660 } | 6941 } |
6661 | 6942 |
6662 UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, List<UnlinkedEnumBuil
der> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonP
ublicBuilder> exports, List<UnlinkedImportBuilder> imports, List<UnlinkedConstBu
ilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentat
ionComment, String libraryName, int libraryNameLength, int libraryNameOffset, Li
st<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, L
ist<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs,
List<UnlinkedVariableBuilder> variables}) | 6943 UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, CodeRangeBuilder code
Range, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executab
les, List<UnlinkedExportNonPublicBuilder> exports, List<UnlinkedImportBuilder> i
mports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationComm
entBuilder libraryDocumentationComment, String libraryName, int libraryNameLengt
h, int libraryNameOffset, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespa
ceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<Unlin
kedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables}) |
6663 : _classes = classes, | 6944 : _classes = classes, |
| 6945 _codeRange = codeRange, |
6664 _enums = enums, | 6946 _enums = enums, |
6665 _executables = executables, | 6947 _executables = executables, |
6666 _exports = exports, | 6948 _exports = exports, |
6667 _imports = imports, | 6949 _imports = imports, |
6668 _libraryAnnotations = libraryAnnotations, | 6950 _libraryAnnotations = libraryAnnotations, |
6669 _libraryDocumentationComment = libraryDocumentationComment, | 6951 _libraryDocumentationComment = libraryDocumentationComment, |
6670 _libraryName = libraryName, | 6952 _libraryName = libraryName, |
6671 _libraryNameLength = libraryNameLength, | 6953 _libraryNameLength = libraryNameLength, |
6672 _libraryNameOffset = libraryNameOffset, | 6954 _libraryNameOffset = libraryNameOffset, |
6673 _parts = parts, | 6955 _parts = parts, |
6674 _publicNamespace = publicNamespace, | 6956 _publicNamespace = publicNamespace, |
6675 _references = references, | 6957 _references = references, |
6676 _typedefs = typedefs, | 6958 _typedefs = typedefs, |
6677 _variables = variables; | 6959 _variables = variables; |
6678 | 6960 |
6679 List<int> toBuffer() { | 6961 List<int> toBuffer() { |
6680 fb.Builder fbBuilder = new fb.Builder(); | 6962 fb.Builder fbBuilder = new fb.Builder(); |
6681 return fbBuilder.finish(finish(fbBuilder), "UUnt"); | 6963 return fbBuilder.finish(finish(fbBuilder), "UUnt"); |
6682 } | 6964 } |
6683 | 6965 |
6684 fb.Offset finish(fb.Builder fbBuilder) { | 6966 fb.Offset finish(fb.Builder fbBuilder) { |
6685 assert(!_finished); | 6967 assert(!_finished); |
6686 _finished = true; | 6968 _finished = true; |
6687 fb.Offset offset_classes; | 6969 fb.Offset offset_classes; |
| 6970 fb.Offset offset_codeRange; |
6688 fb.Offset offset_enums; | 6971 fb.Offset offset_enums; |
6689 fb.Offset offset_executables; | 6972 fb.Offset offset_executables; |
6690 fb.Offset offset_exports; | 6973 fb.Offset offset_exports; |
6691 fb.Offset offset_imports; | 6974 fb.Offset offset_imports; |
6692 fb.Offset offset_libraryAnnotations; | 6975 fb.Offset offset_libraryAnnotations; |
6693 fb.Offset offset_libraryDocumentationComment; | 6976 fb.Offset offset_libraryDocumentationComment; |
6694 fb.Offset offset_libraryName; | 6977 fb.Offset offset_libraryName; |
6695 fb.Offset offset_parts; | 6978 fb.Offset offset_parts; |
6696 fb.Offset offset_publicNamespace; | 6979 fb.Offset offset_publicNamespace; |
6697 fb.Offset offset_references; | 6980 fb.Offset offset_references; |
6698 fb.Offset offset_typedefs; | 6981 fb.Offset offset_typedefs; |
6699 fb.Offset offset_variables; | 6982 fb.Offset offset_variables; |
6700 if (!(_classes == null || _classes.isEmpty)) { | 6983 if (!(_classes == null || _classes.isEmpty)) { |
6701 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde
r)).toList()); | 6984 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde
r)).toList()); |
6702 } | 6985 } |
| 6986 if (_codeRange != null) { |
| 6987 offset_codeRange = _codeRange.finish(fbBuilder); |
| 6988 } |
6703 if (!(_enums == null || _enums.isEmpty)) { | 6989 if (!(_enums == null || _enums.isEmpty)) { |
6704 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).
toList()); | 6990 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)).
toList()); |
6705 } | 6991 } |
6706 if (!(_executables == null || _executables.isEmpty)) { | 6992 if (!(_executables == null || _executables.isEmpty)) { |
6707 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); | 6993 offset_executables = fbBuilder.writeList(_executables.map((b) => b.finish(
fbBuilder)).toList()); |
6708 } | 6994 } |
6709 if (!(_exports == null || _exports.isEmpty)) { | 6995 if (!(_exports == null || _exports.isEmpty)) { |
6710 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); | 6996 offset_exports = fbBuilder.writeList(_exports.map((b) => b.finish(fbBuilde
r)).toList()); |
6711 } | 6997 } |
6712 if (!(_imports == null || _imports.isEmpty)) { | 6998 if (!(_imports == null || _imports.isEmpty)) { |
(...skipping 20 matching lines...) Expand all Loading... |
6733 if (!(_typedefs == null || _typedefs.isEmpty)) { | 7019 if (!(_typedefs == null || _typedefs.isEmpty)) { |
6734 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); | 7020 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); |
6735 } | 7021 } |
6736 if (!(_variables == null || _variables.isEmpty)) { | 7022 if (!(_variables == null || _variables.isEmpty)) { |
6737 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); | 7023 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); |
6738 } | 7024 } |
6739 fbBuilder.startTable(); | 7025 fbBuilder.startTable(); |
6740 if (offset_classes != null) { | 7026 if (offset_classes != null) { |
6741 fbBuilder.addOffset(2, offset_classes); | 7027 fbBuilder.addOffset(2, offset_classes); |
6742 } | 7028 } |
| 7029 if (offset_codeRange != null) { |
| 7030 fbBuilder.addOffset(15, offset_codeRange); |
| 7031 } |
6743 if (offset_enums != null) { | 7032 if (offset_enums != null) { |
6744 fbBuilder.addOffset(12, offset_enums); | 7033 fbBuilder.addOffset(12, offset_enums); |
6745 } | 7034 } |
6746 if (offset_executables != null) { | 7035 if (offset_executables != null) { |
6747 fbBuilder.addOffset(4, offset_executables); | 7036 fbBuilder.addOffset(4, offset_executables); |
6748 } | 7037 } |
6749 if (offset_exports != null) { | 7038 if (offset_exports != null) { |
6750 fbBuilder.addOffset(13, offset_exports); | 7039 fbBuilder.addOffset(13, offset_exports); |
6751 } | 7040 } |
6752 if (offset_imports != null) { | 7041 if (offset_imports != null) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6797 @override | 7086 @override |
6798 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); | 7087 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); |
6799 } | 7088 } |
6800 | 7089 |
6801 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { | 7090 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { |
6802 final fb.BufferPointer _bp; | 7091 final fb.BufferPointer _bp; |
6803 | 7092 |
6804 _UnlinkedUnitImpl(this._bp); | 7093 _UnlinkedUnitImpl(this._bp); |
6805 | 7094 |
6806 List<idl.UnlinkedClass> _classes; | 7095 List<idl.UnlinkedClass> _classes; |
| 7096 idl.CodeRange _codeRange; |
6807 List<idl.UnlinkedEnum> _enums; | 7097 List<idl.UnlinkedEnum> _enums; |
6808 List<idl.UnlinkedExecutable> _executables; | 7098 List<idl.UnlinkedExecutable> _executables; |
6809 List<idl.UnlinkedExportNonPublic> _exports; | 7099 List<idl.UnlinkedExportNonPublic> _exports; |
6810 List<idl.UnlinkedImport> _imports; | 7100 List<idl.UnlinkedImport> _imports; |
6811 List<idl.UnlinkedConst> _libraryAnnotations; | 7101 List<idl.UnlinkedConst> _libraryAnnotations; |
6812 idl.UnlinkedDocumentationComment _libraryDocumentationComment; | 7102 idl.UnlinkedDocumentationComment _libraryDocumentationComment; |
6813 String _libraryName; | 7103 String _libraryName; |
6814 int _libraryNameLength; | 7104 int _libraryNameLength; |
6815 int _libraryNameOffset; | 7105 int _libraryNameOffset; |
6816 List<idl.UnlinkedPart> _parts; | 7106 List<idl.UnlinkedPart> _parts; |
6817 idl.UnlinkedPublicNamespace _publicNamespace; | 7107 idl.UnlinkedPublicNamespace _publicNamespace; |
6818 List<idl.UnlinkedReference> _references; | 7108 List<idl.UnlinkedReference> _references; |
6819 List<idl.UnlinkedTypedef> _typedefs; | 7109 List<idl.UnlinkedTypedef> _typedefs; |
6820 List<idl.UnlinkedVariable> _variables; | 7110 List<idl.UnlinkedVariable> _variables; |
6821 | 7111 |
6822 @override | 7112 @override |
6823 List<idl.UnlinkedClass> get classes { | 7113 List<idl.UnlinkedClass> get classes { |
6824 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); | 7114 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); |
6825 return _classes; | 7115 return _classes; |
6826 } | 7116 } |
6827 | 7117 |
6828 @override | 7118 @override |
| 7119 idl.CodeRange get codeRange { |
| 7120 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null); |
| 7121 return _codeRange; |
| 7122 } |
| 7123 |
| 7124 @override |
6829 List<idl.UnlinkedEnum> get enums { | 7125 List<idl.UnlinkedEnum> get enums { |
6830 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()
).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]); | 7126 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()
).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]); |
6831 return _enums; | 7127 return _enums; |
6832 } | 7128 } |
6833 | 7129 |
6834 @override | 7130 @override |
6835 List<idl.UnlinkedExecutable> get executables { | 7131 List<idl.UnlinkedExecutable> get executables { |
6836 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 4, const <idl.UnlinkedExecutable>[]); | 7132 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 4, const <idl.UnlinkedExecutable>[]); |
6837 return _executables; | 7133 return _executables; |
6838 } | 7134 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6908 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]); | 7204 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]); |
6909 return _variables; | 7205 return _variables; |
6910 } | 7206 } |
6911 } | 7207 } |
6912 | 7208 |
6913 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { | 7209 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { |
6914 @override | 7210 @override |
6915 Map<String, Object> toJson() { | 7211 Map<String, Object> toJson() { |
6916 Map<String, Object> _result = <String, Object>{}; | 7212 Map<String, Object> _result = <String, Object>{}; |
6917 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.
toJson()).toList(); | 7213 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.
toJson()).toList(); |
| 7214 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
6918 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson
()).toList(); | 7215 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson
()).toList(); |
6919 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); | 7216 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); |
6920 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); | 7217 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); |
6921 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.
toJson()).toList(); | 7218 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.
toJson()).toList(); |
6922 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn
notations.map((_value) => _value.toJson()).toList(); | 7219 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn
notations.map((_value) => _value.toJson()).toList(); |
6923 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen
t"] = libraryDocumentationComment.toJson(); | 7220 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen
t"] = libraryDocumentationComment.toJson(); |
6924 if (libraryName != '') _result["libraryName"] = libraryName; | 7221 if (libraryName != '') _result["libraryName"] = libraryName; |
6925 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength
; | 7222 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength
; |
6926 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset
; | 7223 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset
; |
6927 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson
()).toList(); | 7224 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson
()).toList(); |
6928 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to
Json(); | 7225 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to
Json(); |
6929 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 7226 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); |
6930 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val
ue.toJson()).toList(); | 7227 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val
ue.toJson()).toList(); |
6931 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _
value.toJson()).toList(); | 7228 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _
value.toJson()).toList(); |
6932 return _result; | 7229 return _result; |
6933 } | 7230 } |
6934 | 7231 |
6935 @override | 7232 @override |
6936 Map<String, Object> toMap() => { | 7233 Map<String, Object> toMap() => { |
6937 "classes": classes, | 7234 "classes": classes, |
| 7235 "codeRange": codeRange, |
6938 "enums": enums, | 7236 "enums": enums, |
6939 "executables": executables, | 7237 "executables": executables, |
6940 "exports": exports, | 7238 "exports": exports, |
6941 "imports": imports, | 7239 "imports": imports, |
6942 "libraryAnnotations": libraryAnnotations, | 7240 "libraryAnnotations": libraryAnnotations, |
6943 "libraryDocumentationComment": libraryDocumentationComment, | 7241 "libraryDocumentationComment": libraryDocumentationComment, |
6944 "libraryName": libraryName, | 7242 "libraryName": libraryName, |
6945 "libraryNameLength": libraryNameLength, | 7243 "libraryNameLength": libraryNameLength, |
6946 "libraryNameOffset": libraryNameOffset, | 7244 "libraryNameOffset": libraryNameOffset, |
6947 "parts": parts, | 7245 "parts": parts, |
6948 "publicNamespace": publicNamespace, | 7246 "publicNamespace": publicNamespace, |
6949 "references": references, | 7247 "references": references, |
6950 "typedefs": typedefs, | 7248 "typedefs": typedefs, |
6951 "variables": variables, | 7249 "variables": variables, |
6952 }; | 7250 }; |
6953 | 7251 |
6954 @override | 7252 @override |
6955 String toString() => convert.JSON.encode(toJson()); | 7253 String toString() => convert.JSON.encode(toJson()); |
6956 } | 7254 } |
6957 | 7255 |
6958 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { | 7256 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { |
6959 bool _finished = false; | 7257 bool _finished = false; |
6960 | 7258 |
6961 List<UnlinkedConstBuilder> _annotations; | 7259 List<UnlinkedConstBuilder> _annotations; |
| 7260 CodeRangeBuilder _codeRange; |
6962 UnlinkedConstBuilder _constExpr; | 7261 UnlinkedConstBuilder _constExpr; |
6963 UnlinkedDocumentationCommentBuilder _documentationComment; | 7262 UnlinkedDocumentationCommentBuilder _documentationComment; |
6964 int _inferredTypeSlot; | 7263 int _inferredTypeSlot; |
6965 UnlinkedExecutableBuilder _initializer; | 7264 UnlinkedExecutableBuilder _initializer; |
6966 bool _isConst; | 7265 bool _isConst; |
6967 bool _isFinal; | 7266 bool _isFinal; |
6968 bool _isStatic; | 7267 bool _isStatic; |
6969 String _name; | 7268 String _name; |
6970 int _nameOffset; | 7269 int _nameOffset; |
6971 int _propagatedTypeSlot; | 7270 int _propagatedTypeSlot; |
6972 EntityRefBuilder _type; | 7271 EntityRefBuilder _type; |
6973 int _visibleLength; | 7272 int _visibleLength; |
6974 int _visibleOffset; | 7273 int _visibleOffset; |
6975 | 7274 |
6976 @override | 7275 @override |
6977 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 7276 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
6978 | 7277 |
6979 /** | 7278 /** |
6980 * Annotations for this variable. | 7279 * Annotations for this variable. |
6981 */ | 7280 */ |
6982 void set annotations(List<UnlinkedConstBuilder> _value) { | 7281 void set annotations(List<UnlinkedConstBuilder> _value) { |
6983 assert(!_finished); | 7282 assert(!_finished); |
6984 _annotations = _value; | 7283 _annotations = _value; |
6985 } | 7284 } |
6986 | 7285 |
6987 @override | 7286 @override |
| 7287 CodeRangeBuilder get codeRange => _codeRange; |
| 7288 |
| 7289 /** |
| 7290 * Code range of the variable. |
| 7291 */ |
| 7292 void set codeRange(CodeRangeBuilder _value) { |
| 7293 assert(!_finished); |
| 7294 _codeRange = _value; |
| 7295 } |
| 7296 |
| 7297 @override |
6988 UnlinkedConstBuilder get constExpr => _constExpr; | 7298 UnlinkedConstBuilder get constExpr => _constExpr; |
6989 | 7299 |
6990 /** | 7300 /** |
6991 * If [isConst] is true, and the variable has an initializer, the constant | 7301 * If [isConst] is true, and the variable has an initializer, the constant |
6992 * expression in the initializer. Note that the presence of this expression | 7302 * expression in the initializer. Note that the presence of this expression |
6993 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. | 7303 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. |
6994 */ | 7304 */ |
6995 void set constExpr(UnlinkedConstBuilder _value) { | 7305 void set constExpr(UnlinkedConstBuilder _value) { |
6996 assert(!_finished); | 7306 assert(!_finished); |
6997 _constExpr = _value; | 7307 _constExpr = _value; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7141 | 7451 |
7142 /** | 7452 /** |
7143 * If a local variable, the beginning of the visible range; zero otherwise. | 7453 * If a local variable, the beginning of the visible range; zero otherwise. |
7144 */ | 7454 */ |
7145 void set visibleOffset(int _value) { | 7455 void set visibleOffset(int _value) { |
7146 assert(!_finished); | 7456 assert(!_finished); |
7147 assert(_value == null || _value >= 0); | 7457 assert(_value == null || _value >= 0); |
7148 _visibleOffset = _value; | 7458 _visibleOffset = _value; |
7149 } | 7459 } |
7150 | 7460 |
7151 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConst
Builder constExpr, UnlinkedDocumentationCommentBuilder documentationComment, int
inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isF
inal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, Entity
RefBuilder type, int visibleLength, int visibleOffset}) | 7461 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuil
der codeRange, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuild
er documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initial
izer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, in
t propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffse
t}) |
7152 : _annotations = annotations, | 7462 : _annotations = annotations, |
| 7463 _codeRange = codeRange, |
7153 _constExpr = constExpr, | 7464 _constExpr = constExpr, |
7154 _documentationComment = documentationComment, | 7465 _documentationComment = documentationComment, |
7155 _inferredTypeSlot = inferredTypeSlot, | 7466 _inferredTypeSlot = inferredTypeSlot, |
7156 _initializer = initializer, | 7467 _initializer = initializer, |
7157 _isConst = isConst, | 7468 _isConst = isConst, |
7158 _isFinal = isFinal, | 7469 _isFinal = isFinal, |
7159 _isStatic = isStatic, | 7470 _isStatic = isStatic, |
7160 _name = name, | 7471 _name = name, |
7161 _nameOffset = nameOffset, | 7472 _nameOffset = nameOffset, |
7162 _propagatedTypeSlot = propagatedTypeSlot, | 7473 _propagatedTypeSlot = propagatedTypeSlot, |
7163 _type = type, | 7474 _type = type, |
7164 _visibleLength = visibleLength, | 7475 _visibleLength = visibleLength, |
7165 _visibleOffset = visibleOffset; | 7476 _visibleOffset = visibleOffset; |
7166 | 7477 |
7167 fb.Offset finish(fb.Builder fbBuilder) { | 7478 fb.Offset finish(fb.Builder fbBuilder) { |
7168 assert(!_finished); | 7479 assert(!_finished); |
7169 _finished = true; | 7480 _finished = true; |
7170 fb.Offset offset_annotations; | 7481 fb.Offset offset_annotations; |
| 7482 fb.Offset offset_codeRange; |
7171 fb.Offset offset_constExpr; | 7483 fb.Offset offset_constExpr; |
7172 fb.Offset offset_documentationComment; | 7484 fb.Offset offset_documentationComment; |
7173 fb.Offset offset_initializer; | 7485 fb.Offset offset_initializer; |
7174 fb.Offset offset_name; | 7486 fb.Offset offset_name; |
7175 fb.Offset offset_type; | 7487 fb.Offset offset_type; |
7176 if (!(_annotations == null || _annotations.isEmpty)) { | 7488 if (!(_annotations == null || _annotations.isEmpty)) { |
7177 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 7489 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
7178 } | 7490 } |
| 7491 if (_codeRange != null) { |
| 7492 offset_codeRange = _codeRange.finish(fbBuilder); |
| 7493 } |
7179 if (_constExpr != null) { | 7494 if (_constExpr != null) { |
7180 offset_constExpr = _constExpr.finish(fbBuilder); | 7495 offset_constExpr = _constExpr.finish(fbBuilder); |
7181 } | 7496 } |
7182 if (_documentationComment != null) { | 7497 if (_documentationComment != null) { |
7183 offset_documentationComment = _documentationComment.finish(fbBuilder); | 7498 offset_documentationComment = _documentationComment.finish(fbBuilder); |
7184 } | 7499 } |
7185 if (_initializer != null) { | 7500 if (_initializer != null) { |
7186 offset_initializer = _initializer.finish(fbBuilder); | 7501 offset_initializer = _initializer.finish(fbBuilder); |
7187 } | 7502 } |
7188 if (_name != null) { | 7503 if (_name != null) { |
7189 offset_name = fbBuilder.writeString(_name); | 7504 offset_name = fbBuilder.writeString(_name); |
7190 } | 7505 } |
7191 if (_type != null) { | 7506 if (_type != null) { |
7192 offset_type = _type.finish(fbBuilder); | 7507 offset_type = _type.finish(fbBuilder); |
7193 } | 7508 } |
7194 fbBuilder.startTable(); | 7509 fbBuilder.startTable(); |
7195 if (offset_annotations != null) { | 7510 if (offset_annotations != null) { |
7196 fbBuilder.addOffset(8, offset_annotations); | 7511 fbBuilder.addOffset(8, offset_annotations); |
7197 } | 7512 } |
| 7513 if (offset_codeRange != null) { |
| 7514 fbBuilder.addOffset(14, offset_codeRange); |
| 7515 } |
7198 if (offset_constExpr != null) { | 7516 if (offset_constExpr != null) { |
7199 fbBuilder.addOffset(5, offset_constExpr); | 7517 fbBuilder.addOffset(5, offset_constExpr); |
7200 } | 7518 } |
7201 if (offset_documentationComment != null) { | 7519 if (offset_documentationComment != null) { |
7202 fbBuilder.addOffset(10, offset_documentationComment); | 7520 fbBuilder.addOffset(10, offset_documentationComment); |
7203 } | 7521 } |
7204 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | 7522 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
7205 fbBuilder.addUint32(9, _inferredTypeSlot); | 7523 fbBuilder.addUint32(9, _inferredTypeSlot); |
7206 } | 7524 } |
7207 if (offset_initializer != null) { | 7525 if (offset_initializer != null) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7244 @override | 7562 @override |
7245 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab
leImpl(bp); | 7563 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab
leImpl(bp); |
7246 } | 7564 } |
7247 | 7565 |
7248 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { | 7566 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { |
7249 final fb.BufferPointer _bp; | 7567 final fb.BufferPointer _bp; |
7250 | 7568 |
7251 _UnlinkedVariableImpl(this._bp); | 7569 _UnlinkedVariableImpl(this._bp); |
7252 | 7570 |
7253 List<idl.UnlinkedConst> _annotations; | 7571 List<idl.UnlinkedConst> _annotations; |
| 7572 idl.CodeRange _codeRange; |
7254 idl.UnlinkedConst _constExpr; | 7573 idl.UnlinkedConst _constExpr; |
7255 idl.UnlinkedDocumentationComment _documentationComment; | 7574 idl.UnlinkedDocumentationComment _documentationComment; |
7256 int _inferredTypeSlot; | 7575 int _inferredTypeSlot; |
7257 idl.UnlinkedExecutable _initializer; | 7576 idl.UnlinkedExecutable _initializer; |
7258 bool _isConst; | 7577 bool _isConst; |
7259 bool _isFinal; | 7578 bool _isFinal; |
7260 bool _isStatic; | 7579 bool _isStatic; |
7261 String _name; | 7580 String _name; |
7262 int _nameOffset; | 7581 int _nameOffset; |
7263 int _propagatedTypeSlot; | 7582 int _propagatedTypeSlot; |
7264 idl.EntityRef _type; | 7583 idl.EntityRef _type; |
7265 int _visibleLength; | 7584 int _visibleLength; |
7266 int _visibleOffset; | 7585 int _visibleOffset; |
7267 | 7586 |
7268 @override | 7587 @override |
7269 List<idl.UnlinkedConst> get annotations { | 7588 List<idl.UnlinkedConst> get annotations { |
7270 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]); | 7589 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]); |
7271 return _annotations; | 7590 return _annotations; |
7272 } | 7591 } |
7273 | 7592 |
7274 @override | 7593 @override |
| 7594 idl.CodeRange get codeRange { |
| 7595 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 14, null); |
| 7596 return _codeRange; |
| 7597 } |
| 7598 |
| 7599 @override |
7275 idl.UnlinkedConst get constExpr { | 7600 idl.UnlinkedConst get constExpr { |
7276 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 5, null); | 7601 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 5, null); |
7277 return _constExpr; | 7602 return _constExpr; |
7278 } | 7603 } |
7279 | 7604 |
7280 @override | 7605 @override |
7281 idl.UnlinkedDocumentationComment get documentationComment { | 7606 idl.UnlinkedDocumentationComment get documentationComment { |
7282 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 10, null); | 7607 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 10, null); |
7283 return _documentationComment; | 7608 return _documentationComment; |
7284 } | 7609 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7348 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 12, 0); | 7673 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 12, 0); |
7349 return _visibleOffset; | 7674 return _visibleOffset; |
7350 } | 7675 } |
7351 } | 7676 } |
7352 | 7677 |
7353 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { | 7678 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { |
7354 @override | 7679 @override |
7355 Map<String, Object> toJson() { | 7680 Map<String, Object> toJson() { |
7356 Map<String, Object> _result = <String, Object>{}; | 7681 Map<String, Object> _result = <String, Object>{}; |
7357 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 7682 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 7683 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); |
7358 if (constExpr != null) _result["constExpr"] = constExpr.toJson(); | 7684 if (constExpr != null) _result["constExpr"] = constExpr.toJson(); |
7359 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 7685 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
7360 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; | 7686 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; |
7361 if (initializer != null) _result["initializer"] = initializer.toJson(); | 7687 if (initializer != null) _result["initializer"] = initializer.toJson(); |
7362 if (isConst != false) _result["isConst"] = isConst; | 7688 if (isConst != false) _result["isConst"] = isConst; |
7363 if (isFinal != false) _result["isFinal"] = isFinal; | 7689 if (isFinal != false) _result["isFinal"] = isFinal; |
7364 if (isStatic != false) _result["isStatic"] = isStatic; | 7690 if (isStatic != false) _result["isStatic"] = isStatic; |
7365 if (name != '') _result["name"] = name; | 7691 if (name != '') _result["name"] = name; |
7366 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 7692 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
7367 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS
lot; | 7693 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS
lot; |
7368 if (type != null) _result["type"] = type.toJson(); | 7694 if (type != null) _result["type"] = type.toJson(); |
7369 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 7695 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
7370 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 7696 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
7371 return _result; | 7697 return _result; |
7372 } | 7698 } |
7373 | 7699 |
7374 @override | 7700 @override |
7375 Map<String, Object> toMap() => { | 7701 Map<String, Object> toMap() => { |
7376 "annotations": annotations, | 7702 "annotations": annotations, |
| 7703 "codeRange": codeRange, |
7377 "constExpr": constExpr, | 7704 "constExpr": constExpr, |
7378 "documentationComment": documentationComment, | 7705 "documentationComment": documentationComment, |
7379 "inferredTypeSlot": inferredTypeSlot, | 7706 "inferredTypeSlot": inferredTypeSlot, |
7380 "initializer": initializer, | 7707 "initializer": initializer, |
7381 "isConst": isConst, | 7708 "isConst": isConst, |
7382 "isFinal": isFinal, | 7709 "isFinal": isFinal, |
7383 "isStatic": isStatic, | 7710 "isStatic": isStatic, |
7384 "name": name, | 7711 "name": name, |
7385 "nameOffset": nameOffset, | 7712 "nameOffset": nameOffset, |
7386 "propagatedTypeSlot": propagatedTypeSlot, | 7713 "propagatedTypeSlot": propagatedTypeSlot, |
7387 "type": type, | 7714 "type": type, |
7388 "visibleLength": visibleLength, | 7715 "visibleLength": visibleLength, |
7389 "visibleOffset": visibleOffset, | 7716 "visibleOffset": visibleOffset, |
7390 }; | 7717 }; |
7391 | 7718 |
7392 @override | 7719 @override |
7393 String toString() => convert.JSON.encode(toJson()); | 7720 String toString() => convert.JSON.encode(toJson()); |
7394 } | 7721 } |
7395 | 7722 |
OLD | NEW |