diff options
| author | Ben Murdoch <benm@google.com> | 2011-11-30 16:03:39 +0000 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2011-12-02 17:28:02 +0000 |
| commit | 69a99ed0b2b2ef69d393c371b03db3a98aaf880e (patch) | |
| tree | 6438154d0f3ab526b9206f8860fa4db5cf073c11 /src/objects-debug.cc | |
| parent | 3fb3ca8c7ca439d408449a395897395c0faae8d1 (diff) | |
| download | android_external_v8-69a99ed0b2b2ef69d393c371b03db3a98aaf880e.tar.gz android_external_v8-69a99ed0b2b2ef69d393c371b03db3a98aaf880e.tar.bz2 android_external_v8-69a99ed0b2b2ef69d393c371b03db3a98aaf880e.zip | |
Upgrade to V8 3.5
Merge V8 3.5.10.24
Simple merge required updates to makefiles only.
Bug: 5688872
Change-Id: I0acdb9a1a53919d84e9a7525308e8371739d2f06
Diffstat (limited to 'src/objects-debug.cc')
| -rw-r--r-- | src/objects-debug.cc | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/src/objects-debug.cc b/src/objects-debug.cc index 29632317..4da360b8 100644 --- a/src/objects-debug.cc +++ b/src/objects-debug.cc @@ -153,6 +153,9 @@ void HeapObject::HeapObjectVerify() { case JS_ARRAY_TYPE: JSArray::cast(this)->JSArrayVerify(); break; + case JS_WEAK_MAP_TYPE: + JSWeakMap::cast(this)->JSWeakMapVerify(); + break; case JS_REGEXP_TYPE: JSRegExp::cast(this)->JSRegExpVerify(); break; @@ -313,7 +316,7 @@ void FixedArray::FixedArrayVerify() { void FixedDoubleArray::FixedDoubleArrayVerify() { for (int i = 0; i < length(); i++) { if (!is_the_hole(i)) { - double value = get(i); + double value = get_scalar(i); ASSERT(!isnan(value) || (BitCast<uint64_t>(value) == BitCast<uint64_t>(canonical_not_the_hole_nan_as_double()))); @@ -349,6 +352,31 @@ void String::StringVerify() { if (IsSymbol()) { CHECK(!HEAP->InNewSpace(this)); } + if (IsConsString()) { + ConsString::cast(this)->ConsStringVerify(); + } else if (IsSlicedString()) { + SlicedString::cast(this)->SlicedStringVerify(); + } +} + + +void ConsString::ConsStringVerify() { + CHECK(this->first()->IsString()); + CHECK(this->second() == GetHeap()->empty_string() || + this->second()->IsString()); + CHECK(this->length() >= String::kMinNonFlatLength); + if (this->IsFlat()) { + // A flat cons can only be created by String::SlowTryFlatten. + // Afterwards, the first part may be externalized. + CHECK(this->first()->IsSeqString() || this->first()->IsExternalString()); + } +} + + +void SlicedString::SlicedStringVerify() { + CHECK(!this->parent()->IsConsString()); + CHECK(!this->parent()->IsSlicedString()); + CHECK(this->length() >= SlicedString::kMinLength); } @@ -453,6 +481,14 @@ void JSArray::JSArrayVerify() { } +void JSWeakMap::JSWeakMapVerify() { + CHECK(IsJSWeakMap()); + JSObjectVerify(); + VerifyHeapPointer(table()); + ASSERT(table()->IsHashTable()); +} + + void JSRegExp::JSRegExpVerify() { JSObjectVerify(); ASSERT(data()->IsUndefined() || data()->IsFixedArray()); |
