public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: egcs@cygnus.com
Subject: Proposed new tree node for gcc
Date: Tue, 24 Mar 1998 14:49:00 -0000	[thread overview]
Message-ID: <199803242051.MAA20731@sendai.cygnus.com.> (raw)

Hi,

This email proposes the introduction of a new tree node for gcc,
aiming at encapsulating other nodes with file location information. 

The idea is that there are languages like Java that require the entire
source file to be parsed before tree nodes can be built or completed,
which means that as we're encountering identifiers and expressions, we
need hook them to file location information so we can pinpoint errors
during the check of the semantic and generate debug information during
the expansion phase.

We (Per Bothner and myself) propose the definition of a new tree node
called EXPR_WITH_FILE_LOCATION defined as a 'e' node. The struct
tree_exp is big enough to provide us with the appropriate storage
space: `operands[]' can be used to store the encapsulated node,
`complexity' is big enough to store line (20 bit) and column numbers
(12 bit); `common.chain' can provide a hook for filename information.

We started to experiment with an implementation. It turns out that,
besides the definition of the new tree node in tree.def, some macro
definitions in tree.h and a function in tree.c, print-tree.c needs to
be slightly altered; expand_expr need to be modified to apply
expand_expr to the operand node of the encapsulating node, possibly
calling emit_line_note with the relevant file location information.

The file http://www.cygnus.com/~apbianco/gcc-patch capture the changes
we think are necessary. Let me know what you're thinking about it. So
far, everything, down to the name of the macros and functions is left
open for discussion.

Thanks,

-- Alex

             reply	other threads:[~1998-03-24 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-24 14:49 Alexandre Petit-Bianco [this message]
1998-03-25 16:30 ` Richard Henderson
1998-03-27 15:18   ` Per Bothner
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=199803242051.MAA20731@sendai.cygnus.com. \
    --to=apbianco@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).