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

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

Issue 23604020: Initial prototype of object layout generation. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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
OLDNEW
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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 595
596 void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) { 596 void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) {
597 HeapObject::PrintHeader(out, "TypeFeedbackInfo"); 597 HeapObject::PrintHeader(out, "TypeFeedbackInfo");
598 PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n", 598 PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n",
599 ic_total_count(), ic_with_type_info_count()); 599 ic_total_count(), ic_with_type_info_count());
600 PrintF(out, " - type_feedback_cells: "); 600 PrintF(out, " - type_feedback_cells: ");
601 type_feedback_cells()->FixedArrayPrint(out); 601 type_feedback_cells()->FixedArrayPrint(out);
602 } 602 }
603 603
604 604
605 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) {
606 HeapObject::PrintHeader(out, "AliasedArgumentsEntry");
607 PrintF(out, "\n - aliased_context_slot: %d", aliased_context_slot());
608 }
609
610
611 void FixedArray::FixedArrayPrint(FILE* out) { 605 void FixedArray::FixedArrayPrint(FILE* out) {
612 HeapObject::PrintHeader(out, "FixedArray"); 606 HeapObject::PrintHeader(out, "FixedArray");
613 PrintF(out, " - length: %d", length()); 607 PrintF(out, " - length: %d", length());
614 for (int i = 0; i < length(); i++) { 608 for (int i = 0; i < length(); i++) {
615 PrintF(out, "\n [%d]: ", i); 609 PrintF(out, "\n [%d]: ", i);
616 get(i)->ShortPrint(out); 610 get(i)->ShortPrint(out);
617 } 611 }
618 PrintF(out, "\n"); 612 PrintF(out, "\n");
619 } 613 }
620 614
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 } 948 }
955 #endif 949 #endif
956 } 950 }
957 951
958 952
959 void Foreign::ForeignPrint(FILE* out) { 953 void Foreign::ForeignPrint(FILE* out) {
960 PrintF(out, "foreign address : %p", foreign_address()); 954 PrintF(out, "foreign address : %p", foreign_address());
961 } 955 }
962 956
963 957
964 void ExecutableAccessorInfo::ExecutableAccessorInfoPrint(FILE* out) {
965 HeapObject::PrintHeader(out, "ExecutableAccessorInfo");
966 PrintF(out, "\n - name: ");
967 name()->ShortPrint(out);
968 PrintF(out, "\n - flag: ");
969 flag()->ShortPrint(out);
970 PrintF(out, "\n - getter: ");
971 getter()->ShortPrint(out);
972 PrintF(out, "\n - setter: ");
973 setter()->ShortPrint(out);
974 PrintF(out, "\n - data: ");
975 data()->ShortPrint(out);
976 }
977
978
979 void DeclaredAccessorInfo::DeclaredAccessorInfoPrint(FILE* out) {
980 HeapObject::PrintHeader(out, "DeclaredAccessorInfo");
981 PrintF(out, "\n - name: ");
982 name()->ShortPrint(out);
983 PrintF(out, "\n - flag: ");
984 flag()->ShortPrint(out);
985 PrintF(out, "\n - descriptor: ");
986 descriptor()->ShortPrint(out);
987 }
988
989
990 void DeclaredAccessorDescriptor::DeclaredAccessorDescriptorPrint(FILE* out) { 958 void DeclaredAccessorDescriptor::DeclaredAccessorDescriptorPrint(FILE* out) {
991 HeapObject::PrintHeader(out, "DeclaredAccessorDescriptor"); 959 HeapObject::PrintHeader(out, "DeclaredAccessorDescriptor");
992 PrintF(out, "\n - internal field: "); 960 PrintF(out, "\n - internal field: ");
993 serialized_data()->ShortPrint(out); 961 serialized_data()->ShortPrint(out);
994 } 962 }
995 963
996 964
997 void Box::BoxPrint(FILE* out) {
998 HeapObject::PrintHeader(out, "Box");
999 PrintF(out, "\n - value: ");
1000 value()->ShortPrint(out);
1001 }
1002
1003
1004 void AccessorPair::AccessorPairPrint(FILE* out) { 965 void AccessorPair::AccessorPairPrint(FILE* out) {
1005 HeapObject::PrintHeader(out, "AccessorPair"); 966 HeapObject::PrintHeader(out, "AccessorPair");
1006 PrintF(out, "\n - getter: "); 967 PrintF(out, "\n - getter: ");
1007 getter()->ShortPrint(out); 968 getter()->ShortPrint(out);
1008 PrintF(out, "\n - setter: "); 969 PrintF(out, "\n - setter: ");
1009 setter()->ShortPrint(out); 970 setter()->ShortPrint(out);
1010 PrintF(out, "\n - flag: "); 971 PrintF(out, "\n - flag: ");
1011 access_flags()->ShortPrint(out); 972 access_flags()->ShortPrint(out);
1012 } 973 }
1013 974
(...skipping 29 matching lines...) Expand all
1043 void CallHandlerInfo::CallHandlerInfoPrint(FILE* out) { 1004 void CallHandlerInfo::CallHandlerInfoPrint(FILE* out) {
1044 HeapObject::PrintHeader(out, "CallHandlerInfo"); 1005 HeapObject::PrintHeader(out, "CallHandlerInfo");
1045 PrintF(out, "\n - callback: "); 1006 PrintF(out, "\n - callback: ");
1046 callback()->ShortPrint(out); 1007 callback()->ShortPrint(out);
1047 PrintF(out, "\n - data: "); 1008 PrintF(out, "\n - data: ");
1048 data()->ShortPrint(out); 1009 data()->ShortPrint(out);
1049 PrintF(out, "\n - call_stub_cache: "); 1010 PrintF(out, "\n - call_stub_cache: ");
1050 } 1011 }
1051 1012
1052 1013
1053 void FunctionTemplateInfo::FunctionTemplateInfoPrint(FILE* out) {
1054 HeapObject::PrintHeader(out, "FunctionTemplateInfo");
1055 PrintF(out, "\n - class name: ");
1056 class_name()->ShortPrint(out);
1057 PrintF(out, "\n - tag: ");
1058 tag()->ShortPrint(out);
1059 PrintF(out, "\n - property_list: ");
1060 property_list()->ShortPrint(out);
1061 PrintF(out, "\n - serial_number: ");
1062 serial_number()->ShortPrint(out);
1063 PrintF(out, "\n - call_code: ");
1064 call_code()->ShortPrint(out);
1065 PrintF(out, "\n - property_accessors: ");
1066 property_accessors()->ShortPrint(out);
1067 PrintF(out, "\n - prototype_template: ");
1068 prototype_template()->ShortPrint(out);
1069 PrintF(out, "\n - parent_template: ");
1070 parent_template()->ShortPrint(out);
1071 PrintF(out, "\n - named_property_handler: ");
1072 named_property_handler()->ShortPrint(out);
1073 PrintF(out, "\n - indexed_property_handler: ");
1074 indexed_property_handler()->ShortPrint(out);
1075 PrintF(out, "\n - instance_template: ");
1076 instance_template()->ShortPrint(out);
1077 PrintF(out, "\n - signature: ");
1078 signature()->ShortPrint(out);
1079 PrintF(out, "\n - access_check_info: ");
1080 access_check_info()->ShortPrint(out);
1081 PrintF(out, "\n - hidden_prototype: %s",
1082 hidden_prototype() ? "true" : "false");
1083 PrintF(out, "\n - undetectable: %s", undetectable() ? "true" : "false");
1084 PrintF(out, "\n - need_access_check: %s",
1085 needs_access_check() ? "true" : "false");
1086 }
1087
1088
1089 void ObjectTemplateInfo::ObjectTemplateInfoPrint(FILE* out) {
1090 HeapObject::PrintHeader(out, "ObjectTemplateInfo");
1091 PrintF(out, " - tag: ");
1092 tag()->ShortPrint(out);
1093 PrintF(out, "\n - property_list: ");
1094 property_list()->ShortPrint(out);
1095 PrintF(out, "\n - constructor: ");
1096 constructor()->ShortPrint(out);
1097 PrintF(out, "\n - internal_field_count: ");
1098 internal_field_count()->ShortPrint(out);
1099 PrintF(out, "\n");
1100 }
1101
1102
1103 void SignatureInfo::SignatureInfoPrint(FILE* out) {
1104 HeapObject::PrintHeader(out, "SignatureInfo");
1105 PrintF(out, "\n - receiver: ");
1106 receiver()->ShortPrint(out);
1107 PrintF(out, "\n - args: ");
1108 args()->ShortPrint(out);
1109 }
1110
1111
1112 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) {
1113 HeapObject::PrintHeader(out, "TypeSwitchInfo");
1114 PrintF(out, "\n - types: ");
1115 types()->ShortPrint(out);
1116 }
1117
1118
1119 void AllocationSite::AllocationSitePrint(FILE* out) { 1014 void AllocationSite::AllocationSitePrint(FILE* out) {
1120 HeapObject::PrintHeader(out, "AllocationSite"); 1015 HeapObject::PrintHeader(out, "AllocationSite");
1121 PrintF(out, " - weak_next: "); 1016 PrintF(out, " - weak_next: ");
1122 weak_next()->ShortPrint(out); 1017 weak_next()->ShortPrint(out);
1123 PrintF(out, "\n"); 1018 PrintF(out, "\n");
1124 1019
1125 PrintF(out, " - transition_info: "); 1020 PrintF(out, " - transition_info: ");
1126 if (transition_info()->IsCell()) { 1021 if (transition_info()->IsCell()) {
1127 Cell* cell = Cell::cast(transition_info()); 1022 Cell* cell = Cell::cast(transition_info());
1128 Object* cell_contents = cell->value(); 1023 Object* cell_contents = cell->value();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 } 1149 }
1255 } 1150 }
1256 PrintF(out, "\n"); 1151 PrintF(out, "\n");
1257 } 1152 }
1258 1153
1259 1154
1260 #endif // OBJECT_PRINT 1155 #endif // OBJECT_PRINT
1261 1156
1262 1157
1263 } } // namespace v8::internal 1158 } } // namespace v8::internal
OLDNEW
« src/objects.layout ('K') | « src/objects-inl.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698