Mercurial > octave
changeset 28328:5cb09ac94e81 stable
eliminate some unused call_stack and stack_frame functions
* call-stack.h, call-stack.cc (call_stack::glob, call_stack::regexp):
Delete unused functions.
* stack-frame.h, stack-frame.cc (stack_frame::glob, stack_frame::regexp):
Delete unused functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 18 May 2020 16:10:52 -0400 |
parents | 8db2d4c9a64f |
children | 6349915869f2 |
files | libinterp/corefcn/call-stack.cc libinterp/corefcn/call-stack.h libinterp/corefcn/stack-frame.cc libinterp/corefcn/stack-frame.h |
diffstat | 4 files changed, 0 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/call-stack.cc Mon May 18 16:06:27 2020 -0400 +++ b/libinterp/corefcn/call-stack.cc Mon May 18 16:10:52 2020 -0400 @@ -751,16 +751,6 @@ return m_cs[m_curr_frame]->all_variables (); } - std::list<symbol_record> call_stack::glob (const std::string& pattern) const - { - return m_cs[m_curr_frame]->glob (pattern); - } - - std::list<symbol_record> call_stack::regexp (const std::string& pattern) const - { - return m_cs[m_curr_frame]->regexp (pattern); - } - std::list<std::string> call_stack::global_variable_names (void) const { std::list<std::string> retval;
--- a/libinterp/corefcn/call-stack.h Mon May 18 16:06:27 2020 -0400 +++ b/libinterp/corefcn/call-stack.h Mon May 18 16:10:52 2020 -0400 @@ -250,10 +250,6 @@ symbol_info_list all_variables (void); - std::list<symbol_record> glob (const std::string& pattern) const; - - std::list<symbol_record> regexp (const std::string& pattern) const; - std::list<std::string> global_variable_names (void) const; std::list<std::string> top_level_variable_names (void) const;
--- a/libinterp/corefcn/stack-frame.cc Mon May 18 16:06:27 2020 -0400 +++ b/libinterp/corefcn/stack-frame.cc Mon May 18 16:10:52 2020 -0400 @@ -259,59 +259,6 @@ return sia.symbol_info (); } - std::list<symbol_record> - stack_frame::glob (const std::string& pattern) const - { - std::list<symbol_record> retval; - - symbol_scope scope = get_scope (); - - const std::map<std::string, symbol_record>& symbols = scope.symbols (); - - glob_match pat (pattern); - - for (const auto& nm_sr : symbols) - { - if (pat.match (nm_sr.first)) - { - symbol_record sr = nm_sr.second; - - if (! is_variable (sr)) - continue; - - retval.push_back (sr); - } - } - - return retval; - } - - std::list<symbol_record> - stack_frame::regexp (const std::string& pattern) const - { - std::list<symbol_record> retval; - - symbol_scope scope = get_scope (); - - const std::map<std::string, symbol_record>& symbols = scope.symbols (); - - octave::regexp pat (pattern); - - for (const auto& nm_sr : symbols) - { - if (pat.is_match (nm_sr.first)) - { - symbol_record sr = nm_sr.second; - - if (! is_variable (sr)) - continue; - - retval.push_back (sr); - } - } - - return retval; - } // FIXME: Should this function also find any variables in parent // scopes accessible through access_links?
--- a/libinterp/corefcn/stack-frame.h Mon May 18 16:06:27 2020 -0400 +++ b/libinterp/corefcn/stack-frame.h Mon May 18 16:10:52 2020 -0400 @@ -240,14 +240,6 @@ symbol_info_list all_variables (void); - // FIXME: Should these exist? Probably we should avoid returning - // lists of symbol_record objects, so maybe they should be - // private functions? - - std::list<symbol_record> glob (const std::string& pattern) const; - - std::list<symbol_record> regexp (const std::string& pattern) const; - std::list<std::string> variable_names (void) const; // Look for named symbol visible from current scope. Don't