Chromium Code Reviews| Index: lib/compiler/implementation/ssa/variable_allocator.dart |
| diff --git a/lib/compiler/implementation/ssa/variable_allocator.dart b/lib/compiler/implementation/ssa/variable_allocator.dart |
| index 4a6b7d8dde2505587d51306a1eccc70382cbb99c..fc01e86d8de5938ea7ebb1f5da57b40c8e7cb450 100644 |
| --- a/lib/compiler/implementation/ssa/variable_allocator.dart |
| +++ b/lib/compiler/implementation/ssa/variable_allocator.dart |
| @@ -118,7 +118,9 @@ class LiveEnvironment { |
| var input = instruction.checkedInput; |
| while (input is HCheck) input = input.checkedInput; |
| liveIntervals.putIfAbsent(input, () => new LiveInterval()); |
| - liveIntervals.putIfAbsent(instruction, () => liveIntervals[input]); |
| + // Unconditionally force the live interval of the HCheck to |
| + // be the live interval of the instruction it is checking. |
| + liveIntervals[instruction] = liveIntervals[input]; |
|
ngeoffray
2012/06/15 19:45:33
Nice catch! Hope that was easy to spot :) I should
|
| } else { |
| LiveInterval range = liveIntervals.putIfAbsent( |
| instruction, () => new LiveInterval()); |
| @@ -142,7 +144,6 @@ class LiveEnvironment { |
| if (instruction is HCheck) { |
| // Special case the HCheck instruction to mark the actual |
| // checked instruction live. |
| - liveInstructions.putIfAbsent(instruction, () => userId); |
| var input = instruction.checkedInput; |
| while (input is HCheck) input = input.checkedInput; |
| liveInstructions.putIfAbsent(input, () => userId); |
| @@ -576,7 +577,7 @@ class SsaVariableAllocator extends HBaseVisitor { |
| } |
| return true; |
| } |
| - |
| + |
| /** |
| * Returns whether [instruction] dies at the instruction [at]. |
| */ |