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

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

Issue 1891863003: Revert of Rehash and clear deleted entries in weak collections during GC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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
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_
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