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

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

Issue 2477823003: [heap] Make LiveObjectIterator concurrency safe (Closed)
Patch Set: Fix condition Created 4 years, 1 month 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-inl.h » ('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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 explicit LiveObjectIterator(MemoryChunk* chunk) 314 explicit LiveObjectIterator(MemoryChunk* chunk)
315 : chunk_(chunk), 315 : chunk_(chunk),
316 it_(chunk_), 316 it_(chunk_),
317 cell_base_(it_.CurrentCellBase()), 317 cell_base_(it_.CurrentCellBase()),
318 current_cell_(*it_.CurrentCell()) { 318 current_cell_(*it_.CurrentCell()) {
319 } 319 }
320 320
321 HeapObject* Next(); 321 HeapObject* Next();
322 322
323 private: 323 private:
324 inline Heap* heap() { return chunk_->heap(); }
325
324 MemoryChunk* chunk_; 326 MemoryChunk* chunk_;
325 MarkBitCellIterator it_; 327 MarkBitCellIterator it_;
326 Address cell_base_; 328 Address cell_base_;
327 MarkBit::CellType current_cell_; 329 MarkBit::CellType current_cell_;
328 }; 330 };
329 331
330 // ------------------------------------------------------------------------- 332 // -------------------------------------------------------------------------
331 // Mark-Compact collector 333 // Mark-Compact collector
332 class MarkCompactCollector { 334 class MarkCompactCollector {
333 public: 335 public:
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 771
770 private: 772 private:
771 MarkCompactCollector* collector_; 773 MarkCompactCollector* collector_;
772 }; 774 };
773 775
774 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); 776 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space);
775 } // namespace internal 777 } // namespace internal
776 } // namespace v8 778 } // namespace v8
777 779
778 #endif // V8_HEAP_MARK_COMPACT_H_ 780 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698