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

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

Issue 1617123002: Generate documentation for enumeration values. (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/tool/summary/generate.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;
11 import 'flat_buffers.dart' as fb; 11 import 'flat_buffers.dart' as fb;
12 12
13 /** 13 /**
14 * Enum used to indicate the kind of entity referred to by a 14 * Enum used to indicate the kind of entity referred to by a
15 * [LinkedReference]. 15 * [LinkedReference].
16 */ 16 */
17 enum ReferenceKind { 17 enum ReferenceKind {
18 /**
19 * The entity is a class or enum.
20 */
18 classOrEnum, 21 classOrEnum,
22
23 /**
24 * The entity is a typedef.
25 */
19 typedef, 26 typedef,
27
28 /**
29 * The entity is a top level function.
30 */
20 topLevelFunction, 31 topLevelFunction,
32
33 /**
34 * The entity is a top level getter or setter.
35 */
21 topLevelPropertyAccessor, 36 topLevelPropertyAccessor,
37
38 /**
39 * The entity is a prefix.
40 */
22 prefix, 41 prefix,
23 unresolved, 42
43 /**
44 * The entity being referred to does not exist.
45 */
46 unresolved
24 } 47 }
25 48
26 class _ReferenceKindReader extends fb.Reader<ReferenceKind> { 49 class _ReferenceKindReader extends fb.Reader<ReferenceKind> {
27 const _ReferenceKindReader() : super(); 50 const _ReferenceKindReader() : super();
28 51
29 @override 52 @override
30 int get size => 4; 53 int get size => 4;
31 54
32 @override 55 @override
33 ReferenceKind read(fb.BufferPointer bp) { 56 ReferenceKind read(fb.BufferPointer bp) {
34 int index = const fb.Uint32Reader().read(bp); 57 int index = const fb.Uint32Reader().read(bp);
35 return ReferenceKind.values[index]; 58 return ReferenceKind.values[index];
36 } 59 }
37 } 60 }
38 61
39 /** 62 /**
40 * Enum representing the various kinds of operations which may be performed to 63 * Enum representing the various kinds of operations which may be performed to
41 * produce a constant value. These options are assumed to execute in the 64 * produce a constant value. These options are assumed to execute in the
42 * context of a stack which is initially empty. 65 * context of a stack which is initially empty.
43 */ 66 */
44 enum UnlinkedConstOperation { 67 enum UnlinkedConstOperation {
68 /**
69 * Push the value of the n-th constructor argument (where n is obtained from
70 * [UnlinkedConst.ints]) onto the stack.
71 */
45 pushArgument, 72 pushArgument,
73
74 /**
75 * Push the next value from [UnlinkedConst.ints] (a 32-bit unsigned integer)
76 * onto the stack.
77 *
78 * Note that Dart supports integers larger than 32 bits; these are
79 * represented by composing 32 bit values using the [shiftOr] operation.
80 */
46 pushInt, 81 pushInt,
82
83 /**
84 * Pop the top value off the stack, which should be an integer. Multiply it
85 * by 2^32, "or" in the next value from [UnlinkedConst.ints] (which is
86 * interpreted as a 32-bit unsigned integer), and push the result back onto
87 * the stack.
88 */
47 shiftOr, 89 shiftOr,
90
91 /**
92 * Push the next value from [UnlinkedConst.doubles] (a double precision
93 * floating point value) onto the stack.
94 */
48 pushDouble, 95 pushDouble,
96
97 /**
98 * Push the constant `true` onto the stack.
99 */
49 pushTrue, 100 pushTrue,
101
102 /**
103 * Push the constant `false` onto the stack.
104 */
50 pushFalse, 105 pushFalse,
106
107 /**
108 * Push the next value from [UnlinkedConst.strings] onto the stack.
109 */
51 pushString, 110 pushString,
111
112 /**
113 * Pop the top n values from the stack (where n is obtained from
114 * [UnlinkedConst.ints]), convert them to strings (if they aren't already),
115 * concatenate them into a single string, and push it back onto the stack.
116 *
117 * This operation is used to represent constants whose value is a literal
118 * string containing string interpolations.
119 */
52 concatenate, 120 concatenate,
121
122 /**
123 * Pop the top value from the stack which should be string, convert it to
124 * a symbol, and push it back onto the stack.
125 */
53 makeSymbol, 126 makeSymbol,
127
128 /**
129 * Push the constant `null` onto the stack.
130 */
54 pushNull, 131 pushNull,
132
133 /**
134 * Evaluate a (potentially qualified) identifier expression and push the
135 * resulting value onto the stack. The identifier to be evaluated is
136 * obtained from [UnlinkedConst.references].
137 *
138 * This operation is used to represent the following kinds of constants
139 * (which are indistinguishable from an unresolved AST alone):
140 *
141 * - A qualified reference to a static constant variable (e.g. `C.v`, where
142 * C is a class and `v` is a constant static variable in `C`).
143 * - An identifier expression referring to a constant variable.
144 * - A simple or qualified identifier denoting a class or type alias.
145 * - A simple or qualified identifier denoting a top-level function or a
146 * static method.
147 */
55 pushReference, 148 pushReference,
149
150 /**
151 * Pop the top `n` values from the stack (where `n` is obtained from
152 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
153 * `n` values from [UnlinkedConst.strings] and use the lists of names and
154 * values to create named arguments. Then pop the top `m` values from the
155 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
156 * from the end) and use them as positional arguments. Use the lists of
157 * positional and names arguments to invoke a constant constructor whose name
158 * is obtained from [UnlinkedConst.strings], and whose class is obtained from
159 * [UnlinkedConst.references], and push the resulting value back onto the
160 * stack.
161 *
162 * Note that for an invocation of the form `const a.b(...)` (where no type
163 * arguments are specified), it is impossible to tell from the unresolved AST
164 * alone whether `a` is a class name and `b` is a constructor name, or `a` is
165 * a prefix name and `b` is a class name. In this case it is presumed that
166 * `a` is a prefix name and `b` is a class name.
167 *
168 * TODO(paulberry): figure out how to resolve this ambiguity in the
169 * "prelinked" part of the summary.
170 */
56 invokeConstructor, 171 invokeConstructor,
172
173 /**
174 * Pop the top n values from the stack (where n is obtained from
175 * [UnlinkedConst.ints]), place them in a [List], and push the result back
176 * onto the stack. The type parameter for the [List] is obtained from
177 * [UnlinkedConst.references].
178 */
57 makeList, 179 makeList,
180
181 /**
182 * Pop the top 2*n values from the stack (where n is obtained from
183 * [UnlinkedConst.ints]), interpret them as key/value pairs, place them in a
184 * [Map], and push the result back onto the stack. The two type parameters fo r
185 * the [Map] are obtained from [UnlinkedConst.references].
186 */
58 makeMap, 187 makeMap,
188
189 /**
190 * Pop the top 2 values from the stack, pass them to the predefined Dart
191 * function `identical`, and push the result back onto the stack.
192 */
59 identical, 193 identical,
194
195 /**
196 * Pop the top 2 values from the stack, evaluate `v1 == v2`, and push the
197 * result back onto the stack.
198 *
199 * This is also used to represent `v1 != v2`, by composition with [not].
200 */
60 equal, 201 equal,
202
203 /**
204 * Pop the top value from the stack, compute its boolean negation, and push
205 * the result back onto the stack.
206 */
61 not, 207 not,
208
209 /**
210 * Pop the top 2 values from the stack, compute `v1 && v2`, and push the
211 * result back onto the stack.
212 */
62 and, 213 and,
214
215 /**
216 * Pop the top 2 values from the stack, compute `v1 || v2`, and push the
217 * result back onto the stack.
218 */
63 or, 219 or,
220
221 /**
222 * Pop the top value from the stack, compute its integer complement, and push
223 * the result back onto the stack.
224 */
64 complement, 225 complement,
226
227 /**
228 * Pop the top 2 values from the stack, compute `v1 ^ v2`, and push the
229 * result back onto the stack.
230 */
65 bitXor, 231 bitXor,
232
233 /**
234 * Pop the top 2 values from the stack, compute `v1 & v2`, and push the
235 * result back onto the stack.
236 */
66 bitAnd, 237 bitAnd,
238
239 /**
240 * Pop the top 2 values from the stack, compute `v1 | v2`, and push the
241 * result back onto the stack.
242 */
67 bitOr, 243 bitOr,
244
245 /**
246 * Pop the top 2 values from the stack, compute `v1 >> v2`, and push the
247 * result back onto the stack.
248 */
68 bitShiftRight, 249 bitShiftRight,
250
251 /**
252 * Pop the top 2 values from the stack, compute `v1 << v2`, and push the
253 * result back onto the stack.
254 */
69 bitShiftLeft, 255 bitShiftLeft,
256
257 /**
258 * Pop the top 2 values from the stack, compute `v1 + v2`, and push the
259 * result back onto the stack.
260 */
70 add, 261 add,
262
263 /**
264 * Pop the top value from the stack, compute its integer negation, and push
265 * the result back onto the stack.
266 */
71 negate, 267 negate,
268
269 /**
270 * Pop the top 2 values from the stack, compute `v1 - v2`, and push the
271 * result back onto the stack.
272 */
72 subtract, 273 subtract,
274
275 /**
276 * Pop the top 2 values from the stack, compute `v1 * v2`, and push the
277 * result back onto the stack.
278 */
73 multiply, 279 multiply,
280
281 /**
282 * Pop the top 2 values from the stack, compute `v1 / v2`, and push the
283 * result back onto the stack.
284 */
74 divide, 285 divide,
286
287 /**
288 * Pop the top 2 values from the stack, compute `v1 ~/ v2`, and push the
289 * result back onto the stack.
290 */
75 floorDivide, 291 floorDivide,
292
293 /**
294 * Pop the top 2 values from the stack, compute `v1 > v2`, and push the
295 * result back onto the stack.
296 */
76 greater, 297 greater,
298
299 /**
300 * Pop the top 2 values from the stack, compute `v1 < v2`, and push the
301 * result back onto the stack.
302 */
77 less, 303 less,
304
305 /**
306 * Pop the top 2 values from the stack, compute `v1 >= v2`, and push the
307 * result back onto the stack.
308 */
78 greaterEqual, 309 greaterEqual,
310
311 /**
312 * Pop the top 2 values from the stack, compute `v1 <= v2`, and push the
313 * result back onto the stack.
314 */
79 lessEqual, 315 lessEqual,
316
317 /**
318 * Pop the top 2 values from the stack, compute `v1 % v2`, and push the
319 * result back onto the stack.
320 */
80 modulo, 321 modulo,
322
323 /**
324 * Pop the top 3 values from the stack, compute `v1 ? v2 : v3`, and push the
325 * result back onto the stack.
326 */
81 conditional, 327 conditional,
82 length, 328
329 /**
330 * Pop the top value from the stack, evaluate `v.length`, and push the result
331 * back onto the stack.
332 */
333 length
83 } 334 }
84 335
85 class _UnlinkedConstOperationReader extends fb.Reader<UnlinkedConstOperation> { 336 class _UnlinkedConstOperationReader extends fb.Reader<UnlinkedConstOperation> {
86 const _UnlinkedConstOperationReader() : super(); 337 const _UnlinkedConstOperationReader() : super();
87 338
88 @override 339 @override
89 int get size => 4; 340 int get size => 4;
90 341
91 @override 342 @override
92 UnlinkedConstOperation read(fb.BufferPointer bp) { 343 UnlinkedConstOperation read(fb.BufferPointer bp) {
93 int index = const fb.Uint32Reader().read(bp); 344 int index = const fb.Uint32Reader().read(bp);
94 return UnlinkedConstOperation.values[index]; 345 return UnlinkedConstOperation.values[index];
95 } 346 }
96 } 347 }
97 348
98 /** 349 /**
99 * Enum used to indicate the kind of an executable. 350 * Enum used to indicate the kind of an executable.
100 */ 351 */
101 enum UnlinkedExecutableKind { 352 enum UnlinkedExecutableKind {
353 /**
354 * Executable is a function or method.
355 */
102 functionOrMethod, 356 functionOrMethod,
357
358 /**
359 * Executable is a getter.
360 */
103 getter, 361 getter,
362
363 /**
364 * Executable is a setter.
365 */
104 setter, 366 setter,
105 constructor, 367
368 /**
369 * Executable is a constructor.
370 */
371 constructor
106 } 372 }
107 373
108 class _UnlinkedExecutableKindReader extends fb.Reader<UnlinkedExecutableKind> { 374 class _UnlinkedExecutableKindReader extends fb.Reader<UnlinkedExecutableKind> {
109 const _UnlinkedExecutableKindReader() : super(); 375 const _UnlinkedExecutableKindReader() : super();
110 376
111 @override 377 @override
112 int get size => 4; 378 int get size => 4;
113 379
114 @override 380 @override
115 UnlinkedExecutableKind read(fb.BufferPointer bp) { 381 UnlinkedExecutableKind read(fb.BufferPointer bp) {
116 int index = const fb.Uint32Reader().read(bp); 382 int index = const fb.Uint32Reader().read(bp);
117 return UnlinkedExecutableKind.values[index]; 383 return UnlinkedExecutableKind.values[index];
118 } 384 }
119 } 385 }
120 386
121 /** 387 /**
122 * Enum used to indicate the kind of a parameter. 388 * Enum used to indicate the kind of a parameter.
123 */ 389 */
124 enum UnlinkedParamKind { 390 enum UnlinkedParamKind {
391 /**
392 * Parameter is required.
393 */
125 required, 394 required,
395
396 /**
397 * Parameter is positional optional (enclosed in `[]`)
398 */
126 positional, 399 positional,
127 named, 400
401 /**
402 * Parameter is named optional (enclosed in `{}`)
403 */
404 named
128 } 405 }
129 406
130 class _UnlinkedParamKindReader extends fb.Reader<UnlinkedParamKind> { 407 class _UnlinkedParamKindReader extends fb.Reader<UnlinkedParamKind> {
131 const _UnlinkedParamKindReader() : super(); 408 const _UnlinkedParamKindReader() : super();
132 409
133 @override 410 @override
134 int get size => 4; 411 int get size => 4;
135 412
136 @override 413 @override
137 UnlinkedParamKind read(fb.BufferPointer bp) { 414 UnlinkedParamKind read(fb.BufferPointer bp) {
(...skipping 5607 matching lines...) Expand 10 before | Expand all | Expand 10 after
5745 "type": type, 6022 "type": type,
5746 "constExpr": constExpr, 6023 "constExpr": constExpr,
5747 "isStatic": isStatic, 6024 "isStatic": isStatic,
5748 "isFinal": isFinal, 6025 "isFinal": isFinal,
5749 "isConst": isConst, 6026 "isConst": isConst,
5750 "hasImplicitType": hasImplicitType, 6027 "hasImplicitType": hasImplicitType,
5751 "propagatedTypeSlot": propagatedTypeSlot, 6028 "propagatedTypeSlot": propagatedTypeSlot,
5752 }; 6029 };
5753 } 6030 }
5754 6031
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/tool/summary/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698