GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
stack-frame.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1993-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_stack_frame_h)
27 #define octave_stack_frame_h 1
28 
29 #include "octave-config.h"
30 
31 #include <deque>
32 #include <iosfwd>
33 #include <list>
34 #include <map>
35 #include <memory>
36 #include <string>
37 
38 class octave_value;
39 class octave_value_list;
40 
41 #include "error.h"
42 #include "ov-fcn.h"
43 #include "ov-usr-fcn.h"
44 #include "syminfo.h"
45 #include "symscope.h"
46 
47 // Variable values are stored in the stack_frame objects that make up
48 // the call_stack. There are four separate stack_frame objects
49 // corresponding to the following language elements:
50 //
51 // * user-defined functions
52 //
53 // These are .m files. They have local variables.
54 //
55 // * scripts
56 //
57 // These are .m files, but not functions. They access variables,
58 // but do not store any values directly. All values are stored in
59 // the stack frame corresponding to the scope in which they are
60 // executed.
61 //
62 // * scopes that do not correspond to functions
63 //
64 // This is primarily used by the top-level scope but the
65 // interpreter may also create temporary scopes in which to
66 // evaluate functions or scripts.
67 //
68 // * compiled functions
69 //
70 // These are built-in functions and dynamically-loaded compiled
71 // functions (.mex and .oct files) and do not contain variable
72 // values of their own. They are skipped when Octave displays a
73 // stack trace.
74 //
75 // All stack frames also contain the following data:
76 //
77 // * a reference to the evaluator that contains the frame
78 //
79 // Global variables are now stored in the evaluator and this link
80 // gives us immediate access to them.
81 //
82 // * line and column in the source file where the stack frame was created
83 //
84 // These values are used to print stack traces.
85 //
86 // * A pointer to the nearest parent frame that contains variable
87 // info (the "static" link)
88 //
89 // A frame that contains variable info may be a user-defined
90 // function, script, or scope frame. This pointer should never
91 // point to a compiled function stack frame.
92 //
93 // * A pointer to the nearest lexical parent frame (the "access" link)
94 //
95 // Used to access non-local variables for nested and anonymous
96 // functions or as a link to the parent frame in which a script is
97 // executed. This pointer should only point to a parent function
98 // stack frame.
99 
101 
102 class tree_evaluator;
103 class symbol_info_list;
104 class unwind_protect;
105 
106 class stack_frame_walker;
107 
109 {
110 public:
111 
112  typedef std::map<std::string, octave_value> local_vars_map;
113 
114  // Markers indicating the type of a variable. Values for local
115  // variables are stored in the stack frame. Values for
116  // global variables are stored in the tree_evaluator object that
117  // contains the stack frame. Values for persistent variables are
118  // stored in the function scope corresponding to the stack frame.
119 
121  {
124  PERSISTENT
125  };
126 
127  // Index into the list of automatic variables for user-defined
128  // function stack frames.
129 
131  {
138  };
139 
140  stack_frame () = delete;
141 
142  stack_frame (tree_evaluator& tw, std::size_t index,
143  const std::shared_ptr<stack_frame>& parent_link,
144  const std::shared_ptr<stack_frame>& static_link,
145  const std::shared_ptr<stack_frame>& access_link)
146  : m_evaluator (tw), m_is_closure_context (false),
147  m_line (-1), m_column (-1), m_index (index),
150  { }
151 
152  // Compiled function.
153  static stack_frame *
154  create (tree_evaluator& tw, octave_function *fcn, std::size_t index,
155  const std::shared_ptr<stack_frame>& parent_link,
156  const std::shared_ptr<stack_frame>& static_link);
157 
158  // Script.
159  static stack_frame *
160  create (tree_evaluator& tw, octave_user_script *script, std::size_t index,
161  const std::shared_ptr<stack_frame>& parent_link,
162  const std::shared_ptr<stack_frame>& static_link);
163 
164  // User-defined function.
165  static stack_frame *
166  create (tree_evaluator& tw, octave_user_function *fcn, std::size_t index,
167  const std::shared_ptr<stack_frame>& parent_link,
168  const std::shared_ptr<stack_frame>& static_link,
169  const std::shared_ptr<stack_frame>& access_link = std::shared_ptr<stack_frame> ());
170 
171  // Anonymous user-defined function with init vars.
172  static stack_frame *
173  create (tree_evaluator& tw, octave_user_function *fcn, std::size_t index,
174  const std::shared_ptr<stack_frame>& parent_link,
175  const std::shared_ptr<stack_frame>& static_link,
176  const local_vars_map& local_vars,
177  const std::shared_ptr<stack_frame>& access_link = std::shared_ptr<stack_frame> ());
178 
179  // Scope.
180  static stack_frame *
181  create (tree_evaluator& tw, const symbol_scope& scope, std::size_t index,
182  const std::shared_ptr<stack_frame>& parent_link,
183  const std::shared_ptr<stack_frame>& static_link);
184 
185  stack_frame (const stack_frame& elt) = default;
186 
187  stack_frame& operator = (const stack_frame& elt) = delete;
188 
189  virtual ~stack_frame () = default;
190 
191  // FIXME: It would be nice to eliminate these but there are a few
192  // places where we still need to know the specific type of the
193  // stack frame that we are handling.
194 
195  virtual bool is_compiled_fcn_frame () const { return false; }
196  virtual bool is_user_script_frame () const { return false; }
197  virtual bool is_user_fcn_frame () const { return false; }
198  virtual bool is_scope_frame () const { return false; }
199 
200  virtual void clear_values ();
201 
202  std::size_t index () const { return m_index; }
203 
204  void line (int l) { m_line = l; }
205  virtual int line () const { return m_line; }
206 
207  void column (int c) { m_column = c; }
208  virtual int column () const { return m_column; }
209 
210  std::string fcn_file_name () const
211  {
212  octave_function *fcn = function ();
213 
214  return fcn ? fcn->fcn_file_name () : "";
215  }
216 
217  std::string fcn_name (bool print_subfn = true) const
218  {
219  std::string retval;
220 
221  octave_function *fcn = function ();
222 
223  if (fcn)
224  {
225  std::string parent_fcn_name = fcn->parent_fcn_name ();
226 
227  if (print_subfn && ! parent_fcn_name.empty ())
228  retval = parent_fcn_name + '>';
229 
230  if (fcn->is_anonymous_function ())
231  retval += "@<anonymous>";
232  else
233  retval += fcn->name ();
234  }
235  else
236  retval = "<unknown>";
237 
238  return retval;
239  }
240 
241  virtual symbol_scope get_scope () const = 0;
242 
243  virtual octave_function * function () const { return nullptr; }
244 
245  virtual unwind_protect * unwind_protect_frame () { return nullptr; }
246 
248  make_symbol_info_list (const std::list<symbol_record>& symrec_list) const;
249 
250  octave_value who (const string_vector& patterns, bool have_regexp,
251  bool return_list, bool verbose,
252  const std::string& whos_line_fmt,
253  const std::string& msg);
254 
256 
258 
259  std::list<std::string> variable_names () const;
260 
261  // Look for named symbol visible from current scope. Don't
262  // attempt to insert if missing.
263  virtual symbol_record lookup_symbol (const std::string&) const = 0;
264 
265  // Look for named symbol visible from current scope. Attempt to
266  // insert if missing.
267  virtual symbol_record insert_symbol (const std::string&) = 0;
268 
269  symbol_info_list glob_symbol_info (const std::string& pattern);
270 
271  symbol_info_list regexp_symbol_info (const std::string& pattern);
272 
274  {
275  return all_variables ();
276  }
277 
278  void make_persistent (const symbol_record& sym)
279  {
280  if (sym.is_formal ())
281  {
282  std::string nm = sym.name ();
283  error ("can't make function parameter %s persistent", nm.c_str ());
284  }
285 
286  if (is_global (sym))
287  {
288  std::string nm = sym.name ();
289  error ("can't make global variable '%s' persistent", nm.c_str ());
290  }
291 
292  install_variable (sym, octave_value (), false);
293 
294  mark_persistent (sym);
295  }
296 
297  void make_global (const symbol_record& sym)
298  {
299  if (is_persistent (sym))
300  {
301  std::string nm = sym.name ();
302  error ("can't make persistent variable '%s' global", nm.c_str ());
303  }
304 
305  install_variable (sym, octave_value (), true);
306 
307  mark_global (sym);
308  }
309 
311  {
312  m_parent_link = nullptr;
313  m_static_link = nullptr;
314  }
315 
316  std::size_t
317  parent_frame_index () const { return m_parent_link->index (); }
318 
319  std::shared_ptr<stack_frame>
320  parent_link () const {return m_parent_link; }
321 
322  std::shared_ptr<stack_frame>
323  static_link () const {return m_static_link; }
324 
325  std::shared_ptr<stack_frame>
326  access_link () const {return m_access_link; }
327 
328  virtual std::size_t size () const;
329 
330  virtual void resize (std::size_t);
331 
332  void mark_global (const symbol_record& sym)
333  {
334  mark_scope (sym, GLOBAL);
335  }
336 
337  void unmark_global (const symbol_record& sym)
338  {
339  mark_scope (sym, LOCAL);
340  }
341 
342  void mark_persistent (const symbol_record& sym)
343  {
344  mark_scope (sym, PERSISTENT);
345  }
346 
348  {
349  mark_scope (sym, LOCAL);
350  }
351 
352  bool is_defined (const symbol_record& sym) const
353  {
354  octave_value val = varval (sym);
355 
356  return val.is_defined ();
357  }
358 
359  bool is_variable (const symbol_record& sym) const
360  {
361  octave_value val = varval (sym);
362 
363  return val.is_defined ();
364  }
365 
366  bool is_variable (const std::string& name) const
367  {
368  symbol_record sym = lookup_symbol (name);
369 
370  return sym ? is_variable (sym) : false;
371  }
372 
373  bool is_local_variable (const std::string& name) const
374  {
375  symbol_record sym = lookup_symbol (name);
376 
377  return sym ? (is_variable (sym) && ! is_global (sym)) : false;
378  }
379 
380  bool is_object (const symbol_record& sym) const
381  {
382  octave_value val = varval (sym);
383 
384  return val.isobject ();
385  }
386 
387  bool is_object (const std::string& name) const
388  {
389  symbol_record sym = lookup_symbol (name);
390 
391  return sym ? is_object (sym) : false;
392  }
393 
394  virtual scope_flags scope_flag (const symbol_record&) const = 0;
395 
396  virtual scope_flags get_scope_flag (std::size_t) const;
397 
398  virtual void set_scope_flag (std::size_t, scope_flags);
399 
400  bool is_global (const symbol_record& sym) const
401  {
402  return scope_flag (sym) == GLOBAL;
403  }
404 
405  bool is_global (const std::string& name) const
406  {
407  symbol_record sym = lookup_symbol (name);
408 
409  return sym ? is_global (sym) : false;
410  }
411 
412  bool is_persistent (const symbol_record& sym) const
413  {
414  return scope_flag (sym) == PERSISTENT;
415  }
416 
417  bool is_persistent (const std::string& name) const
418  {
419  symbol_record sym = lookup_symbol (name);
420 
421  return sym ? is_persistent (sym) : false;
422  }
423 
424  void install_variable (const symbol_record& sym,
425  const octave_value& value, bool global);
426 
427  void install_variable (const std::string& name,
428  const octave_value& value, bool global)
429  {
430  symbol_record sym = insert_symbol (name);
431 
432  install_variable (sym, value, global);
433  }
434 
436 
437  virtual void set_auto_fcn_var (auto_var_type, const octave_value&) = 0;
438 
439  virtual void set_nargin (int nargin) { set_auto_fcn_var (NARGIN, nargin); }
440  virtual void set_nargout (int nargout) { set_auto_fcn_var (NARGOUT, nargout); }
441 
442  virtual octave_value varval (const symbol_record& sym) const = 0;
443 
444  virtual octave_value varval (std::size_t data_offset) const;
445 
446  octave_value varval (const std::string& name) const
447  {
448  symbol_record sym = lookup_symbol (name);
449 
450  return sym ? varval (sym) : octave_value ();
451  }
452 
453 
454  virtual octave_value& varref (const symbol_record& sym) = 0;
455 
456  virtual octave_value& varref (std::size_t data_offset);
457 
458  void assign (const symbol_record& sym, const octave_value& val)
459  {
460  octave_value& lhs = varref (sym);
461 
462  if (lhs.get_count () == 1)
463  lhs.call_object_destructor ();
464 
465  // Regularize a null matrix if stored into a variable.
466  lhs = val.storable_value ();
467  }
468 
469  void assign (const std::string& name, const octave_value& val)
470  {
471  symbol_record sym = insert_symbol (name);
472 
473  assign (sym, val);
474  }
475 
477  const std::string& type,
478  const std::list<octave_value_list>& idx,
479  const octave_value& rhs)
480  {
481  if (idx.empty ())
482  {
483  if (op == octave_value::op_asn_eq)
484  assign (sym, rhs);
485  else
486  varref (sym).assign (op, rhs);
487  }
488  else
489  varref (sym).assign (op, type, idx, rhs);
490  }
491 
493  const symbol_record& sym,
494  const std::string& type,
495  const std::list<octave_value_list>& idx)
496  {
497  if (idx.empty ())
498  varref (sym).non_const_unary_op (op);
499  else
500  varref (sym).non_const_unary_op (op, type, idx);
501  }
502 
503  octave_value value (const symbol_record& sym, const std::string& type,
504  const std::list<octave_value_list>& idx) const
505  {
506  octave_value retval = varval (sym);
507 
508  if (! idx.empty ())
509  {
510  if (retval.is_constant ())
511  retval = retval.subsref (type, idx);
512  else
513  {
514  octave_value_list t = retval.subsref (type, idx, 1);
515 
516  retval = t.length () > 0 ? t(0) : octave_value ();
517  }
518  }
519 
520  return retval;
521  }
522 
523  octave_value find_subfunction (const std::string& name) const
524  {
525  symbol_scope scope = get_scope ();
526 
527  return scope.find_subfunction (name);
528  }
529 
530  void clear (const symbol_record& sym)
531  {
532  if (is_global (sym))
533  unmark_global (sym);
534 
535  assign (sym, octave_value ());
536 
537  if (is_persistent (sym))
538  unmark_persistent (sym);
539  }
540 
541  void clear_objects ();
542 
543  void clear_variable (const std::string& name);
544 
545  void clear_variable_pattern (const std::string& pattern);
546  void clear_variable_pattern (const string_vector& patterns);
547 
548  void clear_variable_regexp (const std::string& pattern);
549  void clear_variable_regexp (const string_vector& patterns);
550 
551  void clear_variables ();
552 
553  std::string get_dispatch_class () const { return m_dispatch_class; }
554 
555  void set_dispatch_class (const std::string& class_name)
556  {
557  m_dispatch_class = class_name;
558  }
559 
560  void display_stopped_in_message (std::ostream& os) const;
561 
562  virtual void mark_scope (const symbol_record&, scope_flags) = 0;
563 
564  virtual void display (bool follow = true) const;
565 
566  virtual void accept (stack_frame_walker& sfw) = 0;
567 
568  virtual void break_closure_cycles (const std::shared_ptr<stack_frame>&) { }
569 
571  {
572  m_is_closure_context = true;
573 
574  // Mark any access linked frames as closure contexts too,
575  // so that they'll make any function handle on its stack frame
576  // weak when the frame itself is being popped.
577  auto nxt = access_link ();
578  while (nxt)
579  {
580  nxt->m_is_closure_context = true;
581  nxt = nxt->access_link ();
582  }
583  }
584 
585  bool is_closure_context () const { return m_is_closure_context; }
586 
587 protected:
588 
589  // Reference to the call stack that contains this frame. Global
590  // variables are stored in the call stack. This link gives us
591  // immediate access to them.
593 
594  // TRUE if this stack frame is saved with a handle to a nested
595  // function (closure).
597 
598  // The line and column of the source file where this stack frame
599  // was created. Used to print stack traces.
600  int m_line;
601  int m_column;
602 
603  // Index in call stack.
604  std::size_t m_index;
605 
606  // Pointer to the nearest parent frame. May include compiled
607  // functions.
608  std::shared_ptr<stack_frame> m_parent_link;
609 
610  // Pointer to the nearest parent frame that contains variable
611  // information (script, function, or scope). This link skips over
612  // compiled function parent frames.
613  std::shared_ptr<stack_frame> m_static_link;
614 
615  // Pointer to the nearest lexical parent frame. Used to access
616  // non-local variables for nested and anonymous functions or as a
617  // link to the parent frame in which a script is executed.
618  std::shared_ptr<stack_frame> m_access_link;
619 
620  // Allow function handles to temporarily store their dispatch class
621  // in the call stack.
622  std::string m_dispatch_class;
623 };
624 
625 OCTAVE_END_NAMESPACE(octave)
626 
627 #endif
virtual bool is_anonymous_function() const
Definition: ov-base.h:527
virtual std::string parent_fcn_name() const
Definition: ov-fcn.h:82
virtual std::string fcn_file_name() const
Definition: ov-fcn.h:75
std::string name() const
Definition: ov-fcn.h:206
octave_idx_type length() const
Definition: ovl.h:113
void call_object_destructor()
Definition: ov.h:1437
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
Definition: ov.h:476
unary_op
Definition: ov.h:79
bool is_constant() const
Definition: ov.h:765
bool is_defined() const
Definition: ov.h:592
assign_op
Definition: ov.h:134
@ op_asn_eq
Definition: ov.h:135
octave_value storable_value() const
octave_value & assign(assign_op op, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_idx_type get_count() const
Definition: ov.h:421
octave_value & non_const_unary_op(unary_op op)
bool isobject() const
Definition: ov.h:664
virtual scope_flags get_scope_flag(std::size_t) const
virtual bool is_scope_frame() const
Definition: stack-frame.h:198
octave_value workspace()
symbol_info_list glob_symbol_info(const std::string &pattern)
std::string fcn_file_name() const
Definition: stack-frame.h:210
std::shared_ptr< stack_frame > parent_link() const
Definition: stack-frame.h:320
bool is_persistent(const std::string &name) const
Definition: stack-frame.h:417
virtual bool is_user_script_frame() const
Definition: stack-frame.h:196
std::list< std::string > variable_names() const
virtual void set_nargout(int nargout)
Definition: stack-frame.h:440
void unmark_persistent(const symbol_record &sym)
Definition: stack-frame.h:347
void clear_variables()
void line(int l)
Definition: stack-frame.h:204
void set_dispatch_class(const std::string &class_name)
Definition: stack-frame.h:555
bool is_object(const std::string &name) const
Definition: stack-frame.h:387
stack_frame & operator=(const stack_frame &elt)=delete
void make_global(const symbol_record &sym)
Definition: stack-frame.h:297
virtual octave_value varval(const symbol_record &sym) const =0
void clear(const symbol_record &sym)
Definition: stack-frame.h:530
void clear_objects()
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
Definition: stack-frame.h:503
stack_frame(const stack_frame &elt)=default
bool is_global(const symbol_record &sym) const
Definition: stack-frame.h:400
std::string m_dispatch_class
Definition: stack-frame.h:622
void clear_variable_regexp(const std::string &pattern)
void mark_global(const symbol_record &sym)
Definition: stack-frame.h:332
std::size_t m_index
Definition: stack-frame.h:604
virtual int line() const
Definition: stack-frame.h:205
void clear_variable_pattern(const std::string &pattern)
virtual symbol_record lookup_symbol(const std::string &) const =0
virtual int column() const
Definition: stack-frame.h:208
std::size_t index() const
Definition: stack-frame.h:202
bool is_global(const std::string &name) const
Definition: stack-frame.h:405
octave_value find_subfunction(const std::string &name) const
Definition: stack-frame.h:523
void install_variable(const std::string &name, const octave_value &value, bool global)
Definition: stack-frame.h:427
symbol_info_list regexp_symbol_info(const std::string &pattern)
virtual unwind_protect * unwind_protect_frame()
Definition: stack-frame.h:245
virtual void display(bool follow=true) const
stack_frame()=delete
virtual void set_scope_flag(std::size_t, scope_flags)
bool is_defined(const symbol_record &sym) const
Definition: stack-frame.h:352
virtual void accept(stack_frame_walker &sfw)=0
void display_stopped_in_message(std::ostream &os) const
octave_value varval(const std::string &name) const
Definition: stack-frame.h:446
std::shared_ptr< stack_frame > m_parent_link
Definition: stack-frame.h:608
bool is_closure_context() const
Definition: stack-frame.h:585
void clear_parent_static_link()
Definition: stack-frame.h:310
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)
Definition: stack-frame.h:476
bool is_persistent(const symbol_record &sym) const
Definition: stack-frame.h:412
std::shared_ptr< stack_frame > m_access_link
Definition: stack-frame.h:618
virtual bool is_user_fcn_frame() const
Definition: stack-frame.h:197
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)
Definition: stack-frame.h:492
virtual ~stack_frame()=default
virtual octave_value & varref(const symbol_record &sym)=0
std::string fcn_name(bool print_subfn=true) const
Definition: stack-frame.h:217
void column(int c)
Definition: stack-frame.h:207
void assign(const symbol_record &sym, const octave_value &val)
Definition: stack-frame.h:458
virtual octave_value get_auto_fcn_var(auto_var_type) const =0
std::string get_dispatch_class() const
Definition: stack-frame.h:553
bool is_object(const symbol_record &sym) const
Definition: stack-frame.h:380
virtual bool is_compiled_fcn_frame() const
Definition: stack-frame.h:195
std::shared_ptr< stack_frame > static_link() const
Definition: stack-frame.h:323
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
Definition: stack-frame.h:613
std::map< std::string, octave_value > local_vars_map
Definition: stack-frame.h:112
virtual void mark_scope(const symbol_record &, scope_flags)=0
virtual void set_nargin(int nargin)
Definition: stack-frame.h:439
void assign(const std::string &name, const octave_value &val)
Definition: stack-frame.h:469
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)
Definition: stack-frame.h:337
virtual scope_flags scope_flag(const symbol_record &) const =0
bool is_local_variable(const std::string &name) const
Definition: stack-frame.h:373
tree_evaluator & m_evaluator
Definition: stack-frame.h:592
virtual void break_closure_cycles(const std::shared_ptr< stack_frame > &)
Definition: stack-frame.h:568
symbol_info_list get_symbol_info()
Definition: stack-frame.h:273
void mark_persistent(const symbol_record &sym)
Definition: stack-frame.h:342
virtual symbol_record insert_symbol(const std::string &)=0
void mark_closure_context()
Definition: stack-frame.h:570
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)
Definition: stack-frame.h:142
bool m_is_closure_context
Definition: stack-frame.h:596
@ SAVED_WARNING_STATES
Definition: stack-frame.h:136
virtual std::size_t size() const
symbol_info_list all_variables()
virtual void clear_values()
std::size_t parent_frame_index() const
Definition: stack-frame.h:317
virtual symbol_scope get_scope() const =0
bool is_variable(const std::string &name) const
Definition: stack-frame.h:366
virtual void resize(std::size_t)
void make_persistent(const symbol_record &sym)
Definition: stack-frame.h:278
bool is_variable(const symbol_record &sym) const
Definition: stack-frame.h:359
std::shared_ptr< stack_frame > access_link() const
Definition: stack-frame.h:326
symbol_info_list make_symbol_info_list(const std::list< symbol_record > &symrec_list) const
std::string name() const
Definition: symrec.h:207
bool is_formal() const
Definition: symrec.h:212
octave_value find_subfunction(const std::string &name) const
Definition: symscope.h:526
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void() error(const char *fmt,...)
Definition: error.cc:988
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))