summaryrefslogtreecommitdiffstats
path: root/src/objects-debug.cc
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-05-10 14:33:55 +0100
committerSteve Block <steveblock@google.com>2010-05-10 15:08:22 +0100
commit6ded16be15dd865a9b21ea304d5273c8be299c87 (patch)
treeb3661ae5d929e233f7024223f3fad0f2a284cd6e /src/objects-debug.cc
parent6599b9dd3411791c9d89ab7efbfb4131e5664c48 (diff)
downloadandroid_external_v8-6ded16be15dd865a9b21ea304d5273c8be299c87.tar.gz
android_external_v8-6ded16be15dd865a9b21ea304d5273c8be299c87.tar.bz2
android_external_v8-6ded16be15dd865a9b21ea304d5273c8be299c87.zip
Update V8 to r4588
We're using WebKit r58033, as used by http://src.chromium.org/svn/releases/5.0.387.0/DEPS This requires http://v8.googlecode.com/svn/trunk@4465 but this version has a crashing bug for ARM. Instead we use http://v8.googlecode.com/svn/trunk@4588, which is used by http://src.chromium.org/svn/releases/6.0.399.0/DEPS Note that a trivial bug fix was required in arm/codegen-arm.cc. This is guarded with ANDROID. See http://code.google.com/p/v8/issues/detail?id=703 Change-Id: I459647a8286c4f8c7405f0c5581ecbf051a6f1e8
Diffstat (limited to 'src/objects-debug.cc')
-rw-r--r--src/objects-debug.cc47
1 files changed, 45 insertions, 2 deletions
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 8f26f742..b0a3fd62 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -641,6 +641,24 @@ void Map::MapVerify() {
}
+void CodeCache::CodeCachePrint() {
+ HeapObject::PrintHeader("CodeCache");
+ PrintF("\n - default_cache: ");
+ default_cache()->ShortPrint();
+ PrintF("\n - normal_type_cache: ");
+ normal_type_cache()->ShortPrint();
+}
+
+
+void CodeCache::CodeCacheVerify() {
+ VerifyHeapPointer(default_cache());
+ VerifyHeapPointer(normal_type_cache());
+ ASSERT(default_cache()->IsFixedArray());
+ ASSERT(normal_type_cache()->IsUndefined()
+ || normal_type_cache()->IsCodeCacheHashTable());
+}
+
+
void FixedArray::FixedArrayPrint() {
HeapObject::PrintHeader("FixedArray");
PrintF(" - length: %d", length());
@@ -707,7 +725,6 @@ void String::StringVerify() {
void JSFunction::JSFunctionPrint() {
HeapObject::PrintHeader("Function");
PrintF(" - map = 0x%p\n", map());
- PrintF(" - is boilerplate: %s\n", IsBoilerplate() ? "yes" : "no");
PrintF(" - initial_map = ");
if (has_initial_map()) {
initial_map()->ShortPrint();
@@ -768,7 +785,7 @@ void SharedFunctionInfo::SharedFunctionInfoVerify() {
VerifyObjectField(kNameOffset);
VerifyObjectField(kCodeOffset);
VerifyObjectField(kInstanceClassNameOffset);
- VerifyObjectField(kExternalReferenceDataOffset);
+ VerifyObjectField(kFunctionDataOffset);
VerifyObjectField(kScriptOffset);
VerifyObjectField(kDebugInfoOffset);
}
@@ -1311,6 +1328,32 @@ bool DescriptorArray::IsSortedNoDuplicates() {
}
+void JSFunctionResultCache::JSFunctionResultCacheVerify() {
+ JSFunction::cast(get(kFactoryIndex))->Verify();
+
+ int size = Smi::cast(get(kCacheSizeIndex))->value();
+ ASSERT(kEntriesIndex <= size);
+ ASSERT(size <= length());
+ ASSERT_EQ(0, size % kEntrySize);
+
+ int finger = Smi::cast(get(kFingerIndex))->value();
+ ASSERT(kEntriesIndex <= finger);
+ ASSERT(finger < size || finger == kEntriesIndex);
+ ASSERT_EQ(0, finger % kEntrySize);
+
+ if (FLAG_enable_slow_asserts) {
+ for (int i = kEntriesIndex; i < size; i++) {
+ ASSERT(!get(i)->IsTheHole());
+ get(i)->Verify();
+ }
+ for (int i = size; i < length(); i++) {
+ ASSERT(get(i)->IsTheHole());
+ get(i)->Verify();
+ }
+ }
+}
+
+
#endif // DEBUG
} } // namespace v8::internal