| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 29e875c11a1c41a8d68d83b8831fb61973e82908..ad62980a7924787c5851e59df73014cfe428f81f 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -4808,6 +4808,20 @@ bool Heap::RootIsImmortalImmovable(int root_index) {
|
| }
|
|
|
|
|
| +bool Heap::GetRootListIndex(Handle<HeapObject> object,
|
| + Heap::RootListIndex* index_return) {
|
| + Object* ptr = *object;
|
| +#define IMMORTAL_IMMOVABLE_ROOT(Name) \
|
| + if (ptr == roots_[Heap::k##Name##RootIndex]) { \
|
| + *index_return = k##Name##RootIndex; \
|
| + return true; \
|
| + }
|
| + IMMORTAL_IMMOVABLE_ROOT_LIST(IMMORTAL_IMMOVABLE_ROOT)
|
| +#undef IMMORTAL_IMMOVABLE_ROOT
|
| + return false;
|
| +}
|
| +
|
| +
|
| #ifdef VERIFY_HEAP
|
| void Heap::Verify() {
|
| CHECK(HasBeenSetUp());
|
|
|