| 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_COMPILER_FRAME_H_ | 5 #ifndef V8_COMPILER_FRAME_H_ |
| 6 #define V8_COMPILER_FRAME_H_ | 6 #define V8_COMPILER_FRAME_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/bit-vector.h" | 10 #include "src/bit-vector.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 if (kDoubleSize > kPointerSize) { | 56 if (kDoubleSize > kPointerSize) { |
| 57 DCHECK(kDoubleSize == kPointerSize * 2); | 57 DCHECK(kDoubleSize == kPointerSize * 2); |
| 58 spill_slot_count_++; | 58 spill_slot_count_++; |
| 59 spill_slot_count_ |= 1; | 59 spill_slot_count_ |= 1; |
| 60 } | 60 } |
| 61 double_spill_slot_count_++; | 61 double_spill_slot_count_++; |
| 62 } | 62 } |
| 63 return spill_slot_count_++; | 63 return spill_slot_count_++; |
| 64 } | 64 } |
| 65 | 65 |
| 66 void ReserveSpillSlots(size_t slot_count) { |
| 67 DCHECK_EQ(0, spill_slot_count_); // can only reserve before allocation. |
| 68 spill_slot_count_ = static_cast<int>(slot_count); |
| 69 } |
| 70 |
| 66 private: | 71 private: |
| 67 int register_save_area_size_; | 72 int register_save_area_size_; |
| 68 int spill_slot_count_; | 73 int spill_slot_count_; |
| 69 int double_spill_slot_count_; | 74 int double_spill_slot_count_; |
| 70 BitVector* allocated_registers_; | 75 BitVector* allocated_registers_; |
| 71 BitVector* allocated_double_registers_; | 76 BitVector* allocated_double_registers_; |
| 72 | 77 |
| 73 DISALLOW_COPY_AND_ASSIGN(Frame); | 78 DISALLOW_COPY_AND_ASSIGN(Frame); |
| 74 }; | 79 }; |
| 75 | 80 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 97 int offset_; // Encodes SP or FP in the low order bit. | 102 int offset_; // Encodes SP or FP in the low order bit. |
| 98 | 103 |
| 99 static const int kFromSp = 1; | 104 static const int kFromSp = 1; |
| 100 static const int kFromFp = 0; | 105 static const int kFromFp = 0; |
| 101 }; | 106 }; |
| 102 } | 107 } |
| 103 } | 108 } |
| 104 } // namespace v8::internal::compiler | 109 } // namespace v8::internal::compiler |
| 105 | 110 |
| 106 #endif // V8_COMPILER_FRAME_H_ | 111 #endif // V8_COMPILER_FRAME_H_ |
| OLD | NEW |