Mercurial > octave
diff libinterp/parse-tree/bp-table.cc @ 23553:14723784b9f2
don't use singleton for call_stack
* call-stack.h, call-stack.cc (class call_stack):
Don't use singleton pattern. Store reference to parent intepreter
object in call stack.
* pt-eval.h, pt-eval.cc (tree_evaluator::m_call_stack): New data
member.
(tree_evaluator::get_call_stack): New function.
* interpreter-private.h, interpreter-private.cc (__get_call_stack__):
New function.
* interpreter.h, interpreter.cc (interpreter::get_call_stack):
New function.
Change all uses of call_stack to access call_stack object from the
interpreter.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 07 Jun 2017 02:13:05 -0400 |
parents | 21baad6b35c4 |
children | 00e518162fda |
line wrap: on
line diff
--- a/libinterp/parse-tree/bp-table.cc Wed Jun 07 02:08:22 2017 -0400 +++ b/libinterp/parse-tree/bp-table.cc Wed Jun 07 02:13:05 2017 -0400 @@ -43,6 +43,7 @@ #include "call-stack.h" #include "error.h" #include "input.h" +#include "interpreter-private.h" #include "oct-map.h" #include "octave-link.h" #include "ov-usr-fcn.h" @@ -172,7 +173,11 @@ octave_user_code *dbg_fcn = nullptr; if (fname.empty ()) - dbg_fcn = octave::call_stack::debug_user_code (); + { + octave::call_stack& cs = octave::__get_call_stack__ ("get_user_code"); + + dbg_fcn = cs.debug_user_code (); + } else { std::string name = fname;