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 #include "src/heap/scavenger.h" | 5 #include "src/heap/scavenger.h" |
6 | 6 |
7 #include "src/contexts.h" | 7 #include "src/contexts.h" |
8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
9 #include "src/heap/objects-visiting-inl.h" | 9 #include "src/heap/objects-visiting-inl.h" |
10 #include "src/heap/scavenger-inl.h" | 10 #include "src/heap/scavenger-inl.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 Symbol::kSize>); | 60 Symbol::kSize>); |
61 | 61 |
62 table_.Register( | 62 table_.Register( |
63 kVisitSharedFunctionInfo, | 63 kVisitSharedFunctionInfo, |
64 &ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized< | 64 &ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized< |
65 SharedFunctionInfo::kSize>); | 65 SharedFunctionInfo::kSize>); |
66 | 66 |
67 table_.Register(kVisitJSWeakCollection, | 67 table_.Register(kVisitJSWeakCollection, |
68 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); | 68 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); |
69 | 69 |
70 table_.Register(kVisitJSTypedArray, | |
71 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); | |
72 | |
73 table_.Register(kVisitJSDataView, | |
74 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); | |
75 | |
76 table_.Register(kVisitJSRegExp, | 70 table_.Register(kVisitJSRegExp, |
77 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); | 71 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); |
78 | 72 |
79 table_.Register(kVisitJSFunction, &EvacuateJSFunction); | 73 table_.Register(kVisitJSFunction, &EvacuateJSFunction); |
80 | 74 |
81 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>, | 75 table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>, |
82 kVisitDataObject, kVisitDataObjectGeneric>(); | 76 kVisitDataObject, kVisitDataObjectGeneric>(); |
83 | 77 |
84 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>, | 78 table_.RegisterSpecializations<ObjectEvacuationStrategy<POINTER_OBJECT>, |
85 kVisitJSObject, kVisitJSObjectGeneric>(); | 79 kVisitJSObject, kVisitJSObjectGeneric>(); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 | 476 |
483 void ScavengeVisitor::ScavengePointer(Object** p) { | 477 void ScavengeVisitor::ScavengePointer(Object** p) { |
484 Object* object = *p; | 478 Object* object = *p; |
485 if (!heap_->InNewSpace(object)) return; | 479 if (!heap_->InNewSpace(object)) return; |
486 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), | 480 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), |
487 reinterpret_cast<HeapObject*>(object)); | 481 reinterpret_cast<HeapObject*>(object)); |
488 } | 482 } |
489 | 483 |
490 } // namespace internal | 484 } // namespace internal |
491 } // namespace v8 | 485 } // namespace v8 |
OLD | NEW |