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

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

Issue 1328003002: [heap] No leakage of objects-visiting.h outside of heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-heap-scavenger
Patch Set: Rebased. Created 5 years, 3 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/mark-compact.h ('k') | src/heap/objects-visiting.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 #include "src/heap/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 19 matching lines...) Expand all
30 namespace v8 { 30 namespace v8 {
31 namespace internal { 31 namespace internal {
32 32
33 33
34 const char* Marking::kWhiteBitPattern = "00"; 34 const char* Marking::kWhiteBitPattern = "00";
35 const char* Marking::kBlackBitPattern = "10"; 35 const char* Marking::kBlackBitPattern = "10";
36 const char* Marking::kGreyBitPattern = "11"; 36 const char* Marking::kGreyBitPattern = "11";
37 const char* Marking::kImpossibleBitPattern = "01"; 37 const char* Marking::kImpossibleBitPattern = "01";
38 38
39 39
40 // The following has to hold in order for {Marking::MarkBitFrom} to not produce
41 // invalid {kImpossibleBitPattern} in the marking bitmap by overlapping.
42 STATIC_ASSERT(Heap::kMinObjectSizeInWords >= 2);
43
44
40 // ------------------------------------------------------------------------- 45 // -------------------------------------------------------------------------
41 // MarkCompactCollector 46 // MarkCompactCollector
42 47
43 MarkCompactCollector::MarkCompactCollector(Heap* heap) 48 MarkCompactCollector::MarkCompactCollector(Heap* heap)
44 : // NOLINT 49 : // NOLINT
45 #ifdef DEBUG 50 #ifdef DEBUG
46 state_(IDLE), 51 state_(IDLE),
47 #endif 52 #endif
48 marking_parity_(ODD_MARKING_PARITY), 53 marking_parity_(ODD_MARKING_PARITY),
49 compacting_(false), 54 compacting_(false),
(...skipping 4616 matching lines...) Expand 10 before | Expand all | Expand 10 after
4666 SlotsBuffer* buffer = *buffer_address; 4671 SlotsBuffer* buffer = *buffer_address;
4667 while (buffer != NULL) { 4672 while (buffer != NULL) {
4668 SlotsBuffer* next_buffer = buffer->next(); 4673 SlotsBuffer* next_buffer = buffer->next();
4669 DeallocateBuffer(buffer); 4674 DeallocateBuffer(buffer);
4670 buffer = next_buffer; 4675 buffer = next_buffer;
4671 } 4676 }
4672 *buffer_address = NULL; 4677 *buffer_address = NULL;
4673 } 4678 }
4674 } // namespace internal 4679 } // namespace internal
4675 } // namespace v8 4680 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/mark-compact.h ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698