OLD | NEW |
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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 } | 1110 } |
1111 | 1111 |
1112 | 1112 |
1113 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { | 1113 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { |
1114 HeapObject::PrintHeader(out, "TypeSwitchInfo"); | 1114 HeapObject::PrintHeader(out, "TypeSwitchInfo"); |
1115 PrintF(out, "\n - types: "); | 1115 PrintF(out, "\n - types: "); |
1116 types()->ShortPrint(out); | 1116 types()->ShortPrint(out); |
1117 } | 1117 } |
1118 | 1118 |
1119 | 1119 |
1120 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { | 1120 void AllocationSite::AllocationSitePrint(FILE* out) { |
1121 HeapObject::PrintHeader(out, "AllocationSiteInfo"); | 1121 HeapObject::PrintHeader(out, "AllocationSite"); |
1122 PrintF(out, " - payload: "); | 1122 PrintF(out, " - payload: "); |
1123 if (payload()->IsCell()) { | 1123 if (payload()->IsCell()) { |
1124 Cell* cell = Cell::cast(payload()); | 1124 Cell* cell = Cell::cast(payload()); |
1125 Object* cell_contents = cell->value(); | 1125 Object* cell_contents = cell->value(); |
1126 if (cell_contents->IsSmi()) { | 1126 if (cell_contents->IsSmi()) { |
1127 ElementsKind kind = static_cast<ElementsKind>( | 1127 ElementsKind kind = static_cast<ElementsKind>( |
1128 Smi::cast(cell_contents)->value()); | 1128 Smi::cast(cell_contents)->value()); |
1129 PrintF(out, "Array allocation with ElementsKind "); | 1129 PrintF(out, "Array allocation with ElementsKind "); |
1130 PrintElementsKind(out, kind); | 1130 PrintElementsKind(out, kind); |
1131 PrintF(out, "\n"); | 1131 PrintF(out, "\n"); |
1132 return; | 1132 return; |
1133 } | 1133 } |
1134 } else if (payload()->IsJSArray()) { | 1134 } else if (payload()->IsJSArray()) { |
1135 PrintF(out, "Array literal "); | 1135 PrintF(out, "Array literal "); |
1136 payload()->ShortPrint(out); | 1136 payload()->ShortPrint(out); |
1137 PrintF(out, "\n"); | 1137 PrintF(out, "\n"); |
1138 return; | 1138 return; |
1139 } | 1139 } |
1140 | 1140 |
1141 PrintF(out, "unknown payload "); | 1141 PrintF(out, "unknown payload "); |
1142 payload()->ShortPrint(out); | 1142 payload()->ShortPrint(out); |
1143 PrintF(out, "\n"); | 1143 PrintF(out, "\n"); |
1144 } | 1144 } |
1145 | 1145 |
1146 | 1146 |
| 1147 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { |
| 1148 HeapObject::PrintHeader(out, "AllocationSiteInfo"); |
| 1149 PrintF(out, " - allocation site: "); |
| 1150 if (IsValid()) { |
| 1151 GetAllocationSite()->Print(); |
| 1152 } else { |
| 1153 PrintF(out, "<invalid>\n"); |
| 1154 } |
| 1155 } |
| 1156 |
| 1157 |
1147 void Script::ScriptPrint(FILE* out) { | 1158 void Script::ScriptPrint(FILE* out) { |
1148 HeapObject::PrintHeader(out, "Script"); | 1159 HeapObject::PrintHeader(out, "Script"); |
1149 PrintF(out, "\n - source: "); | 1160 PrintF(out, "\n - source: "); |
1150 source()->ShortPrint(out); | 1161 source()->ShortPrint(out); |
1151 PrintF(out, "\n - name: "); | 1162 PrintF(out, "\n - name: "); |
1152 name()->ShortPrint(out); | 1163 name()->ShortPrint(out); |
1153 PrintF(out, "\n - line_offset: "); | 1164 PrintF(out, "\n - line_offset: "); |
1154 line_offset()->ShortPrint(out); | 1165 line_offset()->ShortPrint(out); |
1155 PrintF(out, "\n - column_offset: "); | 1166 PrintF(out, "\n - column_offset: "); |
1156 column_offset()->ShortPrint(out); | 1167 column_offset()->ShortPrint(out); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 } | 1252 } |
1242 } | 1253 } |
1243 PrintF(out, "\n"); | 1254 PrintF(out, "\n"); |
1244 } | 1255 } |
1245 | 1256 |
1246 | 1257 |
1247 #endif // OBJECT_PRINT | 1258 #endif // OBJECT_PRINT |
1248 | 1259 |
1249 | 1260 |
1250 } } // namespace v8::internal | 1261 } } // namespace v8::internal |
OLD | NEW |