Chromium Code Reviews| Index: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
| diff --git a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
| index 68b84593ebdbc9b236477d96851e83fd25ef4a24..bad76909807a1877fde5eadd09770db1006a9cfb 100644 |
| --- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
| +++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart |
| @@ -307,7 +307,7 @@ class StatementRewriter extends Transformer implements Pass { |
| // Handle constant assignments specially. |
| // They are always safe to propagate (though we should avoid duplication). |
| // Moreover, they should not prevent other expressions from propagating. |
| - if (assign.variable.readCount <= 1) { |
| + if (assign.variable.readCount == 1) { |
|
asgerf
2015/06/29 14:09:12
This matters when there is a dead variable due to
|
| // A single-use constant should always be propagted to its use site. |
| constantEnvironment[assign.variable] = assign.value; |
| --assign.variable.writeCount; |