This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PATCH: fix libgcj/7060
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Fri, 21 Jun 2002 23:33:48 -0400 (EDT)
- Subject: Re: PATCH: fix libgcj/7060
On 21 Jun 2002, Tom Tromey wrote:
> Jeff> I decided it would be best to invoke getMethod recursively,
> Jeff> since interfaces may inherit from a tree of other interfaces.
> Jeff> To avoid catching NoSuchMethodExceptions I split getMethod into
> Jeff> two, introducing a new private method.
>
> Jeff> Is this acceptable?
>
> There doesn't seem to be a simple, clean way to make it compute the
> utf8const just once :-(.
Not from lack of trying. I first wrote a C++ static method that couldn't
directly access Class members, then scrapped it for the current method
that can't declare a utf8const parameter.
At least the recursive call isn't the common case.
> In any case, I think _getMethod needs to search the superinterfaces
> even if `this' is not an interface itself. So I think you'd at least
> need to remove the `if'.
I thought so too at first, and tried to write a failing test. I couldn't.
It seems that gcj provides even abstract classes with a method entry for
each method of each interface implemented. So searching the interfaces
wasn't necessary to pass the tests.
> This method diverges from the spec in a number of ways :-(
How so? I should really pay more attention to the spec...
Jeff