summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects-debug.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-09-08 17:14:42 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-09-08 17:14:42 -0700
commit8796ed22783bbbb9d286463e27db275325106fed (patch)
treec4d13c9a6dc9196925489392ffe589f4d43d8939 /deps/v8/src/objects-debug.cc
parent512016fd7441d8919c29f369a38622ab1dd01942 (diff)
downloadnode-8796ed22783bbbb9d286463e27db275325106fed.tar.gz
Upgrade V8 to 2.4.2
Diffstat (limited to 'deps/v8/src/objects-debug.cc')
-rw-r--r--deps/v8/src/objects-debug.cc35
1 files changed, 32 insertions, 3 deletions
diff --git a/deps/v8/src/objects-debug.cc b/deps/v8/src/objects-debug.cc
index d340e4b59..6d49d7503 100644
--- a/deps/v8/src/objects-debug.cc
+++ b/deps/v8/src/objects-debug.cc
@@ -30,6 +30,7 @@
#include "disassembler.h"
#include "disasm.h"
#include "jsregexp.h"
+#include "objects-visiting.h"
namespace v8 {
namespace internal {
@@ -540,7 +541,8 @@ void JSObject::JSObjectVerify() {
map()->NextFreePropertyIndex()));
}
ASSERT(map()->has_fast_elements() ==
- (elements()->map() == Heap::fixed_array_map()));
+ (elements()->map() == Heap::fixed_array_map() ||
+ elements()->map() == Heap::fixed_cow_array_map()));
ASSERT(map()->has_fast_elements() == HasFastElements());
}
@@ -639,13 +641,25 @@ void Map::MapPrint() {
void Map::MapVerify() {
ASSERT(!Heap::InNewSpace(this));
ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE);
- ASSERT(kPointerSize <= instance_size()
- && instance_size() < Heap::Capacity());
+ ASSERT(instance_size() == kVariableSizeSentinel ||
+ (kPointerSize <= instance_size() &&
+ instance_size() < Heap::Capacity()));
VerifyHeapPointer(prototype());
VerifyHeapPointer(instance_descriptors());
}
+void Map::NormalizedMapVerify() {
+ MapVerify();
+ ASSERT_EQ(Heap::empty_descriptor_array(), instance_descriptors());
+ ASSERT_EQ(Heap::empty_fixed_array(), code_cache());
+ ASSERT_EQ(0, pre_allocated_property_fields());
+ ASSERT_EQ(0, unused_property_fields());
+ ASSERT_EQ(StaticVisitorBase::GetVisitorId(instance_type(), instance_size()),
+ visitor_id());
+}
+
+
void CodeCache::CodeCachePrint() {
HeapObject::PrintHeader("CodeCache");
PrintF("\n - default_cache: ");
@@ -1361,6 +1375,21 @@ void JSFunctionResultCache::JSFunctionResultCacheVerify() {
}
+void NormalizedMapCache::NormalizedMapCacheVerify() {
+ FixedArray::cast(this)->Verify();
+ if (FLAG_enable_slow_asserts) {
+ for (int i = 0; i < length(); i++) {
+ Object* e = get(i);
+ if (e->IsMap()) {
+ Map::cast(e)->NormalizedMapVerify();
+ } else {
+ ASSERT(e->IsUndefined());
+ }
+ }
+ }
+}
+
+
#endif // DEBUG
} } // namespace v8::internal