# HG changeset patch # User jwe # Date 789080379 0 # Node ID df3c4da3adb05bc03a90b560d509c9314fdfe762 # Parent 19d836fec1c8df067cb421e2b3ca51592ee7beb0 [project @ 1995-01-02 20:59:39 by jwe] diff --git a/src/pt-const.h b/src/pt-const.h --- a/src/pt-const.h +++ b/src/pt-const.h @@ -170,7 +170,9 @@ rep = new tree_constant_rep (*rep); rep->count = 1; } + rep->assign (rhs, args); + return *this; } @@ -311,6 +313,7 @@ rep = new tree_constant_rep (*rep); rep->count = 1; } + rep->bump_value (et); } @@ -319,9 +322,12 @@ tree_constant eval (int print) { - rep->maybe_mutate (); + if (! is_scalar_type ()) + rep->maybe_mutate (); + if (print) rep->print (); + return *this; } @@ -331,6 +337,7 @@ // XXX FIXME XXX -- make it safe to call do_index() with // args.length () == 0 + if (args.length () > 0) retval(0) = rep->do_index (args); else @@ -338,6 +345,7 @@ if (retval(0).is_defined ()) retval(0).eval (print); + return retval; }