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

Side by Side Diff: pkg/analyzer/tool/summary/idl.dart

Issue 1619253003: Include explicit constructors and static methods into UnlinkedPublicName (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
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 /** 5 /**
6 * This file is an "idl" style description of the summary format. It is not 6 * This file is an "idl" style description of the summary format. It is not
7 * executed directly; instead it is parsed and transformed into code that 7 * executed directly; instead it is parsed and transformed into code that
8 * implements the summary format. 8 * implements the summary format.
9 * 9 *
10 * The code generation process introduces the following non-typical semantics: 10 * The code generation process introduces the following non-typical semantics:
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 * Enum used to indicate the kind of entity referred to by a 284 * Enum used to indicate the kind of entity referred to by a
285 * [LinkedReference]. 285 * [LinkedReference].
286 */ 286 */
287 enum ReferenceKind { 287 enum ReferenceKind {
288 /** 288 /**
289 * The entity is a class or enum. 289 * The entity is a class or enum.
290 */ 290 */
291 classOrEnum, 291 classOrEnum,
292 292
293 /** 293 /**
294 * The entity is a constructor.
295 */
296 constructor,
297
298 /**
299 * The entity is a static method.
300 */
301 staticMethod,
302
303 /**
294 * The entity is a typedef. 304 * The entity is a typedef.
295 */ 305 */
296 typedef, 306 typedef,
297 307
298 /** 308 /**
299 * The entity is a top level function. 309 * The entity is a top level function.
300 */ 310 */
301 topLevelFunction, 311 topLevelFunction,
302 312
303 /** 313 /**
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 int uriEnd; 1142 int uriEnd;
1133 } 1143 }
1134 1144
1135 /** 1145 /**
1136 * Unlinked summary information about a specific name contributed by a 1146 * Unlinked summary information about a specific name contributed by a
1137 * compilation unit to a library's public namespace. 1147 * compilation unit to a library's public namespace.
1138 * 1148 *
1139 * TODO(paulberry): add a count of generic parameters, so that resynthesis 1149 * TODO(paulberry): add a count of generic parameters, so that resynthesis
1140 * doesn't have to peek into the library to obtain this info. 1150 * doesn't have to peek into the library to obtain this info.
1141 * 1151 *
1142 * TODO(paulberry): for classes, add info about static members and
1143 * constructors, since this will be needed to prelink info about constants.
1144 *
1145 * TODO(paulberry): some of this information is redundant with information 1152 * TODO(paulberry): some of this information is redundant with information
1146 * elsewhere in the summary. Consider reducing the redundancy to reduce 1153 * elsewhere in the summary. Consider reducing the redundancy to reduce
1147 * summary size. 1154 * summary size.
1148 */ 1155 */
1149 class UnlinkedPublicName { 1156 class UnlinkedPublicName {
1150 /** 1157 /**
1151 * The name itself. 1158 * The name itself.
1152 */ 1159 */
1153 String name; 1160 String name;
1154 1161
1155 /** 1162 /**
1156 * The kind of object referred to by the name. 1163 * The kind of object referred to by the name.
1157 */ 1164 */
1158 ReferenceKind kind; 1165 ReferenceKind kind;
1159 1166
1160 /** 1167 /**
1161 * If the entity being referred to is generic, the number of type parameters 1168 * If the entity being referred to is generic, the number of type parameters
1162 * it accepts. Otherwise zero. 1169 * it accepts. Otherwise zero.
1163 */ 1170 */
1164 int numTypeParameters; 1171 int numTypeParameters;
1172
1173 /**
1174 * If this [UnlinkedPublicName] is a class, the list of static methods
1175 * and constructors. Otherwise empty.
1176 */
1177 List<UnlinkedPublicName> executables;
1165 } 1178 }
1166 1179
1167 /** 1180 /**
1168 * Unlinked summary information about what a compilation unit contributes to a 1181 * Unlinked summary information about what a compilation unit contributes to a
1169 * library's public namespace. This is the subset of [UnlinkedUnit] that is 1182 * library's public namespace. This is the subset of [UnlinkedUnit] that is
1170 * required from dependent libraries in order to perform prelinking. 1183 * required from dependent libraries in order to perform prelinking.
1171 */ 1184 */
1172 @topLevel 1185 @topLevel
1173 class UnlinkedPublicNamespace { 1186 class UnlinkedPublicNamespace {
1174 /** 1187 /**
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 /** 1428 /**
1416 * If this variable is propagable, nonzero slot id identifying which entry in 1429 * If this variable is propagable, nonzero slot id identifying which entry in
1417 * [LinkedLibrary.types] contains the propagated type for this variable. If 1430 * [LinkedLibrary.types] contains the propagated type for this variable. If
1418 * there is no matching entry in [LinkedLibrary.types], then this variable's 1431 * there is no matching entry in [LinkedLibrary.types], then this variable's
1419 * propagated type is the same as its declared type. 1432 * propagated type is the same as its declared type.
1420 * 1433 *
1421 * Non-propagable variables have a [propagatedTypeSlot] of zero. 1434 * Non-propagable variables have a [propagatedTypeSlot] of zero.
1422 */ 1435 */
1423 int propagatedTypeSlot; 1436 int propagatedTypeSlot;
1424 } 1437 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698