This is the mail archive of the archer-commits@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] archer-keiths-expr-cumulative: Merge branch 'archer-keiths-expr-cumulative' of ssh://sourceware.org/git/archer into remote-archer-keiths-expr-cumulative


The branch, archer-keiths-expr-cumulative has been updated
       via  6c26e0eb10ea4cf9c0b84d1e3bf4de4819841c32 (commit)
       via  f9259817e8d6e863a33b2404599b38f40eeec644 (commit)
      from  2c5adf793e7d145292bcba45fa8c179e9480bd81 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 6c26e0eb10ea4cf9c0b84d1e3bf4de4819841c32
Merge: f9259817e8d6e863a33b2404599b38f40eeec644 2c5adf793e7d145292bcba45fa8c179e9480bd81
Author: keiths <keiths@redhat.com>
Date:   Mon Apr 6 14:11:55 2009 -0700

    Merge branch 'archer-keiths-expr-cumulative' of ssh://sourceware.org/git/archer into remote-archer-keiths-expr-cumulative

commit f9259817e8d6e863a33b2404599b38f40eeec644
Author: keiths <keiths@redhat.com>
Date:   Mon Apr 6 11:29:48 2009 -0700

    	* linespec.c (collect_methods): Delete.
    	(add_matching_methods): Reove destructor special case.
    	(find_method): Call find_methods directly instead of
    	collect_methods.
    	* valops.c (value_struct_elt): Remove destructor
    	special cases.
    	(check_field): Likewise.
    	(value_struct_elt_for_reference): Likewise.
    	(destructor_name_p): Remove misleading comment about dtors
    	being "special cases".

-----------------------------------------------------------------------

Summary of changes:
 gdb/linespec.c |   42 +-----------------------------------------
 gdb/valops.c   |   45 ---------------------------------------------
 2 files changed, 1 insertions(+), 86 deletions(-)

First 500 lines of diff:
diff --git a/gdb/linespec.c b/gdb/linespec.c
index f5015db..2d20e13 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -77,10 +77,6 @@ static struct symtabs_and_lines find_method (int funfirstline,
 					     struct type *t,
 					     struct symbol *sym_class);
 
-static int collect_methods (char *copy, struct type *t,
-			    struct symbol *sym_class,
-			    struct symbol **sym_arr);
-
 static NORETURN void cplusplus_error (const char *name,
 				      const char *fmt, ...)
      ATTR_NORETURN ATTR_FORMAT (printf, 2, 3);
@@ -307,11 +303,6 @@ add_matching_methods (int method_counter, struct type *t,
       else
 	phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
 
-      /* Destructor is handled by caller, don't add it to
-	 the list.  */
-      if (is_destructor_name (phys_name) != 0)
-	continue;
-
       sym_arr[i1] = lookup_symbol_in_language (phys_name,
 				   NULL, VAR_DOMAIN,
 				   language,
@@ -1475,7 +1466,7 @@ find_method (int funfirstline, char ***canonical, char *saved_arg,
   /* Find all methods with a matching name, and put them in
      sym_arr.  */
 
-  i1 = collect_methods (copy, t, sym_class, sym_arr);
+  i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr);
 
   if (i1 == 1)
     {
@@ -1526,37 +1517,6 @@ find_method (int funfirstline, char ***canonical, char *saved_arg,
     }
 }
 
-/* Find all methods named COPY in the class whose type is T, and put
-   them in SYM_ARR.  Return the number of methods found.  */
-
-static int
-collect_methods (char *copy, struct type *t,
-		 struct symbol *sym_class, struct symbol **sym_arr)
-{
-  int i1 = 0;	/*  Counter for the symbol array.  */
-
-  if (destructor_name_p (copy, t))
-    {
-      /* Destructors are a special case.  */
-      int m_index, f_index;
-
-      if (get_destructor_fn_field (t, &m_index, &f_index))
-	{
-	  struct fn_field *f = TYPE_FN_FIELDLIST1 (t, m_index);
-
-	  sym_arr[i1] =
-	    lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, f_index),
-			   NULL, VAR_DOMAIN, (int *) NULL);
-	  if (sym_arr[i1])
-	    i1++;
-	}
-    }
-  else
-    i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr);
-
-  return i1;
-}
-
 
 
 /* Return the symtab associated to the filename given by the substring
diff --git a/gdb/valops.c b/gdb/valops.c
index fb48e39..1ec7647 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1841,9 +1841,6 @@ value_struct_elt (struct value **argp, struct value **args,
       /* C++: If it was not found as a data field, then try to
          return it as a pointer to a method.  */
 
-      if (destructor_name_p (name, t))
-	error (_("Cannot get value of destructor"));
-
       v = search_struct_method (name, argp, args, 0, 
 				static_memfuncp, t);
 
@@ -1859,32 +1856,6 @@ value_struct_elt (struct value **argp, struct value **args,
       return v;
     }
 
-  if (destructor_name_p (name, t))
-    {
-      if (!args[1])
-	{
-	  /* Destructors are a special case.  */
-	  int m_index, f_index;
-
-	  v = NULL;
-	  if (get_destructor_fn_field (t, &m_index, &f_index))
-	    {
-	      v = value_fn_field (NULL, 
-				  TYPE_FN_FIELDLIST1 (t, m_index),
-				  f_index, NULL, 0);
-	    }
-	  if (v == NULL)
-	    error (_("could not find destructor function named %s."), 
-		   name);
-	  else
-	    return v;
-	}
-      else
-	{
-	  error (_("destructor should not have any argument"));
-	}
-    }
-  else
     v = search_struct_method (name, argp, args, 0, 
 			      static_memfuncp, t);
   
@@ -2516,8 +2487,6 @@ classify_oload_match (struct badness_vector *oload_champ_bv,
 int
 destructor_name_p (const char *name, const struct type *type)
 {
-  /* Destructors are a special case.  */
-
   if (name[0] == '~')
     {
       char *dname = type_name_no_tag (type);
@@ -2556,14 +2525,6 @@ check_field (struct type *type, const char *name)
   /* C++: If it was not found as a data field, then try to return it
      as a pointer to a method.  */
 
-  /* Destructors are a special case.  */
-  if (destructor_name_p (name, type))
-    {
-      int m_index, f_index;
-
-      return get_destructor_fn_field (type, &m_index, &f_index);
-    }
-
   for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; --i)
     {
       if (strcmp_iw (TYPE_FN_FIELDLIST_NAME (type, i), name) == 0)
@@ -2709,12 +2670,6 @@ value_struct_elt_for_reference (struct type *domain, int offset,
   /* C++: If it was not found as a data field, then try to return it
      as a pointer to a method.  */
 
-  /* Destructors are a special case.  */
-  if (destructor_name_p (name, t))
-    {
-      error (_("member pointers to destructors not implemented yet"));
-    }
-
   /* Perform all necessary dereferencing.  */
   while (intype && TYPE_CODE (intype) == TYPE_CODE_PTR)
     intype = TYPE_TARGET_TYPE (intype);


hooks/post-receive
--
Repository for Project Archer.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]