diff options
author | Mark Mitchell <mitchell@dumbledore.codesourcery.com> | 2000-01-11 06:50:19 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-01-11 06:50:19 +0000 |
commit | 376f73bd08b12bd698f2af7b26a349feba47cd46 (patch) | |
tree | a7daf5063ae7c9a24c0eaf30edbe11be36db79eb | |
parent | 1e57ec753335e0787315fe296f3a4e9d0ab95ef1 (diff) | |
download | gcc-376f73bd08b12bd698f2af7b26a349feba47cd46.zip gcc-376f73bd08b12bd698f2af7b26a349feba47cd46.tar.gz gcc-376f73bd08b12bd698f2af7b26a349feba47cd46.tar.bz2 |
class.c (dfs_modify_vtables_queue_p): Remove.
* class.c (dfs_modify_vtables_queue_p): Remove.
(modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
and dfs_marked_real_bases_queue_p instead of
dfs_modify_vtables_queue_p.
From-SVN: r31319
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/class.c | 28 |
2 files changed, 8 insertions, 25 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 00078c6..310ca2f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com> + * class.c (dfs_modify_vtables_queue_p): Remove. + (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p + and dfs_marked_real_bases_queue_p instead of + dfs_modify_vtables_queue_p. + * class.c (build_vbase_path): Simplify. (dfs_propagate_binfo_offsets): New function. (propagate_binfo_offsets): Use it. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index ad504d0..023cf1a 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -103,7 +103,6 @@ static void check_for_override PROTO((tree, tree)); static tree get_class_offset_1 PROTO((tree, tree, tree, tree, tree)); static tree get_class_offset PROTO((tree, tree, tree, tree)); static void modify_one_vtable PROTO((tree, tree, tree)); -static tree dfs_modify_vtables_queue_p PROTO((tree, void *)); static tree dfs_modify_vtables PROTO((tree, void *)); static void modify_all_vtables PROTO((tree, tree)); static void determine_primary_base PROTO((tree, int *)); @@ -2463,23 +2462,6 @@ modify_one_vtable (binfo, t, fndecl) /* Called from modify_all_vtables via dfs_walk. */ static tree -dfs_modify_vtables_queue_p (binfo, data) - tree binfo; - void *data; -{ - tree list = (tree) data; - - if (TREE_VIA_VIRTUAL (binfo)) - binfo = BINFO_FOR_VBASE (BINFO_TYPE (binfo), TREE_PURPOSE (list)); - - return (TREE_ADDRESSABLE (list) - ? markedp (binfo, NULL) - : unmarkedp (binfo, NULL)); -} - -/* Called from modify_all_vtables via dfs_walk. */ - -static tree dfs_modify_vtables (binfo, data) tree binfo; void *data; @@ -2510,13 +2492,9 @@ modify_all_vtables (t, fndecl) tree list; list = build_tree_list (t, fndecl); - dfs_walk (TYPE_BINFO (t), dfs_modify_vtables, dfs_modify_vtables_queue_p, - list); - /* Let dfs_modify_vtables_queue_p know to check that the mark is - present before queueing a base, rather than checking to see that - it is *not* present. */ - TREE_ADDRESSABLE (list) = 1; - dfs_walk (TYPE_BINFO (t), dfs_unmark, dfs_modify_vtables_queue_p, list); + dfs_walk (TYPE_BINFO (t), dfs_modify_vtables, + dfs_unmarked_real_bases_queue_p, list); + dfs_walk (TYPE_BINFO (t), dfs_unmark, dfs_marked_real_bases_queue_p, t); } /* Fixup all the delta entries in this one vtable that need updating. */ |