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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 break; | 91 break; |
92 case MAP_TYPE: | 92 case MAP_TYPE: |
93 Map::cast(this)->MapPrint(out); | 93 Map::cast(this)->MapPrint(out); |
94 break; | 94 break; |
95 case HEAP_NUMBER_TYPE: | 95 case HEAP_NUMBER_TYPE: |
96 HeapNumber::cast(this)->HeapNumberPrint(out); | 96 HeapNumber::cast(this)->HeapNumberPrint(out); |
97 break; | 97 break; |
98 case FIXED_DOUBLE_ARRAY_TYPE: | 98 case FIXED_DOUBLE_ARRAY_TYPE: |
99 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); | 99 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); |
100 break; | 100 break; |
| 101 case CONSTANT_POOL_ARRAY_TYPE: |
| 102 ConstantPoolArray::cast(this)->ConstantPoolArrayPrint(out); |
| 103 break; |
101 case FIXED_ARRAY_TYPE: | 104 case FIXED_ARRAY_TYPE: |
102 FixedArray::cast(this)->FixedArrayPrint(out); | 105 FixedArray::cast(this)->FixedArrayPrint(out); |
103 break; | 106 break; |
104 case BYTE_ARRAY_TYPE: | 107 case BYTE_ARRAY_TYPE: |
105 ByteArray::cast(this)->ByteArrayPrint(out); | 108 ByteArray::cast(this)->ByteArrayPrint(out); |
106 break; | 109 break; |
107 case FREE_SPACE_TYPE: | 110 case FREE_SPACE_TYPE: |
108 FreeSpace::cast(this)->FreeSpacePrint(out); | 111 FreeSpace::cast(this)->FreeSpacePrint(out); |
109 break; | 112 break; |
110 case EXTERNAL_PIXEL_ARRAY_TYPE: | 113 case EXTERNAL_PIXEL_ARRAY_TYPE: |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 if (is_the_hole(i)) { | 700 if (is_the_hole(i)) { |
698 PrintF(out, "\n [%d]: <the hole>", i); | 701 PrintF(out, "\n [%d]: <the hole>", i); |
699 } else { | 702 } else { |
700 PrintF(out, "\n [%d]: %g", i, get_scalar(i)); | 703 PrintF(out, "\n [%d]: %g", i, get_scalar(i)); |
701 } | 704 } |
702 } | 705 } |
703 PrintF(out, "\n"); | 706 PrintF(out, "\n"); |
704 } | 707 } |
705 | 708 |
706 | 709 |
| 710 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) { |
| 711 HeapObject::PrintHeader(out, "ConstantPoolArray"); |
| 712 PrintF(out, " - length: %d", length()); |
| 713 for (int i = 0; i < length(); i++) { |
| 714 if (i < first_int32_index()) { |
| 715 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); |
| 716 } else { |
| 717 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); |
| 718 } |
| 719 } |
| 720 PrintF(out, "\n"); |
| 721 } |
| 722 |
| 723 |
707 void JSValue::JSValuePrint(FILE* out) { | 724 void JSValue::JSValuePrint(FILE* out) { |
708 HeapObject::PrintHeader(out, "ValueObject"); | 725 HeapObject::PrintHeader(out, "ValueObject"); |
709 value()->Print(out); | 726 value()->Print(out); |
710 } | 727 } |
711 | 728 |
712 | 729 |
713 void JSMessageObject::JSMessageObjectPrint(FILE* out) { | 730 void JSMessageObject::JSMessageObjectPrint(FILE* out) { |
714 HeapObject::PrintHeader(out, "JSMessageObject"); | 731 HeapObject::PrintHeader(out, "JSMessageObject"); |
715 PrintF(out, " - type: "); | 732 PrintF(out, " - type: "); |
716 type()->ShortPrint(out); | 733 type()->ShortPrint(out); |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 } | 1321 } |
1305 } | 1322 } |
1306 PrintF(out, "\n"); | 1323 PrintF(out, "\n"); |
1307 } | 1324 } |
1308 | 1325 |
1309 | 1326 |
1310 #endif // OBJECT_PRINT | 1327 #endif // OBJECT_PRINT |
1311 | 1328 |
1312 | 1329 |
1313 } } // namespace v8::internal | 1330 } } // namespace v8::internal |
OLD | NEW |