This is the mail archive of the 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; sorry for the cross-post noise]

On 28 Nov 2006 08:51:49 -0800, Ian Lance Taylor <> wrote:
"Steven Bosscher" <> writes:

> On 11/28/06, Doug Gregor <> wrote:
> >         * tree.h (TYPE_CANONICAL): 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

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.


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