#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) |
void | assign (const std::string &name, const octave_value &value, bool) |
void | assign (const std::string &name, const octave_value &value=octave_value()) |
bool | at_top_level (void) |
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_all (bool force=false) |
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_global (const std::string &name) |
void | clear_global_pattern (const std::string &pattern) |
void | clear_mex_functions (void) |
void | clear_symbol (const std::string &name) |
void | clear_symbol_pattern (const std::string &pattern) |
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 | global_assign (const std::string &name, const octave_value &value=octave_value()) |
std::list< std::string > | global_variable_names (void) |
octave_value | global_varval (const std::string &name) const |
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) |
void | top_level_assign (const std::string &name, const octave_value &value=octave_value()) |
std::list< std::string > | top_level_variable_names (void) |
octave_value | top_level_varval (const std::string &name) const |
std::list< std::string > | user_function_names (void) |
std::list< std::string > | variable_names (void) |
octave_value | varval (const std::string &name) const |
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 |
|
private |
|
private |
|
private |
|
private |
|
private |
octave::symbol_table::symbol_table | ( | interpreter & | interp | ) |
Definition at line 53 of file symtab.cc.
References install_builtins().
|
delete |
|
default |
void octave::symbol_table::add_to_parent_map | ( | const std::string & | classname, |
const std::list< std::string > & | parent_list | ||
) |
Definition at line 663 of file symtab.cc.
References m_parent_map.
Referenced by octave_class::octave_class().
void octave::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(), octave::fcn_info::install_built_in_function(), octave_value::is_defined(), m_fcn_table, name, and panic().
void octave::symbol_table::assign | ( | const std::string & | name, |
const octave_value & | value, | ||
bool | |||
) |
void octave::symbol_table::assign | ( | const std::string & | name, |
const octave_value & | value = octave_value () |
||
) |
Definition at line 768 of file symtab.cc.
References octave::interpreter::assign(), m_interpreter, and name.
bool octave::symbol_table::at_top_level | ( | void | ) |
Definition at line 726 of file symtab.cc.
References octave::interpreter::at_top_level(), and m_interpreter.
std::list< std::string > octave::symbol_table::built_in_function_names | ( | void | ) |
Definition at line 597 of file symtab.cc.
References octave_value::is_defined(), m_fcn_table, retval, and Array< T >::sort().
Referenced by octave::file_editor_tab::update_lexer_settings().
octave_value octave::symbol_table::builtin_find | ( | const std::string & | name, |
const symbol_scope & | search_scope = symbol_scope () |
||
) |
Definition at line 190 of file symtab.cc.
References octave::fcn_info::builtin_find(), current_scope(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
Referenced by Fbuiltin(), and octave::jit_typeinfo::find_builtin().
void octave::symbol_table::cleanup | ( | void | ) |
Definition at line 693 of file symtab.cc.
References clear_functions(), m_class_precedence_table, m_fcn_table, and m_parent_map.
Referenced by octave::interpreter::shutdown().
void octave::symbol_table::clear_all | ( | bool | force = false | ) |
Definition at line 774 of file symtab.cc.
References octave::interpreter::clear_all(), and m_interpreter.
void octave::symbol_table::clear_dld_function | ( | const std::string & | name | ) |
Definition at line 485 of file symtab.cc.
References octave::fcn_info::clear_autoload_function(), octave::fcn_info::clear_user_function(), m_fcn_table, and name.
Referenced by octave::dynamic_loader::clear(), octave::dynamic_loader::clear_function(), and octave::tree_evaluator::remove_autoload().
void octave::symbol_table::clear_function | ( | const std::string & | name | ) |
Definition at line 434 of file symtab.cc.
References clear_user_function(), and name.
Referenced by octave::interpreter::clear_function(), octave::tree_evaluator::clear_symbol(), DEFMETHOD(), and F__eigs__().
void octave::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 octave::interpreter::clear_function_pattern(), and octave::tree_evaluator::clear_symbol_pattern().
void octave::symbol_table::clear_function_regexp | ( | const std::string & | pat | ) |
Definition at line 454 of file symtab.cc.
References octave::regexp::is_match(), and m_fcn_table.
Referenced by octave::interpreter::clear_function_regexp(), and octave::tree_evaluator::clear_symbol_regexp().
void octave::symbol_table::clear_functions | ( | bool | force = false | ) |
Definition at line 426 of file symtab.cc.
References m_fcn_table.
Referenced by cleanup(), octave::tree_evaluator::clear_all(), and octave::interpreter::clear_functions().
void octave::symbol_table::clear_global | ( | const std::string & | name | ) |
Definition at line 780 of file symtab.cc.
References octave::interpreter::clear_global_variable(), m_interpreter, and name.
void octave::symbol_table::clear_global_pattern | ( | const std::string & | pattern | ) |
Definition at line 786 of file symtab.cc.
References octave::interpreter::clear_global_variable_pattern(), and m_interpreter.
void octave::symbol_table::clear_mex_functions | ( | void | ) |
Definition at line 498 of file symtab.cc.
References m_fcn_table.
Referenced by octave::interpreter::shutdown().
void octave::symbol_table::clear_symbol | ( | const std::string & | name | ) |
Definition at line 792 of file symtab.cc.
References octave::interpreter::clear_symbol(), m_interpreter, and name.
void octave::symbol_table::clear_symbol_pattern | ( | const std::string & | pattern | ) |
Definition at line 798 of file symtab.cc.
References octave::interpreter::clear_symbol_pattern(), and m_interpreter.
void octave::symbol_table::clear_user_function | ( | const std::string & | name | ) |
Definition at line 469 of file symtab.cc.
References octave::fcn_info::clear_user_function(), m_fcn_table, and name.
Referenced by clear_function(), and octave::file_editor_tab::confirm_dbquit_and_save().
std::list< std::string > octave::symbol_table::cmdline_function_names | ( | void | ) |
Definition at line 615 of file symtab.cc.
References octave_value::is_defined(), m_fcn_table, retval, and Array< T >::sort().
symbol_scope octave::symbol_table::current_scope | ( | void | ) | const |
Definition at line 60 of file symtab.cc.
References octave::tree_evaluator::get_current_scope(), octave::interpreter::get_evaluator(), and m_interpreter.
Referenced by builtin_find(), fcn_table_find(), and find_function().
octave_value octave::symbol_table::dump | ( | void | ) | const |
Definition at line 653 of file symtab.cc.
References octave::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 708 of file symtab.cc.
References octave::fcn_info::dump(), m_fcn_table, and octave_value().
Referenced by dump().
octave_value octave::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(), octave::fcn_info::find(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
Referenced by octave::tree_evaluator::find(), find_function(), and octave::tree_evaluator::source_file().
octave_value octave::symbol_table::find_autoload | ( | const std::string & | name | ) |
Definition at line 167 of file symtab.cc.
References octave::fcn_info::find_autoload(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
octave_value octave::symbol_table::find_built_in_function | ( | const std::string & | name | ) |
Definition at line 148 of file symtab.cc.
References octave::fcn_info::find_built_in_function(), octave_value::is_defined(), m_fcn_table, and name.
Referenced by alias_built_in_function(), and is_built_in_function_name().
octave_value octave::symbol_table::find_cmdline_function | ( | const std::string & | name | ) |
Definition at line 310 of file symtab.cc.
References octave::fcn_info::find_cmdline_function(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
Referenced by F__get_cmdline_fcn_txt__(), and symbol_exist().
octave_value octave::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(), name, and octave_value().
octave_value octave::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(), name, octave_value(), and ovl().
Referenced by octave::simple_fcn_handle::call(), octave::tree_colon_expression::evaluate(), octave::tree_identifier::evaluate_n(), octave::tree_index_expression::evaluate_n(), Farrayfun(), Fbsxfun(), Fcellfun(), octave::interpreter::feval(), octave::tree_evaluator::final_index_error(), Fnargin(), Fnargout(), octave::simple_fcn_handle::function_value(), octave::class_simple_fcn_handle::function_value(), octave::get_function_handle(), get_mapper_fun_options(), octave::tree_evaluator::get_user_code(), octave::jit_convert::get_variable(), is_valid_function(), maybe_missing_function_hook(), octave::interpreter::mislocked(), and octave::interpreter::munlock().
octave_value octave::symbol_table::find_method | ( | const std::string & | name, |
const std::string & | dispatch_type | ||
) |
Definition at line 125 of file symtab.cc.
References octave::fcn_info::find_method(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
Referenced by attempt_type_conversion(), do_class_concat(), octave::tree_evaluator::evaluate_end_expression(), find_function(), octave::tree_evaluator::get_user_code(), octave_class::index_vector(), octave_class::is_true(), octave::tree_evaluator::make_fcn_handle(), oct_binop_default(), oct_unop_default(), octave_class::reconstruct_exemplar(), octave_class::size(), octave_class::string_vector_value(), octave_class::subsasgn_common(), octave_class::subsref(), and octave_class::xnumel().
octave_value octave::symbol_table::find_private_function | ( | const std::string & | dir_name, |
const std::string & | name | ||
) |
Definition at line 99 of file symtab.cc.
References octave::fcn_info::find_private_function(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
Referenced by octave::scoped_fcn_handle::find_function().
octave_value octave::symbol_table::find_scoped_function | ( | const std::string & | name, |
const symbol_scope & | search_scope | ||
) |
Definition at line 75 of file symtab.cc.
References octave::fcn_info::find_scoped_function(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
Referenced by octave::tree_evaluator::make_fcn_handle().
octave_value octave::symbol_table::find_user_function | ( | const std::string & | name | ) |
Definition at line 288 of file symtab.cc.
References octave::fcn_info::find_user_function(), octave_value::is_defined(), m_fcn_table, name, and octave_value().
Referenced by octave::simple_fcn_handle::fcn_val(), octave::scoped_fcn_handle::find_function(), octave::tree_evaluator::make_fcn_handle(), and octave::simple_fcn_handle::user_function_value().
fcn_info * octave::symbol_table::get_fcn_info | ( | const std::string & | name | ) |
Definition at line 702 of file symtab.cc.
References m_fcn_table, and name.
Referenced by F__dump_symtab_info__().
void octave::symbol_table::global_assign | ( | const std::string & | name, |
const octave_value & | value = octave_value () |
||
) |
Definition at line 804 of file symtab.cc.
References octave::interpreter::global_assign(), m_interpreter, and name.
std::list< std::string > octave::symbol_table::global_variable_names | ( | void | ) |
Definition at line 750 of file symtab.cc.
References octave::interpreter::global_variable_names(), and m_interpreter.
octave_value octave::symbol_table::global_varval | ( | const std::string & | name | ) | const |
Definition at line 738 of file symtab.cc.
References octave::interpreter::global_varval(), m_interpreter, and name.
void octave::symbol_table::install_built_in_dispatch | ( | const std::string & | name, |
const std::string & | klass | ||
) |
Definition at line 566 of file symtab.cc.
References error(), octave::fcn_info::install_built_in_dispatch(), m_fcn_table, and name.
void octave::symbol_table::install_built_in_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 401 of file symtab.cc.
References octave::fcn_info::install_built_in_function(), m_fcn_table, and name.
Referenced by octave::cdef_manager::cdef_manager(), install_dld_function(), and install_mex_function().
|
private |
Referenced by symbol_table().
void octave::symbol_table::install_cmdline_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 332 of file symtab.cc.
References octave::fcn_info::install_cmdline_function(), m_fcn_table, and name.
Referenced by octave::tree_evaluator::visit_function_def().
void octave::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 octave::fcn_info::install_local_function(), m_fcn_table, and name.
Referenced by octave::base_parser::finish_classdef_file().
void octave::symbol_table::install_user_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 378 of file symtab.cc.
References octave::fcn_info::install_user_function(), m_fcn_table, and name.
bool octave::symbol_table::is_built_in_function_name | ( | const std::string & | name | ) |
Definition at line 67 of file symtab.cc.
References find_built_in_function(), octave_value::is_defined(), and name.
Referenced by octave::load_path::package_info::add_to_fcn_map(), and symbol_exist().
bool octave::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 octave::get_dispatch_type(), oct_binop_default(), and set_class_relationship().
|
delete |
std::list< std::string > octave::symbol_table::parent_classes | ( | const std::string & | dispatch_type | ) |
Definition at line 669 of file symtab.cc.
References Array< T >::insert(), m_parent_map, and retval.
Referenced by octave::fcn_info::fcn_info_rep::load_class_method(), and octave::out_of_date_check().
bool octave::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().
void octave::symbol_table::top_level_assign | ( | const std::string & | name, |
const octave_value & | value = octave_value () |
||
) |
Definition at line 811 of file symtab.cc.
References m_interpreter, name, and octave::interpreter::top_level_assign().
std::list< std::string > octave::symbol_table::top_level_variable_names | ( | void | ) |
Definition at line 756 of file symtab.cc.
References m_interpreter, and octave::interpreter::top_level_variable_names().
octave_value octave::symbol_table::top_level_varval | ( | const std::string & | name | ) | const |
Definition at line 744 of file symtab.cc.
References m_interpreter, name, and octave::interpreter::top_level_varval().
std::list< std::string > octave::symbol_table::user_function_names | ( | void | ) |
Definition at line 581 of file symtab.cc.
References m_fcn_table, retval, and Array< T >::sort().
Referenced by octave::interpreter::user_function_names().
std::list< std::string > octave::symbol_table::variable_names | ( | void | ) |
Definition at line 762 of file symtab.cc.
References m_interpreter, and octave::interpreter::variable_names().
octave_value octave::symbol_table::varval | ( | const std::string & | name | ) | const |
Definition at line 732 of file symtab.cc.
References m_interpreter, name, and octave::interpreter::varval().
|
private |
Definition at line 267 of file symtab.h.
Referenced by cleanup(), dump(), is_superiorto(), and set_class_relationship().
|
private |
Definition at line 263 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 247 of file symtab.h.
Referenced by assign(), at_top_level(), clear_all(), clear_global(), clear_global_pattern(), clear_symbol(), clear_symbol_pattern(), current_scope(), global_assign(), global_variable_names(), global_varval(), top_level_assign(), top_level_variable_names(), top_level_varval(), variable_names(), and varval().
|
private |
Definition at line 275 of file symtab.h.
Referenced by add_to_parent_map(), cleanup(), dump(), and parent_classes().