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" |
11 #include "src/layout-descriptor.h" | 11 #include "src/layout-descriptor.h" |
| 12 #include "src/objects-body-descriptors.h" |
12 | 13 |
13 // This file provides base classes and auxiliary methods for defining | 14 // This file provides base classes and auxiliary methods for defining |
14 // static object visitors used during GC. | 15 // static object visitors used during GC. |
15 // Visiting HeapObject body with a normal ObjectVisitor requires performing | 16 // Visiting HeapObject body with a normal ObjectVisitor requires performing |
16 // two switches on object's instance type to determine object size and layout | 17 // two switches on object's instance type to determine object size and layout |
17 // and one or more virtual method calls on visitor itself. | 18 // and one or more virtual method calls on visitor itself. |
18 // Static visitor is different: it provides a dispatch table which contains | 19 // Static visitor is different: it provides a dispatch table which contains |
19 // pointers to specialized visit functions. Each map has the visitor_id | 20 // pointers to specialized visit functions. Each map has the visitor_id |
20 // field which contains an index of specialized visitor to use. | 21 // field which contains an index of specialized visitor to use. |
21 | 22 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 // the next element. Given the head of the list, this function removes dead | 437 // the next element. Given the head of the list, this function removes dead |
437 // elements from the list and if requested records slots for next-element | 438 // elements from the list and if requested records slots for next-element |
438 // pointers. The template parameter T is a WeakListVisitor that defines how to | 439 // pointers. The template parameter T is a WeakListVisitor that defines how to |
439 // access the next-element pointers. | 440 // access the next-element pointers. |
440 template <class T> | 441 template <class T> |
441 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); | 442 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); |
442 } // namespace internal | 443 } // namespace internal |
443 } // namespace v8 | 444 } // namespace v8 |
444 | 445 |
445 #endif // V8_OBJECTS_VISITING_H_ | 446 #endif // V8_OBJECTS_VISITING_H_ |
OLD | NEW |