Chromium Code Reviews| Index: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart |
| diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart |
| index 4cc853c878f59dacfbea17a951d959d343450d67..f4e1617083d7f9727b2a9322be518ce7ad26d8f7 100644 |
| --- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart |
| +++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart |
| @@ -198,7 +198,7 @@ class Builder extends cps_ir.Visitor<Node> { |
| List<Variable> translatePhiArguments(List<cps_ir.Reference> args) { |
| return new List<Variable>.generate(args.length, |
| - (int index) => getVariableReference(args[index])); |
| + (int index) => getVariable(args[index].definition)); |
|
asgerf
2015/01/15 12:08:00
getVariableReference() increases readCount.
getVar
sigurdm
2015/01/15 12:21:03
Maybe put this explanation in a comment in the cod
asgerf
2015/01/15 13:05:37
Done.
|
| } |
| Statement buildContinuationAssignment( |
| @@ -247,6 +247,8 @@ class Builder extends cps_ir.Visitor<Node> { |
| Statement first, current; |
| void addAssignment(Variable dst, Variable src) { |
| + ++src.readCount; |
| + // `dst.writeCount` will be updated by the Assign constructor. |
| if (first == null) { |
| first = current = new Assign(dst, src, null); |
| } else { |