OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 template<typename StaticVisitor> | 324 template<typename StaticVisitor> |
325 void StaticMarkingVisitor<StaticVisitor>::MarkTransitionArray( | 325 void StaticMarkingVisitor<StaticVisitor>::MarkTransitionArray( |
326 Heap* heap, TransitionArray* transitions) { | 326 Heap* heap, TransitionArray* transitions) { |
327 if (!StaticVisitor::MarkObjectWithoutPush(heap, transitions)) return; | 327 if (!StaticVisitor::MarkObjectWithoutPush(heap, transitions)) return; |
328 | 328 |
329 // Skip recording the descriptors_pointer slot since the cell space | 329 // Skip recording the descriptors_pointer slot since the cell space |
330 // is not compacted and descriptors are referenced through a cell. | 330 // is not compacted and descriptors are referenced through a cell. |
331 StaticVisitor::MarkObject(heap, transitions->descriptors_pointer()); | 331 StaticVisitor::MarkObject(heap, transitions->descriptors_pointer()); |
332 | 332 |
| 333 // Simple transitions do not have keys nor prototype transitions. |
| 334 if (transitions->IsSimpleTransition()) return; |
| 335 |
333 if (transitions->HasPrototypeTransitions()) { | 336 if (transitions->HasPrototypeTransitions()) { |
334 // Mark prototype transitions array but do not push it onto marking | 337 // Mark prototype transitions array but do not push it onto marking |
335 // stack, this will make references from it weak. We will clean dead | 338 // stack, this will make references from it weak. We will clean dead |
336 // prototype transitions in ClearNonLiveTransitions. | 339 // prototype transitions in ClearNonLiveTransitions. |
337 Object** slot = transitions->GetPrototypeTransitionsSlot(); | 340 Object** slot = transitions->GetPrototypeTransitionsSlot(); |
338 HeapObject* obj = HeapObject::cast(*slot); | 341 HeapObject* obj = HeapObject::cast(*slot); |
339 heap->mark_compact_collector()->RecordSlot(slot, slot, obj); | 342 heap->mark_compact_collector()->RecordSlot(slot, slot, obj); |
340 StaticVisitor::MarkObjectWithoutPush(heap, obj); | 343 StaticVisitor::MarkObjectWithoutPush(heap, obj); |
341 } | 344 } |
342 | 345 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 RelocIterator it(this, mode_mask); | 400 RelocIterator it(this, mode_mask); |
398 for (; !it.done(); it.next()) { | 401 for (; !it.done(); it.next()) { |
399 it.rinfo()->template Visit<StaticVisitor>(heap); | 402 it.rinfo()->template Visit<StaticVisitor>(heap); |
400 } | 403 } |
401 } | 404 } |
402 | 405 |
403 | 406 |
404 } } // namespace v8::internal | 407 } } // namespace v8::internal |
405 | 408 |
406 #endif // V8_OBJECTS_VISITING_INL_H_ | 409 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |