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 1625543002: Use the explicit string 'void' to refer to void in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/prelink.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 'base.dart' as base; 10 import 'base.dart' as base;
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 _units = _value; 940 _units = _value;
941 } 941 }
942 942
943 @override 943 @override
944 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep endencyBuilder>[]; 944 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep endencyBuilder>[];
945 945
946 /** 946 /**
947 * The libraries that this library depends on (either via an explicit import 947 * The libraries that this library depends on (either via an explicit import
948 * statement or via the implicit dependencies on `dart:core` and 948 * statement or via the implicit dependencies on `dart:core` and
949 * `dart:async`). The first element of this array is a pseudo-dependency 949 * `dart:async`). The first element of this array is a pseudo-dependency
950 * representing the library itself (it is also used for "dynamic"). This is 950 * representing the library itself (it is also used for `dynamic` and
951 * followed by elements representing "prelinked" dependencies (direct imports 951 * `void`). This is followed by elements representing "prelinked"
952 * and the transitive closure of exports). After the prelinked dependencies 952 * dependencies (direct imports and the transitive closure of exports).
953 * are elements represent "linked" dependencies. 953 * After the prelinked dependencies are elements representing "linked"
954 * dependencies.
954 * 955 *
955 * A library is only included as a "linked" dependency if it is a true 956 * A library is only included as a "linked" dependency if it is a true
956 * dependency (e.g. a propagated or inferred type or constant value 957 * dependency (e.g. a propagated or inferred type or constant value
957 * implicitly refers to an element declared in the library) or 958 * implicitly refers to an element declared in the library) or
958 * anti-dependency (e.g. the result of type propagation or type inference 959 * anti-dependency (e.g. the result of type propagation or type inference
959 * depends on the lack of a certain declaration in the library). 960 * depends on the lack of a certain declaration in the library).
960 */ 961 */
961 void set dependencies(List<LinkedDependencyBuilder> _value) { 962 void set dependencies(List<LinkedDependencyBuilder> _value) {
962 assert(!_finished); 963 assert(!_finished);
963 _dependencies = _value; 964 _dependencies = _value;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 * library. The summary of the defining compilation unit is listed first, 1071 * library. The summary of the defining compilation unit is listed first,
1071 * followed by the summary of each part, in the order of the `part` 1072 * followed by the summary of each part, in the order of the `part`
1072 * declarations in the defining compilation unit. 1073 * declarations in the defining compilation unit.
1073 */ 1074 */
1074 List<LinkedUnit> get units; 1075 List<LinkedUnit> get units;
1075 1076
1076 /** 1077 /**
1077 * The libraries that this library depends on (either via an explicit import 1078 * The libraries that this library depends on (either via an explicit import
1078 * statement or via the implicit dependencies on `dart:core` and 1079 * statement or via the implicit dependencies on `dart:core` and
1079 * `dart:async`). The first element of this array is a pseudo-dependency 1080 * `dart:async`). The first element of this array is a pseudo-dependency
1080 * representing the library itself (it is also used for "dynamic"). This is 1081 * representing the library itself (it is also used for `dynamic` and
1081 * followed by elements representing "prelinked" dependencies (direct imports 1082 * `void`). This is followed by elements representing "prelinked"
1082 * and the transitive closure of exports). After the prelinked dependencies 1083 * dependencies (direct imports and the transitive closure of exports).
1083 * are elements represent "linked" dependencies. 1084 * After the prelinked dependencies are elements representing "linked"
1085 * dependencies.
1084 * 1086 *
1085 * A library is only included as a "linked" dependency if it is a true 1087 * A library is only included as a "linked" dependency if it is a true
1086 * dependency (e.g. a propagated or inferred type or constant value 1088 * dependency (e.g. a propagated or inferred type or constant value
1087 * implicitly refers to an element declared in the library) or 1089 * implicitly refers to an element declared in the library) or
1088 * anti-dependency (e.g. the result of type propagation or type inference 1090 * anti-dependency (e.g. the result of type propagation or type inference
1089 * depends on the lack of a certain declaration in the library). 1091 * depends on the lack of a certain declaration in the library).
1090 */ 1092 */
1091 List<LinkedDependency> get dependencies; 1093 List<LinkedDependency> get dependencies;
1092 1094
1093 /** 1095 /**
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 void set dependency(int _value) { 1194 void set dependency(int _value) {
1193 assert(!_finished); 1195 assert(!_finished);
1194 assert(_value == null || _value >= 0); 1196 assert(_value == null || _value >= 0);
1195 _dependency = _value; 1197 _dependency = _value;
1196 } 1198 }
1197 1199
1198 @override 1200 @override
1199 ReferenceKind get kind => _kind ??= ReferenceKind.classOrEnum; 1201 ReferenceKind get kind => _kind ??= ReferenceKind.classOrEnum;
1200 1202
1201 /** 1203 /**
1202 * The kind of the entity being referred to. For the pseudo-type `dynamic`, 1204 * The kind of the entity being referred to. For the pseudo-types `dynamic`
1203 * the kind is [ReferenceKind.classOrEnum]. 1205 * and `void`, the kind is [ReferenceKind.classOrEnum].
1204 */ 1206 */
1205 void set kind(ReferenceKind _value) { 1207 void set kind(ReferenceKind _value) {
1206 assert(!_finished); 1208 assert(!_finished);
1207 _kind = _value; 1209 _kind = _value;
1208 } 1210 }
1209 1211
1210 @override 1212 @override
1211 int get unit => _unit ??= 0; 1213 int get unit => _unit ??= 0;
1212 1214
1213 /** 1215 /**
(...skipping 20 matching lines...) Expand all
1234 assert(_value == null || _value >= 0); 1236 assert(_value == null || _value >= 0);
1235 _numTypeParameters = _value; 1237 _numTypeParameters = _value;
1236 } 1238 }
1237 1239
1238 @override 1240 @override
1239 String get name => _name ??= ''; 1241 String get name => _name ??= '';
1240 1242
1241 /** 1243 /**
1242 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], 1244 * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
1243 * name of the entity being referred to. For the pseudo-type `dynamic`, the 1245 * name of the entity being referred to. For the pseudo-type `dynamic`, the
1244 * string is "dynamic". 1246 * string is "dynamic". For the pseudo-type `void`, the string is "void".
1245 */ 1247 */
1246 void set name(String _value) { 1248 void set name(String _value) {
1247 assert(!_finished); 1249 assert(!_finished);
1248 _name = _value; 1250 _name = _value;
1249 } 1251 }
1250 1252
1251 LinkedReferenceBuilder({int dependency, ReferenceKind kind, int unit, int numT ypeParameters, String name}) 1253 LinkedReferenceBuilder({int dependency, ReferenceKind kind, int unit, int numT ypeParameters, String name})
1252 : _dependency = dependency, 1254 : _dependency = dependency,
1253 _kind = kind, 1255 _kind = kind,
1254 _unit = unit, 1256 _unit = unit,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 */ 1289 */
1288 abstract class LinkedReference extends base.SummaryClass { 1290 abstract class LinkedReference extends base.SummaryClass {
1289 1291
1290 /** 1292 /**
1291 * Index into [LinkedLibrary.dependencies] indicating which imported library 1293 * Index into [LinkedLibrary.dependencies] indicating which imported library
1292 * declares the entity being referred to. 1294 * declares the entity being referred to.
1293 */ 1295 */
1294 int get dependency; 1296 int get dependency;
1295 1297
1296 /** 1298 /**
1297 * The kind of the entity being referred to. For the pseudo-type `dynamic`, 1299 * The kind of the entity being referred to. For the pseudo-types `dynamic`
1298 * the kind is [ReferenceKind.classOrEnum]. 1300 * and `void`, the kind is [ReferenceKind.classOrEnum].
1299 */ 1301 */
1300 ReferenceKind get kind; 1302 ReferenceKind get kind;
1301 1303
1302 /** 1304 /**
1303 * Integer index indicating which unit in the imported library contains the 1305 * Integer index indicating which unit in the imported library contains the
1304 * definition of the entity. As with indices into [LinkedLibrary.units], 1306 * definition of the entity. As with indices into [LinkedLibrary.units],
1305 * zero represents the defining compilation unit, and nonzero values 1307 * zero represents the defining compilation unit, and nonzero values
1306 * represent parts in the order of the corresponding `part` declarations. 1308 * represent parts in the order of the corresponding `part` declarations.
1307 */ 1309 */
1308 int get unit; 1310 int get unit;
1309 1311
1310 /** 1312 /**
1311 * If the entity being referred to is generic, the number of type parameters 1313 * If the entity being referred to is generic, the number of type parameters
1312 * it accepts. Otherwise zero. 1314 * it accepts. Otherwise zero.
1313 */ 1315 */
1314 int get numTypeParameters; 1316 int get numTypeParameters;
1315 1317
1316 /** 1318 /**
1317 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], 1319 * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
1318 * name of the entity being referred to. For the pseudo-type `dynamic`, the 1320 * name of the entity being referred to. For the pseudo-type `dynamic`, the
1319 * string is "dynamic". 1321 * string is "dynamic". For the pseudo-type `void`, the string is "void".
1320 */ 1322 */
1321 String get name; 1323 String get name;
1322 } 1324 }
1323 1325
1324 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { 1326 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> {
1325 const _LinkedReferenceReader(); 1327 const _LinkedReferenceReader();
1326 1328
1327 @override 1329 @override
1328 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference Impl(bp); 1330 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference Impl(bp);
1329 } 1331 }
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 */ 2962 */
2961 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 2963 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
2962 assert(!_finished); 2964 assert(!_finished);
2963 _typeParameters = _value; 2965 _typeParameters = _value;
2964 } 2966 }
2965 2967
2966 @override 2968 @override
2967 EntityRefBuilder get returnType => _returnType; 2969 EntityRefBuilder get returnType => _returnType;
2968 2970
2969 /** 2971 /**
2970 * Declared return type of the executable. Absent if the return type is 2972 * Declared return type of the executable. Absent if the executable is a
2971 * `void` or the executable is a constructor. Note that when strong mode is 2973 * constructor. Note that when strong mode is enabled, the actual return
2972 * enabled, the actual return type may be different due to type inference. 2974 * type may be different due to type inference.
2973 */ 2975 */
2974 void set returnType(EntityRefBuilder _value) { 2976 void set returnType(EntityRefBuilder _value) {
2975 assert(!_finished); 2977 assert(!_finished);
2976 _returnType = _value; 2978 _returnType = _value;
2977 } 2979 }
2978 2980
2979 @override 2981 @override
2980 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui lder>[]; 2982 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui lder>[];
2981 2983
2982 /** 2984 /**
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3181 */ 3183 */
3182 UnlinkedDocumentationComment get documentationComment; 3184 UnlinkedDocumentationComment get documentationComment;
3183 3185
3184 /** 3186 /**
3185 * Type parameters of the executable, if any. Empty if support for generic 3187 * Type parameters of the executable, if any. Empty if support for generic
3186 * method syntax is disabled. 3188 * method syntax is disabled.
3187 */ 3189 */
3188 List<UnlinkedTypeParam> get typeParameters; 3190 List<UnlinkedTypeParam> get typeParameters;
3189 3191
3190 /** 3192 /**
3191 * Declared return type of the executable. Absent if the return type is 3193 * Declared return type of the executable. Absent if the executable is a
3192 * `void` or the executable is a constructor. Note that when strong mode is 3194 * constructor. Note that when strong mode is enabled, the actual return
3193 * enabled, the actual return type may be different due to type inference. 3195 * type may be different due to type inference.
3194 */ 3196 */
3195 EntityRef get returnType; 3197 EntityRef get returnType;
3196 3198
3197 /** 3199 /**
3198 * Parameters of the executable, if any. Note that getters have no 3200 * Parameters of the executable, if any. Note that getters have no
3199 * parameters (hence this will be the empty list), and setters have a single 3201 * parameters (hence this will be the empty list), and setters have a single
3200 * parameter. 3202 * parameter.
3201 */ 3203 */
3202 List<UnlinkedParam> get parameters; 3204 List<UnlinkedParam> get parameters;
3203 3205
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 assert(!_finished); 3972 assert(!_finished);
3971 assert(_value == null || _value >= 0); 3973 assert(_value == null || _value >= 0);
3972 _nameOffset = _value; 3974 _nameOffset = _value;
3973 } 3975 }
3974 3976
3975 @override 3977 @override
3976 EntityRefBuilder get type => _type; 3978 EntityRefBuilder get type => _type;
3977 3979
3978 /** 3980 /**
3979 * If [isFunctionTyped] is `true`, the declared return type. If 3981 * If [isFunctionTyped] is `true`, the declared return type. If
3980 * [isFunctionTyped] is `false`, the declared type. Absent if 3982 * [isFunctionTyped] is `false`, the declared type.
3981 * [isFunctionTyped] is `true` and the declared return type is `void`. Note
3982 * that when strong mode is enabled, the actual type may be different due to
3983 * type inference.
3984 */ 3983 */
3985 void set type(EntityRefBuilder _value) { 3984 void set type(EntityRefBuilder _value) {
3986 assert(!_finished); 3985 assert(!_finished);
3987 _type = _value; 3986 _type = _value;
3988 } 3987 }
3989 3988
3990 @override 3989 @override
3991 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui lder>[]; 3990 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui lder>[];
3992 3991
3993 /** 3992 /**
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
4108 */ 4107 */
4109 String get name; 4108 String get name;
4110 4109
4111 /** 4110 /**
4112 * Offset of the parameter name relative to the beginning of the file. 4111 * Offset of the parameter name relative to the beginning of the file.
4113 */ 4112 */
4114 int get nameOffset; 4113 int get nameOffset;
4115 4114
4116 /** 4115 /**
4117 * If [isFunctionTyped] is `true`, the declared return type. If 4116 * If [isFunctionTyped] is `true`, the declared return type. If
4118 * [isFunctionTyped] is `false`, the declared type. Absent if 4117 * [isFunctionTyped] is `false`, the declared type.
4119 * [isFunctionTyped] is `true` and the declared return type is `void`. Note
4120 * that when strong mode is enabled, the actual type may be different due to
4121 * type inference.
4122 */ 4118 */
4123 EntityRef get type; 4119 EntityRef get type;
4124 4120
4125 /** 4121 /**
4126 * If [isFunctionTyped] is `true`, the parameters of the function type. 4122 * If [isFunctionTyped] is `true`, the parameters of the function type.
4127 */ 4123 */
4128 List<UnlinkedParam> get parameters; 4124 List<UnlinkedParam> get parameters;
4129 4125
4130 /** 4126 /**
4131 * Kind of the parameter. 4127 * Kind of the parameter.
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
4643 bool _finished = false; 4639 bool _finished = false;
4644 4640
4645 String _name; 4641 String _name;
4646 int _prefixReference; 4642 int _prefixReference;
4647 4643
4648 @override 4644 @override
4649 String get name => _name ??= ''; 4645 String get name => _name ??= '';
4650 4646
4651 /** 4647 /**
4652 * Name of the entity being referred to. For the pseudo-type `dynamic`, the 4648 * Name of the entity being referred to. For the pseudo-type `dynamic`, the
4653 * string is "dynamic". 4649 * string is "dynamic". For the pseudo-type `void`, the string is "void".
4654 */ 4650 */
4655 void set name(String _value) { 4651 void set name(String _value) {
4656 assert(!_finished); 4652 assert(!_finished);
4657 _name = _value; 4653 _name = _value;
4658 } 4654 }
4659 4655
4660 @override 4656 @override
4661 int get prefixReference => _prefixReference ??= 0; 4657 int get prefixReference => _prefixReference ??= 0;
4662 4658
4663 /** 4659 /**
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4697 } 4693 }
4698 4694
4699 /** 4695 /**
4700 * Unlinked summary information about a name referred to in one library that 4696 * Unlinked summary information about a name referred to in one library that
4701 * might be defined in another. 4697 * might be defined in another.
4702 */ 4698 */
4703 abstract class UnlinkedReference extends base.SummaryClass { 4699 abstract class UnlinkedReference extends base.SummaryClass {
4704 4700
4705 /** 4701 /**
4706 * Name of the entity being referred to. For the pseudo-type `dynamic`, the 4702 * Name of the entity being referred to. For the pseudo-type `dynamic`, the
4707 * string is "dynamic". 4703 * string is "dynamic". For the pseudo-type `void`, the string is "void".
4708 */ 4704 */
4709 String get name; 4705 String get name;
4710 4706
4711 /** 4707 /**
4712 * Prefix used to refer to the entity, or zero if no prefix is used. This is 4708 * Prefix used to refer to the entity, or zero if no prefix is used. This is
4713 * an index into [UnlinkedUnit.references]. 4709 * an index into [UnlinkedUnit.references].
4714 * 4710 *
4715 * Prefix references must always point backward; that is, for all i, if 4711 * Prefix references must always point backward; that is, for all i, if
4716 * UnlinkedUnit.references[i].prefixReference != 0, then 4712 * UnlinkedUnit.references[i].prefixReference != 0, then
4717 * UnlinkedUnit.references[i].prefixReference < i. 4713 * UnlinkedUnit.references[i].prefixReference < i.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
4808 */ 4804 */
4809 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 4805 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
4810 assert(!_finished); 4806 assert(!_finished);
4811 _typeParameters = _value; 4807 _typeParameters = _value;
4812 } 4808 }
4813 4809
4814 @override 4810 @override
4815 EntityRefBuilder get returnType => _returnType; 4811 EntityRefBuilder get returnType => _returnType;
4816 4812
4817 /** 4813 /**
4818 * Return type of the typedef. Absent if the return type is `void`. 4814 * Return type of the typedef.
4819 */ 4815 */
4820 void set returnType(EntityRefBuilder _value) { 4816 void set returnType(EntityRefBuilder _value) {
4821 assert(!_finished); 4817 assert(!_finished);
4822 _returnType = _value; 4818 _returnType = _value;
4823 } 4819 }
4824 4820
4825 @override 4821 @override
4826 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui lder>[]; 4822 List<UnlinkedParamBuilder> get parameters => _parameters ??= <UnlinkedParamBui lder>[];
4827 4823
4828 /** 4824 /**
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
4907 * documentation comment. 4903 * documentation comment.
4908 */ 4904 */
4909 UnlinkedDocumentationComment get documentationComment; 4905 UnlinkedDocumentationComment get documentationComment;
4910 4906
4911 /** 4907 /**
4912 * Type parameters of the typedef, if any. 4908 * Type parameters of the typedef, if any.
4913 */ 4909 */
4914 List<UnlinkedTypeParam> get typeParameters; 4910 List<UnlinkedTypeParam> get typeParameters;
4915 4911
4916 /** 4912 /**
4917 * Return type of the typedef. Absent if the return type is `void`. 4913 * Return type of the typedef.
4918 */ 4914 */
4919 EntityRef get returnType; 4915 EntityRef get returnType;
4920 4916
4921 /** 4917 /**
4922 * Parameters of the executable, if any. 4918 * Parameters of the executable, if any.
4923 */ 4919 */
4924 List<UnlinkedParam> get parameters; 4920 List<UnlinkedParam> get parameters;
4925 } 4921 }
4926 4922
4927 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { 4923 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> {
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
6017 "type": type, 6013 "type": type,
6018 "constExpr": constExpr, 6014 "constExpr": constExpr,
6019 "isStatic": isStatic, 6015 "isStatic": isStatic,
6020 "isFinal": isFinal, 6016 "isFinal": isFinal,
6021 "isConst": isConst, 6017 "isConst": isConst,
6022 "hasImplicitType": hasImplicitType, 6018 "hasImplicitType": hasImplicitType,
6023 "propagatedTypeSlot": propagatedTypeSlot, 6019 "propagatedTypeSlot": propagatedTypeSlot,
6024 }; 6020 };
6025 } 6021 }
6026 6022
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/prelink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698