Mercurial > octave
changeset 31730:610a85b0ff62
use interpreter::feval instead of global feval function
* __eigs__.cc, bsxfun.cc, call-stack.cc, cellfun.cc, daspk.cc,
dasrt.cc, dassl.cc, data.cc, defun.cc, gh-manager.cc, graphics.cc,
gtk-manager.cc, gtk-manager.h, hook-fcn.cc, input.cc, interpreter.cc,
ls-mat5.cc, lsode.cc, mex.cc, pr-output.cc, quad.cc, quadcc.cc,
variables.cc, __init_fltk__.cc, __init_gnuplot__.cc, __ode15__.cc,
audiodevinfo.cc, cdef-method.cc, cdef-package.cc, cdef-property.cc,
ov-class.cc, ov-java.cc, ov-oncleanup.cc, op-class.cc, pt-assign.cc,
pt-eval.cc, pt-id.cc:
Change all uses of global feval function to use interpreter::feval
instead. If necessary, use __get_interpreter__ to access global
interpreter object.
line wrap: on
line diff
--- a/libinterp/corefcn/__eigs__.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/__eigs__.cc Thu Jan 12 10:22:04 2023 -0500 @@ -53,6 +53,10 @@ { public: + eigs_callback (octave::interpreter& interp) + : m_interpreter (interp) + { } + ColumnVector eigs_func (const ColumnVector& x, int& eigs_error); @@ -61,6 +65,8 @@ //-------- + octave::interpreter& m_interpreter; + // Pointer for user defined function. octave_value m_eigs_fcn; @@ -84,7 +90,7 @@ try { - tmp = octave::feval (m_eigs_fcn, args, 1); + tmp = m_interpreter.feval (m_eigs_fcn, args, 1); } catch (octave::execution_exception& ee) { @@ -125,7 +131,7 @@ try { - tmp = octave::feval (m_eigs_fcn, args, 1); + tmp = m_interpreter.feval (m_eigs_fcn, args, 1); } catch (octave::execution_exception& ee) { @@ -213,7 +219,7 @@ ComplexColumnVector cresid; octave_idx_type info = 1; - eigs_callback callback; + eigs_callback callback (interp); unwind_protect_var<int> restore_var (call_depth); call_depth++;
--- a/libinterp/corefcn/bsxfun.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/bsxfun.cc Thu Jan 12 10:22:04 2023 -0500 @@ -38,7 +38,6 @@ #include "oct-map.h" #include "ov-colon.h" #include "ov-fcn-handle.h" -#include "parse.h" #include "unwind-prot.h" #include "variables.h" @@ -414,14 +413,14 @@ octave_value_list inputs (2); inputs(0) = A; inputs(1) = B; - retval = feval (fcn, inputs, 1); + retval = interp.feval (fcn, inputs, 1); } else if (dvc.numel () < 1) { octave_value_list inputs (2); inputs(0) = A.resize (dvc); inputs(1) = B.resize (dvc); - retval = feval (fcn, inputs, 1); + retval = interp.feval (fcn, inputs, 1); } else { @@ -463,7 +462,7 @@ if (maybe_update_column (Bc, B, dvb, dvc, i, idxB)) inputs(1) = Bc; - octave_value_list tmp = feval (fcn, inputs, 1); + octave_value_list tmp = interp.feval (fcn, inputs, 1); #define BSXINIT(T, CLS, EXTRACTOR) \ (result_type == CLS) \
--- a/libinterp/corefcn/call-stack.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/call-stack.cc Thu Jan 12 10:22:04 2023 -0500 @@ -40,7 +40,6 @@ #include "ov-fcn-handle.h" #include "ov-usr-fcn.h" #include "pager.h" -#include "parse.h" #include "stack-frame.h" #include "syminfo.h" #include "symrec.h" @@ -982,7 +981,9 @@ unwind_action restore_scope ([=] (void) { pop (); }); - feval ("load", octave_value (file_name), 0); + interpreter& interp = m_evaluator.get_interpreter (); + + interp.feval ("load", octave_value (file_name), 0); std::string newmsg = "Variables in the file " + file_name + ":\n\n";
--- a/libinterp/corefcn/cellfun.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/cellfun.cc Thu Jan 12 10:22:04 2023 -0500 @@ -41,7 +41,6 @@ #include "defun.h" #include "interpreter-private.h" #include "interpreter.h" -#include "parse.h" #include "variables.h" #include "unwind-prot.h" #include "errwarn.h" @@ -78,7 +77,7 @@ try { - tmp = feval (fcn, inputlist, nargout); + tmp = interp.feval (fcn, inputlist, nargout); } catch (const execution_exception& ee) { @@ -111,7 +110,7 @@ octave_value_list errlist = inputlist; errlist.prepend (msg); - tmp = feval (error_handler, errlist, nargout); + tmp = interp.feval (error_handler, errlist, nargout); } else tmp.clear (); @@ -1275,8 +1274,6 @@ } } - error_system& es = interp.get_error_system (); - // Apply functions. if (uniform_output)
--- a/libinterp/corefcn/daspk.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/daspk.cc Thu Jan 12 10:22:04 2023 -0500 @@ -36,11 +36,11 @@ #include "error.h" #include "errwarn.h" #include "interpreter-private.h" +#include "interpreter.h" #include "ovl.h" #include "ov-fcn.h" #include "ov-cell.h" #include "pager.h" -#include "parse.h" #include "unwind-prot.h" #include "utils.h" #include "variables.h" @@ -82,7 +82,9 @@ try { - tmp = feval (daspk_fcn, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (daspk_fcn, args, 1); } catch (execution_exception& ee) { @@ -132,7 +134,9 @@ try { - tmp = feval (daspk_jac, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (daspk_jac, args, 1); } catch (execution_exception& ee) {
--- a/libinterp/corefcn/dasrt.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/dasrt.cc Thu Jan 12 10:22:04 2023 -0500 @@ -37,11 +37,11 @@ #include "error.h" #include "errwarn.h" #include "interpreter-private.h" +#include "interpreter.h" #include "ovl.h" #include "ov-fcn.h" #include "ov-cell.h" #include "pager.h" -#include "parse.h" #include "unwind-prot.h" #include "utils.h" #include "variables.h" @@ -83,7 +83,9 @@ try { - tmp = feval (dasrt_fcn, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (dasrt_fcn, args, 1); } catch (execution_exception& ee) { @@ -124,7 +126,9 @@ try { - tmp = feval (dasrt_cf, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (dasrt_cf, args, 1); } catch (execution_exception& ee) { @@ -170,7 +174,9 @@ try { - tmp = feval (dasrt_jac, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (dasrt_jac, args, 1); } catch (execution_exception& ee) {
--- a/libinterp/corefcn/dassl.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/dassl.cc Thu Jan 12 10:22:04 2023 -0500 @@ -35,11 +35,11 @@ #include "error.h" #include "errwarn.h" #include "interpreter-private.h" +#include "interpreter.h" #include "ovl.h" #include "ov-fcn.h" #include "ov-cell.h" #include "pager.h" -#include "parse.h" #include "unwind-prot.h" #include "utils.h" #include "variables.h" @@ -81,7 +81,9 @@ try { - tmp = feval (dassl_fcn, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (dassl_fcn, args, 1); } catch (execution_exception& ee) { @@ -131,7 +133,9 @@ try { - tmp = feval (dassl_jac, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (dassl_jac, args, 1); } catch (execution_exception& ee) {
--- a/libinterp/corefcn/data.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/data.cc Thu Jan 12 10:22:04 2023 -0500 @@ -49,6 +49,7 @@ #include "error.h" #include "errwarn.h" #include "interpreter-private.h" +#include "interpreter.h" #include "oct-map.h" #include "ov-class.h" #include "ov-complex.h" @@ -60,7 +61,6 @@ #include "ov.h" #include "ovl.h" #include "pager.h" -#include "parse.h" #include "pt-mat.h" #include "utils.h" #include "variables.h" @@ -1680,7 +1680,9 @@ std::string cname = ov.class_name (); - symbol_table& symtab = __get_symbol_table__ (); + interpreter& interp = __get_interpreter__ (); + + symbol_table& symtab = interp.get_symbol_table (); octave_value fcn = symtab.find_method (dtype, cname); @@ -1690,7 +1692,7 @@ try { - result = feval (fcn, ovl (ov), 1); + result = interp.feval (fcn, ovl (ov), 1); } catch (execution_exception& ee) { @@ -1718,7 +1720,7 @@ try { - result = feval (fcn, ovl (ov), 1); + result = interp.feval (fcn, ovl (ov), 1); } catch (execution_exception& ee) { @@ -1746,7 +1748,9 @@ std::string dtype = get_dispatch_type (ovl); - symbol_table& symtab = __get_symbol_table__ (); + interpreter& interp = __get_interpreter__ (); + + symbol_table& symtab = interp.get_symbol_table (); octave_value fcn = symtab.find_method (cattype, dtype); @@ -1758,7 +1762,7 @@ try { - tmp2 = feval (fcn, ovl, 1); + tmp2 = interp.feval (fcn, ovl, 1); } catch (execution_exception& ee) {
--- a/libinterp/corefcn/defun.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/defun.cc Thu Jan 12 10:22:04 2023 -0500 @@ -46,7 +46,6 @@ #include "interpreter.h" #include "symtab.h" #include "variables.h" -#include "parse.h" OCTAVE_BEGIN_NAMESPACE(octave) @@ -67,7 +66,9 @@ void print_usage (const std::string& name) { - feval ("print_usage", octave_value (name), 0); + interpreter& interp = __get_interpreter__ (); + + interp.feval ("print_usage", octave_value (name), 0); } void
--- a/libinterp/corefcn/gh-manager.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/gh-manager.cc Thu Jan 12 10:22:04 2023 -0500 @@ -35,7 +35,6 @@ #include "input.h" #include "interpreter-private.h" #include "interpreter.h" -#include "parse.h" OCTAVE_BEGIN_NAMESPACE(octave) @@ -447,9 +446,9 @@ try { if (ov_fcn.is_defined ()) - octave::feval (ov_fcn, args); + m_interpreter.feval (ov_fcn, args); else - octave::feval (fcn, args); + m_interpreter.feval (fcn, args); } catch (const octave::execution_exception& ee) {
--- a/libinterp/corefcn/graphics.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/graphics.cc Thu Jan 12 10:22:04 2023 -0500 @@ -62,7 +62,6 @@ #include "oct-map.h" #include "ov-fcn-handle.h" #include "pager.h" -#include "parse.h" #include "text-engine.h" #include "text-renderer.h" #include "unwind-prot.h" @@ -13469,14 +13468,15 @@ } static bool -compare_property_values (const octave_value& ov1, const octave_value& ov2) +compare_property_values (octave::interpreter& interp, + const octave_value& ov1, const octave_value& ov2) { octave_value_list args(2); args(0) = ov1; args(1) = ov2; - octave_value_list result = octave::feval ("isequal", args, 1); + octave_value_list result = interp.feval ("isequal", args, 1); if (result.length () > 0) return result(0).bool_value (); @@ -13534,7 +13534,7 @@ cleanup_waitfor_predelete_listener (const octave_value& listener) { do_cleanup_waitfor_listener (listener, GCB_PREDELETE); } -DECLARE_STATIC_FUNX (waitfor_listener, args, ) +DECLARE_STATIC_METHODX (waitfor_listener, interp, args, ) { if (args.length () > 3) { @@ -13557,7 +13557,7 @@ graphics_object go = gh_mgr.get_object (gh); octave_value pvalue = go.get (pname); - if (compare_property_values (pvalue, args(5))) + if (compare_property_values (interp, pvalue, args(5))) waitfor_results[id] = true; } } @@ -13711,7 +13711,7 @@ graphics_object go = gh_mgr.get_object (gh); if (max_arg_index >= 2 - && compare_property_values (go.get (pname), args(2))) + && compare_property_values (interp, go.get (pname), args(2))) waitfor_results[id] = true; else {
--- a/libinterp/corefcn/gtk-manager.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/gtk-manager.cc Thu Jan 12 10:22:04 2023 -0500 @@ -28,10 +28,10 @@ #endif #include "error.h" +#include "interpreter.h" #include "graphics-toolkit.h" #include "gtk-manager.h" #include "ovl.h" -#include "parse.h" OCTAVE_BEGIN_NAMESPACE(octave) @@ -55,7 +55,7 @@ octave_value_list args; args(0) = m_dtk; - feval ("graphics_toolkit", args); + m_interpreter.feval ("graphics_toolkit", args); pl = m_loaded_toolkits.find (m_dtk);
--- a/libinterp/corefcn/gtk-manager.h Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/gtk-manager.h Thu Jan 12 10:22:04 2023 -0500 @@ -37,11 +37,13 @@ OCTAVE_BEGIN_NAMESPACE(octave) +class interpreter; + class OCTINTERP_API gtk_manager { public: - gtk_manager (void) { } + gtk_manager (interpreter& interp) : m_interpreter (interp) { } ~gtk_manager (void) { @@ -116,6 +118,8 @@ private: + interpreter& m_interpreter; + // The name of the default toolkit. std::string m_dtk;
--- a/libinterp/corefcn/hook-fcn.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/hook-fcn.cc Thu Jan 12 10:22:04 2023 -0500 @@ -28,7 +28,8 @@ #endif #include "hook-fcn.h" -#include "parse.h" +#include "interpreter-private.h" +#include "interpreter.h" OCTAVE_BEGIN_NAMESPACE(octave) @@ -55,7 +56,9 @@ if (m_data.is_defined ()) args.append (m_data); - feval (m_name, args, 0); + interpreter& interp = __get_interpreter__ (); + + interp.feval (m_name, args, 0); } void fcn_handle_hook_function::eval (const octave_value_list& initial_args) @@ -65,7 +68,9 @@ if (m_data.is_defined ()) args.append (m_data); - feval (m_fcn_handle, args, 0); + interpreter& interp = __get_interpreter__ (); + + interp.feval (m_fcn_handle, args, 0); } OCTAVE_END_NAMESPACE(octave)
--- a/libinterp/corefcn/input.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/input.cc Thu Jan 12 10:22:04 2023 -0500 @@ -70,7 +70,6 @@ #include "ov-fcn-handle.h" #include "ov-usr-fcn.h" #include "pager.h" -#include "parse.h" #include "pt-eval.h" #include "pt-stmt.h" #include "sighandlers.h" @@ -529,8 +528,8 @@ } // Synchronize the related gui preference for editor encoding - feval ("__event_manager_gui_preference__", - ovl ("editor/default_encoding", m_mfile_encoding)); + m_interpreter.feval ("__event_manager_gui_preference__", + ovl ("editor/default_encoding", m_mfile_encoding)); return retval; }
--- a/libinterp/corefcn/interpreter.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/interpreter.cc Thu Jan 12 10:22:04 2023 -0500 @@ -473,7 +473,7 @@ m_child_list (), m_url_handle_manager (), m_cdef_manager (*this), - m_gtk_manager (), + m_gtk_manager (*this), m_event_manager (*this), m_gh_manager (nullptr), m_interactive (false),
--- a/libinterp/corefcn/ls-mat5.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/ls-mat5.cc Thu Jan 12 10:22:04 2023 -0500 @@ -1239,7 +1239,7 @@ { try { - octave_value_list tmp = octave::feval ("loadobj", tc, 1); + octave_value_list tmp = interp.feval ("loadobj", tc, 1); tc = tmp(0); } @@ -2724,14 +2724,16 @@ octave_map m; - octave::load_path& lp = octave::__get_load_path__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::load_path& lp = interp.get_load_path (); if (tc.isobject () && lp.find_method (tc.class_name (), "saveobj") != "") { try { - octave_value_list tmp = octave::feval ("saveobj", tc, 1); + octave_value_list tmp = interp.feval ("saveobj", tc, 1); m = tmp(0).map_value (); }
--- a/libinterp/corefcn/lsode.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/lsode.cc Thu Jan 12 10:22:04 2023 -0500 @@ -37,11 +37,11 @@ #include "error.h" #include "errwarn.h" #include "interpreter-private.h" +#include "interpreter.h" #include "ovl.h" #include "ov-fcn.h" #include "ov-cell.h" #include "pager.h" -#include "parse.h" #include "pr-output.h" #include "unwind-prot.h" #include "utils.h" @@ -79,7 +79,9 @@ try { - tmp = octave::feval (lsode_fcn, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (lsode_fcn, args, 1); } catch (octave::execution_exception& ee) { @@ -119,7 +121,9 @@ try { - tmp = octave::feval (lsode_jac, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (lsode_jac, args, 1); } catch (octave::execution_exception& ee) {
--- a/libinterp/corefcn/mex.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/mex.cc Thu Jan 12 10:22:04 2023 -0500 @@ -65,7 +65,6 @@ #include "ov-mex-fcn.h" #include "ov-usr-fcn.h" #include "pager.h" -#include "parse.h" #include "unwind-prot.h" #include "utils.h" #include "variables.h" @@ -4913,7 +4912,7 @@ tw.set_lvalue_list (nullptr); - retval = octave::feval (fname, args, nargout); + retval = interp.feval (fname, args, nargout); } catch (const octave::execution_exception&) {
--- a/libinterp/corefcn/pr-output.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/pr-output.cc Thu Jan 12 10:22:04 2023 -0500 @@ -50,11 +50,11 @@ #include "defun.h" #include "error.h" #include "errwarn.h" +#include "interpreter.h" #include "ovl.h" #include "oct-stream.h" #include "octave-preserve-stream-state.h" #include "pager.h" -#include "parse.h" #include "pr-flt-fmt.h" #include "pr-output.h" #include "sysdep.h" @@ -3448,8 +3448,8 @@ %! end_unwind_protect */ -DEFUN (display, args, , - classes: cell char double function_handle int8 int16 int32 int64 logical single struct uint8 uint16 uint32 uint64 +DEFMETHOD (display, interp, args, , + classes: cell char double function_handle int8 int16 int32 int64 logical single struct uint8 uint16 uint32 uint64 doc: /* -*- texinfo -*- @deftypefn {} {} display (@var{obj}) Display the contents of the object @var{obj} prepended by its name. @@ -3521,7 +3521,7 @@ // Use feval so that dispatch will also work for disp. - feval ("disp", ovl (value)); + interp.feval ("disp", ovl (value)); if (print_newlines) octave_stdout << std::endl;
--- a/libinterp/corefcn/quad.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/quad.cc Thu Jan 12 10:22:04 2023 -0500 @@ -36,8 +36,8 @@ #include "error.h" #include "errwarn.h" #include "interpreter-private.h" +#include "interpreter.h" #include "pager.h" -#include "parse.h" #include "ov.h" #include "ovl.h" #include "unwind-prot.h" @@ -71,7 +71,9 @@ try { - tmp = feval (quad_fcn, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (quad_fcn, args, 1); } catch (execution_exception& ee) { @@ -107,7 +109,9 @@ try { - tmp = feval (quad_fcn, args, 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (quad_fcn, args, 1); } catch (execution_exception& ee) {
--- a/libinterp/corefcn/quadcc.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/quadcc.cc Thu Jan 12 10:22:04 2023 -0500 @@ -37,8 +37,8 @@ #include "defun.h" #include "error.h" #include "interpreter-private.h" +#include "interpreter.h" #include "ovl.h" -#include "parse.h" #include "utils.h" #include "variables.h" @@ -1715,7 +1715,7 @@ ex(i) = m + xi[i]*h; } fargs(0) = ex; - fvals = feval (fcn, fargs, 1); + fvals = interp.feval (fcn, fargs, 1); if (fvals.length () != 1 || ! fvals(0).is_real_matrix ()) error ("quadcc: integrand F must return a single, real-valued vector"); @@ -1825,7 +1825,7 @@ ex(i) = m + xi[(2*i + 1) * skip[d]] * h; } fargs(0) = ex; - fvals = feval (fcn, fargs, 1); + fvals = interp.feval (fcn, fargs, 1); if (fvals.length () != 1 || ! fvals(0).is_real_matrix ()) error ("quadcc: integrand F must return a single, real-valued vector"); @@ -1958,7 +1958,7 @@ ex(i) = ml + xi[(i + 1) * skip[0]] * hl; } fargs(0) = ex; - fvals = feval (fcn, fargs, 1); + fvals = interp.feval (fcn, fargs, 1); if (fvals.length () != 1 || ! fvals(0).is_real_matrix ()) error ("quadcc: integrand F must return a single, real-valued vector"); @@ -2049,7 +2049,7 @@ ex(i) = mr + xi[(i + 1) * skip[0]] * hr; } fargs(0) = ex; - fvals = feval (fcn, fargs, 1); + fvals = interp.feval (fcn, fargs, 1); if (fvals.length () != 1 || ! fvals(0).is_real_matrix ()) error ("quadcc: integrand F must return a single, real-valued vector");
--- a/libinterp/corefcn/variables.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/corefcn/variables.cc Thu Jan 12 10:22:04 2023 -0500 @@ -60,7 +60,6 @@ #include "ov-class.h" #include "ov-usr-fcn.h" #include "pager.h" -#include "parse.h" #include "pt-eval.h" #include "syminfo.h" #include "symtab.h" @@ -1430,7 +1429,7 @@ Vmissing_function_hook.clear (); // Call. - octave_value_list tmp = octave::feval (fcn_name, octave_value (name), 1); + octave_value_list tmp = interp.feval (fcn_name, octave_value (name), 1); if (tmp.length () == 1 && tmp(0).is_string ()) return tmp(0).string_value ();
--- a/libinterp/dldfcn/__init_fltk__.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/dldfcn/__init_fltk__.cc Thu Jan 12 10:22:04 2023 -0500 @@ -102,7 +102,6 @@ #include "ov-fcn-handle.h" #include "ov.h" #include "ovl.h" -#include "parse.h" #include "variables.h" OCTAVE_BEGIN_NAMESPACE(octave) @@ -1113,9 +1112,12 @@ // Window callback. static void window_close (Fl_Widget *, void *data) { + interpreter& interp = __get_interpreter__ (); + octave_value_list args; args(0) = static_cast<plot_window *> (data)->number (); - octave::feval ("close", args); + + interp.feval ("close", args); } // Button callbacks. @@ -1171,20 +1173,27 @@ octave_value_list args; if (m_fp.get_currentaxes ().ok ()) { + interpreter& interp = __get_interpreter__ (); + args(0) = m_fp.get_currentaxes ().as_octave_value (); args(1) = "auto"; - octave::feval ("axis", args); + + interp.feval ("axis", args); + mark_modified (); } } void toggle_grid (void) { + interpreter& interp = __get_interpreter__ (); + octave_value_list args; if (m_fp.get_currentaxes ().ok ()) args(0) = m_fp.get_currentaxes ().as_octave_value (); - octave::feval ("grid", args); + interp.feval ("grid", args); + mark_modified (); }
--- a/libinterp/dldfcn/__init_gnuplot__.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/dldfcn/__init_gnuplot__.cc Thu Jan 12 10:22:04 2023 -0500 @@ -51,7 +51,6 @@ #include "interpreter.h" #include "ov.h" #include "ovl.h" -#include "parse.h" #include "utils.h" #include "variables.h" @@ -140,7 +139,7 @@ octave_value_list args; args(0) = go.get_handle ().as_octave_value (); - octave::feval ("__gnuplot_drawnow__", args); + m_interpreter.feval ("__gnuplot_drawnow__", args); } } @@ -154,7 +153,7 @@ args(2) = file; args(1) = term; args(0) = go.get_handle ().as_octave_value (); - octave::feval ("__gnuplot_drawnow__", args); + m_interpreter.feval ("__gnuplot_drawnow__", args); } Matrix get_canvas_size (const graphics_handle&) const @@ -203,7 +202,7 @@ }; static bool -have_gnuplot_binary (void) +have_gnuplot_binary (interpreter& interp) { const std::string exeext = octave::build_env::EXEEXT; const std::string path = octave::sys::env::getenv ("PATH"); @@ -212,7 +211,7 @@ try { octave_value_list tmp - = octave::feval ("gnuplot_binary", octave_value_list ()); + = interp.feval ("gnuplot_binary", octave_value_list ()); if (tmp(0).is_string () && ! tmp(0).isempty ()) { @@ -237,8 +236,6 @@ } catch (const octave::execution_exception&) { - octave::interpreter& interp = octave::__get_interpreter__ (); - interp.recover_from_exception (); } @@ -253,7 +250,7 @@ Undocumented internal function. @end deftypefn */) { - if (! have_gnuplot_binary ()) + if (! have_gnuplot_binary (interp)) error ("__init_gnuplot__: the gnuplot program is not available, see 'gnuplot_binary'"); else if (! interp.mislocked ("__init_gnuplot__")) { @@ -268,13 +265,13 @@ return octave_value_list (); } -DEFUN_DLD (__have_gnuplot__, , , - doc: /* -*- texinfo -*- +DEFMETHOD_DLD (__have_gnuplot__, interp, , , + doc: /* -*- texinfo -*- @deftypefn {} {@var{gnuplot_available} =} __have_gnuplot__ () Undocumented internal function. @end deftypefn */) { - return ovl (have_gnuplot_binary ()); + return ovl (have_gnuplot_binary (interp)); } /*
--- a/libinterp/dldfcn/__ode15__.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/dldfcn/__ode15__.cc Thu Jan 12 10:22:04 2023 -0500 @@ -37,11 +37,12 @@ #include "defun-dld.h" #include "error.h" #include "errwarn.h" +#include "interpreter-private.h" +#include "interpreter.h" #include "oct-map.h" #include "ov.h" #include "ovl.h" #include "pager.h" -#include "parse.h" #if defined (HAVE_SUNDIALS) @@ -811,9 +812,11 @@ // cont is the number of steps reached by the solver // temp is the number of events registered + interpreter& interp = __get_interpreter__ (); + if (flag == "init") { - octave_value_list output = feval (event_fcn, args, 3); + octave_value_list output = interp.feval (event_fcn, args, 3); oldval = output(0).vector_value (); oldisterminal = output(1).vector_value (); olddir = output(2).vector_value (); @@ -821,7 +824,7 @@ else if (flag == "") { ColumnVector index (0); - octave_value_list output = feval (event_fcn, args, 3); + octave_value_list output = interp.feval (event_fcn, args, 3); ColumnVector val = output(0).vector_value (); ColumnVector isterminal = output(1).vector_value (); ColumnVector dir = output(2).vector_value (); @@ -994,6 +997,8 @@ else output(1) = yout; + interpreter& interp = __get_interpreter__ (); + if (flag == "init") { ColumnVector toutput (2); @@ -1001,19 +1006,19 @@ toutput(1) = tend; output(0) = toutput; - feval (output_fcn, output, 0); + interp.feval (output_fcn, output, 0); } else if (flag == "") { output(0) = tsol; - octave_value_list val = feval (output_fcn, output, 1); + octave_value_list val = interp.feval (output_fcn, output, 1); status = val(0).bool_value (); } else { // Cleanup plotter output(0) = tend; - feval (output_fcn, output, 0); + interp.feval (output_fcn, output, 0); } return status; @@ -1070,7 +1075,9 @@ try { - tmp = feval (ida_fc, ovl (t, x, xdot), 1); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (ida_fc, ovl (t, x, xdot), 1); } catch (execution_exception& ee) { @@ -1088,7 +1095,9 @@ try { - tmp = feval (ida_jc, ovl (t, x, xdot), 2); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (ida_jc, ovl (t, x, xdot), 2); } catch (execution_exception& ee) { @@ -1106,7 +1115,9 @@ try { - tmp = feval (ida_jc, ovl (t, x, xdot), 2); + interpreter& interp = __get_interpreter__ (); + + tmp = interp.feval (ida_jc, ovl (t, x, xdot), 2); } catch (execution_exception& ee) {
--- a/libinterp/dldfcn/audiodevinfo.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/dldfcn/audiodevinfo.cc Thu Jan 12 10:22:04 2023 -0500 @@ -44,11 +44,12 @@ #include "defun-dld.h" #include "error.h" #include "errwarn.h" +#include "interpreter-private.h" +#include "interpreter.h" #include "oct-map.h" #include "ov-int32.h" #include "ov.h" #include "ovl.h" -#include "parse.h" #if defined (HAVE_PORTAUDIO) # include <portaudio.h> @@ -604,9 +605,11 @@ if (! player) error ("audioplayer callback function called without player"); + interpreter& interp = __get_interpreter__ (); + octave_value_list retval - = feval (player->octave_callback_function, - ovl (static_cast<double> (frames)), 1); + = interp.feval (player->octave_callback_function, + ovl (static_cast<double> (frames)), 1); if (retval.length () < 2) error ("audioplayer callback function failed"); @@ -1441,8 +1444,10 @@ } } + interpreter& interp = __get_interpreter__ (); + octave_value_list retval - = feval (recorder->octave_callback_function, ovl (sound), 1); + = interp.feval (recorder->octave_callback_function, ovl (sound), 1); return retval(0).int_value (); }
--- a/libinterp/octave-value/cdef-method.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/octave-value/cdef-method.cc Thu Jan 12 10:22:04 2023 -0500 @@ -134,7 +134,11 @@ check_method (); if (m_function.is_defined ()) - retval = feval (m_function, args, nargout); + { + interpreter& interp = __get_interpreter__ (); + + retval = interp.feval (m_function, args, nargout); + } return retval; } @@ -166,7 +170,9 @@ for (int i = 0; i < args.length (); i++) new_args(i+1) = args(i); - retval = feval (m_function, new_args, nargout); + interpreter& interp = __get_interpreter__ (); + + retval = interp.feval (m_function, new_args, nargout); } return retval;
--- a/libinterp/octave-value/cdef-package.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/octave-value/cdef-package.cc Thu Jan 12 10:22:04 2023 -0500 @@ -41,7 +41,6 @@ #include "ov-classdef.h" #include "ov-fcn-handle.h" #include "ov-usr-fcn.h" -#include "parse.h" #include "pt-assign.h" #include "pt-classdef.h" #include "pt-idx.h" @@ -160,7 +159,9 @@ { octave_value_list tmp_args; - retval = feval (o, tmp_args, nargout); + interpreter& interp = __get_interpreter__ (); + + retval = interp.feval (o, tmp_args, nargout); } else retval(0) = o;
--- a/libinterp/octave-value/cdef-property.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/octave-value/cdef-property.cc Thu Jan 12 10:22:04 2023 -0500 @@ -41,7 +41,6 @@ #include "ov-classdef.h" #include "ov-fcn-handle.h" #include "ov-usr-fcn.h" -#include "parse.h" #include "pt-assign.h" #include "pt-classdef.h" #include "pt-eval.h" @@ -133,7 +132,9 @@ args(0) = to_ov (obj); - args = feval (get_fcn, args, 1); + interpreter& interp = __get_interpreter__ (); + + args = interp.feval (get_fcn, args, 1); retval = args(0); } @@ -207,11 +208,13 @@ args(0) = to_ov (obj); args(1) = val; + interpreter& interp = __get_interpreter__ (); + if (obj.is_handle_object ()) - feval (set_fcn, args, 0); + interp.feval (set_fcn, args, 0); else { - args = feval (set_fcn, args, 1); + args = interp.feval (set_fcn, args, 1); if (args.length () > 0 && args(0).is_defined ()) {
--- a/libinterp/octave-value/ov-class.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/octave-value/ov-class.cc Thu Jan 12 10:22:04 2023 -0500 @@ -56,7 +56,6 @@ #include "ov-typeinfo.h" #include "ov-usr-fcn.h" #include "pager.h" -#include "parse.h" #include "pr-output.h" #include "unwind-prot.h" #include "variables.h" @@ -312,7 +311,9 @@ Matrix retval (1, 2, 1.0); - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method ("size", class_name ()); @@ -321,7 +322,7 @@ count++; octave_value_list args (1, octave_value (this)); - octave_value_list lv = octave::feval (meth.function_value (), args, 1); + octave_value_list lv = interp.feval (meth.function_value (), args, 1); if (lv.length () <= 0 || ! lv(0).is_matrix_type () || ! lv(0).dims ().isvector ()) error ("@%s/size: invalid return value", class_name ().c_str ()); @@ -352,7 +353,9 @@ octave_idx_type retval = -1; const std::string cn = class_name (); - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method ("numel", cn); @@ -366,7 +369,7 @@ for (octave_idx_type i = 0; i < idx.length (); i++) args(i+1) = idx(i); - octave_value_list lv = octave::feval (meth.function_value (), args, 1); + octave_value_list lv = interp.feval (meth.function_value (), args, 1); if (lv.length () != 1 || ! lv(0).is_scalar_type ()) error ("@%s/numel: invalid return value", cn.c_str ()); @@ -447,7 +450,9 @@ } else { - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method ("subsref", class_name ()); @@ -479,7 +484,7 @@ true_nargout = xnumel (tmp); } - retval = octave::feval (meth.function_value (), args, true_nargout); + retval = interp.feval (meth.function_value (), args, true_nargout); // Since we're handling subsref, if the list has more than one // element, return it as a comma-separated list so that we can @@ -547,7 +552,9 @@ if (! (in_class_method () || called_from_builtin ())) { - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method ("subsasgn", class_name ()); @@ -589,10 +596,10 @@ octave::unwind_protect_var<int> restore_var (m_obsolete_copies); m_obsolete_copies = 2; - tmp = octave::feval (meth.function_value (), args); + tmp = interp.feval (meth.function_value (), args); } else - tmp = octave::feval (meth.function_value (), args); + tmp = interp.feval (meth.function_value (), args); // FIXME: Should the subsasgn method be able to return // more than one value? @@ -823,7 +830,9 @@ octave::idx_vector octave_class::index_vector (bool require_integers) const { - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method ("subsindex", class_name ()); @@ -834,7 +843,7 @@ octave_value_list args; args(0) = octave_value (new octave_class (m_map, c_name, m_parent_list)); - octave_value_list tmp = octave::feval (meth.function_value (), args, 1); + octave_value_list tmp = interp.feval (meth.function_value (), args, 1); if (tmp(0).isobject ()) error ("subsindex function must return a valid index vector"); @@ -871,7 +880,9 @@ { bool retval = false; - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method ("logical", class_name ()); @@ -879,7 +890,7 @@ { octave_value in = new octave_class (*this); - octave_value_list tmp = octave::feval (meth.function_value (), in, 1); + octave_value_list tmp = interp.feval (meth.function_value (), in, 1); retval = tmp(0).is_true (); } @@ -989,7 +1000,9 @@ { string_vector retval; - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method ("char", class_name ()); @@ -999,7 +1012,7 @@ octave_value_list args; args(0) = octave_value (new octave_class (m_map, c_name, m_parent_list)); - octave_value_list tmp = octave::feval (meth.function_value (), args, 1); + octave_value_list tmp = interp.feval (meth.function_value (), args, 1); if (tmp.length () >= 1) { @@ -1076,7 +1089,7 @@ try { - result = octave::feval (ctor, ovl (), 1); + result = interp.feval (ctor, ovl (), 1); } catch (const octave::execution_exception&) { @@ -1165,12 +1178,15 @@ os << "# classname: " << class_name () << "\n"; octave_map m; - octave::load_path& lp = octave::__get_load_path__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::load_path& lp = interp.get_load_path (); if (lp.find_method (class_name (), "saveobj") != "") { octave_value in = new octave_class (*this); - octave_value_list tmp = octave::feval ("saveobj", in, 1); + + octave_value_list tmp = interp.feval ("saveobj", in, 1); m = tmp(0).map_value (); } @@ -1239,12 +1255,14 @@ if (! reconstruct_parents ()) warning ("load: unable to reconstruct object inheritance"); - octave::load_path& lp = octave::__get_load_path__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::load_path& lp = interp.get_load_path (); if (lp.find_method (classname, "loadobj") != "") { octave_value in = new octave_class (*this); - octave_value_list tmp = octave::feval ("loadobj", in, 1); + octave_value_list tmp = interp.feval ("loadobj", in, 1); m_map = tmp(0).map_value (); } @@ -1270,12 +1288,14 @@ octave_map m; - octave::load_path& lp = octave::__get_load_path__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::load_path& lp = interp.get_load_path (); if (lp.find_method (class_name (), "saveobj") != "") { octave_value in = new octave_class (*this); - octave_value_list tmp = octave::feval ("saveobj", in, 1); + octave_value_list tmp = interp.feval ("saveobj", in, 1); m = tmp(0).map_value (); } @@ -1359,12 +1379,14 @@ if (! reconstruct_parents ()) warning ("load: unable to reconstruct object inheritance"); - octave::load_path& lp = octave::__get_load_path__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::load_path& lp = interp.get_load_path (); if (lp.find_method (c_name, "loadobj") != "") { octave_value in = new octave_class (*this); - octave_value_list tmp = octave::feval ("loadobj", in, 1); + octave_value_list tmp = interp.feval ("loadobj", in, 1); m_map = tmp(0).map_value (); } @@ -1398,7 +1420,9 @@ octave_map m; octave_map::iterator i; - octave::load_path& lp = octave::__get_load_path__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::load_path& lp = interp.get_load_path (); #if defined (HAVE_HDF5_18) group_hid = H5Gcreate (loc_id, name, octave_H5P_DEFAULT, octave_H5P_DEFAULT, @@ -1443,7 +1467,7 @@ if (lp.find_method (class_name (), "saveobj") != "") { octave_value in = new octave_class (*this); - octave_value_list tmp = octave::feval ("saveobj", in, 1); + octave_value_list tmp = interp.feval ("saveobj", in, 1); m = tmp(0).map_value (); } @@ -1608,12 +1632,14 @@ if (! reconstruct_parents ()) warning ("load: unable to reconstruct object inheritance"); - octave::load_path& lp = octave::__get_load_path__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::load_path& lp = interp.get_load_path (); if (lp.find_method (c_name, "loadobj") != "") { octave_value in = new octave_class (*this); - octave_value_list tmp = octave::feval ("loadobj", in, 1); + octave_value_list tmp = interp.feval ("loadobj", in, 1); m_map = tmp(0).map_value (); retval = true;
--- a/libinterp/octave-value/ov-java.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/octave-value/ov-java.cc Thu Jan 12 10:22:04 2023 -0500 @@ -63,7 +63,6 @@ #include "oct-process.h" #include "oct-shlib.h" #include "ov-java.h" -#include "parse.h" #include "variables.h" #if defined (HAVE_JAVA) @@ -2038,12 +2037,14 @@ int nargout = env->GetArrayLength (argout); int nargin = env->GetArrayLength (argin); - octave_value_list varargin, varargout; + octave_value_list varargin; for (int i = 0; i < nargin; i++) varargin(i) = box (env, env->GetObjectArrayElement (argin, i), nullptr); - varargout = octave::feval (fname, varargin, nargout); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave_value_list varargout = interp.feval (fname, varargin, nargout); jobjectArray_ref out_objs (env, argout), out_clss (env); out_objs.detach (); @@ -2074,10 +2075,12 @@ oct_args(i) = box (env, jobj, nullptr); } + octave::interpreter& interp = octave::__get_interpreter__ (); + if (val.is_function_handle ()) { octave_function *fcn = val.function_value (); - octave::feval (fcn, oct_args); + interp.feval (fcn, oct_args); } else if (val.iscell () && val.length () > 0 && (val.rows () == 1 || val.columns () == 1) @@ -2089,7 +2092,7 @@ for (int i=1; i<c.numel (); i++) oct_args(len+i-1) = c(i); - octave::feval (fcn, oct_args); + interp.feval (fcn, oct_args); } else error ("trying to invoke non-invocable object");
--- a/libinterp/octave-value/ov-oncleanup.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/octave-value/ov-oncleanup.cc Thu Jan 12 10:22:04 2023 -0500 @@ -33,7 +33,6 @@ #include "ov-oncleanup.h" #include "ov-fcn.h" #include "ov-usr-fcn.h" -#include "parse.h" #include "pt-misc.h" DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_oncleanup, "onCleanup", @@ -171,7 +170,7 @@ try { // Run the actual code. - octave::feval (the_fcn); + interp.feval (the_fcn); } catch (const octave::interrupt_exception&) {
--- a/libinterp/operators/op-class.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/operators/op-class.cc Thu Jan 12 10:22:04 2023 -0500 @@ -34,6 +34,7 @@ #include "errwarn.h" #include "interpreter-private.h" +#include "interpreter.h" #include "load-path.h" #include "ovl.h" #include "ov.h" @@ -41,7 +42,6 @@ #include "ov-typeinfo.h" #include "ops.h" #include "symtab.h" -#include "parse.h" OCTAVE_BEGIN_NAMESPACE(octave) @@ -55,15 +55,17 @@ { std::string class_name = a.class_name (); - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); octave_value meth = symtab.find_method (opname, class_name); if (meth.is_defined ()) { // Call overloaded unary class operator. - octave_value_list tmp = octave::feval (meth.function_value (), - ovl (a), 1); + octave_value_list tmp + = interp.feval (meth.function_value (), ovl (a), 1); // Return first element if present. if (tmp.length () > 0) @@ -140,7 +142,9 @@ oct_binop_default (const octave_value& a1, const octave_value& a2, const std::string& opname) { - octave::symbol_table& symtab = octave::__get_symbol_table__ (); + octave::interpreter& interp = octave::__get_interpreter__ (); + + octave::symbol_table& symtab = interp.get_symbol_table (); // Dispatch to first (leftmost) operand by default. std::string dispatch_type = a1.class_name (); @@ -157,8 +161,8 @@ error ("%s method not defined for %s class", opname.c_str (), dispatch_type.c_str ()); - octave_value_list tmp = octave::feval (meth.function_value (), - ovl (a1, a2), 1); + octave_value_list tmp + = interp.feval (meth.function_value (), ovl (a1, a2), 1); if (tmp.length () > 0) return tmp(0);
--- a/libinterp/parse-tree/pt-assign.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/parse-tree/pt-assign.cc Thu Jan 12 10:22:04 2023 -0500 @@ -30,9 +30,9 @@ #include <string> #include "error.h" +#include "interpreter.h" #include "oct-lvalue.h" #include "ov.h" -#include "parse.h" #include "pt-arg-list.h" #include "pt-assign.h" @@ -134,7 +134,10 @@ octave_value_list args = ovl (lhs_val); args.stash_name_tags (string_vector (m_lhs->name ())); - feval ("display", args); + + interpreter& interp = tw.get_interpreter (); + + interp.feval ("display", args); } } catch (index_exception& ie) @@ -339,7 +342,10 @@ octave_value_list args = ovl (lhs_val); args.stash_name_tags (string_vector (lhs_elt->name ())); - feval ("display", args); + + interpreter& interp = tw.get_interpreter (); + + interp.feval ("display", args); } }
--- a/libinterp/parse-tree/pt-eval.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/parse-tree/pt-eval.cc Thu Jan 12 10:22:04 2023 -0500 @@ -4420,7 +4420,7 @@ octave_value_list args = ovl (varval (ans)); args.stash_name_tags (string_vector (ans)); - feval ("display", args); + m_interpreter.feval ("display", args); } } }
--- a/libinterp/parse-tree/pt-id.cc Thu Jan 12 08:40:45 2023 -0500 +++ b/libinterp/parse-tree/pt-id.cc Thu Jan 12 10:22:04 2023 -0500 @@ -30,7 +30,6 @@ #include "error.h" #include "interpreter-private.h" #include "oct-lvalue.h" -#include "parse.h" #include "pt-const.h" #include "pt-id.h" #include "symscope.h" @@ -136,7 +135,10 @@ { octave_value_list args = ovl (val); args.stash_name_tags (string_vector (name ())); - feval ("display", args); + + interpreter& interp = tw.get_interpreter (); + + interp.feval ("display", args); } retval = ovl (val);