| 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-inl.h" | 8 #include "src/heap/heap-inl.h" |
| 9 #include "src/heap/incremental-marking.h" | 9 #include "src/heap/incremental-marking.h" |
| 10 #include "src/heap/objects-visiting-inl.h" | 10 #include "src/heap/objects-visiting-inl.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 Symbol::kSize>); | 62 Symbol::kSize>); |
| 63 | 63 |
| 64 table_.Register( | 64 table_.Register( |
| 65 kVisitSharedFunctionInfo, | 65 kVisitSharedFunctionInfo, |
| 66 &ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized< | 66 &ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized< |
| 67 SharedFunctionInfo::kSize>); | 67 SharedFunctionInfo::kSize>); |
| 68 | 68 |
| 69 table_.Register(kVisitJSWeakCollection, | 69 table_.Register(kVisitJSWeakCollection, |
| 70 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); | 70 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); |
| 71 | 71 |
| 72 table_.Register(kVisitJSWeakRef, |
| 73 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); |
| 74 |
| 72 table_.Register(kVisitJSRegExp, | 75 table_.Register(kVisitJSRegExp, |
| 73 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); | 76 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); |
| 74 | 77 |
| 75 table_.Register(kVisitJSFunction, &EvacuateJSFunction); | 78 table_.Register(kVisitJSFunction, &EvacuateJSFunction); |
| 76 | 79 |
| 77 table_.Register(kVisitDataObject, | 80 table_.Register(kVisitDataObject, |
| 78 &ObjectEvacuationStrategy<DATA_OBJECT>::Visit); | 81 &ObjectEvacuationStrategy<DATA_OBJECT>::Visit); |
| 79 | 82 |
| 80 table_.Register(kVisitJSObjectFast, | 83 table_.Register(kVisitJSObjectFast, |
| 81 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); | 84 &ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 void ScavengeVisitor::ScavengePointer(Object** p) { | 476 void ScavengeVisitor::ScavengePointer(Object** p) { |
| 474 Object* object = *p; | 477 Object* object = *p; |
| 475 if (!heap_->InNewSpace(object)) return; | 478 if (!heap_->InNewSpace(object)) return; |
| 476 | 479 |
| 477 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), | 480 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), |
| 478 reinterpret_cast<HeapObject*>(object)); | 481 reinterpret_cast<HeapObject*>(object)); |
| 479 } | 482 } |
| 480 | 483 |
| 481 } // namespace internal | 484 } // namespace internal |
| 482 } // namespace v8 | 485 } // namespace v8 |
| OLD | NEW |