# HG changeset patch # User David Grundberg # Date 1294484031 -3600 # Node ID 2b8531a6a3c920ab709301c07623aaf3295ce000 # Parent 17936067b48f5dcac2af0fd1dabfa7911532b01c Change mentions of "nested function" to the less misleading "subfunction" diff -r 17936067b48f -r 2b8531a6a3c9 src/ChangeLog --- 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 + + * 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 * DLD-FUNCTIONS/cellfun.cc (Fcellfun): For uniformoutput case diff -r 17936067b48f -r 2b8531a6a3c9 src/oct-parse.yy --- 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); diff -r 17936067b48f -r 2b8531a6a3c9 src/ov-fcn-handle.cc --- 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)); diff -r 17936067b48f -r 2b8531a6a3c9 src/ov-fcn.h --- 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 (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; } diff -r 17936067b48f -r 2b8531a6a3c9 src/ov-usr-fcn.cc --- 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 (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) diff -r 17936067b48f -r 2b8531a6a3c9 src/ov-usr-fcn.h --- 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; diff -r 17936067b48f -r 2b8531a6a3c9 src/symtab.cc --- 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 ();