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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 table_.Register(kVisitSharedFunctionInfo, &VisitSharedFunctionInfo); | 189 table_.Register(kVisitSharedFunctionInfo, &VisitSharedFunctionInfo); |
190 | 190 |
191 table_.Register(kVisitJSFunction, &VisitJSFunction); | 191 table_.Register(kVisitJSFunction, &VisitJSFunction); |
192 | 192 |
193 table_.Register(kVisitJSArrayBuffer, &VisitJSArrayBuffer); | 193 table_.Register(kVisitJSArrayBuffer, &VisitJSArrayBuffer); |
194 | 194 |
195 table_.Register(kVisitJSTypedArray, &VisitJSTypedArray); | 195 table_.Register(kVisitJSTypedArray, &VisitJSTypedArray); |
196 | 196 |
197 // Registration for kVisitJSRegExp is done by StaticVisitor. | 197 // Registration for kVisitJSRegExp is done by StaticVisitor. |
198 | 198 |
199 table_.Register(kVisitCell, | |
200 &FixedBodyVisitor<StaticVisitor, | |
201 Cell::BodyDescriptor, | |
202 void>::Visit); | |
203 | |
199 table_.Register(kVisitPropertyCell, | 204 table_.Register(kVisitPropertyCell, |
200 &FixedBodyVisitor<StaticVisitor, | 205 &FixedBodyVisitor<StaticVisitor, |
201 JSGlobalPropertyCell::BodyDescriptor, | 206 JSGlobalPropertyCell::BodyDescriptor, |
202 void>::Visit); | 207 void>::Visit); |
203 | 208 |
204 table_.template RegisterSpecializations<DataObjectVisitor, | 209 table_.template RegisterSpecializations<DataObjectVisitor, |
205 kVisitDataObject, | 210 kVisitDataObject, |
206 kVisitDataObjectGeneric>(); | 211 kVisitDataObjectGeneric>(); |
207 | 212 |
208 table_.template RegisterSpecializations<JSObjectVisitor, | 213 table_.template RegisterSpecializations<JSObjectVisitor, |
(...skipping 24 matching lines...) Expand all Loading... | |
233 if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps || | 238 if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps || |
234 rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || | 239 rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || |
235 !object->IsMap() || !Map::cast(object)->CanTransition()) { | 240 !object->IsMap() || !Map::cast(object)->CanTransition()) { |
236 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); | 241 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); |
237 StaticVisitor::MarkObject(heap, object); | 242 StaticVisitor::MarkObject(heap, object); |
238 } | 243 } |
239 } | 244 } |
240 | 245 |
241 | 246 |
242 template<typename StaticVisitor> | 247 template<typename StaticVisitor> |
243 void StaticMarkingVisitor<StaticVisitor>::VisitGlobalPropertyCell( | 248 void StaticMarkingVisitor<StaticVisitor>::VisitGlobalPropertyCell( |
Michael Starzinger
2013/06/12 13:23:25
I know it is probably a bit of additional work, bu
danno
2013/06/12 14:24:28
Done.
| |
244 Heap* heap, RelocInfo* rinfo) { | 249 Heap* heap, RelocInfo* rinfo) { |
245 ASSERT(rinfo->rmode() == RelocInfo::GLOBAL_PROPERTY_CELL); | 250 ASSERT(rinfo->rmode() == RelocInfo::GLOBAL_PROPERTY_CELL); |
246 JSGlobalPropertyCell* cell = rinfo->target_cell(); | 251 Cell* cell = rinfo->target_cell(); |
247 StaticVisitor::MarkObject(heap, cell); | 252 StaticVisitor::MarkObject(heap, cell); |
248 } | 253 } |
249 | 254 |
250 | 255 |
251 template<typename StaticVisitor> | 256 template<typename StaticVisitor> |
252 void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget( | 257 void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget( |
253 Heap* heap, RelocInfo* rinfo) { | 258 Heap* heap, RelocInfo* rinfo) { |
254 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && | 259 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && |
255 rinfo->IsPatchedReturnSequence()) || | 260 rinfo->IsPatchedReturnSequence()) || |
256 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && | 261 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
825 RelocIterator it(this, mode_mask); | 830 RelocIterator it(this, mode_mask); |
826 for (; !it.done(); it.next()) { | 831 for (; !it.done(); it.next()) { |
827 it.rinfo()->template Visit<StaticVisitor>(heap); | 832 it.rinfo()->template Visit<StaticVisitor>(heap); |
828 } | 833 } |
829 } | 834 } |
830 | 835 |
831 | 836 |
832 } } // namespace v8::internal | 837 } } // namespace v8::internal |
833 | 838 |
834 #endif // V8_OBJECTS_VISITING_INL_H_ | 839 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |