Commit 9a71c18b by Jason Merrill

Re-implement allocation of base class subobjects.

	* tree.c (unshare_base_binfos): New fn.
	(layout_basetypes): Use it.  Now handles offsets of both virtual and
	non-virtual bases, after layout_type.
	(layout_vbasetypes): Remove.
	(build_base_fields): Generate FIELD_DECLs for each non-virtual base.
	(build_vbase_pointer_fields): Split out from old layout_basetypes.
	* class.c (finish_base_struct): Lose offset handling code.
	Move nonvdtor warning here.  Don't mess with t_binfo anymore.
	(finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
	* cp-tree.h: Adjust.

From-SVN: r18973
parent 516c2342
Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
Re-implement allocation of base class subobjects.
* tree.c (unshare_base_binfos): New fn.
(layout_basetypes): Use it. Now handles offsets of both virtual and
non-virtual bases, after layout_type.
(layout_vbasetypes): Remove.
(build_base_fields): Generate FIELD_DECLs for each non-virtual base.
(build_vbase_pointer_fields): Split out from old layout_basetypes.
* class.c (finish_base_struct): Lose offset handling code.
Move nonvdtor warning here. Don't mess with t_binfo anymore.
(finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
* cp-tree.h: Adjust.
Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
......@@ -12,7 +26,7 @@ Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
* class.c, Make sure system.h is included just after config.h.
Delete lingering stdio and errno references too.
* decl.c, errfn.c, parse.y, ptree.c search.c, xrefc.: Likewwise.
* decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
......
......@@ -728,13 +728,7 @@ struct lang_type
#define CLASSTYPE_MTABLE_ENTRY(NODE) (TYPE_LANG_SPECIFIC(NODE)->memoized_table_entry)
/* These are the size, mode and alignment of the type without its
virtual base classes, for when we use this type as a base itself.
CLASSTYPE_SIZE is also used during finish_struct_1 to remember the total
size of the baseclasses defined for the type. We do this because it is
desirable to layout such information before beginning to process the
class itself, and we don't want to compute it second time when actually
laying out the type for real. */
virtual base classes, for when we use this type as a base itself. */
#define CLASSTYPE_SIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->size)
#define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align)
......@@ -2591,9 +2585,9 @@ extern tree break_out_calls PROTO((tree));
extern tree build_cplus_method_type PROTO((tree, tree, tree));
extern tree build_cplus_staticfn_type PROTO((tree, tree, tree));
extern tree build_cplus_array_type PROTO((tree, tree));
extern void propagate_binfo_offsets PROTO((tree, tree));
extern int layout_vbasetypes PROTO((tree, int));
extern tree layout_basetypes PROTO((tree, tree));
extern int layout_basetypes PROTO((tree, int));
extern tree build_vbase_pointer_fields PROTO((tree));
extern tree build_base_fields PROTO((tree));
extern tree hash_tree_cons PROTO((int, int, int, tree, tree, tree));
extern tree hash_tree_chain PROTO((tree, tree));
extern tree hash_chainon PROTO((tree, tree));
......
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