Proposed location for variable sizes etc in ARRAY_REF and COMPONENT_REF

Robert Dewar dewar@gnat.com
Wed Jun 23 02:28:00 GMT 2004


> Why not?  All the ugly stuff should be hidden behind the 
> accessors that you wrote.  It's just a matter of putting
> both codes in any switch statement (or whatever).

Is there really an analysis that shows that the memory usage is a 
significant issue here.

One of the real mistakes we made in GNAT was to complexify the tree in
the interests of saving some tree nodes (e.g. not creating proper
subtypes for string literals). This has caused lots of unreliable
special casing around the place, and does not begin to be worth
the trivial (by comparison) amount of memory used.

Yes, you can use the argument that things add up, and that if we always
ignore extra memory over and over again, things get terrible, but that's
a bogus argument. It can be used to prevent anything, since almost always
an excess of anything is undesirable.



More information about the Gcc mailing list