GNU Octave
4.0.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 bool | quiet_breakpoint_flag = 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 1155 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 1161 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 202 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 1251 of file pt-eval.cc.
References do_keyboard().
Referenced by do_breakpoint().
void tree_evaluator::do_unwind_protect_cleanup_code | ( | tree_statement_list * | list | ) |
Definition at line 950 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 |
|
static |
Definition at line 130 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().
|
static |
Definition at line 138 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 96 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 |
|
inlinevirtualinherited |
Definition at line 267 of file pt-walk.h.
Referenced by tree_classdef::accept().
|
inlinevirtualinherited |
Definition at line 219 of file pt-walk.h.
Referenced by tree_classdef_attribute::accept().
|
inlinevirtualinherited |
Definition at line 222 of file pt-walk.h.
Referenced by tree_classdef_attribute_list::accept().
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Definition at line 255 of file pt-walk.h.
Referenced by tree_classdef_enum::accept().
|
inlinevirtualinherited |
Definition at line 261 of file pt-walk.h.
Referenced by tree_classdef_enum_block::accept().
|
inlinevirtualinherited |
Definition at line 258 of file pt-walk.h.
Referenced by tree_classdef_enum_list::accept().
|
inlinevirtualinherited |
Definition at line 246 of file pt-walk.h.
Referenced by tree_classdef_event::accept().
|
inlinevirtualinherited |
Definition at line 252 of file pt-walk.h.
Referenced by tree_classdef_events_block::accept().
|
inlinevirtualinherited |
Definition at line 249 of file pt-walk.h.
Referenced by tree_classdef_events_list::accept().
|
inlinevirtualinherited |
Definition at line 243 of file pt-walk.h.
Referenced by tree_classdef_methods_block::accept().
|
inlinevirtualinherited |
Definition at line 240 of file pt-walk.h.
Referenced by tree_classdef_methods_list::accept().
|
inlinevirtualinherited |
Definition at line 237 of file pt-walk.h.
Referenced by tree_classdef_properties_block::accept().
|
inlinevirtualinherited |
Definition at line 231 of file pt-walk.h.
Referenced by tree_classdef_property::accept().
|
inlinevirtualinherited |
Definition at line 234 of file pt-walk.h.
Referenced by tree_classdef_property_list::accept().
|
inlinevirtualinherited |
Definition at line 225 of file pt-walk.h.
Referenced by tree_classdef_superclass::accept().
|
inlinevirtualinherited |
Definition at line 228 of file pt-walk.h.
Referenced by tree_classdef_superclass_list::accept().
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 422 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 116 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 1110 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().
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 518 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 221 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 550 of file pt-eval.cc.
References tree_if_command_list::accept(), and tree_if_command::cmd_list().
|
virtual |
Implements tree_walker.
Definition at line 559 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 613 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 506 of file pt-eval.cc.
References panic_impossible.
void tree_evaluator::visit_octave_user_function_trailer | ( | octave_user_function & | ) |
Definition at line 512 of file pt-eval.cc.
References panic_impossible.
|
virtual |
|
virtual |
|
virtual |
Implements tree_walker.
Definition at line 230 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 656 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 297 of file pt-eval.cc.
References tree_statement_list::accept(), arg(), octave_lvalue::assign(), 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(), Range::elem(), error(), error_state, tree_jit::execute(), in_loop_command, 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 691 of file pt-eval.cc.
References tree::accept(), octave_call_stack::all_scripts(), 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 775 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 845 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 886 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(), last_error_stack(), 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 1035 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 1063 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 150 of file pt-eval.h.
Referenced by do_breakpoint(), error_2(), Fkeyboard(), visit_return_command(), and warning_1().
|
static |
Definition at line 147 of file pt-eval.h.
Referenced by do_breakpoint(), Fdbstep(), and reset_debug_state().
|
static |
Definition at line 152 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(), error_2(), 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(), visit_while_command(), and warning_1().
|
static |
Definition at line 168 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 154 of file pt-eval.h.
Referenced by F__db_next_breakpoint_quiet__(), Fkeyboard(), and get_debug_input().
|
static |
Definition at line 165 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().