changeset 28820:52744f8127d7

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Tue, 29 Sep 2020 14:01:11 -0400
parents 6ec04c206ac4 (current diff) bd71a227c562 (diff)
children fd05bcb94ab4
files libinterp/corefcn/cellfun.cc
diffstat 1 files changed, 11 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/cellfun.cc	Tue Sep 29 07:14:05 2020 -0700
+++ b/libinterp/corefcn/cellfun.cc	Tue Sep 29 14:01:11 2020 -0400
@@ -454,19 +454,12 @@
   {
     if (func.is_function_handle () || func.is_inline_function ())
       {
-        // We can't check for overloads now.  Is there something else we
-        // should be doing instead?
-        goto nevermind;
-
-#if 0
-        octave_fcn_handle *f = func.fcn_handle_value ();
+        // FIXME: instead of checking for overloaded functions as we did
+        // previously but is no longer possible, we could check whether
+        // the types of all the cell array elements are the same, then
+        // lookup the function for that type just once.
 
-        // Overloaded function handles need to check the type of the
-        // arguments for each element of the array, so they cannot be
-        // optimized this way.
-        if (f -> is_overloaded ())
-          goto nevermind;
-#endif
+        goto nevermind;
       }
 
     std::string name = func.function_value () -> name ();
@@ -1158,19 +1151,13 @@
         {
           if (func.is_function_handle () || func.class_name () == "inline")
             {
-              // We can't check for overloads now.  Is there something
-              // else we should be doing instead?
-              goto nevermind;
-
-#if 0
-              octave_fcn_handle *f = func.fcn_handle_value ();
+              // FIXME: instead of checking for overloaded functions as
+              // we did previously but is no longer possible, we could
+              // check whether the types of all the cell array elements
+              // are the same, then lookup the function for that type
+              // just once.
 
-              // Overloaded function handles need to check the type of the
-              // arguments for each element of the array, so they cannot be
-              // optimized this way.
-              if (f -> is_overloaded ())
-                goto nevermind;
-#endif
+              goto nevermind;
             }
 
           octave_value f