| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 } | 698 } |
| 699 | 699 |
| 700 LifetimePosition End() const { | 700 LifetimePosition End() const { |
| 701 ASSERT(!IsEmpty()); | 701 ASSERT(!IsEmpty()); |
| 702 return last_interval_->end(); | 702 return last_interval_->end(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 bool HasAllocatedSpillOperand() const { | 705 bool HasAllocatedSpillOperand() const { |
| 706 return spill_operand_ != NULL && !spill_operand_->IsUnallocated(); | 706 return spill_operand_ != NULL && !spill_operand_->IsUnallocated(); |
| 707 } | 707 } |
| 708 |
| 708 LOperand* GetSpillOperand() const { return spill_operand_; } | 709 LOperand* GetSpillOperand() const { return spill_operand_; } |
| 709 void SetSpillOperand(LOperand* operand) { | 710 void SetSpillOperand(LOperand* operand) { |
| 710 ASSERT(!operand->IsUnallocated()); | 711 ASSERT(!operand->IsUnallocated()); |
| 711 ASSERT(spill_operand_ != NULL); | 712 ASSERT(spill_operand_ != NULL); |
| 712 ASSERT(spill_operand_->IsUnallocated()); | 713 ASSERT(spill_operand_->IsUnallocated()); |
| 713 spill_operand_->ConvertTo(operand->kind(), operand->index()); | 714 spill_operand_->ConvertTo(operand->kind(), operand->index()); |
| 714 } | 715 } |
| 715 | 716 |
| 716 void SetSpillStartIndex(int start) { | 717 void SetSpillStartIndex(int start) { |
| 717 spill_start_index_ = Min(start, spill_start_index_); | 718 spill_start_index_ = Min(start, spill_start_index_); |
| 718 } | 719 } |
| 719 | 720 |
| 720 bool ShouldBeAllocatedBefore(const LiveRange* other) const; | 721 bool ShouldBeAllocatedBefore(const LiveRange* other) const; |
| 721 bool CanCover(LifetimePosition position) const; | 722 bool CanCover(LifetimePosition position) const; |
| 722 bool Covers(LifetimePosition position); | 723 bool Covers(LifetimePosition position); |
| 723 LifetimePosition FirstIntersection(LiveRange* other); | 724 LifetimePosition FirstIntersection(LiveRange* other); |
| 724 | 725 |
| 725 | |
| 726 // Add a new interval or a new use position to this live range. | 726 // Add a new interval or a new use position to this live range. |
| 727 void EnsureInterval(LifetimePosition start, LifetimePosition end); | 727 void EnsureInterval(LifetimePosition start, LifetimePosition end); |
| 728 void AddUseInterval(LifetimePosition start, LifetimePosition end); | 728 void AddUseInterval(LifetimePosition start, LifetimePosition end); |
| 729 UsePosition* AddUsePosition(LifetimePosition pos, LOperand* operand); | 729 UsePosition* AddUsePosition(LifetimePosition pos, LOperand* operand); |
| 730 UsePosition* AddUsePosition(LifetimePosition pos); | 730 UsePosition* AddUsePosition(LifetimePosition pos); |
| 731 | 731 |
| 732 // Shorten the most recently added interval by setting a new start. | 732 // Shorten the most recently added interval by setting a new start. |
| 733 void ShortenTo(LifetimePosition start); | 733 void ShortenTo(LifetimePosition start); |
| 734 | 734 |
| 735 #ifdef DEBUG | 735 #ifdef DEBUG |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 | 1027 |
| 1028 bool has_osr_entry_; | 1028 bool has_osr_entry_; |
| 1029 | 1029 |
| 1030 DISALLOW_COPY_AND_ASSIGN(LAllocator); | 1030 DISALLOW_COPY_AND_ASSIGN(LAllocator); |
| 1031 }; | 1031 }; |
| 1032 | 1032 |
| 1033 | 1033 |
| 1034 } } // namespace v8::internal | 1034 } } // namespace v8::internal |
| 1035 | 1035 |
| 1036 #endif // V8_LITHIUM_ALLOCATOR_H_ | 1036 #endif // V8_LITHIUM_ALLOCATOR_H_ |
| OLD | NEW |