OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 | 47 |
48 void PrintF(FILE* out, const char* format, ...) { | 48 void PrintF(FILE* out, const char* format, ...) { |
49 va_list arguments; | 49 va_list arguments; |
50 va_start(arguments, format); | 50 va_start(arguments, format); |
51 OS::VFPrint(out, format, arguments); | 51 OS::VFPrint(out, format, arguments); |
52 va_end(arguments); | 52 va_end(arguments); |
53 } | 53 } |
54 | 54 |
55 | 55 |
| 56 void PrintPID(const char* format, ...) { |
| 57 OS::Print("[%d] ", OS::GetCurrentProcessId()); |
| 58 va_list arguments; |
| 59 va_start(arguments, format); |
| 60 OS::VPrint(format, arguments); |
| 61 va_end(arguments); |
| 62 } |
| 63 |
| 64 |
56 void Flush(FILE* out) { | 65 void Flush(FILE* out) { |
57 fflush(out); | 66 fflush(out); |
58 } | 67 } |
59 | 68 |
60 | 69 |
61 char* ReadLine(const char* prompt) { | 70 char* ReadLine(const char* prompt) { |
62 char* result = NULL; | 71 char* result = NULL; |
63 char line_buf[256]; | 72 char line_buf[256]; |
64 int offset = 0; | 73 int offset = 0; |
65 bool keep_going = true; | 74 bool keep_going = true; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 start_of_line = p; | 360 start_of_line = p; |
352 line_no++; | 361 line_no++; |
353 } | 362 } |
354 } | 363 } |
355 | 364 |
356 return is_ascii; | 365 return is_ascii; |
357 } | 366 } |
358 | 367 |
359 | 368 |
360 } } // namespace v8::internal | 369 } } // namespace v8::internal |
OLD | NEW |