Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 2657583007: Record isFinal for parameters into summaries. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/summary/format.fbs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7908 matching lines...) Expand 10 before | Expand all | Expand 10 after
7919 } 7919 }
7920 7920
7921 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id l.UnlinkedParam { 7921 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id l.UnlinkedParam {
7922 List<UnlinkedExprBuilder> _annotations; 7922 List<UnlinkedExprBuilder> _annotations;
7923 CodeRangeBuilder _codeRange; 7923 CodeRangeBuilder _codeRange;
7924 String _defaultValueCode; 7924 String _defaultValueCode;
7925 int _inferredTypeSlot; 7925 int _inferredTypeSlot;
7926 int _inheritsCovariantSlot; 7926 int _inheritsCovariantSlot;
7927 UnlinkedExecutableBuilder _initializer; 7927 UnlinkedExecutableBuilder _initializer;
7928 bool _isExplicitlyCovariant; 7928 bool _isExplicitlyCovariant;
7929 bool _isFinal;
7929 bool _isFunctionTyped; 7930 bool _isFunctionTyped;
7930 bool _isInitializingFormal; 7931 bool _isInitializingFormal;
7931 idl.UnlinkedParamKind _kind; 7932 idl.UnlinkedParamKind _kind;
7932 String _name; 7933 String _name;
7933 int _nameOffset; 7934 int _nameOffset;
7934 List<UnlinkedParamBuilder> _parameters; 7935 List<UnlinkedParamBuilder> _parameters;
7935 EntityRefBuilder _type; 7936 EntityRefBuilder _type;
7936 int _visibleLength; 7937 int _visibleLength;
7937 int _visibleOffset; 7938 int _visibleOffset;
7938 7939
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
8017 bool get isExplicitlyCovariant => _isExplicitlyCovariant ??= false; 8018 bool get isExplicitlyCovariant => _isExplicitlyCovariant ??= false;
8018 8019
8019 /** 8020 /**
8020 * Indicates whether this parameter is explicitly marked as being covariant. 8021 * Indicates whether this parameter is explicitly marked as being covariant.
8021 */ 8022 */
8022 void set isExplicitlyCovariant(bool value) { 8023 void set isExplicitlyCovariant(bool value) {
8023 this._isExplicitlyCovariant = value; 8024 this._isExplicitlyCovariant = value;
8024 } 8025 }
8025 8026
8026 @override 8027 @override
8028 bool get isFinal => _isFinal ??= false;
8029
8030 /**
8031 * Indicates whether the parameter is declared using the `final` keyword.
8032 */
8033 void set isFinal(bool value) {
8034 this._isFinal = value;
8035 }
8036
8037 @override
8027 bool get isFunctionTyped => _isFunctionTyped ??= false; 8038 bool get isFunctionTyped => _isFunctionTyped ??= false;
8028 8039
8029 /** 8040 /**
8030 * Indicates whether this is a function-typed parameter. 8041 * Indicates whether this is a function-typed parameter.
8031 */ 8042 */
8032 void set isFunctionTyped(bool value) { 8043 void set isFunctionTyped(bool value) {
8033 this._isFunctionTyped = value; 8044 this._isFunctionTyped = value;
8034 } 8045 }
8035 8046
8036 @override 8047 @override
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
8112 int get visibleOffset => _visibleOffset ??= 0; 8123 int get visibleOffset => _visibleOffset ??= 0;
8113 8124
8114 /** 8125 /**
8115 * The beginning of the visible range. 8126 * The beginning of the visible range.
8116 */ 8127 */
8117 void set visibleOffset(int value) { 8128 void set visibleOffset(int value) {
8118 assert(value == null || value >= 0); 8129 assert(value == null || value >= 0);
8119 this._visibleOffset = value; 8130 this._visibleOffset = value;
8120 } 8131 }
8121 8132
8122 UnlinkedParamBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder codeRange, String defaultValueCode, int inferredTypeSlot, int inheritsCovariantS lot, UnlinkedExecutableBuilder initializer, bool isExplicitlyCovariant, bool isF unctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name , int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset}) 8133 UnlinkedParamBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder codeRange, String defaultValueCode, int inferredTypeSlot, int inheritsCovariantS lot, UnlinkedExecutableBuilder initializer, bool isExplicitlyCovariant, bool isF inal, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kin d, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRef Builder type, int visibleLength, int visibleOffset})
8123 : _annotations = annotations, 8134 : _annotations = annotations,
8124 _codeRange = codeRange, 8135 _codeRange = codeRange,
8125 _defaultValueCode = defaultValueCode, 8136 _defaultValueCode = defaultValueCode,
8126 _inferredTypeSlot = inferredTypeSlot, 8137 _inferredTypeSlot = inferredTypeSlot,
8127 _inheritsCovariantSlot = inheritsCovariantSlot, 8138 _inheritsCovariantSlot = inheritsCovariantSlot,
8128 _initializer = initializer, 8139 _initializer = initializer,
8129 _isExplicitlyCovariant = isExplicitlyCovariant, 8140 _isExplicitlyCovariant = isExplicitlyCovariant,
8141 _isFinal = isFinal,
8130 _isFunctionTyped = isFunctionTyped, 8142 _isFunctionTyped = isFunctionTyped,
8131 _isInitializingFormal = isInitializingFormal, 8143 _isInitializingFormal = isInitializingFormal,
8132 _kind = kind, 8144 _kind = kind,
8133 _name = name, 8145 _name = name,
8134 _nameOffset = nameOffset, 8146 _nameOffset = nameOffset,
8135 _parameters = parameters, 8147 _parameters = parameters,
8136 _type = type, 8148 _type = type,
8137 _visibleLength = visibleLength, 8149 _visibleLength = visibleLength,
8138 _visibleOffset = visibleOffset; 8150 _visibleOffset = visibleOffset;
8139 8151
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
8176 } else { 8188 } else {
8177 signature.addInt(this._annotations.length); 8189 signature.addInt(this._annotations.length);
8178 for (var x in this._annotations) { 8190 for (var x in this._annotations) {
8179 x?.collectApiSignature(signature); 8191 x?.collectApiSignature(signature);
8180 } 8192 }
8181 } 8193 }
8182 signature.addBool(this._initializer != null); 8194 signature.addBool(this._initializer != null);
8183 this._initializer?.collectApiSignature(signature); 8195 this._initializer?.collectApiSignature(signature);
8184 signature.addInt(this._inheritsCovariantSlot ?? 0); 8196 signature.addInt(this._inheritsCovariantSlot ?? 0);
8185 signature.addBool(this._isExplicitlyCovariant == true); 8197 signature.addBool(this._isExplicitlyCovariant == true);
8198 signature.addBool(this._isFinal == true);
8186 } 8199 }
8187 8200
8188 fb.Offset finish(fb.Builder fbBuilder) { 8201 fb.Offset finish(fb.Builder fbBuilder) {
8189 fb.Offset offset_annotations; 8202 fb.Offset offset_annotations;
8190 fb.Offset offset_codeRange; 8203 fb.Offset offset_codeRange;
8191 fb.Offset offset_defaultValueCode; 8204 fb.Offset offset_defaultValueCode;
8192 fb.Offset offset_initializer; 8205 fb.Offset offset_initializer;
8193 fb.Offset offset_name; 8206 fb.Offset offset_name;
8194 fb.Offset offset_parameters; 8207 fb.Offset offset_parameters;
8195 fb.Offset offset_type; 8208 fb.Offset offset_type;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
8229 } 8242 }
8230 if (_inheritsCovariantSlot != null && _inheritsCovariantSlot != 0) { 8243 if (_inheritsCovariantSlot != null && _inheritsCovariantSlot != 0) {
8231 fbBuilder.addUint32(14, _inheritsCovariantSlot); 8244 fbBuilder.addUint32(14, _inheritsCovariantSlot);
8232 } 8245 }
8233 if (offset_initializer != null) { 8246 if (offset_initializer != null) {
8234 fbBuilder.addOffset(12, offset_initializer); 8247 fbBuilder.addOffset(12, offset_initializer);
8235 } 8248 }
8236 if (_isExplicitlyCovariant == true) { 8249 if (_isExplicitlyCovariant == true) {
8237 fbBuilder.addBool(15, true); 8250 fbBuilder.addBool(15, true);
8238 } 8251 }
8252 if (_isFinal == true) {
8253 fbBuilder.addBool(16, true);
8254 }
8239 if (_isFunctionTyped == true) { 8255 if (_isFunctionTyped == true) {
8240 fbBuilder.addBool(5, true); 8256 fbBuilder.addBool(5, true);
8241 } 8257 }
8242 if (_isInitializingFormal == true) { 8258 if (_isInitializingFormal == true) {
8243 fbBuilder.addBool(6, true); 8259 fbBuilder.addBool(6, true);
8244 } 8260 }
8245 if (_kind != null && _kind != idl.UnlinkedParamKind.required) { 8261 if (_kind != null && _kind != idl.UnlinkedParamKind.required) {
8246 fbBuilder.addUint8(4, _kind.index); 8262 fbBuilder.addUint8(4, _kind.index);
8247 } 8263 }
8248 if (offset_name != null) { 8264 if (offset_name != null) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
8280 8296
8281 _UnlinkedParamImpl(this._bc, this._bcOffset); 8297 _UnlinkedParamImpl(this._bc, this._bcOffset);
8282 8298
8283 List<idl.UnlinkedExpr> _annotations; 8299 List<idl.UnlinkedExpr> _annotations;
8284 idl.CodeRange _codeRange; 8300 idl.CodeRange _codeRange;
8285 String _defaultValueCode; 8301 String _defaultValueCode;
8286 int _inferredTypeSlot; 8302 int _inferredTypeSlot;
8287 int _inheritsCovariantSlot; 8303 int _inheritsCovariantSlot;
8288 idl.UnlinkedExecutable _initializer; 8304 idl.UnlinkedExecutable _initializer;
8289 bool _isExplicitlyCovariant; 8305 bool _isExplicitlyCovariant;
8306 bool _isFinal;
8290 bool _isFunctionTyped; 8307 bool _isFunctionTyped;
8291 bool _isInitializingFormal; 8308 bool _isInitializingFormal;
8292 idl.UnlinkedParamKind _kind; 8309 idl.UnlinkedParamKind _kind;
8293 String _name; 8310 String _name;
8294 int _nameOffset; 8311 int _nameOffset;
8295 List<idl.UnlinkedParam> _parameters; 8312 List<idl.UnlinkedParam> _parameters;
8296 idl.EntityRef _type; 8313 idl.EntityRef _type;
8297 int _visibleLength; 8314 int _visibleLength;
8298 int _visibleOffset; 8315 int _visibleOffset;
8299 8316
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
8333 return _initializer; 8350 return _initializer;
8334 } 8351 }
8335 8352
8336 @override 8353 @override
8337 bool get isExplicitlyCovariant { 8354 bool get isExplicitlyCovariant {
8338 _isExplicitlyCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1 5, false); 8355 _isExplicitlyCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1 5, false);
8339 return _isExplicitlyCovariant; 8356 return _isExplicitlyCovariant;
8340 } 8357 }
8341 8358
8342 @override 8359 @override
8360 bool get isFinal {
8361 _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 16, false);
8362 return _isFinal;
8363 }
8364
8365 @override
8343 bool get isFunctionTyped { 8366 bool get isFunctionTyped {
8344 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, fals e); 8367 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, fals e);
8345 return _isFunctionTyped; 8368 return _isFunctionTyped;
8346 } 8369 }
8347 8370
8348 @override 8371 @override
8349 bool get isInitializingFormal { 8372 bool get isInitializingFormal {
8350 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false); 8373 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false);
8351 return _isInitializingFormal; 8374 return _isInitializingFormal;
8352 } 8375 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
8398 @override 8421 @override
8399 Map<String, Object> toJson() { 8422 Map<String, Object> toJson() {
8400 Map<String, Object> _result = <String, Object>{}; 8423 Map<String, Object> _result = <String, Object>{};
8401 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList(); 8424 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
8402 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); 8425 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
8403 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; 8426 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode;
8404 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; 8427 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
8405 if (inheritsCovariantSlot != 0) _result["inheritsCovariantSlot"] = inheritsC ovariantSlot; 8428 if (inheritsCovariantSlot != 0) _result["inheritsCovariantSlot"] = inheritsC ovariantSlot;
8406 if (initializer != null) _result["initializer"] = initializer.toJson(); 8429 if (initializer != null) _result["initializer"] = initializer.toJson();
8407 if (isExplicitlyCovariant != false) _result["isExplicitlyCovariant"] = isExp licitlyCovariant; 8430 if (isExplicitlyCovariant != false) _result["isExplicitlyCovariant"] = isExp licitlyCovariant;
8431 if (isFinal != false) _result["isFinal"] = isFinal;
8408 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; 8432 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped;
8409 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti alizingFormal; 8433 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti alizingFormal;
8410 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString( ).split('.')[1]; 8434 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString( ).split('.')[1];
8411 if (name != '') _result["name"] = name; 8435 if (name != '') _result["name"] = name;
8412 if (nameOffset != 0) _result["nameOffset"] = nameOffset; 8436 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
8413 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList(); 8437 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
8414 if (type != null) _result["type"] = type.toJson(); 8438 if (type != null) _result["type"] = type.toJson();
8415 if (visibleLength != 0) _result["visibleLength"] = visibleLength; 8439 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
8416 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; 8440 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
8417 return _result; 8441 return _result;
8418 } 8442 }
8419 8443
8420 @override 8444 @override
8421 Map<String, Object> toMap() => { 8445 Map<String, Object> toMap() => {
8422 "annotations": annotations, 8446 "annotations": annotations,
8423 "codeRange": codeRange, 8447 "codeRange": codeRange,
8424 "defaultValueCode": defaultValueCode, 8448 "defaultValueCode": defaultValueCode,
8425 "inferredTypeSlot": inferredTypeSlot, 8449 "inferredTypeSlot": inferredTypeSlot,
8426 "inheritsCovariantSlot": inheritsCovariantSlot, 8450 "inheritsCovariantSlot": inheritsCovariantSlot,
8427 "initializer": initializer, 8451 "initializer": initializer,
8428 "isExplicitlyCovariant": isExplicitlyCovariant, 8452 "isExplicitlyCovariant": isExplicitlyCovariant,
8453 "isFinal": isFinal,
8429 "isFunctionTyped": isFunctionTyped, 8454 "isFunctionTyped": isFunctionTyped,
8430 "isInitializingFormal": isInitializingFormal, 8455 "isInitializingFormal": isInitializingFormal,
8431 "kind": kind, 8456 "kind": kind,
8432 "name": name, 8457 "name": name,
8433 "nameOffset": nameOffset, 8458 "nameOffset": nameOffset,
8434 "parameters": parameters, 8459 "parameters": parameters,
8435 "type": type, 8460 "type": type,
8436 "visibleLength": visibleLength, 8461 "visibleLength": visibleLength,
8437 "visibleOffset": visibleOffset, 8462 "visibleOffset": visibleOffset,
8438 }; 8463 };
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after
10748 "propagatedTypeSlot": propagatedTypeSlot, 10773 "propagatedTypeSlot": propagatedTypeSlot,
10749 "type": type, 10774 "type": type,
10750 "visibleLength": visibleLength, 10775 "visibleLength": visibleLength,
10751 "visibleOffset": visibleOffset, 10776 "visibleOffset": visibleOffset,
10752 }; 10777 };
10753 10778
10754 @override 10779 @override
10755 String toString() => convert.JSON.encode(toJson()); 10780 String toString() => convert.JSON.encode(toJson());
10756 } 10781 }
10757 10782
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/summary/format.fbs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698