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

Side by Side Diff: src/heap/marking.h

Issue 2732053002: [heap] Implement simple marking in the concurrent marking thread. (Closed)
Patch Set: re-upload Created 3 years, 9 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 | « src/heap/concurrent-marking.cc ('k') | test/cctest/heap/test-concurrent-marking.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_MARKING_H 5 #ifndef V8_MARKING_H
6 #define V8_MARKING_H 6 #define V8_MARKING_H
7 7
8 #include "src/utils.h" 8 #include "src/utils.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 inline void Set() { *cell_ |= mask_; } 38 inline void Set() { *cell_ |= mask_; }
39 inline bool Get() { return (*cell_ & mask_) != 0; } 39 inline bool Get() { return (*cell_ & mask_) != 0; }
40 inline void Clear() { *cell_ &= ~mask_; } 40 inline void Clear() { *cell_ &= ~mask_; }
41 41
42 CellType* cell_; 42 CellType* cell_;
43 CellType mask_; 43 CellType mask_;
44 44
45 friend class IncrementalMarking; 45 friend class IncrementalMarking;
46 friend class ConcurrentMarkingMarkbits;
46 friend class Marking; 47 friend class Marking;
47 }; 48 };
48 49
49 // Bitmap is a sequence of cells each containing fixed number of bits. 50 // Bitmap is a sequence of cells each containing fixed number of bits.
50 class Bitmap { 51 class Bitmap {
51 public: 52 public:
52 static const uint32_t kBitsPerCell = 32; 53 static const uint32_t kBitsPerCell = 32;
53 static const uint32_t kBitsPerCellLog2 = 5; 54 static const uint32_t kBitsPerCellLog2 = 5;
54 static const uint32_t kBitIndexMask = kBitsPerCell - 1; 55 static const uint32_t kBitIndexMask = kBitsPerCell - 1;
55 static const uint32_t kBytesPerCell = kBitsPerCell / kBitsPerByte; 56 static const uint32_t kBytesPerCell = kBitsPerCell / kBitsPerByte;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 355 }
355 356
356 private: 357 private:
357 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking); 358 DISALLOW_IMPLICIT_CONSTRUCTORS(Marking);
358 }; 359 };
359 360
360 } // namespace internal 361 } // namespace internal
361 } // namespace v8 362 } // namespace v8
362 363
363 #endif // V8_MARKING_H_ 364 #endif // V8_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap/concurrent-marking.cc ('k') | test/cctest/heap/test-concurrent-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698