changeset 32447:53920541c0b8

Remove unnused functions introduced by bytecode interpreter work The loonies are same_rep(), fcn_cache_value (), simple_numeric_assign () * ov-base.cc: Remove simple_numeric_assign def * ov-base.h: Remove simple_numeric_assign dec, fcn_cache_value def * ov-fcn.h: Remove fcn_cache_value def * ov.h: Remove fcn_cache_value, same_rep defs
author Petter T. <petter.vilhelm@gmail.com>
date Fri, 27 Oct 2023 18:20:14 +0200
parents d0b363fd92c5
children a7a7ac88fdc4
files libinterp/octave-value/ov-base.cc libinterp/octave-value/ov-base.h libinterp/octave-value/ov-fcn.h libinterp/octave-value/ov.h
diffstat 4 files changed, 0 insertions(+), 141 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base.cc	Fri Oct 27 18:20:09 2023 +0200
+++ b/libinterp/octave-value/ov-base.cc	Fri Oct 27 18:20:14 2023 +0200
@@ -1275,128 +1275,6 @@
 }
 
 octave_value
-octave_base_value::simple_numeric_assign (char type, octave_value_list& idx,
-                                          const octave_value& rhs)
-{
-  octave_value retval;
-
-  if (idx.empty ())
-    error ("missing index in indexed assignment");
-
-  int t_lhs = type_id ();
-  int t_rhs = rhs.type_id ();
-
-  octave::type_info& ti = octave::__get_type_info__ ();
-
-  octave::type_info::assign_op_fcn f
-    = ti.lookup_assign_op (octave_value::op_asn_eq, t_lhs, t_rhs);
-
-  bool done = false;
-
-  if (f)
-    {
-      f (*this, idx, rhs.get_rep ());
-
-      done = true;
-    }
-
-  if (done)
-    {
-      m_count++;
-      retval = octave_value (this);
-    }
-  else
-    {
-      int t_result = ti.lookup_pref_assign_conv (t_lhs, t_rhs);
-
-      if (t_result >= 0)
-        {
-          octave_base_value::type_conv_fcn cf
-            = ti.lookup_widening_op (t_lhs, t_result);
-
-          if (! cf)
-            err_indexed_assignment (type_name (), rhs.type_name ());
-
-          octave_base_value *tmp = cf (*this);
-
-          if (! tmp)
-            err_assign_conversion_failed (type_name (), rhs.type_name ());
-
-          octave_value val (tmp);
-
-          retval = val.simple_subsasgn (type, idx, rhs);
-
-          done = true;
-        }
-
-      if (! done)
-        {
-          octave_value tmp_rhs;
-
-          octave_base_value::type_conv_info cf_rhs
-            = rhs.numeric_conversion_function ();
-
-          octave_base_value::type_conv_info cf_this
-            = numeric_conversion_function ();
-
-          // Try biased (one-sided) conversions first.
-          if (cf_rhs.type_id () >= 0
-              && (ti.lookup_assign_op (octave_value::op_asn_eq,
-                                       t_lhs, cf_rhs.type_id ())
-                  || ti.lookup_pref_assign_conv (t_lhs,
-                                                 cf_rhs.type_id ()) >= 0))
-            cf_this = nullptr;
-          else if (cf_this.type_id () >= 0
-                   && (ti.lookup_assign_op (octave_value::op_asn_eq,
-                                            cf_this.type_id (), t_rhs)
-                       || ti.lookup_pref_assign_conv (cf_this.type_id (),
-                                                      t_rhs) >= 0))
-            cf_rhs = nullptr;
-
-          if (cf_rhs)
-            {
-              octave_base_value *tmp = cf_rhs (rhs.get_rep ());
-
-              if (! tmp)
-                err_assign_conversion_failed (type_name (), rhs.type_name ());
-
-              tmp_rhs = octave_value (tmp);
-            }
-          else
-            tmp_rhs = rhs;
-
-          m_count++;
-          octave_value tmp_lhs = octave_value (this);
-
-          if (cf_this)
-            {
-              octave_base_value *tmp = cf_this (*this);
-
-              if (! tmp)
-                err_assign_conversion_failed (type_name (), rhs.type_name ());
-
-              tmp_lhs = octave_value (tmp);
-            }
-
-          if (! cf_this && ! cf_rhs)
-            err_no_conversion (octave_value::assign_op_as_string
-                               (octave_value::op_asn_eq),
-                               type_name (), rhs.type_name ());
-
-          retval = tmp_lhs.simple_subsasgn (type, idx, tmp_rhs);
-
-          done = true;
-        }
-    }
-
-  // The assignment may have converted to a type that is wider than necessary.
-
-  retval.maybe_mutate ();
-
-  return retval;
-}
-
-octave_value
 octave_base_value::numeric_assign (const std::string& type,
                                    const std::list<octave_value_list>& idx,
                                    const octave_value& rhs)
--- a/libinterp/octave-value/ov-base.h	Fri Oct 27 18:20:09 2023 +0200
+++ b/libinterp/octave-value/ov-base.h	Fri Oct 27 18:20:14 2023 +0200
@@ -553,8 +553,6 @@
 
   virtual octave_function * get_cached_fcn (void*, void*) { return nullptr; }
 
-  virtual octave_fcn_cache * fcn_cache_value (void) { return nullptr; }
-
   virtual void erase_subfunctions () { }
 
   virtual short int short_value (bool = false, bool = false) const;
@@ -946,10 +944,6 @@
                   const std::list<octave_value_list>& idx,
                   const octave_value& rhs);
 
-  OCTINTERP_API octave_value
-  simple_numeric_assign (char type, octave_value_list& idx,
-                         const octave_value& rhs);
-
   void reset_indent_level () const
   { s_curr_print_indent_level = 0; }
 
--- a/libinterp/octave-value/ov-fcn.h	Fri Oct 27 18:20:09 2023 +0200
+++ b/libinterp/octave-value/ov-fcn.h	Fri Oct 27 18:20:14 2023 +0200
@@ -79,11 +79,6 @@
   octave_value
   get_cached_obj ();
 
-  octave_fcn_cache * fcn_cache_value (void)
-  {
-    return this;
-  }
-
   octave_value_list
   call (octave::tree_evaluator& tw,
         octave_function *fcn,
--- a/libinterp/octave-value/ov.h	Fri Oct 27 18:20:09 2023 +0200
+++ b/libinterp/octave-value/ov.h	Fri Oct 27 18:20:14 2023 +0200
@@ -1584,12 +1584,6 @@
   bool is_maybe_function (void) const
   { return m_rep->is_maybe_function (); }
 
-  octave_fcn_cache *
-  fcn_cache_value () const
-  {
-    return m_rep->fcn_cache_value ();
-  }
-
   bool vm_need_storable_call () const
   {
     return m_rep->vm_need_storable_call ();
@@ -1615,8 +1609,6 @@
     return m_rep->vm_dispatch_call ();
   }
 
-  bool same_rep (octave_value &ov) const { return m_rep == ov.m_rep; }
-
   void maybe_call_dtor () { m_rep->maybe_call_dtor (); }
 
   octave_value