Mercurial > hg > octave-nkf
diff libinterp/octave-value/ov-usr-fcn.cc @ 18926:e70373a98ffe
Change profile() to report method names of classes (bug #38480).
* ov-usr-fcn.cc (octave_user_function::profiler_name): Check for class method
or class constructor and change profiler name to report @CLASS/FCN_NAME.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 14 May 2014 17:48:43 -0700 |
parents | 75467145096f |
children | dff05c124017 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-usr-fcn.cc +++ b/libinterp/octave-value/ov-usr-fcn.cc @@ -319,14 +319,18 @@ { std::ostringstream result; - if (is_inline_function ()) - result << "inline@" << fcn_file_name () - << ":" << location_line << ":" << location_column; - else if (is_anonymous_function ()) + if (is_anonymous_function ()) result << "anonymous@" << fcn_file_name () << ":" << location_line << ":" << location_column; else if (is_subfunction ()) result << parent_fcn_name () << ">" << name (); + else if (is_class_method ()) + result << "@" << dispatch_class () << "/" << name (); + else if (is_class_constructor () || is_classdef_constructor ()) + result << "@" << name (); + else if (is_inline_function ()) + result << "inline@" << fcn_file_name () + << ":" << location_line << ":" << location_column; else result << name ();