Mercurial > octave-nkf
diff src/ov-usr-fcn.h @ 10637:9cd5aa83fa62
implement 'local' parameter to pseudo-variables
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 17 May 2010 13:46:57 +0200 |
parents | f3b65e1ae355 |
children | 1b2fcd122c6a |
line wrap: on
line diff
--- a/src/ov-usr-fcn.h Mon May 17 11:52:59 2010 +0200 +++ b/src/ov-usr-fcn.h Mon May 17 13:46:57 2010 +0200 @@ -34,6 +34,7 @@ #include "ov-fcn.h" #include "ov-typeinfo.h" #include "symtab.h" +#include "unwind-prot.h" class string_vector; @@ -284,6 +285,18 @@ void accept (tree_walker& tw); + template <class T> + bool local_protect (T& variable) + { + if (curr_unwind_protect_frame) + { + curr_unwind_protect_frame->protect_var (variable); + return true; + } + else + return false; + } + #if 0 void print_symtab_info (std::ostream& os) const; #endif @@ -347,6 +360,9 @@ symbol_table::scope_id local_scope; + // pointer to the current unwind_protect frame of this function. + unwind_protect *curr_unwind_protect_frame; + #if 0 // The symbol record for argn in the local symbol table. octave_value& argn_varref;