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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 } | 990 } |
991 | 991 |
992 | 992 |
993 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { | 993 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { |
994 HeapObject::PrintHeader(out, "TypeSwitchInfo"); | 994 HeapObject::PrintHeader(out, "TypeSwitchInfo"); |
995 PrintF(out, "\n - types: "); | 995 PrintF(out, "\n - types: "); |
996 types()->ShortPrint(out); | 996 types()->ShortPrint(out); |
997 } | 997 } |
998 | 998 |
999 | 999 |
| 1000 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { |
| 1001 HeapObject::PrintHeader(out, "AllocationSiteInfo"); |
| 1002 PrintF(out, " - payload: "); |
| 1003 if (payload()->IsJSGlobalPropertyCell()) { |
| 1004 JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(payload()); |
| 1005 Object* cell_contents = cell->value(); |
| 1006 if (cell_contents->IsSmi()) { |
| 1007 ElementsKind kind = static_cast<ElementsKind>( |
| 1008 Smi::cast(cell_contents)->value()); |
| 1009 PrintF(out, "Array allocation with ElementsKind "); |
| 1010 PrintElementsKind(out, kind); |
| 1011 PrintF(out, "\n"); |
| 1012 return; |
| 1013 } |
| 1014 } else if (payload()->IsJSArray()) { |
| 1015 PrintF(out, "Array literal boilerplate "); |
| 1016 payload()->ShortPrint(out); |
| 1017 PrintF(out, "\n"); |
| 1018 return; |
| 1019 } |
| 1020 |
| 1021 PrintF(out, "unknown payload "); |
| 1022 payload()->ShortPrint(out); |
| 1023 PrintF(out, "\n"); |
| 1024 } |
| 1025 |
| 1026 |
1000 void Script::ScriptPrint(FILE* out) { | 1027 void Script::ScriptPrint(FILE* out) { |
1001 HeapObject::PrintHeader(out, "Script"); | 1028 HeapObject::PrintHeader(out, "Script"); |
1002 PrintF(out, "\n - source: "); | 1029 PrintF(out, "\n - source: "); |
1003 source()->ShortPrint(out); | 1030 source()->ShortPrint(out); |
1004 PrintF(out, "\n - name: "); | 1031 PrintF(out, "\n - name: "); |
1005 name()->ShortPrint(out); | 1032 name()->ShortPrint(out); |
1006 PrintF(out, "\n - line_offset: "); | 1033 PrintF(out, "\n - line_offset: "); |
1007 line_offset()->ShortPrint(out); | 1034 line_offset()->ShortPrint(out); |
1008 PrintF(out, "\n - column_offset: "); | 1035 PrintF(out, "\n - column_offset: "); |
1009 column_offset()->ShortPrint(out); | 1036 column_offset()->ShortPrint(out); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 } | 1121 } |
1095 } | 1122 } |
1096 PrintF(out, "\n"); | 1123 PrintF(out, "\n"); |
1097 } | 1124 } |
1098 | 1125 |
1099 | 1126 |
1100 #endif // OBJECT_PRINT | 1127 #endif // OBJECT_PRINT |
1101 | 1128 |
1102 | 1129 |
1103 } } // namespace v8::internal | 1130 } } // namespace v8::internal |
OLD | NEW |