Mercurial > hg > octave-nkf
diff libinterp/octave-value/ov-classdef.h @ 16684:edbb123cbe3a classdef
Correct handling of package context in symbol table.
This change partially revert the previous changes on the symbol table,
because the function table is not a member of the symbol table, but
a static field.
* libinterp/interpfcn/load-path.h (load_path::do_find_method,
load_path::do_methods): Remove methods.
(load_path::find_method, load_path::methods): Reimplement with class
load_path::loader.
* libinterp/interpfcn/load-path.cc (load_path::do_find_method,
load_path::do_methods): Remove methods.
* libinterp/interpfcn/symtab.h (symbol_table::package_name): Remove
field, moved to symbol_table::fcn_info::fcn_info_rep. Suppress all
usage.
(symbol_table::find): Remove scope argument.
(symbol_table::alloc_package_scope): Remove method.
(symbol_table::fcn_info::find_function,
symbol_table::fcn_info::find_user_function,
symbol_table::fcn_info::find): Remove package_name argument.
(symbol_table::fcn_info::fcn_info_rep::find,
symbol_table::fcn_info::fcn_info_rep::xfind,
symbol_table::fcn_info::fcn_info_rep::find_function,
symbol_table::fcn_info::fcn_info_rep::find_user_function,
symbol_table::fcn_info::fcn_info_rep::find_package,
symbol_table::fcn_info::fcn_info_rep::load_class_constructor):
Likewise.
(symbol_table::fcn_info::fcn_info_rep::package_name): New member.
(symbol_table::fcn_info::fcn_info_rep::fcn_info_rep): Initialize it.
(symbol_table::fcn_info::fcn_info_rep::full_name): New method.
* libinterp/interpfcn/symtab.cc
(symbol_table::fcn_info::fcn_info_rep::load_class_constructor,
symbol_table::fcn_info::fcn_info_rep::find,
symbol_table::fcn_info::fcn_info_rep::xfind,
symbol_table::fcn_info::fcn_info_rep::find_package,
symbol_table::fcn_info::fcn_info_rep::find_user_function): Remove
package_name argument. Use package_name member instead.
(symbol_table::fcn_info::fcn_info_rep::load_class_method): Simplify,
using full_name method and package_name member.
(symbol_table::fcn_info::fcn_info_rep::dump): Use full_name.
(symbol_table::find): Remove scope argument.
(symbol_table::do_find): Do not use (removed) package_name member.
* libinterp/octave-value/ov-classdef.h
(cdef_package::cdef_package_rep::scope): Remove member. Suppress all
usages.
* libinterp/octave-value/ov-classdef.cc
(cdef_package::cdef_package_rep::find): Do not use (removed) scope
member. Pass fully-qualified name to the symbol table.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sat, 18 May 2013 23:12:56 -0400 |
parents | 7368654f302f |
children | 2823f8e3da77 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-classdef.h +++ b/libinterp/octave-value/ov-classdef.h @@ -1212,13 +1212,9 @@ { public: cdef_package_rep (void) - : cdef_meta_object_rep (), member_count (0), scope (-1) { } + : cdef_meta_object_rep (), member_count (0) { } - ~cdef_package_rep (void) - { - if (scope != -1) - symbol_table::erase_scope (scope); - } + ~cdef_package_rep (void) { } cdef_object_rep* copy (void) const { return new cdef_package_rep (*this); } @@ -1285,9 +1281,6 @@ typedef std::map<std::string, cdef_package>::iterator package_iterator; typedef std::map<std::string, cdef_package>::const_iterator package_const_iterator; - // The symbol_table scope corresponding to this package. - symbol_table::scope_id scope; - private: cdef_package_rep (const cdef_package_rep& p) : cdef_meta_object_rep (p), full_name (p.full_name),