GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Types | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
octave_call_stack Class Reference

#include "toplev.h"

Collaboration diagram for octave_call_stack:
Collaboration graph
[legend]

Classes

class  stack_frame
 

Public Types

typedef std::deque
< stack_frame >
::const_iterator 
const_iterator
 
typedef std::deque
< stack_frame >
::const_reverse_iterator 
const_reverse_iterator
 
typedef std::deque
< stack_frame >::iterator 
iterator
 
typedef std::deque
< stack_frame >
::reverse_iterator 
reverse_iterator
 

Static Public Member Functions

static bool all_scripts (void)
 
static octave_map backtrace (size_t nskip=0)
 
static octave_map backtrace (size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn=true)
 
static std::list
< octave_call_stack::stack_frame
backtrace_frames (size_t nskip=0)
 
static std::list
< octave_call_stack::stack_frame
backtrace_frames (size_t nskip, octave_idx_type &curr_user_frame)
 
static octave_functioncaller (void)
 
static octave_user_codecaller_user_code (size_t nskip=0)
 
static int caller_user_code_column (void)
 
static int caller_user_code_line (void)
 
static void clear (void)
 
static void create_instance (void)
 
static octave_functioncurrent (void)
 
static int current_column (void)
 
static symbol_table::context_id current_context (void)
 
static size_t current_frame (void)
 
static int current_line (void)
 
static symbol_table::scope_id current_scope (void)
 
static octave_functionelement (size_t n)
 
static octave_map empty_backtrace (void)
 
static void goto_base_frame (void)
 
static void goto_caller_frame (void)
 
static bool goto_frame (size_t n=0, bool verbose=false)
 
static bool goto_frame_relative (int n, bool verbose=false)
 
static bool instance_ok (void)
 
static size_t num_user_code_frames (octave_idx_type &curr_user_frame)
 
static void pop (void)
 
static void push (octave_function *f, symbol_table::scope_id scope=symbol_table::current_scope(), symbol_table::context_id context=symbol_table::current_context())
 
static void push (symbol_table::scope_id scope=symbol_table::current_scope(), symbol_table::context_id context=symbol_table::current_context())
 
static void restore_frame (size_t n)
 
static void set_column (int c)
 
static void set_line (int l)
 
static void set_location (int l, int c)
 
static size_t size (void)
 

Protected Member Functions

 octave_call_stack (void)
 

Private Member Functions

bool do_all_scripts (void) const
 
octave_map do_backtrace (size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn) const
 
std::list
< octave_call_stack::stack_frame
do_backtrace_frames (size_t nskip, octave_idx_type &curr_user_frame) const
 
octave_functiondo_caller (void) const
 
octave_user_codedo_caller_user_code (size_t nskip) const
 
int do_caller_user_code_column (void) const
 
int do_caller_user_code_line (void) const
 
void do_clear (void)
 
octave_functiondo_current (void) const
 
int do_current_column (void) const
 
symbol_table::context_id do_current_context (void) const
 
size_t do_current_frame (void)
 
int do_current_line (void) const
 
symbol_table::scope_id do_current_scope (void) const
 
octave_functiondo_element (size_t n)
 
void do_goto_base_frame (void)
 
void do_goto_caller_frame (void)
 
bool do_goto_frame (size_t n, bool verbose)
 
bool do_goto_frame_relative (int n, bool verbose)
 
size_t do_num_user_code_frames (octave_idx_type &curr_user_frame) const
 
void do_pop (void)
 
void do_push (octave_function *fcn, symbol_table::scope_id scope, symbol_table::context_id context)
 
void do_set_column (int c)
 
void do_set_line (int l)
 
void do_set_location (int l, int c)
 
size_t do_size (void)
 

Static Private Member Functions

static void cleanup_instance (void)
 

Private Attributes

std::deque< stack_framecs
 
size_t curr_frame
 

Static Private Attributes

static octave_call_stackinstance = 0
 

Detailed Description

Definition at line 75 of file toplev.h.

Member Typedef Documentation

Definition at line 121 of file toplev.h.

Definition at line 124 of file toplev.h.

Definition at line 120 of file toplev.h.

Definition at line 123 of file toplev.h.

Constructor & Destructor Documentation

octave_call_stack::octave_call_stack ( void  )
inlineprotected

Definition at line 81 of file toplev.h.

Referenced by create_instance().

Member Function Documentation

static bool octave_call_stack::all_scripts ( void  )
inlinestatic

Definition at line 227 of file toplev.h.

References do_all_scripts(), instance, and instance_ok().

Referenced by tree_evaluator::visit_statement().

static octave_map octave_call_stack::backtrace ( size_t  nskip = 0)
inlinestatic

Definition at line 295 of file toplev.h.

References do_backtrace(), instance, and instance_ok().

Referenced by do_dbstack(), Flasterror(), and verror().

static octave_map octave_call_stack::backtrace ( size_t  nskip,
octave_idx_type curr_user_frame,
bool  print_subfn = true 
)
inlinestatic

Definition at line 304 of file toplev.h.

