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