This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Separate cxx_binding uses in name lookup
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: gkeating at apple dot com (Geoffrey Keating)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 16 May 2004 17:33:40 +0200
- Subject: Re: Separate cxx_binding uses in name lookup
- Organization: Integrable Solutions
- References: <20040514223312.9695EB3D4A1@geoffk5.apple.com>
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