| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 | 32 |
| 33 namespace v8 { | 33 namespace v8 { |
| 34 namespace internal { | 34 namespace internal { |
| 35 | 35 |
| 36 #ifdef INSPECTOR | 36 #ifdef INSPECTOR |
| 37 | 37 |
| 38 //============================================================================ | 38 //============================================================================ |
| 39 // The Inspector. | 39 // The Inspector. |
| 40 | 40 |
| 41 void Inspector::DumpObjectType(FILE* out, Object *obj, bool print_more) { | 41 void Inspector::DumpObjectType(FILE* out, Object* obj, bool print_more) { |
| 42 // Dump the object pointer. | 42 // Dump the object pointer. |
| 43 OS::FPrint(out, "%p:", reinterpret_cast<void*>(obj)); | 43 OS::FPrint(out, "%p:", reinterpret_cast<void*>(obj)); |
| 44 if (obj->IsHeapObject()) { | 44 if (obj->IsHeapObject()) { |
| 45 HeapObject *hobj = HeapObject::cast(obj); | 45 HeapObject* hobj = HeapObject::cast(obj); |
| 46 OS::FPrint(out, " size %d :", hobj->Size()); | 46 OS::FPrint(out, " size %d :", hobj->Size()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 // Dump each object classification that matches this object. | 49 // Dump each object classification that matches this object. |
| 50 #define FOR_EACH_TYPE(type) \ | 50 #define FOR_EACH_TYPE(type) \ |
| 51 if (obj->Is##type()) { \ | 51 if (obj->Is##type()) { \ |
| 52 OS::FPrint(out, " %s", #type); \ | 52 OS::FPrint(out, " %s", #type); \ |
| 53 } | 53 } |
| 54 OBJECT_TYPE_LIST(FOR_EACH_TYPE) | 54 OBJECT_TYPE_LIST(FOR_EACH_TYPE) |
| 55 HEAP_OBJECT_TYPE_LIST(FOR_EACH_TYPE) | 55 HEAP_OBJECT_TYPE_LIST(FOR_EACH_TYPE) |
| 56 #undef FOR_EACH_TYPE | 56 #undef FOR_EACH_TYPE |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 #endif // INSPECTOR | 60 #endif // INSPECTOR |
| 61 | 61 |
| 62 } } // namespace v8::internal | 62 } } // namespace v8::internal |
| 63 | 63 |
| OLD | NEW |