aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey Oldham <oldham@codesourcery.com>2000-08-05 04:17:23 +0000
committerJeffrey D. Oldham <oldham@gcc.gnu.org>2000-08-05 04:17:23 +0000
commitf9fcf62b6ab635d6464fd38a57e1a13d1d38539e (patch)
treec98608f0960c535a4b9214b9b9f7301c2e0b2fb8 /gcc
parent8cab40f72e6434f3c724492caaf86716c2083c87 (diff)
downloadgcc-f9fcf62b6ab635d6464fd38a57e1a13d1d38539e.zip
gcc-f9fcf62b6ab635d6464fd38a57e1a13d1d38539e.tar.gz
gcc-f9fcf62b6ab635d6464fd38a57e1a13d1d38539e.tar.bz2
cxxabi.h (__pbase_type_info): Changed member names to match specifications.
2000-08-04 Jeffrey D. Oldham <oldham@codesourcery.com> * inc/cxxabi.h (__pbase_type_info): Changed member names to match specifications. (__pointer_to_member_type_info): Likewise. (__base_class_info): Likewise. (__class_type_info): Likewise. (__si_class_type_info): Likewise. (__vmi_class_type_info): Likewise. * tinfo.cc (__si_class_type_info::__do_find_public_src): Changed member names to match specifications. (__vmi_class_type_info::__do_find_public_src): Likewise. (__si_class_type_info::__do_dyncast): Likewise. (__vmi_class_type_info::__do_dyncast): Likewise. (__si_class_type_info::__do_upcast): Likewise. (__vmi_class_type_info::__do_upcast): Likewise. * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. (__pbase_type_info::__pointer_catch): Likewise. (__pointer_type_info::__pointer_catch): Likewise. (__pointer_to_member_type_info::__pointer_catch): Likewise. From-SVN: r35503
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog22
-rw-r--r--gcc/cp/inc/cxxabi.h66
-rw-r--r--gcc/cp/tinfo.cc58
-rw-r--r--gcc/cp/tinfo2.cc12
4 files changed, 90 insertions, 68 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ad3341a..6d52df9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,25 @@
+2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
+
+ * inc/cxxabi.h (__pbase_type_info): Changed member names to match
+ specifications.
+ (__pointer_to_member_type_info): Likewise.
+ (__base_class_info): Likewise.
+ (__class_type_info): Likewise.
+ (__si_class_type_info): Likewise.
+ (__vmi_class_type_info): Likewise.
+ * tinfo.cc (__si_class_type_info::__do_find_public_src):
+ Changed member names to match specifications.
+ (__vmi_class_type_info::__do_find_public_src): Likewise.
+ (__si_class_type_info::__do_dyncast): Likewise.
+ (__vmi_class_type_info::__do_dyncast): Likewise.
+ (__si_class_type_info::__do_upcast): Likewise.
+ (__vmi_class_type_info::__do_upcast): Likewise.
+ * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
+ (__pbase_type_info::__pointer_catch): Likewise.
+ (__pointer_type_info::__pointer_catch): Likewise.
+ (__pointer_to_member_type_info::__pointer_catch): Likewise.
+
+
2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
* Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
diff --git a/gcc/cp/inc/cxxabi.h b/gcc/cp/inc/cxxabi.h
index b9a19d2..6e64553 100644
--- a/gcc/cp/inc/cxxabi.h
+++ b/gcc/cp/inc/cxxabi.h
@@ -122,8 +122,8 @@ class __pbase_type_info
{
/* abi defined member variables */
public:
- int quals; /* qualification of the target object */
- const std::type_info *type; /* type of pointed to object */
+ unsigned int __qualifier_flags; /* qualification of the target object */
+ const std::type_info *__pointee; /* type of pointed to object */
/* abi defined member functions */
public:
@@ -132,17 +132,17 @@ public:
explicit __pbase_type_info (const char *__n,
int __quals,
const std::type_info *__type)
- : std::type_info (__n), quals (__quals), type (__type)
+ : std::type_info (__n), __qualifier_flags (__quals), __pointee (__type)
{ }
/* implementation defined types */
public:
- enum quals_masks {
- const_mask = 0x1,
- volatile_mask = 0x2,
- restrict_mask = 0x4,
- incomplete_mask = 0x8,
- incomplete_class_mask = 0x10
+ enum __qualifier_masks {
+ __const_mask = 0x1,
+ __volatile_mask = 0x2,
+ __restrict_mask = 0x4,
+ __incomplete_mask = 0x8,
+ __incomplete_class_mask = 0x10
};
/* implementation defined member functions */
@@ -186,7 +186,7 @@ class __pointer_to_member_type_info
{
/* abi defined member variables */
public:
- const __class_type_info *klass; /* class of the member */
+ __class_type_info *__context_class; /* class of the member */
/* abi defined member functions */
public:
@@ -195,8 +195,8 @@ public:
explicit __pointer_to_member_type_info (const char *__n,
int __quals,
const std::type_info *__type,
- const __class_type_info *__klass)
- : __pbase_type_info (__n, __quals, __type), klass (__klass)
+ __class_type_info *__klass)
+ : __pbase_type_info (__n, __quals, __type), __context_class (__klass)
{ }
/* implementation defined member functions */
@@ -213,14 +213,14 @@ class __base_class_info
{
/* abi defined member variables */
public:
- const __class_type_info *base; /* base class type */
- long vmi_offset_flags; /* offset and info */
+ const __class_type_info *__base; /* base class type */
+ long __offset_flags; /* offset and info */
/* implementation defined types */
public:
- enum vmi_masks {
- virtual_mask = 0x1,
- public_mask = 0x2,
+ enum __offset_flags_masks {
+ __virtual_mask = 0x1,
+ __public_mask = 0x2,
hwm_bit = 2,
offset_shift = 8 /* bits to shift offset by */
};
@@ -228,14 +228,14 @@ public:
/* implementation defined member functions */
public:
bool __is_virtual_p () const
- { return vmi_offset_flags & virtual_mask; }
+ { return __offset_flags & __virtual_mask; }
bool __is_public_p () const
- { return vmi_offset_flags & public_mask; }
+ { return __offset_flags & __public_mask; }
__PTRDIFF_TYPE__ __offset () const
{
// This shift, being of a signed type, is implementation defined. GCC
// implements such shifts as arithmetic, which is what we want.
- return static_cast<__PTRDIFF_TYPE__> (vmi_offset_flags) >> offset_shift;
+ return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> offset_shift;
}
};
@@ -264,8 +264,8 @@ public:
/* publicly) */
__contained_ambig, /* contained ambiguously */
- __contained_virtual_mask = __base_class_info::virtual_mask, /* via a virtual path */
- __contained_public_mask = __base_class_info::public_mask, /* via a public path */
+ __contained_virtual_mask = __base_class_info::__virtual_mask, /* via a virtual path */
+ __contained_public_mask = __base_class_info::__public_mask, /* via a public path */
__contained_mask = 1 << __base_class_info::hwm_bit, /* contained within us */
__contained_private = __contained_mask,
@@ -334,8 +334,8 @@ class __si_class_type_info
: public __class_type_info
{
/* abi defined member variables */
-protected:
- const __class_type_info *base; /* base type */
+public:
+ const __class_type_info *__base_type;
/* abi defined member functions */
public:
@@ -343,7 +343,7 @@ public:
public:
explicit __si_class_type_info (const char *__n,
const __class_type_info *__base)
- : __class_type_info (__n), base (__base)
+ : __class_type_info (__n), __base_type (__base)
{ }
/* implementation defined member functions */
@@ -368,9 +368,9 @@ protected:
class __vmi_class_type_info : public __class_type_info {
/* abi defined member variables */
public:
- 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 */
+ unsigned int __flags; /* details about the class heirarchy */
+ unsigned int __base_count; /* number of direct bases */
+ __base_class_info const __base_info[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. */
@@ -380,15 +380,15 @@ public:
virtual ~__vmi_class_type_info ();
public:
explicit __vmi_class_type_info (const char *__n,
- int __flags)
- : __class_type_info (__n), vmi_flags (__flags), vmi_base_count (0)
+ int ___flags)
+ : __class_type_info (__n), __flags (___flags), __base_count (0)
{ }
/* implementation defined types */
public:
- enum vmi_flags_masks {
- non_diamond_repeat_mask = 0x1, /* distinct instance of repeated base */
- diamond_shaped_mask = 0x2, /* diamond shaped multiple inheritance */
+ enum __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) */
diff --git a/gcc/cp/tinfo.cc b/gcc/cp/tinfo.cc
index 5263af8..bb57bf8 100644
--- a/gcc/cp/tinfo.cc
+++ b/gcc/cp/tinfo.cc
@@ -755,7 +755,7 @@ __do_find_public_src (ptrdiff_t src2dst,
{
if (src_ptr == obj_ptr && *this == *src_type)
return __contained_public;
- return base->__do_find_public_src (src2dst, obj_ptr, src_type, src_ptr);
+ return __base_type->__do_find_public_src (src2dst, obj_ptr, src_type, src_ptr);
}
__class_type_info::__sub_kind __vmi_class_type_info::
@@ -767,14 +767,14 @@ __do_find_public_src (ptrdiff_t src2dst,
if (obj_ptr == src_ptr && *this == *src_type)
return __contained_public;
- for (size_t i = vmi_base_count; i--;)
+ for (size_t i = __base_count; i--;)
{
- if (!vmi_bases[i].__is_public_p ())
+ if (!__base_info[i].__is_public_p ())
continue; // Not public, can't be here.
const void *base = obj_ptr;
- ptrdiff_t offset = vmi_bases[i].__offset ();
- bool is_virtual = vmi_bases[i].__is_virtual_p ();
+ ptrdiff_t offset = __base_info[i].__offset ();
+ bool is_virtual = __base_info[i].__is_virtual_p ();
if (is_virtual)
{
@@ -783,7 +783,7 @@ __do_find_public_src (ptrdiff_t src2dst,
}
base = convert_to_base (base, is_virtual, offset);
- __sub_kind base_kind = vmi_bases[i].base->__do_find_public_src
+ __sub_kind base_kind = __base_info[i].__base->__do_find_public_src
(src2dst, base, src_type, src_ptr);
if (contained_p (base_kind))
{
@@ -849,7 +849,7 @@ __do_dyncast (ptrdiff_t src2dst,
result.whole2src = access_path;
return false;
}
- return base->__do_dyncast (src2dst, access_path, dst_type, obj_ptr,
+ return __base_type->__do_dyncast (src2dst, access_path, dst_type, obj_ptr,
src_type, src_ptr, result);
}
@@ -872,7 +872,7 @@ __do_dyncast (ptrdiff_t src2dst,
__dyncast_result &__restrict result) const
{
if (result.whole_details & __flags_unknown_mask)
- result.whole_details = vmi_flags;
+ result.whole_details = __flags;
if (obj_ptr == src_ptr && *this == *src_type)
{
@@ -894,23 +894,23 @@ __do_dyncast (ptrdiff_t src2dst,
}
bool result_ambig = false;
- for (size_t i = vmi_base_count; i--;)
+ for (size_t i = __base_count; i--;)
{
__dyncast_result result2 (result.whole_details);
void const *base = obj_ptr;
__sub_kind base_access = access_path;
- ptrdiff_t offset = vmi_bases[i].__offset ();
- bool is_virtual = vmi_bases[i].__is_virtual_p ();
+ ptrdiff_t offset = __base_info[i].__offset ();
+ bool is_virtual = __base_info[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 (!vmi_bases[i].__is_public_p ())
+ if (!__base_info[i].__is_public_p ())
{
if (src2dst == -2 &&
!(result.whole_details
- & (non_diamond_repeat_mask | diamond_shaped_mask)))
+ & (__non_diamond_repeat_mask | __diamond_shaped_mask)))
// The hierarchy has no duplicate bases (which might ambiguate
// things) and where we started is not a public base of what we
// want (so it cannot be a downcast). There is nothing of interest
@@ -920,7 +920,7 @@ __do_dyncast (ptrdiff_t src2dst,
}
bool result2_ambig
- = vmi_bases[i].base->__do_dyncast (src2dst, base_access,
+ = __base_info[i].__base->__do_dyncast (src2dst, base_access,
dst_type, base,
src_type, src_ptr, result2);
result.whole2src = __sub_kind (result.whole2src | result2.whole2src);
@@ -942,7 +942,7 @@ __do_dyncast (ptrdiff_t src2dst,
result.whole2dst = result2.whole2dst;
result_ambig = result2_ambig;
if (result.dst_ptr && result.whole2src != __unknown
- && !(vmi_flags & non_diamond_repeat_mask))
+ && !(__flags & __non_diamond_repeat_mask))
// Found dst and src and we don't have repeated bases.
return result_ambig;
}
@@ -969,7 +969,7 @@ __do_dyncast (ptrdiff_t src2dst,
if (contained_p (result.whole2src)
&& (!virtual_p (result.whole2src)
- || !(result.whole_details & diamond_shaped_mask)))
+ || !(result.whole_details & __diamond_shaped_mask)))
{
// We already found SRC_PTR as a base of most derived, and
// either it was non-virtual, or the whole heirarchy is
@@ -986,7 +986,7 @@ __do_dyncast (ptrdiff_t src2dst,
;// already calculated
else if (contained_p (new_sub_kind)
&& (!virtual_p (new_sub_kind)
- || !(vmi_flags & diamond_shaped_mask)))
+ || !(__flags & __diamond_shaped_mask)))
// Already found inside the other choice, and it was
// non-virtual or we are not diamond shaped.
old_sub_kind = __not_contained;
@@ -998,7 +998,7 @@ __do_dyncast (ptrdiff_t src2dst,
;// already calculated
else if (contained_p (old_sub_kind)
&& (!virtual_p (old_sub_kind)
- || !(vmi_flags & diamond_shaped_mask)))
+ || !(__flags & __diamond_shaped_mask)))
// Already found inside the other choice, and it was
// non-virtual or we are not diamond shaped.
new_sub_kind = __not_contained;
@@ -1075,7 +1075,7 @@ __do_upcast (const __class_type_info *dst, const void *obj_ptr,
if (__class_type_info::__do_upcast (dst, obj_ptr, result))
return true;
- return base->__do_upcast (dst, obj_ptr, result);
+ return __base_type->__do_upcast (dst, obj_ptr, result);
}
bool __vmi_class_type_info::
@@ -1087,27 +1087,27 @@ __do_upcast (const __class_type_info *dst, const void *obj_ptr,
int src_details = result.src_details;
if (src_details & __flags_unknown_mask)
- src_details = vmi_flags;
+ src_details = __flags;
- for (size_t i = vmi_base_count; i--;)
+ for (size_t i = __base_count; i--;)
{
__upcast_result result2 (src_details);
const void *base = obj_ptr;
- ptrdiff_t offset = vmi_bases[i].__offset ();
- bool is_virtual = vmi_bases[i].__is_virtual_p ();
- bool is_public = vmi_bases[i].__is_public_p ();
+ ptrdiff_t offset = __base_info[i].__offset ();
+ bool is_virtual = __base_info[i].__is_virtual_p ();
+ bool is_public = __base_info[i].__is_public_p ();
- if (!is_public && !(src_details & non_diamond_repeat_mask))
+ if (!is_public && !(src_details & __non_diamond_repeat_mask))
// original cannot have an ambiguous base, so skip private bases
continue;
if (base)
base = convert_to_base (base, is_virtual, offset);
- if (vmi_bases[i].base->__do_upcast (dst, base, result2))
+ if (__base_info[i].__base->__do_upcast (dst, base, result2))
{
if (result2.base_type == nonvirtual_base_type && is_virtual)
- result2.base_type = vmi_bases[i].base;
+ result2.base_type = __base_info[i].__base;
if (contained_p (result2.part2dst) && !is_public)
result2.part2dst = __sub_kind (result2.part2dst & ~__contained_public_mask);
@@ -1119,14 +1119,14 @@ __do_upcast (const __class_type_info *dst, const void *obj_ptr,
if (result.part2dst & __contained_public_mask)
{
- if (!(vmi_flags & non_diamond_repeat_mask))
+ if (!(__flags & __non_diamond_repeat_mask))
return true; // cannot have an ambiguous other base
}
else
{
if (!virtual_p (result.part2dst))
return true; // cannot have another path
- if (!(vmi_flags & diamond_shaped_mask))
+ if (!(__flags & __diamond_shaped_mask))
return true; // cannot have a more accessible path
}
}
diff --git a/gcc/cp/tinfo2.cc b/gcc/cp/tinfo2.cc
index d74d4c8..7c9a764 100644
--- a/gcc/cp/tinfo2.cc
+++ b/gcc/cp/tinfo2.cc
@@ -166,11 +166,11 @@ __do_catch (const type_info *thr_type,
const __pbase_type_info *thrown_type =
static_cast <const __pbase_type_info *> (thr_type);
- if (thrown_type->quals & ~quals)
+ if (thrown_type->__qualifier_flags & ~__qualifier_flags)
// We're less qualified.
return false;
- if (!(quals & const_mask))
+ if (!(__qualifier_flags & __const_mask))
outer &= ~1;
return __pointer_catch (thrown_type, thr_obj, outer);
@@ -181,7 +181,7 @@ __pointer_catch (const __pbase_type_info *thrown_type,
void **thr_obj,
unsigned outer) const
{
- return type->__do_catch (thrown_type->type, thr_obj, outer + 2);
+ return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2);
}
bool __pointer_type_info::
@@ -189,10 +189,10 @@ __pointer_catch (const __pbase_type_info *thrown_type,
void **thr_obj,
unsigned outer) const
{
- if (outer < 2 && *type == typeid (void))
+ if (outer < 2 && *__pointee == typeid (void))
{
// conversion to void
- return !thrown_type->type->__is_function_p ();
+ return !thrown_type->__pointee->__is_function_p ();
}
return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);
@@ -208,7 +208,7 @@ __pointer_catch (const __pbase_type_info *thr_type,
const __pointer_to_member_type_info *thrown_type =
static_cast <const __pointer_to_member_type_info *> (thr_type);
- if (*klass != *thrown_type->klass)
+ if (*__context_class != *thrown_type->__context_class)
return false; // not pointers to member of same class
return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);