Lose all references to current_vtable_decl, CLASSTYPE_INST_VAR and
CLASSTYPE_VTBL_PTR. From-SVN: r9936
This commit is contained in:
parent
5f34005f06
commit
df38ebdddb
@ -493,8 +493,6 @@ struct lang_type
|
||||
union tree_node *as_list;
|
||||
union tree_node *id_as_list;
|
||||
union tree_node *binfo_as_list;
|
||||
union tree_node *vtbl_ptr;
|
||||
union tree_node *instance_variable;
|
||||
union tree_node *friend_classes;
|
||||
|
||||
char *mi_matrix;
|
||||
@ -807,12 +805,6 @@ struct lang_type
|
||||
/* Same, but cache a list whose value is the binfo of this type. */
|
||||
#define CLASSTYPE_BINFO_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->binfo_as_list)
|
||||
|
||||
/* Slot in which to cache a copy of the local vtable pointer. */
|
||||
#define CLASSTYPE_VTBL_PTR(NODE) (TYPE_LANG_SPECIFIC(NODE)->vtbl_ptr)
|
||||
|
||||
/* Hold the instance object associated with this method. */
|
||||
#define CLASSTYPE_INST_VAR(NODE) (TYPE_LANG_SPECIFIC(NODE)->instance_variable)
|
||||
|
||||
/* A list of class types with which this type is a friend. */
|
||||
#define CLASSTYPE_FRIEND_CLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->friend_classes)
|
||||
|
||||
@ -1524,7 +1516,6 @@ extern tree current_lang_name, lang_name_cplusplus, lang_name_c;
|
||||
extern tree original_function_name;
|
||||
|
||||
extern tree current_class_name, current_class_type, current_class_decl, C_C_D;
|
||||
extern tree current_vtable_decl;
|
||||
|
||||
/* in init.c */
|
||||
extern tree global_base_init_list;
|
||||
|
@ -2037,59 +2037,6 @@ setup_vtbl_ptr ()
|
||||
if (base_init_expr == 0
|
||||
&& DECL_CONSTRUCTOR_P (current_function_decl))
|
||||
emit_base_init (current_class_type, 0);
|
||||
|
||||
#if 0
|
||||
/* This has something a little wrong with it.
|
||||
|
||||
On a sun4, code like:
|
||||
|
||||
be L6
|
||||
ld [%i0],%o1
|
||||
|
||||
is generated, when the below is used when -O4 is given. The delay
|
||||
slot it filled with an instruction that is safe, when this isn't
|
||||
used, like in:
|
||||
|
||||
be L6
|
||||
sethi %hi(LC1),%o0
|
||||
ld [%i0],%o1
|
||||
|
||||
on code like:
|
||||
|
||||
struct A {
|
||||
virtual void print() { printf("xxx"); }
|
||||
void f();
|
||||
};
|
||||
|
||||
void A::f() {
|
||||
if (this) {
|
||||
print();
|
||||
} else {
|
||||
printf("0");
|
||||
}
|
||||
}
|
||||
|
||||
And that is why this is disabled for now. (mrs)
|
||||
*/
|
||||
|
||||
if ((flag_this_is_variable & 1) == 0
|
||||
&& optimize
|
||||
&& current_class_type
|
||||
&& CLASSTYPE_VSIZE (current_class_type)
|
||||
&& ! DECL_STATIC_FUNCTION_P (current_function_decl))
|
||||
{
|
||||
tree vfield = build_vfield_ref (C_C_D, current_class_type);
|
||||
current_vtable_decl = CLASSTYPE_VTBL_PTR (current_class_type);
|
||||
DECL_RTL (current_vtable_decl) = 0;
|
||||
DECL_INITIAL (current_vtable_decl) = error_mark_node;
|
||||
/* Have to cast the initializer, since it may have come from a
|
||||
more base class then we ascribe CURRENT_VTABLE_DECL to be. */
|
||||
finish_decl (current_vtable_decl, convert_force (TREE_TYPE (current_vtable_decl), vfield, 0), NULL_TREE, 0, 0);
|
||||
current_vtable_decl = build_indirect_ref (current_vtable_decl, NULL_PTR);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
current_vtable_decl = NULL_TREE;
|
||||
}
|
||||
|
||||
/* Record the existence of an addressable inline function. */
|
||||
|
@ -724,9 +724,6 @@ base_init:
|
||||
if (! current_function_parms_stored)
|
||||
store_parm_decls ();
|
||||
|
||||
/* Flag that we are processing base and member initializers. */
|
||||
current_vtable_decl = error_mark_node;
|
||||
|
||||
if (DECL_CONSTRUCTOR_P (current_function_decl))
|
||||
{
|
||||
/* Make a contour for the initializer list. */
|
||||
|
Loading…
Reference in New Issue
Block a user