diff libinterp/interpfcn/variables.cc @ 16442:302157614308

deprecate symbol_table::varref functions * ov-usr-fcn.h (octave_user_function::argn_varref, octave_user_function::nargin_varref, octave_user_function::nargout_varref, octave_user_function::varargin_varref): Delete unused variables. * symtab.h (symbol_table::symbol_record::symbol_record_ref::assign, symbol_table::symbol_record::symbol_record_ref::do_non_const_unary_op, symbol_table::symbol_record::do_non_const_unary_op, (symbol_table::symbol_record::is_undefined, symbol_table::symbol_record::assign, symbol_table::assign, symbol_table::force_assign, symbol_table::global_assign, symbol_table::persistent_assign, symbol_table::top_level_assign, symbol_table::do_assign, symbol_table::do_persistent_assign): New functions. (symbol_table::symbol_record::symbol_record_ref::varref): Avoid calls to deprecated functions. (symbol_table::varref, symbol_table::force_varref, symbol_table::global_varref, symbol_table::persistent_varref, symbol_table::top_level_varref, symbol_table::do_varref, symbol_table::do_persistent_varref): Deprecate. (symbol_table::symbol_reference::is_black_hole): New function. * oct-lvalue.h, oct-lvalue.cc: Store symbol_reference instead of pointer to octave_value object. (octave_lvalue::value): Now const. (octave_lvalue::object): Delete. * pt-id.cc (tree_identifier::lvalue): Construct octave_lvalue from sym, not sym->varref. * ls-mat5.cc, oct-lvalue.cc, oct-lvalue.h, pt-jit.cc, error.cc, load-save.cc, symtab.cc, symtab.h, variables.cc, ov-fcn-handle.cc, ov-usr-fcn.cc, ov-usr-fcn.h, oct-parse.in.yy, pt-eval.cc, pt-id.h, pt-idx.cc, mex.cc: Change all uses of varref functions to use assign instead. Use varval instead of varref where appropriate. * load-save.cc (install_loaded_variable): Don't manipulate symbol_record directly.
author John W. Eaton <jwe@octave.org>
date Sat, 06 Apr 2013 11:51:23 -0400
parents 37104cd70d0f
children 62d8aaf6ba8f
line wrap: on
line diff
--- a/libinterp/interpfcn/variables.cc	Sat Apr 06 07:53:00 2013 -0400
+++ b/libinterp/interpfcn/variables.cc	Sat Apr 06 11:51:23 2013 -0400
@@ -616,7 +616,7 @@
 void
 set_global_value (const std::string& nm, const octave_value& val)
 {
-  symbol_table::global_varref (nm) = val;
+  symbol_table::global_assign (nm, val);
 }
 
 octave_value
@@ -633,7 +633,7 @@
 void
 set_top_level_value (const std::string& nm, const octave_value& val)
 {
-  symbol_table::top_level_varref (nm) = val;
+  symbol_table::top_level_assign (nm, val);
 }
 
 // Variable values.
@@ -1881,7 +1881,7 @@
         }
       else
         {
-          symbol_table::force_varref (ans) = val;
+          symbol_table::force_assign (ans, val);
 
           if (print)
             val.print_with_name (octave_stdout, ans);