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

Side by Side Diff: src/objects-printer.cc

Issue 1131783003: Embedded constant pools. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug-mode Arm issue. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/assembler-ppc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 HeapNumber::cast(this)->HeapNumberPrint(os); 56 HeapNumber::cast(this)->HeapNumberPrint(os);
57 break; 57 break;
58 case MUTABLE_HEAP_NUMBER_TYPE: 58 case MUTABLE_HEAP_NUMBER_TYPE:
59 os << "<mutable "; 59 os << "<mutable ";
60 HeapNumber::cast(this)->HeapNumberPrint(os); 60 HeapNumber::cast(this)->HeapNumberPrint(os);
61 os << ">"; 61 os << ">";
62 break; 62 break;
63 case FIXED_DOUBLE_ARRAY_TYPE: 63 case FIXED_DOUBLE_ARRAY_TYPE:
64 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(os); 64 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(os);
65 break; 65 break;
66 case CONSTANT_POOL_ARRAY_TYPE:
67 ConstantPoolArray::cast(this)->ConstantPoolArrayPrint(os);
68 break;
69 case FIXED_ARRAY_TYPE: 66 case FIXED_ARRAY_TYPE:
70 FixedArray::cast(this)->FixedArrayPrint(os); 67 FixedArray::cast(this)->FixedArrayPrint(os);
71 break; 68 break;
72 case BYTE_ARRAY_TYPE: 69 case BYTE_ARRAY_TYPE:
73 ByteArray::cast(this)->ByteArrayPrint(os); 70 ByteArray::cast(this)->ByteArrayPrint(os);
74 break; 71 break;
75 case FREE_SPACE_TYPE: 72 case FREE_SPACE_TYPE:
76 FreeSpace::cast(this)->FreeSpacePrint(os); 73 FreeSpace::cast(this)->FreeSpacePrint(os);
77 break; 74 break;
78 75
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 if (is_the_hole(i)) { 494 if (is_the_hole(i)) {
498 os << "<the hole>"; 495 os << "<the hole>";
499 } else { 496 } else {
500 os << get_scalar(i); 497 os << get_scalar(i);
501 } 498 }
502 } 499 }
503 os << "\n"; 500 os << "\n";
504 } 501 }
505 502
506 503
507 void ConstantPoolArray::ConstantPoolArrayPrint(std::ostream& os) { // NOLINT
508 HeapObject::PrintHeader(os, "ConstantPoolArray");
509 os << " - length: " << length();
510 for (int i = 0; i <= last_index(INT32, SMALL_SECTION); i++) {
511 if (i < last_index(INT64, SMALL_SECTION)) {
512 os << "\n [" << i << "]: double: " << get_int64_entry_as_double(i);
513 } else if (i <= last_index(CODE_PTR, SMALL_SECTION)) {
514 os << "\n [" << i << "]: code target pointer: "
515 << reinterpret_cast<void*>(get_code_ptr_entry(i));
516 } else if (i <= last_index(HEAP_PTR, SMALL_SECTION)) {
517 os << "\n [" << i << "]: heap pointer: "
518 << reinterpret_cast<void*>(get_heap_ptr_entry(i));
519 } else if (i <= last_index(INT32, SMALL_SECTION)) {
520 os << "\n [" << i << "]: int32: " << get_int32_entry(i);
521 }
522 }
523 if (is_extended_layout()) {
524 os << "\n Extended section:";
525 for (int i = first_extended_section_index();
526 i <= last_index(INT32, EXTENDED_SECTION); i++) {
527 if (i < last_index(INT64, EXTENDED_SECTION)) {
528 os << "\n [" << i << "]: double: " << get_int64_entry_as_double(i);
529 } else if (i <= last_index(CODE_PTR, EXTENDED_SECTION)) {
530 os << "\n [" << i << "]: code target pointer: "
531 << reinterpret_cast<void*>(get_code_ptr_entry(i));
532 } else if (i <= last_index(HEAP_PTR, EXTENDED_SECTION)) {
533 os << "\n [" << i << "]: heap pointer: "
534 << reinterpret_cast<void*>(get_heap_ptr_entry(i));
535 } else if (i <= last_index(INT32, EXTENDED_SECTION)) {
536 os << "\n [" << i << "]: int32: " << get_int32_entry(i);
537 }
538 }
539 }
540 os << "\n";
541 }
542
543
544 void JSValue::JSValuePrint(std::ostream& os) { // NOLINT 504 void JSValue::JSValuePrint(std::ostream& os) { // NOLINT
545 HeapObject::PrintHeader(os, "ValueObject"); 505 HeapObject::PrintHeader(os, "ValueObject");
546 value()->Print(os); 506 value()->Print(os);
547 } 507 }
548 508
549 509
550 void JSMessageObject::JSMessageObjectPrint(std::ostream& os) { // NOLINT 510 void JSMessageObject::JSMessageObjectPrint(std::ostream& os) { // NOLINT
551 HeapObject::PrintHeader(os, "JSMessageObject"); 511 HeapObject::PrintHeader(os, "JSMessageObject");
552 os << " - type: " << type(); 512 os << " - type: " << type();
553 os << "\n - arguments: " << Brief(argument()); 513 os << "\n - arguments: " << Brief(argument());
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 } 1168 }
1209 } 1169 }
1210 1170
1211 1171
1212 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1172 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1213 TransitionArray::PrintTransitions(os, map()->raw_transitions()); 1173 TransitionArray::PrintTransitions(os, map()->raw_transitions());
1214 } 1174 }
1215 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1175 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1216 } // namespace internal 1176 } // namespace internal
1217 } // namespace v8 1177 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698