# HG changeset patch # User jwe # Date 863190970 0 # Node ID dfffbf305468f6e2719c6314d4e8cd5f3cda01fb # Parent ac3368dba5d3e8e2ce02b407663ce6309a53fa2e [project @ 1997-05-09 15:15:18 by jwe] diff -r ac3368dba5d3 -r dfffbf305468 src/ChangeLog --- a/src/ChangeLog Fri May 09 15:11:16 1997 +0000 +++ b/src/ChangeLog Fri May 09 15:16:10 1997 +0000 @@ -1,5 +1,29 @@ Fri May 9 07:40:59 1997 John W. Eaton + * pt-exp.cc (tree_simple_assignment_expression::eval): Use new + octave_variabl_reference::index function to handle indexing. + + * oct-var-ref.h, oct-var-ref.cc (idx): New data member. + (octave_variable_reference::index): Set it. + (octave_variable_reference::assign): Handle indexing here. + Delete version of this function htat takes index arg. + + * variables.h (struct builtin_varaible): Delete. + * variables.cc (install_builtin_variable): Take all elts of + builtin_variable struct directly. + * defun.h (DEFVAR_INT): Call install_builtin_variable directly. + + * symtab.h, defun-int.h: Don't include variables.h. + + * symtab.h (symbol_record::sv_function): Move typedef here. + * variables.h: From here. + + * oct-var-ref.h, oct-var-ref.cc: New files for + octave_variable_reference class, extracted from variables.h and + variables.cc + + * oct-obj.h (octave_value_list::empty): New function. + * variables.h (class octave_variable_reference): Rewrite to work as a proxy class to store a pointer to octave_value and, optionally, the change function to call and the name of the diff -r ac3368dba5d3 -r dfffbf305468 src/Makefile.in --- a/src/Makefile.in Fri May 09 15:11:16 1997 +0000 +++ b/src/Makefile.in Fri May 09 15:16:10 1997 +0000 @@ -81,7 +81,7 @@ oct-builtin.h oct-fcn.h oct-fstrm.h oct-hist.h oct-iostrm.h \ oct-map.h oct-mapper.h oct-obj.h oct-prcstrm.h oct-procbuf.h \ oct-stdstrm.h oct-stream.h oct-strstrm.h oct-sym.h \ - oct-usr-fcn.h oct.h ops.h pager.h parse.h \ + oct-usr-fcn.h oct-var-ref.h oct.h ops.h pager.h parse.h \ pr-output.h procstream.h sighandlers.h symtab.h sysdep.h \ systime.h syswait.h token.h toplev.h unwind-prot.h utils.h \ variables.h version.h xdiv.h xpow.h $(OV_INCLUDES) $(PT_INCLUDES) @@ -119,7 +119,7 @@ load-save.cc mappers.cc oct-fstrm.cc oct-hist.cc \ oct-iostrm.cc oct-map.cc oct-obj.cc oct-prcstrm.cc \ oct-procbuf.cc oct-stdstrm.cc oct-stream.cc oct-strstrm.cc \ - pager.cc parse.y pr-output.cc procstream.cc \ + oct-var-ref.cc pager.cc parse.y pr-output.cc procstream.cc \ sighandlers.cc strcasecmp.c strncase.c strfns.cc \ strftime.c symtab.cc syscalls.cc sysdep.cc token.cc \ toplev.cc unwind-prot.cc utils.cc variables.cc xdiv.cc \ diff -r ac3368dba5d3 -r dfffbf305468 src/mappers.cc --- a/src/mappers.cc Fri May 09 15:11:16 1997 +0000 +++ b/src/mappers.cc Fri May 09 15:16:10 1997 +0000 @@ -31,6 +31,7 @@ #include "defun.h" #include "error.h" #include "oct-mapper.h" +#include "variables.h" // XXX FIXME XXX -- perhaps this could be avoided by determining // whether the is* functions are actually functions or just macros. diff -r ac3368dba5d3 -r dfffbf305468 src/pt-exp.cc --- a/src/pt-exp.cc Fri May 09 15:11:16 1997 +0000 +++ b/src/pt-exp.cc Fri May 09 15:16:10 1997 +0000 @@ -37,6 +37,7 @@ #include "help.h" #include "input.h" #include "oct-obj.h" +#include "oct-var-ref.h" #include "pager.h" #include "ov.h" #include "pt-exp.h" @@ -561,7 +562,9 @@ if (nargin > 0) { - ult.assign (etype, args, rhs_val); + ult.index (args); + + ult.assign (etype, rhs_val); if (error_state) eval_error (); diff -r ac3368dba5d3 -r dfffbf305468 src/pt-id.cc --- a/src/pt-id.cc Fri May 09 15:11:16 1997 +0000 +++ b/src/pt-id.cc Fri May 09 15:16:10 1997 +0000 @@ -32,6 +32,7 @@ #include "oct-obj.h" #include "oct-fcn.h" #include "oct-sym.h" +#include "oct-var-ref.h" #include "pager.h" #include "pt-const.h" #include "pt-id.h" diff -r ac3368dba5d3 -r dfffbf305468 src/pt-indir.cc --- a/src/pt-indir.cc Fri May 09 15:11:16 1997 +0000 +++ b/src/pt-indir.cc Fri May 09 15:16:10 1997 +0000 @@ -33,6 +33,7 @@ #include "oct-map.h" #include "oct-obj.h" #include "oct-sym.h" +#include "oct-var-ref.h" #include "pager.h" #include "pt-const.h" #include "pt-id.h"