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: Separate cxx_binding uses in name lookup


gkeating@apple.com (Geoffrey Keating) writes:

| cxx_binding was being used for two purposes in name lookup: to be
| passed between routines representing a found binding, and as a
| persistent data structure holding the binding for a particular scope.
| This patch splits the two.  It is mostly for code clarity; there might
| be a small speed improvement, but I doubt it would be measurable.
| 
| Bootstrapped & tested on powerpc-darwin, for C and C++ languages.

This code looks OK to me, although I would suggest that you use
a different name from scope_binding, that conveys the purpose of the
separation -- lookup_result ?  cxx_binding and scope_binding at the
same time look too confusing to me.

You may need Mark or Jason's approval for final commit.

At some point we should get rid of cxx_binding::value_is_inherited and
cxx_binding::is_local.  For example, the information in binding->is_local 
is redundant with binding->scope->kind.  The relationship between
binding->value_is_inherited and binding->scope is trickier but that is
doable. 

-- Gaby


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