* value.h (value_of_this): Update.
authorTom Tromey <tromey@redhat.com>
Fri, 17 Jun 2011 20:35:09 +0000 (20:35 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 17 Jun 2011 20:35:09 +0000 (20:35 +0000)
(value_of_local): Remove.
* valops.c (value_of_this): Rename from value_of_local.  Change
parameters.
* p-exp.y (exp): Update.
(variable): Likewise.
* eval.c (evaluate_subexp_standard) <OP_THIS>: Use value_of_this.

gdb/ChangeLog
gdb/eval.c
gdb/p-exp.y
gdb/valops.c
gdb/value.h

index 418e1d1578634a51823af31691817f23eb32c7c9..4c8c65837e9af1c24a50dadc315372a1460ab39e 100644 (file)
@@ -1,3 +1,13 @@
+2011-06-17  Tom Tromey  <tromey@redhat.com>
+
+       * value.h (value_of_this): Update.
+       (value_of_local): Remove.
+       * valops.c (value_of_this): Rename from value_of_local.  Change
+       parameters.
+       * p-exp.y (exp): Update.
+       (variable): Likewise.
+       * eval.c (evaluate_subexp_standard) <OP_THIS>: Use value_of_this.
+
 2011-06-17  Tom Tromey  <tromey@redhat.com>
 
        * valops.c (value_of_local): Complain if NAME is NULL.
index 22ca8819f341b36a25e68f4fe3471c7948561593..57a871f11f9e3b7a086705846d3673794bafe5e7 100644 (file)
@@ -2830,7 +2830,7 @@ evaluate_subexp_standard (struct type *expect_type,
 
     case OP_THIS:
       (*pos) += 1;
-      return value_of_local (exp->language_defn->la_name_of_this, 1);
+      return value_of_this (exp->language_defn, 1);
 
     case OP_TYPE:
       /* The value is not supposed to be used.  This is here to make it
index 32c7aca657b429657f6c8f254a078073d5cf45fb..0a384e146dd03c94a53bb1374c97ca6b00115b00 100644 (file)
@@ -612,7 +612,7 @@ exp :       THIS
                          write_exp_elt_opcode (OP_THIS);
                          write_exp_elt_opcode (OP_THIS);
                          /* We need type of this.  */
-                         this_val = value_of_this (0);
+                         this_val = value_of_this (parse_language, 0);
                          if (this_val)
                            this_type = value_type (this_val);
                          else
@@ -760,7 +760,7 @@ variable:   name_not_typename
                              write_exp_string ($1.stoken);
                              write_exp_elt_opcode (STRUCTOP_PTR);
                              /* We need type of this.  */
-                             this_val = value_of_this (0);
+                             this_val = value_of_this (parse_language, 0);
                              if (this_val)
                                this_type = value_type (this_val);
                              else
index 6129bfef4c01664d506a8c2c2b6e356eedf6b187..9b3b90a7506b0cc873d62973fdda237d839a4473 100644 (file)
@@ -3601,12 +3601,13 @@ value_full_object (struct value *argp,
    inappropriate context.  */
 
 struct value *
-value_of_local (const char *name, int complain)
+value_of_this (const struct language_defn *lang, int complain)
 {
   struct symbol *func, *sym;
   struct block *b;
   struct value * ret;
   struct frame_info *frame;
+  const char *name = lang->la_name_of_this;
 
   if (!name)
     {
@@ -3660,18 +3661,6 @@ value_of_local (const char *name, int complain)
   return ret;
 }
 
-/* C++/Objective-C: return the value of the class instance variable,
-   if one exists.  Flag COMPLAIN signals an error if the request is
-   made in an inappropriate context.  */
-
-struct value *
-value_of_this (int complain)
-{
-  if (!current_language->la_name_of_this)
-    return 0;
-  return value_of_local (current_language->la_name_of_this, complain);
-}
-
 /* Create a slice (sub-string, sub-array) of ARRAY, that is LENGTH
    elements long, starting at LOWBOUND.  The result has the same lower
    bound as the original ARRAY.  */
index 65d0a0249a05ca8c8dd05187729978ed2b295037..03ca36bb5c1dc9e326469f7bfcb2318ae9ea12ae 100644 (file)
@@ -715,7 +715,8 @@ extern int value_logical_not (struct value *arg1);
 
 /* C++ */
 
-extern struct value *value_of_this (int complain);
+extern struct value *value_of_this (const struct language_defn *lang,
+                                   int complain);
 
 extern struct value *value_x_binop (struct value *arg1, struct value *arg2,
                                    enum exp_opcode op,
@@ -835,8 +836,6 @@ extern struct value *find_function_in_inferior (const char *,
 
 extern struct value *value_allocate_space_in_inferior (int);
 
-extern struct value *value_of_local (const char *name, int complain);
-
 extern struct value *value_subscripted_rvalue (struct value *array,
                                               LONGEST index, int lowerbound);
 
This page took 0.032237 seconds and 4 git commands to generate.