diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc index df164ea89a0..c720994c8ee 100644 --- a/runtime/bin/eventhandler_win.cc +++ b/runtime/bin/eventhandler_win.cc @@ -116,6 +116,7 @@ int OverlappedBuffer::GetRemainingLength() { Handle::Handle(intptr_t handle) : ReferenceCounted(), DescriptorInfoBase(handle), + monitor_(), handle_(reinterpret_cast(handle)), completion_port_(INVALID_HANDLE_VALUE), event_handler_(nullptr), @@ -123,12 +124,11 @@ Handle::Handle(intptr_t handle) pending_read_(nullptr), pending_write_(nullptr), last_error_(NOERROR), - flags_(0), read_thread_id_(Thread::kInvalidThreadId), read_thread_handle_(nullptr), read_thread_starting_(false), read_thread_finished_(false), - monitor_() {} + flags_(0) {} Handle::~Handle() { } @@ -528,8 +528,7 @@ void ListenSocket::AcceptComplete(OverlappedBuffer* buffer, // Insert the accepted socket into the list. ClientSocket* client_socket = new ClientSocket( - buffer->client(), - std::move(std::unique_ptr(raw_remote_addr))); + buffer->client(), std::unique_ptr(raw_remote_addr)); client_socket->mark_connected(); client_socket->CreateCompletionPort(completion_port); if (accepted_head_ == nullptr) { diff --git a/runtime/bin/file_system_watcher_win.cc b/runtime/bin/file_system_watcher_win.cc index 8d9977573a7..84a4c82a2ea 100644 --- a/runtime/bin/file_system_watcher_win.cc +++ b/runtime/bin/file_system_watcher_win.cc @@ -7,7 +7,7 @@ #include "bin/file_system_watcher.h" -#include // NOLINT +#include // NOLINT #include "bin/builtin.h" #include "bin/eventhandler.h" diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc index 7ffd66a0bd5..c0b2438fe24 100644 --- a/runtime/bin/file_win.cc +++ b/runtime/bin/file_win.cc @@ -10,9 +10,9 @@ #include #include // NOLINT -#include // NOLINT #include // NOLINT #include // NOLINT +#include // NOLINT #undef StrDup // defined in Shlwapi.h as StrDupW #include // NOLINT #include // NOLINT @@ -328,8 +328,8 @@ class StringRAII { s_ = origin.release(); } - explicit StringRAII(const char* s) : s_(s), own_(false) {} - explicit StringRAII(char* s) : s_(s), own_(true) {} + explicit StringRAII(const char* s) : own_(false), s_(s) {} + explicit StringRAII(char* s) : own_(true), s_(s) {} ~StringRAII() { if (own_) { free(const_cast(s_)); diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h index 39c5bec66ca..4adb51ffdce 100644 --- a/runtime/platform/globals.h +++ b/runtime/platform/globals.h @@ -64,10 +64,10 @@ #define UNICODE #endif -#include -#include #include +#include #include +#include #include #include #endif // defined(_WIN32) diff --git a/runtime/tools/bin_to_assembly.py b/runtime/tools/bin_to_assembly.py index cd1bdd9a28a..6e3b373d823 100755 --- a/runtime/tools/bin_to_assembly.py +++ b/runtime/tools/bin_to_assembly.py @@ -69,6 +69,15 @@ def Main(): output_file.write(".const\n") output_file.write("public %s\n" % options.symbol_name) output_file.write("%s label byte\n" % options.symbol_name) + elif options.target_os in ["win_gnu"]: + # Cross compilation from Linux to Windows. + if options.executable: + output_file.write(".text\n") + else: + output_file.write(".section .rodata\n") + output_file.write(".global %s\n" % options.symbol_name) + output_file.write(".balign 32\n") + output_file.write("%s:\n" % options.symbol_name) else: if options.executable: output_file.write(".text\n") @@ -97,7 +106,7 @@ def Main(): if incbin: output_file.write(".incbin \"%s\"\n" % options.input) - if options.target_os not in ["mac", "ios", "win"]: + if options.target_os not in ["mac", "ios", "win", "win_gnu"]: output_file.write(".size {0}, .-{0}\n".format(options.symbol_name)) if options.size_symbol_name: diff --git a/runtime/vm/unwinding_records.cc b/runtime/vm/unwinding_records.cc index 58836ca408e..434e7ee7870 100644 --- a/runtime/vm/unwinding_records.cc +++ b/runtime/vm/unwinding_records.cc @@ -9,6 +9,10 @@ namespace dart { +const void* UnwindingRecords::GenerateRecordsInto(intptr_t offset, + uint8_t* target_buffer) { + return nullptr; +} void UnwindingRecords::RegisterExecutablePage(Page* page) {} void UnwindingRecords::UnregisterExecutablePage(Page* page) {}