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_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 void IterateRoots(ObjectVisitor* v, VisitMode mode); | 1144 void IterateRoots(ObjectVisitor* v, VisitMode mode); |
1145 // Iterates over all strong roots in the heap. | 1145 // Iterates over all strong roots in the heap. |
1146 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); | 1146 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); |
1147 // Iterates over entries in the smi roots list. Only interesting to the | 1147 // Iterates over entries in the smi roots list. Only interesting to the |
1148 // serializer/deserializer, since GC does not care about smis. | 1148 // serializer/deserializer, since GC does not care about smis. |
1149 void IterateSmiRoots(ObjectVisitor* v); | 1149 void IterateSmiRoots(ObjectVisitor* v); |
1150 // Iterates over all the other roots in the heap. | 1150 // Iterates over all the other roots in the heap. |
1151 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); | 1151 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); |
1152 | 1152 |
1153 // Iterate pointers of promoted objects. | 1153 // Iterate pointers of promoted objects. |
1154 void IteratePromotedObject(HeapObject* target, int size, | 1154 void IterateAndScavengePromotedObject(HeapObject* target, int size, |
1155 bool was_marked_black, | 1155 bool was_marked_black); |
1156 ObjectSlotCallback callback); | |
1157 | |
1158 void IteratePromotedObjectPointers(HeapObject* object, Address start, | |
1159 Address end, bool record_slots, | |
1160 ObjectSlotCallback callback); | |
1161 | 1156 |
1162 // =========================================================================== | 1157 // =========================================================================== |
1163 // Store buffer API. ========================================================= | 1158 // Store buffer API. ========================================================= |
1164 // =========================================================================== | 1159 // =========================================================================== |
1165 | 1160 |
1166 // Write barrier support for object[offset] = o; | 1161 // Write barrier support for object[offset] = o; |
1167 inline void RecordWrite(Object* object, int offset, Object* o); | 1162 inline void RecordWrite(Object* object, int offset, Object* o); |
1168 inline void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* target); | 1163 inline void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* target); |
1169 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* target); | 1164 void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* target); |
1170 void RecordWritesIntoCode(Code* code); | 1165 void RecordWritesIntoCode(Code* code); |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2329 bool delay_sweeper_tasks_for_testing_; | 2324 bool delay_sweeper_tasks_for_testing_; |
2330 | 2325 |
2331 // Classes in "heap" can be friends. | 2326 // Classes in "heap" can be friends. |
2332 friend class AlwaysAllocateScope; | 2327 friend class AlwaysAllocateScope; |
2333 friend class GCCallbacksScope; | 2328 friend class GCCallbacksScope; |
2334 friend class GCTracer; | 2329 friend class GCTracer; |
2335 friend class HeapIterator; | 2330 friend class HeapIterator; |
2336 friend class IdleScavengeObserver; | 2331 friend class IdleScavengeObserver; |
2337 friend class IncrementalMarking; | 2332 friend class IncrementalMarking; |
2338 friend class IncrementalMarkingJob; | 2333 friend class IncrementalMarkingJob; |
2339 friend class IteratePromotedObjectsVisitor; | |
2340 friend class LargeObjectSpace; | 2334 friend class LargeObjectSpace; |
2341 friend class MarkCompactCollector; | 2335 friend class MarkCompactCollector; |
2342 friend class MarkCompactMarkingVisitor; | 2336 friend class MarkCompactMarkingVisitor; |
2343 friend class NewSpace; | 2337 friend class NewSpace; |
2344 friend class ObjectStatsCollector; | 2338 friend class ObjectStatsCollector; |
2345 friend class Page; | 2339 friend class Page; |
2346 friend class PagedSpace; | 2340 friend class PagedSpace; |
2347 friend class Scavenger; | 2341 friend class Scavenger; |
2348 friend class StoreBuffer; | 2342 friend class StoreBuffer; |
2349 friend class TestMemoryAllocatorScope; | 2343 friend class TestMemoryAllocatorScope; |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 friend class LargeObjectSpace; | 2636 friend class LargeObjectSpace; |
2643 friend class NewSpace; | 2637 friend class NewSpace; |
2644 friend class PagedSpace; | 2638 friend class PagedSpace; |
2645 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2639 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2646 }; | 2640 }; |
2647 | 2641 |
2648 } // namespace internal | 2642 } // namespace internal |
2649 } // namespace v8 | 2643 } // namespace v8 |
2650 | 2644 |
2651 #endif // V8_HEAP_HEAP_H_ | 2645 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |