#include "symtab.h"
Public Types | |
typedef octave::fcn_info | fcn_info |
typedef octave::symbol_scope | scope |
Public Member Functions | |
symbol_table (const symbol_table &)=delete | |
symbol_table (interpreter &interp) | |
~symbol_table (void)=default | |
void | add_to_parent_map (const std::string &classname, const std::list< std::string > &parent_list) |
void | alias_built_in_function (const std::string &alias, const std::string &name) |
std::list< std::string > | built_in_function_names (void) |
octave_value | builtin_find (const std::string &name, const symbol_scope &search_scope=symbol_scope()) |
void | cleanup (void) |
void | clear_dld_function (const std::string &name) |
void | clear_function (const std::string &name) |
void | clear_function_pattern (const std::string &pat) |
void | clear_function_regexp (const std::string &pat) |
void | clear_functions (bool force=false) |
void | clear_mex_functions (void) |
void | clear_user_function (const std::string &name) |
std::list< std::string > | cmdline_function_names (void) |
symbol_scope | current_scope (void) const |
octave_value | dump (void) const |
octave_value | fcn_table_find (const std::string &name, const octave_value_list &args=ovl(), const symbol_scope &search_scope=symbol_scope()) |
octave_value | find_autoload (const std::string &name) |
octave_value | find_built_in_function (const std::string &name) |
octave_value | find_cmdline_function (const std::string &name) |
octave_value | find_function (const std::string &name, const octave_value_list &args, const symbol_scope &search_scope=symbol_scope()) |
octave_value | find_function (const std::string &name, const symbol_scope &search_scope=symbol_scope()) |
octave_value | find_method (const std::string &name, const std::string &dispatch_type) |
octave_value | find_private_function (const std::string &dir_name, const std::string &name) |
octave_value | find_scoped_function (const std::string &name, const symbol_scope &search_scope) |
octave_value | find_user_function (const std::string &name) |
fcn_info * | get_fcn_info (const std::string &name) |
void | install_built_in_dispatch (const std::string &name, const std::string &klass) |
void | install_built_in_function (const std::string &name, const octave_value &fcn) |
void | install_cmdline_function (const std::string &name, const octave_value &fcn) |
void | install_local_function (const std::string &name, const octave_value &fcn, const std::string &file_name) |
void | install_user_function (const std::string &name, const octave_value &fcn) |
bool | is_built_in_function_name (const std::string &name) |
bool | is_superiorto (const std::string &a, const std::string &b) |
symbol_table & | operator= (const symbol_table &)=delete |
std::list< std::string > | parent_classes (const std::string &dispatch_type) |
bool | set_class_relationship (const std::string &sup_class, const std::string &inf_class) |
std::list< std::string > | user_function_names (void) |
Private Types | |
typedef std::map< std::string, std::set< std::string > >::const_iterator | class_precedence_table_const_iterator |
typedef std::map< std::string, std::set< std::string > >::iterator | class_precedence_table_iterator |
typedef std::map< std::string, std::list< std::string > >::const_iterator | const_parent_map_iterator |
typedef std::map< std::string, fcn_info >::const_iterator | fcn_table_const_iterator |
typedef std::map< std::string, fcn_info >::iterator | fcn_table_iterator |
typedef std::map< std::string, octave_value >::const_iterator | global_symbols_const_iterator |
typedef std::map< std::string, octave_value >::iterator | global_symbols_iterator |
typedef std::map< std::string, std::list< std::string > >::iterator | parent_map_iterator |
Private Member Functions | |
octave_value | dump_fcn_table_map (void) const |
void | install_builtins (void) |
Private Attributes | |
std::map< std::string, std::set< std::string > > | m_class_precedence_table |
std::map< std::string, fcn_info > | m_fcn_table |
interpreter & | m_interpreter |
std::map< std::string, std::list< std::string > > | m_parent_map |
|
private |
|
private |
|
private |
typedef octave::fcn_info symbol_table::fcn_info |
|
private |
|
private |
|
private |
|
private |
|
private |
typedef octave::symbol_scope symbol_table::scope |
symbol_table::symbol_table | ( | interpreter & | interp | ) |
|
delete |
|
default |
void symbol_table::add_to_parent_map | ( | const std::string & | classname, |
const std::list< std::string > & | parent_list | ||
) |
Definition at line 664 of file symtab.cc.
References m_parent_map.
void symbol_table::alias_built_in_function | ( | const std::string & | alias, |
const std::string & | name | ||
) |
Definition at line 549 of file symtab.cc.
References find_built_in_function(), fcn_info::install_built_in_function(), octave_value::is_defined(), m_fcn_table, and panic().
std::list< std::string > symbol_table::built_in_function_names | ( | void | ) |
Definition at line 597 of file symtab.cc.
References octave_value::is_defined(), m_fcn_table, and octave_value::sort().
Referenced by file_editor_tab::update_lexer_settings().
octave_value symbol_table::builtin_find | ( | const std::string & | name, |
const symbol_scope & | search_scope = symbol_scope () |
||
) |
Definition at line 190 of file symtab.cc.
References fcn_info::builtin_find(), current_scope(), octave_value::is_defined(), m_fcn_table, and octave_value().
Referenced by Fbuiltin().
void symbol_table::cleanup | ( | void | ) |
Definition at line 694 of file symtab.cc.
References clear_functions(), m_class_precedence_table, m_fcn_table, and m_parent_map.
Referenced by interpreter::shutdown().
void symbol_table::clear_dld_function | ( | const std::string & | name | ) |
Definition at line 485 of file symtab.cc.
References fcn_info::clear_autoload_function(), fcn_info::clear_user_function(), and m_fcn_table.
Referenced by dynamic_loader::clear(), dynamic_loader::clear_function(), and tree_evaluator::remove_autoload().
void symbol_table::clear_function | ( | const std::string & | name | ) |
Definition at line 434 of file symtab.cc.
References clear_user_function().
Referenced by interpreter::clear_function(), tree_evaluator::clear_symbol(), DEFMETHOD(), and F__eigs__().
void symbol_table::clear_function_pattern | ( | const std::string & | pat | ) |
Definition at line 439 of file symtab.cc.
References m_fcn_table, and glob_match::match().
Referenced by interpreter::clear_function_pattern(), and tree_evaluator::clear_symbol_pattern().
void symbol_table::clear_function_regexp | ( | const std::string & | pat | ) |
Definition at line 454 of file symtab.cc.
References regexp::is_match(), and m_fcn_table.
Referenced by interpreter::clear_function_regexp(), and tree_evaluator::clear_symbol_regexp().
void symbol_table::clear_functions | ( | bool | force = false | ) |
Definition at line 426 of file symtab.cc.
References m_fcn_table.
Referenced by cleanup(), tree_evaluator::clear_all(), and interpreter::clear_functions().
void symbol_table::clear_mex_functions | ( | void | ) |
Definition at line 498 of file symtab.cc.
References m_fcn_table.
Referenced by interpreter::shutdown().
void symbol_table::clear_user_function | ( | const std::string & | name | ) |
Definition at line 469 of file symtab.cc.
References fcn_info::clear_user_function(), and m_fcn_table.
Referenced by clear_function(), and file_editor_tab::confirm_dbquit_and_save().
std::list< std::string > symbol_table::cmdline_function_names | ( | void | ) |
Definition at line 615 of file symtab.cc.
References octave_value::is_defined(), m_fcn_table, and octave_value::sort().
symbol_scope symbol_table::current_scope | ( | void | ) | const |
Definition at line 60 of file symtab.cc.
References tree_evaluator::get_current_scope(), interpreter::get_evaluator(), and m_interpreter.
Referenced by builtin_find(), fcn_table_find(), and find_function().
octave_value symbol_table::dump | ( | void | ) | const |
Definition at line 653 of file symtab.cc.
References dump_container_map(), dump_fcn_table_map(), m, m_class_precedence_table, m_parent_map, and octave_value().
Referenced by F__dump_symtab_info__().
|
private |
Definition at line 709 of file symtab.cc.
References fcn_info::dump(), m_fcn_table, and octave_value().
Referenced by dump().
octave_value symbol_table::fcn_table_find | ( | const std::string & | name, |
const octave_value_list & | args = ovl () , |
||
const symbol_scope & | search_scope = symbol_scope () |
||
) |
Definition at line 219 of file symtab.cc.
References current_scope(), fcn_info::find(), octave_value::is_defined(), m_fcn_table, and octave_value().
Referenced by tree_evaluator::find(), find_function(), and tree_evaluator::source_file().
octave_value symbol_table::find_autoload | ( | const std::string & | name | ) |
Definition at line 167 of file symtab.cc.
References fcn_info::find_autoload(), octave_value::is_defined(), m_fcn_table, and octave_value().
octave_value symbol_table::find_built_in_function | ( | const std::string & | name | ) |
Definition at line 148 of file symtab.cc.
References fcn_info::find_built_in_function(), octave_value::is_defined(), and m_fcn_table.
Referenced by alias_built_in_function(), and is_built_in_function_name().
octave_value symbol_table::find_cmdline_function | ( | const std::string & | name | ) |
Definition at line 310 of file symtab.cc.
References fcn_info::find_cmdline_function(), octave_value::is_defined(), m_fcn_table, and octave_value().
Referenced by F__get_cmdline_fcn_txt__(), and symbol_exist().
octave_value symbol_table::find_function | ( | const std::string & | name, |
const octave_value_list & | args, | ||
const symbol_scope & | search_scope = symbol_scope () |
||
) |
Definition at line 277 of file symtab.cc.
References fcn_table_find(), and octave_value().
octave_value symbol_table::find_function | ( | const std::string & | name, |
const symbol_scope & | search_scope = symbol_scope () |
||
) |
Definition at line 249 of file symtab.cc.
References current_scope(), find_method(), octave_value(), and ovl().
Referenced by simple_fcn_handle::call(), tree_identifier::evaluate_n(), tree_index_expression::evaluate_n(), Farrayfun(), Fbsxfun(), Fcellfun(), interpreter::feval(), tree_evaluator::final_index_error(), Fnargin(), Fnargout(), simple_fcn_handle::function_value(), class_simple_fcn_handle::function_value(), get_function_handle(), get_mapper_fun_options(), tree_evaluator::get_user_code(), interpreter::mislocked(), interpreter::munlock(), and symbol_exist().
octave_value symbol_table::find_method | ( | const std::string & | name, |
const std::string & | dispatch_type | ||
) |
Definition at line 125 of file symtab.cc.
References fcn_info::find_method(), octave_value::is_defined(), m_fcn_table, and octave_value().
Referenced by attempt_type_conversion(), do_class_concat(), tree_evaluator::evaluate_end_expression(), find_function(), tree_evaluator::get_user_code(), and tree_evaluator::make_fcn_handle().
octave_value symbol_table::find_private_function | ( | const std::string & | dir_name, |
const std::string & | name | ||
) |
Definition at line 99 of file symtab.cc.
References fcn_info::find_private_function(), octave_value::is_defined(), m_fcn_table, and octave_value().
Referenced by scoped_fcn_handle::find_function().
octave_value symbol_table::find_scoped_function | ( | const std::string & | name, |
const symbol_scope & | search_scope | ||
) |
Definition at line 75 of file symtab.cc.
References fcn_info::find_scoped_function(), octave_value::is_defined(), m_fcn_table, and octave_value().
Referenced by tree_evaluator::make_fcn_handle().
octave_value symbol_table::find_user_function | ( | const std::string & | name | ) |
Definition at line 288 of file symtab.cc.
References fcn_info::find_user_function(), octave_value::is_defined(), m_fcn_table, and octave_value().
Referenced by simple_fcn_handle::fcn_val(), scoped_fcn_handle::find_function(), tree_evaluator::make_fcn_handle(), and simple_fcn_handle::user_function_value().
fcn_info * symbol_table::get_fcn_info | ( | const std::string & | name | ) |
Definition at line 703 of file symtab.cc.
References m_fcn_table.
Referenced by F__dump_symtab_info__().
void symbol_table::install_built_in_dispatch | ( | const std::string & | name, |
const std::string & | klass | ||
) |
Definition at line 566 of file symtab.cc.
References error(), fcn_info::install_built_in_dispatch(), and m_fcn_table.
void symbol_table::install_built_in_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 401 of file symtab.cc.
References fcn_info::install_built_in_function(), and m_fcn_table.
Referenced by cdef_manager::cdef_manager(), install_dld_function(), and install_mex_function().
|
private |
void symbol_table::install_cmdline_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 332 of file symtab.cc.
References fcn_info::install_cmdline_function(), and m_fcn_table.
Referenced by tree_evaluator::visit_function_def().
void symbol_table::install_local_function | ( | const std::string & | name, |
const octave_value & | fcn, | ||
const std::string & | file_name | ||
) |
Definition at line 356 of file symtab.cc.
References fcn_info::install_local_function(), and m_fcn_table.
Referenced by base_parser::finish_classdef_file().
void symbol_table::install_user_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 378 of file symtab.cc.
References fcn_info::install_user_function(), and m_fcn_table.
bool symbol_table::is_built_in_function_name | ( | const std::string & | name | ) |
Definition at line 67 of file symtab.cc.
References find_built_in_function(), and octave_value::is_defined().
Referenced by load_path::package_info::add_to_fcn_map(), and symbol_exist().
bool symbol_table::is_superiorto | ( | const std::string & | a, |
const std::string & | b | ||
) |
Definition at line 537 of file symtab.cc.
References m_class_precedence_table.
Referenced by get_dispatch_type(), and set_class_relationship().
|
delete |
std::list< std::string > symbol_table::parent_classes | ( | const std::string & | dispatch_type | ) |
Definition at line 670 of file symtab.cc.
References m_parent_map.
Referenced by fcn_info::fcn_info_rep::load_class_method(), and out_of_date_check().
bool symbol_table::set_class_relationship | ( | const std::string & | sup_class, |
const std::string & | inf_class | ||
) |
Definition at line 510 of file symtab.cc.
References is_superiorto(), and m_class_precedence_table.
Referenced by Finferiorto(), and Fsuperiorto().
std::list< std::string > symbol_table::user_function_names | ( | void | ) |
Definition at line 581 of file symtab.cc.
References m_fcn_table.
Referenced by interpreter::user_function_names().
|
private |
Definition at line 210 of file symtab.h.
Referenced by cleanup(), dump(), is_superiorto(), and set_class_relationship().
|
private |
Definition at line 206 of file symtab.h.
Referenced by alias_built_in_function(), built_in_function_names(), builtin_find(), cleanup(), clear_dld_function(), clear_function_pattern(), clear_function_regexp(), clear_functions(), clear_mex_functions(), clear_user_function(), cmdline_function_names(), dump_fcn_table_map(), fcn_table_find(), find_autoload(), find_built_in_function(), find_cmdline_function(), find_method(), find_private_function(), find_scoped_function(), find_user_function(), get_fcn_info(), install_built_in_dispatch(), install_built_in_function(), install_cmdline_function(), install_local_function(), install_user_function(), and user_function_names().
|
private |
Definition at line 190 of file symtab.h.
Referenced by current_scope().
|
private |
Definition at line 218 of file symtab.h.
Referenced by add_to_parent_map(), cleanup(), dump(), and parent_classes().