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

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

Issue 1393773004: Reland "[heap] No leakage of mark-compact.h outside of heap." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/heap.cc ('k') | src/heap/incremental-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 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_INCREMENTAL_MARKING_H_ 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_
6 #define V8_HEAP_INCREMENTAL_MARKING_H_ 6 #define V8_HEAP_INCREMENTAL_MARKING_H_
7 7
8 #include "src/cancelable-task.h" 8 #include "src/cancelable-task.h"
9 #include "src/execution.h" 9 #include "src/execution.h"
10 #include "src/heap/incremental-marking-job.h" 10 #include "src/heap/incremental-marking-job.h"
11 #include "src/heap/mark-compact.h"
12 #include "src/objects.h" 11 #include "src/objects.h"
13 12
14 namespace v8 { 13 namespace v8 {
15 namespace internal { 14 namespace internal {
16 15
16 // Forward declarations.
17 class MarkBit;
18 class PagedSpace;
19
17 class IncrementalMarking { 20 class IncrementalMarking {
18 public: 21 public:
19 enum State { STOPPED, SWEEPING, MARKING, COMPLETE }; 22 enum State { STOPPED, SWEEPING, MARKING, COMPLETE };
20 23
21 enum CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD }; 24 enum CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD };
22 25
23 enum ForceMarkingAction { FORCE_MARKING, DO_NOT_FORCE_MARKING }; 26 enum ForceMarkingAction { FORCE_MARKING, DO_NOT_FORCE_MARKING };
24 27
25 enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION }; 28 enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION };
26 29
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void RecordWrites(HeapObject* obj); 177 void RecordWrites(HeapObject* obj);
175 178
176 void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); 179 void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit);
177 180
178 void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); 181 void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit);
179 182
180 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { 183 inline void SetOldSpacePageFlags(MemoryChunk* chunk) {
181 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); 184 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting());
182 } 185 }
183 186
184 inline void SetNewSpacePageFlags(NewSpacePage* chunk) { 187 inline void SetNewSpacePageFlags(MemoryChunk* chunk) {
185 SetNewSpacePageFlags(chunk, IsMarking()); 188 SetNewSpacePageFlags(chunk, IsMarking());
186 } 189 }
187 190
188 bool IsCompacting() { return IsMarking() && is_compacting_; } 191 bool IsCompacting() { return IsMarking() && is_compacting_; }
189 192
190 void ActivateGeneratedStub(Code* stub); 193 void ActivateGeneratedStub(Code* stub);
191 194
192 void NotifyOfHighPromotionRate(); 195 void NotifyOfHighPromotionRate();
193 196
194 void EnterNoMarkingScope() { no_marking_scope_depth_++; } 197 void EnterNoMarkingScope() { no_marking_scope_depth_++; }
(...skipping 29 matching lines...) Expand all
224 static void ActivateIncrementalWriteBarrier(NewSpace* space); 227 static void ActivateIncrementalWriteBarrier(NewSpace* space);
225 void ActivateIncrementalWriteBarrier(); 228 void ActivateIncrementalWriteBarrier();
226 229
227 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); 230 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space);
228 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); 231 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space);
229 void DeactivateIncrementalWriteBarrier(); 232 void DeactivateIncrementalWriteBarrier();
230 233
231 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking, 234 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking,
232 bool is_compacting); 235 bool is_compacting);
233 236
234 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking); 237 static void SetNewSpacePageFlags(MemoryChunk* chunk, bool is_marking);
235 238
236 INLINE(void ProcessMarkingDeque()); 239 INLINE(void ProcessMarkingDeque());
237 240
238 INLINE(intptr_t ProcessMarkingDeque(intptr_t bytes_to_process)); 241 INLINE(intptr_t ProcessMarkingDeque(intptr_t bytes_to_process));
239 242
240 INLINE(void VisitObject(Map* map, HeapObject* obj, int size)); 243 INLINE(void VisitObject(Map* map, HeapObject* obj, int size));
241 244
242 void IncrementIdleMarkingDelayCounter(); 245 void IncrementIdleMarkingDelayCounter();
243 246
244 Heap* heap_; 247 Heap* heap_;
(...skipping 25 matching lines...) Expand all
270 GCRequestType request_type_; 273 GCRequestType request_type_;
271 274
272 IncrementalMarkingJob incremental_marking_job_; 275 IncrementalMarkingJob incremental_marking_job_;
273 276
274 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 277 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
275 }; 278 };
276 } // namespace internal 279 } // namespace internal
277 } // namespace v8 280 } // namespace v8
278 281
279 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ 282 #endif // V8_HEAP_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698