| Index: src/objects-debug.cc
|
| ===================================================================
|
| --- src/objects-debug.cc (revision 8618)
|
| +++ src/objects-debug.cc (working copy)
|
| @@ -88,6 +88,9 @@
|
| case FIXED_ARRAY_TYPE:
|
| FixedArray::cast(this)->FixedArrayVerify();
|
| break;
|
| + case FIXED_DOUBLE_ARRAY_TYPE:
|
| + FixedDoubleArray::cast(this)->FixedDoubleArrayVerify();
|
| + break;
|
| case BYTE_ARRAY_TYPE:
|
| ByteArray::cast(this)->ByteArrayVerify();
|
| break;
|
| @@ -297,6 +300,12 @@
|
| }
|
|
|
|
|
| +void PolymorphicCodeCache::PolymorphicCodeCacheVerify() {
|
| + VerifyHeapPointer(cache());
|
| + ASSERT(cache()->IsUndefined() || cache()->IsPolymorphicCodeCacheHashTable());
|
| +}
|
| +
|
| +
|
| void FixedArray::FixedArrayVerify() {
|
| for (int i = 0; i < length(); i++) {
|
| Object* e = get(i);
|
| @@ -309,6 +318,17 @@
|
| }
|
|
|
|
|
| +void FixedDoubleArray::FixedDoubleArrayVerify() {
|
| + for (int i = 0; i < length(); i++) {
|
| + if (!is_the_hole(i)) {
|
| + double value = get(i);
|
| + ASSERT(!isnan(value) ||
|
| + BitCast<uint64_t>(value) == kCanonicalNonHoleNanInt64);
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| void JSValue::JSValueVerify() {
|
| Object* v = value();
|
| if (v->IsHeapObject()) {
|
| @@ -434,7 +454,9 @@
|
| void JSArray::JSArrayVerify() {
|
| JSObjectVerify();
|
| ASSERT(length()->IsNumber() || length()->IsUndefined());
|
| - ASSERT(elements()->IsUndefined() || elements()->IsFixedArray());
|
| + ASSERT(elements()->IsUndefined() ||
|
| + elements()->IsFixedArray() ||
|
| + elements()->IsFixedDoubleArray());
|
| }
|
|
|
|
|
| @@ -452,14 +474,22 @@
|
|
|
| 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;
|
|
|