| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_VISITING_INL_H_ | 5 #ifndef V8_OBJECTS_VISITING_INL_H_ |
| 6 #define V8_OBJECTS_VISITING_INL_H_ | 6 #define V8_OBJECTS_VISITING_INL_H_ |
| 7 | 7 |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 map->GetHeap(), | 578 map->GetHeap(), |
| 579 HeapObject::RawField(object, JSDataView::kWeakNextOffset + kPointerSize), | 579 HeapObject::RawField(object, JSDataView::kWeakNextOffset + kPointerSize), |
| 580 HeapObject::RawField(object, JSDataView::kSizeWithInternalFields)); | 580 HeapObject::RawField(object, JSDataView::kSizeWithInternalFields)); |
| 581 } | 581 } |
| 582 | 582 |
| 583 | 583 |
| 584 template <typename StaticVisitor> | 584 template <typename StaticVisitor> |
| 585 void StaticMarkingVisitor<StaticVisitor>::MarkMapContents(Heap* heap, | 585 void StaticMarkingVisitor<StaticVisitor>::MarkMapContents(Heap* heap, |
| 586 Map* map) { | 586 Map* map) { |
| 587 Object* raw_transitions = map->raw_transitions(); | 587 Object* raw_transitions = map->raw_transitions(); |
| 588 if (TransitionArray::IsSimpleTransition(raw_transitions)) { | |
| 589 StaticVisitor::VisitPointer( | |
| 590 heap, HeapObject::RawField(map, Map::kTransitionsOffset)); | |
| 591 } | |
| 592 if (TransitionArray::IsFullTransitionArray(raw_transitions)) { | 588 if (TransitionArray::IsFullTransitionArray(raw_transitions)) { |
| 593 MarkTransitionArray(heap, TransitionArray::cast(raw_transitions)); | 589 MarkTransitionArray(heap, TransitionArray::cast(raw_transitions)); |
| 594 } | 590 } |
| 595 | 591 |
| 596 // Since descriptor arrays are potentially shared, ensure that only the | 592 // Since descriptor arrays are potentially shared, ensure that only the |
| 597 // descriptors that belong to this map are marked. The first time a | 593 // descriptors that belong to this map are marked. The first time a |
| 598 // non-empty descriptor array is marked, its header is also visited. The slot | 594 // non-empty descriptor array is marked, its header is also visited. The slot |
| 599 // holding the descriptor array will be implicitly recorded when the pointer | 595 // holding the descriptor array will be implicitly recorded when the pointer |
| 600 // fields of this map are visited. | 596 // fields of this map are visited. |
| 601 DescriptorArray* descriptors = map->instance_descriptors(); | 597 DescriptorArray* descriptors = map->instance_descriptors(); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 | 894 |
| 899 RelocIterator it(this, mode_mask); | 895 RelocIterator it(this, mode_mask); |
| 900 for (; !it.done(); it.next()) { | 896 for (; !it.done(); it.next()) { |
| 901 it.rinfo()->template Visit<StaticVisitor>(heap); | 897 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 902 } | 898 } |
| 903 } | 899 } |
| 904 } | 900 } |
| 905 } // namespace v8::internal | 901 } // namespace v8::internal |
| 906 | 902 |
| 907 #endif // V8_OBJECTS_VISITING_INL_H_ | 903 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |