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

Side by Side Diff: src/global-handles.h

Issue 390823003: v8: make GCTracer persistent. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/global-handles.cc » ('j') | src/heap.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_GLOBAL_HANDLES_H_ 5 #ifndef V8_GLOBAL_HANDLES_H_
6 #define V8_GLOBAL_HANDLES_H_ 6 #define V8_GLOBAL_HANDLES_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "include/v8-profiler.h" 9 #include "include/v8-profiler.h"
10 10
11 #include "src/handles.h" 11 #include "src/handles.h"
12 #include "src/list.h" 12 #include "src/list.h"
13 #include "src/utils.h" 13 #include "src/utils.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 class GCTracer;
19 class HeapStats; 18 class HeapStats;
20 class ObjectVisitor; 19 class ObjectVisitor;
21 20
22 // Structure for tracking global handles. 21 // Structure for tracking global handles.
23 // A single list keeps all the allocated global handles. 22 // A single list keeps all the allocated global handles.
24 // Destroyed handles stay in the list but is added to the free list. 23 // Destroyed handles stay in the list but is added to the free list.
25 // At GC the destroyed global handles are removed from the free list 24 // At GC the destroyed global handles are removed from the free list
26 // and deallocated. 25 // and deallocated.
27 26
28 // Data structures for tracking object groups and implicit references. 27 // Data structures for tracking object groups and implicit references.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 static bool IsIndependent(Object** location); 148 static bool IsIndependent(Object** location);
150 149
151 // Tells whether global handle is near death. 150 // Tells whether global handle is near death.
152 static bool IsNearDeath(Object** location); 151 static bool IsNearDeath(Object** location);
153 152
154 // Tells whether global handle is weak. 153 // Tells whether global handle is weak.
155 static bool IsWeak(Object** location); 154 static bool IsWeak(Object** location);
156 155
157 // Process pending weak handles. 156 // Process pending weak handles.
158 // Returns the number of freed nodes. 157 // Returns the number of freed nodes.
159 int PostGarbageCollectionProcessing(GarbageCollector collector, 158 int PostGarbageCollectionProcessing(GarbageCollector collector);
160 GCTracer* tracer);
161 159
162 // Iterates over all strong handles. 160 // Iterates over all strong handles.
163 void IterateStrongRoots(ObjectVisitor* v); 161 void IterateStrongRoots(ObjectVisitor* v);
164 162
165 // Iterates over all handles. 163 // Iterates over all handles.
166 void IterateAllRoots(ObjectVisitor* v); 164 void IterateAllRoots(ObjectVisitor* v);
167 165
168 // Iterates over all handles that have embedder-assigned class ID. 166 // Iterates over all handles that have embedder-assigned class ID.
169 void IterateAllRootsWithClassIds(ObjectVisitor* v); 167 void IterateAllRootsWithClassIds(ObjectVisitor* v);
170 168
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 List<int> new_space_indices_; 376 List<int> new_space_indices_;
379 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; 377 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES];
380 378
381 DISALLOW_COPY_AND_ASSIGN(EternalHandles); 379 DISALLOW_COPY_AND_ASSIGN(EternalHandles);
382 }; 380 };
383 381
384 382
385 } } // namespace v8::internal 383 } } // namespace v8::internal
386 384
387 #endif // V8_GLOBAL_HANDLES_H_ 385 #endif // V8_GLOBAL_HANDLES_H_
OLDNEW
« no previous file with comments | « no previous file | src/global-handles.cc » ('j') | src/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698