Mercurial > octave
diff libinterp/octave-value/ov.cc @ 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.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 22 Jun 2022 12:48:59 -0400 |
parents | 32d2b6604a9f |
children | 929c05cf2afa |
line wrap: on
line diff
--- 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); }