Chromium Code Reviews| Index: src/heap-inl.h |
| =================================================================== |
| --- src/heap-inl.h (revision 9721) |
| +++ src/heap-inl.h (working copy) |
| @@ -276,6 +276,19 @@ |
| } |
| +bool Heap::InMovingPage(Object* object) { |
|
Vyacheslav Egorov (Chromium)
2011/10/21 11:34:35
I think we really don't need to invoke any increme
|
| + if (object->IsSmi()) return false; |
| + HeapObject* heap_object = HeapObject::cast(object); |
| + if (InNewSpace(heap_object)) return true; |
| + Address address = heap_object->address(); |
| + if (lo_space()->Contains(heap_object)) return false; |
| + if (old_pointer_space()->FirstPage()->Contains(address)) return false; |
| + if (old_data_space()->FirstPage()->Contains(address)) return false; |
| + if (map_space()->FirstPage()->Contains(address)) return false; |
| + return true; |
| +} |
| + |
| + |
| bool Heap::InNewSpace(Address addr) { |
| return new_space_.Contains(addr); |
| } |