Mercurial > octave-libgccjit
comparison src/input.cc @ 7913:f46e73bcb85b
toplev.cc (main_loop): undo previous change; input.cc (get_debug_input): don't delete global_command here
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 09 Jul 2008 18:03:10 -0400 |
parents | 8018e10d2b87 |
children | 0ef13e15319b |
comparison
equal
deleted
inserted
replaced
7912:75df1f0b4c9d | 7913:f46e73bcb85b |
---|---|
629 unwind_protect_ptr (global_command); | 629 unwind_protect_ptr (global_command); |
630 | 630 |
631 // This is the same as yyparse in parse.y. | 631 // This is the same as yyparse in parse.y. |
632 int retval = octave_parse (); | 632 int retval = octave_parse (); |
633 | 633 |
634 tree_statement_list *command = global_command; | 634 if (retval == 0 && global_command) |
635 { | |
636 global_command->eval (); | |
637 | |
638 // FIXME -- To avoid a memory leak, global_command should be | |
639 // deleted, I think. But doing that here causes trouble if | |
640 // an error occurs while executing a debugging command | |
641 // (dbstep, for example). It's not clear to me why that | |
642 // happens. | |
643 // | |
644 // delete global_command; | |
645 // | |
646 // global_command = 0; | |
647 | |
648 if (octave_completion_matches_called) | |
649 octave_completion_matches_called = false; | |
650 } | |
635 | 651 |
636 // Restore previous value of global_command. | 652 // Restore previous value of global_command. |
637 unwind_protect::run (); | 653 unwind_protect::run (); |
638 | 654 |
639 if (retval == 0 && command) | 655 OCTAVE_QUIT; |
640 { | |
641 command->eval (); | |
642 | |
643 delete command; | |
644 | |
645 command = 0; | |
646 | |
647 OCTAVE_QUIT; | |
648 | |
649 if (octave_completion_matches_called) | |
650 octave_completion_matches_called = false; | |
651 } | |
652 } | 656 } |
653 | 657 |
654 unwind_protect::run_frame ("get_debug_input"); | 658 unwind_protect::run_frame ("get_debug_input"); |
655 } | 659 } |
656 | 660 |