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 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 String uri; | 77 String uri; |
| 78 | 78 |
| 79 /** | 79 /** |
| 80 * URI for the compilation units listed in the library's `part` declarations. | 80 * URI for the compilation units listed in the library's `part` declarations. |
| 81 * These URIs are relative to the importing library. | 81 * These URIs are relative to the importing library. |
| 82 */ | 82 */ |
| 83 List<String> parts; | 83 List<String> parts; |
| 84 } | 84 } |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * Information about a single name in the export namespace of the library that | |
| 88 * is not in the public namespace. | |
| 89 */ | |
| 90 class PrelinkedExportName { | |
| 91 /** | |
| 92 * Name of the exported entity. TODO(paulberry): do we include the trailing | |
| 93 * '=' for a setter? | |
| 94 */ | |
| 95 String name; | |
| 96 | |
| 97 /** | |
| 98 * Index into [PrelinkedLibrary.dependencies] for the library in which the | |
| 99 * entity is defined. | |
| 100 */ | |
| 101 int dependency; | |
| 102 | |
| 103 /** | |
| 104 * Integer index indicating which unit in the imported library contains the | |
|
scheglov
2016/01/13 20:59:35
"in the exported library"?
Paul Berry
2016/01/13 21:15:24
Done.
| |
| 105 * definition of the entity. As with indices into [PrelinkedLibrary.units], | |
| 106 * zero represents the defining compilation unit, and nonzero values | |
| 107 * represent parts in the order of the corresponding `part` declarations. | |
| 108 */ | |
| 109 int unit; | |
| 110 | |
| 111 /** | |
| 112 * The kind of the entity being referred to. | |
| 113 */ | |
| 114 PrelinkedReferenceKind kind; | |
| 115 } | |
| 116 | |
| 117 /** | |
| 87 * Pre-linked summary of a library. | 118 * Pre-linked summary of a library. |
| 88 */ | 119 */ |
| 89 @topLevel | 120 @topLevel |
| 90 class PrelinkedLibrary { | 121 class PrelinkedLibrary { |
| 91 /** | 122 /** |
| 92 * The pre-linked summary of all the compilation units constituting the | 123 * The pre-linked summary of all the compilation units constituting the |
| 93 * library. The summary of the defining compilation unit is listed first, | 124 * library. The summary of the defining compilation unit is listed first, |
| 94 * followed by the summary of each part, in the order of the `part` | 125 * followed by the summary of each part, in the order of the `part` |
| 95 * declarations in the defining compilation unit. | 126 * declarations in the defining compilation unit. |
| 96 */ | 127 */ |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 108 List<PrelinkedDependency> dependencies; | 139 List<PrelinkedDependency> dependencies; |
| 109 | 140 |
| 110 /** | 141 /** |
| 111 * For each import in [UnlinkedUnit.imports], an index into [dependencies] | 142 * For each import in [UnlinkedUnit.imports], an index into [dependencies] |
| 112 * of the library being imported. | 143 * of the library being imported. |
| 113 * | 144 * |
| 114 * TODO(paulberry): if [dependencies] is removed, this can be removed as | 145 * TODO(paulberry): if [dependencies] is removed, this can be removed as |
| 115 * well, since there will effectively be a one-to-one mapping. | 146 * well, since there will effectively be a one-to-one mapping. |
| 116 */ | 147 */ |
| 117 List<int> importDependencies; | 148 List<int> importDependencies; |
| 149 | |
| 150 /** | |
| 151 * Information about entities in the export namespace of the library that are | |
| 152 * not in the public namespace of the library (that is, entities that are | |
| 153 * brought into the namespace via `export` directives). | |
| 154 * | |
| 155 * Sorted by name. | |
| 156 */ | |
| 157 List<PrelinkedExportName> exportNames; | |
| 118 } | 158 } |
| 119 | 159 |
| 120 /** | 160 /** |
| 121 * Information about the resolution of an [UnlinkedReference]. | 161 * Information about the resolution of an [UnlinkedReference]. |
| 122 */ | 162 */ |
| 123 class PrelinkedReference { | 163 class PrelinkedReference { |
| 124 /** | 164 /** |
| 125 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y | 165 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y |
| 126 * declares the entity being referred to. | 166 * declares the entity being referred to. |
| 127 */ | 167 */ |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 157 * The entity is a class or enum. | 197 * The entity is a class or enum. |
| 158 */ | 198 */ |
| 159 classOrEnum, | 199 classOrEnum, |
| 160 | 200 |
| 161 /** | 201 /** |
| 162 * The entity is a typedef. | 202 * The entity is a typedef. |
| 163 */ | 203 */ |
| 164 typedef, | 204 typedef, |
| 165 | 205 |
| 166 /** | 206 /** |
| 167 * The entity is a variable or executable. | 207 * The entity is a top level function. |
| 168 */ | 208 */ |
| 169 other, | 209 topLevelFunction, |
| 210 | |
| 211 /** | |
| 212 * The entity is a top level getter or setter. | |
| 213 */ | |
| 214 topLevelPropertyAccessor, | |
| 170 | 215 |
| 171 /** | 216 /** |
| 172 * The entity is a prefix. | 217 * The entity is a prefix. |
| 173 */ | 218 */ |
| 174 prefix, | 219 prefix, |
| 175 | 220 |
| 176 /** | 221 /** |
| 177 * The entity being referred to does not exist. | 222 * The entity being referred to does not exist. |
| 178 */ | 223 */ |
| 179 unresolved | 224 unresolved |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1003 /** | 1048 /** |
| 1004 * Indicates whether the variable is declared using the `const` keyword. | 1049 * Indicates whether the variable is declared using the `const` keyword. |
| 1005 */ | 1050 */ |
| 1006 bool isConst; | 1051 bool isConst; |
| 1007 | 1052 |
| 1008 /** | 1053 /** |
| 1009 * Indicates whether this variable lacks an explicit type declaration. | 1054 * Indicates whether this variable lacks an explicit type declaration. |
| 1010 */ | 1055 */ |
| 1011 bool hasImplicitType; | 1056 bool hasImplicitType; |
| 1012 } | 1057 } |
| OLD | NEW |