26 #if ! defined (octave_stack_frame_h)
27 #define octave_stack_frame_h 1
29 #include "octave-config.h"
169 const std::shared_ptr<stack_frame>&
access_link = std::shared_ptr<stack_frame> ());
177 const std::shared_ptr<stack_frame>&
access_link = std::shared_ptr<stack_frame> ());
217 std::string
fcn_name (
bool print_subfn =
true)
const
227 if (print_subfn && ! parent_fcn_name.empty ())
228 retval = parent_fcn_name +
'>';
231 retval +=
"@<anonymous>";
233 retval += fcn->
name ();
236 retval =
"<unknown>";
251 bool return_list,
bool verbose,
252 const std::string& whos_line_fmt,
253 const std::string& msg);
282 std::string nm = sym.
name ();
283 error (
"can't make function parameter %s persistent", nm.c_str ());
288 std::string nm = sym.
name ();
289 error (
"can't make global variable '%s' persistent", nm.c_str ());
301 std::string nm = sym.
name ();
302 error (
"can't make persistent variable '%s' global", nm.c_str ());
310 std::shared_ptr<stack_frame>
313 std::shared_ptr<stack_frame>
316 std::shared_ptr<stack_frame>
319 virtual std::size_t
size (
void)
const;
321 virtual void resize (std::size_t);
464 const std::string& type,
465 const std::list<octave_value_list>& idx,
481 const std::string& type,
482 const std::list<octave_value_list>& idx)
491 const std::list<octave_value_list>& idx)
const
498 retval = retval.
subsref (type, idx);
551 virtual void display (
bool follow =
true)
const;
virtual bool is_anonymous_function(void) const
virtual std::string fcn_file_name(void) const
virtual std::string parent_fcn_name(void) const
std::string name(void) const
octave_idx_type length(void) const
octave_idx_type get_count(void) const
OCTINTERP_API octave_value & non_const_unary_op(unary_op op)
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
OCTINTERP_API octave_value & assign(assign_op op, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
bool is_constant(void) const
void call_object_destructor(void)
OCTINTERP_API octave_value storable_value(void) const
bool is_defined(void) const
bool isobject(void) const
virtual scope_flags get_scope_flag(std::size_t) const
octave_value workspace(void)
symbol_info_list glob_symbol_info(const std::string &pattern)
std::shared_ptr< stack_frame > parent_link(void) const
std::string get_dispatch_class(void) const
bool is_persistent(const std::string &name) const
std::shared_ptr< stack_frame > static_link(void) const
void unmark_persistent(const symbol_record &sym)
void set_dispatch_class(const std::string &class_name)
bool is_object(const std::string &name) const
stack_frame & operator=(const stack_frame &elt)=delete
void make_global(const symbol_record &sym)
virtual octave_value varval(const symbol_record &sym) const =0
void clear(const symbol_record &sym)
std::size_t index(void) const
static stack_frame * create(tree_evaluator &tw, octave_function *fcn, std::size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link)
octave_value value(const symbol_record &sym, const std::string &type, const std::list< octave_value_list > &idx) const
stack_frame(const stack_frame &elt)=default
bool is_global(const symbol_record &sym) const
std::string m_dispatch_class
void clear_variable_regexp(const std::string &pattern)
void mark_global(const symbol_record &sym)
void clear_variable_pattern(const std::string &pattern)
virtual symbol_record lookup_symbol(const std::string &) const =0
symbol_info_list all_variables(void)
bool is_global(const std::string &name) const
octave_value find_subfunction(const std::string &name) const
void install_variable(const std::string &name, const octave_value &value, bool global)
symbol_info_list regexp_symbol_info(const std::string &pattern)
virtual void display(bool follow=true) const
bool is_closure_context(void) const
virtual void set_scope_flag(std::size_t, scope_flags)
bool is_defined(const symbol_record &sym) const
virtual void accept(stack_frame_walker &sfw)=0
virtual ~stack_frame(void)=default
void display_stopped_in_message(std::ostream &os) const
octave_value varval(const std::string &name) const
virtual bool is_compiled_fcn_frame(void) const
std::shared_ptr< stack_frame > m_parent_link
virtual void set_auto_fcn_var(auto_var_type, const octave_value &)=0
void assign(octave_value::assign_op op, const symbol_record &sym, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
bool is_persistent(const symbol_record &sym) const
std::shared_ptr< stack_frame > m_access_link
void non_const_unary_op(octave_value::unary_op op, const symbol_record &sym, const std::string &type, const std::list< octave_value_list > &idx)
virtual bool is_scope_frame(void) const
virtual bool is_user_script_frame(void) const
virtual octave_value & varref(const symbol_record &sym)=0
std::list< std::string > variable_names(void) const
std::string fcn_name(bool print_subfn=true) const
virtual std::size_t size(void) const
symbol_info_list get_symbol_info(void)
void assign(const symbol_record &sym, const octave_value &val)
virtual octave_value get_auto_fcn_var(auto_var_type) const =0
bool is_object(const symbol_record &sym) const
virtual unwind_protect * unwind_protect_frame(void)
virtual symbol_scope get_scope(void) const =0
void install_variable(const symbol_record &sym, const octave_value &value, bool global)
void clear_variable(const std::string &name)
std::shared_ptr< stack_frame > m_static_link
std::map< std::string, octave_value > local_vars_map
void mark_closure_context(void)
virtual void mark_scope(const symbol_record &, scope_flags)=0
void assign(const std::string &name, const octave_value &val)
octave_value who(const string_vector &patterns, bool have_regexp, bool return_list, bool verbose, const std::string &whos_line_fmt, const std::string &msg)
void unmark_global(const symbol_record &sym)
virtual scope_flags scope_flag(const symbol_record &) const =0
virtual void clear_values(void)
bool is_local_variable(const std::string &name) const
tree_evaluator & m_evaluator
virtual void break_closure_cycles(const std::shared_ptr< stack_frame > &)
void mark_persistent(const symbol_record &sym)
virtual symbol_record insert_symbol(const std::string &)=0
stack_frame(tree_evaluator &tw, std::size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link, const std::shared_ptr< stack_frame > &access_link)
void clear_variables(void)
bool m_is_closure_context
virtual bool is_user_fcn_frame(void) const
bool is_variable(const std::string &name) const
virtual void resize(std::size_t)
std::string fcn_file_name(void) const
void make_persistent(const symbol_record &sym)
std::shared_ptr< stack_frame > access_link(void) const
bool is_variable(const symbol_record &sym) const
symbol_info_list make_symbol_info_list(const std::list< symbol_record > &symrec_list) const
std::string name(void) const
bool is_formal(void) const
octave_value find_subfunction(const std::string &name) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void error(const char *fmt,...)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))