OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Before: The heap has been prepared for garbage collection by | 168 // Before: The heap has been prepared for garbage collection by |
169 // MarkCompactCollector::Prepare() and is otherwise in its | 169 // MarkCompactCollector::Prepare() and is otherwise in its |
170 // normal state. | 170 // normal state. |
171 // | 171 // |
172 // After: Live objects are marked and non-live objects are unmarked. | 172 // After: Live objects are marked and non-live objects are unmarked. |
173 | 173 |
174 | 174 |
175 friend class RootMarkingVisitor; | 175 friend class RootMarkingVisitor; |
176 friend class MarkingVisitor; | 176 friend class MarkingVisitor; |
177 friend class StaticMarkingVisitor; | 177 friend class StaticMarkingVisitor; |
| 178 friend class CodeMarkingVisitor; |
| 179 friend class SharedFunctionInfoMarkingVisitor; |
| 180 |
| 181 static void PrepareForCodeFlushing(); |
178 | 182 |
179 // Marking operations for objects reachable from roots. | 183 // Marking operations for objects reachable from roots. |
180 static void MarkLiveObjects(); | 184 static void MarkLiveObjects(); |
181 | 185 |
182 static void MarkUnmarkedObject(HeapObject* obj); | 186 static void MarkUnmarkedObject(HeapObject* obj); |
183 | 187 |
184 static inline void MarkObject(HeapObject* obj) { | 188 static inline void MarkObject(HeapObject* obj) { |
185 if (!obj->IsMarked()) MarkUnmarkedObject(obj); | 189 if (!obj->IsMarked()) MarkUnmarkedObject(obj); |
186 } | 190 } |
187 | 191 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 450 |
447 friend class UnmarkObjectVisitor; | 451 friend class UnmarkObjectVisitor; |
448 static void UnmarkObject(HeapObject* obj); | 452 static void UnmarkObject(HeapObject* obj); |
449 #endif | 453 #endif |
450 }; | 454 }; |
451 | 455 |
452 | 456 |
453 } } // namespace v8::internal | 457 } } // namespace v8::internal |
454 | 458 |
455 #endif // V8_MARK_COMPACT_H_ | 459 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |