| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 return SeqOneByteString::cast(object) | 333 return SeqOneByteString::cast(object) |
| 334 ->SeqOneByteStringSize(map->instance_type()); | 334 ->SeqOneByteStringSize(map->instance_type()); |
| 335 } | 335 } |
| 336 | 336 |
| 337 INLINE(static int VisitSeqTwoByteString(Map* map, HeapObject* object)) { | 337 INLINE(static int VisitSeqTwoByteString(Map* map, HeapObject* object)) { |
| 338 return SeqTwoByteString::cast(object) | 338 return SeqTwoByteString::cast(object) |
| 339 ->SeqTwoByteStringSize(map->instance_type()); | 339 ->SeqTwoByteStringSize(map->instance_type()); |
| 340 } | 340 } |
| 341 | 341 |
| 342 INLINE(static int VisitFreeSpace(Map* map, HeapObject* object)) { | 342 INLINE(static int VisitFreeSpace(Map* map, HeapObject* object)) { |
| 343 return FreeSpace::cast(object)->Size(); | 343 return FreeSpace::cast(object)->size(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 INLINE(static int VisitJSArrayBuffer(Map* map, HeapObject* object)); | 346 INLINE(static int VisitJSArrayBuffer(Map* map, HeapObject* object)); |
| 347 INLINE(static int VisitJSTypedArray(Map* map, HeapObject* object)); | 347 INLINE(static int VisitJSTypedArray(Map* map, HeapObject* object)); |
| 348 INLINE(static int VisitJSDataView(Map* map, HeapObject* object)); | 348 INLINE(static int VisitJSDataView(Map* map, HeapObject* object)); |
| 349 INLINE(static int VisitBytecodeArray(Map* map, HeapObject* object)); | 349 INLINE(static int VisitBytecodeArray(Map* map, HeapObject* object)); |
| 350 | 350 |
| 351 class DataObjectVisitor { | 351 class DataObjectVisitor { |
| 352 public: | 352 public: |
| 353 template <int object_size> | 353 template <int object_size> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 // the next element. Given the head of the list, this function removes dead | 488 // the next element. Given the head of the list, this function removes dead |
| 489 // elements from the list and if requested records slots for next-element | 489 // elements from the list and if requested records slots for next-element |
| 490 // pointers. The template parameter T is a WeakListVisitor that defines how to | 490 // pointers. The template parameter T is a WeakListVisitor that defines how to |
| 491 // access the next-element pointers. | 491 // access the next-element pointers. |
| 492 template <class T> | 492 template <class T> |
| 493 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); | 493 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); |
| 494 } // namespace internal | 494 } // namespace internal |
| 495 } // namespace v8 | 495 } // namespace v8 |
| 496 | 496 |
| 497 #endif // V8_OBJECTS_VISITING_H_ | 497 #endif // V8_OBJECTS_VISITING_H_ |
| OLD | NEW |