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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // These handles are also included in NumberOfWeakHandles(). | 158 // These handles are also included in NumberOfWeakHandles(). |
159 int NumberOfGlobalObjectWeakHandles(); | 159 int NumberOfGlobalObjectWeakHandles(); |
160 | 160 |
161 // Returns the current number of handles to global objects. | 161 // Returns the current number of handles to global objects. |
162 int global_handles_count() const { | 162 int global_handles_count() const { |
163 return number_of_global_handles_; | 163 return number_of_global_handles_; |
164 } | 164 } |
165 | 165 |
166 // Collect up data for the weak handle callbacks after GC has completed, but | 166 // Collect up data for the weak handle callbacks after GC has completed, but |
167 // before memory is reclaimed. | 167 // before memory is reclaimed. |
168 void CollectPhantomCallbackData(); | 168 void CollectAllPhantomCallbackData(); |
| 169 |
| 170 // Collect up data for the weak handle callbacks referenced by young |
| 171 // generation after GC has completed, but before memory is reclaimed. |
| 172 void CollectYoungPhantomCallbackData(); |
169 | 173 |
170 // Clear the weakness of a global handle. | 174 // Clear the weakness of a global handle. |
171 static void* ClearWeakness(Object** location); | 175 static void* ClearWeakness(Object** location); |
172 | 176 |
173 // Clear the weakness of a global handle. | 177 // Clear the weakness of a global handle. |
174 static void MarkIndependent(Object** location); | 178 static void MarkIndependent(Object** location); |
175 | 179 |
176 // Mark the reference to this object externaly unreachable. | 180 // Mark the reference to this object externaly unreachable. |
177 static void MarkPartiallyDependent(Object** location); | 181 static void MarkPartiallyDependent(Object** location); |
178 | 182 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 List<int> new_space_indices_; | 430 List<int> new_space_indices_; |
427 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; | 431 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; |
428 | 432 |
429 DISALLOW_COPY_AND_ASSIGN(EternalHandles); | 433 DISALLOW_COPY_AND_ASSIGN(EternalHandles); |
430 }; | 434 }; |
431 | 435 |
432 | 436 |
433 } } // namespace v8::internal | 437 } } // namespace v8::internal |
434 | 438 |
435 #endif // V8_GLOBAL_HANDLES_H_ | 439 #endif // V8_GLOBAL_HANDLES_H_ |
OLD | NEW |