Chromium Code Reviews| Index: lib/compiler/implementation/ssa/codegen_helpers.dart |
| diff --git a/lib/compiler/implementation/ssa/codegen_helpers.dart b/lib/compiler/implementation/ssa/codegen_helpers.dart |
| index 610c7455b9f31adf79835765a6caf778b0eaeb0c..f1b5fa7747187cd0ba3ef1213abebed835aec021 100644 |
| --- a/lib/compiler/implementation/ssa/codegen_helpers.dart |
| +++ b/lib/compiler/implementation/ssa/codegen_helpers.dart |
| @@ -48,8 +48,13 @@ class SsaInstructionMerger extends HBaseVisitor { |
| void visitTypeGuard(HTypeGuard instruction) {} |
| void visitTypeConversion(HTypeConversion instruction) { |
| - if (!instruction.checked) generateAtUseSite.add(instruction); |
| - visitInstruction(instruction); |
| + if (!instruction.isChecked()) { |
| + generateAtUseSite.add(instruction); |
| + } else if (instruction.isCheckedModeCheck()) { |
| + // Checked mode checks compile to code that only use their input |
| + // once, so we can safely visit them an try to merge the input. |
|
floitsch
2012/06/19 11:15:58
and
kasperl
2012/06/19 11:22:06
Done.
|
| + visitInstruction(instruction); |
| + } |
| } |
| void tryGenerateAtUseSite(HInstruction instruction) { |