References do_backtrace(), instance, and instance_ok().

static std::list<octave_call_stack::stack_frame> octave_call_stack::backtrace_frames ( size_t  nskip = 0)
inlinestatic

Definition at line 313 of file toplev.h.

References do_backtrace_frames(), instance, and instance_ok().

Referenced by pr_where().

static std::list<octave_call_stack::stack_frame> octave_call_stack::backtrace_frames ( size_t  nskip,
octave_idx_type curr_user_frame 
)
inlinestatic

Definition at line 323 of file toplev.h.

References do_backtrace_frames(), instance, and instance_ok().

static octave_function* octave_call_stack::caller ( void  )
inlinestatic
static octave_user_code* octave_call_stack::caller_user_code ( size_t  nskip = 0)
inlinestatic
static int octave_call_stack::caller_user_code_column ( void  )
inlinestatic

Definition at line 170 of file toplev.h.

References do_caller_user_code_column(), instance, and instance_ok().

static int octave_call_stack::caller_user_code_line ( void  )
inlinestatic

Definition at line 164 of file toplev.h.

References do_caller_user_code_line(), instance, and instance_ok().

Referenced by Fdblist(), Fdbwhere(), and get_debug_input().

static void octave_call_stack::cleanup_instance ( void  )
inlinestaticprivate

Definition at line 353 of file toplev.h.

References instance.

Referenced by create_instance(), and ft_manager::instance_ok().

static void octave_call_stack::clear ( void  )
inlinestatic

Definition at line 338 of file toplev.h.

References do_clear(), instance, and instance_ok().

void octave_call_stack::create_instance ( void  )
static
static octave_function* octave_call_stack::current ( void  )
inlinestatic
static int octave_call_stack::current_column ( void  )
inlinestatic

Definition at line 158 of file toplev.h.

References do_current_column(), instance, and instance_ok().

Referenced by tree_evaluator::do_unwind_protect_cleanup_code().

static symbol_table::context_id octave_call_stack::current_context ( void  )
inlinestatic

Definition at line 202 of file toplev.h.

References do_current_context(), instance, and instance_ok().

Referenced by Fwarning().

static size_t octave_call_stack::current_frame ( void  )
inlinestatic
static int octave_call_stack::current_line ( void  )
inlinestatic
static symbol_table::scope_id octave_call_stack::current_scope ( void  )
inlinestatic

Definition at line 197 of file toplev.h.

References do_current_scope(), instance, and instance_ok().

Referenced by Fwarning().

bool octave_call_stack::do_all_scripts ( void  ) const
private

Definition at line 293 of file toplev.cc.

References cs, f, octave_base_value::is_user_script(), and octave_call_stack::stack_frame::m_fcn.

Referenced by all_scripts().

octave_map octave_call_stack::do_backtrace ( size_t  nskip,
octave_idx_type curr_user_frame,
bool  print_subfn 
) const
private
std::list< octave_call_stack::stack_frame > octave_call_stack::do_backtrace_frames ( size_t  nskip,
octave_idx_type curr_user_frame 
) const
private
octave_function* octave_call_stack::do_caller ( void  ) const
inlineprivate

Definition at line 363 of file toplev.h.

Referenced by caller().

octave_user_code * octave_call_stack::do_caller_user_code ( size_t  nskip) const
private

Definition at line 265 of file toplev.cc.

References cs, f, octave_base_value::is_user_code(), and octave_call_stack::stack_frame::m_fcn.

Referenced by caller_user_code().

int octave_call_stack::do_caller_user_code_column ( void  ) const
private
int octave_call_stack::do_caller_user_code_line ( void  ) const
private
void octave_call_stack::do_clear ( void  )
inlineprivate

Definition at line 490 of file toplev.h.

Referenced by clear().

octave_function* octave_call_stack::do_current ( void  ) const
inlineprivate

Definition at line 419 of file toplev.h.

References curr_frame, and octave_call_stack::stack_frame::m_fcn.

Referenced by current().

int octave_call_stack::do_current_column ( void  ) const
private

Definition at line 161 of file toplev.cc.

References cs, curr_frame, and octave_call_stack::stack_frame::m_column.

Referenced by current_column().

symbol_table::context_id octave_call_stack::do_current_context ( void  ) const
inlineprivate

Definition at line 380 of file toplev.h.

References curr_frame.

Referenced by current_context().

size_t octave_call_stack::do_current_frame ( void  )
inlineprivate

Definition at line 368 of file toplev.h.

References curr_frame.

Referenced by current_frame().

int octave_call_stack::do_current_line ( void  ) const
private

Definition at line 147 of file toplev.cc.

References cs, curr_frame, and octave_call_stack::stack_frame::m_line.

Referenced by current_line().

symbol_table::scope_id octave_call_stack::do_current_scope ( void  ) const
inlineprivate

Definition at line 374 of file toplev.h.

References curr_frame.

Referenced by current_scope().

octave_function* octave_call_stack::do_element ( size_t  n)
inlineprivate

