| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 SlicedString::BodyDescriptor, | 49 SlicedString::BodyDescriptor, |
| 50 int>::Visit); | 50 int>::Visit); |
| 51 | 51 |
| 52 table_.Register(kVisitFixedArray, | 52 table_.Register(kVisitFixedArray, |
| 53 &FlexibleBodyVisitor<StaticVisitor, | 53 &FlexibleBodyVisitor<StaticVisitor, |
| 54 FixedArray::BodyDescriptor, | 54 FixedArray::BodyDescriptor, |
| 55 int>::Visit); | 55 int>::Visit); |
| 56 | 56 |
| 57 table_.Register(kVisitFixedDoubleArray, &VisitFixedDoubleArray); | 57 table_.Register(kVisitFixedDoubleArray, &VisitFixedDoubleArray); |
| 58 | 58 |
| 59 table_.Register(kVisitGlobalContext, | 59 table_.Register(kVisitNativeContext, |
| 60 &FixedBodyVisitor<StaticVisitor, | 60 &FixedBodyVisitor<StaticVisitor, |
| 61 Context::ScavengeBodyDescriptor, | 61 Context::ScavengeBodyDescriptor, |
| 62 int>::Visit); | 62 int>::Visit); |
| 63 | 63 |
| 64 table_.Register(kVisitByteArray, &VisitByteArray); | 64 table_.Register(kVisitByteArray, &VisitByteArray); |
| 65 | 65 |
| 66 table_.Register(kVisitSharedFunctionInfo, | 66 table_.Register(kVisitSharedFunctionInfo, |
| 67 &FixedBodyVisitor<StaticVisitor, | 67 &FixedBodyVisitor<StaticVisitor, |
| 68 SharedFunctionInfo::BodyDescriptor, | 68 SharedFunctionInfo::BodyDescriptor, |
| 69 int>::Visit); | 69 int>::Visit); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 SlicedString::BodyDescriptor, | 110 SlicedString::BodyDescriptor, |
| 111 void>::Visit); | 111 void>::Visit); |
| 112 | 112 |
| 113 table_.Register(kVisitFixedArray, | 113 table_.Register(kVisitFixedArray, |
| 114 &FlexibleBodyVisitor<StaticVisitor, | 114 &FlexibleBodyVisitor<StaticVisitor, |
| 115 FixedArray::BodyDescriptor, | 115 FixedArray::BodyDescriptor, |
| 116 void>::Visit); | 116 void>::Visit); |
| 117 | 117 |
| 118 table_.Register(kVisitFixedDoubleArray, &DataObjectVisitor::Visit); | 118 table_.Register(kVisitFixedDoubleArray, &DataObjectVisitor::Visit); |
| 119 | 119 |
| 120 table_.Register(kVisitGlobalContext, &VisitGlobalContext); | 120 table_.Register(kVisitNativeContext, &VisitNativeContext); |
| 121 | 121 |
| 122 table_.Register(kVisitByteArray, &DataObjectVisitor::Visit); | 122 table_.Register(kVisitByteArray, &DataObjectVisitor::Visit); |
| 123 | 123 |
| 124 table_.Register(kVisitFreeSpace, &DataObjectVisitor::Visit); | 124 table_.Register(kVisitFreeSpace, &DataObjectVisitor::Visit); |
| 125 | 125 |
| 126 table_.Register(kVisitSeqAsciiString, &DataObjectVisitor::Visit); | 126 table_.Register(kVisitSeqAsciiString, &DataObjectVisitor::Visit); |
| 127 | 127 |
| 128 table_.Register(kVisitSeqTwoByteString, &DataObjectVisitor::Visit); | 128 table_.Register(kVisitSeqTwoByteString, &DataObjectVisitor::Visit); |
| 129 | 129 |
| 130 table_.Register(kVisitJSWeakMap, &StaticVisitor::VisitJSWeakMap); | 130 table_.Register(kVisitJSWeakMap, &StaticVisitor::VisitJSWeakMap); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 target->ic_age() != heap->global_ic_age())) { | 222 target->ic_age() != heap->global_ic_age())) { |
| 223 IC::Clear(rinfo->pc()); | 223 IC::Clear(rinfo->pc()); |
| 224 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 224 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
| 225 } | 225 } |
| 226 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); | 226 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); |
| 227 StaticVisitor::MarkObject(heap, target); | 227 StaticVisitor::MarkObject(heap, target); |
| 228 } | 228 } |
| 229 | 229 |
| 230 | 230 |
| 231 template<typename StaticVisitor> | 231 template<typename StaticVisitor> |
| 232 void StaticMarkingVisitor<StaticVisitor>::VisitGlobalContext( | 232 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext( |
| 233 Map* map, HeapObject* object) { | 233 Map* map, HeapObject* object) { |
| 234 FixedBodyVisitor<StaticVisitor, | 234 FixedBodyVisitor<StaticVisitor, |
| 235 Context::MarkCompactBodyDescriptor, | 235 Context::MarkCompactBodyDescriptor, |
| 236 void>::Visit(map, object); | 236 void>::Visit(map, object); |
| 237 | 237 |
| 238 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); | 238 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); |
| 239 for (int idx = Context::FIRST_WEAK_SLOT; | 239 for (int idx = Context::FIRST_WEAK_SLOT; |
| 240 idx < Context::GLOBAL_CONTEXT_SLOTS; | 240 idx < Context::NATIVE_CONTEXT_SLOTS; |
| 241 ++idx) { | 241 ++idx) { |
| 242 Object** slot = | 242 Object** slot = |
| 243 HeapObject::RawField(object, FixedArray::OffsetOfElementAt(idx)); | 243 HeapObject::RawField(object, FixedArray::OffsetOfElementAt(idx)); |
| 244 collector->RecordSlot(slot, slot, *slot); | 244 collector->RecordSlot(slot, slot, *slot); |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 | 247 |
| 248 | 248 |
| 249 template<typename StaticVisitor> | 249 template<typename StaticVisitor> |
| 250 void StaticMarkingVisitor<StaticVisitor>::VisitCode( | 250 void StaticMarkingVisitor<StaticVisitor>::VisitCode( |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 RelocIterator it(this, mode_mask); | 320 RelocIterator it(this, mode_mask); |
| 321 for (; !it.done(); it.next()) { | 321 for (; !it.done(); it.next()) { |
| 322 it.rinfo()->template Visit<StaticVisitor>(heap); | 322 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 | 326 |
| 327 } } // namespace v8::internal | 327 } } // namespace v8::internal |
| 328 | 328 |
| 329 #endif // V8_OBJECTS_VISITING_INL_H_ | 329 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |