Lose all references to current_vtable_decl, CLASSTYPE_INST_VAR and
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 13 Jun 1995 22:21:53 +0000 (18:21 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 13 Jun 1995 22:21:53 +0000 (18:21 -0400)
CLASSTYPE_VTBL_PTR.

From-SVN: r9936

gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/parse.y

index 1e93bdf3523d59fffe28e8ba3ec79c36f2a93465..e0d1a64402dd9c4f0aeb38ebaffe6fdbaa8a4a88 100644 (file)
@@ -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;
index dbf8742fbc7430940d32ee975c5021cab7aa9bc6..4fed546989da106f9460a5f6c17c194d0ee894a1 100644 (file)
@@ -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.  */
index 110dde6cfe10885efe039634cc71659f26cff854..400cf1f0b37558f7903e906581adf78e916b6648 100644 (file)
@@ -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.  */