| 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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 code()->ShortPrint(out); | 896 code()->ShortPrint(out); |
| 897 if (HasSourceCode()) { | 897 if (HasSourceCode()) { |
| 898 PrintF(out, "\n - source code = "); | 898 PrintF(out, "\n - source code = "); |
| 899 String* source = String::cast(Script::cast(script())->source()); | 899 String* source = String::cast(Script::cast(script())->source()); |
| 900 int start = start_position(); | 900 int start = start_position(); |
| 901 int length = end_position() - start; | 901 int length = end_position() - start; |
| 902 SmartArrayPointer<char> source_string = | 902 SmartArrayPointer<char> source_string = |
| 903 source->ToCString(DISALLOW_NULLS, | 903 source->ToCString(DISALLOW_NULLS, |
| 904 FAST_STRING_TRAVERSAL, | 904 FAST_STRING_TRAVERSAL, |
| 905 start, length, NULL); | 905 start, length, NULL); |
| 906 PrintF(out, "%s", *source_string); | 906 PrintF(out, "%s", source_string.get()); |
| 907 } | 907 } |
| 908 // Script files are often large, hard to read. | 908 // Script files are often large, hard to read. |
| 909 // PrintF(out, "\n - script ="); | 909 // PrintF(out, "\n - script ="); |
| 910 // script()->Print(out); | 910 // script()->Print(out); |
| 911 PrintF(out, "\n - function token position = %d", function_token_position()); | 911 PrintF(out, "\n - function token position = %d", function_token_position()); |
| 912 PrintF(out, "\n - start position = %d", start_position()); | 912 PrintF(out, "\n - start position = %d", start_position()); |
| 913 PrintF(out, "\n - end position = %d", end_position()); | 913 PrintF(out, "\n - end position = %d", end_position()); |
| 914 PrintF(out, "\n - is expression = %d", is_expression()); | 914 PrintF(out, "\n - is expression = %d", is_expression()); |
| 915 PrintF(out, "\n - debug info = "); | 915 PrintF(out, "\n - debug info = "); |
| 916 debug_info()->ShortPrint(out); | 916 debug_info()->ShortPrint(out); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 } | 1268 } |
| 1269 } | 1269 } |
| 1270 PrintF(out, "\n"); | 1270 PrintF(out, "\n"); |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 | 1273 |
| 1274 #endif // OBJECT_PRINT | 1274 #endif // OBJECT_PRINT |
| 1275 | 1275 |
| 1276 | 1276 |
| 1277 } } // namespace v8::internal | 1277 } } // namespace v8::internal |
| OLD | NEW |