aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-06-13 18:19:15 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-06-13 18:19:15 -0400
commit8bf41929899a91163f6b45ed5965fb5be195abd3 (patch)
tree8f6ce21d0a736b81b58b85b6b7df7e447e6577df /gcc
parente4be64d097aa602485947b06b50df808b7e90110 (diff)
downloadgcc-8bf41929899a91163f6b45ed5965fb5be195abd3.zip
gcc-8bf41929899a91163f6b45ed5965fb5be195abd3.tar.gz
gcc-8bf41929899a91163f6b45ed5965fb5be195abd3.tar.bz2
Lose all references to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR.
Lose all references to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR. Don't mess with current_class_decl, current_vtable_decl, or C_C_D. From-SVN: r9934
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/class.c67
1 files changed, 2 insertions, 65 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b1c6812..6ddbc84 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -72,7 +72,6 @@ struct class_level
};
tree current_class_decl, C_C_D; /* PARM_DECL: the class instance variable */
-tree current_vtable_decl;
/* The following two can be derived from the previous one */
tree current_class_name; /* IDENTIFIER_NODE: name of current class */
@@ -430,14 +429,8 @@ build_vfn_ref (ptr_to_instptr, instance, idx)
basetype = TREE_TYPE (basetype);
if (instance == C_C_D)
- {
- if (current_vtable_decl == NULL_TREE
- || current_vtable_decl == error_mark_node
- || !UNIQUELY_DERIVED_FROM_P (DECL_FCONTEXT (CLASSTYPE_VFIELD (current_class_type)), basetype))
- vtbl = build_indirect_ref (build_vfield_ref (instance, basetype), NULL_PTR);
- else
- vtbl = current_vtable_decl;
- }
+ vtbl = build_indirect_ref (build_vfield_ref (instance, basetype),
+ NULL_PTR);
else
{
if (optimize)
@@ -4011,13 +4004,6 @@ finish_struct (t, list_of_fieldlists, warn_anon)
if (CLASSTYPE_VSIZE (t) != 0)
{
- if ((flag_this_is_variable & 1) == 0)
- {
- tree vtbl_ptr = build_decl (VAR_DECL, get_identifier (VPTR_NAME),
- TREE_TYPE (vfield));
- DECL_REGISTER (vtbl_ptr) = 1;
- CLASSTYPE_VTBL_PTR (t) = vtbl_ptr;
- }
#if 0
/* This is now done above. */
if (DECL_FIELD_CONTEXT (vfield) != t)
@@ -4437,55 +4423,6 @@ popclass (modify)
current_class_type = *--current_class_stack;
current_class_name = *--current_class_stack;
- if (current_class_type)
- {
- if (CLASSTYPE_VTBL_PTR (current_class_type))
- {
- current_vtable_decl
- = lookup_name (DECL_NAME (CLASSTYPE_VTBL_PTR (current_class_type)),
- 0);
- if (current_vtable_decl)
- current_vtable_decl = build_indirect_ref (current_vtable_decl,
- NULL_PTR);
- }
- current_class_decl = lookup_name (this_identifier, 0);
- if (current_class_decl)
- {
- if (TREE_CODE (TREE_TYPE (current_class_decl)) == POINTER_TYPE)
- {
- tree temp;
- if (CLASSTYPE_INST_VAR (current_class_type) == NULL_TREE)
- {
- /* Can't call build_indirect_ref here, because it has special
- logic to return C_C_D given this argument. */
- C_C_D = build1 (INDIRECT_REF, current_class_type, current_class_decl);
- CLASSTYPE_INST_VAR (current_class_type) = C_C_D;
- }
- else
- {
- C_C_D = CLASSTYPE_INST_VAR (current_class_type);
- /* `current_class_decl' is different for every
- function we compile. */
- TREE_OPERAND (C_C_D, 0) = current_class_decl;
- }
- temp = TREE_TYPE (TREE_TYPE (current_class_decl));
- TREE_READONLY (C_C_D) = TYPE_READONLY (temp);
- TREE_SIDE_EFFECTS (C_C_D) = TYPE_VOLATILE (temp);
- TREE_THIS_VOLATILE (C_C_D) = TYPE_VOLATILE (temp);
- }
- else
- C_C_D = current_class_decl;
- }
- else
- C_C_D = NULL_TREE;
- }
- else
- {
- current_class_decl = NULL_TREE;
- current_vtable_decl = NULL_TREE;
- C_C_D = NULL_TREE;
- }
-
pop_memoized_context (modify);
ret: