| 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 | |
| 519 static inline bool IsMarked(Object* obj); | 515 static inline bool IsMarked(Object* obj); |
| 520 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); | 516 static bool IsUnmarkedHeapObjectWithHeap(Heap* heap, Object** p); |
| 521 | 517 |
| 522 inline Heap* heap() const { return heap_; } | 518 inline Heap* heap() const { return heap_; } |
| 523 inline Isolate* isolate() const; | 519 inline Isolate* isolate() const; |
| 524 | 520 |
| 525 CodeFlusher* code_flusher() { return code_flusher_; } | 521 CodeFlusher* code_flusher() { return code_flusher_; } |
| 526 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } | 522 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } |
| 527 | 523 |
| 528 #ifdef VERIFY_HEAP | 524 #ifdef VERIFY_HEAP |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 private: | 893 private: |
| 898 MarkCompactCollector* collector_; | 894 MarkCompactCollector* collector_; |
| 899 }; | 895 }; |
| 900 | 896 |
| 901 | 897 |
| 902 const char* AllocationSpaceName(AllocationSpace space); | 898 const char* AllocationSpaceName(AllocationSpace space); |
| 903 } // namespace internal | 899 } // namespace internal |
| 904 } // namespace v8 | 900 } // namespace v8 |
| 905 | 901 |
| 906 #endif // V8_HEAP_MARK_COMPACT_H_ | 902 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |