Mercurial > octave
changeset 26114:0e207a5cc212
eliminate useless function
* symtab.h (symbol_table::find_symbol (const std::string&,
symbol_scope&)): Delete. Fix all uses to call
symbol_scope::find_symbol directly instead.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 16 Nov 2018 14:56:55 -0500 |
parents | 8a15f3bace49 |
children | 2db7e4e5d67f |
files | libinterp/corefcn/symtab.h libinterp/parse-tree/pt-jit.cc |
diffstat | 2 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/symtab.h Fri Nov 16 13:16:50 2018 -0500 +++ b/libinterp/corefcn/symtab.h Fri Nov 16 14:56:55 2018 -0500 @@ -105,19 +105,14 @@ m_current_scope.set_context (context); } - symbol_record find_symbol (const std::string& name, symbol_scope& sid) - { - return sid ? sid.find_symbol (name) : symbol_record (); - } - symbol_record find_symbol (const std::string& name) { - return find_symbol (name, m_current_scope); + return m_current_scope.find_symbol (name); } symbol_record find_global_symbol (const std::string& name) { - symbol_record sym = find_symbol (name, m_global_scope); + symbol_record sym = m_global_scope.find_symbol (name); sym.mark_global ();
--- a/libinterp/parse-tree/pt-jit.cc Fri Nov 16 13:16:50 2018 -0500 +++ b/libinterp/parse-tree/pt-jit.cc Fri Nov 16 14:56:55 2018 -0500 @@ -1147,7 +1147,7 @@ symbol_table& symtab = __get_symbol_table__ ("jit_convert::find_variable"); - symbol_record record = symtab.find_symbol (vname, m_scope); + symbol_record record = m_scope.find_symbol (vname); if (record.is_persistent () || record.is_global ()) throw jit_fail_exception ("Persistent and global not yet supported");