| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 break; | 88 break; |
| 89 case MAP_TYPE: | 89 case MAP_TYPE: |
| 90 Map::cast(this)->MapPrint(out); | 90 Map::cast(this)->MapPrint(out); |
| 91 break; | 91 break; |
| 92 case HEAP_NUMBER_TYPE: | 92 case HEAP_NUMBER_TYPE: |
| 93 HeapNumber::cast(this)->HeapNumberPrint(out); | 93 HeapNumber::cast(this)->HeapNumberPrint(out); |
| 94 break; | 94 break; |
| 95 case FIXED_DOUBLE_ARRAY_TYPE: | 95 case FIXED_DOUBLE_ARRAY_TYPE: |
| 96 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); | 96 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); |
| 97 break; | 97 break; |
| 98 case CONSTANT_POOL_ARRAY_TYPE: |
| 99 ConstantPoolArray::cast(this)->ConstantPoolArrayPrint(out); |
| 100 break; |
| 98 case FIXED_ARRAY_TYPE: | 101 case FIXED_ARRAY_TYPE: |
| 99 FixedArray::cast(this)->FixedArrayPrint(out); | 102 FixedArray::cast(this)->FixedArrayPrint(out); |
| 100 break; | 103 break; |
| 101 case BYTE_ARRAY_TYPE: | 104 case BYTE_ARRAY_TYPE: |
| 102 ByteArray::cast(this)->ByteArrayPrint(out); | 105 ByteArray::cast(this)->ByteArrayPrint(out); |
| 103 break; | 106 break; |
| 104 case FREE_SPACE_TYPE: | 107 case FREE_SPACE_TYPE: |
| 105 FreeSpace::cast(this)->FreeSpacePrint(out); | 108 FreeSpace::cast(this)->FreeSpacePrint(out); |
| 106 break; | 109 break; |
| 107 case EXTERNAL_PIXEL_ARRAY_TYPE: | 110 case EXTERNAL_PIXEL_ARRAY_TYPE: |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 if (is_the_hole(i)) { | 626 if (is_the_hole(i)) { |
| 624 PrintF(out, "\n [%d]: <the hole>", i); | 627 PrintF(out, "\n [%d]: <the hole>", i); |
| 625 } else { | 628 } else { |
| 626 PrintF(out, "\n [%d]: %g", i, get_scalar(i)); | 629 PrintF(out, "\n [%d]: %g", i, get_scalar(i)); |
| 627 } | 630 } |
| 628 } | 631 } |
| 629 PrintF(out, "\n"); | 632 PrintF(out, "\n"); |
| 630 } | 633 } |
| 631 | 634 |
| 632 | 635 |
| 636 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) { |
| 637 HeapObject::PrintHeader(out, "ConstantPoolArray"); |
| 638 PrintF(out, " - length: %d", length()); |
| 639 for (int i = 0; i < length(); i++) { |
| 640 if (i < first_ptr_index()) { |
| 641 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); |
| 642 } else if (i < first_int32_index()) { |
| 643 PrintF(out, "\n [%d]: pointer: %p", i, |
| 644 reinterpret_cast<void*>(get_ptr_entry(i))); |
| 645 } else { |
| 646 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); |
| 647 } |
| 648 } |
| 649 PrintF(out, "\n"); |
| 650 } |
| 651 |
| 652 |
| 633 void JSValue::JSValuePrint(FILE* out) { | 653 void JSValue::JSValuePrint(FILE* out) { |
| 634 HeapObject::PrintHeader(out, "ValueObject"); | 654 HeapObject::PrintHeader(out, "ValueObject"); |
| 635 value()->Print(out); | 655 value()->Print(out); |
| 636 } | 656 } |
| 637 | 657 |
| 638 | 658 |
| 639 void JSMessageObject::JSMessageObjectPrint(FILE* out) { | 659 void JSMessageObject::JSMessageObjectPrint(FILE* out) { |
| 640 HeapObject::PrintHeader(out, "JSMessageObject"); | 660 HeapObject::PrintHeader(out, "JSMessageObject"); |
| 641 PrintF(out, " - type: "); | 661 PrintF(out, " - type: "); |
| 642 type()->ShortPrint(out); | 662 type()->ShortPrint(out); |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 } | 1256 } |
| 1237 } | 1257 } |
| 1238 PrintF(out, "\n"); | 1258 PrintF(out, "\n"); |
| 1239 } | 1259 } |
| 1240 | 1260 |
| 1241 | 1261 |
| 1242 #endif // OBJECT_PRINT | 1262 #endif // OBJECT_PRINT |
| 1243 | 1263 |
| 1244 | 1264 |
| 1245 } } // namespace v8::internal | 1265 } } // namespace v8::internal |
| OLD | NEW |