Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Side by Side Diff: src/heap/objects-visiting.h

Issue 1508703002: Use WeakCells in the optimized code map rather than traversing in pause. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nit. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 INLINE(static void VisitWeakCollection(Map* map, HeapObject* object)); 368 INLINE(static void VisitWeakCollection(Map* map, HeapObject* object));
369 INLINE(static void VisitJSFunction(Map* map, HeapObject* object)); 369 INLINE(static void VisitJSFunction(Map* map, HeapObject* object));
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 treating some elements of the descriptor array weak. 375 // Mark pointers in a Map treating some elements of the descriptor array weak.
376 static void MarkMapContents(Heap* heap, Map* map); 376 static void MarkMapContents(Heap* heap, Map* map);
377 377
378 // Mark pointers in the optimized code map that should act as strong
379 // references, possibly treating some entries weak.
380 static void MarkOptimizedCodeMap(Heap* heap, FixedArray* code_map);
381
382 // Code flushing support. 378 // Code flushing support.
383 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function)); 379 INLINE(static bool IsFlushable(Heap* heap, JSFunction* function));
384 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info)); 380 INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info));
385 381
386 // Helpers used by code flushing support that visit pointer fields and treat 382 // Helpers used by code flushing support that visit pointer fields and treat
387 // references to code objects either strongly or weakly. 383 // references to code objects either strongly or weakly.
388 static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object); 384 static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object);
389 static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object); 385 static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object);
390 static void VisitJSFunctionStrongCode(Map* map, HeapObject* object); 386 static void VisitJSFunctionStrongCode(Map* map, HeapObject* object);
391 static void VisitJSFunctionWeakCode(Map* map, HeapObject* object); 387 static void VisitJSFunctionWeakCode(Map* map, HeapObject* object);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 // the next element. Given the head of the list, this function removes dead 421 // the next element. Given the head of the list, this function removes dead
426 // elements from the list and if requested records slots for next-element 422 // elements from the list and if requested records slots for next-element
427 // pointers. The template parameter T is a WeakListVisitor that defines how to 423 // pointers. The template parameter T is a WeakListVisitor that defines how to
428 // access the next-element pointers. 424 // access the next-element pointers.
429 template <class T> 425 template <class T>
430 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); 426 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer);
431 } // namespace internal 427 } // namespace internal
432 } // namespace v8 428 } // namespace v8
433 429
434 #endif // V8_OBJECTS_VISITING_H_ 430 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698