diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-13 18:21:53 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-13 18:21:53 -0400 |
commit | df38ebdddbe9930ae15570cea3a8fb28cd0d0ebd (patch) | |
tree | b71bd718bcd21743533a1030633d33be02a715ee | |
parent | 5f34005f06e800994dd6a305788cadd89488e92f (diff) | |
download | gcc-df38ebdddbe9930ae15570cea3a8fb28cd0d0ebd.zip gcc-df38ebdddbe9930ae15570cea3a8fb28cd0d0ebd.tar.gz gcc-df38ebdddbe9930ae15570cea3a8fb28cd0d0ebd.tar.bz2 |
Lose all references to current_vtable_decl, CLASSTYPE_INST_VAR and
CLASSTYPE_VTBL_PTR.
From-SVN: r9936
-rw-r--r-- | gcc/cp/cp-tree.h | 9 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 53 | ||||
-rw-r--r-- | gcc/cp/parse.y | 3 |
3 files changed, 0 insertions, 65 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 1e93bdf..e0d1a64 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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; diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index dbf8742..4fed546 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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. */ diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 110dde6..400cf1f 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -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. */ |