OLD | NEW |
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 | 8 |
9 #include "src/execution.h" | 9 #include "src/execution.h" |
10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 return state_; | 35 return state_; |
36 } | 36 } |
37 | 37 |
38 bool should_hurry() { return should_hurry_; } | 38 bool should_hurry() { return should_hurry_; } |
39 void set_should_hurry(bool val) { should_hurry_ = val; } | 39 void set_should_hurry(bool val) { should_hurry_ = val; } |
40 | 40 |
41 bool weak_closure_was_overapproximated() const { | 41 bool weak_closure_was_overapproximated() const { |
42 return weak_closure_was_overapproximated_; | 42 return weak_closure_was_overapproximated_; |
43 } | 43 } |
44 | 44 |
| 45 void SetWeakClosureWasOverApproximatedForTesting(bool val) { |
| 46 weak_closure_was_overapproximated_ = val; |
| 47 } |
| 48 |
45 inline bool IsStopped() { return state() == STOPPED; } | 49 inline bool IsStopped() { return state() == STOPPED; } |
46 | 50 |
47 INLINE(bool IsMarking()) { return state() >= MARKING; } | 51 INLINE(bool IsMarking()) { return state() >= MARKING; } |
48 | 52 |
49 inline bool IsMarkingIncomplete() { return state() == MARKING; } | 53 inline bool IsMarkingIncomplete() { return state() == MARKING; } |
50 | 54 |
51 inline bool IsComplete() { return state() == COMPLETE; } | 55 inline bool IsComplete() { return state() == COMPLETE; } |
52 | 56 |
53 inline bool IsReadyToOverApproximateWeakClosure() const { | 57 inline bool IsReadyToOverApproximateWeakClosure() const { |
54 return request_type_ == OVERAPPROXIMATION; | 58 return request_type_ == OVERAPPROXIMATION && |
| 59 !weak_closure_was_overapproximated_; |
55 } | 60 } |
56 | 61 |
57 GCRequestType request_type() const { return request_type_; } | 62 GCRequestType request_type() const { return request_type_; } |
58 | 63 |
59 bool WorthActivating(); | 64 bool WorthActivating(); |
60 | 65 |
61 bool ShouldActivate(); | 66 bool ShouldActivate(); |
62 | 67 |
63 bool WasActivated(); | 68 bool WasActivated(); |
64 | 69 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 int weak_closure_approximation_rounds_; | 258 int weak_closure_approximation_rounds_; |
254 | 259 |
255 GCRequestType request_type_; | 260 GCRequestType request_type_; |
256 | 261 |
257 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 262 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
258 }; | 263 }; |
259 } | 264 } |
260 } // namespace v8::internal | 265 } // namespace v8::internal |
261 | 266 |
262 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 267 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |