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

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

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.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 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
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
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
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
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698