diff libinterp/parse-tree/pt-stmt.cc @ 26113:8a15f3bace49

move eval_string inside interpreter/evaluator class * tree_evaluator.h, tree_evaluator.cc (tree_evaluator::eval_string): New functions. * interpreter.h, interpreter.cc (interpreter::eval_string): New functions. Forward to evaluator eval_string functions. * parse.h, oct-parse.yy (eval_string): Deprecate and forward to interpreter eval_string functions. Change all uses. * pt.h, pt.cc (tree::meets_bp_condition): Accept reference to tree_evaluator as argument. Change all uses. (tree::is_breakpoint): Split into separate is_breakpoint and is_active_breakpoint functions. Change all uses.
author John W. Eaton <jwe@octave.org>
date Fri, 16 Nov 2018 13:16:50 -0500
parents 6652d3823428
children 00f796120a6d
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-stmt.cc	Tue Dec 20 03:25:17 2016 +0000
+++ b/libinterp/parse-tree/pt-stmt.cc	Fri Nov 16 13:16:50 2018 -0500
@@ -37,6 +37,7 @@
 #include "pager.h"
 #include "pt-bp.h"
 #include "pt-cmd.h"
+#include "pt-eval.h"
 #include "pt-id.h"
 #include "pt-idx.h"
 #include "pt-jump.h"
@@ -89,10 +90,17 @@
   }
 
   bool
-  tree_statement::is_breakpoint (bool check_active) const
+  tree_statement::is_breakpoint (void) const
   {
-    return m_command ? m_command->is_breakpoint (check_active)
-      : (m_expression ? m_expression->is_breakpoint (check_active) : false);
+    return m_command ? m_command->is_breakpoint ()
+      : (m_expression ? m_expression->is_breakpoint () : false);
+  }
+
+  bool
+  tree_statement::is_active_breakpoint (tree_evaluator& tw) const
+  {
+    return m_command ? m_command->is_active_breakpoint (tw)
+      : (m_expression ? m_expression->is_active_breakpoint (tw) : false);
   }
 
   std::string