| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdarg.h> | 5 #include <stdarg.h> |
| 6 #include <sys/stat.h> | 6 #include <sys/stat.h> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/checks.h" | 10 #include "src/checks.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 void PrintPID(const char* format, ...) { | 96 void PrintPID(const char* format, ...) { |
| 97 OS::Print("[%d] ", OS::GetCurrentProcessId()); | 97 OS::Print("[%d] ", OS::GetCurrentProcessId()); |
| 98 va_list arguments; | 98 va_list arguments; |
| 99 va_start(arguments, format); | 99 va_start(arguments, format); |
| 100 OS::VPrint(format, arguments); | 100 OS::VPrint(format, arguments); |
| 101 va_end(arguments); | 101 va_end(arguments); |
| 102 } | 102 } |
| 103 | 103 |
| 104 | 104 |
| 105 int SNPrintF(Vector<char> str, const char* format, ...) { |
| 106 va_list args; |
| 107 va_start(args, format); |
| 108 int result = VSNPrintF(str, format, args); |
| 109 va_end(args); |
| 110 return result; |
| 111 } |
| 112 |
| 113 |
| 114 int VSNPrintF(Vector<char> str, const char* format, va_list args) { |
| 115 return OS::VSNPrintF(str.start(), str.length(), format, args); |
| 116 } |
| 117 |
| 118 |
| 119 void StrNCpy(Vector<char> dest, const char* src, size_t n) { |
| 120 OS::StrNCpy(dest.start(), dest.length(), src, n); |
| 121 } |
| 122 |
| 123 |
| 105 void Flush(FILE* out) { | 124 void Flush(FILE* out) { |
| 106 fflush(out); | 125 fflush(out); |
| 107 } | 126 } |
| 108 | 127 |
| 109 | 128 |
| 110 char* ReadLine(const char* prompt) { | 129 char* ReadLine(const char* prompt) { |
| 111 char* result = NULL; | 130 char* result = NULL; |
| 112 char line_buf[256]; | 131 char line_buf[256]; |
| 113 int offset = 0; | 132 int offset = 0; |
| 114 bool keep_going = true; | 133 bool keep_going = true; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper); | 388 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper); |
| 370 memcopy_uint16_uint8_function = | 389 memcopy_uint16_uint8_function = |
| 371 CreateMemCopyUint16Uint8Function(&MemCopyUint16Uint8Wrapper); | 390 CreateMemCopyUint16Uint8Function(&MemCopyUint16Uint8Wrapper); |
| 372 #elif V8_OS_POSIX && V8_HOST_ARCH_MIPS | 391 #elif V8_OS_POSIX && V8_HOST_ARCH_MIPS |
| 373 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper); | 392 memcopy_uint8_function = CreateMemCopyUint8Function(&MemCopyUint8Wrapper); |
| 374 #endif | 393 #endif |
| 375 } | 394 } |
| 376 | 395 |
| 377 | 396 |
| 378 } } // namespace v8::internal | 397 } } // namespace v8::internal |
| OLD | NEW |