diff libinterp/octave-value/cdef-utils.cc @ 27208:5b40cf4896f0

eliminate some direct access to call stack in classdef and inline objects * pt-eval.h, pt-eval.cc (tree_evaluator::get_dispatch_class, tree_evaluator::set_dispatch_class): New functions. * cdef-property.cc (is_method_executing): Eliminate direct access to call stack. * cdef-utils.cc (get_class_context): Likewise. * ov-fcn-inline.cc (octave_fcn_inline::octave_fcn_inline): Likewise. * ov-classdef.cc (octave_classdef_superclass_ref::is_constructed_object): Likewise.
author John W. Eaton <jwe@octave.org>
date Mon, 01 Apr 2019 20:38:44 +0000
parents 392b14b0c085
children 823b4bcf79fc
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-utils.cc	Mon Apr 01 20:28:53 2019 +0000
+++ b/libinterp/octave-value/cdef-utils.cc	Mon Apr 01 20:38:44 2019 +0000
@@ -24,7 +24,6 @@
 #  include "config.h"
 #endif
 
-#include "call-stack.h"
 #include "cdef-class.h"
 #include "cdef-manager.h"
 #include "cdef-method.h"
@@ -34,6 +33,7 @@
 #include "interpreter-private.h"
 #include "ov-classdef.h"
 #include "ov-usr-fcn.h"
+#include "pt-eval.h"
 
 namespace octave
 {
@@ -252,14 +252,14 @@
     // methods will use the dispatch class of the class in which they
     // are defined instead of the class in which they are executing.
 
-    call_stack& cs = __get_call_stack__ ("get_class_context");
+    tree_evaluator& tw = __get_evaluator__ ("get_class_context");
 
-    std::string dispatch_class = cs.get_dispatch_class ();
+    std::string dispatch_class = tw.get_dispatch_class ();
 
     if (! dispatch_class.empty ())
       return lookup_class (dispatch_class);
 
-    octave_function *fcn = cs.current ();
+    octave_function *fcn = tw.current_function ();
 
     if (fcn && (fcn->is_class_method ()
                 || fcn->is_classdef_constructor ()