This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] PR java/19870: Private static members accessed across nested classes (Part 2, Take 2)
- From: Andrew Haley <aph at redhat dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Aug 2005 17:05:47 +0100
- Subject: Re: [Patch] PR java/19870: Private static members accessed across nested classes (Part 2, Take 2)
- References: <42FF66B1.2010506@gmail.com><39399b9d05081511322fd134a6@mail.gmail.com>
Ranjit Mathew writes:
> On 8/14/05, Ranjit Mathew <rmathew@gmail.com> wrote:
> > Hi,
> >
> > Here is a resubmission of the patch for PR java/19870 part 2:
>
> And attached with this message is a version of the patch without
> any changes to the comments to highlight only the substantive
> changes. Please note that should this patch be approved, I would
> still like to apply the original patch to reduce the effort.
OK. You can fix comments any time you like. You don't need anyone's
approval.
> As I said in one of my messages, I have renamed nested_field_access_p()
> to nested_member_access_p() to reflect the fact that it can now
> handle FUNCTION_DECLs as well, since I didn't want to write a
> separate function to replicate the "nestedness" checks.
Reasonable.
> Similarly, build_outer_method_access_method() is now
> build_nested_method_access_method() to reflect the fact
> that it can now handle accesses from inner to outer, from
> outer to inner and between sibling nested classes.
>
> The rest of the patch makes GCJ generate accessor methods
> for static method accesses too.
>
> Please let me know if I have left out anything.
>
> OK for mainline?
>
> Thanks,
> Ranjit.
>
> --
> Ranjit Mathew Email: rmathew AT gmail DOT com
>
> Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
> Index: ChangeLog
> from Ranjit Mathew <rmathew@hotmail.com>
>
> PR java/19870
> * parse.y (nested_field_access_p): Rename to nested_member_access_p
> and expand to handle method accesses across nested classes.
> (build_outer_method_access_method): Rename to
> build_nested_method_access_method.
> (resolve_expression_name): Use the newly-renamed
> nested_member_access_p method.
> (resolve_qualified_expression_name): Likewise.
> (patch_method_invocation): Also consider static methods for access
> method generation.
> (maybe_use_access_method): Use the more general
> nested_memeber_access_p to determine access across nested class
> boundaries. Allow THIS_ARG to be NULL (for static methods).
OK, Thanks.
Andrew.