Mercurial > octave
diff libinterp/parse-tree/bp-table.h @ 25360:bc5f225bc578
eliminate some global accesses to the breakpoint table
* pt-eval.h, pt-eval.cc (tree_evaluator::m_bp_table): Store breakpoint
table in evaluator, not interpreter. Change all uses.
(tree_evaluator::get_user_code): Move here from interpreter.
(tree_evaluator::m_dbstep_flag, tree_evaluator::m_in_loop_command):
Now a member variables instead of static. Change all uses.
(tree_evaluator::reset_debug_state): Now a member function instead of
static. Change all uses. New overload that accepts mode directly.
(tree_evaluator::final_index_error): Now a member function instead of
static. Change all uses.
* bp-table.h, bp-table.cc (bp_table::m_evaluator): Store reference to
the evaluator in bp_table instead of a reference to the interpreter.
Change all uses.
* debug.cc (Fdbstep, Fdbcont, Fdbquit): Define with DEFMETHOD.
* octave-cmd.h, octave-cmd.cc (octave_cmd_exec::execute,
octave_cmd_eval::execute, octave_cmd_debug::execute): Accept reference
to interpreter as argument.
(octave_command_queue::execute_command_callback): Pass interpreter to
execute functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 08 May 2018 11:53:34 -0400 |
parents | af3319d86a5f |
children | 00f796120a6d |
line wrap: on
line diff
--- a/libinterp/parse-tree/bp-table.h Fri May 04 16:18:30 2018 -0400 +++ b/libinterp/parse-tree/bp-table.h Tue May 08 11:53:34 2018 -0400 @@ -36,7 +36,7 @@ namespace octave { - class interpreter; + class tree_evaluator; struct bp_type { @@ -51,8 +51,8 @@ { public: - bp_table (interpreter& interp) - : m_interpreter (interp), m_bp_set (), m_errors_that_stop (), + bp_table (tree_evaluator& tw) + : m_evaluator (tw), m_bp_set (), m_errors_that_stop (), m_caught_that_stop (), m_warnings_that_stop () { } @@ -130,7 +130,7 @@ typedef std::set<std::string>::const_iterator const_bp_set_iterator; typedef std::set<std::string>::iterator bp_set_iterator; - interpreter& m_interpreter; + tree_evaluator& m_evaluator; // Set of function (.m file) names containing at least one breakpoint. std::set<std::string> m_bp_set;