Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 6 * This file is an "idl" style description of the summary format. It |
| 7 * contains abstract classes which declare the interface for reading data from | 7 * contains abstract classes which declare the interface for reading data from |
| 8 * summaries. It is parsed and transformed into code that implements the | 8 * summaries. It is parsed and transformed into code that implements the |
| 9 * summary format. | 9 * summary format. |
| 10 * | 10 * |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 int get length; | 349 int get length; |
| 350 | 350 |
| 351 /** | 351 /** |
| 352 * Offset of the element code relative to the beginning of the file. | 352 * Offset of the element code relative to the beginning of the file. |
| 353 */ | 353 */ |
| 354 @Id(0) | 354 @Id(0) |
| 355 int get offset; | 355 int get offset; |
| 356 } | 356 } |
| 357 | 357 |
| 358 /** | 358 /** |
| 359 * Summary information about a reference to a an entity such as a type, top | 359 * Summary information about a reference to an entity such as a type, top level |
| 360 * level executable, or executable within a class. | 360 * executable, or executable within a class. |
| 361 */ | 361 */ |
| 362 abstract class EntityRef extends base.SummaryClass { | 362 abstract class EntityRef extends base.SummaryClass { |
| 363 /** | 363 /** |
| 364 * If this is a reference to a function type implicitly defined by a | 364 * If this is a reference to a function type implicitly defined by a |
| 365 * function-typed parameter, a list of zero-based indices indicating the path | 365 * function-typed parameter, a list of zero-based indices indicating the path |
| 366 * from the entity referred to by [reference] to the appropriate type | 366 * from the entity referred to by [reference] to the appropriate type |
| 367 * parameter. Otherwise the empty list. | 367 * parameter. Otherwise the empty list. |
| 368 * | 368 * |
| 369 * If there are N indices in this list, then the entity being referred to is | 369 * If there are N indices in this list, then the entity being referred to is |
| 370 * the function type implicitly defined by a function-typed parameter of a | 370 * the function type implicitly defined by a function-typed parameter of a |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 441 */ | 441 */ |
| 442 @Id(5) | 442 @Id(5) |
| 443 EntityRef get syntheticReturnType; | 443 EntityRef get syntheticReturnType; |
| 444 | 444 |
| 445 /** | 445 /** |
| 446 * If this is an instantiation of a generic type or generic executable, the | 446 * If this is an instantiation of a generic type or generic executable, the |
| 447 * type arguments used to instantiate it (if any). | 447 * type arguments used to instantiate it (if any). |
| 448 */ | 448 */ |
| 449 @Id(1) | 449 @Id(1) |
| 450 List<EntityRef> get typeArguments; | 450 List<EntityRef> get typeArguments; |
| 451 | |
| 452 /** | |
| 453 * If this is a function type, the type parameters defined for the function | |
| 454 * type (if any). | |
| 455 */ | |
| 456 @Id(7) | |
| 457 List<UnlinkedTypeParam> get typeParameters; | |
| 451 } | 458 } |
| 452 | 459 |
| 453 /** | 460 /** |
| 454 * Enum used to indicate the kind of a name in index. | 461 * Enum used to indicate the kind of a name in index. |
| 455 */ | 462 */ |
| 456 enum IndexNameKind { | 463 enum IndexNameKind { |
| 457 /** | 464 /** |
| 458 * A top-level element. | 465 * A top-level element. |
| 459 */ | 466 */ |
| 460 topLevel, | 467 topLevel, |
| (...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2630 @Id(15) | 2637 @Id(15) |
| 2631 bool get isExplicitlyCovariant; | 2638 bool get isExplicitlyCovariant; |
| 2632 | 2639 |
| 2633 /** | 2640 /** |
| 2634 * Indicates whether the parameter is declared using the `final` keyword. | 2641 * Indicates whether the parameter is declared using the `final` keyword. |
| 2635 */ | 2642 */ |
| 2636 @Id(16) | 2643 @Id(16) |
| 2637 bool get isFinal; | 2644 bool get isFinal; |
| 2638 | 2645 |
| 2639 /** | 2646 /** |
| 2640 * Indicates whether this is a function-typed parameter. | 2647 * Indicates whether this is a function-typed parameter. A parameter is |
| 2648 * function-typed if the declaration of the parameter has explicit formal | |
| 2649 * parameters | |
| 2650 * ``` | |
| 2651 * int functionTyped(int p) | |
| 2652 * ``` | |
| 2653 * but is not function-typed if it does not, even if the type of the parameter | |
| 2654 * is a function type. | |
| 2641 */ | 2655 */ |
| 2642 @Id(5) | 2656 @Id(5) |
| 2643 bool get isFunctionTyped; | 2657 bool get isFunctionTyped; |
| 2644 | 2658 |
| 2645 /** | 2659 /** |
| 2646 * Indicates whether this is an initializing formal parameter (i.e. it is | 2660 * Indicates whether this is an initializing formal parameter (i.e. it is |
| 2647 * declared using `this.` syntax). | 2661 * declared using `this.` syntax). |
| 2648 */ | 2662 */ |
| 2649 @Id(6) | 2663 @Id(6) |
| 2650 bool get isInitializingFormal; | 2664 bool get isInitializingFormal; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2860 | 2874 |
| 2861 /** | 2875 /** |
| 2862 * Documentation comment for the typedef, or `null` if there is no | 2876 * Documentation comment for the typedef, or `null` if there is no |
| 2863 * documentation comment. | 2877 * documentation comment. |
| 2864 */ | 2878 */ |
| 2865 @informative | 2879 @informative |
| 2866 @Id(6) | 2880 @Id(6) |
| 2867 UnlinkedDocumentationComment get documentationComment; | 2881 UnlinkedDocumentationComment get documentationComment; |
| 2868 | 2882 |
| 2869 /** | 2883 /** |
| 2884 * Indicates whether this is a generic function type. Generic function types | |
| 2885 * do not have [parameters], but encode the function type being defined as the | |
| 2886 * [returnType]. | |
| 2887 */ | |
| 2888 @Id(8) | |
| 2889 bool get isGenericFunctionType; | |
|
Paul Berry
2017/02/28 17:06:49
Question: How do you intend to represent a new-sty
Brian Wilkerson
2017/02/28 17:19:57
That question reveals a terminology issue. The nam
Paul Berry
2017/02/28 17:38:57
Documentation is good, but it's even nicer when th
| |
| 2890 | |
| 2891 /** | |
| 2870 * Name of the typedef. | 2892 * Name of the typedef. |
| 2871 */ | 2893 */ |
| 2872 @Id(0) | 2894 @Id(0) |
| 2873 String get name; | 2895 String get name; |
| 2874 | 2896 |
| 2875 /** | 2897 /** |
| 2876 * Offset of the typedef name relative to the beginning of the file. | 2898 * Offset of the typedef name relative to the beginning of the file. |
| 2877 */ | 2899 */ |
| 2878 @informative | 2900 @informative |
| 2879 @Id(1) | 2901 @Id(1) |
| 2880 int get nameOffset; | 2902 int get nameOffset; |
| 2881 | 2903 |
| 2882 /** | 2904 /** |
| 2883 * Parameters of the executable, if any. | 2905 * Parameters of the executable, if any. |
| 2884 */ | 2906 */ |
| 2885 @Id(3) | 2907 @Id(3) |
| 2886 List<UnlinkedParam> get parameters; | 2908 List<UnlinkedParam> get parameters; |
| 2887 | 2909 |
| 2888 /** | 2910 /** |
| 2889 * Return type of the typedef. | 2911 * Return type of the typedef. |
|
Paul Berry
2017/02/28 17:06:49
To reduce confusion, let's change this comment to
Brian Wilkerson
2017/02/28 17:19:57
Good idea; will do.
| |
| 2890 */ | 2912 */ |
| 2891 @Id(2) | 2913 @Id(2) |
| 2892 EntityRef get returnType; | 2914 EntityRef get returnType; |
| 2893 | 2915 |
| 2894 /** | 2916 /** |
| 2895 * Type parameters of the typedef, if any. | 2917 * Type parameters of the typedef, if any. |
| 2896 */ | 2918 */ |
| 2897 @Id(5) | 2919 @Id(5) |
| 2898 List<UnlinkedTypeParam> get typeParameters; | 2920 List<UnlinkedTypeParam> get typeParameters; |
| 2899 } | 2921 } |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3194 @Id(11) | 3216 @Id(11) |
| 3195 int get visibleLength; | 3217 int get visibleLength; |
| 3196 | 3218 |
| 3197 /** | 3219 /** |
| 3198 * If a local variable, the beginning of the visible range; zero otherwise. | 3220 * If a local variable, the beginning of the visible range; zero otherwise. |
| 3199 */ | 3221 */ |
| 3200 @informative | 3222 @informative |
| 3201 @Id(12) | 3223 @Id(12) |
| 3202 int get visibleOffset; | 3224 int get visibleOffset; |
| 3203 } | 3225 } |
| OLD | NEW |