| 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 #ifndef V8_REGISTER_ALLOCATOR_H_ | 5 #ifndef V8_REGISTER_ALLOCATOR_H_ |
| 6 #define V8_REGISTER_ALLOCATOR_H_ | 6 #define V8_REGISTER_ALLOCATOR_H_ |
| 7 | 7 |
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
| 9 #include "src/zone-containers.h" | 9 #include "src/zone-containers.h" |
| 10 | 10 |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 private: | 463 private: |
| 464 int GetVirtualRegister() { return code()->NextVirtualRegister(); } | 464 int GetVirtualRegister() { return code()->NextVirtualRegister(); } |
| 465 | 465 |
| 466 // Checks whether the value of a given virtual register is a reference. | 466 // Checks whether the value of a given virtual register is a reference. |
| 467 // TODO(titzer): rename this to IsReference. | 467 // TODO(titzer): rename this to IsReference. |
| 468 bool HasTaggedValue(int virtual_register) const; | 468 bool HasTaggedValue(int virtual_register) const; |
| 469 | 469 |
| 470 // Returns the register kind required by the given virtual register. | 470 // Returns the register kind required by the given virtual register. |
| 471 RegisterKind RequiredRegisterKind(int virtual_register) const; | 471 RegisterKind RequiredRegisterKind(int virtual_register) const; |
| 472 | 472 |
| 473 // Creates a new live range. |
| 474 LiveRange* NewLiveRange(int index); |
| 475 |
| 473 // This zone is for InstructionOperands and moves that live beyond register | 476 // This zone is for InstructionOperands and moves that live beyond register |
| 474 // allocation. | 477 // allocation. |
| 475 Zone* code_zone() const { return code()->zone(); } | 478 Zone* code_zone() const { return code()->zone(); } |
| 476 | 479 |
| 477 BitVector* assigned_registers() { return assigned_registers_; } | 480 BitVector* assigned_registers() { return assigned_registers_; } |
| 478 BitVector* assigned_double_registers() { return assigned_double_registers_; } | 481 BitVector* assigned_double_registers() { return assigned_double_registers_; } |
| 479 | 482 |
| 480 #ifdef DEBUG | 483 #ifdef DEBUG |
| 481 void Verify() const; | 484 void Verify() const; |
| 482 #endif | 485 #endif |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 #endif | 657 #endif |
| 655 | 658 |
| 656 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); | 659 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); |
| 657 }; | 660 }; |
| 658 | 661 |
| 659 } // namespace compiler | 662 } // namespace compiler |
| 660 } // namespace internal | 663 } // namespace internal |
| 661 } // namespace v8 | 664 } // namespace v8 |
| 662 | 665 |
| 663 #endif // V8_REGISTER_ALLOCATOR_H_ | 666 #endif // V8_REGISTER_ALLOCATOR_H_ |
| OLD | NEW |