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_OBJECTS_VISITING_H_ | 5 #ifndef V8_OBJECTS_VISITING_H_ |
6 #define V8_OBJECTS_VISITING_H_ | 6 #define V8_OBJECTS_VISITING_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/heap/spaces.h" | 10 #include "src/heap/spaces.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 V(StructGeneric) \ | 69 V(StructGeneric) \ |
70 V(ConsString) \ | 70 V(ConsString) \ |
71 V(SlicedString) \ | 71 V(SlicedString) \ |
72 V(Symbol) \ | 72 V(Symbol) \ |
73 V(Oddball) \ | 73 V(Oddball) \ |
74 V(Code) \ | 74 V(Code) \ |
75 V(Map) \ | 75 V(Map) \ |
76 V(Cell) \ | 76 V(Cell) \ |
77 V(PropertyCell) \ | 77 V(PropertyCell) \ |
78 V(WeakCell) \ | 78 V(WeakCell) \ |
79 V(TransitionArray) \ | |
80 V(SharedFunctionInfo) \ | 79 V(SharedFunctionInfo) \ |
81 V(JSFunction) \ | 80 V(JSFunction) \ |
82 V(JSWeakCollection) \ | 81 V(JSWeakCollection) \ |
83 V(JSArrayBuffer) \ | 82 V(JSArrayBuffer) \ |
84 V(JSRegExp) | 83 V(JSRegExp) |
85 | 84 |
86 // For data objects, JS objects and structs along with generic visitor which | 85 // For data objects, JS objects and structs along with generic visitor which |
87 // can visit object of any size we provide visitors specialized by | 86 // can visit object of any size we provide visitors specialized by |
88 // object size in words. | 87 // object size in words. |
89 // Ids of specialized visitors are declared in a linear order (without | 88 // Ids of specialized visitors are declared in a linear order (without |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 class StaticMarkingVisitor : public StaticVisitorBase { | 340 class StaticMarkingVisitor : public StaticVisitorBase { |
342 public: | 341 public: |
343 static void Initialize(); | 342 static void Initialize(); |
344 | 343 |
345 INLINE(static void IterateBody(Map* map, HeapObject* obj)) { | 344 INLINE(static void IterateBody(Map* map, HeapObject* obj)) { |
346 table_.GetVisitor(map)(map, obj); | 345 table_.GetVisitor(map)(map, obj); |
347 } | 346 } |
348 | 347 |
349 INLINE(static void VisitPropertyCell(Map* map, HeapObject* object)); | 348 INLINE(static void VisitPropertyCell(Map* map, HeapObject* object)); |
350 INLINE(static void VisitWeakCell(Map* map, HeapObject* object)); | 349 INLINE(static void VisitWeakCell(Map* map, HeapObject* object)); |
351 INLINE(static void VisitTransitionArray(Map* map, HeapObject* object)); | |
352 INLINE(static void VisitCodeEntry(Heap* heap, HeapObject* object, | 350 INLINE(static void VisitCodeEntry(Heap* heap, HeapObject* object, |
353 Address entry_address)); | 351 Address entry_address)); |
354 INLINE(static void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo)); | 352 INLINE(static void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo)); |
355 INLINE(static void VisitCell(Heap* heap, RelocInfo* rinfo)); | 353 INLINE(static void VisitCell(Heap* heap, RelocInfo* rinfo)); |
356 INLINE(static void VisitDebugTarget(Heap* heap, RelocInfo* rinfo)); | 354 INLINE(static void VisitDebugTarget(Heap* heap, RelocInfo* rinfo)); |
357 INLINE(static void VisitCodeTarget(Heap* heap, RelocInfo* rinfo)); | 355 INLINE(static void VisitCodeTarget(Heap* heap, RelocInfo* rinfo)); |
358 INLINE(static void VisitCodeAgeSequence(Heap* heap, RelocInfo* rinfo)); | 356 INLINE(static void VisitCodeAgeSequence(Heap* heap, RelocInfo* rinfo)); |
359 INLINE(static void VisitExternalReference(RelocInfo* rinfo)) {} | 357 INLINE(static void VisitExternalReference(RelocInfo* rinfo)) {} |
360 INLINE(static void VisitInternalReference(RelocInfo* rinfo)) {} | 358 INLINE(static void VisitInternalReference(RelocInfo* rinfo)) {} |
361 INLINE(static void VisitRuntimeEntry(RelocInfo* rinfo)) {} | 359 INLINE(static void VisitRuntimeEntry(RelocInfo* rinfo)) {} |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 // the next element. Given the head of the list, this function removes dead | 431 // the next element. Given the head of the list, this function removes dead |
434 // elements from the list and if requested records slots for next-element | 432 // elements from the list and if requested records slots for next-element |
435 // pointers. The template parameter T is a WeakListVisitor that defines how to | 433 // pointers. The template parameter T is a WeakListVisitor that defines how to |
436 // access the next-element pointers. | 434 // access the next-element pointers. |
437 template <class T> | 435 template <class T> |
438 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); | 436 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); |
439 } // namespace internal | 437 } // namespace internal |
440 } // namespace v8 | 438 } // namespace v8 |
441 | 439 |
442 #endif // V8_OBJECTS_VISITING_H_ | 440 #endif // V8_OBJECTS_VISITING_H_ |
OLD | NEW |