| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 PRINT_ELEMENTS(INT32_ELEMENTS, FixedInt32Array) | 371 PRINT_ELEMENTS(INT32_ELEMENTS, FixedInt32Array) |
| 372 PRINT_DOUBLE_ELEMENTS(FLOAT32_ELEMENTS, FixedFloat32Array) | 372 PRINT_DOUBLE_ELEMENTS(FLOAT32_ELEMENTS, FixedFloat32Array) |
| 373 PRINT_DOUBLE_ELEMENTS(FLOAT64_ELEMENTS, FixedFloat64Array) | 373 PRINT_DOUBLE_ELEMENTS(FLOAT64_ELEMENTS, FixedFloat64Array) |
| 374 | 374 |
| 375 #undef PRINT_DOUBLE_ELEMENTS | 375 #undef PRINT_DOUBLE_ELEMENTS |
| 376 #undef PRINT_ELEMENTS | 376 #undef PRINT_ELEMENTS |
| 377 | 377 |
| 378 case DICTIONARY_ELEMENTS: | 378 case DICTIONARY_ELEMENTS: |
| 379 elements()->Print(out); | 379 elements()->Print(out); |
| 380 break; | 380 break; |
| 381 case NON_STRICT_ARGUMENTS_ELEMENTS: { | 381 case SLOPPY_ARGUMENTS_ELEMENTS: { |
| 382 FixedArray* p = FixedArray::cast(elements()); | 382 FixedArray* p = FixedArray::cast(elements()); |
| 383 PrintF(out, " parameter map:"); | 383 PrintF(out, " parameter map:"); |
| 384 for (int i = 2; i < p->length(); i++) { | 384 for (int i = 2; i < p->length(); i++) { |
| 385 PrintF(out, " %d:", i - 2); | 385 PrintF(out, " %d:", i - 2); |
| 386 p->get(i)->ShortPrint(out); | 386 p->get(i)->ShortPrint(out); |
| 387 } | 387 } |
| 388 PrintF(out, "\n context: "); | 388 PrintF(out, "\n context: "); |
| 389 p->get(0)->ShortPrint(out); | 389 p->get(0)->ShortPrint(out); |
| 390 PrintF(out, "\n arguments: "); | 390 PrintF(out, "\n arguments: "); |
| 391 p->get(1)->ShortPrint(out); | 391 p->get(1)->ShortPrint(out); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 HeapObject::PrintHeader(out, "PolymorphicCodeCache"); | 559 HeapObject::PrintHeader(out, "PolymorphicCodeCache"); |
| 560 PrintF(out, "\n - cache: "); | 560 PrintF(out, "\n - cache: "); |
| 561 cache()->ShortPrint(out); | 561 cache()->ShortPrint(out); |
| 562 } | 562 } |
| 563 | 563 |
| 564 | 564 |
| 565 void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) { | 565 void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) { |
| 566 HeapObject::PrintHeader(out, "TypeFeedbackInfo"); | 566 HeapObject::PrintHeader(out, "TypeFeedbackInfo"); |
| 567 PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n", | 567 PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n", |
| 568 ic_total_count(), ic_with_type_info_count()); | 568 ic_total_count(), ic_with_type_info_count()); |
| 569 PrintF(out, " - feedback_vector: "); | |
| 570 feedback_vector()->FixedArrayPrint(out); | |
| 571 } | 569 } |
| 572 | 570 |
| 573 | 571 |
| 574 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) { | 572 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) { |
| 575 HeapObject::PrintHeader(out, "AliasedArgumentsEntry"); | 573 HeapObject::PrintHeader(out, "AliasedArgumentsEntry"); |
| 576 PrintF(out, "\n - aliased_context_slot: %d", aliased_context_slot()); | 574 PrintF(out, "\n - aliased_context_slot: %d", aliased_context_slot()); |
| 577 } | 575 } |
| 578 | 576 |
| 579 | 577 |
| 580 void FixedArray::FixedArrayPrint(FILE* out) { | 578 void FixedArray::FixedArrayPrint(FILE* out) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 599 } | 597 } |
| 600 } | 598 } |
| 601 PrintF(out, "\n"); | 599 PrintF(out, "\n"); |
| 602 } | 600 } |
| 603 | 601 |
| 604 | 602 |
| 605 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) { | 603 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) { |
| 606 HeapObject::PrintHeader(out, "ConstantPoolArray"); | 604 HeapObject::PrintHeader(out, "ConstantPoolArray"); |
| 607 PrintF(out, " - length: %d", length()); | 605 PrintF(out, " - length: %d", length()); |
| 608 for (int i = 0; i < length(); i++) { | 606 for (int i = 0; i < length(); i++) { |
| 609 if (i < first_ptr_index()) { | 607 if (i < first_code_ptr_index()) { |
| 610 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); | 608 PrintF(out, "\n [%d]: double: %g", i, get_int64_entry_as_double(i)); |
| 609 } else if (i < first_heap_ptr_index()) { |
| 610 PrintF(out, "\n [%d]: code target pointer: %p", i, |
| 611 reinterpret_cast<void*>(get_code_ptr_entry(i))); |
| 611 } else if (i < first_int32_index()) { | 612 } else if (i < first_int32_index()) { |
| 612 PrintF(out, "\n [%d]: pointer: %p", i, | 613 PrintF(out, "\n [%d]: heap pointer: %p", i, |
| 613 reinterpret_cast<void*>(get_ptr_entry(i))); | 614 reinterpret_cast<void*>(get_heap_ptr_entry(i))); |
| 614 } else { | 615 } else { |
| 615 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); | 616 PrintF(out, "\n [%d]: int32: %d", i, get_int32_entry(i)); |
| 616 } | 617 } |
| 617 } | 618 } |
| 618 PrintF(out, "\n"); | 619 PrintF(out, "\n"); |
| 619 } | 620 } |
| 620 | 621 |
| 621 | 622 |
| 622 void JSValue::JSValuePrint(FILE* out) { | 623 void JSValue::JSValuePrint(FILE* out) { |
| 623 HeapObject::PrintHeader(out, "ValueObject"); | 624 HeapObject::PrintHeader(out, "ValueObject"); |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 // script()->Print(out); | 872 // script()->Print(out); |
| 872 PrintF(out, "\n - function token position = %d", function_token_position()); | 873 PrintF(out, "\n - function token position = %d", function_token_position()); |
| 873 PrintF(out, "\n - start position = %d", start_position()); | 874 PrintF(out, "\n - start position = %d", start_position()); |
| 874 PrintF(out, "\n - end position = %d", end_position()); | 875 PrintF(out, "\n - end position = %d", end_position()); |
| 875 PrintF(out, "\n - is expression = %d", is_expression()); | 876 PrintF(out, "\n - is expression = %d", is_expression()); |
| 876 PrintF(out, "\n - debug info = "); | 877 PrintF(out, "\n - debug info = "); |
| 877 debug_info()->ShortPrint(out); | 878 debug_info()->ShortPrint(out); |
| 878 PrintF(out, "\n - length = %d", length()); | 879 PrintF(out, "\n - length = %d", length()); |
| 879 PrintF(out, "\n - optimized_code_map = "); | 880 PrintF(out, "\n - optimized_code_map = "); |
| 880 optimized_code_map()->ShortPrint(out); | 881 optimized_code_map()->ShortPrint(out); |
| 882 PrintF(out, "\n - feedback_vector = "); |
| 883 feedback_vector()->FixedArrayPrint(out); |
| 881 PrintF(out, "\n"); | 884 PrintF(out, "\n"); |
| 882 } | 885 } |
| 883 | 886 |
| 884 | 887 |
| 885 void JSGlobalProxy::JSGlobalProxyPrint(FILE* out) { | 888 void JSGlobalProxy::JSGlobalProxyPrint(FILE* out) { |
| 886 PrintF(out, "global_proxy "); | 889 PrintF(out, "global_proxy "); |
| 887 JSObjectPrint(out); | 890 JSObjectPrint(out); |
| 888 PrintF(out, "native context : "); | 891 PrintF(out, "native context : "); |
| 889 native_context()->ShortPrint(out); | 892 native_context()->ShortPrint(out); |
| 890 PrintF(out, "\n"); | 893 PrintF(out, "\n"); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 PrintF(out, "\n - name: "); | 1143 PrintF(out, "\n - name: "); |
| 1141 name()->ShortPrint(out); | 1144 name()->ShortPrint(out); |
| 1142 PrintF(out, "\n - line_offset: "); | 1145 PrintF(out, "\n - line_offset: "); |
| 1143 line_offset()->ShortPrint(out); | 1146 line_offset()->ShortPrint(out); |
| 1144 PrintF(out, "\n - column_offset: "); | 1147 PrintF(out, "\n - column_offset: "); |
| 1145 column_offset()->ShortPrint(out); | 1148 column_offset()->ShortPrint(out); |
| 1146 PrintF(out, "\n - type: "); | 1149 PrintF(out, "\n - type: "); |
| 1147 type()->ShortPrint(out); | 1150 type()->ShortPrint(out); |
| 1148 PrintF(out, "\n - id: "); | 1151 PrintF(out, "\n - id: "); |
| 1149 id()->ShortPrint(out); | 1152 id()->ShortPrint(out); |
| 1150 PrintF(out, "\n - data: "); | |
| 1151 data()->ShortPrint(out); | |
| 1152 PrintF(out, "\n - context data: "); | 1153 PrintF(out, "\n - context data: "); |
| 1153 context_data()->ShortPrint(out); | 1154 context_data()->ShortPrint(out); |
| 1154 PrintF(out, "\n - wrapper: "); | 1155 PrintF(out, "\n - wrapper: "); |
| 1155 wrapper()->ShortPrint(out); | 1156 wrapper()->ShortPrint(out); |
| 1156 PrintF(out, "\n - compilation type: %d", compilation_type()); | 1157 PrintF(out, "\n - compilation type: %d", compilation_type()); |
| 1157 PrintF(out, "\n - line ends: "); | 1158 PrintF(out, "\n - line ends: "); |
| 1158 line_ends()->ShortPrint(out); | 1159 line_ends()->ShortPrint(out); |
| 1159 PrintF(out, "\n - eval from shared: "); | 1160 PrintF(out, "\n - eval from shared: "); |
| 1160 eval_from_shared()->ShortPrint(out); | 1161 eval_from_shared()->ShortPrint(out); |
| 1161 PrintF(out, "\n - eval from instructions offset: "); | 1162 PrintF(out, "\n - eval from instructions offset: "); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 } | 1230 } |
| 1230 } | 1231 } |
| 1231 PrintF(out, "\n"); | 1232 PrintF(out, "\n"); |
| 1232 } | 1233 } |
| 1233 | 1234 |
| 1234 | 1235 |
| 1235 #endif // OBJECT_PRINT | 1236 #endif // OBJECT_PRINT |
| 1236 | 1237 |
| 1237 | 1238 |
| 1238 } } // namespace v8::internal | 1239 } } // namespace v8::internal |
| OLD | NEW |