Mercurial > octave-nkf
diff src/parse.y @ 7901:3e4c9b69069d
call stack changes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 08 Jul 2008 12:00:32 -0400 |
parents | 5861b95e9879 |
children | 8018e10d2b87 |
line wrap: on
line diff
--- a/src/parse.y Sat Jun 28 05:15:02 2008 -0400 +++ b/src/parse.y Tue Jul 08 12:00:32 2008 -0400 @@ -3407,14 +3407,14 @@ if (! context.empty ()) { if (context == "caller") - symbol_table::push_scope (symbol_table::current_caller_scope ()); + octave_call_stack::goto_caller_frame (); else if (context == "base") - symbol_table::push_scope (symbol_table::top_scope ()); + octave_call_stack::goto_base_frame (); else error ("source: context must be \"caller\" or \"base\""); if (! error_state) - unwind_protect::add (symbol_table::pop_scope); + unwind_protect::add (octave_call_stack::unwind_pop); } if (! error_state) @@ -3965,22 +3965,16 @@ symbol_table::scope_id scope = -1; if (context == "caller") - { - if (symbol_table::current_scope () == symbol_table::current_caller_scope ()) - { - error ("assignin: assignment in caller not implemented yet for direct recursion"); - return retval; - } - else - scope = symbol_table::current_caller_scope (); - } + octave_call_stack::goto_caller_frame (); else if (context == "base") - scope = symbol_table::top_scope (); + octave_call_stack::goto_base_frame (); else error ("assignin: context must be \"caller\" or \"base\""); if (! error_state) { + unwind_protect::add (octave_call_stack::unwind_pop); + std::string nm = args(1).string_value (); if (! error_state) @@ -4024,23 +4018,15 @@ unwind_protect::begin_frame ("Fevalin"); if (context == "caller") - { - if (symbol_table::current_scope () == symbol_table::current_caller_scope ()) - { - error ("evalin: evaluation in caller not implemented yet for direct recursion"); - return retval; - } - else - symbol_table::push_scope (symbol_table::current_caller_scope ()); - } + octave_call_stack::goto_caller_frame (); else if (context == "base") - symbol_table::push_scope (symbol_table::top_scope ()); + octave_call_stack::goto_base_frame (); else error ("evalin: context must be \"caller\" or \"base\""); if (! error_state) { - unwind_protect::add (symbol_table::pop_scope); + unwind_protect::add (octave_call_stack::unwind_pop); if (nargin > 2) {