26 #if defined (HAVE_CONFIG_H)
61 const std::shared_ptr<stack_frame>& parent_link,
62 const std::shared_ptr<stack_frame>& static_link)
64 static_link->access_link ()),
79 return m_static_link->get_scope ();
86 return m_static_link->lookup_symbol (name);
91 return m_static_link->insert_symbol (name);
99 return m_static_link->scope_flag (sym);
104 m_static_link->set_auto_fcn_var (avt, val);
109 return m_static_link->get_auto_fcn_var (avt);
123 return m_static_link->varval (sym);
131 return m_static_link->varref (sym);
139 m_static_link->mark_scope (sym, flag);
142 void display (
bool follow =
true)
const;
196 static std::shared_ptr<stack_frame>
227 std::size_t& frame_offset,
228 std::size_t& data_offset);
231 std::size_t& frame_offset,
232 std::size_t& data_offset)
const;
235 std::size_t& data_offset)
const;
261 void display (
bool follow =
true)
const;
324 return m_flags.at (data_offset);
329 m_flags.at (data_offset) = flag;
358 void display (
bool follow =
true)
const;
403 const std::shared_ptr<stack_frame>&
access_link = std::shared_ptr<stack_frame> ())
417 const std::shared_ptr<stack_frame>&
access_link = std::shared_ptr<stack_frame> ())
427 for (
const auto& nm_ov : local_vars)
428 assign (nm_ov.first, nm_ov.second);
443 static std::shared_ptr<stack_frame>
480 void display (
bool follow =
true)
const;
550 void display (
bool follow =
true)
const;
568 os <<
"scope: " << scope.
name () << std::endl;
572 os <<
"name (frame offset, data offset, storage class):"
575 std::list<symbol_record> symbols = scope.
symbol_list ();
577 for (
auto& sym : symbols)
579 os <<
" " << sym.name () <<
" (" << sym.frame_offset ()
580 <<
", " << sym.data_offset () <<
", " << sym.storage_class ()
650 std::shared_ptr<stack_frame> slink = frame.
static_link ();
653 slink->accept (*
this);
658 std::shared_ptr<stack_frame> alink = frame.
access_link ();
661 alink->accept (*
this);
668 std::shared_ptr<stack_frame> alink = frame.
access_link ();
671 alink->accept (*
this);
678 std::shared_ptr<stack_frame> alink = frame.
access_link ();
681 alink->accept (*
this);
688 std::string name = sym.
name ();
713 const std::list<symbol_record>& symbols)
717 for (
const auto& sym : symbols)
730 for (
const auto& sym : symbols)
747 for (
const auto& sym : symbols)
749 if (pat.
match (sym.name ()))
760 std::list<symbol_record> symbols = scope.
symbol_list ();
780 bool have_regexp =
false)
787 bool have_regexp =
false)
818 std::list<std::string>
names (
void)
const
820 std::list<std::string> retval;
826 std::list<std::string> nm_list = lst.
names ();
828 for (
const auto& nm : nm_list)
829 retval.push_back (nm);
843 for (
const auto& syminf : lst)
863 std::string scope_name = nm_sil.first;
866 map_list[j] = lst.
map_value (scope_name, n_frames-j);
878 os <<
"\nvariables in scope: " << nm_sil.first <<
"\n\n";
892 std::shared_ptr<stack_frame> slink = frame.
static_link ();
895 slink->accept (*
this);
900 std::shared_ptr<stack_frame> alink = frame.
access_link ();
903 alink->accept (*
this);
910 std::shared_ptr<stack_frame> alink = frame.
access_link ();
913 alink->accept (*
this);
920 std::shared_ptr<stack_frame> alink = frame.
access_link ();
923 alink->accept (*
this);
934 std::list<symbol_record>
937 std::list<symbol_record> new_symbols;
941 for (
const auto& sym : symbols)
945 std::string name = sym.name ();
953 new_symbols.push_back (sym);
967 for (
const auto& sym : symbols)
969 std::string name = sym.name ();
979 new_symbols.push_back (sym);
994 for (
const auto& sym : symbols)
996 std::string name = sym.name ();
1006 new_symbols.push_back (sym);
1019 std::list<symbol_record> symbols = scope.
symbol_list ();
1022 symbols =
filter (frame, symbols);
1042 const std::shared_ptr<stack_frame>& parent_link,
1043 const std::shared_ptr<stack_frame>& static_link)
1052 const std::shared_ptr<stack_frame>& parent_link,
1053 const std::shared_ptr<stack_frame>& static_link)
1060 const std::shared_ptr<stack_frame>& parent_link,
1061 const std::shared_ptr<stack_frame>& static_link,
1062 const std::shared_ptr<stack_frame>& access_link)
1070 const std::shared_ptr<stack_frame>& parent_link,
1071 const std::shared_ptr<stack_frame>& static_link,
1073 const std::shared_ptr<stack_frame>& access_link)
1082 const std::shared_ptr<stack_frame>& parent_link,
1083 const std::shared_ptr<stack_frame>& static_link)
1094 warning (
"invalid call to stack_frame::clear_values; please report");
1102 for (
const auto& sym : symrec_list)
1113 symbol_stats.
append (syminf);
1116 return symbol_stats;
1120 bool have_regexp,
bool return_list,
1121 bool verbose,
const std::string& whos_line_fmt,
1122 const std::string& msg)
1135 else if (! sym_inf_accum.
is_empty ())
1139 octave_stdout <<
"Variables visible from the current scope:\n";
1172 std::list<octave_scalar_map> ws_list;
1182 for (
const auto& sym_name : symbols.
names ())
1187 ws.
assign (sym_name, val);
1190 ws_list.push_back (ws);
1192 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
1196 Cell ws_frames (ws_list.size (), 1);
1199 for (
const auto& elt : ws_list)
1200 ws_frames(i++) = elt;
1210 std::list<std::string> retval;
1214 const std::map<std::string, symbol_record>& symbols = scope.
symbols ();
1216 for (
const auto& nm_sr : symbols)
1219 retval.push_back (nm_sr.first);
1290 std::string nm = sym.
name ();
1293 "global: '%s' is defined in the current scope.\n",
1296 "global: in a future version, global variables must be declared before use.\n");
1307 "global: global value overrides existing local value");
1314 "global: existing local value used to initialize global variable");
1397 os <<
"at top level" << std::endl;
1400 os <<
"stopped in " <<
fcn_name ();
1404 os <<
" at line " <<
line ();
1414 os <<
"-- [stack_frame] (" <<
this <<
") --" << std::endl;
1416 os <<
"parent link: ";
1423 os <<
"static link: ";
1430 os <<
"access link: ";
1437 os <<
"line: " <<
m_line << std::endl;
1438 os <<
"column: " <<
m_column << std::endl;
1439 os <<
"index: " <<
m_index << std::endl;
1446 os <<
"FOLLOWING ACCESS LINKS:" << std::endl;
1447 std::shared_ptr<stack_frame> frm =
access_link ();
1450 frm->display (
false);
1453 frm = frm->access_link ();
1461 os <<
"-- [compiled_fcn_stack_frame] (" <<
this <<
") --" << std::endl;
1476 const std::shared_ptr<stack_frame>& parent_link,
1477 const std::shared_ptr<stack_frame>& static_link)
1478 :
stack_frame (tw, index, parent_link, static_link,
1479 get_access_link (static_link)),
1480 m_script (script), m_unwind_protect_frame (nullptr),
1481 m_lexical_frame_offsets (get_num_symbols (script), 1),
1482 m_value_offsets (get_num_symbols (script), 0)
1501 std::size_t num_script_symbols = script_scope.
num_symbols ();
1503 resize (num_script_symbols);
1505 const std::map<std::string, symbol_record>& script_symbols
1512 (
const std::map<std::string, symbol_record>& script_symbols)
1523 for (
const auto& nm_sr : script_symbols)
1525 std::string name = nm_sr.first;
1530 std::size_t count = 1;
1532 while (parent_scope)
1534 const std::map<std::string, symbol_record>& parent_scope_symbols
1537 auto p = parent_scope_symbols.find (name);
1539 if (p != parent_scope_symbols.end ())
1544 std::size_t script_sr_data_offset = script_sr.
data_offset ();
1562 error (
"symbol '%s' cannot be added to static scope",
1568 const std::map<std::string, symbol_record>& eval_scope_symbols
1571 for (
const auto& nm_sr : script_symbols)
1573 std::string name = nm_sr.first;
1576 auto p = eval_scope_symbols.find (name);
1580 if (p == eval_scope_symbols.end ())
1581 eval_scope_sr = eval_scope.
insert (name);
1583 eval_scope_sr = p->second;
1585 std::size_t script_sr_data_offset = script_sr.
data_offset ();
1615 std::map<std::string, symbol_record> tmp_symbols;
1616 tmp_symbols[sym.
name ()] = sym;
1623 std::shared_ptr<stack_frame>
1631 while (alink->is_user_script_frame ())
1633 if (alink->access_link ())
1634 alink = alink->access_link ();
1710 std::size_t& frame_offset,
1711 std::size_t& data_offset)
const
1722 std::string name = script_sr.
name ();
1726 std::size_t count = 1;
1728 while (parent_scope)
1730 const std::map<std::string, symbol_record>& parent_scope_symbols
1733 auto p = parent_scope_symbols.find (name);
1735 if (p != parent_scope_symbols.end ())
1740 frame_offset = parent_scope_sr.
frame_offset () + count;
1755 const std::map<std::string, symbol_record>& eval_scope_symbols
1758 std::string name = script_sr.
name ();
1760 auto p = eval_scope_symbols.find (name);
1764 if (p != eval_scope_symbols.end ())
1767 eval_scope_sr = p->second;
1782 std::size_t& frame_offset,
1783 std::size_t& data_offset)
const
1788 if (frame_offset == 0)
1796 if (data_offset >=
size ())
1807 if (frame_offset == 0)
1831 std::size_t& frame_offset,
1832 std::size_t& data_offset)
1837 if (frame_offset == 0)
1839 if (data_offset >=
size ())
1856 if (frame_offset == 0)
1871 std::map<std::string, symbol_record> tmp_symbols;
1872 tmp_symbols[sym.
name ()] = sym;
1894 std::size_t frame_offset;
1895 std::size_t data_offset;
1908 for (std::size_t i = 0; i < frame_offset; i++)
1910 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
1915 error (
"internal error: invalid access link in function call stack");
1917 if (data_offset >= frame->
size ())
1925 std::size_t frame_offset;
1926 std::size_t data_offset;
1938 for (std::size_t i = 0; i < frame_offset; i++)
1940 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
1945 error (
"internal error: invalid access link in function call stack");
1947 if (data_offset >= frame->
size ())
1953 return frame->
varval (data_offset);
1966 error (
"internal error: invalid switch case");
1971 std::size_t frame_offset;
1972 std::size_t data_offset;
1980 for (std::size_t i = 0; i < frame_offset; i++)
1982 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
1986 if (data_offset >= frame->
size ())
1987 frame->
resize (data_offset+1);
1992 return frame->
varref (data_offset);
2005 error (
"internal error: invalid switch case");
2013 if (data_offset >=
size ())
2021 if (frame_offset > 1)
2022 error (
"variables must be made PERSISTENT or GLOBAL in the first scope in which they are used");
2024 std::shared_ptr<stack_frame> frame =
access_link ();
2026 if (data_offset >= frame->size ())
2027 frame->resize (data_offset+1);
2029 frame->set_scope_flag (data_offset, flag);
2036 os <<
"-- [script_stack_frame] (" <<
this <<
") --" << std::endl;
2066 os <<
"-- [base_value_stack_frame] (" <<
this <<
") --" << std::endl;
2069 os <<
"values: " <<
m_values.size ()
2070 <<
" elements (idx, scope flag, type):" << std::endl;
2072 for (std::size_t i = 0; i <
m_values.size (); i++)
2074 os <<
" (" << i <<
", " <<
m_flags.at (i) <<
", ";
2086 std::shared_ptr<stack_frame>
2088 const std::shared_ptr<stack_frame>& static_link)
2090 std::shared_ptr<stack_frame> alink;
2097 error (
"internal call stack error (invalid static link)");
2104 if (caller_nesting_depth < nesting_depth)
2119 int links_to_follow = caller_nesting_depth - nesting_depth + 1;
2123 while (alink && --links_to_follow >= 0)
2124 alink = alink->access_link ();
2127 error (
"internal function nesting error (invalid access link)");
2138 const std::list<symbol_record>& symbols = fcn_scope.
symbol_list ();
2143 for (
const auto& sym : symbols)
2145 std::size_t frame_offset = sym.frame_offset ();
2147 if (frame_offset > 0)
2150 std::size_t data_offset = sym.data_offset ();
2152 if (data_offset >=
size ())
2189 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
2245 for (std::size_t i = 0; i < frame_offset; i++)
2247 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
2252 error (
"internal error: invalid access link in function call stack");
2254 if (data_offset >= frame->
size ())
2270 for (std::size_t i = 0; i < frame_offset; i++)
2272 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
2277 error (
"internal error: invalid access link in function call stack");
2279 if (data_offset >= frame->
size ())
2285 return frame->
varval (data_offset);
2298 error (
"internal error: invalid switch case");
2311 for (std::size_t i = 0; i < frame_offset; i++)
2313 std::shared_ptr<stack_frame> nxt = frame->
access_link ();
2317 if (data_offset >= frame->
size ())
2318 frame->
resize (data_offset+1);
2323 return frame->
varref (data_offset);
2336 error (
"internal error: invalid switch case");
2344 error (
"variables must be made PERSISTENT or GLOBAL in the first scope in which they are used");
2348 if (data_offset >=
size ())
2358 os <<
"-- [user_fcn_stack_frame] (" <<
this <<
") --" << std::endl;
2375 val.break_closure_cycles (frame);
2409 if (data_offset >=
size ())
2422 if (data_offset >=
size ())
2437 error (
"internal error: invalid switch case");
2447 if (data_offset >=
size ())
2462 error (
"internal error: invalid switch case");
2473 if (data_offset >=
size ())
2483 os <<
"-- [scope_stack_frame] (" <<
this <<
") --" << std::endl;
void push_back(const elt_type &s)
void append(const elt_type &s)
octave_value varval(std::size_t data_offset) const
std::vector< octave_value > m_values
virtual octave_value varval(const symbol_record &sym) const=0
octave_value get_auto_fcn_var(auto_var_type avt) const
base_value_stack_frame(void)=delete
stack_frame::scope_flags get_scope_flag(std::size_t data_offset) const
base_value_stack_frame(tree_evaluator &tw, std::size_t num_symbols, 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)
std::size_t size(void) const
~base_value_stack_frame(void)=default
std::vector< scope_flags > m_flags
void display(bool follow=true) const
void resize(std::size_t size)
virtual octave_value & varref(const symbol_record &sym)=0
octave_value & varref(std::size_t data_offset)
base_value_stack_frame & operator=(const base_value_stack_frame &elt)=delete
void set_scope_flag(std::size_t data_offset, scope_flags flag)
void set_auto_fcn_var(auto_var_type avt, const octave_value &val)
std::vector< octave_value > m_auto_vars
base_value_stack_frame(const base_value_stack_frame &elt)=default
symbol_record lookup_symbol(const std::string &name) const
bool is_compiled_fcn_frame(void) const
void accept(stack_frame_walker &sfw)
symbol_record insert_symbol(const std::string &name)
octave_value get_auto_fcn_var(auto_var_type avt) const
octave_value varval(const symbol_record &sym) const
stack_frame::scope_flags scope_flag(const symbol_record &sym) const
compiled_fcn_stack_frame(const compiled_fcn_stack_frame &elt)=default
void set_auto_fcn_var(auto_var_type avt, const octave_value &val)
void display(bool follow=true) const
symbol_scope get_scope(void) const
~compiled_fcn_stack_frame(void)=default
void mark_scope(const symbol_record &sym, scope_flags flag)
compiled_fcn_stack_frame(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 & varref(const symbol_record &sym)
compiled_fcn_stack_frame(void)=delete
bool match(const std::string &str) const
virtual std::string type_name(void) const
std::string name(void) const
static octave_map cat(int dim, octave_idx_type n, const octave_scalar_map *map_list)
void assign(const std::string &k, const octave_value &val)
octave::symbol_scope scope(void)
std::string type_name(void) const
std::string type_name(void) const
octave_idx_type get_count(void) const
void call_object_destructor(void)
bool is_defined(void) const
std::string type_name(void) const
bool is_match(const std::string &buffer) const
scope_stack_frame(tree_evaluator &tw, const symbol_scope &scope, std::size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link)
octave_value varval(std::size_t data_offset) const
void mark_scope(const symbol_record &sym, scope_flags flag)
symbol_record lookup_symbol(const std::string &name) const
bool is_scope_frame(void) const
scope_stack_frame(const scope_stack_frame &elt)=default
~scope_stack_frame(void)=default
scope_stack_frame & operator=(const scope_stack_frame &elt)=delete
void accept(stack_frame_walker &sfw)
void display(bool follow=true) const
symbol_record insert_symbol(const std::string &)
octave_value & varref(std::size_t data_offset)
scope_flags scope_flag(const symbol_record &sym) const
scope_stack_frame(void)=delete
symbol_scope get_scope(void) const
void display(bool follow=true) const
bool get_val_offsets(const symbol_record &sym, std::size_t &frame_offset, std::size_t &data_offset) const
void mark_scope(const symbol_record &sym, scope_flags flag)
scope_flags scope_flag(const symbol_record &sym) const
virtual octave_value varval(const symbol_record &sym) const=0
symbol_record insert_symbol(const std::string &)
unwind_protect * m_unwind_protect_frame
bool is_user_script_frame(void) const
octave_user_script * m_script
std::size_t size(void) const
symbol_scope get_scope(void) const
void set_script_offsets(void)
script_stack_frame(void)=delete
octave_value get_auto_fcn_var(auto_var_type avt) const
void get_val_offsets_with_insert(const symbol_record &sym, std::size_t &frame_offset, std::size_t &data_offset)
void resize(std::size_t size)
void accept(stack_frame_walker &sfw)
~script_stack_frame(void)
virtual octave_value & varref(const symbol_record &sym)=0
unwind_protect * unwind_protect_frame(void)
script_stack_frame(const script_stack_frame &elt)=default
static std::shared_ptr< stack_frame > get_access_link(const std::shared_ptr< stack_frame > &static_link)
std::vector< std::size_t > m_lexical_frame_offsets
void set_script_offsets_internal(const std::map< std::string, symbol_record > &symbols)
static std::size_t get_num_symbols(octave_user_script *script)
std::vector< std::size_t > m_value_offsets
void set_auto_fcn_var(auto_var_type avt, const octave_value &val)
void resize_and_update_script_offsets(const symbol_record &sym)
script_stack_frame & operator=(const script_stack_frame &elt)=delete
symbol_record lookup_symbol(const std::string &name) const
bool get_val_offsets_internal(const symbol_record &sym, std::size_t &frame_offset, std::size_t &data_offset) const
virtual void visit_scope_stack_frame(scope_stack_frame &)=0
virtual void visit_script_stack_frame(script_stack_frame &)=0
stack_frame_walker & operator=(const stack_frame_walker &)=delete
virtual void visit_user_fcn_stack_frame(user_fcn_stack_frame &)=0
virtual void visit_compiled_fcn_stack_frame(compiled_fcn_stack_frame &)=0
stack_frame_walker(const stack_frame_walker &)=delete
virtual ~stack_frame_walker(void)=default
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::shared_ptr< stack_frame > static_link(void) const
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
bool is_global(const symbol_record &sym) const
void clear_variable_regexp(const std::string &pattern)
void mark_global(const symbol_record &sym)
void clear_variable_pattern(const std::string &pattern)
symbol_info_list all_variables(void)
symbol_info_list regexp_symbol_info(const std::string &pattern)
virtual void display(bool follow=true) 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
void display_stopped_in_message(std::ostream &os) const
std::shared_ptr< stack_frame > m_parent_link
bool is_persistent(const symbol_record &sym) const
std::shared_ptr< stack_frame > m_access_link
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
void assign(const symbol_record &sym, const octave_value &val)
bool is_object(const symbol_record &sym) const
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
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)
virtual void clear_values(void)
tree_evaluator & m_evaluator
void clear_variables(void)
virtual bool is_user_fcn_frame(void) const
virtual void resize(std::size_t)
std::string fcn_file_name(void) const
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::ostream & list_in_columns(std::ostream &, int width=0, const std::string &prefix="") const
octave_idx_type numel(void) const
void clear_symbols(stack_frame &frame, const std::list< symbol_record > &symbols)
symbol_cleaner(bool clear_all_names=true, bool clear_objects=false)
symbol_cleaner(const std::string &pattern, bool have_regexp=false)
std::set< std::string > m_cleared_names
symbol_cleaner(const string_vector &patterns, bool have_regexp=false)
symbol_cleaner & operator=(const symbol_cleaner &)=delete
void visit_script_stack_frame(script_stack_frame &frame)
void visit_compiled_fcn_stack_frame(compiled_fcn_stack_frame &frame)
void visit_user_fcn_stack_frame(user_fcn_stack_frame &frame)
void maybe_clear_symbol(stack_frame &frame, const symbol_record &sym)
symbol_cleaner(const symbol_cleaner &)=delete
void visit_scope_stack_frame(scope_stack_frame &frame)
~symbol_cleaner(void)=default
void clean_frame(stack_frame &frame)
std::set< std::string > m_found_names
symbol_info_accumulator(const string_vector &patterns, bool have_regexp=false)
std::list< std::pair< std::string, symbol_info_list > > m_sym_inf_list
symbol_info_accumulator(const std::string &pattern, bool have_regexp=false)
symbol_info_list symbol_info(void) const
void visit_script_stack_frame(script_stack_frame &frame)
void visit_compiled_fcn_stack_frame(compiled_fcn_stack_frame &frame)
std::pair< std::string, symbol_info_list > syminf_list_elt
std::list< std::string > names(void) const
void append_list(stack_frame &frame)
std::list< symbol_record > filter(stack_frame &frame, const std::list< symbol_record > &symbols)
bool is_empty(void) const
symbol_info_accumulator(const symbol_info_accumulator &)=delete
~symbol_info_accumulator(void)=default
octave_map map_value(void) const
symbol_info_accumulator(bool match_all=true, bool first_only=true)
void visit_scope_stack_frame(scope_stack_frame &frame)
void display(std::ostream &os, const std::string &format) const
symbol_info_accumulator & operator=(const symbol_info_accumulator &)=delete
void visit_user_fcn_stack_frame(user_fcn_stack_frame &frame)
void display(std::ostream &os, const std::string &format) const
octave_value varval(const std::string &name) const
std::list< std::string > names(void) const
octave_map map_value(const std::string &caller_function_name, int nesting_level) const
std::size_t data_offset(void) const
std::size_t frame_offset(void) const
std::string name(void) const
void set_frame_offset(std::size_t offset)
bool is_valid(void) const
symbol_record dup(void) const
std::list< symbol_record > symbol_list(void) const
std::shared_ptr< symbol_scope_rep > parent_scope(void) const
symbol_record find_symbol(const std::string &name)
std::size_t nesting_depth(void) const
bool is_nested(void) const
std::string name(void) const
std::size_t num_symbols(void) const
octave_value persistent_varval(std::size_t data_offset) const
symbol_record insert(const std::string &name)
const std::map< std::string, symbol_record > & symbols(void) const
octave_value & persistent_varref(std::size_t data_offset)
symbol_record lookup_symbol(const std::string &name) const
octave_value & global_varref(const std::string &name)
octave_value global_varval(const std::string &name) const
octave_value varval(std::size_t data_offset) const
static std::shared_ptr< stack_frame > get_access_link(octave_user_function *fcn, const std::shared_ptr< stack_frame > &static_link)
void display(bool follow=true) const
unwind_protect * m_unwind_protect_frame
user_fcn_stack_frame(tree_evaluator &tw, octave_user_function *fcn, 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=std::shared_ptr< stack_frame >())
bool is_user_fcn_frame(void) const
octave_user_function * m_fcn
scope_flags scope_flag(const symbol_record &sym) const
symbol_scope get_scope(void) const
unwind_protect * unwind_protect_frame(void)
user_fcn_stack_frame(const user_fcn_stack_frame &elt)=default
void break_closure_cycles(const std::shared_ptr< stack_frame > &frame)
void accept(stack_frame_walker &sfw)
symbol_record insert_symbol(const std::string &)
user_fcn_stack_frame(void)=delete
~user_fcn_stack_frame(void)
symbol_record lookup_symbol(const std::string &name) const
octave_value & varref(std::size_t data_offset)
user_fcn_stack_frame(tree_evaluator &tw, octave_user_function *fcn, std::size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link, const local_vars_map &local_vars, const std::shared_ptr< stack_frame > &access_link=std::shared_ptr< stack_frame >())
user_fcn_stack_frame & operator=(const user_fcn_stack_frame &elt)=delete
void mark_scope(const symbol_record &sym, scope_flags flag)
static std::size_t get_num_symbols(octave_user_function *fcn)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void warning(const char *fmt,...)
void warning_with_id(const char *id, const char *fmt,...)
void error(const char *fmt,...)
void panic_unless(bool cond)
#define panic_impossible()
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
static void display_scope(std::ostream &os, const symbol_scope &scope)
std::size_t format(std::ostream &os, const char *fmt,...)