| Index: lib/compiler/implementation/ssa/codegen_helpers.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/ssa/codegen_helpers.dart (revision 7378)
|
| +++ lib/compiler/implementation/ssa/codegen_helpers.dart (working copy)
|
| @@ -54,23 +54,13 @@
|
| // they would not be alive.
|
| void visitTypeGuard(HTypeGuard instruction) {}
|
|
|
| - // TODO(ngeoffray): This should not be needed. The codegen should
|
| - // cope better with this instruction.
|
| - void visitTypeConversion(HTypeConversion instruction) {}
|
| + void visitTypeConversion(HTypeConversion instruction) {
|
| + if (!instruction.checked) generateAtUseSite.add(instruction);
|
| + visitInstruction(instruction);
|
| + }
|
|
|
| void tryGenerateAtUseSite(HInstruction instruction) {
|
| - // A type guard should never be generate at use site, otherwise we
|
| - // cannot bailout.
|
| - if (instruction is HTypeGuard) return;
|
| -
|
| - // A check should never be generate at use site, otherwise we
|
| - // cannot throw.
|
| - if (instruction is HCheck) return;
|
| -
|
| - // TODO(ngeoffray): This should not be needed. The codegen should
|
| - // cope better with this instruction.
|
| - if (instruction is HTypeConversion) return;
|
| -
|
| + if (instruction.isControlFlow()) return;
|
| generateAtUseSite.add(instruction);
|
| }
|
|
|
|
|