public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <199712022336.PAA16687@kankakee.wrs.com> (raw)

> From: "Joshua S. Allen" <allen@eecs.tulane.edu>
> 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.

             reply	other threads:[~1997-12-02 22:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-02 22:54 Mike Stump [this message]
1997-12-10  7:31 ` Joshua S. Allen
  -- strict thread matches above, loose matches on Subject: below --
1997-12-10 16:00 Mike Stump
     [not found] <199712011505.JAA11781.cygnus.egcs@duvieux.eecs.tulane.edu>
1997-12-01 18:46 ` Jason Merrill
1997-12-01  7:05 Joshua S. Allen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199712022336.PAA16687@kankakee.wrs.com \
    --to=mrs@wrs.com \
    --cc=allen@eecs.tulane.edu \
    --cc=egcs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).