| Index: runtime/bin/utils_win.cc
|
| diff --git a/runtime/bin/utils_win.cc b/runtime/bin/utils_win.cc
|
| index ef4851a6fa37bde4d73073c7a79429de8b03790a..e06cb9bb4d938f69735307286fbfb629d8ba9748 100644
|
| --- a/runtime/bin/utils_win.cc
|
| +++ b/runtime/bin/utils_win.cc
|
| @@ -31,7 +31,6 @@ void FormatMessageIntoBuffer(DWORD code, wchar_t* buffer, int buffer_length) {
|
| buffer[buffer_length - 1] = 0;
|
| }
|
|
|
| -
|
| OSError::OSError() : sub_system_(kSystem), code_(0), message_(NULL) {
|
| set_code(GetLastError());
|
|
|
| @@ -42,7 +41,6 @@ OSError::OSError() : sub_system_(kSystem), code_(0), message_(NULL) {
|
| SetMessage(utf8);
|
| }
|
|
|
| -
|
| void OSError::SetCodeAndMessage(SubSystem sub_system, int code) {
|
| set_sub_system(sub_system);
|
| set_code(code);
|
| @@ -54,7 +52,6 @@ void OSError::SetCodeAndMessage(SubSystem sub_system, int code) {
|
| SetMessage(utf8);
|
| }
|
|
|
| -
|
| char* StringUtils::ConsoleStringToUtf8(char* str,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -67,7 +64,6 @@ char* StringUtils::ConsoleStringToUtf8(char* str,
|
| return utf8;
|
| }
|
|
|
| -
|
| char* StringUtils::Utf8ToConsoleString(char* utf8,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -88,7 +84,6 @@ char* StringUtils::Utf8ToConsoleString(char* utf8,
|
| return ansi;
|
| }
|
|
|
| -
|
| char* StringUtilsWin::WideToUtf8(wchar_t* wide,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -105,7 +100,6 @@ char* StringUtilsWin::WideToUtf8(wchar_t* wide,
|
| return utf8;
|
| }
|
|
|
| -
|
| wchar_t* StringUtilsWin::Utf8ToWide(char* utf8,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -122,7 +116,6 @@ wchar_t* StringUtilsWin::Utf8ToWide(char* utf8,
|
| return wide;
|
| }
|
|
|
| -
|
| const char* StringUtils::Utf8ToConsoleString(const char* utf8,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -130,7 +123,6 @@ const char* StringUtils::Utf8ToConsoleString(const char* utf8,
|
| const_cast<char*>(utf8), len, result_len));
|
| }
|
|
|
| -
|
| const char* StringUtils::ConsoleStringToUtf8(const char* str,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -138,7 +130,6 @@ const char* StringUtils::ConsoleStringToUtf8(const char* str,
|
| const_cast<char*>(str), len, result_len));
|
| }
|
|
|
| -
|
| const char* StringUtilsWin::WideToUtf8(const wchar_t* wide,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -146,7 +137,6 @@ const char* StringUtilsWin::WideToUtf8(const wchar_t* wide,
|
| StringUtilsWin::WideToUtf8(const_cast<wchar_t*>(wide), len, result_len));
|
| }
|
|
|
| -
|
| const wchar_t* StringUtilsWin::Utf8ToWide(const char* utf8,
|
| intptr_t len,
|
| intptr_t* result_len) {
|
| @@ -154,7 +144,6 @@ const wchar_t* StringUtilsWin::Utf8ToWide(const char* utf8,
|
| StringUtilsWin::Utf8ToWide(const_cast<char*>(utf8), len, result_len));
|
| }
|
|
|
| -
|
| char* StringUtils::StrNDup(const char* s, intptr_t n) {
|
| intptr_t len = strlen(s);
|
| if ((n < 0) || (len < 0)) {
|
| @@ -171,7 +160,6 @@ char* StringUtils::StrNDup(const char* s, intptr_t n) {
|
| return reinterpret_cast<char*>(memmove(result, s, len));
|
| }
|
|
|
| -
|
| bool ShellUtils::GetUtf8Argv(int argc, char** argv) {
|
| wchar_t* command_line = GetCommandLineW();
|
| int unicode_argc;
|
| @@ -195,7 +183,6 @@ bool ShellUtils::GetUtf8Argv(int argc, char** argv) {
|
| return true;
|
| }
|
|
|
| -
|
| // Although win32 uses 64-bit integers for representing timestamps,
|
| // these are packed into a FILETIME structure. The FILETIME
|
| // structure is just a struct representing a 64-bit integer. The
|
| @@ -207,7 +194,6 @@ union TimeStamp {
|
| int64_t t_;
|
| };
|
|
|
| -
|
| static int64_t GetCurrentTimeMicros() {
|
| static const int64_t kTimeEpoc = 116444736000000000LL;
|
| static const int64_t kTimeScaler = 10; // 100 ns to us.
|
| @@ -217,7 +203,6 @@ static int64_t GetCurrentTimeMicros() {
|
| return (time.t_ - kTimeEpoc) / kTimeScaler;
|
| }
|
|
|
| -
|
| static int64_t qpc_ticks_per_second = 0;
|
|
|
| void TimerUtils::InitOnce() {
|
| @@ -229,12 +214,10 @@ void TimerUtils::InitOnce() {
|
| }
|
| }
|
|
|
| -
|
| int64_t TimerUtils::GetCurrentMonotonicMillis() {
|
| return GetCurrentMonotonicMicros() / 1000;
|
| }
|
|
|
| -
|
| int64_t TimerUtils::GetCurrentMonotonicMicros() {
|
| if (qpc_ticks_per_second == 0) {
|
| // QueryPerformanceCounter not supported, fallback.
|
| @@ -252,7 +235,6 @@ int64_t TimerUtils::GetCurrentMonotonicMicros() {
|
| return result;
|
| }
|
|
|
| -
|
| void TimerUtils::Sleep(int64_t millis) {
|
| ::Sleep(millis);
|
| }
|
|
|