OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_SCAVENGER_H_ | 5 #ifndef V8_HEAP_SCAVENGER_H_ |
6 #define V8_HEAP_SCAVENGER_H_ | 6 #define V8_HEAP_SCAVENGER_H_ |
7 | 7 |
8 #include "src/heap/objects-visiting.h" | 8 #include "src/heap/objects-visiting.h" |
9 #include "src/heap/slot-set.h" | 9 #include "src/heap/slot-set.h" |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 private: | 57 private: |
58 inline void ScavengePointer(Object** p); | 58 inline void ScavengePointer(Object** p); |
59 | 59 |
60 Heap* heap_; | 60 Heap* heap_; |
61 }; | 61 }; |
62 | 62 |
63 | 63 |
64 // Helper class for turning the scavenger into an object visitor that is also | 64 // Helper class for turning the scavenger into an object visitor that is also |
65 // filtering out non-HeapObjects and objects which do not reside in new space. | 65 // filtering out non-HeapObjects and objects which do not reside in new space. |
66 template <PromotionMode promotion_mode> | |
67 class StaticScavengeVisitor | 66 class StaticScavengeVisitor |
68 : public StaticNewSpaceVisitor<StaticScavengeVisitor<promotion_mode>> { | 67 : public StaticNewSpaceVisitor<StaticScavengeVisitor> { |
69 public: | 68 public: |
70 static inline void VisitPointer(Heap* heap, HeapObject* object, Object** p); | 69 static inline void VisitPointer(Heap* heap, HeapObject* object, Object** p); |
71 }; | 70 }; |
72 | 71 |
73 } // namespace internal | 72 } // namespace internal |
74 } // namespace v8 | 73 } // namespace v8 |
75 | 74 |
76 #endif // V8_HEAP_SCAVENGER_H_ | 75 #endif // V8_HEAP_SCAVENGER_H_ |
OLD | NEW |