| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/disassembler.h" | 7 #include "src/disassembler.h" |
| 8 #include "src/disasm.h" | 8 #include "src/disasm.h" |
| 9 #include "src/jsregexp.h" | 9 #include "src/jsregexp.h" |
| 10 #include "src/objects-visiting.h" | 10 #include "src/objects-visiting.h" |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 PrintF(out, "\n [%d]: %g", i, get_scalar(i)); | 572 PrintF(out, "\n [%d]: %g", i, get_scalar(i)); |
| 573 } | 573 } |
| 574 } | 574 } |
| 575 PrintF(out, "\n"); | 575 PrintF(out, "\n"); |
| 576 } | 576 } |
| 577 | 577 |
| 578 | 578 |
| 579 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) { | 579 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) { |
| 580 HeapObject::PrintHeader(out, "ConstantPoolArray"); | 580 HeapObject::PrintHeader(out, "ConstantPoolArray"); |
| 581 PrintF(out, " - length: %d", length()); | 581 PrintF(out, " - length: %d", length()); |
| 582 for (int i = 0; i < length(); i++) { | 582 for (int i = 0; i <= last_index(INT32, SMALL_SECTION); i++) { |
| 583 if (i < first_code_ptr_index()) { | 583 if (i < last_index(INT64, SMALL_SECTION)) { |
| 584 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); | 584 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); |
| 585 } else if (i < first_heap_ptr_index()) { | 585 } else if (i <= last_index(CODE_PTR, SMALL_SECTION)) { |
| 586 PrintF(out, "\n [%d]: code target pointer: %p", i, | 586 PrintF(out, "\n [%d]: code target pointer: %p", i, |
| 587 reinterpret_cast<void*>(get_code_ptr_entry(i))); | 587 reinterpret_cast<void*>(get_code_ptr_entry(i))); |
| 588 } else if (i < first_int32_index()) { | 588 } else if (i <= last_index(HEAP_PTR, SMALL_SECTION)) { |
| 589 PrintF(out, "\n [%d]: heap pointer: %p", i, | 589 PrintF(out, "\n [%d]: heap pointer: %p", i, |
| 590 reinterpret_cast<void*>(get_heap_ptr_entry(i))); | 590 reinterpret_cast<void*>(get_heap_ptr_entry(i))); |
| 591 } else { | 591 } else if (i <= last_index(INT32, SMALL_SECTION)) { |
| 592 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); | 592 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 if (is_extended_layout()) { |
| 596 PrintF(out, "\n Extended section:"); |
| 597 for (int i = first_extended_section_index(); |
| 598 i <= last_index(INT32, EXTENDED_SECTION); i++) { |
| 599 if (i < last_index(INT64, EXTENDED_SECTION)) { |
| 600 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); |
| 601 } else if (i <= last_index(CODE_PTR, EXTENDED_SECTION)) { |
| 602 PrintF(out, "\n [%d]: code target pointer: %p", i, |
| 603 reinterpret_cast<void*>(get_code_ptr_entry(i))); |
| 604 } else if (i <= last_index(HEAP_PTR, EXTENDED_SECTION)) { |
| 605 PrintF(out, "\n [%d]: heap pointer: %p", i, |
| 606 reinterpret_cast<void*>(get_heap_ptr_entry(i))); |
| 607 } else if (i <= last_index(INT32, EXTENDED_SECTION)) { |
| 608 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); |
| 609 } |
| 610 } |
| 611 } |
| 595 PrintF(out, "\n"); | 612 PrintF(out, "\n"); |
| 596 } | 613 } |
| 597 | 614 |
| 598 | 615 |
| 599 void JSValue::JSValuePrint(FILE* out) { | 616 void JSValue::JSValuePrint(FILE* out) { |
| 600 HeapObject::PrintHeader(out, "ValueObject"); | 617 HeapObject::PrintHeader(out, "ValueObject"); |
| 601 value()->Print(out); | 618 value()->Print(out); |
| 602 } | 619 } |
| 603 | 620 |
| 604 | 621 |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 } | 1257 } |
| 1241 } | 1258 } |
| 1242 PrintF(out, "\n"); | 1259 PrintF(out, "\n"); |
| 1243 } | 1260 } |
| 1244 | 1261 |
| 1245 | 1262 |
| 1246 #endif // OBJECT_PRINT | 1263 #endif // OBJECT_PRINT |
| 1247 | 1264 |
| 1248 | 1265 |
| 1249 } } // namespace v8::internal | 1266 } } // namespace v8::internal |
| OLD | NEW |