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