summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-07 16:57:48 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-07 16:57:48 +0000
commitd00c342b1f6736c41c68373f7cae0516c5e0daff (patch)
tree77a699e79f234c6a6159445273384e13d04ec718
parent9e52652d7ee15c0e1e49a41e9f542747971e2651 (diff)
downloadgcc-d00c342b1f6736c41c68373f7cae0516c5e0daff.tar.gz
Rename abi::__vmi_class_type_info members.
* inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, base_list, detail_masks members to vmi_flags, vmi_base_count, vmi_bases and vmi_flags_masks respectively. (__vmi_class_type_info::vmi_flags_masks): Rename details_unknown_mask to flags_unknown_mask. * tinfo.cc (__class_type_info::do_upcast): Adjust. (__vmi_class_type_info::do_find_public_src): Adjust. (__vmi_class_type_info::do_dyncast): Adjust. (__vmi_class_type_info::do_upcast): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33004 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/inc/cxxabi.h14
-rw-r--r--gcc/cp/tinfo.cc40
3 files changed, 40 insertions, 27 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1cf52b64b88..a23b48d7eea 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,18 @@
2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
+ Rename abi::__vmi_class_type_info members.
+ * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
+ base_list, detail_masks members to vmi_flags, vmi_base_count,
+ vmi_bases and vmi_flags_masks respectively.
+ (__vmi_class_type_info::vmi_flags_masks): Rename
+ details_unknown_mask to flags_unknown_mask.
+ * tinfo.cc (__class_type_info::do_upcast): Adjust.
+ (__vmi_class_type_info::do_find_public_src): Adjust.
+ (__vmi_class_type_info::do_dyncast): Adjust.
+ (__vmi_class_type_info::do_upcast): Adjust.
+
+2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
+
* tinfo.cc (convert_to_base): New function.
(get_vbase_offset): Remove. Move into convert_to_base.
(__vmi_class_type_info::do_find_public_src): Adjust.
diff --git a/gcc/cp/inc/cxxabi.h b/gcc/cp/inc/cxxabi.h
index 1bc7782b8a0..e0c15317f7a 100644
--- a/gcc/cp/inc/cxxabi.h
+++ b/gcc/cp/inc/cxxabi.h
@@ -331,9 +331,9 @@ protected:
class __vmi_class_type_info : public __class_type_info {
/* abi defined member variables */
public:
- int details; /* details about the class heirarchy */
- int n_bases; /* number of direct bases */
- __base_class_info base_list[1]; /* array of bases */
+ int vmi_flags; /* details about the class heirarchy */
+ int vmi_base_count; /* number of direct bases */
+ __base_class_info vmi_bases[1]; /* array of bases */
/* The array of bases uses the trailing array struct hack
so this class is not constructable with a normal constructor. It is
internally generated by the compiler. */
@@ -343,19 +343,19 @@ public:
virtual ~__vmi_class_type_info ();
public:
explicit __vmi_class_type_info (const char *n_,
- int details_)
- : __class_type_info (n_), details (details_), n_bases (0)
+ int flags_)
+ : __class_type_info (n_), vmi_flags (flags_), vmi_base_count (0)
{ }
/* implementation defined types */
public:
- enum detail_masks {
+ enum vmi_flags_masks {
non_diamond_repeat_mask = 0x1, /* distinct instance of repeated base */
diamond_shaped_mask = 0x2, /* diamond shaped multiple inheritance */
non_public_base_mask = 0x4, /* has non-public direct or indirect base */
public_base_mask = 0x8, /* has public base (direct) */
- details_unknown_mask = 0x10
+ flags_unknown_mask = 0x10
};
/* implementation defined member functions */
diff --git a/gcc/cp/tinfo.cc b/gcc/cp/tinfo.cc
index 130a7753cb5..0bf9cfe57c6 100644
--- a/gcc/cp/tinfo.cc
+++ b/gcc/cp/tinfo.cc
@@ -667,7 +667,7 @@ do_catch (const type_info *thr_type, void **thr_obj,
bool __class_type_info::
do_upcast (const __class_type_info *dst_type, void **obj_ptr) const
{
- upcast_result result (__vmi_class_type_info::details_unknown_mask);
+ upcast_result result (__vmi_class_type_info::flags_unknown_mask);
if (do_upcast (contained_public, dst_type, *obj_ptr, result))
return false;
@@ -721,14 +721,14 @@ do_find_public_src (ptrdiff_t src2dst,
if (obj_ptr == src_ptr && *this == *src_type)
return contained_public;
- for (size_t i = n_bases; i--;)
+ for (size_t i = vmi_base_count; i--;)
{
- if (!base_list[i].is_public_p ())
+ if (!vmi_bases[i].is_public_p ())
continue; // Not public, can't be here.
const void *base = obj_ptr;
- ptrdiff_t offset = base_list[i].offset ();
- bool is_virtual = base_list[i].is_virtual_p ();
+ ptrdiff_t offset = vmi_bases[i].offset ();
+ bool is_virtual = vmi_bases[i].is_virtual_p ();
if (is_virtual)
{
@@ -737,7 +737,7 @@ do_find_public_src (ptrdiff_t src2dst,
}
base = convert_to_base (base, is_virtual, offset);
- sub_kind base_kind = base_list[i].base->do_find_public_src
+ sub_kind base_kind = vmi_bases[i].base->do_find_public_src
(src2dst, base, src_type, src_ptr);
if (contained_p (base_kind))
{
@@ -844,23 +844,23 @@ do_dyncast (ptrdiff_t src2dst,
return false;
}
bool result_ambig = false;
- for (size_t i = n_bases; i--;)
+ for (size_t i = vmi_base_count; i--;)
{
dyncast_result result2;
void const *base = obj_ptr;
sub_kind base_access = access_path;
- ptrdiff_t offset = base_list[i].offset ();
- bool is_virtual = base_list[i].is_virtual_p ();
+ ptrdiff_t offset = vmi_bases[i].offset ();
+ bool is_virtual = vmi_bases[i].is_virtual_p ();
if (is_virtual)
base_access = sub_kind (base_access | contained_virtual_mask);
base = convert_to_base (base, is_virtual, offset);
- if (!base_list[i].is_public_p ())
+ if (!vmi_bases[i].is_public_p ())
base_access = sub_kind (base_access & ~contained_public_mask);
bool result2_ambig
- = base_list[i].base->do_dyncast (src2dst, base_access,
+ = vmi_bases[i].base->do_dyncast (src2dst, base_access,
dst_type, base,
src_type, src_ptr, result2);
result.whole2src = sub_kind (result.whole2src | result2.whole2src);
@@ -1028,18 +1028,18 @@ do_upcast (sub_kind access_path,
}
int src_details = result.src_details;
- if (src_details & details_unknown_mask)
- src_details = details;
+ if (src_details & flags_unknown_mask)
+ src_details = vmi_flags;
- for (size_t i = n_bases; i--;)
+ for (size_t i = vmi_base_count; i--;)
{
upcast_result result2 (src_details);
const void *base = obj_ptr;
sub_kind sub_access = access_path;
- ptrdiff_t offset = base_list[i].offset ();
- bool is_virtual = base_list[i].is_virtual_p ();
+ ptrdiff_t offset = vmi_bases[i].offset ();
+ bool is_virtual = vmi_bases[i].is_virtual_p ();
- if (!base_list[i].is_public_p ())
+ if (!vmi_bases[i].is_public_p ())
{
if (!(src_details & non_diamond_repeat_mask))
// original cannot have an ambiguous base
@@ -1051,16 +1051,16 @@ do_upcast (sub_kind access_path,
if (base)
base = convert_to_base (base, is_virtual, offset);
- if (base_list[i].base->do_upcast (sub_access, dst, base, result2))
+ if (vmi_bases[i].base->do_upcast (sub_access, dst, base, result2))
return true; // must fail
if (result2.base_type)
{
if (result2.base_type == nonvirtual_base_type && is_virtual)
- result2.base_type = base_list[i].base;
+ result2.base_type = vmi_bases[i].base;
if (!result.base_type)
{
result = result2;
- if (!(details & non_diamond_repeat_mask))
+ if (!(vmi_flags & non_diamond_repeat_mask))
// cannot have an ambiguous other base
return false;
}