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