diff options
Diffstat (limited to 'src/objects-debug.cc')
-rw-r--r-- | src/objects-debug.cc | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/src/objects-debug.cc b/src/objects-debug.cc index dd606dcd..76c520e8 100644 --- a/src/objects-debug.cc +++ b/src/objects-debug.cc @@ -1,4 +1,4 @@ -// Copyright 2010 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -116,6 +116,9 @@ void HeapObject::HeapObjectVerify() { case EXTERNAL_FLOAT_ARRAY_TYPE: ExternalFloatArray::cast(this)->ExternalFloatArrayVerify(); break; + case EXTERNAL_DOUBLE_ARRAY_TYPE: + ExternalDoubleArray::cast(this)->ExternalDoubleArrayVerify(); + break; case CODE_TYPE: Code::cast(this)->CodeVerify(); break; @@ -152,8 +155,11 @@ void HeapObject::HeapObjectVerify() { break; case FILLER_TYPE: break; - case PROXY_TYPE: - Proxy::cast(this)->ProxyVerify(); + case JS_PROXY_TYPE: + JSProxy::cast(this)->JSProxyVerify(); + break; + case FOREIGN_TYPE: + Foreign::cast(this)->ForeignVerify(); break; case SHARED_FUNCTION_INFO_TYPE: SharedFunctionInfo::cast(this)->SharedFunctionInfoVerify(); @@ -232,6 +238,11 @@ void ExternalFloatArray::ExternalFloatArrayVerify() { } +void ExternalDoubleArray::ExternalDoubleArrayVerify() { + ASSERT(IsExternalDoubleArray()); +} + + void JSObject::JSObjectVerify() { VerifyHeapPointer(properties()); VerifyHeapPointer(elements()); @@ -261,7 +272,7 @@ void Map::MapVerify() { void Map::SharedMapVerify() { MapVerify(); ASSERT(is_shared()); - ASSERT_EQ(GetHeap()->empty_descriptor_array(), instance_descriptors()); + ASSERT(instance_descriptors()->IsEmpty()); ASSERT_EQ(0, pre_allocated_property_fields()); ASSERT_EQ(0, unused_property_fields()); ASSERT_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()), @@ -433,14 +444,22 @@ void JSRegExp::JSRegExpVerify() { FixedArray* arr = FixedArray::cast(data()); Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex); - // TheHole : Not compiled yet. + // Smi : Not compiled yet (-1) or code prepared for flushing. // JSObject: Compilation error. // Code/ByteArray: Compiled code. - ASSERT(ascii_data->IsTheHole() || ascii_data->IsJSObject() || - (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); + ASSERT(ascii_data->IsSmi() || + (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray())); Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex); - ASSERT(uc16_data->IsTheHole() || uc16_data->IsJSObject() || - (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); + ASSERT(uc16_data->IsSmi() || + (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray())); + + Object* ascii_saved = arr->get(JSRegExp::kIrregexpASCIICodeSavedIndex); + ASSERT(ascii_saved->IsSmi() || ascii_saved->IsString() || + ascii_saved->IsCode()); + Object* uc16_saved = arr->get(JSRegExp::kIrregexpUC16CodeSavedIndex); + ASSERT(uc16_saved->IsSmi() || uc16_saved->IsString() || + uc16_saved->IsCode()); + ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi()); ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi()); break; @@ -453,8 +472,13 @@ void JSRegExp::JSRegExpVerify() { } -void Proxy::ProxyVerify() { - ASSERT(IsProxy()); +void JSProxy::JSProxyVerify() { + ASSERT(IsJSProxy()); + VerifyPointer(handler()); +} + +void Foreign::ForeignVerify() { + ASSERT(IsForeign()); } |