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 <deque> | 8 #include <deque> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 #endif | 505 #endif |
506 | 506 |
507 // Determine type of object and emit deletion log event. | 507 // Determine type of object and emit deletion log event. |
508 static void ReportDeleteIfNeeded(HeapObject* obj, Isolate* isolate); | 508 static void ReportDeleteIfNeeded(HeapObject* obj, Isolate* isolate); |
509 | 509 |
510 // Distinguishable invalid map encodings (for single word and multiple words) | 510 // Distinguishable invalid map encodings (for single word and multiple words) |
511 // that indicate free regions. | 511 // that indicate free regions. |
512 static const uint32_t kSingleFreeEncoding = 0; | 512 static const uint32_t kSingleFreeEncoding = 0; |
513 static const uint32_t kMultiFreeEncoding = 1; | 513 static const uint32_t kMultiFreeEncoding = 1; |
514 | 514 |
| 515 // If the number of deleted slots in a JSWeakCollection exceeds the number |
| 516 // of entries / 2^(factor), we rehash the table. |
| 517 static const int kJSWeakCollectionLoadFactorExp = 1; |
| 518 |
515 static inline bool IsMarked(Object* obj); | 519 static inline bool IsMarked(Object* obj); |
516 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); | 520 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); |
517 | 521 |
518 inline Heap* heap() const { return heap_; } | 522 inline Heap* heap() const { return heap_; } |
519 inline Isolate* isolate() const; | 523 inline Isolate* isolate() const; |
520 | 524 |
521 CodeFlusher* code_flusher() { return code_flusher_; } | 525 CodeFlusher* code_flusher() { return code_flusher_; } |
522 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } | 526 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } |
523 | 527 |
524 #ifdef VERIFY_HEAP | 528 #ifdef VERIFY_HEAP |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 private: | 897 private: |
894 MarkCompactCollector* collector_; | 898 MarkCompactCollector* collector_; |
895 }; | 899 }; |
896 | 900 |
897 | 901 |
898 const char* AllocationSpaceName(AllocationSpace space); | 902 const char* AllocationSpaceName(AllocationSpace space); |
899 } // namespace internal | 903 } // namespace internal |
900 } // namespace v8 | 904 } // namespace v8 |
901 | 905 |
902 #endif // V8_HEAP_MARK_COMPACT_H_ | 906 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |