| OLD | NEW |
| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void IterateNewSpaceStrongAndDependentRoots(ObjectVisitor* v); | 213 void IterateNewSpaceStrongAndDependentRoots(ObjectVisitor* v); |
| 214 | 214 |
| 215 // Finds weak independent or partially independent handles satisfying | 215 // Finds weak independent or partially independent handles satisfying |
| 216 // the callback predicate and marks them as pending. See the note above. | 216 // the callback predicate and marks them as pending. See the note above. |
| 217 void IdentifyNewSpaceWeakIndependentHandles(WeakSlotCallbackWithHeap f); | 217 void IdentifyNewSpaceWeakIndependentHandles(WeakSlotCallbackWithHeap f); |
| 218 | 218 |
| 219 // Iterates over weak independent or partially independent handles. | 219 // Iterates over weak independent or partially independent handles. |
| 220 // See the note above. | 220 // See the note above. |
| 221 void IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v); | 221 void IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v); |
| 222 | 222 |
| 223 // Iterate over all new space handles that are in weak state and visit the |
| 224 // object that do not satisfy the callback predicate. |
| 225 void IterateNewSpaceWeakRoots(ObjectVisitor* v, WeakSlotCallback can_skip); |
| 226 |
| 223 // Iterate over objects in object groups that have at least one object | 227 // Iterate over objects in object groups that have at least one object |
| 224 // which requires visiting. The callback has to return true if objects | 228 // which requires visiting. The callback has to return true if objects |
| 225 // can be skipped and false otherwise. | 229 // can be skipped and false otherwise. |
| 226 bool IterateObjectGroups(ObjectVisitor* v, WeakSlotCallbackWithHeap can_skip); | 230 bool IterateObjectGroups(ObjectVisitor* v, WeakSlotCallbackWithHeap can_skip); |
| 227 | 231 |
| 228 // Add an object group. | 232 // Add an object group. |
| 229 // Should be only used in GC callback function before a collection. | 233 // Should be only used in GC callback function before a collection. |
| 230 // All groups are destroyed after a garbage collection. | 234 // All groups are destroyed after a garbage collection. |
| 231 void AddObjectGroup(Object*** handles, | 235 void AddObjectGroup(Object*** handles, |
| 232 size_t length, | 236 size_t length, |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 List<int> new_space_indices_; | 438 List<int> new_space_indices_; |
| 435 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; | 439 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; |
| 436 | 440 |
| 437 DISALLOW_COPY_AND_ASSIGN(EternalHandles); | 441 DISALLOW_COPY_AND_ASSIGN(EternalHandles); |
| 438 }; | 442 }; |
| 439 | 443 |
| 440 | 444 |
| 441 } } // namespace v8::internal | 445 } } // namespace v8::internal |
| 442 | 446 |
| 443 #endif // V8_GLOBAL_HANDLES_H_ | 447 #endif // V8_GLOBAL_HANDLES_H_ |
| OLD | NEW |