| Index: pkg/compiler/lib/src/ssa/optimize.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
|
| index 953a6f48f96a5881dff9bd33dfd6c001729d8e91..b18572d070f37500f62612fdd80cd67250019a0d 100644
|
| --- a/pkg/compiler/lib/src/ssa/optimize.dart
|
| +++ b/pkg/compiler/lib/src/ssa/optimize.dart
|
| @@ -1142,7 +1142,8 @@ class SsaDeadCodeEliminator extends HGraphVisitor implements OptimizationPhase {
|
| }
|
| return false;
|
| }
|
| - return instruction is HForeignNew
|
| + return instruction.isAllocation
|
| + && instruction.isPure()
|
| && trivialDeadStoreReceivers.putIfAbsent(instruction,
|
| () => instruction.usedBy.every(isDeadUse));
|
| }
|
| @@ -1156,14 +1157,14 @@ class SsaDeadCodeEliminator extends HGraphVisitor implements OptimizationPhase {
|
| if (!instruction.usedBy.isEmpty) return false;
|
| if (isTrivialDeadStore(instruction)) return true;
|
| if (instruction.sideEffects.hasSideEffects()) return false;
|
| - if (instruction.canThrow()
|
| - && instruction.onlyThrowsNSM()
|
| - && hasFollowingThrowingNSM(instruction)) {
|
| + if (instruction.canThrow() &&
|
| + instruction.onlyThrowsNSM() &&
|
| + hasFollowingThrowingNSM(instruction)) {
|
| return true;
|
| }
|
| return !instruction.canThrow()
|
| - && instruction is !HParameterValue
|
| - && instruction is !HLocalSet;
|
| + && instruction is !HParameterValue
|
| + && instruction is !HLocalSet;
|
| }
|
|
|
| void visitGraph(HGraph graph) {
|
|
|