public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Per Bothner <bothner@cygnus.com>
To: egcs@cygnus.com
Subject: Re: Proposed new tree node for gcc
Date: Fri, 27 Mar 1998 15:18:00 -0000	[thread overview]
Message-ID: <199803261741.JAA21586@cygnus.com> (raw)
In-Reply-To: <19980325163115.42437@dot.cygnus.com>

Alexandre Petit-Bianco <apbianco@cygnus.com> wrote:
> We (Per Bothner and myself) propose the definition of a new tree node
> called EXPR_WITH_FILE_LOCATION defined as a 'e' node.

That should be a '1' node.

There should also be a macro like:

#define EXPR_WFL_SET_LINE_COLUMN(NODE, LINE, COL) \
  (EXPR_WFL_LINECOL(NODE) = ((LINE) << 12) | ((COL) & 0xfff))

Richard Henderson <rth@cygnus.com> wrote:

> While I think that the idea is good, doing such gross things with
> overloading `common.chain' is very bad.  Defining a new struct is
> not so difficult, and should be the way this is accomplished.

While I am not religious on the subject, I do think it is
desirable to not waste space.  (I know - this is a goal that
is foreign to gcc ...)  If we are going to represent entire
programs (including imported files) as tree nodes, there may be
a lot of EXPR_WITH_FILE_LOCATION nodes.  Wasting a word for each
seems a shame.

There is already precdent for overloading common.chain in TYPE_STUB_DECL,
so it is too late to argue that common.chain should only be used to link
things together into a list.

Note that you could not use TREE_CHAIN to chain arbitrary expressions
together, since declarations are expressions, but the TREE_CHAIN of a
declaration is usually in use.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner

  reply	other threads:[~1998-03-27 15:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-24 14:49 Alexandre Petit-Bianco
1998-03-25 16:30 ` Richard Henderson
1998-03-27 15:18   ` Per Bothner [this message]
1998-03-26 21:49 ` Jeffrey A Law
1998-03-29  5:14   ` Per Bothner
1998-03-31  0:46     ` Jeffrey A Law
1998-03-31  0:20       ` Per Bothner

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=199803261741.JAA21586@cygnus.com \
    --to=bothner@cygnus.com \
    --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).