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