Mercurial > octave
changeset 24351:bccb49573786
delete unused symbol_record_rep member variable
* symrec.h (symbol_record::symbol_record_rep::m_curr_fcn):
Delete unused member variable.
(symbol_record::symbol_record_rep::set_curr_fcn): Delete function and
all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 30 Nov 2017 08:00:40 -0500 |
parents | b991accccd4c |
children | bff8e3884a88 |
files | libinterp/corefcn/symrec.h libinterp/corefcn/symscope.cc |
diffstat | 2 files changed, 1 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/symrec.h Wed Nov 29 15:18:52 2017 -0500 +++ b/libinterp/corefcn/symrec.h Thu Nov 30 08:00:40 2017 -0500 @@ -80,7 +80,7 @@ symbol_record_rep (symbol_scope *s, const std::string& nm, const octave_value& v, unsigned int sc) - : m_decl_scope (s), m_curr_fcn (nullptr), m_name (nm), + : m_decl_scope (s), m_name (nm), m_fwd_rep (), m_value_stack (), m_storage_class (sc), m_valid (true) { @@ -557,17 +557,6 @@ return m_decl_scope; } - void set_curr_fcn (octave_user_function *fcn) - { - if (auto t_fwd_rep = m_fwd_rep.lock ()) - { - t_fwd_rep->set_curr_fcn (fcn); - return; - } - - m_curr_fcn = fcn; - } - // We don't forward more than once, so no need to forward the // next two. @@ -590,8 +579,6 @@ symbol_scope *m_decl_scope; - octave_user_function *m_curr_fcn; - std::string m_name; std::weak_ptr<symbol_record_rep> m_fwd_rep; @@ -738,11 +725,6 @@ unsigned int storage_class (void) const { return m_rep->storage_class (); } - void set_curr_fcn (octave_user_function *fcn) - { - m_rep->set_curr_fcn (fcn); - } - void bind_fwd_rep (const symbol_record& sr) { m_rep->bind_fwd_rep (sr.m_rep);
--- a/libinterp/corefcn/symscope.cc Wed Nov 29 15:18:52 2017 -0500 +++ b/libinterp/corefcn/symscope.cc Thu Nov 30 08:00:40 2017 -0500 @@ -313,8 +313,6 @@ if (ours.is_global () || ours.is_persistent ()) error ("global and persistent may only be used in the topmost level in which a nested variable is used"); } - else - ours.set_curr_fcn (m_fcn); } // The scopes of nested functions are static. @@ -324,9 +322,6 @@ { // Parents of nested functions have static scopes. m_is_static = true; - - for (auto& nm_sr : m_symbols) - nm_sr.second.set_curr_fcn (m_fcn); } for (auto& symtab_p : m_children)