Chromium Code Reviews| Index: src/objects-printer.cc |
| diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
| index f4b4a4fa890a07b452fa6db4cd94e4367382f75b..a7a1e0cc956f7257848bd6cc4face7bd87e60be6 100644 |
| --- a/src/objects-printer.cc |
| +++ b/src/objects-printer.cc |
| @@ -95,6 +95,9 @@ void HeapObject::HeapObjectPrint(FILE* out) { |
| case FIXED_DOUBLE_ARRAY_TYPE: |
| FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); |
| break; |
| + case CONSTANT_POOL_ARRAY_TYPE: |
| + ConstantPoolArray::cast(this)->ConstantPoolArrayPrint(out); |
| + break; |
| case FIXED_ARRAY_TYPE: |
| FixedArray::cast(this)->FixedArrayPrint(out); |
| break; |
| @@ -630,6 +633,20 @@ void FixedDoubleArray::FixedDoubleArrayPrint(FILE* out) { |
| } |
| +void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) { |
| + HeapObject::PrintHeader(out, "ConstantPoolArray"); |
| + PrintF(out, " - length: %d", length()); |
| + for (int i = 0; i < length(); i++) { |
| + if (i < first_int32_index()) { |
| + PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); |
| + } else { |
| + PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); |
| + } |
|
ulan
2013/09/27 12:39:10
The case for pointers is missing.
rmcilroy
2013/10/01 11:21:52
Dang I noticed that after uploading and added it,
|
| + } |
| + PrintF(out, "\n"); |
| +} |
| + |
| + |
| void JSValue::JSValuePrint(FILE* out) { |
| HeapObject::PrintHeader(out, "ValueObject"); |
| value()->Print(out); |