# HG changeset patch # User Rik # Date 1372907072 25200 # Node ID 8fbc09eded8c4e49e716adba3400a488c098fd02 # Parent 68fc671a933906faa80ca7c2fea6d858111f0c7e Complete removal of warning about assigning to ancient built-in variables. * libinterp/parse-tree/pt-assign.cc(tree_simple_assignment, tree_multi_assignment): Remove first_execution variable from constructor. * libinterp/parse-tree/pt-assign.cc(rvalue1): Remove setting first_execution. * libinterp/parse-tree/pt-assign.cc(rvalue): Remove setting first_execution. Remove useless loop over lhs for warning about assigning to built-in vars. * libinterp/parse-tree/pt-assign.h(tree_simple_assignment, tree_multi_assignment): Remove first_execution variable from constructors and from private class variable list. diff -r 68fc671a9339 -r 8fbc09eded8c libinterp/parse-tree/pt-assign.cc --- a/libinterp/parse-tree/pt-assign.cc Wed Jul 03 17:43:48 2013 -0700 +++ b/libinterp/parse-tree/pt-assign.cc Wed Jul 03 20:04:32 2013 -0700 @@ -48,8 +48,7 @@ tree_simple_assignment::tree_simple_assignment (tree_expression *le, tree_expression *re, bool plhs, int l, int c, octave_value::assign_op t) - : tree_expression (l, c), lhs (le), rhs (re), preserve (plhs), etype (t), - first_execution (true) { } + : tree_expression (l, c), lhs (le), rhs (re), preserve (plhs), etype (t) { } tree_simple_assignment::~tree_simple_assignment (void) { @@ -145,8 +144,6 @@ } } - first_execution = false; - return retval; } @@ -181,8 +178,7 @@ tree_multi_assignment::tree_multi_assignment (tree_argument_list *lst, tree_expression *r, bool plhs, int l, int c) - : tree_expression (l, c), lhs (lst), rhs (r), preserve (plhs), - first_execution (true) { } + : tree_expression (l, c), lhs (lst), rhs (r), preserve (plhs) { } tree_multi_assignment::~tree_multi_assignment (void) { @@ -216,14 +212,6 @@ if (error_state) return retval; - if (first_execution) - { - for (tree_argument_list::iterator p = lhs->begin (); - p != lhs->end (); - p++) - tree_expression *lhs_expr = *p; - } - if (rhs) { std::list lvalue_list = lhs->lvalue_list (); @@ -359,8 +347,6 @@ } - first_execution = false; - return retval; } diff -r 68fc671a9339 -r 8fbc09eded8c libinterp/parse-tree/pt-assign.h --- a/libinterp/parse-tree/pt-assign.h Wed Jul 03 17:43:48 2013 -0700 +++ b/libinterp/parse-tree/pt-assign.h Wed Jul 03 20:04:32 2013 -0700 @@ -47,7 +47,7 @@ tree_simple_assignment (bool plhs = false, int l = -1, int c = -1, octave_value::assign_op t = octave_value::op_asn_eq) : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), ans_ass (), - etype (t), first_execution (true) { } + etype (t) { } tree_simple_assignment (tree_expression *le, tree_expression *re, bool plhs = false, int l = -1, int c = -1, @@ -100,9 +100,6 @@ // The type of the expression. octave_value::assign_op etype; - // true only on first rvalue() call. - bool first_execution; - // No copying! tree_simple_assignment (const tree_simple_assignment&); @@ -118,8 +115,7 @@ public: tree_multi_assignment (bool plhs = false, int l = -1, int c = -1) - : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs), - first_execution (true) { } + : tree_expression (l, c), lhs (0), rhs (0), preserve (plhs) { } tree_multi_assignment (tree_argument_list *lst, tree_expression *r, bool plhs = false, int l = -1, int c = -1); @@ -160,9 +156,6 @@ // True if we should not delete the lhs. bool preserve; - // true only on first rvalue() call. - bool first_execution; - // No copying! tree_multi_assignment (const tree_multi_assignment&);