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

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

Issue 8139027: Version 3.6.5 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 9 years, 2 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return; 75 return;
76 } 76 }
77 77
78 switch (instance_type) { 78 switch (instance_type) {
79 case MAP_TYPE: 79 case MAP_TYPE:
80 Map::cast(this)->MapPrint(out); 80 Map::cast(this)->MapPrint(out);
81 break; 81 break;
82 case HEAP_NUMBER_TYPE: 82 case HEAP_NUMBER_TYPE:
83 HeapNumber::cast(this)->HeapNumberPrint(out); 83 HeapNumber::cast(this)->HeapNumberPrint(out);
84 break; 84 break;
85 case FIXED_DOUBLE_ARRAY_TYPE:
86 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out);
87 break;
85 case FIXED_ARRAY_TYPE: 88 case FIXED_ARRAY_TYPE:
86 FixedArray::cast(this)->FixedArrayPrint(out); 89 FixedArray::cast(this)->FixedArrayPrint(out);
87 break; 90 break;
88 case BYTE_ARRAY_TYPE: 91 case BYTE_ARRAY_TYPE:
89 ByteArray::cast(this)->ByteArrayPrint(out); 92 ByteArray::cast(this)->ByteArrayPrint(out);
90 break; 93 break;
94 case FREE_SPACE_TYPE:
95 FreeSpace::cast(this)->FreeSpacePrint(out);
96 break;
91 case EXTERNAL_PIXEL_ARRAY_TYPE: 97 case EXTERNAL_PIXEL_ARRAY_TYPE:
92 ExternalPixelArray::cast(this)->ExternalPixelArrayPrint(out); 98 ExternalPixelArray::cast(this)->ExternalPixelArrayPrint(out);
93 break; 99 break;
94 case EXTERNAL_BYTE_ARRAY_TYPE: 100 case EXTERNAL_BYTE_ARRAY_TYPE:
95 ExternalByteArray::cast(this)->ExternalByteArrayPrint(out); 101 ExternalByteArray::cast(this)->ExternalByteArrayPrint(out);
96 break; 102 break;
97 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: 103 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE:
98 ExternalUnsignedByteArray::cast(this) 104 ExternalUnsignedByteArray::cast(this)
99 ->ExternalUnsignedByteArrayPrint(out); 105 ->ExternalUnsignedByteArrayPrint(out);
100 break; 106 break;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 break; 188 break;
183 } 189 }
184 } 190 }
185 191
186 192
187 void ByteArray::ByteArrayPrint(FILE* out) { 193 void ByteArray::ByteArrayPrint(FILE* out) {
188 PrintF(out, "byte array, data starts at %p", GetDataStartAddress()); 194 PrintF(out, "byte array, data starts at %p", GetDataStartAddress());
189 } 195 }
190 196
191 197
198 void FreeSpace::FreeSpacePrint(FILE* out) {
199 PrintF(out, "free space, size %d", Size());
200 }
201
202
192 void ExternalPixelArray::ExternalPixelArrayPrint(FILE* out) { 203 void ExternalPixelArray::ExternalPixelArrayPrint(FILE* out) {
193 PrintF(out, "external pixel array"); 204 PrintF(out, "external pixel array");
194 } 205 }
195 206
196 207
197 void ExternalByteArray::ExternalByteArrayPrint(FILE* out) { 208 void ExternalByteArray::ExternalByteArrayPrint(FILE* out) {
198 PrintF(out, "external byte array"); 209 PrintF(out, "external byte array");
199 } 210 }
200 211
201 212
(...skipping 25 matching lines...) Expand all
227 void ExternalFloatArray::ExternalFloatArrayPrint(FILE* out) { 238 void ExternalFloatArray::ExternalFloatArrayPrint(FILE* out) {
228 PrintF(out, "external float array"); 239 PrintF(out, "external float array");
229 } 240 }
230 241
231 242
232 void ExternalDoubleArray::ExternalDoubleArrayPrint(FILE* out) { 243 void ExternalDoubleArray::ExternalDoubleArrayPrint(FILE* out) {
233 PrintF(out, "external double array"); 244 PrintF(out, "external double array");
234 } 245 }
235 246
236 247
248 static void PrintElementsKind(FILE* out, ElementsKind kind) {
249 switch (kind) {
250 case FAST_SMI_ONLY_ELEMENTS:
251 PrintF(out, "FAST_SMI_ONLY_ELEMENTS");
252 break;
253 case FAST_ELEMENTS:
254 PrintF(out, "FAST_ELEMENTS");
255 break;
256 case FAST_DOUBLE_ELEMENTS:
257 PrintF(out, "FAST_DOUBLE_ELEMENTS");
258 break;
259 case DICTIONARY_ELEMENTS:
260 PrintF(out, "DICTIONARY_ELEMENTS");
261 break;
262 case NON_STRICT_ARGUMENTS_ELEMENTS:
263 PrintF(out, "NON_STRICT_ARGUMENTS_ELEMENTS");
264 break;
265 case EXTERNAL_BYTE_ELEMENTS:
266 PrintF(out, "EXTERNAL_BYTE_ELEMENTS");
267 break;
268 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
269 PrintF(out, "EXTERNAL_UNSIGNED_BYTE_ELEMENTS");
270 break;
271 case EXTERNAL_SHORT_ELEMENTS:
272 PrintF(out, "EXTERNAL_SHORT_ELEMENTS");
273 break;
274 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
275 PrintF(out, "EXTERNAL_UNSIGNED_SHORT_ELEMENTS");
276 break;
277 case EXTERNAL_INT_ELEMENTS:
278 PrintF(out, "EXTERNAL_INT_ELEMENTS");
279 break;
280 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
281 PrintF(out, "EXTERNAL_UNSIGNED_INT_ELEMENTS");
282 break;
283 case EXTERNAL_FLOAT_ELEMENTS:
284 PrintF(out, "EXTERNAL_FLOAT_ELEMENTS");
285 break;
286 case EXTERNAL_DOUBLE_ELEMENTS:
287 PrintF(out, "EXTERNAL_DOUBLE_ELEMENTS");
288 break;
289 case EXTERNAL_PIXEL_ELEMENTS:
290 PrintF(out, "EXTERNAL_DOUBLE_ELEMENTS");
291 break;
292 }
293 }
294
295
237 void JSObject::PrintProperties(FILE* out) { 296 void JSObject::PrintProperties(FILE* out) {
238 if (HasFastProperties()) { 297 if (HasFastProperties()) {
239 DescriptorArray* descs = map()->instance_descriptors(); 298 DescriptorArray* descs = map()->instance_descriptors();
240 for (int i = 0; i < descs->number_of_descriptors(); i++) { 299 for (int i = 0; i < descs->number_of_descriptors(); i++) {
241 PrintF(out, " "); 300 PrintF(out, " ");
242 descs->GetKey(i)->StringPrint(out); 301 descs->GetKey(i)->StringPrint(out);
243 PrintF(out, ": "); 302 PrintF(out, ": ");
244 switch (descs->GetType(i)) { 303 switch (descs->GetType(i)) {
245 case FIELD: { 304 case FIELD: {
246 int index = descs->GetFieldIndex(i); 305 int index = descs->GetFieldIndex(i);
247 FastPropertyAt(index)->ShortPrint(out); 306 FastPropertyAt(index)->ShortPrint(out);
248 PrintF(out, " (field at offset %d)\n", index); 307 PrintF(out, " (field at offset %d)\n", index);
249 break; 308 break;
250 } 309 }
251 case CONSTANT_FUNCTION: 310 case CONSTANT_FUNCTION:
252 descs->GetConstantFunction(i)->ShortPrint(out); 311 descs->GetConstantFunction(i)->ShortPrint(out);
253 PrintF(out, " (constant function)\n"); 312 PrintF(out, " (constant function)\n");
254 break; 313 break;
255 case CALLBACKS: 314 case CALLBACKS:
256 descs->GetCallbacksObject(i)->ShortPrint(out); 315 descs->GetCallbacksObject(i)->ShortPrint(out);
257 PrintF(out, " (callback)\n"); 316 PrintF(out, " (callback)\n");
258 break; 317 break;
318 case ELEMENTS_TRANSITION: {
319 PrintF(out, "(elements transition to ");
320 Object* descriptor_contents = descs->GetValue(i);
321 if (descriptor_contents->IsMap()) {
322 Map* map = Map::cast(descriptor_contents);
323 PrintElementsKind(out, map->elements_kind());
324 } else {
325 FixedArray* map_array = FixedArray::cast(descriptor_contents);
326 for (int i = 0; i < map_array->length(); ++i) {
327 Map* map = Map::cast(map_array->get(i));
328 if (i != 0) {
329 PrintF(out, ", ");
330 }
331 PrintElementsKind(out, map->elements_kind());
332 }
333 }
334 PrintF(out, ")\n");
335 break;
336 }
259 case MAP_TRANSITION: 337 case MAP_TRANSITION:
260 PrintF(out, " (map transition)\n"); 338 PrintF(out, "(map transition)\n");
261 break; 339 break;
262 case CONSTANT_TRANSITION: 340 case CONSTANT_TRANSITION:
263 PrintF(out, " (constant transition)\n"); 341 PrintF(out, "(constant transition)\n");
264 break; 342 break;
265 case NULL_DESCRIPTOR: 343 case NULL_DESCRIPTOR:
266 PrintF(out, " (null descriptor)\n"); 344 PrintF(out, "(null descriptor)\n");
267 break; 345 break;
268 default: 346 default:
269 UNREACHABLE(); 347 UNREACHABLE();
270 break; 348 break;
271 } 349 }
272 } 350 }
273 } else { 351 } else {
274 property_dictionary()->Print(out); 352 property_dictionary()->Print(out);
275 } 353 }
276 } 354 }
277 355
278 356
279 void JSObject::PrintElements(FILE* out) { 357 void JSObject::PrintElements(FILE* out) {
280 switch (GetElementsKind()) { 358 // Don't call GetElementsKind, its validation code can cause the printer to
359 // fail when debugging.
360 switch (map()->elements_kind()) {
361 case FAST_SMI_ONLY_ELEMENTS:
281 case FAST_ELEMENTS: { 362 case FAST_ELEMENTS: {
282 // Print in array notation for non-sparse arrays. 363 // Print in array notation for non-sparse arrays.
283 FixedArray* p = FixedArray::cast(elements()); 364 FixedArray* p = FixedArray::cast(elements());
284 for (int i = 0; i < p->length(); i++) { 365 for (int i = 0; i < p->length(); i++) {
285 PrintF(out, " %d: ", i); 366 PrintF(out, " %d: ", i);
286 p->get(i)->ShortPrint(out); 367 p->get(i)->ShortPrint(out);
287 PrintF(out, "\n"); 368 PrintF(out, "\n");
288 } 369 }
289 break; 370 break;
290 } 371 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 PrintF(out, "\n"); 459 PrintF(out, "\n");
379 } 460 }
380 break; 461 break;
381 } 462 }
382 } 463 }
383 } 464 }
384 465
385 466
386 void JSObject::JSObjectPrint(FILE* out) { 467 void JSObject::JSObjectPrint(FILE* out) {
387 PrintF(out, "%p: [JSObject]\n", reinterpret_cast<void*>(this)); 468 PrintF(out, "%p: [JSObject]\n", reinterpret_cast<void*>(this));
388 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 469 PrintF(out, " - map = %p [", reinterpret_cast<void*>(map()));
389 PrintF(out, " - prototype = %p\n", reinterpret_cast<void*>(GetPrototype())); 470 // Don't call GetElementsKind, its validation code can cause the printer to
471 // fail when debugging.
472 PrintElementsKind(out, this->map()->elements_kind());
473 PrintF(out,
474 "]\n - prototype = %p\n",
475 reinterpret_cast<void*>(GetPrototype()));
390 PrintF(out, " {\n"); 476 PrintF(out, " {\n");
391 PrintProperties(out); 477 PrintProperties(out);
392 PrintElements(out); 478 PrintElements(out);
393 PrintF(out, " }\n"); 479 PrintF(out, " }\n");
394 } 480 }
395 481
396 482
397 static const char* TypeToString(InstanceType type) { 483 static const char* TypeToString(InstanceType type) {
398 switch (type) { 484 switch (type) {
399 case INVALID_TYPE: return "INVALID"; 485 case INVALID_TYPE: return "INVALID";
400 case MAP_TYPE: return "MAP"; 486 case MAP_TYPE: return "MAP";
401 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; 487 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER";
402 case SYMBOL_TYPE: return "SYMBOL"; 488 case SYMBOL_TYPE: return "SYMBOL";
403 case ASCII_SYMBOL_TYPE: return "ASCII_SYMBOL"; 489 case ASCII_SYMBOL_TYPE: return "ASCII_SYMBOL";
404 case CONS_SYMBOL_TYPE: return "CONS_SYMBOL"; 490 case CONS_SYMBOL_TYPE: return "CONS_SYMBOL";
405 case CONS_ASCII_SYMBOL_TYPE: return "CONS_ASCII_SYMBOL"; 491 case CONS_ASCII_SYMBOL_TYPE: return "CONS_ASCII_SYMBOL";
406 case EXTERNAL_ASCII_SYMBOL_TYPE: 492 case EXTERNAL_ASCII_SYMBOL_TYPE:
407 case EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE: 493 case EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE:
408 case EXTERNAL_SYMBOL_TYPE: return "EXTERNAL_SYMBOL"; 494 case EXTERNAL_SYMBOL_TYPE: return "EXTERNAL_SYMBOL";
409 case ASCII_STRING_TYPE: return "ASCII_STRING"; 495 case ASCII_STRING_TYPE: return "ASCII_STRING";
410 case STRING_TYPE: return "TWO_BYTE_STRING"; 496 case STRING_TYPE: return "TWO_BYTE_STRING";
411 case CONS_STRING_TYPE: 497 case CONS_STRING_TYPE:
412 case CONS_ASCII_STRING_TYPE: return "CONS_STRING"; 498 case CONS_ASCII_STRING_TYPE: return "CONS_STRING";
413 case EXTERNAL_ASCII_STRING_TYPE: 499 case EXTERNAL_ASCII_STRING_TYPE:
414 case EXTERNAL_STRING_WITH_ASCII_DATA_TYPE: 500 case EXTERNAL_STRING_WITH_ASCII_DATA_TYPE:
415 case EXTERNAL_STRING_TYPE: return "EXTERNAL_STRING"; 501 case EXTERNAL_STRING_TYPE: return "EXTERNAL_STRING";
416 case FIXED_ARRAY_TYPE: return "FIXED_ARRAY"; 502 case FIXED_ARRAY_TYPE: return "FIXED_ARRAY";
417 case BYTE_ARRAY_TYPE: return "BYTE_ARRAY"; 503 case BYTE_ARRAY_TYPE: return "BYTE_ARRAY";
504 case FREE_SPACE_TYPE: return "FREE_SPACE";
418 case EXTERNAL_PIXEL_ARRAY_TYPE: return "EXTERNAL_PIXEL_ARRAY"; 505 case EXTERNAL_PIXEL_ARRAY_TYPE: return "EXTERNAL_PIXEL_ARRAY";
419 case EXTERNAL_BYTE_ARRAY_TYPE: return "EXTERNAL_BYTE_ARRAY"; 506 case EXTERNAL_BYTE_ARRAY_TYPE: return "EXTERNAL_BYTE_ARRAY";
420 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: 507 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE:
421 return "EXTERNAL_UNSIGNED_BYTE_ARRAY"; 508 return "EXTERNAL_UNSIGNED_BYTE_ARRAY";
422 case EXTERNAL_SHORT_ARRAY_TYPE: return "EXTERNAL_SHORT_ARRAY"; 509 case EXTERNAL_SHORT_ARRAY_TYPE: return "EXTERNAL_SHORT_ARRAY";
423 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE: 510 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE:
424 return "EXTERNAL_UNSIGNED_SHORT_ARRAY"; 511 return "EXTERNAL_UNSIGNED_SHORT_ARRAY";
425 case EXTERNAL_INT_ARRAY_TYPE: return "EXTERNAL_INT_ARRAY"; 512 case EXTERNAL_INT_ARRAY_TYPE: return "EXTERNAL_INT_ARRAY";
426 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: 513 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
427 return "EXTERNAL_UNSIGNED_INT_ARRAY"; 514 return "EXTERNAL_UNSIGNED_INT_ARRAY";
(...skipping 23 matching lines...) Expand all
451 default: return "UNKNOWN"; 538 default: return "UNKNOWN";
452 } 539 }
453 } 540 }
454 541
455 542
456 void Map::MapPrint(FILE* out) { 543 void Map::MapPrint(FILE* out) {
457 HeapObject::PrintHeader(out, "Map"); 544 HeapObject::PrintHeader(out, "Map");
458 PrintF(out, " - type: %s\n", TypeToString(instance_type())); 545 PrintF(out, " - type: %s\n", TypeToString(instance_type()));
459 PrintF(out, " - instance size: %d\n", instance_size()); 546 PrintF(out, " - instance size: %d\n", instance_size());
460 PrintF(out, " - inobject properties: %d\n", inobject_properties()); 547 PrintF(out, " - inobject properties: %d\n", inobject_properties());
461 PrintF(out, " - pre-allocated property fields: %d\n", 548 PrintF(out, " - elements kind: ");
549 PrintElementsKind(out, elements_kind());
550 PrintF(out, "\n - pre-allocated property fields: %d\n",
462 pre_allocated_property_fields()); 551 pre_allocated_property_fields());
463 PrintF(out, " - unused property fields: %d\n", unused_property_fields()); 552 PrintF(out, " - unused property fields: %d\n", unused_property_fields());
464 if (is_hidden_prototype()) { 553 if (is_hidden_prototype()) {
465 PrintF(out, " - hidden_prototype\n"); 554 PrintF(out, " - hidden_prototype\n");
466 } 555 }
467 if (has_named_interceptor()) { 556 if (has_named_interceptor()) {
468 PrintF(out, " - named_interceptor\n"); 557 PrintF(out, " - named_interceptor\n");
469 } 558 }
470 if (has_indexed_interceptor()) { 559 if (has_indexed_interceptor()) {
471 PrintF(out, " - indexed_interceptor\n"); 560 PrintF(out, " - indexed_interceptor\n");
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 HeapObject::PrintHeader(out, "FixedArray"); 598 HeapObject::PrintHeader(out, "FixedArray");
510 PrintF(out, " - length: %d", length()); 599 PrintF(out, " - length: %d", length());
511 for (int i = 0; i < length(); i++) { 600 for (int i = 0; i < length(); i++) {
512 PrintF(out, "\n [%d]: ", i); 601 PrintF(out, "\n [%d]: ", i);
513 get(i)->ShortPrint(out); 602 get(i)->ShortPrint(out);
514 } 603 }
515 PrintF(out, "\n"); 604 PrintF(out, "\n");
516 } 605 }
517 606
518 607
608 void FixedDoubleArray::FixedDoubleArrayPrint(FILE* out) {
609 HeapObject::PrintHeader(out, "FixedDoubleArray");
610 PrintF(out, " - length: %d", length());
611 for (int i = 0; i < length(); i++) {
612 PrintF(out, "\n [%d]: %g", i, get_scalar(i));
613 }
614 PrintF(out, "\n");
615 }
616
617
519 void JSValue::JSValuePrint(FILE* out) { 618 void JSValue::JSValuePrint(FILE* out) {
520 HeapObject::PrintHeader(out, "ValueObject"); 619 HeapObject::PrintHeader(out, "ValueObject");
521 value()->Print(out); 620 value()->Print(out);
522 } 621 }
523 622
524 623
525 void JSMessageObject::JSMessageObjectPrint(FILE* out) { 624 void JSMessageObject::JSMessageObjectPrint(FILE* out) {
526 HeapObject::PrintHeader(out, "JSMessageObject"); 625 HeapObject::PrintHeader(out, "JSMessageObject");
527 PrintF(out, " - type: "); 626 PrintF(out, " - type: ");
528 type()->ShortPrint(out); 627 type()->ShortPrint(out);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 buffer[length()] = 0; 679 buffer[length()] = 0;
581 return buffer; 680 return buffer;
582 } 681 }
583 682
584 683
585 void JSProxy::JSProxyPrint(FILE* out) { 684 void JSProxy::JSProxyPrint(FILE* out) {
586 HeapObject::PrintHeader(out, "JSProxy"); 685 HeapObject::PrintHeader(out, "JSProxy");
587 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 686 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
588 PrintF(out, " - handler = "); 687 PrintF(out, " - handler = ");
589 handler()->Print(out); 688 handler()->Print(out);
689 PrintF(out, " - hash = ");
690 hash()->Print(out);
590 PrintF(out, "\n"); 691 PrintF(out, "\n");
591 } 692 }
592 693
593 694
594 void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) { 695 void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) {
595 HeapObject::PrintHeader(out, "JSFunctionProxy"); 696 HeapObject::PrintHeader(out, "JSFunctionProxy");
596 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 697 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
597 PrintF(out, " - handler = "); 698 PrintF(out, " - handler = ");
598 handler()->Print(out); 699 handler()->Print(out);
599 PrintF(out, " - call_trap = "); 700 PrintF(out, " - call_trap = ");
600 call_trap()->Print(out); 701 call_trap()->Print(out);
601 PrintF(out, " - construct_trap = "); 702 PrintF(out, " - construct_trap = ");
602 construct_trap()->Print(out); 703 construct_trap()->Print(out);
603 PrintF(out, "\n"); 704 PrintF(out, "\n");
604 } 705 }
605 706
606 707
607 void JSWeakMap::JSWeakMapPrint(FILE* out) { 708 void JSWeakMap::JSWeakMapPrint(FILE* out) {
608 HeapObject::PrintHeader(out, "JSWeakMap"); 709 HeapObject::PrintHeader(out, "JSWeakMap");
609 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 710 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
610 PrintF(out, " - number of elements = %d\n", table()->NumberOfElements());
611 PrintF(out, " - table = "); 711 PrintF(out, " - table = ");
612 table()->ShortPrint(out); 712 table()->ShortPrint(out);
613 PrintF(out, "\n"); 713 PrintF(out, "\n");
614 } 714 }
615 715
616 716
617 void JSFunction::JSFunctionPrint(FILE* out) { 717 void JSFunction::JSFunctionPrint(FILE* out) {
618 HeapObject::PrintHeader(out, "Function"); 718 HeapObject::PrintHeader(out, "Function");
619 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 719 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
620 PrintF(out, " - initial_map = "); 720 PrintF(out, " - initial_map = ");
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 PrintF(out, "\n - hidden_prototype: %s", 895 PrintF(out, "\n - hidden_prototype: %s",
796 hidden_prototype() ? "true" : "false"); 896 hidden_prototype() ? "true" : "false");
797 PrintF(out, "\n - undetectable: %s", undetectable() ? "true" : "false"); 897 PrintF(out, "\n - undetectable: %s", undetectable() ? "true" : "false");
798 PrintF(out, "\n - need_access_check: %s", 898 PrintF(out, "\n - need_access_check: %s",
799 needs_access_check() ? "true" : "false"); 899 needs_access_check() ? "true" : "false");
800 } 900 }
801 901
802 902
803 void ObjectTemplateInfo::ObjectTemplateInfoPrint(FILE* out) { 903 void ObjectTemplateInfo::ObjectTemplateInfoPrint(FILE* out) {
804 HeapObject::PrintHeader(out, "ObjectTemplateInfo"); 904 HeapObject::PrintHeader(out, "ObjectTemplateInfo");
905 PrintF(out, " - tag: ");
906 tag()->ShortPrint(out);
907 PrintF(out, "\n - property_list: ");
908 property_list()->ShortPrint(out);
805 PrintF(out, "\n - constructor: "); 909 PrintF(out, "\n - constructor: ");
806 constructor()->ShortPrint(out); 910 constructor()->ShortPrint(out);
807 PrintF(out, "\n - internal_field_count: "); 911 PrintF(out, "\n - internal_field_count: ");
808 internal_field_count()->ShortPrint(out); 912 internal_field_count()->ShortPrint(out);
913 PrintF(out, "\n");
809 } 914 }
810 915
811 916
812 void SignatureInfo::SignatureInfoPrint(FILE* out) { 917 void SignatureInfo::SignatureInfoPrint(FILE* out) {
813 HeapObject::PrintHeader(out, "SignatureInfo"); 918 HeapObject::PrintHeader(out, "SignatureInfo");
814 PrintF(out, "\n - receiver: "); 919 PrintF(out, "\n - receiver: ");
815 receiver()->ShortPrint(out); 920 receiver()->ShortPrint(out);
816 PrintF(out, "\n - args: "); 921 PrintF(out, "\n - args: ");
817 args()->ShortPrint(out); 922 args()->ShortPrint(out);
818 } 923 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 desc.Print(out); 996 desc.Print(out);
892 } 997 }
893 PrintF(out, "\n"); 998 PrintF(out, "\n");
894 } 999 }
895 1000
896 1001
897 #endif // OBJECT_PRINT 1002 #endif // OBJECT_PRINT
898 1003
899 1004
900 } } // namespace v8::internal 1005 } } // 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