Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Unified Diff: src/objects-printer.cc

Issue 304143002: Add support for extended constant pool arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Sync Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 6595acc7ad64a86b10e0d69e606e8bd421b3d8a3..c51c04e3fe223e01367dcb8843405338039e9623 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -579,19 +579,36 @@ 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_code_ptr_index()) {
+ for (int i = 0; i <= last_index(INT32, SMALL_SECTION); i++) {
+ if (i < last_index(INT64, SMALL_SECTION)) {
PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i));
- } else if (i < first_heap_ptr_index()) {
+ } else if (i <= last_index(CODE_PTR, SMALL_SECTION)) {
PrintF(out, "\n [%d]: code target pointer: %p", i,
reinterpret_cast<void*>(get_code_ptr_entry(i)));
- } else if (i < first_int32_index()) {
+ } else if (i <= last_index(HEAP_PTR, SMALL_SECTION)) {
PrintF(out, "\n [%d]: heap pointer: %p", i,
reinterpret_cast<void*>(get_heap_ptr_entry(i)));
- } else {
+ } else if (i <= last_index(INT32, SMALL_SECTION)) {
PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i));
}
}
+ if (is_extended_layout()) {
+ PrintF(out, "\n Extended section:");
+ for (int i = first_extended_section_index();
+ i <= last_index(INT32, EXTENDED_SECTION); i++) {
+ if (i < last_index(INT64, EXTENDED_SECTION)) {
+ PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i));
+ } else if (i <= last_index(CODE_PTR, EXTENDED_SECTION)) {
+ PrintF(out, "\n [%d]: code target pointer: %p", i,
+ reinterpret_cast<void*>(get_code_ptr_entry(i)));
+ } else if (i <= last_index(HEAP_PTR, EXTENDED_SECTION)) {
+ PrintF(out, "\n [%d]: heap pointer: %p", i,
+ reinterpret_cast<void*>(get_heap_ptr_entry(i)));
+ } else if (i <= last_index(INT32, EXTENDED_SECTION)) {
+ PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i));
+ }
+ }
+ }
PrintF(out, "\n");
}
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698