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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address)); | 226 Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address)); |
227 heap->mark_compact_collector()->RecordCodeEntrySlot(entry_address, code); | 227 heap->mark_compact_collector()->RecordCodeEntrySlot(entry_address, code); |
228 StaticVisitor::MarkObject(heap, code); | 228 StaticVisitor::MarkObject(heap, code); |
229 } | 229 } |
230 | 230 |
231 | 231 |
232 template<typename StaticVisitor> | 232 template<typename StaticVisitor> |
233 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( | 233 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( |
234 Heap* heap, RelocInfo* rinfo) { | 234 Heap* heap, RelocInfo* rinfo) { |
235 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); | 235 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
236 ASSERT(!rinfo->target_object()->IsConsString()); | |
237 HeapObject* object = HeapObject::cast(rinfo->target_object()); | 236 HeapObject* object = HeapObject::cast(rinfo->target_object()); |
238 if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps || | 237 if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps || |
239 rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || | 238 rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || |
240 !object->IsMap() || !Map::cast(object)->CanTransition()) { | 239 !object->IsMap() || !Map::cast(object)->CanTransition()) { |
241 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); | 240 Object** target_address = rinfo->target_object_address(); |
Michael Starzinger
2013/06/20 23:25:27
This change is missing the slot recording for the
| |
242 StaticVisitor::MarkObject(heap, object); | 241 Object* old_target = *target_address; |
242 StaticVisitor::VisitPointer(heap, target_address); | |
243 if (*target_address != old_target) { | |
244 rinfo->set_target_object(*target_address); | |
245 } | |
243 } | 246 } |
244 } | 247 } |
245 | 248 |
246 | 249 |
247 template<typename StaticVisitor> | 250 template<typename StaticVisitor> |
248 void StaticMarkingVisitor<StaticVisitor>::VisitCell( | 251 void StaticMarkingVisitor<StaticVisitor>::VisitCell( |
249 Heap* heap, RelocInfo* rinfo) { | 252 Heap* heap, RelocInfo* rinfo) { |
250 ASSERT(rinfo->rmode() == RelocInfo::CELL); | 253 ASSERT(rinfo->rmode() == RelocInfo::CELL); |
251 Cell* cell = rinfo->target_cell(); | 254 Cell* cell = rinfo->target_cell(); |
252 StaticVisitor::MarkObject(heap, cell); | 255 StaticVisitor::MarkObject(heap, cell); |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
817 RelocIterator it(this, mode_mask); | 820 RelocIterator it(this, mode_mask); |
818 for (; !it.done(); it.next()) { | 821 for (; !it.done(); it.next()) { |
819 it.rinfo()->template Visit<StaticVisitor>(heap); | 822 it.rinfo()->template Visit<StaticVisitor>(heap); |
820 } | 823 } |
821 } | 824 } |
822 | 825 |
823 | 826 |
824 } } // namespace v8::internal | 827 } } // namespace v8::internal |
825 | 828 |
826 #endif // V8_OBJECTS_VISITING_INL_H_ | 829 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |