Cleanup FooSpace::VerifyObject and ElementsAccessor::Validate.

R=danno@chromium.org

Review URL: https://codereview.chromium.org/23273004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent df48b2f8
......@@ -581,14 +581,8 @@ class ElementsAccessorBase : public ElementsAccessor {
// When objects are first allocated, its elements are Failures.
if (fixed_array_base->IsFailure()) return;
if (!fixed_array_base->IsHeapObject()) return;
Map* map = fixed_array_base->map();
// Arrays that have been shifted in place can't be verified.
Heap* heap = holder->GetHeap();
if (map == heap->one_pointer_filler_map() ||
map == heap->two_pointer_filler_map() ||
map == heap->free_space_map()) {
return;
}
if (fixed_array_base->IsFiller()) return;
int length = 0;
if (holder->IsJSArray()) {
Object* length_obj = JSArray::cast(holder)->length();
......
......@@ -2852,8 +2852,7 @@ void FixedSpace::PrepareForMarkCompact() {
// the VerifyObject definition behind VERIFY_HEAP.
void MapSpace::VerifyObject(HeapObject* object) {
// The object should be a map or a free-list node.
CHECK(object->IsMap() || object->IsFreeSpace());
CHECK(object->IsMap());
}
......@@ -2864,16 +2863,12 @@ void MapSpace::VerifyObject(HeapObject* object) {
// the VerifyObject definition behind VERIFY_HEAP.
void CellSpace::VerifyObject(HeapObject* object) {
// The object should be a global object property cell or a free-list node.
CHECK(object->IsCell() ||
object->map() == heap()->two_pointer_filler_map());
CHECK(object->IsCell());
}
void PropertyCellSpace::VerifyObject(HeapObject* object) {
// The object should be a global object property cell or a free-list node.
CHECK(object->IsPropertyCell() ||
object->map() == heap()->two_pointer_filler_map());
CHECK(object->IsPropertyCell());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment