| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/linkage.h" | 5 #include "src/compiler/linkage.h" |
| 6 #include "src/compiler/register-allocator.h" | 6 #include "src/compiler/register-allocator.h" |
| 7 #include "src/string-stream.h" | 7 #include "src/string-stream.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 AddToInactive(current); | 1834 AddToInactive(current); |
| 1835 } | 1835 } |
| 1836 } | 1836 } |
| 1837 } | 1837 } |
| 1838 | 1838 |
| 1839 while (!unhandled_live_ranges_.is_empty()) { | 1839 while (!unhandled_live_ranges_.is_empty()) { |
| 1840 DCHECK(UnhandledIsSorted()); | 1840 DCHECK(UnhandledIsSorted()); |
| 1841 LiveRange* current = unhandled_live_ranges_.RemoveLast(); | 1841 LiveRange* current = unhandled_live_ranges_.RemoveLast(); |
| 1842 DCHECK(UnhandledIsSorted()); | 1842 DCHECK(UnhandledIsSorted()); |
| 1843 LifetimePosition position = current->Start(); | 1843 LifetimePosition position = current->Start(); |
| 1844 #ifdef DEBUG | 1844 #if DCHECK_IS_ON |
| 1845 allocation_finger_ = position; | 1845 allocation_finger_ = position; |
| 1846 #endif | 1846 #endif |
| 1847 TraceAlloc("Processing interval %d start=%d\n", current->id(), | 1847 TraceAlloc("Processing interval %d start=%d\n", current->id(), |
| 1848 position.Value()); | 1848 position.Value()); |
| 1849 | 1849 |
| 1850 if (current->HasAllocatedSpillOperand()) { | 1850 if (current->HasAllocatedSpillOperand()) { |
| 1851 TraceAlloc("Live range %d already has a spill operand\n", current->id()); | 1851 TraceAlloc("Live range %d already has a spill operand\n", current->id()); |
| 1852 LifetimePosition next_pos = position; | 1852 LifetimePosition next_pos = position; |
| 1853 if (code()->IsGapAt(next_pos.InstructionIndex())) { | 1853 if (code()->IsGapAt(next_pos.InstructionIndex())) { |
| 1854 next_pos = next_pos.NextInstruction(); | 1854 next_pos = next_pos.NextInstruction(); |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 } else { | 2479 } else { |
| 2480 DCHECK(range->Kind() == GENERAL_REGISTERS); | 2480 DCHECK(range->Kind() == GENERAL_REGISTERS); |
| 2481 assigned_registers_->Add(reg); | 2481 assigned_registers_->Add(reg); |
| 2482 } | 2482 } |
| 2483 range->set_assigned_register(reg, code_zone()); | 2483 range->set_assigned_register(reg, code_zone()); |
| 2484 } | 2484 } |
| 2485 | 2485 |
| 2486 } // namespace compiler | 2486 } // namespace compiler |
| 2487 } // namespace internal | 2487 } // namespace internal |
| 2488 } // namespace v8 | 2488 } // namespace v8 |
| OLD | NEW |