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

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

Issue 1358703003: Changed scavenge GC to collect unmodified references (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Checks if the object is not active inaddition to unmodified before reclaiming it. The browser test … Created 5 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
« no previous file with comments | « src/flag-definitions.h ('k') | src/global-handles.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 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
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Iterates over all handles. 190 // Iterates over all handles.
191 void IterateAllRoots(ObjectVisitor* v); 191 void IterateAllRoots(ObjectVisitor* v);
192 192
193 // Iterates over all handles that have embedder-assigned class ID. 193 // Iterates over all handles that have embedder-assigned class ID.
194 void IterateAllRootsWithClassIds(ObjectVisitor* v); 194 void IterateAllRootsWithClassIds(ObjectVisitor* v);
195 195
196 // Iterates over all handles in the new space that have embedder-assigned 196 // Iterates over all handles in the new space that have embedder-assigned
197 // class ID. 197 // class ID.
198 void IterateAllRootsInNewSpaceWithClassIds(ObjectVisitor* v); 198 void IterateAllRootsInNewSpaceWithClassIds(ObjectVisitor* v);
199 199
200 // Iterate over all handles in the new space that are weak, unmodified
201 // and have class IDs
202 void IterateWeakRootsInNewSpaceWithClassIds(ObjectVisitor* v);
203
200 // Iterates over all weak roots in heap. 204 // Iterates over all weak roots in heap.
201 void IterateWeakRoots(ObjectVisitor* v); 205 void IterateWeakRoots(ObjectVisitor* v);
202 206
203 // Find all weak handles satisfying the callback predicate, mark 207 // Find all weak handles satisfying the callback predicate, mark
204 // them as pending. 208 // them as pending.
205 void IdentifyWeakHandles(WeakSlotCallback f); 209 void IdentifyWeakHandles(WeakSlotCallback f);
206 210
207 // NOTE: Three ...NewSpace... functions below are used during 211 // NOTE: Five ...NewSpace... functions below are used during
208 // scavenge collections and iterate over sets of handles that are 212 // scavenge collections and iterate over sets of handles that are
209 // guaranteed to contain all handles holding new space objects (but 213 // guaranteed to contain all handles holding new space objects (but
210 // may also include old space objects). 214 // may also include old space objects).
211 215
212 // Iterates over strong and dependent handles. See the node above. 216 // Iterates over strong and dependent handles. See the node above.
213 void IterateNewSpaceStrongAndDependentRoots(ObjectVisitor* v); 217 void IterateNewSpaceStrongAndDependentRoots(ObjectVisitor* v);
214 218
215 // Finds weak independent or partially independent handles satisfying 219 // Finds weak independent or partially independent handles satisfying
216 // the callback predicate and marks them as pending. See the note above. 220 // the callback predicate and marks them as pending. See the note above.
217 void IdentifyNewSpaceWeakIndependentHandles(WeakSlotCallbackWithHeap f); 221 void IdentifyNewSpaceWeakIndependentHandles(WeakSlotCallbackWithHeap f);
218 222
219 // Iterates over weak independent or partially independent handles. 223 // Iterates over weak independent or partially independent handles.
220 // See the note above. 224 // See the note above.
221 void IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v); 225 void IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v);
222 226
227 // Finds weak independent or unmodified handles satisfying
228 // the callback predicate and marks them as pending. See the note above.
229 void MarkNewSpaceWeakUnmodifiedObjectsPending(
230 WeakSlotCallbackWithHeap is_unscavenged);
231
232 // Iterates over weak independent or unmodified handles.
233 // See the note above.
234 void IterateNewSpaceWeakUnmodifiedRoots(ObjectVisitor* v);
235
236 // Identify unmodified objects that are in weak state and marks them
237 // unmodified
238 void IdentifyWeakUnmodifiedObjects(WeakSlotCallback is_unmodified);
239
223 // Iterate over objects in object groups that have at least one object 240 // Iterate over objects in object groups that have at least one object
224 // which requires visiting. The callback has to return true if objects 241 // which requires visiting. The callback has to return true if objects
225 // can be skipped and false otherwise. 242 // can be skipped and false otherwise.
226 bool IterateObjectGroups(ObjectVisitor* v, WeakSlotCallbackWithHeap can_skip); 243 bool IterateObjectGroups(ObjectVisitor* v, WeakSlotCallbackWithHeap can_skip);
227 244
228 // Add an object group. 245 // Add an object group.
229 // Should be only used in GC callback function before a collection. 246 // Should be only used in GC callback function before a collection.
230 // All groups are destroyed after a garbage collection. 247 // All groups are destroyed after a garbage collection.
231 void AddObjectGroup(Object*** handles, 248 void AddObjectGroup(Object*** handles,
232 size_t length, 249 size_t length,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; 452 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES];
436 453
437 DISALLOW_COPY_AND_ASSIGN(EternalHandles); 454 DISALLOW_COPY_AND_ASSIGN(EternalHandles);
438 }; 455 };
439 456
440 457
441 } // namespace internal 458 } // namespace internal
442 } // namespace v8 459 } // namespace v8
443 460
444 #endif // V8_GLOBAL_HANDLES_H_ 461 #endif // V8_GLOBAL_HANDLES_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698