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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 "unit": unit, | 1130 "unit": unit, |
1131 }; | 1131 }; |
1132 | 1132 |
1133 @override | 1133 @override |
1134 String toString() => convert.JSON.encode(toJson()); | 1134 String toString() => convert.JSON.encode(toJson()); |
1135 } | 1135 } |
1136 | 1136 |
1137 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { | 1137 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
edUnit { |
1138 bool _finished = false; | 1138 bool _finished = false; |
1139 | 1139 |
| 1140 List<int> _constCycles; |
1140 List<LinkedReferenceBuilder> _references; | 1141 List<LinkedReferenceBuilder> _references; |
1141 List<EntityRefBuilder> _types; | 1142 List<EntityRefBuilder> _types; |
1142 List<int> _constCycles; | 1143 |
| 1144 @override |
| 1145 List<int> get constCycles => _constCycles ??= <int>[]; |
| 1146 |
| 1147 /** |
| 1148 * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot]) |
| 1149 * corresponding to const constructors that are part of cycles. |
| 1150 */ |
| 1151 void set constCycles(List<int> _value) { |
| 1152 assert(!_finished); |
| 1153 assert(_value == null || _value.every((e) => e >= 0)); |
| 1154 _constCycles = _value; |
| 1155 } |
1143 | 1156 |
1144 @override | 1157 @override |
1145 List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenc
eBuilder>[]; | 1158 List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenc
eBuilder>[]; |
1146 | 1159 |
1147 /** | 1160 /** |
1148 * Information about the resolution of references within the compilation | 1161 * Information about the resolution of references within the compilation |
1149 * unit. Each element of [UnlinkedUnit.references] has a corresponding | 1162 * unit. Each element of [UnlinkedUnit.references] has a corresponding |
1150 * element in this list (at the same index). If this list has additional | 1163 * element in this list (at the same index). If this list has additional |
1151 * elements beyond the number of elements in [UnlinkedUnit.references], those | 1164 * elements beyond the number of elements in [UnlinkedUnit.references], those |
1152 * additional elements are references that are only referred to implicitly | 1165 * additional elements are references that are only referred to implicitly |
1153 * (e.g. elements involved in inferred or propagated types). | 1166 * (e.g. elements involved in inferred or propagated types). |
1154 */ | 1167 */ |
1155 void set references(List<LinkedReferenceBuilder> _value) { | 1168 void set references(List<LinkedReferenceBuilder> _value) { |
1156 assert(!_finished); | 1169 assert(!_finished); |
1157 _references = _value; | 1170 _references = _value; |
1158 } | 1171 } |
1159 | 1172 |
1160 @override | 1173 @override |
1161 List<EntityRefBuilder> get types => _types ??= <EntityRefBuilder>[]; | 1174 List<EntityRefBuilder> get types => _types ??= <EntityRefBuilder>[]; |
1162 | 1175 |
1163 /** | 1176 /** |
1164 * List associating slot ids found inside the unlinked summary for the | 1177 * List associating slot ids found inside the unlinked summary for the |
1165 * compilation unit with propagated and inferred types. | 1178 * compilation unit with propagated and inferred types. |
1166 */ | 1179 */ |
1167 void set types(List<EntityRefBuilder> _value) { | 1180 void set types(List<EntityRefBuilder> _value) { |
1168 assert(!_finished); | 1181 assert(!_finished); |
1169 _types = _value; | 1182 _types = _value; |
1170 } | 1183 } |
1171 | 1184 |
1172 @override | 1185 LinkedUnitBuilder({List<int> constCycles, List<LinkedReferenceBuilder> referen
ces, List<EntityRefBuilder> types}) |
1173 List<int> get constCycles => _constCycles ??= <int>[]; | 1186 : _constCycles = constCycles, |
1174 | 1187 _references = references, |
1175 /** | 1188 _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 | 1189 |
1190 fb.Offset finish(fb.Builder fbBuilder) { | 1190 fb.Offset finish(fb.Builder fbBuilder) { |
1191 assert(!_finished); | 1191 assert(!_finished); |
1192 _finished = true; | 1192 _finished = true; |
| 1193 fb.Offset offset_constCycles; |
1193 fb.Offset offset_references; | 1194 fb.Offset offset_references; |
1194 fb.Offset offset_types; | 1195 fb.Offset offset_types; |
1195 fb.Offset offset_constCycles; | 1196 if (!(_constCycles == null || _constCycles.isEmpty)) { |
| 1197 offset_constCycles = fbBuilder.writeListUint32(_constCycles); |
| 1198 } |
1196 if (!(_references == null || _references.isEmpty)) { | 1199 if (!(_references == null || _references.isEmpty)) { |
1197 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); | 1200 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb
Builder)).toList()); |
1198 } | 1201 } |
1199 if (!(_types == null || _types.isEmpty)) { | 1202 if (!(_types == null || _types.isEmpty)) { |
1200 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).
toList()); | 1203 offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).
toList()); |
1201 } | 1204 } |
1202 if (!(_constCycles == null || _constCycles.isEmpty)) { | 1205 fbBuilder.startTable(); |
1203 offset_constCycles = fbBuilder.writeListUint32(_constCycles); | 1206 if (offset_constCycles != null) { |
| 1207 fbBuilder.addOffset(2, offset_constCycles); |
1204 } | 1208 } |
1205 fbBuilder.startTable(); | |
1206 if (offset_references != null) { | 1209 if (offset_references != null) { |
1207 fbBuilder.addOffset(0, offset_references); | 1210 fbBuilder.addOffset(0, offset_references); |
1208 } | 1211 } |
1209 if (offset_types != null) { | 1212 if (offset_types != null) { |
1210 fbBuilder.addOffset(1, offset_types); | 1213 fbBuilder.addOffset(1, offset_types); |
1211 } | 1214 } |
1212 if (offset_constCycles != null) { | |
1213 fbBuilder.addOffset(2, offset_constCycles); | |
1214 } | |
1215 return fbBuilder.endTable(); | 1215 return fbBuilder.endTable(); |
1216 } | 1216 } |
1217 } | 1217 } |
1218 | 1218 |
1219 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { | 1219 class _LinkedUnitReader extends fb.TableReader<_LinkedUnitImpl> { |
1220 const _LinkedUnitReader(); | 1220 const _LinkedUnitReader(); |
1221 | 1221 |
1222 @override | 1222 @override |
1223 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); | 1223 _LinkedUnitImpl createObject(fb.BufferPointer bp) => new _LinkedUnitImpl(bp); |
1224 } | 1224 } |
1225 | 1225 |
1226 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked
Unit { | 1226 class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked
Unit { |
1227 final fb.BufferPointer _bp; | 1227 final fb.BufferPointer _bp; |
1228 | 1228 |
1229 _LinkedUnitImpl(this._bp); | 1229 _LinkedUnitImpl(this._bp); |
1230 | 1230 |
| 1231 List<int> _constCycles; |
1231 List<idl.LinkedReference> _references; | 1232 List<idl.LinkedReference> _references; |
1232 List<idl.EntityRef> _types; | 1233 List<idl.EntityRef> _types; |
1233 List<int> _constCycles; | 1234 |
| 1235 @override |
| 1236 List<int> get constCycles { |
| 1237 _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]
); |
| 1238 return _constCycles; |
| 1239 } |
1234 | 1240 |
1235 @override | 1241 @override |
1236 List<idl.LinkedReference> get references { | 1242 List<idl.LinkedReference> get references { |
1237 _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedRefere
nceReader()).vTableGet(_bp, 0, const <idl.LinkedReference>[]); | 1243 _references ??= const fb.ListReader<idl.LinkedReference>(const _LinkedRefere
nceReader()).vTableGet(_bp, 0, const <idl.LinkedReference>[]); |
1238 return _references; | 1244 return _references; |
1239 } | 1245 } |
1240 | 1246 |
1241 @override | 1247 @override |
1242 List<idl.EntityRef> get types { | 1248 List<idl.EntityRef> get types { |
1243 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTab
leGet(_bp, 1, const <idl.EntityRef>[]); | 1249 _types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTab
leGet(_bp, 1, const <idl.EntityRef>[]); |
1244 return _types; | 1250 return _types; |
1245 } | 1251 } |
1246 | |
1247 @override | |
1248 List<int> get constCycles { | |
1249 _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]
); | |
1250 return _constCycles; | |
1251 } | |
1252 } | 1252 } |
1253 | 1253 |
1254 abstract class _LinkedUnitMixin implements idl.LinkedUnit { | 1254 abstract class _LinkedUnitMixin implements idl.LinkedUnit { |
1255 @override | 1255 @override |
1256 Map<String, Object> toJson() { | 1256 Map<String, Object> toJson() { |
1257 Map<String, Object> _result = <String, Object>{}; | 1257 Map<String, Object> _result = <String, Object>{}; |
| 1258 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles; |
1258 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 1259 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); |
1259 if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson
()).toList(); | 1260 if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson
()).toList(); |
1260 if (constCycles.isNotEmpty) _result["constCycles"] = constCycles; | |
1261 return _result; | 1261 return _result; |
1262 } | 1262 } |
1263 | 1263 |
1264 @override | 1264 @override |
1265 Map<String, Object> toMap() => { | 1265 Map<String, Object> toMap() => { |
| 1266 "constCycles": constCycles, |
1266 "references": references, | 1267 "references": references, |
1267 "types": types, | 1268 "types": types, |
1268 "constCycles": constCycles, | |
1269 }; | 1269 }; |
1270 | 1270 |
1271 @override | 1271 @override |
1272 String toString() => convert.JSON.encode(toJson()); | 1272 String toString() => convert.JSON.encode(toJson()); |
1273 } | 1273 } |
1274 | 1274 |
1275 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { | 1275 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { |
1276 bool _finished = false; | 1276 bool _finished = false; |
1277 | 1277 |
1278 List<LinkedLibraryBuilder> _linkedLibraries; | 1278 List<LinkedLibraryBuilder> _linkedLibraries; |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 }; | 2200 }; |
2201 | 2201 |
2202 @override | 2202 @override |
2203 String toString() => convert.JSON.encode(toJson()); | 2203 String toString() => convert.JSON.encode(toJson()); |
2204 } | 2204 } |
2205 | 2205 |
2206 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { | 2206 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
l.UnlinkedClass { |
2207 bool _finished = false; | 2207 bool _finished = false; |
2208 | 2208 |
2209 List<UnlinkedConstBuilder> _annotations; | 2209 List<UnlinkedConstBuilder> _annotations; |
| 2210 int _codeLength; |
| 2211 int _codeOffset; |
2210 UnlinkedDocumentationCommentBuilder _documentationComment; | 2212 UnlinkedDocumentationCommentBuilder _documentationComment; |
2211 List<UnlinkedExecutableBuilder> _executables; | 2213 List<UnlinkedExecutableBuilder> _executables; |
2212 List<UnlinkedVariableBuilder> _fields; | 2214 List<UnlinkedVariableBuilder> _fields; |
| 2215 bool _hasCodeRange; |
2213 bool _hasNoSupertype; | 2216 bool _hasNoSupertype; |
2214 List<EntityRefBuilder> _interfaces; | 2217 List<EntityRefBuilder> _interfaces; |
2215 bool _isAbstract; | 2218 bool _isAbstract; |
2216 bool _isMixinApplication; | 2219 bool _isMixinApplication; |
2217 List<EntityRefBuilder> _mixins; | 2220 List<EntityRefBuilder> _mixins; |
2218 String _name; | 2221 String _name; |
2219 int _nameOffset; | 2222 int _nameOffset; |
2220 EntityRefBuilder _supertype; | 2223 EntityRefBuilder _supertype; |
2221 List<UnlinkedTypeParamBuilder> _typeParameters; | 2224 List<UnlinkedTypeParamBuilder> _typeParameters; |
2222 | 2225 |
2223 @override | 2226 @override |
2224 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 2227 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
2225 | 2228 |
2226 /** | 2229 /** |
2227 * Annotations for this class. | 2230 * Annotations for this class. |
2228 */ | 2231 */ |
2229 void set annotations(List<UnlinkedConstBuilder> _value) { | 2232 void set annotations(List<UnlinkedConstBuilder> _value) { |
2230 assert(!_finished); | 2233 assert(!_finished); |
2231 _annotations = _value; | 2234 _annotations = _value; |
2232 } | 2235 } |
2233 | 2236 |
2234 @override | 2237 @override |
| 2238 int get codeLength => _codeLength ??= 0; |
| 2239 |
| 2240 /** |
| 2241 * Length of the class code. |
| 2242 */ |
| 2243 void set codeLength(int _value) { |
| 2244 assert(!_finished); |
| 2245 assert(_value == null || _value >= 0); |
| 2246 _codeLength = _value; |
| 2247 } |
| 2248 |
| 2249 @override |
| 2250 int get codeOffset => _codeOffset ??= 0; |
| 2251 |
| 2252 /** |
| 2253 * Offset of the class code relative to the beginning of the file. |
| 2254 */ |
| 2255 void set codeOffset(int _value) { |
| 2256 assert(!_finished); |
| 2257 assert(_value == null || _value >= 0); |
| 2258 _codeOffset = _value; |
| 2259 } |
| 2260 |
| 2261 @override |
2235 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 2262 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
2236 | 2263 |
2237 /** | 2264 /** |
2238 * Documentation comment for the class, or `null` if there is no | 2265 * Documentation comment for the class, or `null` if there is no |
2239 * documentation comment. | 2266 * documentation comment. |
2240 */ | 2267 */ |
2241 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 2268 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
2242 assert(!_finished); | 2269 assert(!_finished); |
2243 _documentationComment = _value; | 2270 _documentationComment = _value; |
2244 } | 2271 } |
(...skipping 14 matching lines...) Expand all Loading... |
2259 | 2286 |
2260 /** | 2287 /** |
2261 * Field declarations contained in the class. | 2288 * Field declarations contained in the class. |
2262 */ | 2289 */ |
2263 void set fields(List<UnlinkedVariableBuilder> _value) { | 2290 void set fields(List<UnlinkedVariableBuilder> _value) { |
2264 assert(!_finished); | 2291 assert(!_finished); |
2265 _fields = _value; | 2292 _fields = _value; |
2266 } | 2293 } |
2267 | 2294 |
2268 @override | 2295 @override |
| 2296 bool get hasCodeRange => _hasCodeRange ??= false; |
| 2297 |
| 2298 /** |
| 2299 * Indicates whether the class has the code range. |
| 2300 */ |
| 2301 void set hasCodeRange(bool _value) { |
| 2302 assert(!_finished); |
| 2303 _hasCodeRange = _value; |
| 2304 } |
| 2305 |
| 2306 @override |
2269 bool get hasNoSupertype => _hasNoSupertype ??= false; | 2307 bool get hasNoSupertype => _hasNoSupertype ??= false; |
2270 | 2308 |
2271 /** | 2309 /** |
2272 * Indicates whether this class is the core "Object" class (and hence has no | 2310 * Indicates whether this class is the core "Object" class (and hence has no |
2273 * supertype) | 2311 * supertype) |
2274 */ | 2312 */ |
2275 void set hasNoSupertype(bool _value) { | 2313 void set hasNoSupertype(bool _value) { |
2276 assert(!_finished); | 2314 assert(!_finished); |
2277 _hasNoSupertype = _value; | 2315 _hasNoSupertype = _value; |
2278 } | 2316 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 2399 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
2362 | 2400 |
2363 /** | 2401 /** |
2364 * Type parameters of the class, if any. | 2402 * Type parameters of the class, if any. |
2365 */ | 2403 */ |
2366 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 2404 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
2367 assert(!_finished); | 2405 assert(!_finished); |
2368 _typeParameters = _value; | 2406 _typeParameters = _value; |
2369 } | 2407 } |
2370 | 2408 |
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}) | 2409 UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, int codeLength,
int codeOffset, UnlinkedDocumentationCommentBuilder documentationComment, List<U
nlinkedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, boo
l hasCodeRange, bool hasNoSupertype, List<EntityRefBuilder> interfaces, bool isA
bstract, bool isMixinApplication, List<EntityRefBuilder> mixins, String name, in
t nameOffset, EntityRefBuilder supertype, List<UnlinkedTypeParamBuilder> typePar
ameters}) |
2372 : _annotations = annotations, | 2410 : _annotations = annotations, |
| 2411 _codeLength = codeLength, |
| 2412 _codeOffset = codeOffset, |
2373 _documentationComment = documentationComment, | 2413 _documentationComment = documentationComment, |
2374 _executables = executables, | 2414 _executables = executables, |
2375 _fields = fields, | 2415 _fields = fields, |
| 2416 _hasCodeRange = hasCodeRange, |
2376 _hasNoSupertype = hasNoSupertype, | 2417 _hasNoSupertype = hasNoSupertype, |
2377 _interfaces = interfaces, | 2418 _interfaces = interfaces, |
2378 _isAbstract = isAbstract, | 2419 _isAbstract = isAbstract, |
2379 _isMixinApplication = isMixinApplication, | 2420 _isMixinApplication = isMixinApplication, |
2380 _mixins = mixins, | 2421 _mixins = mixins, |
2381 _name = name, | 2422 _name = name, |
2382 _nameOffset = nameOffset, | 2423 _nameOffset = nameOffset, |
2383 _supertype = supertype, | 2424 _supertype = supertype, |
2384 _typeParameters = typeParameters; | 2425 _typeParameters = typeParameters; |
2385 | 2426 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2419 if (_supertype != null) { | 2460 if (_supertype != null) { |
2420 offset_supertype = _supertype.finish(fbBuilder); | 2461 offset_supertype = _supertype.finish(fbBuilder); |
2421 } | 2462 } |
2422 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 2463 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
2423 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 2464 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
2424 } | 2465 } |
2425 fbBuilder.startTable(); | 2466 fbBuilder.startTable(); |
2426 if (offset_annotations != null) { | 2467 if (offset_annotations != null) { |
2427 fbBuilder.addOffset(5, offset_annotations); | 2468 fbBuilder.addOffset(5, offset_annotations); |
2428 } | 2469 } |
| 2470 if (_codeLength != null && _codeLength != 0) { |
| 2471 fbBuilder.addUint32(15, _codeLength); |
| 2472 } |
| 2473 if (_codeOffset != null && _codeOffset != 0) { |
| 2474 fbBuilder.addUint32(14, _codeOffset); |
| 2475 } |
2429 if (offset_documentationComment != null) { | 2476 if (offset_documentationComment != null) { |
2430 fbBuilder.addOffset(6, offset_documentationComment); | 2477 fbBuilder.addOffset(6, offset_documentationComment); |
2431 } | 2478 } |
2432 if (offset_executables != null) { | 2479 if (offset_executables != null) { |
2433 fbBuilder.addOffset(2, offset_executables); | 2480 fbBuilder.addOffset(2, offset_executables); |
2434 } | 2481 } |
2435 if (offset_fields != null) { | 2482 if (offset_fields != null) { |
2436 fbBuilder.addOffset(4, offset_fields); | 2483 fbBuilder.addOffset(4, offset_fields); |
2437 } | 2484 } |
| 2485 if (_hasCodeRange == true) { |
| 2486 fbBuilder.addBool(13, true); |
| 2487 } |
2438 if (_hasNoSupertype == true) { | 2488 if (_hasNoSupertype == true) { |
2439 fbBuilder.addBool(12, true); | 2489 fbBuilder.addBool(12, true); |
2440 } | 2490 } |
2441 if (offset_interfaces != null) { | 2491 if (offset_interfaces != null) { |
2442 fbBuilder.addOffset(7, offset_interfaces); | 2492 fbBuilder.addOffset(7, offset_interfaces); |
2443 } | 2493 } |
2444 if (_isAbstract == true) { | 2494 if (_isAbstract == true) { |
2445 fbBuilder.addBool(8, true); | 2495 fbBuilder.addBool(8, true); |
2446 } | 2496 } |
2447 if (_isMixinApplication == true) { | 2497 if (_isMixinApplication == true) { |
(...skipping 24 matching lines...) Expand all Loading... |
2472 @override | 2522 @override |
2473 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl
(bp); | 2523 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl
(bp); |
2474 } | 2524 } |
2475 | 2525 |
2476 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { | 2526 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
UnlinkedClass { |
2477 final fb.BufferPointer _bp; | 2527 final fb.BufferPointer _bp; |
2478 | 2528 |
2479 _UnlinkedClassImpl(this._bp); | 2529 _UnlinkedClassImpl(this._bp); |
2480 | 2530 |
2481 List<idl.UnlinkedConst> _annotations; | 2531 List<idl.UnlinkedConst> _annotations; |
| 2532 int _codeLength; |
| 2533 int _codeOffset; |
2482 idl.UnlinkedDocumentationComment _documentationComment; | 2534 idl.UnlinkedDocumentationComment _documentationComment; |
2483 List<idl.UnlinkedExecutable> _executables; | 2535 List<idl.UnlinkedExecutable> _executables; |
2484 List<idl.UnlinkedVariable> _fields; | 2536 List<idl.UnlinkedVariable> _fields; |
| 2537 bool _hasCodeRange; |
2485 bool _hasNoSupertype; | 2538 bool _hasNoSupertype; |
2486 List<idl.EntityRef> _interfaces; | 2539 List<idl.EntityRef> _interfaces; |
2487 bool _isAbstract; | 2540 bool _isAbstract; |
2488 bool _isMixinApplication; | 2541 bool _isMixinApplication; |
2489 List<idl.EntityRef> _mixins; | 2542 List<idl.EntityRef> _mixins; |
2490 String _name; | 2543 String _name; |
2491 int _nameOffset; | 2544 int _nameOffset; |
2492 idl.EntityRef _supertype; | 2545 idl.EntityRef _supertype; |
2493 List<idl.UnlinkedTypeParam> _typeParameters; | 2546 List<idl.UnlinkedTypeParam> _typeParameters; |
2494 | 2547 |
2495 @override | 2548 @override |
2496 List<idl.UnlinkedConst> get annotations { | 2549 List<idl.UnlinkedConst> get annotations { |
2497 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 5, const <idl.UnlinkedConst>[]); | 2550 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 5, const <idl.UnlinkedConst>[]); |
2498 return _annotations; | 2551 return _annotations; |
2499 } | 2552 } |
2500 | 2553 |
2501 @override | 2554 @override |
| 2555 int get codeLength { |
| 2556 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 15, 0); |
| 2557 return _codeLength; |
| 2558 } |
| 2559 |
| 2560 @override |
| 2561 int get codeOffset { |
| 2562 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 14, 0); |
| 2563 return _codeOffset; |
| 2564 } |
| 2565 |
| 2566 @override |
2502 idl.UnlinkedDocumentationComment get documentationComment { | 2567 idl.UnlinkedDocumentationComment get documentationComment { |
2503 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); | 2568 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); |
2504 return _documentationComment; | 2569 return _documentationComment; |
2505 } | 2570 } |
2506 | 2571 |
2507 @override | 2572 @override |
2508 List<idl.UnlinkedExecutable> get executables { | 2573 List<idl.UnlinkedExecutable> get executables { |
2509 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]); | 2574 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 2, const <idl.UnlinkedExecutable>[]); |
2510 return _executables; | 2575 return _executables; |
2511 } | 2576 } |
2512 | 2577 |
2513 @override | 2578 @override |
2514 List<idl.UnlinkedVariable> get fields { | 2579 List<idl.UnlinkedVariable> get fields { |
2515 _fields ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVariabl
eReader()).vTableGet(_bp, 4, const <idl.UnlinkedVariable>[]); | 2580 _fields ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVariabl
eReader()).vTableGet(_bp, 4, const <idl.UnlinkedVariable>[]); |
2516 return _fields; | 2581 return _fields; |
2517 } | 2582 } |
2518 | 2583 |
2519 @override | 2584 @override |
| 2585 bool get hasCodeRange { |
| 2586 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 13, false); |
| 2587 return _hasCodeRange; |
| 2588 } |
| 2589 |
| 2590 @override |
2520 bool get hasNoSupertype { | 2591 bool get hasNoSupertype { |
2521 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 12, false); | 2592 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 12, false); |
2522 return _hasNoSupertype; | 2593 return _hasNoSupertype; |
2523 } | 2594 } |
2524 | 2595 |
2525 @override | 2596 @override |
2526 List<idl.EntityRef> get interfaces { | 2597 List<idl.EntityRef> get interfaces { |
2527 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bp, 7, const <idl.EntityRef>[]); | 2598 _interfaces ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
.vTableGet(_bp, 7, const <idl.EntityRef>[]); |
2528 return _interfaces; | 2599 return _interfaces; |
2529 } | 2600 } |
(...skipping 39 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>[]); | 2640 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 9, const <idl.UnlinkedTypeParam>[]); |
2570 return _typeParameters; | 2641 return _typeParameters; |
2571 } | 2642 } |
2572 } | 2643 } |
2573 | 2644 |
2574 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { | 2645 abstract class _UnlinkedClassMixin implements idl.UnlinkedClass { |
2575 @override | 2646 @override |
2576 Map<String, Object> toJson() { | 2647 Map<String, Object> toJson() { |
2577 Map<String, Object> _result = <String, Object>{}; | 2648 Map<String, Object> _result = <String, Object>{}; |
2578 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 2649 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 2650 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 2651 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
2579 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 2652 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
2580 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); | 2653 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); |
2581 if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJ
son()).toList(); | 2654 if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJ
son()).toList(); |
| 2655 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
2582 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype; | 2656 if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype; |
2583 if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) =
> _value.toJson()).toList(); | 2657 if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) =
> _value.toJson()).toList(); |
2584 if (isAbstract != false) _result["isAbstract"] = isAbstract; | 2658 if (isAbstract != false) _result["isAbstract"] = isAbstract; |
2585 if (isMixinApplication != false) _result["isMixinApplication"] = isMixinAppl
ication; | 2659 if (isMixinApplication != false) _result["isMixinApplication"] = isMixinAppl
ication; |
2586 if (mixins.isNotEmpty) _result["mixins"] = mixins.map((_value) => _value.toJ
son()).toList(); | 2660 if (mixins.isNotEmpty) _result["mixins"] = mixins.map((_value) => _value.toJ
son()).toList(); |
2587 if (name != '') _result["name"] = name; | 2661 if (name != '') _result["name"] = name; |
2588 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 2662 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
2589 if (supertype != null) _result["supertype"] = supertype.toJson(); | 2663 if (supertype != null) _result["supertype"] = supertype.toJson(); |
2590 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 2664 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); |
2591 return _result; | 2665 return _result; |
2592 } | 2666 } |
2593 | 2667 |
2594 @override | 2668 @override |
2595 Map<String, Object> toMap() => { | 2669 Map<String, Object> toMap() => { |
2596 "annotations": annotations, | 2670 "annotations": annotations, |
| 2671 "codeLength": codeLength, |
| 2672 "codeOffset": codeOffset, |
2597 "documentationComment": documentationComment, | 2673 "documentationComment": documentationComment, |
2598 "executables": executables, | 2674 "executables": executables, |
2599 "fields": fields, | 2675 "fields": fields, |
| 2676 "hasCodeRange": hasCodeRange, |
2600 "hasNoSupertype": hasNoSupertype, | 2677 "hasNoSupertype": hasNoSupertype, |
2601 "interfaces": interfaces, | 2678 "interfaces": interfaces, |
2602 "isAbstract": isAbstract, | 2679 "isAbstract": isAbstract, |
2603 "isMixinApplication": isMixinApplication, | 2680 "isMixinApplication": isMixinApplication, |
2604 "mixins": mixins, | 2681 "mixins": mixins, |
2605 "name": name, | 2682 "name": name, |
2606 "nameOffset": nameOffset, | 2683 "nameOffset": nameOffset, |
2607 "supertype": supertype, | 2684 "supertype": supertype, |
2608 "typeParameters": typeParameters, | 2685 "typeParameters": typeParameters, |
2609 }; | 2686 }; |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3274 }; | 3351 }; |
3275 | 3352 |
3276 @override | 3353 @override |
3277 String toString() => convert.JSON.encode(toJson()); | 3354 String toString() => convert.JSON.encode(toJson()); |
3278 } | 3355 } |
3279 | 3356 |
3280 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { | 3357 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
UnlinkedEnum { |
3281 bool _finished = false; | 3358 bool _finished = false; |
3282 | 3359 |
3283 List<UnlinkedConstBuilder> _annotations; | 3360 List<UnlinkedConstBuilder> _annotations; |
| 3361 int _codeLength; |
| 3362 int _codeOffset; |
3284 UnlinkedDocumentationCommentBuilder _documentationComment; | 3363 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 3364 bool _hasCodeRange; |
3285 String _name; | 3365 String _name; |
3286 int _nameOffset; | 3366 int _nameOffset; |
3287 List<UnlinkedEnumValueBuilder> _values; | 3367 List<UnlinkedEnumValueBuilder> _values; |
3288 | 3368 |
3289 @override | 3369 @override |
3290 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3370 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
3291 | 3371 |
3292 /** | 3372 /** |
3293 * Annotations for this enum. | 3373 * Annotations for this enum. |
3294 */ | 3374 */ |
3295 void set annotations(List<UnlinkedConstBuilder> _value) { | 3375 void set annotations(List<UnlinkedConstBuilder> _value) { |
3296 assert(!_finished); | 3376 assert(!_finished); |
3297 _annotations = _value; | 3377 _annotations = _value; |
3298 } | 3378 } |
3299 | 3379 |
3300 @override | 3380 @override |
| 3381 int get codeLength => _codeLength ??= 0; |
| 3382 |
| 3383 /** |
| 3384 * Length of the enum code. |
| 3385 */ |
| 3386 void set codeLength(int _value) { |
| 3387 assert(!_finished); |
| 3388 assert(_value == null || _value >= 0); |
| 3389 _codeLength = _value; |
| 3390 } |
| 3391 |
| 3392 @override |
| 3393 int get codeOffset => _codeOffset ??= 0; |
| 3394 |
| 3395 /** |
| 3396 * Offset of the enum code relative to the beginning of the file. |
| 3397 */ |
| 3398 void set codeOffset(int _value) { |
| 3399 assert(!_finished); |
| 3400 assert(_value == null || _value >= 0); |
| 3401 _codeOffset = _value; |
| 3402 } |
| 3403 |
| 3404 @override |
3301 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 3405 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
3302 | 3406 |
3303 /** | 3407 /** |
3304 * Documentation comment for the enum, or `null` if there is no documentation | 3408 * Documentation comment for the enum, or `null` if there is no documentation |
3305 * comment. | 3409 * comment. |
3306 */ | 3410 */ |
3307 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 3411 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
3308 assert(!_finished); | 3412 assert(!_finished); |
3309 _documentationComment = _value; | 3413 _documentationComment = _value; |
3310 } | 3414 } |
3311 | 3415 |
3312 @override | 3416 @override |
| 3417 bool get hasCodeRange => _hasCodeRange ??= false; |
| 3418 |
| 3419 /** |
| 3420 * Indicates whether the enum has the code range. |
| 3421 */ |
| 3422 void set hasCodeRange(bool _value) { |
| 3423 assert(!_finished); |
| 3424 _hasCodeRange = _value; |
| 3425 } |
| 3426 |
| 3427 @override |
3313 String get name => _name ??= ''; | 3428 String get name => _name ??= ''; |
3314 | 3429 |
3315 /** | 3430 /** |
3316 * Name of the enum type. | 3431 * Name of the enum type. |
3317 */ | 3432 */ |
3318 void set name(String _value) { | 3433 void set name(String _value) { |
3319 assert(!_finished); | 3434 assert(!_finished); |
3320 _name = _value; | 3435 _name = _value; |
3321 } | 3436 } |
3322 | 3437 |
(...skipping 13 matching lines...) Expand all Loading... |
3336 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; | 3451 List<UnlinkedEnumValueBuilder> get values => _values ??= <UnlinkedEnumValueBui
lder>[]; |
3337 | 3452 |
3338 /** | 3453 /** |
3339 * Values listed in the enum declaration, in declaration order. | 3454 * Values listed in the enum declaration, in declaration order. |
3340 */ | 3455 */ |
3341 void set values(List<UnlinkedEnumValueBuilder> _value) { | 3456 void set values(List<UnlinkedEnumValueBuilder> _value) { |
3342 assert(!_finished); | 3457 assert(!_finished); |
3343 _values = _value; | 3458 _values = _value; |
3344 } | 3459 } |
3345 | 3460 |
3346 UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumenta
tionCommentBuilder documentationComment, String name, int nameOffset, List<Unlin
kedEnumValueBuilder> values}) | 3461 UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, int codeLength, i
nt codeOffset, UnlinkedDocumentationCommentBuilder documentationComment, bool ha
sCodeRange, String name, int nameOffset, List<UnlinkedEnumValueBuilder> values}) |
3347 : _annotations = annotations, | 3462 : _annotations = annotations, |
| 3463 _codeLength = codeLength, |
| 3464 _codeOffset = codeOffset, |
3348 _documentationComment = documentationComment, | 3465 _documentationComment = documentationComment, |
| 3466 _hasCodeRange = hasCodeRange, |
3349 _name = name, | 3467 _name = name, |
3350 _nameOffset = nameOffset, | 3468 _nameOffset = nameOffset, |
3351 _values = values; | 3469 _values = values; |
3352 | 3470 |
3353 fb.Offset finish(fb.Builder fbBuilder) { | 3471 fb.Offset finish(fb.Builder fbBuilder) { |
3354 assert(!_finished); | 3472 assert(!_finished); |
3355 _finished = true; | 3473 _finished = true; |
3356 fb.Offset offset_annotations; | 3474 fb.Offset offset_annotations; |
3357 fb.Offset offset_documentationComment; | 3475 fb.Offset offset_documentationComment; |
3358 fb.Offset offset_name; | 3476 fb.Offset offset_name; |
3359 fb.Offset offset_values; | 3477 fb.Offset offset_values; |
3360 if (!(_annotations == null || _annotations.isEmpty)) { | 3478 if (!(_annotations == null || _annotations.isEmpty)) { |
3361 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 3479 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
3362 } | 3480 } |
3363 if (_documentationComment != null) { | 3481 if (_documentationComment != null) { |
3364 offset_documentationComment = _documentationComment.finish(fbBuilder); | 3482 offset_documentationComment = _documentationComment.finish(fbBuilder); |
3365 } | 3483 } |
3366 if (_name != null) { | 3484 if (_name != null) { |
3367 offset_name = fbBuilder.writeString(_name); | 3485 offset_name = fbBuilder.writeString(_name); |
3368 } | 3486 } |
3369 if (!(_values == null || _values.isEmpty)) { | 3487 if (!(_values == null || _values.isEmpty)) { |
3370 offset_values = fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)
).toList()); | 3488 offset_values = fbBuilder.writeList(_values.map((b) => b.finish(fbBuilder)
).toList()); |
3371 } | 3489 } |
3372 fbBuilder.startTable(); | 3490 fbBuilder.startTable(); |
3373 if (offset_annotations != null) { | 3491 if (offset_annotations != null) { |
3374 fbBuilder.addOffset(4, offset_annotations); | 3492 fbBuilder.addOffset(4, offset_annotations); |
3375 } | 3493 } |
| 3494 if (_codeLength != null && _codeLength != 0) { |
| 3495 fbBuilder.addUint32(7, _codeLength); |
| 3496 } |
| 3497 if (_codeOffset != null && _codeOffset != 0) { |
| 3498 fbBuilder.addUint32(6, _codeOffset); |
| 3499 } |
3376 if (offset_documentationComment != null) { | 3500 if (offset_documentationComment != null) { |
3377 fbBuilder.addOffset(3, offset_documentationComment); | 3501 fbBuilder.addOffset(3, offset_documentationComment); |
3378 } | 3502 } |
| 3503 if (_hasCodeRange == true) { |
| 3504 fbBuilder.addBool(5, true); |
| 3505 } |
3379 if (offset_name != null) { | 3506 if (offset_name != null) { |
3380 fbBuilder.addOffset(0, offset_name); | 3507 fbBuilder.addOffset(0, offset_name); |
3381 } | 3508 } |
3382 if (_nameOffset != null && _nameOffset != 0) { | 3509 if (_nameOffset != null && _nameOffset != 0) { |
3383 fbBuilder.addUint32(1, _nameOffset); | 3510 fbBuilder.addUint32(1, _nameOffset); |
3384 } | 3511 } |
3385 if (offset_values != null) { | 3512 if (offset_values != null) { |
3386 fbBuilder.addOffset(2, offset_values); | 3513 fbBuilder.addOffset(2, offset_values); |
3387 } | 3514 } |
3388 return fbBuilder.endTable(); | 3515 return fbBuilder.endTable(); |
3389 } | 3516 } |
3390 } | 3517 } |
3391 | 3518 |
3392 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { | 3519 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { |
3393 const _UnlinkedEnumReader(); | 3520 const _UnlinkedEnumReader(); |
3394 | 3521 |
3395 @override | 3522 @override |
3396 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b
p); | 3523 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b
p); |
3397 } | 3524 } |
3398 | 3525 |
3399 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { | 3526 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
linkedEnum { |
3400 final fb.BufferPointer _bp; | 3527 final fb.BufferPointer _bp; |
3401 | 3528 |
3402 _UnlinkedEnumImpl(this._bp); | 3529 _UnlinkedEnumImpl(this._bp); |
3403 | 3530 |
3404 List<idl.UnlinkedConst> _annotations; | 3531 List<idl.UnlinkedConst> _annotations; |
| 3532 int _codeLength; |
| 3533 int _codeOffset; |
3405 idl.UnlinkedDocumentationComment _documentationComment; | 3534 idl.UnlinkedDocumentationComment _documentationComment; |
| 3535 bool _hasCodeRange; |
3406 String _name; | 3536 String _name; |
3407 int _nameOffset; | 3537 int _nameOffset; |
3408 List<idl.UnlinkedEnumValue> _values; | 3538 List<idl.UnlinkedEnumValue> _values; |
3409 | 3539 |
3410 @override | 3540 @override |
3411 List<idl.UnlinkedConst> get annotations { | 3541 List<idl.UnlinkedConst> get annotations { |
3412 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); | 3542 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); |
3413 return _annotations; | 3543 return _annotations; |
3414 } | 3544 } |
3415 | 3545 |
3416 @override | 3546 @override |
| 3547 int get codeLength { |
| 3548 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0); |
| 3549 return _codeLength; |
| 3550 } |
| 3551 |
| 3552 @override |
| 3553 int get codeOffset { |
| 3554 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0); |
| 3555 return _codeOffset; |
| 3556 } |
| 3557 |
| 3558 @override |
3417 idl.UnlinkedDocumentationComment get documentationComment { | 3559 idl.UnlinkedDocumentationComment get documentationComment { |
3418 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 3, null); | 3560 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 3, null); |
3419 return _documentationComment; | 3561 return _documentationComment; |
3420 } | 3562 } |
3421 | 3563 |
3422 @override | 3564 @override |
| 3565 bool get hasCodeRange { |
| 3566 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 5, false); |
| 3567 return _hasCodeRange; |
| 3568 } |
| 3569 |
| 3570 @override |
3423 String get name { | 3571 String get name { |
3424 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 3572 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
3425 return _name; | 3573 return _name; |
3426 } | 3574 } |
3427 | 3575 |
3428 @override | 3576 @override |
3429 int get nameOffset { | 3577 int get nameOffset { |
3430 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 3578 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
3431 return _nameOffset; | 3579 return _nameOffset; |
3432 } | 3580 } |
3433 | 3581 |
3434 @override | 3582 @override |
3435 List<idl.UnlinkedEnumValue> get values { | 3583 List<idl.UnlinkedEnumValue> get values { |
3436 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa
lueReader()).vTableGet(_bp, 2, const <idl.UnlinkedEnumValue>[]); | 3584 _values ??= const fb.ListReader<idl.UnlinkedEnumValue>(const _UnlinkedEnumVa
lueReader()).vTableGet(_bp, 2, const <idl.UnlinkedEnumValue>[]); |
3437 return _values; | 3585 return _values; |
3438 } | 3586 } |
3439 } | 3587 } |
3440 | 3588 |
3441 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { | 3589 abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum { |
3442 @override | 3590 @override |
3443 Map<String, Object> toJson() { | 3591 Map<String, Object> toJson() { |
3444 Map<String, Object> _result = <String, Object>{}; | 3592 Map<String, Object> _result = <String, Object>{}; |
3445 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 3593 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 3594 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 3595 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
3446 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 3596 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
| 3597 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
3447 if (name != '') _result["name"] = name; | 3598 if (name != '') _result["name"] = name; |
3448 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 3599 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
3449 if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJ
son()).toList(); | 3600 if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJ
son()).toList(); |
3450 return _result; | 3601 return _result; |
3451 } | 3602 } |
3452 | 3603 |
3453 @override | 3604 @override |
3454 Map<String, Object> toMap() => { | 3605 Map<String, Object> toMap() => { |
3455 "annotations": annotations, | 3606 "annotations": annotations, |
| 3607 "codeLength": codeLength, |
| 3608 "codeOffset": codeOffset, |
3456 "documentationComment": documentationComment, | 3609 "documentationComment": documentationComment, |
| 3610 "hasCodeRange": hasCodeRange, |
3457 "name": name, | 3611 "name": name, |
3458 "nameOffset": nameOffset, | 3612 "nameOffset": nameOffset, |
3459 "values": values, | 3613 "values": values, |
3460 }; | 3614 }; |
3461 | 3615 |
3462 @override | 3616 @override |
3463 String toString() => convert.JSON.encode(toJson()); | 3617 String toString() => convert.JSON.encode(toJson()); |
3464 } | 3618 } |
3465 | 3619 |
3466 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple
ments idl.UnlinkedEnumValue { | 3620 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple
ments idl.UnlinkedEnumValue { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3588 }; | 3742 }; |
3589 | 3743 |
3590 @override | 3744 @override |
3591 String toString() => convert.JSON.encode(toJson()); | 3745 String toString() => convert.JSON.encode(toJson()); |
3592 } | 3746 } |
3593 | 3747 |
3594 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { | 3748 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
lements idl.UnlinkedExecutable { |
3595 bool _finished = false; | 3749 bool _finished = false; |
3596 | 3750 |
3597 List<UnlinkedConstBuilder> _annotations; | 3751 List<UnlinkedConstBuilder> _annotations; |
| 3752 int _codeLength; |
| 3753 int _codeOffset; |
3598 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; | 3754 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; |
| 3755 int _constCycleSlot; |
3599 UnlinkedDocumentationCommentBuilder _documentationComment; | 3756 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 3757 bool _hasCodeRange; |
3600 int _inferredReturnTypeSlot; | 3758 int _inferredReturnTypeSlot; |
3601 bool _isAbstract; | 3759 bool _isAbstract; |
3602 bool _isConst; | 3760 bool _isConst; |
3603 bool _isExternal; | 3761 bool _isExternal; |
3604 bool _isFactory; | 3762 bool _isFactory; |
3605 bool _isRedirectedConstructor; | 3763 bool _isRedirectedConstructor; |
3606 bool _isStatic; | 3764 bool _isStatic; |
3607 idl.UnlinkedExecutableKind _kind; | 3765 idl.UnlinkedExecutableKind _kind; |
3608 List<UnlinkedExecutableBuilder> _localFunctions; | 3766 List<UnlinkedExecutableBuilder> _localFunctions; |
3609 List<UnlinkedLabelBuilder> _localLabels; | 3767 List<UnlinkedLabelBuilder> _localLabels; |
3610 List<UnlinkedVariableBuilder> _localVariables; | 3768 List<UnlinkedVariableBuilder> _localVariables; |
3611 String _name; | 3769 String _name; |
3612 int _nameEnd; | 3770 int _nameEnd; |
3613 int _nameOffset; | 3771 int _nameOffset; |
3614 List<UnlinkedParamBuilder> _parameters; | 3772 List<UnlinkedParamBuilder> _parameters; |
3615 int _periodOffset; | 3773 int _periodOffset; |
3616 EntityRefBuilder _redirectedConstructor; | 3774 EntityRefBuilder _redirectedConstructor; |
3617 String _redirectedConstructorName; | 3775 String _redirectedConstructorName; |
3618 EntityRefBuilder _returnType; | 3776 EntityRefBuilder _returnType; |
3619 List<UnlinkedTypeParamBuilder> _typeParameters; | 3777 List<UnlinkedTypeParamBuilder> _typeParameters; |
3620 int _visibleLength; | 3778 int _visibleLength; |
3621 int _visibleOffset; | 3779 int _visibleOffset; |
3622 int _constCycleSlot; | |
3623 | 3780 |
3624 @override | 3781 @override |
3625 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 3782 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
3626 | 3783 |
3627 /** | 3784 /** |
3628 * Annotations for this executable. | 3785 * Annotations for this executable. |
3629 */ | 3786 */ |
3630 void set annotations(List<UnlinkedConstBuilder> _value) { | 3787 void set annotations(List<UnlinkedConstBuilder> _value) { |
3631 assert(!_finished); | 3788 assert(!_finished); |
3632 _annotations = _value; | 3789 _annotations = _value; |
3633 } | 3790 } |
3634 | 3791 |
3635 @override | 3792 @override |
| 3793 int get codeLength => _codeLength ??= 0; |
| 3794 |
| 3795 /** |
| 3796 * Length of the executable code. |
| 3797 */ |
| 3798 void set codeLength(int _value) { |
| 3799 assert(!_finished); |
| 3800 assert(_value == null || _value >= 0); |
| 3801 _codeLength = _value; |
| 3802 } |
| 3803 |
| 3804 @override |
| 3805 int get codeOffset => _codeOffset ??= 0; |
| 3806 |
| 3807 /** |
| 3808 * Offset of the executable code relative to the beginning of the file. |
| 3809 */ |
| 3810 void set codeOffset(int _value) { |
| 3811 assert(!_finished); |
| 3812 assert(_value == null || _value >= 0); |
| 3813 _codeOffset = _value; |
| 3814 } |
| 3815 |
| 3816 @override |
3636 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _const
antInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; | 3817 List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _const
antInitializers ??= <UnlinkedConstructorInitializerBuilder>[]; |
3637 | 3818 |
3638 /** | 3819 /** |
3639 * If a constant [UnlinkedExecutableKind.constructor], the constructor | 3820 * If a constant [UnlinkedExecutableKind.constructor], the constructor |
3640 * initializers. Otherwise empty. | 3821 * initializers. Otherwise empty. |
3641 */ | 3822 */ |
3642 void set constantInitializers(List<UnlinkedConstructorInitializerBuilder> _val
ue) { | 3823 void set constantInitializers(List<UnlinkedConstructorInitializerBuilder> _val
ue) { |
3643 assert(!_finished); | 3824 assert(!_finished); |
3644 _constantInitializers = _value; | 3825 _constantInitializers = _value; |
3645 } | 3826 } |
3646 | 3827 |
3647 @override | 3828 @override |
| 3829 int get constCycleSlot => _constCycleSlot ??= 0; |
| 3830 |
| 3831 /** |
| 3832 * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`, |
| 3833 * a nonzero slot id which is unique within this compilation unit. If this id |
| 3834 * is found in [LinkedUnit.constCycles], then this constructor is part of a |
| 3835 * cycle. |
| 3836 * |
| 3837 * Otherwise, zero. |
| 3838 */ |
| 3839 void set constCycleSlot(int _value) { |
| 3840 assert(!_finished); |
| 3841 assert(_value == null || _value >= 0); |
| 3842 _constCycleSlot = _value; |
| 3843 } |
| 3844 |
| 3845 @override |
3648 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 3846 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
3649 | 3847 |
3650 /** | 3848 /** |
3651 * Documentation comment for the executable, or `null` if there is no | 3849 * Documentation comment for the executable, or `null` if there is no |
3652 * documentation comment. | 3850 * documentation comment. |
3653 */ | 3851 */ |
3654 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 3852 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
3655 assert(!_finished); | 3853 assert(!_finished); |
3656 _documentationComment = _value; | 3854 _documentationComment = _value; |
3657 } | 3855 } |
3658 | 3856 |
3659 @override | 3857 @override |
| 3858 bool get hasCodeRange => _hasCodeRange ??= false; |
| 3859 |
| 3860 /** |
| 3861 * Indicates whether the executable has the code range. |
| 3862 */ |
| 3863 void set hasCodeRange(bool _value) { |
| 3864 assert(!_finished); |
| 3865 _hasCodeRange = _value; |
| 3866 } |
| 3867 |
| 3868 @override |
3660 int get inferredReturnTypeSlot => _inferredReturnTypeSlot ??= 0; | 3869 int get inferredReturnTypeSlot => _inferredReturnTypeSlot ??= 0; |
3661 | 3870 |
3662 /** | 3871 /** |
3663 * If this executable's return type is inferable, nonzero slot id | 3872 * If this executable's return type is inferable, nonzero slot id |
3664 * identifying which entry in [LinkedUnit.types] contains the inferred | 3873 * identifying which entry in [LinkedUnit.types] contains the inferred |
3665 * return type. If there is no matching entry in [LinkedUnit.types], then | 3874 * return type. If there is no matching entry in [LinkedUnit.types], then |
3666 * no return type was inferred for this variable, so its static type is | 3875 * no return type was inferred for this variable, so its static type is |
3667 * `dynamic`. | 3876 * `dynamic`. |
3668 */ | 3877 */ |
3669 void set inferredReturnTypeSlot(int _value) { | 3878 void set inferredReturnTypeSlot(int _value) { |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3923 | 4132 |
3924 /** | 4133 /** |
3925 * If a local function, the beginning of the visible range; zero otherwise. | 4134 * If a local function, the beginning of the visible range; zero otherwise. |
3926 */ | 4135 */ |
3927 void set visibleOffset(int _value) { | 4136 void set visibleOffset(int _value) { |
3928 assert(!_finished); | 4137 assert(!_finished); |
3929 assert(_value == null || _value >= 0); | 4138 assert(_value == null || _value >= 0); |
3930 _visibleOffset = _value; | 4139 _visibleOffset = _value; |
3931 } | 4140 } |
3932 | 4141 |
3933 @override | 4142 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, int codeLen
gth, int codeOffset, List<UnlinkedConstructorInitializerBuilder> constantInitial
izers, int constCycleSlot, UnlinkedDocumentationCommentBuilder documentationComm
ent, bool hasCodeRange, int inferredReturnTypeSlot, bool isAbstract, bool isCons
t, bool isExternal, bool isFactory, bool isRedirectedConstructor, bool isStatic,
idl.UnlinkedExecutableKind kind, List<UnlinkedExecutableBuilder> localFunctions
, List<UnlinkedLabelBuilder> localLabels, List<UnlinkedVariableBuilder> localVar
iables, String name, int nameEnd, int nameOffset, List<UnlinkedParamBuilder> par
ameters, int periodOffset, EntityRefBuilder redirectedConstructor, String redire
ctedConstructorName, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder>
typeParameters, int visibleLength, 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, | 4143 : _annotations = annotations, |
| 4144 _codeLength = codeLength, |
| 4145 _codeOffset = codeOffset, |
3952 _constantInitializers = constantInitializers, | 4146 _constantInitializers = constantInitializers, |
| 4147 _constCycleSlot = constCycleSlot, |
3953 _documentationComment = documentationComment, | 4148 _documentationComment = documentationComment, |
| 4149 _hasCodeRange = hasCodeRange, |
3954 _inferredReturnTypeSlot = inferredReturnTypeSlot, | 4150 _inferredReturnTypeSlot = inferredReturnTypeSlot, |
3955 _isAbstract = isAbstract, | 4151 _isAbstract = isAbstract, |
3956 _isConst = isConst, | 4152 _isConst = isConst, |
3957 _isExternal = isExternal, | 4153 _isExternal = isExternal, |
3958 _isFactory = isFactory, | 4154 _isFactory = isFactory, |
3959 _isRedirectedConstructor = isRedirectedConstructor, | 4155 _isRedirectedConstructor = isRedirectedConstructor, |
3960 _isStatic = isStatic, | 4156 _isStatic = isStatic, |
3961 _kind = kind, | 4157 _kind = kind, |
3962 _localFunctions = localFunctions, | 4158 _localFunctions = localFunctions, |
3963 _localLabels = localLabels, | 4159 _localLabels = localLabels, |
3964 _localVariables = localVariables, | 4160 _localVariables = localVariables, |
3965 _name = name, | 4161 _name = name, |
3966 _nameEnd = nameEnd, | 4162 _nameEnd = nameEnd, |
3967 _nameOffset = nameOffset, | 4163 _nameOffset = nameOffset, |
3968 _parameters = parameters, | 4164 _parameters = parameters, |
3969 _periodOffset = periodOffset, | 4165 _periodOffset = periodOffset, |
3970 _redirectedConstructor = redirectedConstructor, | 4166 _redirectedConstructor = redirectedConstructor, |
3971 _redirectedConstructorName = redirectedConstructorName, | 4167 _redirectedConstructorName = redirectedConstructorName, |
3972 _returnType = returnType, | 4168 _returnType = returnType, |
3973 _typeParameters = typeParameters, | 4169 _typeParameters = typeParameters, |
3974 _visibleLength = visibleLength, | 4170 _visibleLength = visibleLength, |
3975 _visibleOffset = visibleOffset, | 4171 _visibleOffset = visibleOffset; |
3976 _constCycleSlot = constCycleSlot; | |
3977 | 4172 |
3978 fb.Offset finish(fb.Builder fbBuilder) { | 4173 fb.Offset finish(fb.Builder fbBuilder) { |
3979 assert(!_finished); | 4174 assert(!_finished); |
3980 _finished = true; | 4175 _finished = true; |
3981 fb.Offset offset_annotations; | 4176 fb.Offset offset_annotations; |
3982 fb.Offset offset_constantInitializers; | 4177 fb.Offset offset_constantInitializers; |
3983 fb.Offset offset_documentationComment; | 4178 fb.Offset offset_documentationComment; |
3984 fb.Offset offset_localFunctions; | 4179 fb.Offset offset_localFunctions; |
3985 fb.Offset offset_localLabels; | 4180 fb.Offset offset_localLabels; |
3986 fb.Offset offset_localVariables; | 4181 fb.Offset offset_localVariables; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4023 if (_returnType != null) { | 4218 if (_returnType != null) { |
4024 offset_returnType = _returnType.finish(fbBuilder); | 4219 offset_returnType = _returnType.finish(fbBuilder); |
4025 } | 4220 } |
4026 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 4221 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
4027 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 4222 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
4028 } | 4223 } |
4029 fbBuilder.startTable(); | 4224 fbBuilder.startTable(); |
4030 if (offset_annotations != null) { | 4225 if (offset_annotations != null) { |
4031 fbBuilder.addOffset(6, offset_annotations); | 4226 fbBuilder.addOffset(6, offset_annotations); |
4032 } | 4227 } |
| 4228 if (_codeLength != null && _codeLength != 0) { |
| 4229 fbBuilder.addUint32(28, _codeLength); |
| 4230 } |
| 4231 if (_codeOffset != null && _codeOffset != 0) { |
| 4232 fbBuilder.addUint32(27, _codeOffset); |
| 4233 } |
4033 if (offset_constantInitializers != null) { | 4234 if (offset_constantInitializers != null) { |
4034 fbBuilder.addOffset(14, offset_constantInitializers); | 4235 fbBuilder.addOffset(14, offset_constantInitializers); |
4035 } | 4236 } |
| 4237 if (_constCycleSlot != null && _constCycleSlot != 0) { |
| 4238 fbBuilder.addUint32(25, _constCycleSlot); |
| 4239 } |
4036 if (offset_documentationComment != null) { | 4240 if (offset_documentationComment != null) { |
4037 fbBuilder.addOffset(7, offset_documentationComment); | 4241 fbBuilder.addOffset(7, offset_documentationComment); |
4038 } | 4242 } |
| 4243 if (_hasCodeRange == true) { |
| 4244 fbBuilder.addBool(26, true); |
| 4245 } |
4039 if (_inferredReturnTypeSlot != null && _inferredReturnTypeSlot != 0) { | 4246 if (_inferredReturnTypeSlot != null && _inferredReturnTypeSlot != 0) { |
4040 fbBuilder.addUint32(5, _inferredReturnTypeSlot); | 4247 fbBuilder.addUint32(5, _inferredReturnTypeSlot); |
4041 } | 4248 } |
4042 if (_isAbstract == true) { | 4249 if (_isAbstract == true) { |
4043 fbBuilder.addBool(10, true); | 4250 fbBuilder.addBool(10, true); |
4044 } | 4251 } |
4045 if (_isConst == true) { | 4252 if (_isConst == true) { |
4046 fbBuilder.addBool(12, true); | 4253 fbBuilder.addBool(12, true); |
4047 } | 4254 } |
4048 if (_isExternal == true) { | 4255 if (_isExternal == true) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4095 } | 4302 } |
4096 if (offset_typeParameters != null) { | 4303 if (offset_typeParameters != null) { |
4097 fbBuilder.addOffset(16, offset_typeParameters); | 4304 fbBuilder.addOffset(16, offset_typeParameters); |
4098 } | 4305 } |
4099 if (_visibleLength != null && _visibleLength != 0) { | 4306 if (_visibleLength != null && _visibleLength != 0) { |
4100 fbBuilder.addUint32(20, _visibleLength); | 4307 fbBuilder.addUint32(20, _visibleLength); |
4101 } | 4308 } |
4102 if (_visibleOffset != null && _visibleOffset != 0) { | 4309 if (_visibleOffset != null && _visibleOffset != 0) { |
4103 fbBuilder.addUint32(21, _visibleOffset); | 4310 fbBuilder.addUint32(21, _visibleOffset); |
4104 } | 4311 } |
4105 if (_constCycleSlot != null && _constCycleSlot != 0) { | |
4106 fbBuilder.addUint32(25, _constCycleSlot); | |
4107 } | |
4108 return fbBuilder.endTable(); | 4312 return fbBuilder.endTable(); |
4109 } | 4313 } |
4110 } | 4314 } |
4111 | 4315 |
4112 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ | 4316 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl>
{ |
4113 const _UnlinkedExecutableReader(); | 4317 const _UnlinkedExecutableReader(); |
4114 | 4318 |
4115 @override | 4319 @override |
4116 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec
utableImpl(bp); | 4320 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec
utableImpl(bp); |
4117 } | 4321 } |
4118 | 4322 |
4119 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { | 4323 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
ments idl.UnlinkedExecutable { |
4120 final fb.BufferPointer _bp; | 4324 final fb.BufferPointer _bp; |
4121 | 4325 |
4122 _UnlinkedExecutableImpl(this._bp); | 4326 _UnlinkedExecutableImpl(this._bp); |
4123 | 4327 |
4124 List<idl.UnlinkedConst> _annotations; | 4328 List<idl.UnlinkedConst> _annotations; |
| 4329 int _codeLength; |
| 4330 int _codeOffset; |
4125 List<idl.UnlinkedConstructorInitializer> _constantInitializers; | 4331 List<idl.UnlinkedConstructorInitializer> _constantInitializers; |
| 4332 int _constCycleSlot; |
4126 idl.UnlinkedDocumentationComment _documentationComment; | 4333 idl.UnlinkedDocumentationComment _documentationComment; |
| 4334 bool _hasCodeRange; |
4127 int _inferredReturnTypeSlot; | 4335 int _inferredReturnTypeSlot; |
4128 bool _isAbstract; | 4336 bool _isAbstract; |
4129 bool _isConst; | 4337 bool _isConst; |
4130 bool _isExternal; | 4338 bool _isExternal; |
4131 bool _isFactory; | 4339 bool _isFactory; |
4132 bool _isRedirectedConstructor; | 4340 bool _isRedirectedConstructor; |
4133 bool _isStatic; | 4341 bool _isStatic; |
4134 idl.UnlinkedExecutableKind _kind; | 4342 idl.UnlinkedExecutableKind _kind; |
4135 List<idl.UnlinkedExecutable> _localFunctions; | 4343 List<idl.UnlinkedExecutable> _localFunctions; |
4136 List<idl.UnlinkedLabel> _localLabels; | 4344 List<idl.UnlinkedLabel> _localLabels; |
4137 List<idl.UnlinkedVariable> _localVariables; | 4345 List<idl.UnlinkedVariable> _localVariables; |
4138 String _name; | 4346 String _name; |
4139 int _nameEnd; | 4347 int _nameEnd; |
4140 int _nameOffset; | 4348 int _nameOffset; |
4141 List<idl.UnlinkedParam> _parameters; | 4349 List<idl.UnlinkedParam> _parameters; |
4142 int _periodOffset; | 4350 int _periodOffset; |
4143 idl.EntityRef _redirectedConstructor; | 4351 idl.EntityRef _redirectedConstructor; |
4144 String _redirectedConstructorName; | 4352 String _redirectedConstructorName; |
4145 idl.EntityRef _returnType; | 4353 idl.EntityRef _returnType; |
4146 List<idl.UnlinkedTypeParam> _typeParameters; | 4354 List<idl.UnlinkedTypeParam> _typeParameters; |
4147 int _visibleLength; | 4355 int _visibleLength; |
4148 int _visibleOffset; | 4356 int _visibleOffset; |
4149 int _constCycleSlot; | |
4150 | 4357 |
4151 @override | 4358 @override |
4152 List<idl.UnlinkedConst> get annotations { | 4359 List<idl.UnlinkedConst> get annotations { |
4153 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 6, const <idl.UnlinkedConst>[]); | 4360 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 6, const <idl.UnlinkedConst>[]); |
4154 return _annotations; | 4361 return _annotations; |
4155 } | 4362 } |
4156 | 4363 |
4157 @override | 4364 @override |
| 4365 int get codeLength { |
| 4366 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 28, 0); |
| 4367 return _codeLength; |
| 4368 } |
| 4369 |
| 4370 @override |
| 4371 int get codeOffset { |
| 4372 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 27, 0); |
| 4373 return _codeOffset; |
| 4374 } |
| 4375 |
| 4376 @override |
4158 List<idl.UnlinkedConstructorInitializer> get constantInitializers { | 4377 List<idl.UnlinkedConstructorInitializer> get constantInitializers { |
4159 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial
izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <i
dl.UnlinkedConstructorInitializer>[]); | 4378 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial
izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <i
dl.UnlinkedConstructorInitializer>[]); |
4160 return _constantInitializers; | 4379 return _constantInitializers; |
4161 } | 4380 } |
4162 | 4381 |
4163 @override | 4382 @override |
| 4383 int get constCycleSlot { |
| 4384 _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0); |
| 4385 return _constCycleSlot; |
| 4386 } |
| 4387 |
| 4388 @override |
4164 idl.UnlinkedDocumentationComment get documentationComment { | 4389 idl.UnlinkedDocumentationComment get documentationComment { |
4165 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 7, null); | 4390 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 7, null); |
4166 return _documentationComment; | 4391 return _documentationComment; |
4167 } | 4392 } |
4168 | 4393 |
4169 @override | 4394 @override |
| 4395 bool get hasCodeRange { |
| 4396 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 26, false); |
| 4397 return _hasCodeRange; |
| 4398 } |
| 4399 |
| 4400 @override |
4170 int get inferredReturnTypeSlot { | 4401 int get inferredReturnTypeSlot { |
4171 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); | 4402 _inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); |
4172 return _inferredReturnTypeSlot; | 4403 return _inferredReturnTypeSlot; |
4173 } | 4404 } |
4174 | 4405 |
4175 @override | 4406 @override |
4176 bool get isAbstract { | 4407 bool get isAbstract { |
4177 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 10, false); | 4408 _isAbstract ??= const fb.BoolReader().vTableGet(_bp, 10, false); |
4178 return _isAbstract; | 4409 return _isAbstract; |
4179 } | 4410 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4290 int get visibleLength { | 4521 int get visibleLength { |
4291 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 20, 0); | 4522 _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 20, 0); |
4292 return _visibleLength; | 4523 return _visibleLength; |
4293 } | 4524 } |
4294 | 4525 |
4295 @override | 4526 @override |
4296 int get visibleOffset { | 4527 int get visibleOffset { |
4297 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 21, 0); | 4528 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 21, 0); |
4298 return _visibleOffset; | 4529 return _visibleOffset; |
4299 } | 4530 } |
4300 | |
4301 @override | |
4302 int get constCycleSlot { | |
4303 _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0); | |
4304 return _constCycleSlot; | |
4305 } | |
4306 } | 4531 } |
4307 | 4532 |
4308 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { | 4533 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { |
4309 @override | 4534 @override |
4310 Map<String, Object> toJson() { | 4535 Map<String, Object> toJson() { |
4311 Map<String, Object> _result = <String, Object>{}; | 4536 Map<String, Object> _result = <String, Object>{}; |
4312 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 4537 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 4538 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 4539 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
4313 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const
antInitializers.map((_value) => _value.toJson()).toList(); | 4540 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const
antInitializers.map((_value) => _value.toJson()).toList(); |
| 4541 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot; |
4314 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 4542 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
| 4543 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
4315 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre
dReturnTypeSlot; | 4544 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre
dReturnTypeSlot; |
4316 if (isAbstract != false) _result["isAbstract"] = isAbstract; | 4545 if (isAbstract != false) _result["isAbstract"] = isAbstract; |
4317 if (isConst != false) _result["isConst"] = isConst; | 4546 if (isConst != false) _result["isConst"] = isConst; |
4318 if (isExternal != false) _result["isExternal"] = isExternal; | 4547 if (isExternal != false) _result["isExternal"] = isExternal; |
4319 if (isFactory != false) _result["isFactory"] = isFactory; | 4548 if (isFactory != false) _result["isFactory"] = isFactory; |
4320 if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = i
sRedirectedConstructor; | 4549 if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = i
sRedirectedConstructor; |
4321 if (isStatic != false) _result["isStatic"] = isStatic; | 4550 if (isStatic != false) _result["isStatic"] = isStatic; |
4322 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) _result["kind"] = k
ind.toString().split('.')[1]; | 4551 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(); | 4552 if (localFunctions.isNotEmpty) _result["localFunctions"] = localFunctions.ma
p((_value) => _value.toJson()).toList(); |
4324 if (localLabels.isNotEmpty) _result["localLabels"] = localLabels.map((_value
) => _value.toJson()).toList(); | 4553 if (localLabels.isNotEmpty) _result["localLabels"] = localLabels.map((_value
) => _value.toJson()).toList(); |
4325 if (localVariables.isNotEmpty) _result["localVariables"] = localVariables.ma
p((_value) => _value.toJson()).toList(); | 4554 if (localVariables.isNotEmpty) _result["localVariables"] = localVariables.ma
p((_value) => _value.toJson()).toList(); |
4326 if (name != '') _result["name"] = name; | 4555 if (name != '') _result["name"] = name; |
4327 if (nameEnd != 0) _result["nameEnd"] = nameEnd; | 4556 if (nameEnd != 0) _result["nameEnd"] = nameEnd; |
4328 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 4557 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
4329 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 4558 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); |
4330 if (periodOffset != 0) _result["periodOffset"] = periodOffset; | 4559 if (periodOffset != 0) _result["periodOffset"] = periodOffset; |
4331 if (redirectedConstructor != null) _result["redirectedConstructor"] = redire
ctedConstructor.toJson(); | 4560 if (redirectedConstructor != null) _result["redirectedConstructor"] = redire
ctedConstructor.toJson(); |
4332 if (redirectedConstructorName != '') _result["redirectedConstructorName"] =
redirectedConstructorName; | 4561 if (redirectedConstructorName != '') _result["redirectedConstructorName"] =
redirectedConstructorName; |
4333 if (returnType != null) _result["returnType"] = returnType.toJson(); | 4562 if (returnType != null) _result["returnType"] = returnType.toJson(); |
4334 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 4563 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); |
4335 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 4564 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
4336 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 4565 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
4337 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot; | |
4338 return _result; | 4566 return _result; |
4339 } | 4567 } |
4340 | 4568 |
4341 @override | 4569 @override |
4342 Map<String, Object> toMap() => { | 4570 Map<String, Object> toMap() => { |
4343 "annotations": annotations, | 4571 "annotations": annotations, |
| 4572 "codeLength": codeLength, |
| 4573 "codeOffset": codeOffset, |
4344 "constantInitializers": constantInitializers, | 4574 "constantInitializers": constantInitializers, |
| 4575 "constCycleSlot": constCycleSlot, |
4345 "documentationComment": documentationComment, | 4576 "documentationComment": documentationComment, |
| 4577 "hasCodeRange": hasCodeRange, |
4346 "inferredReturnTypeSlot": inferredReturnTypeSlot, | 4578 "inferredReturnTypeSlot": inferredReturnTypeSlot, |
4347 "isAbstract": isAbstract, | 4579 "isAbstract": isAbstract, |
4348 "isConst": isConst, | 4580 "isConst": isConst, |
4349 "isExternal": isExternal, | 4581 "isExternal": isExternal, |
4350 "isFactory": isFactory, | 4582 "isFactory": isFactory, |
4351 "isRedirectedConstructor": isRedirectedConstructor, | 4583 "isRedirectedConstructor": isRedirectedConstructor, |
4352 "isStatic": isStatic, | 4584 "isStatic": isStatic, |
4353 "kind": kind, | 4585 "kind": kind, |
4354 "localFunctions": localFunctions, | 4586 "localFunctions": localFunctions, |
4355 "localLabels": localLabels, | 4587 "localLabels": localLabels, |
4356 "localVariables": localVariables, | 4588 "localVariables": localVariables, |
4357 "name": name, | 4589 "name": name, |
4358 "nameEnd": nameEnd, | 4590 "nameEnd": nameEnd, |
4359 "nameOffset": nameOffset, | 4591 "nameOffset": nameOffset, |
4360 "parameters": parameters, | 4592 "parameters": parameters, |
4361 "periodOffset": periodOffset, | 4593 "periodOffset": periodOffset, |
4362 "redirectedConstructor": redirectedConstructor, | 4594 "redirectedConstructor": redirectedConstructor, |
4363 "redirectedConstructorName": redirectedConstructorName, | 4595 "redirectedConstructorName": redirectedConstructorName, |
4364 "returnType": returnType, | 4596 "returnType": returnType, |
4365 "typeParameters": typeParameters, | 4597 "typeParameters": typeParameters, |
4366 "visibleLength": visibleLength, | 4598 "visibleLength": visibleLength, |
4367 "visibleOffset": visibleOffset, | 4599 "visibleOffset": visibleOffset, |
4368 "constCycleSlot": constCycleSlot, | |
4369 }; | 4600 }; |
4370 | 4601 |
4371 @override | 4602 @override |
4372 String toString() => convert.JSON.encode(toJson()); | 4603 String toString() => convert.JSON.encode(toJson()); |
4373 } | 4604 } |
4374 | 4605 |
4375 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { | 4606 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli
cMixin implements idl.UnlinkedExportNonPublic { |
4376 bool _finished = false; | 4607 bool _finished = false; |
4377 | 4608 |
4378 List<UnlinkedConstBuilder> _annotations; | 4609 List<UnlinkedConstBuilder> _annotations; |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5088 }; | 5319 }; |
5089 | 5320 |
5090 @override | 5321 @override |
5091 String toString() => convert.JSON.encode(toJson()); | 5322 String toString() => convert.JSON.encode(toJson()); |
5092 } | 5323 } |
5093 | 5324 |
5094 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { | 5325 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
l.UnlinkedParam { |
5095 bool _finished = false; | 5326 bool _finished = false; |
5096 | 5327 |
5097 List<UnlinkedConstBuilder> _annotations; | 5328 List<UnlinkedConstBuilder> _annotations; |
| 5329 int _codeLength; |
| 5330 int _codeOffset; |
5098 UnlinkedConstBuilder _defaultValue; | 5331 UnlinkedConstBuilder _defaultValue; |
5099 String _defaultValueCode; | 5332 String _defaultValueCode; |
| 5333 bool _hasCodeRange; |
5100 int _inferredTypeSlot; | 5334 int _inferredTypeSlot; |
5101 UnlinkedExecutableBuilder _initializer; | 5335 UnlinkedExecutableBuilder _initializer; |
5102 bool _isFunctionTyped; | 5336 bool _isFunctionTyped; |
5103 bool _isInitializingFormal; | 5337 bool _isInitializingFormal; |
5104 idl.UnlinkedParamKind _kind; | 5338 idl.UnlinkedParamKind _kind; |
5105 String _name; | 5339 String _name; |
5106 int _nameOffset; | 5340 int _nameOffset; |
5107 List<UnlinkedParamBuilder> _parameters; | 5341 List<UnlinkedParamBuilder> _parameters; |
5108 EntityRefBuilder _type; | 5342 EntityRefBuilder _type; |
5109 int _visibleLength; | 5343 int _visibleLength; |
5110 int _visibleOffset; | 5344 int _visibleOffset; |
5111 | 5345 |
5112 @override | 5346 @override |
5113 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 5347 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
5114 | 5348 |
5115 /** | 5349 /** |
5116 * Annotations for this parameter. | 5350 * Annotations for this parameter. |
5117 */ | 5351 */ |
5118 void set annotations(List<UnlinkedConstBuilder> _value) { | 5352 void set annotations(List<UnlinkedConstBuilder> _value) { |
5119 assert(!_finished); | 5353 assert(!_finished); |
5120 _annotations = _value; | 5354 _annotations = _value; |
5121 } | 5355 } |
5122 | 5356 |
5123 @override | 5357 @override |
| 5358 int get codeLength => _codeLength ??= 0; |
| 5359 |
| 5360 /** |
| 5361 * Length of the parameter code. |
| 5362 */ |
| 5363 void set codeLength(int _value) { |
| 5364 assert(!_finished); |
| 5365 assert(_value == null || _value >= 0); |
| 5366 _codeLength = _value; |
| 5367 } |
| 5368 |
| 5369 @override |
| 5370 int get codeOffset => _codeOffset ??= 0; |
| 5371 |
| 5372 /** |
| 5373 * Offset of the parameter code relative to the beginning of the file. |
| 5374 */ |
| 5375 void set codeOffset(int _value) { |
| 5376 assert(!_finished); |
| 5377 assert(_value == null || _value >= 0); |
| 5378 _codeOffset = _value; |
| 5379 } |
| 5380 |
| 5381 @override |
5124 UnlinkedConstBuilder get defaultValue => _defaultValue; | 5382 UnlinkedConstBuilder get defaultValue => _defaultValue; |
5125 | 5383 |
5126 /** | 5384 /** |
5127 * If the parameter has a default value, the constant expression in the | 5385 * 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 | 5386 * default value. Note that the presence of this expression does not mean |
5129 * that it is a valid, check [UnlinkedConst.isInvalid]. | 5387 * that it is a valid, check [UnlinkedConst.isInvalid]. |
5130 */ | 5388 */ |
5131 void set defaultValue(UnlinkedConstBuilder _value) { | 5389 void set defaultValue(UnlinkedConstBuilder _value) { |
5132 assert(!_finished); | 5390 assert(!_finished); |
5133 _defaultValue = _value; | 5391 _defaultValue = _value; |
5134 } | 5392 } |
5135 | 5393 |
5136 @override | 5394 @override |
5137 String get defaultValueCode => _defaultValueCode ??= ''; | 5395 String get defaultValueCode => _defaultValueCode ??= ''; |
5138 | 5396 |
5139 /** | 5397 /** |
5140 * If the parameter has a default value, the source text of the constant | 5398 * If the parameter has a default value, the source text of the constant |
5141 * expression in the default value. Otherwise the empty string. | 5399 * expression in the default value. Otherwise the empty string. |
5142 */ | 5400 */ |
5143 void set defaultValueCode(String _value) { | 5401 void set defaultValueCode(String _value) { |
5144 assert(!_finished); | 5402 assert(!_finished); |
5145 _defaultValueCode = _value; | 5403 _defaultValueCode = _value; |
5146 } | 5404 } |
5147 | 5405 |
5148 @override | 5406 @override |
| 5407 bool get hasCodeRange => _hasCodeRange ??= false; |
| 5408 |
| 5409 /** |
| 5410 * Indicates whether the parameter has the code range. |
| 5411 */ |
| 5412 void set hasCodeRange(bool _value) { |
| 5413 assert(!_finished); |
| 5414 _hasCodeRange = _value; |
| 5415 } |
| 5416 |
| 5417 @override |
5149 int get inferredTypeSlot => _inferredTypeSlot ??= 0; | 5418 int get inferredTypeSlot => _inferredTypeSlot ??= 0; |
5150 | 5419 |
5151 /** | 5420 /** |
5152 * If this parameter's type is inferable, nonzero slot id identifying which | 5421 * If this parameter's type is inferable, nonzero slot id identifying which |
5153 * entry in [LinkedLibrary.types] contains the inferred type. If there is no | 5422 * entry in [LinkedLibrary.types] contains the inferred type. If there is no |
5154 * matching entry in [LinkedLibrary.types], then no type was inferred for | 5423 * matching entry in [LinkedLibrary.types], then no type was inferred for |
5155 * this variable, so its static type is `dynamic`. | 5424 * this variable, so its static type is `dynamic`. |
5156 * | 5425 * |
5157 * Note that although strong mode considers initializing formals to be | 5426 * Note that although strong mode considers initializing formals to be |
5158 * inferable, they are not marked as such in the summary; if their type is | 5427 * inferable, they are not marked as such in the summary; if their type is |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5275 | 5544 |
5276 /** | 5545 /** |
5277 * The beginning of the visible range. | 5546 * The beginning of the visible range. |
5278 */ | 5547 */ |
5279 void set visibleOffset(int _value) { | 5548 void set visibleOffset(int _value) { |
5280 assert(!_finished); | 5549 assert(!_finished); |
5281 assert(_value == null || _value >= 0); | 5550 assert(_value == null || _value >= 0); |
5282 _visibleOffset = _value; | 5551 _visibleOffset = _value; |
5283 } | 5552 } |
5284 | 5553 |
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}) | 5554 UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, int codeLength,
int codeOffset, UnlinkedConstBuilder defaultValue, String defaultValueCode, bool
hasCodeRange, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool
isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String
name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder ty
pe, int visibleLength, int visibleOffset}) |
5286 : _annotations = annotations, | 5555 : _annotations = annotations, |
| 5556 _codeLength = codeLength, |
| 5557 _codeOffset = codeOffset, |
5287 _defaultValue = defaultValue, | 5558 _defaultValue = defaultValue, |
5288 _defaultValueCode = defaultValueCode, | 5559 _defaultValueCode = defaultValueCode, |
| 5560 _hasCodeRange = hasCodeRange, |
5289 _inferredTypeSlot = inferredTypeSlot, | 5561 _inferredTypeSlot = inferredTypeSlot, |
5290 _initializer = initializer, | 5562 _initializer = initializer, |
5291 _isFunctionTyped = isFunctionTyped, | 5563 _isFunctionTyped = isFunctionTyped, |
5292 _isInitializingFormal = isInitializingFormal, | 5564 _isInitializingFormal = isInitializingFormal, |
5293 _kind = kind, | 5565 _kind = kind, |
5294 _name = name, | 5566 _name = name, |
5295 _nameOffset = nameOffset, | 5567 _nameOffset = nameOffset, |
5296 _parameters = parameters, | 5568 _parameters = parameters, |
5297 _type = type, | 5569 _type = type, |
5298 _visibleLength = visibleLength, | 5570 _visibleLength = visibleLength, |
(...skipping 27 matching lines...) Expand all Loading... |
5326 if (!(_parameters == null || _parameters.isEmpty)) { | 5598 if (!(_parameters == null || _parameters.isEmpty)) { |
5327 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 5599 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); |
5328 } | 5600 } |
5329 if (_type != null) { | 5601 if (_type != null) { |
5330 offset_type = _type.finish(fbBuilder); | 5602 offset_type = _type.finish(fbBuilder); |
5331 } | 5603 } |
5332 fbBuilder.startTable(); | 5604 fbBuilder.startTable(); |
5333 if (offset_annotations != null) { | 5605 if (offset_annotations != null) { |
5334 fbBuilder.addOffset(9, offset_annotations); | 5606 fbBuilder.addOffset(9, offset_annotations); |
5335 } | 5607 } |
| 5608 if (_codeLength != null && _codeLength != 0) { |
| 5609 fbBuilder.addUint32(16, _codeLength); |
| 5610 } |
| 5611 if (_codeOffset != null && _codeOffset != 0) { |
| 5612 fbBuilder.addUint32(15, _codeOffset); |
| 5613 } |
5336 if (offset_defaultValue != null) { | 5614 if (offset_defaultValue != null) { |
5337 fbBuilder.addOffset(7, offset_defaultValue); | 5615 fbBuilder.addOffset(7, offset_defaultValue); |
5338 } | 5616 } |
5339 if (offset_defaultValueCode != null) { | 5617 if (offset_defaultValueCode != null) { |
5340 fbBuilder.addOffset(13, offset_defaultValueCode); | 5618 fbBuilder.addOffset(13, offset_defaultValueCode); |
5341 } | 5619 } |
| 5620 if (_hasCodeRange == true) { |
| 5621 fbBuilder.addBool(14, true); |
| 5622 } |
5342 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | 5623 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
5343 fbBuilder.addUint32(2, _inferredTypeSlot); | 5624 fbBuilder.addUint32(2, _inferredTypeSlot); |
5344 } | 5625 } |
5345 if (offset_initializer != null) { | 5626 if (offset_initializer != null) { |
5346 fbBuilder.addOffset(12, offset_initializer); | 5627 fbBuilder.addOffset(12, offset_initializer); |
5347 } | 5628 } |
5348 if (_isFunctionTyped == true) { | 5629 if (_isFunctionTyped == true) { |
5349 fbBuilder.addBool(5, true); | 5630 fbBuilder.addBool(5, true); |
5350 } | 5631 } |
5351 if (_isInitializingFormal == true) { | 5632 if (_isInitializingFormal == true) { |
(...skipping 30 matching lines...) Expand all Loading... |
5382 @override | 5663 @override |
5383 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); | 5664 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); |
5384 } | 5665 } |
5385 | 5666 |
5386 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { | 5667 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { |
5387 final fb.BufferPointer _bp; | 5668 final fb.BufferPointer _bp; |
5388 | 5669 |
5389 _UnlinkedParamImpl(this._bp); | 5670 _UnlinkedParamImpl(this._bp); |
5390 | 5671 |
5391 List<idl.UnlinkedConst> _annotations; | 5672 List<idl.UnlinkedConst> _annotations; |
| 5673 int _codeLength; |
| 5674 int _codeOffset; |
5392 idl.UnlinkedConst _defaultValue; | 5675 idl.UnlinkedConst _defaultValue; |
5393 String _defaultValueCode; | 5676 String _defaultValueCode; |
| 5677 bool _hasCodeRange; |
5394 int _inferredTypeSlot; | 5678 int _inferredTypeSlot; |
5395 idl.UnlinkedExecutable _initializer; | 5679 idl.UnlinkedExecutable _initializer; |
5396 bool _isFunctionTyped; | 5680 bool _isFunctionTyped; |
5397 bool _isInitializingFormal; | 5681 bool _isInitializingFormal; |
5398 idl.UnlinkedParamKind _kind; | 5682 idl.UnlinkedParamKind _kind; |
5399 String _name; | 5683 String _name; |
5400 int _nameOffset; | 5684 int _nameOffset; |
5401 List<idl.UnlinkedParam> _parameters; | 5685 List<idl.UnlinkedParam> _parameters; |
5402 idl.EntityRef _type; | 5686 idl.EntityRef _type; |
5403 int _visibleLength; | 5687 int _visibleLength; |
5404 int _visibleOffset; | 5688 int _visibleOffset; |
5405 | 5689 |
5406 @override | 5690 @override |
5407 List<idl.UnlinkedConst> get annotations { | 5691 List<idl.UnlinkedConst> get annotations { |
5408 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]); | 5692 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]); |
5409 return _annotations; | 5693 return _annotations; |
5410 } | 5694 } |
5411 | 5695 |
5412 @override | 5696 @override |
| 5697 int get codeLength { |
| 5698 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 16, 0); |
| 5699 return _codeLength; |
| 5700 } |
| 5701 |
| 5702 @override |
| 5703 int get codeOffset { |
| 5704 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 15, 0); |
| 5705 return _codeOffset; |
| 5706 } |
| 5707 |
| 5708 @override |
5413 idl.UnlinkedConst get defaultValue { | 5709 idl.UnlinkedConst get defaultValue { |
5414 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null); | 5710 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null); |
5415 return _defaultValue; | 5711 return _defaultValue; |
5416 } | 5712 } |
5417 | 5713 |
5418 @override | 5714 @override |
5419 String get defaultValueCode { | 5715 String get defaultValueCode { |
5420 _defaultValueCode ??= const fb.StringReader().vTableGet(_bp, 13, ''); | 5716 _defaultValueCode ??= const fb.StringReader().vTableGet(_bp, 13, ''); |
5421 return _defaultValueCode; | 5717 return _defaultValueCode; |
5422 } | 5718 } |
5423 | 5719 |
5424 @override | 5720 @override |
| 5721 bool get hasCodeRange { |
| 5722 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 14, false); |
| 5723 return _hasCodeRange; |
| 5724 } |
| 5725 |
| 5726 @override |
5425 int get inferredTypeSlot { | 5727 int get inferredTypeSlot { |
5426 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); | 5728 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); |
5427 return _inferredTypeSlot; | 5729 return _inferredTypeSlot; |
5428 } | 5730 } |
5429 | 5731 |
5430 @override | 5732 @override |
5431 idl.UnlinkedExecutable get initializer { | 5733 idl.UnlinkedExecutable get initializer { |
5432 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 12, null); | 5734 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 12, null); |
5433 return _initializer; | 5735 return _initializer; |
5434 } | 5736 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5486 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0); | 5788 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0); |
5487 return _visibleOffset; | 5789 return _visibleOffset; |
5488 } | 5790 } |
5489 } | 5791 } |
5490 | 5792 |
5491 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { | 5793 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { |
5492 @override | 5794 @override |
5493 Map<String, Object> toJson() { | 5795 Map<String, Object> toJson() { |
5494 Map<String, Object> _result = <String, Object>{}; | 5796 Map<String, Object> _result = <String, Object>{}; |
5495 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 5797 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 5798 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 5799 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
5496 if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson(); | 5800 if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson(); |
5497 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; | 5801 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; |
| 5802 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
5498 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; | 5803 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; |
5499 if (initializer != null) _result["initializer"] = initializer.toJson(); | 5804 if (initializer != null) _result["initializer"] = initializer.toJson(); |
5500 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; | 5805 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; |
5501 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti
alizingFormal; | 5806 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti
alizingFormal; |
5502 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString(
).split('.')[1]; | 5807 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString(
).split('.')[1]; |
5503 if (name != '') _result["name"] = name; | 5808 if (name != '') _result["name"] = name; |
5504 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 5809 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
5505 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 5810 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); |
5506 if (type != null) _result["type"] = type.toJson(); | 5811 if (type != null) _result["type"] = type.toJson(); |
5507 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 5812 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
5508 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 5813 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
5509 return _result; | 5814 return _result; |
5510 } | 5815 } |
5511 | 5816 |
5512 @override | 5817 @override |
5513 Map<String, Object> toMap() => { | 5818 Map<String, Object> toMap() => { |
5514 "annotations": annotations, | 5819 "annotations": annotations, |
| 5820 "codeLength": codeLength, |
| 5821 "codeOffset": codeOffset, |
5515 "defaultValue": defaultValue, | 5822 "defaultValue": defaultValue, |
5516 "defaultValueCode": defaultValueCode, | 5823 "defaultValueCode": defaultValueCode, |
| 5824 "hasCodeRange": hasCodeRange, |
5517 "inferredTypeSlot": inferredTypeSlot, | 5825 "inferredTypeSlot": inferredTypeSlot, |
5518 "initializer": initializer, | 5826 "initializer": initializer, |
5519 "isFunctionTyped": isFunctionTyped, | 5827 "isFunctionTyped": isFunctionTyped, |
5520 "isInitializingFormal": isInitializingFormal, | 5828 "isInitializingFormal": isInitializingFormal, |
5521 "kind": kind, | 5829 "kind": kind, |
5522 "name": name, | 5830 "name": name, |
5523 "nameOffset": nameOffset, | 5831 "nameOffset": nameOffset, |
5524 "parameters": parameters, | 5832 "parameters": parameters, |
5525 "type": type, | 5833 "type": type, |
5526 "visibleLength": visibleLength, | 5834 "visibleLength": visibleLength, |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6060 }; | 6368 }; |
6061 | 6369 |
6062 @override | 6370 @override |
6063 String toString() => convert.JSON.encode(toJson()); | 6371 String toString() => convert.JSON.encode(toJson()); |
6064 } | 6372 } |
6065 | 6373 |
6066 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { | 6374 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
s idl.UnlinkedTypedef { |
6067 bool _finished = false; | 6375 bool _finished = false; |
6068 | 6376 |
6069 List<UnlinkedConstBuilder> _annotations; | 6377 List<UnlinkedConstBuilder> _annotations; |
| 6378 int _codeLength; |
| 6379 int _codeOffset; |
6070 UnlinkedDocumentationCommentBuilder _documentationComment; | 6380 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 6381 bool _hasCodeRange; |
6071 String _name; | 6382 String _name; |
6072 int _nameOffset; | 6383 int _nameOffset; |
6073 List<UnlinkedParamBuilder> _parameters; | 6384 List<UnlinkedParamBuilder> _parameters; |
6074 EntityRefBuilder _returnType; | 6385 EntityRefBuilder _returnType; |
6075 List<UnlinkedTypeParamBuilder> _typeParameters; | 6386 List<UnlinkedTypeParamBuilder> _typeParameters; |
6076 | 6387 |
6077 @override | 6388 @override |
6078 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 6389 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
6079 | 6390 |
6080 /** | 6391 /** |
6081 * Annotations for this typedef. | 6392 * Annotations for this typedef. |
6082 */ | 6393 */ |
6083 void set annotations(List<UnlinkedConstBuilder> _value) { | 6394 void set annotations(List<UnlinkedConstBuilder> _value) { |
6084 assert(!_finished); | 6395 assert(!_finished); |
6085 _annotations = _value; | 6396 _annotations = _value; |
6086 } | 6397 } |
6087 | 6398 |
6088 @override | 6399 @override |
| 6400 int get codeLength => _codeLength ??= 0; |
| 6401 |
| 6402 /** |
| 6403 * Length of the typedef code. |
| 6404 */ |
| 6405 void set codeLength(int _value) { |
| 6406 assert(!_finished); |
| 6407 assert(_value == null || _value >= 0); |
| 6408 _codeLength = _value; |
| 6409 } |
| 6410 |
| 6411 @override |
| 6412 int get codeOffset => _codeOffset ??= 0; |
| 6413 |
| 6414 /** |
| 6415 * Offset of the typedef code relative to the beginning of the file. |
| 6416 */ |
| 6417 void set codeOffset(int _value) { |
| 6418 assert(!_finished); |
| 6419 assert(_value == null || _value >= 0); |
| 6420 _codeOffset = _value; |
| 6421 } |
| 6422 |
| 6423 @override |
6089 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 6424 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
6090 | 6425 |
6091 /** | 6426 /** |
6092 * Documentation comment for the typedef, or `null` if there is no | 6427 * Documentation comment for the typedef, or `null` if there is no |
6093 * documentation comment. | 6428 * documentation comment. |
6094 */ | 6429 */ |
6095 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 6430 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
6096 assert(!_finished); | 6431 assert(!_finished); |
6097 _documentationComment = _value; | 6432 _documentationComment = _value; |
6098 } | 6433 } |
6099 | 6434 |
6100 @override | 6435 @override |
| 6436 bool get hasCodeRange => _hasCodeRange ??= false; |
| 6437 |
| 6438 /** |
| 6439 * Indicates whether the typedef has the code range. |
| 6440 */ |
| 6441 void set hasCodeRange(bool _value) { |
| 6442 assert(!_finished); |
| 6443 _hasCodeRange = _value; |
| 6444 } |
| 6445 |
| 6446 @override |
6101 String get name => _name ??= ''; | 6447 String get name => _name ??= ''; |
6102 | 6448 |
6103 /** | 6449 /** |
6104 * Name of the typedef. | 6450 * Name of the typedef. |
6105 */ | 6451 */ |
6106 void set name(String _value) { | 6452 void set name(String _value) { |
6107 assert(!_finished); | 6453 assert(!_finished); |
6108 _name = _value; | 6454 _name = _value; |
6109 } | 6455 } |
6110 | 6456 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6146 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; | 6492 List<UnlinkedTypeParamBuilder> get typeParameters => _typeParameters ??= <Unli
nkedTypeParamBuilder>[]; |
6147 | 6493 |
6148 /** | 6494 /** |
6149 * Type parameters of the typedef, if any. | 6495 * Type parameters of the typedef, if any. |
6150 */ | 6496 */ |
6151 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { | 6497 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
6152 assert(!_finished); | 6498 assert(!_finished); |
6153 _typeParameters = _value; | 6499 _typeParameters = _value; |
6154 } | 6500 } |
6155 | 6501 |
6156 UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocume
ntationCommentBuilder documentationComment, String name, int nameOffset, List<Un
linkedParamBuilder> parameters, EntityRefBuilder returnType, List<UnlinkedTypePa
ramBuilder> typeParameters}) | 6502 UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, int codeLength
, int codeOffset, UnlinkedDocumentationCommentBuilder documentationComment, bool
hasCodeRange, String name, int nameOffset, List<UnlinkedParamBuilder> parameter
s, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters}) |
6157 : _annotations = annotations, | 6503 : _annotations = annotations, |
| 6504 _codeLength = codeLength, |
| 6505 _codeOffset = codeOffset, |
6158 _documentationComment = documentationComment, | 6506 _documentationComment = documentationComment, |
| 6507 _hasCodeRange = hasCodeRange, |
6159 _name = name, | 6508 _name = name, |
6160 _nameOffset = nameOffset, | 6509 _nameOffset = nameOffset, |
6161 _parameters = parameters, | 6510 _parameters = parameters, |
6162 _returnType = returnType, | 6511 _returnType = returnType, |
6163 _typeParameters = typeParameters; | 6512 _typeParameters = typeParameters; |
6164 | 6513 |
6165 fb.Offset finish(fb.Builder fbBuilder) { | 6514 fb.Offset finish(fb.Builder fbBuilder) { |
6166 assert(!_finished); | 6515 assert(!_finished); |
6167 _finished = true; | 6516 _finished = true; |
6168 fb.Offset offset_annotations; | 6517 fb.Offset offset_annotations; |
(...skipping 17 matching lines...) Expand all Loading... |
6186 if (_returnType != null) { | 6535 if (_returnType != null) { |
6187 offset_returnType = _returnType.finish(fbBuilder); | 6536 offset_returnType = _returnType.finish(fbBuilder); |
6188 } | 6537 } |
6189 if (!(_typeParameters == null || _typeParameters.isEmpty)) { | 6538 if (!(_typeParameters == null || _typeParameters.isEmpty)) { |
6190 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); | 6539 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f
inish(fbBuilder)).toList()); |
6191 } | 6540 } |
6192 fbBuilder.startTable(); | 6541 fbBuilder.startTable(); |
6193 if (offset_annotations != null) { | 6542 if (offset_annotations != null) { |
6194 fbBuilder.addOffset(4, offset_annotations); | 6543 fbBuilder.addOffset(4, offset_annotations); |
6195 } | 6544 } |
| 6545 if (_codeLength != null && _codeLength != 0) { |
| 6546 fbBuilder.addUint32(9, _codeLength); |
| 6547 } |
| 6548 if (_codeOffset != null && _codeOffset != 0) { |
| 6549 fbBuilder.addUint32(8, _codeOffset); |
| 6550 } |
6196 if (offset_documentationComment != null) { | 6551 if (offset_documentationComment != null) { |
6197 fbBuilder.addOffset(6, offset_documentationComment); | 6552 fbBuilder.addOffset(6, offset_documentationComment); |
6198 } | 6553 } |
| 6554 if (_hasCodeRange == true) { |
| 6555 fbBuilder.addBool(7, true); |
| 6556 } |
6199 if (offset_name != null) { | 6557 if (offset_name != null) { |
6200 fbBuilder.addOffset(0, offset_name); | 6558 fbBuilder.addOffset(0, offset_name); |
6201 } | 6559 } |
6202 if (_nameOffset != null && _nameOffset != 0) { | 6560 if (_nameOffset != null && _nameOffset != 0) { |
6203 fbBuilder.addUint32(1, _nameOffset); | 6561 fbBuilder.addUint32(1, _nameOffset); |
6204 } | 6562 } |
6205 if (offset_parameters != null) { | 6563 if (offset_parameters != null) { |
6206 fbBuilder.addOffset(3, offset_parameters); | 6564 fbBuilder.addOffset(3, offset_parameters); |
6207 } | 6565 } |
6208 if (offset_returnType != null) { | 6566 if (offset_returnType != null) { |
(...skipping 12 matching lines...) Expand all Loading... |
6221 @override | 6579 @override |
6222 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); | 6580 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef
Impl(bp); |
6223 } | 6581 } |
6224 | 6582 |
6225 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { | 6583 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
idl.UnlinkedTypedef { |
6226 final fb.BufferPointer _bp; | 6584 final fb.BufferPointer _bp; |
6227 | 6585 |
6228 _UnlinkedTypedefImpl(this._bp); | 6586 _UnlinkedTypedefImpl(this._bp); |
6229 | 6587 |
6230 List<idl.UnlinkedConst> _annotations; | 6588 List<idl.UnlinkedConst> _annotations; |
| 6589 int _codeLength; |
| 6590 int _codeOffset; |
6231 idl.UnlinkedDocumentationComment _documentationComment; | 6591 idl.UnlinkedDocumentationComment _documentationComment; |
| 6592 bool _hasCodeRange; |
6232 String _name; | 6593 String _name; |
6233 int _nameOffset; | 6594 int _nameOffset; |
6234 List<idl.UnlinkedParam> _parameters; | 6595 List<idl.UnlinkedParam> _parameters; |
6235 idl.EntityRef _returnType; | 6596 idl.EntityRef _returnType; |
6236 List<idl.UnlinkedTypeParam> _typeParameters; | 6597 List<idl.UnlinkedTypeParam> _typeParameters; |
6237 | 6598 |
6238 @override | 6599 @override |
6239 List<idl.UnlinkedConst> get annotations { | 6600 List<idl.UnlinkedConst> get annotations { |
6240 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); | 6601 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 4, const <idl.UnlinkedConst>[]); |
6241 return _annotations; | 6602 return _annotations; |
6242 } | 6603 } |
6243 | 6604 |
6244 @override | 6605 @override |
| 6606 int get codeLength { |
| 6607 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); |
| 6608 return _codeLength; |
| 6609 } |
| 6610 |
| 6611 @override |
| 6612 int get codeOffset { |
| 6613 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0); |
| 6614 return _codeOffset; |
| 6615 } |
| 6616 |
| 6617 @override |
6245 idl.UnlinkedDocumentationComment get documentationComment { | 6618 idl.UnlinkedDocumentationComment get documentationComment { |
6246 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); | 6619 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 6, null); |
6247 return _documentationComment; | 6620 return _documentationComment; |
6248 } | 6621 } |
6249 | 6622 |
6250 @override | 6623 @override |
| 6624 bool get hasCodeRange { |
| 6625 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 7, false); |
| 6626 return _hasCodeRange; |
| 6627 } |
| 6628 |
| 6629 @override |
6251 String get name { | 6630 String get name { |
6252 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 6631 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
6253 return _name; | 6632 return _name; |
6254 } | 6633 } |
6255 | 6634 |
6256 @override | 6635 @override |
6257 int get nameOffset { | 6636 int get nameOffset { |
6258 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 6637 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
6259 return _nameOffset; | 6638 return _nameOffset; |
6260 } | 6639 } |
(...skipping 15 matching lines...) Expand all Loading... |
6276 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 5, const <idl.UnlinkedTypeParam>[]); | 6655 _typeParameters ??= const fb.ListReader<idl.UnlinkedTypeParam>(const _Unlink
edTypeParamReader()).vTableGet(_bp, 5, const <idl.UnlinkedTypeParam>[]); |
6277 return _typeParameters; | 6656 return _typeParameters; |
6278 } | 6657 } |
6279 } | 6658 } |
6280 | 6659 |
6281 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { | 6660 abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef { |
6282 @override | 6661 @override |
6283 Map<String, Object> toJson() { | 6662 Map<String, Object> toJson() { |
6284 Map<String, Object> _result = <String, Object>{}; | 6663 Map<String, Object> _result = <String, Object>{}; |
6285 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 6664 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 6665 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 6666 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
6286 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 6667 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
| 6668 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
6287 if (name != '') _result["name"] = name; | 6669 if (name != '') _result["name"] = name; |
6288 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 6670 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
6289 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); | 6671 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) =
> _value.toJson()).toList(); |
6290 if (returnType != null) _result["returnType"] = returnType.toJson(); | 6672 if (returnType != null) _result["returnType"] = returnType.toJson(); |
6291 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); | 6673 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma
p((_value) => _value.toJson()).toList(); |
6292 return _result; | 6674 return _result; |
6293 } | 6675 } |
6294 | 6676 |
6295 @override | 6677 @override |
6296 Map<String, Object> toMap() => { | 6678 Map<String, Object> toMap() => { |
6297 "annotations": annotations, | 6679 "annotations": annotations, |
| 6680 "codeLength": codeLength, |
| 6681 "codeOffset": codeOffset, |
6298 "documentationComment": documentationComment, | 6682 "documentationComment": documentationComment, |
| 6683 "hasCodeRange": hasCodeRange, |
6299 "name": name, | 6684 "name": name, |
6300 "nameOffset": nameOffset, | 6685 "nameOffset": nameOffset, |
6301 "parameters": parameters, | 6686 "parameters": parameters, |
6302 "returnType": returnType, | 6687 "returnType": returnType, |
6303 "typeParameters": typeParameters, | 6688 "typeParameters": typeParameters, |
6304 }; | 6689 }; |
6305 | 6690 |
6306 @override | 6691 @override |
6307 String toString() => convert.JSON.encode(toJson()); | 6692 String toString() => convert.JSON.encode(toJson()); |
6308 } | 6693 } |
6309 | 6694 |
6310 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { | 6695 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
ments idl.UnlinkedTypeParam { |
6311 bool _finished = false; | 6696 bool _finished = false; |
6312 | 6697 |
6313 List<UnlinkedConstBuilder> _annotations; | 6698 List<UnlinkedConstBuilder> _annotations; |
6314 EntityRefBuilder _bound; | 6699 EntityRefBuilder _bound; |
| 6700 int _codeLength; |
| 6701 int _codeOffset; |
| 6702 bool _hasCodeRange; |
6315 String _name; | 6703 String _name; |
6316 int _nameOffset; | 6704 int _nameOffset; |
6317 | 6705 |
6318 @override | 6706 @override |
6319 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 6707 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
6320 | 6708 |
6321 /** | 6709 /** |
6322 * Annotations for this type parameter. | 6710 * Annotations for this type parameter. |
6323 */ | 6711 */ |
6324 void set annotations(List<UnlinkedConstBuilder> _value) { | 6712 void set annotations(List<UnlinkedConstBuilder> _value) { |
6325 assert(!_finished); | 6713 assert(!_finished); |
6326 _annotations = _value; | 6714 _annotations = _value; |
6327 } | 6715 } |
6328 | 6716 |
6329 @override | 6717 @override |
6330 EntityRefBuilder get bound => _bound; | 6718 EntityRefBuilder get bound => _bound; |
6331 | 6719 |
6332 /** | 6720 /** |
6333 * Bound of the type parameter, if a bound is explicitly declared. Otherwise | 6721 * Bound of the type parameter, if a bound is explicitly declared. Otherwise |
6334 * null. | 6722 * null. |
6335 */ | 6723 */ |
6336 void set bound(EntityRefBuilder _value) { | 6724 void set bound(EntityRefBuilder _value) { |
6337 assert(!_finished); | 6725 assert(!_finished); |
6338 _bound = _value; | 6726 _bound = _value; |
6339 } | 6727 } |
6340 | 6728 |
6341 @override | 6729 @override |
| 6730 int get codeLength => _codeLength ??= 0; |
| 6731 |
| 6732 /** |
| 6733 * Length of the type parameter code. |
| 6734 */ |
| 6735 void set codeLength(int _value) { |
| 6736 assert(!_finished); |
| 6737 assert(_value == null || _value >= 0); |
| 6738 _codeLength = _value; |
| 6739 } |
| 6740 |
| 6741 @override |
| 6742 int get codeOffset => _codeOffset ??= 0; |
| 6743 |
| 6744 /** |
| 6745 * Offset of the type parameter code relative to the beginning of the file. |
| 6746 */ |
| 6747 void set codeOffset(int _value) { |
| 6748 assert(!_finished); |
| 6749 assert(_value == null || _value >= 0); |
| 6750 _codeOffset = _value; |
| 6751 } |
| 6752 |
| 6753 @override |
| 6754 bool get hasCodeRange => _hasCodeRange ??= false; |
| 6755 |
| 6756 /** |
| 6757 * Indicates whether the parameter has the code range. |
| 6758 */ |
| 6759 void set hasCodeRange(bool _value) { |
| 6760 assert(!_finished); |
| 6761 _hasCodeRange = _value; |
| 6762 } |
| 6763 |
| 6764 @override |
6342 String get name => _name ??= ''; | 6765 String get name => _name ??= ''; |
6343 | 6766 |
6344 /** | 6767 /** |
6345 * Name of the type parameter. | 6768 * Name of the type parameter. |
6346 */ | 6769 */ |
6347 void set name(String _value) { | 6770 void set name(String _value) { |
6348 assert(!_finished); | 6771 assert(!_finished); |
6349 _name = _value; | 6772 _name = _value; |
6350 } | 6773 } |
6351 | 6774 |
6352 @override | 6775 @override |
6353 int get nameOffset => _nameOffset ??= 0; | 6776 int get nameOffset => _nameOffset ??= 0; |
6354 | 6777 |
6355 /** | 6778 /** |
6356 * Offset of the type parameter name relative to the beginning of the file. | 6779 * Offset of the type parameter name relative to the beginning of the file. |
6357 */ | 6780 */ |
6358 void set nameOffset(int _value) { | 6781 void set nameOffset(int _value) { |
6359 assert(!_finished); | 6782 assert(!_finished); |
6360 assert(_value == null || _value >= 0); | 6783 assert(_value == null || _value >= 0); |
6361 _nameOffset = _value; | 6784 _nameOffset = _value; |
6362 } | 6785 } |
6363 | 6786 |
6364 UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBui
lder bound, String name, int nameOffset}) | 6787 UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBui
lder bound, int codeLength, int codeOffset, bool hasCodeRange, String name, int
nameOffset}) |
6365 : _annotations = annotations, | 6788 : _annotations = annotations, |
6366 _bound = bound, | 6789 _bound = bound, |
| 6790 _codeLength = codeLength, |
| 6791 _codeOffset = codeOffset, |
| 6792 _hasCodeRange = hasCodeRange, |
6367 _name = name, | 6793 _name = name, |
6368 _nameOffset = nameOffset; | 6794 _nameOffset = nameOffset; |
6369 | 6795 |
6370 fb.Offset finish(fb.Builder fbBuilder) { | 6796 fb.Offset finish(fb.Builder fbBuilder) { |
6371 assert(!_finished); | 6797 assert(!_finished); |
6372 _finished = true; | 6798 _finished = true; |
6373 fb.Offset offset_annotations; | 6799 fb.Offset offset_annotations; |
6374 fb.Offset offset_bound; | 6800 fb.Offset offset_bound; |
6375 fb.Offset offset_name; | 6801 fb.Offset offset_name; |
6376 if (!(_annotations == null || _annotations.isEmpty)) { | 6802 if (!(_annotations == null || _annotations.isEmpty)) { |
6377 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); | 6803 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish(
fbBuilder)).toList()); |
6378 } | 6804 } |
6379 if (_bound != null) { | 6805 if (_bound != null) { |
6380 offset_bound = _bound.finish(fbBuilder); | 6806 offset_bound = _bound.finish(fbBuilder); |
6381 } | 6807 } |
6382 if (_name != null) { | 6808 if (_name != null) { |
6383 offset_name = fbBuilder.writeString(_name); | 6809 offset_name = fbBuilder.writeString(_name); |
6384 } | 6810 } |
6385 fbBuilder.startTable(); | 6811 fbBuilder.startTable(); |
6386 if (offset_annotations != null) { | 6812 if (offset_annotations != null) { |
6387 fbBuilder.addOffset(3, offset_annotations); | 6813 fbBuilder.addOffset(3, offset_annotations); |
6388 } | 6814 } |
6389 if (offset_bound != null) { | 6815 if (offset_bound != null) { |
6390 fbBuilder.addOffset(2, offset_bound); | 6816 fbBuilder.addOffset(2, offset_bound); |
6391 } | 6817 } |
| 6818 if (_codeLength != null && _codeLength != 0) { |
| 6819 fbBuilder.addUint32(6, _codeLength); |
| 6820 } |
| 6821 if (_codeOffset != null && _codeOffset != 0) { |
| 6822 fbBuilder.addUint32(5, _codeOffset); |
| 6823 } |
| 6824 if (_hasCodeRange == true) { |
| 6825 fbBuilder.addBool(4, true); |
| 6826 } |
6392 if (offset_name != null) { | 6827 if (offset_name != null) { |
6393 fbBuilder.addOffset(0, offset_name); | 6828 fbBuilder.addOffset(0, offset_name); |
6394 } | 6829 } |
6395 if (_nameOffset != null && _nameOffset != 0) { | 6830 if (_nameOffset != null && _nameOffset != 0) { |
6396 fbBuilder.addUint32(1, _nameOffset); | 6831 fbBuilder.addUint32(1, _nameOffset); |
6397 } | 6832 } |
6398 return fbBuilder.endTable(); | 6833 return fbBuilder.endTable(); |
6399 } | 6834 } |
6400 } | 6835 } |
6401 | 6836 |
6402 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { | 6837 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { |
6403 const _UnlinkedTypeParamReader(); | 6838 const _UnlinkedTypeParamReader(); |
6404 | 6839 |
6405 @override | 6840 @override |
6406 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); | 6841 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP
aramImpl(bp); |
6407 } | 6842 } |
6408 | 6843 |
6409 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { | 6844 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
nts idl.UnlinkedTypeParam { |
6410 final fb.BufferPointer _bp; | 6845 final fb.BufferPointer _bp; |
6411 | 6846 |
6412 _UnlinkedTypeParamImpl(this._bp); | 6847 _UnlinkedTypeParamImpl(this._bp); |
6413 | 6848 |
6414 List<idl.UnlinkedConst> _annotations; | 6849 List<idl.UnlinkedConst> _annotations; |
6415 idl.EntityRef _bound; | 6850 idl.EntityRef _bound; |
| 6851 int _codeLength; |
| 6852 int _codeOffset; |
| 6853 bool _hasCodeRange; |
6416 String _name; | 6854 String _name; |
6417 int _nameOffset; | 6855 int _nameOffset; |
6418 | 6856 |
6419 @override | 6857 @override |
6420 List<idl.UnlinkedConst> get annotations { | 6858 List<idl.UnlinkedConst> get annotations { |
6421 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); | 6859 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 3, const <idl.UnlinkedConst>[]); |
6422 return _annotations; | 6860 return _annotations; |
6423 } | 6861 } |
6424 | 6862 |
6425 @override | 6863 @override |
6426 idl.EntityRef get bound { | 6864 idl.EntityRef get bound { |
6427 _bound ??= const _EntityRefReader().vTableGet(_bp, 2, null); | 6865 _bound ??= const _EntityRefReader().vTableGet(_bp, 2, null); |
6428 return _bound; | 6866 return _bound; |
6429 } | 6867 } |
6430 | 6868 |
6431 @override | 6869 @override |
| 6870 int get codeLength { |
| 6871 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0); |
| 6872 return _codeLength; |
| 6873 } |
| 6874 |
| 6875 @override |
| 6876 int get codeOffset { |
| 6877 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); |
| 6878 return _codeOffset; |
| 6879 } |
| 6880 |
| 6881 @override |
| 6882 bool get hasCodeRange { |
| 6883 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 4, false); |
| 6884 return _hasCodeRange; |
| 6885 } |
| 6886 |
| 6887 @override |
6432 String get name { | 6888 String get name { |
6433 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 6889 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
6434 return _name; | 6890 return _name; |
6435 } | 6891 } |
6436 | 6892 |
6437 @override | 6893 @override |
6438 int get nameOffset { | 6894 int get nameOffset { |
6439 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 6895 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
6440 return _nameOffset; | 6896 return _nameOffset; |
6441 } | 6897 } |
6442 } | 6898 } |
6443 | 6899 |
6444 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { | 6900 abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam { |
6445 @override | 6901 @override |
6446 Map<String, Object> toJson() { | 6902 Map<String, Object> toJson() { |
6447 Map<String, Object> _result = <String, Object>{}; | 6903 Map<String, Object> _result = <String, Object>{}; |
6448 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 6904 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
6449 if (bound != null) _result["bound"] = bound.toJson(); | 6905 if (bound != null) _result["bound"] = bound.toJson(); |
| 6906 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 6907 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
| 6908 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
6450 if (name != '') _result["name"] = name; | 6909 if (name != '') _result["name"] = name; |
6451 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 6910 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
6452 return _result; | 6911 return _result; |
6453 } | 6912 } |
6454 | 6913 |
6455 @override | 6914 @override |
6456 Map<String, Object> toMap() => { | 6915 Map<String, Object> toMap() => { |
6457 "annotations": annotations, | 6916 "annotations": annotations, |
6458 "bound": bound, | 6917 "bound": bound, |
| 6918 "codeLength": codeLength, |
| 6919 "codeOffset": codeOffset, |
| 6920 "hasCodeRange": hasCodeRange, |
6459 "name": name, | 6921 "name": name, |
6460 "nameOffset": nameOffset, | 6922 "nameOffset": nameOffset, |
6461 }; | 6923 }; |
6462 | 6924 |
6463 @override | 6925 @override |
6464 String toString() => convert.JSON.encode(toJson()); | 6926 String toString() => convert.JSON.encode(toJson()); |
6465 } | 6927 } |
6466 | 6928 |
6467 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { | 6929 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
UnlinkedUnit { |
6468 bool _finished = false; | 6930 bool _finished = false; |
6469 | 6931 |
6470 List<UnlinkedClassBuilder> _classes; | 6932 List<UnlinkedClassBuilder> _classes; |
| 6933 int _codeLength; |
| 6934 int _codeOffset; |
6471 List<UnlinkedEnumBuilder> _enums; | 6935 List<UnlinkedEnumBuilder> _enums; |
6472 List<UnlinkedExecutableBuilder> _executables; | 6936 List<UnlinkedExecutableBuilder> _executables; |
6473 List<UnlinkedExportNonPublicBuilder> _exports; | 6937 List<UnlinkedExportNonPublicBuilder> _exports; |
| 6938 bool _hasCodeRange; |
6474 List<UnlinkedImportBuilder> _imports; | 6939 List<UnlinkedImportBuilder> _imports; |
6475 List<UnlinkedConstBuilder> _libraryAnnotations; | 6940 List<UnlinkedConstBuilder> _libraryAnnotations; |
6476 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; | 6941 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; |
6477 String _libraryName; | 6942 String _libraryName; |
6478 int _libraryNameLength; | 6943 int _libraryNameLength; |
6479 int _libraryNameOffset; | 6944 int _libraryNameOffset; |
6480 List<UnlinkedPartBuilder> _parts; | 6945 List<UnlinkedPartBuilder> _parts; |
6481 UnlinkedPublicNamespaceBuilder _publicNamespace; | 6946 UnlinkedPublicNamespaceBuilder _publicNamespace; |
6482 List<UnlinkedReferenceBuilder> _references; | 6947 List<UnlinkedReferenceBuilder> _references; |
6483 List<UnlinkedTypedefBuilder> _typedefs; | 6948 List<UnlinkedTypedefBuilder> _typedefs; |
6484 List<UnlinkedVariableBuilder> _variables; | 6949 List<UnlinkedVariableBuilder> _variables; |
6485 | 6950 |
6486 @override | 6951 @override |
6487 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; | 6952 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[
]; |
6488 | 6953 |
6489 /** | 6954 /** |
6490 * Classes declared in the compilation unit. | 6955 * Classes declared in the compilation unit. |
6491 */ | 6956 */ |
6492 void set classes(List<UnlinkedClassBuilder> _value) { | 6957 void set classes(List<UnlinkedClassBuilder> _value) { |
6493 assert(!_finished); | 6958 assert(!_finished); |
6494 _classes = _value; | 6959 _classes = _value; |
6495 } | 6960 } |
6496 | 6961 |
6497 @override | 6962 @override |
| 6963 int get codeLength => _codeLength ??= 0; |
| 6964 |
| 6965 /** |
| 6966 * Length of the unit code. |
| 6967 */ |
| 6968 void set codeLength(int _value) { |
| 6969 assert(!_finished); |
| 6970 assert(_value == null || _value >= 0); |
| 6971 _codeLength = _value; |
| 6972 } |
| 6973 |
| 6974 @override |
| 6975 int get codeOffset => _codeOffset ??= 0; |
| 6976 |
| 6977 /** |
| 6978 * Offset of the unit code relative to the beginning of the file. |
| 6979 */ |
| 6980 void set codeOffset(int _value) { |
| 6981 assert(!_finished); |
| 6982 assert(_value == null || _value >= 0); |
| 6983 _codeOffset = _value; |
| 6984 } |
| 6985 |
| 6986 @override |
6498 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; | 6987 List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[]; |
6499 | 6988 |
6500 /** | 6989 /** |
6501 * Enums declared in the compilation unit. | 6990 * Enums declared in the compilation unit. |
6502 */ | 6991 */ |
6503 void set enums(List<UnlinkedEnumBuilder> _value) { | 6992 void set enums(List<UnlinkedEnumBuilder> _value) { |
6504 assert(!_finished); | 6993 assert(!_finished); |
6505 _enums = _value; | 6994 _enums = _value; |
6506 } | 6995 } |
6507 | 6996 |
(...skipping 14 matching lines...) Expand all Loading... |
6522 | 7011 |
6523 /** | 7012 /** |
6524 * Export declarations in the compilation unit. | 7013 * Export declarations in the compilation unit. |
6525 */ | 7014 */ |
6526 void set exports(List<UnlinkedExportNonPublicBuilder> _value) { | 7015 void set exports(List<UnlinkedExportNonPublicBuilder> _value) { |
6527 assert(!_finished); | 7016 assert(!_finished); |
6528 _exports = _value; | 7017 _exports = _value; |
6529 } | 7018 } |
6530 | 7019 |
6531 @override | 7020 @override |
| 7021 bool get hasCodeRange => _hasCodeRange ??= false; |
| 7022 |
| 7023 /** |
| 7024 * Indicates whether the unit has the code range. |
| 7025 */ |
| 7026 void set hasCodeRange(bool _value) { |
| 7027 assert(!_finished); |
| 7028 _hasCodeRange = _value; |
| 7029 } |
| 7030 |
| 7031 @override |
6532 List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder
>[]; | 7032 List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder
>[]; |
6533 | 7033 |
6534 /** | 7034 /** |
6535 * Import declarations in the compilation unit. | 7035 * Import declarations in the compilation unit. |
6536 */ | 7036 */ |
6537 void set imports(List<UnlinkedImportBuilder> _value) { | 7037 void set imports(List<UnlinkedImportBuilder> _value) { |
6538 assert(!_finished); | 7038 assert(!_finished); |
6539 _imports = _value; | 7039 _imports = _value; |
6540 } | 7040 } |
6541 | 7041 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6652 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; | 7152 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl
eBuilder>[]; |
6653 | 7153 |
6654 /** | 7154 /** |
6655 * Top level variables declared in the compilation unit. | 7155 * Top level variables declared in the compilation unit. |
6656 */ | 7156 */ |
6657 void set variables(List<UnlinkedVariableBuilder> _value) { | 7157 void set variables(List<UnlinkedVariableBuilder> _value) { |
6658 assert(!_finished); | 7158 assert(!_finished); |
6659 _variables = _value; | 7159 _variables = _value; |
6660 } | 7160 } |
6661 | 7161 |
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}) | 7162 UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, int codeLength, int c
odeOffset, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> exec
utables, List<UnlinkedExportNonPublicBuilder> exports, bool hasCodeRange, List<U
nlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, Un
linkedDocumentationCommentBuilder libraryDocumentationComment, String libraryNam
e, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> parts
, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder>
references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder
> variables}) |
6663 : _classes = classes, | 7163 : _classes = classes, |
| 7164 _codeLength = codeLength, |
| 7165 _codeOffset = codeOffset, |
6664 _enums = enums, | 7166 _enums = enums, |
6665 _executables = executables, | 7167 _executables = executables, |
6666 _exports = exports, | 7168 _exports = exports, |
| 7169 _hasCodeRange = hasCodeRange, |
6667 _imports = imports, | 7170 _imports = imports, |
6668 _libraryAnnotations = libraryAnnotations, | 7171 _libraryAnnotations = libraryAnnotations, |
6669 _libraryDocumentationComment = libraryDocumentationComment, | 7172 _libraryDocumentationComment = libraryDocumentationComment, |
6670 _libraryName = libraryName, | 7173 _libraryName = libraryName, |
6671 _libraryNameLength = libraryNameLength, | 7174 _libraryNameLength = libraryNameLength, |
6672 _libraryNameOffset = libraryNameOffset, | 7175 _libraryNameOffset = libraryNameOffset, |
6673 _parts = parts, | 7176 _parts = parts, |
6674 _publicNamespace = publicNamespace, | 7177 _publicNamespace = publicNamespace, |
6675 _references = references, | 7178 _references = references, |
6676 _typedefs = typedefs, | 7179 _typedefs = typedefs, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6733 if (!(_typedefs == null || _typedefs.isEmpty)) { | 7236 if (!(_typedefs == null || _typedefs.isEmpty)) { |
6734 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); | 7237 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil
der)).toList()); |
6735 } | 7238 } |
6736 if (!(_variables == null || _variables.isEmpty)) { | 7239 if (!(_variables == null || _variables.isEmpty)) { |
6737 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); | 7240 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu
ilder)).toList()); |
6738 } | 7241 } |
6739 fbBuilder.startTable(); | 7242 fbBuilder.startTable(); |
6740 if (offset_classes != null) { | 7243 if (offset_classes != null) { |
6741 fbBuilder.addOffset(2, offset_classes); | 7244 fbBuilder.addOffset(2, offset_classes); |
6742 } | 7245 } |
| 7246 if (_codeLength != null && _codeLength != 0) { |
| 7247 fbBuilder.addUint32(17, _codeLength); |
| 7248 } |
| 7249 if (_codeOffset != null && _codeOffset != 0) { |
| 7250 fbBuilder.addUint32(16, _codeOffset); |
| 7251 } |
6743 if (offset_enums != null) { | 7252 if (offset_enums != null) { |
6744 fbBuilder.addOffset(12, offset_enums); | 7253 fbBuilder.addOffset(12, offset_enums); |
6745 } | 7254 } |
6746 if (offset_executables != null) { | 7255 if (offset_executables != null) { |
6747 fbBuilder.addOffset(4, offset_executables); | 7256 fbBuilder.addOffset(4, offset_executables); |
6748 } | 7257 } |
6749 if (offset_exports != null) { | 7258 if (offset_exports != null) { |
6750 fbBuilder.addOffset(13, offset_exports); | 7259 fbBuilder.addOffset(13, offset_exports); |
6751 } | 7260 } |
| 7261 if (_hasCodeRange == true) { |
| 7262 fbBuilder.addBool(15, true); |
| 7263 } |
6752 if (offset_imports != null) { | 7264 if (offset_imports != null) { |
6753 fbBuilder.addOffset(5, offset_imports); | 7265 fbBuilder.addOffset(5, offset_imports); |
6754 } | 7266 } |
6755 if (offset_libraryAnnotations != null) { | 7267 if (offset_libraryAnnotations != null) { |
6756 fbBuilder.addOffset(14, offset_libraryAnnotations); | 7268 fbBuilder.addOffset(14, offset_libraryAnnotations); |
6757 } | 7269 } |
6758 if (offset_libraryDocumentationComment != null) { | 7270 if (offset_libraryDocumentationComment != null) { |
6759 fbBuilder.addOffset(9, offset_libraryDocumentationComment); | 7271 fbBuilder.addOffset(9, offset_libraryDocumentationComment); |
6760 } | 7272 } |
6761 if (offset_libraryName != null) { | 7273 if (offset_libraryName != null) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6797 @override | 7309 @override |
6798 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); | 7310 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b
p); |
6799 } | 7311 } |
6800 | 7312 |
6801 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { | 7313 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
linkedUnit { |
6802 final fb.BufferPointer _bp; | 7314 final fb.BufferPointer _bp; |
6803 | 7315 |
6804 _UnlinkedUnitImpl(this._bp); | 7316 _UnlinkedUnitImpl(this._bp); |
6805 | 7317 |
6806 List<idl.UnlinkedClass> _classes; | 7318 List<idl.UnlinkedClass> _classes; |
| 7319 int _codeLength; |
| 7320 int _codeOffset; |
6807 List<idl.UnlinkedEnum> _enums; | 7321 List<idl.UnlinkedEnum> _enums; |
6808 List<idl.UnlinkedExecutable> _executables; | 7322 List<idl.UnlinkedExecutable> _executables; |
6809 List<idl.UnlinkedExportNonPublic> _exports; | 7323 List<idl.UnlinkedExportNonPublic> _exports; |
| 7324 bool _hasCodeRange; |
6810 List<idl.UnlinkedImport> _imports; | 7325 List<idl.UnlinkedImport> _imports; |
6811 List<idl.UnlinkedConst> _libraryAnnotations; | 7326 List<idl.UnlinkedConst> _libraryAnnotations; |
6812 idl.UnlinkedDocumentationComment _libraryDocumentationComment; | 7327 idl.UnlinkedDocumentationComment _libraryDocumentationComment; |
6813 String _libraryName; | 7328 String _libraryName; |
6814 int _libraryNameLength; | 7329 int _libraryNameLength; |
6815 int _libraryNameOffset; | 7330 int _libraryNameOffset; |
6816 List<idl.UnlinkedPart> _parts; | 7331 List<idl.UnlinkedPart> _parts; |
6817 idl.UnlinkedPublicNamespace _publicNamespace; | 7332 idl.UnlinkedPublicNamespace _publicNamespace; |
6818 List<idl.UnlinkedReference> _references; | 7333 List<idl.UnlinkedReference> _references; |
6819 List<idl.UnlinkedTypedef> _typedefs; | 7334 List<idl.UnlinkedTypedef> _typedefs; |
6820 List<idl.UnlinkedVariable> _variables; | 7335 List<idl.UnlinkedVariable> _variables; |
6821 | 7336 |
6822 @override | 7337 @override |
6823 List<idl.UnlinkedClass> get classes { | 7338 List<idl.UnlinkedClass> get classes { |
6824 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); | 7339 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead
er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); |
6825 return _classes; | 7340 return _classes; |
6826 } | 7341 } |
6827 | 7342 |
6828 @override | 7343 @override |
| 7344 int get codeLength { |
| 7345 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 17, 0); |
| 7346 return _codeLength; |
| 7347 } |
| 7348 |
| 7349 @override |
| 7350 int get codeOffset { |
| 7351 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 16, 0); |
| 7352 return _codeOffset; |
| 7353 } |
| 7354 |
| 7355 @override |
6829 List<idl.UnlinkedEnum> get enums { | 7356 List<idl.UnlinkedEnum> get enums { |
6830 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()
).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]); | 7357 _enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()
).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]); |
6831 return _enums; | 7358 return _enums; |
6832 } | 7359 } |
6833 | 7360 |
6834 @override | 7361 @override |
6835 List<idl.UnlinkedExecutable> get executables { | 7362 List<idl.UnlinkedExecutable> get executables { |
6836 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 4, const <idl.UnlinkedExecutable>[]); | 7363 _executables ??= const fb.ListReader<idl.UnlinkedExecutable>(const _Unlinked
ExecutableReader()).vTableGet(_bp, 4, const <idl.UnlinkedExecutable>[]); |
6837 return _executables; | 7364 return _executables; |
6838 } | 7365 } |
6839 | 7366 |
6840 @override | 7367 @override |
6841 List<idl.UnlinkedExportNonPublic> get exports { | 7368 List<idl.UnlinkedExportNonPublic> get exports { |
6842 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>(const _Unlinke
dExportNonPublicReader()).vTableGet(_bp, 13, const <idl.UnlinkedExportNonPublic>
[]); | 7369 _exports ??= const fb.ListReader<idl.UnlinkedExportNonPublic>(const _Unlinke
dExportNonPublicReader()).vTableGet(_bp, 13, const <idl.UnlinkedExportNonPublic>
[]); |
6843 return _exports; | 7370 return _exports; |
6844 } | 7371 } |
6845 | 7372 |
6846 @override | 7373 @override |
| 7374 bool get hasCodeRange { |
| 7375 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 15, false); |
| 7376 return _hasCodeRange; |
| 7377 } |
| 7378 |
| 7379 @override |
6847 List<idl.UnlinkedImport> get imports { | 7380 List<idl.UnlinkedImport> get imports { |
6848 _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportRe
ader()).vTableGet(_bp, 5, const <idl.UnlinkedImport>[]); | 7381 _imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportRe
ader()).vTableGet(_bp, 5, const <idl.UnlinkedImport>[]); |
6849 return _imports; | 7382 return _imports; |
6850 } | 7383 } |
6851 | 7384 |
6852 @override | 7385 @override |
6853 List<idl.UnlinkedConst> get libraryAnnotations { | 7386 List<idl.UnlinkedConst> get libraryAnnotations { |
6854 _libraryAnnotations ??= const fb.ListReader<idl.UnlinkedConst>(const _Unlink
edConstReader()).vTableGet(_bp, 14, const <idl.UnlinkedConst>[]); | 7387 _libraryAnnotations ??= const fb.ListReader<idl.UnlinkedConst>(const _Unlink
edConstReader()).vTableGet(_bp, 14, const <idl.UnlinkedConst>[]); |
6855 return _libraryAnnotations; | 7388 return _libraryAnnotations; |
6856 } | 7389 } |
(...skipping 51 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>[]); | 7441 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari
ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]); |
6909 return _variables; | 7442 return _variables; |
6910 } | 7443 } |
6911 } | 7444 } |
6912 | 7445 |
6913 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { | 7446 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { |
6914 @override | 7447 @override |
6915 Map<String, Object> toJson() { | 7448 Map<String, Object> toJson() { |
6916 Map<String, Object> _result = <String, Object>{}; | 7449 Map<String, Object> _result = <String, Object>{}; |
6917 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.
toJson()).toList(); | 7450 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.
toJson()).toList(); |
| 7451 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 7452 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
6918 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson
()).toList(); | 7453 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson
()).toList(); |
6919 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); | 7454 if (executables.isNotEmpty) _result["executables"] = executables.map((_value
) => _value.toJson()).toList(); |
6920 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); | 7455 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.
toJson()).toList(); |
| 7456 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
6921 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.
toJson()).toList(); | 7457 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.
toJson()).toList(); |
6922 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn
notations.map((_value) => _value.toJson()).toList(); | 7458 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn
notations.map((_value) => _value.toJson()).toList(); |
6923 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen
t"] = libraryDocumentationComment.toJson(); | 7459 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen
t"] = libraryDocumentationComment.toJson(); |
6924 if (libraryName != '') _result["libraryName"] = libraryName; | 7460 if (libraryName != '') _result["libraryName"] = libraryName; |
6925 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength
; | 7461 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength
; |
6926 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset
; | 7462 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset
; |
6927 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson
()).toList(); | 7463 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson
()).toList(); |
6928 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to
Json(); | 7464 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to
Json(); |
6929 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); | 7465 if (references.isNotEmpty) _result["references"] = references.map((_value) =
> _value.toJson()).toList(); |
6930 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val
ue.toJson()).toList(); | 7466 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val
ue.toJson()).toList(); |
6931 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _
value.toJson()).toList(); | 7467 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _
value.toJson()).toList(); |
6932 return _result; | 7468 return _result; |
6933 } | 7469 } |
6934 | 7470 |
6935 @override | 7471 @override |
6936 Map<String, Object> toMap() => { | 7472 Map<String, Object> toMap() => { |
6937 "classes": classes, | 7473 "classes": classes, |
| 7474 "codeLength": codeLength, |
| 7475 "codeOffset": codeOffset, |
6938 "enums": enums, | 7476 "enums": enums, |
6939 "executables": executables, | 7477 "executables": executables, |
6940 "exports": exports, | 7478 "exports": exports, |
| 7479 "hasCodeRange": hasCodeRange, |
6941 "imports": imports, | 7480 "imports": imports, |
6942 "libraryAnnotations": libraryAnnotations, | 7481 "libraryAnnotations": libraryAnnotations, |
6943 "libraryDocumentationComment": libraryDocumentationComment, | 7482 "libraryDocumentationComment": libraryDocumentationComment, |
6944 "libraryName": libraryName, | 7483 "libraryName": libraryName, |
6945 "libraryNameLength": libraryNameLength, | 7484 "libraryNameLength": libraryNameLength, |
6946 "libraryNameOffset": libraryNameOffset, | 7485 "libraryNameOffset": libraryNameOffset, |
6947 "parts": parts, | 7486 "parts": parts, |
6948 "publicNamespace": publicNamespace, | 7487 "publicNamespace": publicNamespace, |
6949 "references": references, | 7488 "references": references, |
6950 "typedefs": typedefs, | 7489 "typedefs": typedefs, |
6951 "variables": variables, | 7490 "variables": variables, |
6952 }; | 7491 }; |
6953 | 7492 |
6954 @override | 7493 @override |
6955 String toString() => convert.JSON.encode(toJson()); | 7494 String toString() => convert.JSON.encode(toJson()); |
6956 } | 7495 } |
6957 | 7496 |
6958 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { | 7497 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
nts idl.UnlinkedVariable { |
6959 bool _finished = false; | 7498 bool _finished = false; |
6960 | 7499 |
6961 List<UnlinkedConstBuilder> _annotations; | 7500 List<UnlinkedConstBuilder> _annotations; |
| 7501 int _codeLength; |
| 7502 int _codeOffset; |
6962 UnlinkedConstBuilder _constExpr; | 7503 UnlinkedConstBuilder _constExpr; |
6963 UnlinkedDocumentationCommentBuilder _documentationComment; | 7504 UnlinkedDocumentationCommentBuilder _documentationComment; |
| 7505 bool _hasCodeRange; |
6964 int _inferredTypeSlot; | 7506 int _inferredTypeSlot; |
6965 UnlinkedExecutableBuilder _initializer; | 7507 UnlinkedExecutableBuilder _initializer; |
6966 bool _isConst; | 7508 bool _isConst; |
6967 bool _isFinal; | 7509 bool _isFinal; |
6968 bool _isStatic; | 7510 bool _isStatic; |
6969 String _name; | 7511 String _name; |
6970 int _nameOffset; | 7512 int _nameOffset; |
6971 int _propagatedTypeSlot; | 7513 int _propagatedTypeSlot; |
6972 EntityRefBuilder _type; | 7514 EntityRefBuilder _type; |
6973 int _visibleLength; | 7515 int _visibleLength; |
6974 int _visibleOffset; | 7516 int _visibleOffset; |
6975 | 7517 |
6976 @override | 7518 @override |
6977 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; | 7519 List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstB
uilder>[]; |
6978 | 7520 |
6979 /** | 7521 /** |
6980 * Annotations for this variable. | 7522 * Annotations for this variable. |
6981 */ | 7523 */ |
6982 void set annotations(List<UnlinkedConstBuilder> _value) { | 7524 void set annotations(List<UnlinkedConstBuilder> _value) { |
6983 assert(!_finished); | 7525 assert(!_finished); |
6984 _annotations = _value; | 7526 _annotations = _value; |
6985 } | 7527 } |
6986 | 7528 |
6987 @override | 7529 @override |
| 7530 int get codeLength => _codeLength ??= 0; |
| 7531 |
| 7532 /** |
| 7533 * Length of the variable code. |
| 7534 */ |
| 7535 void set codeLength(int _value) { |
| 7536 assert(!_finished); |
| 7537 assert(_value == null || _value >= 0); |
| 7538 _codeLength = _value; |
| 7539 } |
| 7540 |
| 7541 @override |
| 7542 int get codeOffset => _codeOffset ??= 0; |
| 7543 |
| 7544 /** |
| 7545 * Offset of the variable code relative to the beginning of the file. |
| 7546 */ |
| 7547 void set codeOffset(int _value) { |
| 7548 assert(!_finished); |
| 7549 assert(_value == null || _value >= 0); |
| 7550 _codeOffset = _value; |
| 7551 } |
| 7552 |
| 7553 @override |
6988 UnlinkedConstBuilder get constExpr => _constExpr; | 7554 UnlinkedConstBuilder get constExpr => _constExpr; |
6989 | 7555 |
6990 /** | 7556 /** |
6991 * If [isConst] is true, and the variable has an initializer, the constant | 7557 * If [isConst] is true, and the variable has an initializer, the constant |
6992 * expression in the initializer. Note that the presence of this expression | 7558 * expression in the initializer. Note that the presence of this expression |
6993 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. | 7559 * does not mean that it is a valid, check [UnlinkedConst.isInvalid]. |
6994 */ | 7560 */ |
6995 void set constExpr(UnlinkedConstBuilder _value) { | 7561 void set constExpr(UnlinkedConstBuilder _value) { |
6996 assert(!_finished); | 7562 assert(!_finished); |
6997 _constExpr = _value; | 7563 _constExpr = _value; |
6998 } | 7564 } |
6999 | 7565 |
7000 @override | 7566 @override |
7001 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; | 7567 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation
Comment; |
7002 | 7568 |
7003 /** | 7569 /** |
7004 * Documentation comment for the variable, or `null` if there is no | 7570 * Documentation comment for the variable, or `null` if there is no |
7005 * documentation comment. | 7571 * documentation comment. |
7006 */ | 7572 */ |
7007 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { | 7573 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { |
7008 assert(!_finished); | 7574 assert(!_finished); |
7009 _documentationComment = _value; | 7575 _documentationComment = _value; |
7010 } | 7576 } |
7011 | 7577 |
7012 @override | 7578 @override |
| 7579 bool get hasCodeRange => _hasCodeRange ??= false; |
| 7580 |
| 7581 /** |
| 7582 * Indicates whether the variable has the code range. |
| 7583 */ |
| 7584 void set hasCodeRange(bool _value) { |
| 7585 assert(!_finished); |
| 7586 _hasCodeRange = _value; |
| 7587 } |
| 7588 |
| 7589 @override |
7013 int get inferredTypeSlot => _inferredTypeSlot ??= 0; | 7590 int get inferredTypeSlot => _inferredTypeSlot ??= 0; |
7014 | 7591 |
7015 /** | 7592 /** |
7016 * If this variable is inferable, nonzero slot id identifying which entry in | 7593 * If this variable is inferable, nonzero slot id identifying which entry in |
7017 * [LinkedLibrary.types] contains the inferred type for this variable. If | 7594 * [LinkedLibrary.types] contains the inferred type for this variable. If |
7018 * there is no matching entry in [LinkedLibrary.types], then no type was | 7595 * there is no matching entry in [LinkedLibrary.types], then no type was |
7019 * inferred for this variable, so its static type is `dynamic`. | 7596 * inferred for this variable, so its static type is `dynamic`. |
7020 */ | 7597 */ |
7021 void set inferredTypeSlot(int _value) { | 7598 void set inferredTypeSlot(int _value) { |
7022 assert(!_finished); | 7599 assert(!_finished); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7141 | 7718 |
7142 /** | 7719 /** |
7143 * If a local variable, the beginning of the visible range; zero otherwise. | 7720 * If a local variable, the beginning of the visible range; zero otherwise. |
7144 */ | 7721 */ |
7145 void set visibleOffset(int _value) { | 7722 void set visibleOffset(int _value) { |
7146 assert(!_finished); | 7723 assert(!_finished); |
7147 assert(_value == null || _value >= 0); | 7724 assert(_value == null || _value >= 0); |
7148 _visibleOffset = _value; | 7725 _visibleOffset = _value; |
7149 } | 7726 } |
7150 | 7727 |
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}) | 7728 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, int codeLengt
h, int codeOffset, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentB
uilder documentationComment, bool hasCodeRange, int inferredTypeSlot, UnlinkedEx
ecutableBuilder initializer, bool isConst, bool isFinal, bool isStatic, String n
ame, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleL
ength, int visibleOffset}) |
7152 : _annotations = annotations, | 7729 : _annotations = annotations, |
| 7730 _codeLength = codeLength, |
| 7731 _codeOffset = codeOffset, |
7153 _constExpr = constExpr, | 7732 _constExpr = constExpr, |
7154 _documentationComment = documentationComment, | 7733 _documentationComment = documentationComment, |
| 7734 _hasCodeRange = hasCodeRange, |
7155 _inferredTypeSlot = inferredTypeSlot, | 7735 _inferredTypeSlot = inferredTypeSlot, |
7156 _initializer = initializer, | 7736 _initializer = initializer, |
7157 _isConst = isConst, | 7737 _isConst = isConst, |
7158 _isFinal = isFinal, | 7738 _isFinal = isFinal, |
7159 _isStatic = isStatic, | 7739 _isStatic = isStatic, |
7160 _name = name, | 7740 _name = name, |
7161 _nameOffset = nameOffset, | 7741 _nameOffset = nameOffset, |
7162 _propagatedTypeSlot = propagatedTypeSlot, | 7742 _propagatedTypeSlot = propagatedTypeSlot, |
7163 _type = type, | 7743 _type = type, |
7164 _visibleLength = visibleLength, | 7744 _visibleLength = visibleLength, |
(...skipping 23 matching lines...) Expand all Loading... |
7188 if (_name != null) { | 7768 if (_name != null) { |
7189 offset_name = fbBuilder.writeString(_name); | 7769 offset_name = fbBuilder.writeString(_name); |
7190 } | 7770 } |
7191 if (_type != null) { | 7771 if (_type != null) { |
7192 offset_type = _type.finish(fbBuilder); | 7772 offset_type = _type.finish(fbBuilder); |
7193 } | 7773 } |
7194 fbBuilder.startTable(); | 7774 fbBuilder.startTable(); |
7195 if (offset_annotations != null) { | 7775 if (offset_annotations != null) { |
7196 fbBuilder.addOffset(8, offset_annotations); | 7776 fbBuilder.addOffset(8, offset_annotations); |
7197 } | 7777 } |
| 7778 if (_codeLength != null && _codeLength != 0) { |
| 7779 fbBuilder.addUint32(16, _codeLength); |
| 7780 } |
| 7781 if (_codeOffset != null && _codeOffset != 0) { |
| 7782 fbBuilder.addUint32(15, _codeOffset); |
| 7783 } |
7198 if (offset_constExpr != null) { | 7784 if (offset_constExpr != null) { |
7199 fbBuilder.addOffset(5, offset_constExpr); | 7785 fbBuilder.addOffset(5, offset_constExpr); |
7200 } | 7786 } |
7201 if (offset_documentationComment != null) { | 7787 if (offset_documentationComment != null) { |
7202 fbBuilder.addOffset(10, offset_documentationComment); | 7788 fbBuilder.addOffset(10, offset_documentationComment); |
7203 } | 7789 } |
| 7790 if (_hasCodeRange == true) { |
| 7791 fbBuilder.addBool(14, true); |
| 7792 } |
7204 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | 7793 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
7205 fbBuilder.addUint32(9, _inferredTypeSlot); | 7794 fbBuilder.addUint32(9, _inferredTypeSlot); |
7206 } | 7795 } |
7207 if (offset_initializer != null) { | 7796 if (offset_initializer != null) { |
7208 fbBuilder.addOffset(13, offset_initializer); | 7797 fbBuilder.addOffset(13, offset_initializer); |
7209 } | 7798 } |
7210 if (_isConst == true) { | 7799 if (_isConst == true) { |
7211 fbBuilder.addBool(6, true); | 7800 fbBuilder.addBool(6, true); |
7212 } | 7801 } |
7213 if (_isFinal == true) { | 7802 if (_isFinal == true) { |
(...skipping 30 matching lines...) Expand all Loading... |
7244 @override | 7833 @override |
7245 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab
leImpl(bp); | 7834 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab
leImpl(bp); |
7246 } | 7835 } |
7247 | 7836 |
7248 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { | 7837 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
s idl.UnlinkedVariable { |
7249 final fb.BufferPointer _bp; | 7838 final fb.BufferPointer _bp; |
7250 | 7839 |
7251 _UnlinkedVariableImpl(this._bp); | 7840 _UnlinkedVariableImpl(this._bp); |
7252 | 7841 |
7253 List<idl.UnlinkedConst> _annotations; | 7842 List<idl.UnlinkedConst> _annotations; |
| 7843 int _codeLength; |
| 7844 int _codeOffset; |
7254 idl.UnlinkedConst _constExpr; | 7845 idl.UnlinkedConst _constExpr; |
7255 idl.UnlinkedDocumentationComment _documentationComment; | 7846 idl.UnlinkedDocumentationComment _documentationComment; |
| 7847 bool _hasCodeRange; |
7256 int _inferredTypeSlot; | 7848 int _inferredTypeSlot; |
7257 idl.UnlinkedExecutable _initializer; | 7849 idl.UnlinkedExecutable _initializer; |
7258 bool _isConst; | 7850 bool _isConst; |
7259 bool _isFinal; | 7851 bool _isFinal; |
7260 bool _isStatic; | 7852 bool _isStatic; |
7261 String _name; | 7853 String _name; |
7262 int _nameOffset; | 7854 int _nameOffset; |
7263 int _propagatedTypeSlot; | 7855 int _propagatedTypeSlot; |
7264 idl.EntityRef _type; | 7856 idl.EntityRef _type; |
7265 int _visibleLength; | 7857 int _visibleLength; |
7266 int _visibleOffset; | 7858 int _visibleOffset; |
7267 | 7859 |
7268 @override | 7860 @override |
7269 List<idl.UnlinkedConst> get annotations { | 7861 List<idl.UnlinkedConst> get annotations { |
7270 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]); | 7862 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst
Reader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]); |
7271 return _annotations; | 7863 return _annotations; |
7272 } | 7864 } |
7273 | 7865 |
7274 @override | 7866 @override |
| 7867 int get codeLength { |
| 7868 _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 16, 0); |
| 7869 return _codeLength; |
| 7870 } |
| 7871 |
| 7872 @override |
| 7873 int get codeOffset { |
| 7874 _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 15, 0); |
| 7875 return _codeOffset; |
| 7876 } |
| 7877 |
| 7878 @override |
7275 idl.UnlinkedConst get constExpr { | 7879 idl.UnlinkedConst get constExpr { |
7276 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 5, null); | 7880 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 5, null); |
7277 return _constExpr; | 7881 return _constExpr; |
7278 } | 7882 } |
7279 | 7883 |
7280 @override | 7884 @override |
7281 idl.UnlinkedDocumentationComment get documentationComment { | 7885 idl.UnlinkedDocumentationComment get documentationComment { |
7282 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 10, null); | 7886 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable
Get(_bp, 10, null); |
7283 return _documentationComment; | 7887 return _documentationComment; |
7284 } | 7888 } |
7285 | 7889 |
7286 @override | 7890 @override |
| 7891 bool get hasCodeRange { |
| 7892 _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 14, false); |
| 7893 return _hasCodeRange; |
| 7894 } |
| 7895 |
| 7896 @override |
7287 int get inferredTypeSlot { | 7897 int get inferredTypeSlot { |
7288 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); | 7898 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0); |
7289 return _inferredTypeSlot; | 7899 return _inferredTypeSlot; |
7290 } | 7900 } |
7291 | 7901 |
7292 @override | 7902 @override |
7293 idl.UnlinkedExecutable get initializer { | 7903 idl.UnlinkedExecutable get initializer { |
7294 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 13, null); | 7904 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 13, null); |
7295 return _initializer; | 7905 return _initializer; |
7296 } | 7906 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7348 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 12, 0); | 7958 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 12, 0); |
7349 return _visibleOffset; | 7959 return _visibleOffset; |
7350 } | 7960 } |
7351 } | 7961 } |
7352 | 7962 |
7353 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { | 7963 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { |
7354 @override | 7964 @override |
7355 Map<String, Object> toJson() { | 7965 Map<String, Object> toJson() { |
7356 Map<String, Object> _result = <String, Object>{}; | 7966 Map<String, Object> _result = <String, Object>{}; |
7357 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); | 7967 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value
) => _value.toJson()).toList(); |
| 7968 if (codeLength != 0) _result["codeLength"] = codeLength; |
| 7969 if (codeOffset != 0) _result["codeOffset"] = codeOffset; |
7358 if (constExpr != null) _result["constExpr"] = constExpr.toJson(); | 7970 if (constExpr != null) _result["constExpr"] = constExpr.toJson(); |
7359 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); | 7971 if (documentationComment != null) _result["documentationComment"] = document
ationComment.toJson(); |
| 7972 if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange; |
7360 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; | 7973 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; |
7361 if (initializer != null) _result["initializer"] = initializer.toJson(); | 7974 if (initializer != null) _result["initializer"] = initializer.toJson(); |
7362 if (isConst != false) _result["isConst"] = isConst; | 7975 if (isConst != false) _result["isConst"] = isConst; |
7363 if (isFinal != false) _result["isFinal"] = isFinal; | 7976 if (isFinal != false) _result["isFinal"] = isFinal; |
7364 if (isStatic != false) _result["isStatic"] = isStatic; | 7977 if (isStatic != false) _result["isStatic"] = isStatic; |
7365 if (name != '') _result["name"] = name; | 7978 if (name != '') _result["name"] = name; |
7366 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 7979 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
7367 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS
lot; | 7980 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS
lot; |
7368 if (type != null) _result["type"] = type.toJson(); | 7981 if (type != null) _result["type"] = type.toJson(); |
7369 if (visibleLength != 0) _result["visibleLength"] = visibleLength; | 7982 if (visibleLength != 0) _result["visibleLength"] = visibleLength; |
7370 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; | 7983 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; |
7371 return _result; | 7984 return _result; |
7372 } | 7985 } |
7373 | 7986 |
7374 @override | 7987 @override |
7375 Map<String, Object> toMap() => { | 7988 Map<String, Object> toMap() => { |
7376 "annotations": annotations, | 7989 "annotations": annotations, |
| 7990 "codeLength": codeLength, |
| 7991 "codeOffset": codeOffset, |
7377 "constExpr": constExpr, | 7992 "constExpr": constExpr, |
7378 "documentationComment": documentationComment, | 7993 "documentationComment": documentationComment, |
| 7994 "hasCodeRange": hasCodeRange, |
7379 "inferredTypeSlot": inferredTypeSlot, | 7995 "inferredTypeSlot": inferredTypeSlot, |
7380 "initializer": initializer, | 7996 "initializer": initializer, |
7381 "isConst": isConst, | 7997 "isConst": isConst, |
7382 "isFinal": isFinal, | 7998 "isFinal": isFinal, |
7383 "isStatic": isStatic, | 7999 "isStatic": isStatic, |
7384 "name": name, | 8000 "name": name, |
7385 "nameOffset": nameOffset, | 8001 "nameOffset": nameOffset, |
7386 "propagatedTypeSlot": propagatedTypeSlot, | 8002 "propagatedTypeSlot": propagatedTypeSlot, |
7387 "type": type, | 8003 "type": type, |
7388 "visibleLength": visibleLength, | 8004 "visibleLength": visibleLength, |
7389 "visibleOffset": visibleOffset, | 8005 "visibleOffset": visibleOffset, |
7390 }; | 8006 }; |
7391 | 8007 |
7392 @override | 8008 @override |
7393 String toString() => convert.JSON.encode(toJson()); | 8009 String toString() => convert.JSON.encode(toJson()); |
7394 } | 8010 } |
7395 | 8011 |
OLD | NEW |