| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 376 |
| 377 // Mark pointers in a Map and its TransitionArray together, possibly | 377 // Mark pointers in a Map and its TransitionArray together, possibly |
| 378 // treating transitions or back pointers weak. | 378 // treating transitions or back pointers weak. |
| 379 static void MarkMapContents(Heap* heap, Map* map); | 379 static void MarkMapContents(Heap* heap, Map* map); |
| 380 static void MarkTransitionArray(Heap* heap, TransitionArray* transitions); | 380 static void MarkTransitionArray(Heap* heap, TransitionArray* transitions); |
| 381 | 381 |
| 382 // Mark pointers in the optimized code map that should act as strong | 382 // Mark pointers in the optimized code map that should act as strong |
| 383 // references, possibly treating some entries weak. | 383 // references, possibly treating some entries weak. |
| 384 static void MarkOptimizedCodeMap(Heap* heap, FixedArray* code_map); | 384 static void MarkOptimizedCodeMap(Heap* heap, FixedArray* code_map); |
| 385 | 385 |
| 386 // Mark non-optimized code for functions inlined into the given optimized | |
| 387 // code. This will prevent it from being flushed. | |
| 388 static void MarkInlinedFunctionsCode(Heap* heap, Code* code); | |
| 389 | |
| 390 // Code flushing support. | 386 // Code flushing support. |
| 391 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function)); | 387 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function)); |
| 392 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info)); | 388 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info)); |
| 393 | 389 |
| 394 // Helpers used by code flushing support that visit pointer fields and treat | 390 // Helpers used by code flushing support that visit pointer fields and treat |
| 395 // references to code objects either strongly or weakly. | 391 // references to code objects either strongly or weakly. |
| 396 static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object); | 392 static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object); |
| 397 static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object); | 393 static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object); |
| 398 static void VisitJSFunctionStrongCode(Map* map, HeapObject* object); | 394 static void VisitJSFunctionStrongCode(Map* map, HeapObject* object); |
| 399 static void VisitJSFunctionWeakCode(Map* map, HeapObject* object); | 395 static void VisitJSFunctionWeakCode(Map* map, HeapObject* object); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // the next element. Given the head of the list, this function removes dead | 429 // the next element. Given the head of the list, this function removes dead |
| 434 // elements from the list and if requested records slots for next-element | 430 // elements from the list and if requested records slots for next-element |
| 435 // pointers. The template parameter T is a WeakListVisitor that defines how to | 431 // pointers. The template parameter T is a WeakListVisitor that defines how to |
| 436 // access the next-element pointers. | 432 // access the next-element pointers. |
| 437 template <class T> | 433 template <class T> |
| 438 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); | 434 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); |
| 439 } // namespace internal | 435 } // namespace internal |
| 440 } // namespace v8 | 436 } // namespace v8 |
| 441 | 437 |
| 442 #endif // V8_OBJECTS_VISITING_H_ | 438 #endif // V8_OBJECTS_VISITING_H_ |
| OLD | NEW |