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

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

Issue 2644543005: Element model support for covariant (Closed)
Patch Set: Created 3 years, 11 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
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 7907 matching lines...) Expand 10 before | Expand all | Expand 10 after
7918 String toString() => convert.JSON.encode(toJson()); 7918 String toString() => convert.JSON.encode(toJson());
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 _isFunctionTyped; 7929 bool _isFunctionTyped;
7929 bool _isInitializingFormal; 7930 bool _isInitializingFormal;
7930 idl.UnlinkedParamKind _kind; 7931 idl.UnlinkedParamKind _kind;
7931 String _name; 7932 String _name;
7932 int _nameOffset; 7933 int _nameOffset;
7933 List<UnlinkedParamBuilder> _parameters; 7934 List<UnlinkedParamBuilder> _parameters;
7934 EntityRefBuilder _type; 7935 EntityRefBuilder _type;
7935 int _visibleLength; 7936 int _visibleLength;
7936 int _visibleOffset; 7937 int _visibleOffset;
7937 7938
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
8006 8007
8007 /** 8008 /**
8008 * The synthetic initializer function of the parameter. Absent if the variabl e 8009 * The synthetic initializer function of the parameter. Absent if the variabl e
8009 * does not have an initializer. 8010 * does not have an initializer.
8010 */ 8011 */
8011 void set initializer(UnlinkedExecutableBuilder value) { 8012 void set initializer(UnlinkedExecutableBuilder value) {
8012 this._initializer = value; 8013 this._initializer = value;
8013 } 8014 }
8014 8015
8015 @override 8016 @override
8017 bool get isExplicitlyCovariant => _isExplicitlyCovariant ??= false;
8018
8019 /**
8020 * Indicates whether this parameter is explicitly marked as being covariant.
8021 */
8022 void set isExplicitlyCovariant(bool value) {
8023 this._isExplicitlyCovariant = value;
8024 }
8025
8026 @override
8016 bool get isFunctionTyped => _isFunctionTyped ??= false; 8027 bool get isFunctionTyped => _isFunctionTyped ??= false;
8017 8028
8018 /** 8029 /**
8019 * Indicates whether this is a function-typed parameter. 8030 * Indicates whether this is a function-typed parameter.
8020 */ 8031 */
8021 void set isFunctionTyped(bool value) { 8032 void set isFunctionTyped(bool value) {
8022 this._isFunctionTyped = value; 8033 this._isFunctionTyped = value;
8023 } 8034 }
8024 8035
8025 @override 8036 @override
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
8101 int get visibleOffset => _visibleOffset ??= 0; 8112 int get visibleOffset => _visibleOffset ??= 0;
8102 8113
8103 /** 8114 /**
8104 * The beginning of the visible range. 8115 * The beginning of the visible range.
8105 */ 8116 */
8106 void set visibleOffset(int value) { 8117 void set visibleOffset(int value) {
8107 assert(value == null || value >= 0); 8118 assert(value == null || value >= 0);
8108 this._visibleOffset = value; 8119 this._visibleOffset = value;
8109 } 8120 }
8110 8121
8111 UnlinkedParamBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuilder codeRange, String defaultValueCode, int inferredTypeSlot, int inheritsCovariantS lot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitial izingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<Unlin kedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visib leOffset}) 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})
8112 : _annotations = annotations, 8123 : _annotations = annotations,
8113 _codeRange = codeRange, 8124 _codeRange = codeRange,
8114 _defaultValueCode = defaultValueCode, 8125 _defaultValueCode = defaultValueCode,
8115 _inferredTypeSlot = inferredTypeSlot, 8126 _inferredTypeSlot = inferredTypeSlot,
8116 _inheritsCovariantSlot = inheritsCovariantSlot, 8127 _inheritsCovariantSlot = inheritsCovariantSlot,
8117 _initializer = initializer, 8128 _initializer = initializer,
8129 _isExplicitlyCovariant = isExplicitlyCovariant,
8118 _isFunctionTyped = isFunctionTyped, 8130 _isFunctionTyped = isFunctionTyped,
8119 _isInitializingFormal = isInitializingFormal, 8131 _isInitializingFormal = isInitializingFormal,
8120 _kind = kind, 8132 _kind = kind,
8121 _name = name, 8133 _name = name,
8122 _nameOffset = nameOffset, 8134 _nameOffset = nameOffset,
8123 _parameters = parameters, 8135 _parameters = parameters,
8124 _type = type, 8136 _type = type,
8125 _visibleLength = visibleLength, 8137 _visibleLength = visibleLength,
8126 _visibleOffset = visibleOffset; 8138 _visibleOffset = visibleOffset;
8127 8139
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
8163 signature.addInt(0); 8175 signature.addInt(0);
8164 } else { 8176 } else {
8165 signature.addInt(this._annotations.length); 8177 signature.addInt(this._annotations.length);
8166 for (var x in this._annotations) { 8178 for (var x in this._annotations) {
8167 x?.collectApiSignature(signature); 8179 x?.collectApiSignature(signature);
8168 } 8180 }
8169 } 8181 }
8170 signature.addBool(this._initializer != null); 8182 signature.addBool(this._initializer != null);
8171 this._initializer?.collectApiSignature(signature); 8183 this._initializer?.collectApiSignature(signature);
8172 signature.addInt(this._inheritsCovariantSlot ?? 0); 8184 signature.addInt(this._inheritsCovariantSlot ?? 0);
8185 signature.addBool(this._isExplicitlyCovariant == true);
8173 } 8186 }
8174 8187
8175 fb.Offset finish(fb.Builder fbBuilder) { 8188 fb.Offset finish(fb.Builder fbBuilder) {
8176 fb.Offset offset_annotations; 8189 fb.Offset offset_annotations;
8177 fb.Offset offset_codeRange; 8190 fb.Offset offset_codeRange;
8178 fb.Offset offset_defaultValueCode; 8191 fb.Offset offset_defaultValueCode;
8179 fb.Offset offset_initializer; 8192 fb.Offset offset_initializer;
8180 fb.Offset offset_name; 8193 fb.Offset offset_name;
8181 fb.Offset offset_parameters; 8194 fb.Offset offset_parameters;
8182 fb.Offset offset_type; 8195 fb.Offset offset_type;
(...skipping 30 matching lines...) Expand all
8213 } 8226 }
8214 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { 8227 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) {
8215 fbBuilder.addUint32(2, _inferredTypeSlot); 8228 fbBuilder.addUint32(2, _inferredTypeSlot);
8216 } 8229 }
8217 if (_inheritsCovariantSlot != null && _inheritsCovariantSlot != 0) { 8230 if (_inheritsCovariantSlot != null && _inheritsCovariantSlot != 0) {
8218 fbBuilder.addUint32(14, _inheritsCovariantSlot); 8231 fbBuilder.addUint32(14, _inheritsCovariantSlot);
8219 } 8232 }
8220 if (offset_initializer != null) { 8233 if (offset_initializer != null) {
8221 fbBuilder.addOffset(12, offset_initializer); 8234 fbBuilder.addOffset(12, offset_initializer);
8222 } 8235 }
8236 if (_isExplicitlyCovariant == true) {
8237 fbBuilder.addBool(15, true);
8238 }
8223 if (_isFunctionTyped == true) { 8239 if (_isFunctionTyped == true) {
8224 fbBuilder.addBool(5, true); 8240 fbBuilder.addBool(5, true);
8225 } 8241 }
8226 if (_isInitializingFormal == true) { 8242 if (_isInitializingFormal == true) {
8227 fbBuilder.addBool(6, true); 8243 fbBuilder.addBool(6, true);
8228 } 8244 }
8229 if (_kind != null && _kind != idl.UnlinkedParamKind.required) { 8245 if (_kind != null && _kind != idl.UnlinkedParamKind.required) {
8230 fbBuilder.addUint8(4, _kind.index); 8246 fbBuilder.addUint8(4, _kind.index);
8231 } 8247 }
8232 if (offset_name != null) { 8248 if (offset_name != null) {
(...skipping 30 matching lines...) Expand all
8263 final int _bcOffset; 8279 final int _bcOffset;
8264 8280
8265 _UnlinkedParamImpl(this._bc, this._bcOffset); 8281 _UnlinkedParamImpl(this._bc, this._bcOffset);
8266 8282
8267 List<idl.UnlinkedExpr> _annotations; 8283 List<idl.UnlinkedExpr> _annotations;
8268 idl.CodeRange _codeRange; 8284 idl.CodeRange _codeRange;
8269 String _defaultValueCode; 8285 String _defaultValueCode;
8270 int _inferredTypeSlot; 8286 int _inferredTypeSlot;
8271 int _inheritsCovariantSlot; 8287 int _inheritsCovariantSlot;
8272 idl.UnlinkedExecutable _initializer; 8288 idl.UnlinkedExecutable _initializer;
8289 bool _isExplicitlyCovariant;
8273 bool _isFunctionTyped; 8290 bool _isFunctionTyped;
8274 bool _isInitializingFormal; 8291 bool _isInitializingFormal;
8275 idl.UnlinkedParamKind _kind; 8292 idl.UnlinkedParamKind _kind;
8276 String _name; 8293 String _name;
8277 int _nameOffset; 8294 int _nameOffset;
8278 List<idl.UnlinkedParam> _parameters; 8295 List<idl.UnlinkedParam> _parameters;
8279 idl.EntityRef _type; 8296 idl.EntityRef _type;
8280 int _visibleLength; 8297 int _visibleLength;
8281 int _visibleOffset; 8298 int _visibleOffset;
8282 8299
(...skipping 27 matching lines...) Expand all
8310 return _inheritsCovariantSlot; 8327 return _inheritsCovariantSlot;
8311 } 8328 }
8312 8329
8313 @override 8330 @override
8314 idl.UnlinkedExecutable get initializer { 8331 idl.UnlinkedExecutable get initializer {
8315 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bc, _bcOffset, 12, null); 8332 _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bc, _bcOffset, 12, null);
8316 return _initializer; 8333 return _initializer;
8317 } 8334 }
8318 8335
8319 @override 8336 @override
8337 bool get isExplicitlyCovariant {
8338 _isExplicitlyCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1 5, false);
8339 return _isExplicitlyCovariant;
8340 }
8341
8342 @override
8320 bool get isFunctionTyped { 8343 bool get isFunctionTyped {
8321 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, fals e); 8344 _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, fals e);
8322 return _isFunctionTyped; 8345 return _isFunctionTyped;
8323 } 8346 }
8324 8347
8325 @override 8348 @override
8326 bool get isInitializingFormal { 8349 bool get isInitializingFormal {
8327 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false); 8350 _isInitializingFormal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false);
8328 return _isInitializingFormal; 8351 return _isInitializingFormal;
8329 } 8352 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
8374 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam { 8397 abstract class _UnlinkedParamMixin implements idl.UnlinkedParam {
8375 @override 8398 @override
8376 Map<String, Object> toJson() { 8399 Map<String, Object> toJson() {
8377 Map<String, Object> _result = <String, Object>{}; 8400 Map<String, Object> _result = <String, Object>{};
8378 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList(); 8401 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
8379 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); 8402 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
8380 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode; 8403 if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode;
8381 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; 8404 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
8382 if (inheritsCovariantSlot != 0) _result["inheritsCovariantSlot"] = inheritsC ovariantSlot; 8405 if (inheritsCovariantSlot != 0) _result["inheritsCovariantSlot"] = inheritsC ovariantSlot;
8383 if (initializer != null) _result["initializer"] = initializer.toJson(); 8406 if (initializer != null) _result["initializer"] = initializer.toJson();
8407 if (isExplicitlyCovariant != false) _result["isExplicitlyCovariant"] = isExp licitlyCovariant;
8384 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped; 8408 if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped;
8385 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti alizingFormal; 8409 if (isInitializingFormal != false) _result["isInitializingFormal"] = isIniti alizingFormal;
8386 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString( ).split('.')[1]; 8410 if (kind != idl.UnlinkedParamKind.required) _result["kind"] = kind.toString( ).split('.')[1];
8387 if (name != '') _result["name"] = name; 8411 if (name != '') _result["name"] = name;
8388 if (nameOffset != 0) _result["nameOffset"] = nameOffset; 8412 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
8389 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList(); 8413 if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) = > _value.toJson()).toList();
8390 if (type != null) _result["type"] = type.toJson(); 8414 if (type != null) _result["type"] = type.toJson();
8391 if (visibleLength != 0) _result["visibleLength"] = visibleLength; 8415 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
8392 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; 8416 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
8393 return _result; 8417 return _result;
8394 } 8418 }
8395 8419
8396 @override 8420 @override
8397 Map<String, Object> toMap() => { 8421 Map<String, Object> toMap() => {
8398 "annotations": annotations, 8422 "annotations": annotations,
8399 "codeRange": codeRange, 8423 "codeRange": codeRange,
8400 "defaultValueCode": defaultValueCode, 8424 "defaultValueCode": defaultValueCode,
8401 "inferredTypeSlot": inferredTypeSlot, 8425 "inferredTypeSlot": inferredTypeSlot,
8402 "inheritsCovariantSlot": inheritsCovariantSlot, 8426 "inheritsCovariantSlot": inheritsCovariantSlot,
8403 "initializer": initializer, 8427 "initializer": initializer,
8428 "isExplicitlyCovariant": isExplicitlyCovariant,
8404 "isFunctionTyped": isFunctionTyped, 8429 "isFunctionTyped": isFunctionTyped,
8405 "isInitializingFormal": isInitializingFormal, 8430 "isInitializingFormal": isInitializingFormal,
8406 "kind": kind, 8431 "kind": kind,
8407 "name": name, 8432 "name": name,
8408 "nameOffset": nameOffset, 8433 "nameOffset": nameOffset,
8409 "parameters": parameters, 8434 "parameters": parameters,
8410 "type": type, 8435 "type": type,
8411 "visibleLength": visibleLength, 8436 "visibleLength": visibleLength,
8412 "visibleOffset": visibleOffset, 8437 "visibleOffset": visibleOffset,
8413 }; 8438 };
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
10247 String toString() => convert.JSON.encode(toJson()); 10272 String toString() => convert.JSON.encode(toJson());
10248 } 10273 }
10249 10274
10250 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts idl.UnlinkedVariable { 10275 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts idl.UnlinkedVariable {
10251 List<UnlinkedExprBuilder> _annotations; 10276 List<UnlinkedExprBuilder> _annotations;
10252 CodeRangeBuilder _codeRange; 10277 CodeRangeBuilder _codeRange;
10253 UnlinkedDocumentationCommentBuilder _documentationComment; 10278 UnlinkedDocumentationCommentBuilder _documentationComment;
10254 int _inferredTypeSlot; 10279 int _inferredTypeSlot;
10255 UnlinkedExecutableBuilder _initializer; 10280 UnlinkedExecutableBuilder _initializer;
10256 bool _isConst; 10281 bool _isConst;
10282 bool _isCovariant;
10257 bool _isFinal; 10283 bool _isFinal;
10258 bool _isStatic; 10284 bool _isStatic;
10259 String _name; 10285 String _name;
10260 int _nameOffset; 10286 int _nameOffset;
10261 int _propagatedTypeSlot; 10287 int _propagatedTypeSlot;
10262 EntityRefBuilder _type; 10288 EntityRefBuilder _type;
10263 int _visibleLength; 10289 int _visibleLength;
10264 int _visibleOffset; 10290 int _visibleOffset;
10265 10291
10266 @override 10292 @override
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
10323 bool get isConst => _isConst ??= false; 10349 bool get isConst => _isConst ??= false;
10324 10350
10325 /** 10351 /**
10326 * Indicates whether the variable is declared using the `const` keyword. 10352 * Indicates whether the variable is declared using the `const` keyword.
10327 */ 10353 */
10328 void set isConst(bool value) { 10354 void set isConst(bool value) {
10329 this._isConst = value; 10355 this._isConst = value;
10330 } 10356 }
10331 10357
10332 @override 10358 @override
10359 bool get isCovariant => _isCovariant ??= false;
10360
10361 /**
10362 * Indicates whether this variable is declared using the `covariant` keyword.
10363 * This should be false for everything except instance fields.
10364 */
10365 void set isCovariant(bool value) {
10366 this._isCovariant = value;
10367 }
10368
10369 @override
10333 bool get isFinal => _isFinal ??= false; 10370 bool get isFinal => _isFinal ??= false;
10334 10371
10335 /** 10372 /**
10336 * Indicates whether the variable is declared using the `final` keyword. 10373 * Indicates whether the variable is declared using the `final` keyword.
10337 */ 10374 */
10338 void set isFinal(bool value) { 10375 void set isFinal(bool value) {
10339 this._isFinal = value; 10376 this._isFinal = value;
10340 } 10377 }
10341 10378
10342 @override 10379 @override
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
10415 int get visibleOffset => _visibleOffset ??= 0; 10452 int get visibleOffset => _visibleOffset ??= 0;
10416 10453
10417 /** 10454 /**
10418 * If a local variable, the beginning of the visible range; zero otherwise. 10455 * If a local variable, the beginning of the visible range; zero otherwise.
10419 */ 10456 */
10420 void set visibleOffset(int value) { 10457 void set visibleOffset(int value) {
10421 assert(value == null || value >= 0); 10458 assert(value == null || value >= 0);
10422 this._visibleOffset = value; 10459 this._visibleOffset = value;
10423 } 10460 }
10424 10461
10425 UnlinkedVariableBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuild er codeRange, UnlinkedDocumentationCommentBuilder documentationComment, int infe rredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBu ilder type, int visibleLength, int visibleOffset}) 10462 UnlinkedVariableBuilder({List<UnlinkedExprBuilder> annotations, CodeRangeBuild er codeRange, UnlinkedDocumentationCommentBuilder documentationComment, int infe rredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isCovari ant, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTyp eSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
10426 : _annotations = annotations, 10463 : _annotations = annotations,
10427 _codeRange = codeRange, 10464 _codeRange = codeRange,
10428 _documentationComment = documentationComment, 10465 _documentationComment = documentationComment,
10429 _inferredTypeSlot = inferredTypeSlot, 10466 _inferredTypeSlot = inferredTypeSlot,
10430 _initializer = initializer, 10467 _initializer = initializer,
10431 _isConst = isConst, 10468 _isConst = isConst,
10469 _isCovariant = isCovariant,
10432 _isFinal = isFinal, 10470 _isFinal = isFinal,
10433 _isStatic = isStatic, 10471 _isStatic = isStatic,
10434 _name = name, 10472 _name = name,
10435 _nameOffset = nameOffset, 10473 _nameOffset = nameOffset,
10436 _propagatedTypeSlot = propagatedTypeSlot, 10474 _propagatedTypeSlot = propagatedTypeSlot,
10437 _type = type, 10475 _type = type,
10438 _visibleLength = visibleLength, 10476 _visibleLength = visibleLength,
10439 _visibleOffset = visibleOffset; 10477 _visibleOffset = visibleOffset;
10440 10478
10441 /** 10479 /**
(...skipping 25 matching lines...) Expand all
10467 signature.addInt(0); 10505 signature.addInt(0);
10468 } else { 10506 } else {
10469 signature.addInt(this._annotations.length); 10507 signature.addInt(this._annotations.length);
10470 for (var x in this._annotations) { 10508 for (var x in this._annotations) {
10471 x?.collectApiSignature(signature); 10509 x?.collectApiSignature(signature);
10472 } 10510 }
10473 } 10511 }
10474 signature.addInt(this._inferredTypeSlot ?? 0); 10512 signature.addInt(this._inferredTypeSlot ?? 0);
10475 signature.addBool(this._initializer != null); 10513 signature.addBool(this._initializer != null);
10476 this._initializer?.collectApiSignature(signature); 10514 this._initializer?.collectApiSignature(signature);
10515 signature.addBool(this._isCovariant == true);
10477 } 10516 }
10478 10517
10479 fb.Offset finish(fb.Builder fbBuilder) { 10518 fb.Offset finish(fb.Builder fbBuilder) {
10480 fb.Offset offset_annotations; 10519 fb.Offset offset_annotations;
10481 fb.Offset offset_codeRange; 10520 fb.Offset offset_codeRange;
10482 fb.Offset offset_documentationComment; 10521 fb.Offset offset_documentationComment;
10483 fb.Offset offset_initializer; 10522 fb.Offset offset_initializer;
10484 fb.Offset offset_name; 10523 fb.Offset offset_name;
10485 fb.Offset offset_type; 10524 fb.Offset offset_type;
10486 if (!(_annotations == null || _annotations.isEmpty)) { 10525 if (!(_annotations == null || _annotations.isEmpty)) {
(...skipping 26 matching lines...) Expand all
10513 } 10552 }
10514 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { 10553 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) {
10515 fbBuilder.addUint32(9, _inferredTypeSlot); 10554 fbBuilder.addUint32(9, _inferredTypeSlot);
10516 } 10555 }
10517 if (offset_initializer != null) { 10556 if (offset_initializer != null) {
10518 fbBuilder.addOffset(13, offset_initializer); 10557 fbBuilder.addOffset(13, offset_initializer);
10519 } 10558 }
10520 if (_isConst == true) { 10559 if (_isConst == true) {
10521 fbBuilder.addBool(6, true); 10560 fbBuilder.addBool(6, true);
10522 } 10561 }
10562 if (_isCovariant == true) {
10563 fbBuilder.addBool(14, true);
10564 }
10523 if (_isFinal == true) { 10565 if (_isFinal == true) {
10524 fbBuilder.addBool(7, true); 10566 fbBuilder.addBool(7, true);
10525 } 10567 }
10526 if (_isStatic == true) { 10568 if (_isStatic == true) {
10527 fbBuilder.addBool(4, true); 10569 fbBuilder.addBool(4, true);
10528 } 10570 }
10529 if (offset_name != null) { 10571 if (offset_name != null) {
10530 fbBuilder.addOffset(0, offset_name); 10572 fbBuilder.addOffset(0, offset_name);
10531 } 10573 }
10532 if (_nameOffset != null && _nameOffset != 0) { 10574 if (_nameOffset != null && _nameOffset != 0) {
(...skipping 27 matching lines...) Expand all
10560 final int _bcOffset; 10602 final int _bcOffset;
10561 10603
10562 _UnlinkedVariableImpl(this._bc, this._bcOffset); 10604 _UnlinkedVariableImpl(this._bc, this._bcOffset);
10563 10605
10564 List<idl.UnlinkedExpr> _annotations; 10606 List<idl.UnlinkedExpr> _annotations;
10565 idl.CodeRange _codeRange; 10607 idl.CodeRange _codeRange;
10566 idl.UnlinkedDocumentationComment _documentationComment; 10608 idl.UnlinkedDocumentationComment _documentationComment;
10567 int _inferredTypeSlot; 10609 int _inferredTypeSlot;
10568 idl.UnlinkedExecutable _initializer; 10610 idl.UnlinkedExecutable _initializer;
10569 bool _isConst; 10611 bool _isConst;
10612 bool _isCovariant;
10570 bool _isFinal; 10613 bool _isFinal;
10571 bool _isStatic; 10614 bool _isStatic;
10572 String _name; 10615 String _name;
10573 int _nameOffset; 10616 int _nameOffset;
10574 int _propagatedTypeSlot; 10617 int _propagatedTypeSlot;
10575 idl.EntityRef _type; 10618 idl.EntityRef _type;
10576 int _visibleLength; 10619 int _visibleLength;
10577 int _visibleOffset; 10620 int _visibleOffset;
10578 10621
10579 @override 10622 @override
(...skipping 26 matching lines...) Expand all
10606 return _initializer; 10649 return _initializer;
10607 } 10650 }
10608 10651
10609 @override 10652 @override
10610 bool get isConst { 10653 bool get isConst {
10611 _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false); 10654 _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false);
10612 return _isConst; 10655 return _isConst;
10613 } 10656 }
10614 10657
10615 @override 10658 @override
10659 bool get isCovariant {
10660 _isCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 14, false);
10661 return _isCovariant;
10662 }
10663
10664 @override
10616 bool get isFinal { 10665 bool get isFinal {
10617 _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 7, false); 10666 _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 7, false);
10618 return _isFinal; 10667 return _isFinal;
10619 } 10668 }
10620 10669
10621 @override 10670 @override
10622 bool get isStatic { 10671 bool get isStatic {
10623 _isStatic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false); 10672 _isStatic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false);
10624 return _isStatic; 10673 return _isStatic;
10625 } 10674 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
10664 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { 10713 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable {
10665 @override 10714 @override
10666 Map<String, Object> toJson() { 10715 Map<String, Object> toJson() {
10667 Map<String, Object> _result = <String, Object>{}; 10716 Map<String, Object> _result = <String, Object>{};
10668 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList(); 10717 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
10669 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); 10718 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
10670 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson(); 10719 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
10671 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; 10720 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
10672 if (initializer != null) _result["initializer"] = initializer.toJson(); 10721 if (initializer != null) _result["initializer"] = initializer.toJson();
10673 if (isConst != false) _result["isConst"] = isConst; 10722 if (isConst != false) _result["isConst"] = isConst;
10723 if (isCovariant != false) _result["isCovariant"] = isCovariant;
10674 if (isFinal != false) _result["isFinal"] = isFinal; 10724 if (isFinal != false) _result["isFinal"] = isFinal;
10675 if (isStatic != false) _result["isStatic"] = isStatic; 10725 if (isStatic != false) _result["isStatic"] = isStatic;
10676 if (name != '') _result["name"] = name; 10726 if (name != '') _result["name"] = name;
10677 if (nameOffset != 0) _result["nameOffset"] = nameOffset; 10727 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
10678 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS lot; 10728 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS lot;
10679 if (type != null) _result["type"] = type.toJson(); 10729 if (type != null) _result["type"] = type.toJson();
10680 if (visibleLength != 0) _result["visibleLength"] = visibleLength; 10730 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
10681 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; 10731 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
10682 return _result; 10732 return _result;
10683 } 10733 }
10684 10734
10685 @override 10735 @override
10686 Map<String, Object> toMap() => { 10736 Map<String, Object> toMap() => {
10687 "annotations": annotations, 10737 "annotations": annotations,
10688 "codeRange": codeRange, 10738 "codeRange": codeRange,
10689 "documentationComment": documentationComment, 10739 "documentationComment": documentationComment,
10690 "inferredTypeSlot": inferredTypeSlot, 10740 "inferredTypeSlot": inferredTypeSlot,
10691 "initializer": initializer, 10741 "initializer": initializer,
10692 "isConst": isConst, 10742 "isConst": isConst,
10743 "isCovariant": isCovariant,
10693 "isFinal": isFinal, 10744 "isFinal": isFinal,
10694 "isStatic": isStatic, 10745 "isStatic": isStatic,
10695 "name": name, 10746 "name": name,
10696 "nameOffset": nameOffset, 10747 "nameOffset": nameOffset,
10697 "propagatedTypeSlot": propagatedTypeSlot, 10748 "propagatedTypeSlot": propagatedTypeSlot,
10698 "type": type, 10749 "type": type,
10699 "visibleLength": visibleLength, 10750 "visibleLength": visibleLength,
10700 "visibleOffset": visibleOffset, 10751 "visibleOffset": visibleOffset,
10701 }; 10752 };
10702 10753
10703 @override 10754 @override
10704 String toString() => convert.JSON.encode(toJson()); 10755 String toString() => convert.JSON.encode(toJson());
10705 } 10756 }
10706 10757
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698