| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index e9e777bba20467d5cc35f4f89e355f264829d503..77864cbe96cf3f4efcb9f8ff3c51fa075ad09519 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -35,6 +35,7 @@
|
| #include "incremental-marking.h"
|
| #include "list.h"
|
| #include "mark-compact.h"
|
| +#include "objects-visiting.h"
|
| #include "spaces.h"
|
| #include "splay-tree-inl.h"
|
| #include "store-buffer.h"
|
| @@ -292,6 +293,11 @@ class PromotionQueue {
|
| };
|
|
|
|
|
| +typedef void (*ScavengingCallback)(Map* map,
|
| + HeapObject** slot,
|
| + HeapObject* object);
|
| +
|
| +
|
| // External strings table is a place where all external strings are
|
| // registered. We need to keep track of such strings to properly
|
| // finalize them.
|
| @@ -1321,6 +1327,10 @@ class Heap {
|
|
|
| inline bool OldGenerationAllocationLimitReached();
|
|
|
| + inline void DoScavengeObject(Map* map, HeapObject** slot, HeapObject* obj) {
|
| + scavenging_visitors_table_.GetVisitor(map)(map, slot, obj);
|
| + }
|
| +
|
| private:
|
| Heap();
|
|
|
| @@ -1535,8 +1545,6 @@ class Heap {
|
| // Allocate empty fixed array.
|
| MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
|
|
|
| - void SwitchScavengingVisitorsTableIfProfilingWasEnabled();
|
| -
|
| // Performs a minor collection in new generation.
|
| void Scavenge();
|
|
|
| @@ -1679,6 +1687,8 @@ class Heap {
|
|
|
| ExternalStringTable external_string_table_;
|
|
|
| + VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_;
|
| +
|
| friend class Factory;
|
| friend class GCTracer;
|
| friend class DisallowAllocationFailure;
|
|
|