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

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

Issue 12207081: Add a type kind to TypedSelector. A typed selector can either be (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 part of dart2js; 5 part of dart2js;
6 6
7 class EnqueueTask extends CompilerTask { 7 class EnqueueTask extends CompilerTask {
8 final ResolutionEnqueuer resolution; 8 final ResolutionEnqueuer resolution;
9 final CodegenEnqueuer codegen; 9 final CodegenEnqueuer codegen;
10 10
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 void registerDynamicSetter(SourceString methodName, Selector selector) { 348 void registerDynamicSetter(SourceString methodName, Selector selector) {
349 registerInvokedSetter(methodName, selector); 349 registerInvokedSetter(methodName, selector);
350 } 350 }
351 351
352 void registerFieldGetter(SourceString getterName, 352 void registerFieldGetter(SourceString getterName,
353 LibraryElement library, 353 LibraryElement library,
354 DartType type) { 354 DartType type) {
355 task.measure(() { 355 task.measure(() {
356 Selector getter = new Selector.getter(getterName, library); 356 Selector getter = new Selector.getter(getterName, library);
357 registerNewSelector(getterName, 357 registerNewSelector(
358 new TypedSelector(type, getter), 358 getterName,
359 universe.fieldGetters); 359 new TypedSelector.subclass(type, getter),
kasperl 2013/02/11 13:11:50 Aren't we throwing away information at this point?
ngeoffray 2013/02/11 14:20:29 Actually, we should just take an element. Done.
360 universe.fieldGetters);
360 }); 361 });
361 } 362 }
362 363
363 void registerFieldSetter(SourceString setterName, 364 void registerFieldSetter(SourceString setterName,
364 LibraryElement library, 365 LibraryElement library,
365 DartType type) { 366 DartType type) {
366 task.measure(() { 367 task.measure(() {
367 Selector setter = new Selector.setter(setterName, library); 368 Selector setter = new Selector.setter(setterName, library);
368 registerNewSelector(setterName, 369 registerNewSelector(
369 new TypedSelector(type, setter), 370 setterName,
370 universe.fieldSetters); 371 new TypedSelector.subclass(type, setter),
372 universe.fieldSetters);
371 }); 373 });
372 } 374 }
373 375
374 void registerIsCheck(DartType type) { 376 void registerIsCheck(DartType type) {
375 universe.isChecks.add(type); 377 universe.isChecks.add(type);
376 } 378 }
377 379
378 void forEach(f(WorkItem work)); 380 void forEach(f(WorkItem work));
379 381
380 void logSummary(log(message)) { 382 void logSummary(log(message)) {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 while(!queue.isEmpty) { 545 while(!queue.isEmpty) {
544 // TODO(johnniwinther): Find an optimal process order for codegen. 546 // TODO(johnniwinther): Find an optimal process order for codegen.
545 f(queue.removeLast()); 547 f(queue.removeLast());
546 } 548 }
547 } 549 }
548 550
549 void _logSpecificSummary(log(message)) { 551 void _logSpecificSummary(log(message)) {
550 log('Compiled ${generatedCode.length} methods.'); 552 log('Compiled ${generatedCode.length} methods.');
551 } 553 }
552 } 554 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698