Mercurial > octave
comparison libinterp/parse-tree/pt-eval.h @ 27199:f27002104c5b
eliminate direct access to call_stack in error functions
* pt-eval.h, pt-eval.cc (tree_evaluator::backtrace_frames,
tree_evaluator::backtrace, tree_evaluator::empty_backtrace,
tree_evaluator::current_function_name, tree_evaluator::in_user_code,
tree_evaluator::get_current_frame_number_from_call_stack):
New functions.
* error.cc (initialize_las_error_stack): Delete.
(verror, pr_where, maybe_enter_debugger, error_1, warning_1,
Frethrow, Flasterror): Eliminate direct access to call stack.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 01 Apr 2019 16:58:05 +0000 |
parents | 8408acb7ca4f |
children | dc1edf932248 |
comparison
equal
deleted
inserted
replaced
27198:dffdabfd0213 | 27199:f27002104c5b |
---|---|
472 stack_frame& get_current_stack_frame (void) | 472 stack_frame& get_current_stack_frame (void) |
473 { | 473 { |
474 return m_call_stack.get_current_stack_frame (); | 474 return m_call_stack.get_current_stack_frame (); |
475 } | 475 } |
476 | 476 |
477 std::list<stack_frame *> | |
478 backtrace_frames (octave_idx_type& curr_user_frame) const; | |
479 | |
480 std::list<stack_frame *> backtrace_frames () const; | |
481 | |
482 octave_map backtrace (octave_idx_type& curr_user_frame, | |
483 bool print_subfn = true) const; | |
484 | |
485 octave_map backtrace (); | |
486 | |
487 octave_map empty_backtrace (void) const; | |
488 | |
477 void push_dummy_scope (const std::string& name); | 489 void push_dummy_scope (const std::string& name); |
478 void pop_scope (void); | 490 void pop_scope (void); |
479 | 491 |
480 symbol_scope get_top_scope (void) const; | 492 symbol_scope get_top_scope (void) const; |
481 symbol_scope get_current_scope (void) const; | 493 symbol_scope get_current_scope (void) const; |
513 std::list<std::string> variable_names (void) const; | 525 std::list<std::string> variable_names (void) const; |
514 | 526 |
515 octave_user_code * get_user_code (const std::string& fname = "", | 527 octave_user_code * get_user_code (const std::string& fname = "", |
516 const std::string& class_name = ""); | 528 const std::string& class_name = ""); |
517 | 529 |
530 std::string current_function_name (void) const; | |
531 | |
532 bool in_user_code (void) const; | |
533 | |
518 octave_map get_autoload_map (void) const; | 534 octave_map get_autoload_map (void) const; |
519 | 535 |
520 std::string lookup_autoload (const std::string& nm) const; | 536 std::string lookup_autoload (const std::string& nm) const; |
521 | 537 |
522 std::list<std::string> autoloaded_functions (void) const; | 538 std::list<std::string> autoloaded_functions (void) const; |
567 size_t debug_frame (size_t n) | 583 size_t debug_frame (size_t n) |
568 { | 584 { |
569 size_t val = m_debug_frame; | 585 size_t val = m_debug_frame; |
570 m_debug_frame = n; | 586 m_debug_frame = n; |
571 return val; | 587 return val; |
588 } | |
589 | |
590 size_t current_call_stack_frame_number (void) const | |
591 { | |
592 return m_call_stack.current_frame (); | |
572 } | 593 } |
573 | 594 |
574 bool debug_mode (void) const { return m_debug_mode; } | 595 bool debug_mode (void) const { return m_debug_mode; } |
575 | 596 |
576 bool debug_mode (bool flag) | 597 bool debug_mode (bool flag) |