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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 break; | 175 break; |
176 case FOREIGN_TYPE: | 176 case FOREIGN_TYPE: |
177 Foreign::cast(this)->ForeignPrint(out); | 177 Foreign::cast(this)->ForeignPrint(out); |
178 break; | 178 break; |
179 case SHARED_FUNCTION_INFO_TYPE: | 179 case SHARED_FUNCTION_INFO_TYPE: |
180 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(out); | 180 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(out); |
181 break; | 181 break; |
182 case JS_MESSAGE_OBJECT_TYPE: | 182 case JS_MESSAGE_OBJECT_TYPE: |
183 JSMessageObject::cast(this)->JSMessageObjectPrint(out); | 183 JSMessageObject::cast(this)->JSMessageObjectPrint(out); |
184 break; | 184 break; |
185 case JS_GLOBAL_PROPERTY_CELL_TYPE: | 185 case CELL_TYPE: |
| 186 Cell::cast(this)->CellPrint(out); |
| 187 break; |
| 188 case PROPERTY_CELL_TYPE: |
186 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellPrint(out); | 189 JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellPrint(out); |
187 break; | 190 break; |
188 case JS_ARRAY_BUFFER_TYPE: | 191 case JS_ARRAY_BUFFER_TYPE: |
189 JSArrayBuffer::cast(this)->JSArrayBufferPrint(out); | 192 JSArrayBuffer::cast(this)->JSArrayBufferPrint(out); |
190 break; | 193 break; |
191 case JS_TYPED_ARRAY_TYPE: | 194 case JS_TYPED_ARRAY_TYPE: |
192 JSTypedArray::cast(this)->JSTypedArrayPrint(out); | 195 JSTypedArray::cast(this)->JSTypedArrayPrint(out); |
193 break; | 196 break; |
194 #define MAKE_STRUCT_CASE(NAME, Name, name) \ | 197 #define MAKE_STRUCT_CASE(NAME, Name, name) \ |
195 case NAME##_TYPE: \ | 198 case NAME##_TYPE: \ |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 return "EXTERNAL_UNSIGNED_SHORT_ARRAY"; | 529 return "EXTERNAL_UNSIGNED_SHORT_ARRAY"; |
527 case EXTERNAL_INT_ARRAY_TYPE: return "EXTERNAL_INT_ARRAY"; | 530 case EXTERNAL_INT_ARRAY_TYPE: return "EXTERNAL_INT_ARRAY"; |
528 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: | 531 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: |
529 return "EXTERNAL_UNSIGNED_INT_ARRAY"; | 532 return "EXTERNAL_UNSIGNED_INT_ARRAY"; |
530 case EXTERNAL_FLOAT_ARRAY_TYPE: return "EXTERNAL_FLOAT_ARRAY"; | 533 case EXTERNAL_FLOAT_ARRAY_TYPE: return "EXTERNAL_FLOAT_ARRAY"; |
531 case EXTERNAL_DOUBLE_ARRAY_TYPE: return "EXTERNAL_DOUBLE_ARRAY"; | 534 case EXTERNAL_DOUBLE_ARRAY_TYPE: return "EXTERNAL_DOUBLE_ARRAY"; |
532 case FILLER_TYPE: return "FILLER"; | 535 case FILLER_TYPE: return "FILLER"; |
533 case JS_OBJECT_TYPE: return "JS_OBJECT"; | 536 case JS_OBJECT_TYPE: return "JS_OBJECT"; |
534 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; | 537 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; |
535 case ODDBALL_TYPE: return "ODDBALL"; | 538 case ODDBALL_TYPE: return "ODDBALL"; |
536 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL"; | 539 case CELL_TYPE: return "CELL"; |
| 540 case PROPERTY_CELL_TYPE: return "PROPERTY_CELL"; |
537 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; | 541 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; |
538 case JS_GENERATOR_OBJECT_TYPE: return "JS_GENERATOR_OBJECT"; | 542 case JS_GENERATOR_OBJECT_TYPE: return "JS_GENERATOR_OBJECT"; |
539 case JS_MODULE_TYPE: return "JS_MODULE"; | 543 case JS_MODULE_TYPE: return "JS_MODULE"; |
540 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; | 544 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; |
541 case CODE_TYPE: return "CODE"; | 545 case CODE_TYPE: return "CODE"; |
542 case JS_ARRAY_TYPE: return "JS_ARRAY"; | 546 case JS_ARRAY_TYPE: return "JS_ARRAY"; |
543 case JS_PROXY_TYPE: return "JS_PROXY"; | 547 case JS_PROXY_TYPE: return "JS_PROXY"; |
544 case JS_WEAK_MAP_TYPE: return "JS_WEAK_MAP"; | 548 case JS_WEAK_MAP_TYPE: return "JS_WEAK_MAP"; |
545 case JS_REGEXP_TYPE: return "JS_REGEXP"; | 549 case JS_REGEXP_TYPE: return "JS_REGEXP"; |
546 case JS_VALUE_TYPE: return "JS_VALUE"; | 550 case JS_VALUE_TYPE: return "JS_VALUE"; |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 PrintF(out, "\n"); | 914 PrintF(out, "\n"); |
911 } | 915 } |
912 | 916 |
913 | 917 |
914 void JSBuiltinsObject::JSBuiltinsObjectPrint(FILE* out) { | 918 void JSBuiltinsObject::JSBuiltinsObjectPrint(FILE* out) { |
915 PrintF(out, "builtins "); | 919 PrintF(out, "builtins "); |
916 JSObjectPrint(out); | 920 JSObjectPrint(out); |
917 } | 921 } |
918 | 922 |
919 | 923 |
| 924 void Cell::CellPrint(FILE* out) { |
| 925 HeapObject::PrintHeader(out, "Cell"); |
| 926 } |
| 927 |
| 928 |
920 void JSGlobalPropertyCell::JSGlobalPropertyCellPrint(FILE* out) { | 929 void JSGlobalPropertyCell::JSGlobalPropertyCellPrint(FILE* out) { |
921 HeapObject::PrintHeader(out, "JSGlobalPropertyCell"); | 930 HeapObject::PrintHeader(out, "JSGlobalPropertyCell"); |
922 } | 931 } |
923 | 932 |
924 | 933 |
925 void Code::CodePrint(FILE* out) { | 934 void Code::CodePrint(FILE* out) { |
926 HeapObject::PrintHeader(out, "Code"); | 935 HeapObject::PrintHeader(out, "Code"); |
927 #ifdef ENABLE_DISASSEMBLER | 936 #ifdef ENABLE_DISASSEMBLER |
928 if (FLAG_use_verbose_printer) { | 937 if (FLAG_use_verbose_printer) { |
929 Disassemble(NULL, out); | 938 Disassemble(NULL, out); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { | 1095 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) { |
1087 HeapObject::PrintHeader(out, "TypeSwitchInfo"); | 1096 HeapObject::PrintHeader(out, "TypeSwitchInfo"); |
1088 PrintF(out, "\n - types: "); | 1097 PrintF(out, "\n - types: "); |
1089 types()->ShortPrint(out); | 1098 types()->ShortPrint(out); |
1090 } | 1099 } |
1091 | 1100 |
1092 | 1101 |
1093 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { | 1102 void AllocationSiteInfo::AllocationSiteInfoPrint(FILE* out) { |
1094 HeapObject::PrintHeader(out, "AllocationSiteInfo"); | 1103 HeapObject::PrintHeader(out, "AllocationSiteInfo"); |
1095 PrintF(out, " - payload: "); | 1104 PrintF(out, " - payload: "); |
1096 if (payload()->IsJSGlobalPropertyCell()) { | 1105 if (payload()->IsCell()) { |
1097 JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(payload()); | 1106 Cell* cell = Cell::cast(payload()); |
1098 Object* cell_contents = cell->value(); | 1107 Object* cell_contents = cell->value(); |
1099 if (cell_contents->IsSmi()) { | 1108 if (cell_contents->IsSmi()) { |
1100 ElementsKind kind = static_cast<ElementsKind>( | 1109 ElementsKind kind = static_cast<ElementsKind>( |
1101 Smi::cast(cell_contents)->value()); | 1110 Smi::cast(cell_contents)->value()); |
1102 PrintF(out, "Array allocation with ElementsKind "); | 1111 PrintF(out, "Array allocation with ElementsKind "); |
1103 PrintElementsKind(out, kind); | 1112 PrintElementsKind(out, kind); |
1104 PrintF(out, "\n"); | 1113 PrintF(out, "\n"); |
1105 return; | 1114 return; |
1106 } | 1115 } |
1107 } else if (payload()->IsJSArray()) { | 1116 } else if (payload()->IsJSArray()) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 } | 1223 } |
1215 } | 1224 } |
1216 PrintF(out, "\n"); | 1225 PrintF(out, "\n"); |
1217 } | 1226 } |
1218 | 1227 |
1219 | 1228 |
1220 #endif // OBJECT_PRINT | 1229 #endif // OBJECT_PRINT |
1221 | 1230 |
1222 | 1231 |
1223 } } // namespace v8::internal | 1232 } } // namespace v8::internal |
OLD | NEW |