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

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

Issue 640303006: Weak Cells (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Skip cleared weak cells Created 6 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/objects-visiting.cc » ('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 9
10 // This file provides base classes and auxiliary methods for defining 10 // This file provides base classes and auxiliary methods for defining
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 V(Struct9) \ 64 V(Struct9) \
65 V(StructGeneric) \ 65 V(StructGeneric) \
66 V(ConsString) \ 66 V(ConsString) \
67 V(SlicedString) \ 67 V(SlicedString) \
68 V(Symbol) \ 68 V(Symbol) \
69 V(Oddball) \ 69 V(Oddball) \
70 V(Code) \ 70 V(Code) \
71 V(Map) \ 71 V(Map) \
72 V(Cell) \ 72 V(Cell) \
73 V(PropertyCell) \ 73 V(PropertyCell) \
74 V(WeakCell) \
74 V(SharedFunctionInfo) \ 75 V(SharedFunctionInfo) \
75 V(JSFunction) \ 76 V(JSFunction) \
76 V(JSWeakCollection) \ 77 V(JSWeakCollection) \
77 V(JSArrayBuffer) \ 78 V(JSArrayBuffer) \
78 V(JSTypedArray) \ 79 V(JSTypedArray) \
79 V(JSDataView) \ 80 V(JSDataView) \
80 V(JSRegExp) 81 V(JSRegExp)
81 82
82 // For data objects, JS objects and structs along with generic visitor which 83 // For data objects, JS objects and structs along with generic visitor which
83 // can visit object of any size we provide visitors specialized by 84 // can visit object of any size we provide visitors specialized by
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 template <typename StaticVisitor> 356 template <typename StaticVisitor>
356 class StaticMarkingVisitor : public StaticVisitorBase { 357 class StaticMarkingVisitor : public StaticVisitorBase {
357 public: 358 public:
358 static void Initialize(); 359 static void Initialize();
359 360
360 INLINE(static void IterateBody(Map* map, HeapObject* obj)) { 361 INLINE(static void IterateBody(Map* map, HeapObject* obj)) {
361 table_.GetVisitor(map)(map, obj); 362 table_.GetVisitor(map)(map, obj);
362 } 363 }
363 364
364 INLINE(static void VisitPropertyCell(Map* map, HeapObject* object)); 365 INLINE(static void VisitPropertyCell(Map* map, HeapObject* object));
366 INLINE(static void VisitWeakCell(Map* map, HeapObject* object));
365 INLINE(static void VisitCodeEntry(Heap* heap, Address entry_address)); 367 INLINE(static void VisitCodeEntry(Heap* heap, Address entry_address));
366 INLINE(static void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo)); 368 INLINE(static void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo));
367 INLINE(static void VisitCell(Heap* heap, RelocInfo* rinfo)); 369 INLINE(static void VisitCell(Heap* heap, RelocInfo* rinfo));
368 INLINE(static void VisitDebugTarget(Heap* heap, RelocInfo* rinfo)); 370 INLINE(static void VisitDebugTarget(Heap* heap, RelocInfo* rinfo));
369 INLINE(static void VisitCodeTarget(Heap* heap, RelocInfo* rinfo)); 371 INLINE(static void VisitCodeTarget(Heap* heap, RelocInfo* rinfo));
370 INLINE(static void VisitCodeAgeSequence(Heap* heap, RelocInfo* rinfo)); 372 INLINE(static void VisitCodeAgeSequence(Heap* heap, RelocInfo* rinfo));
371 INLINE(static void VisitExternalReference(RelocInfo* rinfo)) {} 373 INLINE(static void VisitExternalReference(RelocInfo* rinfo)) {}
372 INLINE(static void VisitRuntimeEntry(RelocInfo* rinfo)) {} 374 INLINE(static void VisitRuntimeEntry(RelocInfo* rinfo)) {}
373 // Skip the weak next code link in a code object. 375 // Skip the weak next code link in a code object.
374 INLINE(static void VisitNextCodeLink(Heap* heap, Object** slot)) {} 376 INLINE(static void VisitNextCodeLink(Heap* heap, Object** slot)) {}
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // the next element. Given the head of the list, this function removes dead 445 // the next element. Given the head of the list, this function removes dead
444 // elements from the list and if requested records slots for next-element 446 // elements from the list and if requested records slots for next-element
445 // pointers. The template parameter T is a WeakListVisitor that defines how to 447 // pointers. The template parameter T is a WeakListVisitor that defines how to
446 // access the next-element pointers. 448 // access the next-element pointers.
447 template <class T> 449 template <class T>
448 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer); 450 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer);
449 } 451 }
450 } // namespace v8::internal 452 } // namespace v8::internal
451 453
452 #endif // V8_OBJECTS_VISITING_H_ 454 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698