changeset 33066:ca78dc62d65f bytecode-interpreter

maint: merge default to bytecode-interpreter
author John W. Eaton <jwe@octave.org>
date Wed, 21 Feb 2024 15:57:27 -0500
parents a2162efd8b80 (current diff) 6fa52e36a8f2 (diff)
children 88e9e13db007
files libinterp/parse-tree/pt-eval.cc
diffstat 4 files changed, 21 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc	Sat Feb 17 09:47:56 2024 +0100
+++ b/libinterp/parse-tree/pt-eval.cc	Wed Feb 21 15:57:27 2024 -0500
@@ -1409,6 +1409,8 @@
 
   // Go up to the nearest user code frame.
 
+  frame.protect_var (m_debug_frame);
+
   m_debug_frame = m_call_stack.dbupdown (0);
 
   // FIXME: probably we just want to print one line, not the
--- a/liboctave/array/CSparse.cc	Sat Feb 17 09:47:56 2024 +0100
+++ b/liboctave/array/CSparse.cc	Wed Feb 21 15:57:27 2024 -0500
@@ -5297,7 +5297,8 @@
                   if (err != 0)
                     err = -2;
 
-                  volatile double rcond_plus_one = rcond + 1.0;
+                  // Prevent use of extra precision.
+                  double rcond_plus_one = rcond + 1.0;
 
                   if (rcond_plus_one == 1.0 || octave::math::isnan (rcond))
                     {
@@ -5467,7 +5468,8 @@
                   if (err != 0)
                     err = -2;
 
-                  volatile double rcond_plus_one = rcond + 1.0;
+                  // Prevent use of extra precision.
+                  double rcond_plus_one = rcond + 1.0;
 
                   if (rcond_plus_one == 1.0 || octave::math::isnan (rcond))
                     {
@@ -5630,7 +5632,9 @@
         rcond = Info (UMFPACK_RCOND);
       else
         rcond = 1.;
-      volatile double rcond_plus_one = rcond + 1.0;
+
+      // Prevent use of extra precision.
+      double rcond_plus_one = rcond + 1.0;
 
       if (status == UMFPACK_WARNING_singular_matrix
           || rcond_plus_one == 1.0 || octave::math::isnan (rcond))
@@ -5780,7 +5784,8 @@
             }
           else
             {
-              volatile double rcond_plus_one = rcond + 1.0;
+              // Prevent use of extra precision.
+              double rcond_plus_one = rcond + 1.0;
 
               if (rcond_plus_one == 1.0 || octave::math::isnan (rcond))
                 {
@@ -6029,7 +6034,8 @@
             }
           else
             {
-              volatile double rcond_plus_one = rcond + 1.0;
+              // Prevent use of extra precision.
+              double rcond_plus_one = rcond + 1.0;
 
               if (rcond_plus_one == 1.0 || octave::math::isnan (rcond))
                 {
@@ -6311,7 +6317,8 @@
             }
           else
             {
-              volatile double rcond_plus_one = rcond + 1.0;
+              // Prevent use of extra precision.
+              double rcond_plus_one = rcond + 1.0;
 
               if (rcond_plus_one == 1.0 || octave::math::isnan (rcond))
                 {
@@ -6539,7 +6546,8 @@
             }
           else
             {
-              volatile double rcond_plus_one = rcond + 1.0;
+              // Prevent use of extra precision.
+              double rcond_plus_one = rcond + 1.0;
 
               if (rcond_plus_one == 1.0 || octave::math::isnan (rcond))
                 {
@@ -6674,7 +6682,8 @@
               retval.maybe_compress ();
 
               rcond = Info (UMFPACK_RCOND);
-              volatile double rcond_plus_one = rcond + 1.0;
+              // Prevent use of extra precision.
+              double rcond_plus_one = rcond + 1.0;
 
               if (status == UMFPACK_WARNING_singular_matrix
                   || rcond_plus_one == 1.0 || octave::math::isnan (rcond))
--- a/liboctave/util/quit.cc	Sat Feb 17 09:47:56 2024 +0100
+++ b/liboctave/util/quit.cc	Wed Feb 21 15:57:27 2024 -0500
@@ -38,7 +38,7 @@
 
 std::atomic<sig_atomic_t> octave_interrupt_state{0};
 
-volatile std::atomic<bool> octave_signal_caught{false};
+std::atomic<bool> octave_signal_caught{false};
 
 void (*octave_signal_hook) () = nullptr;
 void (*octave_interrupt_hook) () = nullptr;
--- a/liboctave/util/quit.h	Sat Feb 17 09:47:56 2024 +0100
+++ b/liboctave/util/quit.h	Wed Feb 21 15:57:27 2024 -0500
@@ -226,7 +226,7 @@
 
 extern OCTAVE_API std::atomic<int> octave_interrupt_state;
 
-extern OCTAVE_API volatile std::atomic<bool> octave_signal_caught;
+extern OCTAVE_API std::atomic<bool> octave_signal_caught;
 
 #endif