GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "pt-eval.h"
Public Types | |
typedef void(* | decl_elt_init_fcn )(tree_decl_elt &) |
enum | stmt_list_type { function, script, other } |
Static Public Member Functions | |
static void | reset_debug_state (void) |
static bool | statement_printing_enabled (void) |
Static Public Attributes | |
static size_t | current_frame = 0 |
static int | dbstep_flag = 0 |
static bool | debug_mode = false |
static bool | in_loop_command = false |
static stmt_list_type | statement_context = tree_evaluator::other |
Private Member Functions | |
tree_evaluator (const tree_evaluator &) | |
void | do_breakpoint (tree_statement &stmt) const |
void | do_breakpoint (bool is_breakpoint, bool is_end_of_fcn_or_script=false) const |
void | do_decl_init_list (decl_elt_init_fcn fcn, tree_decl_init_list *init_list) |
virtual octave_value | do_keyboard (const octave_value_list &args=octave_value_list()) const |
tree_evaluator & | operator= (const tree_evaluator &) |
typedef void(* tree_evaluator::decl_elt_init_fcn)(tree_decl_elt &) |
|
private |
|
private |
Definition at line 1152 of file pt-eval.cc.
References tree_statement::is_breakpoint(), and tree_statement::is_end_of_fcn_or_script().
Referenced by visit_break_command(), visit_complex_for_command(), visit_continue_command(), visit_do_until_command(), visit_global_command(), visit_if_command_list(), visit_no_op_command(), visit_persistent_command(), visit_return_command(), visit_simple_for_command(), visit_statement(), visit_switch_command(), and visit_while_command().
|
private |
Definition at line 1158 of file pt-eval.cc.
References current_frame, octave_call_stack::current_frame(), dbstep_flag, do_keyboard(), and octave_debug_on_interrupt_state.
|
private |
Definition at line 200 of file pt-eval.cc.
References octave_base_list< elt_type >::begin(), octave_base_list< elt_type >::end(), and error_state.
Referenced by visit_global_command(), and visit_persistent_command().
|
privatevirtual |
Definition at line 1248 of file pt-eval.cc.
Referenced by do_breakpoint().
void tree_evaluator::do_unwind_protect_cleanup_code | ( | tree_statement_list * | list | ) |
Definition at line 952 of file pt-eval.cc.
References tree_statement_list::accept(), action_container::add_fcn(), tree_break_command::breaking, octave_call_stack::current_column(), octave_call_stack::current_line(), action_container::discard(), error_state, octave_interrupt_state, action_container::protect_var(), tree_return_command::returning, action_container::run(), octave_call_stack::set_column(), and octave_call_stack::set_line().
Referenced by visit_unwind_protect_command().
|
private |
Definition at line 128 of file pt-eval.cc.
References dbstep_flag, debug_mode, bp_table::have_breakpoints(), and Vdebugging.
Referenced by Fdbcont(), Fdbquit(), main_loop(), and visit_return_command().
Definition at line 136 of file pt-eval.cc.
References script, statement_context, and Vsilent_functions.
Referenced by tree_identifier::rvalue(), tree_multi_assignment::rvalue(), tree_simple_assignment::rvalue1(), and visit_statement().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 94 of file pt-eval.cc.
References tree_break_command::breaking, debug_mode, do_breakpoint(), error_state, in_loop_command, tree::is_breakpoint(), script, and statement_context.
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 430 of file pt-eval.cc.
References tree_statement_list::accept(), octave_lvalue::assign(), octave_base_list< elt_type >::begin(), tree_complex_for_command::body(), octave_map::contents(), tree_complex_for_command::control_expr(), debug_mode, do_breakpoint(), error(), error_state, in_loop_command, tree::is_breakpoint(), octave_value::is_map(), octave_value::is_undefined(), octave_map::keys(), tree_complex_for_command::left_hand_side(), tree_expression::lvalue(), octave_value::map_value(), Array< T >::numel(), octave_value(), octave_value::op_asn_eq, action_container::protect_var(), quit_loop_now(), and tree_expression::rvalue1().
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 114 of file pt-eval.cc.
References tree_continue_command::continuing, debug_mode, do_breakpoint(), error_state, in_loop_command, tree::is_breakpoint(), script, and statement_context.
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 1112 of file pt-eval.cc.
References tree_statement_list::accept(), tree_while_command::body(), tree_while_command::condition(), debug_mode, do_breakpoint(), error_state, in_loop_command, tree::is_breakpoint(), tree_expression::is_logically_true(), panic_impossible, action_container::protect_var(), and quit_loop_now().
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 526 of file pt-eval.cc.
References symbol_table::assign(), f, tree_function_def::function(), octave_value::function_value(), symbol_table::install_cmdline_function(), and octave_function::name().
|
virtual |
Implements tree_walker.
Definition at line 219 of file pt-eval.cc.
References debug_mode, do_breakpoint(), do_decl_init_list(), do_global_init(), tree_decl_command::initializer_list(), and tree::is_breakpoint().
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 558 of file pt-eval.cc.
References tree_if_command_list::accept(), and tree_if_command::cmd_list().
|
virtual |
Implements tree_walker.
Definition at line 567 of file pt-eval.cc.
References tree_statement_list::accept(), octave_base_list< elt_type >::begin(), tree::column(), tree_if_clause::commands(), tree_if_clause::condition(), debug_mode, do_breakpoint(), octave_base_list< elt_type >::end(), error_state, tree::is_breakpoint(), tree_if_clause::is_else_clause(), tree_expression::is_logically_true(), tree::line(), script, octave_call_stack::set_location(), and statement_context.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 621 of file pt-eval.cc.
References debug_mode, do_breakpoint(), tree::is_breakpoint(), and tree_no_op_command::is_end_of_fcn_or_script().
|
virtual |
void tree_evaluator::visit_octave_user_function_header | ( | octave_user_function & | ) |
Definition at line 514 of file pt-eval.cc.
References panic_impossible.
void tree_evaluator::visit_octave_user_function_trailer | ( | octave_user_function & | ) |
Definition at line 520 of file pt-eval.cc.
References panic_impossible.
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 228 of file pt-eval.cc.
References debug_mode, do_breakpoint(), do_decl_init_list(), do_static_init(), tree_decl_command::initializer_list(), and tree::is_breakpoint().
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 658 of file pt-eval.cc.
References current_frame, octave_call_stack::current_frame(), debug_mode, do_breakpoint(), error_state, in_loop_command, tree::is_breakpoint(), reset_debug_state(), tree_return_command::returning, script, statement_context, and Vdebugging.
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 295 of file pt-eval.cc.
References tree_statement_list::accept(), arg(), octave_lvalue::assign(), Range::base(), tree_simple_for_command::body(), tree::column(), tree_simple_for_command::control_expr(), debug_mode, octave_value::dims(), do_breakpoint(), octave_value::do_index_op(), error(), error_state, tree_jit::execute(), in_loop_command, Range::inc(), tree::is_breakpoint(), octave_value::is_cell(), octave_value::is_map(), octave_value::is_matrix_type(), octave_value::is_range(), octave_value::is_scalar_type(), octave_value::is_string(), octave_value::is_undefined(), tree_simple_for_command::left_hand_side(), tree::line(), tree_expression::lvalue(), octave_value::magic_colon_t, octave_value::ndims(), Range::nelem(), octave_value::op_asn_eq, action_container::protect_var(), quit_loop_now(), octave_value::range_value(), dim_vector::redim(), octave_value::reshape(), octave_value_list::resize(), and tree_expression::rvalue1().
|
virtual |
Implements tree_walker.
Definition at line 693 of file pt-eval.cc.
References tree::accept(), bind_ans(), tree_statement::column(), tree_statement::command(), debug_mode, do_breakpoint(), tree_statement::echo_code(), ECHO_FUNCTIONS, ECHO_SCRIPTS, error_state, error_with_id(), tree_statement::expression(), gripe_library_execution_error(), tree_expression::is_assignment_expression(), tree::is_breakpoint(), tree_expression::is_identifier(), octave_value::is_undefined(), tree_statement::line(), tree_expression::print_result(), tree_expression::rvalue1(), script, octave_call_stack::set_location(), statement_context, statement_printing_enabled(), Vdebugging, and Vecho_executing_commands.
|
virtual |
Implements tree_walker.
Definition at line 778 of file pt-eval.cc.
References tree_statement::accept(), octave_base_list< elt_type >::begin(), tree_break_command::breaking, tree_continue_command::continuing, octave_base_list< elt_type >::end(), error(), error_state, and tree_return_command::returning.
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 848 of file pt-eval.cc.
References tree_statement_list::accept(), octave_base_list< elt_type >::begin(), tree_switch_command::case_list(), tree::column(), tree_switch_case::commands(), debug_mode, do_breakpoint(), octave_base_list< elt_type >::end(), error(), error_state, tree::is_breakpoint(), tree_switch_case::is_default_case(), tree_switch_case::label_matches(), tree::line(), and tree_switch_command::switch_value().
|
virtual |
Implements tree_walker.
Definition at line 889 of file pt-eval.cc.
References tree_statement_list::accept(), octave_lvalue::assign(), octave_scalar_map::assign(), tree_try_catch_command::body(), buffer_error_messages, tree_try_catch_command::cleanup(), error_state, tree_try_catch_command::identifier(), last_error_id(), last_error_message(), tree_identifier::lvalue(), octave_value::op_asn_eq, action_container::protect_var(), Vdebug_on_error, and Vdebug_on_warning.
|
virtual |
Implements tree_walker.
Definition at line 1037 of file pt-eval.cc.
References tree_statement_list::accept(), tree_unwind_protect_command::body(), tree_unwind_protect_command::cleanup(), and do_unwind_protect_cleanup_code().
|
virtual |
Implements tree_walker.
Definition at line 1065 of file pt-eval.cc.
References tree_statement_list::accept(), tree_while_command::body(), tree_while_command::condition(), debug_mode, do_breakpoint(), error_state, tree_jit::execute(), in_loop_command, tree::is_breakpoint(), tree_expression::is_logically_true(), panic_impossible, action_container::protect_var(), and quit_loop_now().
|
static |
Definition at line 148 of file pt-eval.h.
Referenced by do_breakpoint(), Fkeyboard(), and visit_return_command().
|
static |
Definition at line 145 of file pt-eval.h.
Referenced by do_breakpoint(), Fdbstep(), and reset_debug_state().
|
static |
Definition at line 150 of file pt-eval.h.
Referenced by bp_table::do_add_breakpoint(), bp_table::do_remove_all_breakpoints(), bp_table::do_remove_all_breakpoints_in_file(), bp_table::do_remove_breakpoint(), Fkeyboard(), reset_debug_state(), user_abort(), visit_break_command(), visit_complex_for_command(), visit_continue_command(), visit_do_until_command(), visit_global_command(), visit_if_command_list(), visit_no_op_command(), visit_persistent_command(), visit_return_command(), visit_simple_for_command(), visit_statement(), visit_switch_command(), and visit_while_command().
|
static |
Definition at line 164 of file pt-eval.h.
Referenced by visit_break_command(), visit_complex_for_command(), visit_continue_command(), visit_do_until_command(), visit_return_command(), visit_simple_for_command(), and visit_while_command().
|
static |
Definition at line 161 of file pt-eval.h.
Referenced by octave_user_script::do_multi_index_op(), octave_user_function::do_multi_index_op(), statement_printing_enabled(), visit_break_command(), visit_continue_command(), visit_if_command_list(), visit_return_command(), and visit_statement().