From mboxrd@z Thu Jan 1 00:00:00 1970 From: mrs@wrs.com (Mike Stump) To: allen@eecs.tulane.edu, egcs@cygnus.com Subject: Re: Multiple inheritance Date: Tue, 02 Dec 1997 22:54:00 -0000 Message-id: <199712022336.PAA16687@kankakee.wrs.com> X-SW-Source: 1997-12/msg00146.html > From: "Joshua S. Allen" > To: egcs@cygnus.com > Date: Mon, 1 Dec 1997 09:05:40 -0600 (CST) > (1) I need to construct a table of direct parents of a class. Why? Anyway, you can construct it from BINFO_BASETYPES, but it sounds more like you'd just be replicating it. > Whereas this could easily be done at parse time, Ick, very hard to do at parse time. > it is presenting me with problems and I was wondering if you could > direct me to how this information could be extracted from the parse > tree. Better to extract it from the internal data structures of the compiler. > Once I locate the method in a class, what is the format of the return > value I give to the calling function. >From the code (assuming just one value): return my_tree_cons (basetype_path, rval, NULL_TREE), where rval is TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (type), idx), and basetype_path denotes the subobject desired (you'll have to understand the code a bit to understand how to figure out this value.) An easier way to do this would seem to me to just redefine hides with whatever rules you want. If you do that, then the rest of the code should just work, though I may be missing something because you didn't describe what it is you wanted to do very well. I could give better help with a better idea of what it is you wanted to do. Good luck.