OLD | NEW |
---|---|
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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
349 | 349 |
350 void registerFieldGetter(Element element) { | 350 void registerFieldGetter(Element element) { |
351 universe.fieldGetters.add(element); | 351 universe.fieldGetters.add(element); |
352 } | 352 } |
353 | 353 |
354 void registerFieldSetter(Element element) { | 354 void registerFieldSetter(Element element) { |
355 universe.fieldSetters.add(element); | 355 universe.fieldSetters.add(element); |
356 } | 356 } |
357 | 357 |
358 void registerIsCheck(DartType type) { | 358 void registerIsCheck(DartType type) { |
359 universe.isChecks.add(type); | 359 // Do not register checks against type-variables of typedefs. |
ngeoffray
2013/02/28 16:56:19
I'd prefer if you could do that in the resolver in
karlklose
2013/02/28 17:16:45
Done.
| |
360 compiler.backend.registerIsCheck(type, this); | 360 if (type.kind != TypeKind.TYPE_VARIABLE || |
361 type.element.isTypedef()) { | |
362 universe.isChecks.add(type); | |
363 compiler.backend.registerIsCheck(type, this); | |
364 } | |
361 } | 365 } |
362 | 366 |
363 void registerAsCheck(DartType type) { | 367 void registerAsCheck(DartType type) { |
364 registerIsCheck(type); | 368 registerIsCheck(type); |
365 compiler.backend.registerAsCheck(type); | 369 compiler.backend.registerAsCheck(type); |
366 } | 370 } |
367 | 371 |
368 void forEach(f(WorkItem work)); | 372 void forEach(f(WorkItem work)); |
369 | 373 |
370 void logSummary(log(message)) { | 374 void logSummary(log(message)) { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
531 while(!queue.isEmpty) { | 535 while(!queue.isEmpty) { |
532 // TODO(johnniwinther): Find an optimal process order for codegen. | 536 // TODO(johnniwinther): Find an optimal process order for codegen. |
533 f(queue.removeLast()); | 537 f(queue.removeLast()); |
534 } | 538 } |
535 } | 539 } |
536 | 540 |
537 void _logSpecificSummary(log(message)) { | 541 void _logSpecificSummary(log(message)) { |
538 log('Compiled ${generatedCode.length} methods.'); | 542 log('Compiled ${generatedCode.length} methods.'); |
539 } | 543 } |
540 } | 544 } |
OLD | NEW |