Mercurial > octave-nkf
changeset 11461:2b8531a6a3c9
Change mentions of "nested function" to the less misleading "subfunction"
author | David Grundberg <individ@acc.umu.se> |
---|---|
date | Sat, 08 Jan 2011 11:53:51 +0100 |
parents | 17936067b48f |
children | aed2c50c3082 |
files | src/ChangeLog src/oct-parse.yy src/ov-fcn-handle.cc src/ov-fcn.h src/ov-usr-fcn.cc src/ov-usr-fcn.h src/symtab.cc |
diffstat | 7 files changed, 18 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Jan 07 14:51:26 2011 -0500 +++ b/src/ChangeLog Sat Jan 08 11:53:51 2011 +0100 @@ -1,3 +1,10 @@ +2011-01-08 David Grundberg <individ@acc.umu.se> + + * ov-fcn.h (is_subfunction): Rename from is_nested_function. + Change all uses and nearby comments. + * ov-usr-fcn.h (is_subfunction, mark_as_subfunction): Rename from + is_nested_function, mark_as_nested_function. Change all uses. + 2011-01-07 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/cellfun.cc (Fcellfun): For uniformoutput case
--- a/src/oct-parse.yy Fri Jan 07 14:51:26 2011 -0500 +++ b/src/oct-parse.yy Sat Jan 08 11:53:51 2011 +0100 @@ -2952,9 +2952,7 @@ if (current_function_depth > 1 || parsing_subfunctions) { - // FIXME -- is this flag used to determine if the function is a - // _subfunction_ somewhere? - fcn->mark_as_nested_function (); + fcn->mark_as_subfunction (); symbol_table::install_subfunction (nm, octave_value (fcn), primary_fcn_scope);
--- a/src/ov-fcn-handle.cc Fri Jan 07 14:51:26 2011 -0500 +++ b/src/ov-fcn-handle.cc Sat Jan 08 11:53:51 2011 +0100 @@ -1473,7 +1473,7 @@ // Here we are just looking to see if FCN is a method or constructor // for any class. if (local_funcs && fptr - && (fptr->is_nested_function () || fptr->is_private_function () + && (fptr->is_subfunction () || fptr->is_private_function () || fptr->is_class_constructor ())) { // Locally visible function. @@ -1594,7 +1594,7 @@ { m.setfield ("function", fh_nm); - if (fcn->is_nested_function ()) + if (fcn->is_subfunction ()) { m.setfield ("type", "subfunction"); Cell parentage (dim_vector (1, 2));
--- a/src/ov-fcn.h Fri Jan 07 14:51:26 2011 -0500 +++ b/src/ov-fcn.h Sat Jan 08 11:53:51 2011 +0100 @@ -76,7 +76,7 @@ virtual octave_time time_checked (void) const { return octave_time (static_cast<time_t> (0)); } - virtual bool is_nested_function (void) const { return false; } + virtual bool is_subfunction (void) const { return false; } virtual bool is_class_constructor (const std::string& = std::string ()) const { return false; }
--- a/src/ov-usr-fcn.cc Fri Jan 07 14:51:26 2011 -0500 +++ b/src/ov-usr-fcn.cc Sat Jan 08 11:53:51 2011 +0100 @@ -181,7 +181,7 @@ t_checked (static_cast<time_t> (0)), system_fcn_file (false), call_depth (-1), num_named_args (param_list ? param_list->length () : 0), - nested_function (false), inline_function (false), + subfunction (false), inline_function (false), class_constructor (false), class_method (false), parent_scope (-1), local_scope (sid), curr_unwind_protect_frame (0)
--- a/src/ov-usr-fcn.h Fri Jan 07 14:51:26 2011 -0500 +++ b/src/ov-usr-fcn.h Sat Jan 08 11:53:51 2011 +0100 @@ -248,9 +248,9 @@ void stash_function_name (const std::string& s) { my_name = s; } - void mark_as_nested_function (void) { nested_function = true; } + void mark_as_subfunction (void) { subfunction = true; } - bool is_nested_function (void) const { return nested_function; } + bool is_subfunction (void) const { return subfunction; } void mark_as_inline_function (void) { inline_function = true; } @@ -366,8 +366,8 @@ // The number of arguments that have names. int num_named_args; - // TRUE means this is a nested function. - bool nested_function; + // TRUE means this subfunction of a primary function. + bool subfunction; // TRUE means this is an inline function. bool inline_function;
--- a/src/symtab.cc Fri Jan 07 14:51:26 2011 -0500 +++ b/src/symtab.cc Sat Jan 08 11:53:51 2011 +0100 @@ -169,9 +169,9 @@ if (fcn) { - // FIXME -- we need to handle nested functions properly here. + // FIXME -- we need to handle subfunctions properly here. - if (! fcn->is_nested_function ()) + if (! fcn->is_subfunction ()) { std::string ff = fcn->fcn_file_name ();