| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 case EXTERNAL_DOUBLE_ELEMENTS: { | 352 case EXTERNAL_DOUBLE_ELEMENTS: { |
| 353 ExternalDoubleArray* p = ExternalDoubleArray::cast(elements()); | 353 ExternalDoubleArray* p = ExternalDoubleArray::cast(elements()); |
| 354 for (int i = 0; i < p->length(); i++) { | 354 for (int i = 0; i < p->length(); i++) { |
| 355 PrintF(out, " %d: %f\n", i, p->get(i)); | 355 PrintF(out, " %d: %f\n", i, p->get(i)); |
| 356 } | 356 } |
| 357 break; | 357 break; |
| 358 } | 358 } |
| 359 case DICTIONARY_ELEMENTS: | 359 case DICTIONARY_ELEMENTS: |
| 360 elements()->Print(out); | 360 elements()->Print(out); |
| 361 break; | 361 break; |
| 362 case NON_STRICT_ARGUMENTS_ELEMENTS: { |
| 363 FixedArray* p = FixedArray::cast(elements()); |
| 364 for (int i = 2; i < p->length(); i++) { |
| 365 PrintF(out, " %d: ", i); |
| 366 p->get(i)->ShortPrint(out); |
| 367 PrintF(out, "\n"); |
| 368 } |
| 369 break; |
| 370 } |
| 362 default: | 371 default: |
| 363 UNREACHABLE(); | 372 UNREACHABLE(); |
| 364 break; | 373 break; |
| 365 } | 374 } |
| 366 } | 375 } |
| 367 | 376 |
| 368 | 377 |
| 369 void JSObject::JSObjectPrint(FILE* out) { | 378 void JSObject::JSObjectPrint(FILE* out) { |
| 370 PrintF(out, "%p: [JSObject]\n", reinterpret_cast<void*>(this)); | 379 PrintF(out, "%p: [JSObject]\n", reinterpret_cast<void*>(this)); |
| 371 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); | 380 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 483 |
| 475 void CodeCache::CodeCachePrint(FILE* out) { | 484 void CodeCache::CodeCachePrint(FILE* out) { |
| 476 HeapObject::PrintHeader(out, "CodeCache"); | 485 HeapObject::PrintHeader(out, "CodeCache"); |
| 477 PrintF(out, "\n - default_cache: "); | 486 PrintF(out, "\n - default_cache: "); |
| 478 default_cache()->ShortPrint(out); | 487 default_cache()->ShortPrint(out); |
| 479 PrintF(out, "\n - normal_type_cache: "); | 488 PrintF(out, "\n - normal_type_cache: "); |
| 480 normal_type_cache()->ShortPrint(out); | 489 normal_type_cache()->ShortPrint(out); |
| 481 } | 490 } |
| 482 | 491 |
| 483 | 492 |
| 493 void PolymorphicCodeCache::PolymorphicCodeCachePrint(FILE* out) { |
| 494 HeapObject::PrintHeader(out, "PolymorphicCodeCache"); |
| 495 PrintF(out, "\n - cache: "); |
| 496 cache()->ShortPrint(out); |
| 497 } |
| 498 |
| 499 |
| 484 void FixedArray::FixedArrayPrint(FILE* out) { | 500 void FixedArray::FixedArrayPrint(FILE* out) { |
| 485 HeapObject::PrintHeader(out, "FixedArray"); | 501 HeapObject::PrintHeader(out, "FixedArray"); |
| 486 PrintF(out, " - length: %d", length()); | 502 PrintF(out, " - length: %d", length()); |
| 487 for (int i = 0; i < length(); i++) { | 503 for (int i = 0; i < length(); i++) { |
| 488 PrintF(out, "\n [%d]: ", i); | 504 PrintF(out, "\n [%d]: ", i); |
| 489 get(i)->ShortPrint(out); | 505 get(i)->ShortPrint(out); |
| 490 } | 506 } |
| 491 PrintF(out, "\n"); | 507 PrintF(out, "\n"); |
| 492 } | 508 } |
| 493 | 509 |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 desc.Print(out); | 845 desc.Print(out); |
| 830 } | 846 } |
| 831 PrintF(out, "\n"); | 847 PrintF(out, "\n"); |
| 832 } | 848 } |
| 833 | 849 |
| 834 | 850 |
| 835 #endif // OBJECT_PRINT | 851 #endif // OBJECT_PRINT |
| 836 | 852 |
| 837 | 853 |
| 838 } } // namespace v8::internal | 854 } } // namespace v8::internal |
| OLD | NEW |