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

Side by Side Diff: lib/compiler/implementation/enqueue.dart

Issue 10911007: Rename Type to DartType to avoid conflicts with the class Type in the core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class EnqueueTask extends CompilerTask { 5 class EnqueueTask extends CompilerTask {
6 final Enqueuer codegen; 6 final Enqueuer codegen;
7 final Enqueuer resolution; 7 final Enqueuer resolution;
8 8
9 String get name => 'Enqueue'; 9 String get name => 'Enqueue';
10 10
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 } 209 }
210 } 210 }
211 211
212 void onRegisterInstantiatedClass(ClassElement cls) { 212 void onRegisterInstantiatedClass(ClassElement cls) {
213 task.measure(() { 213 task.measure(() {
214 // The class must be resolved to compute the set of all 214 // The class must be resolved to compute the set of all
215 // supertypes. 215 // supertypes.
216 cls.ensureResolved(compiler); 216 cls.ensureResolved(compiler);
217 217
218 for (Link<Type> supertypes = cls.allSupertypesAndSelf; 218 for (Link<DartType> supertypes = cls.allSupertypesAndSelf;
219 !supertypes.isEmpty(); supertypes = supertypes.tail) { 219 !supertypes.isEmpty(); supertypes = supertypes.tail) {
220 cls = supertypes.head.element; 220 cls = supertypes.head.element;
221 if (seenClasses.contains(cls)) continue; 221 if (seenClasses.contains(cls)) continue;
222 seenClasses.add(cls); 222 seenClasses.add(cls);
223 cls.ensureResolved(compiler); 223 cls.ensureResolved(compiler);
224 if (!cls.isInterface()) { 224 if (!cls.isInterface()) {
225 cls.localMembers.forEach(processInstantiatedClassMember); 225 cls.localMembers.forEach(processInstantiatedClassMember);
226 } 226 }
227 if (isResolutionQueue) { 227 if (isResolutionQueue) {
228 compiler.resolver.checkMembers(cls); 228 compiler.resolver.checkMembers(cls);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 void registerDynamicGetter(SourceString methodName, Selector selector) { 307 void registerDynamicGetter(SourceString methodName, Selector selector) {
308 registerInvokedGetter(methodName, selector); 308 registerInvokedGetter(methodName, selector);
309 } 309 }
310 310
311 void registerDynamicSetter(SourceString methodName, Selector selector) { 311 void registerDynamicSetter(SourceString methodName, Selector selector) {
312 registerInvokedSetter(methodName, selector); 312 registerInvokedSetter(methodName, selector);
313 } 313 }
314 314
315 void registerFieldGetter(SourceString getterName, 315 void registerFieldGetter(SourceString getterName,
316 LibraryElement library, 316 LibraryElement library,
317 Type type) { 317 DartType type) {
318 task.measure(() { 318 task.measure(() {
319 Selector getter = new Selector.getter(getterName, library); 319 Selector getter = new Selector.getter(getterName, library);
320 registerNewSelector(getterName, 320 registerNewSelector(getterName,
321 new TypedSelector(type, getter), 321 new TypedSelector(type, getter),
322 universe.fieldGetters); 322 universe.fieldGetters);
323 }); 323 });
324 } 324 }
325 325
326 void registerFieldSetter(SourceString setterName, 326 void registerFieldSetter(SourceString setterName,
327 LibraryElement library, 327 LibraryElement library,
328 Type type) { 328 DartType type) {
329 task.measure(() { 329 task.measure(() {
330 Selector setter = new Selector.setter(setterName, library); 330 Selector setter = new Selector.setter(setterName, library);
331 registerNewSelector(setterName, 331 registerNewSelector(setterName,
332 new TypedSelector(type, setter), 332 new TypedSelector(type, setter),
333 universe.fieldSetters); 333 universe.fieldSetters);
334 }); 334 });
335 } 335 }
336 336
337 // TODO(ngeoffray): This should get a type. 337 // TODO(ngeoffray): This should get a type.
338 void registerIsCheck(Element element) { 338 void registerIsCheck(Element element) {
339 universe.isChecks.add(element); 339 universe.isChecks.add(element);
340 } 340 }
341 341
342 void forEach(f(WorkItem work)) { 342 void forEach(f(WorkItem work)) {
343 while (!queue.isEmpty()) { 343 while (!queue.isEmpty()) {
344 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? 344 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst?
345 } 345 }
346 } 346 }
347 } 347 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698