OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 int start, | 107 int start, |
108 int count, | 108 int count, |
109 Handle<JSObject> filter_obj); | 109 Handle<JSObject> filter_obj); |
110 | 110 |
111 static Object* GetPath(int obj_id1, | 111 static Object* GetPath(int obj_id1, |
112 int obj_id2, | 112 int obj_id2, |
113 Handle<JSObject> instance_filter); | 113 Handle<JSObject> instance_filter); |
114 static Object* PrintObj(int obj_id); | 114 static Object* PrintObj(int obj_id); |
115 | 115 |
116 private: | 116 private: |
117 | |
118 struct Element { | 117 struct Element { |
119 int id_; | 118 int id_; |
120 HeapObject* obj_; | 119 HeapObject* obj_; |
121 }; | 120 }; |
122 | 121 |
123 explicit LiveObjectList(LiveObjectList* prev, int capacity); | 122 explicit LiveObjectList(LiveObjectList* prev, int capacity); |
124 ~LiveObjectList(); | 123 ~LiveObjectList(); |
125 | 124 |
126 static void GCEpiloguePrivate(); | 125 static void GCEpiloguePrivate(); |
127 static void IterateElementsPrivate(ObjectVisitor* v); | 126 static void IterateElementsPrivate(ObjectVisitor* v); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 friend class LolDumpWriter; | 216 friend class LolDumpWriter; |
218 friend class RetainersDumpWriter; | 217 friend class RetainersDumpWriter; |
219 friend class RetainersSummaryWriter; | 218 friend class RetainersSummaryWriter; |
220 friend class UpdateLiveObjectListVisitor; | 219 friend class UpdateLiveObjectListVisitor; |
221 }; | 220 }; |
222 | 221 |
223 | 222 |
224 // Helper class for updating the LiveObjectList HeapObject pointers. | 223 // Helper class for updating the LiveObjectList HeapObject pointers. |
225 class UpdateLiveObjectListVisitor: public ObjectVisitor { | 224 class UpdateLiveObjectListVisitor: public ObjectVisitor { |
226 public: | 225 public: |
227 | |
228 void VisitPointer(Object** p) { UpdatePointer(p); } | 226 void VisitPointer(Object** p) { UpdatePointer(p); } |
229 | 227 |
230 void VisitPointers(Object** start, Object** end) { | 228 void VisitPointers(Object** start, Object** end) { |
231 // Copy all HeapObject pointers in [start, end). | 229 // Copy all HeapObject pointers in [start, end). |
232 for (Object** p = start; p < end; p++) UpdatePointer(p); | 230 for (Object** p = start; p < end; p++) UpdatePointer(p); |
233 } | 231 } |
234 | 232 |
235 private: | 233 private: |
236 // Based on Heap::ScavengeObject() but only does forwarding of pointers | 234 // Based on Heap::ScavengeObject() but only does forwarding of pointers |
237 // to live new space objects, and not actually keep them alive. | 235 // to live new space objects, and not actually keep them alive. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 } | 310 } |
313 inline static Object* PrintObj(int obj_id) { return HEAP->undefined_value(); } | 311 inline static Object* PrintObj(int obj_id) { return HEAP->undefined_value(); } |
314 }; | 312 }; |
315 | 313 |
316 | 314 |
317 #endif // LIVE_OBJECT_LIST | 315 #endif // LIVE_OBJECT_LIST |
318 | 316 |
319 } } // namespace v8::internal | 317 } } // namespace v8::internal |
320 | 318 |
321 #endif // V8_LIVEOBJECTLIST_H_ | 319 #endif // V8_LIVEOBJECTLIST_H_ |
322 | |
OLD | NEW |