| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 HeapObject::PrintHeader(out, "PolymorphicCodeCache"); | 563 HeapObject::PrintHeader(out, "PolymorphicCodeCache"); |
| 564 PrintF(out, "\n - cache: "); | 564 PrintF(out, "\n - cache: "); |
| 565 cache()->ShortPrint(out); | 565 cache()->ShortPrint(out); |
| 566 } | 566 } |
| 567 | 567 |
| 568 | 568 |
| 569 void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) { | 569 void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) { |
| 570 HeapObject::PrintHeader(out, "TypeFeedbackInfo"); | 570 HeapObject::PrintHeader(out, "TypeFeedbackInfo"); |
| 571 PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n", | 571 PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n", |
| 572 ic_total_count(), ic_with_type_info_count()); | 572 ic_total_count(), ic_with_type_info_count()); |
| 573 PrintF(out, " - feedback_vector: "); | |
| 574 feedback_vector()->FixedArrayPrint(out); | |
| 575 } | 573 } |
| 576 | 574 |
| 577 | 575 |
| 578 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) { | 576 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) { |
| 579 HeapObject::PrintHeader(out, "AliasedArgumentsEntry"); | 577 HeapObject::PrintHeader(out, "AliasedArgumentsEntry"); |
| 580 PrintF(out, "\n - aliased_context_slot: %d", aliased_context_slot()); | 578 PrintF(out, "\n - aliased_context_slot: %d", aliased_context_slot()); |
| 581 } | 579 } |
| 582 | 580 |
| 583 | 581 |
| 584 void FixedArray::FixedArrayPrint(FILE* out) { | 582 void FixedArray::FixedArrayPrint(FILE* out) { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 | 891 |
| 894 PrintF(out, "\n"); | 892 PrintF(out, "\n"); |
| 895 } | 893 } |
| 896 | 894 |
| 897 | 895 |
| 898 void SharedFunctionInfo::SharedFunctionInfoPrint(FILE* out) { | 896 void SharedFunctionInfo::SharedFunctionInfoPrint(FILE* out) { |
| 899 HeapObject::PrintHeader(out, "SharedFunctionInfo"); | 897 HeapObject::PrintHeader(out, "SharedFunctionInfo"); |
| 900 PrintF(out, " - name: "); | 898 PrintF(out, " - name: "); |
| 901 name()->ShortPrint(out); | 899 name()->ShortPrint(out); |
| 902 PrintF(out, "\n - expected_nof_properties: %d", expected_nof_properties()); | 900 PrintF(out, "\n - expected_nof_properties: %d", expected_nof_properties()); |
| 901 PrintF(out, "\n - ast_node_count: %d", ast_node_count()); |
| 903 PrintF(out, "\n - instance class name = "); | 902 PrintF(out, "\n - instance class name = "); |
| 904 instance_class_name()->Print(out); | 903 instance_class_name()->Print(out); |
| 905 PrintF(out, "\n - code = "); | 904 PrintF(out, "\n - code = "); |
| 906 code()->ShortPrint(out); | 905 code()->ShortPrint(out); |
| 907 if (HasSourceCode()) { | 906 if (HasSourceCode()) { |
| 908 PrintF(out, "\n - source code = "); | 907 PrintF(out, "\n - source code = "); |
| 909 String* source = String::cast(Script::cast(script())->source()); | 908 String* source = String::cast(Script::cast(script())->source()); |
| 910 int start = start_position(); | 909 int start = start_position(); |
| 911 int length = end_position() - start; | 910 int length = end_position() - start; |
| 912 SmartArrayPointer<char> source_string = | 911 SmartArrayPointer<char> source_string = |
| 913 source->ToCString(DISALLOW_NULLS, | 912 source->ToCString(DISALLOW_NULLS, |
| 914 FAST_STRING_TRAVERSAL, | 913 FAST_STRING_TRAVERSAL, |
| 915 start, length, NULL); | 914 start, length, NULL); |
| 916 PrintF(out, "%s", source_string.get()); | 915 PrintF(out, "%s", source_string.get()); |
| 917 } | 916 } |
| 918 // Script files are often large, hard to read. | 917 // Script files are often large, hard to read. |
| 919 // PrintF(out, "\n - script ="); | 918 // PrintF(out, "\n - script ="); |
| 920 // script()->Print(out); | 919 // script()->Print(out); |
| 921 PrintF(out, "\n - function token position = %d", function_token_position()); | 920 PrintF(out, "\n - function token position = %d", function_token_position()); |
| 922 PrintF(out, "\n - start position = %d", start_position()); | 921 PrintF(out, "\n - start position = %d", start_position()); |
| 923 PrintF(out, "\n - end position = %d", end_position()); | 922 PrintF(out, "\n - end position = %d", end_position()); |
| 924 PrintF(out, "\n - is expression = %d", is_expression()); | 923 PrintF(out, "\n - is expression = %d", is_expression()); |
| 925 PrintF(out, "\n - debug info = "); | 924 PrintF(out, "\n - debug info = "); |
| 926 debug_info()->ShortPrint(out); | 925 debug_info()->ShortPrint(out); |
| 927 PrintF(out, "\n - length = %d", length()); | 926 PrintF(out, "\n - length = %d", length()); |
| 928 PrintF(out, "\n - optimized_code_map = "); | 927 PrintF(out, "\n - optimized_code_map = "); |
| 929 optimized_code_map()->ShortPrint(out); | 928 optimized_code_map()->ShortPrint(out); |
| 929 PrintF(out, "\n - feedback_vector = "); |
| 930 feedback_vector()->FixedArrayPrint(out); |
| 930 PrintF(out, "\n"); | 931 PrintF(out, "\n"); |
| 931 } | 932 } |
| 932 | 933 |
| 933 | 934 |
| 934 void JSGlobalProxy::JSGlobalProxyPrint(FILE* out) { | 935 void JSGlobalProxy::JSGlobalProxyPrint(FILE* out) { |
| 935 PrintF(out, "global_proxy "); | 936 PrintF(out, "global_proxy "); |
| 936 JSObjectPrint(out); | 937 JSObjectPrint(out); |
| 937 PrintF(out, "native context : "); | 938 PrintF(out, "native context : "); |
| 938 native_context()->ShortPrint(out); | 939 native_context()->ShortPrint(out); |
| 939 PrintF(out, "\n"); | 940 PrintF(out, "\n"); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 } | 1274 } |
| 1274 } | 1275 } |
| 1275 PrintF(out, "\n"); | 1276 PrintF(out, "\n"); |
| 1276 } | 1277 } |
| 1277 | 1278 |
| 1278 | 1279 |
| 1279 #endif // OBJECT_PRINT | 1280 #endif // OBJECT_PRINT |
| 1280 | 1281 |
| 1281 | 1282 |
| 1282 } } // namespace v8::internal | 1283 } } // namespace v8::internal |
| OLD | NEW |