This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: [PATCH] Canonical types (1/3)


[Also dropping gcc@gcc.gnu.org; sorry for the cross-post noise]

On 28 Nov 2006 08:51:49 -0800, Ian Lance Taylor <iant@google.com> wrote:
"Steven Bosscher" <stevenb.gcc@gmail.com> writes:

> On 11/28/06, Doug Gregor <doug.gregor@gmail.com> wrote:
> >         * tree.h (TYPE_CANONICAL): New.
> >         (TYPE_STRUCTURAL_EQUALITY): New.
> >         (struct tree_type): Added structural_equality, unused_bits,
> >         canonical fields.
>
> If I understand your patches correctly, this stuff is only needed for
> the C-family languages.  So why steal two pointers on the generic
> struct tree_type?  Are you planning to make all front ends use these
> fields, or is it just additional bloat for e.g. Ada, Fortran, Java?
> ;-)

It seems to me that all the frontends should use these fields.
Hopefully we can use it as a lever to eliminate the types_compatible_p
langhook.

Ideally, every front end would use canonical types, because every language needs to compare types for equality. I, personally, only have enough knowledge of the C++ front end (and the C common bits) to do a decent job there. Now that the infrastructure is in place, converting another front end involves (1) changing "comptypes" in the same way that I did for the C++ front end and (2) locating all language-specific type constructors and handling canonical types there.

 Cheers,
 Doug


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]