| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // function is invoked (for each handle) with the handle and corresponding | 70 // function is invoked (for each handle) with the handle and corresponding |
| 71 // parameter as arguments. Note: cleared means set to Smi::FromInt(0). The | 71 // parameter as arguments. Note: cleared means set to Smi::FromInt(0). The |
| 72 // reason is that Smi::FromInt(0) does not change during garage collection. | 72 // reason is that Smi::FromInt(0) does not change during garage collection. |
| 73 static void MakeWeak(Object** location, | 73 static void MakeWeak(Object** location, |
| 74 void* parameter, | 74 void* parameter, |
| 75 WeakReferenceCallback callback); | 75 WeakReferenceCallback callback); |
| 76 | 76 |
| 77 // Returns the current number of weak handles. | 77 // Returns the current number of weak handles. |
| 78 static int NumberOfWeakHandles() { return number_of_weak_handles_; } | 78 static int NumberOfWeakHandles() { return number_of_weak_handles_; } |
| 79 | 79 |
| 80 static void RecordStats(HeapStats* stats); |
| 81 |
| 80 // Returns the current number of weak handles to global objects. | 82 // Returns the current number of weak handles to global objects. |
| 81 // These handles are also included in NumberOfWeakHandles(). | 83 // These handles are also included in NumberOfWeakHandles(). |
| 82 static int NumberOfGlobalObjectWeakHandles() { | 84 static int NumberOfGlobalObjectWeakHandles() { |
| 83 return number_of_global_object_weak_handles_; | 85 return number_of_global_object_weak_handles_; |
| 84 } | 86 } |
| 85 | 87 |
| 86 // Clear the weakness of a global handle. | 88 // Clear the weakness of a global handle. |
| 87 static void ClearWeakness(Object** location); | 89 static void ClearWeakness(Object** location); |
| 88 | 90 |
| 89 // Tells whether global handle is near death. | 91 // Tells whether global handle is near death. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 static Node* first_deallocated() { return first_deallocated_; } | 167 static Node* first_deallocated() { return first_deallocated_; } |
| 166 static void set_first_deallocated(Node* value) { | 168 static void set_first_deallocated(Node* value) { |
| 167 first_deallocated_ = value; | 169 first_deallocated_ = value; |
| 168 } | 170 } |
| 169 }; | 171 }; |
| 170 | 172 |
| 171 | 173 |
| 172 } } // namespace v8::internal | 174 } } // namespace v8::internal |
| 173 | 175 |
| 174 #endif // V8_GLOBAL_HANDLES_H_ | 176 #endif // V8_GLOBAL_HANDLES_H_ |
| OLD | NEW |