| 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 #include "src/heap/array-buffer-tracker.h" | 8 #include "src/heap/array-buffer-tracker.h" |
| 9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
| 10 #include "src/ic/ic-state.h" | 10 #include "src/ic/ic-state.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 return JSArrayBufferBodyVisitor::Visit(map, object); | 108 return JSArrayBufferBodyVisitor::Visit(map, object); |
| 109 } | 109 } |
| 110 | 110 |
| 111 | 111 |
| 112 template <typename StaticVisitor> | 112 template <typename StaticVisitor> |
| 113 int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray( | 113 int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray( |
| 114 Map* map, HeapObject* object) { | 114 Map* map, HeapObject* object) { |
| 115 VisitPointers( | 115 VisitPointers( |
| 116 map->GetHeap(), object, | 116 map->GetHeap(), object, |
| 117 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), | 117 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), |
| 118 HeapObject::RawField(object, BytecodeArray::kHeaderSize)); | 118 HeapObject::RawField(object, BytecodeArray::kFrameSizeOffset)); |
| 119 return reinterpret_cast<BytecodeArray*>(object)->BytecodeArraySize(); | 119 return reinterpret_cast<BytecodeArray*>(object)->BytecodeArraySize(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 | 122 |
| 123 template <typename StaticVisitor> | 123 template <typename StaticVisitor> |
| 124 void StaticMarkingVisitor<StaticVisitor>::Initialize() { | 124 void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
| 125 table_.Register(kVisitShortcutCandidate, | 125 table_.Register(kVisitShortcutCandidate, |
| 126 &FixedBodyVisitor<StaticVisitor, ConsString::BodyDescriptor, | 126 &FixedBodyVisitor<StaticVisitor, ConsString::BodyDescriptor, |
| 127 void>::Visit); | 127 void>::Visit); |
| 128 | 128 |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 524 } |
| 525 } | 525 } |
| 526 | 526 |
| 527 | 527 |
| 528 template <typename StaticVisitor> | 528 template <typename StaticVisitor> |
| 529 void StaticMarkingVisitor<StaticVisitor>::VisitBytecodeArray( | 529 void StaticMarkingVisitor<StaticVisitor>::VisitBytecodeArray( |
| 530 Map* map, HeapObject* object) { | 530 Map* map, HeapObject* object) { |
| 531 StaticVisitor::VisitPointers( | 531 StaticVisitor::VisitPointers( |
| 532 map->GetHeap(), object, | 532 map->GetHeap(), object, |
| 533 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), | 533 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), |
| 534 HeapObject::RawField(object, BytecodeArray::kHeaderSize)); | 534 HeapObject::RawField(object, BytecodeArray::kFrameSizeOffset)); |
| 535 } | 535 } |
| 536 | 536 |
| 537 | 537 |
| 538 template <typename StaticVisitor> | 538 template <typename StaticVisitor> |
| 539 void StaticMarkingVisitor<StaticVisitor>::MarkMapContents(Heap* heap, | 539 void StaticMarkingVisitor<StaticVisitor>::MarkMapContents(Heap* heap, |
| 540 Map* map) { | 540 Map* map) { |
| 541 // Since descriptor arrays are potentially shared, ensure that only the | 541 // Since descriptor arrays are potentially shared, ensure that only the |
| 542 // descriptors that belong to this map are marked. The first time a non-empty | 542 // descriptors that belong to this map are marked. The first time a non-empty |
| 543 // descriptor array is marked, its header is also visited. The slot holding | 543 // descriptor array is marked, its header is also visited. The slot holding |
| 544 // the descriptor array will be implicitly recorded when the pointer fields of | 544 // the descriptor array will be implicitly recorded when the pointer fields of |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, | 719 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
| 720 void> JSFunctionWeakCodeBodyVisitor; | 720 void> JSFunctionWeakCodeBodyVisitor; |
| 721 JSFunctionWeakCodeBodyVisitor::Visit(map, object); | 721 JSFunctionWeakCodeBodyVisitor::Visit(map, object); |
| 722 } | 722 } |
| 723 | 723 |
| 724 | 724 |
| 725 } // namespace internal | 725 } // namespace internal |
| 726 } // namespace v8 | 726 } // namespace v8 |
| 727 | 727 |
| 728 #endif // V8_OBJECTS_VISITING_INL_H_ | 728 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |