public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* An ask for documentation of trees
@ 2002-10-21 11:27 D. Adamian
  2002-10-21 11:46 ` Fergus Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: D. Adamian @ 2002-10-21 11:27 UTC (permalink / raw)
  To: gcc

I'm currently developing a front-end for a language. I've read in the
docs that using RTL for interfacing front-end and the bulk of GCC is
a Bad Thing. And that trees should be used for it.

So the question is: what should be done in the front-end to use
trees? The language is not much similar to C, so some new types of
tree nodes should be defined and implemented. How is this done?

Thanks in advance.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: An ask for documentation of trees
  2002-10-21 11:27 An ask for documentation of trees D. Adamian
@ 2002-10-21 11:46 ` Fergus Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Fergus Henderson @ 2002-10-21 11:46 UTC (permalink / raw)
  To: D. Adamian; +Cc: gcc

On 21-Oct-2002, D. Adamian <dima@pulsepow.hop.stu.neva.ru> wrote:
> I'm currently developing a front-end for a language. I've read in the
> docs that using RTL for interfacing front-end and the bulk of GCC is
> a Bad Thing. And that trees should be used for it.

That's correct.

> So the question is: what should be done in the front-end to use
> trees?

See the "treelang" example.

> The language is not much similar to C, so some new types of
> tree nodes should be defined and implemented. How is this done?

Note that for the Mercury front-end, I didn't define any new tree nodes,
even though Mercury is very different from C.

But if you really do need to or want to define your own tree nodes,
have a look at java/java-tree.def and java/java-tree.h for an example.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: An ask for documentation of trees
@ 2002-10-21 11:38 S. Bosscher
  0 siblings, 0 replies; 3+ messages in thread
From: S. Bosscher @ 2002-10-21 11:38 UTC (permalink / raw)
  To: 'dima@pulsepow.hop.stu.neva.ru'; +Cc: 'gcc@gcc.gnu.org'

>  I'm currently developing a front-end for a language. I've read
>  in the docs that using RTL for interfacing front-end and the bulk
>  of GCC is a Bad Thing. And that trees should be used for it. So 
>  the question is: what should be done in the front-end to use 
>  trees? The language is not much similar to C, so some new types of 
>  tree nodes should be defined and implemented. How is this done? 
>  Thanks in advance.

1) Check out the tree-ssa branch, see the projects/tree-ssa/ for 
information about this.

2) Have a look at the C++ front end.

3) Go see http://home.wanadoo.nl/btp91/gcc/gcc-ast.html. It's incomplete
but still useful.

4) Have a look at http://gcc.gnu.org/onlinedocs/gccint/, and read
http://gcc.gnu.org/onlinedocs/gccint/Trees.html#Trees. These pages
try to document what you can find in {tree, c-common, cp-tree}.{def,h}. 

Hope this helps,

Greetz
Steven

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-21 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 11:27 An ask for documentation of trees D. Adamian
2002-10-21 11:46 ` Fergus Henderson
2002-10-21 11:38 S. Bosscher

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).