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: RFC/RFHelp: c-decl.c rewrite - almost but not quite



On Mar 17, 2004, at 6:22 PM, Zack Weinberg wrote:
How's that?

I am now seriously enlightened. Thanks for writing all that down -- I now realize part of the reason I didn't understand the code was that I wasn't aware of some of the details of C's semantics -- specifically the different namespaces for tags, labels, and names.


You've also made me realize that a potential optimization I noticed might not be so bright. When talking with Geoff Keating and Matt Austern about the stree work, we were looking at the cxx_binding structure. I asked why there was both a field for name and type, and Geoff explained how that handled the "struct stat" problem from C code. I'd suggested at the time that most cxx_bindings would only have one field filled at a time, so figuring out an alternative scheme (such as placing the type in a new cxx_binding chained off the old one) could save us about 1% on gcc's memory use. Considering that you've done the reverse (going from a chained representation to a structure containing all fields defined at the same level), maybe changing cxx_binding isn't an improvement.

Robert


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