Mercurial > hg > octave-lyh
changeset 10833:e5c752231985
delete set/delete breakpoint functions from tree_if_command and tree_switch_command classes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 29 Jul 2010 17:49:50 -0400 |
parents | 1b2fcd122c6a |
children | 05ba991794d4 |
files | src/ChangeLog src/pt-bp.cc src/pt-select.cc src/pt-select.h |
diffstat | 4 files changed, 19 insertions(+), 59 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2010-07-29 John W. Eaton <jwe@octave.org> + + * pt-bp.cc (tree_breakpoint::visit_if_command): Also allow + breakpoint to be set on command, same as for switch, while, or + do-until statments. + * pt-select.h, pt-select.cc (tree_if_command::set_breakpoint, + tree_if_command::delete_breakpoint, tree_switch_command::set_breakpoint, + tree_switch_command::delete_breakpoint): Delete functions and decls. + (bug #30490). + 2010-07-29 Jaroslav Hajek <highegg@gmail.com> * ov.cc (octave_value::subsref (..., const std::list<octave_lvalue> *)
--- a/src/pt-bp.cc +++ b/src/pt-bp.cc @@ -214,10 +214,16 @@ void tree_breakpoint::visit_if_command (tree_if_command& cmd) { - tree_if_command_list *lst = cmd.cmd_list (); + if (cmd.line () >= line) + take_action (cmd); - if (lst) - lst->accept (*this); + if (! found) + { + tree_if_command_list *lst = cmd.cmd_list (); + + if (lst) + lst->accept (*this); + } } void
--- a/src/pt-select.cc +++ b/src/pt-select.cc @@ -93,30 +93,6 @@ delete trail_comm; } -void -tree_if_command::set_breakpoint (void) -{ - if (list) - { - tree_if_clause *elt = list->front (); - - if (elt) - elt->set_breakpoint (); - } -} - -void -tree_if_command::delete_breakpoint (void) -{ - if (list) - { - tree_if_clause *elt = list->front (); - - if (elt) - elt->set_breakpoint (); - } -} - tree_command * tree_if_command::dup (symbol_table::scope_id scope, symbol_table::context_id context) const @@ -230,30 +206,6 @@ delete trail_comm; } -void -tree_switch_command::set_breakpoint (void) -{ - if (list) - { - tree_switch_case *elt = list->front (); - - if (elt) - elt->set_breakpoint (); - } -} - -void -tree_switch_command::delete_breakpoint (void) -{ - if (list) - { - tree_switch_case *elt = list->front (); - - if (elt) - elt->set_breakpoint (); - } -} - tree_command * tree_switch_command::dup (symbol_table::scope_id scope, symbol_table::context_id context) const
--- a/src/pt-select.h +++ b/src/pt-select.h @@ -133,10 +133,6 @@ ~tree_if_command (void); - void set_breakpoint (void); - - void delete_breakpoint (void); - tree_if_command_list *cmd_list (void) { return list; } octave_comment_list *leading_comment (void) { return lead_comm; } @@ -270,10 +266,6 @@ ~tree_switch_command (void); - void set_breakpoint (void); - - void delete_breakpoint (void); - tree_expression *switch_value (void) { return expr; } tree_switch_case_list *case_list (void) { return list; }