| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Associates handle with the object group represented by id. | 208 // Associates handle with the object group represented by id. |
| 209 // Should be only used in GC callback function before a collection. | 209 // Should be only used in GC callback function before a collection. |
| 210 // All groups are destroyed after a garbage collection. | 210 // All groups are destroyed after a garbage collection. |
| 211 void SetObjectGroupId(Object** handle, UniqueId id); | 211 void SetObjectGroupId(Object** handle, UniqueId id); |
| 212 | 212 |
| 213 // Set RetainedObjectInfo for an object group. Should not be called more than | 213 // Set RetainedObjectInfo for an object group. Should not be called more than |
| 214 // once for a group. Should not be called for a group which contains no | 214 // once for a group. Should not be called for a group which contains no |
| 215 // handles. | 215 // handles. |
| 216 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); | 216 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); |
| 217 | 217 |
| 218 // Add an implicit references' group. | |
| 219 // Should be only used in GC callback function before a collection. | |
| 220 // All groups are destroyed after a mark-compact collection. | |
| 221 void AddImplicitReferences(HeapObject** parent, | |
| 222 Object*** children, | |
| 223 size_t length); | |
| 224 | |
| 225 // Adds an implicit reference from a group to an object. Should be only used | 218 // Adds an implicit reference from a group to an object. Should be only used |
| 226 // in GC callback function before a collection. All implicit references are | 219 // in GC callback function before a collection. All implicit references are |
| 227 // destroyed after a mark-compact collection. | 220 // destroyed after a mark-compact collection. |
| 228 void SetReferenceFromGroup(UniqueId id, Object** child); | 221 void SetReferenceFromGroup(UniqueId id, Object** child); |
| 229 | 222 |
| 230 // Adds an implicit reference from a parent object to a child object. Should | 223 // Adds an implicit reference from a parent object to a child object. Should |
| 231 // be only used in GC callback function before a collection. All implicit | 224 // be only used in GC callback function before a collection. All implicit |
| 232 // references are destroyed after a mark-compact collection. | 225 // references are destroyed after a mark-compact collection. |
| 233 void SetReference(HeapObject** parent, Object** child); | 226 void SetReference(HeapObject** parent, Object** child); |
| 234 | 227 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 List<int> new_space_indices_; | 369 List<int> new_space_indices_; |
| 377 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; | 370 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; |
| 378 | 371 |
| 379 DISALLOW_COPY_AND_ASSIGN(EternalHandles); | 372 DISALLOW_COPY_AND_ASSIGN(EternalHandles); |
| 380 }; | 373 }; |
| 381 | 374 |
| 382 | 375 |
| 383 } } // namespace v8::internal | 376 } } // namespace v8::internal |
| 384 | 377 |
| 385 #endif // V8_GLOBAL_HANDLES_H_ | 378 #endif // V8_GLOBAL_HANDLES_H_ |
| OLD | NEW |