Chromium Code Reviews| Index: src/compiler/frame.h |
| diff --git a/src/compiler/frame.h b/src/compiler/frame.h |
| index da371c3067d41ce79abb8f72c0ea7ddc8283c393..de2ae1a3c23f57c32c3430a7e274ab0187f2f01a 100644 |
| --- a/src/compiler/frame.h |
| +++ b/src/compiler/frame.h |
| @@ -82,9 +82,6 @@ class Frame : public ZoneObject { |
| inline int GetTotalFrameSlotCount() const { return frame_slot_count_; } |
| - inline int GetSavedCalleeRegisterSlotCount() const { |
| - return callee_saved_slot_count_; |
| - } |
| inline int GetSpillSlotCount() const { return spill_slot_count_; } |
| void SetAllocatedRegisters(BitVector* regs) { |
| @@ -101,23 +98,20 @@ class Frame : public ZoneObject { |
| return !allocated_double_registers_->IsEmpty(); |
| } |
| - int AlignSavedCalleeRegisterSlots(int alignment = kDoubleSize) { |
| - DCHECK_EQ(0, callee_saved_slot_count_); |
| + void AlignSavedCalleeRegisterSlots(int alignment = kDoubleSize) { |
| int alignment_slots = alignment / kPointerSize; |
| int delta = alignment_slots - (frame_slot_count_ & (alignment_slots - 1)); |
| if (delta != alignment_slots) { |
| frame_slot_count_ += delta; |
| } |
| - return delta; |
| + spill_slot_count_ += delta; |
|
Mircea Trofin
2016/04/16 04:25:10
Note to reviewers: I am not very happy with this.
Mircea Trofin
2016/04/16 15:25:43
FWIW, I see we do the same in AlignFrame. Still, i
|
| } |
| void AllocateSavedCalleeRegisterSlots(int count) { |
| frame_slot_count_ += count; |
| - callee_saved_slot_count_ += count; |
| } |
| int AllocateSpillSlot(int width) { |
| - DCHECK_EQ(0, callee_saved_slot_count_); |
| int frame_slot_count_before = frame_slot_count_; |
| int slot = AllocateAlignedFrameSlot(width); |
| spill_slot_count_ += (frame_slot_count_ - frame_slot_count_before); |
| @@ -127,7 +121,6 @@ class Frame : public ZoneObject { |
| int AlignFrame(int alignment = kDoubleSize); |
| int ReserveSpillSlots(size_t slot_count) { |
| - DCHECK_EQ(0, callee_saved_slot_count_); |
| DCHECK_EQ(0, spill_slot_count_); |
| spill_slot_count_ += static_cast<int>(slot_count); |
| frame_slot_count_ += static_cast<int>(slot_count); |
| @@ -151,7 +144,6 @@ class Frame : public ZoneObject { |
| private: |
| int frame_slot_count_; |
| - int callee_saved_slot_count_; |
| int spill_slot_count_; |
| BitVector* allocated_registers_; |
| BitVector* allocated_double_registers_; |
| @@ -190,13 +182,13 @@ class FrameOffset { |
| // current function's frame. |
| class FrameAccessState : public ZoneObject { |
| public: |
| - explicit FrameAccessState(Frame* const frame) |
| + explicit FrameAccessState(const Frame* const frame) |
| : frame_(frame), |
| access_frame_with_fp_(false), |
| sp_delta_(0), |
| has_frame_(false) {} |
| - Frame* frame() const { return frame_; } |
| + const Frame* frame() const { return frame_; } |
| void MarkHasFrame(bool state); |
| int sp_delta() const { return sp_delta_; } |
| @@ -228,7 +220,7 @@ class FrameAccessState : public ZoneObject { |
| FrameOffset GetFrameOffset(int spill_slot) const; |
| private: |
| - Frame* const frame_; |
| + const Frame* const frame_; |
| bool access_frame_with_fp_; |
| int sp_delta_; |
| bool has_frame_; |