| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void HeapObject::HeapObjectPrint(FILE* out) { | 69 void HeapObject::HeapObjectPrint(FILE* out) { |
| 70 InstanceType instance_type = map()->instance_type(); | 70 InstanceType instance_type = map()->instance_type(); |
| 71 | 71 |
| 72 HandleScope scope; | 72 HandleScope scope; |
| 73 if (instance_type < FIRST_NONSTRING_TYPE) { | 73 if (instance_type < FIRST_NONSTRING_TYPE) { |
| 74 String::cast(this)->StringPrint(out); | 74 String::cast(this)->StringPrint(out); |
| 75 return; | 75 return; |
| 76 } | 76 } |
| 77 | 77 |
| 78 switch (instance_type) { | 78 switch (instance_type) { |
| 79 case SYMBOL_TYPE: |
| 80 Symbol::cast(this)->SymbolPrint(out); |
| 81 break; |
| 79 case MAP_TYPE: | 82 case MAP_TYPE: |
| 80 Map::cast(this)->MapPrint(out); | 83 Map::cast(this)->MapPrint(out); |
| 81 break; | 84 break; |
| 82 case HEAP_NUMBER_TYPE: | 85 case HEAP_NUMBER_TYPE: |
| 83 HeapNumber::cast(this)->HeapNumberPrint(out); | 86 HeapNumber::cast(this)->HeapNumberPrint(out); |
| 84 break; | 87 break; |
| 85 case FIXED_DOUBLE_ARRAY_TYPE: | 88 case FIXED_DOUBLE_ARRAY_TYPE: |
| 86 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); | 89 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(out); |
| 87 break; | 90 break; |
| 88 case FIXED_ARRAY_TYPE: | 91 case FIXED_ARRAY_TYPE: |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 PrintElements(out); | 473 PrintElements(out); |
| 471 PrintF(out, " }\n"); | 474 PrintF(out, " }\n"); |
| 472 } | 475 } |
| 473 | 476 |
| 474 | 477 |
| 475 static const char* TypeToString(InstanceType type) { | 478 static const char* TypeToString(InstanceType type) { |
| 476 switch (type) { | 479 switch (type) { |
| 477 case INVALID_TYPE: return "INVALID"; | 480 case INVALID_TYPE: return "INVALID"; |
| 478 case MAP_TYPE: return "MAP"; | 481 case MAP_TYPE: return "MAP"; |
| 479 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; | 482 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; |
| 483 case SYMBOL_TYPE: return "SYMBOL"; |
| 480 case STRING_TYPE: return "TWO_BYTE_STRING"; | 484 case STRING_TYPE: return "TWO_BYTE_STRING"; |
| 481 case ASCII_STRING_TYPE: return "ASCII_STRING"; | 485 case ASCII_STRING_TYPE: return "ASCII_STRING"; |
| 482 case CONS_STRING_TYPE: | 486 case CONS_STRING_TYPE: |
| 483 case CONS_ASCII_STRING_TYPE: | 487 case CONS_ASCII_STRING_TYPE: |
| 484 return "CONS_STRING"; | 488 return "CONS_STRING"; |
| 485 case EXTERNAL_STRING_TYPE: | 489 case EXTERNAL_STRING_TYPE: |
| 486 case EXTERNAL_ASCII_STRING_TYPE: | 490 case EXTERNAL_ASCII_STRING_TYPE: |
| 487 case EXTERNAL_STRING_WITH_ASCII_DATA_TYPE: | 491 case EXTERNAL_STRING_WITH_ASCII_DATA_TYPE: |
| 488 return "EXTERNAL_STRING"; | 492 return "EXTERNAL_STRING"; |
| 489 case SHORT_EXTERNAL_STRING_TYPE: | 493 case SHORT_EXTERNAL_STRING_TYPE: |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 } | 1125 } |
| 1122 } | 1126 } |
| 1123 PrintF(out, "\n"); | 1127 PrintF(out, "\n"); |
| 1124 } | 1128 } |
| 1125 | 1129 |
| 1126 | 1130 |
| 1127 #endif // OBJECT_PRINT | 1131 #endif // OBJECT_PRINT |
| 1128 | 1132 |
| 1129 | 1133 |
| 1130 } } // namespace v8::internal | 1134 } } // namespace v8::internal |
| OLD | NEW |