Mercurial > octave
changeset 31105:670a0d878af1
eliminate WHO arguments from interpreter-private functions
* interpreter-private.h, inpterpreter-private.cc (__get_interpreter__,
__get_dynamic_loader__, __get_error_system__, __get_gh_manager__,
__get_help_system__, __get_input_system__, __get_load_path__,
__get_load_save_system__, __get_event_manager__,
__get_output_system__, __get_type_info__, __get_symbol_table__,
__get_current_scope__, __require_current_scope__, __get_evaluator__,
__get_bp_table__, __get_child_list__, __get_cdef_manager__,
__get_display_info__, __get_gtk_manager__): Eliminate WHO argument.
Previously, it was never displayed by __get_interpreter__. And, as
pointed out by Petter Tomner in patch #10216, passing a std::string
object could have performance issues.
(__get_interpreter__): Eliminate useless call to error. Display
message to std::cerr then abort.
line wrap: on
line diff
--- a/libinterp/corefcn/cellfun.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/cellfun.cc Wed Jun 22 12:48:59 2022 -0400 @@ -86,8 +86,7 @@ { if (error_handler.is_defined ()) { - interpreter& interp - = __get_interpreter__ ("get_output_list"); + interpreter& interp = __get_interpreter__ (); es.save_exception (ee); interp.recover_from_exception ();
--- a/libinterp/corefcn/data.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/data.cc Wed Jun 22 12:48:59 2022 -0400 @@ -1680,7 +1680,7 @@ std::string cname = ov.class_name (); - symbol_table& symtab = __get_symbol_table__ ("attempt_type_conversion"); + symbol_table& symtab = __get_symbol_table__ (); octave_value fcn = symtab.find_method (dtype, cname); @@ -1746,7 +1746,7 @@ std::string dtype = get_dispatch_type (ovl); - symbol_table& symtab = __get_symbol_table__ ("do_class_concat"); + symbol_table& symtab = __get_symbol_table__ (); octave_value fcn = symtab.find_method (cattype, dtype);
--- a/libinterp/corefcn/debug.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/debug.cc Wed Jun 22 12:48:59 2022 -0400 @@ -939,7 +939,7 @@ void show_octave_dbstack (void) { - do_dbstack (octave::__get_interpreter__ ("show_octave_dbstack"), + do_dbstack (octave::__get_interpreter__ (), octave_value_list (), 0, std::cerr); }
--- a/libinterp/corefcn/defun.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/defun.cc Wed Jun 22 12:48:59 2022 -0400 @@ -54,7 +54,7 @@ void print_usage (void) { - tree_evaluator& tw = __get_evaluator__ ("print_usage"); + tree_evaluator& tw = __get_evaluator__ (); const octave_function *cur = tw.current_function (); @@ -97,7 +97,7 @@ octave_value fval (fcn); - symbol_table& symtab = __get_symbol_table__ ("install_dld_function"); + symbol_table& symtab = __get_symbol_table__ (); symtab.install_built_in_function (name, fval); } @@ -114,7 +114,7 @@ octave_value fval (fcn); - symbol_table& symtab = __get_symbol_table__ ("install_dld_function"); + symbol_table& symtab = __get_symbol_table__ (); symtab.install_built_in_function (name, fval); } @@ -130,7 +130,7 @@ octave_value fval (fcn); - symbol_table& symtab = __get_symbol_table__ ("install_mex_function"); + symbol_table& symtab = __get_symbol_table__ (); symtab.install_built_in_function (name, fval); } @@ -140,7 +140,7 @@ { dynamic_library retval; - tree_evaluator& tw = __get_evaluator__ ("get_current_shlib"); + tree_evaluator& tw = __get_evaluator__ (); octave_function *curr_fcn = tw.current_function ();
--- a/libinterp/corefcn/error.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/error.cc Wed Jun 22 12:48:59 2022 -0400 @@ -76,7 +76,7 @@ error_1 (octave::execution_exception& ee, const char *id, const char *fmt, va_list args) { - octave::error_system& es = octave::__get_error_system__ ("error_1"); + octave::error_system& es = octave::__get_error_system__ (); es.error_1 (ee, id, fmt, args); } @@ -85,7 +85,7 @@ static void error_1 (const char *id, const char *fmt, va_list args) { - octave::error_system& es = octave::__get_error_system__ ("error_1"); + octave::error_system& es = octave::__get_error_system__ (); es.error_1 (id, fmt, args); } @@ -111,7 +111,7 @@ static void vwarning (const char *id, const char *fmt, va_list args) { - octave::error_system& es = octave::__get_error_system__ ("warning"); + octave::error_system& es = octave::__get_error_system__ (); es.vwarning (id, fmt, args); } @@ -955,7 +955,7 @@ void vusage_with_id (const char *id, const char *fmt, va_list args) { - octave::error_system& es = octave::__get_error_system__ ("warning_enabled"); + octave::error_system& es = octave::__get_error_system__ (); es.vusage (id, fmt, args); } @@ -1108,7 +1108,7 @@ void vpanic (const char *fmt, va_list args) { - octave::error_system& es = octave::__get_error_system__ ("vpanic"); + octave::error_system& es = octave::__get_error_system__ (); es.vpanic (fmt, args); } @@ -1814,7 +1814,7 @@ args(1) = id; args(0) = state; - interpreter& interp = __get_interpreter__ ("set_warning_state"); + interpreter& interp = __get_interpreter__ (); return Fwarning (interp, args, 1); } @@ -1822,7 +1822,7 @@ octave_value_list set_warning_state (const octave_value_list& args) { - interpreter& interp = __get_interpreter__ ("set_warning_state"); + interpreter& interp = __get_interpreter__ (); return Fwarning (interp, args, 1); } @@ -1830,7 +1830,7 @@ int warning_enabled (const std::string& id) { - error_system& es = __get_error_system__ ("warning_enabled"); + error_system& es = __get_error_system__ (); return es.warning_enabled (id); } @@ -1838,7 +1838,7 @@ void disable_warning (const std::string& id) { - error_system& es = __get_error_system__ ("disable_warning"); + error_system& es = __get_error_system__ (); es.disable_warning (id); } @@ -2172,7 +2172,7 @@ void interpreter_try (unwind_protect& frame) { - error_system& es = __get_error_system__ ("interpreter_try"); + error_system& es = __get_error_system__ (); es.interpreter_try (frame); }
--- a/libinterp/corefcn/event-manager.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/event-manager.cc Wed Jun 22 12:48:59 2022 -0400 @@ -48,7 +48,7 @@ static int readline_event_hook (void) { - event_manager& evmgr = __get_event_manager__ ("octave_readline_hook"); + event_manager& evmgr = __get_event_manager__ (); evmgr.process_events ();
--- a/libinterp/corefcn/fcn-info.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/fcn-info.cc Wed Jun 22 12:48:59 2022 -0400 @@ -54,8 +54,7 @@ { octave_value retval; - load_path& lp - = __get_load_path__ ("fcn_info::fcn_info_rep::load_private_function"); + load_path& lp = __get_load_path__ (); std::string file_name = lp.find_private_fcn (dir_name, name); @@ -98,8 +97,7 @@ std::string dir_name; - load_path& lp - = __get_load_path__ ("fcn_info::fcn_info_rep::load_class_constructor"); + load_path& lp = __get_load_path__ (); std::string file_name = lp.find_method (name, name, dir_name, package_name); @@ -159,8 +157,7 @@ retval = load_class_constructor (); else { - cdef_manager& cdm - = __get_cdef_manager__ ("fcn_info::fcn_info_rep::load_class_method"); + cdef_manager& cdm = __get_cdef_manager__ (); retval = cdm.find_method_symbol (name, dispatch_type); @@ -168,7 +165,7 @@ { std::string dir_name; - load_path& lp = __get_load_path__ ("fcn_info::fcn_info_rep::load_class_method"); + load_path& lp = __get_load_path__ (); std::string file_name = lp.find_method (dispatch_type, name, dir_name); @@ -196,8 +193,7 @@ { // Search parent classes - symbol_table& symtab - = __get_symbol_table__ ("fcn_info::fcn_info_rep::load_class_method"); + symbol_table& symtab = __get_symbol_table__ (); const std::list<std::string>& plist = symtab.parent_classes (dispatch_type); @@ -303,7 +299,7 @@ // There's a non-builtin class in the argument list. dispatch_type = args(i).class_name (); - symbol_table& symtab = __get_symbol_table__ ("get_dispatch_type"); + symbol_table& symtab = __get_symbol_table__ (); for (int j = i+1; j < n; j++) { @@ -356,7 +352,7 @@ { symbol_scope search_scope = (scope - ? scope : __get_current_scope__("fcn_info::fcn_info_rep::find")); + ? scope : __get_current_scope__ ()); octave_value retval = xfind (search_scope, args); @@ -366,7 +362,7 @@ // the last prompt or chdir, so try updating the load path and // searching again. - load_path& lp = __get_load_path__ ("fcn_info::fcn_info_rep::find"); + load_path& lp = __get_load_path__ (); lp.update (); @@ -525,8 +521,7 @@ if (! dispatch_type.empty ()) { - load_path& lp - = __get_load_path__ ("out_of_date_check"); + load_path& lp = __get_load_path__ (); file = lp.find_method (dispatch_type, nm, dir_name, pack); @@ -536,8 +531,7 @@ std::string s_name; std::string s_pack; - symbol_table& symtab - = __get_symbol_table__ ("out_of_date_check"); + symbol_table& symtab = __get_symbol_table__ (); const std::list<std::string>& plist = symtab.parent_classes (dispatch_type); @@ -566,16 +560,14 @@ // Maybe it's an autoload? if (file.empty ()) { - tree_evaluator& tw - = __get_evaluator__ ("out_of_data_check"); + tree_evaluator& tw = __get_evaluator__ (); file = tw.lookup_autoload (nm); } if (file.empty ()) { - load_path& lp - = __get_load_path__ ("out_of_date_check"); + load_path& lp = __get_load_path__ (); file = lp.find_fcn (nm, dir_name, pack); } } @@ -648,8 +640,7 @@ // breakpoints associated with it if (clear_breakpoints) { - bp_table& bptab - = __get_bp_table__ ("out_of_date_check"); + bp_table& bptab = __get_bp_table__ (); bptab.remove_all_breakpoints_from_function (canonical_nm, true); @@ -857,7 +848,7 @@ { symbol_scope search_scope = (scope - ? scope : __get_current_scope__("fcn_info::fcn_info_rep::find")); + ? scope : __get_current_scope__ ()); octave_value retval = x_builtin_find (search_scope); @@ -867,7 +858,7 @@ // the last prompt or chdir, so try updating the load path and // searching again. - load_path& lp = __get_load_path__ ("fcn_info::fcn_info_rep::builtin_find"); + load_path& lp = __get_load_path__ (); lp.update (); @@ -1017,8 +1008,7 @@ if (! autoload_function.is_defined ()) { - tree_evaluator& tw - = __get_evaluator__ ("fcn_info::fcn_info_rep::x_builtin_find"); + tree_evaluator& tw = __get_evaluator__ (); std::string file_name = tw.lookup_autoload (name); @@ -1051,8 +1041,7 @@ { std::string dir_name; - load_path& lp - = __get_load_path__ ("fcn_info::fcn_info_rep::find_user_function"); + load_path& lp = __get_load_path__ (); std::string file_name = lp.find_fcn (name, dir_name, package_name); @@ -1079,8 +1068,7 @@ if (package.is_undefined ()) { - cdef_manager& cdm - = __get_cdef_manager__ ("fcn_info::fcn_info_rep::find_package"); + cdef_manager& cdm = __get_cdef_manager__ (); package = cdm.find_package_symbol (full_name ()); }
--- a/libinterp/corefcn/gl-render.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/gl-render.cc Wed Jun 22 12:48:59 2022 -0400 @@ -1551,8 +1551,7 @@ { #if defined (HAVE_OPENGL) - gh_manager& gh_mgr - = __get_gh_manager__ ("opengl_renderer::draw_axes_x_grid"); + gh_manager& gh_mgr = __get_gh_manager__ (); int xstate = props.get_xstate (); @@ -1748,8 +1747,7 @@ { #if defined (HAVE_OPENGL) - gh_manager& gh_mgr - = __get_gh_manager__ ("opengl_renderer::draw_axes_y_grid"); + gh_manager& gh_mgr = __get_gh_manager__ (); int ystate = props.get_ystate (); @@ -1944,8 +1942,7 @@ void opengl_renderer::draw_axes_z_grid (const axes::properties& props) { - gh_manager& gh_mgr - = __get_gh_manager__ ("opengl_renderer::draw_axes_z_grid"); + gh_manager& gh_mgr = __get_gh_manager__ (); int zstate = props.get_zstate (); @@ -2167,8 +2164,7 @@ std::list<graphics_object>& obj_list) { #if defined (HAVE_OPENGL) - gh_manager& gh_mgr - = __get_gh_manager__ ("opengl_renderer::draw_axes_all_lights"); + gh_manager& gh_mgr = __get_gh_manager__ (); Matrix children = props.get_all_children (); @@ -3771,8 +3767,7 @@ if (props.markerfacecolor_is ("auto")) { - gh_manager& gh_mgr - = __get_gh_manager__ ("opengl_renderer::draw_scatter"); + gh_manager& gh_mgr = __get_gh_manager__ (); graphics_object go = gh_mgr.get_object (props.get___myhandle__ ()); graphics_object ax = go.get_ancestor ("axes"); const axes::properties& ax_props @@ -4163,7 +4158,7 @@ { int len = hlist.numel (); - gh_manager& gh_mgr = __get_gh_manager__ ("opengl_renderer::draw"); + gh_manager& gh_mgr = __get_gh_manager__ (); for (int i = len-1; i >= 0; i--) { @@ -4664,7 +4659,7 @@ double opengl_renderer::points_to_pixels (const double val) const { - gh_manager& gh_mgr = __get_gh_manager__ ("opengl_renderer::points_to_pixels"); + gh_manager& gh_mgr = __get_gh_manager__ (); // FIXME: Does making this static cause problems if figure is moved to a // 2nd monitor with a different value for "screenpixelsperinch"?
--- a/libinterp/corefcn/gl2ps-print.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/gl2ps-print.cc Wed Jun 22 12:48:59 2022 -0400 @@ -91,7 +91,7 @@ { bool retval = false; - gh_manager& gh_mgr = __get_gh_manager__ ("gl2ps_renderer::has_alpha"); + gh_manager& gh_mgr = __get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -295,7 +295,7 @@ { bool retval = true; - gh_manager& gh_mgr = __get_gh_manager__ ("gl2ps_renderer::has_2D_axes"); + gh_manager& gh_mgr = __get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -327,7 +327,7 @@ { std::string retval; - gh_manager& gh_mgr = __get_gh_manager__ ("gl2ps_renderer::get_title"); + gh_manager& gh_mgr = __get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h);
--- a/libinterp/corefcn/graphics-toolkit.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/graphics-toolkit.cc Wed Jun 22 12:48:59 2022 -0400 @@ -36,7 +36,7 @@ void base_graphics_toolkit::update (const graphics_handle& h, int id) { - gh_manager& gh_mgr = __get_gh_manager__ ("base_graphics_toolkit::update"); + gh_manager& gh_mgr = __get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -46,8 +46,7 @@ bool base_graphics_toolkit::initialize (const graphics_handle& h) { - gh_manager& gh_mgr - = __get_gh_manager__ ("base_graphics_toolkit::initialize"); + gh_manager& gh_mgr = __get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -57,8 +56,7 @@ void base_graphics_toolkit::finalize (const graphics_handle& h) { - gh_manager& gh_mgr - = __get_gh_manager__ ("base_graphics_toolkit::finalize"); + gh_manager& gh_mgr = __get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h);
--- a/libinterp/corefcn/graphics.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/graphics.cc Wed Jun 22 12:48:59 2022 -0400 @@ -224,8 +224,7 @@ static double default_screendepth (void) { - octave::display_info& dpy_info - = octave::__get_display_info__ ("default_screendepth"); + octave::display_info& dpy_info = octave::__get_display_info__ (); return dpy_info.depth (); } @@ -235,8 +234,7 @@ { Matrix retval (1, 4); - octave::display_info& dpy_info - = octave::__get_display_info__ ("default_screensize"); + octave::display_info& dpy_info = octave::__get_display_info__ (); retval(0) = 1.0; retval(1) = 1.0; @@ -249,8 +247,7 @@ static double default_screenpixelsperinch (void) { - octave::display_info& dpy_info - = octave::__get_display_info__ ("default_screenpixelsperinch"); + octave::display_info& dpy_info = octave::__get_display_info__ (); return (dpy_info.x_dpi () + dpy_info.y_dpi ()) / 2; } @@ -538,8 +535,7 @@ static std::string default_graphics_toolkit (void) { - octave::gtk_manager& gtk_mgr - = octave::__get_gtk_manager__ ("default_graphics_toolkit"); + octave::gtk_manager& gtk_mgr = octave::__get_gtk_manager__ (); return gtk_mgr.default_toolkit (); } @@ -626,7 +622,7 @@ bool call_createfcn = true, bool notify_toolkit = true) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("make_graphics_handle"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); return gh_mgr.make_graphics_handle (go_name, parent, integer_figure_handle, call_createfcn, notify_toolkit); @@ -838,7 +834,7 @@ const caseless_str& from_units, const caseless_str& to_units) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("convert_text_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (props.get___myhandle__ ()); @@ -928,7 +924,7 @@ static Matrix screen_size_pixels (void) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("scren_size_pixels"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object obj = gh_mgr.get_object (0); @@ -943,7 +939,7 @@ { double retval = 1.0; - gh_manager& gh_mgr = octave::__get_gh_manager__ ("device_pixel_ratio"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object fig = gh_mgr.get_object (h).get_ancestor ("figure"); @@ -1008,7 +1004,7 @@ Matrix cmap (1, 3, 0.0); Matrix clim (1, 2, 0.0); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("convert_cdata"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (props.get___myhandle__ ()); graphics_object ax = go.get_ancestor ("axes"); @@ -1264,8 +1260,7 @@ // Notify graphics toolkit. if (m_id >= 0 && do_notify_toolkit) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_property::set"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m_parent); if (go) @@ -1287,8 +1282,7 @@ { const octave_value_list& l = m_listeners[mode]; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_property::run_listeners"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (int i = 0; i < l.length (); i++) gh_mgr.execute_listener (m_parent, l(i)); @@ -1789,7 +1783,7 @@ double dv = v.xdouble_value (R"(set: invalid graphics handle for property "%s")", get_name ().c_str ()); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("handle_property::do_set"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_handle gh = gh_mgr.lookup (dv); @@ -1851,8 +1845,7 @@ Matrix retval (m_children_list.size (), 1); octave_idx_type k = 0; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("children_property::do_get_children"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (0); @@ -1888,8 +1881,7 @@ void children_property::do_delete_children (bool clear, bool from_root) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("children_property::do_delete_children"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); if (from_root) { @@ -1996,8 +1988,7 @@ if (m_callback.is_defined () && ! m_callback.isempty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("callback_property::execute"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); gh_mgr.execute_callback (get_parent (), m_callback, data); } @@ -2135,7 +2126,7 @@ static void finalize_r (const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("finalize_r"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -2153,7 +2144,7 @@ static void initialize_r (const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("initialize_r"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -2247,8 +2238,7 @@ { if (! is_handle_visible ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("figure::properties::update_handlevisibility"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave_value cf = gh_mgr.get_object (0).get ("currentfigure"); @@ -2274,7 +2264,7 @@ static void update_text_pos (graphics_handle h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("update_text_pos"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -2879,7 +2869,7 @@ static bool isfigure (double val) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("isfigure"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (val); @@ -2982,7 +2972,7 @@ xset (const graphics_handle& h, const caseless_str& pname, const octave_value& val) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("xset"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -2994,7 +2984,7 @@ { if (args.length () > 0) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("xset"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -3005,7 +2995,7 @@ static octave_value xget (const graphics_handle& h, const caseless_str& pname) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("xget"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -3020,7 +3010,7 @@ double hv = ov.xdouble_value ("%s: %s must be a graphics handle", who.c_str (), pname.c_str ()); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("reparent"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_handle h = gh_mgr.lookup (hv); @@ -3069,8 +3059,7 @@ { if (h.ok ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("delete_graphics_object"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -3090,7 +3079,7 @@ static void delete_graphics_object (double val, bool from_root = false) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("delete_graphics_object"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); delete_graphics_object (gh_mgr.lookup (val), from_root || isfigure (val)); } @@ -3113,7 +3102,7 @@ { octave_value closerequestfcn = xget (h, "closerequestfcn"); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("close_figure"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); gh_mgr.execute_callback (h, closerequestfcn); } @@ -3177,7 +3166,7 @@ static void adopt (const graphics_handle& parent_h, const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("adopt"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (parent_h); @@ -3193,7 +3182,7 @@ static bool ishghandle (double val) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("ishghandle"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_handle h = gh_mgr.lookup (val); @@ -3225,7 +3214,7 @@ static void xcreatefcn (const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("xcreatefcn"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -3235,7 +3224,7 @@ static void xinitialize (const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("xinitialize"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -3267,8 +3256,7 @@ xreset_default_properties (graphics_handle h, property_list::pval_map_type factory_pval) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("xreset_default_properties"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -3431,8 +3419,7 @@ if (hp == m___myhandle__) error ("set: can not set object parent to be object itself"); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::set_parent"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_handle new_parent = gh_mgr.lookup (hp); if (! new_parent.ok ()) @@ -3481,8 +3468,7 @@ // Attempt to mark parent object as modified if it exists - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::mark_modified"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -3493,8 +3479,7 @@ void base_properties::override_defaults (base_graphics_object& obj) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::override_defaults"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -3505,8 +3490,7 @@ void base_properties::update_axis_limits (const std::string& axis_type) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::update_axis_limits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m___myhandle__); @@ -3518,8 +3502,7 @@ base_properties::update_axis_limits (const std::string& axis_type, const graphics_handle& h) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::update_axis_limits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m___myhandle__); @@ -3533,8 +3516,7 @@ if (m_contextmenu.get ().isempty ()) return; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::update_contextmenu"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m_contextmenu.get ()); @@ -3556,8 +3538,7 @@ octave::graphics_toolkit base_properties::get_toolkit (void) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::get_toolkit"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_parent ()); @@ -3572,8 +3553,7 @@ { Matrix kids = get_children (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::update_boundingbox"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (int i = 0; i < kids.numel (); i++) { @@ -3587,8 +3567,7 @@ void base_properties::update_autopos (const std::string& elem_type) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::update_autopos"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -3604,8 +3583,7 @@ // This object should not be the figure "currentobject" - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::update_handlevisibility"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go (gh_mgr.get_object (get___myhandle__ ())); @@ -3690,8 +3668,7 @@ bool traverse, std::list<graphics_object>& children_list) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_properties::get_children_of_type"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); Matrix ch = get_children (); @@ -3724,8 +3701,7 @@ if (! valid_object ()) error ("base_graphics_object::update_axis_limits: invalid graphics object"); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::update_axis_limits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -3740,8 +3716,7 @@ if (! valid_object ()) error ("base_graphics_object::update_axis_limits: invalid graphics object"); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::update_axis_limits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -3775,8 +3750,7 @@ } catch (const octave::execution_exception&) { - octave::interpreter& interp - = octave::__get_interpreter__ ("remove_all_listeners"); + octave::interpreter& interp = octave::__get_interpreter__ (); interp.recover_from_exception (); } @@ -3801,8 +3775,7 @@ } } - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::build_user_defaults_map"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -3815,8 +3788,7 @@ { if (valid_object ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::reset_default_properties"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); property_list::pval_map_type factory_pval = gh_mgr.get_object (0).get_factory_defaults_list ().find (type ())->second; @@ -3835,8 +3807,7 @@ std::string retval; octave_map m = get ().map_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::values_as_string"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_handle ()); @@ -3870,8 +3841,7 @@ if (! valid_object ()) error ("base_graphics_object::value_as_string: invalid graphics object"); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::value_as_string"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_handle ()); @@ -3902,8 +3872,7 @@ octave_scalar_map m = get ().scalar_map_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::values_as_struct"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_handle ()); @@ -3956,8 +3925,7 @@ return *this; else { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("graphics_object::get_ancestor"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); return gh_mgr.get_object (get_parent ()).get_ancestor (obj_type); } @@ -3996,8 +3964,7 @@ if (val.ok ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("root_figure::properties::set_currentfigure"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); gh_mgr.push_figure (val); } @@ -4013,8 +3980,7 @@ { bool int_fig_handle = m_integerhandle.is_on (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("figure::properties::set_integerhandle"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object this_go = gh_mgr.get_object (m___myhandle__); @@ -4146,8 +4112,7 @@ void root_figure::properties::remove_child (const graphics_handle& h, bool) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("root_figure::properties::remove_child"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); gh_mgr.pop_figure (h); @@ -4193,8 +4158,7 @@ Matrix kids = get_children (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("root_figure::properties::remove_child"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (octave_idx_type i = 0; i < kids.numel (); i++) { @@ -4236,8 +4200,7 @@ std::string nm = val.string_value (); - octave::gtk_manager& gtk_mgr - = octave::__get_gtk_manager__ ("figure::properties::set___graphics_toolkit__"); + octave::gtk_manager& gtk_mgr = octave::__get_gtk_manager__ (); octave::graphics_toolkit b = gtk_mgr.find_toolkit (nm); @@ -4258,8 +4221,7 @@ if (! get_currentaxes ().ok ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("figure::properties::adopt"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -4389,8 +4351,7 @@ { if (old_bb(2) != new_bb(2) || old_bb(3) != new_bb(3)) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("figure::properties::set_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); if (! get_resizefcn ().isempty ()) gh_mgr.post_callback (m___myhandle__, "resizefcn"); @@ -5083,7 +5044,7 @@ { graphics_handle parent_h = get_parent (); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("figure::get_default"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (parent_h); @@ -5276,8 +5237,7 @@ { Matrix pos = init_pos; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::calc_tightbox"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_parent ()); @@ -5415,8 +5375,7 @@ graphics_handle val; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::set_text_child"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (gh_mgr.lookup (v)); @@ -5644,8 +5603,7 @@ m_visible = "on"; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::set_defaults"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m_xlabel.handle_value ()); go.reset_default_properties (); @@ -5711,8 +5669,7 @@ { if (m___colormap__.get ().isempty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::get_colormap"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go (gh_mgr.get_object (get___myhandle__ ())); graphics_object go_f (go.get_ancestor ("figure")); @@ -5729,8 +5686,7 @@ { graphics_handle h = hp.handle_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::delete_text_child"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); if (h.ok ()) { @@ -5758,8 +5714,7 @@ void axes::properties::remove_child (const graphics_handle& h, bool from_root) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::remove_child"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -5795,7 +5750,7 @@ void axes::properties::adopt (const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("axes::properties::adopt"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go (gh_mgr.get_object (h)); @@ -6465,8 +6420,7 @@ if (updating_xlabel_position) return; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_xlabel_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_xlabel ()); @@ -6570,8 +6524,7 @@ if (updating_ylabel_position) return; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_ylabel_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_ylabel ()); @@ -6675,8 +6628,7 @@ if (updating_zlabel_position) return; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_zlabel_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_zlabel ()); @@ -6802,8 +6754,7 @@ if (updating_title_position) return; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_title_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_title ()); @@ -7014,8 +6965,7 @@ axes::properties::update_label_color (handle_property label, color_property col) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_label_color"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); gh_mgr.get_object (label.handle_value ()).set ("color", col.get ()); } @@ -7023,8 +6973,7 @@ void axes::properties::update_font (std::string prop) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_font"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); if (! prop.empty ()) { @@ -7068,8 +7017,7 @@ if (parent_size.isempty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::get_boundingbox"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_parent ()); @@ -7124,8 +7072,7 @@ else if (i == 3) htext = get_zlabel (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::get_extent"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); text::properties& text_props = reinterpret_cast<text::properties&> @@ -7343,8 +7290,7 @@ void axes::properties::update_units (const caseless_str& old_units) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_units"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -7456,8 +7402,7 @@ { graphics_handle parent_h = get_parent (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::get_default"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (parent_h); @@ -8410,8 +8355,7 @@ if (m_txt_renderer.ok ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::get_ticklabel_extents"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ()); @@ -8445,7 +8389,7 @@ { octave_idx_type n = kids.numel (); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("get_children_limits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); switch (limit_type) { @@ -9330,8 +9274,7 @@ { if (! is_handle_visible ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("axes::properties::update_handlevisibility"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go (gh_mgr.get_object (get___myhandle__ ())); @@ -9358,8 +9301,7 @@ void figure::properties::init_toolkit (void) { - octave::gtk_manager& gtk_mgr - = octave::__get_gtk_manager__ ("figure::properties::init_toolkit"); + octave::gtk_manager& gtk_mgr = octave::__get_gtk_manager__ (); m_toolkit = gtk_mgr.get_toolkit (); } @@ -9562,8 +9504,7 @@ if (new_units == "normalized" || old_units == "normalized") { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("text::properties::update_fontunits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go (gh_mgr.get_object (get___myhandle__ ())); @@ -9582,8 +9523,7 @@ { double dpr = device_pixel_ratio (get___myhandle__ ()); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("text::properties::update_font"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ()); @@ -9628,8 +9568,7 @@ string_vector sv = string_prop.string_vector_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("text::properties::update_text_extent"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ()); @@ -9695,8 +9634,7 @@ double fontsz = get_fontsize (); double parent_height = box_pix_height; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("text::properties::get___fontsize_points__"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go (gh_mgr.get_object (get___myhandle__ ())); @@ -9734,8 +9672,7 @@ void light::properties::update_visible (void) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("light::properties::update_visible"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get___myhandle__ ()); @@ -9752,8 +9689,7 @@ bool patch::properties::get_do_lighting (void) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("patch::properties::get_do_lighting"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get___myhandle__ ()); @@ -10410,8 +10346,7 @@ if (series_idx.isempty ()) return; - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("scatter::properties::update_color"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get___myhandle__ ()); @@ -10473,8 +10408,7 @@ bool surface::properties::get_do_lighting (void) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("surface::properties::get_do_lighting"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get___myhandle__ ()); @@ -10766,8 +10700,7 @@ void hggroup::properties::remove_child (const graphics_handle& h, bool from_root) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("hggroup::properties::remove_child"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -10784,8 +10717,7 @@ void hggroup::properties::adopt (const graphics_handle& h) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("hggroup::properties::adopt"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -10802,8 +10734,7 @@ void hggroup::properties::update_limits (void) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("hggroup::properties::update_limits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m___myhandle__); @@ -10820,8 +10751,7 @@ void hggroup::properties::update_limits (const graphics_handle& h) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("hggroup::properties::update_limits"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m___myhandle__); @@ -11041,8 +10971,7 @@ // Clear the uicontextmenu property of dependent objects if (m_beingdeleted.is ("on")) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uicontextmenu::properties::update_beingdeleted"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); std::list<graphics_handle> lst = get_dependent_obj_list (); @@ -11091,8 +11020,7 @@ { Matrix m = m_extent.get ().matrix_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uicontrol::properties::get_extent"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -11107,8 +11035,7 @@ { // FIXME: support multiline text - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uicontrol::properties::update_text_extent"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get___myhandle__ ()); @@ -11120,8 +11047,7 @@ { Matrix pos = get_position ().matrix_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uicontrol::properties::update_units"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -11137,8 +11063,7 @@ void uicontrol::properties::set_style (const octave_value& st) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uicontrol::properties::set_style"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go_parent = gh_mgr.get_object (get_parent ()); if (go_parent.valid_object () && go_parent.isa ("uibuttongroup")) @@ -11191,8 +11116,7 @@ if (parent_size.isempty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uicontrol::properties::get_boundingbox"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_parent ()); @@ -11258,8 +11182,7 @@ if (parent_size.isempty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uibuttongroup::properties::get_boundingbox"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_parent ()); @@ -11334,8 +11257,7 @@ { if (old_bb(2) != new_bb(2) || old_bb(3) != new_bb(3)) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uibuttongroup::properties::set_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); if (! get_resizefcn ().isempty ()) gh_mgr.post_callback (m___myhandle__, "resizefcn"); @@ -11371,8 +11293,7 @@ { Matrix pos = get_position ().matrix_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uibuttongroup::properties::update_units"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -11437,8 +11358,7 @@ graphics_handle val (v); if (val.ok ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uibuttongroup::properties::set_selectedobject"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go (gh_mgr.get_object (val)); @@ -11481,8 +11401,7 @@ graphics_handle current_selected = get_selectedobject (); bool has_selected = current_selected.ok (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uibuttongroup::properties::adopt"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (h); @@ -11506,8 +11425,7 @@ if (parent_size.isempty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uipanel::properties::get_boundingbox"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_parent ()); @@ -11582,8 +11500,7 @@ { if (old_bb(2) != new_bb(2) || old_bb(3) != new_bb(3)) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uipanel::properties::set_position"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); if (! get_resizefcn ().isempty ()) gh_mgr.post_callback (m___myhandle__, "resizefcn"); @@ -11620,8 +11537,7 @@ { Matrix pos = get_position ().matrix_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uipanel::properties::update_units"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -11679,8 +11595,7 @@ if (parent_size.isempty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uitable::properties::get_boundingbox"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (get_parent ()); @@ -11806,8 +11721,7 @@ { Matrix pos = get_position ().matrix_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uitable::properties::update_units"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -11896,8 +11810,7 @@ // FIXME: Is it really acceptable to just let the toolkit update the extent? Matrix m = m_extent.get ().matrix_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uitable::properties::get_extent"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (get_parent ()); @@ -11923,8 +11836,7 @@ { graphics_handle parent_h = get_parent (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("uitoolbar::get_default"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (parent_h); @@ -11951,8 +11863,7 @@ { graphics_handle parent_h = get_parent (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::get_default"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (parent_h); @@ -11962,8 +11873,7 @@ octave_value base_graphics_object::get_factory_default (const caseless_str& name) const { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("base_graphics_object::get_factory_default"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object parent_go = gh_mgr.get_object (0); @@ -11980,7 +11890,7 @@ { m_handle_map[0] = graphics_object (new root_figure ()); - octave::gtk_manager& gtk_mgr = octave::__get_gtk_manager__ ("gh_manager"); + octave::gtk_manager& gtk_mgr = octave::__get_gtk_manager__ (); // Make sure the default graphics toolkit is registered. gtk_mgr.default_toolkit (); @@ -12100,8 +12010,7 @@ void execute (void) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("callback_event::execute"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); if (m_callback.is_defined ()) gh_mgr.execute_callback (m_handle, m_callback, m_callback_data); @@ -12135,8 +12044,7 @@ { if (! m_mcode.empty ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("mcode_event::execute"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (m_handle); @@ -12203,7 +12111,7 @@ void execute (void) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("set_event::execute"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ()); @@ -12311,7 +12219,7 @@ static void xset_gcbo (const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("xset_gcbo"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (0); @@ -12450,7 +12358,7 @@ static int process_graphics_events (void) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("process_graphics_events"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); return gh_mgr.process_events (); } @@ -12747,7 +12655,7 @@ static bool is_handle_visible (const graphics_handle& h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("is_handle_visible"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); return h.ok () && gh_mgr.is_handle_visible (h); } @@ -12755,7 +12663,7 @@ static bool is_handle_visible (double val) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("is_handle_visible"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); return is_handle_visible (gh_mgr.lookup (val)); } @@ -13108,7 +13016,7 @@ { std::string retval; - gh_manager& gh_mgr = octave::__get_gh_manager__ ("get_graphics_object_type"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (val); @@ -13326,7 +13234,7 @@ if (octave::math::isnan (val)) val = args(0).xdouble_value ("__go_%s__: invalid parent", go_name.c_str ()); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("make_graphics_object"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_handle parent = gh_mgr.lookup (val); @@ -13489,7 +13397,7 @@ { Matrix kids = go.get_properties ().get_children (); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("calc_dimensions"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (octave_idx_type i = 0; i < kids.numel (); i++) { @@ -14320,7 +14228,7 @@ get_property_from_handle (double handle, const std::string& property, const std::string& fcn) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("get_property_from_handle"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ()); @@ -14336,7 +14244,7 @@ set_property_in_handle (double handle, const std::string& property, const octave_value& arg, const std::string& fcn) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("set_property_in_handle"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ()); @@ -14386,8 +14294,7 @@ caseless_str pname = c(3).string_value (); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("do_cleanup_waitfor_listener"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ()); @@ -14429,7 +14336,7 @@ caseless_str pname = args(4).string_value (); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("waitfor_listener"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::autolock guard (gh_mgr.graphics_lock ());
--- a/libinterp/corefcn/help.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/help.cc Wed Jun 22 12:48:59 2022 -0400 @@ -727,7 +727,7 @@ string_vector make_name_list (void) { - help_system& help_sys = __get_help_system__ ("make_name_list"); + help_system& help_sys = __get_help_system__ (); return help_sys.make_name_list (); }
--- a/libinterp/corefcn/input.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/input.cc Wed Jun 22 12:48:59 2022 -0400 @@ -178,8 +178,7 @@ if (pos != std::string::npos) base_name = base_name.substr (0, pos); - interpreter& interp - = __get_interpreter__ ("generate_struct_completions"); + interpreter& interp = __get_interpreter__ (); if (interp.is_variable (base_name)) { @@ -372,8 +371,7 @@ } else { - input_system& input_sys - = __get_input_system__ ("generate_completion"); + input_system& input_sys = __get_input_system__ (); command_editor::set_completion_append_character (input_sys.completion_append_char ()); @@ -391,8 +389,7 @@ { octave_quit (); - input_system& input_sys - = __get_input_system__ ("internal_input_event_hook_fcn"); + input_system& input_sys = __get_input_system__ (); input_sys.run_input_event_hooks ();
--- a/libinterp/corefcn/interpreter-private.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/interpreter-private.cc Wed Jun 22 12:48:59 2022 -0400 @@ -27,6 +27,7 @@ # include "config.h" #endif +#include <iostream> #include <list> #include <string> @@ -50,151 +51,151 @@ namespace octave { - interpreter& __get_interpreter__ (const std::string& who) + interpreter& __get_interpreter__ (void) { interpreter *interp = interpreter::the_interpreter (); if (! interp) { + std::cerr << "fatal error: octave interpreter context missing" << std::endl; abort (); - error ("%s: interpreter context missing", who.c_str ()); } return *interp; } - dynamic_loader& __get_dynamic_loader__ (const std::string& who) + dynamic_loader& __get_dynamic_loader__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_dynamic_loader (); } - error_system& __get_error_system__ (const std::string& who) + error_system& __get_error_system__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_error_system (); } - gh_manager& __get_gh_manager__ (const std::string& who) + gh_manager& __get_gh_manager__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_gh_manager (); } - help_system& __get_help_system__ (const std::string& who) + help_system& __get_help_system__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_help_system (); } - input_system& __get_input_system__ (const std::string& who) + input_system& __get_input_system__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_input_system (); } - output_system& __get_output_system__ (const std::string& who) + output_system& __get_output_system__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_output_system (); } - load_path& __get_load_path__ (const std::string& who) + load_path& __get_load_path__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_load_path (); } - load_save_system& __get_load_save_system__ (const std::string& who) + load_save_system& __get_load_save_system__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_load_save_system (); } - event_manager& __get_event_manager__ (const std::string& who) + event_manager& __get_event_manager__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_event_manager (); } - type_info& __get_type_info__ (const std::string& who) + type_info& __get_type_info__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_type_info (); } - symbol_table& __get_symbol_table__ (const std::string& who) + symbol_table& __get_symbol_table__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_symbol_table (); } - symbol_scope __get_current_scope__ (const std::string& who) + symbol_scope __get_current_scope__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_current_scope (); } - symbol_scope __require_current_scope__ (const std::string& who) + symbol_scope __require_current_scope__ (void) { - symbol_scope scope = __get_current_scope__ (who); + symbol_scope scope = __get_current_scope__ (); if (! scope) - error ("%s: symbol table scope missing", who.c_str ()); + error ("__require_current_scope__: symbol table scope missing"); return scope; } - tree_evaluator& __get_evaluator__ (const std::string& who) + tree_evaluator& __get_evaluator__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_evaluator (); } - bp_table& __get_bp_table__ (const std::string& who) + bp_table& __get_bp_table__ (void) { - tree_evaluator& tw = __get_evaluator__ (who); + tree_evaluator& tw = __get_evaluator__ (); return tw.get_bp_table (); } - child_list& __get_child_list__ (const std::string& who) + child_list& __get_child_list__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_child_list (); } - cdef_manager& __get_cdef_manager__ (const std::string& who) + cdef_manager& __get_cdef_manager__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_cdef_manager (); } - display_info& __get_display_info__ (const std::string& who) + display_info& __get_display_info__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_display_info (); } - gtk_manager& __get_gtk_manager__ (const std::string& who) + gtk_manager& __get_gtk_manager__ (void) { - interpreter& interp = __get_interpreter__ (who); + interpreter& interp = __get_interpreter__ (); return interp.get_gtk_manager (); }
--- a/libinterp/corefcn/interpreter-private.h Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/interpreter-private.h Wed Jun 22 12:48:59 2022 -0400 @@ -53,45 +53,45 @@ class tree_evaluator; class type_info; - extern OCTINTERP_API interpreter& __get_interpreter__ (const std::string& who); + extern OCTINTERP_API interpreter& __get_interpreter__ (void); - extern OCTINTERP_API dynamic_loader& __get_dynamic_loader__ (const std::string& who); + extern OCTINTERP_API dynamic_loader& __get_dynamic_loader__ (void); - extern OCTINTERP_API error_system& __get_error_system__ (const std::string& who); + extern OCTINTERP_API error_system& __get_error_system__ (void); - extern OCTINTERP_API gh_manager& __get_gh_manager__ (const std::string& who); + extern OCTINTERP_API gh_manager& __get_gh_manager__ (void); - extern OCTINTERP_API help_system& __get_help_system__ (const std::string& who); + extern OCTINTERP_API help_system& __get_help_system__ (void); - extern OCTINTERP_API input_system& __get_input_system__ (const std::string& who); + extern OCTINTERP_API input_system& __get_input_system__ (void); - extern OCTINTERP_API load_path& __get_load_path__ (const std::string& who); + extern OCTINTERP_API load_path& __get_load_path__ (void); - extern OCTINTERP_API load_save_system& __get_load_save_system__ (const std::string& who); + extern OCTINTERP_API load_save_system& __get_load_save_system__ (void); - extern OCTINTERP_API event_manager& __get_event_manager__ (const std::string& who); + extern OCTINTERP_API event_manager& __get_event_manager__ (void); - extern OCTINTERP_API output_system& __get_output_system__ (const std::string& who); + extern OCTINTERP_API output_system& __get_output_system__ (void); - extern OCTINTERP_API type_info& __get_type_info__ (const std::string& who); + extern OCTINTERP_API type_info& __get_type_info__ (void); - extern OCTINTERP_API symbol_table& __get_symbol_table__ (const std::string& who); + extern OCTINTERP_API symbol_table& __get_symbol_table__ (void); - extern OCTINTERP_API symbol_scope __get_current_scope__ (const std::string& who); + extern OCTINTERP_API symbol_scope __get_current_scope__ (void); - extern OCTINTERP_API symbol_scope __require_current_scope__ (const std::string& who); + extern OCTINTERP_API symbol_scope __require_current_scope__ (void); - extern OCTINTERP_API tree_evaluator& __get_evaluator__ (const std::string& who); + extern OCTINTERP_API tree_evaluator& __get_evaluator__ (void); - extern OCTINTERP_API bp_table& __get_bp_table__ (const std::string& who); + extern OCTINTERP_API bp_table& __get_bp_table__ (void); - extern OCTINTERP_API child_list& __get_child_list__ (const std::string& who); + extern OCTINTERP_API child_list& __get_child_list__ (void); - extern OCTINTERP_API cdef_manager& __get_cdef_manager__ (const std::string& who); + extern OCTINTERP_API cdef_manager& __get_cdef_manager__ (void); - extern OCTINTERP_API display_info& __get_display_info__ (const std::string& who); + extern OCTINTERP_API display_info& __get_display_info__ (void); - extern OCTINTERP_API gtk_manager& __get_gtk_manager__ (const std::string& who); + extern OCTINTERP_API gtk_manager& __get_gtk_manager__ (void); // Functions that could be methods in the interpreter class but maybe // shouldn't be exposed as part of the public interface.
--- a/libinterp/corefcn/interpreter.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/interpreter.cc Wed Jun 22 12:48:59 2022 -0400 @@ -349,7 +349,7 @@ bool verbose = false, bool require_file = true) { - interpreter& interp = __get_interpreter__ ("safe_source_file"); + interpreter& interp = __get_interpreter__ (); try {
--- a/libinterp/corefcn/latex-text-renderer.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/latex-text-renderer.cc Wed Jun 22 12:48:59 2022 -0400 @@ -128,7 +128,7 @@ text_renderer::string str ("", fnt, 0.0, 0.0); str.set_color (m_color); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("text_to_strlist"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); gh_manager::latex_data ldata = gh_mgr.get_latex_data (key (txt, halign)); @@ -306,8 +306,7 @@ "latex_renderer:: failed to read png data. %s", ee.message ().c_str ()); - interpreter& interp - = __get_interpreter__ ("latex_renderer::read_image"); + interpreter& interp = __get_interpreter__ (); interp.recover_from_exception (); @@ -355,7 +354,7 @@ latex_renderer::render (const std::string& txt, int halign) { // Render if it was not already done - gh_manager& gh_mgr = octave::__get_gh_manager__ ("latex_renderer::render"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); gh_manager::latex_data ldata = gh_mgr.get_latex_data (key (txt, halign));
--- a/libinterp/corefcn/load-path.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/load-path.cc Wed Jun 22 12:48:59 2022 -0400 @@ -158,7 +158,7 @@ // Look in private directory corresponding to current function (if // any). - symbol_scope scope = __get_current_scope__ ("find_private_file"); + symbol_scope scope = __get_current_scope__ (); octave_user_code *curr_code = scope ? scope.user_code () : nullptr; @@ -210,12 +210,12 @@ static void rehash_internal (void) { - load_path& lp = __get_load_path__ ("rehash_internal"); + load_path& lp = __get_load_path__ (); lp.update (); // Signal the GUI allowing updating the load path dialog - event_manager& evmgr = __get_event_manager__ ("rehash_internal"); + event_manager& evmgr = __get_event_manager__ (); evmgr.update_path_dialog (); // FIXME: maybe we should rename this variable since it is being @@ -1213,8 +1213,7 @@ if (! cfile) { // reset directory encoding - input_system& input_sys - = __get_input_system__ ("load_path::read_dir_config"); + input_system& input_sys = __get_input_system__ (); std::string enc_val = "delete"; input_sys.set_dir_encoding (dir, enc_val); @@ -1257,16 +1256,14 @@ continue; // set encoding for this directory in input system - input_system& input_sys - = __get_input_system__ ("load_path::read_dir_config"); + input_system& input_sys = __get_input_system__ (); input_sys.set_dir_encoding (dir, enc_val); return; } } // reset directory encoding - input_system& input_sys - = __get_input_system__ ("load_path::read_dir_config"); + input_system& input_sys = __get_input_system__ (); std::string enc_val = "delete"; input_sys.set_dir_encoding (dir, enc_val); @@ -1448,8 +1445,7 @@ // Skip updating if we don't know where we are, but don't // treat it as an error. - interpreter& interp - = __get_interpreter__ ("load_path::dir_info::update"); + interpreter& interp = __get_interpreter__ (); interp.recover_from_exception (); } @@ -1517,8 +1513,7 @@ // Skip updating if we don't know where we are but don't treat // it as an error. - interpreter& interp - = __get_interpreter__ ("load_path::dir_info::initialize"); + interpreter& interp = __get_interpreter__ (); interp.recover_from_exception (); } @@ -1967,8 +1962,7 @@ { if (file_info_list.empty ()) { - symbol_table& symtab - = __get_symbol_table__ ("load_path::package_info::add_to_fcn_map"); + symbol_table& symtab = __get_symbol_table__ (); if (symtab.is_built_in_function_name (base)) {
--- a/libinterp/corefcn/load-save.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/load-save.cc Wed Jun 22 12:48:59 2022 -0400 @@ -2066,8 +2066,7 @@ void dump_octave_core (void) { - octave::load_save_system& load_save_sys - = octave::__get_load_save_system__ ("dump_octave_core"); + octave::load_save_system& load_save_sys = octave::__get_load_save_system__ (); load_save_sys.dump_octave_core (); }
--- a/libinterp/corefcn/ls-hdf5.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/ls-hdf5.cc Wed Jun 22 12:48:59 2022 -0400 @@ -622,8 +622,7 @@ args(0) = std::string (iftext_tmp); - octave::interpreter& interp - = octave::__get_interpreter__ ("load_inline_fcn"); + octave::interpreter& interp = octave::__get_interpreter__ (); octave_value_list tmp = interp.feval ("inline", args, 1); @@ -672,8 +671,7 @@ std::string vname = name; - octave::type_info& type_info - = octave::__get_type_info__ ("hdf5_read_next_data_internal"); + octave::type_info& type_info = octave::__get_type_info__ (); // Allow identifiers as all digits so we can load lists saved by // earlier versions of Octave.
--- a/libinterp/corefcn/ls-mat-ascii.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/ls-mat-ascii.cc Wed Jun 22 12:48:59 2022 -0400 @@ -356,8 +356,7 @@ } catch (const octave::execution_exception&) { - octave::interpreter& interp - = octave::__get_interpreter__ ("save_mat_ascii_data"); + octave::interpreter& interp = octave::__get_interpreter__ (); interp.recover_from_exception ();
--- a/libinterp/corefcn/ls-mat5.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/ls-mat5.cc Wed Jun 22 12:48:59 2022 -0400 @@ -512,8 +512,7 @@ if (read_mat5_tag (is, swap, type, element_length, is_small_data_element)) return retval; // EOF - octave::interpreter& interp - = octave::__get_interpreter__ ("read_mat5_binary_element"); + octave::interpreter& interp = octave::__get_interpreter__ (); if (type == miCOMPRESSED) { @@ -2724,8 +2723,7 @@ octave_map m; - octave::load_path& lp - = octave::__get_load_path__ ("save_mat5_binary_element"); + octave::load_path& lp = octave::__get_load_path__ (); if (tc.isobject () && lp.find_method (tc.class_name (), "saveobj") != "")
--- a/libinterp/corefcn/ls-oct-binary.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/ls-oct-binary.cc Wed Jun 22 12:48:59 2022 -0400 @@ -113,8 +113,7 @@ { args(0) = std::string (ctmp2); - octave::interpreter& interp - = octave::__get_interpreter__ ("load_inline_fcn"); + octave::interpreter& interp = octave::__get_interpreter__ (); octave_value_list tmp_inl = interp.feval ("inline", args, 1); @@ -247,8 +246,7 @@ if (! is.read (reinterpret_cast<char *> (&tmp), 1)) error ("load: trouble reading binary file '%s'", filename.c_str ()); - octave::type_info& type_info - = octave::__get_type_info__ ("read_binary_data"); + octave::type_info& type_info = octave::__get_type_info__ (); // All cases except 255 kept for backwards compatibility switch (tmp)
--- a/libinterp/corefcn/ls-oct-text.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/ls-oct-text.cc Wed Jun 22 12:48:59 2022 -0400 @@ -270,8 +270,7 @@ { args(0) = std::string (buf); - octave::interpreter& interp - = octave::__get_interpreter__ ("load_inline_fcn"); + octave::interpreter& interp = octave::__get_interpreter__ (); octave_value_list tmp = interp.feval ("inline", args, 1); @@ -336,8 +335,7 @@ } else { - octave::type_info& type_info - = octave::__get_type_info__ ("read_text_data"); + octave::type_info& type_info = octave::__get_type_info__ (); tc = type_info.lookup_type (typ); }
--- a/libinterp/corefcn/mex.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/mex.cc Wed Jun 22 12:48:59 2022 -0400 @@ -3448,8 +3448,7 @@ { if (! m_fname) { - octave::tree_evaluator& tw - = octave::__get_evaluator__ ("mex::function_name"); + octave::tree_evaluator& tw = octave::__get_evaluator__ (); octave_function *fcn = tw.current_function (); @@ -4895,7 +4894,7 @@ { octave_value_list args = mx_to_ov_args (nargin, argin); - octave::interpreter& interp = octave::__get_interpreter__ ("mexCallMATLAB"); + octave::interpreter& interp = octave::__get_interpreter__ (); bool execution_error = false; @@ -4992,7 +4991,7 @@ { int retval = 0; - octave::interpreter& interp = octave::__get_interpreter__ ("mexEvalString"); + octave::interpreter& interp = octave::__get_interpreter__ (); int parse_status; bool execution_error = false; @@ -5021,7 +5020,7 @@ { mxArray *mx = nullptr; - octave::interpreter& interp = octave::__get_interpreter__ ("mexEvalString"); + octave::interpreter& interp = octave::__get_interpreter__ (); int parse_status; bool execution_error = false; @@ -5159,7 +5158,7 @@ octave_value val; - octave::interpreter& interp = octave::__get_interpreter__ ("mexGetVariable"); + octave::interpreter& interp = octave::__get_interpreter__ (); if (! strcmp (space, "global")) val = interp.global_varval (name); @@ -5224,7 +5223,7 @@ if (! name || name[0] == '\0') return 1; - octave::interpreter& interp = octave::__get_interpreter__ ("mexPutVariable"); + octave::interpreter& interp = octave::__get_interpreter__ (); if (! strcmp (space, "global")) { @@ -5354,7 +5353,7 @@ { const char *fname = mexFunctionName (); - octave::interpreter& interp = octave::__get_interpreter__ ("mexIsLocked"); + octave::interpreter& interp = octave::__get_interpreter__ (); retval = interp.mislocked (fname); } @@ -5376,7 +5375,7 @@ else mex_lock_count[fname]++; - octave::interpreter& interp = octave::__get_interpreter__ ("mexLock"); + octave::interpreter& interp = octave::__get_interpreter__ (); interp.mlock (); } @@ -5418,8 +5417,7 @@ if (count == 0) { - octave::interpreter& interp - = octave::__get_interpreter__ ("mexUnLock"); + octave::interpreter& interp = octave::__get_interpreter__ (); interp.munlock (fname);
--- a/libinterp/corefcn/oct-hist.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/oct-hist.cc Wed Jun 22 12:48:59 2022 -0400 @@ -142,8 +142,7 @@ { if (command_history::add (tmp)) { - event_manager& evmgr - = __get_event_manager__ ("edit_history_add_hist"); + event_manager& evmgr = __get_event_manager__ (); evmgr.append_history (tmp); }
--- a/libinterp/corefcn/oct-stream.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/oct-stream.cc Wed Jun 22 12:48:59 2022 -0400 @@ -100,7 +100,7 @@ } catch (const execution_exception&) { - interpreter& interp = __get_interpreter__ ("convert_to_valid_int"); + interpreter& interp = __get_interpreter__ (); interp.recover_from_exception (); @@ -4104,7 +4104,7 @@ base_stream::do_gets (octave_idx_type max_len, bool& err, bool strip_newline, const std::string& who) { - interpreter& interp = __get_interpreter__ ("base_stream::do_gets"); + interpreter& interp = __get_interpreter__ (); if (interp.interactive () && file_number () == 0) ::error ("%s: unable to read from stdin while running interactively", @@ -4221,7 +4221,7 @@ off_t base_stream::skipl (off_t num, bool& err, const std::string& who) { - interpreter& interp = __get_interpreter__ ("base_stream::skipl"); + interpreter& interp = __get_interpreter__ (); if (interp.interactive () && file_number () == 0) ::error ("%s: unable to read from stdin while running interactively", @@ -4716,7 +4716,7 @@ octave_idx_type& conversion_count, const std::string& who) { - interpreter& interp = __get_interpreter__ ("base_stream::do_scanf"); + interpreter& interp = __get_interpreter__ (); if (interp.interactive () && file_number () == 0) ::error ("%s: unable to read from stdin while running interactively", @@ -5343,7 +5343,7 @@ // FIXME: is this the right thing to do? - interpreter& interp = __get_interpreter__ ("base_stream::do_oscanf"); + interpreter& interp = __get_interpreter__ (); if (interp.interactive () && ! application::forced_interactive () && name () == "stdin") @@ -5438,7 +5438,7 @@ const std::string& who, octave_idx_type& read_count) { - interpreter& interp = __get_interpreter__ ("base_stream::do_textscan"); + interpreter& interp = __get_interpreter__ (); if (interp.interactive () && file_number () == 0) ::error ("%s: unable to read from stdin while running interactively",
--- a/libinterp/corefcn/pager.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/pager.cc Wed Jun 22 12:48:59 2022 -0400 @@ -127,7 +127,7 @@ int pager_buf::sync (void) { - output_system& output_sys = __get_output_system__ ("pager_buf::sync"); + output_system& output_sys = __get_output_system__ (); char *buf = pbase (); @@ -164,7 +164,7 @@ int diary_buf::sync (void) { - output_system& output_sys = __get_output_system__ ("__stdout__"); + output_system& output_sys = __get_output_system__ (); std::ofstream& external_diary_file = output_sys.external_diary_file (); @@ -259,7 +259,7 @@ void flush_stdout (void) { - output_system& output_sys = __get_output_system__ ("flush_stdout"); + output_system& output_sys = __get_output_system__ (); output_sys.flush_stdout (); } @@ -491,14 +491,14 @@ std::ostream& __stdout__ (void) { - output_system& output_sys = __get_output_system__ ("__stdout__"); + output_system& output_sys = __get_output_system__ (); return output_sys.__stdout__ (); } std::ostream& __diary__ (void) { - output_system& output_sys = __get_output_system__ ("__diary__"); + output_system& output_sys = __get_output_system__ (); return output_sys.__diary__ (); }
--- a/libinterp/corefcn/sighandlers.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/sighandlers.cc Wed Jun 22 12:48:59 2022 -0400 @@ -93,8 +93,7 @@ if (save_vars) { - load_save_system& load_save_sys - = __get_load_save_system__ ("my_friendly_exit"); + load_save_system& load_save_sys = __get_load_save_system__ (); load_save_sys.dump_octave_core (); } @@ -191,7 +190,7 @@ static const bool have_sigusr2 = octave_get_sig_number ("SIGUSR2", &sigusr2); - child_list& kids = __get_child_list__ ("respond_to_pending_signals"); + child_list& kids = __get_child_list__ (); for (int sig = 0; sig < octave_num_signals (); sig++) {
--- a/libinterp/corefcn/sysdep.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/sysdep.cc Wed Jun 22 12:48:59 2022 -0400 @@ -551,7 +551,7 @@ int tty_fd = STDIN_FILENO; if (! octave_isatty_wrapper (tty_fd)) { - interpreter& interp = __get_interpreter__ ("raw_mode"); + interpreter& interp = __get_interpreter__ (); if (interp.interactive () && ! application::forced_interactive ()) error ("stdin is not a tty!");
--- a/libinterp/corefcn/toplev.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/toplev.cc Wed Jun 22 12:48:59 2022 -0400 @@ -113,8 +113,7 @@ iprocstream *cmd = new iprocstream (cmd_str.c_str ()); frame.add_delete (cmd); - child_list& kids - = __get_child_list__ ("run_command_and_return_output"); + child_list& kids = __get_child_list__ (); frame.add (&child_list::remove, kids, cmd->pid ()); if (! *cmd)
--- a/libinterp/corefcn/utils.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/utils.cc Wed Jun 22 12:48:59 2022 -0400 @@ -693,7 +693,7 @@ if (! suffix.empty ()) nm.append (suffix); - load_path& lp = __get_load_path__ ("file_in_path"); + load_path& lp = __get_load_path__ (); return sys::env::make_absolute (lp.find_file (nm)); } @@ -717,7 +717,7 @@ if (! local_file_ok) { - load_path& lp = __get_load_path__ ("find_data_file_in_load_path"); + load_path& lp = __get_load_path__ (); // Not directly found; search load path. std::string tmp = sys::env::make_absolute (lp.find_file (fname)); @@ -754,7 +754,7 @@ } else if (len > 2 && name[len - 2] == '.' && name[len - 1] == 'm') { - load_path& lp = __get_load_path__ ("fcn_file_in_path"); + load_path& lp = __get_load_path__ (); retval = lp.find_fcn_file (name.substr (0, len-2)); } @@ -765,7 +765,7 @@ if (pos != std::string::npos) fname = name.substr (0, pos); - load_path& lp = __get_load_path__ ("fcn_file_in_path"); + load_path& lp = __get_load_path__ (); retval = lp.find_fcn_file (fname); } @@ -783,7 +783,7 @@ if (! dir.empty ()) { - load_path& lp = __get_load_path__ ("contents_file_in_path"); + load_path& lp = __get_load_path__ (); std::string tcontents = sys::file_ops::concat (lp.find_dir (dir), "Contents.m"); @@ -1535,7 +1535,7 @@ // Allow free access to graphics resources while the interpreter thread // is asleep - gh_manager& gh_mgr = __get_gh_manager__ ("sleep"); + gh_manager& gh_mgr = __get_gh_manager__ (); if (do_graphics_events) gh_mgr.unlock ();
--- a/libinterp/corefcn/variables.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/corefcn/variables.cc Wed Jun 22 12:48:59 2022 -0400 @@ -81,8 +81,7 @@ if (! fcn_name.empty ()) { - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("is_valid_function"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value val = symtab.find_function (fcn_name); @@ -328,7 +327,7 @@ int symbol_exist (const std::string& name, const std::string& type) { - octave::interpreter& interp = octave::__get_interpreter__ ("symbol_exist"); + octave::interpreter& interp = octave::__get_interpreter__ (); return octave::symbol_exist (interp, name, type); } @@ -352,8 +351,7 @@ if (nm.substr (0, 2) == "__") nm.append ("__"); - octave::interpreter& interp - = octave::__get_interpreter__ ("unique_symbol_name"); + octave::interpreter& interp = octave::__get_interpreter__ (); while (symbol_exist (interp, nm, "any")) nm.insert (pos++, 1, alpha[GET_IDX (len)]); @@ -562,8 +560,7 @@ static octave::unwind_protect * curr_fcn_unwind_protect_frame (void) { - octave::tree_evaluator& tw - = octave::__get_evaluator__ ("curr_fcn_unwind_protect_frame"); + octave::tree_evaluator& tw = octave::__get_evaluator__ (); return tw.curr_fcn_unwind_protect_frame (); } @@ -1412,8 +1409,7 @@ std::string maybe_missing_function_hook (const std::string& name) { - octave::interpreter& interp - = octave::__get_interpreter__ ("maybe_missing_function_hook"); + octave::interpreter& interp = octave::__get_interpreter__ (); // Don't do this if we're handling errors. if (Vmissing_function_hook.empty ())
--- a/libinterp/dldfcn/__init_fltk__.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/dldfcn/__init_fltk__.cc Wed Jun 22 12:48:59 2022 -0400 @@ -159,14 +159,14 @@ void print (const std::string& cmd, const std::string& term) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("OpenGL_fltk::print"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); octave::gl2ps_print (m_glfcns, gh_mgr.get_object (m_number), cmd, term); } uint8NDArray get_pixels (void) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("OpenGL_fltk::get_pixels"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); m_renderer.draw (gh_mgr.get_object (m_number)); @@ -230,7 +230,7 @@ m_glfcns.glViewport (0, 0, w (), h ()); } - gh_manager& gh_mgr = octave::__get_gh_manager__ ("OpenGL_fltk::draw"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); m_renderer.draw (gh_mgr.get_object (m_number)); @@ -411,8 +411,7 @@ for (octave_idx_type ii = 0; ii < uimenu_childs.numel (); ii++) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("fltk_uimenu::do_find_uimenu_children"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object kidgo = gh_mgr.get_object (uimenu_childs (ii)); @@ -641,7 +640,7 @@ update_visible (uimenup); update_seperator (uimenup); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("fltk_uimenu::add_to_menu"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (octave_idx_type ii = 0; ii < len; ii++) { @@ -687,7 +686,7 @@ m_menubar->clear (); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("fltk_uimenu::add_to_menu"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (octave_idx_type ii = 0; ii < len; ii++) { @@ -733,7 +732,7 @@ kids = find_uimenu_children (prop); int len = kids.numel (); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("fltk_uimenu::remove_from_menu"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (octave_idx_type ii = 0; ii < len; ii++) { @@ -935,7 +934,7 @@ void uimenu_update (const graphics_handle& gh, int id) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("plot_window::uimenu_update"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object uimenu_obj = gh_mgr.get_object (gh); @@ -1155,8 +1154,7 @@ graphics_handle gh = m_fp.get_currentaxes (); if (gh.ok ()) { - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("plot_window::set_on_ax_obj"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object go = gh_mgr.get_object (gh); @@ -1193,7 +1191,7 @@ void pixel2pos (const graphics_handle& ax, int px, int py, double& xx, double& yy) const { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("plot_window::pixel2pos"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); pixel2pos (gh_mgr.get_object (ax), px, py, xx, yy); } @@ -1216,7 +1214,7 @@ Matrix kids = m_fp.get_children (); int len = kids.numel (); - gh_manager& gh_mgr = octave::__get_gh_manager__ ("plot_window::pixel2axes_or_ca"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); for (int k = 0; k < len; k++) { @@ -1244,7 +1242,7 @@ void pixel2status (const graphics_handle& ax, int px0, int py0, int px1 = -1, int py1 = -1) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("plot_window::pixel2status"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); pixel2status (gh_mgr.get_object (ax), px0, py0, px1, py1); } @@ -1292,8 +1290,7 @@ Matrix pos = m_fp.map_from_boundingbox (px, py); m_fp.set_currentpoint (pos); - gh_manager& gh_mgr - = octave::__get_gh_manager__ ("plot_window::set_currentpoint"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object robj = gh_mgr.get_object (m_fp.get_parent ()); @@ -1513,7 +1510,7 @@ // See Event Propagation http://www.fltk.org/doc-1.3/events.html static bool key_resent_detected = false; - gh_manager& gh_mgr = octave::__get_gh_manager__ ("plot_window::handle"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); switch (event) { @@ -2236,7 +2233,7 @@ static int hnd2idx (double h) { - gh_manager& gh_mgr = octave::__get_gh_manager__ ("figure_manager::hnd2idx"); + gh_manager& gh_mgr = octave::__get_gh_manager__ (); graphics_object fobj = gh_mgr.get_object (h);
--- a/libinterp/dldfcn/__init_gnuplot__.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/dldfcn/__init_gnuplot__.cc Wed Jun 22 12:48:59 2022 -0400 @@ -237,8 +237,7 @@ } catch (const octave::execution_exception&) { - octave::interpreter& interp - = octave::__get_interpreter__ ("have_gnuplot_binary"); + octave::interpreter& interp = octave::__get_interpreter__ (); interp.recover_from_exception (); }
--- a/libinterp/octave-value/cdef-class.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/cdef-class.cc Wed Jun 22 12:48:59 2022 -0400 @@ -634,8 +634,7 @@ void cdef_class::cdef_class_rep::meta_release (void) { - cdef_manager& cdm - = __get_cdef_manager__ ("cdef_class::cdef_class_rep::meta_release"); + cdef_manager& cdm = __get_cdef_manager__ (); cdm.unregister_class (wrap ()); } @@ -745,8 +744,7 @@ static cdef_object empty_class; - cdef_manager& cdm - = __get_cdef_manager__ ("cdef_class::cdef_class_rep::construct_object"); + cdef_manager& cdm = __get_cdef_manager__ (); if (this_cls == cdm.meta_class ()) { @@ -892,7 +890,7 @@ } } - cdef_manager& cdm = __get_cdef_manager__ ("cdef_class::make_meta_class"); + cdef_manager& cdm = __get_cdef_manager__ (); retval = cdm.make_class (full_class_name, slist);
--- a/libinterp/octave-value/cdef-method.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/cdef-method.cc Wed Jun 22 12:48:59 2022 -0400 @@ -74,8 +74,7 @@ { if (is_dummy_method (m_function)) { - load_path& lp - = __get_load_path__ ("cdef_method::cdef_method_rep::check_method"); + load_path& lp = __get_load_path__ (); std::string name = get_name (); std::string cls_name = m_dispatch_type;
--- a/libinterp/octave-value/cdef-object.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/cdef-object.cc Wed Jun 22 12:48:59 2022 -0400 @@ -68,7 +68,7 @@ frame.protect_var (quit_allowed); quit_allowed = false; - interpreter& interp = __get_interpreter__ ("cdef_object_rep::release"); + interpreter& interp = __get_interpreter__ (); interpreter_try (frame);
--- a/libinterp/octave-value/cdef-package.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/cdef-package.cc Wed Jun 22 12:48:59 2022 -0400 @@ -114,8 +114,7 @@ { std::string symbol_name = get_name () + '.' + nm; - interpreter& interp - = __get_interpreter__ ("cdef_package::cdef_package_rep::find"); + interpreter& interp = __get_interpreter__ (); return interp.find (symbol_name); } @@ -194,8 +193,7 @@ // match the one already referenced by those classes or // sub-packages. - cdef_manager& cdm - = __get_cdef_manager__ ("cdef_package::cdef_package_rep::meta_release"); + cdef_manager& cdm = __get_cdef_manager__ (); // Don't delete the "meta" package. if (this != cdm.meta ().get_rep ())
--- a/libinterp/octave-value/cdef-property.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/cdef-property.cc Wed Jun 22 12:48:59 2022 -0400 @@ -55,7 +55,7 @@ static bool is_method_executing (const octave_value& ov, const cdef_object& obj) { - tree_evaluator& tw = __get_evaluator__ ("is_method_executing"); + tree_evaluator& tw = __get_evaluator__ (); octave_function *stack_fcn = tw.current_function ();
--- a/libinterp/octave-value/cdef-utils.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/cdef-utils.cc Wed Jun 22 12:48:59 2022 -0400 @@ -80,7 +80,7 @@ lookup_class (const std::string& name, bool error_if_not_found, bool load_if_not_found) { - cdef_manager& cdm = __get_cdef_manager__ ("lookup_class"); + cdef_manager& cdm = __get_cdef_manager__ (); return cdm.find_class (name, error_if_not_found, load_if_not_found); } @@ -238,7 +238,7 @@ lookup_package (const std::string& name, bool error_if_not_found, bool load_if_not_found) { - cdef_manager& cdm = __get_cdef_manager__ ("lookup_package"); + cdef_manager& cdm = __get_cdef_manager__ (); return cdm.find_package (name, error_if_not_found, load_if_not_found); } @@ -257,7 +257,7 @@ // methods will use the dispatch class of the class in which they // are defined instead of the class in which they are executing. - tree_evaluator& tw = __get_evaluator__ ("get_class_context"); + tree_evaluator& tw = __get_evaluator__ (); std::string dispatch_class = tw.get_dispatch_class ();
--- a/libinterp/octave-value/ov-base.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-base.cc Wed Jun 22 12:48:59 2022 -0400 @@ -1238,8 +1238,7 @@ int t_lhs = type_id (); int t_rhs = rhs.type_id (); - octave::type_info& ti - = octave::__get_type_info__ ("octave_base_value::numeric_assign"); + 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); @@ -1517,8 +1516,7 @@ bool called_from_builtin (void) { - octave::tree_evaluator& tw - = octave::__get_evaluator__ ("called_from_builtin"); + octave::tree_evaluator& tw = octave::__get_evaluator__ (); octave_function *fcn = tw.caller_function ();
--- a/libinterp/octave-value/ov-base.h Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-base.h Wed Jun 22 12:48:59 2022 -0400 @@ -51,9 +51,11 @@ // FIXME: This is not ideal, but it avoids including // interpreter-private.h here and bringing in a lot of unnecessary - // symbols that require even more header files. + // symbols that require even more header files. Since the typeinfo + // object is required to load a user-defined octave_value object, + // maybe this function should be declared in a public header file? - extern OCTINTERP_API type_info& __get_type_info__ (const std::string&); + extern OCTINTERP_API type_info& __get_type_info__ (void); } class Cell; @@ -205,8 +207,7 @@ tspec const std::string t::c_name (c); \ tspec void t::register_type (void) \ { \ - octave::type_info& type_info \ - = octave::__get_type_info__ (#t "::register_type"); \ + octave::type_info& type_info = octave::__get_type_info__ (); \ \ register_type (type_info); \ } \
--- a/libinterp/octave-value/ov-class.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-class.cc Wed Jun 22 12:48:59 2022 -0400 @@ -200,7 +200,7 @@ } } - octave::symbol_table& symtab = octave::__get_symbol_table__ ("octave_class"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); symtab.add_to_parent_map (id, m_parent_list); } @@ -231,8 +231,7 @@ if (nparents () > 0) { - octave::tree_evaluator& tw - = octave::__get_evaluator__ ("octave_class::get_current_method_class"); + octave::tree_evaluator& tw = octave::__get_evaluator__ (); octave_function *fcn = tw.current_function (); @@ -313,8 +312,7 @@ Matrix retval (1, 2, 1.0); - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("octave_class::size"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value meth = symtab.find_method ("size", class_name ()); @@ -354,8 +352,7 @@ octave_idx_type retval = -1; const std::string cn = class_name (); - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("octave_class::numel"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value meth = symtab.find_method ("numel", cn); @@ -450,8 +447,7 @@ } else { - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("octave_class::subsref"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value meth = symtab.find_method ("subsref", class_name ()); @@ -551,8 +547,7 @@ if (! (in_class_method () || called_from_builtin ())) { - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("octave_class::subsasgn_common"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value meth = symtab.find_method ("subsasgn", class_name ()); @@ -828,8 +823,7 @@ octave::idx_vector octave_class::index_vector (bool require_integers) const { - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("octave_class::index_vector"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value meth = symtab.find_method ("subsindex", class_name ()); @@ -877,8 +871,7 @@ { bool retval = false; - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("octave_class::is_true"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value meth = symtab.find_method ("logical", class_name ()); @@ -996,8 +989,7 @@ { string_vector retval; - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("octave_class::string_vector_value"); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); octave_value meth = symtab.find_method ("char", class_name ()); @@ -1049,8 +1041,7 @@ retval = true; else { - octave::interpreter& interp - = octave::__get_interpreter__ ("octave_class::reconstruct_exemplar"); + octave::interpreter& interp = octave::__get_interpreter__ (); octave::symbol_table& symtab = interp.get_symbol_table (); @@ -1174,7 +1165,7 @@ os << "# classname: " << class_name () << "\n"; octave_map m; - octave::load_path& lp = octave::__get_load_path__ ("octave_class::save_ascii"); + octave::load_path& lp = octave::__get_load_path__ (); if (lp.find_method (class_name (), "saveobj") != "") { @@ -1248,7 +1239,7 @@ if (! reconstruct_parents ()) warning ("load: unable to reconstruct object inheritance"); - octave::load_path& lp = octave::__get_load_path__ ("octave_class::load_ascii"); + octave::load_path& lp = octave::__get_load_path__ (); if (lp.find_method (classname, "loadobj") != "") { @@ -1279,7 +1270,7 @@ octave_map m; - octave::load_path& lp = octave::__get_load_path__ ("octave_class::save_binary"); + octave::load_path& lp = octave::__get_load_path__ (); if (lp.find_method (class_name (), "saveobj") != "") { @@ -1368,7 +1359,7 @@ if (! reconstruct_parents ()) warning ("load: unable to reconstruct object inheritance"); - octave::load_path& lp = octave::__get_load_path__ ("octave_class::load_binary"); + octave::load_path& lp = octave::__get_load_path__ (); if (lp.find_method (c_name, "loadobj") != "") { @@ -1407,7 +1398,7 @@ octave_map m; octave_map::iterator i; - octave::load_path& lp = octave::__get_load_path__ ("octave_class::save_hdf5"); + octave::load_path& lp = octave::__get_load_path__ (); #if defined (HAVE_HDF5_18) group_hid = H5Gcreate (loc_id, name, octave_H5P_DEFAULT, octave_H5P_DEFAULT, @@ -1617,7 +1608,7 @@ if (! reconstruct_parents ()) warning ("load: unable to reconstruct object inheritance"); - octave::load_path& lp = octave::__get_load_path__ ("octave_class::load_hdf5"); + octave::load_path& lp = octave::__get_load_path__ (); if (lp.find_method (c_name, "loadobj") != "") { @@ -1655,8 +1646,7 @@ bool octave_class::in_class_method (void) { - octave::tree_evaluator& tw - = octave::__get_evaluator__ ("octave_class::in_class_method"); + octave::tree_evaluator& tw = octave::__get_evaluator__ (); octave_function *fcn = tw.current_function ();
--- a/libinterp/octave-value/ov-classdef.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-classdef.cc Wed Jun 22 12:48:59 2022 -0400 @@ -255,7 +255,7 @@ // Temporarily set lvalue list of current statement to NULL, to avoid // using that list for the execution of the method "numel" - octave::interpreter& interp = octave::__get_interpreter__ ("octave_classdef::xnumel"); + octave::interpreter& interp = octave::__get_interpreter__ (); octave::tree_evaluator& tw = interp.get_evaluator(); octave::unwind_action act ([&tw] (const std::list<octave::octave_lvalue> *lvl)
--- a/libinterp/octave-value/ov-dld-fcn.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-dld-fcn.cc Wed Jun 22 12:48:59 2022 -0400 @@ -85,8 +85,7 @@ octave_dld_function::~octave_dld_function (void) { - octave::dynamic_loader& dyn_loader - = octave::__get_dynamic_loader__ ("~octave_dld_function"); + octave::dynamic_loader& dyn_loader = octave::__get_dynamic_loader__ (); dyn_loader.remove_oct (m_name, m_sh_lib); }
--- a/libinterp/octave-value/ov-fcn-handle.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-fcn-handle.cc Wed Jun 22 12:48:59 2022 -0400 @@ -520,8 +520,7 @@ if (m_fcn.is_defined ()) return m_fcn.function_value (); - symbol_table& symtab - = __get_symbol_table__ ("class_simple_fcn_handle::function_value"); + symbol_table& symtab = __get_symbol_table__ (); // FIXME: is caching the correct thing to do? // Cache this value so that the pointer will be valid as long as the @@ -917,7 +916,7 @@ octave_value_list internal_fcn_handle::call (int nargout, const octave_value_list& args) { - interpreter& interp = __get_interpreter__ ("internal_fcn_handle::call"); + interpreter& interp = __get_interpreter__ (); return interp.feval (m_fcn, args, nargout); } @@ -950,7 +949,7 @@ // it is a classdef meta object, then build TYPE and IDX arguments and // make a subsref call using them. - interpreter& interp = __get_interpreter__ ("simple_fcn_handle::call"); + interpreter& interp = __get_interpreter__ (); octave_value fcn_to_call; @@ -1137,8 +1136,7 @@ if (m_fcn.is_defined ()) return m_fcn.function_value (); - symbol_table& symtab - = __get_symbol_table__ ("simple_fcn_handle::function_value"); + symbol_table& symtab = __get_symbol_table__ (); // FIXME: is caching the correct thing to do? // Cache this value so that the pointer will be valid as long as the @@ -1157,8 +1155,7 @@ if (m_fcn.is_defined ()) return m_fcn.user_function_value (); - symbol_table& symtab - = __get_symbol_table__ ("simple_fcn_handle::user_function_value"); + symbol_table& symtab = __get_symbol_table__ (); // FIXME: is caching the correct thing to do? // Cache this value so that the pointer will be valid as long as the @@ -1174,8 +1171,7 @@ if (m_fcn.is_defined ()) return m_fcn; - symbol_table& symtab - = __get_symbol_table__ ("simple_fcn_handle::user_function_value"); + symbol_table& symtab = __get_symbol_table__ (); // FIXME: is caching the correct thing to do? // Cache this value so that the pointer will be valid as long as the @@ -1465,7 +1461,7 @@ { // FIXME: we aren't really using the scope yet. Hmm. - interpreter& interp = __get_interpreter__ ("simple_fcn_handle::call"); + interpreter& interp = __get_interpreter__ (); if (! m_fcn.is_defined ()) { @@ -1642,8 +1638,7 @@ // It is not an error if this fails. We can report later that the // handle is invalid. - symbol_table& symtab - = __get_symbol_table__ ("scoped_fcn_handle::find_function"); + symbol_table& symtab = __get_symbol_table__ (); if (m_parentage.size () == 1) { @@ -1821,7 +1816,7 @@ octave_value_list nested_fcn_handle::call (int nargout, const octave_value_list& args) { - tree_evaluator& tw = __get_evaluator__ ("nested_fcn_handle::call"); + tree_evaluator& tw = __get_evaluator__ (); octave_user_function *oct_usr_fcn = m_fcn.user_function_value (); @@ -1849,7 +1844,7 @@ octave_value_list weak_nested_fcn_handle::call (int nargout, const octave_value_list& args) { - tree_evaluator& tw = __get_evaluator__ ("weak_nested_fcn_handle::call"); + tree_evaluator& tw = __get_evaluator__ (); octave_user_function *oct_usr_fcn = m_fcn.user_function_value (); @@ -1903,7 +1898,7 @@ octave_value_list class_simple_fcn_handle::call (int nargout, const octave_value_list& args) { - interpreter& interp = __get_interpreter__ ("class_simple_fcn_handle::call"); + interpreter& interp = __get_interpreter__ (); if (m_obj.is_defined ()) { @@ -2122,8 +2117,7 @@ // Set up temporary scope to use for evaluating the text that // defines the anonymous function. - interpreter& interp - = __get_interpreter__ ("base_anonymous_fcn_handle::load_ascii"); + interpreter& interp = __get_interpreter__ (); tree_evaluator& tw = interp.get_evaluator (); @@ -2239,8 +2233,7 @@ // Set up temporary scope to use for evaluating the text that // defines the anonymous function. - interpreter& interp - = __get_interpreter__ ("base_anonymous_fcn_handle::load_binary"); + interpreter& interp = __get_interpreter__ (); tree_evaluator& tw = interp.get_evaluator (); @@ -2555,8 +2548,7 @@ // Set up temporary scope to use for evaluating the text that // defines the anonymous function. - interpreter& interp - = __get_interpreter__ ("base_anonymous_fcn_handle::load_hdf5"); + interpreter& interp = __get_interpreter__ (); tree_evaluator& tw = interp.get_evaluator (); @@ -2654,8 +2646,7 @@ // values to the object returned by eval_string? This code is also is // duplicated in read_mat5_binary_element in ls-mat5.cc. - interpreter& interp - = __get_interpreter__ ("base_anonymous_fcn_handle::parse"); + interpreter& interp = __get_interpreter__ (); // Set up temporary scope to use for evaluating the text that defines // the anonymous function so that we don't pick up values of random @@ -2712,7 +2703,7 @@ octave_value_list anonymous_fcn_handle::call (int nargout, const octave_value_list& args) { - tree_evaluator& tw = __get_evaluator__ ("anonymous_fcn_handle::call"); + tree_evaluator& tw = __get_evaluator__ (); octave_user_function *oct_usr_fcn = m_fcn.user_function_value (); @@ -2764,7 +2755,7 @@ octave_value_list weak_anonymous_fcn_handle::call (int nargout, const octave_value_list& args) { - tree_evaluator& tw = __get_evaluator__ ("anonymous_fcn_handle::call"); + tree_evaluator& tw = __get_evaluator__ (); octave_user_function *oct_usr_fcn = m_fcn.user_function_value ();
--- a/libinterp/octave-value/ov-java.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-java.cc Wed Jun 22 12:48:59 2022 -0400 @@ -2097,8 +2097,7 @@ JNIEXPORT void JNICALL Java_org_octave_Octave_doEvalString (JNIEnv *env, jclass, jstring cmd) { - octave::interpreter& interp - = octave::__get_interpreter__ ("Java_org_octave_Octave_doEvalString"); + octave::interpreter& interp = octave::__get_interpreter__ (); std::string s = jstring_to_string (env, cmd); int pstatus;
--- a/libinterp/octave-value/ov-mex-fcn.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-mex-fcn.cc Wed Jun 22 12:48:59 2022 -0400 @@ -73,8 +73,7 @@ if (m_exit_fcn_ptr) (*m_exit_fcn_ptr) (); - octave::dynamic_loader& dyn_loader - = octave::__get_dynamic_loader__ ("~octave_mex_function"); + octave::dynamic_loader& dyn_loader = octave::__get_dynamic_loader__ (); dyn_loader.remove_mex (m_name, m_sh_lib); }
--- a/libinterp/octave-value/ov-oncleanup.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-oncleanup.cc Wed Jun 22 12:48:59 2022 -0400 @@ -164,8 +164,7 @@ frame.protect_var (quit_allowed); quit_allowed = false; - octave::interpreter& interp - = octave::__get_interpreter__ ("octave_oncleanup::call_object_destructor"); + octave::interpreter& interp = octave::__get_interpreter__ (); octave::interpreter_try (frame);
--- a/libinterp/octave-value/ov-typeinfo.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-typeinfo.cc Wed Jun 22 12:48:59 2022 -0400 @@ -770,32 +770,28 @@ int register_type (const std::string& t_name, const std::string& c_name, const octave_value& val) { - octave::type_info& type_info - = octave::__get_type_info__ ("register_type"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.register_type (t_name, c_name, val); } octave_value lookup_type (const std::string& nm) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_type"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_type (nm); } unary_class_op_fcn lookup_unary_class_op (octave_value::unary_op op) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_unary_class_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_unary_class_op (op); } unary_op_fcn lookup_unary_op (octave_value::unary_op op, int t) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_unary_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_unary_op (op, t); } @@ -803,8 +799,7 @@ non_const_unary_op_fcn lookup_non_const_unary_op (octave_value::unary_op op, int t) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_non_const_unary_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_non_const_unary_op (op, t); } @@ -812,8 +807,7 @@ binary_class_op_fcn lookup_binary_class_op (octave_value::binary_op op) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_binary_class_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_binary_class_op (op); } @@ -821,8 +815,7 @@ binary_op_fcn lookup_binary_op (octave_value::binary_op op, int t1, int t2) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_binary_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_binary_op (op, t1, t2); } @@ -830,8 +823,7 @@ binary_class_op_fcn lookup_binary_class_op (octave_value::compound_binary_op op) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_binary_class_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_binary_class_op (op); } @@ -839,16 +831,14 @@ binary_op_fcn lookup_binary_op (octave_value::compound_binary_op op, int t1, int t2) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_binary_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_binary_op (op, t1, t2); } cat_op_fcn lookup_cat_op (int t1, int t2) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_cat_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_cat_op (t1, t2); } @@ -856,8 +846,7 @@ assign_op_fcn lookup_assign_op (octave_value::assign_op op, int t_lhs, int t_rhs) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_assign_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_assign_op (op, t_lhs, t_rhs); } @@ -865,16 +854,14 @@ assignany_op_fcn lookup_assignany_op (octave_value::assign_op op, int t_lhs) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_assignany_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_assignany_op (op, t_lhs); } int lookup_pref_assign_conv (int t_lhs, int t_rhs) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_pref_assign_conv"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_pref_assign_conv (t_lhs, t_rhs); } @@ -882,24 +869,21 @@ octave_base_value::type_conv_fcn lookup_widening_op (int t, int t_result) { - octave::type_info& type_info - = octave::__get_type_info__ ("lookup_widening_op"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.lookup_widening_op (t, t_result); } string_vector installed_type_names (void) { - octave::type_info& type_info - = octave::__get_type_info__ ("installed_type_names"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.installed_type_names (); } octave_scalar_map installed_type_info (void) { - octave::type_info& type_info - = octave::__get_type_info__ ("installed_type_info"); + octave::type_info& type_info = octave::__get_type_info__ (); return type_info.installed_type_info (); }
--- a/libinterp/octave-value/ov-usr-fcn.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov-usr-fcn.cc Wed Jun 22 12:48:59 2022 -0400 @@ -75,8 +75,7 @@ // FIXME: shouldn't this happen automatically when deleting cmd_list? if (m_cmd_list) { - octave::event_manager& evmgr - = octave::__get_event_manager__ ("octave_user_code::~octave_user_code"); + octave::event_manager& evmgr = octave::__get_event_manager__ (); m_cmd_list->remove_all_breakpoints (evmgr, m_file_name); } @@ -622,8 +621,7 @@ void octave_user_function::restore_warning_states (void) { - octave::interpreter& interp - = octave::__get_interpreter__ ("octave_user_function::restore_warning_states"); + octave::interpreter& interp = octave::__get_interpreter__ (); octave::tree_evaluator& tw = interp.get_evaluator ();
--- a/libinterp/octave-value/ov.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/octave-value/ov.cc Wed Jun 22 12:48:59 2022 -0400 @@ -1691,8 +1691,7 @@ int tthis = this->type_id (); int trhs = rhs.type_id (); - octave::type_info& ti - = octave::__get_type_info__ ("octave_value::assign"); + octave::type_info& ti = octave::__get_type_info__ (); f = ti.lookup_assign_op (op, tthis, trhs); } @@ -2495,7 +2494,7 @@ // Genuine. int t = type_id (); - octave::type_info& ti = octave::__get_type_info__ ("non_const_unary_op"); + octave::type_info& ti = octave::__get_type_info__ (); octave::type_info::non_const_unary_op_fcn f = ti.lookup_non_const_unary_op (op, t); @@ -2558,8 +2557,7 @@ // Only attempt to operate in-place if this variable is unshared. if (m_rep->count == 1) { - octave::type_info& ti - = octave::__get_type_info__ ("non_const_unary_op"); + octave::type_info& ti = octave::__get_type_info__ (); f = ti.lookup_non_const_unary_op (op, t); } @@ -2843,7 +2841,7 @@ binary_op (octave_value::binary_op op, const octave_value& v1, const octave_value& v2) { - type_info& ti = __get_type_info__ ("binary_op"); + type_info& ti = __get_type_info__ (); return binary_op (ti, op, v1, v2); } @@ -2937,7 +2935,7 @@ binary_op (octave_value::compound_binary_op op, const octave_value& v1, const octave_value& v2) { - type_info& ti = __get_type_info__ ("binary_op"); + type_info& ti = __get_type_info__ (); return binary_op (ti, op, v1, v2); } @@ -3024,7 +3022,7 @@ cat_op (const octave_value& v1, const octave_value& v2, const Array<octave_idx_type>& ra_idx) { - type_info& ti = __get_type_info__ ("cat_op"); + type_info& ti = __get_type_info__ (); return cat_op (ti, v1, v2, ra_idx); } @@ -3489,7 +3487,7 @@ tmp1(0) = base; } - interpreter& interp = __get_interpreter__ ("colon_op"); + interpreter& interp = __get_interpreter__ (); symbol_table& symtab = interp.get_symbol_table (); @@ -3630,7 +3628,7 @@ octave_value unary_op (octave_value::unary_op op, const octave_value& v) { - type_info& ti = __get_type_info__ ("unary_op"); + type_info& ti = __get_type_info__ (); return unary_op (ti, op, v); }
--- a/libinterp/operators/op-class.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/operators/op-class.cc Wed Jun 22 12:48:59 2022 -0400 @@ -55,9 +55,9 @@ { std::string class_name = a.class_name (); - octave_value meth - = octave::__get_symbol_table__ ("oct_unop_" + opname) - .find_method (opname, class_name); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); + + octave_value meth = symtab.find_method (opname, class_name); if (meth.is_defined ()) { @@ -140,8 +140,7 @@ oct_binop_default (const octave_value& a1, const octave_value& a2, const std::string& opname) { - octave::symbol_table& symtab - = octave::__get_symbol_table__ ("oct_binop_" + opname); + octave::symbol_table& symtab = octave::__get_symbol_table__ (); // Dispatch to first (leftmost) operand by default. std::string dispatch_type = a1.class_name ();
--- a/libinterp/parse-tree/oct-lvalue.cc Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/parse-tree/oct-lvalue.cc Wed Jun 22 12:48:59 2022 -0400 @@ -237,8 +237,7 @@ // could happen because there is an index is out of range // and we will be resizing a cell array. - interpreter& interp - = __get_interpreter__ ("octave_lvalue::eval_for_numel"); + interpreter& interp = __get_interpreter__ (); interp.recover_from_exception ();
--- a/libinterp/parse-tree/oct-parse.yy Tue Jun 21 15:44:03 2022 +0200 +++ b/libinterp/parse-tree/oct-parse.yy Wed Jun 22 12:48:59 2022 -0400 @@ -2996,7 +2996,7 @@ if (base->is_constant () && limit->is_constant () && (! incr || incr->is_constant ())) { - interpreter& interp = __get_interpreter__ ("finish_colon_expression"); + interpreter& interp = __get_interpreter__ (); try { @@ -4838,8 +4838,7 @@ if (local_fcns) { - symbol_table& symtab - = __get_symbol_table__ ("base_parser::finish_classdef_file"); + symbol_table& symtab = __get_symbol_table__ (); for (tree_statement *elt : *local_fcns) { @@ -5129,8 +5128,7 @@ if (e->is_constant ()) { - tree_evaluator& tw - = __get_evaluator__ ("validate_matrix_for_assignment"); + tree_evaluator& tw = __get_evaluator__ (); octave_value ov = e->evaluate (tw); @@ -5193,7 +5191,7 @@ if (array_list->all_elements_are_constant ()) { - interpreter& interp = __get_interpreter__ ("finish_array_list"); + interpreter& interp = __get_interpreter__ (); try { @@ -5957,7 +5955,7 @@ if (! file.empty ()) { - interpreter& interp = __get_interpreter__ ("get_help_from_file"); + interpreter& interp = __get_interpreter__ (); symbol_found = true; @@ -6023,7 +6021,7 @@ int len = file.length (); - interpreter& interp = __get_interpreter__ ("load_fcn_from_file"); + interpreter& interp = __get_interpreter__ (); dynamic_loader& dyn_loader = interp.get_dynamic_loader (); @@ -6190,7 +6188,7 @@ source_file (const std::string& file_name, const std::string& context, bool verbose, bool require_file) { - interpreter& interp = __get_interpreter__ ("source_file"); + interpreter& interp = __get_interpreter__ (); interp.source_file (file_name, context, verbose, require_file); } @@ -6240,7 +6238,7 @@ octave_value_list feval (const char *name, const octave_value_list& args, int nargout) { - interpreter& interp = __get_interpreter__ ("feval"); + interpreter& interp = __get_interpreter__ (); return interp.feval (name, args, nargout); } @@ -6248,7 +6246,7 @@ octave_value_list feval (const std::string& name, const octave_value_list& args, int nargout) { - interpreter& interp = __get_interpreter__ ("feval"); + interpreter& interp = __get_interpreter__ (); return interp.feval (name, args, nargout); } @@ -6256,7 +6254,7 @@ octave_value_list feval (octave_function *fcn, const octave_value_list& args, int nargout) { - interpreter& interp = __get_interpreter__ ("feval"); + interpreter& interp = __get_interpreter__ (); return interp.feval (fcn, args, nargout); } @@ -6264,7 +6262,7 @@ octave_value_list feval (const octave_value& val, const octave_value_list& args, int nargout) { - interpreter& interp = __get_interpreter__ ("feval"); + interpreter& interp = __get_interpreter__ (); return interp.feval (val, args, nargout); } @@ -6272,7 +6270,7 @@ octave_value_list feval (const octave_value_list& args, int nargout) { - interpreter& interp = __get_interpreter__ ("feval"); + interpreter& interp = __get_interpreter__ (); return interp.feval (args, nargout); }