| 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 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2340 */ | 2340 */ |
| 2341 void set isExternal(bool _value) { | 2341 void set isExternal(bool _value) { |
| 2342 assert(!_finished); | 2342 assert(!_finished); |
| 2343 _isExternal = _value; | 2343 _isExternal = _value; |
| 2344 } | 2344 } |
| 2345 | 2345 |
| 2346 @override | 2346 @override |
| 2347 int get inferredReturnTypeSlot => _inferredReturnTypeSlot ??= 0; | 2347 int get inferredReturnTypeSlot => _inferredReturnTypeSlot ??= 0; |
| 2348 | 2348 |
| 2349 /** | 2349 /** |
| 2350 * If this executable's return type is inferrable, nonzero slot id | 2350 * If this executable's return type is inferable, nonzero slot id |
| 2351 * identifying which entry in [LinkedLibrary.types] contains the inferred | 2351 * identifying which entry in [LinkedLibrary.types] contains the inferred |
| 2352 * return type. If there is no matching entry in [LinkedLibrary.types], then | 2352 * return type. If there is no matching entry in [LinkedLibrary.types], then |
| 2353 * no return type was inferred for this variable, so its static type is | 2353 * no return type was inferred for this variable, so its static type is |
| 2354 * `dynamic`. | 2354 * `dynamic`. |
| 2355 */ | 2355 */ |
| 2356 void set inferredReturnTypeSlot(int _value) { | 2356 void set inferredReturnTypeSlot(int _value) { |
| 2357 assert(!_finished); | 2357 assert(!_finished); |
| 2358 assert(_value == null || _value >= 0); | 2358 assert(_value == null || _value >= 0); |
| 2359 _inferredReturnTypeSlot = _value; | 2359 _inferredReturnTypeSlot = _value; |
| 2360 } | 2360 } |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 bool _finished = false; | 3040 bool _finished = false; |
| 3041 | 3041 |
| 3042 String _name; | 3042 String _name; |
| 3043 int _nameOffset; | 3043 int _nameOffset; |
| 3044 EntityRefBuilder _type; | 3044 EntityRefBuilder _type; |
| 3045 List<UnlinkedParamBuilder> _parameters; | 3045 List<UnlinkedParamBuilder> _parameters; |
| 3046 idl.UnlinkedParamKind _kind; | 3046 idl.UnlinkedParamKind _kind; |
| 3047 bool _isFunctionTyped; | 3047 bool _isFunctionTyped; |
| 3048 bool _isInitializingFormal; | 3048 bool _isInitializingFormal; |
| 3049 int _inferredTypeSlot; | 3049 int _inferredTypeSlot; |
| 3050 UnlinkedConstBuilder _defaultValue; |
| 3050 | 3051 |
| 3051 @override | 3052 @override |
| 3052 String get name => _name ??= ''; | 3053 String get name => _name ??= ''; |
| 3053 | 3054 |
| 3054 /** | 3055 /** |
| 3055 * Name of the parameter. | 3056 * Name of the parameter. |
| 3056 */ | 3057 */ |
| 3057 void set name(String _value) { | 3058 void set name(String _value) { |
| 3058 assert(!_finished); | 3059 assert(!_finished); |
| 3059 _name = _value; | 3060 _name = _value; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3126 */ | 3127 */ |
| 3127 void set isInitializingFormal(bool _value) { | 3128 void set isInitializingFormal(bool _value) { |
| 3128 assert(!_finished); | 3129 assert(!_finished); |
| 3129 _isInitializingFormal = _value; | 3130 _isInitializingFormal = _value; |
| 3130 } | 3131 } |
| 3131 | 3132 |
| 3132 @override | 3133 @override |
| 3133 int get inferredTypeSlot => _inferredTypeSlot ??= 0; | 3134 int get inferredTypeSlot => _inferredTypeSlot ??= 0; |
| 3134 | 3135 |
| 3135 /** | 3136 /** |
| 3136 * If this parameter's type is inferrable, nonzero slot id identifying which | 3137 * If this parameter's type is inferable, nonzero slot id identifying which |
| 3137 * entry in [LinkedLibrary.types] contains the inferred type. If there is no | 3138 * entry in [LinkedLibrary.types] contains the inferred type. If there is no |
| 3138 * matching entry in [LinkedLibrary.types], then no type was inferred for | 3139 * matching entry in [LinkedLibrary.types], then no type was inferred for |
| 3139 * this variable, so its static type is `dynamic`. | 3140 * this variable, so its static type is `dynamic`. |
| 3140 * | 3141 * |
| 3141 * Note that although strong mode considers initializing formals to be | 3142 * Note that although strong mode considers initializing formals to be |
| 3142 * inferrable, they are not marked as such in the summary; if their type is | 3143 * inferable, they are not marked as such in the summary; if their type is |
| 3143 * not specified, they always inherit the static type of the corresponding | 3144 * not specified, they always inherit the static type of the corresponding |
| 3144 * field. | 3145 * field. |
| 3145 */ | 3146 */ |
| 3146 void set inferredTypeSlot(int _value) { | 3147 void set inferredTypeSlot(int _value) { |
| 3147 assert(!_finished); | 3148 assert(!_finished); |
| 3148 assert(_value == null || _value >= 0); | 3149 assert(_value == null || _value >= 0); |
| 3149 _inferredTypeSlot = _value; | 3150 _inferredTypeSlot = _value; |
| 3150 } | 3151 } |
| 3151 | 3152 |
| 3152 UnlinkedParamBuilder({String name, int nameOffset, EntityRefBuilder type, List
<UnlinkedParamBuilder> parameters, idl.UnlinkedParamKind kind, bool isFunctionTy
ped, bool isInitializingFormal, int inferredTypeSlot}) | 3153 @override |
| 3154 UnlinkedConstBuilder get defaultValue => _defaultValue; |
| 3155 |
| 3156 /** |
| 3157 * If the parameter has a default value the constant expression in the |
| 3158 * default value. |
| 3159 */ |
| 3160 void set defaultValue(UnlinkedConstBuilder _value) { |
| 3161 assert(!_finished); |
| 3162 _defaultValue = _value; |
| 3163 } |
| 3164 |
| 3165 UnlinkedParamBuilder({String name, int nameOffset, EntityRefBuilder type, List
<UnlinkedParamBuilder> parameters, idl.UnlinkedParamKind kind, bool isFunctionTy
ped, bool isInitializingFormal, int inferredTypeSlot, UnlinkedConstBuilder defau
ltValue}) |
| 3153 : _name = name, | 3166 : _name = name, |
| 3154 _nameOffset = nameOffset, | 3167 _nameOffset = nameOffset, |
| 3155 _type = type, | 3168 _type = type, |
| 3156 _parameters = parameters, | 3169 _parameters = parameters, |
| 3157 _kind = kind, | 3170 _kind = kind, |
| 3158 _isFunctionTyped = isFunctionTyped, | 3171 _isFunctionTyped = isFunctionTyped, |
| 3159 _isInitializingFormal = isInitializingFormal, | 3172 _isInitializingFormal = isInitializingFormal, |
| 3160 _inferredTypeSlot = inferredTypeSlot; | 3173 _inferredTypeSlot = inferredTypeSlot, |
| 3174 _defaultValue = defaultValue; |
| 3161 | 3175 |
| 3162 fb.Offset finish(fb.Builder fbBuilder) { | 3176 fb.Offset finish(fb.Builder fbBuilder) { |
| 3163 assert(!_finished); | 3177 assert(!_finished); |
| 3164 _finished = true; | 3178 _finished = true; |
| 3165 fb.Offset offset_name; | 3179 fb.Offset offset_name; |
| 3166 fb.Offset offset_type; | 3180 fb.Offset offset_type; |
| 3167 fb.Offset offset_parameters; | 3181 fb.Offset offset_parameters; |
| 3182 fb.Offset offset_defaultValue; |
| 3168 if (_name != null) { | 3183 if (_name != null) { |
| 3169 offset_name = fbBuilder.writeString(_name); | 3184 offset_name = fbBuilder.writeString(_name); |
| 3170 } | 3185 } |
| 3171 if (_type != null) { | 3186 if (_type != null) { |
| 3172 offset_type = _type.finish(fbBuilder); | 3187 offset_type = _type.finish(fbBuilder); |
| 3173 } | 3188 } |
| 3174 if (!(_parameters == null || _parameters.isEmpty)) { | 3189 if (!(_parameters == null || _parameters.isEmpty)) { |
| 3175 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); | 3190 offset_parameters = fbBuilder.writeList(_parameters.map((b) => b.finish(fb
Builder)).toList()); |
| 3176 } | 3191 } |
| 3192 if (_defaultValue != null) { |
| 3193 offset_defaultValue = _defaultValue.finish(fbBuilder); |
| 3194 } |
| 3177 fbBuilder.startTable(); | 3195 fbBuilder.startTable(); |
| 3178 if (offset_name != null) { | 3196 if (offset_name != null) { |
| 3179 fbBuilder.addOffset(0, offset_name); | 3197 fbBuilder.addOffset(0, offset_name); |
| 3180 } | 3198 } |
| 3181 if (_nameOffset != null && _nameOffset != 0) { | 3199 if (_nameOffset != null && _nameOffset != 0) { |
| 3182 fbBuilder.addUint32(1, _nameOffset); | 3200 fbBuilder.addUint32(1, _nameOffset); |
| 3183 } | 3201 } |
| 3184 if (offset_type != null) { | 3202 if (offset_type != null) { |
| 3185 fbBuilder.addOffset(2, offset_type); | 3203 fbBuilder.addOffset(2, offset_type); |
| 3186 } | 3204 } |
| 3187 if (offset_parameters != null) { | 3205 if (offset_parameters != null) { |
| 3188 fbBuilder.addOffset(3, offset_parameters); | 3206 fbBuilder.addOffset(3, offset_parameters); |
| 3189 } | 3207 } |
| 3190 if (_kind != null && _kind != idl.UnlinkedParamKind.required) { | 3208 if (_kind != null && _kind != idl.UnlinkedParamKind.required) { |
| 3191 fbBuilder.addUint32(4, _kind.index); | 3209 fbBuilder.addUint32(4, _kind.index); |
| 3192 } | 3210 } |
| 3193 if (_isFunctionTyped == true) { | 3211 if (_isFunctionTyped == true) { |
| 3194 fbBuilder.addBool(5, true); | 3212 fbBuilder.addBool(5, true); |
| 3195 } | 3213 } |
| 3196 if (_isInitializingFormal == true) { | 3214 if (_isInitializingFormal == true) { |
| 3197 fbBuilder.addBool(6, true); | 3215 fbBuilder.addBool(6, true); |
| 3198 } | 3216 } |
| 3199 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { | 3217 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { |
| 3200 fbBuilder.addUint32(7, _inferredTypeSlot); | 3218 fbBuilder.addUint32(7, _inferredTypeSlot); |
| 3201 } | 3219 } |
| 3220 if (offset_defaultValue != null) { |
| 3221 fbBuilder.addOffset(8, offset_defaultValue); |
| 3222 } |
| 3202 return fbBuilder.endTable(); | 3223 return fbBuilder.endTable(); |
| 3203 } | 3224 } |
| 3204 } | 3225 } |
| 3205 | 3226 |
| 3206 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { | 3227 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { |
| 3207 const _UnlinkedParamReader(); | 3228 const _UnlinkedParamReader(); |
| 3208 | 3229 |
| 3209 @override | 3230 @override |
| 3210 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); | 3231 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl
(bp); |
| 3211 } | 3232 } |
| 3212 | 3233 |
| 3213 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { | 3234 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
UnlinkedParam { |
| 3214 final fb.BufferPointer _bp; | 3235 final fb.BufferPointer _bp; |
| 3215 | 3236 |
| 3216 _UnlinkedParamImpl(this._bp); | 3237 _UnlinkedParamImpl(this._bp); |
| 3217 | 3238 |
| 3218 String _name; | 3239 String _name; |
| 3219 int _nameOffset; | 3240 int _nameOffset; |
| 3220 idl.EntityRef _type; | 3241 idl.EntityRef _type; |
| 3221 List<idl.UnlinkedParam> _parameters; | 3242 List<idl.UnlinkedParam> _parameters; |
| 3222 idl.UnlinkedParamKind _kind; | 3243 idl.UnlinkedParamKind _kind; |
| 3223 bool _isFunctionTyped; | 3244 bool _isFunctionTyped; |
| 3224 bool _isInitializingFormal; | 3245 bool _isInitializingFormal; |
| 3225 int _inferredTypeSlot; | 3246 int _inferredTypeSlot; |
| 3247 idl.UnlinkedConst _defaultValue; |
| 3226 | 3248 |
| 3227 @override | 3249 @override |
| 3228 String get name { | 3250 String get name { |
| 3229 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); | 3251 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); |
| 3230 return _name; | 3252 return _name; |
| 3231 } | 3253 } |
| 3232 | 3254 |
| 3233 @override | 3255 @override |
| 3234 int get nameOffset { | 3256 int get nameOffset { |
| 3235 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); | 3257 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 3264 bool get isInitializingFormal { | 3286 bool get isInitializingFormal { |
| 3265 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bp, 6, false); | 3287 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bp, 6, false); |
| 3266 return _isInitializingFormal; | 3288 return _isInitializingFormal; |
| 3267 } | 3289 } |
| 3268 | 3290 |
| 3269 @override | 3291 @override |
| 3270 int get inferredTypeSlot { | 3292 int get inferredTypeSlot { |
| 3271 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0); | 3293 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0); |
| 3272 return _inferredTypeSlot; | 3294 return _inferredTypeSlot; |
| 3273 } | 3295 } |
| 3296 |
| 3297 @override |
| 3298 idl.UnlinkedConst get defaultValue { |
| 3299 _defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 8, null); |
| 3300 return _defaultValue; |
| 3301 } |
| 3274 } | 3302 } |
| 3275 | 3303 |
| 3276 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { | 3304 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { |
| 3277 @override | 3305 @override |
| 3278 Map<String, Object> toMap() => { | 3306 Map<String, Object> toMap() => { |
| 3279 "name": name, | 3307 "name": name, |
| 3280 "nameOffset": nameOffset, | 3308 "nameOffset": nameOffset, |
| 3281 "type": type, | 3309 "type": type, |
| 3282 "parameters": parameters, | 3310 "parameters": parameters, |
| 3283 "kind": kind, | 3311 "kind": kind, |
| 3284 "isFunctionTyped": isFunctionTyped, | 3312 "isFunctionTyped": isFunctionTyped, |
| 3285 "isInitializingFormal": isInitializingFormal, | 3313 "isInitializingFormal": isInitializingFormal, |
| 3286 "inferredTypeSlot": inferredTypeSlot, | 3314 "inferredTypeSlot": inferredTypeSlot, |
| 3315 "defaultValue": defaultValue, |
| 3287 }; | 3316 }; |
| 3288 } | 3317 } |
| 3289 | 3318 |
| 3290 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl.
UnlinkedPart { | 3319 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements idl.
UnlinkedPart { |
| 3291 bool _finished = false; | 3320 bool _finished = false; |
| 3292 | 3321 |
| 3293 int _uriOffset; | 3322 int _uriOffset; |
| 3294 int _uriEnd; | 3323 int _uriEnd; |
| 3295 | 3324 |
| 3296 @override | 3325 @override |
| (...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4616 void set propagatedTypeSlot(int _value) { | 4645 void set propagatedTypeSlot(int _value) { |
| 4617 assert(!_finished); | 4646 assert(!_finished); |
| 4618 assert(_value == null || _value >= 0); | 4647 assert(_value == null || _value >= 0); |
| 4619 _propagatedTypeSlot = _value; | 4648 _propagatedTypeSlot = _value; |
| 4620 } | 4649 } |
| 4621 | 4650 |
| 4622 @override | 4651 @override |
| 4623 int get inferredTypeSlot => _inferredTypeSlot ??= 0; | 4652 int get inferredTypeSlot => _inferredTypeSlot ??= 0; |
| 4624 | 4653 |
| 4625 /** | 4654 /** |
| 4626 * If this variable is inferrable, nonzero slot id identifying which entry in | 4655 * If this variable is inferable, nonzero slot id identifying which entry in |
| 4627 * [LinkedLibrary.types] contains the inferred type for this variable. If | 4656 * [LinkedLibrary.types] contains the inferred type for this variable. If |
| 4628 * there is no matching entry in [LinkedLibrary.types], then no type was | 4657 * there is no matching entry in [LinkedLibrary.types], then no type was |
| 4629 * inferred for this variable, so its static type is `dynamic`. | 4658 * inferred for this variable, so its static type is `dynamic`. |
| 4630 */ | 4659 */ |
| 4631 void set inferredTypeSlot(int _value) { | 4660 void set inferredTypeSlot(int _value) { |
| 4632 assert(!_finished); | 4661 assert(!_finished); |
| 4633 assert(_value == null || _value >= 0); | 4662 assert(_value == null || _value >= 0); |
| 4634 _inferredTypeSlot = _value; | 4663 _inferredTypeSlot = _value; |
| 4635 } | 4664 } |
| 4636 | 4665 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4793 "type": type, | 4822 "type": type, |
| 4794 "constExpr": constExpr, | 4823 "constExpr": constExpr, |
| 4795 "isStatic": isStatic, | 4824 "isStatic": isStatic, |
| 4796 "isFinal": isFinal, | 4825 "isFinal": isFinal, |
| 4797 "isConst": isConst, | 4826 "isConst": isConst, |
| 4798 "propagatedTypeSlot": propagatedTypeSlot, | 4827 "propagatedTypeSlot": propagatedTypeSlot, |
| 4799 "inferredTypeSlot": inferredTypeSlot, | 4828 "inferredTypeSlot": inferredTypeSlot, |
| 4800 }; | 4829 }; |
| 4801 } | 4830 } |
| 4802 | 4831 |
| OLD | NEW |