mirror of git://gcc.gnu.org/git/gcc.git
search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
* search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT. (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove. From-SVN: r29178
This commit is contained in:
parent
fd59e3a04e
commit
5430acc846
|
|
@ -1,3 +1,8 @@
|
||||||
|
1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
|
||||||
|
|
||||||
|
* search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
|
||||||
|
(dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
|
||||||
|
|
||||||
1999-09-07 Mark Mitchell <mark@codesourcery.com>
|
1999-09-07 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
* Makefile.in (tree.o): Depend on ggc.h.
|
* Makefile.in (tree.o): Depend on ggc.h.
|
||||||
|
|
@ -1010,10 +1015,10 @@ Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
|
||||||
|
|
||||||
1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
|
1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
|
||||||
|
|
||||||
cp-tree.h (init_cplus_unsave): New.
|
* cp-tree.h (init_cplus_unsave): New.
|
||||||
(cplus_unsave_expr_now): New.
|
(cplus_unsave_expr_now): New.
|
||||||
lex.c (init_parse): Call init_cplus_unsave.
|
* lex.c (init_parse): Call init_cplus_unsave.
|
||||||
tree.c (init_cplus_unsave): New.
|
* tree.c (init_cplus_unsave): New.
|
||||||
(cplus_unsave_expr_now): New.
|
(cplus_unsave_expr_now): New.
|
||||||
|
|
||||||
1999-08-13 Mark Mitchell <mark@codesourcery.com>
|
1999-08-13 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
@ -1195,9 +1200,6 @@ Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
|
||||||
|
|
||||||
1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
* decl.c: Remove redundant prototype for `print_error_function'.
|
|
||||||
(lang_print_error_function): Constify a char*.
|
|
||||||
|
|
||||||
* lex.c (lang_identify): Likewise.
|
* lex.c (lang_identify): Likewise.
|
||||||
|
|
||||||
1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
|
1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
|
||||||
|
|
@ -1614,7 +1616,6 @@ Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
1999-07-24 Richard Henderson <rth@cygnus.com>
|
1999-07-24 Richard Henderson <rth@cygnus.com>
|
||||||
|
|
||||||
* decl.c (ptr_type_node, va_list_type_node): New.
|
|
||||||
* gxx.gperf (__builtin_va_arg): New.
|
* gxx.gperf (__builtin_va_arg): New.
|
||||||
* parse.y (VA_ARG): New token.
|
* parse.y (VA_ARG): New token.
|
||||||
(unary_expr): Recognize it.
|
(unary_expr): Recognize it.
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,6 @@ static tree dfs_walk_real PROTO ((tree,
|
||||||
tree (*) (tree, void *),
|
tree (*) (tree, void *),
|
||||||
tree (*) (tree, void *),
|
tree (*) (tree, void *),
|
||||||
void *));
|
void *));
|
||||||
static tree dfs_bfv_queue_p PROTO ((tree, void *));
|
|
||||||
static tree dfs_bfv_helper PROTO ((tree, void *));
|
|
||||||
static tree get_virtuals_named_this_r PROTO ((tree, void *));
|
static tree get_virtuals_named_this_r PROTO ((tree, void *));
|
||||||
static tree context_for_name_lookup PROTO ((tree));
|
static tree context_for_name_lookup PROTO ((tree));
|
||||||
static tree canonical_binfo PROTO ((tree));
|
static tree canonical_binfo PROTO ((tree));
|
||||||
|
|
@ -3270,55 +3268,30 @@ types_overlap_p (empty_type, next_type)
|
||||||
return oi.found_overlap;
|
return oi.found_overlap;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bfv_info {
|
|
||||||
tree vbases;
|
|
||||||
tree var;
|
|
||||||
};
|
|
||||||
|
|
||||||
static tree
|
|
||||||
dfs_bfv_queue_p (binfo, data)
|
|
||||||
tree binfo;
|
|
||||||
void *data;
|
|
||||||
{
|
|
||||||
struct bfv_info *bfvi = (struct bfv_info *) data;
|
|
||||||
|
|
||||||
/* Use the real virtual base class objects, not the placeholders in
|
|
||||||
the usual hierarchy. */
|
|
||||||
if (TREE_VIA_VIRTUAL (binfo))
|
|
||||||
return binfo_member (BINFO_TYPE (binfo), bfvi->vbases);
|
|
||||||
|
|
||||||
return binfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Passed to dfs_walk_real by binfo_for_vtable; determine if bvtable
|
|
||||||
comes from BINFO. */
|
|
||||||
|
|
||||||
static tree
|
|
||||||
dfs_bfv_helper (binfo, data)
|
|
||||||
tree binfo;
|
|
||||||
void *data;
|
|
||||||
{
|
|
||||||
struct bfv_info *bfvi = (struct bfv_info *) data;
|
|
||||||
|
|
||||||
if (BINFO_VTABLE (binfo) == bfvi->var)
|
|
||||||
return binfo;
|
|
||||||
return NULL_TREE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Given a vtable VAR, determine which binfo it comes from. */
|
/* Given a vtable VAR, determine which binfo it comes from. */
|
||||||
|
|
||||||
tree
|
tree
|
||||||
binfo_for_vtable (var)
|
binfo_for_vtable (var)
|
||||||
tree var;
|
tree var;
|
||||||
{
|
{
|
||||||
tree type;
|
tree binfo = TYPE_BINFO (DECL_CONTEXT (var));
|
||||||
struct bfv_info bfvi;
|
tree binfos;
|
||||||
|
int i;
|
||||||
|
|
||||||
type = DECL_CONTEXT (var);
|
while (1)
|
||||||
bfvi.vbases = CLASSTYPE_VBASECLASSES (type);
|
{
|
||||||
bfvi.var = var;
|
binfos = BINFO_BASETYPES (binfo);
|
||||||
return dfs_walk_real (TYPE_BINFO (type),
|
if (binfos == NULL_TREE)
|
||||||
0, dfs_bfv_helper, dfs_bfv_queue_p, &bfvi);
|
break;
|
||||||
|
|
||||||
|
i = CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (binfo));
|
||||||
|
if (i == -1)
|
||||||
|
break;
|
||||||
|
|
||||||
|
binfo = TREE_VEC_ELT (binfos, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return binfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns 1 iff BINFO is from a direct or indirect virtual base. */
|
/* Returns 1 iff BINFO is from a direct or indirect virtual base. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue