Commit fc6633e0 by Nathan Sidwell Committed by Nathan Sidwell

tree.h (BINFO_PRIMARY_BASE_OF): Remove.

	* tree.h (BINFO_PRIMARY_BASE_OF): Remove.
	(struct tree_binfo): Remove primary field.
	* cp/cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
	(BINFO_INDIRECT_PRIMARY_P): Remove.
	* cp/class.c (determine_primary_base): Rename to ...
	(determine_primary_bases): ... here.  Set all primary bases.
	(set_primary_base): Remove.
	(mark_primary_bases): Remove.
	(build_simple_base_path, walk_subobject_offsets,
	propagate_binfo_offsets, end_of_class): Adjust.
	(layout_class_type): Rename determine_primary_base call.
	(dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
	to type_as_string.
	(dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
	build_rtti_vtbl_entries): Adjust.
	* cp/init.c (build_vtbl_address): Adjust.

From-SVN: r86766
parent bd8a2e96
2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
* tree.h (BINFO_PRIMARY_BASE_OF): Remove.
(struct tree_binfo): Remove primary field.
2004-08-30 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Do not run fixincludes after stage1 during
......@@ -9,6 +14,12 @@
* sched-deps.c (get_condition): Partially revert previous, by never
trying to extract the condition from a condjump.
2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
* c-common.c (c_sizeof_or_alignof_type): Use gcc_assert.
(handle_visibility_attribute, c_determine_visibility): Likewise.
* c-common.h (my_friendly_assert): Remove.
2004-08-30 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.md (UNSPEC_{RSQRT,RECIP}[12]_{S,D,PS}): Delete.
......
2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
(BINFO_INDIRECT_PRIMARY_P): Remove.
* class.c (determine_primary_base): Rename to ...
(determine_primary_bases): ... here. Set all primary bases.
(set_primary_base): Remove.
(mark_primary_bases): Remove.
(build_simple_base_path, walk_subobject_offsets,
propagate_binfo_offsets, end_of_class): Adjust.
(layout_class_type): Rename determine_primary_base call.
(dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
to type_as_string.
(dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
build_rtti_vtbl_entries): Adjust.
* init.c (build_vtbl_address): Adjust.
* cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
2004-08-28 Ziemowit Laski <zlaski@apple.com>
......
......@@ -1405,14 +1405,6 @@ struct lang_type GTY(())
/* Additional macros for inheritance information. */
/* The BINFO_INHERITANCE_CHAIN is used opposite to the description in
gcc/tree.h. In particular if D is non-virtually derived from B
then the BINFO for B (in D) will have a BINFO_INHERITANCE_CHAIN
pointing to D. If D is virtually derived, its
BINFO_INHERITANCE_CHAIN will point to the most derived binfo. In
tree.h, this pointer is described as pointing in other
direction. The binfos of virtual bases are shared. */
/* Nonzero means that this class is on a path leading to a new vtable. */
#define BINFO_VTABLE_PATH_MARKED(NODE) BINFO_FLAG_1 (NODE)
......@@ -1428,11 +1420,6 @@ struct lang_type GTY(())
gcc_assert (!BINFO_PRIMARY_P (B) || BINFO_VIRTUAL_P (B)), \
gcc_assert (TYPE_VFIELD (BINFO_TYPE (B))))
/* Nonzero if this BINFO is a primary base class. */
#define BINFO_PRIMARY_P(NODE) \
(BINFO_PRIMARY_BASE_OF (NODE) != NULL_TREE)
/* Nonzero if this binfo is for a dependent base - one that should not
be searched. */
#define BINFO_DEPENDENT_BASE_P(NODE) BINFO_FLAG_3 (NODE)
......@@ -1442,10 +1429,8 @@ struct lang_type GTY(())
base in the complete hierarchy. */
#define BINFO_LOST_PRIMARY_P(NODE) BINFO_FLAG_4 (NODE)
/* Nonzero if this binfo is an indirect primary base, i.e. a virtual
base that is a primary base of some of other class in the
hierarchy. */
#define BINFO_INDIRECT_PRIMARY_P(NODE) BINFO_FLAG_5 (NODE)
/* Nonzero if this BINFO is a primary base class. */
#define BINFO_PRIMARY_P(NODE) BINFO_FLAG_5(NODE)
/* Used by various search routines. */
#define IDENTIFIER_MARKED(NODE) TREE_LANG_FLAG_0 (NODE)
......
......@@ -716,15 +716,14 @@ build_vtbl_address (tree binfo)
tree binfo_for = binfo;
tree vtbl;
if (BINFO_VPTR_INDEX (binfo) && BINFO_VIRTUAL_P (binfo)
&& BINFO_PRIMARY_P (binfo))
if (BINFO_VPTR_INDEX (binfo) && BINFO_VIRTUAL_P (binfo))
/* If this is a virtual primary base, then the vtable we want to store
is that for the base this is being used as the primary base of. We
can't simply skip the initialization, because we may be expanding the
inits of a subobject constructor where the virtual base layout
can be different. */
while (BINFO_PRIMARY_BASE_OF (binfo_for))
binfo_for = BINFO_PRIMARY_BASE_OF (binfo_for);
while (BINFO_PRIMARY_P (binfo_for))
binfo_for = BINFO_INHERITANCE_CHAIN (binfo_for);
/* Figure out what vtable BINFO's vtable is based on, and mark it as
used. */
......
......@@ -1706,15 +1706,10 @@ struct tree_type GTY(())
found. NULL_TREE if there is no secondary vptr in the VTT. */
#define BINFO_VPTR_INDEX(NODE) (TREE_BINFO_CHECK(NODE)->binfo.vtt_vptr)
/* The binfo of which NODE is a primary base. (This is different from
BINFO_INHERITANCE_CHAIN for virtual base because a virtual base is
sometimes a primary base for a class for which it is not an
immediate base.) */
#define BINFO_PRIMARY_BASE_OF(NODE) (TREE_BINFO_CHECK(NODE)->binfo.primary)
/* The BINFO_INHERITANCE_CHAIN points at the binfo for the base
inheriting this base for non-virtual bases. For virtual bases it
points to the binfo of the most derived type. */
points either to the binfo for which this is a primary binfo, or to
the binfo of the most derived type. */
#define BINFO_INHERITANCE_CHAIN(NODE) \
(TREE_BINFO_CHECK(NODE)->binfo.inheritance)
......@@ -1731,7 +1726,6 @@ struct tree_binfo GTY (())
tree vtt_subvtt;
tree vtt_vptr;
tree primary;
VEC(tree) base_binfos;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment