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

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

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some cleanup Created 7 years, 6 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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 } 1083 }
1084 1084
1085 1085
1086 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { 1086 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) {
1087 HeapObject::PrintHeader(out, "TypeSwitchInfo"); 1087 HeapObject::PrintHeader(out, "TypeSwitchInfo");
1088 PrintF(out, "\n - types: "); 1088 PrintF(out, "\n - types: ");
1089 types()->ShortPrint(out); 1089 types()->ShortPrint(out);
1090 } 1090 }
1091 1091
1092 1092
1093 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { 1093 void AllocationSite::AllocationSitePrint(FILE* out) {
1094 HeapObject::PrintHeader(out, "AllocationSiteInfo"); 1094 HeapObject::PrintHeader(out, "AllocationSite");
1095 PrintF(out, " - payload: "); 1095 PrintF(out, " - payload: ");
1096 if (payload()->IsJSGlobalPropertyCell()) { 1096 if (payload()->IsJSGlobalPropertyCell()) {
1097 JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(payload()); 1097 JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(payload());
1098 Object* cell_contents = cell->value(); 1098 Object* cell_contents = cell->value();
1099 if (cell_contents->IsSmi()) { 1099 if (cell_contents->IsSmi()) {
1100 ElementsKind kind = static_cast<ElementsKind>( 1100 ElementsKind kind = static_cast<ElementsKind>(
1101 Smi::cast(cell_contents)->value()); 1101 Smi::cast(cell_contents)->value());
1102 PrintF(out, "Array allocation with ElementsKind "); 1102 PrintF(out, "Array allocation with ElementsKind ");
1103 PrintElementsKind(out, kind); 1103 PrintElementsKind(out, kind);
1104 PrintF(out, "\n"); 1104 PrintF(out, "\n");
1105 return; 1105 return;
1106 } 1106 }
1107 } else if (payload()->IsJSArray()) { 1107 } else if (payload()->IsJSArray()) {
1108 PrintF(out, "Array literal "); 1108 PrintF(out, "Array literal ");
1109 payload()->ShortPrint(out); 1109 payload()->ShortPrint(out);
1110 PrintF(out, "\n"); 1110 PrintF(out, "\n");
1111 return; 1111 return;
1112 } 1112 }
1113 1113
1114 PrintF(out, "unknown payload "); 1114 PrintF(out, "unknown payload ");
1115 payload()->ShortPrint(out); 1115 payload()->ShortPrint(out);
1116 PrintF(out, "\n"); 1116 PrintF(out, "\n");
1117 } 1117 }
1118 1118
1119 1119
1120 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) {
1121 HeapObject::PrintHeader(out, "AllocationSiteInfo");
1122 PrintF(out, " - payload: ");
Hannes Payer (out of office) 2013/06/25 16:35:07 Why don't we call payload AllocationSite? That wou
mvstanton 2013/07/02 13:55:11 Done, but the type has to remain object because it
1123 AllocationSite::cast(payload())->Print();
1124 }
1125
1126
1120 void Script::ScriptPrint(FILE* out) { 1127 void Script::ScriptPrint(FILE* out) {
1121 HeapObject::PrintHeader(out, "Script"); 1128 HeapObject::PrintHeader(out, "Script");
1122 PrintF(out, "\n - source: "); 1129 PrintF(out, "\n - source: ");
1123 source()->ShortPrint(out); 1130 source()->ShortPrint(out);
1124 PrintF(out, "\n - name: "); 1131 PrintF(out, "\n - name: ");
1125 name()->ShortPrint(out); 1132 name()->ShortPrint(out);
1126 PrintF(out, "\n - line_offset: "); 1133 PrintF(out, "\n - line_offset: ");
1127 line_offset()->ShortPrint(out); 1134 line_offset()->ShortPrint(out);
1128 PrintF(out, "\n - column_offset: "); 1135 PrintF(out, "\n - column_offset: ");
1129 column_offset()->ShortPrint(out); 1136 column_offset()->ShortPrint(out);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 } 1221 }
1215 } 1222 }
1216 PrintF(out, "\n"); 1223 PrintF(out, "\n");
1217 } 1224 }
1218 1225
1219 1226
1220 #endif // OBJECT_PRINT 1227 #endif // OBJECT_PRINT
1221 1228
1222 1229
1223 } } // namespace v8::internal 1230 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698