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

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

Issue 479113004: Remove conservative sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.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_INL_H_ 5 #ifndef V8_HEAP_MARK_COMPACT_INL_H_
6 #define V8_HEAP_MARK_COMPACT_INL_H_ 6 #define V8_HEAP_MARK_COMPACT_INL_H_
7 7
8 #include <memory.h> 8 #include <memory.h>
9 9
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
11 #include "src/isolate.h" 11 #include "src/isolate.h"
12 12
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 17
18 MarkBit Marking::MarkBitFrom(Address addr) { 18 MarkBit Marking::MarkBitFrom(Address addr) {
19 MemoryChunk* p = MemoryChunk::FromAddress(addr); 19 MemoryChunk* p = MemoryChunk::FromAddress(addr);
20 return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr), 20 return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr),
21 p->ContainsOnlyData()); 21 p->ContainsOnlyData());
22 } 22 }
23 23
24 24
25 void MarkCompactCollector::SetFlags(int flags) { 25 void MarkCompactCollector::SetFlags(int flags) {
26 sweep_precisely_ = ((flags & Heap::kSweepPreciselyMask) != 0);
27 reduce_memory_footprint_ = ((flags & Heap::kReduceMemoryFootprintMask) != 0); 26 reduce_memory_footprint_ = ((flags & Heap::kReduceMemoryFootprintMask) != 0);
28 abort_incremental_marking_ = 27 abort_incremental_marking_ =
29 ((flags & Heap::kAbortIncrementalMarkingMask) != 0); 28 ((flags & Heap::kAbortIncrementalMarkingMask) != 0);
30 } 29 }
31 30
32 31
33 void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) { 32 void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) {
34 DCHECK(Marking::MarkBitFrom(obj) == mark_bit); 33 DCHECK(Marking::MarkBitFrom(obj) == mark_bit);
35 if (!mark_bit.Get()) { 34 if (!mark_bit.Get()) {
36 mark_bit.Set(); 35 mark_bit.Set();
(...skipping 29 matching lines...) Expand all
66 if (!SlotsBuffer::AddTo(&slots_buffer_allocator_, 65 if (!SlotsBuffer::AddTo(&slots_buffer_allocator_,
67 object_page->slots_buffer_address(), slot, mode)) { 66 object_page->slots_buffer_address(), slot, mode)) {
68 EvictEvacuationCandidate(object_page); 67 EvictEvacuationCandidate(object_page);
69 } 68 }
70 } 69 }
71 } 70 }
72 } 71 }
73 } // namespace v8::internal 72 } // namespace v8::internal
74 73
75 #endif // V8_HEAP_MARK_COMPACT_INL_H_ 74 #endif // V8_HEAP_MARK_COMPACT_INL_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698