Chromium Code Reviews| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 StaticVisitor::MarkObject(heap, code); | 253 StaticVisitor::MarkObject(heap, code); |
| 254 } | 254 } |
| 255 | 255 |
| 256 | 256 |
| 257 template<typename StaticVisitor> | 257 template<typename StaticVisitor> |
| 258 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( | 258 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( |
| 259 Heap* heap, RelocInfo* rinfo) { | 259 Heap* heap, RelocInfo* rinfo) { |
| 260 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); | 260 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
| 261 ASSERT(!rinfo->target_object()->IsConsString()); | 261 ASSERT(!rinfo->target_object()->IsConsString()); |
| 262 HeapObject* object = HeapObject::cast(rinfo->target_object()); | 262 HeapObject* object = HeapObject::cast(rinfo->target_object()); |
| 263 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); | 263 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); |
|
Michael Starzinger
2014/01/10 13:45:19
Side-note: A potential cleanup/optimization for la
ulan
2014/01/13 11:35:06
Added TODO with this message.
| |
| 264 if (!Code::IsWeakEmbeddedObject(rinfo->host()->kind(), object)) { | 264 if (!Code::IsWeakEmbeddedObject(rinfo->host()->kind(), object)) { |
| 265 StaticVisitor::MarkObject(heap, object); | 265 StaticVisitor::MarkObject(heap, object); |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 | 268 |
| 269 | 269 |
| 270 template<typename StaticVisitor> | 270 template<typename StaticVisitor> |
| 271 void StaticMarkingVisitor<StaticVisitor>::VisitCell( | 271 void StaticMarkingVisitor<StaticVisitor>::VisitCell( |
| 272 Heap* heap, RelocInfo* rinfo) { | 272 Heap* heap, RelocInfo* rinfo) { |
| 273 ASSERT(rinfo->rmode() == RelocInfo::CELL); | 273 ASSERT(rinfo->rmode() == RelocInfo::CELL); |
| 274 Cell* cell = rinfo->target_cell(); | 274 Cell* cell = rinfo->target_cell(); |
| 275 StaticVisitor::MarkObject(heap, cell); | 275 if (!Code::IsWeakEmbeddedObject(rinfo->host()->kind(), cell)) { |
|
Michael Starzinger
2014/01/10 13:45:19
As discussed offline: We do not record slots in co
ulan
2014/01/13 11:35:06
Done.
| |
| 276 StaticVisitor::MarkObject(heap, cell); | |
| 277 } | |
| 276 } | 278 } |
| 277 | 279 |
| 278 | 280 |
| 279 template<typename StaticVisitor> | 281 template<typename StaticVisitor> |
| 280 void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget( | 282 void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget( |
| 281 Heap* heap, RelocInfo* rinfo) { | 283 Heap* heap, RelocInfo* rinfo) { |
| 282 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && | 284 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && |
| 283 rinfo->IsPatchedReturnSequence()) || | 285 rinfo->IsPatchedReturnSequence()) || |
| 284 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && | 286 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && |
| 285 rinfo->IsPatchedDebugBreakSlotSequence())); | 287 rinfo->IsPatchedDebugBreakSlotSequence())); |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 921 RelocIterator it(this, mode_mask); | 923 RelocIterator it(this, mode_mask); |
| 922 for (; !it.done(); it.next()) { | 924 for (; !it.done(); it.next()) { |
| 923 it.rinfo()->template Visit<StaticVisitor>(heap); | 925 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 924 } | 926 } |
| 925 } | 927 } |
| 926 | 928 |
| 927 | 929 |
| 928 } } // namespace v8::internal | 930 } } // namespace v8::internal |
| 929 | 931 |
| 930 #endif // V8_OBJECTS_VISITING_INL_H_ | 932 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |