Index: src/objects-printer.cc |
diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
index e9994f9b7c5118a01a4bc64b8ad2e04f9ccdbabc..b4b0761bff7b524c80a562cc129e12b512accd9f 100644 |
--- a/src/objects-printer.cc |
+++ b/src/objects-printer.cc |
@@ -62,6 +62,9 @@ |
break; |
case FIXED_DOUBLE_ARRAY_TYPE: |
FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(os); |
+ break; |
+ case CONSTANT_POOL_ARRAY_TYPE: |
+ ConstantPoolArray::cast(this)->ConstantPoolArrayPrint(os); |
break; |
case FIXED_ARRAY_TYPE: |
FixedArray::cast(this)->FixedArrayPrint(os); |
@@ -495,6 +498,43 @@ |
os << "<the hole>"; |
} else { |
os << get_scalar(i); |
+ } |
+ } |
+ os << "\n"; |
+} |
+ |
+ |
+void ConstantPoolArray::ConstantPoolArrayPrint(std::ostream& os) { // NOLINT |
+ HeapObject::PrintHeader(os, "ConstantPoolArray"); |
+ os << " - length: " << length(); |
+ for (int i = 0; i <= last_index(INT32, SMALL_SECTION); i++) { |
+ if (i < last_index(INT64, SMALL_SECTION)) { |
+ os << "\n [" << i << "]: double: " << get_int64_entry_as_double(i); |
+ } else if (i <= last_index(CODE_PTR, SMALL_SECTION)) { |
+ os << "\n [" << i << "]: code target pointer: " |
+ << reinterpret_cast<void*>(get_code_ptr_entry(i)); |
+ } else if (i <= last_index(HEAP_PTR, SMALL_SECTION)) { |
+ os << "\n [" << i << "]: heap pointer: " |
+ << reinterpret_cast<void*>(get_heap_ptr_entry(i)); |
+ } else if (i <= last_index(INT32, SMALL_SECTION)) { |
+ os << "\n [" << i << "]: int32: " << get_int32_entry(i); |
+ } |
+ } |
+ if (is_extended_layout()) { |
+ os << "\n Extended section:"; |
+ for (int i = first_extended_section_index(); |
+ i <= last_index(INT32, EXTENDED_SECTION); i++) { |
+ if (i < last_index(INT64, EXTENDED_SECTION)) { |
+ os << "\n [" << i << "]: double: " << get_int64_entry_as_double(i); |
+ } else if (i <= last_index(CODE_PTR, EXTENDED_SECTION)) { |
+ os << "\n [" << i << "]: code target pointer: " |
+ << reinterpret_cast<void*>(get_code_ptr_entry(i)); |
+ } else if (i <= last_index(HEAP_PTR, EXTENDED_SECTION)) { |
+ os << "\n [" << i << "]: heap pointer: " |
+ << reinterpret_cast<void*>(get_heap_ptr_entry(i)); |
+ } else if (i <= last_index(INT32, EXTENDED_SECTION)) { |
+ os << "\n [" << i << "]: int32: " << get_int32_entry(i); |
+ } |
} |
} |
os << "\n"; |