Index: src/lithium-allocator.cc |
diff --git a/src/lithium-allocator.cc b/src/lithium-allocator.cc |
index 7049a58fdf1f0046f5e3ca240dd27fa5165946a1..fa2aa248245c94b7556216a38a280fde26ec0abe 100644 |
--- a/src/lithium-allocator.cc |
+++ b/src/lithium-allocator.cc |
@@ -1788,7 +1788,7 @@ STATIC_ASSERT(DoubleRegister::kMaxNumAllocatableRegisters >= |
bool LAllocator::TryAllocateFreeReg(LiveRange* current) { |
LifetimePosition free_until_pos[DoubleRegister::kMaxNumAllocatableRegisters]; |
- for (int i = 0; i < DoubleRegister::kMaxNumAllocatableRegisters; i++) { |
+ for (int i = 0; i < num_registers_; i++) { |
free_until_pos[i] = LifetimePosition::MaxPosition(); |
} |
@@ -1880,7 +1880,7 @@ void LAllocator::AllocateBlockedReg(LiveRange* current) { |
LifetimePosition use_pos[DoubleRegister::kMaxNumAllocatableRegisters]; |
LifetimePosition block_pos[DoubleRegister::kMaxNumAllocatableRegisters]; |
- for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); i++) { |
+ for (int i = 0; i < num_registers_; i++) { |
use_pos[i] = block_pos[i] = LifetimePosition::MaxPosition(); |
} |