# HG changeset patch # User John W. Eaton # Date 1669500841 18000 # Node ID 2fb47f51561217080bd516c20431a4c4b1bc9687 # Parent 1d410367802c5cbb8d28bae6db05cb7791f8f431# Parent 9978ef12aea3a02b2fea84d970522b2fef18db90 maint: Merge stable to default. diff -r 1d410367802c -r 2fb47f515612 libinterp/corefcn/interpreter.cc --- a/libinterp/corefcn/interpreter.cc Sat Nov 26 18:51:28 2022 +0100 +++ b/libinterp/corefcn/interpreter.cc Sat Nov 26 17:14:01 2022 -0500 @@ -459,6 +459,7 @@ m_environment (), m_settings (), m_error_system (*this), + m_evaluator (*this), m_help_system (*this), m_input_system (*this), m_output_system (*this), @@ -468,7 +469,6 @@ m_load_save_system (*this), m_type_info (), m_symbol_table (*this), - m_evaluator (*this), m_stream_list (*this), m_child_list (), m_url_handle_manager (), diff -r 1d410367802c -r 2fb47f515612 libinterp/corefcn/interpreter.h --- a/libinterp/corefcn/interpreter.h Sat Nov 26 18:51:28 2022 +0100 +++ b/libinterp/corefcn/interpreter.h Sat Nov 26 17:14:01 2022 -0500 @@ -253,6 +253,8 @@ return m_error_system; } + tree_evaluator& get_evaluator (void); + help_system& get_help_system (void) { return m_help_system; @@ -298,8 +300,6 @@ return m_symbol_table; } - tree_evaluator& get_evaluator (void); - symbol_scope get_top_scope (void) const; symbol_scope get_current_scope (void) const; symbol_scope require_current_scope (const std::string& who) const; @@ -586,6 +586,8 @@ error_system m_error_system; + tree_evaluator m_evaluator; + help_system m_help_system; input_system m_input_system; @@ -604,8 +606,6 @@ symbol_table m_symbol_table; - tree_evaluator m_evaluator; - stream_list m_stream_list; child_list m_child_list; diff -r 1d410367802c -r 2fb47f515612 liboctave/util/oct-inttypes.cc --- a/liboctave/util/oct-inttypes.cc Sat Nov 26 18:51:28 2022 +0100 +++ b/liboctave/util/oct-inttypes.cc Sat Nov 26 17:14:01 2022 -0500 @@ -378,6 +378,14 @@ // Essentially, what we do is compute sign, multiply absolute values // (as above) and impose the sign. + // But first, avoid overflow in computation of abs (min_val ()). + + if (x == min_val ()) + return y == 0 ? 0 : (y < 0 ? max_val () : min_val ()); + + if (y == min_val ()) + return x == 0 ? 0 : (x < 0 ? max_val () : min_val ()); + uint64_t usx = octave_int_abs (x); uint64_t usy = octave_int_abs (y); bool positive = (x < 0) == (y < 0);