| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_HEAP_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
| 6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
| 10 | 10 |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 buffer->Add(slot); | 353 buffer->Add(slot); |
| 354 return true; | 354 return true; |
| 355 } | 355 } |
| 356 | 356 |
| 357 static bool IsTypedSlot(ObjectSlot slot); | 357 static bool IsTypedSlot(ObjectSlot slot); |
| 358 | 358 |
| 359 static bool AddTo(SlotsBufferAllocator* allocator, | 359 static bool AddTo(SlotsBufferAllocator* allocator, |
| 360 SlotsBuffer** buffer_address, SlotType type, Address addr, | 360 SlotsBuffer** buffer_address, SlotType type, Address addr, |
| 361 AdditionMode mode); | 361 AdditionMode mode); |
| 362 | 362 |
| 363 // Removes all occurrences of given slot from the chain of slots buffers. |
| 364 static void RemoveSlot(SlotsBuffer* buffer, ObjectSlot slot_to_remove); |
| 365 |
| 363 static const int kNumberOfElements = 1021; | 366 static const int kNumberOfElements = 1021; |
| 364 | 367 |
| 365 private: | 368 private: |
| 366 static const int kChainLengthThreshold = 15; | 369 static const int kChainLengthThreshold = 15; |
| 367 | 370 |
| 368 intptr_t idx_; | 371 intptr_t idx_; |
| 369 intptr_t chain_length_; | 372 intptr_t chain_length_; |
| 370 SlotsBuffer* next_; | 373 SlotsBuffer* next_; |
| 371 ObjectSlot slots_[kNumberOfElements]; | 374 ObjectSlot slots_[kNumberOfElements]; |
| 372 }; | 375 }; |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 private: | 957 private: |
| 955 MarkCompactCollector* collector_; | 958 MarkCompactCollector* collector_; |
| 956 }; | 959 }; |
| 957 | 960 |
| 958 | 961 |
| 959 const char* AllocationSpaceName(AllocationSpace space); | 962 const char* AllocationSpaceName(AllocationSpace space); |
| 960 } | 963 } |
| 961 } // namespace v8::internal | 964 } // namespace v8::internal |
| 962 | 965 |
| 963 #endif // V8_HEAP_MARK_COMPACT_H_ | 966 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |