| 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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 AllocationSite::AllocationSitePrint(FILE* out) { | 1120 void AllocationSite::AllocationSitePrint(FILE* out) { |
| 1121 HeapObject::PrintHeader(out, "AllocationSite"); | 1121 HeapObject::PrintHeader(out, "AllocationSite"); |
| 1122 PrintF(out, " - payload: "); | 1122 PrintF(out, " - transition_info: "); |
| 1123 if (payload()->IsCell()) { | 1123 if (transition_info()->IsCell()) { |
| 1124 Cell* cell = Cell::cast(payload()); | 1124 Cell* cell = Cell::cast(transition_info()); |
| 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 (transition_info()->IsJSArray()) { |
| 1135 PrintF(out, "Array literal "); | 1135 PrintF(out, "Array literal "); |
| 1136 payload()->ShortPrint(out); | 1136 transition_info()->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 transition_info"); |
| 1142 payload()->ShortPrint(out); | 1142 transition_info()->ShortPrint(out); |
| 1143 PrintF(out, "\n"); | 1143 PrintF(out, "\n"); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 | 1146 |
| 1147 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { | 1147 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { |
| 1148 HeapObject::PrintHeader(out, "AllocationSiteInfo"); | 1148 HeapObject::PrintHeader(out, "AllocationSiteInfo"); |
| 1149 PrintF(out, " - allocation site: "); | 1149 PrintF(out, " - allocation site: "); |
| 1150 if (IsValid()) { | 1150 if (IsValid()) { |
| 1151 GetAllocationSite()->Print(); | 1151 GetAllocationSite()->Print(); |
| 1152 } else { | 1152 } else { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 } | 1252 } |
| 1253 } | 1253 } |
| 1254 PrintF(out, "\n"); | 1254 PrintF(out, "\n"); |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 | 1257 |
| 1258 #endif // OBJECT_PRINT | 1258 #endif // OBJECT_PRINT |
| 1259 | 1259 |
| 1260 | 1260 |
| 1261 } } // namespace v8::internal | 1261 } } // namespace v8::internal |
| OLD | NEW |