| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // function is invoked (for each handle) with the handle and corresponding | 71 // function is invoked (for each handle) with the handle and corresponding |
| 72 // parameter as arguments. Note: cleared means set to Smi::FromInt(0). The | 72 // parameter as arguments. Note: cleared means set to Smi::FromInt(0). The |
| 73 // reason is that Smi::FromInt(0) does not change during garage collection. | 73 // reason is that Smi::FromInt(0) does not change during garage collection. |
| 74 static void MakeWeak(Object** location, | 74 static void MakeWeak(Object** location, |
| 75 void* parameter, | 75 void* parameter, |
| 76 WeakReferenceCallback callback); | 76 WeakReferenceCallback callback); |
| 77 | 77 |
| 78 // Returns the current number of weak handles. | 78 // Returns the current number of weak handles. |
| 79 static int NumberOfWeakHandles() { return number_of_weak_handles_; } | 79 static int NumberOfWeakHandles() { return number_of_weak_handles_; } |
| 80 | 80 |
| 81 static void RecordStats(HeapStats* stats); |
| 82 |
| 81 // Returns the current number of weak handles to global objects. | 83 // Returns the current number of weak handles to global objects. |
| 82 // These handles are also included in NumberOfWeakHandles(). | 84 // These handles are also included in NumberOfWeakHandles(). |
| 83 static int NumberOfGlobalObjectWeakHandles() { | 85 static int NumberOfGlobalObjectWeakHandles() { |
| 84 return number_of_global_object_weak_handles_; | 86 return number_of_global_object_weak_handles_; |
| 85 } | 87 } |
| 86 | 88 |
| 87 // Clear the weakness of a global handle. | 89 // Clear the weakness of a global handle. |
| 88 static void ClearWeakness(Object** location); | 90 static void ClearWeakness(Object** location); |
| 89 | 91 |
| 90 // Tells whether global handle is near death. | 92 // Tells whether global handle is near death. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 static Node* first_deallocated() { return first_deallocated_; } | 171 static Node* first_deallocated() { return first_deallocated_; } |
| 170 static void set_first_deallocated(Node* value) { | 172 static void set_first_deallocated(Node* value) { |
| 171 first_deallocated_ = value; | 173 first_deallocated_ = value; |
| 172 } | 174 } |
| 173 }; | 175 }; |
| 174 | 176 |
| 175 | 177 |
| 176 } } // namespace v8::internal | 178 } } // namespace v8::internal |
| 177 | 179 |
| 178 #endif // V8_GLOBAL_HANDLES_H_ | 180 #endif // V8_GLOBAL_HANDLES_H_ |
| OLD | NEW |