#include "call-stack.h"
Public Types | |
typedef stack_frames::const_iterator | const_iterator |
typedef stack_frames::const_reverse_iterator | const_reverse_iterator |
typedef stack_frames::iterator | iterator |
typedef stack_frames::reverse_iterator | reverse_iterator |
typedef std::deque< std::shared_ptr< stack_frame > > | stack_frames |
Public Member Functions | |
call_stack (tree_evaluator &evaluator) | |
bool | all_scripts () const |
symbol_info_list | all_variables () |
bool | at_top_level () const |
octave_map | backtrace () const |
octave_map | backtrace (octave_idx_type &curr_user_frame, bool print_subfn=true) const |
std::list< std::shared_ptr< stack_frame > > | backtrace_frames () const |
std::list< std::shared_ptr< stack_frame > > | backtrace_frames (octave_idx_type &curr_user_frame) const |
std::list< frame_info > | backtrace_info () const |
std::list< frame_info > | backtrace_info (octave_idx_type &curr_user_frame, bool print_subfn=true) const |
octave_function * | caller_function () const |
void | clear () |
void | clear_global_variable (const std::string &name) |
void | clear_global_variable_pattern (const std::string &pattern) |
void | clear_global_variable_regexp (const std::string &pattern) |
void | clear_global_variables () |
unwind_protect * | curr_fcn_unwind_protect_frame () |
int | current_column () const |
std::size_t | current_frame () const |
octave_function * | current_function (bool skip_first=false) const |
int | current_line () const |
symbol_scope | current_scope () const |
octave_user_code * | current_user_code () const |
int | current_user_code_column () const |
int | current_user_code_line () const |
std::shared_ptr< stack_frame > | current_user_frame () const |
std::size_t | dbupdown (int n=-1, bool verbose=false) |
std::size_t | dbupdown (std::size_t start, int n, bool verbose) |
octave_user_code * | debug_user_code () const |
int | debug_user_code_column () const |
int | debug_user_code_line () const |
void | display () const |
octave_value | do_global_who_two (const string_vector &patterns, bool have_regexp, bool return_list, bool verbose, const std::string &msg="") |
octave_value | do_who (int argc, const string_vector &argv, bool return_list, bool verbose=false) |
octave_value | do_who_two (const string_vector &patterns, bool have_regexp, bool return_list, bool verbose, const std::string &msg="") |
octave_function * | element (std::size_t n) |
octave_map | empty_backtrace () const |
std::size_t | find_current_user_frame () const |
octave_value | get_auto_fcn_var (stack_frame::auto_var_type avt) const |
std::shared_ptr< stack_frame > | get_current_stack_frame () const |
std::string | get_dispatch_class () const |
symbol_info_list | get_symbol_info () |
octave_value | get_top_level_value (const std::string &name) const |
symbol_info_list | glob_symbol_info (const std::string &pattern) const |
std::list< std::string > | global_variable_names () const |
octave_value & | global_varref (const std::string &name) |
octave_value | global_varval (const std::string &name) const |
void | goto_base_frame () |
void | goto_caller_frame () |
bool | goto_frame (std::size_t n=0, bool verbose=false) |
bool | is_class_constructor_executing (std::string &dispatch_class) const |
bool | is_class_method_executing (std::string &dispatch_class) const |
void | make_global (const symbol_record &sym) |
void | make_persistent (const symbol_record &sym) |
octave_value | max_stack_depth (const octave_value_list &args, int nargout) |
void | pop () |
std::shared_ptr< stack_frame > | pop_return () |
void | push (const symbol_scope &scope) |
void | push (octave_function *fcn) |
void | push (octave_user_function *fcn, const stack_frame::local_vars_map &local_vars, const std::shared_ptr< stack_frame > &closure_frames=std::shared_ptr< stack_frame >()) |
void | push (octave_user_function *fcn, const std::shared_ptr< stack_frame > &closure_frames=std::shared_ptr< stack_frame >()) |
void | push (octave_user_script *script) |
symbol_info_list | regexp_symbol_info (const std::string &pattern) const |
void | restore_frame (std::size_t n) |
void | set_auto_fcn_var (stack_frame::auto_var_type avt, const octave_value &val) |
void | set_column (int c) |
void | set_dispatch_class (const std::string &class_name) |
void | set_line (int l) |
void | set_location (int l, int c) |
void | set_nargin (int nargin) |
void | set_nargout (int nargout) |
void | set_top_level_value (const std::string &name, const octave_value &value) |
std::size_t | size () const |
std::list< std::string > | top_level_variable_names () const |
symbol_scope | top_scope () const |
symbol_info_list | top_scope_symbol_info () const |
std::list< std::string > | variable_names () const |
Definition at line 53 of file call-stack.h.
typedef stack_frames::const_iterator call_stack::const_iterator |
Definition at line 62 of file call-stack.h.
typedef stack_frames::const_reverse_iterator call_stack::const_reverse_iterator |
Definition at line 65 of file call-stack.h.
typedef stack_frames::iterator call_stack::iterator |
Definition at line 61 of file call-stack.h.
typedef stack_frames::reverse_iterator call_stack::reverse_iterator |
Definition at line 64 of file call-stack.h.
typedef std::deque<std::shared_ptr<stack_frame> > call_stack::stack_frames |
Definition at line 59 of file call-stack.h.
call_stack::call_stack | ( | tree_evaluator & | evaluator | ) |
Definition at line 59 of file call-stack.cc.
References push().
bool call_stack::all_scripts | ( | ) | const |
Definition at line 341 of file call-stack.cc.
References f.
symbol_info_list call_stack::all_variables | ( | ) |
Definition at line 838 of file call-stack.cc.
|
inline |
Definition at line 108 of file call-stack.h.
Referenced by tree_evaluator::at_top_level().
octave_map call_stack::backtrace | ( | ) | const |
Definition at line 773 of file call-stack.cc.
octave_map call_stack::backtrace | ( | octave_idx_type & | curr_user_frame, |
bool | print_subfn = true |
||
) | const |
Definition at line 738 of file call-stack.cc.
References backtrace_frames().
Referenced by tree_evaluator::backtrace().
std::list< std::shared_ptr< stack_frame > > call_stack::backtrace_frames | ( | ) | const |
Definition at line 699 of file call-stack.cc.
Referenced by backtrace(), and backtrace_info().
std::list< std::shared_ptr< stack_frame > > call_stack::backtrace_frames | ( | octave_idx_type & | curr_user_frame | ) | const |
Definition at line 665 of file call-stack.cc.
References find_current_user_frame(), and n.
Referenced by tree_evaluator::backtrace_frames().
std::list< frame_info > call_stack::backtrace_info | ( | ) | const |
Definition at line 730 of file call-stack.cc.
std::list< frame_info > call_stack::backtrace_info | ( | octave_idx_type & | curr_user_frame, |
bool | print_subfn = true |
||
) | const |
Definition at line 707 of file call-stack.cc.
References backtrace_frames().
Referenced by tree_evaluator::backtrace_info().
|
inline |
Definition at line 76 of file call-stack.h.
Referenced by do_global_who_two().
void call_stack::clear | ( | ) |
Definition at line 831 of file call-stack.cc.
References pop().
void call_stack::clear_global_variable | ( | const std::string & | name | ) |
Definition at line 872 of file call-stack.cc.
References octave_value().
Referenced by tree_evaluator::clear_global_variable().
void call_stack::clear_global_variable_pattern | ( | const std::string & | pattern | ) |
Definition at line 881 of file call-stack.cc.
References symbol_match::match(), and octave_value().
Referenced by tree_evaluator::clear_global_variable_pattern().
void call_stack::clear_global_variable_regexp | ( | const std::string & | pattern | ) |
Definition at line 893 of file call-stack.cc.
References regexp::is_match(), and octave_value().
Referenced by tree_evaluator::clear_global_variable_regexp().
void call_stack::clear_global_variables | ( | ) |
Definition at line 905 of file call-stack.cc.
References octave_value().
Referenced by tree_evaluator::clear_global_variables().
unwind_protect * call_stack::curr_fcn_unwind_protect_frame | ( | ) |
Definition at line 191 of file call-stack.cc.
References f, and find_current_user_frame().
Referenced by tree_evaluator::curr_fcn_unwind_protect_frame(), and tree_evaluator::push_echo_state().
int call_stack::current_column | ( | ) | const |
Definition at line 107 of file call-stack.cc.
Referenced by tree_evaluator::current_column(), and tree_evaluator::do_unwind_protect_cleanup_code().
|
inline |
Definition at line 87 of file call-stack.h.
Referenced by tree_evaluator::assignin(), tree_evaluator::enter_debugger(), tree_evaluator::evalin(), tree_evaluator::evaluate_end_expression(), tree_evaluator::visit_if_command_list(), tree_evaluator::visit_return_command(), and tree_evaluator::visit_statement().
octave_function * call_stack::current_function | ( | bool | skip_first = false | ) | const |
Definition at line 67 of file call-stack.cc.
References error().
Referenced by tree_evaluator::caller_function(), tree_evaluator::current_function(), tree_evaluator::current_function_name(), tree_evaluator::evaluate_anon_fcn_handle(), is_class_constructor_executing(), is_class_method_executing(), tree_evaluator::mislocked(), tree_evaluator::mlock(), and tree_evaluator::munlock().
int call_stack::current_line | ( | ) | const |
Definition at line 93 of file call-stack.cc.
Referenced by tree_evaluator::current_line(), and tree_evaluator::do_unwind_protect_cleanup_code().
|
inline |
Definition at line 101 of file call-stack.h.
References symbol_scope::invalid().
Referenced by tree_evaluator::get_current_scope().
octave_user_code * call_stack::current_user_code | ( | ) | const |
Definition at line 121 of file call-stack.cc.
References f, and find_current_user_frame().
Referenced by tree_evaluator::current_user_code(), tree_evaluator::in_user_code(), and tree_evaluator::mfilename().
int call_stack::current_user_code_column | ( | ) | const |
Definition at line 166 of file call-stack.cc.
References f, and find_current_user_frame().
int call_stack::current_user_code_line | ( | ) | const |
Definition at line 141 of file call-stack.cc.
References line::line(), f, and find_current_user_frame().
std::shared_ptr< stack_frame > call_stack::current_user_frame | ( | ) | const |
Definition at line 529 of file call-stack.cc.
References find_current_user_frame().
Referenced by tree_evaluator::debug_where().
std::size_t call_stack::dbupdown | ( | int | n = -1 , |
bool | verbose = false |
||
) |
Definition at line 632 of file call-stack.cc.
References dbupdown(), find_current_user_frame(), and n.
std::size_t call_stack::dbupdown | ( | std::size_t | start, |
int | n, | ||
bool | verbose | ||
) |
Definition at line 541 of file call-stack.cc.
References error(), n, and octave_stdout.
Referenced by tree_evaluator::dbupdown(), dbupdown(), and tree_evaluator::enter_debugger().
octave_user_code * call_stack::debug_user_code | ( | ) | const |
Definition at line 211 of file call-stack.cc.
References f.
Referenced by tree_evaluator::debug_user_code(), and tree_evaluator::get_user_code().
int call_stack::debug_user_code_column | ( | ) | const |
Definition at line 268 of file call-stack.cc.
References f.
Referenced by tree_evaluator::debug_user_code_column().
int call_stack::debug_user_code_line | ( | ) | const |
Definition at line 238 of file call-stack.cc.
References f.
Referenced by tree_evaluator::debug_user_code_line().
void call_stack::display | ( | ) | const |
Definition at line 1191 of file call-stack.cc.
References octave_stdout, and size().
Referenced by tree_evaluator::display_call_stack().
octave_value call_stack::do_global_who_two | ( | const string_vector & | patterns, |
bool | have_regexp, | ||
bool | return_list, | ||
bool | verbose, | ||
const std::string & | msg = "" |
||
) |
Definition at line 1093 of file call-stack.cc.
References base_list< elt_type >::append(), caller_function(), symbol_info_list::display(), base_list< elt_type >::empty(), octave_value::is_defined(), regexp::is_match(), string_vector::list_in_columns(), symbol_info_list::map_value(), symbol_match::match(), octave_function::name(), string_vector::numel(), octave_stdout, octave_value(), and tree_evaluator::whos_line_format().
Referenced by do_who().
octave_value call_stack::do_who | ( | int | argc, |
const string_vector & | argv, | ||
bool | return_list, | ||
bool | verbose = false |
||
) |
Definition at line 983 of file call-stack.cc.
References do_global_who_two(), do_who_two(), error(), Fload(), tree_evaluator::get_interpreter(), ovl(), pop(), push(), string_vector::resize(), and warning().
Referenced by tree_evaluator::do_who().
octave_value call_stack::do_who_two | ( | const string_vector & | patterns, |
bool | have_regexp, | ||
bool | return_list, | ||
bool | verbose, | ||
const std::string & | msg = "" |
||
) |
Definition at line 1083 of file call-stack.cc.
References tree_evaluator::whos_line_format().
Referenced by do_who().
|
inline |
Definition at line 115 of file call-stack.h.
References n.
octave_map call_stack::empty_backtrace | ( | ) | const |
Definition at line 781 of file call-stack.cc.
Referenced by tree_evaluator::empty_backtrace().
std::size_t call_stack::find_current_user_frame | ( | ) | const |
Definition at line 511 of file call-stack.cc.
Referenced by backtrace_frames(), curr_fcn_unwind_protect_frame(), current_user_code(), current_user_code_column(), current_user_code_line(), current_user_frame(), dbupdown(), tree_evaluator::evaluate_end_expression(), and goto_caller_frame().
octave_value call_stack::get_auto_fcn_var | ( | stack_frame::auto_var_type | avt | ) | const |
Definition at line 1225 of file call-stack.cc.
Referenced by tree_evaluator::get_auto_fcn_var().
|
inline |
Definition at line 91 of file call-stack.h.
Referenced by tree_evaluator::assign(), tree_evaluator::clear_objects(), tree_evaluator::clear_variable(), tree_evaluator::clear_variable_pattern(), tree_evaluator::clear_variable_regexp(), tree_evaluator::clear_variables(), tree_evaluator::evaluate_anon_fcn_handle(), tree_evaluator::find(), tree_evaluator::install_variable(), tree_evaluator::is_defined(), tree_evaluator::is_global(), tree_evaluator::is_local_variable(), tree_evaluator::is_variable(), and tree_evaluator::varval().
std::string call_stack::get_dispatch_class | ( | ) | const |
Definition at line 299 of file call-stack.cc.
Referenced by tree_evaluator::get_dispatch_class().
symbol_info_list call_stack::get_symbol_info | ( | ) |
Definition at line 924 of file call-stack.cc.
Referenced by tree_evaluator::get_symbol_info().
octave_value call_stack::get_top_level_value | ( | const std::string & | name | ) | const |
Definition at line 970 of file call-stack.cc.
Referenced by tree_evaluator::top_level_varval().
symbol_info_list call_stack::glob_symbol_info | ( | const std::string & | pattern | ) | const |
Definition at line 912 of file call-stack.cc.
Referenced by tree_evaluator::glob_symbol_info().
std::list< std::string > call_stack::global_variable_names | ( | ) | const |
Definition at line 844 of file call-stack.cc.
Referenced by tree_evaluator::global_variable_names().
octave_value & call_stack::global_varref | ( | const std::string & | name | ) |
Definition at line 964 of file call-stack.cc.
Referenced by tree_evaluator::global_assign(), and tree_evaluator::global_varref().
octave_value call_stack::global_varval | ( | const std::string & | name | ) | const |
Definition at line 956 of file call-stack.cc.
References octave_value().
Referenced by tree_evaluator::global_varval().
void call_stack::goto_base_frame | ( | ) |
Definition at line 658 of file call-stack.cc.
Referenced by tree_evaluator::assignin(), tree_evaluator::evalin(), and tree_evaluator::goto_base_frame().
void call_stack::goto_caller_frame | ( | ) |
Definition at line 645 of file call-stack.cc.
References find_current_user_frame().
Referenced by tree_evaluator::assignin(), tree_evaluator::evalin(), and tree_evaluator::goto_caller_frame().
bool call_stack::goto_frame | ( | std::size_t | n = 0 , |
bool | verbose = false |
||
) |
Definition at line 489 of file call-stack.cc.
References n, and octave_stdout.
Referenced by tree_evaluator::evaluate_end_expression(), and tree_evaluator::goto_frame().
bool call_stack::is_class_constructor_executing | ( | std::string & | dispatch_class | ) | const |
Definition at line 326 of file call-stack.cc.
References current_function(), and f.
Referenced by tree_evaluator::is_class_constructor_executing().
bool call_stack::is_class_method_executing | ( | std::string & | dispatch_class | ) | const |
Definition at line 311 of file call-stack.cc.
References current_function(), and f.
Referenced by tree_evaluator::is_class_method_executing().
void call_stack::make_global | ( | const symbol_record & | sym | ) |
Definition at line 950 of file call-stack.cc.
Referenced by tree_evaluator::visit_decl_elt().
void call_stack::make_persistent | ( | const symbol_record & | sym | ) |
Definition at line 944 of file call-stack.cc.
Referenced by tree_evaluator::visit_decl_elt().
octave_value call_stack::max_stack_depth | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 936 of file call-stack.cc.
References octave::set_internal_variable().
Referenced by tree_evaluator::max_stack_depth().
void call_stack::pop | ( | ) |
Definition at line 787 of file call-stack.cc.
Referenced by clear(), do_who(), tree_evaluator::pop_scope(), and tree_evaluator::pop_stack_frame().
std::shared_ptr< stack_frame > call_stack::pop_return | ( | ) |
Definition at line 810 of file call-stack.cc.
Referenced by tree_evaluator::pop_return_stack_frame().
void call_stack::push | ( | const symbol_scope & | scope | ) |
Definition at line 394 of file call-stack.cc.
References stack_frame::create().
Referenced by call_stack(), do_who(), tree_evaluator::push_dummy_scope(), and tree_evaluator::push_stack_frame().
void call_stack::push | ( | octave_function * | fcn | ) |
Definition at line 471 of file call-stack.cc.
References stack_frame::create().
void call_stack::push | ( | octave_user_function * | fcn, |
const stack_frame::local_vars_map & | local_vars, | ||
const std::shared_ptr< stack_frame > & | closure_frames = std::shared_ptr<stack_frame> () |
||
) |
Definition at line 432 of file call-stack.cc.
References stack_frame::create().
void call_stack::push | ( | octave_user_function * | fcn, |
const std::shared_ptr< stack_frame > & | closure_frames = std::shared_ptr<stack_frame> () |
||
) |
Definition at line 412 of file call-stack.cc.
References stack_frame::create().
void call_stack::push | ( | octave_user_script * | script | ) |
Definition at line 453 of file call-stack.cc.
References stack_frame::create().
symbol_info_list call_stack::regexp_symbol_info | ( | const std::string & | pattern | ) | const |
Definition at line 918 of file call-stack.cc.
Referenced by tree_evaluator::regexp_symbol_info().
|
inline |
Definition at line 202 of file call-stack.h.
References n.
Referenced by tree_evaluator::assignin(), tree_evaluator::enter_debugger(), tree_evaluator::evalin(), tree_evaluator::evaluate_end_expression(), and tree_evaluator::restore_frame().
void call_stack::set_auto_fcn_var | ( | stack_frame::auto_var_type | avt, |
const octave_value & | val | ||
) |
Definition at line 1206 of file call-stack.cc.
Referenced by tree_evaluator::set_auto_fcn_var().
|
inline |
Definition at line 190 of file call-stack.h.
Referenced by tree_evaluator::do_unwind_protect_cleanup_code().
void call_stack::set_dispatch_class | ( | const std::string & | class_name | ) |
Definition at line 305 of file call-stack.cc.
Referenced by tree_evaluator::set_dispatch_class().
|
inline |
Definition at line 180 of file call-stack.h.
Referenced by tree_evaluator::do_unwind_protect_cleanup_code().
|
inline |
Definition at line 169 of file call-stack.h.
Referenced by tree_evaluator::visit_if_command_list(), and tree_evaluator::visit_statement().
void call_stack::set_nargin | ( | int | nargin | ) |
Definition at line 1213 of file call-stack.cc.
Referenced by tree_evaluator::set_nargin().
void call_stack::set_nargout | ( | int | nargout | ) |
Definition at line 1219 of file call-stack.cc.
Referenced by tree_evaluator::set_nargout().
void call_stack::set_top_level_value | ( | const std::string & | name, |
const octave_value & | value | ||
) |
Definition at line 976 of file call-stack.cc.
Referenced by tree_evaluator::top_level_assign().
|
inline |
Definition at line 89 of file call-stack.h.
Referenced by display(), and tree_evaluator::execute_user_script().
std::list< std::string > call_stack::top_level_variable_names | ( | ) | const |
Definition at line 860 of file call-stack.cc.
Referenced by tree_evaluator::top_level_variable_names().
|
inline |
Definition at line 96 of file call-stack.h.
Referenced by tree_evaluator::get_top_scope().
symbol_info_list call_stack::top_scope_symbol_info | ( | ) | const |
Definition at line 930 of file call-stack.cc.
Referenced by tree_evaluator::top_scope_symbol_info().
std::list< std::string > call_stack::variable_names | ( | ) | const |
Definition at line 866 of file call-stack.cc.
Referenced by tree_evaluator::variable_names().