OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 explicit IncrementalMarking(Heap* heap); | 49 explicit IncrementalMarking(Heap* heap); |
50 | 50 |
51 void TearDown(); | 51 void TearDown(); |
52 | 52 |
53 State state() { | 53 State state() { |
54 ASSERT(state_ == STOPPED || FLAG_incremental_marking); | 54 ASSERT(state_ == STOPPED || FLAG_incremental_marking); |
55 return state_; | 55 return state_; |
56 } | 56 } |
57 | 57 |
58 bool should_hurry() { return should_hurry_; } | 58 bool should_hurry() { return should_hurry_; } |
| 59 void set_should_hurry(bool val) { should_hurry_ = val; } |
59 | 60 |
60 inline bool IsStopped() { return state() == STOPPED; } | 61 inline bool IsStopped() { return state() == STOPPED; } |
61 | 62 |
62 INLINE(bool IsMarking()) { return state() >= MARKING; } | 63 INLINE(bool IsMarking()) { return state() >= MARKING; } |
63 | 64 |
64 inline bool IsMarkingIncomplete() { return state() == MARKING; } | 65 inline bool IsMarkingIncomplete() { return state() == MARKING; } |
65 | 66 |
66 inline bool IsComplete() { return state() == COMPLETE; } | 67 inline bool IsComplete() { return state() == COMPLETE; } |
67 | 68 |
68 bool WorthActivating(); | 69 bool WorthActivating(); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 no_marking_scope_depth_++; | 213 no_marking_scope_depth_++; |
213 } | 214 } |
214 | 215 |
215 void LeaveNoMarkingScope() { | 216 void LeaveNoMarkingScope() { |
216 no_marking_scope_depth_--; | 217 no_marking_scope_depth_--; |
217 } | 218 } |
218 | 219 |
219 void UncommitMarkingDeque(); | 220 void UncommitMarkingDeque(); |
220 | 221 |
221 private: | 222 private: |
222 void set_should_hurry(bool val) { | |
223 should_hurry_ = val; | |
224 } | |
225 | |
226 int64_t SpaceLeftInOldSpace(); | 223 int64_t SpaceLeftInOldSpace(); |
227 | 224 |
228 void ResetStepCounters(); | 225 void ResetStepCounters(); |
229 | 226 |
230 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; | 227 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; |
231 | 228 |
232 void StartMarking(CompactionFlag flag); | 229 void StartMarking(CompactionFlag flag); |
233 | 230 |
234 void ActivateIncrementalWriteBarrier(PagedSpace* space); | 231 void ActivateIncrementalWriteBarrier(PagedSpace* space); |
235 static void ActivateIncrementalWriteBarrier(NewSpace* space); | 232 static void ActivateIncrementalWriteBarrier(NewSpace* space); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 intptr_t allocated_; | 269 intptr_t allocated_; |
273 | 270 |
274 int no_marking_scope_depth_; | 271 int no_marking_scope_depth_; |
275 | 272 |
276 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 273 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
277 }; | 274 }; |
278 | 275 |
279 } } // namespace v8::internal | 276 } } // namespace v8::internal |
280 | 277 |
281 #endif // V8_INCREMENTAL_MARKING_H_ | 278 #endif // V8_INCREMENTAL_MARKING_H_ |
OLD | NEW |