Chromium Code Reviews| 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 995 } | 995 } | 
| 996 | 996 | 
| 997 | 997 | 
| 998 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { | 998 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { | 
| 999 HeapObject::PrintHeader(out, "TypeSwitchInfo"); | 999 HeapObject::PrintHeader(out, "TypeSwitchInfo"); | 
| 1000 PrintF(out, "\n - types: "); | 1000 PrintF(out, "\n - types: "); | 
| 1001 types()->ShortPrint(out); | 1001 types()->ShortPrint(out); | 
| 1002 } | 1002 } | 
| 1003 | 1003 | 
| 1004 | 1004 | 
| 1005 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { | |
| 1006 HeapObject::PrintHeader(out, "AllocationSiteInfo"); | |
| 1007 PrintF(out, " - payload: "); | |
| 1008 if (payload()->IsJSGlobalPropertyCell()) { | |
| 1009 JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(payload()); | |
| 
 
danno
2012/12/26 10:32:01
You can remove this case until we support allocati
 
mvstanton
2013/01/03 14:40:43
Done.
 
 | |
| 1010 Object* cell_contents = cell->value(); | |
| 1011 if (cell_contents->IsSmi()) { | |
| 1012 ElementsKind kind = static_cast<ElementsKind>( | |
| 1013 Smi::cast(cell_contents)->value()); | |
| 1014 PrintF(out, "Array allocation with ElementsKind "); | |
| 1015 PrintElementsKind(out, kind); | |
| 1016 PrintF(out, "\n"); | |
| 1017 return; | |
| 1018 } | |
| 1019 } else if (payload()->IsJSArray()) { | |
| 1020 PrintF(out, "Array literal boilerplate "); | |
| 1021 payload()->ShortPrint(out); | |
| 1022 PrintF(out, "\n"); | |
| 1023 return; | |
| 1024 } | |
| 1025 | |
| 1026 PrintF(out, "unknown payload "); | |
| 1027 payload()->ShortPrint(out); | |
| 1028 PrintF(out, "\n"); | |
| 1029 } | |
| 1030 | |
| 1031 | |
| 1005 void Script::ScriptPrint(FILE* out) { | 1032 void Script::ScriptPrint(FILE* out) { | 
| 1006 HeapObject::PrintHeader(out, "Script"); | 1033 HeapObject::PrintHeader(out, "Script"); | 
| 1007 PrintF(out, "\n - source: "); | 1034 PrintF(out, "\n - source: "); | 
| 1008 source()->ShortPrint(out); | 1035 source()->ShortPrint(out); | 
| 1009 PrintF(out, "\n - name: "); | 1036 PrintF(out, "\n - name: "); | 
| 1010 name()->ShortPrint(out); | 1037 name()->ShortPrint(out); | 
| 1011 PrintF(out, "\n - line_offset: "); | 1038 PrintF(out, "\n - line_offset: "); | 
| 1012 line_offset()->ShortPrint(out); | 1039 line_offset()->ShortPrint(out); | 
| 1013 PrintF(out, "\n - column_offset: "); | 1040 PrintF(out, "\n - column_offset: "); | 
| 1014 column_offset()->ShortPrint(out); | 1041 column_offset()->ShortPrint(out); | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1099 } | 1126 } | 
| 1100 } | 1127 } | 
| 1101 PrintF(out, "\n"); | 1128 PrintF(out, "\n"); | 
| 1102 } | 1129 } | 
| 1103 | 1130 | 
| 1104 | 1131 | 
| 1105 #endif // OBJECT_PRINT | 1132 #endif // OBJECT_PRINT | 
| 1106 | 1133 | 
| 1107 | 1134 | 
| 1108 } } // namespace v8::internal | 1135 } } // namespace v8::internal | 
| OLD | NEW |