diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2002-07-30 05:03:42 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2002-07-30 05:03:42 +0000 |
commit | 03fc215c4cd08c7ba124c617a7676c0f2f689c3f (patch) | |
tree | fd4f149a3dd1a4ee111d8ea41bf46d3ac0ccd800 /gcc/cp | |
parent | 1dcd444b7e319963e35b806639bb38d8d0371fd4 (diff) | |
download | gcc-03fc215c4cd08c7ba124c617a7676c0f2f689c3f.zip gcc-03fc215c4cd08c7ba124c617a7676c0f2f689c3f.tar.gz gcc-03fc215c4cd08c7ba124c617a7676c0f2f689c3f.tar.bz2 |
cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more documentation.
* cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
documentation.
From-SVN: r55863
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 29 |
2 files changed, 22 insertions, 12 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 62c448e..1e52dba 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2002-07-30 Nathan Sidwell <nathan@codesourcery.com> + + * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more + documentation. + 2002-07-29 Alan Modra <amodra@bigpond.net.au> * cp-tree.h: Comment typo fix. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index adbaea4..ce46b03 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1734,29 +1734,34 @@ struct lang_type GTY(()) /* Accessor macros for the vfield slots in structures. */ -/* The virtual function pointer fields that this type contains. For a - vfield defined just for this class, or from a primary base, the - TREE_PURPOSE is NULL. Otherwise, the TREE_PURPOSE is the BINFO for - the class containing the vfield. The TREE_VALUE is the class where - the vfield was first defined. */ +/* List of virtual table fields that this type contains (both the primary + and secondaries). The TREE_VALUE is the class type where the vtable + field was introduced. For a vtable field inherited from the primary + base, or introduced by this class, the TREE_PURPOSE is NULL. For + other vtable fields (those from non-primary bases), the + TREE_PURPOSE is the BINFO of the base through which the vtable was + inherited. */ #define CLASSTYPE_VFIELDS(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->vfields) -/* Get the assoc info that caused this vfield to exist. */ +/* Get the BINFO that introduced this vtable into the hierarchy (will + be NULL for those created at this level, or from a primary + hierarchy). */ #define VF_BINFO_VALUE(NODE) TREE_PURPOSE (NODE) -/* Get that same information as a _TYPE. */ +/* Get the TYPE that introduced this vtable into the hierarchy (always + non-NULL). */ #define VF_BASETYPE_VALUE(NODE) TREE_VALUE (NODE) -/* Get the value of the top-most type dominating the non-`normal' vfields. */ -#define VF_DERIVED_VALUE(NODE) \ - (VF_BINFO_VALUE (NODE) ? BINFO_TYPE (VF_BINFO_VALUE (NODE)) : NULL_TREE) +/* Accessor macros for the BINFO_VIRTUALS list. */ /* The number of bytes by which to adjust the `this' pointer when - calling this virtual function. */ + calling this virtual function. Subtract this value from the this + pointer. Always non-NULL, might be constant zero though. */ #define BV_DELTA(NODE) (TREE_PURPOSE (NODE)) /* If non-NULL, the vtable index at which to find the vcall offset - when calling this virtual function. */ + when calling this virtual function. Add the value at that vtable + index to the this pointer. */ #define BV_VCALL_INDEX(NODE) (TREE_TYPE (NODE)) /* The function to call. */ |