Definition at line 393 of file toplev.h.

References octave_call_stack::stack_frame::m_fcn.

Referenced by element().

void octave_call_stack::do_goto_base_frame ( void  )
private
void octave_call_stack::do_goto_caller_frame ( void  )
private
bool octave_call_stack::do_goto_frame ( size_t  n,
bool  verbose 
)
private
bool octave_call_stack::do_goto_frame_relative ( int  n,
bool  verbose 
)
private
size_t octave_call_stack::do_num_user_code_frames ( octave_idx_type curr_user_frame) const
private

Definition at line 228 of file toplev.cc.

References cs, curr_frame, f, and octave_base_value::is_user_code().

Referenced by do_backtrace_frames(), and num_user_code_frames().

void octave_call_stack::do_pop ( void  )
inlineprivate
void octave_call_stack::do_push ( octave_function fcn,
symbol_table::scope_id  scope,
symbol_table::context_id  context 
)
inlineprivate

Definition at line 410 of file toplev.h.

References curr_frame, and symbol_table::set_scope_and_context().

Referenced by create_instance(), and push().

void octave_call_stack::do_set_column ( int  c)
inlineprivate

Definition at line 453 of file toplev.h.

References octave_call_stack::stack_frame::m_column.

Referenced by set_column().

void octave_call_stack::do_set_line ( int  l)
inlineprivate

Definition at line 443 of file toplev.h.

References octave_call_stack::stack_frame::m_line.

Referenced by set_line().

void octave_call_stack::do_set_location ( int  l,
int  c 
)
inlineprivate
size_t octave_call_stack::do_size ( void  )
inlineprivate

Definition at line 370 of file toplev.h.

Referenced by size().

static octave_function* octave_call_stack::element ( size_t  n)
inlinestatic

Definition at line 215 of file toplev.h.

References do_element(), instance, and instance_ok().

octave_map octave_call_stack::empty_backtrace ( void  )
static

Definition at line 323 of file toplev.cc.

References bt_fields.

Referenced by initialize_last_error_stack().

static void octave_call_stack::goto_base_frame ( void  )
inlinestatic

Definition at line 289 of file toplev.h.

References do_goto_base_frame(), instance, and instance_ok().

Referenced by Fassignin(), Fevalin(), mexGetVariable(), mexPutVariable(), and source_file().

static void octave_call_stack::goto_caller_frame ( void  )
inlinestatic

Definition at line 283 of file toplev.h.

References do_goto_caller_frame(), instance, and instance_ok().

Referenced by Fassignin(), Fevalin(), and source_file().

static bool octave_call_stack::goto_frame ( size_t  n = 0,
bool  verbose = false 
)
inlinestatic

Definition at line 267 of file toplev.h.

References do_goto_frame(), instance, and instance_ok().

Referenced by restore_frame().

static bool octave_call_stack::goto_frame_relative ( int  n,
bool  verbose = false 
)
inlinestatic

Definition at line 277 of file toplev.h.

References do_goto_frame_relative(), instance, and instance_ok().

Referenced by do_dbupdown(), and Fkeyboard().

static bool octave_call_stack::instance_ok ( void  )
inlinestatic
static size_t octave_call_stack::num_user_code_frames ( octave_idx_type curr_user_frame)
inlinestatic

Definition at line 191 of file toplev.h.

References do_num_user_code_frames(), instance, and instance_ok().

static void octave_call_stack::pop ( void  )
inlinestatic
static void octave_call_stack::push ( octave_function f,
symbol_table::scope_id  scope = symbol_table::current_scope (),
symbol_table::context_id  context = symbol_table::current_context () 
)
inlinestatic
static void octave_call_stack::push ( symbol_table::scope_id  scope = symbol_table::current_scope (),
symbol_table::context_id  context = symbol_table::current_context () 
)
inlinestatic

Definition at line 242 of file toplev.h.

References context, do_push(), instance, and instance_ok().

static void octave_call_stack::restore_frame ( size_t  n)
inlinestatic

Definition at line 272 of file toplev.h.

References goto_frame().

Referenced by do_keyboard(), and Fkeyboard().

static void octave_call_stack::set_column ( int  c)
inlinestatic

Definition at line 261 of file toplev.h.

References do_set_column(), instance, and instance_ok().

Referenced by tree_evaluator::do_unwind_protect_cleanup_code().

static void octave_call_stack::set_line ( int  l)
inlinestatic

Definition at line 255 of file toplev.h.

References do_set_line(), instance, and instance_ok().

Referenced by tree_evaluator::do_unwind_protect_cleanup_code().

static void octave_call_stack::set_location ( int  l,
int  c 
)
inlinestatic
static size_t octave_call_stack::size ( void  )
inlinestatic

Definition at line 186 of file toplev.h.

References do_size(), instance, and instance_ok().

Member Data Documentation

std::deque<stack_frame> octave_call_stack::cs
private
size_t octave_call_stack::curr_frame
private
octave_call_stack * octave_call_stack::instance = 0
staticprivate

The documentation for this class was generated from the following files: