Commit 2ef16140 by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (do_inline_function_hair): Remove.

	* cp-tree.h (do_inline_function_hair): Remove.
	* class.c (layout_class_type): New function, split out from
	finish_struct_1.
	(fixup_pending_inline): Likewise.
	(fixup_inline_methods): New function.
	* method.c (fixup_pending_inline): Remove.
	(do_inline_function_hair): Likewise.

	* decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
	new ABI.

From-SVN: r31115
parent fee7654e
1999-12-28 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (do_inline_function_hair): Remove.
* class.c (layout_class_type): New function, split out from
finish_struct_1.
(fixup_pending_inline): Likewise.
(fixup_inline_methods): New function.
* method.c (fixup_pending_inline): Remove.
(do_inline_function_hair): Likewise.
* decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
new ABI.
* cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
(CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
(CLASSTYPE_PURE_VIRTUALS): ... this.
......@@ -17,6 +28,7 @@
(build_vtbl_initializer): Likewise.
(override_one_vtable): Likewise.
(check_methods): Likewise.
* decl.c (duplicate_decls): Likewise.
(redeclaration_error_message): Likewise.
(lang_mark_tree): Likewise.
......
......@@ -3757,7 +3757,6 @@ extern int cp_type_qual_from_rid PROTO((tree));
/* in method.c */
extern void init_method PROTO((void));
extern void do_inline_function_hair PROTO((tree, tree));
extern char *build_overload_name PROTO((tree, int, int));
extern tree build_static_name PROTO((tree, tree));
extern tree build_decl_overload PROTO((tree, tree, int));
......
......@@ -72,7 +72,10 @@ int ggc_p = 1;
#ifndef BOOL_TYPE_SIZE
#ifdef SLOW_BYTE_ACCESS
#define BOOL_TYPE_SIZE ((SLOW_BYTE_ACCESS) ? (POINTER_SIZE) : (CHAR_TYPE_SIZE))
/* In the new ABI, `bool' has size and alignment `1', on all
platforms. */
#define BOOL_TYPE_SIZE \
((SLOW_BYTE_ACCESS && !flag_new_abi) ? (POINTER_SIZE) : (CHAR_TYPE_SIZE))
#else
#define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
#endif
......
......@@ -98,7 +98,6 @@ static int is_back_referenceable_type PROTO((tree));
static int check_btype PROTO((tree));
static void build_mangled_name_for_type PROTO((tree));
static void build_mangled_name_for_type_with_Gcode PROTO((tree, int));
static void fixup_pending_inline PROTO((struct pending_inline *));
# define OB_INIT() (scratch_firstobj ? (obstack_free (&scratch_obstack, scratch_firstobj), 0) : 0)
# define OB_PUTC(C) (obstack_1grow (&scratch_obstack, (C)))
......@@ -143,57 +142,6 @@ init_method ()
value. */
static char digit_buffer[128];
/* Fixup the inline function given by INFO now that the class is
complete. */
static void
fixup_pending_inline (info)
struct pending_inline *info;
{
if (info)
{
tree args;
tree fn = info->fndecl;
args = DECL_ARGUMENTS (fn);
while (args)
{
DECL_CONTEXT (args) = fn;
args = TREE_CHAIN (args);
}
}
}
/* Move inline function definitions out of structure so that they
can be processed normally. CNAME is the name of the class
we are working from, METHOD_LIST is the list of method lists
of the structure. We delete friend methods here, after
saving away their inline function definitions (if any). */
void
do_inline_function_hair (type, friend_list)
tree type, friend_list;
{
tree method = TYPE_METHODS (type);
if (method && TREE_CODE (method) == TREE_VEC)
{
if (TREE_VEC_ELT (method, 1))
method = TREE_VEC_ELT (method, 1);
else if (TREE_VEC_ELT (method, 0))
method = TREE_VEC_ELT (method, 0);
else
method = TREE_VEC_ELT (method, 2);
}
/* Do inline member functions. */
for (; method; method = TREE_CHAIN (method))
fixup_pending_inline (DECL_PENDING_INLINE_INFO (method));
/* Do friends. */
for (; friend_list; friend_list = TREE_CHAIN (friend_list))
fixup_pending_inline (DECL_PENDING_INLINE_INFO (TREE_VALUE (friend_list)));
}
/* Here is where overload code starts. */
......
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