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

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

Issue 2519733002: Add CompilationUnit indexer implementation. (Closed)
Patch Set: Created 4 years, 1 month 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 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 int get offset; 101 int get offset;
102 102
103 /** 103 /**
104 * The unique name of the error code. 104 * The unique name of the error code.
105 */ 105 */
106 @Id(2) 106 @Id(2)
107 String get uniqueName; 107 String get uniqueName;
108 } 108 }
109 109
110 /** 110 /**
111 * Information about a resolved unit.
112 */
113 @TopLevel('ADUI')
114 abstract class AnalysisDriverUnitIndex extends base.SummaryClass {
115 factory AnalysisDriverUnitIndex.fromBuffer(List<int> buffer) =>
116 generated.readAnalysisDriverUnitIndex(buffer);
117
118 /**
119 * Each item of this list corresponds to a unique referenced element. It is
120 * the kind of the synthetic element.
121 */
122 @Id(4)
123 List<IndexSyntheticElementKind> get elementKinds;
124
125 /**
126 * Each item of this list corresponds to a unique referenced element. It is
127 * the identifier of the class member element name, or `null` if the element
128 * is a top-level element. The list is sorted in ascending order, so that the
129 * client can quickly check whether an element is referenced in this index.
130 */
131 @Id(7)
132 List<int> get elementNameClassMemberIds;
133
134 /**
135 * Each item of this list corresponds to a unique referenced element. It is
136 * the identifier of the named parameter name, or `null` if the element is not
137 * a named parameter. The list is sorted in ascending order, so that the
138 * client can quickly check whether an element is referenced in this index.
139 */
140 @Id(8)
141 List<int> get elementNameParameterIds;
142
143 /**
144 * Each item of this list corresponds to a unique referenced element. It is
145 * the identifier of the top-level element name, or `null` if the element is
146 * the unit. The list is sorted in ascending order, so that the client can
147 * quickly check whether an element is referenced in this index.
148 */
149 @Id(6)
150 List<int> get elementNameUnitMemberIds;
151
152 /**
153 * Each item of this list corresponds to a unique referenced element. It is
154 * the index into [unitLibraryUris] and [unitUnitUris] for the library
155 * specific unit where the element is declared.
156 */
157 @Id(5)
158 List<int> get elementUnits;
159
160 /**
161 * Identifier of the null string in [strings].
162 */
163 @Id(1)
164 int get nullStringId;
165
166 /**
167 * List of unique element strings used in this index. The list is sorted in
168 * ascending order, so that the client can quickly check the presence of a
169 * string in this index.
170 */
171 @Id(0)
172 List<String> get strings;
173
174 /**
175 * Each item of this list corresponds to the library URI of a unique library
176 * specific unit referenced in the index. It is an index into [strings] list.
177 */
178 @Id(2)
179 List<int> get unitLibraryUris;
180
181 /**
182 * Each item of this list corresponds to the unit URI of a unique library
183 * specific unit referenced in the index. It is an index into [strings] list.
184 */
185 @Id(3)
186 List<int> get unitUnitUris;
187
188 /**
189 * Each item of this list is the `true` if the corresponding element usage
190 * is qualified with some prefix.
191 */
192 @Id(13)
193 List<bool> get usedElementIsQualifiedFlags;
194
195 /**
196 * Each item of this list is the kind of the element usage.
197 */
198 @Id(10)
199 List<IndexRelationKind> get usedElementKinds;
200
201 /**
202 * Each item of this list is the length of the element usage.
203 */
204 @Id(12)
205 List<int> get usedElementLengths;
206
207 /**
208 * Each item of this list is the offset of the element usage relative to the
209 * beginning of the file.
210 */
211 @Id(11)
212 List<int> get usedElementOffsets;
213
214 /**
215 * Each item of this list is the index into [elementUnits],
216 * [elementNameUnitMemberIds], [elementNameClassMemberIds] and
217 * [elementNameParameterIds]. The list is sorted in ascending order, so
218 * that the client can quickly find element references in this index.
219 */
220 @Id(9)
221 List<int> get usedElements;
222
223 /**
224 * Each item of this list is the `true` if the corresponding name usage
225 * is qualified with some prefix.
226 */
227 @Id(17)
228 List<bool> get usedNameIsQualifiedFlags;
229
230 /**
231 * Each item of this list is the kind of the name usage.
232 */
233 @Id(15)
234 List<IndexRelationKind> get usedNameKinds;
235
236 /**
237 * Each item of this list is the offset of the name usage relative to the
238 * beginning of the file.
239 */
240 @Id(16)
241 List<int> get usedNameOffsets;
242
243 /**
244 * Each item of this list is the index into [strings] for a used name. The
245 * list is sorted in ascending order, so that the client can quickly find
246 * whether a name is used in this index.
247 */
248 @Id(14)
249 List<int> get usedNames;
250 }
251
252 /**
111 * Information about an element code range. 253 * Information about an element code range.
112 */ 254 */
113 abstract class CodeRange extends base.SummaryClass { 255 abstract class CodeRange extends base.SummaryClass {
114 /** 256 /**
115 * Length of the element code. 257 * Length of the element code.
116 */ 258 */
117 @Id(1) 259 @Id(1)
118 int get length; 260 int get length;
119 261
120 /** 262 /**
(...skipping 2766 matching lines...) Expand 10 before | Expand all | Expand 10 after
2887 @Id(11) 3029 @Id(11)
2888 int get visibleLength; 3030 int get visibleLength;
2889 3031
2890 /** 3032 /**
2891 * If a local variable, the beginning of the visible range; zero otherwise. 3033 * If a local variable, the beginning of the visible range; zero otherwise.
2892 */ 3034 */
2893 @informative 3035 @informative
2894 @Id(12) 3036 @Id(12)
2895 int get visibleOffset; 3037 int get visibleOffset;
2896 } 3038 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698