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]

PATCH: improve BINFO_VPTR_FIELD documentation



This patch describes the new way in which the C++ front-end is using
the BINFO_VPTR_FIELD.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2000-01-16  Mark Mitchell  <mark@codesourcery.com>

	* tree.h (BINFO_VPTR_FIELD): Augment documentation.

Index: tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tree.h,v
retrieving revision 1.115
diff -c -p -r1.115 tree.h
*** tree.h	2000/01/04 08:11:05	1.115
--- tree.h	2000/01/17 04:13:11
*************** struct tree_type
*** 1026,1034 ****
  #define BINFO_BASETYPE(NODE,N) TREE_VEC_ELT (BINFO_BASETYPES (NODE), (N))
  #define TYPE_BINFO_BASETYPE(NODE,N) BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (NODE)), (N)))
  
! /* For a BINFO record describing an inheritance, this yields a pointer
!    to the artificial FIELD_DECL node which contains the "virtual base
!    class pointer" for the given inheritance.  */
  #define BINFO_VPTR_FIELD(NODE) TREE_VEC_ELT ((NODE), 5)
  
  /* The size of a base class subobject of this type.  Not all frontends
--- 1026,1038 ----
  #define BINFO_BASETYPE(NODE,N) TREE_VEC_ELT (BINFO_BASETYPES (NODE), (N))
  #define TYPE_BINFO_BASETYPE(NODE,N) BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (NODE)), (N)))
  
! /* For a BINFO record describing a virtual base class, i.e., one where
!    TREE_VIA_VIRTUAL is set, this field assists in locating the virtual
!    base.  The actual contents are language-dependent.  Under the old
!    ABI, the C++ front-end uses a FIELD_DECL whose contents are a
!    pointer to the virtual base; under the new ABI this field is
!    instead a INTEGER_CST giving an offset into the vtable where the
!    offset to the virtual base can be found.  */
  #define BINFO_VPTR_FIELD(NODE) TREE_VEC_ELT ((NODE), 5)
  
  /* The size of a base class subobject of this type.  Not all frontends

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