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 | |
366 static const int kNumberOfElements = 1021; | 363 static const int kNumberOfElements = 1021; |
367 | 364 |
368 private: | 365 private: |
369 static const int kChainLengthThreshold = 15; | 366 static const int kChainLengthThreshold = 15; |
370 | 367 |
371 intptr_t idx_; | 368 intptr_t idx_; |
372 intptr_t chain_length_; | 369 intptr_t chain_length_; |
373 SlotsBuffer* next_; | 370 SlotsBuffer* next_; |
374 ObjectSlot slots_[kNumberOfElements]; | 371 ObjectSlot slots_[kNumberOfElements]; |
375 }; | 372 }; |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 private: | 966 private: |
970 MarkCompactCollector* collector_; | 967 MarkCompactCollector* collector_; |
971 }; | 968 }; |
972 | 969 |
973 | 970 |
974 const char* AllocationSpaceName(AllocationSpace space); | 971 const char* AllocationSpaceName(AllocationSpace space); |
975 } | 972 } |
976 } // namespace v8::internal | 973 } // namespace v8::internal |
977 | 974 |
978 #endif // V8_HEAP_MARK_COMPACT_H_ | 975 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |