This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[C++ PATCH]: VF_ macro removal


Hi,
this patch removes VF_DERIVED_VALUE, which was only used in
one place as a dubious predicate. VF_BINFO_VALUE suffices there.

built & tested on i686-pc-linux-gnu, installed as obvious

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>

	* cp-tree.h (VF_DERIVED_VALUE): Remove.
	* class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.

Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.458
diff -c -3 -p -r1.458 class.c
*** cp/class.c	23 Jul 2002 06:22:03 -0000	1.458
--- cp/class.c	4 Aug 2002 11:59:24 -0000
*************** finish_struct_1 (t)
*** 5191,5205 ****
      {
        tree vfields = CLASSTYPE_VFIELDS (t);
  
!       while (vfields)
! 	{
! 	  /* Mark the fact that constructor for T
! 	     could affect anybody inheriting from T
! 	     who wants to initialize vtables for VFIELDS's type.  */
! 	  if (VF_DERIVED_VALUE (vfields))
! 	    TREE_ADDRESSABLE (vfields) = 1;
! 	  vfields = TREE_CHAIN (vfields);
! 	}
      }
  
    /* Make the rtl for any new vtables we have created, and unmark
--- 5191,5203 ----
      {
        tree vfields = CLASSTYPE_VFIELDS (t);
  
!       for (vfields = CLASSTYPE_VFIELDS (t);
! 	   vfields; vfields = TREE_CHAIN (vfields))
! 	/* Mark the fact that constructor for T could affect anybody
! 	   inheriting from T who wants to initialize vtables for
! 	   VFIELDS's type.  */
! 	if (VF_BINFO_VALUE (vfields))
! 	  TREE_ADDRESSABLE (vfields) = 1;
      }
  
    /* Make the rtl for any new vtables we have created, and unmark
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.740
diff -c -3 -p -r1.740 cp-tree.h
*** cp/cp-tree.h	1 Aug 2002 06:20:40 -0000	1.740
--- cp/cp-tree.h	4 Aug 2002 11:59:37 -0000
*************** struct lang_type GTY(())
*** 1620,1627 ****
  #define VF_BASETYPE_VALUE(NODE) TREE_VALUE (NODE)
  
  /* Accessor macros for the BINFO_VIRTUALS list. */
- #define VF_DERIVED_VALUE(NODE) \
-    (VF_BINFO_VALUE (NODE) ? BINFO_TYPE (VF_BINFO_VALUE (NODE)) : NULL_TREE)
  
  /* The number of bytes by which to adjust the `this' pointer when
     calling this virtual function.  Subtract this value from the this
--- 1620,1625 ----
*************** struct lang_type GTY(())
*** 1637,1644 ****
  #define BV_FN(NODE) (TREE_VALUE (NODE))
  
  /* Nonzero if we should use a virtual thunk for this entry.  */
! #define BV_USE_VCALL_INDEX_P(NODE) \
!    (TREE_LANG_FLAG_0 (NODE))
  
  /* Nonzero for TREE_LIST node means that this list of things
     is a list of parameters, as opposed to a list of expressions.  */
--- 1635,1641 ----
  #define BV_FN(NODE) (TREE_VALUE (NODE))
  
  /* Nonzero if we should use a virtual thunk for this entry.  */
! #define BV_USE_VCALL_INDEX_P(NODE) (TREE_LANG_FLAG_0 (NODE))
  
  /* Nonzero for TREE_LIST node means that this list of things
     is a list of parameters, as opposed to a list of expressions.  */

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