# HG changeset patch # User Arun Giridhar # Date 1711470067 14400 # Node ID 6cf792dac705a8a3bfb8d6f6fde71f549cb17a72 # Parent 9f8fed12fa373916fc895c0fc6edecb7ef590b67 pt-bytecode-vm.cc: Change "assert" to "panic_unless" pt-bytecode-vm.cc: The recent removal of the header file causes assertions to give compilation errors in this file. Accordingly, assert() has been changed to panic_unless(). diff -r 9f8fed12fa37 -r 6cf792dac705 libinterp/parse-tree/pt-bytecode-vm.cc --- a/libinterp/parse-tree/pt-bytecode-vm.cc Mon Mar 25 14:40:42 2024 -0400 +++ b/libinterp/parse-tree/pt-bytecode-vm.cc Tue Mar 26 12:21:07 2024 -0400 @@ -1305,14 +1305,14 @@ m_tw->get_current_stack_frame ()->vm_unwinds (); // Assert that the stack pointer is back where it should be - assert (bsp + N_LOCALS() == sp); + panic_unless (bsp + N_LOCALS() == sp); int n_returns_callee = N_RETURNS (); bool is_varargout = n_returns_callee < 0; if (OCTAVE_UNLIKELY (is_varargout)) n_returns_callee = -n_returns_callee; - assert (n_returns_callee > 0); + panic_unless (n_returns_callee > 0); int n_locals_callee = N_LOCALS (); @@ -6417,7 +6417,7 @@ // variables on the VM stack if it is referenced from somewhere else. m_tw->get_current_stack_frame ()->vm_unwinds (); - assert (N_RETURNS () == -128); + panic_unless (N_RETURNS () == -128); int n_returns_callee = bsp[0].i; // Nargout on stack if (n_returns_callee == 0) @@ -6429,7 +6429,7 @@ // Assert that the stack pointer is back where it should be, i.e. that there are between // zero and nargout return values. - assert (n_ret_on_stack >= 0 && n_ret_on_stack <= n_returns_callee); + panic_unless (n_ret_on_stack >= 0 && n_ret_on_stack <= n_returns_callee); stack_element *first_ret = sp - n_ret_on_stack;