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

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

Issue 1666673002: Version 4.10.145.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.10.145
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/builtins-ppc.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 15 matching lines...) Expand all
26 void Object::Print(std::ostream& os) { // NOLINT 26 void Object::Print(std::ostream& os) { // NOLINT
27 if (IsSmi()) { 27 if (IsSmi()) {
28 Smi::cast(this)->SmiPrint(os); 28 Smi::cast(this)->SmiPrint(os);
29 } else { 29 } else {
30 HeapObject::cast(this)->HeapObjectPrint(os); 30 HeapObject::cast(this)->HeapObjectPrint(os);
31 } 31 }
32 } 32 }
33 33
34 34
35 void HeapObject::PrintHeader(std::ostream& os, const char* id) { // NOLINT 35 void HeapObject::PrintHeader(std::ostream& os, const char* id) { // NOLINT
36 os << reinterpret_cast<void*>(this) << ": [" << id << "]"; 36 os << reinterpret_cast<void*>(this) << ": [" << id << "]\n";
37 } 37 }
38 38
39 39
40 void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT 40 void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
41 InstanceType instance_type = map()->instance_type(); 41 InstanceType instance_type = map()->instance_type();
42 42
43 HandleScope scope(GetIsolate()); 43 HandleScope scope(GetIsolate());
44 if (instance_type < FIRST_NONSTRING_TYPE) { 44 if (instance_type < FIRST_NONSTRING_TYPE) {
45 String::cast(this)->StringPrint(os); 45 String::cast(this)->StringPrint(os);
46 return; 46 return;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 } 393 }
394 394
395 395
396 static void JSObjectPrintHeader(std::ostream& os, JSObject* obj, 396 static void JSObjectPrintHeader(std::ostream& os, JSObject* obj,
397 const char* id) { // NOLINT 397 const char* id) { // NOLINT
398 obj->PrintHeader(os, id); 398 obj->PrintHeader(os, id);
399 // Don't call GetElementsKind, its validation code can cause the printer to 399 // Don't call GetElementsKind, its validation code can cause the printer to
400 // fail when debugging. 400 // fail when debugging.
401 PrototypeIterator iter(obj->GetIsolate(), obj); 401 PrototypeIterator iter(obj->GetIsolate(), obj);
402 os << "\n - map = " << reinterpret_cast<void*>(obj->map()) << " [" 402 os << " - map = " << reinterpret_cast<void*>(obj->map()) << " ["
403 << ElementsKindToString(obj->map()->elements_kind()) 403 << ElementsKindToString(obj->map()->elements_kind())
404 << "]\n - prototype = " << reinterpret_cast<void*>(iter.GetCurrent()); 404 << "]\n - prototype = " << reinterpret_cast<void*>(iter.GetCurrent());
405 } 405 }
406 406
407 407
408 static void JSObjectPrintBody(std::ostream& os, JSObject* obj, // NOLINT 408 static void JSObjectPrintBody(std::ostream& os, JSObject* obj, // NOLINT
409 bool print_elements = true) { 409 bool print_elements = true) {
410 os << "\n {"; 410 os << "\n {";
411 obj->PrintProperties(os); 411 obj->PrintProperties(os);
412 obj->PrintTransitions(os); 412 obj->PrintTransitions(os);
(...skipping 18 matching lines...) Expand all
431 void JSModule::JSModulePrint(std::ostream& os) { // NOLINT 431 void JSModule::JSModulePrint(std::ostream& os) { // NOLINT
432 JSObjectPrintHeader(os, this, "JSModule"); 432 JSObjectPrintHeader(os, this, "JSModule");
433 os << "\n - context = " << Brief(context()); 433 os << "\n - context = " << Brief(context());
434 os << " - scope_info = " << Brief(scope_info()); 434 os << " - scope_info = " << Brief(scope_info());
435 JSObjectPrintBody(os, this); 435 JSObjectPrintBody(os, this);
436 } 436 }
437 437
438 438
439 void Symbol::SymbolPrint(std::ostream& os) { // NOLINT 439 void Symbol::SymbolPrint(std::ostream& os) { // NOLINT
440 HeapObject::PrintHeader(os, "Symbol"); 440 HeapObject::PrintHeader(os, "Symbol");
441 os << "\n - hash: " << Hash(); 441 os << " - hash: " << Hash();
442 os << "\n - name: " << Brief(name()); 442 os << "\n - name: " << Brief(name());
443 if (name()->IsUndefined()) { 443 if (name()->IsUndefined()) {
444 os << " (" << PrivateSymbolToName() << ")"; 444 os << " (" << PrivateSymbolToName() << ")";
445 } 445 }
446 os << "\n - private: " << is_private(); 446 os << "\n - private: " << is_private();
447 os << "\n"; 447 os << "\n";
448 } 448 }
449 449
450 450
451 void Map::MapPrint(std::ostream& os) { // NOLINT 451 void Map::MapPrint(std::ostream& os) { // NOLINT
452 HeapObject::PrintHeader(os, "Map"); 452 HeapObject::PrintHeader(os, "Map");
453 os << "\n - type: " << instance_type(); 453 os << " - type: " << instance_type() << "\n";
454 os << "\n - instance size: " << instance_size(); 454 os << " - instance size: " << instance_size() << "\n";
455 if (IsJSObjectMap()) { 455 if (IsJSObjectMap()) {
456 os << "\n - inobject properties: " << GetInObjectProperties(); 456 os << " - inobject properties: " << GetInObjectProperties() << "\n";
457 } 457 }
458 os << "\n - elements kind: " << ElementsKindToString(elements_kind()); 458 os << " - elements kind: " << ElementsKindToString(elements_kind()) << "\n";
459 os << "\n - unused property fields: " << unused_property_fields(); 459 os << " - unused property fields: " << unused_property_fields() << "\n";
460 if (is_deprecated()) os << "\n - deprecated_map"; 460 if (is_deprecated()) os << " - deprecated_map\n";
461 if (is_stable()) os << "\n - stable_map"; 461 if (is_stable()) os << " - stable_map\n";
462 if (is_dictionary_map()) os << "\n - dictionary_map"; 462 if (is_dictionary_map()) os << " - dictionary_map\n";
463 if (is_hidden_prototype()) os << "\n - hidden_prototype"; 463 if (is_hidden_prototype()) os << " - hidden_prototype\n";
464 if (has_named_interceptor()) os << " - named_interceptor"; 464 if (has_named_interceptor()) os << " - named_interceptor\n";
465 if (has_indexed_interceptor()) os << "\n - indexed_interceptor"; 465 if (has_indexed_interceptor()) os << " - indexed_interceptor\n";
466 if (is_undetectable()) os << "\n - undetectable"; 466 if (is_undetectable()) os << " - undetectable\n";
467 if (is_callable()) os << "\n - callable"; 467 if (is_callable()) os << " - callable\n";
468 if (is_constructor()) os << "\n - constructor"; 468 if (is_constructor()) os << " - constructor\n";
469 if (is_access_check_needed()) os << "\n - access_check_needed"; 469 if (is_access_check_needed()) os << " - access_check_needed\n";
470 if (!is_extensible()) os << "\n - non-extensible"; 470 if (!is_extensible()) os << " - non-extensible\n";
471 if (is_observed()) os << "\n - observed"; 471 if (is_observed()) os << " - observed\n";
472 if (is_strong()) os << "\n - strong_map"; 472 if (is_strong()) os << " - strong_map\n";
473 if (is_prototype_map()) { 473 if (is_prototype_map()) {
474 os << "\n - prototype_map"; 474 os << " - prototype_map\n";
475 os << "\n - prototype info: " << Brief(prototype_info()); 475 os << " - prototype info: " << Brief(prototype_info());
476 } else { 476 } else {
477 os << "\n - back pointer: " << Brief(GetBackPointer()); 477 os << " - back pointer: " << Brief(GetBackPointer());
478 } 478 }
479 os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "") 479 os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "")
480 << "#" << NumberOfOwnDescriptors() << ": " 480 << "#" << NumberOfOwnDescriptors() << ": "
481 << Brief(instance_descriptors()); 481 << Brief(instance_descriptors());
482 if (FLAG_unbox_double_fields) { 482 if (FLAG_unbox_double_fields) {
483 os << "\n - layout descriptor: " << Brief(layout_descriptor()); 483 os << "\n - layout descriptor: " << Brief(layout_descriptor());
484 } 484 }
485 int nof_transitions = TransitionArray::NumberOfTransitions(raw_transitions()); 485 int nof_transitions = TransitionArray::NumberOfTransitions(raw_transitions());
486 if (nof_transitions > 0) { 486 if (nof_transitions > 0) {
487 os << "\n - transitions #" << nof_transitions << ": " 487 os << "\n - transitions #" << nof_transitions << ": "
(...skipping 18 matching lines...) Expand all
506 506
507 void PolymorphicCodeCache::PolymorphicCodeCachePrint( 507 void PolymorphicCodeCache::PolymorphicCodeCachePrint(
508 std::ostream& os) { // NOLINT 508 std::ostream& os) { // NOLINT
509 HeapObject::PrintHeader(os, "PolymorphicCodeCache"); 509 HeapObject::PrintHeader(os, "PolymorphicCodeCache");
510 os << "\n - cache: " << Brief(cache()); 510 os << "\n - cache: " << Brief(cache());
511 } 511 }
512 512
513 513
514 void TypeFeedbackInfo::TypeFeedbackInfoPrint(std::ostream& os) { // NOLINT 514 void TypeFeedbackInfo::TypeFeedbackInfoPrint(std::ostream& os) { // NOLINT
515 HeapObject::PrintHeader(os, "TypeFeedbackInfo"); 515 HeapObject::PrintHeader(os, "TypeFeedbackInfo");
516 os << "\n - ic_total_count: " << ic_total_count() 516 os << " - ic_total_count: " << ic_total_count()
517 << ", ic_with_type_info_count: " << ic_with_type_info_count() 517 << ", ic_with_type_info_count: " << ic_with_type_info_count()
518 << ", ic_generic_count: " << ic_generic_count() << "\n"; 518 << ", ic_generic_count: " << ic_generic_count() << "\n";
519 } 519 }
520 520
521 521
522 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint( 522 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(
523 std::ostream& os) { // NOLINT 523 std::ostream& os) { // NOLINT
524 HeapObject::PrintHeader(os, "AliasedArgumentsEntry"); 524 HeapObject::PrintHeader(os, "AliasedArgumentsEntry");
525 os << "\n - aliased_context_slot: " << aliased_context_slot(); 525 os << "\n - aliased_context_slot: " << aliased_context_slot();
526 } 526 }
527 527
528 528
529 void FixedArray::FixedArrayPrint(std::ostream& os) { // NOLINT 529 void FixedArray::FixedArrayPrint(std::ostream& os) { // NOLINT
530 HeapObject::PrintHeader(os, "FixedArray"); 530 HeapObject::PrintHeader(os, "FixedArray");
531 os << "\n - length: " << length(); 531 os << " - length: " << length();
532 for (int i = 0; i < length(); i++) { 532 for (int i = 0; i < length(); i++) {
533 os << "\n [" << i << "]: " << Brief(get(i)); 533 os << "\n [" << i << "]: " << Brief(get(i));
534 } 534 }
535 os << "\n"; 535 os << "\n";
536 } 536 }
537 537
538 538
539 void FixedDoubleArray::FixedDoubleArrayPrint(std::ostream& os) { // NOLINT 539 void FixedDoubleArray::FixedDoubleArrayPrint(std::ostream& os) { // NOLINT
540 HeapObject::PrintHeader(os, "FixedDoubleArray"); 540 HeapObject::PrintHeader(os, "FixedDoubleArray");
541 os << "\n - length: " << length(); 541 os << " - length: " << length();
542 for (int i = 0; i < length(); i++) { 542 for (int i = 0; i < length(); i++) {
543 os << "\n [" << i << "]: "; 543 os << "\n [" << i << "]: ";
544 if (is_the_hole(i)) { 544 if (is_the_hole(i)) {
545 os << "<the hole>"; 545 os << "<the hole>";
546 } else { 546 } else {
547 os << get_scalar(i); 547 os << get_scalar(i);
548 } 548 }
549 } 549 }
550 os << "\n"; 550 os << "\n";
551 } 551 }
552 552
553 553
554 void TransitionArray::TransitionArrayPrint(std::ostream& os) { // NOLINT 554 void TransitionArray::TransitionArrayPrint(std::ostream& os) { // NOLINT
555 HeapObject::PrintHeader(os, "TransitionArray"); 555 HeapObject::PrintHeader(os, "TransitionArray");
556 os << "\n - capacity: " << length(); 556 os << " - capacity: " << length();
557 for (int i = 0; i < length(); i++) { 557 for (int i = 0; i < length(); i++) {
558 os << "\n [" << i << "]: " << Brief(get(i)); 558 os << "\n [" << i << "]: " << Brief(get(i));
559 if (i == kNextLinkIndex) os << " (next link)"; 559 if (i == kNextLinkIndex) os << " (next link)";
560 if (i == kPrototypeTransitionsIndex) os << " (prototype transitions)"; 560 if (i == kPrototypeTransitionsIndex) os << " (prototype transitions)";
561 if (i == kTransitionLengthIndex) os << " (number of transitions)"; 561 if (i == kTransitionLengthIndex) os << " (number of transitions)";
562 } 562 }
563 os << "\n"; 563 os << "\n";
564 } 564 }
565 565
566 566
567 void TypeFeedbackMetadata::Print() { 567 void TypeFeedbackMetadata::Print() {
568 OFStream os(stdout); 568 OFStream os(stdout);
569 TypeFeedbackMetadataPrint(os); 569 TypeFeedbackMetadataPrint(os);
570 os << std::flush; 570 os << std::flush;
571 } 571 }
572 572
573 573
574 void TypeFeedbackMetadata::TypeFeedbackMetadataPrint( 574 void TypeFeedbackMetadata::TypeFeedbackMetadataPrint(
575 std::ostream& os) { // NOLINT 575 std::ostream& os) { // NOLINT
576 HeapObject::PrintHeader(os, "TypeFeedbackMetadata"); 576 HeapObject::PrintHeader(os, "TypeFeedbackMetadata");
577 os << "\n - length: " << length(); 577 os << " - length: " << length();
578 if (length() == 0) { 578 if (length() == 0) {
579 os << " (empty)\n"; 579 os << " (empty)\n";
580 return; 580 return;
581 } 581 }
582 582
583 TypeFeedbackMetadataIterator iter(this); 583 TypeFeedbackMetadataIterator iter(this);
584 while (iter.HasNext()) { 584 while (iter.HasNext()) {
585 FeedbackVectorSlot slot = iter.Next(); 585 FeedbackVectorSlot slot = iter.Next();
586 FeedbackVectorSlotKind kind = iter.kind(); 586 FeedbackVectorSlotKind kind = iter.kind();
587 os << "\n Slot " << slot << " " << kind; 587 os << "\n Slot " << slot << " " << kind;
588 } 588 }
589 os << "\n"; 589 os << "\n";
590 } 590 }
591 591
592 592
593 void TypeFeedbackVector::Print() { 593 void TypeFeedbackVector::Print() {
594 OFStream os(stdout); 594 OFStream os(stdout);
595 TypeFeedbackVectorPrint(os); 595 TypeFeedbackVectorPrint(os);
596 os << std::flush; 596 os << std::flush;
597 } 597 }
598 598
599 599
600 void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT 600 void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT
601 HeapObject::PrintHeader(os, "TypeFeedbackVector"); 601 HeapObject::PrintHeader(os, "TypeFeedbackVector");
602 os << "\n - length: " << length(); 602 os << " - length: " << length();
603 if (length() == 0) { 603 if (length() == 0) {
604 os << " (empty)\n"; 604 os << " (empty)\n";
605 return; 605 return;
606 } 606 }
607 607
608 TypeFeedbackMetadataIterator iter(metadata()); 608 TypeFeedbackMetadataIterator iter(metadata());
609 while (iter.HasNext()) { 609 while (iter.HasNext()) {
610 FeedbackVectorSlot slot = iter.Next(); 610 FeedbackVectorSlot slot = iter.Next();
611 FeedbackVectorSlotKind kind = iter.kind(); 611 FeedbackVectorSlotKind kind = iter.kind();
612 612
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 min()->IsSmi() ? Smi::cast(min())->value() : -1, 735 min()->IsSmi() ? Smi::cast(min())->value() : -1,
736 sec()->IsSmi() ? Smi::cast(sec())->value() : -1); 736 sec()->IsSmi() ? Smi::cast(sec())->value() : -1);
737 os << buf.start(); 737 os << buf.start();
738 } 738 }
739 JSObjectPrintBody(os, this); 739 JSObjectPrintBody(os, this);
740 } 740 }
741 741
742 742
743 void JSProxy::JSProxyPrint(std::ostream& os) { // NOLINT 743 void JSProxy::JSProxyPrint(std::ostream& os) { // NOLINT
744 HeapObject::PrintHeader(os, "JSProxy"); 744 HeapObject::PrintHeader(os, "JSProxy");
745 os << "\n - map = " << reinterpret_cast<void*>(map()); 745 os << " - map = " << reinterpret_cast<void*>(map());
746 os << "\n - target = "; 746 os << "\n - target = ";
747 target()->ShortPrint(os); 747 target()->ShortPrint(os);
748 os << "\n - handler = "; 748 os << "\n - handler = ";
749 handler()->ShortPrint(os); 749 handler()->ShortPrint(os);
750 os << "\n - hash = "; 750 os << "\n - hash = ";
751 hash()->ShortPrint(os); 751 hash()->ShortPrint(os);
752 os << "\n"; 752 os << "\n";
753 } 753 }
754 754
755 755
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 } 872 }
873 os << "\n - context = " << Brief(context()); 873 os << "\n - context = " << Brief(context());
874 os << "\n - literals = " << Brief(literals()); 874 os << "\n - literals = " << Brief(literals());
875 os << "\n - code = " << Brief(code()); 875 os << "\n - code = " << Brief(code());
876 JSObjectPrintBody(os, this); 876 JSObjectPrintBody(os, this);
877 } 877 }
878 878
879 879
880 void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT 880 void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT
881 HeapObject::PrintHeader(os, "SharedFunctionInfo"); 881 HeapObject::PrintHeader(os, "SharedFunctionInfo");
882 os << "\n - name: " << Brief(name()); 882 os << " - name: " << Brief(name());
883 os << "\n - expected_nof_properties: " << expected_nof_properties(); 883 os << "\n - expected_nof_properties: " << expected_nof_properties();
884 os << "\n - ast_node_count: " << ast_node_count(); 884 os << "\n - ast_node_count: " << ast_node_count();
885 os << "\n - instance class name = "; 885 os << "\n - instance class name = ";
886 instance_class_name()->Print(os); 886 instance_class_name()->Print(os);
887 os << "\n - code = " << Brief(code()); 887 os << "\n - code = " << Brief(code());
888 if (HasSourceCode()) { 888 if (HasSourceCode()) {
889 os << "\n - source code = "; 889 os << "\n - source code = ";
890 String* source = String::cast(Script::cast(script())->source()); 890 String* source = String::cast(Script::cast(script())->source());
891 int start = start_position(); 891 int start = start_position();
892 int length = end_position() - start; 892 int length = end_position() - start;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 void JSGlobalObject::JSGlobalObjectPrint(std::ostream& os) { // NOLINT 924 void JSGlobalObject::JSGlobalObjectPrint(std::ostream& os) { // NOLINT
925 os << "global "; 925 os << "global ";
926 JSObjectPrint(os); 926 JSObjectPrint(os);
927 os << "native context : " << Brief(native_context()); 927 os << "native context : " << Brief(native_context());
928 os << "\n"; 928 os << "\n";
929 } 929 }
930 930
931 931
932 void Cell::CellPrint(std::ostream& os) { // NOLINT 932 void Cell::CellPrint(std::ostream& os) { // NOLINT
933 HeapObject::PrintHeader(os, "Cell"); 933 HeapObject::PrintHeader(os, "Cell");
934 os << "\n - value: " << Brief(value()); 934 os << " - value: " << Brief(value());
935 os << "\n"; 935 os << "\n";
936 } 936 }
937 937
938 938
939 void PropertyCell::PropertyCellPrint(std::ostream& os) { // NOLINT 939 void PropertyCell::PropertyCellPrint(std::ostream& os) { // NOLINT
940 HeapObject::PrintHeader(os, "PropertyCell"); 940 HeapObject::PrintHeader(os, "PropertyCell");
941 os << "\n - value: " << Brief(value()); 941 os << " - value: " << Brief(value());
942 os << "\n - details: " << property_details(); 942 os << "\n - details: " << property_details();
943 os << "\n"; 943 os << "\n";
944 } 944 }
945 945
946 946
947 void WeakCell::WeakCellPrint(std::ostream& os) { // NOLINT 947 void WeakCell::WeakCellPrint(std::ostream& os) { // NOLINT
948 HeapObject::PrintHeader(os, "WeakCell"); 948 HeapObject::PrintHeader(os, "WeakCell");
949 if (cleared()) { 949 if (cleared()) {
950 os << "\n - cleared"; 950 os << "\n - cleared";
951 } else { 951 } else {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 os << "\n - data: " << Brief(data()); 1043 os << "\n - data: " << Brief(data());
1044 os << "\n"; 1044 os << "\n";
1045 } 1045 }
1046 1046
1047 1047
1048 void FunctionTemplateInfo::FunctionTemplateInfoPrint( 1048 void FunctionTemplateInfo::FunctionTemplateInfoPrint(
1049 std::ostream& os) { // NOLINT 1049 std::ostream& os) { // NOLINT
1050 HeapObject::PrintHeader(os, "FunctionTemplateInfo"); 1050 HeapObject::PrintHeader(os, "FunctionTemplateInfo");
1051 os << "\n - class name: " << Brief(class_name()); 1051 os << "\n - class name: " << Brief(class_name());
1052 os << "\n - tag: " << Brief(tag()); 1052 os << "\n - tag: " << Brief(tag());
1053 os << "\n - property_list: " << Brief(property_list());
1053 os << "\n - serial_number: " << Brief(serial_number()); 1054 os << "\n - serial_number: " << Brief(serial_number());
1054 os << "\n - property_list: " << Brief(property_list());
1055 os << "\n - call_code: " << Brief(call_code()); 1055 os << "\n - call_code: " << Brief(call_code());
1056 os << "\n - property_accessors: " << Brief(property_accessors()); 1056 os << "\n - property_accessors: " << Brief(property_accessors());
1057 os << "\n - prototype_template: " << Brief(prototype_template()); 1057 os << "\n - prototype_template: " << Brief(prototype_template());
1058 os << "\n - parent_template: " << Brief(parent_template()); 1058 os << "\n - parent_template: " << Brief(parent_template());
1059 os << "\n - named_property_handler: " << Brief(named_property_handler()); 1059 os << "\n - named_property_handler: " << Brief(named_property_handler());
1060 os << "\n - indexed_property_handler: " << Brief(indexed_property_handler()); 1060 os << "\n - indexed_property_handler: " << Brief(indexed_property_handler());
1061 os << "\n - instance_template: " << Brief(instance_template()); 1061 os << "\n - instance_template: " << Brief(instance_template());
1062 os << "\n - signature: " << Brief(signature()); 1062 os << "\n - signature: " << Brief(signature());
1063 os << "\n - access_check_info: " << Brief(access_check_info()); 1063 os << "\n - access_check_info: " << Brief(access_check_info());
1064 os << "\n - hidden_prototype: " << (hidden_prototype() ? "true" : "false"); 1064 os << "\n - hidden_prototype: " << (hidden_prototype() ? "true" : "false");
1065 os << "\n - undetectable: " << (undetectable() ? "true" : "false"); 1065 os << "\n - undetectable: " << (undetectable() ? "true" : "false");
1066 os << "\n - need_access_check: " << (needs_access_check() ? "true" : "false"); 1066 os << "\n - need_access_check: " << (needs_access_check() ? "true" : "false");
1067 os << "\n - instantiated: " << (instantiated() ? "true" : "false"); 1067 os << "\n - instantiated: " << (instantiated() ? "true" : "false");
1068 os << "\n"; 1068 os << "\n";
1069 } 1069 }
1070 1070
1071 1071
1072 void ObjectTemplateInfo::ObjectTemplateInfoPrint(std::ostream& os) { // NOLINT 1072 void ObjectTemplateInfo::ObjectTemplateInfoPrint(std::ostream& os) { // NOLINT
1073 HeapObject::PrintHeader(os, "ObjectTemplateInfo"); 1073 HeapObject::PrintHeader(os, "ObjectTemplateInfo");
1074 os << "\n - tag: " << Brief(tag()); 1074 os << " - tag: " << Brief(tag());
1075 os << "\n - serial_number: " << Brief(serial_number());
1076 os << "\n - property_list: " << Brief(property_list()); 1075 os << "\n - property_list: " << Brief(property_list());
1077 os << "\n - property_accessors: " << Brief(property_accessors()); 1076 os << "\n - property_accessors: " << Brief(property_accessors());
1078 os << "\n - constructor: " << Brief(constructor()); 1077 os << "\n - constructor: " << Brief(constructor());
1079 os << "\n - internal_field_count: " << Brief(internal_field_count()); 1078 os << "\n - internal_field_count: " << Brief(internal_field_count());
1080 os << "\n"; 1079 os << "\n";
1081 } 1080 }
1082 1081
1083 1082
1084 void AllocationSite::AllocationSitePrint(std::ostream& os) { // NOLINT 1083 void AllocationSite::AllocationSitePrint(std::ostream& os) { // NOLINT
1085 HeapObject::PrintHeader(os, "AllocationSite"); 1084 HeapObject::PrintHeader(os, "AllocationSite");
1086 os << "\n - weak_next: " << Brief(weak_next()); 1085 os << " - weak_next: " << Brief(weak_next());
1087 os << "\n - dependent code: " << Brief(dependent_code()); 1086 os << "\n - dependent code: " << Brief(dependent_code());
1088 os << "\n - nested site: " << Brief(nested_site()); 1087 os << "\n - nested site: " << Brief(nested_site());
1089 os << "\n - memento found count: " 1088 os << "\n - memento found count: "
1090 << Brief(Smi::FromInt(memento_found_count())); 1089 << Brief(Smi::FromInt(memento_found_count()));
1091 os << "\n - memento create count: " 1090 os << "\n - memento create count: "
1092 << Brief(Smi::FromInt(memento_create_count())); 1091 << Brief(Smi::FromInt(memento_create_count()));
1093 os << "\n - pretenure decision: " 1092 os << "\n - pretenure decision: "
1094 << Brief(Smi::FromInt(pretenure_decision())); 1093 << Brief(Smi::FromInt(pretenure_decision()));
1095 os << "\n - transition_info: "; 1094 os << "\n - transition_info: ";
1096 if (transition_info()->IsSmi()) { 1095 if (transition_info()->IsSmi()) {
1097 ElementsKind kind = GetElementsKind(); 1096 ElementsKind kind = GetElementsKind();
1098 os << "Array allocation with ElementsKind " << ElementsKindToString(kind); 1097 os << "Array allocation with ElementsKind " << ElementsKindToString(kind);
1099 } else if (transition_info()->IsJSArray()) { 1098 } else if (transition_info()->IsJSArray()) {
1100 os << "Array literal " << Brief(transition_info()); 1099 os << "Array literal " << Brief(transition_info());
1101 } else { 1100 } else {
1102 os << "unknown transition_info" << Brief(transition_info()); 1101 os << "unknown transition_info" << Brief(transition_info());
1103 } 1102 }
1104 os << "\n"; 1103 os << "\n";
1105 } 1104 }
1106 1105
1107 1106
1108 void AllocationMemento::AllocationMementoPrint(std::ostream& os) { // NOLINT 1107 void AllocationMemento::AllocationMementoPrint(std::ostream& os) { // NOLINT
1109 HeapObject::PrintHeader(os, "AllocationMemento"); 1108 HeapObject::PrintHeader(os, "AllocationMemento");
1110 os << "\n - allocation site: "; 1109 os << " - allocation site: ";
1111 if (IsValid()) { 1110 if (IsValid()) {
1112 GetAllocationSite()->Print(os); 1111 GetAllocationSite()->Print(os);
1113 } else { 1112 } else {
1114 os << "<invalid>\n"; 1113 os << "<invalid>\n";
1115 } 1114 }
1116 } 1115 }
1117 1116
1118 1117
1119 void Script::ScriptPrint(std::ostream& os) { // NOLINT 1118 void Script::ScriptPrint(std::ostream& os) { // NOLINT
1120 HeapObject::PrintHeader(os, "Script"); 1119 HeapObject::PrintHeader(os, "Script");
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1326 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1328 Object* transitions = map()->raw_transitions(); 1327 Object* transitions = map()->raw_transitions();
1329 int num_transitions = TransitionArray::NumberOfTransitions(transitions); 1328 int num_transitions = TransitionArray::NumberOfTransitions(transitions);
1330 if (num_transitions == 0) return; 1329 if (num_transitions == 0) return;
1331 os << "\n - transitions"; 1330 os << "\n - transitions";
1332 TransitionArray::PrintTransitions(os, transitions, false); 1331 TransitionArray::PrintTransitions(os, transitions, false);
1333 } 1332 }
1334 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1333 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1335 } // namespace internal 1334 } // namespace internal
1336 } // namespace v8 1335 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698