diff --git a/runtime/bin/dartdev_isolate.cc b/runtime/bin/dartdev_isolate.cc index 1406ef3ebb2..0457f210174 100644 --- a/runtime/bin/dartdev_isolate.cc +++ b/runtime/bin/dartdev_isolate.cc @@ -113,7 +113,7 @@ void DartDevIsolate::DartDevRunner::Run( int result = Thread::Start("DartDev Runner", RunCallback, reinterpret_cast(this)); if (result != 0) { - FATAL1("Failed to start DartDev thread: %d", result); + FATAL("Failed to start DartDev thread: %d", result); } monitor_->WaitMicros(Monitor::kNoTimeout); diff --git a/runtime/bin/directory_android.cc b/runtime/bin/directory_android.cc index bc7dcf3465e..f003c608a20 100644 --- a/runtime/bin/directory_android.cc +++ b/runtime/bin/directory_android.cc @@ -208,7 +208,7 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) { default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry->d_type); + FATAL("Unexpected d_type: %d\n", entry->d_type); return kListError; } } @@ -351,7 +351,7 @@ static bool DeleteRecursively(int dirfd, PathBuffer* path) { } default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry->d_type); + FATAL("Unexpected d_type: %d\n", entry->d_type); break; } if (!ok) { diff --git a/runtime/bin/directory_fuchsia.cc b/runtime/bin/directory_fuchsia.cc index 4e8ab38dbf1..681c9ae2f5e 100644 --- a/runtime/bin/directory_fuchsia.cc +++ b/runtime/bin/directory_fuchsia.cc @@ -214,7 +214,7 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) { default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry->d_type); + FATAL("Unexpected d_type: %d\n", entry->d_type); return kListError; } } @@ -461,7 +461,7 @@ static bool DeleteRecursively(int dirfd, PathBuffer* path) { } default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry->d_type); + FATAL("Unexpected d_type: %d\n", entry->d_type); break; } if (!ok) { diff --git a/runtime/bin/directory_linux.cc b/runtime/bin/directory_linux.cc index d2704409f11..71db7fedaea 100644 --- a/runtime/bin/directory_linux.cc +++ b/runtime/bin/directory_linux.cc @@ -208,7 +208,7 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) { default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry->d_type); + FATAL("Unexpected d_type: %d\n", entry->d_type); return kListError; } } @@ -351,7 +351,7 @@ static bool DeleteRecursively(int dirfd, PathBuffer* path) { } default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry->d_type); + FATAL("Unexpected d_type: %d\n", entry->d_type); break; } if (!ok) { diff --git a/runtime/bin/directory_macos.cc b/runtime/bin/directory_macos.cc index eac5f04d46f..d05efd2d38d 100644 --- a/runtime/bin/directory_macos.cc +++ b/runtime/bin/directory_macos.cc @@ -195,7 +195,7 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) { default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry.d_type); + FATAL("Unexpected d_type: %d\n", entry.d_type); return kListError; } } @@ -313,7 +313,7 @@ static bool DeleteRecursively(PathBuffer* path) { } default: // We should have covered all the bases. If not, let's get an error. - FATAL1("Unexpected d_type: %d\n", entry.d_type); + FATAL("Unexpected d_type: %d\n", entry.d_type); break; } if (!ok) { diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc index ef712f88e5f..acc5ac377fc 100644 --- a/runtime/bin/eventhandler_android.cc +++ b/runtime/bin/eventhandler_android.cc @@ -97,7 +97,7 @@ EventHandlerImplementation::EventHandlerImplementation() static const int kEpollInitialSize = 64; epoll_fd_ = NO_RETRY_EXPECTED(epoll_create(kEpollInitialSize)); if (epoll_fd_ == -1) { - FATAL1("Failed creating epoll file descriptor: %i", errno); + FATAL("Failed creating epoll file descriptor: %i", errno); } if (!FDUtils::SetCloseOnExec(epoll_fd_)) { FATAL("Failed to set epoll fd close on exec\n"); @@ -179,7 +179,7 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id, if (result == -1) { perror("Interrupt message failure:"); } - FATAL1("Interrupt message failure. Wrote %" Pd " bytes.", result); + FATAL("Interrupt message failure. Wrote %" Pd " bytes.", result); } } @@ -409,7 +409,7 @@ void EventHandlerImplementation::Start(EventHandler* handler) { Thread::Start("dart:io EventHandler", &EventHandlerImplementation::Poll, reinterpret_cast(handler)); if (result != 0) { - FATAL1("Failed to start event handler thread %d", result); + FATAL("Failed to start event handler thread %d", result); } } diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc index c919c1ec4b6..30a4e4a57a4 100644 --- a/runtime/bin/eventhandler_fuchsia.cc +++ b/runtime/bin/eventhandler_fuchsia.cc @@ -398,7 +398,7 @@ EventHandlerImplementation::EventHandlerImplementation() if (status != ZX_OK) { // This is a FATAL because the VM won't work at all if we can't create this // port. - FATAL1("zx_port_create failed: %s\n", zx_status_get_string(status)); + FATAL("zx_port_create failed: %s\n", zx_status_get_string(status)); } ASSERT(port_handle_ != ZX_HANDLE_INVALID); } @@ -468,7 +468,7 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id, if (status != ZX_OK) { // This is a FATAL because the VM won't work at all if we can't send any // messages to the EventHandler thread. - FATAL1("zx_port_queue failed: %s\n", zx_status_get_string(status)); + FATAL("zx_port_queue failed: %s\n", zx_status_get_string(status)); } } @@ -653,7 +653,7 @@ void EventHandlerImplementation::Poll(uword args) { if (status == ZX_ERR_TIMED_OUT) { handler_impl->HandleTimeout(); } else if (status != ZX_OK) { - FATAL1("zx_port_wait failed: %s\n", zx_status_get_string(status)); + FATAL("zx_port_wait failed: %s\n", zx_status_get_string(status)); } else { handler_impl->HandleTimeout(); handler_impl->HandlePacket(&pkt); @@ -668,7 +668,7 @@ void EventHandlerImplementation::Start(EventHandler* handler) { Thread::Start("dart:io EventHandler", &EventHandlerImplementation::Poll, reinterpret_cast(handler)); if (result != 0) { - FATAL1("Failed to start event handler thread %d", result); + FATAL("Failed to start event handler thread %d", result); } } diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc index b7011ca5917..584fe4c3f72 100644 --- a/runtime/bin/eventhandler_linux.cc +++ b/runtime/bin/eventhandler_linux.cc @@ -91,7 +91,7 @@ EventHandlerImplementation::EventHandlerImplementation() static const int kEpollInitialSize = 64; epoll_fd_ = NO_RETRY_EXPECTED(epoll_create(kEpollInitialSize)); if (epoll_fd_ == -1) { - FATAL1("Failed creating epoll file descriptor: %i", errno); + FATAL("Failed creating epoll file descriptor: %i", errno); } if (!FDUtils::SetCloseOnExec(epoll_fd_)) { FATAL("Failed to set epoll fd close on exec\n"); @@ -107,7 +107,7 @@ EventHandlerImplementation::EventHandlerImplementation() } timer_fd_ = NO_RETRY_EXPECTED(timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC)); if (timer_fd_ == -1) { - FATAL1("Failed creating timerfd file descriptor: %i", errno); + FATAL("Failed creating timerfd file descriptor: %i", errno); } // Register the timer_fd_ with the epoll instance. event.events = EPOLLIN; @@ -115,8 +115,8 @@ EventHandlerImplementation::EventHandlerImplementation() status = NO_RETRY_EXPECTED(epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &event)); if (status == -1) { - FATAL2("Failed adding timerfd fd(%i) to epoll instance: %i", timer_fd_, - errno); + FATAL("Failed adding timerfd fd(%i) to epoll instance: %i", timer_fd_, + errno); } } @@ -187,7 +187,7 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id, if (result == -1) { perror("Interrupt message failure:"); } - FATAL1("Interrupt message failure. Wrote %" Pd " bytes.", result); + FATAL("Interrupt message failure. Wrote %" Pd " bytes.", result); } } @@ -413,7 +413,7 @@ void EventHandlerImplementation::Start(EventHandler* handler) { Thread::Start("dart:io EventHandler", &EventHandlerImplementation::Poll, reinterpret_cast(handler)); if (result != 0) { - FATAL1("Failed to start event handler thread %d", result); + FATAL("Failed to start event handler thread %d", result); } } diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc index ab438978d5e..4e586693395 100644 --- a/runtime/bin/eventhandler_macos.cc +++ b/runtime/bin/eventhandler_macos.cc @@ -126,7 +126,7 @@ EventHandlerImplementation::EventHandlerImplementation() const int kBufferSize = 1024; char error_message[kBufferSize]; Utils::StrError(errno, error_message, kBufferSize); - FATAL1("Failed adding interrupt fd to kqueue: %s\n", error_message); + FATAL("Failed adding interrupt fd to kqueue: %s\n", error_message); } } @@ -195,7 +195,7 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id, if (result == -1) { perror("Interrupt message failure:"); } - FATAL1("Interrupt message failure. Wrote %" Pd " bytes.", result); + FATAL("Interrupt message failure. Wrote %" Pd " bytes.", result); } } @@ -380,7 +380,7 @@ void EventHandlerImplementation::HandleEvents(struct kevent* events, int size) { const int kBufferSize = 1024; char error_message[kBufferSize]; Utils::StrError(events[i].data, error_message, kBufferSize); - FATAL1("kevent failed %s\n", error_message); + FATAL("kevent failed %s\n", error_message); } if (events[i].udata == NULL) { interrupt_seen = true; @@ -458,7 +458,7 @@ void EventHandlerImplementation::EventHandlerEntry(uword args) { const int kBufferSize = 1024; char error_message[kBufferSize]; Utils::StrError(errno, error_message, kBufferSize); - FATAL1("kevent failed %s\n", error_message); + FATAL("kevent failed %s\n", error_message); } else { handler_impl->HandleTimeout(); handler_impl->HandleEvents(events, result); @@ -473,7 +473,7 @@ void EventHandlerImplementation::Start(EventHandler* handler) { &EventHandlerImplementation::EventHandlerEntry, reinterpret_cast(handler)); if (result != 0) { - FATAL1("Failed to start event handler thread %d", result); + FATAL("Failed to start event handler thread %d", result); } } diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc index 6a3928f9cbf..2af20b967fc 100644 --- a/runtime/bin/eventhandler_win.cc +++ b/runtime/bin/eventhandler_win.cc @@ -306,7 +306,7 @@ bool Handle::IssueRead() { int result = Thread::Start("dart:io ReadFile", ReadFileThread, reinterpret_cast(this)); if (result != 0) { - FATAL1("Failed to start read file thread %d", result); + FATAL("Failed to start read file thread %d", result); } return true; } @@ -800,7 +800,7 @@ intptr_t StdHandle::Write(const void* buffer, intptr_t num_bytes) { int result = Thread::Start("dart:io WriteFile", WriteFileThread, reinterpret_cast(this)); if (result != 0) { - FATAL1("Failed to start write file thread %d", result); + FATAL("Failed to start write file thread %d", result); } while (!write_thread_running_) { // Wait until we the thread is running. @@ -1493,7 +1493,7 @@ void EventHandlerImplementation::Start(EventHandler* handler) { int result = Thread::Start("dart:io EventHandler", EventHandlerEntry, reinterpret_cast(handler)); if (result != 0) { - FATAL1("Failed to start event handler thread %d", result); + FATAL("Failed to start event handler thread %d", result); } { diff --git a/runtime/bin/namespace_fuchsia.cc b/runtime/bin/namespace_fuchsia.cc index 87a50aaab0a..464390ed32f 100644 --- a/runtime/bin/namespace_fuchsia.cc +++ b/runtime/bin/namespace_fuchsia.cc @@ -25,13 +25,13 @@ NamespaceImpl::NamespaceImpl(fdio_ns_t* fdio_ns) cwd_(strdup("/")) { rootfd_ = fdio_ns_opendir(fdio_ns); if (rootfd_ < 0) { - FATAL2("Failed to open file descriptor for namespace: errno=%d: %s", errno, - strerror(errno)); + FATAL("Failed to open file descriptor for namespace: errno=%d: %s", errno, + strerror(errno)); } cwdfd_ = dup(rootfd_); if (cwdfd_ < 0) { - FATAL2("Failed to dup() namespace file descriptor: errno=%d: %s", errno, - strerror(errno)); + FATAL("Failed to dup() namespace file descriptor: errno=%d: %s", errno, + strerror(errno)); } } @@ -40,13 +40,13 @@ NamespaceImpl::NamespaceImpl(const char* path) cwd_(strdup("/")) { rootfd_ = TEMP_FAILURE_RETRY(open(path, O_DIRECTORY)); if (rootfd_ < 0) { - FATAL2("Failed to open file descriptor for namespace: errno=%d: %s", errno, - strerror(errno)); + FATAL("Failed to open file descriptor for namespace: errno=%d: %s", errno, + strerror(errno)); } cwdfd_ = dup(rootfd_); if (cwdfd_ < 0) { - FATAL2("Failed to dup() namespace file descriptor: errno=%d: %s", errno, - strerror(errno)); + FATAL("Failed to dup() namespace file descriptor: errno=%d: %s", errno, + strerror(errno)); } } diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc index 955efdc905c..60b4b0626ef 100644 --- a/runtime/bin/process_android.cc +++ b/runtime/bin/process_android.cc @@ -150,7 +150,7 @@ class ExitCodeHandler { int result = Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0); if (result != 0) { - FATAL1("Failed to start exit code handler worker thread %d", result); + FATAL("Failed to start exit code handler worker thread %d", result); } running_ = true; @@ -223,7 +223,7 @@ class ExitCodeHandler { if ((result != -1) && (result != sizeof(message))) { FATAL("Failed to write entire process exit message"); } else if ((result == -1) && (errno != EPIPE)) { - FATAL1("Failed to write exit code: %d", errno); + FATAL("Failed to write exit code: %d", errno); } ProcessInfoList::RemoveProcess(pid); { @@ -232,7 +232,7 @@ class ExitCodeHandler { } } } else if (pid < 0) { - FATAL1("Wait for process exit failed: %d", errno); + FATAL("Wait for process exit failed: %d", errno); } } } diff --git a/runtime/bin/process_fuchsia.cc b/runtime/bin/process_fuchsia.cc index 4b8f59dac8e..ff98d786de7 100644 --- a/runtime/bin/process_fuchsia.cc +++ b/runtime/bin/process_fuchsia.cc @@ -166,8 +166,8 @@ class ExitCodeHandler { zx_status_t status = zx_port_create(0, &port_); if (status != ZX_OK) { - FATAL1("ExitCodeHandler: zx_port_create failed: %s\n", - zx_status_get_string(status)); + FATAL("ExitCodeHandler: zx_port_create failed: %s\n", + zx_status_get_string(status)); return; } @@ -175,7 +175,7 @@ class ExitCodeHandler { intptr_t result = Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0); if (result != 0) { - FATAL1("Failed to start exit code handler worker thread %ld", result); + FATAL("Failed to start exit code handler worker thread %ld", result); } running_ = true; @@ -227,8 +227,8 @@ class ExitCodeHandler { while (true) { zx_status_t status = zx_port_wait(port_, ZX_TIME_INFINITE, &pkt); if (status != ZX_OK) { - FATAL1("ExitCodeHandler: zx_port_wait failed: %s\n", - zx_status_get_string(status)); + FATAL("ExitCodeHandler: zx_port_wait failed: %s\n", + zx_status_get_string(status)); } if (pkt.type == ZX_PKT_TYPE_USER) { ASSERT(pkt.key == kShutdownPacketKey); diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc index ae7f1b59c86..55497862bbf 100644 --- a/runtime/bin/process_linux.cc +++ b/runtime/bin/process_linux.cc @@ -150,7 +150,7 @@ class ExitCodeHandler { int result = Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0); if (result != 0) { - FATAL1("Failed to start exit code handler worker thread %d", result); + FATAL("Failed to start exit code handler worker thread %d", result); } running_ = true; @@ -222,7 +222,7 @@ class ExitCodeHandler { if ((result != -1) && (result != sizeof(message))) { FATAL("Failed to write entire process exit message"); } else if ((result == -1) && (errno != EPIPE)) { - FATAL1("Failed to write exit code: %d", errno); + FATAL("Failed to write exit code: %d", errno); } ProcessInfoList::RemoveProcess(pid); { @@ -231,7 +231,7 @@ class ExitCodeHandler { } } } else if (pid < 0) { - FATAL1("Wait for process exit failed: %d", errno); + FATAL("Wait for process exit failed: %d", errno); } } } diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc index b4fc8a3151c..301448cd66b 100644 --- a/runtime/bin/process_macos.cc +++ b/runtime/bin/process_macos.cc @@ -149,7 +149,7 @@ class ExitCodeHandler { int result = Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0); if (result != 0) { - FATAL1("Failed to start exit code handler worker thread %d", result); + FATAL("Failed to start exit code handler worker thread %d", result); } running_ = true; @@ -219,7 +219,7 @@ class ExitCodeHandler { if ((result != -1) && (result != sizeof(message))) { FATAL("Failed to write entire process exit message"); } else if ((result == -1) && (errno != EPIPE)) { - FATAL1("Failed to write exit code: %d", errno); + FATAL("Failed to write exit code: %d", errno); } ProcessInfoList::RemoveProcess(pid); { @@ -228,7 +228,7 @@ class ExitCodeHandler { } } } else if (pid < 0) { - FATAL1("Wait for process exit failed: %d", errno); + FATAL("Wait for process exit failed: %d", errno); } } } diff --git a/runtime/bin/process_win.cc b/runtime/bin/process_win.cc index 11f0e6b2ade..2833af5beca 100644 --- a/runtime/bin/process_win.cc +++ b/runtime/bin/process_win.cc @@ -168,7 +168,7 @@ class ProcessInfoList { int exit_code; ok = GetExitCodeProcess(handle, reinterpret_cast(&exit_code)); if (!ok) { - FATAL1("GetExitCodeProcess failed %d\n", GetLastError()); + FATAL("GetExitCodeProcess failed %d\n", GetLastError()); } int negative = 0; if (exit_code < 0) { @@ -185,7 +185,7 @@ class ProcessInfoList { if (ok && (written != sizeof(message))) { FATAL("Failed to write entire process exit message"); } else if (!ok && (GetLastError() != ERROR_NO_DATA)) { - FATAL1("Failed to write exit code: %d", GetLastError()); + FATAL("Failed to write exit code: %d", GetLastError()); } // Remove the process from the list of active processes. RemoveProcess(pid); diff --git a/runtime/bin/security_context_macos.cc b/runtime/bin/security_context_macos.cc index 357173daf8f..cad98e5eba8 100644 --- a/runtime/bin/security_context_macos.cc +++ b/runtime/bin/security_context_macos.cc @@ -277,10 +277,10 @@ static void TrustEvaluateHandler(Dart_Port dest_port_id, CObjectArray request(message); if (request.Length() != kNumTrustEvaluateRequestParams) { - FATAL2("Malformed trust evaluate message: got %" Pd - " parameters " - "expected %d\n", - request.Length(), kNumTrustEvaluateRequestParams); + FATAL("Malformed trust evaluate message: got %" Pd + " parameters " + "expected %d\n", + request.Length(), kNumTrustEvaluateRequestParams); } CObjectIntptr trust_cobject(request[0]); ScopedSecTrustRef trust(reinterpret_cast(trust_cobject.Value())); diff --git a/runtime/bin/snapshot_utils.cc b/runtime/bin/snapshot_utils.cc index d0ff88fa7fd..b217fd1e354 100644 --- a/runtime/bin/snapshot_utils.cc +++ b/runtime/bin/snapshot_utils.cc @@ -120,7 +120,7 @@ static AppSnapshot* TryReadAppSnapshotBlobs(const char* script_name, vm_data_mapping = file->Map(File::kReadOnly, vm_data_position, vm_data_size); if (vm_data_mapping == nullptr) { - FATAL1("Failed to memory map snapshot: %s\n", script_name); + FATAL("Failed to memory map snapshot: %s\n", script_name); } } @@ -129,7 +129,7 @@ static AppSnapshot* TryReadAppSnapshotBlobs(const char* script_name, vm_instr_mapping = file->Map(File::kReadExecute, vm_instructions_position, vm_instructions_size); if (vm_instr_mapping == nullptr) { - FATAL1("Failed to memory map snapshot: %s\n", script_name); + FATAL("Failed to memory map snapshot: %s\n", script_name); } } @@ -138,7 +138,7 @@ static AppSnapshot* TryReadAppSnapshotBlobs(const char* script_name, isolate_data_mapping = file->Map(File::kReadOnly, isolate_data_position, isolate_data_size); if (isolate_data_mapping == nullptr) { - FATAL1("Failed to memory map snapshot: %s\n", script_name); + FATAL("Failed to memory map snapshot: %s\n", script_name); } } @@ -148,7 +148,7 @@ static AppSnapshot* TryReadAppSnapshotBlobs(const char* script_name, file->Map(File::kReadExecute, isolate_instructions_position, isolate_instructions_size); if (isolate_instr_mapping == nullptr) { - FATAL1("Failed to memory map snapshot: %s\n", script_name); + FATAL("Failed to memory map snapshot: %s\n", script_name); } } @@ -476,15 +476,15 @@ static AppSnapshot* TryReadAppSnapshotDynamicLibrary(const char* script_name) { reinterpret_cast(Utils::ResolveSymbolInDynamicLibrary( library, kIsolateSnapshotDataCSymbol)); if (isolate_data_buffer == nullptr) { - FATAL1("Failed to resolve symbol '%s'\n", kIsolateSnapshotDataCSymbol); + FATAL("Failed to resolve symbol '%s'\n", kIsolateSnapshotDataCSymbol); } const uint8_t* isolate_instructions_buffer = reinterpret_cast(Utils::ResolveSymbolInDynamicLibrary( library, kIsolateSnapshotInstructionsCSymbol)); if (isolate_instructions_buffer == nullptr) { - FATAL1("Failed to resolve symbol '%s'\n", - kIsolateSnapshotInstructionsCSymbol); + FATAL("Failed to resolve symbol '%s'\n", + kIsolateSnapshotInstructionsCSymbol); } return new DylibAppSnapshot(library, vm_data_buffer, vm_instructions_buffer, diff --git a/runtime/bin/thread_absl.cc b/runtime/bin/thread_absl.cc index b0163922918..6cb9824a8ec 100644 --- a/runtime/bin/thread_absl.cc +++ b/runtime/bin/thread_absl.cc @@ -21,8 +21,8 @@ namespace bin { if (result != 0) { \ const int kBufferSize = 1024; \ char error_buf[kBufferSize]; \ - FATAL2("pthread error: %d (%s)", result, \ - Utils::StrError(result, error_buf, kBufferSize)); \ + FATAL("pthread error: %d (%s)", result, \ + Utils::StrError(result, error_buf, kBufferSize)); \ } #ifdef DEBUG diff --git a/runtime/bin/thread_android.cc b/runtime/bin/thread_android.cc index 9c87067f04a..2e29b631b6e 100644 --- a/runtime/bin/thread_android.cc +++ b/runtime/bin/thread_android.cc @@ -22,7 +22,7 @@ namespace bin { const int kBufferSize = 1024; \ char error_message[kBufferSize]; \ Utils::StrError(result, error_message, kBufferSize); \ - FATAL2("pthread error: %d (%s)", result, error_message); \ + FATAL("pthread error: %d (%s)", result, error_message); \ } #ifdef DEBUG diff --git a/runtime/bin/thread_fuchsia.cc b/runtime/bin/thread_fuchsia.cc index e42d58bd48a..cae9a4433b6 100644 --- a/runtime/bin/thread_fuchsia.cc +++ b/runtime/bin/thread_fuchsia.cc @@ -25,8 +25,8 @@ namespace bin { if (result != 0) { \ const int kBufferSize = 1024; \ char error_buf[kBufferSize]; \ - FATAL2("pthread error: %d (%s)", result, \ - Utils::StrError(result, error_buf, kBufferSize)); \ + FATAL("pthread error: %d (%s)", result, \ + Utils::StrError(result, error_buf, kBufferSize)); \ } #ifdef DEBUG diff --git a/runtime/bin/thread_linux.cc b/runtime/bin/thread_linux.cc index f004a08182b..93d66c9ab09 100644 --- a/runtime/bin/thread_linux.cc +++ b/runtime/bin/thread_linux.cc @@ -22,8 +22,8 @@ namespace bin { if (result != 0) { \ const int kBufferSize = 1024; \ char error_buf[kBufferSize]; \ - FATAL2("pthread error: %d (%s)", result, \ - Utils::StrError(result, error_buf, kBufferSize)); \ + FATAL("pthread error: %d (%s)", result, \ + Utils::StrError(result, error_buf, kBufferSize)); \ } #ifdef DEBUG diff --git a/runtime/bin/thread_macos.cc b/runtime/bin/thread_macos.cc index 13027056c15..9bbe3b580b7 100644 --- a/runtime/bin/thread_macos.cc +++ b/runtime/bin/thread_macos.cc @@ -30,7 +30,7 @@ namespace bin { const int kBufferSize = 1024; \ char error_message[kBufferSize]; \ Utils::StrError(result, error_message, kBufferSize); \ - FATAL2("pthread error: %d (%s)", result, error_message); \ + FATAL("pthread error: %d (%s)", result, error_message); \ } #ifdef DEBUG diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc index d7296c98e0f..20fb2444f06 100644 --- a/runtime/bin/vmservice_impl.cc +++ b/runtime/bin/vmservice_impl.cc @@ -248,7 +248,7 @@ void VmService::SetServerAddress(const char* server_uri) { } const intptr_t server_uri_len = strlen(server_uri); if (server_uri_len >= (kServerUriStringBufferSize - 1)) { - FATAL1("vm-service: Server URI exceeded length: %s\n", server_uri); + FATAL("vm-service: Server URI exceeded length: %s\n", server_uri); } strncpy(server_uri_, server_uri, kServerUriStringBufferSize); server_uri_[kServerUriStringBufferSize - 1] = '\0'; diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc index c5043c4762f..81a6ae89d0a 100644 --- a/runtime/lib/mirrors.cc +++ b/runtime/lib/mirrors.cc @@ -1604,7 +1604,7 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 0, 1) { const String& uri = String::Handle(zone, script.url()); return CreateSourceLocation(uri, 1, 1); } else { - FATAL1("Unexpected declaration type: %s", decl.ToCString()); + FATAL("Unexpected declaration type: %s", decl.ToCString()); } ASSERT(!script.IsNull()); diff --git a/runtime/platform/assert.h b/runtime/platform/assert.h index dd8ecc56f2b..fb3459efc05 100644 --- a/runtime/platform/assert.h +++ b/runtime/platform/assert.h @@ -243,16 +243,6 @@ void Expect::Null(const T p) { dart::Assert(__FILE__, __LINE__).Fail(format, ##__VA_ARGS__); #endif -// Leaving old non-varargs versions to avoid having to rewrite all uses. - -#define FATAL1(format, p1) dart::Assert(__FILE__, __LINE__).Fail(format, (p1)) - -#define FATAL2(format, p1, p2) \ - dart::Assert(__FILE__, __LINE__).Fail(format, (p1), (p2)) - -#define FATAL3(format, p1, p2, p3) \ - dart::Assert(__FILE__, __LINE__).Fail(format, (p1), (p2), (p3)) - #define UNIMPLEMENTED() FATAL("unimplemented code") #define UNREACHABLE() FATAL("unreachable code") diff --git a/runtime/platform/utils_android.cc b/runtime/platform/utils_android.cc index 6e14851c756..9379213dda2 100644 --- a/runtime/platform/utils_android.cc +++ b/runtime/platform/utils_android.cc @@ -33,7 +33,7 @@ int Utils::SNPrint(char* str, size_t size, const char* format, ...) { int Utils::VSNPrint(char* str, size_t size, const char* format, va_list args) { int retval = vsnprintf(str, size, format, args); if (retval < 0) { - FATAL1("Fatal error in Utils::VSNPrint with format '%s'", format); + FATAL("Fatal error in Utils::VSNPrint with format '%s'", format); } return retval; } diff --git a/runtime/platform/utils_fuchsia.cc b/runtime/platform/utils_fuchsia.cc index 8f6c7acf219..8b9dee48e78 100644 --- a/runtime/platform/utils_fuchsia.cc +++ b/runtime/platform/utils_fuchsia.cc @@ -38,7 +38,7 @@ int Utils::SNPrint(char* str, size_t size, const char* format, ...) { int Utils::VSNPrint(char* str, size_t size, const char* format, va_list args) { int retval = vsnprintf(str, size, format, args); if (retval < 0) { - FATAL1("Fatal error in Utils::VSNPrint with format '%s'", format); + FATAL("Fatal error in Utils::VSNPrint with format '%s'", format); } return retval; } diff --git a/runtime/platform/utils_linux.cc b/runtime/platform/utils_linux.cc index ec4aead20f6..b57705320d8 100644 --- a/runtime/platform/utils_linux.cc +++ b/runtime/platform/utils_linux.cc @@ -34,7 +34,7 @@ int Utils::VSNPrint(char* str, size_t size, const char* format, va_list args) { MSAN_UNPOISON(str, size); int retval = vsnprintf(str, size, format, args); if (retval < 0) { - FATAL1("Fatal error in Utils::VSNPrint with format '%s'", format); + FATAL("Fatal error in Utils::VSNPrint with format '%s'", format); } return retval; } diff --git a/runtime/platform/utils_macos.cc b/runtime/platform/utils_macos.cc index 9de2e431218..490cea71e31 100644 --- a/runtime/platform/utils_macos.cc +++ b/runtime/platform/utils_macos.cc @@ -64,7 +64,7 @@ int Utils::SNPrint(char* str, size_t size, const char* format, ...) { int Utils::VSNPrint(char* str, size_t size, const char* format, va_list args) { int retval = vsnprintf(str, size, format, args); if (retval < 0) { - FATAL1("Fatal error in Utils::VSNPrint with format '%s'", format); + FATAL("Fatal error in Utils::VSNPrint with format '%s'", format); } return retval; } @@ -97,7 +97,7 @@ int32_t DarwinMajorVersionInternal() { } if (strcmp(uname_info.sysname, "Darwin") != 0) { - FATAL1( + FATAL( "Fatal error in DarwinMajorVersionInternal : unexpected uname" " sysname '%s'", uname_info.sysname); @@ -116,7 +116,7 @@ int32_t DarwinMajorVersionInternal() { } if (!dot) { - FATAL1( + FATAL( "Fatal error in DarwinMajorVersionInternal :" " could not parse uname release '%s'", uname_info.release); diff --git a/runtime/platform/utils_win.cc b/runtime/platform/utils_win.cc index 25d2f1d573f..f27e7f9594a 100644 --- a/runtime/platform/utils_win.cc +++ b/runtime/platform/utils_win.cc @@ -46,7 +46,7 @@ int Utils::VSNPrint(char* str, size_t size, const char* format, va_list args) { if (str == NULL || size == 0) { int retval = _vscprintf(format, args); if (retval < 0) { - FATAL1("Fatal error in Utils::VSNPrint with format '%s'", format); + FATAL("Fatal error in Utils::VSNPrint with format '%s'", format); } return retval; } @@ -62,7 +62,7 @@ int Utils::VSNPrint(char* str, size_t size, const char* format, va_list args) { va_copy(args_retry, args); written = _vscprintf(format, args_retry); if (written < 0) { - FATAL1("Fatal error in Utils::VSNPrint with format '%s'", format); + FATAL("Fatal error in Utils::VSNPrint with format '%s'", format); } va_end(args_retry); } diff --git a/runtime/vm/allocation.cc b/runtime/vm/allocation.cc index 4239026699e..5c3db033999 100644 --- a/runtime/vm/allocation.cc +++ b/runtime/vm/allocation.cc @@ -14,7 +14,7 @@ namespace dart { static void* Allocate(uword size, Zone* zone) { ASSERT(zone != NULL); if (size > static_cast(kIntptrMax)) { - FATAL1("ZoneAllocated object has unexpectedly large size %" Pu "", size); + FATAL("ZoneAllocated object has unexpectedly large size %" Pu "", size); } return reinterpret_cast(zone->AllocUnsafe(size)); } diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc index 7ac7fd307e0..395a31ef3e8 100644 --- a/runtime/vm/app_snapshot.cc +++ b/runtime/vm/app_snapshot.cc @@ -8497,7 +8497,7 @@ DeserializationCluster* Deserializer::ReadCluster() { default: break; } - FATAL1("No cluster defined for cid %" Pd, cid); + FATAL("No cluster defined for cid %" Pd, cid); return NULL; } @@ -8863,9 +8863,9 @@ void Deserializer::Deserialize(DeserializationRoots* roots) { primary = roots->AddBaseObjects(this); if (num_base_objects_ != (next_ref_index_ - kFirstReference)) { - FATAL2("Snapshot expects %" Pd - " base objects, but deserializer provided %" Pd, - num_base_objects_, next_ref_index_ - kFirstReference); + FATAL("Snapshot expects %" Pd + " base objects, but deserializer provided %" Pd, + num_base_objects_, next_ref_index_ - kFirstReference); } { diff --git a/runtime/vm/app_snapshot.h b/runtime/vm/app_snapshot.h index 6f4d537d7a7..df31e82280f 100644 --- a/runtime/vm/app_snapshot.h +++ b/runtime/vm/app_snapshot.h @@ -149,7 +149,7 @@ class DeserializationCluster : public ZoneAllocated { const Array& refs, bool primary) { if (!primary && is_canonical()) { - FATAL1("%s needs canonicalization but doesn't define PostLoad", name()); + FATAL("%s needs canonicalization but doesn't define PostLoad", name()); } } diff --git a/runtime/vm/bitmap.cc b/runtime/vm/bitmap.cc index a79912af38a..2febafee947 100644 --- a/runtime/vm/bitmap.cc +++ b/runtime/vm/bitmap.cc @@ -133,7 +133,7 @@ bool BitmapBuilder::GetBit(intptr_t bit_offset) const { void BitmapBuilder::SetBit(intptr_t bit_offset, bool value) { if (!InRange(bit_offset)) { - FATAL1( + FATAL( "Fatal error in BitmapBuilder::SetBit :" " invalid bit_offset, %" Pd "\n", bit_offset); diff --git a/runtime/vm/bitmap.h b/runtime/vm/bitmap.h index 2c18ba587ce..08d269df1a9 100644 --- a/runtime/vm/bitmap.h +++ b/runtime/vm/bitmap.h @@ -63,7 +63,7 @@ class BitmapBuilder : public ZoneAllocated { bool InRange(intptr_t offset) const { if (offset < 0) { - FATAL1( + FATAL( "Fatal error in BitmapBuilder::InRange :" " invalid bit_offset, %" Pd "\n", offset); diff --git a/runtime/vm/code_patcher_x64.cc b/runtime/vm/code_patcher_x64.cc index 7a846f406e0..1877688aa5c 100644 --- a/runtime/vm/code_patcher_x64.cc +++ b/runtime/vm/code_patcher_x64.cc @@ -31,7 +31,7 @@ class UnoptimizedCall : public ValueObject { if (MatchesPattern(pc, call_pattern, ARRAY_SIZE(call_pattern))) { pc -= ARRAY_SIZE(call_pattern); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } // movq CODE_REG, [PP + offset] @@ -49,7 +49,7 @@ class UnoptimizedCall : public ValueObject { pc -= ARRAY_SIZE(load_code_disp32); code_index_ = IndexFromPPLoadDisp32(pc + 3); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } ASSERT(Object::Handle(object_pool_.ObjectAt(code_index_)).IsCode()); @@ -69,7 +69,7 @@ class UnoptimizedCall : public ValueObject { pc -= ARRAY_SIZE(load_argument_disp32); argument_index_ = IndexFromPPLoadDisp32(pc + 3); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } } @@ -171,7 +171,7 @@ class PoolPointerCall : public ValueObject { if (MatchesPattern(pc, call_pattern, ARRAY_SIZE(call_pattern))) { pc -= ARRAY_SIZE(call_pattern); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } // movq CODE_REG, [PP + offset] @@ -189,7 +189,7 @@ class PoolPointerCall : public ValueObject { pc -= ARRAY_SIZE(load_code_disp32); code_index_ = IndexFromPPLoadDisp32(pc + 3); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } ASSERT(Object::Handle(object_pool_.ObjectAt(code_index_)).IsCode()); } @@ -261,7 +261,7 @@ class SwitchableCall : public SwitchableCallBase { if (MatchesPattern(pc, call_pattern, ARRAY_SIZE(call_pattern))) { pc -= ARRAY_SIZE(call_pattern); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } // movq RBX, [PP + offset] @@ -279,7 +279,7 @@ class SwitchableCall : public SwitchableCallBase { pc -= ARRAY_SIZE(load_data_disp32); data_index_ = IndexFromPPLoadDisp32(pc + 3); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } ASSERT(!Object::Handle(object_pool_.ObjectAt(data_index_)).IsCode()); @@ -291,7 +291,7 @@ class SwitchableCall : public SwitchableCallBase { ARRAY_SIZE(load_entry_pattern))) { pc -= ARRAY_SIZE(load_entry_pattern); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } // movq CODE_REG, [PP + offset] @@ -309,7 +309,7 @@ class SwitchableCall : public SwitchableCallBase { pc -= ARRAY_SIZE(load_code_disp32); target_index_ = IndexFromPPLoadDisp32(pc + 3); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } ASSERT(Object::Handle(object_pool_.ObjectAt(target_index_)).IsCode()); } @@ -344,7 +344,7 @@ class BareSwitchableCall : public SwitchableCallBase { if (MatchesPattern(pc, call_pattern, ARRAY_SIZE(call_pattern))) { pc -= ARRAY_SIZE(call_pattern); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } // movq RBX, [PP + offset] @@ -362,7 +362,7 @@ class BareSwitchableCall : public SwitchableCallBase { pc -= ARRAY_SIZE(load_data_disp32); data_index_ = IndexFromPPLoadDisp32(pc + 3); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } ASSERT(!Object::Handle(object_pool_.ObjectAt(data_index_)).IsCode()); @@ -381,7 +381,7 @@ class BareSwitchableCall : public SwitchableCallBase { pc -= ARRAY_SIZE(load_code_disp32); target_index_ = IndexFromPPLoadDisp32(pc + 3); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } ASSERT(object_pool_.TypeAt(target_index_) == ObjectPool::EntryType::kImmediate); diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc index 84f323a4925..cc4bfe9beec 100644 --- a/runtime/vm/compiler/aot/precompiler.cc +++ b/runtime/vm/compiler/aot/precompiler.cc @@ -655,8 +655,8 @@ void Precompiler::DoCompileAll() { const auto& non_visited = Function::Handle(Z, FindUnvisitedRetainedFunction()); if (!non_visited.IsNull()) { - FATAL1("Code visitor would miss the code for function \"%s\"\n", - non_visited.ToFullyQualifiedCString()); + FATAL("Code visitor would miss the code for function \"%s\"\n", + non_visited.ToFullyQualifiedCString()); } #endif DiscardCodeObjects(); @@ -2028,8 +2028,8 @@ void Precompiler::TraceForRetainedFunctions() { // they are referenced only from code (object pool). if (!functions_to_retain_.ContainsKey(function) && !function.IsFfiTrampoline()) { - FATAL1("Function %s was not traced in TraceForRetainedFunctions\n", - function.ToFullyQualifiedCString()); + FATAL("Function %s was not traced in TraceForRetainedFunctions\n", + function.ToFullyQualifiedCString()); } } #endif // DEBUG @@ -2745,7 +2745,7 @@ void Precompiler::DropLibraryEntries() { } else if (entry.IsLibraryPrefix()) { // Always drop. } else { - FATAL1("Unexpected library entry: %s", entry.ToCString()); + FATAL("Unexpected library entry: %s", entry.ToCString()); } dict.SetAt(j, Object::null_object()); } diff --git a/runtime/vm/compiler/assembler/disassembler_riscv.cc b/runtime/vm/compiler/assembler/disassembler_riscv.cc index 2d6a25a1c71..d217b9b8111 100644 --- a/runtime/vm/compiler/assembler/disassembler_riscv.cc +++ b/runtime/vm/compiler/assembler/disassembler_riscv.cc @@ -1686,7 +1686,7 @@ const char* RISCVDisassembler::PrintOption(const char* format, Instr instr) { return format + 4; } - FATAL1("Bad format %s\n", format); + FATAL("Bad format %s\n", format); return nullptr; } @@ -1766,7 +1766,7 @@ const char* RISCVDisassembler::PrintOption(const char* format, CInstr instr) { return format + 8; } - FATAL1("Bad format %s\n", format); + FATAL("Bad format %s\n", format); return nullptr; } diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc index 0340e758746..5da9ce36d05 100644 --- a/runtime/vm/compiler/backend/il.cc +++ b/runtime/vm/compiler/backend/il.cc @@ -7686,7 +7686,7 @@ SimdOpInstr::Kind SimdOpInstr::KindForMethod(MethodRecognizer::Kind kind) { break; } - FATAL1("Not a SIMD method: %s", MethodRecognizer::KindToCString(kind)); + FATAL("Not a SIMD method: %s", MethodRecognizer::KindToCString(kind)); return kIllegalSimdOp; } diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc index e651bd6dea0..64f740d1916 100644 --- a/runtime/vm/compiler/backend/range_analysis.cc +++ b/runtime/vm/compiler/backend/range_analysis.cc @@ -2709,7 +2709,7 @@ void ConstantInstr::InferRange(RangeAnalysis* analysis, Range* range) { RangeBoundary::FromConstant(value)); } else { // Only Smi and Mint supported. - FATAL1("Unexpected constant: %s\n", value_.ToCString()); + FATAL("Unexpected constant: %s\n", value_.ToCString()); } } diff --git a/runtime/vm/compiler/frontend/constant_reader.cc b/runtime/vm/compiler/frontend/constant_reader.cc index c451ccd1e4b..9acfa06b931 100644 --- a/runtime/vm/compiler/frontend/constant_reader.cc +++ b/runtime/vm/compiler/frontend/constant_reader.cc @@ -407,7 +407,7 @@ InstancePtr ConstantReader::ReadConstantInternal(intptr_t constant_index) { const NameIndex index = reader.ReadCanonicalNameReference(); const auto& klass = Class::Handle(Z, H.LookupClassByKernelClass(index)); if (!klass.is_declaration_loaded()) { - FATAL1( + FATAL( "Trying to evaluate an instance constant whose references class " "%s is not loaded yet.", klass.ToCString()); diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc index 3d4c36d9773..b16b5f484b4 100644 --- a/runtime/vm/compiler/frontend/kernel_to_il.cc +++ b/runtime/vm/compiler/frontend/kernel_to_il.cc @@ -802,13 +802,11 @@ FlowGraph* FlowGraphBuilder::BuildGraph() { MethodRecognizer::IsMarkedAsRecognized(function)) && !function.IsDynamicInvocationForwarder()) { if (function.IsRecognized()) { - FATAL1( - "Recognized method %s is not marked with the vm:recognized pragma.", - function.ToQualifiedCString()); + FATAL("Recognized method %s is not marked with the vm:recognized pragma.", + function.ToQualifiedCString()); } else { - FATAL1( - "Non-recognized method %s is marked with the vm:recognized pragma.", - function.ToQualifiedCString()); + FATAL("Non-recognized method %s is marked with the vm:recognized pragma.", + function.ToQualifiedCString()); } } #endif diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc index f4348978c56..494a2c640c5 100644 --- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc +++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc @@ -1579,7 +1579,7 @@ void MetadataHelper::ScanMetadataMappings() { if (H.StringEquals(tag, tag_)) { if ((!FLAG_precompiled_mode) && precompiler_only_) { - FATAL1("%s metadata is allowed in precompiled mode only", tag_); + FATAL("%s metadata is allowed in precompiled mode only", tag_); } SetMetadataMappings(offset + kUInt32Size, mappings_num); return; @@ -1913,7 +1913,7 @@ void LoadingUnitsMetadataHelper::ReadMetadata(intptr_t node_offset) { translation_helper_.DartSymbolPlain(helper_->ReadStringReference()); lib = Library::LookupLibrary(thread, uri); if (lib.IsNull()) { - FATAL1("Missing library: %s\n", uri.ToCString()); + FATAL("Missing library: %s\n", uri.ToCString()); } lib.set_loading_unit(unit); uris.SetAt(j, uri); @@ -2165,8 +2165,8 @@ void KernelReaderHelper::SkipInterfaceMemberNameReference() { } void KernelReaderHelper::ReportUnexpectedTag(const char* variant, Tag tag) { - FATAL3("Unexpected tag %d (%s) in ?, expected %s", tag, Reader::TagName(tag), - variant); + FATAL("Unexpected tag %d (%s) in ?, expected %s", tag, Reader::TagName(tag), + variant); } void KernelReaderHelper::ReadUntilFunctionNode() { diff --git a/runtime/vm/compiler/graph_intrinsifier.cc b/runtime/vm/compiler/graph_intrinsifier.cc index 9e14d4644c9..3e793deef72 100644 --- a/runtime/vm/compiler/graph_intrinsifier.cc +++ b/runtime/vm/compiler/graph_intrinsifier.cc @@ -172,8 +172,8 @@ static Definition* PrepareIndexedOp(FlowGraph* flow_graph, static void VerifyParameterIsBoxed(BlockBuilder* builder, intptr_t arg_index) { const auto& function = builder->function(); if (function.is_unboxed_parameter_at(arg_index)) { - FATAL2("Unsupported unboxed parameter %" Pd " in %s", arg_index, - function.ToFullyQualifiedCString()); + FATAL("Unsupported unboxed parameter %" Pd " in %s", arg_index, + function.ToFullyQualifiedCString()); } } diff --git a/runtime/vm/compiler/intrinsifier.cc b/runtime/vm/compiler/intrinsifier.cc index af9006c98c1..44ce832584f 100644 --- a/runtime/vm/compiler/intrinsifier.cc +++ b/runtime/vm/compiler/intrinsifier.cc @@ -243,8 +243,8 @@ void Intrinsifier::InitializeState() { if (!func.IsNull()) { func.set_is_intrinsic(true); } else if (!FLAG_precompiled_mode) { - FATAL2("Intrinsifier failed to find method %s in class %s\n", - intrinsic->function_name, intrinsic->class_name); + FATAL("Intrinsifier failed to find method %s in class %s\n", + intrinsic->function_name, intrinsic->class_name); } } } @@ -288,12 +288,12 @@ bool Intrinsifier::Intrinsify(const ParsedFunction& parsed_function, const auto size_after = compiler->assembler()->CodeSize(); \ if (size_before == size_after) return false; \ if (function.HasUnboxedParameters()) { \ - FATAL1("Unsupported unboxed parameters in asm intrinsic %s", \ - function.ToFullyQualifiedCString()); \ + FATAL("Unsupported unboxed parameters in asm intrinsic %s", \ + function.ToFullyQualifiedCString()); \ } \ if (function.HasUnboxedReturnValue()) { \ - FATAL1("Unsupported unboxed return value in asm intrinsic %s", \ - function.ToFullyQualifiedCString()); \ + FATAL("Unsupported unboxed return value in asm intrinsic %s", \ + function.ToFullyQualifiedCString()); \ } \ if (!normal_ir_body.IsBound()) { \ EMIT_BREAKPOINT(); \ diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc index 1b0e3c172ac..b6866e2180c 100644 --- a/runtime/vm/compiler/jit/compiler.cc +++ b/runtime/vm/compiler/jit/compiler.cc @@ -821,10 +821,10 @@ ObjectPtr Compiler::CompileFunction(Thread* thread, const Function& function) { #endif #if defined(DART_PRECOMPILED_RUNTIME) - FATAL3("Precompilation missed function %s (%s, %s)\n", - function.ToLibNamePrefixedQualifiedCString(), - function.token_pos().ToCString(), - Function::KindToCString(function.kind())); + FATAL("Precompilation missed function %s (%s, %s)\n", + function.ToLibNamePrefixedQualifiedCString(), + function.token_pos().ToCString(), + Function::KindToCString(function.kind())); #endif // defined(DART_PRECOMPILED_RUNTIME) VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId); @@ -1256,10 +1256,10 @@ CompilationPipeline* CompilationPipeline::New(Zone* zone, DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { const Function& function = Function::CheckedHandle(zone, arguments.ArgAt(0)); - FATAL3("Precompilation missed function %s (%s, %s)\n", - function.ToLibNamePrefixedQualifiedCString(), - function.token_pos().ToCString(), - Function::KindToCString(function.kind())); + FATAL("Precompilation missed function %s (%s, %s)\n", + function.ToLibNamePrefixedQualifiedCString(), + function.token_pos().ToCString(), + Function::KindToCString(function.kind())); } bool Compiler::IsBackgroundCompilation() { @@ -1272,20 +1272,20 @@ bool Compiler::CanOptimizeFunction(Thread* thread, const Function& function) { } ObjectPtr Compiler::CompileFunction(Thread* thread, const Function& function) { - FATAL1("Attempt to compile function %s", function.ToCString()); + FATAL("Attempt to compile function %s", function.ToCString()); return Error::null(); } ErrorPtr Compiler::EnsureUnoptimizedCode(Thread* thread, const Function& function) { - FATAL1("Attempt to compile function %s", function.ToCString()); + FATAL("Attempt to compile function %s", function.ToCString()); return Error::null(); } ObjectPtr Compiler::CompileOptimizedFunction(Thread* thread, const Function& function, intptr_t osr_id) { - FATAL1("Attempt to compile function %s", function.ToCString()); + FATAL("Attempt to compile function %s", function.ToCString()); return Error::null(); } @@ -1294,7 +1294,7 @@ void Compiler::ComputeLocalVarDescriptors(const Code& code) { } ErrorPtr Compiler::CompileAllFunctions(const Class& cls) { - FATAL1("Attempt to compile class %s", cls.ToCString()); + FATAL("Attempt to compile class %s", cls.ToCString()); return Error::null(); } diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc index b91110016f5..6f1c1733dd8 100644 --- a/runtime/vm/compiler/runtime_api.cc +++ b/runtime/vm/compiler/runtime_api.cc @@ -487,9 +487,9 @@ static uword GetInstanceSizeImpl(const dart::Class& handle) { return handle.target_instance_size(); } } - FATAL3("Unsupported class for size translation: %s (id=%" Pd - ", kNumPredefinedCids=%" Pd ")\n", - handle.ToCString(), handle.id(), kNumPredefinedCids); + FATAL("Unsupported class for size translation: %s (id=%" Pd + ", kNumPredefinedCids=%" Pd ")\n", + handle.ToCString(), handle.id(), kNumPredefinedCids); return -1; } diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index 3a834643643..ea4e8c0e33c 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc @@ -871,7 +871,7 @@ DART_EXPORT void Dart_PropagateError(Dart_Handle handle) { TransitionNativeToVM transition(thread); const Object& obj = Object::Handle(thread->zone(), Api::UnwrapHandle(handle)); if (!obj.IsError()) { - FATAL1( + FATAL( "%s expects argument 'handle' to be an error handle. " "Did you forget to check Dart_IsError first?", CURRENT_FUNC); @@ -1136,7 +1136,7 @@ DART_EXPORT void Dart_UpdateFinalizableExternalSize( intptr_t external_allocation_size) { if (!::Dart_IdentityEquals(strong_ref_to_object, HandleFromFinalizable(object))) { - FATAL1( + FATAL( "%s expects arguments 'object' and 'strong_ref_to_object' to point to " "the same object.", CURRENT_FUNC); @@ -1179,7 +1179,7 @@ DART_EXPORT void Dart_DeleteFinalizableHandle( Dart_Handle strong_ref_to_object) { if (!::Dart_IdentityEquals(strong_ref_to_object, HandleFromFinalizable(object))) { - FATAL1( + FATAL( "%s expects arguments 'object' and 'strong_ref_to_object' to point to " "the same object.", CURRENT_FUNC); @@ -1243,8 +1243,8 @@ VM_METRIC_LIST(VM_METRIC_API) DART_EXPORT int64_t Dart_IsolateGroup##variable##Metric( \ Dart_IsolateGroup isolate_group) { \ if (isolate_group == nullptr) { \ - FATAL1("%s expects argument 'isolate_group' to be non-null.", \ - CURRENT_FUNC); \ + FATAL("%s expects argument 'isolate_group' to be non-null.", \ + CURRENT_FUNC); \ } \ IsolateGroup* group = reinterpret_cast(isolate_group); \ return group->Get##variable##Metric()->Value(); \ @@ -1256,7 +1256,7 @@ ISOLATE_GROUP_METRIC_LIST(ISOLATE_GROUP_METRIC_API) #define ISOLATE_METRIC_API(type, variable, name, unit) \ DART_EXPORT int64_t Dart_Isolate##variable##Metric(Dart_Isolate isolate) { \ if (isolate == NULL) { \ - FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); \ + FATAL("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); \ } \ Isolate* iso = reinterpret_cast(isolate); \ return iso->Get##variable##Metric()->Value(); \ @@ -1515,7 +1515,7 @@ DART_EXPORT void* Dart_CurrentIsolateData() { DART_EXPORT void* Dart_IsolateData(Dart_Isolate isolate) { if (isolate == NULL) { - FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); + FATAL("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); } // TODO(http://dartbug.com/16615): Validate isolate parameter. return reinterpret_cast(isolate)->init_callback_data(); @@ -1540,7 +1540,7 @@ DART_EXPORT Dart_IsolateGroupId Dart_CurrentIsolateGroupId() { DART_EXPORT void* Dart_IsolateGroupData(Dart_Isolate isolate) { if (isolate == NULL) { - FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); + FATAL("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); } // TODO(http://dartbug.com/16615): Validate isolate parameter. return reinterpret_cast(isolate)->group()->embedder_data(); @@ -1556,7 +1556,7 @@ DART_EXPORT Dart_Handle Dart_DebugName() { DART_EXPORT const char* Dart_IsolateServiceId(Dart_Isolate isolate) { if (isolate == NULL) { - FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); + FATAL("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); } // TODO(http://dartbug.com/16615): Validate isolate parameter. Isolate* I = reinterpret_cast(isolate); @@ -1681,15 +1681,15 @@ DART_EXPORT bool Dart_ShouldPauseOnStart() { DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause) { #if defined(PRODUCT) if (should_pause) { - FATAL1("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); + FATAL("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); } #else Isolate* isolate = Isolate::Current(); CHECK_ISOLATE(isolate); NoSafepointScope no_safepoint_scope; if (isolate->is_runnable()) { - FATAL1("%s expects the current isolate to not be runnable yet.", - CURRENT_FUNC); + FATAL("%s expects the current isolate to not be runnable yet.", + CURRENT_FUNC); } isolate->message_handler()->set_should_pause_on_start(should_pause); #endif @@ -1709,7 +1709,7 @@ DART_EXPORT bool Dart_IsPausedOnStart() { DART_EXPORT void Dart_SetPausedOnStart(bool paused) { #if defined(PRODUCT) if (paused) { - FATAL1("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); + FATAL("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); } #else Isolate* isolate = Isolate::Current(); @@ -1735,7 +1735,7 @@ DART_EXPORT bool Dart_ShouldPauseOnExit() { DART_EXPORT void Dart_SetShouldPauseOnExit(bool should_pause) { #if defined(PRODUCT) if (should_pause) { - FATAL1("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); + FATAL("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); } #else Isolate* isolate = Isolate::Current(); @@ -1759,7 +1759,7 @@ DART_EXPORT bool Dart_IsPausedOnExit() { DART_EXPORT void Dart_SetPausedOnExit(bool paused) { #if defined(PRODUCT) if (paused) { - FATAL1("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); + FATAL("%s(true) is not supported in a PRODUCT build", CURRENT_FUNC); } #else Isolate* isolate = Isolate::Current(); @@ -1780,12 +1780,12 @@ DART_EXPORT void Dart_SetStickyError(Dart_Handle error) { const Error& error_handle = Api::UnwrapErrorHandle(Z, error); if ((isolate->sticky_error() != Error::null()) && (error_handle.ptr() != Object::null())) { - FATAL1("%s expects there to be no sticky error.", CURRENT_FUNC); + FATAL("%s expects there to be no sticky error.", CURRENT_FUNC); } if (!error_handle.IsUnhandledException() && (error_handle.ptr() != Object::null())) { - FATAL1("%s expects the error to be an unhandled exception error or null.", - CURRENT_FUNC); + FATAL("%s expects the error to be an unhandled exception error or null.", + CURRENT_FUNC); } isolate->SetStickyError(error_handle.ptr()); } @@ -1952,7 +1952,7 @@ DART_EXPORT char* Dart_IsolateMakeRunnable(Dart_Isolate isolate) { CHECK_NO_ISOLATE(Isolate::Current()); API_TIMELINE_DURATION(Thread::Current()); if (isolate == NULL) { - FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); + FATAL("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); } // TODO(16615): Validate isolate parameter. const char* error = reinterpret_cast(isolate)->MakeRunnable(); @@ -5323,7 +5323,7 @@ DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, OS::PrintErr("=== Current Trace:\n%s===\n", stacktrace.ToCString()); const Object& ret_obj = Object::Handle(Api::UnwrapHandle(retval)); - FATAL1( + FATAL( "Return value check failed: saw '%s' expected a dart Instance or " "an Error.", ret_obj.ToCString()); @@ -6164,7 +6164,7 @@ Dart_CompileToKernel(const char* script_uri, KernelIsolate::AcceptCompilation(): KernelIsolate::RejectCompilation(); if (ack_result.status != Dart_KernelCompilationStatus_Ok) { - FATAL1( + FATAL( "An error occurred in the CFE while acking the most recent" " compilation results: %s", ack_result.error); diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h index 0163fdc3660..beb0921d91d 100644 --- a/runtime/vm/dart_api_impl.h +++ b/runtime/vm/dart_api_impl.h @@ -32,7 +32,7 @@ const char* CanonicalFunction(const char* func); #define CHECK_ISOLATE_GROUP(isolate_group) \ do { \ if ((isolate_group) == NULL) { \ - FATAL1( \ + FATAL( \ "%s expects there to be a current isolate group. Did you " \ "forget to call Dart_CreateIsolateGroup or Dart_EnterIsolate?", \ CURRENT_FUNC); \ @@ -43,7 +43,7 @@ const char* CanonicalFunction(const char* func); #define CHECK_ISOLATE(isolate) \ do { \ if ((isolate) == NULL) { \ - FATAL1( \ + FATAL( \ "%s expects there to be a current isolate. Did you " \ "forget to call Dart_CreateIsolateGroup or Dart_EnterIsolate?", \ CURRENT_FUNC); \ @@ -54,7 +54,7 @@ const char* CanonicalFunction(const char* func); #define CHECK_NO_ISOLATE(isolate) \ do { \ if ((isolate) != NULL) { \ - FATAL1( \ + FATAL( \ "%s expects there to be no current isolate. Did you " \ "forget to call Dart_ExitIsolate?", \ CURRENT_FUNC); \ @@ -68,7 +68,7 @@ const char* CanonicalFunction(const char* func); Isolate* tmpI = tmpT == NULL ? NULL : tmpT->isolate(); \ CHECK_ISOLATE(tmpI); \ if (tmpT->api_top_scope() == NULL) { \ - FATAL1( \ + FATAL( \ "%s expects to find a current scope. Did you forget to call " \ "Dart_EnterScope?", \ CURRENT_FUNC); \ diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc index e48f6c8a249..339edfdf5ec 100644 --- a/runtime/vm/deferred_objects.cc +++ b/runtime/vm/deferred_objects.cc @@ -109,8 +109,8 @@ void DeferredRetAddr::Materialize(DeoptContext* deopt_context) { uword continue_at_pc = code.GetPcForDeoptId(deopt_id_, UntaggedPcDescriptors::kDeopt); if (continue_at_pc == 0) { - FATAL2("Can't locate continuation PC for deoptid %" Pd " within %s\n", - deopt_id_, function.ToFullyQualifiedCString()); + FATAL("Can't locate continuation PC for deoptid %" Pd " within %s\n", + deopt_id_, function.ToFullyQualifiedCString()); } uword* dest_addr = reinterpret_cast(slot()); *dest_addr = continue_at_pc; diff --git a/runtime/vm/dwarf.cc b/runtime/vm/dwarf.cc index c01a4968cef..41b9580d2c1 100644 --- a/runtime/vm/dwarf.cc +++ b/runtime/vm/dwarf.cc @@ -211,8 +211,8 @@ intptr_t Dwarf::LookupFunction(const Function& function) { RELEASE_ASSERT(!function.IsNull()); FunctionIndexPair* pair = function_to_index_.Lookup(&function); if (pair == NULL) { - FATAL1("Function detected too late during DWARF generation: %s", - function.ToCString()); + FATAL("Function detected too late during DWARF generation: %s", + function.ToCString()); } return pair->index_; } @@ -221,8 +221,8 @@ intptr_t Dwarf::LookupScript(const Script& script) { RELEASE_ASSERT(!script.IsNull()); ScriptIndexPair* pair = script_to_index_.Lookup(&script); if (pair == NULL) { - FATAL1("Script detected too late during DWARF generation: %s", - script.ToCString()); + FATAL("Script detected too late during DWARF generation: %s", + script.ToCString()); } return pair->index_; } @@ -429,7 +429,7 @@ InliningNode* Dwarf::ExpandInliningTree(const Code& code) { const Array& functions = Array::Handle(zone_, code.inlined_id_to_function()); const Function& root_function = Function::ZoneHandle(zone_, code.function()); if (root_function.IsNull()) { - FATAL1("Wherefore art thou functionless code, %s?\n", code.ToCString()); + FATAL("Wherefore art thou functionless code, %s?\n", code.ToCString()); } GrowableArray node_stack(zone_, 4); diff --git a/runtime/vm/heap/scavenger.cc b/runtime/vm/heap/scavenger.cc index b7f3c9ae285..c7b44f3cebf 100644 --- a/runtime/vm/heap/scavenger.cc +++ b/runtime/vm/heap/scavenger.cc @@ -877,7 +877,7 @@ class CheckStoreBufferVisitor : public ObjectVisitor, if (raw_obj->IsHeapObject() && raw_obj->IsNewObject()) { if (is_card_remembered_) { if (!Page::Of(visiting_)->IsCardRemembered(ptr)) { - FATAL3( + FATAL( "Old object %#" Px " references new object %#" Px ", but the " "slot's card is not remembered. Consider using rr to watch the " @@ -887,13 +887,13 @@ class CheckStoreBufferVisitor : public ObjectVisitor, ptr); } } else if (!is_remembered_) { - FATAL3( - "Old object %#" Px " references new object %#" Px - ", but it is " - "not in any store buffer. Consider using rr to watch the " - "slot %p and reverse-continue to find the store with a missing " - "barrier.\n", - static_cast(visiting_), static_cast(raw_obj), ptr); + FATAL("Old object %#" Px " references new object %#" Px + ", but it is " + "not in any store buffer. Consider using rr to watch the " + "slot %p and reverse-continue to find the store with a missing " + "barrier.\n", + static_cast(visiting_), static_cast(raw_obj), + ptr); } RELEASE_ASSERT(to_->Contains(UntaggedObject::ToAddr(raw_obj))); } @@ -908,7 +908,7 @@ class CheckStoreBufferVisitor : public ObjectVisitor, if (raw_obj->IsHeapObject() && raw_obj->IsNewObject()) { if (is_card_remembered_) { if (!Page::Of(visiting_)->IsCardRemembered(ptr)) { - FATAL3( + FATAL( "Old object %#" Px " references new object %#" Px ", but the " "slot's card is not remembered. Consider using rr to watch the " @@ -918,13 +918,13 @@ class CheckStoreBufferVisitor : public ObjectVisitor, ptr); } } else if (!is_remembered_) { - FATAL3( - "Old object %#" Px " references new object %#" Px - ", but it is " - "not in any store buffer. Consider using rr to watch the " - "slot %p and reverse-continue to find the store with a missing " - "barrier.\n", - static_cast(visiting_), static_cast(raw_obj), ptr); + FATAL("Old object %#" Px " references new object %#" Px + ", but it is " + "not in any store buffer. Consider using rr to watch the " + "slot %p and reverse-continue to find the store with a missing " + "barrier.\n", + static_cast(visiting_), static_cast(raw_obj), + ptr); } RELEASE_ASSERT(to_->Contains(UntaggedObject::ToAddr(raw_obj))); } diff --git a/runtime/vm/instructions_x64.cc b/runtime/vm/instructions_x64.cc index e2a6403c0d1..11ec2c846b0 100644 --- a/runtime/vm/instructions_x64.cc +++ b/runtime/vm/instructions_x64.cc @@ -93,7 +93,7 @@ intptr_t TypeTestingStubCallPattern::GetSubtypeTestCachePoolIndex() { ARRAY_SIZE(indirect_call_pattern))) { pc -= ARRAY_SIZE(indirect_call_pattern); } else { - FATAL1("Failed to decode at %" Px, pc_); + FATAL("Failed to decode at %" Px, pc_); } if (MatchesPattern(pc, pattern_disp8, ARRAY_SIZE(pattern_disp8))) { @@ -101,7 +101,7 @@ intptr_t TypeTestingStubCallPattern::GetSubtypeTestCachePoolIndex() { } else if (MatchesPattern(pc, pattern_disp32, ARRAY_SIZE(pattern_disp32))) { return IndexFromPPLoadDisp32(pc - 4); } else { - FATAL1("Failed to decode at %" Px, pc); + FATAL("Failed to decode at %" Px, pc); } } diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc index 6eede90b71b..5afde4fd541 100644 --- a/runtime/vm/isolate.cc +++ b/runtime/vm/isolate.cc @@ -1310,7 +1310,7 @@ ErrorPtr IsolateMessageHandler::HandleLibMessage(const Array& message) { #if defined(DEBUG) // Malformed OOB messages are silently ignored in release builds. default: - FATAL1("Unknown OOB message type: %" Pd "\n", msg_type); + FATAL("Unknown OOB message type: %" Pd "\n", msg_type); break; #endif // defined(DEBUG) } diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc index 9c123ccbf9f..1a7ac2aa0ec 100644 --- a/runtime/vm/isolate_reload.cc +++ b/runtime/vm/isolate_reload.cc @@ -639,7 +639,7 @@ static ObjectPtr AcceptCompilation(Thread* thread) { Dart_KernelCompilationResult result = KernelIsolate::AcceptCompilation(); if (result.status != Dart_KernelCompilationStatus_Ok) { if (result.status != Dart_KernelCompilationStatus_MsgFailed) { - FATAL1( + FATAL( "An error occurred while accepting the most recent" " compilation results: %s", result.error); @@ -661,7 +661,7 @@ static ObjectPtr RejectCompilation(Thread* thread) { Dart_KernelCompilationResult result = KernelIsolate::RejectCompilation(); if (result.status != Dart_KernelCompilationStatus_Ok) { if (result.status != Dart_KernelCompilationStatus_MsgFailed) { - FATAL1( + FATAL( "An error occurred while rejecting the most recent" " compilation results: %s", result.error); diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h index 7b50ab4f7ab..2522773eb9e 100644 --- a/runtime/vm/kernel_binary.h +++ b/runtime/vm/kernel_binary.h @@ -430,7 +430,7 @@ class Reader : public ValueObject { void EnsureEnd() { if (offset_ != size_) { - FATAL2( + FATAL( "Reading Kernel file: Expected to be at EOF " "(offset: %" Pd ", size: %" Pd ")", offset_, size_); diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc index 6a043044619..e602ca24464 100644 --- a/runtime/vm/kernel_loader.cc +++ b/runtime/vm/kernel_loader.cc @@ -281,7 +281,7 @@ Object& KernelLoader::LoadEntireProgram(Program* program, const bool line_starts_differ = !pair->line_starts->CanonicalizeEquals(line_starts); if (src_differ || line_starts_differ) { - FATAL3( + FATAL( "Invalid kernel binary: Contains at least two source entries " "that do not agree. URI '%s', difference: %s. Subprogram count: " "%" Pd ".", @@ -311,7 +311,7 @@ Object& KernelLoader::LoadEntireProgram(Program* program, const char* error = nullptr; std::unique_ptr subprogram = Program::ReadFrom(&reader, &error); if (subprogram == nullptr) { - FATAL1("Failed to load kernel file: %s", error); + FATAL("Failed to load kernel file: %s", error); } ASSERT(subprogram->is_single_program()); KernelLoader loader(subprogram.get(), &uri_to_source_table); @@ -792,7 +792,7 @@ void KernelLoader::FindModifiedLibraries(Program* program, const char* error = nullptr; std::unique_ptr subprogram = Program::ReadFrom(&reader, &error); if (subprogram == nullptr) { - FATAL1("Failed to load kernel file: %s", error); + FATAL("Failed to load kernel file: %s", error); } ASSERT(subprogram->is_single_program()); KernelLoader loader(subprogram.get(), /*uri_to_source_table=*/nullptr); diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc index e37b70d2fff..9438a94b8ae 100644 --- a/runtime/vm/native_entry.cc +++ b/runtime/vm/native_entry.cc @@ -242,8 +242,8 @@ static NativeFunction ResolveNativeFunction(Zone* zone, NativeFunction native_function = NativeEntry::ResolveNative( library, native_name, num_params, is_auto_scope); if (native_function == NULL) { - FATAL2("Failed to resolve native function '%s' in '%s'\n", - native_name.ToCString(), func.ToQualifiedCString()); + FATAL("Failed to resolve native function '%s' in '%s'\n", + native_name.ToCString(), func.ToQualifiedCString()); } return native_function; } diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index f4375f966d9..243a2dc1344 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -4699,7 +4699,7 @@ void Class::EnsureDeclarationLoaded() const { #if defined(DART_PRECOMPILED_RUNTIME) UNREACHABLE(); #else - FATAL1("Unable to use class %s which is not loaded yet.", ToCString()); + FATAL("Unable to use class %s which is not loaded yet.", ToCString()); #endif } } @@ -7475,7 +7475,7 @@ TypeArgumentsPtr TypeArguments::InstantiateAndCanonicalizeFrom( TypeArgumentsPtr TypeArguments::New(intptr_t len, Heap::Space space) { if (len < 0 || len > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in TypeArguments::New: invalid len %" Pd "\n", len); + FATAL("Fatal error in TypeArguments::New: invalid len %" Pd "\n", len); } TypeArguments& result = TypeArguments::Handle(); { @@ -15270,7 +15270,7 @@ InstructionsPtr Instructions::New(intptr_t size, bool has_monomorphic_entry) { ASSERT(Object::instructions_class() != Class::null()); if (size < 0 || size > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in Instructions::New: invalid size %" Pd "\n", size); + FATAL("Fatal error in Instructions::New: invalid size %" Pd "\n", size); } Instructions& result = Instructions::Handle(); { @@ -15477,7 +15477,7 @@ ObjectPoolPtr ObjectPool::New(intptr_t len) { ASSERT(Object::object_pool_class() != Class::null()); if (len < 0 || len > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in ObjectPool::New: invalid length %" Pd "\n", len); + FATAL("Fatal error in ObjectPool::New: invalid length %" Pd "\n", len); } ObjectPool& result = ObjectPool::Handle(); { @@ -15823,7 +15823,7 @@ CompressedStackMapsPtr CompressedStackMaps::New(const void* payload, ASSERT(size != 0); if (!UntaggedCompressedStackMaps::SizeField::is_valid(size)) { - FATAL1( + FATAL( "Fatal error in CompressedStackMaps::New: " "invalid payload size %" Pu "\n", size); @@ -15973,7 +15973,7 @@ LocalVarDescriptorsPtr LocalVarDescriptors::New(intptr_t num_variables) { ASSERT(Object::var_descriptors_class() != Class::null()); if (num_variables < 0 || num_variables > kMaxElements) { // This should be caught before we reach here. - FATAL2( + FATAL( "Fatal error in LocalVarDescriptors::New: " "invalid num_variables %" Pd ". Maximum is: %d\n", num_variables, UntaggedLocalVarDescriptors::kMaxIndex); @@ -16086,7 +16086,7 @@ void ExceptionHandlers::set_handled_types_data(const Array& value) const { ExceptionHandlersPtr ExceptionHandlers::New(intptr_t num_handlers) { ASSERT(Object::exception_handlers_class() != Class::null()); if ((num_handlers < 0) || (num_handlers >= kMaxHandlers)) { - FATAL1( + FATAL( "Fatal error in ExceptionHandlers::New(): " "invalid num_handlers %" Pd "\n", num_handlers); @@ -16114,7 +16114,7 @@ ExceptionHandlersPtr ExceptionHandlers::New(const Array& handled_types_data) { ASSERT(Object::exception_handlers_class() != Class::null()); const intptr_t num_handlers = handled_types_data.Length(); if ((num_handlers < 0) || (num_handlers >= kMaxHandlers)) { - FATAL1( + FATAL( "Fatal error in ExceptionHandlers::New(): " "invalid num_handlers %" Pd "\n", num_handlers); @@ -17479,8 +17479,7 @@ Code::Comments& Code::Comments::New(intptr_t count) { Comments* comments; if (count < 0 || count > (kIntptrMax / kNumberOfEntries)) { // This should be caught before we reach here. - FATAL1("Fatal error in Code::Comments::New: invalid count %" Pd "\n", - count); + FATAL("Fatal error in Code::Comments::New: invalid count %" Pd "\n", count); } if (count == 0) { comments = new Comments(Object::empty_array()); @@ -17891,8 +17890,8 @@ void Code::set_inlined_id_to_function(const Array& value) const { CodePtr Code::New(intptr_t pointer_offsets_length) { if (pointer_offsets_length < 0 || pointer_offsets_length > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in Code::New: invalid pointer_offsets_length %" Pd "\n", - pointer_offsets_length); + FATAL("Fatal error in Code::New: invalid pointer_offsets_length %" Pd "\n", + pointer_offsets_length); } ASSERT(Object::code_class() != Class::null()); Code& result = Code::Handle(); @@ -18451,8 +18450,8 @@ ContextPtr Context::New(intptr_t num_variables, Heap::Space space) { if (!IsValidLength(num_variables)) { // This should be caught before we reach here. - FATAL1("Fatal error in Context::New: invalid num_variables %" Pd "\n", - num_variables); + FATAL("Fatal error in Context::New: invalid num_variables %" Pd "\n", + num_variables); } Context& result = Context::Handle(); { @@ -18521,8 +18520,8 @@ ContextScopePtr ContextScope::New(intptr_t num_variables, bool is_implicit) { ASSERT(Object::context_scope_class() != Class::null()); if (num_variables < 0 || num_variables > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in ContextScope::New: invalid num_variables %" Pd "\n", - num_variables); + FATAL("Fatal error in ContextScope::New: invalid num_variables %" Pd "\n", + num_variables); } intptr_t size = ContextScope::InstanceSize(num_variables); ContextScope& result = ContextScope::Handle(); @@ -24844,7 +24843,7 @@ OneByteStringPtr OneByteString::New(intptr_t len, Heap::Space space) { Class::null()))); if (len < 0 || len > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in OneByteString::New: invalid len %" Pd "\n", len); + FATAL("Fatal error in OneByteString::New: invalid len %" Pd "\n", len); } { ObjectPtr raw = Object::Allocate( @@ -25053,7 +25052,7 @@ TwoByteStringPtr TwoByteString::New(intptr_t len, Heap::Space space) { nullptr); if (len < 0 || len > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in TwoByteString::New: invalid len %" Pd "\n", len); + FATAL("Fatal error in TwoByteString::New: invalid len %" Pd "\n", len); } String& result = String::Handle(); { @@ -25212,8 +25211,8 @@ ExternalOneByteStringPtr ExternalOneByteString::New( ->external_one_byte_string_class() != Class::null()); if (len < 0 || len > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in ExternalOneByteString::New: invalid len %" Pd "\n", - len); + FATAL("Fatal error in ExternalOneByteString::New: invalid len %" Pd "\n", + len); } String& result = String::Handle(); { @@ -25244,8 +25243,8 @@ ExternalTwoByteStringPtr ExternalTwoByteString::New( ->external_two_byte_string_class() != Class::null()); if (len < 0 || len > kMaxElements) { // This should be caught before we reach here. - FATAL1("Fatal error in ExternalTwoByteString::New: invalid len %" Pd "\n", - len); + FATAL("Fatal error in ExternalTwoByteString::New: invalid len %" Pd "\n", + len); } String& result = String::Handle(); { @@ -25346,7 +25345,7 @@ ArrayPtr Array::NewUninitialized(intptr_t class_id, Heap::Space space) { if (!IsValidLength(len)) { // This should be caught before we reach here. - FATAL1("Fatal error in Array::New: invalid len %" Pd "\n", len); + FATAL("Fatal error in Array::New: invalid len %" Pd "\n", len); } { ArrayPtr raw = static_cast( @@ -26193,7 +26192,7 @@ TypedDataPtr TypedData::New(intptr_t class_id, intptr_t len, Heap::Space space) { if (len < 0 || len > TypedData::MaxElements(class_id)) { - FATAL1("Fatal error in TypedData::New: invalid len %" Pd "\n", len); + FATAL("Fatal error in TypedData::New: invalid len %" Pd "\n", len); } TypedData& result = TypedData::Handle(); { @@ -26241,7 +26240,7 @@ ExternalTypedDataPtr ExternalTypedData::New( Heap::Space space, bool perform_eager_msan_initialization_check) { if (len < 0 || len > ExternalTypedData::MaxElements(class_id)) { - FATAL1("Fatal error in ExternalTypedData::New: invalid len %" Pd "\n", len); + FATAL("Fatal error in ExternalTypedData::New: invalid len %" Pd "\n", len); } if (perform_eager_msan_initialization_check) { diff --git a/runtime/vm/object.h b/runtime/vm/object.h index c70527afcd8..3ccdc04c1f8 100644 --- a/runtime/vm/object.h +++ b/runtime/vm/object.h @@ -150,8 +150,8 @@ class BaseTextBuffer; object* obj = reinterpret_cast(VMHandles::AllocateHandle(zone)); \ initializeHandle(obj, ptr); \ if (!obj->Is##object()) { \ - FATAL2("Handle check failed: saw %s expected %s", obj->ToCString(), \ - #object); \ + FATAL("Handle check failed: saw %s expected %s", obj->ToCString(), \ + #object); \ } \ return *obj; \ } \ @@ -160,8 +160,8 @@ class BaseTextBuffer; reinterpret_cast(VMHandles::AllocateZoneHandle(zone)); \ initializeHandle(obj, ptr); \ if (!obj->Is##object()) { \ - FATAL2("Handle check failed: saw %s expected %s", obj->ToCString(), \ - #object); \ + FATAL("Handle check failed: saw %s expected %s", obj->ToCString(), \ + #object); \ } \ return *obj; \ } \ diff --git a/runtime/vm/object_graph_copy.cc b/runtime/vm/object_graph_copy.cc index e5311642a63..317251bda68 100644 --- a/runtime/vm/object_graph_copy.cc +++ b/runtime/vm/object_graph_copy.cc @@ -1626,7 +1626,7 @@ class ObjectCopy : public Base { } const Object& obj = Types::HandlifyObject(from); - FATAL1("Unexpected object: %s\n", obj.ToCString()); + FATAL("Unexpected object: %s\n", obj.ToCString()); } void CopyUserdefinedInstance(typename Types::Object from, diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc index a912783fbed..4cb974f2ec5 100644 --- a/runtime/vm/object_reload.cc +++ b/runtime/vm/object_reload.cc @@ -114,7 +114,7 @@ static void FindICData(const Array& ic_data_array, lo = mid + 1; } } - FATAL1("Missing deopt id %" Pd "\n", deopt_id); + FATAL("Missing deopt id %" Pd "\n", deopt_id); } void CallSiteResetter::ResetSwitchableCalls(const Code& code) { @@ -146,8 +146,8 @@ void CallSiteResetter::ResetSwitchableCalls(const Code& code) { descriptors_ = code.pc_descriptors(); PcDescriptors::Iterator iter(descriptors_, UntaggedPcDescriptors::kIcCall); while (iter.MoveNext()) { - FATAL1("%s has IC calls but no ic_data_array\n", - function.ToFullyQualifiedCString()); + FATAL("%s has IC calls but no ic_data_array\n", + function.ToFullyQualifiedCString()); } #endif return; diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc index 0dabcc0775c..17d4c261b61 100644 --- a/runtime/vm/os_macos.cc +++ b/runtime/vm/os_macos.cc @@ -282,13 +282,13 @@ void OS::Init() { // libnotify is initialized early before any fork happens. struct timeval tv; if (gettimeofday(&tv, NULL) < 0) { - FATAL1("gettimeofday returned an error (%s)\n", strerror(errno)); + FATAL("gettimeofday returned an error (%s)\n", strerror(errno)); return; } tm decomposed; struct tm* error_code = localtime_r(&(tv.tv_sec), &decomposed); if (error_code == NULL) { - FATAL1("localtime_r returned an error (%s)\n", strerror(errno)); + FATAL("localtime_r returned an error (%s)\n", strerror(errno)); return; } } diff --git a/runtime/vm/os_thread_absl.cc b/runtime/vm/os_thread_absl.cc index 7de84c49ba6..d442ec3c23c 100644 --- a/runtime/vm/os_thread_absl.cc +++ b/runtime/vm/os_thread_absl.cc @@ -34,8 +34,8 @@ DEFINE_FLAG(int, if (result != 0) { \ const int kBufferSize = 1024; \ char error_buf[kBufferSize]; \ - FATAL2("pthread error: %d (%s)", result, \ - Utils::StrError(result, error_buf, kBufferSize)); \ + FATAL("pthread error: %d (%s)", result, \ + Utils::StrError(result, error_buf, kBufferSize)); \ } // Variation of VALIDATE_PTHREAD_RESULT for named objects. @@ -46,8 +46,8 @@ DEFINE_FLAG(int, if (result != 0) { \ const int kBufferSize = 1024; \ char error_buf[kBufferSize]; \ - FATAL3("[%s] pthread error: %d (%s)", name_, result, \ - Utils::StrError(result, error_buf, kBufferSize)); \ + FATAL("[%s] pthread error: %d (%s)", name_, result, \ + Utils::StrError(result, error_buf, kBufferSize)); \ } #endif @@ -114,8 +114,8 @@ static void* ThreadStart(void* data_ptr) { if (FLAG_worker_thread_priority != kMinInt) { if (setpriority(PRIO_PROCESS, syscall(__NR_gettid), FLAG_worker_thread_priority) == -1) { - FATAL2("Setting thread priority to %d failed: errno = %d\n", - FLAG_worker_thread_priority, errno); + FATAL("Setting thread priority to %d failed: errno = %d\n", + FLAG_worker_thread_priority, errno); } } #elif defined(DART_HOST_OS_MACOS) @@ -124,12 +124,12 @@ static void* ThreadStart(void* data_ptr) { int policy = SCHED_FIFO; struct sched_param schedule; if (pthread_getschedparam(thread, &policy, &schedule) != 0) { - FATAL1("Obtaining sched param failed: errno = %d\n", errno); + FATAL("Obtaining sched param failed: errno = %d\n", errno); } schedule.sched_priority = FLAG_worker_thread_priority; if (pthread_setschedparam(thread, policy, &schedule) != 0) { - FATAL2("Setting thread priority to %d failed: errno = %d\n", - FLAG_worker_thread_priority, errno); + FATAL("Setting thread priority to %d failed: errno = %d\n", + FLAG_worker_thread_priority, errno); } } #endif diff --git a/runtime/vm/os_thread_android.cc b/runtime/vm/os_thread_android.cc index 45ceeb8626d..5ab93e37da2 100644 --- a/runtime/vm/os_thread_android.cc +++ b/runtime/vm/os_thread_android.cc @@ -34,7 +34,7 @@ DEFINE_FLAG(int, const int kBufferSize = 1024; \ char error_message[kBufferSize]; \ Utils::StrError(result, error_message, kBufferSize); \ - FATAL2("pthread error: %d (%s)", result, error_message); \ + FATAL("pthread error: %d (%s)", result, error_message); \ } #if defined(PRODUCT) @@ -45,7 +45,7 @@ DEFINE_FLAG(int, const int kBufferSize = 1024; \ char error_message[kBufferSize]; \ Utils::StrError(result, error_message, kBufferSize); \ - FATAL3("[%s] pthread error: %d (%s)", name_, result, error_message); \ + FATAL("[%s] pthread error: %d (%s)", name_, result, error_message); \ } #endif @@ -126,8 +126,8 @@ static void* ThreadStart(void* data_ptr) { if (FLAG_worker_thread_priority != kMinInt) { if (setpriority(PRIO_PROCESS, gettid(), FLAG_worker_thread_priority) == -1) { - FATAL2("Setting thread priority to %d failed: errno = %d\n", - FLAG_worker_thread_priority, errno); + FATAL("Setting thread priority to %d failed: errno = %d\n", + FLAG_worker_thread_priority, errno); } } diff --git a/runtime/vm/os_thread_fuchsia.cc b/runtime/vm/os_thread_fuchsia.cc index 9c4c8c71a78..85822821391 100644 --- a/runtime/vm/os_thread_fuchsia.cc +++ b/runtime/vm/os_thread_fuchsia.cc @@ -24,7 +24,7 @@ namespace dart { #define VALIDATE_PTHREAD_RESULT(result) \ if (result != 0) { \ - FATAL1("pthread error: %d", result); \ + FATAL("pthread error: %d", result); \ } #if defined(PRODUCT) @@ -32,7 +32,7 @@ namespace dart { #else #define VALIDATE_PTHREAD_RESULT_NAMED(result) \ if (result != 0) { \ - FATAL2("[%s] pthread error: %d", name_, result); \ + FATAL("[%s] pthread error: %d", name_, result); \ } #endif diff --git a/runtime/vm/os_thread_linux.cc b/runtime/vm/os_thread_linux.cc index d3c49db675d..3ab036673b5 100644 --- a/runtime/vm/os_thread_linux.cc +++ b/runtime/vm/os_thread_linux.cc @@ -33,8 +33,8 @@ DEFINE_FLAG(int, if (result != 0) { \ const int kBufferSize = 1024; \ char error_buf[kBufferSize]; \ - FATAL2("pthread error: %d (%s)", result, \ - Utils::StrError(result, error_buf, kBufferSize)); \ + FATAL("pthread error: %d (%s)", result, \ + Utils::StrError(result, error_buf, kBufferSize)); \ } // Variation of VALIDATE_PTHREAD_RESULT for named objects. @@ -45,8 +45,8 @@ DEFINE_FLAG(int, if (result != 0) { \ const int kBufferSize = 1024; \ char error_buf[kBufferSize]; \ - FATAL3("[%s] pthread error: %d (%s)", name_, result, \ - Utils::StrError(result, error_buf, kBufferSize)); \ + FATAL("[%s] pthread error: %d (%s)", name_, result, \ + Utils::StrError(result, error_buf, kBufferSize)); \ } #endif @@ -126,8 +126,8 @@ static void* ThreadStart(void* data_ptr) { if (FLAG_worker_thread_priority != kMinInt) { if (setpriority(PRIO_PROCESS, syscall(__NR_gettid), FLAG_worker_thread_priority) == -1) { - FATAL2("Setting thread priority to %d failed: errno = %d\n", - FLAG_worker_thread_priority, errno); + FATAL("Setting thread priority to %d failed: errno = %d\n", + FLAG_worker_thread_priority, errno); } } diff --git a/runtime/vm/os_thread_macos.cc b/runtime/vm/os_thread_macos.cc index bc2830a3543..fa1ce611b74 100644 --- a/runtime/vm/os_thread_macos.cc +++ b/runtime/vm/os_thread_macos.cc @@ -39,7 +39,7 @@ DEFINE_FLAG(int, const int kBufferSize = 1024; \ char error_message[kBufferSize]; \ Utils::StrError(result, error_message, kBufferSize); \ - FATAL2("pthread error: %d (%s)", result, error_message); \ + FATAL("pthread error: %d (%s)", result, error_message); \ } #if defined(PRODUCT) @@ -50,7 +50,7 @@ DEFINE_FLAG(int, const int kBufferSize = 1024; \ char error_message[kBufferSize]; \ Utils::StrError(result, error_message, kBufferSize); \ - FATAL3("[%s] pthread error: %d (%s)", name_, result, error_message); \ + FATAL("[%s] pthread error: %d (%s)", name_, result, error_message); \ } #endif @@ -104,12 +104,12 @@ static void* ThreadStart(void* data_ptr) { int policy = SCHED_FIFO; struct sched_param schedule; if (pthread_getschedparam(thread, &policy, &schedule) != 0) { - FATAL1("Obtaining sched param failed: errno = %d\n", errno); + FATAL("Obtaining sched param failed: errno = %d\n", errno); } schedule.sched_priority = FLAG_worker_thread_priority; if (pthread_setschedparam(thread, policy, &schedule) != 0) { - FATAL2("Setting thread priority to %d failed: errno = %d\n", - FLAG_worker_thread_priority, errno); + FATAL("Setting thread priority to %d failed: errno = %d\n", + FLAG_worker_thread_priority, errno); } } diff --git a/runtime/vm/os_thread_win.cc b/runtime/vm/os_thread_win.cc index 62172bf3db4..c35c84d907d 100644 --- a/runtime/vm/os_thread_win.cc +++ b/runtime/vm/os_thread_win.cc @@ -54,8 +54,8 @@ static unsigned int __stdcall ThreadEntry(void* data_ptr) { if (FLAG_worker_thread_priority != kMinInt) { if (SetThreadPriority(GetCurrentThread(), FLAG_worker_thread_priority) == 0) { - FATAL2("Setting thread priority to %d failed: GetLastError() = %d\n", - FLAG_worker_thread_priority, GetLastError()); + FATAL("Setting thread priority to %d failed: GetLastError() = %d\n", + FLAG_worker_thread_priority, GetLastError()); } } @@ -105,7 +105,7 @@ const ThreadJoinId OSThread::kInvalidThreadJoinId = NULL; ThreadLocalKey OSThread::CreateThreadLocal(ThreadDestructor destructor) { ThreadLocalKey key = TlsAlloc(); if (key == kUnsetThreadLocalKey) { - FATAL1("TlsAlloc failed %d", GetLastError()); + FATAL("TlsAlloc failed %d", GetLastError()); } ThreadLocalData::AddThreadLocal(key, destructor); return key; @@ -115,7 +115,7 @@ void OSThread::DeleteThreadLocal(ThreadLocalKey key) { ASSERT(key != kUnsetThreadLocalKey); BOOL result = TlsFree(key); if (!result) { - FATAL1("TlsFree failed %d", GetLastError()); + FATAL("TlsFree failed %d", GetLastError()); } ThreadLocalData::RemoveThreadLocal(key); } @@ -223,7 +223,7 @@ void OSThread::SetThreadLocal(ThreadLocalKey key, uword value) { ASSERT(key != kUnsetThreadLocalKey); BOOL result = TlsSetValue(key, reinterpret_cast(value)); if (!result) { - FATAL1("TlsSetValue failed %d", GetLastError()); + FATAL("TlsSetValue failed %d", GetLastError()); } } diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc index 286475ee88a..64294795f98 100644 --- a/runtime/vm/program_visitor.cc +++ b/runtime/vm/program_visitor.cc @@ -121,7 +121,7 @@ class ProgramWalker : public ValueObject { } else if (worklist_entry_.IsCode()) { VisitCode(Code::Cast(worklist_entry_)); } else { - FATAL1("Got unexpected object %s", worklist_entry_.ToCString()); + FATAL("Got unexpected object %s", worklist_entry_.ToCString()); } } } diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc index dd03ee02910..f13b520e9b7 100644 --- a/runtime/vm/raw_object.cc +++ b/runtime/vm/raw_object.cc @@ -49,28 +49,28 @@ void UntaggedObject::Validate(IsolateGroup* isolate_group) const { uword tags = tags_; if (IsNewObject()) { if (!NewBit::decode(tags)) { - FATAL1("New object missing kNewBit: %" Px "\n", tags); + FATAL("New object missing kNewBit: %" Px "\n", tags); } if (OldBit::decode(tags)) { - FATAL1("New object has kOldBit: %" Px "\n", tags); + FATAL("New object has kOldBit: %" Px "\n", tags); } if (OldAndNotMarkedBit::decode(tags)) { - FATAL1("New object has kOldAndNotMarkedBit: %" Px "\n", tags); + FATAL("New object has kOldAndNotMarkedBit: %" Px "\n", tags); } if (OldAndNotRememberedBit::decode(tags)) { - FATAL1("New object has kOldAndNotRememberedBit: %" Px "\n", tags); + FATAL("New object has kOldAndNotRememberedBit: %" Px "\n", tags); } } else { if (NewBit::decode(tags)) { - FATAL1("Old object has kNewBit: %" Px "\n", tags); + FATAL("Old object has kNewBit: %" Px "\n", tags); } if (!OldBit::decode(tags)) { - FATAL1("Old object missing kOldBit: %" Px "\n", tags); + FATAL("Old object missing kOldBit: %" Px "\n", tags); } } const intptr_t class_id = ClassIdTag::decode(tags); if (!isolate_group->class_table()->IsValidIndex(class_id)) { - FATAL1("Invalid class id encountered %" Pd "\n", class_id); + FATAL("Invalid class id encountered %" Pd "\n", class_id); } if (class_id == kNullCid && isolate_group->class_table()->HasValidClassAt(class_id)) { @@ -80,7 +80,7 @@ void UntaggedObject::Validate(IsolateGroup* isolate_group) const { intptr_t size_from_tags = SizeTag::decode(tags); intptr_t size_from_class = HeapSizeFromClass(tags); if ((size_from_tags != 0) && (size_from_tags != size_from_class)) { - FATAL3( + FATAL( "Inconsistent size encountered " "cid: %" Pd ", size_from_tags: %" Pd ", size_from_class: %" Pd "\n", class_id, size_from_tags, size_from_class); @@ -257,8 +257,8 @@ intptr_t UntaggedObject::HeapSizeFromClass(uword tags) const { auto class_table = isolate_group->heap_walk_class_table(); if (!class_table->IsValidIndex(class_id) || !class_table->HasValidClassAt(class_id)) { - FATAL3("Invalid cid: %" Pd ", obj: %p, tags: %x. Corrupt heap?", - class_id, this, static_cast(tags)); + FATAL("Invalid cid: %" Pd ", obj: %p, tags: %x. Corrupt heap?", + class_id, this, static_cast(tags)); } ASSERT(class_table->SizeAt(class_id) > 0); #endif // DEBUG @@ -281,8 +281,8 @@ intptr_t UntaggedObject::HeapSizeFromClass(uword tags) const { } while ((instance_size > tags_size) && (--retries_remaining > 0)); } if ((instance_size != tags_size) && (tags_size != 0)) { - FATAL3("Size mismatch: %" Pd " from class vs %" Pd " from tags %" Px "\n", - instance_size, tags_size, tags); + FATAL("Size mismatch: %" Pd " from class vs %" Pd " from tags %" Px "\n", + instance_size, tags_size, tags); } #endif // DEBUG return instance_size; @@ -359,8 +359,8 @@ intptr_t UntaggedObject::VisitPointersPredefined(ObjectPointerVisitor* visitor, size = HeapSize(); break; default: - FATAL3("Invalid cid: %" Pd ", obj: %p, tags: %x. Corrupt heap?", class_id, - this, static_cast(tags_)); + FATAL("Invalid cid: %" Pd ", obj: %p, tags: %x. Corrupt heap?", class_id, + this, static_cast(tags_)); break; } diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc index 0c9c28778da..1de3f71c8c4 100644 --- a/runtime/vm/runtime_entry.cc +++ b/runtime/vm/runtime_entry.cc @@ -2886,7 +2886,7 @@ static void HandleStackOverflowTestCases(Thread* thread) { const bool success = isolate_group->ReloadSources(&js, /*force_reload=*/true, script_uri); if (!success) { - FATAL1("*** Isolate reload failed:\n%s\n", js.ToCString()); + FATAL("*** Isolate reload failed:\n%s\n", js.ToCString()); } } if (do_stacktrace) { diff --git a/runtime/vm/thread_pool.cc b/runtime/vm/thread_pool.cc index 1cf0b8f055e..d280dd97708 100644 --- a/runtime/vm/thread_pool.cc +++ b/runtime/vm/thread_pool.cc @@ -296,7 +296,7 @@ void ThreadPool::Worker::StartThread() { int result = OSThread::Start("DartWorker", &Worker::Main, reinterpret_cast(this)); if (result != 0) { - FATAL1("Could not start worker thread: result = %d.", result); + FATAL("Could not start worker thread: result = %d.", result); } } diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h index 5e230f531ea..971630593f6 100644 --- a/runtime/vm/unit_test.h +++ b/runtime/vm/unit_test.h @@ -118,7 +118,7 @@ RELEASE_ASSERT(far_branch_level < 2); \ far_branch_level++; \ } else { \ - FATAL1("Unexpected error: %s\n", error.ToErrorCString()); \ + FATAL("Unexpected error: %s\n", error.ToErrorCString()); \ } \ } \ } \ diff --git a/runtime/vm/virtual_memory_fuchsia.cc b/runtime/vm/virtual_memory_fuchsia.cc index 149f379dc21..a7e516402a5 100644 --- a/runtime/vm/virtual_memory_fuchsia.cc +++ b/runtime/vm/virtual_memory_fuchsia.cc @@ -117,7 +117,7 @@ static void Unmap(zx_handle_t vmar, uword start, uword end) { zx_status_t status = zx_vmar_unmap(vmar, start, size); if (status != ZX_OK) { - FATAL1("zx_vmar_unmap failed: %s\n", zx_status_get_string(status)); + FATAL("zx_vmar_unmap failed: %s\n", zx_status_get_string(status)); } } @@ -294,8 +294,8 @@ void VirtualMemory::Protect(void* address, intptr_t size, Protection mode) { LOG_INFO("zx_vmar_protect(%u, 0x%lx, 0x%lx)\n", prot, page_address, end_address - page_address); if (status != ZX_OK) { - FATAL3("zx_vmar_protect(0x%lx, 0x%lx) failed: %s\n", page_address, - end_address - page_address, zx_status_get_string(status)); + FATAL("zx_vmar_protect(0x%lx, 0x%lx) failed: %s\n", page_address, + end_address - page_address, zx_status_get_string(status)); } } diff --git a/runtime/vm/virtual_memory_win.cc b/runtime/vm/virtual_memory_win.cc index 816ef0f0937..a6a69a7bfcb 100644 --- a/runtime/vm/virtual_memory_win.cc +++ b/runtime/vm/virtual_memory_win.cc @@ -189,7 +189,7 @@ VirtualMemory::~VirtualMemory() { return; } if (VirtualFree(reserved_.pointer(), 0, MEM_RELEASE) == 0) { - FATAL1("VirtualFree failed: Error code %d\n", GetLastError()); + FATAL("VirtualFree failed: Error code %d\n", GetLastError()); } } @@ -201,7 +201,7 @@ bool VirtualMemory::FreeSubSegment(void* address, intptr_t size) { } #endif // defined(DART_COMPRESSED_POINTERS) if (VirtualFree(address, size, MEM_DECOMMIT) == 0) { - FATAL1("VirtualFree failed: Error code %d\n", GetLastError()); + FATAL("VirtualFree failed: Error code %d\n", GetLastError()); } return true; } @@ -237,7 +237,7 @@ void VirtualMemory::Protect(void* address, intptr_t size, Protection mode) { DWORD old_prot = 0; if (VirtualProtect(reinterpret_cast(page_address), end_address - page_address, prot, &old_prot) == 0) { - FATAL1("VirtualProtect failed %d\n", GetLastError()); + FATAL("VirtualProtect failed %d\n", GetLastError()); } } diff --git a/runtime/vm/zone.h b/runtime/vm/zone.h index c38cc4547a2..5919288ccef 100644 --- a/runtime/vm/zone.h +++ b/runtime/vm/zone.h @@ -260,7 +260,7 @@ inline uword Zone::AllocUnsafe(intptr_t size) { ASSERT(size >= 0); // Round up the requested size to fit the alignment. if (size > (kIntptrMax - kAlignment)) { - FATAL1("Zone::Alloc: 'size' is too large: size=%" Pd "", size); + FATAL("Zone::Alloc: 'size' is too large: size=%" Pd "", size); } size = Utils::RoundUp(size, kAlignment); @@ -284,8 +284,8 @@ template inline void Zone::CheckLength(intptr_t len) { const intptr_t kElementSize = sizeof(ElementType); if (len > (kIntptrMax / kElementSize)) { - FATAL2("Zone::Alloc: 'len' is too large: len=%" Pd ", kElementSize=%" Pd, - len, kElementSize); + FATAL("Zone::Alloc: 'len' is too large: len=%" Pd ", kElementSize=%" Pd, + len, kElementSize); } }