summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/class.c33
-rw-r--r--gcc/cp/cp-lang.c3
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/decl2.c30
5 files changed, 9 insertions, 67 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 309c3f4f6cf..8d22b749794 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+Wed Jul 30 19:12:48 CEST 2003 Jan Hubicka <jh@suse.cz>
+
+ * class.c (build_vtable_entry_ref): Kill.
+ (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
+ (build_vfn_ref): Do not call build_vtable_entry_ref.
+ * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
+ * cp-tree.h (prepare_assemble_variable): Kill.
+ * cp-decl.c (prepare_assemble_variable): Kill.
+
2003-07-29 Geoffrey Keating <geoffk@apple.com>
* parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b447f7013ee..527eae4611c 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -131,7 +131,6 @@ static void add_implicitly_declared_members (tree, int, int, int);
static tree fixed_type_or_null (tree, int *, int *);
static tree resolve_address_of_overloaded_function (tree, tree, int,
int, int, tree);
-static tree build_vtable_entry_ref (tree, tree, tree);
static tree build_vtbl_ref_1 (tree, tree);
static tree build_vtbl_initializer (tree, tree, tree, tree, int *);
static int count_fields (tree);
@@ -421,32 +420,6 @@ convert_to_base_statically (tree expr, tree base)
}
-/* Virtual function things. */
-
-static tree
-build_vtable_entry_ref (tree array_ref, tree instance, tree idx)
-{
- tree i, i2, vtable, first_fn, basetype;
-
- basetype = non_reference (TREE_TYPE (instance));
-
- vtable = get_vtbl_decl_for_binfo (TYPE_BINFO (basetype));
- first_fn = TYPE_BINFO_VTABLE (basetype);
-
- i = fold (build_array_ref (first_fn, idx));
- i = fold (build_c_cast (ptrdiff_type_node,
- build_unary_op (ADDR_EXPR, i, 0)));
- i2 = fold (build_array_ref (vtable, build_int_2 (0,0)));
- i2 = fold (build_c_cast (ptrdiff_type_node,
- build_unary_op (ADDR_EXPR, i2, 0)));
- i = fold (cp_build_binary_op (MINUS_EXPR, i, i2));
-
- if (TREE_CODE (i) != INTEGER_CST)
- abort ();
-
- return build (VTABLE_REF, TREE_TYPE (array_ref), array_ref, vtable, i);
-}
-
/* Given an object INSTANCE, return an expression which yields the
vtable element corresponding to INDEX. There are many special
cases for INSTANCE which we take care of here, mainly to avoid
@@ -490,9 +463,6 @@ build_vtbl_ref (tree instance, tree idx)
{
tree aref = build_vtbl_ref_1 (instance, idx);
- if (flag_vtable_gc)
- aref = build_vtable_entry_ref (aref, instance, idx);
-
return aref;
}
@@ -510,9 +480,6 @@ build_vfn_ref (tree instance, tree idx)
aref = build1 (NOP_EXPR, TREE_TYPE (aref),
build_unary_op (ADDR_EXPR, aref, /*noconvert=*/1));
- if (flag_vtable_gc)
- aref = build_vtable_entry_ref (aref, instance, idx);
-
return aref;
}
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index adf670596d4..6de92102a9d 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -153,9 +153,6 @@ static bool cp_var_mod_type_p (tree);
#undef LANG_HOOKS_EXPR_SIZE
#define LANG_HOOKS_EXPR_SIZE cp_expr_size
-#undef LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE
-#define LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE prepare_assemble_variable
-
#undef LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION
#define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION expand_body
#undef LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 0ee47d9b9d9..a7bdc578e7d 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3826,7 +3826,6 @@ extern tree build_artificial_parm (tree, tree);
extern tree get_guard (tree);
extern tree get_guard_cond (tree);
extern tree set_guard (tree);
-extern void prepare_assemble_variable (tree);
extern void lower_function (tree);
/* XXX Not i18n clean. */
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 896282c770d..f89258c867d 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1626,36 +1626,6 @@ import_export_class (tree ctype)
CLASSTYPE_INTERFACE_ONLY (ctype) = (import_export < 0);
}
}
-
-/* We need to describe to the assembler the relationship between
- a vtable and the vtable of the parent class. */
-
-void
-prepare_assemble_variable (tree vars)
-{
- tree parent;
- rtx child_rtx, parent_rtx;
-
- if (!flag_vtable_gc || TREE_CODE (vars) != VAR_DECL
- || !DECL_VTABLE_OR_VTT_P (vars))
- return;
-
- child_rtx = XEXP (DECL_RTL (vars), 0); /* strip the mem ref */
-
- parent = binfo_for_vtable (vars);
-
- if (parent == TYPE_BINFO (DECL_CONTEXT (vars)))
- parent_rtx = const0_rtx;
- else if (parent)
- {
- parent = get_vtbl_decl_for_binfo (TYPE_BINFO (BINFO_TYPE (parent)));
- parent_rtx = XEXP (DECL_RTL (parent), 0); /* strip the mem ref */
- }
- else
- abort ();
-
- assemble_vtable_inherit (child_rtx, parent_rtx);
-}
/* If necessary, write out the vtables for the dynamic class CTYPE.
Returns true if any vtables were emitted. */