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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 table_.Register(kVisitJSWeakCollection, &JSObjectVisitor::Visit); | 84 table_.Register(kVisitJSWeakCollection, &JSObjectVisitor::Visit); |
85 | 85 |
86 table_.Register(kVisitJSRegExp, &JSObjectVisitor::Visit); | 86 table_.Register(kVisitJSRegExp, &JSObjectVisitor::Visit); |
87 | 87 |
88 table_.template RegisterSpecializations<DataObjectVisitor, kVisitDataObject, | 88 table_.template RegisterSpecializations<DataObjectVisitor, kVisitDataObject, |
89 kVisitDataObjectGeneric>(); | 89 kVisitDataObjectGeneric>(); |
90 | 90 |
91 table_.template RegisterSpecializations<JSObjectVisitor, kVisitJSObject, | 91 table_.template RegisterSpecializations<JSObjectVisitor, kVisitJSObject, |
92 kVisitJSObjectGeneric>(); | 92 kVisitJSObjectGeneric>(); |
| 93 |
| 94 // Not using specialized Api object visitor for newspace. |
| 95 table_.template RegisterSpecializations<JSObjectVisitor, kVisitJSApiObject, |
| 96 kVisitJSApiObjectGeneric>(); |
| 97 |
93 table_.template RegisterSpecializations<StructVisitor, kVisitStruct, | 98 table_.template RegisterSpecializations<StructVisitor, kVisitStruct, |
94 kVisitStructGeneric>(); | 99 kVisitStructGeneric>(); |
95 } | 100 } |
96 | 101 |
97 | 102 |
98 template <typename StaticVisitor> | 103 template <typename StaticVisitor> |
99 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( | 104 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( |
100 Map* map, HeapObject* object) { | 105 Map* map, HeapObject* object) { |
101 typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, int> | 106 typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, int> |
102 JSArrayBufferBodyVisitor; | 107 JSArrayBufferBodyVisitor; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 table_.Register(kVisitWeakCell, &VisitWeakCell); | 198 table_.Register(kVisitWeakCell, &VisitWeakCell); |
194 | 199 |
195 table_.Register(kVisitTransitionArray, &VisitTransitionArray); | 200 table_.Register(kVisitTransitionArray, &VisitTransitionArray); |
196 | 201 |
197 table_.template RegisterSpecializations<DataObjectVisitor, kVisitDataObject, | 202 table_.template RegisterSpecializations<DataObjectVisitor, kVisitDataObject, |
198 kVisitDataObjectGeneric>(); | 203 kVisitDataObjectGeneric>(); |
199 | 204 |
200 table_.template RegisterSpecializations<JSObjectVisitor, kVisitJSObject, | 205 table_.template RegisterSpecializations<JSObjectVisitor, kVisitJSObject, |
201 kVisitJSObjectGeneric>(); | 206 kVisitJSObjectGeneric>(); |
202 | 207 |
| 208 table_.template RegisterSpecializations<JSApiObjectVisitor, kVisitJSApiObject, |
| 209 kVisitJSApiObjectGeneric>(); |
| 210 |
203 table_.template RegisterSpecializations<StructObjectVisitor, kVisitStruct, | 211 table_.template RegisterSpecializations<StructObjectVisitor, kVisitStruct, |
204 kVisitStructGeneric>(); | 212 kVisitStructGeneric>(); |
205 } | 213 } |
206 | 214 |
207 | 215 |
208 template <typename StaticVisitor> | 216 template <typename StaticVisitor> |
209 void StaticMarkingVisitor<StaticVisitor>::VisitCodeEntry( | 217 void StaticMarkingVisitor<StaticVisitor>::VisitCodeEntry( |
210 Heap* heap, HeapObject* object, Address entry_address) { | 218 Heap* heap, HeapObject* object, Address entry_address) { |
211 Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address)); | 219 Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address)); |
212 heap->mark_compact_collector()->RecordCodeEntrySlot(object, entry_address, | 220 heap->mark_compact_collector()->RecordCodeEntrySlot(object, entry_address, |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, | 732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
725 void> JSFunctionWeakCodeBodyVisitor; | 733 void> JSFunctionWeakCodeBodyVisitor; |
726 JSFunctionWeakCodeBodyVisitor::Visit(map, object); | 734 JSFunctionWeakCodeBodyVisitor::Visit(map, object); |
727 } | 735 } |
728 | 736 |
729 | 737 |
730 } // namespace internal | 738 } // namespace internal |
731 } // namespace v8 | 739 } // namespace v8 |
732 | 740 |
733 #endif // V8_OBJECTS_VISITING_INL_H_ | 741 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |