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

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

Issue 1524443002: Track implicit vs explicit types in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('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 'dart:convert'; 10 import 'dart:convert';
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 String _name; 465 String _name;
466 int _unit; 466 int _unit;
467 List<UnlinkedTypeParam> _typeParameters; 467 List<UnlinkedTypeParam> _typeParameters;
468 UnlinkedTypeRef _returnType; 468 UnlinkedTypeRef _returnType;
469 List<UnlinkedParam> _parameters; 469 List<UnlinkedParam> _parameters;
470 UnlinkedExecutableKind _kind; 470 UnlinkedExecutableKind _kind;
471 bool _isAbstract; 471 bool _isAbstract;
472 bool _isStatic; 472 bool _isStatic;
473 bool _isConst; 473 bool _isConst;
474 bool _isFactory; 474 bool _isFactory;
475 bool _hasImplicitReturnType;
475 476
476 UnlinkedExecutable.fromJson(Map json) 477 UnlinkedExecutable.fromJson(Map json)
477 : _name = json["name"], 478 : _name = json["name"],
478 _unit = json["unit"], 479 _unit = json["unit"],
479 _typeParameters = json["typeParameters"]?.map((x) => new UnlinkedTypeParam .fromJson(x))?.toList(), 480 _typeParameters = json["typeParameters"]?.map((x) => new UnlinkedTypeParam .fromJson(x))?.toList(),
480 _returnType = json["returnType"] == null ? null : new UnlinkedTypeRef.from Json(json["returnType"]), 481 _returnType = json["returnType"] == null ? null : new UnlinkedTypeRef.from Json(json["returnType"]),
481 _parameters = json["parameters"]?.map((x) => new UnlinkedParam.fromJson(x) )?.toList(), 482 _parameters = json["parameters"]?.map((x) => new UnlinkedParam.fromJson(x) )?.toList(),
482 _kind = json["kind"] == null ? null : UnlinkedExecutableKind.values[json[" kind"]], 483 _kind = json["kind"] == null ? null : UnlinkedExecutableKind.values[json[" kind"]],
483 _isAbstract = json["isAbstract"], 484 _isAbstract = json["isAbstract"],
484 _isStatic = json["isStatic"], 485 _isStatic = json["isStatic"],
485 _isConst = json["isConst"], 486 _isConst = json["isConst"],
486 _isFactory = json["isFactory"]; 487 _isFactory = json["isFactory"],
488 _hasImplicitReturnType = json["hasImplicitReturnType"];
487 489
488 String get name => _name ?? ''; 490 String get name => _name ?? '';
489 int get unit => _unit ?? 0; 491 int get unit => _unit ?? 0;
490 List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <Unlink edTypeParam>[]; 492 List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <Unlink edTypeParam>[];
491 UnlinkedTypeRef get returnType => _returnType; 493 UnlinkedTypeRef get returnType => _returnType;
492 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[]; 494 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[];
493 UnlinkedExecutableKind get kind => _kind ?? UnlinkedExecutableKind.functionOrM ethod; 495 UnlinkedExecutableKind get kind => _kind ?? UnlinkedExecutableKind.functionOrM ethod;
494 bool get isAbstract => _isAbstract ?? false; 496 bool get isAbstract => _isAbstract ?? false;
495 bool get isStatic => _isStatic ?? false; 497 bool get isStatic => _isStatic ?? false;
496 bool get isConst => _isConst ?? false; 498 bool get isConst => _isConst ?? false;
497 bool get isFactory => _isFactory ?? false; 499 bool get isFactory => _isFactory ?? false;
500 bool get hasImplicitReturnType => _hasImplicitReturnType ?? false;
498 } 501 }
499 502
500 class UnlinkedExecutableBuilder { 503 class UnlinkedExecutableBuilder {
501 final Map _json = {}; 504 final Map _json = {};
502 505
503 UnlinkedExecutableBuilder(builder.BuilderContext context); 506 UnlinkedExecutableBuilder(builder.BuilderContext context);
504 507
505 void set name(String _value) { 508 void set name(String _value) {
506 assert(!_json.containsKey("name")); 509 assert(!_json.containsKey("name"));
507 if (_value != null) { 510 if (_value != null) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 } 568 }
566 } 569 }
567 570
568 void set isFactory(bool _value) { 571 void set isFactory(bool _value) {
569 assert(!_json.containsKey("isFactory")); 572 assert(!_json.containsKey("isFactory"));
570 if (_value != null) { 573 if (_value != null) {
571 _json["isFactory"] = _value; 574 _json["isFactory"] = _value;
572 } 575 }
573 } 576 }
574 577
578 void set hasImplicitReturnType(bool _value) {
579 assert(!_json.containsKey("hasImplicitReturnType"));
580 if (_value != null) {
581 _json["hasImplicitReturnType"] = _value;
582 }
583 }
584
575 Map finish() => _json; 585 Map finish() => _json;
576 } 586 }
577 587
578 UnlinkedExecutableBuilder encodeUnlinkedExecutable(builder.BuilderContext builde rContext, {String name, int unit, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedTypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters, Unlin kedExecutableKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFac tory}) { 588 UnlinkedExecutableBuilder encodeUnlinkedExecutable(builder.BuilderContext builde rContext, {String name, int unit, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedTypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters, Unlin kedExecutableKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFac tory, bool hasImplicitReturnType}) {
579 UnlinkedExecutableBuilder builder = new UnlinkedExecutableBuilder(builderConte xt); 589 UnlinkedExecutableBuilder builder = new UnlinkedExecutableBuilder(builderConte xt);
580 builder.name = name; 590 builder.name = name;
581 builder.unit = unit; 591 builder.unit = unit;
582 builder.typeParameters = typeParameters; 592 builder.typeParameters = typeParameters;
583 builder.returnType = returnType; 593 builder.returnType = returnType;
584 builder.parameters = parameters; 594 builder.parameters = parameters;
585 builder.kind = kind; 595 builder.kind = kind;
586 builder.isAbstract = isAbstract; 596 builder.isAbstract = isAbstract;
587 builder.isStatic = isStatic; 597 builder.isStatic = isStatic;
588 builder.isConst = isConst; 598 builder.isConst = isConst;
589 builder.isFactory = isFactory; 599 builder.isFactory = isFactory;
600 builder.hasImplicitReturnType = hasImplicitReturnType;
590 return builder; 601 return builder;
591 } 602 }
592 603
593 class UnlinkedExport { 604 class UnlinkedExport {
594 String _uri; 605 String _uri;
595 List<UnlinkedCombinator> _combinators; 606 List<UnlinkedCombinator> _combinators;
596 607
597 UnlinkedExport.fromJson(Map json) 608 UnlinkedExport.fromJson(Map json)
598 : _uri = json["uri"], 609 : _uri = json["uri"],
599 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from Json(x))?.toList(); 610 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from Json(x))?.toList();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 return builder; 867 return builder;
857 } 868 }
858 869
859 class UnlinkedParam { 870 class UnlinkedParam {
860 String _name; 871 String _name;
861 UnlinkedTypeRef _type; 872 UnlinkedTypeRef _type;
862 List<UnlinkedParam> _parameters; 873 List<UnlinkedParam> _parameters;
863 UnlinkedParamKind _kind; 874 UnlinkedParamKind _kind;
864 bool _isFunctionTyped; 875 bool _isFunctionTyped;
865 bool _isInitializingFormal; 876 bool _isInitializingFormal;
877 bool _hasImplicitType;
866 878
867 UnlinkedParam.fromJson(Map json) 879 UnlinkedParam.fromJson(Map json)
868 : _name = json["name"], 880 : _name = json["name"],
869 _type = json["type"] == null ? null : new UnlinkedTypeRef.fromJson(json["t ype"]), 881 _type = json["type"] == null ? null : new UnlinkedTypeRef.fromJson(json["t ype"]),
870 _parameters = json["parameters"]?.map((x) => new UnlinkedParam.fromJson(x) )?.toList(), 882 _parameters = json["parameters"]?.map((x) => new UnlinkedParam.fromJson(x) )?.toList(),
871 _kind = json["kind"] == null ? null : UnlinkedParamKind.values[json["kind" ]], 883 _kind = json["kind"] == null ? null : UnlinkedParamKind.values[json["kind" ]],
872 _isFunctionTyped = json["isFunctionTyped"], 884 _isFunctionTyped = json["isFunctionTyped"],
873 _isInitializingFormal = json["isInitializingFormal"]; 885 _isInitializingFormal = json["isInitializingFormal"],
886 _hasImplicitType = json["hasImplicitType"];
874 887
875 String get name => _name ?? ''; 888 String get name => _name ?? '';
876 UnlinkedTypeRef get type => _type; 889 UnlinkedTypeRef get type => _type;
877 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[]; 890 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[];
878 UnlinkedParamKind get kind => _kind ?? UnlinkedParamKind.required; 891 UnlinkedParamKind get kind => _kind ?? UnlinkedParamKind.required;
879 bool get isFunctionTyped => _isFunctionTyped ?? false; 892 bool get isFunctionTyped => _isFunctionTyped ?? false;
880 bool get isInitializingFormal => _isInitializingFormal ?? false; 893 bool get isInitializingFormal => _isInitializingFormal ?? false;
894 bool get hasImplicitType => _hasImplicitType ?? false;
881 } 895 }
882 896
883 class UnlinkedParamBuilder { 897 class UnlinkedParamBuilder {
884 final Map _json = {}; 898 final Map _json = {};
885 899
886 UnlinkedParamBuilder(builder.BuilderContext context); 900 UnlinkedParamBuilder(builder.BuilderContext context);
887 901
888 void set name(String _value) { 902 void set name(String _value) {
889 assert(!_json.containsKey("name")); 903 assert(!_json.containsKey("name"));
890 if (_value != null) { 904 if (_value != null) {
(...skipping 29 matching lines...) Expand all
920 } 934 }
921 } 935 }
922 936
923 void set isInitializingFormal(bool _value) { 937 void set isInitializingFormal(bool _value) {
924 assert(!_json.containsKey("isInitializingFormal")); 938 assert(!_json.containsKey("isInitializingFormal"));
925 if (_value != null) { 939 if (_value != null) {
926 _json["isInitializingFormal"] = _value; 940 _json["isInitializingFormal"] = _value;
927 } 941 }
928 } 942 }
929 943
944 void set hasImplicitType(bool _value) {
945 assert(!_json.containsKey("hasImplicitType"));
946 if (_value != null) {
947 _json["hasImplicitType"] = _value;
948 }
949 }
950
930 Map finish() => _json; 951 Map finish() => _json;
931 } 952 }
932 953
933 UnlinkedParamBuilder encodeUnlinkedParam(builder.BuilderContext builderContext, {String name, UnlinkedTypeRefBuilder type, List<UnlinkedParamBuilder> parameters , UnlinkedParamKind kind, bool isFunctionTyped, bool isInitializingFormal}) { 954 UnlinkedParamBuilder encodeUnlinkedParam(builder.BuilderContext builderContext, {String name, UnlinkedTypeRefBuilder type, List<UnlinkedParamBuilder> parameters , UnlinkedParamKind kind, bool isFunctionTyped, bool isInitializingFormal, bool hasImplicitType}) {
934 UnlinkedParamBuilder builder = new UnlinkedParamBuilder(builderContext); 955 UnlinkedParamBuilder builder = new UnlinkedParamBuilder(builderContext);
935 builder.name = name; 956 builder.name = name;
936 builder.type = type; 957 builder.type = type;
937 builder.parameters = parameters; 958 builder.parameters = parameters;
938 builder.kind = kind; 959 builder.kind = kind;
939 builder.isFunctionTyped = isFunctionTyped; 960 builder.isFunctionTyped = isFunctionTyped;
940 builder.isInitializingFormal = isInitializingFormal; 961 builder.isInitializingFormal = isInitializingFormal;
962 builder.hasImplicitType = hasImplicitType;
941 return builder; 963 return builder;
942 } 964 }
943 965
944 class UnlinkedPrefix { 966 class UnlinkedPrefix {
945 String _name; 967 String _name;
946 968
947 UnlinkedPrefix.fromJson(Map json) 969 UnlinkedPrefix.fromJson(Map json)
948 : _name = json["name"]; 970 : _name = json["name"];
949 971
950 String get name => _name ?? ''; 972 String get name => _name ?? '';
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 return builder; 1231 return builder;
1210 } 1232 }
1211 1233
1212 class UnlinkedVariable { 1234 class UnlinkedVariable {
1213 String _name; 1235 String _name;
1214 int _unit; 1236 int _unit;
1215 UnlinkedTypeRef _type; 1237 UnlinkedTypeRef _type;
1216 bool _isStatic; 1238 bool _isStatic;
1217 bool _isFinal; 1239 bool _isFinal;
1218 bool _isConst; 1240 bool _isConst;
1241 bool _hasImplicitType;
1219 1242
1220 UnlinkedVariable.fromJson(Map json) 1243 UnlinkedVariable.fromJson(Map json)
1221 : _name = json["name"], 1244 : _name = json["name"],
1222 _unit = json["unit"], 1245 _unit = json["unit"],
1223 _type = json["type"] == null ? null : new UnlinkedTypeRef.fromJson(json["t ype"]), 1246 _type = json["type"] == null ? null : new UnlinkedTypeRef.fromJson(json["t ype"]),
1224 _isStatic = json["isStatic"], 1247 _isStatic = json["isStatic"],
1225 _isFinal = json["isFinal"], 1248 _isFinal = json["isFinal"],
1226 _isConst = json["isConst"]; 1249 _isConst = json["isConst"],
1250 _hasImplicitType = json["hasImplicitType"];
1227 1251
1228 String get name => _name ?? ''; 1252 String get name => _name ?? '';
1229 int get unit => _unit ?? 0; 1253 int get unit => _unit ?? 0;
1230 UnlinkedTypeRef get type => _type; 1254 UnlinkedTypeRef get type => _type;
1231 bool get isStatic => _isStatic ?? false; 1255 bool get isStatic => _isStatic ?? false;
1232 bool get isFinal => _isFinal ?? false; 1256 bool get isFinal => _isFinal ?? false;
1233 bool get isConst => _isConst ?? false; 1257 bool get isConst => _isConst ?? false;
1258 bool get hasImplicitType => _hasImplicitType ?? false;
1234 } 1259 }
1235 1260
1236 class UnlinkedVariableBuilder { 1261 class UnlinkedVariableBuilder {
1237 final Map _json = {}; 1262 final Map _json = {};
1238 1263
1239 UnlinkedVariableBuilder(builder.BuilderContext context); 1264 UnlinkedVariableBuilder(builder.BuilderContext context);
1240 1265
1241 void set name(String _value) { 1266 void set name(String _value) {
1242 assert(!_json.containsKey("name")); 1267 assert(!_json.containsKey("name"));
1243 if (_value != null) { 1268 if (_value != null) {
(...skipping 29 matching lines...) Expand all
1273 } 1298 }
1274 } 1299 }
1275 1300
1276 void set isConst(bool _value) { 1301 void set isConst(bool _value) {
1277 assert(!_json.containsKey("isConst")); 1302 assert(!_json.containsKey("isConst"));
1278 if (_value != null) { 1303 if (_value != null) {
1279 _json["isConst"] = _value; 1304 _json["isConst"] = _value;
1280 } 1305 }
1281 } 1306 }
1282 1307
1308 void set hasImplicitType(bool _value) {
1309 assert(!_json.containsKey("hasImplicitType"));
1310 if (_value != null) {
1311 _json["hasImplicitType"] = _value;
1312 }
1313 }
1314
1283 Map finish() => _json; 1315 Map finish() => _json;
1284 } 1316 }
1285 1317
1286 UnlinkedVariableBuilder encodeUnlinkedVariable(builder.BuilderContext builderCon text, {String name, int unit, UnlinkedTypeRefBuilder type, bool isStatic, bool i sFinal, bool isConst}) { 1318 UnlinkedVariableBuilder encodeUnlinkedVariable(builder.BuilderContext builderCon text, {String name, int unit, UnlinkedTypeRefBuilder type, bool isStatic, bool i sFinal, bool isConst, bool hasImplicitType}) {
1287 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); 1319 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext);
1288 builder.name = name; 1320 builder.name = name;
1289 builder.unit = unit; 1321 builder.unit = unit;
1290 builder.type = type; 1322 builder.type = type;
1291 builder.isStatic = isStatic; 1323 builder.isStatic = isStatic;
1292 builder.isFinal = isFinal; 1324 builder.isFinal = isFinal;
1293 builder.isConst = isConst; 1325 builder.isConst = isConst;
1326 builder.hasImplicitType = hasImplicitType;
1294 return builder; 1327 return builder;
1295 } 1328 }
1296 1329
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698