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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 INLINE(static void VisitJSRegExp(Map* map, HeapObject* object)); | 370 INLINE(static void VisitJSRegExp(Map* map, HeapObject* object)); |
371 INLINE(static void VisitJSArrayBuffer(Map* map, HeapObject* object)); | 371 INLINE(static void VisitJSArrayBuffer(Map* map, HeapObject* object)); |
372 INLINE(static void VisitNativeContext(Map* map, HeapObject* object)); | 372 INLINE(static void VisitNativeContext(Map* map, HeapObject* object)); |
373 INLINE(static void VisitBytecodeArray(Map* map, HeapObject* object)); | 373 INLINE(static void VisitBytecodeArray(Map* map, HeapObject* object)); |
374 | 374 |
375 // Mark pointers in a Map and its TransitionArray together, possibly | 375 // Mark pointers in a Map and its TransitionArray together, possibly |
376 // treating transitions or back pointers weak. | 376 // treating transitions or back pointers weak. |
377 static void MarkMapContents(Heap* heap, Map* map); | 377 static void MarkMapContents(Heap* heap, Map* map); |
378 static void MarkTransitionArray(Heap* heap, TransitionArray* transitions); | 378 static void MarkTransitionArray(Heap* heap, TransitionArray* transitions); |
379 | 379 |
380 // Mark pointers in the optimized code map that should act as strong | |
381 // references, possibly treating some entries weak. | |
382 static void MarkOptimizedCodeMap(Heap* heap, FixedArray* code_map); | |
383 | |
384 // Code flushing support. | 380 // Code flushing support. |
385 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function)); | 381 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function)); |
386 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info)); | 382 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info)); |
387 | 383 |
388 // Helpers used by code flushing support that visit pointer fields and treat | 384 // Helpers used by code flushing support that visit pointer fields and treat |
389 // references to code objects either strongly or weakly. | 385 // references to code objects either strongly or weakly. |
390 static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object); | 386 static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object); |
391 static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object); | 387 static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object); |
392 static void VisitJSFunctionStrongCode(Map* map, HeapObject* object); | 388 static void VisitJSFunctionStrongCode(Map* map, HeapObject* object); |
393 static void VisitJSFunctionWeakCode(Map* map, HeapObject* object); | 389 static void VisitJSFunctionWeakCode(Map* map, HeapObject* object); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 // the next element. Given the head of the list, this function removes dead | 423 // the next element. Given the head of the list, this function removes dead |
428 // elements from the list and if requested records slots for next-element | 424 // elements from the list and if requested records slots for next-element |
429 // pointers. The template parameter T is a WeakListVisitor that defines how to | 425 // pointers. The template parameter T is a WeakListVisitor that defines how to |
430 // access the next-element pointers. | 426 // access the next-element pointers. |
431 template <class T> | 427 template <class T> |
432 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); | 428 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); |
433 } // namespace internal | 429 } // namespace internal |
434 } // namespace v8 | 430 } // namespace v8 |
435 | 431 |
436 #endif // V8_OBJECTS_VISITING_H_ | 432 #endif // V8_OBJECTS_VISITING_H_ |
OLD | NEW |