OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_HEAP_SCAVENGER_INL_H_ | 5 #ifndef V8_HEAP_SCAVENGER_INL_H_ |
6 #define V8_HEAP_SCAVENGER_INL_H_ | 6 #define V8_HEAP_SCAVENGER_INL_H_ |
7 | 7 |
8 #include "src/heap/scavenger.h" | 8 #include "src/heap/scavenger.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 20 matching lines...) Expand all Loading... | |
31 Heap::UpdateAllocationSiteFeedback(object, Heap::IGNORE_SCRATCHPAD_SLOT); | 31 Heap::UpdateAllocationSiteFeedback(object, Heap::IGNORE_SCRATCHPAD_SLOT); |
32 | 32 |
33 // AllocationMementos are unrooted and shouldn't survive a scavenge | 33 // AllocationMementos are unrooted and shouldn't survive a scavenge |
34 DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); | 34 DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); |
35 // Call the slow part of scavenge object. | 35 // Call the slow part of scavenge object. |
36 return ScavengeObjectSlow(p, object); | 36 return ScavengeObjectSlow(p, object); |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 // static | 40 // static |
41 void StaticScavengeVisitor::VisitPointer(Heap* heap, Object** p) { | 41 void StaticScavengeVisitor::VisitPointer(Heap* heap, Object** p) { |
Igor Sheludko
2015/12/01 15:22:45
What about removing this old one? Given that all t
jochen (gone - plz use gerrit)
2015/12/01 15:29:28
not sure what you mean?
| |
42 Object* object = *p; | 42 Object* object = *p; |
43 if (!heap->InNewSpace(object)) return; | 43 if (!heap->InNewSpace(object)) return; |
44 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), | 44 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), |
45 reinterpret_cast<HeapObject*>(object)); | 45 reinterpret_cast<HeapObject*>(object)); |
46 } | 46 } |
47 | 47 |
48 | |
49 // static | |
50 void StaticScavengeVisitor::VisitPointer(Heap* heap, HeapObject* obj, | |
51 Object** p) { | |
52 Object* object = *p; | |
53 if (!heap->InNewSpace(object)) return; | |
54 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), | |
55 reinterpret_cast<HeapObject*>(object)); | |
56 } | |
57 | |
48 } // namespace internal | 58 } // namespace internal |
49 } // namespace v8 | 59 } // namespace v8 |
50 | 60 |
51 #endif // V8_HEAP_SCAVENGER_INL_H_ | 61 #endif // V8_HEAP_SCAVENGER_INL_H_ |
OLD | NEW |