| Index: lib/compiler/implementation/ssa/optimize.dart
|
| diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
|
| index ab0b54f1d689146ea7508cf6ebb1c50005375343..5d33e22aac8bdeea839043241956dfc2fb504bff 100644
|
| --- a/lib/compiler/implementation/ssa/optimize.dart
|
| +++ b/lib/compiler/implementation/ssa/optimize.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -711,12 +711,11 @@ class SsaDeadCodeEliminator extends HGraphVisitor implements OptimizationPhase {
|
| final String name = "SsaDeadCodeEliminator";
|
|
|
| static bool isDeadCode(HInstruction instruction) {
|
| - // TODO(ngeoffray): the way we handle side effects is not right
|
| - // (e.g. branching instructions have side effects).
|
| return !instruction.hasSideEffects()
|
| && instruction.usedBy.isEmpty()
|
| && instruction is !HCheck
|
| - && instruction is !HTypeGuard;
|
| + && instruction is !HTypeGuard
|
| + && !instruction.isControlFlow();
|
| }
|
|
|
| void visitGraph(HGraph graph) {
|
|
|