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 2:12 AM, Zack Weinberg wrote:
Well, since this is (hopefully) the final data structure, I intended
that the comments in c-decl.c should explain it adequately.  Can you
look at those and tell me where they're inadequate?

What I'm hoping for is a summary paragraph saying what these 4000 lines of changes mean at a high level -- what were you changing, and why -- just so I have some hope of asking the right questions about the patch.


As far as I can tell, it appears that you've added the c_binding structure to the name lookup and scoping code. So how do the c_binding structure, c_scope structure, and lookup code interact? From the bits of removed code, it looks like struct c_scope still exists, but that most of the lookup questions get done on the c_binding structure rather than c_scope structure, and this changed a lot of the commonly-called functions. It also looks like several functions were renamed (pushlevel -> push_scope, poplevel->pop_scope). Any particular reason for this? Are you trying to make the C and C++ code more analogous? Is struct c_binding intended to resemble struct cxx_binding?

You also mention that "the new data structure is somewhat more memory intensive than strictly necessary." Ok, which data structure do you mean (c_binding?), and why do you think it's more memory intensive? Why might this be bad? Why was it necessary?

I'll admit I'm still a gcc newbie, so part of the problem's bound to be that I still can't see the forest from the trees when looking at a large patch. However, I don't think it's unreasonable to ask for a paragraph explaining how the world's changed in this patch; the previous patches had nice summaries explaining what was going on from a very high level. Considering that the change breaks the Objective C and Java front ends, I'd think that a high-level summary explaining how struct c_binding affects the C front end would be essential to get someone to fix both of those.

Robert


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