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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Process pending weak handles. | 92 // Process pending weak handles. |
93 static void PostGarbageCollectionProcessing(); | 93 static void PostGarbageCollectionProcessing(); |
94 | 94 |
95 // Iterates over all handles. | 95 // Iterates over all handles. |
96 static void IterateRoots(ObjectVisitor* v); | 96 static void IterateRoots(ObjectVisitor* v); |
97 | 97 |
98 // Iterates over all weak roots in heap. | 98 // Iterates over all weak roots in heap. |
99 static void IterateWeakRoots(ObjectVisitor* v); | 99 static void IterateWeakRoots(ObjectVisitor* v); |
100 | 100 |
101 // Mark the weak pointers based on the callback. | 101 // Find all weak handles satisfying the callback predicate, mark |
102 static void MarkWeakRoots(WeakSlotCallback f); | 102 // them as pending. |
| 103 static void IdentifyWeakHandles(WeakSlotCallback f); |
103 | 104 |
104 // Add an object group. | 105 // Add an object group. |
105 // Should only used in GC callback function before a collection. | 106 // Should only used in GC callback function before a collection. |
106 // All groups are destroyed after a mark-compact collection. | 107 // All groups are destroyed after a mark-compact collection. |
107 static void AddGroup(Object*** handles, size_t length); | 108 static void AddGroup(Object*** handles, size_t length); |
108 | 109 |
109 // Returns the object groups. | 110 // Returns the object groups. |
110 static List<ObjectGroup*>* ObjectGroups(); | 111 static List<ObjectGroup*>* ObjectGroups(); |
111 | 112 |
112 // Remove bags, this should only happen after GC. | 113 // Remove bags, this should only happen after GC. |
(...skipping 26 matching lines...) Expand all Loading... |
139 // Free list for DESTROYED global handles not yet deallocated. | 140 // Free list for DESTROYED global handles not yet deallocated. |
140 static Node* first_free_; | 141 static Node* first_free_; |
141 static Node* first_free() { return first_free_; } | 142 static Node* first_free() { return first_free_; } |
142 static void set_first_free(Node* value) { first_free_ = value; } | 143 static void set_first_free(Node* value) { first_free_ = value; } |
143 }; | 144 }; |
144 | 145 |
145 | 146 |
146 } } // namespace v8::internal | 147 } } // namespace v8::internal |
147 | 148 |
148 #endif // V8_GLOBAL_HANDLES_H_ | 149 #endif // V8_GLOBAL_HANDLES_H_ |
OLD | NEW |