summaryrefslogtreecommitdiffstats
path: root/src/objects-debug.cc
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2010-11-02 12:39:01 -0700
committerJohn Reck <jreck@google.com>2010-11-02 12:40:32 -0700
commit5913587db4c6bab03d97bfe44b06289fd6d7270d (patch)
tree96ab490452936f90e6e51a0ef86baee781c7dc46 /src/objects-debug.cc
parentf87a203d89e1bbb6708282e0b64dbd13d59b723d (diff)
downloadandroid_external_v8-5913587db4c6bab03d97bfe44b06289fd6d7270d.tar.gz
android_external_v8-5913587db4c6bab03d97bfe44b06289fd6d7270d.tar.bz2
android_external_v8-5913587db4c6bab03d97bfe44b06289fd6d7270d.zip
Update V8 to r5716 as required by WebKit r70949
Change-Id: I0d5cd05bb0427af33e5c9f6efdc209366a32bde3
Diffstat (limited to 'src/objects-debug.cc')
-rw-r--r--src/objects-debug.cc32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 5883f8b3..c0e5610a 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -40,31 +40,37 @@ namespace internal {
static const char* TypeToString(InstanceType type);
-void Object::Print() {
- if (IsSmi()) {
- Smi::cast(this)->SmiPrint();
- } else if (IsFailure()) {
- Failure::cast(this)->FailurePrint();
+void MaybeObject::Print() {
+ Object* this_as_object;
+ if (ToObject(&this_as_object)) {
+ if (this_as_object->IsSmi()) {
+ Smi::cast(this_as_object)->SmiPrint();
+ } else {
+ HeapObject::cast(this_as_object)->HeapObjectPrint();
+ }
} else {
- HeapObject::cast(this)->HeapObjectPrint();
+ Failure::cast(this)->FailurePrint();
}
Flush();
}
-void Object::PrintLn() {
+void MaybeObject::PrintLn() {
Print();
PrintF("\n");
}
-void Object::Verify() {
- if (IsSmi()) {
- Smi::cast(this)->SmiVerify();
- } else if (IsFailure()) {
- Failure::cast(this)->FailureVerify();
+void MaybeObject::Verify() {
+ Object* this_as_object;
+ if (ToObject(&this_as_object)) {
+ if (this_as_object->IsSmi()) {
+ Smi::cast(this_as_object)->SmiVerify();
+ } else {
+ HeapObject::cast(this_as_object)->HeapObjectVerify();
+ }
} else {
- HeapObject::cast(this)->HeapObjectVerify();
+ Failure::cast(this)->FailureVerify();
}
}