Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: src/heap/mark-compact.h

Issue 1877233005: Rehash and clear deleted entries in weak collections during GC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698