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

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

Issue 1281233003: [heap] Avoid overzealous inclusion of heap internal headers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/incremental-marking.cc ('k') | 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 "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/heap/spaces.h" 9 #include "src/heap/spaces.h"
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 // Forward declarations. 22 // Forward declarations.
23 class CodeFlusher; 23 class CodeFlusher;
24 class MarkCompactCollector; 24 class MarkCompactCollector;
25 class MarkingVisitor; 25 class MarkingVisitor;
26 class RootMarkingVisitor; 26 class RootMarkingVisitor;
27 27
28 28
29 class Marking : public AllStatic { 29 class Marking : public AllStatic {
30 public: 30 public:
31 INLINE(static MarkBit MarkBitFrom(Address addr)); 31 INLINE(static MarkBit MarkBitFrom(Address addr)) {
32 MemoryChunk* p = MemoryChunk::FromAddress(addr);
33 return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr));
34 }
32 35
33 INLINE(static MarkBit MarkBitFrom(HeapObject* obj)) { 36 INLINE(static MarkBit MarkBitFrom(HeapObject* obj)) {
34 return MarkBitFrom(reinterpret_cast<Address>(obj)); 37 return MarkBitFrom(reinterpret_cast<Address>(obj));
35 } 38 }
36 39
37 // Impossible markbits: 01 40 // Impossible markbits: 01
38 static const char* kImpossibleBitPattern; 41 static const char* kImpossibleBitPattern;
39 INLINE(static bool IsImpossible(MarkBit mark_bit)) { 42 INLINE(static bool IsImpossible(MarkBit mark_bit)) {
40 return !mark_bit.Get() && mark_bit.Next().Get(); 43 return !mark_bit.Get() && mark_bit.Next().Get();
41 } 44 }
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 private: 1037 private:
1035 MarkCompactCollector* collector_; 1038 MarkCompactCollector* collector_;
1036 }; 1039 };
1037 1040
1038 1041
1039 const char* AllocationSpaceName(AllocationSpace space); 1042 const char* AllocationSpaceName(AllocationSpace space);
1040 } 1043 }
1041 } // namespace v8::internal 1044 } // namespace v8::internal
1042 1045
1043 #endif // V8_HEAP_MARK_COMPACT_H_ 1046 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698