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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 INLINE(static void VisitJSRegExp(Map* map, HeapObject* object)); | 372 INLINE(static void VisitJSRegExp(Map* map, HeapObject* object)); |
373 INLINE(static void VisitJSArrayBuffer(Map* map, HeapObject* object)); | 373 INLINE(static void VisitJSArrayBuffer(Map* map, HeapObject* object)); |
374 INLINE(static void VisitNativeContext(Map* map, HeapObject* object)); | 374 INLINE(static void VisitNativeContext(Map* map, HeapObject* object)); |
375 INLINE(static void VisitBytecodeArray(Map* map, HeapObject* object)); | 375 INLINE(static void VisitBytecodeArray(Map* map, HeapObject* object)); |
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 |
| 383 // references, possibly treating some entries weak. |
| 384 static void MarkOptimizedCodeMap(Heap* heap, FixedArray* code_map); |
| 385 |
382 // Mark non-optimized code for functions inlined into the given optimized | 386 // Mark non-optimized code for functions inlined into the given optimized |
383 // code. This will prevent it from being flushed. | 387 // code. This will prevent it from being flushed. |
384 static void MarkInlinedFunctionsCode(Heap* heap, Code* code); | 388 static void MarkInlinedFunctionsCode(Heap* heap, Code* code); |
385 | 389 |
386 // Code flushing support. | 390 // Code flushing support. |
387 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function)); | 391 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function)); |
388 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info)); | 392 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info)); |
389 | 393 |
390 // 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 |
391 // 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... |
429 // 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 |
430 // 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 |
431 // 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 |
432 // access the next-element pointers. | 436 // access the next-element pointers. |
433 template <class T> | 437 template <class T> |
434 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); | 438 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); |
435 } // namespace internal | 439 } // namespace internal |
436 } // namespace v8 | 440 } // namespace v8 |
437 | 441 |
438 #endif // V8_OBJECTS_VISITING_H_ | 442 #endif // V8_OBJECTS_VISITING_H_ |
OLD | NEW |