| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 } | 549 } |
| 550 if (is_undetectable()) { | 550 if (is_undetectable()) { |
| 551 PrintF(out, " - undetectable\n"); | 551 PrintF(out, " - undetectable\n"); |
| 552 } | 552 } |
| 553 if (has_instance_call_handler()) { | 553 if (has_instance_call_handler()) { |
| 554 PrintF(out, " - instance_call_handler\n"); | 554 PrintF(out, " - instance_call_handler\n"); |
| 555 } | 555 } |
| 556 if (is_access_check_needed()) { | 556 if (is_access_check_needed()) { |
| 557 PrintF(out, " - access_check_needed\n"); | 557 PrintF(out, " - access_check_needed\n"); |
| 558 } | 558 } |
| 559 if (is_frozen()) { |
| 560 PrintF(out, " - frozen\n"); |
| 561 } else if (!is_extensible()) { |
| 562 PrintF(out, " - sealed\n"); |
| 563 } |
| 559 PrintF(out, " - back pointer: "); | 564 PrintF(out, " - back pointer: "); |
| 560 GetBackPointer()->ShortPrint(out); | 565 GetBackPointer()->ShortPrint(out); |
| 561 PrintF(out, "\n - instance descriptors %s#%i: ", | 566 PrintF(out, "\n - instance descriptors %s#%i: ", |
| 562 owns_descriptors() ? "(own) " : "", | 567 owns_descriptors() ? "(own) " : "", |
| 563 NumberOfOwnDescriptors()); | 568 NumberOfOwnDescriptors()); |
| 564 instance_descriptors()->ShortPrint(out); | 569 instance_descriptors()->ShortPrint(out); |
| 565 if (HasTransitionArray()) { | 570 if (HasTransitionArray()) { |
| 566 PrintF(out, "\n - transitions: "); | 571 PrintF(out, "\n - transitions: "); |
| 567 transitions()->ShortPrint(out); | 572 transitions()->ShortPrint(out); |
| 568 } | 573 } |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 PrintF(out, " - initial_map = "); | 860 PrintF(out, " - initial_map = "); |
| 856 if (has_initial_map()) { | 861 if (has_initial_map()) { |
| 857 initial_map()->ShortPrint(out); | 862 initial_map()->ShortPrint(out); |
| 858 } | 863 } |
| 859 PrintF(out, "\n - shared_info = "); | 864 PrintF(out, "\n - shared_info = "); |
| 860 shared()->ShortPrint(out); | 865 shared()->ShortPrint(out); |
| 861 PrintF(out, "\n - name = "); | 866 PrintF(out, "\n - name = "); |
| 862 shared()->name()->Print(out); | 867 shared()->name()->Print(out); |
| 863 PrintF(out, "\n - context = "); | 868 PrintF(out, "\n - context = "); |
| 864 context()->ShortPrint(out); | 869 context()->ShortPrint(out); |
| 865 PrintF(out, "\n - literals = "); | 870 if (shared()->bound()) { |
| 866 literals()->ShortPrint(out); | 871 PrintF(out, "\n - bindings = "); |
| 872 function_bindings()->ShortPrint(out); |
| 873 } else { |
| 874 PrintF(out, "\n - literals = "); |
| 875 literals()->ShortPrint(out); |
| 876 } |
| 867 PrintF(out, "\n - code = "); | 877 PrintF(out, "\n - code = "); |
| 868 code()->ShortPrint(out); | 878 code()->ShortPrint(out); |
| 869 PrintF(out, "\n"); | 879 PrintF(out, "\n"); |
| 870 | 880 |
| 871 PrintProperties(out); | 881 PrintProperties(out); |
| 872 PrintElements(out); | 882 PrintElements(out); |
| 873 | 883 |
| 874 PrintF(out, "\n"); | 884 PrintF(out, "\n"); |
| 875 } | 885 } |
| 876 | 886 |
| 877 | 887 |
| 878 void SharedFunctionInfo::SharedFunctionInfoPrint(FILE* out) { | 888 void SharedFunctionInfo::SharedFunctionInfoPrint(FILE* out) { |
| 879 HeapObject::PrintHeader(out, "SharedFunctionInfo"); | 889 HeapObject::PrintHeader(out, "SharedFunctionInfo"); |
| 880 PrintF(out, " - name: "); | 890 PrintF(out, " - name: "); |
| 881 name()->ShortPrint(out); | 891 name()->ShortPrint(out); |
| 882 PrintF(out, "\n - expected_nof_properties: %d", expected_nof_properties()); | 892 PrintF(out, "\n - expected_nof_properties: %d", expected_nof_properties()); |
| 883 PrintF(out, "\n - instance class name = "); | 893 PrintF(out, "\n - instance class name = "); |
| 884 instance_class_name()->Print(out); | 894 instance_class_name()->Print(out); |
| 885 PrintF(out, "\n - code = "); | 895 PrintF(out, "\n - code = "); |
| 886 code()->ShortPrint(out); | 896 code()->ShortPrint(out); |
| 887 if (HasSourceCode()) { | 897 if (HasSourceCode()) { |
| 888 PrintF(out, "\n - source code = "); | 898 PrintF(out, "\n - source code = "); |
| 889 String* source = String::cast(Script::cast(script())->source()); | 899 String* source = String::cast(Script::cast(script())->source()); |
| 890 int start = start_position(); | 900 int start = start_position(); |
| 891 int length = end_position() - start; | 901 int length = end_position() - start; |
| 892 SmartArrayPointer<char> source_string = | 902 SmartArrayPointer<char> source_string = |
| 893 source->ToCString(DISALLOW_NULLS, | 903 source->ToCString(DISALLOW_NULLS, |
| 894 FAST_STRING_TRAVERSAL, | 904 FAST_STRING_TRAVERSAL, |
| 895 start, length, NULL); | 905 start, length, NULL); |
| 896 PrintF(out, "%s", *source_string); | 906 PrintF(out, "%s", source_string.get()); |
| 897 } | 907 } |
| 898 // Script files are often large, hard to read. | 908 // Script files are often large, hard to read. |
| 899 // PrintF(out, "\n - script ="); | 909 // PrintF(out, "\n - script ="); |
| 900 // script()->Print(out); | 910 // script()->Print(out); |
| 901 PrintF(out, "\n - function token position = %d", function_token_position()); | 911 PrintF(out, "\n - function token position = %d", function_token_position()); |
| 902 PrintF(out, "\n - start position = %d", start_position()); | 912 PrintF(out, "\n - start position = %d", start_position()); |
| 903 PrintF(out, "\n - end position = %d", end_position()); | 913 PrintF(out, "\n - end position = %d", end_position()); |
| 904 PrintF(out, "\n - is expression = %d", is_expression()); | 914 PrintF(out, "\n - is expression = %d", is_expression()); |
| 905 PrintF(out, "\n - debug info = "); | 915 PrintF(out, "\n - debug info = "); |
| 906 debug_info()->ShortPrint(out); | 916 debug_info()->ShortPrint(out); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 } | 1268 } |
| 1259 } | 1269 } |
| 1260 PrintF(out, "\n"); | 1270 PrintF(out, "\n"); |
| 1261 } | 1271 } |
| 1262 | 1272 |
| 1263 | 1273 |
| 1264 #endif // OBJECT_PRINT | 1274 #endif // OBJECT_PRINT |
| 1265 | 1275 |
| 1266 | 1276 |
| 1267 } } // namespace v8::internal | 1277 } } // namespace v8::internal |
| OLD | NEW |