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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 void registerFieldGetter(Element element) { | 345 void registerFieldGetter(Element element) { |
346 universe.fieldGetters.add(element); | 346 universe.fieldGetters.add(element); |
347 } | 347 } |
348 | 348 |
349 void registerFieldSetter(Element element) { | 349 void registerFieldSetter(Element element) { |
350 universe.fieldSetters.add(element); | 350 universe.fieldSetters.add(element); |
351 } | 351 } |
352 | 352 |
353 void registerIsCheck(DartType type) { | 353 void registerIsCheck(DartType type) { |
354 universe.isChecks.add(type); | 354 universe.isChecks.add(type); |
| 355 if (type.kind == TypeKind.TYPE_VARIABLE) { |
| 356 compiler.hasVariableTypecheck = true; |
| 357 } |
355 compiler.backend.registerIsCheck(type, this); | 358 compiler.backend.registerIsCheck(type, this); |
356 } | 359 } |
357 | 360 |
358 void registerAsCheck(DartType type) { | 361 void registerAsCheck(DartType type) { |
359 registerIsCheck(type); | 362 registerIsCheck(type); |
360 compiler.backend.registerAsCheck(type); | 363 compiler.backend.registerAsCheck(type); |
361 } | 364 } |
362 | 365 |
363 void forEach(f(WorkItem work)); | 366 void forEach(f(WorkItem work)); |
364 | 367 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 while(!queue.isEmpty) { | 532 while(!queue.isEmpty) { |
530 // TODO(johnniwinther): Find an optimal process order for codegen. | 533 // TODO(johnniwinther): Find an optimal process order for codegen. |
531 f(queue.removeLast()); | 534 f(queue.removeLast()); |
532 } | 535 } |
533 } | 536 } |
534 | 537 |
535 void _logSpecificSummary(log(message)) { | 538 void _logSpecificSummary(log(message)) { |
536 log('Compiled ${generatedCode.length} methods.'); | 539 log('Compiled ${generatedCode.length} methods.'); |
537 } | 540 } |
538 } | 541 } |
OLD | NEW |